-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbac4-standalone.html
More file actions
327 lines (303 loc) · 466 KB
/
bac4-standalone.html
File metadata and controls
327 lines (303 loc) · 466 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23646cff' d='M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z'/%3E%3C/svg%3E" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BAC4 Standalone - Interactive C4 Modelling Tool</title>
<script type="module">(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function o(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=o(u);fetch(u.href,f)}})();var Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nf={exports:{}},to={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Xg;function Lx(){if(Xg)return to;Xg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function o(r,u,f){var d=null;if(f!==void 0&&(d=""+f),u.key!==void 0&&(d=""+u.key),"key"in u){f={};for(var m in u)m!=="key"&&(f[m]=u[m])}else f=u;return u=f.ref,{$$typeof:n,type:r,key:d,ref:u!==void 0?u:null,props:f}}return to.Fragment=a,to.jsx=o,to.jsxs=o,to}var kg;function Bx(){return kg||(kg=1,nf.exports=Lx()),nf.exports}var C=Bx(),lf={exports:{}},xt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gg;function Ux(){if(Gg)return xt;Gg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),p=Symbol.iterator;function b(w){return w===null||typeof w!="object"?null:(w=p&&w[p]||w["@@iterator"],typeof w=="function"?w:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,z={};function A(w,R,K){this.props=w,this.context=R,this.refs=z,this.updater=K||M}A.prototype.isReactComponent={},A.prototype.setState=function(w,R){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,R,"setState")},A.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function L(){}L.prototype=A.prototype;function S(w,R,K){this.props=w,this.context=R,this.refs=z,this.updater=K||M}var T=S.prototype=new L;T.constructor=S,_(T,A.prototype),T.isPureReactComponent=!0;var $=Array.isArray;function V(){}var q={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function I(w,R,K){var F=K.ref;return{$$typeof:n,type:w,key:R,ref:F!==void 0?F:null,props:K}}function ut(w,R){return I(w.type,R,w.props)}function tt(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function et(w){var R={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(K){return R[K]})}var P=/\/+/g;function D(w,R){return typeof w=="object"&&w!==null&&w.key!=null?et(""+w.key):R.toString(36)}function U(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(V,V):(w.status="pending",w.then(function(R){w.status==="pending"&&(w.status="fulfilled",w.value=R)},function(R){w.status==="pending"&&(w.status="rejected",w.reason=R)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function N(w,R,K,F,at){var ct=typeof w;(ct==="undefined"||ct==="boolean")&&(w=null);var st=!1;if(w===null)st=!0;else switch(ct){case"bigint":case"string":case"number":st=!0;break;case"object":switch(w.$$typeof){case n:case a:st=!0;break;case v:return st=w._init,N(st(w._payload),R,K,F,at)}}if(st)return at=at(w),st=F===""?"."+D(w,0):F,$(at)?(K="",st!=null&&(K=st.replace(P,"$&/")+"/"),N(at,R,K,"",function(wt){return wt})):at!=null&&(tt(at)&&(at=ut(at,K+(at.key==null||w&&w.key===at.key?"":(""+at.key).replace(P,"$&/")+"/")+st)),R.push(at)),1;st=0;var rt=F===""?".":F+":";if($(w))for(var ft=0;ft<w.length;ft++)F=w[ft],ct=rt+D(F,ft),st+=N(F,R,K,ct,at);else if(ft=b(w),typeof ft=="function")for(w=ft.call(w),ft=0;!(F=w.next()).done;)F=F.value,ct=rt+D(F,ft++),st+=N(F,R,K,ct,at);else if(ct==="object"){if(typeof w.then=="function")return N(U(w),R,K,F,at);throw R=String(w),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return st}function H(w,R,K){if(w==null)return w;var F=[],at=0;return N(w,F,"","",function(ct){return R.call(K,ct,at++)}),F}function B(w){if(w._status===-1){var R=w._result;R=R(),R.then(function(K){(w._status===0||w._status===-1)&&(w._status=1,w._result=K)},function(K){(w._status===0||w._status===-1)&&(w._status=2,w._result=K)}),w._status===-1&&(w._status=0,w._result=R)}if(w._status===1)return w._result.default;throw w._result}var X=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},nt={map:H,forEach:function(w,R,K){H(w,function(){R.apply(this,arguments)},K)},count:function(w){var R=0;return H(w,function(){R++}),R},toArray:function(w){return H(w,function(R){return R})||[]},only:function(w){if(!tt(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return xt.Activity=x,xt.Children=nt,xt.Component=A,xt.Fragment=o,xt.Profiler=u,xt.PureComponent=S,xt.StrictMode=r,xt.Suspense=g,xt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,xt.__COMPILER_RUNTIME={__proto__:null,c:function(w){return q.H.useMemoCache(w)}},xt.cache=function(w){return function(){return w.apply(null,arguments)}},xt.cacheSignal=function(){return null},xt.cloneElement=function(w,R,K){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var F=_({},w.props),at=w.key;if(R!=null)for(ct in R.key!==void 0&&(at=""+R.key),R)!J.call(R,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&R.ref===void 0||(F[ct]=R[ct]);var ct=arguments.length-2;if(ct===1)F.children=K;else if(1<ct){for(var st=Array(ct),rt=0;rt<ct;rt++)st[rt]=arguments[rt+2];F.children=st}return I(w.type,at,F)},xt.createContext=function(w){return w={$$typeof:d,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},xt.createElement=function(w,R,K){var F,at={},ct=null;if(R!=null)for(F in R.key!==void 0&&(ct=""+R.key),R)J.call(R,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(at[F]=R[F]);var st=arguments.length-2;if(st===1)at.children=K;else if(1<st){for(var rt=Array(st),ft=0;ft<st;ft++)rt[ft]=arguments[ft+2];at.children=rt}if(w&&w.defaultProps)for(F in st=w.defaultProps,st)at[F]===void 0&&(at[F]=st[F]);return I(w,ct,at)},xt.createRef=function(){return{current:null}},xt.forwardRef=function(w){return{$$typeof:m,render:w}},xt.isValidElement=tt,xt.lazy=function(w){return{$$typeof:v,_payload:{_status:-1,_result:w},_init:B}},xt.memo=function(w,R){return{$$typeof:h,type:w,compare:R===void 0?null:R}},xt.startTransition=function(w){var R=q.T,K={};q.T=K;try{var F=w(),at=q.S;at!==null&&at(K,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(V,X)}catch(ct){X(ct)}finally{R!==null&&K.types!==null&&(R.types=K.types),q.T=R}},xt.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},xt.use=function(w){return q.H.use(w)},xt.useActionState=function(w,R,K){return q.H.useActionState(w,R,K)},xt.useCallback=function(w,R){return q.H.useCallback(w,R)},xt.useContext=function(w){return q.H.useContext(w)},xt.useDebugValue=function(){},xt.useDeferredValue=function(w,R){return q.H.useDeferredValue(w,R)},xt.useEffect=function(w,R){return q.H.useEffect(w,R)},xt.useEffectEvent=function(w){return q.H.useEffectEvent(w)},xt.useId=function(){return q.H.useId()},xt.useImperativeHandle=function(w,R,K){return q.H.useImperativeHandle(w,R,K)},xt.useInsertionEffect=function(w,R){return q.H.useInsertionEffect(w,R)},xt.useLayoutEffect=function(w,R){return q.H.useLayoutEffect(w,R)},xt.useMemo=function(w,R){return q.H.useMemo(w,R)},xt.useOptimistic=function(w,R){return q.H.useOptimistic(w,R)},xt.useReducer=function(w,R,K){return q.H.useReducer(w,R,K)},xt.useRef=function(w){return q.H.useRef(w)},xt.useState=function(w){return q.H.useState(w)},xt.useSyncExternalStore=function(w,R,K){return q.H.useSyncExternalStore(w,R,K)},xt.useTransition=function(){return q.H.useTransition()},xt.version="19.2.0",xt}var Zg;function bo(){return Zg||(Zg=1,lf.exports=Ux()),lf.exports}var Z=bo();const Ep=Sp(Z);var af={exports:{}},eo={},of={exports:{}},rf={};/**
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Qg;function Vx(){return Qg||(Qg=1,(function(n){function a(N,H){var B=N.length;N.push(H);t:for(;0<B;){var X=B-1>>>1,nt=N[X];if(0<u(nt,H))N[X]=H,N[B]=nt,B=X;else break t}}function o(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var H=N[0],B=N.pop();if(B!==H){N[0]=B;t:for(var X=0,nt=N.length,w=nt>>>1;X<w;){var R=2*(X+1)-1,K=N[R],F=R+1,at=N[F];if(0>u(K,B))F<nt&&0>u(at,K)?(N[X]=at,N[F]=B,X=F):(N[X]=K,N[R]=B,X=R);else if(F<nt&&0>u(at,B))N[X]=at,N[F]=B,X=F;else break t}}return H}function u(N,H){var B=N.sortIndex-H.sortIndex;return B!==0?B:N.id-H.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],h=[],v=1,x=null,p=3,b=!1,M=!1,_=!1,z=!1,A=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function T(N){for(var H=o(h);H!==null;){if(H.callback===null)r(h);else if(H.startTime<=N)r(h),H.sortIndex=H.expirationTime,a(g,H);else break;H=o(h)}}function $(N){if(_=!1,T(N),!M)if(o(g)!==null)M=!0,V||(V=!0,et());else{var H=o(h);H!==null&&U($,H.startTime-N)}}var V=!1,q=-1,J=5,I=-1;function ut(){return z?!0:!(n.unstable_now()-I<J)}function tt(){if(z=!1,V){var N=n.unstable_now();I=N;var H=!0;try{t:{M=!1,_&&(_=!1,L(q),q=-1),b=!0;var B=p;try{e:{for(T(N),x=o(g);x!==null&&!(x.expirationTime>N&&ut());){var X=x.callback;if(typeof X=="function"){x.callback=null,p=x.priorityLevel;var nt=X(x.expirationTime<=N);if(N=n.unstable_now(),typeof nt=="function"){x.callback=nt,T(N),H=!0;break e}x===o(g)&&r(g),T(N)}else r(g);x=o(g)}if(x!==null)H=!0;else{var w=o(h);w!==null&&U($,w.startTime-N),H=!1}}break t}finally{x=null,p=B,b=!1}H=void 0}}finally{H?et():V=!1}}}var et;if(typeof S=="function")et=function(){S(tt)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,D=P.port2;P.port1.onmessage=tt,et=function(){D.postMessage(null)}}else et=function(){A(tt,0)};function U(N,H){q=A(function(){N(n.unstable_now())},H)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(N){N.callback=null},n.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<N?Math.floor(1e3/N):5},n.unstable_getCurrentPriorityLevel=function(){return p},n.unstable_next=function(N){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var B=p;p=H;try{return N()}finally{p=B}},n.unstable_requestPaint=function(){z=!0},n.unstable_runWithPriority=function(N,H){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var B=p;p=N;try{return H()}finally{p=B}},n.unstable_scheduleCallback=function(N,H,B){var X=n.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?X+B:X):B=X,N){case 1:var nt=-1;break;case 2:nt=250;break;case 5:nt=1073741823;break;case 4:nt=1e4;break;default:nt=5e3}return nt=B+nt,N={id:v++,callback:H,priorityLevel:N,startTime:B,expirationTime:nt,sortIndex:-1},B>X?(N.sortIndex=B,a(h,N),o(g)===null&&N===o(h)&&(_?(L(q),q=-1):_=!0,U($,B-X))):(N.sortIndex=nt,a(g,N),M||b||(M=!0,V||(V=!0,et()))),N},n.unstable_shouldYield=ut,n.unstable_wrapCallback=function(N){var H=p;return function(){var B=p;p=H;try{return N.apply(this,arguments)}finally{p=B}}}})(rf)),rf}var Kg;function $x(){return Kg||(Kg=1,of.exports=Vx()),of.exports}var sf={exports:{}},ge={};/**
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Jg;function qx(){if(Jg)return ge;Jg=1;var n=bo();function a(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(a(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(g,h,v){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:""+x,children:g,containerInfo:h,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ge.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ge.createPortal=function(g,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return f(g,h,null,v)},ge.flushSync=function(g){var h=d.T,v=r.p;try{if(d.T=null,r.p=2,g)return g()}finally{d.T=h,r.p=v,r.d.f()}},ge.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(g,h))},ge.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},ge.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var v=h.as,x=m(v,h.crossOrigin),p=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?r.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:p,fetchPriority:b}):v==="script"&&r.d.X(g,{crossOrigin:x,integrity:p,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ge.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=m(h.as,h.crossOrigin);r.d.M(g,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(g)},ge.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,x=m(v,h.crossOrigin);r.d.L(g,v,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ge.preloadModule=function(g,h){if(typeof g=="string")if(h){var v=m(h.as,h.crossOrigin);r.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(g)},ge.requestFormReset=function(g){r.d.r(g)},ge.unstable_batchedUpdates=function(g,h){return g(h)},ge.useFormState=function(g,h,v){return d.H.useFormState(g,h,v)},ge.useFormStatus=function(){return d.H.useHostTransitionStatus()},ge.version="19.2.0",ge}var Fg;function wp(){if(Fg)return sf.exports;Fg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sf.exports=qx(),sf.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ig;function Yx(){if(Ig)return eo;Ig=1;var n=$x(),a=bo(),o=wp();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function f(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function m(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(f(t)!==t)throw Error(r(188))}function h(t){var e=t.alternate;if(!e){if(e=f(t),e===null)throw Error(r(188));return e!==t?null:t}for(var l=t,i=e;;){var s=l.return;if(s===null)break;var c=s.alternate;if(c===null){if(i=s.return,i!==null){l=i;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===l)return g(s),t;if(c===i)return g(s),e;c=c.sibling}throw Error(r(188))}if(l.return!==i.return)l=s,i=c;else{for(var y=!1,E=s.child;E;){if(E===l){y=!0,l=s,i=c;break}if(E===i){y=!0,i=s,l=c;break}E=E.sibling}if(!y){for(E=c.child;E;){if(E===l){y=!0,l=c,i=s;break}if(E===i){y=!0,i=c,l=s;break}E=E.sibling}if(!y)throw Error(r(189))}}if(l.alternate!==i)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:e}function v(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=v(t),e!==null)return e;t=t.sibling}return null}var x=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),S=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),ut=Symbol.for("react.memo_cache_sentinel"),tt=Symbol.iterator;function et(t){return t===null||typeof t!="object"?null:(t=tt&&t[tt]||t["@@iterator"],typeof t=="function"?t:null)}var P=Symbol.for("react.client.reference");function D(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===P?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case _:return"Fragment";case A:return"Profiler";case z:return"StrictMode";case $:return"Suspense";case V:return"SuspenseList";case I:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case M:return"Portal";case S:return t.displayName||"Context";case L:return(t._context.displayName||"Context")+".Consumer";case T:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case q:return e=t.displayName||null,e!==null?e:D(t.type)||"Memo";case J:e=t._payload,t=t._init;try{return D(t(e))}catch{}}return null}var U=Array.isArray,N=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},X=[],nt=-1;function w(t){return{current:t}}function R(t){0>nt||(t.current=X[nt],X[nt]=null,nt--)}function K(t,e){nt++,X[nt]=t.current,t.current=e}var F=w(null),at=w(null),ct=w(null),st=w(null);function rt(t,e){switch(K(ct,e),K(at,t),K(F,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?dg(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=dg(e),t=hg(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}R(F),K(F,t)}function ft(){R(F),R(at),R(ct)}function wt(t){t.memoizedState!==null&&K(st,t);var e=F.current,l=hg(e,t.type);e!==l&&(K(at,t),K(F,l))}function bt(t){at.current===t&&(R(F),R(at)),st.current===t&&(R(st),Fi._currentValue=B)}var pt,vt;function St(t){if(pt===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);pt=e&&e[1]||"",vt=-1<l.stack.indexOf(`
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+pt+t+vt}var Lt=!1;function $t(t,e){if(!t||Lt)return"";Lt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(e){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(W){var Q=W}Reflect.construct(t,[],ot)}else{try{ot.call()}catch(W){Q=W}t.call(ot.prototype)}}else{try{throw Error()}catch(W){Q=W}(ot=t())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(W){if(W&&Q&&typeof W.stack=="string")return[W.stack,Q.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=i.DetermineComponentFrameRoot(),y=c[0],E=c[1];if(y&&E){var O=y.split(`
`),G=E.split(`
`);for(s=i=0;i<O.length&&!O[i].includes("DetermineComponentFrameRoot");)i++;for(;s<G.length&&!G[s].includes("DetermineComponentFrameRoot");)s++;if(i===O.length||s===G.length)for(i=O.length-1,s=G.length-1;1<=i&&0<=s&&O[i]!==G[s];)s--;for(;1<=i&&0<=s;i--,s--)if(O[i]!==G[s]){if(i!==1||s!==1)do if(i--,s--,0>s||O[i]!==G[s]){var lt=`
`+O[i].replace(" at new "," at ");return t.displayName&<.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",t.displayName)),lt}while(1<=i&&0<=s);break}}}finally{Lt=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?St(l):""}function oe(t,e){switch(t.tag){case 26:case 27:case 5:return St(t.type);case 16:return St("Lazy");case 13:return t.child!==e&&e!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return $t(t.type,!1);case 11:return $t(t.type.render,!1);case 1:return $t(t.type,!0);case 31:return St("Activity");default:return""}}function $e(t){try{var e="",l=null;do e+=oe(t,l),l=t,t=t.return;while(t);return e}catch(i){return`
Error generating stack: `+i.message+`
`+i.stack}}var Je=Object.prototype.hasOwnProperty,qn=n.unstable_scheduleCallback,Yn=n.unstable_cancelCallback,_l=n.unstable_shouldYield,Cl=n.unstable_requestPaint,se=n.unstable_now,na=n.unstable_getCurrentPriorityLevel,pn=n.unstable_ImmediatePriority,Xn=n.unstable_UserBlockingPriority,Nl=n.unstable_NormalPriority,Vs=n.unstable_LowPriority,la=n.unstable_IdlePriority,$s=n.log,qs=n.unstable_setDisableYieldValue,Ml=null,pe=null;function on(t){if(typeof $s=="function"&&qs(t),pe&&typeof pe.setStrictMode=="function")try{pe.setStrictMode(Ml,t)}catch{}}var ye=Math.clz32?Math.clz32:ks,Ys=Math.log,Xs=Math.LN2;function ks(t){return t>>>=0,t===0?32:31-(Ys(t)/Xs|0)|0}var aa=256,ia=262144,oa=4194304;function yn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ra(t,e,l){var i=t.pendingLanes;if(i===0)return 0;var s=0,c=t.suspendedLanes,y=t.pingedLanes;t=t.warmLanes;var E=i&134217727;return E!==0?(i=E&~c,i!==0?s=yn(i):(y&=E,y!==0?s=yn(y):l||(l=E&~t,l!==0&&(s=yn(l))))):(E=i&~c,E!==0?s=yn(E):y!==0?s=yn(y):l||(l=i&~t,l!==0&&(s=yn(l)))),s===0?0:e!==0&&e!==s&&(e&c)===0&&(c=s&-s,l=e&-e,c>=l||c===32&&(l&4194048)!==0)?e:s}function Al(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Gs(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Mo(){var t=oa;return oa<<=1,(oa&62914560)===0&&(oa=4194304),t}function ri(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Tl(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Zs(t,e,l,i,s,c){var y=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var E=t.entanglements,O=t.expirationTimes,G=t.hiddenUpdates;for(l=y&~l;0<l;){var lt=31-ye(l),ot=1<<lt;E[lt]=0,O[lt]=-1;var Q=G[lt];if(Q!==null)for(G[lt]=null,lt=0;lt<Q.length;lt++){var W=Q[lt];W!==null&&(W.lane&=-536870913)}l&=~ot}i!==0&&Ao(t,i,0),c!==0&&s===0&&t.tag!==0&&(t.suspendedLanes|=c&~(y&~e))}function Ao(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var i=31-ye(e);t.entangledLanes|=e,t.entanglements[i]=t.entanglements[i]|1073741824|l&261930}function To(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var i=31-ye(l),s=1<<i;s&e|t[i]&e&&(t[i]|=e),l&=~s}}function zo(t,e){var l=e&-e;return l=(l&42)!==0?1:si(l),(l&(t.suspendedLanes|e))!==0?0:l}function si(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function ui(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Do(){var t=H.p;return t!==0?t:(t=window.event,t===void 0?32:Lg(t.type))}function Oo(t,e){var l=H.p;try{return H.p=t,e()}finally{H.p=l}}var rn=Math.random().toString(36).slice(2),le="__reactFiber$"+rn,he="__reactProps$"+rn,vn="__reactContainer$"+rn,sa="__reactEvents$"+rn,Ro="__reactListeners$"+rn,Qs="__reactHandles$"+rn,Ho="__reactResources$"+rn,zl="__reactMarker$"+rn;function ci(t){delete t[le],delete t[he],delete t[sa],delete t[Ro],delete t[Qs]}function kn(t){var e=t[le];if(e)return e;for(var l=t.parentNode;l;){if(e=l[vn]||l[le]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=bg(t);t!==null;){if(l=t[le])return l;t=bg(t)}return e}t=l,l=t.parentNode}return null}function Gn(t){if(t=t[le]||t[vn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Zn(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function Qn(t){var e=t[Ho];return e||(e=t[Ho]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function It(t){t[zl]=!0}var jo=new Set,Lo={};function xn(t,e){Kn(t,e),Kn(t+"Capture",e)}function Kn(t,e){for(Lo[t]=e,t=0;t<e.length;t++)jo.add(e[t])}var Ks=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]*$"),fi={},Bo={};function Js(t){return Je.call(Bo,t)?!0:Je.call(fi,t)?!1:Ks.test(t)?Bo[t]=!0:(fi[t]=!0,!1)}function ua(t,e,l){if(Js(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var i=e.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function ca(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function Fe(t,e,l,i){if(i===null)t.removeAttribute(l);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+i)}}function xe(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Uo(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Fs(t,e,l){var i=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var s=i.get,c=i.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(y){l=""+y,c.call(this,y)}}),Object.defineProperty(t,e,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function fa(t){if(!t._valueTracker){var e=Uo(t)?"checked":"value";t._valueTracker=Fs(t,e,""+t[e])}}function Vo(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),i="";return t&&(i=Uo(t)?t.checked?"true":"false":t.value),t=i,t!==l?(e.setValue(t),!0):!1}function da(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Is=/[\n"\\]/g;function me(t){return t.replace(Is,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function di(t,e,l,i,s,c,y,E){t.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?t.type=y:t.removeAttribute("type"),e!=null?y==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+xe(e)):t.value!==""+xe(e)&&(t.value=""+xe(e)):y!=="submit"&&y!=="reset"||t.removeAttribute("value"),e!=null?ha(t,y,xe(e)):l!=null?ha(t,y,xe(l)):i!=null&&t.removeAttribute("value"),s==null&&c!=null&&(t.defaultChecked=!!c),s!=null&&(t.checked=s&&typeof s!="function"&&typeof s!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+xe(E):t.removeAttribute("name")}function $o(t,e,l,i,s,c,y,E){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.type=c),e!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||e!=null)){fa(t);return}l=l!=null?""+xe(l):"",e=e!=null?""+xe(e):l,E||e===t.value||(t.value=e),t.defaultValue=e}i=i??s,i=typeof i!="function"&&typeof i!="symbol"&&!!i,t.checked=E?t.checked:!!i,t.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.name=y),fa(t)}function ha(t,e,l){e==="number"&&da(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function ma(t,e,l,i){if(t=t.options,e){e={};for(var s=0;s<l.length;s++)e["$"+l[s]]=!0;for(l=0;l<t.length;l++)s=e.hasOwnProperty("$"+t[l].value),t[l].selected!==s&&(t[l].selected=s),s&&i&&(t[l].defaultSelected=!0)}else{for(l=""+xe(l),e=null,s=0;s<t.length;s++){if(t[s].value===l){t[s].selected=!0,i&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function rd(t,e,l){if(e!=null&&(e=""+xe(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+xe(l):""}function sd(t,e,l,i){if(e==null){if(i!=null){if(l!=null)throw Error(r(92));if(U(i)){if(1<i.length)throw Error(r(93));i=i[0]}l=i}l==null&&(l=""),e=l}l=xe(e),t.defaultValue=l,i=t.textContent,i===l&&i!==""&&i!==null&&(t.value=i),fa(t)}function ga(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Dv=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 ud(t,e,l){var i=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?i?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":i?t.setProperty(e,l):typeof l!="number"||l===0||Dv.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function cd(t,e,l){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,l!=null){for(var i in l)!l.hasOwnProperty(i)||e!=null&&e.hasOwnProperty(i)||(i.indexOf("--")===0?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="");for(var s in e)i=e[s],e.hasOwnProperty(s)&&l[s]!==i&&ud(t,s,i)}else for(var c in e)e.hasOwnProperty(c)&&ud(t,c,e[c])}function Ws(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Ov=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"]]),Rv=/^[\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 qo(t){return Rv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function bn(){}var Ps=null;function tu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var pa=null,ya=null;function fd(t){var e=Gn(t);if(e&&(t=e.stateNode)){var l=t[he]||null;t:switch(t=e.stateNode,e.type){case"input":if(di(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+me(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var i=l[e];if(i!==t&&i.form===t.form){var s=i[he]||null;if(!s)throw Error(r(90));di(i,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(e=0;e<l.length;e++)i=l[e],i.form===t.form&&Vo(i)}break t;case"textarea":rd(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&ma(t,!!l.multiple,e,!1)}}}var eu=!1;function dd(t,e,l){if(eu)return t(e,l);eu=!0;try{var i=t(e);return i}finally{if(eu=!1,(pa!==null||ya!==null)&&(Ar(),pa&&(e=pa,t=ya,ya=pa=null,fd(e),t)))for(e=0;e<t.length;e++)fd(t[e])}}function hi(t,e){var l=t.stateNode;if(l===null)return null;var i=l[he]||null;if(i===null)return null;l=i[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,e,typeof l));return l}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(Sn)try{var mi={};Object.defineProperty(mi,"passive",{get:function(){nu=!0}}),window.addEventListener("test",mi,mi),window.removeEventListener("test",mi,mi)}catch{nu=!1}var Jn=null,lu=null,Yo=null;function hd(){if(Yo)return Yo;var t,e=lu,l=e.length,i,s="value"in Jn?Jn.value:Jn.textContent,c=s.length;for(t=0;t<l&&e[t]===s[t];t++);var y=l-t;for(i=1;i<=y&&e[l-i]===s[c-i];i++);return Yo=s.slice(t,1<i?1-i:void 0)}function Xo(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ko(){return!0}function md(){return!1}function be(t){function e(l,i,s,c,y){this._reactName=l,this._targetInst=s,this.type=i,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(l=t[E],this[E]=l?l(c):c[E]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?ko:md,this.isPropagationStopped=md,this}return x(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ko)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ko)},persist:function(){},isPersistent:ko}),e}var Dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Go=be(Dl),gi=x({},Dl,{view:0,detail:0}),Hv=be(gi),au,iu,pi,Zo=x({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==pi&&(pi&&t.type==="mousemove"?(au=t.screenX-pi.screenX,iu=t.screenY-pi.screenY):iu=au=0,pi=t),au)},movementY:function(t){return"movementY"in t?t.movementY:iu}}),gd=be(Zo),jv=x({},Zo,{dataTransfer:0}),Lv=be(jv),Bv=x({},gi,{relatedTarget:0}),ou=be(Bv),Uv=x({},Dl,{animationName:0,elapsedTime:0,pseudoElement:0}),Vv=be(Uv),$v=x({},Dl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qv=be($v),Yv=x({},Dl,{data:0}),pd=be(Yv),Xv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kv={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"},Gv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zv(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Gv[t])?!!e[t]:!1}function ru(){return Zv}var Qv=x({},gi,{key:function(t){if(t.key){var e=Xv[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Xo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?kv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(t){return t.type==="keypress"?Xo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Kv=be(Qv),Jv=x({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yd=be(Jv),Fv=x({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),Iv=be(Fv),Wv=x({},Dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pv=be(Wv),t1=x({},Zo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),e1=be(t1),n1=x({},Dl,{newState:0,oldState:0}),l1=be(n1),a1=[9,13,27,32],su=Sn&&"CompositionEvent"in window,yi=null;Sn&&"documentMode"in document&&(yi=document.documentMode);var i1=Sn&&"TextEvent"in window&&!yi,vd=Sn&&(!su||yi&&8<yi&&11>=yi),xd=" ",bd=!1;function Sd(t,e){switch(t){case"keyup":return a1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var va=!1;function o1(t,e){switch(t){case"compositionend":return Ed(e);case"keypress":return e.which!==32?null:(bd=!0,xd);case"textInput":return t=e.data,t===xd&&bd?null:t;default:return null}}function r1(t,e){if(va)return t==="compositionend"||!su&&Sd(t,e)?(t=hd(),Yo=lu=Jn=null,va=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return vd&&e.locale!=="ko"?null:e.data;default:return null}}var s1={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 wd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!s1[t.type]:e==="textarea"}function _d(t,e,l,i){pa?ya?ya.push(i):ya=[i]:pa=i,e=jr(e,"onChange"),0<e.length&&(l=new Go("onChange","change",null,l,i),t.push({event:l,listeners:e}))}var vi=null,xi=null;function u1(t){og(t,0)}function Qo(t){var e=Zn(t);if(Vo(e))return t}function Cd(t,e){if(t==="change")return e}var Nd=!1;if(Sn){var uu;if(Sn){var cu="oninput"in document;if(!cu){var Md=document.createElement("div");Md.setAttribute("oninput","return;"),cu=typeof Md.oninput=="function"}uu=cu}else uu=!1;Nd=uu&&(!document.documentMode||9<document.documentMode)}function Ad(){vi&&(vi.detachEvent("onpropertychange",Td),xi=vi=null)}function Td(t){if(t.propertyName==="value"&&Qo(xi)){var e=[];_d(e,xi,t,tu(t)),dd(u1,e)}}function c1(t,e,l){t==="focusin"?(Ad(),vi=e,xi=l,vi.attachEvent("onpropertychange",Td)):t==="focusout"&&Ad()}function f1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qo(xi)}function d1(t,e){if(t==="click")return Qo(e)}function h1(t,e){if(t==="input"||t==="change")return Qo(e)}function m1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ze=typeof Object.is=="function"?Object.is:m1;function bi(t,e){if(ze(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),i=Object.keys(e);if(l.length!==i.length)return!1;for(i=0;i<l.length;i++){var s=l[i];if(!Je.call(e,s)||!ze(t[s],e[s]))return!1}return!0}function zd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Dd(t,e){var l=zd(t);t=0;for(var i;l;){if(l.nodeType===3){if(i=t+l.textContent.length,t<=e&&i>=e)return{node:l,offset:e-t};t=i}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=zd(l)}}function Od(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Od(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Rd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=da(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=da(t.document)}return e}function fu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var g1=Sn&&"documentMode"in document&&11>=document.documentMode,xa=null,du=null,Si=null,hu=!1;function Hd(t,e,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;hu||xa==null||xa!==da(i)||(i=xa,"selectionStart"in i&&fu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Si&&bi(Si,i)||(Si=i,i=jr(du,"onSelect"),0<i.length&&(e=new Go("onSelect","select",null,e,l),t.push({event:e,listeners:i}),e.target=xa)))}function Ol(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ba={animationend:Ol("Animation","AnimationEnd"),animationiteration:Ol("Animation","AnimationIteration"),animationstart:Ol("Animation","AnimationStart"),transitionrun:Ol("Transition","TransitionRun"),transitionstart:Ol("Transition","TransitionStart"),transitioncancel:Ol("Transition","TransitionCancel"),transitionend:Ol("Transition","TransitionEnd")},mu={},jd={};Sn&&(jd=document.createElement("div").style,"AnimationEvent"in window||(delete ba.animationend.animation,delete ba.animationiteration.animation,delete ba.animationstart.animation),"TransitionEvent"in window||delete ba.transitionend.transition);function Rl(t){if(mu[t])return mu[t];if(!ba[t])return t;var e=ba[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in jd)return mu[t]=e[l];return t}var Ld=Rl("animationend"),Bd=Rl("animationiteration"),Ud=Rl("animationstart"),p1=Rl("transitionrun"),y1=Rl("transitionstart"),v1=Rl("transitioncancel"),Vd=Rl("transitionend"),$d=new Map,gu="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(" ");gu.push("scrollEnd");function Ie(t,e){$d.set(t,e),xn(e,[t])}var Ko=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},qe=[],Sa=0,pu=0;function Jo(){for(var t=Sa,e=pu=Sa=0;e<t;){var l=qe[e];qe[e++]=null;var i=qe[e];qe[e++]=null;var s=qe[e];qe[e++]=null;var c=qe[e];if(qe[e++]=null,i!==null&&s!==null){var y=i.pending;y===null?s.next=s:(s.next=y.next,y.next=s),i.pending=s}c!==0&&qd(l,s,c)}}function Fo(t,e,l,i){qe[Sa++]=t,qe[Sa++]=e,qe[Sa++]=l,qe[Sa++]=i,pu|=i,t.lanes|=i,t=t.alternate,t!==null&&(t.lanes|=i)}function yu(t,e,l,i){return Fo(t,e,l,i),Io(t)}function Hl(t,e){return Fo(t,null,null,e),Io(t)}function qd(t,e,l){t.lanes|=l;var i=t.alternate;i!==null&&(i.lanes|=l);for(var s=!1,c=t.return;c!==null;)c.childLanes|=l,i=c.alternate,i!==null&&(i.childLanes|=l),c.tag===22&&(t=c.stateNode,t===null||t._visibility&1||(s=!0)),t=c,c=c.return;return t.tag===3?(c=t.stateNode,s&&e!==null&&(s=31-ye(l),t=c.hiddenUpdates,i=t[s],i===null?t[s]=[e]:i.push(e),e.lane=l|536870912),c):null}function Io(t){if(50<Xi)throw Xi=0,Nc=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Ea={};function x1(t,e,l,i){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(t,e,l,i){return new x1(t,e,l,i)}function vu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function En(t,e){var l=t.alternate;return l===null?(l=De(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Yd(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Wo(t,e,l,i,s,c){var y=0;if(i=t,typeof t=="function")vu(t)&&(y=1);else if(typeof t=="string")y=_x(t,l,F.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case I:return t=De(31,l,e,s),t.elementType=I,t.lanes=c,t;case _:return jl(l.children,s,c,e);case z:y=8,s|=24;break;case A:return t=De(12,l,e,s|2),t.elementType=A,t.lanes=c,t;case $:return t=De(13,l,e,s),t.elementType=$,t.lanes=c,t;case V:return t=De(19,l,e,s),t.elementType=V,t.lanes=c,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case S:y=10;break t;case L:y=9;break t;case T:y=11;break t;case q:y=14;break t;case J:y=16,i=null;break t}y=29,l=Error(r(130,t===null?"null":typeof t,"")),i=null}return e=De(y,l,e,s),e.elementType=t,e.type=i,e.lanes=c,e}function jl(t,e,l,i){return t=De(7,t,i,e),t.lanes=l,t}function xu(t,e,l){return t=De(6,t,null,e),t.lanes=l,t}function Xd(t){var e=De(18,null,null,0);return e.stateNode=t,e}function bu(t,e,l){return e=De(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var kd=new WeakMap;function Ye(t,e){if(typeof t=="object"&&t!==null){var l=kd.get(t);return l!==void 0?l:(e={value:t,source:e,stack:$e(e)},kd.set(t,e),e)}return{value:t,source:e,stack:$e(e)}}var wa=[],_a=0,Po=null,Ei=0,Xe=[],ke=0,Fn=null,sn=1,un="";function wn(t,e){wa[_a++]=Ei,wa[_a++]=Po,Po=t,Ei=e}function Gd(t,e,l){Xe[ke++]=sn,Xe[ke++]=un,Xe[ke++]=Fn,Fn=t;var i=sn;t=un;var s=32-ye(i)-1;i&=~(1<<s),l+=1;var c=32-ye(e)+s;if(30<c){var y=s-s%5;c=(i&(1<<y)-1).toString(32),i>>=y,s-=y,sn=1<<32-ye(e)+s|l<<s|i,un=c+t}else sn=1<<c|l<<s|i,un=t}function Su(t){t.return!==null&&(wn(t,1),Gd(t,1,0))}function Eu(t){for(;t===Po;)Po=wa[--_a],wa[_a]=null,Ei=wa[--_a],wa[_a]=null;for(;t===Fn;)Fn=Xe[--ke],Xe[ke]=null,un=Xe[--ke],Xe[ke]=null,sn=Xe[--ke],Xe[ke]=null}function Zd(t,e){Xe[ke++]=sn,Xe[ke++]=un,Xe[ke++]=Fn,sn=e.id,un=e.overflow,Fn=t}var ue=null,Yt=null,Tt=!1,In=null,Ge=!1,wu=Error(r(519));function Wn(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wi(Ye(e,t)),wu}function Qd(t){var e=t.stateNode,l=t.type,i=t.memoizedProps;switch(e[le]=t,e[he]=i,l){case"dialog":Nt("cancel",e),Nt("close",e);break;case"iframe":case"object":case"embed":Nt("load",e);break;case"video":case"audio":for(l=0;l<Gi.length;l++)Nt(Gi[l],e);break;case"source":Nt("error",e);break;case"img":case"image":case"link":Nt("error",e),Nt("load",e);break;case"details":Nt("toggle",e);break;case"input":Nt("invalid",e),$o(e,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Nt("invalid",e);break;case"textarea":Nt("invalid",e),sd(e,i.value,i.defaultValue,i.children)}l=i.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||i.suppressHydrationWarning===!0||cg(e.textContent,l)?(i.popover!=null&&(Nt("beforetoggle",e),Nt("toggle",e)),i.onScroll!=null&&Nt("scroll",e),i.onScrollEnd!=null&&Nt("scrollend",e),i.onClick!=null&&(e.onclick=bn),e=!0):e=!1,e||Wn(t,!0)}function Kd(t){for(ue=t.return;ue;)switch(ue.tag){case 5:case 31:case 13:Ge=!1;return;case 27:case 3:Ge=!0;return;default:ue=ue.return}}function Ca(t){if(t!==ue)return!1;if(!Tt)return Kd(t),Tt=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||qc(t.type,t.memoizedProps)),l=!l),l&&Yt&&Wn(t),Kd(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Yt=xg(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Yt=xg(t)}else e===27?(e=Yt,dl(t.type)?(t=Zc,Zc=null,Yt=t):Yt=e):Yt=ue?Qe(t.stateNode.nextSibling):null;return!0}function Ll(){Yt=ue=null,Tt=!1}function _u(){var t=In;return t!==null&&(_e===null?_e=t:_e.push.apply(_e,t),In=null),t}function wi(t){In===null?In=[t]:In.push(t)}var Cu=w(null),Bl=null,_n=null;function Pn(t,e,l){K(Cu,e._currentValue),e._currentValue=l}function Cn(t){t._currentValue=Cu.current,R(Cu)}function Nu(t,e,l){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===l)break;t=t.return}}function Mu(t,e,l,i){var s=t.child;for(s!==null&&(s.return=t);s!==null;){var c=s.dependencies;if(c!==null){var y=s.child;c=c.firstContext;t:for(;c!==null;){var E=c;c=s;for(var O=0;O<e.length;O++)if(E.context===e[O]){c.lanes|=l,E=c.alternate,E!==null&&(E.lanes|=l),Nu(c.return,l,t),i||(y=null);break t}c=E.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(r(341));y.lanes|=l,c=y.alternate,c!==null&&(c.lanes|=l),Nu(y,l,t),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===t){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function Na(t,e,l,i){t=null;for(var s=e,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var E=s.type;ze(s.pendingProps.value,y.value)||(t!==null?t.push(E):t=[E])}}else if(s===st.current){if(y=s.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(t!==null?t.push(Fi):t=[Fi])}s=s.return}t!==null&&Mu(e,t,l,i),e.flags|=262144}function tr(t){for(t=t.firstContext;t!==null;){if(!ze(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ul(t){Bl=t,_n=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ce(t){return Jd(Bl,t)}function er(t,e){return Bl===null&&Ul(t),Jd(t,e)}function Jd(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},_n===null){if(t===null)throw Error(r(308));_n=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else _n=_n.next=e;return l}var b1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,i){t.push(i)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},S1=n.unstable_scheduleCallback,E1=n.unstable_NormalPriority,Wt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new b1,data:new Map,refCount:0}}function _i(t){t.refCount--,t.refCount===0&&S1(E1,function(){t.controller.abort()})}var Ci=null,Tu=0,Ma=0,Aa=null;function w1(t,e){if(Ci===null){var l=Ci=[];Tu=0,Ma=Oc(),Aa={status:"pending",value:void 0,then:function(i){l.push(i)}}}return Tu++,e.then(Fd,Fd),e}function Fd(){if(--Tu===0&&Ci!==null){Aa!==null&&(Aa.status="fulfilled");var t=Ci;Ci=null,Ma=0,Aa=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function _1(t,e){var l=[],i={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return t.then(function(){i.status="fulfilled",i.value=e;for(var s=0;s<l.length;s++)(0,l[s])(e)},function(s){for(i.status="rejected",i.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),i}var Id=N.S;N.S=function(t,e){Hm=se(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&w1(t,e),Id!==null&&Id(t,e)};var Vl=w(null);function zu(){var t=Vl.current;return t!==null?t:qt.pooledCache}function nr(t,e){e===null?K(Vl,Vl.current):K(Vl,e.pool)}function Wd(){var t=zu();return t===null?null:{parent:Wt._currentValue,pool:t}}var Ta=Error(r(460)),Du=Error(r(474)),lr=Error(r(542)),ar={then:function(){}};function Pd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function th(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(bn,bn),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,nh(t),t;default:if(typeof e.status=="string")e.then(bn,bn);else{if(t=qt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(i){if(e.status==="pending"){var s=e;s.status="fulfilled",s.value=i}},function(i){if(e.status==="pending"){var s=e;s.status="rejected",s.reason=i}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,nh(t),t}throw ql=e,Ta}}function $l(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ql=l,Ta):l}}var ql=null;function eh(){if(ql===null)throw Error(r(459));var t=ql;return ql=null,t}function nh(t){if(t===Ta||t===lr)throw Error(r(483))}var za=null,Ni=0;function ir(t){var e=Ni;return Ni+=1,za===null&&(za=[]),th(za,t,e)}function Mi(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function or(t,e){throw e.$$typeof===p?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function lh(t){function e(Y,j){if(t){var k=Y.deletions;k===null?(Y.deletions=[j],Y.flags|=16):k.push(j)}}function l(Y,j){if(!t)return null;for(;j!==null;)e(Y,j),j=j.sibling;return null}function i(Y){for(var j=new Map;Y!==null;)Y.key!==null?j.set(Y.key,Y):j.set(Y.index,Y),Y=Y.sibling;return j}function s(Y,j){return Y=En(Y,j),Y.index=0,Y.sibling=null,Y}function c(Y,j,k){return Y.index=k,t?(k=Y.alternate,k!==null?(k=k.index,k<j?(Y.flags|=67108866,j):k):(Y.flags|=67108866,j)):(Y.flags|=1048576,j)}function y(Y){return t&&Y.alternate===null&&(Y.flags|=67108866),Y}function E(Y,j,k,it){return j===null||j.tag!==6?(j=xu(k,Y.mode,it),j.return=Y,j):(j=s(j,k),j.return=Y,j)}function O(Y,j,k,it){var gt=k.type;return gt===_?lt(Y,j,k.props.children,it,k.key):j!==null&&(j.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===J&&$l(gt)===j.type)?(j=s(j,k.props),Mi(j,k),j.return=Y,j):(j=Wo(k.type,k.key,k.props,null,Y.mode,it),Mi(j,k),j.return=Y,j)}function G(Y,j,k,it){return j===null||j.tag!==4||j.stateNode.containerInfo!==k.containerInfo||j.stateNode.implementation!==k.implementation?(j=bu(k,Y.mode,it),j.return=Y,j):(j=s(j,k.children||[]),j.return=Y,j)}function lt(Y,j,k,it,gt){return j===null||j.tag!==7?(j=jl(k,Y.mode,it,gt),j.return=Y,j):(j=s(j,k),j.return=Y,j)}function ot(Y,j,k){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=xu(""+j,Y.mode,k),j.return=Y,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return k=Wo(j.type,j.key,j.props,null,Y.mode,k),Mi(k,j),k.return=Y,k;case M:return j=bu(j,Y.mode,k),j.return=Y,j;case J:return j=$l(j),ot(Y,j,k)}if(U(j)||et(j))return j=jl(j,Y.mode,k,null),j.return=Y,j;if(typeof j.then=="function")return ot(Y,ir(j),k);if(j.$$typeof===S)return ot(Y,er(Y,j),k);or(Y,j)}return null}function Q(Y,j,k,it){var gt=j!==null?j.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return gt!==null?null:E(Y,j,""+k,it);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case b:return k.key===gt?O(Y,j,k,it):null;case M:return k.key===gt?G(Y,j,k,it):null;case J:return k=$l(k),Q(Y,j,k,it)}if(U(k)||et(k))return gt!==null?null:lt(Y,j,k,it,null);if(typeof k.then=="function")return Q(Y,j,ir(k),it);if(k.$$typeof===S)return Q(Y,j,er(Y,k),it);or(Y,k)}return null}function W(Y,j,k,it,gt){if(typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint")return Y=Y.get(k)||null,E(j,Y,""+it,gt);if(typeof it=="object"&&it!==null){switch(it.$$typeof){case b:return Y=Y.get(it.key===null?k:it.key)||null,O(j,Y,it,gt);case M:return Y=Y.get(it.key===null?k:it.key)||null,G(j,Y,it,gt);case J:return it=$l(it),W(Y,j,k,it,gt)}if(U(it)||et(it))return Y=Y.get(k)||null,lt(j,Y,it,gt,null);if(typeof it.then=="function")return W(Y,j,k,ir(it),gt);if(it.$$typeof===S)return W(Y,j,k,er(j,it),gt);or(j,it)}return null}function dt(Y,j,k,it){for(var gt=null,Dt=null,ht=j,_t=j=0,At=null;ht!==null&&_t<k.length;_t++){ht.index>_t?(At=ht,ht=null):At=ht.sibling;var Ot=Q(Y,ht,k[_t],it);if(Ot===null){ht===null&&(ht=At);break}t&&ht&&Ot.alternate===null&&e(Y,ht),j=c(Ot,j,_t),Dt===null?gt=Ot:Dt.sibling=Ot,Dt=Ot,ht=At}if(_t===k.length)return l(Y,ht),Tt&&wn(Y,_t),gt;if(ht===null){for(;_t<k.length;_t++)ht=ot(Y,k[_t],it),ht!==null&&(j=c(ht,j,_t),Dt===null?gt=ht:Dt.sibling=ht,Dt=ht);return Tt&&wn(Y,_t),gt}for(ht=i(ht);_t<k.length;_t++)At=W(ht,Y,_t,k[_t],it),At!==null&&(t&&At.alternate!==null&&ht.delete(At.key===null?_t:At.key),j=c(At,j,_t),Dt===null?gt=At:Dt.sibling=At,Dt=At);return t&&ht.forEach(function(yl){return e(Y,yl)}),Tt&&wn(Y,_t),gt}function yt(Y,j,k,it){if(k==null)throw Error(r(151));for(var gt=null,Dt=null,ht=j,_t=j=0,At=null,Ot=k.next();ht!==null&&!Ot.done;_t++,Ot=k.next()){ht.index>_t?(At=ht,ht=null):At=ht.sibling;var yl=Q(Y,ht,Ot.value,it);if(yl===null){ht===null&&(ht=At);break}t&&ht&&yl.alternate===null&&e(Y,ht),j=c(yl,j,_t),Dt===null?gt=yl:Dt.sibling=yl,Dt=yl,ht=At}if(Ot.done)return l(Y,ht),Tt&&wn(Y,_t),gt;if(ht===null){for(;!Ot.done;_t++,Ot=k.next())Ot=ot(Y,Ot.value,it),Ot!==null&&(j=c(Ot,j,_t),Dt===null?gt=Ot:Dt.sibling=Ot,Dt=Ot);return Tt&&wn(Y,_t),gt}for(ht=i(ht);!Ot.done;_t++,Ot=k.next())Ot=W(ht,Y,_t,Ot.value,it),Ot!==null&&(t&&Ot.alternate!==null&&ht.delete(Ot.key===null?_t:Ot.key),j=c(Ot,j,_t),Dt===null?gt=Ot:Dt.sibling=Ot,Dt=Ot);return t&&ht.forEach(function(jx){return e(Y,jx)}),Tt&&wn(Y,_t),gt}function Vt(Y,j,k,it){if(typeof k=="object"&&k!==null&&k.type===_&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case b:t:{for(var gt=k.key;j!==null;){if(j.key===gt){if(gt=k.type,gt===_){if(j.tag===7){l(Y,j.sibling),it=s(j,k.props.children),it.return=Y,Y=it;break t}}else if(j.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===J&&$l(gt)===j.type){l(Y,j.sibling),it=s(j,k.props),Mi(it,k),it.return=Y,Y=it;break t}l(Y,j);break}else e(Y,j);j=j.sibling}k.type===_?(it=jl(k.props.children,Y.mode,it,k.key),it.return=Y,Y=it):(it=Wo(k.type,k.key,k.props,null,Y.mode,it),Mi(it,k),it.return=Y,Y=it)}return y(Y);case M:t:{for(gt=k.key;j!==null;){if(j.key===gt)if(j.tag===4&&j.stateNode.containerInfo===k.containerInfo&&j.stateNode.implementation===k.implementation){l(Y,j.sibling),it=s(j,k.children||[]),it.return=Y,Y=it;break t}else{l(Y,j);break}else e(Y,j);j=j.sibling}it=bu(k,Y.mode,it),it.return=Y,Y=it}return y(Y);case J:return k=$l(k),Vt(Y,j,k,it)}if(U(k))return dt(Y,j,k,it);if(et(k)){if(gt=et(k),typeof gt!="function")throw Error(r(150));return k=gt.call(k),yt(Y,j,k,it)}if(typeof k.then=="function")return Vt(Y,j,ir(k),it);if(k.$$typeof===S)return Vt(Y,j,er(Y,k),it);or(Y,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,j!==null&&j.tag===6?(l(Y,j.sibling),it=s(j,k),it.return=Y,Y=it):(l(Y,j),it=xu(k,Y.mode,it),it.return=Y,Y=it),y(Y)):l(Y,j)}return function(Y,j,k,it){try{Ni=0;var gt=Vt(Y,j,k,it);return za=null,gt}catch(ht){if(ht===Ta||ht===lr)throw ht;var Dt=De(29,ht,null,Y.mode);return Dt.lanes=it,Dt.return=Y,Dt}finally{}}}var Yl=lh(!0),ah=lh(!1),tl=!1;function Ou(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function el(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function nl(t,e,l){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,(Rt&2)!==0){var s=i.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),i.pending=e,e=Io(t),qd(t,null,l),e}return Fo(t,i,e,l),Io(t)}function Ai(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var i=e.lanes;i&=t.pendingLanes,l|=i,e.lanes=l,To(t,l)}}function Hu(t,e){var l=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var s=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?s=c=y:c=c.next=y,l=l.next}while(l!==null);c===null?s=c=e:c=c.next=e}else s=c=e;l={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:i.shared,callbacks:i.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var ju=!1;function Ti(){if(ju){var t=Aa;if(t!==null)throw t}}function zi(t,e,l,i){ju=!1;var s=t.updateQueue;tl=!1;var c=s.firstBaseUpdate,y=s.lastBaseUpdate,E=s.shared.pending;if(E!==null){s.shared.pending=null;var O=E,G=O.next;O.next=null,y===null?c=G:y.next=G,y=O;var lt=t.alternate;lt!==null&&(lt=lt.updateQueue,E=lt.lastBaseUpdate,E!==y&&(E===null?lt.firstBaseUpdate=G:E.next=G,lt.lastBaseUpdate=O))}if(c!==null){var ot=s.baseState;y=0,lt=G=O=null,E=c;do{var Q=E.lane&-536870913,W=Q!==E.lane;if(W?(Mt&Q)===Q:(i&Q)===Q){Q!==0&&Q===Ma&&(ju=!0),lt!==null&&(lt=lt.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});t:{var dt=t,yt=E;Q=e;var Vt=l;switch(yt.tag){case 1:if(dt=yt.payload,typeof dt=="function"){ot=dt.call(Vt,ot,Q);break t}ot=dt;break t;case 3:dt.flags=dt.flags&-65537|128;case 0:if(dt=yt.payload,Q=typeof dt=="function"?dt.call(Vt,ot,Q):dt,Q==null)break t;ot=x({},ot,Q);break t;case 2:tl=!0}}Q=E.callback,Q!==null&&(t.flags|=64,W&&(t.flags|=8192),W=s.callbacks,W===null?s.callbacks=[Q]:W.push(Q))}else W={lane:Q,tag:E.tag,payload:E.payload,callback:E.callback,next:null},lt===null?(G=lt=W,O=ot):lt=lt.next=W,y|=Q;if(E=E.next,E===null){if(E=s.shared.pending,E===null)break;W=E,E=W.next,W.next=null,s.lastBaseUpdate=W,s.shared.pending=null}}while(!0);lt===null&&(O=ot),s.baseState=O,s.firstBaseUpdate=G,s.lastBaseUpdate=lt,c===null&&(s.shared.lanes=0),rl|=y,t.lanes=y,t.memoizedState=ot}}function ih(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function oh(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)ih(l[t],e)}var Da=w(null),rr=w(0);function rh(t,e){t=Hn,K(rr,t),K(Da,e),Hn=t|e.baseLanes}function Lu(){K(rr,Hn),K(Da,Da.current)}function Bu(){Hn=rr.current,R(Da),R(rr)}var Oe=w(null),Ze=null;function ll(t){var e=t.alternate;K(Jt,Jt.current&1),K(Oe,t),Ze===null&&(e===null||Da.current!==null||e.memoizedState!==null)&&(Ze=t)}function Uu(t){K(Jt,Jt.current),K(Oe,t),Ze===null&&(Ze=t)}function sh(t){t.tag===22?(K(Jt,Jt.current),K(Oe,t),Ze===null&&(Ze=t)):al()}function al(){K(Jt,Jt.current),K(Oe,Oe.current)}function Re(t){R(Oe),Ze===t&&(Ze=null),R(Jt)}var Jt=w(0);function sr(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||kc(l)||Gc(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Nn=0,Et=null,Bt=null,Pt=null,ur=!1,Oa=!1,Xl=!1,cr=0,Di=0,Ra=null,C1=0;function Qt(){throw Error(r(321))}function Vu(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ze(t[l],e[l]))return!1;return!0}function $u(t,e,l,i,s,c){return Nn=c,Et=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,N.H=t===null||t.memoizedState===null?Gh:ec,Xl=!1,c=l(i,s),Xl=!1,Oa&&(c=ch(e,l,i,s)),uh(t),c}function uh(t){N.H=Hi;var e=Bt!==null&&Bt.next!==null;if(Nn=0,Pt=Bt=Et=null,ur=!1,Di=0,Ra=null,e)throw Error(r(300));t===null||te||(t=t.dependencies,t!==null&&tr(t)&&(te=!0))}function ch(t,e,l,i){Et=t;var s=0;do{if(Oa&&(Ra=null),Di=0,Oa=!1,25<=s)throw Error(r(301));if(s+=1,Pt=Bt=null,t.updateQueue!=null){var c=t.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}N.H=Zh,c=e(l,i)}while(Oa);return c}function N1(){var t=N.H,e=t.useState()[0];return e=typeof e.then=="function"?Oi(e):e,t=t.useState()[0],(Bt!==null?Bt.memoizedState:null)!==t&&(Et.flags|=1024),e}function qu(){var t=cr!==0;return cr=0,t}function Yu(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function Xu(t){if(ur){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}ur=!1}Nn=0,Pt=Bt=Et=null,Oa=!1,Di=cr=0,Ra=null}function ve(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?Et.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function Ft(){if(Bt===null){var t=Et.alternate;t=t!==null?t.memoizedState:null}else t=Bt.next;var e=Pt===null?Et.memoizedState:Pt.next;if(e!==null)Pt=e,Bt=t;else{if(t===null)throw Et.alternate===null?Error(r(467)):Error(r(310));Bt=t,t={memoizedState:Bt.memoizedState,baseState:Bt.baseState,baseQueue:Bt.baseQueue,queue:Bt.queue,next:null},Pt===null?Et.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oi(t){var e=Di;return Di+=1,Ra===null&&(Ra=[]),t=th(Ra,t,e),e=Et,(Pt===null?e.memoizedState:Pt.next)===null&&(e=e.alternate,N.H=e===null||e.memoizedState===null?Gh:ec),t}function dr(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Oi(t);if(t.$$typeof===S)return ce(t)}throw Error(r(438,String(t)))}function ku(t){var e=null,l=Et.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var i=Et.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(e={data:i.data.map(function(s){return s.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=fr(),Et.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),i=0;i<t;i++)l[i]=ut;return e.index++,l}function Mn(t,e){return typeof e=="function"?e(t):e}function hr(t){var e=Ft();return Gu(e,Bt,t)}function Gu(t,e,l){var i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=l;var s=t.baseQueue,c=i.pending;if(c!==null){if(s!==null){var y=s.next;s.next=c.next,c.next=y}e.baseQueue=s=c,i.pending=null}if(c=t.baseState,s===null)t.memoizedState=c;else{e=s.next;var E=y=null,O=null,G=e,lt=!1;do{var ot=G.lane&-536870913;if(ot!==G.lane?(Mt&ot)===ot:(Nn&ot)===ot){var Q=G.revertLane;if(Q===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ot===Ma&&(lt=!0);else if((Nn&Q)===Q){G=G.next,Q===Ma&&(lt=!0);continue}else ot={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},O===null?(E=O=ot,y=c):O=O.next=ot,Et.lanes|=Q,rl|=Q;ot=G.action,Xl&&l(c,ot),c=G.hasEagerState?G.eagerState:l(c,ot)}else Q={lane:ot,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},O===null?(E=O=Q,y=c):O=O.next=Q,Et.lanes|=ot,rl|=ot;G=G.next}while(G!==null&&G!==e);if(O===null?y=c:O.next=E,!ze(c,t.memoizedState)&&(te=!0,lt&&(l=Aa,l!==null)))throw l;t.memoizedState=c,t.baseState=y,t.baseQueue=O,i.lastRenderedState=c}return s===null&&(i.lanes=0),[t.memoizedState,i.dispatch]}function Zu(t){var e=Ft(),l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var i=l.dispatch,s=l.pending,c=e.memoizedState;if(s!==null){l.pending=null;var y=s=s.next;do c=t(c,y.action),y=y.next;while(y!==s);ze(c,e.memoizedState)||(te=!0),e.memoizedState=c,e.baseQueue===null&&(e.baseState=c),l.lastRenderedState=c}return[c,i]}function fh(t,e,l){var i=Et,s=Ft(),c=Tt;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=e();var y=!ze((Bt||s).memoizedState,l);if(y&&(s.memoizedState=l,te=!0),s=s.queue,Ju(mh.bind(null,i,s,t),[t]),s.getSnapshot!==e||y||Pt!==null&&Pt.memoizedState.tag&1){if(i.flags|=2048,Ha(9,{destroy:void 0},hh.bind(null,i,s,l,e),null),qt===null)throw Error(r(349));c||(Nn&127)!==0||dh(i,e,l)}return l}function dh(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=Et.updateQueue,e===null?(e=fr(),Et.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function hh(t,e,l,i){e.value=l,e.getSnapshot=i,gh(e)&&ph(t)}function mh(t,e,l){return l(function(){gh(e)&&ph(t)})}function gh(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ze(t,l)}catch{return!0}}function ph(t){var e=Hl(t,2);e!==null&&Ce(e,t,2)}function Qu(t){var e=ve();if(typeof t=="function"){var l=t;if(t=l(),Xl){on(!0);try{l()}finally{on(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:t},e}function yh(t,e,l,i){return t.baseState=l,Gu(t,Bt,typeof i=="function"?i:Mn)}function M1(t,e,l,i,s){if(pr(t))throw Error(r(485));if(t=e.action,t!==null){var c={payload:s,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};N.T!==null?l(!0):c.isTransition=!1,i(c),l=e.pending,l===null?(c.next=e.pending=c,vh(e,c)):(c.next=l.next,e.pending=l.next=c)}}function vh(t,e){var l=e.action,i=e.payload,s=t.state;if(e.isTransition){var c=N.T,y={};N.T=y;try{var E=l(s,i),O=N.S;O!==null&&O(y,E),xh(t,e,E)}catch(G){Ku(t,e,G)}finally{c!==null&&y.types!==null&&(c.types=y.types),N.T=c}}else try{c=l(s,i),xh(t,e,c)}catch(G){Ku(t,e,G)}}function xh(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(i){bh(t,e,i)},function(i){return Ku(t,e,i)}):bh(t,e,l)}function bh(t,e,l){e.status="fulfilled",e.value=l,Sh(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,vh(t,l)))}function Ku(t,e,l){var i=t.pending;if(t.pending=null,i!==null){i=i.next;do e.status="rejected",e.reason=l,Sh(e),e=e.next;while(e!==i)}t.action=null}function Sh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Eh(t,e){return e}function wh(t,e){if(Tt){var l=qt.formState;if(l!==null){t:{var i=Et;if(Tt){if(Yt){e:{for(var s=Yt,c=Ge;s.nodeType!==8;){if(!c){s=null;break e}if(s=Qe(s.nextSibling),s===null){s=null;break e}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Yt=Qe(s.nextSibling),i=s.data==="F!";break t}}Wn(i)}i=!1}i&&(e=l[0])}}return l=ve(),l.memoizedState=l.baseState=e,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:e},l.queue=i,l=Yh.bind(null,Et,i),i.dispatch=l,i=Qu(!1),c=tc.bind(null,Et,!1,i.queue),i=ve(),s={state:e,dispatch:null,action:t,pending:null},i.queue=s,l=M1.bind(null,Et,s,c,l),s.dispatch=l,i.memoizedState=t,[e,l,!1]}function _h(t){var e=Ft();return Ch(e,Bt,t)}function Ch(t,e,l){if(e=Gu(t,e,Eh)[0],t=hr(Mn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var i=Oi(e)}catch(y){throw y===Ta?lr:y}else i=e;e=Ft();var s=e.queue,c=s.dispatch;return l!==e.memoizedState&&(Et.flags|=2048,Ha(9,{destroy:void 0},A1.bind(null,s,l),null)),[i,c,t]}function A1(t,e){t.action=e}function Nh(t){var e=Ft(),l=Bt;if(l!==null)return Ch(e,l,t);Ft(),e=e.memoizedState,l=Ft();var i=l.queue.dispatch;return l.memoizedState=t,[e,i,!1]}function Ha(t,e,l,i){return t={tag:t,create:l,deps:i,inst:e,next:null},e=Et.updateQueue,e===null&&(e=fr(),Et.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(i=l.next,l.next=t,t.next=i,e.lastEffect=t),t}function Mh(){return Ft().memoizedState}function mr(t,e,l,i){var s=ve();Et.flags|=t,s.memoizedState=Ha(1|e,{destroy:void 0},l,i===void 0?null:i)}function gr(t,e,l,i){var s=Ft();i=i===void 0?null:i;var c=s.memoizedState.inst;Bt!==null&&i!==null&&Vu(i,Bt.memoizedState.deps)?s.memoizedState=Ha(e,c,l,i):(Et.flags|=t,s.memoizedState=Ha(1|e,c,l,i))}function Ah(t,e){mr(8390656,8,t,e)}function Ju(t,e){gr(2048,8,t,e)}function T1(t){Et.flags|=4;var e=Et.updateQueue;if(e===null)e=fr(),Et.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Th(t){var e=Ft().memoizedState;return T1({ref:e,nextImpl:t}),function(){if((Rt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function zh(t,e){return gr(4,2,t,e)}function Dh(t,e){return gr(4,4,t,e)}function Oh(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Rh(t,e,l){l=l!=null?l.concat([t]):null,gr(4,4,Oh.bind(null,e,t),l)}function Fu(){}function Hh(t,e){var l=Ft();e=e===void 0?null:e;var i=l.memoizedState;return e!==null&&Vu(e,i[1])?i[0]:(l.memoizedState=[t,e],t)}function jh(t,e){var l=Ft();e=e===void 0?null:e;var i=l.memoizedState;if(e!==null&&Vu(e,i[1]))return i[0];if(i=t(),Xl){on(!0);try{t()}finally{on(!1)}}return l.memoizedState=[i,e],i}function Iu(t,e,l){return l===void 0||(Nn&1073741824)!==0&&(Mt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Lm(),Et.lanes|=t,rl|=t,l)}function Lh(t,e,l,i){return ze(l,e)?l:Da.current!==null?(t=Iu(t,l,i),ze(t,e)||(te=!0),t):(Nn&42)===0||(Nn&1073741824)!==0&&(Mt&261930)===0?(te=!0,t.memoizedState=l):(t=Lm(),Et.lanes|=t,rl|=t,e)}function Bh(t,e,l,i,s){var c=H.p;H.p=c!==0&&8>c?c:8;var y=N.T,E={};N.T=E,tc(t,!1,e,l);try{var O=s(),G=N.S;if(G!==null&&G(E,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var lt=_1(O,i);Ri(t,e,lt,Le(t))}else Ri(t,e,i,Le(t))}catch(ot){Ri(t,e,{then:function(){},status:"rejected",reason:ot},Le())}finally{H.p=c,y!==null&&E.types!==null&&(y.types=E.types),N.T=y}}function z1(){}function Wu(t,e,l,i){if(t.tag!==5)throw Error(r(476));var s=Uh(t).queue;Bh(t,s,e,B,l===null?z1:function(){return Vh(t),l(i)})}function Uh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:B},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mn,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Vh(t){var e=Uh(t);e.next===null&&(e=t.alternate.memoizedState),Ri(t,e.next.queue,{},Le())}function Pu(){return ce(Fi)}function $h(){return Ft().memoizedState}function qh(){return Ft().memoizedState}function D1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Le();t=el(l);var i=nl(e,t,l);i!==null&&(Ce(i,e,l),Ai(i,e,l)),e={cache:Au()},t.payload=e;return}e=e.return}}function O1(t,e,l){var i=Le();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},pr(t)?Xh(e,l):(l=yu(t,e,l,i),l!==null&&(Ce(l,t,i),kh(l,e,i)))}function Yh(t,e,l){var i=Le();Ri(t,e,l,i)}function Ri(t,e,l,i){var s={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(pr(t))Xh(e,s);else{var c=t.alternate;if(t.lanes===0&&(c===null||c.lanes===0)&&(c=e.lastRenderedReducer,c!==null))try{var y=e.lastRenderedState,E=c(y,l);if(s.hasEagerState=!0,s.eagerState=E,ze(E,y))return Fo(t,e,s,0),qt===null&&Jo(),!1}catch{}finally{}if(l=yu(t,e,s,i),l!==null)return Ce(l,t,i),kh(l,e,i),!0}return!1}function tc(t,e,l,i){if(i={lane:2,revertLane:Oc(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},pr(t)){if(e)throw Error(r(479))}else e=yu(t,l,i,2),e!==null&&Ce(e,t,2)}function pr(t){var e=t.alternate;return t===Et||e!==null&&e===Et}function Xh(t,e){Oa=ur=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function kh(t,e,l){if((l&4194048)!==0){var i=e.lanes;i&=t.pendingLanes,l|=i,e.lanes=l,To(t,l)}}var Hi={readContext:ce,use:dr,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};Hi.useEffectEvent=Qt;var Gh={readContext:ce,use:dr,useCallback:function(t,e){return ve().memoizedState=[t,e===void 0?null:e],t},useContext:ce,useEffect:Ah,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,mr(4194308,4,Oh.bind(null,e,t),l)},useLayoutEffect:function(t,e){return mr(4194308,4,t,e)},useInsertionEffect:function(t,e){mr(4,2,t,e)},useMemo:function(t,e){var l=ve();e=e===void 0?null:e;var i=t();if(Xl){on(!0);try{t()}finally{on(!1)}}return l.memoizedState=[i,e],i},useReducer:function(t,e,l){var i=ve();if(l!==void 0){var s=l(e);if(Xl){on(!0);try{l(e)}finally{on(!1)}}}else s=e;return i.memoizedState=i.baseState=s,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:s},i.queue=t,t=t.dispatch=O1.bind(null,Et,t),[i.memoizedState,t]},useRef:function(t){var e=ve();return t={current:t},e.memoizedState=t},useState:function(t){t=Qu(t);var e=t.queue,l=Yh.bind(null,Et,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Fu,useDeferredValue:function(t,e){var l=ve();return Iu(l,t,e)},useTransition:function(){var t=Qu(!1);return t=Bh.bind(null,Et,t.queue,!0,!1),ve().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var i=Et,s=ve();if(Tt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=e(),qt===null)throw Error(r(349));(Mt&127)!==0||dh(i,e,l)}s.memoizedState=l;var c={value:l,getSnapshot:e};return s.queue=c,Ah(mh.bind(null,i,c,t),[t]),i.flags|=2048,Ha(9,{destroy:void 0},hh.bind(null,i,c,l,e),null),l},useId:function(){var t=ve(),e=qt.identifierPrefix;if(Tt){var l=un,i=sn;l=(i&~(1<<32-ye(i)-1)).toString(32)+l,e="_"+e+"R_"+l,l=cr++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=C1++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Pu,useFormState:wh,useActionState:wh,useOptimistic:function(t){var e=ve();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=tc.bind(null,Et,!0,l),l.dispatch=e,[t,e]},useMemoCache:ku,useCacheRefresh:function(){return ve().memoizedState=D1.bind(null,Et)},useEffectEvent:function(t){var e=ve(),l={impl:t};return e.memoizedState=l,function(){if((Rt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},ec={readContext:ce,use:dr,useCallback:Hh,useContext:ce,useEffect:Ju,useImperativeHandle:Rh,useInsertionEffect:zh,useLayoutEffect:Dh,useMemo:jh,useReducer:hr,useRef:Mh,useState:function(){return hr(Mn)},useDebugValue:Fu,useDeferredValue:function(t,e){var l=Ft();return Lh(l,Bt.memoizedState,t,e)},useTransition:function(){var t=hr(Mn)[0],e=Ft().memoizedState;return[typeof t=="boolean"?t:Oi(t),e]},useSyncExternalStore:fh,useId:$h,useHostTransitionStatus:Pu,useFormState:_h,useActionState:_h,useOptimistic:function(t,e){var l=Ft();return yh(l,Bt,t,e)},useMemoCache:ku,useCacheRefresh:qh};ec.useEffectEvent=Th;var Zh={readContext:ce,use:dr,useCallback:Hh,useContext:ce,useEffect:Ju,useImperativeHandle:Rh,useInsertionEffect:zh,useLayoutEffect:Dh,useMemo:jh,useReducer:Zu,useRef:Mh,useState:function(){return Zu(Mn)},useDebugValue:Fu,useDeferredValue:function(t,e){var l=Ft();return Bt===null?Iu(l,t,e):Lh(l,Bt.memoizedState,t,e)},useTransition:function(){var t=Zu(Mn)[0],e=Ft().memoizedState;return[typeof t=="boolean"?t:Oi(t),e]},useSyncExternalStore:fh,useId:$h,useHostTransitionStatus:Pu,useFormState:Nh,useActionState:Nh,useOptimistic:function(t,e){var l=Ft();return Bt!==null?yh(l,Bt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ku,useCacheRefresh:qh};Zh.useEffectEvent=Th;function nc(t,e,l,i){e=t.memoizedState,l=l(i,e),l=l==null?e:x({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var lc={enqueueSetState:function(t,e,l){t=t._reactInternals;var i=Le(),s=el(i);s.payload=e,l!=null&&(s.callback=l),e=nl(t,s,i),e!==null&&(Ce(e,t,i),Ai(e,t,i))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var i=Le(),s=el(i);s.tag=1,s.payload=e,l!=null&&(s.callback=l),e=nl(t,s,i),e!==null&&(Ce(e,t,i),Ai(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Le(),i=el(l);i.tag=2,e!=null&&(i.callback=e),e=nl(t,i,l),e!==null&&(Ce(e,t,l),Ai(e,t,l))}};function Qh(t,e,l,i,s,c,y){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,c,y):e.prototype&&e.prototype.isPureReactComponent?!bi(l,i)||!bi(s,c):!0}function Kh(t,e,l,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,i),e.state!==t&&lc.enqueueReplaceState(e,e.state,null)}function kl(t,e){var l=e;if("ref"in e){l={};for(var i in e)i!=="ref"&&(l[i]=e[i])}if(t=t.defaultProps){l===e&&(l=x({},l));for(var s in t)l[s]===void 0&&(l[s]=t[s])}return l}function Jh(t){Ko(t)}function Fh(t){console.error(t)}function Ih(t){Ko(t)}function yr(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(i){setTimeout(function(){throw i})}}function Wh(t,e,l){try{var i=t.onCaughtError;i(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function ac(t,e,l){return l=el(l),l.tag=3,l.payload={element:null},l.callback=function(){yr(t,e)},l}function Ph(t){return t=el(t),t.tag=3,t}function tm(t,e,l,i){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var c=i.value;t.payload=function(){return s(c)},t.callback=function(){Wh(e,l,i)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(t.callback=function(){Wh(e,l,i),typeof s!="function"&&(sl===null?sl=new Set([this]):sl.add(this));var E=i.stack;this.componentDidCatch(i.value,{componentStack:E!==null?E:""})})}function R1(t,e,l,i,s){if(l.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(e=l.alternate,e!==null&&Na(e,l,s,!0),l=Oe.current,l!==null){switch(l.tag){case 31:case 13:return Ze===null?Tr():l.alternate===null&&Kt===0&&(Kt=3),l.flags&=-257,l.flags|=65536,l.lanes=s,i===ar?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([i]):e.add(i),Tc(t,i,s)),!1;case 22:return l.flags|=65536,i===ar?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([i])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([i]):l.add(i)),Tc(t,i,s)),!1}throw Error(r(435,l.tag))}return Tc(t,i,s),Tr(),!1}if(Tt)return e=Oe.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=s,i!==wu&&(t=Error(r(422),{cause:i}),wi(Ye(t,l)))):(i!==wu&&(e=Error(r(423),{cause:i}),wi(Ye(e,l))),t=t.current.alternate,t.flags|=65536,s&=-s,t.lanes|=s,i=Ye(i,l),s=ac(t.stateNode,i,s),Hu(t,s),Kt!==4&&(Kt=2)),!1;var c=Error(r(520),{cause:i});if(c=Ye(c,l),Yi===null?Yi=[c]:Yi.push(c),Kt!==4&&(Kt=2),e===null)return!0;i=Ye(i,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=s&-s,l.lanes|=t,t=ac(l.stateNode,i,t),Hu(l,t),!1;case 1:if(e=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(sl===null||!sl.has(c))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Ph(s),tm(s,t,l,i),Hu(l,s),!1}l=l.return}while(l!==null);return!1}var ic=Error(r(461)),te=!1;function fe(t,e,l,i){e.child=t===null?ah(e,null,l,i):Yl(e,t.child,l,i)}function em(t,e,l,i,s){l=l.render;var c=e.ref;if("ref"in i){var y={};for(var E in i)E!=="ref"&&(y[E]=i[E])}else y=i;return Ul(e),i=$u(t,e,l,y,c,s),E=qu(),t!==null&&!te?(Yu(t,e,s),An(t,e,s)):(Tt&&E&&Su(e),e.flags|=1,fe(t,e,i,s),e.child)}function nm(t,e,l,i,s){if(t===null){var c=l.type;return typeof c=="function"&&!vu(c)&&c.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=c,lm(t,e,c,i,s)):(t=Wo(l.type,null,i,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(c=t.child,!hc(t,s)){var y=c.memoizedProps;if(l=l.compare,l=l!==null?l:bi,l(y,i)&&t.ref===e.ref)return An(t,e,s)}return e.flags|=1,t=En(c,i),t.ref=e.ref,t.return=e,e.child=t}function lm(t,e,l,i,s){if(t!==null){var c=t.memoizedProps;if(bi(c,i)&&t.ref===e.ref)if(te=!1,e.pendingProps=i=c,hc(t,s))(t.flags&131072)!==0&&(te=!0);else return e.lanes=t.lanes,An(t,e,s)}return oc(t,e,l,i,s)}function am(t,e,l,i){var s=i.children,c=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((e.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,t!==null){for(i=e.child=t.child,s=0;i!==null;)s=s|i.lanes|i.childLanes,i=i.sibling;i=s&~c}else i=0,e.child=null;return im(t,e,c,l,i)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&nr(e,c!==null?c.cachePool:null),c!==null?rh(e,c):Lu(),sh(e);else return i=e.lanes=536870912,im(t,e,c!==null?c.baseLanes|l:l,l,i)}else c!==null?(nr(e,c.cachePool),rh(e,c),al(),e.memoizedState=null):(t!==null&&nr(e,null),Lu(),al());return fe(t,e,s,l),e.child}function ji(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function im(t,e,l,i,s){var c=zu();return c=c===null?null:{parent:Wt._currentValue,pool:c},e.memoizedState={baseLanes:l,cachePool:c},t!==null&&nr(e,null),Lu(),sh(e),t!==null&&Na(t,e,i,!0),e.childLanes=s,null}function vr(t,e){return e=br({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function om(t,e,l){return Yl(e,t.child,null,l),t=vr(e,e.pendingProps),t.flags|=2,Re(e),e.memoizedState=null,t}function H1(t,e,l){var i=e.pendingProps,s=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Tt){if(i.mode==="hidden")return t=vr(e,i),e.lanes=536870912,ji(null,t);if(Uu(e),(t=Yt)?(t=vg(t,Ge),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Fn!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},l=Xd(t),l.return=e,e.child=l,ue=e,Yt=null)):t=null,t===null)throw Wn(e);return e.lanes=536870912,null}return vr(e,i)}var c=t.memoizedState;if(c!==null){var y=c.dehydrated;if(Uu(e),s)if(e.flags&256)e.flags&=-257,e=om(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(te||Na(t,e,l,!1),s=(l&t.childLanes)!==0,te||s){if(i=qt,i!==null&&(y=zo(i,l),y!==0&&y!==c.retryLane))throw c.retryLane=y,Hl(t,y),Ce(i,t,y),ic;Tr(),e=om(t,e,l)}else t=c.treeContext,Yt=Qe(y.nextSibling),ue=e,Tt=!0,In=null,Ge=!1,t!==null&&Zd(e,t),e=vr(e,i),e.flags|=4096;return e}return t=En(t.child,{mode:i.mode,children:i.children}),t.ref=e.ref,e.child=t,t.return=e,t}function xr(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function oc(t,e,l,i,s){return Ul(e),l=$u(t,e,l,i,void 0,s),i=qu(),t!==null&&!te?(Yu(t,e,s),An(t,e,s)):(Tt&&i&&Su(e),e.flags|=1,fe(t,e,l,s),e.child)}function rm(t,e,l,i,s,c){return Ul(e),e.updateQueue=null,l=ch(e,i,l,s),uh(t),i=qu(),t!==null&&!te?(Yu(t,e,c),An(t,e,c)):(Tt&&i&&Su(e),e.flags|=1,fe(t,e,l,c),e.child)}function sm(t,e,l,i,s){if(Ul(e),e.stateNode===null){var c=Ea,y=l.contextType;typeof y=="object"&&y!==null&&(c=ce(y)),c=new l(i,c),e.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=lc,e.stateNode=c,c._reactInternals=e,c=e.stateNode,c.props=i,c.state=e.memoizedState,c.refs={},Ou(e),y=l.contextType,c.context=typeof y=="object"&&y!==null?ce(y):Ea,c.state=e.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(nc(e,l,y,i),c.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&lc.enqueueReplaceState(c,c.state,null),zi(e,i,c,s),Ti(),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308),i=!0}else if(t===null){c=e.stateNode;var E=e.memoizedProps,O=kl(l,E);c.props=O;var G=c.context,lt=l.contextType;y=Ea,typeof lt=="object"&<!==null&&(y=ce(lt));var ot=l.getDerivedStateFromProps;lt=typeof ot=="function"||typeof c.getSnapshotBeforeUpdate=="function",E=e.pendingProps!==E,lt||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(E||G!==y)&&Kh(e,c,i,y),tl=!1;var Q=e.memoizedState;c.state=Q,zi(e,i,c,s),Ti(),G=e.memoizedState,E||Q!==G||tl?(typeof ot=="function"&&(nc(e,l,ot,i),G=e.memoizedState),(O=tl||Qh(e,l,O,i,Q,G,y))?(lt||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(e.flags|=4194308)):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=G),c.props=i,c.state=G,c.context=y,i=O):(typeof c.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{c=e.stateNode,Ru(t,e),y=e.memoizedProps,lt=kl(l,y),c.props=lt,ot=e.pendingProps,Q=c.context,G=l.contextType,O=Ea,typeof G=="object"&&G!==null&&(O=ce(G)),E=l.getDerivedStateFromProps,(G=typeof E=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==ot||Q!==O)&&Kh(e,c,i,O),tl=!1,Q=e.memoizedState,c.state=Q,zi(e,i,c,s),Ti();var W=e.memoizedState;y!==ot||Q!==W||tl||t!==null&&t.dependencies!==null&&tr(t.dependencies)?(typeof E=="function"&&(nc(e,l,E,i),W=e.memoizedState),(lt=tl||Qh(e,l,lt,i,Q,W,O)||t!==null&&t.dependencies!==null&&tr(t.dependencies))?(G||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(i,W,O),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(i,W,O)),typeof c.componentDidUpdate=="function"&&(e.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&Q===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&Q===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=W),c.props=i,c.state=W,c.context=O,i=lt):(typeof c.componentDidUpdate!="function"||y===t.memoizedProps&&Q===t.memoizedState||(e.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===t.memoizedProps&&Q===t.memoizedState||(e.flags|=1024),i=!1)}return c=i,xr(t,e),i=(e.flags&128)!==0,c||i?(c=e.stateNode,l=i&&typeof l.getDerivedStateFromError!="function"?null:c.render(),e.flags|=1,t!==null&&i?(e.child=Yl(e,t.child,null,s),e.child=Yl(e,null,l,s)):fe(t,e,l,s),e.memoizedState=c.state,t=e.child):t=An(t,e,s),t}function um(t,e,l,i){return Ll(),e.flags|=256,fe(t,e,l,i),e.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sc(t){return{baseLanes:t,cachePool:Wd()}}function uc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=je),t}function cm(t,e,l){var i=e.pendingProps,s=!1,c=(e.flags&128)!==0,y;if((y=c)||(y=t!==null&&t.memoizedState===null?!1:(Jt.current&2)!==0),y&&(s=!0,e.flags&=-129),y=(e.flags&32)!==0,e.flags&=-33,t===null){if(Tt){if(s?ll(e):al(),(t=Yt)?(t=vg(t,Ge),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Fn!==null?{id:sn,overflow:un}:null,retryLane:536870912,hydrationErrors:null},l=Xd(t),l.return=e,e.child=l,ue=e,Yt=null)):t=null,t===null)throw Wn(e);return Gc(t)?e.lanes=32:e.lanes=536870912,null}var E=i.children;return i=i.fallback,s?(al(),s=e.mode,E=br({mode:"hidden",children:E},s),i=jl(i,s,l,null),E.return=e,i.return=e,E.sibling=i,e.child=E,i=e.child,i.memoizedState=sc(l),i.childLanes=uc(t,y,l),e.memoizedState=rc,ji(null,i)):(ll(e),cc(e,E))}var O=t.memoizedState;if(O!==null&&(E=O.dehydrated,E!==null)){if(c)e.flags&256?(ll(e),e.flags&=-257,e=fc(t,e,l)):e.memoizedState!==null?(al(),e.child=t.child,e.flags|=128,e=null):(al(),E=i.fallback,s=e.mode,i=br({mode:"visible",children:i.children},s),E=jl(E,s,l,null),E.flags|=2,i.return=e,E.return=e,i.sibling=E,e.child=i,Yl(e,t.child,null,l),i=e.child,i.memoizedState=sc(l),i.childLanes=uc(t,y,l),e.memoizedState=rc,e=ji(null,i));else if(ll(e),Gc(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var G=y.dgst;y=G,i=Error(r(419)),i.stack="",i.digest=y,wi({value:i,source:null,stack:null}),e=fc(t,e,l)}else if(te||Na(t,e,l,!1),y=(l&t.childLanes)!==0,te||y){if(y=qt,y!==null&&(i=zo(y,l),i!==0&&i!==O.retryLane))throw O.retryLane=i,Hl(t,i),Ce(y,t,i),ic;kc(E)||Tr(),e=fc(t,e,l)}else kc(E)?(e.flags|=192,e.child=t.child,e=null):(t=O.treeContext,Yt=Qe(E.nextSibling),ue=e,Tt=!0,In=null,Ge=!1,t!==null&&Zd(e,t),e=cc(e,i.children),e.flags|=4096);return e}return s?(al(),E=i.fallback,s=e.mode,O=t.child,G=O.sibling,i=En(O,{mode:"hidden",children:i.children}),i.subtreeFlags=O.subtreeFlags&65011712,G!==null?E=En(G,E):(E=jl(E,s,l,null),E.flags|=2),E.return=e,i.return=e,i.sibling=E,e.child=i,ji(null,i),i=e.child,E=t.child.memoizedState,E===null?E=sc(l):(s=E.cachePool,s!==null?(O=Wt._currentValue,s=s.parent!==O?{parent:O,pool:O}:s):s=Wd(),E={baseLanes:E.baseLanes|l,cachePool:s}),i.memoizedState=E,i.childLanes=uc(t,y,l),e.memoizedState=rc,ji(t.child,i)):(ll(e),l=t.child,t=l.sibling,l=En(l,{mode:"visible",children:i.children}),l.return=e,l.sibling=null,t!==null&&(y=e.deletions,y===null?(e.deletions=[t],e.flags|=16):y.push(t)),e.child=l,e.memoizedState=null,l)}function cc(t,e){return e=br({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function br(t,e){return t=De(22,t,null,e),t.lanes=0,t}function fc(t,e,l){return Yl(e,t.child,null,l),t=cc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function fm(t,e,l){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Nu(t.return,e,l)}function dc(t,e,l,i,s,c){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:l,tailMode:s,treeForkCount:c}:(y.isBackwards=e,y.rendering=null,y.renderingStartTime=0,y.last=i,y.tail=l,y.tailMode=s,y.treeForkCount=c)}function dm(t,e,l){var i=e.pendingProps,s=i.revealOrder,c=i.tail;i=i.children;var y=Jt.current,E=(y&2)!==0;if(E?(y=y&1|2,e.flags|=128):y&=1,K(Jt,y),fe(t,e,i,l),i=Tt?Ei:0,!E&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fm(t,l,e);else if(t.tag===19)fm(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(s){case"forwards":for(l=e.child,s=null;l!==null;)t=l.alternate,t!==null&&sr(t)===null&&(s=l),l=l.sibling;l=s,l===null?(s=e.child,e.child=null):(s=l.sibling,l.sibling=null),dc(e,!1,s,l,c,i);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&sr(t)===null){e.child=s;break}t=s.sibling,s.sibling=l,l=s,s=t}dc(e,!0,l,null,c,i);break;case"together":dc(e,!1,null,null,void 0,i);break;default:e.memoizedState=null}return e.child}function An(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),rl|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Na(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,l=En(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=En(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function hc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&tr(t)))}function j1(t,e,l){switch(e.tag){case 3:rt(e,e.stateNode.containerInfo),Pn(e,Wt,t.memoizedState.cache),Ll();break;case 27:case 5:wt(e);break;case 4:rt(e,e.stateNode.containerInfo);break;case 10:Pn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Uu(e),null;break;case 13:var i=e.memoizedState;if(i!==null)return i.dehydrated!==null?(ll(e),e.flags|=128,null):(l&e.child.childLanes)!==0?cm(t,e,l):(ll(e),t=An(t,e,l),t!==null?t.sibling:null);ll(e);break;case 19:var s=(t.flags&128)!==0;if(i=(l&e.childLanes)!==0,i||(Na(t,e,l,!1),i=(l&e.childLanes)!==0),s){if(i)return dm(t,e,l);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),K(Jt,Jt.current),i)break;return null;case 22:return e.lanes=0,am(t,e,l,e.pendingProps);case 24:Pn(e,Wt,t.memoizedState.cache)}return An(t,e,l)}function hm(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)te=!0;else{if(!hc(t,l)&&(e.flags&128)===0)return te=!1,j1(t,e,l);te=(t.flags&131072)!==0}else te=!1,Tt&&(e.flags&1048576)!==0&&Gd(e,Ei,e.index);switch(e.lanes=0,e.tag){case 16:t:{var i=e.pendingProps;if(t=$l(e.elementType),e.type=t,typeof t=="function")vu(t)?(i=kl(t,i),e.tag=1,e=sm(null,e,t,i,l)):(e.tag=0,e=oc(null,e,t,i,l));else{if(t!=null){var s=t.$$typeof;if(s===T){e.tag=11,e=em(null,e,t,i,l);break t}else if(s===q){e.tag=14,e=nm(null,e,t,i,l);break t}}throw e=D(t)||t,Error(r(306,e,""))}}return e;case 0:return oc(t,e,e.type,e.pendingProps,l);case 1:return i=e.type,s=kl(i,e.pendingProps),sm(t,e,i,s,l);case 3:t:{if(rt(e,e.stateNode.containerInfo),t===null)throw Error(r(387));i=e.pendingProps;var c=e.memoizedState;s=c.element,Ru(t,e),zi(e,i,null,l);var y=e.memoizedState;if(i=y.cache,Pn(e,Wt,i),i!==c.cache&&Mu(e,[Wt],l,!0),Ti(),i=y.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:y.cache},e.updateQueue.baseState=c,e.memoizedState=c,e.flags&256){e=um(t,e,i,l);break t}else if(i!==s){s=Ye(Error(r(424)),e),wi(s),e=um(t,e,i,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Yt=Qe(t.firstChild),ue=e,Tt=!0,In=null,Ge=!0,l=ah(e,null,i,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),i===s){e=An(t,e,l);break t}fe(t,e,i,l)}e=e.child}return e;case 26:return xr(t,e),t===null?(l=_g(e.type,null,e.pendingProps,null))?e.memoizedState=l:Tt||(l=e.type,t=e.pendingProps,i=Lr(ct.current).createElement(l),i[le]=e,i[he]=t,de(i,l,t),It(i),e.stateNode=i):e.memoizedState=_g(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return wt(e),t===null&&Tt&&(i=e.stateNode=Sg(e.type,e.pendingProps,ct.current),ue=e,Ge=!0,s=Yt,dl(e.type)?(Zc=s,Yt=Qe(i.firstChild)):Yt=s),fe(t,e,e.pendingProps.children,l),xr(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Tt&&((s=i=Yt)&&(i=fx(i,e.type,e.pendingProps,Ge),i!==null?(e.stateNode=i,ue=e,Yt=Qe(i.firstChild),Ge=!1,s=!0):s=!1),s||Wn(e)),wt(e),s=e.type,c=e.pendingProps,y=t!==null?t.memoizedProps:null,i=c.children,qc(s,c)?i=null:y!==null&&qc(s,y)&&(e.flags|=32),e.memoizedState!==null&&(s=$u(t,e,N1,null,null,l),Fi._currentValue=s),xr(t,e),fe(t,e,i,l),e.child;case 6:return t===null&&Tt&&((t=l=Yt)&&(l=dx(l,e.pendingProps,Ge),l!==null?(e.stateNode=l,ue=e,Yt=null,t=!0):t=!1),t||Wn(e)),null;case 13:return cm(t,e,l);case 4:return rt(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Yl(e,null,i,l):fe(t,e,i,l),e.child;case 11:return em(t,e,e.type,e.pendingProps,l);case 7:return fe(t,e,e.pendingProps,l),e.child;case 8:return fe(t,e,e.pendingProps.children,l),e.child;case 12:return fe(t,e,e.pendingProps.children,l),e.child;case 10:return i=e.pendingProps,Pn(e,e.type,i.value),fe(t,e,i.children,l),e.child;case 9:return s=e.type._context,i=e.pendingProps.children,Ul(e),s=ce(s),i=i(s),e.flags|=1,fe(t,e,i,l),e.child;case 14:return nm(t,e,e.type,e.pendingProps,l);case 15:return lm(t,e,e.type,e.pendingProps,l);case 19:return dm(t,e,l);case 31:return H1(t,e,l);case 22:return am(t,e,l,e.pendingProps);case 24:return Ul(e),i=ce(Wt),t===null?(s=zu(),s===null&&(s=qt,c=Au(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=l),s=c),e.memoizedState={parent:i,cache:s},Ou(e),Pn(e,Wt,s)):((t.lanes&l)!==0&&(Ru(t,e),zi(e,null,null,l),Ti()),s=t.memoizedState,c=e.memoizedState,s.parent!==i?(s={parent:i,cache:i},e.memoizedState=s,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=s),Pn(e,Wt,i)):(i=c.cache,Pn(e,Wt,i),i!==s.cache&&Mu(e,[Wt],l,!0))),fe(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Tn(t){t.flags|=4}function mc(t,e,l,i,s){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(s&335544128)===s)if(t.stateNode.complete)t.flags|=8192;else if($m())t.flags|=8192;else throw ql=ar,Du}else t.flags&=-16777217}function mm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Tg(e))if($m())t.flags|=8192;else throw ql=ar,Du}function Sr(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Mo():536870912,t.lanes|=e,Ua|=e)}function Li(t,e){if(!Tt)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var i=null;l!==null;)l.alternate!==null&&(i=l),l=l.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function Xt(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,i=0;if(e)for(var s=t.child;s!==null;)l|=s.lanes|s.childLanes,i|=s.subtreeFlags&65011712,i|=s.flags&65011712,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)l|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=i,t.childLanes=l,e}function L1(t,e,l){var i=e.pendingProps;switch(Eu(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(e),null;case 1:return Xt(e),null;case 3:return l=e.stateNode,i=null,t!==null&&(i=t.memoizedState.cache),e.memoizedState.cache!==i&&(e.flags|=2048),Cn(Wt),ft(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Ca(e)?Tn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,_u())),Xt(e),null;case 26:var s=e.type,c=e.memoizedState;return t===null?(Tn(e),c!==null?(Xt(e),mm(e,c)):(Xt(e),mc(e,s,null,i,l))):c?c!==t.memoizedState?(Tn(e),Xt(e),mm(e,c)):(Xt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==i&&Tn(e),Xt(e),mc(e,s,t,i,l)),null;case 27:if(bt(e),l=ct.current,s=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Tn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Xt(e),null}t=F.current,Ca(e)?Qd(e):(t=Sg(s,i,l),e.stateNode=t,Tn(e))}return Xt(e),null;case 5:if(bt(e),s=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==i&&Tn(e);else{if(!i){if(e.stateNode===null)throw Error(r(166));return Xt(e),null}if(c=F.current,Ca(e))Qd(e);else{var y=Lr(ct.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof i.is=="string"?y.createElement("select",{is:i.is}):y.createElement("select"),i.multiple?c.multiple=!0:i.size&&(c.size=i.size);break;default:c=typeof i.is=="string"?y.createElement(s,{is:i.is}):y.createElement(s)}}c[le]=e,c[he]=i;t:for(y=e.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break t;for(;y.sibling===null;){if(y.return===null||y.return===e)break t;y=y.return}y.sibling.return=y.return,y=y.sibling}e.stateNode=c;t:switch(de(c,s,i),s){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break t;case"img":i=!0;break t;default:i=!1}i&&Tn(e)}}return Xt(e),mc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==i&&Tn(e);else{if(typeof i!="string"&&e.stateNode===null)throw Error(r(166));if(t=ct.current,Ca(e)){if(t=e.stateNode,l=e.memoizedProps,i=null,s=ue,s!==null)switch(s.tag){case 27:case 5:i=s.memoizedProps}t[le]=e,t=!!(t.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||cg(t.nodeValue,l)),t||Wn(e,!0)}else t=Lr(t).createTextNode(i),t[le]=e,e.stateNode=t}return Xt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(i=Ca(e),l!==null){if(t===null){if(!i)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[le]=e}else Ll(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Xt(e),t=!1}else l=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(Re(e),e):(Re(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Xt(e),null;case 13:if(i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(s=Ca(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(r(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[le]=e}else Ll(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Xt(e),s=!1}else s=_u(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),s=!0;if(!s)return e.flags&256?(Re(e),e):(Re(e),null)}return Re(e),(e.flags&128)!==0?(e.lanes=l,e):(l=i!==null,t=t!==null&&t.memoizedState!==null,l&&(i=e.child,s=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(s=i.alternate.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Sr(e,e.updateQueue),Xt(e),null);case 4:return ft(),t===null&&Lc(e.stateNode.containerInfo),Xt(e),null;case 10:return Cn(e.type),Xt(e),null;case 19:if(R(Jt),i=e.memoizedState,i===null)return Xt(e),null;if(s=(e.flags&128)!==0,c=i.rendering,c===null)if(s)Li(i,!1);else{if(Kt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(c=sr(t),c!==null){for(e.flags|=128,Li(i,!1),t=c.updateQueue,e.updateQueue=t,Sr(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Yd(l,t),l=l.sibling;return K(Jt,Jt.current&1|2),Tt&&wn(e,i.treeForkCount),e.child}t=t.sibling}i.tail!==null&&se()>Nr&&(e.flags|=128,s=!0,Li(i,!1),e.lanes=4194304)}else{if(!s)if(t=sr(c),t!==null){if(e.flags|=128,s=!0,t=t.updateQueue,e.updateQueue=t,Sr(e,t),Li(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Tt)return Xt(e),null}else 2*se()-i.renderingStartTime>Nr&&l!==536870912&&(e.flags|=128,s=!0,Li(i,!1),e.lanes=4194304);i.isBackwards?(c.sibling=e.child,e.child=c):(t=i.last,t!==null?t.sibling=c:e.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=se(),t.sibling=null,l=Jt.current,K(Jt,s?l&1|2:l&1),Tt&&wn(e,i.treeForkCount),t):(Xt(e),null);case 22:case 23:return Re(e),Bu(),i=e.memoizedState!==null,t!==null?t.memoizedState!==null!==i&&(e.flags|=8192):i&&(e.flags|=8192),i?(l&536870912)!==0&&(e.flags&128)===0&&(Xt(e),e.subtreeFlags&6&&(e.flags|=8192)):Xt(e),l=e.updateQueue,l!==null&&Sr(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),i=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),i!==l&&(e.flags|=2048),t!==null&&R(Vl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Cn(Wt),Xt(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function B1(t,e){switch(Eu(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Cn(Wt),ft(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return bt(e),null;case 31:if(e.memoizedState!==null){if(Re(e),e.alternate===null)throw Error(r(340));Ll()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Re(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Ll()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return R(Jt),null;case 4:return ft(),null;case 10:return Cn(e.type),null;case 22:case 23:return Re(e),Bu(),t!==null&&R(Vl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Cn(Wt),null;case 25:return null;default:return null}}function gm(t,e){switch(Eu(e),e.tag){case 3:Cn(Wt),ft();break;case 26:case 27:case 5:bt(e);break;case 4:ft();break;case 31:e.memoizedState!==null&&Re(e);break;case 13:Re(e);break;case 19:R(Jt);break;case 10:Cn(e.type);break;case 22:case 23:Re(e),Bu(),t!==null&&R(Vl);break;case 24:Cn(Wt)}}function Bi(t,e){try{var l=e.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var s=i.next;l=s;do{if((l.tag&t)===t){i=void 0;var c=l.create,y=l.inst;i=c(),y.destroy=i}l=l.next}while(l!==s)}}catch(E){jt(e,e.return,E)}}function il(t,e,l){try{var i=e.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var c=s.next;i=c;do{if((i.tag&t)===t){var y=i.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,s=e;var O=l,G=E;try{G()}catch(lt){jt(s,O,lt)}}}i=i.next}while(i!==c)}}catch(lt){jt(e,e.return,lt)}}function pm(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{oh(e,l)}catch(i){jt(t,t.return,i)}}}function ym(t,e,l){l.props=kl(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(i){jt(t,e,i)}}function Ui(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var i=t.stateNode;break;case 30:i=t.stateNode;break;default:i=t.stateNode}typeof l=="function"?t.refCleanup=l(i):l.current=i}}catch(s){jt(t,e,s)}}function cn(t,e){var l=t.ref,i=t.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(s){jt(t,e,s)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){jt(t,e,s)}else l.current=null}function vm(t){var e=t.type,l=t.memoizedProps,i=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&i.focus();break t;case"img":l.src?i.src=l.src:l.srcSet&&(i.srcset=l.srcSet)}}catch(s){jt(t,t.return,s)}}function gc(t,e,l){try{var i=t.stateNode;ix(i,t.type,l,e),i[he]=e}catch(s){jt(t,t.return,s)}}function xm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&dl(t.type)||t.tag===4}function pc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||xm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&dl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function yc(t,e,l){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=bn));else if(i!==4&&(i===27&&dl(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(yc(t,e,l),t=t.sibling;t!==null;)yc(t,e,l),t=t.sibling}function Er(t,e,l){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(i!==4&&(i===27&&dl(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Er(t,e,l),t=t.sibling;t!==null;)Er(t,e,l),t=t.sibling}function bm(t){var e=t.stateNode,l=t.memoizedProps;try{for(var i=t.type,s=e.attributes;s.length;)e.removeAttributeNode(s[0]);de(e,i,l),e[le]=t,e[he]=l}catch(c){jt(t,t.return,c)}}var zn=!1,ee=!1,vc=!1,Sm=typeof WeakSet=="function"?WeakSet:Set,re=null;function U1(t,e){if(t=t.containerInfo,Vc=Xr,t=Rd(t),fu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var s=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break t}var y=0,E=-1,O=-1,G=0,lt=0,ot=t,Q=null;e:for(;;){for(var W;ot!==l||s!==0&&ot.nodeType!==3||(E=y+s),ot!==c||i!==0&&ot.nodeType!==3||(O=y+i),ot.nodeType===3&&(y+=ot.nodeValue.length),(W=ot.firstChild)!==null;)Q=ot,ot=W;for(;;){if(ot===t)break e;if(Q===l&&++G===s&&(E=y),Q===c&&++lt===i&&(O=y),(W=ot.nextSibling)!==null)break;ot=Q,Q=ot.parentNode}ot=W}l=E===-1||O===-1?null:{start:E,end:O}}else l=null}l=l||{start:0,end:0}}else l=null;for($c={focusedElem:t,selectionRange:l},Xr=!1,re=e;re!==null;)if(e=re,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,re=t;else for(;re!==null;){switch(e=re,c=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)s=t[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&c!==null){t=void 0,l=e,s=c.memoizedProps,c=c.memoizedState,i=l.stateNode;try{var dt=kl(l.type,s);t=i.getSnapshotBeforeUpdate(dt,c),i.__reactInternalSnapshotBeforeUpdate=t}catch(yt){jt(l,l.return,yt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)Xc(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Xc(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,re=t;break}re=e.return}}function Em(t,e,l){var i=l.flags;switch(l.tag){case 0:case 11:case 15:On(t,l),i&4&&Bi(5,l);break;case 1:if(On(t,l),i&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(y){jt(l,l.return,y)}else{var s=kl(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(s,e,t.__reactInternalSnapshotBeforeUpdate)}catch(y){jt(l,l.return,y)}}i&64&&pm(l),i&512&&Ui(l,l.return);break;case 3:if(On(t,l),i&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{oh(t,e)}catch(y){jt(l,l.return,y)}}break;case 27:e===null&&i&4&&bm(l);case 26:case 5:On(t,l),e===null&&i&4&&vm(l),i&512&&Ui(l,l.return);break;case 12:On(t,l);break;case 31:On(t,l),i&4&&Cm(t,l);break;case 13:On(t,l),i&4&&Nm(t,l),i&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Q1.bind(null,l),hx(t,l))));break;case 22:if(i=l.memoizedState!==null||zn,!i){e=e!==null&&e.memoizedState!==null||ee,s=zn;var c=ee;zn=i,(ee=e)&&!c?Rn(t,l,(l.subtreeFlags&8772)!==0):On(t,l),zn=s,ee=c}break;case 30:break;default:On(t,l)}}function wm(t){var e=t.alternate;e!==null&&(t.alternate=null,wm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&ci(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var kt=null,Se=!1;function Dn(t,e,l){for(l=l.child;l!==null;)_m(t,e,l),l=l.sibling}function _m(t,e,l){if(pe&&typeof pe.onCommitFiberUnmount=="function")try{pe.onCommitFiberUnmount(Ml,l)}catch{}switch(l.tag){case 26:ee||cn(l,e),Dn(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ee||cn(l,e);var i=kt,s=Se;dl(l.type)&&(kt=l.stateNode,Se=!1),Dn(t,e,l),Qi(l.stateNode),kt=i,Se=s;break;case 5:ee||cn(l,e);case 6:if(i=kt,s=Se,kt=null,Dn(t,e,l),kt=i,Se=s,kt!==null)if(Se)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(l.stateNode)}catch(c){jt(l,e,c)}else try{kt.removeChild(l.stateNode)}catch(c){jt(l,e,c)}break;case 18:kt!==null&&(Se?(t=kt,pg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Za(t)):pg(kt,l.stateNode));break;case 4:i=kt,s=Se,kt=l.stateNode.containerInfo,Se=!0,Dn(t,e,l),kt=i,Se=s;break;case 0:case 11:case 14:case 15:il(2,l,e),ee||il(4,l,e),Dn(t,e,l);break;case 1:ee||(cn(l,e),i=l.stateNode,typeof i.componentWillUnmount=="function"&&ym(l,e,i)),Dn(t,e,l);break;case 21:Dn(t,e,l);break;case 22:ee=(i=ee)||l.memoizedState!==null,Dn(t,e,l),ee=i;break;default:Dn(t,e,l)}}function Cm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Za(t)}catch(l){jt(e,e.return,l)}}}function Nm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Za(t)}catch(l){jt(e,e.return,l)}}function V1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Sm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Sm),e;default:throw Error(r(435,t.tag))}}function wr(t,e){var l=V1(t);e.forEach(function(i){if(!l.has(i)){l.add(i);var s=K1.bind(null,t,i);i.then(s,s)}})}function Ee(t,e){var l=e.deletions;if(l!==null)for(var i=0;i<l.length;i++){var s=l[i],c=t,y=e,E=y;t:for(;E!==null;){switch(E.tag){case 27:if(dl(E.type)){kt=E.stateNode,Se=!1;break t}break;case 5:kt=E.stateNode,Se=!1;break t;case 3:case 4:kt=E.stateNode.containerInfo,Se=!0;break t}E=E.return}if(kt===null)throw Error(r(160));_m(c,y,s),kt=null,Se=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Mm(e,t),e=e.sibling}var We=null;function Mm(t,e){var l=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ee(e,t),we(t),i&4&&(il(3,t,t.return),Bi(3,t),il(5,t,t.return));break;case 1:Ee(e,t),we(t),i&512&&(ee||l===null||cn(l,l.return)),i&64&&zn&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?i:l.concat(i))));break;case 26:var s=We;if(Ee(e,t),we(t),i&512&&(ee||l===null||cn(l,l.return)),i&4){var c=l!==null?l.memoizedState:null;if(i=t.memoizedState,l===null)if(i===null)if(t.stateNode===null){t:{i=t.type,l=t.memoizedProps,s=s.ownerDocument||s;e:switch(i){case"title":c=s.getElementsByTagName("title")[0],(!c||c[zl]||c[le]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(i),s.head.insertBefore(c,s.querySelector("head > title"))),de(c,i,l),c[le]=t,It(c),i=c;break t;case"link":var y=Mg("link","href",s).get(i+(l.href||""));if(y){for(var E=0;E<y.length;E++)if(c=y[E],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(E,1);break e}}c=s.createElement(i),de(c,i,l),s.head.appendChild(c);break;case"meta":if(y=Mg("meta","content",s).get(i+(l.content||""))){for(E=0;E<y.length;E++)if(c=y[E],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(E,1);break e}}c=s.createElement(i),de(c,i,l),s.head.appendChild(c);break;default:throw Error(r(468,i))}c[le]=t,It(c),i=c}t.stateNode=i}else Ag(s,t.type,t.stateNode);else t.stateNode=Ng(s,i,t.memoizedProps);else c!==i?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,i===null?Ag(s,t.type,t.stateNode):Ng(s,i,t.memoizedProps)):i===null&&t.stateNode!==null&&gc(t,t.memoizedProps,l.memoizedProps)}break;case 27:Ee(e,t),we(t),i&512&&(ee||l===null||cn(l,l.return)),l!==null&&i&4&&gc(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Ee(e,t),we(t),i&512&&(ee||l===null||cn(l,l.return)),t.flags&32){s=t.stateNode;try{ga(s,"")}catch(dt){jt(t,t.return,dt)}}i&4&&t.stateNode!=null&&(s=t.memoizedProps,gc(t,s,l!==null?l.memoizedProps:s)),i&1024&&(vc=!0);break;case 6:if(Ee(e,t),we(t),i&4){if(t.stateNode===null)throw Error(r(162));i=t.memoizedProps,l=t.stateNode;try{l.nodeValue=i}catch(dt){jt(t,t.return,dt)}}break;case 3:if(Vr=null,s=We,We=Br(e.containerInfo),Ee(e,t),We=s,we(t),i&4&&l!==null&&l.memoizedState.isDehydrated)try{Za(e.containerInfo)}catch(dt){jt(t,t.return,dt)}vc&&(vc=!1,Am(t));break;case 4:i=We,We=Br(t.stateNode.containerInfo),Ee(e,t),we(t),We=i;break;case 12:Ee(e,t),we(t);break;case 31:Ee(e,t),we(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wr(t,i)));break;case 13:Ee(e,t),we(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Cr=se()),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wr(t,i)));break;case 22:s=t.memoizedState!==null;var O=l!==null&&l.memoizedState!==null,G=zn,lt=ee;if(zn=G||s,ee=lt||O,Ee(e,t),ee=lt,zn=G,we(t),i&8192)t:for(e=t.stateNode,e._visibility=s?e._visibility&-2:e._visibility|1,s&&(l===null||O||zn||ee||Gl(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){O=l=e;try{if(c=O.stateNode,s)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=O.stateNode;var ot=O.memoizedProps.style,Q=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;E.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(dt){jt(O,O.return,dt)}}}else if(e.tag===6){if(l===null){O=e;try{O.stateNode.nodeValue=s?"":O.memoizedProps}catch(dt){jt(O,O.return,dt)}}}else if(e.tag===18){if(l===null){O=e;try{var W=O.stateNode;s?yg(W,!0):yg(O.stateNode,!1)}catch(dt){jt(O,O.return,dt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}i&4&&(i=t.updateQueue,i!==null&&(l=i.retryQueue,l!==null&&(i.retryQueue=null,wr(t,l))));break;case 19:Ee(e,t),we(t),i&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wr(t,i)));break;case 30:break;case 21:break;default:Ee(e,t),we(t)}}function we(t){var e=t.flags;if(e&2){try{for(var l,i=t.return;i!==null;){if(xm(i)){l=i;break}i=i.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,c=pc(t);Er(t,c,s);break;case 5:var y=l.stateNode;l.flags&32&&(ga(y,""),l.flags&=-33);var E=pc(t);Er(t,E,y);break;case 3:case 4:var O=l.stateNode.containerInfo,G=pc(t);yc(t,G,O);break;default:throw Error(r(161))}}catch(lt){jt(t,t.return,lt)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Am(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Am(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function On(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Em(t,e.alternate,e),e=e.sibling}function Gl(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:il(4,e,e.return),Gl(e);break;case 1:cn(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&ym(e,e.return,l),Gl(e);break;case 27:Qi(e.stateNode);case 26:case 5:cn(e,e.return),Gl(e);break;case 22:e.memoizedState===null&&Gl(e);break;case 30:Gl(e);break;default:Gl(e)}t=t.sibling}}function Rn(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var i=e.alternate,s=t,c=e,y=c.flags;switch(c.tag){case 0:case 11:case 15:Rn(s,c,l),Bi(4,c);break;case 1:if(Rn(s,c,l),i=c,s=i.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(G){jt(i,i.return,G)}if(i=c,s=i.updateQueue,s!==null){var E=i.stateNode;try{var O=s.shared.hiddenCallbacks;if(O!==null)for(s.shared.hiddenCallbacks=null,s=0;s<O.length;s++)ih(O[s],E)}catch(G){jt(i,i.return,G)}}l&&y&64&&pm(c),Ui(c,c.return);break;case 27:bm(c);case 26:case 5:Rn(s,c,l),l&&i===null&&y&4&&vm(c),Ui(c,c.return);break;case 12:Rn(s,c,l);break;case 31:Rn(s,c,l),l&&y&4&&Cm(s,c);break;case 13:Rn(s,c,l),l&&y&4&&Nm(s,c);break;case 22:c.memoizedState===null&&Rn(s,c,l),Ui(c,c.return);break;case 30:break;default:Rn(s,c,l)}e=e.sibling}}function xc(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&_i(l))}function bc(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_i(t))}function Pe(t,e,l,i){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tm(t,e,l,i),e=e.sibling}function Tm(t,e,l,i){var s=e.flags;switch(e.tag){case 0:case 11:case 15:Pe(t,e,l,i),s&2048&&Bi(9,e);break;case 1:Pe(t,e,l,i);break;case 3:Pe(t,e,l,i),s&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&_i(t)));break;case 12:if(s&2048){Pe(t,e,l,i),t=e.stateNode;try{var c=e.memoizedProps,y=c.id,E=c.onPostCommit;typeof E=="function"&&E(y,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(O){jt(e,e.return,O)}}else Pe(t,e,l,i);break;case 31:Pe(t,e,l,i);break;case 13:Pe(t,e,l,i);break;case 23:break;case 22:c=e.stateNode,y=e.alternate,e.memoizedState!==null?c._visibility&2?Pe(t,e,l,i):Vi(t,e):c._visibility&2?Pe(t,e,l,i):(c._visibility|=2,ja(t,e,l,i,(e.subtreeFlags&10256)!==0||!1)),s&2048&&xc(y,e);break;case 24:Pe(t,e,l,i),s&2048&&bc(e.alternate,e);break;default:Pe(t,e,l,i)}}function ja(t,e,l,i,s){for(s=s&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var c=t,y=e,E=l,O=i,G=y.flags;switch(y.tag){case 0:case 11:case 15:ja(c,y,E,O,s),Bi(8,y);break;case 23:break;case 22:var lt=y.stateNode;y.memoizedState!==null?lt._visibility&2?ja(c,y,E,O,s):Vi(c,y):(lt._visibility|=2,ja(c,y,E,O,s)),s&&G&2048&&xc(y.alternate,y);break;case 24:ja(c,y,E,O,s),s&&G&2048&&bc(y.alternate,y);break;default:ja(c,y,E,O,s)}e=e.sibling}}function Vi(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,i=e,s=i.flags;switch(i.tag){case 22:Vi(l,i),s&2048&&xc(i.alternate,i);break;case 24:Vi(l,i),s&2048&&bc(i.alternate,i);break;default:Vi(l,i)}e=e.sibling}}var $i=8192;function La(t,e,l){if(t.subtreeFlags&$i)for(t=t.child;t!==null;)zm(t,e,l),t=t.sibling}function zm(t,e,l){switch(t.tag){case 26:La(t,e,l),t.flags&$i&&t.memoizedState!==null&&Cx(l,We,t.memoizedState,t.memoizedProps);break;case 5:La(t,e,l);break;case 3:case 4:var i=We;We=Br(t.stateNode.containerInfo),La(t,e,l),We=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=$i,$i=16777216,La(t,e,l),$i=i):La(t,e,l));break;default:La(t,e,l)}}function Dm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function qi(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var i=e[l];re=i,Rm(i,t)}Dm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Om(t),t=t.sibling}function Om(t){switch(t.tag){case 0:case 11:case 15:qi(t),t.flags&2048&&il(9,t,t.return);break;case 3:qi(t);break;case 12:qi(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,_r(t)):qi(t);break;default:qi(t)}}function _r(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var i=e[l];re=i,Rm(i,t)}Dm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:il(8,e,e.return),_r(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,_r(e));break;default:_r(e)}t=t.sibling}}function Rm(t,e){for(;re!==null;){var l=re;switch(l.tag){case 0:case 11:case 15:il(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var i=l.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:_i(l.memoizedState.cache)}if(i=l.child,i!==null)i.return=l,re=i;else t:for(l=t;re!==null;){i=re;var s=i.sibling,c=i.return;if(wm(i),i===l){re=null;break t}if(s!==null){s.return=c,re=s;break t}re=c}}}var $1={getCacheForType:function(t){var e=ce(Wt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return ce(Wt).controller.signal}},q1=typeof WeakMap=="function"?WeakMap:Map,Rt=0,qt=null,Ct=null,Mt=0,Ht=0,He=null,ol=!1,Ba=!1,Sc=!1,Hn=0,Kt=0,rl=0,Zl=0,Ec=0,je=0,Ua=0,Yi=null,_e=null,wc=!1,Cr=0,Hm=0,Nr=1/0,Mr=null,sl=null,ae=0,ul=null,Va=null,jn=0,_c=0,Cc=null,jm=null,Xi=0,Nc=null;function Le(){return(Rt&2)!==0&&Mt!==0?Mt&-Mt:N.T!==null?Oc():Do()}function Lm(){if(je===0)if((Mt&536870912)===0||Tt){var t=ia;ia<<=1,(ia&3932160)===0&&(ia=262144),je=t}else je=536870912;return t=Oe.current,t!==null&&(t.flags|=32),je}function Ce(t,e,l){(t===qt&&(Ht===2||Ht===9)||t.cancelPendingCommit!==null)&&($a(t,0),cl(t,Mt,je,!1)),Tl(t,l),((Rt&2)===0||t!==qt)&&(t===qt&&((Rt&2)===0&&(Zl|=l),Kt===4&&cl(t,Mt,je,!1)),fn(t))}function Bm(t,e,l){if((Rt&6)!==0)throw Error(r(327));var i=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Al(t,e),s=i?k1(t,e):Ac(t,e,!0),c=i;do{if(s===0){Ba&&!i&&cl(t,e,0,!1);break}else{if(l=t.current.alternate,c&&!Y1(l)){s=Ac(t,e,!1),c=!1;continue}if(s===2){if(c=e,t.errorRecoveryDisabledLanes&c)var y=0;else y=t.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){e=y;t:{var E=t;s=Yi;var O=E.current.memoizedState.isDehydrated;if(O&&($a(E,y).flags|=256),y=Ac(E,y,!1),y!==2){if(Sc&&!O){E.errorRecoveryDisabledLanes|=c,Zl|=c,s=4;break t}c=_e,_e=s,c!==null&&(_e===null?_e=c:_e.push.apply(_e,c))}s=y}if(c=!1,s!==2)continue}}if(s===1){$a(t,0),cl(t,e,0,!0);break}t:{switch(i=t,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:cl(i,e,je,!ol);break t;case 2:_e=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(s=Cr+300-se(),10<s)){if(cl(i,e,je,!ol),ra(i,0,!0)!==0)break t;jn=e,i.timeoutHandle=mg(Um.bind(null,i,l,_e,Mr,wc,e,je,Zl,Ua,ol,c,"Throttled",-0,0),s);break t}Um(i,l,_e,Mr,wc,e,je,Zl,Ua,ol,c,null,-0,0)}}break}while(!0);fn(t)}function Um(t,e,l,i,s,c,y,E,O,G,lt,ot,Q,W){if(t.timeoutHandle=-1,ot=e.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},zm(e,c,ot);var dt=(c&62914560)===c?Cr-se():(c&4194048)===c?Hm-se():0;if(dt=Nx(ot,dt),dt!==null){jn=c,t.cancelPendingCommit=dt(Zm.bind(null,t,e,c,l,i,s,y,E,O,lt,ot,null,Q,W)),cl(t,c,y,!G);return}}Zm(t,e,c,l,i,s,y,E,O)}function Y1(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var i=0;i<l.length;i++){var s=l[i],c=s.getSnapshot;s=s.value;try{if(!ze(c(),s))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function cl(t,e,l,i){e&=~Ec,e&=~Zl,t.suspendedLanes|=e,t.pingedLanes&=~e,i&&(t.warmLanes|=e),i=t.expirationTimes;for(var s=e;0<s;){var c=31-ye(s),y=1<<c;i[c]=-1,s&=~y}l!==0&&Ao(t,l,e)}function Ar(){return(Rt&6)===0?(ki(0),!1):!0}function Mc(){if(Ct!==null){if(Ht===0)var t=Ct.return;else t=Ct,_n=Bl=null,Xu(t),za=null,Ni=0,t=Ct;for(;t!==null;)gm(t.alternate,t),t=t.return;Ct=null}}function $a(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,sx(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),jn=0,Mc(),qt=t,Ct=l=En(t.current,null),Mt=e,Ht=0,He=null,ol=!1,Ba=Al(t,e),Sc=!1,Ua=je=Ec=Zl=rl=Kt=0,_e=Yi=null,wc=!1,(e&8)!==0&&(e|=e&32);var i=t.entangledLanes;if(i!==0)for(t=t.entanglements,i&=e;0<i;){var s=31-ye(i),c=1<<s;e|=t[s],i&=~c}return Hn=e,Jo(),l}function Vm(t,e){Et=null,N.H=Hi,e===Ta||e===lr?(e=eh(),Ht=3):e===Du?(e=eh(),Ht=4):Ht=e===ic?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,He=e,Ct===null&&(Kt=1,yr(t,Ye(e,t.current)))}function $m(){var t=Oe.current;return t===null?!0:(Mt&4194048)===Mt?Ze===null:(Mt&62914560)===Mt||(Mt&536870912)!==0?t===Ze:!1}function qm(){var t=N.H;return N.H=Hi,t===null?Hi:t}function Ym(){var t=N.A;return N.A=$1,t}function Tr(){Kt=4,ol||(Mt&4194048)!==Mt&&Oe.current!==null||(Ba=!0),(rl&134217727)===0&&(Zl&134217727)===0||qt===null||cl(qt,Mt,je,!1)}function Ac(t,e,l){var i=Rt;Rt|=2;var s=qm(),c=Ym();(qt!==t||Mt!==e)&&(Mr=null,$a(t,e)),e=!1;var y=Kt;t:do try{if(Ht!==0&&Ct!==null){var E=Ct,O=He;switch(Ht){case 8:Mc(),y=6;break t;case 3:case 2:case 9:case 6:Oe.current===null&&(e=!0);var G=Ht;if(Ht=0,He=null,qa(t,E,O,G),l&&Ba){y=0;break t}break;default:G=Ht,Ht=0,He=null,qa(t,E,O,G)}}X1(),y=Kt;break}catch(lt){Vm(t,lt)}while(!0);return e&&t.shellSuspendCounter++,_n=Bl=null,Rt=i,N.H=s,N.A=c,Ct===null&&(qt=null,Mt=0,Jo()),y}function X1(){for(;Ct!==null;)Xm(Ct)}function k1(t,e){var l=Rt;Rt|=2;var i=qm(),s=Ym();qt!==t||Mt!==e?(Mr=null,Nr=se()+500,$a(t,e)):Ba=Al(t,e);t:do try{if(Ht!==0&&Ct!==null){e=Ct;var c=He;e:switch(Ht){case 1:Ht=0,He=null,qa(t,e,c,1);break;case 2:case 9:if(Pd(c)){Ht=0,He=null,km(e);break}e=function(){Ht!==2&&Ht!==9||qt!==t||(Ht=7),fn(t)},c.then(e,e);break t;case 3:Ht=7;break t;case 4:Ht=5;break t;case 7:Pd(c)?(Ht=0,He=null,km(e)):(Ht=0,He=null,qa(t,e,c,7));break;case 5:var y=null;switch(Ct.tag){case 26:y=Ct.memoizedState;case 5:case 27:var E=Ct;if(y?Tg(y):E.stateNode.complete){Ht=0,He=null;var O=E.sibling;if(O!==null)Ct=O;else{var G=E.return;G!==null?(Ct=G,zr(G)):Ct=null}break e}}Ht=0,He=null,qa(t,e,c,5);break;case 6:Ht=0,He=null,qa(t,e,c,6);break;case 8:Mc(),Kt=6;break t;default:throw Error(r(462))}}G1();break}catch(lt){Vm(t,lt)}while(!0);return _n=Bl=null,N.H=i,N.A=s,Rt=l,Ct!==null?0:(qt=null,Mt=0,Jo(),Kt)}function G1(){for(;Ct!==null&&!_l();)Xm(Ct)}function Xm(t){var e=hm(t.alternate,t,Hn);t.memoizedProps=t.pendingProps,e===null?zr(t):Ct=e}function km(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=rm(l,e,e.pendingProps,e.type,void 0,Mt);break;case 11:e=rm(l,e,e.pendingProps,e.type.render,e.ref,Mt);break;case 5:Xu(e);default:gm(l,e),e=Ct=Yd(e,Hn),e=hm(l,e,Hn)}t.memoizedProps=t.pendingProps,e===null?zr(t):Ct=e}function qa(t,e,l,i){_n=Bl=null,Xu(e),za=null,Ni=0;var s=e.return;try{if(R1(t,s,e,l,Mt)){Kt=1,yr(t,Ye(l,t.current)),Ct=null;return}}catch(c){if(s!==null)throw Ct=s,c;Kt=1,yr(t,Ye(l,t.current)),Ct=null;return}e.flags&32768?(Tt||i===1?t=!0:Ba||(Mt&536870912)!==0?t=!1:(ol=t=!0,(i===2||i===9||i===3||i===6)&&(i=Oe.current,i!==null&&i.tag===13&&(i.flags|=16384))),Gm(e,t)):zr(e)}function zr(t){var e=t;do{if((e.flags&32768)!==0){Gm(e,ol);return}t=e.return;var l=L1(e.alternate,e,Hn);if(l!==null){Ct=l;return}if(e=e.sibling,e!==null){Ct=e;return}Ct=e=t}while(e!==null);Kt===0&&(Kt=5)}function Gm(t,e){do{var l=B1(t.alternate,t);if(l!==null){l.flags&=32767,Ct=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){Ct=t;return}Ct=t=l}while(t!==null);Kt=6,Ct=null}function Zm(t,e,l,i,s,c,y,E,O){t.cancelPendingCommit=null;do Dr();while(ae!==0);if((Rt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(c=e.lanes|e.childLanes,c|=pu,Zs(t,l,c,y,E,O),t===qt&&(Ct=qt=null,Mt=0),Va=e,ul=t,jn=l,_c=c,Cc=s,jm=i,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,J1(Nl,function(){return Im(),null})):(t.callbackNode=null,t.callbackPriority=0),i=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||i){i=N.T,N.T=null,s=H.p,H.p=2,y=Rt,Rt|=4;try{U1(t,e,l)}finally{Rt=y,H.p=s,N.T=i}}ae=1,Qm(),Km(),Jm()}}function Qm(){if(ae===1){ae=0;var t=ul,e=Va,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=N.T,N.T=null;var i=H.p;H.p=2;var s=Rt;Rt|=4;try{Mm(e,t);var c=$c,y=Rd(t.containerInfo),E=c.focusedElem,O=c.selectionRange;if(y!==E&&E&&E.ownerDocument&&Od(E.ownerDocument.documentElement,E)){if(O!==null&&fu(E)){var G=O.start,lt=O.end;if(lt===void 0&&(lt=G),"selectionStart"in E)E.selectionStart=G,E.selectionEnd=Math.min(lt,E.value.length);else{var ot=E.ownerDocument||document,Q=ot&&ot.defaultView||window;if(Q.getSelection){var W=Q.getSelection(),dt=E.textContent.length,yt=Math.min(O.start,dt),Vt=O.end===void 0?yt:Math.min(O.end,dt);!W.extend&&yt>Vt&&(y=Vt,Vt=yt,yt=y);var Y=Dd(E,yt),j=Dd(E,Vt);if(Y&&j&&(W.rangeCount!==1||W.anchorNode!==Y.node||W.anchorOffset!==Y.offset||W.focusNode!==j.node||W.focusOffset!==j.offset)){var k=ot.createRange();k.setStart(Y.node,Y.offset),W.removeAllRanges(),yt>Vt?(W.addRange(k),W.extend(j.node,j.offset)):(k.setEnd(j.node,j.offset),W.addRange(k))}}}}for(ot=[],W=E;W=W.parentNode;)W.nodeType===1&&ot.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ot.length;E++){var it=ot[E];it.element.scrollLeft=it.left,it.element.scrollTop=it.top}}Xr=!!Vc,$c=Vc=null}finally{Rt=s,H.p=i,N.T=l}}t.current=e,ae=2}}function Km(){if(ae===2){ae=0;var t=ul,e=Va,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=N.T,N.T=null;var i=H.p;H.p=2;var s=Rt;Rt|=4;try{Em(t,e.alternate,e)}finally{Rt=s,H.p=i,N.T=l}}ae=3}}function Jm(){if(ae===4||ae===3){ae=0,Cl();var t=ul,e=Va,l=jn,i=jm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?ae=5:(ae=0,Va=ul=null,Fm(t,t.pendingLanes));var s=t.pendingLanes;if(s===0&&(sl=null),ui(l),e=e.stateNode,pe&&typeof pe.onCommitFiberRoot=="function")try{pe.onCommitFiberRoot(Ml,e,void 0,(e.current.flags&128)===128)}catch{}if(i!==null){e=N.T,s=H.p,H.p=2,N.T=null;try{for(var c=t.onRecoverableError,y=0;y<i.length;y++){var E=i[y];c(E.value,{componentStack:E.stack})}}finally{N.T=e,H.p=s}}(jn&3)!==0&&Dr(),fn(t),s=t.pendingLanes,(l&261930)!==0&&(s&42)!==0?t===Nc?Xi++:(Xi=0,Nc=t):Xi=0,ki(0)}}function Fm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,_i(e)))}function Dr(){return Qm(),Km(),Jm(),Im()}function Im(){if(ae!==5)return!1;var t=ul,e=_c;_c=0;var l=ui(jn),i=N.T,s=H.p;try{H.p=32>l?32:l,N.T=null,l=Cc,Cc=null;var c=ul,y=jn;if(ae=0,Va=ul=null,jn=0,(Rt&6)!==0)throw Error(r(331));var E=Rt;if(Rt|=4,Om(c.current),Tm(c,c.current,y,l),Rt=E,ki(0,!1),pe&&typeof pe.onPostCommitFiberRoot=="function")try{pe.onPostCommitFiberRoot(Ml,c)}catch{}return!0}finally{H.p=s,N.T=i,Fm(t,e)}}function Wm(t,e,l){e=Ye(l,e),e=ac(t.stateNode,e,2),t=nl(t,e,2),t!==null&&(Tl(t,2),fn(t))}function jt(t,e,l){if(t.tag===3)Wm(t,t,l);else for(;e!==null;){if(e.tag===3){Wm(e,t,l);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(sl===null||!sl.has(i))){t=Ye(l,t),l=Ph(2),i=nl(e,l,2),i!==null&&(tm(l,i,e,t),Tl(i,2),fn(i));break}}e=e.return}}function Tc(t,e,l){var i=t.pingCache;if(i===null){i=t.pingCache=new q1;var s=new Set;i.set(e,s)}else s=i.get(e),s===void 0&&(s=new Set,i.set(e,s));s.has(l)||(Sc=!0,s.add(l),t=Z1.bind(null,t,e,l),e.then(t,t))}function Z1(t,e,l){var i=t.pingCache;i!==null&&i.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,qt===t&&(Mt&l)===l&&(Kt===4||Kt===3&&(Mt&62914560)===Mt&&300>se()-Cr?(Rt&2)===0&&$a(t,0):Ec|=l,Ua===Mt&&(Ua=0)),fn(t)}function Pm(t,e){e===0&&(e=Mo()),t=Hl(t,e),t!==null&&(Tl(t,e),fn(t))}function Q1(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Pm(t,l)}function K1(t,e){var l=0;switch(t.tag){case 31:case 13:var i=t.stateNode,s=t.memoizedState;s!==null&&(l=s.retryLane);break;case 19:i=t.stateNode;break;case 22:i=t.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(e),Pm(t,l)}function J1(t,e){return qn(t,e)}var Or=null,Ya=null,zc=!1,Rr=!1,Dc=!1,fl=0;function fn(t){t!==Ya&&t.next===null&&(Ya===null?Or=Ya=t:Ya=Ya.next=t),Rr=!0,zc||(zc=!0,I1())}function ki(t,e){if(!Dc&&Rr){Dc=!0;do for(var l=!1,i=Or;i!==null;){if(t!==0){var s=i.pendingLanes;if(s===0)var c=0;else{var y=i.suspendedLanes,E=i.pingedLanes;c=(1<<31-ye(42|t)+1)-1,c&=s&~(y&~E),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,lg(i,c))}else c=Mt,c=ra(i,i===qt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(c&3)===0||Al(i,c)||(l=!0,lg(i,c));i=i.next}while(l);Dc=!1}}function F1(){tg()}function tg(){Rr=zc=!1;var t=0;fl!==0&&rx()&&(t=fl);for(var e=se(),l=null,i=Or;i!==null;){var s=i.next,c=eg(i,e);c===0?(i.next=null,l===null?Or=s:l.next=s,s===null&&(Ya=l)):(l=i,(t!==0||(c&3)!==0)&&(Rr=!0)),i=s}ae!==0&&ae!==5||ki(t),fl!==0&&(fl=0)}function eg(t,e){for(var l=t.suspendedLanes,i=t.pingedLanes,s=t.expirationTimes,c=t.pendingLanes&-62914561;0<c;){var y=31-ye(c),E=1<<y,O=s[y];O===-1?((E&l)===0||(E&i)!==0)&&(s[y]=Gs(E,e)):O<=e&&(t.expiredLanes|=E),c&=~E}if(e=qt,l=Mt,l=ra(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i=t.callbackNode,l===0||t===e&&(Ht===2||Ht===9)||t.cancelPendingCommit!==null)return i!==null&&i!==null&&Yn(i),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Al(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(i!==null&&Yn(i),ui(l)){case 2:case 8:l=Xn;break;case 32:l=Nl;break;case 268435456:l=la;break;default:l=Nl}return i=ng.bind(null,t),l=qn(l,i),t.callbackPriority=e,t.callbackNode=l,e}return i!==null&&i!==null&&Yn(i),t.callbackPriority=2,t.callbackNode=null,2}function ng(t,e){if(ae!==0&&ae!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Dr()&&t.callbackNode!==l)return null;var i=Mt;return i=ra(t,t===qt?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),i===0?null:(Bm(t,i,e),eg(t,se()),t.callbackNode!=null&&t.callbackNode===l?ng.bind(null,t):null)}function lg(t,e){if(Dr())return null;Bm(t,e,!0)}function I1(){ux(function(){(Rt&6)!==0?qn(pn,F1):tg()})}function Oc(){if(fl===0){var t=Ma;t===0&&(t=aa,aa<<=1,(aa&261888)===0&&(aa=256)),fl=t}return fl}function ag(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:qo(""+t)}function ig(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function W1(t,e,l,i,s){if(e==="submit"&&l&&l.stateNode===s){var c=ag((s[he]||null).action),y=i.submitter;y&&(e=(e=y[he]||null)?ag(e.formAction):y.getAttribute("formAction"),e!==null&&(c=e,y=null));var E=new Go("action","action",null,i,s);t.push({event:E,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(fl!==0){var O=y?ig(s,y):new FormData(s);Wu(l,{pending:!0,data:O,method:s.method,action:c},null,O)}}else typeof c=="function"&&(E.preventDefault(),O=y?ig(s,y):new FormData(s),Wu(l,{pending:!0,data:O,method:s.method,action:c},c,O))},currentTarget:s}]})}}for(var Rc=0;Rc<gu.length;Rc++){var Hc=gu[Rc],P1=Hc.toLowerCase(),tx=Hc[0].toUpperCase()+Hc.slice(1);Ie(P1,"on"+tx)}Ie(Ld,"onAnimationEnd"),Ie(Bd,"onAnimationIteration"),Ie(Ud,"onAnimationStart"),Ie("dblclick","onDoubleClick"),Ie("focusin","onFocus"),Ie("focusout","onBlur"),Ie(p1,"onTransitionRun"),Ie(y1,"onTransitionStart"),Ie(v1,"onTransitionCancel"),Ie(Vd,"onTransitionEnd"),Kn("onMouseEnter",["mouseout","mouseover"]),Kn("onMouseLeave",["mouseout","mouseover"]),Kn("onPointerEnter",["pointerout","pointerover"]),Kn("onPointerLeave",["pointerout","pointerover"]),xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xn("onBeforeInput",["compositionend","keypress","textInput","paste"]),xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),ex=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gi));function og(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var i=t[l],s=i.event;i=i.listeners;t:{var c=void 0;if(e)for(var y=i.length-1;0<=y;y--){var E=i[y],O=E.instance,G=E.currentTarget;if(E=E.listener,O!==c&&s.isPropagationStopped())break t;c=E,s.currentTarget=G;try{c(s)}catch(lt){Ko(lt)}s.currentTarget=null,c=O}else for(y=0;y<i.length;y++){if(E=i[y],O=E.instance,G=E.currentTarget,E=E.listener,O!==c&&s.isPropagationStopped())break t;c=E,s.currentTarget=G;try{c(s)}catch(lt){Ko(lt)}s.currentTarget=null,c=O}}}}function Nt(t,e){var l=e[sa];l===void 0&&(l=e[sa]=new Set);var i=t+"__bubble";l.has(i)||(rg(e,t,2,!1),l.add(i))}function jc(t,e,l){var i=0;e&&(i|=4),rg(l,t,i,e)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Lc(t){if(!t[Hr]){t[Hr]=!0,jo.forEach(function(l){l!=="selectionchange"&&(ex.has(l)||jc(l,!1,t),jc(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Hr]||(e[Hr]=!0,jc("selectionchange",!1,e))}}function rg(t,e,l,i){switch(Lg(e)){case 2:var s=Tx;break;case 8:s=zx;break;default:s=Ic}l=s.bind(null,e,l,t),s=void 0,!nu||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),i?s!==void 0?t.addEventListener(e,l,{capture:!0,passive:s}):t.addEventListener(e,l,!0):s!==void 0?t.addEventListener(e,l,{passive:s}):t.addEventListener(e,l,!1)}function Bc(t,e,l,i,s){var c=i;if((e&1)===0&&(e&2)===0&&i!==null)t:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var E=i.stateNode.containerInfo;if(E===s)break;if(y===4)for(y=i.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;E!==null;){if(y=kn(E),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){i=c=y;continue t}E=E.parentNode}}i=i.return}dd(function(){var G=c,lt=tu(l),ot=[];t:{var Q=$d.get(t);if(Q!==void 0){var W=Go,dt=t;switch(t){case"keypress":if(Xo(l)===0)break t;case"keydown":case"keyup":W=Kv;break;case"focusin":dt="focus",W=ou;break;case"focusout":dt="blur",W=ou;break;case"beforeblur":case"afterblur":W=ou;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=gd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Lv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=Iv;break;case Ld:case Bd:case Ud:W=Vv;break;case Vd:W=Pv;break;case"scroll":case"scrollend":W=Hv;break;case"wheel":W=e1;break;case"copy":case"cut":case"paste":W=qv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=yd;break;case"toggle":case"beforetoggle":W=l1}var yt=(e&4)!==0,Vt=!yt&&(t==="scroll"||t==="scrollend"),Y=yt?Q!==null?Q+"Capture":null:Q;yt=[];for(var j=G,k;j!==null;){var it=j;if(k=it.stateNode,it=it.tag,it!==5&&it!==26&&it!==27||k===null||Y===null||(it=hi(j,Y),it!=null&&yt.push(Zi(j,it,k))),Vt)break;j=j.return}0<yt.length&&(Q=new W(Q,dt,null,l,lt),ot.push({event:Q,listeners:yt}))}}if((e&7)===0){t:{if(Q=t==="mouseover"||t==="pointerover",W=t==="mouseout"||t==="pointerout",Q&&l!==Ps&&(dt=l.relatedTarget||l.fromElement)&&(kn(dt)||dt[vn]))break t;if((W||Q)&&(Q=lt.window===lt?lt:(Q=lt.ownerDocument)?Q.defaultView||Q.parentWindow:window,W?(dt=l.relatedTarget||l.toElement,W=G,dt=dt?kn(dt):null,dt!==null&&(Vt=f(dt),yt=dt.tag,dt!==Vt||yt!==5&&yt!==27&&yt!==6)&&(dt=null)):(W=null,dt=G),W!==dt)){if(yt=gd,it="onMouseLeave",Y="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(yt=yd,it="onPointerLeave",Y="onPointerEnter",j="pointer"),Vt=W==null?Q:Zn(W),k=dt==null?Q:Zn(dt),Q=new yt(it,j+"leave",W,l,lt),Q.target=Vt,Q.relatedTarget=k,it=null,kn(lt)===G&&(yt=new yt(Y,j+"enter",dt,l,lt),yt.target=k,yt.relatedTarget=Vt,it=yt),Vt=it,W&&dt)e:{for(yt=nx,Y=W,j=dt,k=0,it=Y;it;it=yt(it))k++;it=0;for(var gt=j;gt;gt=yt(gt))it++;for(;0<k-it;)Y=yt(Y),k--;for(;0<it-k;)j=yt(j),it--;for(;k--;){if(Y===j||j!==null&&Y===j.alternate){yt=Y;break e}Y=yt(Y),j=yt(j)}yt=null}else yt=null;W!==null&&sg(ot,Q,W,yt,!1),dt!==null&&Vt!==null&&sg(ot,Vt,dt,yt,!0)}}t:{if(Q=G?Zn(G):window,W=Q.nodeName&&Q.nodeName.toLowerCase(),W==="select"||W==="input"&&Q.type==="file")var Dt=Cd;else if(wd(Q))if(Nd)Dt=h1;else{Dt=f1;var ht=c1}else W=Q.nodeName,!W||W.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?G&&Ws(G.elementType)&&(Dt=Cd):Dt=d1;if(Dt&&(Dt=Dt(t,G))){_d(ot,Dt,l,lt);break t}ht&&ht(t,Q,G),t==="focusout"&&G&&Q.type==="number"&&G.memoizedProps.value!=null&&ha(Q,"number",Q.value)}switch(ht=G?Zn(G):window,t){case"focusin":(wd(ht)||ht.contentEditable==="true")&&(xa=ht,du=G,Si=null);break;case"focusout":Si=du=xa=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Hd(ot,l,lt);break;case"selectionchange":if(g1)break;case"keydown":case"keyup":Hd(ot,l,lt)}var _t;if(su)t:{switch(t){case"compositionstart":var At="onCompositionStart";break t;case"compositionend":At="onCompositionEnd";break t;case"compositionupdate":At="onCompositionUpdate";break t}At=void 0}else va?Sd(t,l)&&(At="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(At="onCompositionStart");At&&(vd&&l.locale!=="ko"&&(va||At!=="onCompositionStart"?At==="onCompositionEnd"&&va&&(_t=hd()):(Jn=lt,lu="value"in Jn?Jn.value:Jn.textContent,va=!0)),ht=jr(G,At),0<ht.length&&(At=new pd(At,t,null,l,lt),ot.push({event:At,listeners:ht}),_t?At.data=_t:(_t=Ed(l),_t!==null&&(At.data=_t)))),(_t=i1?o1(t,l):r1(t,l))&&(At=jr(G,"onBeforeInput"),0<At.length&&(ht=new pd("onBeforeInput","beforeinput",null,l,lt),ot.push({event:ht,listeners:At}),ht.data=_t)),W1(ot,t,G,l,lt)}og(ot,e)})}function Zi(t,e,l){return{instance:t,listener:e,currentTarget:l}}function jr(t,e){for(var l=e+"Capture",i=[];t!==null;){var s=t,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=hi(t,l),s!=null&&i.unshift(Zi(t,s,c)),s=hi(t,e),s!=null&&i.push(Zi(t,s,c))),t.tag===3)return i;t=t.return}return[]}function nx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function sg(t,e,l,i,s){for(var c=e._reactName,y=[];l!==null&&l!==i;){var E=l,O=E.alternate,G=E.stateNode;if(E=E.tag,O!==null&&O===i)break;E!==5&&E!==26&&E!==27||G===null||(O=G,s?(G=hi(l,c),G!=null&&y.unshift(Zi(l,G,O))):s||(G=hi(l,c),G!=null&&y.push(Zi(l,G,O)))),l=l.return}y.length!==0&&t.push({event:e,listeners:y})}var lx=/\r\n?/g,ax=/\u0000|\uFFFD/g;function ug(t){return(typeof t=="string"?t:""+t).replace(lx,`
`).replace(ax,"")}function cg(t,e){return e=ug(e),ug(t)===e}function Ut(t,e,l,i,s,c){switch(l){case"children":typeof i=="string"?e==="body"||e==="textarea"&&i===""||ga(t,i):(typeof i=="number"||typeof i=="bigint")&&e!=="body"&&ga(t,""+i);break;case"className":ca(t,"class",i);break;case"tabIndex":ca(t,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ca(t,l,i);break;case"style":cd(t,i,c);break;case"data":if(e!=="object"){ca(t,"data",i);break}case"src":case"href":if(i===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(l);break}i=qo(""+i),t.setAttribute(l,i);break;case"action":case"formAction":if(typeof i=="function"){t.setAttribute(l,"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 c=="function"&&(l==="formAction"?(e!=="input"&&Ut(t,e,"name",s.name,s,null),Ut(t,e,"formEncType",s.formEncType,s,null),Ut(t,e,"formMethod",s.formMethod,s,null),Ut(t,e,"formTarget",s.formTarget,s,null)):(Ut(t,e,"encType",s.encType,s,null),Ut(t,e,"method",s.method,s,null),Ut(t,e,"target",s.target,s,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){t.removeAttribute(l);break}i=qo(""+i),t.setAttribute(l,i);break;case"onClick":i!=null&&(t.onclick=bn);break;case"onScroll":i!=null&&Nt("scroll",t);break;case"onScrollEnd":i!=null&&Nt("scrollend",t);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(l=i.__html,l!=null){if(s.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"multiple":t.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":t.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){t.removeAttribute("xlink:href");break}l=qo(""+i),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(l,""+i):t.removeAttribute(l);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":i&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":i===!0?t.setAttribute(l,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?t.setAttribute(l,i):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?t.setAttribute(l,i):t.removeAttribute(l);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?t.removeAttribute(l):t.setAttribute(l,i);break;case"popover":Nt("beforetoggle",t),Nt("toggle",t),ua(t,"popover",i);break;case"xlinkActuate":Fe(t,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Fe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Fe(t,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Fe(t,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Fe(t,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Fe(t,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Fe(t,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ua(t,"is",i);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ov.get(l)||l,ua(t,l,i))}}function Uc(t,e,l,i,s,c){switch(l){case"style":cd(t,i,c);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(r(61));if(l=i.__html,l!=null){if(s.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"children":typeof i=="string"?ga(t,i):(typeof i=="number"||typeof i=="bigint")&&ga(t,""+i);break;case"onScroll":i!=null&&Nt("scroll",t);break;case"onScrollEnd":i!=null&&Nt("scrollend",t);break;case"onClick":i!=null&&(t.onclick=bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lo.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),e=l.slice(2,s?l.length-7:void 0),c=t[he]||null,c=c!=null?c[l]:null,typeof c=="function"&&t.removeEventListener(e,c,s),typeof i=="function")){typeof c!="function"&&c!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,i,s);break t}l in t?t[l]=i:i===!0?t.setAttribute(l,""):ua(t,l,i)}}}function de(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Nt("error",t),Nt("load",t);var i=!1,s=!1,c;for(c in l)if(l.hasOwnProperty(c)){var y=l[c];if(y!=null)switch(c){case"src":i=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ut(t,e,c,y,l,null)}}s&&Ut(t,e,"srcSet",l.srcSet,l,null),i&&Ut(t,e,"src",l.src,l,null);return;case"input":Nt("invalid",t);var E=c=y=s=null,O=null,G=null;for(i in l)if(l.hasOwnProperty(i)){var lt=l[i];if(lt!=null)switch(i){case"name":s=lt;break;case"type":y=lt;break;case"checked":O=lt;break;case"defaultChecked":G=lt;break;case"value":c=lt;break;case"defaultValue":E=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(r(137,e));break;default:Ut(t,e,i,lt,l,null)}}$o(t,c,E,O,G,y,s,!1);return;case"select":Nt("invalid",t),i=y=c=null;for(s in l)if(l.hasOwnProperty(s)&&(E=l[s],E!=null))switch(s){case"value":c=E;break;case"defaultValue":y=E;break;case"multiple":i=E;default:Ut(t,e,s,E,l,null)}e=c,l=y,t.multiple=!!i,e!=null?ma(t,!!i,e,!1):l!=null&&ma(t,!!i,l,!0);return;case"textarea":Nt("invalid",t),c=s=i=null;for(y in l)if(l.hasOwnProperty(y)&&(E=l[y],E!=null))switch(y){case"value":i=E;break;case"defaultValue":s=E;break;case"children":c=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:Ut(t,e,y,E,l,null)}sd(t,i,s,c);return;case"option":for(O in l)if(l.hasOwnProperty(O)&&(i=l[O],i!=null))switch(O){case"selected":t.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Ut(t,e,O,i,l,null)}return;case"dialog":Nt("beforetoggle",t),Nt("toggle",t),Nt("cancel",t),Nt("close",t);break;case"iframe":case"object":Nt("load",t);break;case"video":case"audio":for(i=0;i<Gi.length;i++)Nt(Gi[i],t);break;case"image":Nt("error",t),Nt("load",t);break;case"details":Nt("toggle",t);break;case"embed":case"source":case"link":Nt("error",t),Nt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(G in l)if(l.hasOwnProperty(G)&&(i=l[G],i!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Ut(t,e,G,i,l,null)}return;default:if(Ws(e)){for(lt in l)l.hasOwnProperty(lt)&&(i=l[lt],i!==void 0&&Uc(t,e,lt,i,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(i=l[E],i!=null&&Ut(t,e,E,i,l,null))}function ix(t,e,l,i){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,y=null,E=null,O=null,G=null,lt=null;for(W in l){var ot=l[W];if(l.hasOwnProperty(W)&&ot!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":O=ot;default:i.hasOwnProperty(W)||Ut(t,e,W,null,i,ot)}}for(var Q in i){var W=i[Q];if(ot=l[Q],i.hasOwnProperty(Q)&&(W!=null||ot!=null))switch(Q){case"type":c=W;break;case"name":s=W;break;case"checked":G=W;break;case"defaultChecked":lt=W;break;case"value":y=W;break;case"defaultValue":E=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,e));break;default:W!==ot&&Ut(t,e,Q,W,i,ot)}}di(t,y,E,O,G,lt,c,s);return;case"select":W=y=E=Q=null;for(c in l)if(O=l[c],l.hasOwnProperty(c)&&O!=null)switch(c){case"value":break;case"multiple":W=O;default:i.hasOwnProperty(c)||Ut(t,e,c,null,i,O)}for(s in i)if(c=i[s],O=l[s],i.hasOwnProperty(s)&&(c!=null||O!=null))switch(s){case"value":Q=c;break;case"defaultValue":E=c;break;case"multiple":y=c;default:c!==O&&Ut(t,e,s,c,i,O)}e=E,l=y,i=W,Q!=null?ma(t,!!l,Q,!1):!!i!=!!l&&(e!=null?ma(t,!!l,e,!0):ma(t,!!l,l?[]:"",!1));return;case"textarea":W=Q=null;for(E in l)if(s=l[E],l.hasOwnProperty(E)&&s!=null&&!i.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ut(t,e,E,null,i,s)}for(y in i)if(s=i[y],c=l[y],i.hasOwnProperty(y)&&(s!=null||c!=null))switch(y){case"value":Q=s;break;case"defaultValue":W=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&Ut(t,e,y,s,i,c)}rd(t,Q,W);return;case"option":for(var dt in l)if(Q=l[dt],l.hasOwnProperty(dt)&&Q!=null&&!i.hasOwnProperty(dt))switch(dt){case"selected":t.selected=!1;break;default:Ut(t,e,dt,null,i,Q)}for(O in i)if(Q=i[O],W=l[O],i.hasOwnProperty(O)&&Q!==W&&(Q!=null||W!=null))switch(O){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Ut(t,e,O,Q,i,W)}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 yt in l)Q=l[yt],l.hasOwnProperty(yt)&&Q!=null&&!i.hasOwnProperty(yt)&&Ut(t,e,yt,null,i,Q);for(G in i)if(Q=i[G],W=l[G],i.hasOwnProperty(G)&&Q!==W&&(Q!=null||W!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,e));break;default:Ut(t,e,G,Q,i,W)}return;default:if(Ws(e)){for(var Vt in l)Q=l[Vt],l.hasOwnProperty(Vt)&&Q!==void 0&&!i.hasOwnProperty(Vt)&&Uc(t,e,Vt,void 0,i,Q);for(lt in i)Q=i[lt],W=l[lt],!i.hasOwnProperty(lt)||Q===W||Q===void 0&&W===void 0||Uc(t,e,lt,Q,i,W);return}}for(var Y in l)Q=l[Y],l.hasOwnProperty(Y)&&Q!=null&&!i.hasOwnProperty(Y)&&Ut(t,e,Y,null,i,Q);for(ot in i)Q=i[ot],W=l[ot],!i.hasOwnProperty(ot)||Q===W||Q==null&&W==null||Ut(t,e,ot,Q,i,W)}function fg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ox(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),i=0;i<l.length;i++){var s=l[i],c=s.transferSize,y=s.initiatorType,E=s.duration;if(c&&E&&fg(y)){for(y=0,E=s.responseEnd,i+=1;i<l.length;i++){var O=l[i],G=O.startTime;if(G>E)break;var lt=O.transferSize,ot=O.initiatorType;lt&&fg(ot)&&(O=O.responseEnd,y+=lt*(O<E?1:(E-G)/(O-G)))}if(--i,e+=8*(c+y)/(s.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Vc=null,$c=null;function Lr(t){return t.nodeType===9?t:t.ownerDocument}function dg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hg(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function qc(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Yc=null;function rx(){var t=window.event;return t&&t.type==="popstate"?t===Yc?!1:(Yc=t,!0):(Yc=null,!1)}var mg=typeof setTimeout=="function"?setTimeout:void 0,sx=typeof clearTimeout=="function"?clearTimeout:void 0,gg=typeof Promise=="function"?Promise:void 0,ux=typeof queueMicrotask=="function"?queueMicrotask:typeof gg<"u"?function(t){return gg.resolve(null).then(t).catch(cx)}:mg;function cx(t){setTimeout(function(){throw t})}function dl(t){return t==="head"}function pg(t,e){var l=e,i=0;do{var s=l.nextSibling;if(t.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(i===0){t.removeChild(s),Za(e);return}i--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")i++;else if(l==="html")Qi(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Qi(l);for(var c=l.firstChild;c;){var y=c.nextSibling,E=c.nodeName;c[zl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=y}}else l==="body"&&Qi(t.ownerDocument.body);l=s}while(l);Za(e)}function yg(t,e){var l=t;t=0;do{var i=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),i&&i.nodeType===8)if(l=i.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=i}while(l)}function Xc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xc(l),ci(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function fx(t,e,l,i){for(;t.nodeType===1;){var s=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!i&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(i){if(!t[zl])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(c=t.getAttribute("rel"),c==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(c!==s.rel||t.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||t.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||t.getAttribute("title")!==(s.title==null?null:s.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(c=t.getAttribute("src"),(c!==(s.src==null?null:s.src)||t.getAttribute("type")!==(s.type==null?null:s.type)||t.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&t.getAttribute("name")===c)return t}else return t;if(t=Qe(t.nextSibling),t===null)break}return null}function dx(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Qe(t.nextSibling),t===null))return null;return t}function vg(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Qe(t.nextSibling),t===null))return null;return t}function kc(t){return t.data==="$?"||t.data==="$~"}function Gc(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function hx(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var i=function(){e(),l.removeEventListener("DOMContentLoaded",i)};l.addEventListener("DOMContentLoaded",i),t._reactRetry=i}}function Qe(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Zc=null;function xg(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Qe(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function bg(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Sg(t,e,l){switch(e=Lr(l),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Qi(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);ci(t)}var Ke=new Map,Eg=new Set;function Br(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Ln=H.d;H.d={f:mx,r:gx,D:px,C:yx,L:vx,m:xx,X:Sx,S:bx,M:Ex};function mx(){var t=Ln.f(),e=Ar();return t||e}function gx(t){var e=Gn(t);e!==null&&e.tag===5&&e.type==="form"?Vh(e):Ln.r(t)}var Xa=typeof document>"u"?null:document;function wg(t,e,l){var i=Xa;if(i&&typeof e=="string"&&e){var s=me(e);s='link[rel="'+t+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Eg.has(s)||(Eg.add(s),t={rel:t,crossOrigin:l,href:e},i.querySelector(s)===null&&(e=i.createElement("link"),de(e,"link",t),It(e),i.head.appendChild(e)))}}function px(t){Ln.D(t),wg("dns-prefetch",t,null)}function yx(t,e){Ln.C(t,e),wg("preconnect",t,e)}function vx(t,e,l){Ln.L(t,e,l);var i=Xa;if(i&&t&&e){var s='link[rel="preload"][as="'+me(e)+'"]';e==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+me(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+me(l.imageSizes)+'"]')):s+='[href="'+me(t)+'"]';var c=s;switch(e){case"style":c=ka(t);break;case"script":c=Ga(t)}Ke.has(c)||(t=x({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ke.set(c,t),i.querySelector(s)!==null||e==="style"&&i.querySelector(Ki(c))||e==="script"&&i.querySelector(Ji(c))||(e=i.createElement("link"),de(e,"link",t),It(e),i.head.appendChild(e)))}}function xx(t,e){Ln.m(t,e);var l=Xa;if(l&&t){var i=e&&typeof e.as=="string"?e.as:"script",s='link[rel="modulepreload"][as="'+me(i)+'"][href="'+me(t)+'"]',c=s;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ga(t)}if(!Ke.has(c)&&(t=x({rel:"modulepreload",href:t},e),Ke.set(c,t),l.querySelector(s)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ji(c)))return}i=l.createElement("link"),de(i,"link",t),It(i),l.head.appendChild(i)}}}function bx(t,e,l){Ln.S(t,e,l);var i=Xa;if(i&&t){var s=Qn(i).hoistableStyles,c=ka(t);e=e||"default";var y=s.get(c);if(!y){var E={loading:0,preload:null};if(y=i.querySelector(Ki(c)))E.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ke.get(c))&&Qc(t,l);var O=y=i.createElement("link");It(O),de(O,"link",t),O._p=new Promise(function(G,lt){O.onload=G,O.onerror=lt}),O.addEventListener("load",function(){E.loading|=1}),O.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ur(y,e,i)}y={type:"stylesheet",instance:y,count:1,state:E},s.set(c,y)}}}function Sx(t,e){Ln.X(t,e);var l=Xa;if(l&&t){var i=Qn(l).hoistableScripts,s=Ga(t),c=i.get(s);c||(c=l.querySelector(Ji(s)),c||(t=x({src:t,async:!0},e),(e=Ke.get(s))&&Kc(t,e),c=l.createElement("script"),It(c),de(c,"link",t),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(s,c))}}function Ex(t,e){Ln.M(t,e);var l=Xa;if(l&&t){var i=Qn(l).hoistableScripts,s=Ga(t),c=i.get(s);c||(c=l.querySelector(Ji(s)),c||(t=x({src:t,async:!0,type:"module"},e),(e=Ke.get(s))&&Kc(t,e),c=l.createElement("script"),It(c),de(c,"link",t),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(s,c))}}function _g(t,e,l,i){var s=(s=ct.current)?Br(s):null;if(!s)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=ka(l.href),l=Qn(s).hoistableStyles,i=l.get(e),i||(i={type:"style",instance:null,count:0,state:null},l.set(e,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ka(l.href);var c=Qn(s).hoistableStyles,y=c.get(t);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(t,y),(c=s.querySelector(Ki(t)))&&!c._p&&(y.instance=c,y.state.loading=5),Ke.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ke.set(t,l),c||wx(s,t,l,y.state))),e&&i===null)throw Error(r(528,""));return y}if(e&&i!==null)throw Error(r(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ga(l),l=Qn(s).hoistableScripts,i=l.get(e),i||(i={type:"script",instance:null,count:0,state:null},l.set(e,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function ka(t){return'href="'+me(t)+'"'}function Ki(t){return'link[rel="stylesheet"]['+t+"]"}function Cg(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function wx(t,e,l,i){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?i.loading=1:(e=t.createElement("link"),i.preload=e,e.addEventListener("load",function(){return i.loading|=1}),e.addEventListener("error",function(){return i.loading|=2}),de(e,"link",l),It(e),t.head.appendChild(e))}function Ga(t){return'[src="'+me(t)+'"]'}function Ji(t){return"script[async]"+t}function Ng(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var i=t.querySelector('style[data-href~="'+me(l.href)+'"]');if(i)return e.instance=i,It(i),i;var s=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(t.ownerDocument||t).createElement("style"),It(i),de(i,"style",s),Ur(i,l.precedence,t),e.instance=i;case"stylesheet":s=ka(l.href);var c=t.querySelector(Ki(s));if(c)return e.state.loading|=4,e.instance=c,It(c),c;i=Cg(l),(s=Ke.get(s))&&Qc(i,s),c=(t.ownerDocument||t).createElement("link"),It(c);var y=c;return y._p=new Promise(function(E,O){y.onload=E,y.onerror=O}),de(c,"link",i),e.state.loading|=4,Ur(c,l.precedence,t),e.instance=c;case"script":return c=Ga(l.src),(s=t.querySelector(Ji(c)))?(e.instance=s,It(s),s):(i=l,(s=Ke.get(c))&&(i=x({},l),Kc(i,s)),t=t.ownerDocument||t,s=t.createElement("script"),It(s),de(s,"link",i),t.head.appendChild(s),e.instance=s);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(i=e.instance,e.state.loading|=4,Ur(i,l.precedence,t));return e.instance}function Ur(t,e,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=i.length?i[i.length-1]:null,c=s,y=0;y<i.length;y++){var E=i[y];if(E.dataset.precedence===e)c=E;else if(c!==s)break}c?c.parentNode.insertBefore(t,c.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function Qc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Kc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Vr=null;function Mg(t,e,l){if(Vr===null){var i=new Map,s=Vr=new Map;s.set(l,i)}else s=Vr,i=s.get(l),i||(i=new Map,s.set(l,i));if(i.has(t))return i;for(i.set(t,null),l=l.getElementsByTagName(t),s=0;s<l.length;s++){var c=l[s];if(!(c[zl]||c[le]||t==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(e)||"";y=t+y;var E=i.get(y);E?E.push(c):i.set(y,[c])}}return i}function Ag(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function _x(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Tg(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Cx(t,e,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ka(i.href),c=e.querySelector(Ki(s));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=$r.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=c,It(c);return}c=e.ownerDocument||e,i=Cg(i),(s=Ke.get(s))&&Qc(i,s),c=c.createElement("link"),It(c);var y=c;y._p=new Promise(function(E,O){y.onload=E,y.onerror=O}),de(c,"link",i),l.instance=c}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=$r.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Jc=0;function Nx(t,e){return t.stylesheets&&t.count===0&&Yr(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var i=setTimeout(function(){if(t.stylesheets&&Yr(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4+e);0<t.imgBytes&&Jc===0&&(Jc=62500*ox());var s=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Yr(t,t.stylesheets),t.unsuspend)){var c=t.unsuspend;t.unsuspend=null,c()}},(t.imgBytes>Jc?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(i),clearTimeout(s)}}:null}function $r(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yr(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var qr=null;function Yr(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,qr=new Map,e.forEach(Mx,t),qr=null,$r.call(t))}function Mx(t,e){if(!(e.state.loading&4)){var l=qr.get(t);if(l)var i=l.get(null);else{l=new Map,qr.set(t,l);for(var s=t.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var y=s[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),i=y)}i&&l.set(null,i)}s=e.instance,y=s.getAttribute("data-precedence"),c=l.get(y)||i,c===i&&l.set(null,s),l.set(y,s),this.count++,i=$r.bind(this),s.addEventListener("load",i),s.addEventListener("error",i),c?c.parentNode.insertBefore(s,c.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(s,t.firstChild)),e.state.loading|=4}}var Fi={$$typeof:S,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Ax(t,e,l,i,s,c,y,E,O){this.tag=1,this.containerInfo=t,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=ri(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.hiddenUpdates=ri(null),this.identifierPrefix=i,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function zg(t,e,l,i,s,c,y,E,O,G,lt,ot){return t=new Ax(t,e,l,y,O,G,lt,ot,E),e=1,c===!0&&(e|=24),c=De(3,null,null,e),t.current=c,c.stateNode=t,e=Au(),e.refCount++,t.pooledCache=e,e.refCount++,c.memoizedState={element:i,isDehydrated:l,cache:e},Ou(c),t}function Dg(t){return t?(t=Ea,t):Ea}function Og(t,e,l,i,s,c){s=Dg(s),i.context===null?i.context=s:i.pendingContext=s,i=el(e),i.payload={element:l},c=c===void 0?null:c,c!==null&&(i.callback=c),l=nl(t,i,e),l!==null&&(Ce(l,t,e),Ai(l,t,e))}function Rg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function Fc(t,e){Rg(t,e),(t=t.alternate)&&Rg(t,e)}function Hg(t){if(t.tag===13||t.tag===31){var e=Hl(t,67108864);e!==null&&Ce(e,t,67108864),Fc(t,67108864)}}function jg(t){if(t.tag===13||t.tag===31){var e=Le();e=si(e);var l=Hl(t,e);l!==null&&Ce(l,t,e),Fc(t,e)}}var Xr=!0;function Tx(t,e,l,i){var s=N.T;N.T=null;var c=H.p;try{H.p=2,Ic(t,e,l,i)}finally{H.p=c,N.T=s}}function zx(t,e,l,i){var s=N.T;N.T=null;var c=H.p;try{H.p=8,Ic(t,e,l,i)}finally{H.p=c,N.T=s}}function Ic(t,e,l,i){if(Xr){var s=Wc(i);if(s===null)Bc(t,e,i,kr,l),Bg(t,i);else if(Ox(s,t,e,l,i))i.stopPropagation();else if(Bg(t,i),e&4&&-1<Dx.indexOf(t)){for(;s!==null;){var c=Gn(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=yn(c.pendingLanes);if(y!==0){var E=c;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var O=1<<31-ye(y);E.entanglements[1]|=O,y&=~O}fn(c),(Rt&6)===0&&(Nr=se()+500,ki(0))}}break;case 31:case 13:E=Hl(c,2),E!==null&&Ce(E,c,2),Ar(),Fc(c,2)}if(c=Wc(i),c===null&&Bc(t,e,i,kr,l),c===s)break;s=c}s!==null&&i.stopPropagation()}else Bc(t,e,i,null,l)}}function Wc(t){return t=tu(t),Pc(t)}var kr=null;function Pc(t){if(kr=null,t=kn(t),t!==null){var e=f(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=d(e),t!==null)return t;t=null}else if(l===31){if(t=m(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return kr=t,null}function Lg(t){switch(t){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(na()){case pn:return 2;case Xn:return 8;case Nl:case Vs:return 32;case la:return 268435456;default:return 32}default:return 32}}var tf=!1,hl=null,ml=null,gl=null,Ii=new Map,Wi=new Map,pl=[],Dx="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 Bg(t,e){switch(t){case"focusin":case"focusout":hl=null;break;case"dragenter":case"dragleave":ml=null;break;case"mouseover":case"mouseout":gl=null;break;case"pointerover":case"pointerout":Ii.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(e.pointerId)}}function Pi(t,e,l,i,s,c){return t===null||t.nativeEvent!==c?(t={blockedOn:e,domEventName:l,eventSystemFlags:i,nativeEvent:c,targetContainers:[s]},e!==null&&(e=Gn(e),e!==null&&Hg(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function Ox(t,e,l,i,s){switch(e){case"focusin":return hl=Pi(hl,t,e,l,i,s),!0;case"dragenter":return ml=Pi(ml,t,e,l,i,s),!0;case"mouseover":return gl=Pi(gl,t,e,l,i,s),!0;case"pointerover":var c=s.pointerId;return Ii.set(c,Pi(Ii.get(c)||null,t,e,l,i,s)),!0;case"gotpointercapture":return c=s.pointerId,Wi.set(c,Pi(Wi.get(c)||null,t,e,l,i,s)),!0}return!1}function Ug(t){var e=kn(t.target);if(e!==null){var l=f(e);if(l!==null){if(e=l.tag,e===13){if(e=d(l),e!==null){t.blockedOn=e,Oo(t.priority,function(){jg(l)});return}}else if(e===31){if(e=m(l),e!==null){t.blockedOn=e,Oo(t.priority,function(){jg(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Gr(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Wc(t.nativeEvent);if(l===null){l=t.nativeEvent;var i=new l.constructor(l.type,l);Ps=i,l.target.dispatchEvent(i),Ps=null}else return e=Gn(l),e!==null&&Hg(e),t.blockedOn=l,!1;e.shift()}return!0}function Vg(t,e,l){Gr(t)&&l.delete(e)}function Rx(){tf=!1,hl!==null&&Gr(hl)&&(hl=null),ml!==null&&Gr(ml)&&(ml=null),gl!==null&&Gr(gl)&&(gl=null),Ii.forEach(Vg),Wi.forEach(Vg)}function Zr(t,e){t.blockedOn===e&&(t.blockedOn=null,tf||(tf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rx)))}var Qr=null;function $g(t){Qr!==t&&(Qr=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Qr===t&&(Qr=null);for(var e=0;e<t.length;e+=3){var l=t[e],i=t[e+1],s=t[e+2];if(typeof i!="function"){if(Pc(i||l)===null)continue;break}var c=Gn(l);c!==null&&(t.splice(e,3),e-=3,Wu(c,{pending:!0,data:s,method:l.method,action:i},i,s))}}))}function Za(t){function e(O){return Zr(O,t)}hl!==null&&Zr(hl,t),ml!==null&&Zr(ml,t),gl!==null&&Zr(gl,t),Ii.forEach(e),Wi.forEach(e);for(var l=0;l<pl.length;l++){var i=pl[l];i.blockedOn===t&&(i.blockedOn=null)}for(;0<pl.length&&(l=pl[0],l.blockedOn===null);)Ug(l),l.blockedOn===null&&pl.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(i=0;i<l.length;i+=3){var s=l[i],c=l[i+1],y=s[he]||null;if(typeof c=="function")y||$g(l);else if(y){var E=null;if(c&&c.hasAttribute("formAction")){if(s=c,y=c[he]||null)E=y.formAction;else if(Pc(s)!==null)continue}else E=y.action;typeof E=="function"?l[i+1]=E:(l.splice(i,3),i-=3),$g(l)}}}function qg(){function t(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function e(){s!==null&&(s(),s=null),i||setTimeout(l,20)}function l(){if(!i&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,s=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){i=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),s!==null&&(s(),s=null)}}}function ef(t){this._internalRoot=t}Kr.prototype.render=ef.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var l=e.current,i=Le();Og(l,i,t,e,null,null)},Kr.prototype.unmount=ef.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Og(t.current,2,null,t,null,null),Ar(),e[vn]=null}};function Kr(t){this._internalRoot=t}Kr.prototype.unstable_scheduleHydration=function(t){if(t){var e=Do();t={blockedOn:null,target:t,priority:e};for(var l=0;l<pl.length&&e!==0&&e<pl[l].priority;l++);pl.splice(l,0,t),l===0&&Ug(t)}};var Yg=a.version;if(Yg!=="19.2.0")throw Error(r(527,Yg,"19.2.0"));H.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=h(e),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var Hx={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jr.isDisabled&&Jr.supportsFiber)try{Ml=Jr.inject(Hx),pe=Jr}catch{}}return eo.createRoot=function(t,e){if(!u(t))throw Error(r(299));var l=!1,i="",s=Jh,c=Fh,y=Ih;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onUncaughtError!==void 0&&(s=e.onUncaughtError),e.onCaughtError!==void 0&&(c=e.onCaughtError),e.onRecoverableError!==void 0&&(y=e.onRecoverableError)),e=zg(t,1,!1,null,null,l,i,null,s,c,y,qg),t[vn]=e.current,Lc(t),new ef(e)},eo.hydrateRoot=function(t,e,l){if(!u(t))throw Error(r(299));var i=!1,s="",c=Jh,y=Fh,E=Ih,O=null;return l!=null&&(l.unstable_strictMode===!0&&(i=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(O=l.formState)),e=zg(t,1,!0,e,l??null,i,s,O,c,y,E,qg),e.context=Dg(null),l=e.current,i=Le(),i=si(i),s=el(i),s.callback=null,nl(l,s,i),l=i,e.current.lanes=l,Tl(e,l),fn(e),t[vn]=e.current,Lc(t),new Kr(e)},eo.version="19.2.0",eo}var Wg;function Xx(){if(Wg)return af.exports;Wg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),af.exports=Yx(),af.exports}var kx=Xx();function ne(n){if(typeof n=="string"||typeof n=="number")return""+n;let a="";if(Array.isArray(n))for(let o=0,r;o<n.length;o++)(r=ne(n[o]))!==""&&(a+=(a&&" ")+r);else for(let o in n)n[o]&&(a+=(a&&" ")+o);return a}var Gx={value:()=>{}};function Cs(){for(var n=0,a=arguments.length,o={},r;n<a;++n){if(!(r=arguments[n]+"")||r in o||/[\s.]/.test(r))throw new Error("illegal type: "+r);o[r]=[]}return new rs(o)}function rs(n){this._=n}function Zx(n,a){return n.trim().split(/^|\s+/).map(function(o){var r="",u=o.indexOf(".");if(u>=0&&(r=o.slice(u+1),o=o.slice(0,u)),o&&!a.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:r}})}rs.prototype=Cs.prototype={constructor:rs,on:function(n,a){var o=this._,r=Zx(n+"",o),u,f=-1,d=r.length;if(arguments.length<2){for(;++f<d;)if((u=(n=r[f]).type)&&(u=Qx(o[u],n.name)))return u;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++f<d;)if(u=(n=r[f]).type)o[u]=Pg(o[u],n.name,a);else if(a==null)for(u in o)o[u]=Pg(o[u],n.name,null);return this},copy:function(){var n={},a=this._;for(var o in a)n[o]=a[o].slice();return new rs(n)},call:function(n,a){if((u=arguments.length-2)>0)for(var o=new Array(u),r=0,u,f;r<u;++r)o[r]=arguments[r+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(f=this._[n],r=0,u=f.length;r<u;++r)f[r].value.apply(a,o)},apply:function(n,a,o){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var r=this._[n],u=0,f=r.length;u<f;++u)r[u].value.apply(a,o)}};function Qx(n,a){for(var o=0,r=n.length,u;o<r;++o)if((u=n[o]).name===a)return u.value}function Pg(n,a,o){for(var r=0,u=n.length;r<u;++r)if(n[r].name===a){n[r]=Gx,n=n.slice(0,r).concat(n.slice(r+1));break}return o!=null&&n.push({name:a,value:o}),n}var Nf="http://www.w3.org/1999/xhtml";const t0={svg:"http://www.w3.org/2000/svg",xhtml:Nf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ns(n){var a=n+="",o=a.indexOf(":");return o>=0&&(a=n.slice(0,o))!=="xmlns"&&(n=n.slice(o+1)),t0.hasOwnProperty(a)?{space:t0[a],local:n}:n}function Kx(n){return function(){var a=this.ownerDocument,o=this.namespaceURI;return o===Nf&&a.documentElement.namespaceURI===Nf?a.createElement(n):a.createElementNS(o,n)}}function Jx(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function _p(n){var a=Ns(n);return(a.local?Jx:Kx)(a)}function Fx(){}function Yf(n){return n==null?Fx:function(){return this.querySelector(n)}}function Ix(n){typeof n!="function"&&(n=Yf(n));for(var a=this._groups,o=a.length,r=new Array(o),u=0;u<o;++u)for(var f=a[u],d=f.length,m=r[u]=new Array(d),g,h,v=0;v<d;++v)(g=f[v])&&(h=n.call(g,g.__data__,v,f))&&("__data__"in g&&(h.__data__=g.__data__),m[v]=h);return new Ve(r,this._parents)}function Wx(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function Px(){return[]}function Cp(n){return n==null?Px:function(){return this.querySelectorAll(n)}}function tb(n){return function(){return Wx(n.apply(this,arguments))}}function eb(n){typeof n=="function"?n=tb(n):n=Cp(n);for(var a=this._groups,o=a.length,r=[],u=[],f=0;f<o;++f)for(var d=a[f],m=d.length,g,h=0;h<m;++h)(g=d[h])&&(r.push(n.call(g,g.__data__,h,d)),u.push(g));return new Ve(r,u)}function Np(n){return function(){return this.matches(n)}}function Mp(n){return function(a){return a.matches(n)}}var nb=Array.prototype.find;function lb(n){return function(){return nb.call(this.children,n)}}function ab(){return this.firstElementChild}function ib(n){return this.select(n==null?ab:lb(typeof n=="function"?n:Mp(n)))}var ob=Array.prototype.filter;function rb(){return Array.from(this.children)}function sb(n){return function(){return ob.call(this.children,n)}}function ub(n){return this.selectAll(n==null?rb:sb(typeof n=="function"?n:Mp(n)))}function cb(n){typeof n!="function"&&(n=Np(n));for(var a=this._groups,o=a.length,r=new Array(o),u=0;u<o;++u)for(var f=a[u],d=f.length,m=r[u]=[],g,h=0;h<d;++h)(g=f[h])&&n.call(g,g.__data__,h,f)&&m.push(g);return new Ve(r,this._parents)}function Ap(n){return new Array(n.length)}function fb(){return new Ve(this._enter||this._groups.map(Ap),this._parents)}function hs(n,a){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=a}hs.prototype={constructor:hs,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,a){return this._parent.insertBefore(n,a)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function db(n){return function(){return n}}function hb(n,a,o,r,u,f){for(var d=0,m,g=a.length,h=f.length;d<h;++d)(m=a[d])?(m.__data__=f[d],r[d]=m):o[d]=new hs(n,f[d]);for(;d<g;++d)(m=a[d])&&(u[d]=m)}function mb(n,a,o,r,u,f,d){var m,g,h=new Map,v=a.length,x=f.length,p=new Array(v),b;for(m=0;m<v;++m)(g=a[m])&&(p[m]=b=d.call(g,g.__data__,m,a)+"",h.has(b)?u[m]=g:h.set(b,g));for(m=0;m<x;++m)b=d.call(n,f[m],m,f)+"",(g=h.get(b))?(r[m]=g,g.__data__=f[m],h.delete(b)):o[m]=new hs(n,f[m]);for(m=0;m<v;++m)(g=a[m])&&h.get(p[m])===g&&(u[m]=g)}function gb(n){return n.__data__}function pb(n,a){if(!arguments.length)return Array.from(this,gb);var o=a?mb:hb,r=this._parents,u=this._groups;typeof n!="function"&&(n=db(n));for(var f=u.length,d=new Array(f),m=new Array(f),g=new Array(f),h=0;h<f;++h){var v=r[h],x=u[h],p=x.length,b=yb(n.call(v,v&&v.__data__,h,r)),M=b.length,_=m[h]=new Array(M),z=d[h]=new Array(M),A=g[h]=new Array(p);o(v,x,_,z,A,b,a);for(var L=0,S=0,T,$;L<M;++L)if(T=_[L]){for(L>=S&&(S=L+1);!($=z[S])&&++S<M;);T._next=$||null}}return d=new Ve(d,r),d._enter=m,d._exit=g,d}function yb(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function vb(){return new Ve(this._exit||this._groups.map(Ap),this._parents)}function xb(n,a,o){var r=this.enter(),u=this,f=this.exit();return typeof n=="function"?(r=n(r),r&&(r=r.selection())):r=r.append(n+""),a!=null&&(u=a(u),u&&(u=u.selection())),o==null?f.remove():o(f),r&&u?r.merge(u).order():u}function bb(n){for(var a=n.selection?n.selection():n,o=this._groups,r=a._groups,u=o.length,f=r.length,d=Math.min(u,f),m=new Array(u),g=0;g<d;++g)for(var h=o[g],v=r[g],x=h.length,p=m[g]=new Array(x),b,M=0;M<x;++M)(b=h[M]||v[M])&&(p[M]=b);for(;g<u;++g)m[g]=o[g];return new Ve(m,this._parents)}function Sb(){for(var n=this._groups,a=-1,o=n.length;++a<o;)for(var r=n[a],u=r.length-1,f=r[u],d;--u>=0;)(d=r[u])&&(f&&d.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(d,f),f=d);return this}function Eb(n){n||(n=wb);function a(x,p){return x&&p?n(x.__data__,p.__data__):!x-!p}for(var o=this._groups,r=o.length,u=new Array(r),f=0;f<r;++f){for(var d=o[f],m=d.length,g=u[f]=new Array(m),h,v=0;v<m;++v)(h=d[v])&&(g[v]=h);g.sort(a)}return new Ve(u,this._parents).order()}function wb(n,a){return n<a?-1:n>a?1:n>=a?0:NaN}function _b(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function Cb(){return Array.from(this)}function Nb(){for(var n=this._groups,a=0,o=n.length;a<o;++a)for(var r=n[a],u=0,f=r.length;u<f;++u){var d=r[u];if(d)return d}return null}function Mb(){let n=0;for(const a of this)++n;return n}function Ab(){return!this.node()}function Tb(n){for(var a=this._groups,o=0,r=a.length;o<r;++o)for(var u=a[o],f=0,d=u.length,m;f<d;++f)(m=u[f])&&n.call(m,m.__data__,f,u);return this}function zb(n){return function(){this.removeAttribute(n)}}function Db(n){return function(){this.removeAttributeNS(n.space,n.local)}}function Ob(n,a){return function(){this.setAttribute(n,a)}}function Rb(n,a){return function(){this.setAttributeNS(n.space,n.local,a)}}function Hb(n,a){return function(){var o=a.apply(this,arguments);o==null?this.removeAttribute(n):this.setAttribute(n,o)}}function jb(n,a){return function(){var o=a.apply(this,arguments);o==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,o)}}function Lb(n,a){var o=Ns(n);if(arguments.length<2){var r=this.node();return o.local?r.getAttributeNS(o.space,o.local):r.getAttribute(o)}return this.each((a==null?o.local?Db:zb:typeof a=="function"?o.local?jb:Hb:o.local?Rb:Ob)(o,a))}function Tp(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Bb(n){return function(){this.style.removeProperty(n)}}function Ub(n,a,o){return function(){this.style.setProperty(n,a,o)}}function Vb(n,a,o){return function(){var r=a.apply(this,arguments);r==null?this.style.removeProperty(n):this.style.setProperty(n,r,o)}}function $b(n,a,o){return arguments.length>1?this.each((a==null?Bb:typeof a=="function"?Vb:Ub)(n,a,o??"")):ti(this.node(),n)}function ti(n,a){return n.style.getPropertyValue(a)||Tp(n).getComputedStyle(n,null).getPropertyValue(a)}function qb(n){return function(){delete this[n]}}function Yb(n,a){return function(){this[n]=a}}function Xb(n,a){return function(){var o=a.apply(this,arguments);o==null?delete this[n]:this[n]=o}}function kb(n,a){return arguments.length>1?this.each((a==null?qb:typeof a=="function"?Xb:Yb)(n,a)):this.node()[n]}function zp(n){return n.trim().split(/^|\s+/)}function Xf(n){return n.classList||new Dp(n)}function Dp(n){this._node=n,this._names=zp(n.getAttribute("class")||"")}Dp.prototype={add:function(n){var a=this._names.indexOf(n);a<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var a=this._names.indexOf(n);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Op(n,a){for(var o=Xf(n),r=-1,u=a.length;++r<u;)o.add(a[r])}function Rp(n,a){for(var o=Xf(n),r=-1,u=a.length;++r<u;)o.remove(a[r])}function Gb(n){return function(){Op(this,n)}}function Zb(n){return function(){Rp(this,n)}}function Qb(n,a){return function(){(a.apply(this,arguments)?Op:Rp)(this,n)}}function Kb(n,a){var o=zp(n+"");if(arguments.length<2){for(var r=Xf(this.node()),u=-1,f=o.length;++u<f;)if(!r.contains(o[u]))return!1;return!0}return this.each((typeof a=="function"?Qb:a?Gb:Zb)(o,a))}function Jb(){this.textContent=""}function Fb(n){return function(){this.textContent=n}}function Ib(n){return function(){var a=n.apply(this,arguments);this.textContent=a??""}}function Wb(n){return arguments.length?this.each(n==null?Jb:(typeof n=="function"?Ib:Fb)(n)):this.node().textContent}function Pb(){this.innerHTML=""}function tS(n){return function(){this.innerHTML=n}}function eS(n){return function(){var a=n.apply(this,arguments);this.innerHTML=a??""}}function nS(n){return arguments.length?this.each(n==null?Pb:(typeof n=="function"?eS:tS)(n)):this.node().innerHTML}function lS(){this.nextSibling&&this.parentNode.appendChild(this)}function aS(){return this.each(lS)}function iS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oS(){return this.each(iS)}function rS(n){var a=typeof n=="function"?n:_p(n);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function sS(){return null}function uS(n,a){var o=typeof n=="function"?n:_p(n),r=a==null?sS:typeof a=="function"?a:Yf(a);return this.select(function(){return this.insertBefore(o.apply(this,arguments),r.apply(this,arguments)||null)})}function cS(){var n=this.parentNode;n&&n.removeChild(this)}function fS(){return this.each(cS)}function dS(){var n=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function hS(){var n=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function mS(n){return this.select(n?hS:dS)}function gS(n){return arguments.length?this.property("__data__",n):this.node().__data__}function pS(n){return function(a){n.call(this,a,this.__data__)}}function yS(n){return n.trim().split(/^|\s+/).map(function(a){var o="",r=a.indexOf(".");return r>=0&&(o=a.slice(r+1),a=a.slice(0,r)),{type:a,name:o}})}function vS(n){return function(){var a=this.__on;if(a){for(var o=0,r=-1,u=a.length,f;o<u;++o)f=a[o],(!n.type||f.type===n.type)&&f.name===n.name?this.removeEventListener(f.type,f.listener,f.options):a[++r]=f;++r?a.length=r:delete this.__on}}}function xS(n,a,o){return function(){var r=this.__on,u,f=pS(a);if(r){for(var d=0,m=r.length;d<m;++d)if((u=r[d]).type===n.type&&u.name===n.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=f,u.options=o),u.value=a;return}}this.addEventListener(n.type,f,o),u={type:n.type,name:n.name,value:a,listener:f,options:o},r?r.push(u):this.__on=[u]}}function bS(n,a,o){var r=yS(n+""),u,f=r.length,d;if(arguments.length<2){var m=this.node().__on;if(m){for(var g=0,h=m.length,v;g<h;++g)for(u=0,v=m[g];u<f;++u)if((d=r[u]).type===v.type&&d.name===v.name)return v.value}return}for(m=a?xS:vS,u=0;u<f;++u)this.each(m(r[u],a,o));return this}function Hp(n,a,o){var r=Tp(n),u=r.CustomEvent;typeof u=="function"?u=new u(a,o):(u=r.document.createEvent("Event"),o?(u.initEvent(a,o.bubbles,o.cancelable),u.detail=o.detail):u.initEvent(a,!1,!1)),n.dispatchEvent(u)}function SS(n,a){return function(){return Hp(this,n,a)}}function ES(n,a){return function(){return Hp(this,n,a.apply(this,arguments))}}function wS(n,a){return this.each((typeof a=="function"?ES:SS)(n,a))}function*_S(){for(var n=this._groups,a=0,o=n.length;a<o;++a)for(var r=n[a],u=0,f=r.length,d;u<f;++u)(d=r[u])&&(yield d)}var jp=[null];function Ve(n,a){this._groups=n,this._parents=a}function So(){return new Ve([[document.documentElement]],jp)}function CS(){return this}Ve.prototype=So.prototype={constructor:Ve,select:Ix,selectAll:eb,selectChild:ib,selectChildren:ub,filter:cb,data:pb,enter:fb,exit:vb,join:xb,merge:bb,selection:CS,order:Sb,sort:Eb,call:_b,nodes:Cb,node:Nb,size:Mb,empty:Ab,each:Tb,attr:Lb,style:$b,property:kb,classed:Kb,text:Wb,html:nS,raise:aS,lower:oS,append:rS,insert:uS,remove:fS,clone:mS,datum:gS,on:bS,dispatch:wS,[Symbol.iterator]:_S};function Ue(n){return typeof n=="string"?new Ve([[document.querySelector(n)]],[document.documentElement]):new Ve([[n]],jp)}function NS(n){let a;for(;a=n.sourceEvent;)n=a;return n}function tn(n,a){if(n=NS(n),a===void 0&&(a=n.currentTarget),a){var o=a.ownerSVGElement||a;if(o.createSVGPoint){var r=o.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(a.getScreenCTM().inverse()),[r.x,r.y]}if(a.getBoundingClientRect){var u=a.getBoundingClientRect();return[n.clientX-u.left-a.clientLeft,n.clientY-u.top-a.clientTop]}}return[n.pageX,n.pageY]}const MS={passive:!1},uo={capture:!0,passive:!1};function uf(n){n.stopImmediatePropagation()}function Wa(n){n.preventDefault(),n.stopImmediatePropagation()}function Lp(n){var a=n.document.documentElement,o=Ue(n).on("dragstart.drag",Wa,uo);"onselectstart"in a?o.on("selectstart.drag",Wa,uo):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function Bp(n,a){var o=n.document.documentElement,r=Ue(n).on("dragstart.drag",null);a&&(r.on("click.drag",Wa,uo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in o?r.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}const Ir=n=>()=>n;function Mf(n,{sourceEvent:a,subject:o,target:r,identifier:u,active:f,x:d,y:m,dx:g,dy:h,dispatch:v}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:m,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:v}})}Mf.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function AS(n){return!n.ctrlKey&&!n.button}function TS(){return this.parentNode}function zS(n,a){return a??{x:n.x,y:n.y}}function DS(){return navigator.maxTouchPoints||"ontouchstart"in this}function Up(){var n=AS,a=TS,o=zS,r=DS,u={},f=Cs("start","drag","end"),d=0,m,g,h,v,x=0;function p(T){T.on("mousedown.drag",b).filter(r).on("touchstart.drag",z).on("touchmove.drag",A,MS).on("touchend.drag touchcancel.drag",L).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(T,$){if(!(v||!n.call(this,T,$))){var V=S(this,a.call(this,T,$),T,$,"mouse");V&&(Ue(T.view).on("mousemove.drag",M,uo).on("mouseup.drag",_,uo),Lp(T.view),uf(T),h=!1,m=T.clientX,g=T.clientY,V("start",T))}}function M(T){if(Wa(T),!h){var $=T.clientX-m,V=T.clientY-g;h=$*$+V*V>x}u.mouse("drag",T)}function _(T){Ue(T.view).on("mousemove.drag mouseup.drag",null),Bp(T.view,h),Wa(T),u.mouse("end",T)}function z(T,$){if(n.call(this,T,$)){var V=T.changedTouches,q=a.call(this,T,$),J=V.length,I,ut;for(I=0;I<J;++I)(ut=S(this,q,T,$,V[I].identifier,V[I]))&&(uf(T),ut("start",T,V[I]))}}function A(T){var $=T.changedTouches,V=$.length,q,J;for(q=0;q<V;++q)(J=u[$[q].identifier])&&(Wa(T),J("drag",T,$[q]))}function L(T){var $=T.changedTouches,V=$.length,q,J;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),q=0;q<V;++q)(J=u[$[q].identifier])&&(uf(T),J("end",T,$[q]))}function S(T,$,V,q,J,I){var ut=f.copy(),tt=tn(I||V,$),et,P,D;if((D=o.call(T,new Mf("beforestart",{sourceEvent:V,target:p,identifier:J,active:d,x:tt[0],y:tt[1],dx:0,dy:0,dispatch:ut}),q))!=null)return et=D.x-tt[0]||0,P=D.y-tt[1]||0,function U(N,H,B){var X=tt,nt;switch(N){case"start":u[J]=U,nt=d++;break;case"end":delete u[J],--d;case"drag":tt=tn(B||H,$),nt=d;break}ut.call(N,T,new Mf(N,{sourceEvent:H,subject:D,target:p,identifier:J,active:nt,x:tt[0]+et,y:tt[1]+P,dx:tt[0]-X[0],dy:tt[1]-X[1],dispatch:ut}),q)}}return p.filter=function(T){return arguments.length?(n=typeof T=="function"?T:Ir(!!T),p):n},p.container=function(T){return arguments.length?(a=typeof T=="function"?T:Ir(T),p):a},p.subject=function(T){return arguments.length?(o=typeof T=="function"?T:Ir(T),p):o},p.touchable=function(T){return arguments.length?(r=typeof T=="function"?T:Ir(!!T),p):r},p.on=function(){var T=f.on.apply(f,arguments);return T===f?p:T},p.clickDistance=function(T){return arguments.length?(x=(T=+T)*T,p):Math.sqrt(x)},p}function kf(n,a,o){n.prototype=a.prototype=o,o.constructor=n}function Vp(n,a){var o=Object.create(n.prototype);for(var r in a)o[r]=a[r];return o}function Eo(){}var co=.7,ms=1/co,Pa="\\s*([+-]?\\d+)\\s*",fo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",OS=/^#([0-9a-f]{3,8})$/,RS=new RegExp(`^rgb\\(${Pa},${Pa},${Pa}\\)$`),HS=new RegExp(`^rgb\\(${hn},${hn},${hn}\\)$`),jS=new RegExp(`^rgba\\(${Pa},${Pa},${Pa},${fo}\\)$`),LS=new RegExp(`^rgba\\(${hn},${hn},${hn},${fo}\\)$`),BS=new RegExp(`^hsl\\(${fo},${hn},${hn}\\)$`),US=new RegExp(`^hsla\\(${fo},${hn},${hn},${fo}\\)$`),e0={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};kf(Eo,Pl,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:n0,formatHex:n0,formatHex8:VS,formatHsl:$S,formatRgb:l0,toString:l0});function n0(){return this.rgb().formatHex()}function VS(){return this.rgb().formatHex8()}function $S(){return $p(this).formatHsl()}function l0(){return this.rgb().formatRgb()}function Pl(n){var a,o;return n=(n+"").trim().toLowerCase(),(a=OS.exec(n))?(o=a[1].length,a=parseInt(a[1],16),o===6?a0(a):o===3?new Me(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):o===8?Wr(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):o===4?Wr(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=RS.exec(n))?new Me(a[1],a[2],a[3],1):(a=HS.exec(n))?new Me(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=jS.exec(n))?Wr(a[1],a[2],a[3],a[4]):(a=LS.exec(n))?Wr(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=BS.exec(n))?r0(a[1],a[2]/100,a[3]/100,1):(a=US.exec(n))?r0(a[1],a[2]/100,a[3]/100,a[4]):e0.hasOwnProperty(n)?a0(e0[n]):n==="transparent"?new Me(NaN,NaN,NaN,0):null}function a0(n){return new Me(n>>16&255,n>>8&255,n&255,1)}function Wr(n,a,o,r){return r<=0&&(n=a=o=NaN),new Me(n,a,o,r)}function qS(n){return n instanceof Eo||(n=Pl(n)),n?(n=n.rgb(),new Me(n.r,n.g,n.b,n.opacity)):new Me}function Af(n,a,o,r){return arguments.length===1?qS(n):new Me(n,a,o,r??1)}function Me(n,a,o,r){this.r=+n,this.g=+a,this.b=+o,this.opacity=+r}kf(Me,Af,Vp(Eo,{brighter(n){return n=n==null?ms:Math.pow(ms,n),new Me(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?co:Math.pow(co,n),new Me(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Me(Fl(this.r),Fl(this.g),Fl(this.b),gs(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:i0,formatHex:i0,formatHex8:YS,formatRgb:o0,toString:o0}));function i0(){return`#${Jl(this.r)}${Jl(this.g)}${Jl(this.b)}`}function YS(){return`#${Jl(this.r)}${Jl(this.g)}${Jl(this.b)}${Jl((isNaN(this.opacity)?1:this.opacity)*255)}`}function o0(){const n=gs(this.opacity);return`${n===1?"rgb(":"rgba("}${Fl(this.r)}, ${Fl(this.g)}, ${Fl(this.b)}${n===1?")":`, ${n})`}`}function gs(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Fl(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Jl(n){return n=Fl(n),(n<16?"0":"")+n.toString(16)}function r0(n,a,o,r){return r<=0?n=a=o=NaN:o<=0||o>=1?n=a=NaN:a<=0&&(n=NaN),new en(n,a,o,r)}function $p(n){if(n instanceof en)return new en(n.h,n.s,n.l,n.opacity);if(n instanceof Eo||(n=Pl(n)),!n)return new en;if(n instanceof en)return n;n=n.rgb();var a=n.r/255,o=n.g/255,r=n.b/255,u=Math.min(a,o,r),f=Math.max(a,o,r),d=NaN,m=f-u,g=(f+u)/2;return m?(a===f?d=(o-r)/m+(o<r)*6:o===f?d=(r-a)/m+2:d=(a-o)/m+4,m/=g<.5?f+u:2-f-u,d*=60):m=g>0&&g<1?0:d,new en(d,m,g,n.opacity)}function XS(n,a,o,r){return arguments.length===1?$p(n):new en(n,a,o,r??1)}function en(n,a,o,r){this.h=+n,this.s=+a,this.l=+o,this.opacity=+r}kf(en,XS,Vp(Eo,{brighter(n){return n=n==null?ms:Math.pow(ms,n),new en(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?co:Math.pow(co,n),new en(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,a=isNaN(n)||isNaN(this.s)?0:this.s,o=this.l,r=o+(o<.5?o:1-o)*a,u=2*o-r;return new Me(cf(n>=240?n-240:n+120,u,r),cf(n,u,r),cf(n<120?n+240:n-120,u,r),this.opacity)},clamp(){return new en(s0(this.h),Pr(this.s),Pr(this.l),gs(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(){const n=gs(this.opacity);return`${n===1?"hsl(":"hsla("}${s0(this.h)}, ${Pr(this.s)*100}%, ${Pr(this.l)*100}%${n===1?")":`, ${n})`}`}}));function s0(n){return n=(n||0)%360,n<0?n+360:n}function Pr(n){return Math.max(0,Math.min(1,n||0))}function cf(n,a,o){return(n<60?a+(o-a)*n/60:n<180?o:n<240?a+(o-a)*(240-n)/60:a)*255}const Gf=n=>()=>n;function kS(n,a){return function(o){return n+o*a}}function GS(n,a,o){return n=Math.pow(n,o),a=Math.pow(a,o)-n,o=1/o,function(r){return Math.pow(n+r*a,o)}}function ZS(n){return(n=+n)==1?qp:function(a,o){return o-a?GS(a,o,n):Gf(isNaN(a)?o:a)}}function qp(n,a){var o=a-n;return o?kS(n,o):Gf(isNaN(n)?a:n)}const ps=(function n(a){var o=ZS(a);function r(u,f){var d=o((u=Af(u)).r,(f=Af(f)).r),m=o(u.g,f.g),g=o(u.b,f.b),h=qp(u.opacity,f.opacity);return function(v){return u.r=d(v),u.g=m(v),u.b=g(v),u.opacity=h(v),u+""}}return r.gamma=n,r})(1);function QS(n,a){a||(a=[]);var o=n?Math.min(a.length,n.length):0,r=a.slice(),u;return function(f){for(u=0;u<o;++u)r[u]=n[u]*(1-f)+a[u]*f;return r}}function KS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function JS(n,a){var o=a?a.length:0,r=n?Math.min(o,n.length):0,u=new Array(r),f=new Array(o),d;for(d=0;d<r;++d)u[d]=ro(n[d],a[d]);for(;d<o;++d)f[d]=a[d];return function(m){for(d=0;d<r;++d)f[d]=u[d](m);return f}}function FS(n,a){var o=new Date;return n=+n,a=+a,function(r){return o.setTime(n*(1-r)+a*r),o}}function dn(n,a){return n=+n,a=+a,function(o){return n*(1-o)+a*o}}function IS(n,a){var o={},r={},u;(n===null||typeof n!="object")&&(n={}),(a===null||typeof a!="object")&&(a={});for(u in a)u in n?o[u]=ro(n[u],a[u]):r[u]=a[u];return function(f){for(u in o)r[u]=o[u](f);return r}}var Tf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ff=new RegExp(Tf.source,"g");function WS(n){return function(){return n}}function PS(n){return function(a){return n(a)+""}}function Yp(n,a){var o=Tf.lastIndex=ff.lastIndex=0,r,u,f,d=-1,m=[],g=[];for(n=n+"",a=a+"";(r=Tf.exec(n))&&(u=ff.exec(a));)(f=u.index)>o&&(f=a.slice(o,f),m[d]?m[d]+=f:m[++d]=f),(r=r[0])===(u=u[0])?m[d]?m[d]+=u:m[++d]=u:(m[++d]=null,g.push({i:d,x:dn(r,u)})),o=ff.lastIndex;return o<a.length&&(f=a.slice(o),m[d]?m[d]+=f:m[++d]=f),m.length<2?g[0]?PS(g[0].x):WS(a):(a=g.length,function(h){for(var v=0,x;v<a;++v)m[(x=g[v]).i]=x.x(h);return m.join("")})}function ro(n,a){var o=typeof a,r;return a==null||o==="boolean"?Gf(a):(o==="number"?dn:o==="string"?(r=Pl(a))?(a=r,ps):Yp:a instanceof Pl?ps:a instanceof Date?FS:KS(a)?QS:Array.isArray(a)?JS:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?IS:dn)(n,a)}var u0=180/Math.PI,zf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xp(n,a,o,r,u,f){var d,m,g;return(d=Math.sqrt(n*n+a*a))&&(n/=d,a/=d),(g=n*o+a*r)&&(o-=n*g,r-=a*g),(m=Math.sqrt(o*o+r*r))&&(o/=m,r/=m,g/=m),n*r<a*o&&(n=-n,a=-a,g=-g,d=-d),{translateX:u,translateY:f,rotate:Math.atan2(a,n)*u0,skewX:Math.atan(g)*u0,scaleX:d,scaleY:m}}var ts;function t2(n){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return a.isIdentity?zf:Xp(a.a,a.b,a.c,a.d,a.e,a.f)}function e2(n){return n==null||(ts||(ts=document.createElementNS("http://www.w3.org/2000/svg","g")),ts.setAttribute("transform",n),!(n=ts.transform.baseVal.consolidate()))?zf:(n=n.matrix,Xp(n.a,n.b,n.c,n.d,n.e,n.f))}function kp(n,a,o,r){function u(h){return h.length?h.pop()+" ":""}function f(h,v,x,p,b,M){if(h!==x||v!==p){var _=b.push("translate(",null,a,null,o);M.push({i:_-4,x:dn(h,x)},{i:_-2,x:dn(v,p)})}else(x||p)&&b.push("translate("+x+a+p+o)}function d(h,v,x,p){h!==v?(h-v>180?v+=360:v-h>180&&(h+=360),p.push({i:x.push(u(x)+"rotate(",null,r)-2,x:dn(h,v)})):v&&x.push(u(x)+"rotate("+v+r)}function m(h,v,x,p){h!==v?p.push({i:x.push(u(x)+"skewX(",null,r)-2,x:dn(h,v)}):v&&x.push(u(x)+"skewX("+v+r)}function g(h,v,x,p,b,M){if(h!==x||v!==p){var _=b.push(u(b)+"scale(",null,",",null,")");M.push({i:_-4,x:dn(h,x)},{i:_-2,x:dn(v,p)})}else(x!==1||p!==1)&&b.push(u(b)+"scale("+x+","+p+")")}return function(h,v){var x=[],p=[];return h=n(h),v=n(v),f(h.translateX,h.translateY,v.translateX,v.translateY,x,p),d(h.rotate,v.rotate,x,p),m(h.skewX,v.skewX,x,p),g(h.scaleX,h.scaleY,v.scaleX,v.scaleY,x,p),h=v=null,function(b){for(var M=-1,_=p.length,z;++M<_;)x[(z=p[M]).i]=z.x(b);return x.join("")}}}var n2=kp(t2,"px, ","px)","deg)"),l2=kp(e2,", ",")",")"),a2=1e-12;function c0(n){return((n=Math.exp(n))+1/n)/2}function i2(n){return((n=Math.exp(n))-1/n)/2}function o2(n){return((n=Math.exp(2*n))-1)/(n+1)}const ss=(function n(a,o,r){function u(f,d){var m=f[0],g=f[1],h=f[2],v=d[0],x=d[1],p=d[2],b=v-m,M=x-g,_=b*b+M*M,z,A;if(_<a2)A=Math.log(p/h)/a,z=function(q){return[m+q*b,g+q*M,h*Math.exp(a*q*A)]};else{var L=Math.sqrt(_),S=(p*p-h*h+r*_)/(2*h*o*L),T=(p*p-h*h-r*_)/(2*p*o*L),$=Math.log(Math.sqrt(S*S+1)-S),V=Math.log(Math.sqrt(T*T+1)-T);A=(V-$)/a,z=function(q){var J=q*A,I=c0($),ut=h/(o*L)*(I*o2(a*J+$)-i2($));return[m+ut*b,g+ut*M,h*I/c0(a*J+$)]}}return z.duration=A*1e3*a/Math.SQRT2,z}return u.rho=function(f){var d=Math.max(.001,+f),m=d*d,g=m*m;return n(d,m,g)},u})(Math.SQRT2,2,4);var ei=0,io=0,no=0,Gp=1e3,ys,oo,vs=0,ta=0,Ms=0,ho=typeof performance=="object"&&performance.now?performance:Date,Zp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Zf(){return ta||(Zp(r2),ta=ho.now()+Ms)}function r2(){ta=0}function xs(){this._call=this._time=this._next=null}xs.prototype=Qp.prototype={constructor:xs,restart:function(n,a,o){if(typeof n!="function")throw new TypeError("callback is not a function");o=(o==null?Zf():+o)+(a==null?0:+a),!this._next&&oo!==this&&(oo?oo._next=this:ys=this,oo=this),this._call=n,this._time=o,Df()},stop:function(){this._call&&(this._call=null,this._time=1/0,Df())}};function Qp(n,a,o){var r=new xs;return r.restart(n,a,o),r}function s2(){Zf(),++ei;for(var n=ys,a;n;)(a=ta-n._time)>=0&&n._call.call(void 0,a),n=n._next;--ei}function f0(){ta=(vs=ho.now())+Ms,ei=io=0;try{s2()}finally{ei=0,c2(),ta=0}}function u2(){var n=ho.now(),a=n-vs;a>Gp&&(Ms-=a,vs=n)}function c2(){for(var n,a=ys,o,r=1/0;a;)a._call?(r>a._time&&(r=a._time),n=a,a=a._next):(o=a._next,a._next=null,a=n?n._next=o:ys=o);oo=n,Df(r)}function Df(n){if(!ei){io&&(io=clearTimeout(io));var a=n-ta;a>24?(n<1/0&&(io=setTimeout(f0,n-ho.now()-Ms)),no&&(no=clearInterval(no))):(no||(vs=ho.now(),no=setInterval(u2,Gp)),ei=1,Zp(f0))}}function d0(n,a,o){var r=new xs;return a=a==null?0:+a,r.restart(u=>{r.stop(),n(u+a)},a,o),r}var f2=Cs("start","end","cancel","interrupt"),d2=[],Kp=0,h0=1,Of=2,us=3,m0=4,Rf=5,cs=6;function As(n,a,o,r,u,f){var d=n.__transition;if(!d)n.__transition={};else if(o in d)return;h2(n,o,{name:a,index:r,group:u,on:f2,tween:d2,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:Kp})}function Qf(n,a){var o=an(n,a);if(o.state>Kp)throw new Error("too late; already scheduled");return o}function gn(n,a){var o=an(n,a);if(o.state>us)throw new Error("too late; already running");return o}function an(n,a){var o=n.__transition;if(!o||!(o=o[a]))throw new Error("transition not found");return o}function h2(n,a,o){var r=n.__transition,u;r[a]=o,o.timer=Qp(f,0,o.time);function f(h){o.state=h0,o.timer.restart(d,o.delay,o.time),o.delay<=h&&d(h-o.delay)}function d(h){var v,x,p,b;if(o.state!==h0)return g();for(v in r)if(b=r[v],b.name===o.name){if(b.state===us)return d0(d);b.state===m0?(b.state=cs,b.timer.stop(),b.on.call("interrupt",n,n.__data__,b.index,b.group),delete r[v]):+v<a&&(b.state=cs,b.timer.stop(),b.on.call("cancel",n,n.__data__,b.index,b.group),delete r[v])}if(d0(function(){o.state===us&&(o.state=m0,o.timer.restart(m,o.delay,o.time),m(h))}),o.state=Of,o.on.call("start",n,n.__data__,o.index,o.group),o.state===Of){for(o.state=us,u=new Array(p=o.tween.length),v=0,x=-1;v<p;++v)(b=o.tween[v].value.call(n,n.__data__,o.index,o.group))&&(u[++x]=b);u.length=x+1}}function m(h){for(var v=h<o.duration?o.ease.call(null,h/o.duration):(o.timer.restart(g),o.state=Rf,1),x=-1,p=u.length;++x<p;)u[x].call(n,v);o.state===Rf&&(o.on.call("end",n,n.__data__,o.index,o.group),g())}function g(){o.state=cs,o.timer.stop(),delete r[a];for(var h in r)return;delete n.__transition}}function fs(n,a){var o=n.__transition,r,u,f=!0,d;if(o){a=a==null?null:a+"";for(d in o){if((r=o[d]).name!==a){f=!1;continue}u=r.state>Of&&r.state<Rf,r.state=cs,r.timer.stop(),r.on.call(u?"interrupt":"cancel",n,n.__data__,r.index,r.group),delete o[d]}f&&delete n.__transition}}function m2(n){return this.each(function(){fs(this,n)})}function g2(n,a){var o,r;return function(){var u=gn(this,n),f=u.tween;if(f!==o){r=o=f;for(var d=0,m=r.length;d<m;++d)if(r[d].name===a){r=r.slice(),r.splice(d,1);break}}u.tween=r}}function p2(n,a,o){var r,u;if(typeof o!="function")throw new Error;return function(){var f=gn(this,n),d=f.tween;if(d!==r){u=(r=d).slice();for(var m={name:a,value:o},g=0,h=u.length;g<h;++g)if(u[g].name===a){u[g]=m;break}g===h&&u.push(m)}f.tween=u}}function y2(n,a){var o=this._id;if(n+="",arguments.length<2){for(var r=an(this.node(),o).tween,u=0,f=r.length,d;u<f;++u)if((d=r[u]).name===n)return d.value;return null}return this.each((a==null?g2:p2)(o,n,a))}function Kf(n,a,o){var r=n._id;return n.each(function(){var u=gn(this,r);(u.value||(u.value={}))[a]=o.apply(this,arguments)}),function(u){return an(u,r).value[a]}}function Jp(n,a){var o;return(typeof a=="number"?dn:a instanceof Pl?ps:(o=Pl(a))?(a=o,ps):Yp)(n,a)}function v2(n){return function(){this.removeAttribute(n)}}function x2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function b2(n,a,o){var r,u=o+"",f;return function(){var d=this.getAttribute(n);return d===u?null:d===r?f:f=a(r=d,o)}}function S2(n,a,o){var r,u=o+"",f;return function(){var d=this.getAttributeNS(n.space,n.local);return d===u?null:d===r?f:f=a(r=d,o)}}function E2(n,a,o){var r,u,f;return function(){var d,m=o(this),g;return m==null?void this.removeAttribute(n):(d=this.getAttribute(n),g=m+"",d===g?null:d===r&&g===u?f:(u=g,f=a(r=d,m)))}}function w2(n,a,o){var r,u,f;return function(){var d,m=o(this),g;return m==null?void this.removeAttributeNS(n.space,n.local):(d=this.getAttributeNS(n.space,n.local),g=m+"",d===g?null:d===r&&g===u?f:(u=g,f=a(r=d,m)))}}function _2(n,a){var o=Ns(n),r=o==="transform"?l2:Jp;return this.attrTween(n,typeof a=="function"?(o.local?w2:E2)(o,r,Kf(this,"attr."+n,a)):a==null?(o.local?x2:v2)(o):(o.local?S2:b2)(o,r,a))}function C2(n,a){return function(o){this.setAttribute(n,a.call(this,o))}}function N2(n,a){return function(o){this.setAttributeNS(n.space,n.local,a.call(this,o))}}function M2(n,a){var o,r;function u(){var f=a.apply(this,arguments);return f!==r&&(o=(r=f)&&N2(n,f)),o}return u._value=a,u}function A2(n,a){var o,r;function u(){var f=a.apply(this,arguments);return f!==r&&(o=(r=f)&&C2(n,f)),o}return u._value=a,u}function T2(n,a){var o="attr."+n;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(a==null)return this.tween(o,null);if(typeof a!="function")throw new Error;var r=Ns(n);return this.tween(o,(r.local?M2:A2)(r,a))}function z2(n,a){return function(){Qf(this,n).delay=+a.apply(this,arguments)}}function D2(n,a){return a=+a,function(){Qf(this,n).delay=a}}function O2(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?z2:D2)(a,n)):an(this.node(),a).delay}function R2(n,a){return function(){gn(this,n).duration=+a.apply(this,arguments)}}function H2(n,a){return a=+a,function(){gn(this,n).duration=a}}function j2(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?R2:H2)(a,n)):an(this.node(),a).duration}function L2(n,a){if(typeof a!="function")throw new Error;return function(){gn(this,n).ease=a}}function B2(n){var a=this._id;return arguments.length?this.each(L2(a,n)):an(this.node(),a).ease}function U2(n,a){return function(){var o=a.apply(this,arguments);if(typeof o!="function")throw new Error;gn(this,n).ease=o}}function V2(n){if(typeof n!="function")throw new Error;return this.each(U2(this._id,n))}function $2(n){typeof n!="function"&&(n=Np(n));for(var a=this._groups,o=a.length,r=new Array(o),u=0;u<o;++u)for(var f=a[u],d=f.length,m=r[u]=[],g,h=0;h<d;++h)(g=f[h])&&n.call(g,g.__data__,h,f)&&m.push(g);return new Vn(r,this._parents,this._name,this._id)}function q2(n){if(n._id!==this._id)throw new Error;for(var a=this._groups,o=n._groups,r=a.length,u=o.length,f=Math.min(r,u),d=new Array(r),m=0;m<f;++m)for(var g=a[m],h=o[m],v=g.length,x=d[m]=new Array(v),p,b=0;b<v;++b)(p=g[b]||h[b])&&(x[b]=p);for(;m<r;++m)d[m]=a[m];return new Vn(d,this._parents,this._name,this._id)}function Y2(n){return(n+"").trim().split(/^|\s+/).every(function(a){var o=a.indexOf(".");return o>=0&&(a=a.slice(0,o)),!a||a==="start"})}function X2(n,a,o){var r,u,f=Y2(a)?Qf:gn;return function(){var d=f(this,n),m=d.on;m!==r&&(u=(r=m).copy()).on(a,o),d.on=u}}function k2(n,a){var o=this._id;return arguments.length<2?an(this.node(),o).on.on(n):this.each(X2(o,n,a))}function G2(n){return function(){var a=this.parentNode;for(var o in this.__transition)if(+o!==n)return;a&&a.removeChild(this)}}function Z2(){return this.on("end.remove",G2(this._id))}function Q2(n){var a=this._name,o=this._id;typeof n!="function"&&(n=Yf(n));for(var r=this._groups,u=r.length,f=new Array(u),d=0;d<u;++d)for(var m=r[d],g=m.length,h=f[d]=new Array(g),v,x,p=0;p<g;++p)(v=m[p])&&(x=n.call(v,v.__data__,p,m))&&("__data__"in v&&(x.__data__=v.__data__),h[p]=x,As(h[p],a,o,p,h,an(v,o)));return new Vn(f,this._parents,a,o)}function K2(n){var a=this._name,o=this._id;typeof n!="function"&&(n=Cp(n));for(var r=this._groups,u=r.length,f=[],d=[],m=0;m<u;++m)for(var g=r[m],h=g.length,v,x=0;x<h;++x)if(v=g[x]){for(var p=n.call(v,v.__data__,x,g),b,M=an(v,o),_=0,z=p.length;_<z;++_)(b=p[_])&&As(b,a,o,_,p,M);f.push(p),d.push(v)}return new Vn(f,d,a,o)}var J2=So.prototype.constructor;function F2(){return new J2(this._groups,this._parents)}function I2(n,a){var o,r,u;return function(){var f=ti(this,n),d=(this.style.removeProperty(n),ti(this,n));return f===d?null:f===o&&d===r?u:u=a(o=f,r=d)}}function Fp(n){return function(){this.style.removeProperty(n)}}function W2(n,a,o){var r,u=o+"",f;return function(){var d=ti(this,n);return d===u?null:d===r?f:f=a(r=d,o)}}function P2(n,a,o){var r,u,f;return function(){var d=ti(this,n),m=o(this),g=m+"";return m==null&&(g=m=(this.style.removeProperty(n),ti(this,n))),d===g?null:d===r&&g===u?f:(u=g,f=a(r=d,m))}}function tE(n,a){var o,r,u,f="style."+a,d="end."+f,m;return function(){var g=gn(this,n),h=g.on,v=g.value[f]==null?m||(m=Fp(a)):void 0;(h!==o||u!==v)&&(r=(o=h).copy()).on(d,u=v),g.on=r}}function eE(n,a,o){var r=(n+="")=="transform"?n2:Jp;return a==null?this.styleTween(n,I2(n,r)).on("end.style."+n,Fp(n)):typeof a=="function"?this.styleTween(n,P2(n,r,Kf(this,"style."+n,a))).each(tE(this._id,n)):this.styleTween(n,W2(n,r,a),o).on("end.style."+n,null)}function nE(n,a,o){return function(r){this.style.setProperty(n,a.call(this,r),o)}}function lE(n,a,o){var r,u;function f(){var d=a.apply(this,arguments);return d!==u&&(r=(u=d)&&nE(n,d,o)),r}return f._value=a,f}function aE(n,a,o){var r="style."+(n+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(a==null)return this.tween(r,null);if(typeof a!="function")throw new Error;return this.tween(r,lE(n,a,o??""))}function iE(n){return function(){this.textContent=n}}function oE(n){return function(){var a=n(this);this.textContent=a??""}}function rE(n){return this.tween("text",typeof n=="function"?oE(Kf(this,"text",n)):iE(n==null?"":n+""))}function sE(n){return function(a){this.textContent=n.call(this,a)}}function uE(n){var a,o;function r(){var u=n.apply(this,arguments);return u!==o&&(a=(o=u)&&sE(u)),a}return r._value=n,r}function cE(n){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,uE(n))}function fE(){for(var n=this._name,a=this._id,o=Ip(),r=this._groups,u=r.length,f=0;f<u;++f)for(var d=r[f],m=d.length,g,h=0;h<m;++h)if(g=d[h]){var v=an(g,a);As(g,n,o,h,d,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new Vn(r,this._parents,n,o)}function dE(){var n,a,o=this,r=o._id,u=o.size();return new Promise(function(f,d){var m={value:d},g={value:function(){--u===0&&f()}};o.each(function(){var h=gn(this,r),v=h.on;v!==n&&(a=(n=v).copy(),a._.cancel.push(m),a._.interrupt.push(m),a._.end.push(g)),h.on=a}),u===0&&f()})}var hE=0;function Vn(n,a,o,r){this._groups=n,this._parents=a,this._name=o,this._id=r}function Ip(){return++hE}var Bn=So.prototype;Vn.prototype={constructor:Vn,select:Q2,selectAll:K2,selectChild:Bn.selectChild,selectChildren:Bn.selectChildren,filter:$2,merge:q2,selection:F2,transition:fE,call:Bn.call,nodes:Bn.nodes,node:Bn.node,size:Bn.size,empty:Bn.empty,each:Bn.each,on:k2,attr:_2,attrTween:T2,style:eE,styleTween:aE,text:rE,textTween:cE,remove:Z2,tween:y2,delay:O2,duration:j2,ease:B2,easeVarying:V2,end:dE,[Symbol.iterator]:Bn[Symbol.iterator]};function mE(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var gE={time:null,delay:0,duration:250,ease:mE};function pE(n,a){for(var o;!(o=n.__transition)||!(o=o[a]);)if(!(n=n.parentNode))throw new Error(`transition ${a} not found`);return o}function yE(n){var a,o;n instanceof Vn?(a=n._id,n=n._name):(a=Ip(),(o=gE).time=Zf(),n=n==null?null:n+"");for(var r=this._groups,u=r.length,f=0;f<u;++f)for(var d=r[f],m=d.length,g,h=0;h<m;++h)(g=d[h])&&As(g,n,a,h,d,o||pE(g,a));return new Vn(r,this._parents,n,a)}So.prototype.interrupt=m2;So.prototype.transition=yE;const es=n=>()=>n;function vE(n,{sourceEvent:a,target:o,transform:r,dispatch:u}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:u}})}function Un(n,a,o){this.k=n,this.x=a,this.y=o}Un.prototype={constructor:Un,scale:function(n){return n===1?this:new Un(this.k*n,this.x,this.y)},translate:function(n,a){return n===0&a===0?this:new Un(this.k,this.x+this.k*n,this.y+this.k*a)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ts=new Un(1,0,0);Wp.prototype=Un.prototype;function Wp(n){for(;!n.__zoom;)if(!(n=n.parentNode))return Ts;return n.__zoom}function df(n){n.stopImmediatePropagation()}function lo(n){n.preventDefault(),n.stopImmediatePropagation()}function xE(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function bE(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function g0(){return this.__zoom||Ts}function SE(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function EE(){return navigator.maxTouchPoints||"ontouchstart"in this}function wE(n,a,o){var r=n.invertX(a[0][0])-o[0][0],u=n.invertX(a[1][0])-o[1][0],f=n.invertY(a[0][1])-o[0][1],d=n.invertY(a[1][1])-o[1][1];return n.translate(u>r?(r+u)/2:Math.min(0,r)||Math.max(0,u),d>f?(f+d)/2:Math.min(0,f)||Math.max(0,d))}function Pp(){var n=xE,a=bE,o=wE,r=SE,u=EE,f=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],m=250,g=ss,h=Cs("start","zoom","end"),v,x,p,b=500,M=150,_=0,z=10;function A(D){D.property("__zoom",g0).on("wheel.zoom",J,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",ut).filter(u).on("touchstart.zoom",tt).on("touchmove.zoom",et).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(D,U,N,H){var B=D.selection?D.selection():D;B.property("__zoom",g0),D!==B?$(D,U,N,H):B.interrupt().each(function(){V(this,arguments).event(H).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},A.scaleBy=function(D,U,N,H){A.scaleTo(D,function(){var B=this.__zoom.k,X=typeof U=="function"?U.apply(this,arguments):U;return B*X},N,H)},A.scaleTo=function(D,U,N,H){A.transform(D,function(){var B=a.apply(this,arguments),X=this.__zoom,nt=N==null?T(B):typeof N=="function"?N.apply(this,arguments):N,w=X.invert(nt),R=typeof U=="function"?U.apply(this,arguments):U;return o(S(L(X,R),nt,w),B,d)},N,H)},A.translateBy=function(D,U,N,H){A.transform(D,function(){return o(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof N=="function"?N.apply(this,arguments):N),a.apply(this,arguments),d)},null,H)},A.translateTo=function(D,U,N,H,B){A.transform(D,function(){var X=a.apply(this,arguments),nt=this.__zoom,w=H==null?T(X):typeof H=="function"?H.apply(this,arguments):H;return o(Ts.translate(w[0],w[1]).scale(nt.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof N=="function"?-N.apply(this,arguments):-N),X,d)},H,B)};function L(D,U){return U=Math.max(f[0],Math.min(f[1],U)),U===D.k?D:new Un(U,D.x,D.y)}function S(D,U,N){var H=U[0]-N[0]*D.k,B=U[1]-N[1]*D.k;return H===D.x&&B===D.y?D:new Un(D.k,H,B)}function T(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function $(D,U,N,H){D.on("start.zoom",function(){V(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(H).end()}).tween("zoom",function(){var B=this,X=arguments,nt=V(B,X).event(H),w=a.apply(B,X),R=N==null?T(w):typeof N=="function"?N.apply(B,X):N,K=Math.max(w[1][0]-w[0][0],w[1][1]-w[0][1]),F=B.__zoom,at=typeof U=="function"?U.apply(B,X):U,ct=g(F.invert(R).concat(K/F.k),at.invert(R).concat(K/at.k));return function(st){if(st===1)st=at;else{var rt=ct(st),ft=K/rt[2];st=new Un(ft,R[0]-rt[0]*ft,R[1]-rt[1]*ft)}nt.zoom(null,st)}})}function V(D,U,N){return!N&&D.__zooming||new q(D,U)}function q(D,U){this.that=D,this.args=U,this.active=0,this.sourceEvent=null,this.extent=a.apply(D,U),this.taps=0}q.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,U){return this.mouse&&D!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var U=Ue(this.that).datum();h.call(D,this.that,new vE(D,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:h}),U)}};function J(D,...U){if(!n.apply(this,arguments))return;var N=V(this,U).event(D),H=this.__zoom,B=Math.max(f[0],Math.min(f[1],H.k*Math.pow(2,r.apply(this,arguments)))),X=tn(D);if(N.wheel)(N.mouse[0][0]!==X[0]||N.mouse[0][1]!==X[1])&&(N.mouse[1]=H.invert(N.mouse[0]=X)),clearTimeout(N.wheel);else{if(H.k===B)return;N.mouse=[X,H.invert(X)],fs(this),N.start()}lo(D),N.wheel=setTimeout(nt,M),N.zoom("mouse",o(S(L(H,B),N.mouse[0],N.mouse[1]),N.extent,d));function nt(){N.wheel=null,N.end()}}function I(D,...U){if(p||!n.apply(this,arguments))return;var N=D.currentTarget,H=V(this,U,!0).event(D),B=Ue(D.view).on("mousemove.zoom",R,!0).on("mouseup.zoom",K,!0),X=tn(D,N),nt=D.clientX,w=D.clientY;Lp(D.view),df(D),H.mouse=[X,this.__zoom.invert(X)],fs(this),H.start();function R(F){if(lo(F),!H.moved){var at=F.clientX-nt,ct=F.clientY-w;H.moved=at*at+ct*ct>_}H.event(F).zoom("mouse",o(S(H.that.__zoom,H.mouse[0]=tn(F,N),H.mouse[1]),H.extent,d))}function K(F){B.on("mousemove.zoom mouseup.zoom",null),Bp(F.view,H.moved),lo(F),H.event(F).end()}}function ut(D,...U){if(n.apply(this,arguments)){var N=this.__zoom,H=tn(D.changedTouches?D.changedTouches[0]:D,this),B=N.invert(H),X=N.k*(D.shiftKey?.5:2),nt=o(S(L(N,X),H,B),a.apply(this,U),d);lo(D),m>0?Ue(this).transition().duration(m).call($,nt,H,D):Ue(this).call(A.transform,nt,H,D)}}function tt(D,...U){if(n.apply(this,arguments)){var N=D.touches,H=N.length,B=V(this,U,D.changedTouches.length===H).event(D),X,nt,w,R;for(df(D),nt=0;nt<H;++nt)w=N[nt],R=tn(w,this),R=[R,this.__zoom.invert(R),w.identifier],B.touch0?!B.touch1&&B.touch0[2]!==R[2]&&(B.touch1=R,B.taps=0):(B.touch0=R,X=!0,B.taps=1+!!v);v&&(v=clearTimeout(v)),X&&(B.taps<2&&(x=R[0],v=setTimeout(function(){v=null},b)),fs(this),B.start())}}function et(D,...U){if(this.__zooming){var N=V(this,U).event(D),H=D.changedTouches,B=H.length,X,nt,w,R;for(lo(D),X=0;X<B;++X)nt=H[X],w=tn(nt,this),N.touch0&&N.touch0[2]===nt.identifier?N.touch0[0]=w:N.touch1&&N.touch1[2]===nt.identifier&&(N.touch1[0]=w);if(nt=N.that.__zoom,N.touch1){var K=N.touch0[0],F=N.touch0[1],at=N.touch1[0],ct=N.touch1[1],st=(st=at[0]-K[0])*st+(st=at[1]-K[1])*st,rt=(rt=ct[0]-F[0])*rt+(rt=ct[1]-F[1])*rt;nt=L(nt,Math.sqrt(st/rt)),w=[(K[0]+at[0])/2,(K[1]+at[1])/2],R=[(F[0]+ct[0])/2,(F[1]+ct[1])/2]}else if(N.touch0)w=N.touch0[0],R=N.touch0[1];else return;N.zoom("touch",o(S(nt,w,R),N.extent,d))}}function P(D,...U){if(this.__zooming){var N=V(this,U).event(D),H=D.changedTouches,B=H.length,X,nt;for(df(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},b),X=0;X<B;++X)nt=H[X],N.touch0&&N.touch0[2]===nt.identifier?delete N.touch0:N.touch1&&N.touch1[2]===nt.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(nt=tn(nt,this),Math.hypot(x[0]-nt[0],x[1]-nt[1])<z)){var w=Ue(this).on("dblclick.zoom");w&&w.apply(this,arguments)}}}return A.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:es(+D),A):r},A.filter=function(D){return arguments.length?(n=typeof D=="function"?D:es(!!D),A):n},A.touchable=function(D){return arguments.length?(u=typeof D=="function"?D:es(!!D),A):u},A.extent=function(D){return arguments.length?(a=typeof D=="function"?D:es([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),A):a},A.scaleExtent=function(D){return arguments.length?(f[0]=+D[0],f[1]=+D[1],A):[f[0],f[1]]},A.translateExtent=function(D){return arguments.length?(d[0][0]=+D[0][0],d[1][0]=+D[1][0],d[0][1]=+D[0][1],d[1][1]=+D[1][1],A):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},A.constrain=function(D){return arguments.length?(o=D,A):o},A.duration=function(D){return arguments.length?(m=+D,A):m},A.interpolate=function(D){return arguments.length?(g=D,A):g},A.on=function(){var D=h.on.apply(h,arguments);return D===h?A:D},A.clickDistance=function(D){return arguments.length?(_=(D=+D)*D,A):Math.sqrt(_)},A.tapDistance=function(D){return arguments.length?(z=+D,A):z},A}const 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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:a,sourceHandle:o,targetHandle:r})=>`Couldn't create edge for ${n} handle id: "${n==="source"?o:r}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/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."},mo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ty=["Enter"," ","Escape"],ey={"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:n,x:a,y:o})=>`Moved selected node ${n}. New position, x: ${a}, y: ${o}`,"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"};var ni;(function(n){n.Strict="strict",n.Loose="loose"})(ni||(ni={}));var Il;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(Il||(Il={}));var go;(function(n){n.Partial="partial",n.Full="full"})(go||(go={}));const ny={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var bl;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(bl||(bl={}));var Wl;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(Wl||(Wl={}));var mt;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(mt||(mt={}));const p0={[mt.Left]:mt.Right,[mt.Right]:mt.Left,[mt.Top]:mt.Bottom,[mt.Bottom]:mt.Top};function ly(n){return n===null?null:n?"valid":"invalid"}const ay=n=>"id"in n&&"source"in n&&"target"in n,_E=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),Jf=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),wo=(n,a=[0,0])=>{const{width:o,height:r}=$n(n),u=n.origin??a,f=o*u[0],d=r*u[1];return{x:n.position.x-f,y:n.position.y-d}},CE=(n,a={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const o=n.reduce((r,u)=>{const f=typeof u=="string";let d=!a.nodeLookup&&!f?u:void 0;a.nodeLookup&&(d=f?a.nodeLookup.get(u):Jf(u)?u:a.nodeLookup.get(u.id));const m=d?bs(d,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return zs(r,m)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ds(o)},_o=(n,a={})=>{let o={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return n.forEach(u=>{(a.filter===void 0||a.filter(u))&&(o=zs(o,bs(u)),r=!0)}),r?Ds(o):{x:0,y:0,width:0,height:0}},Ff=(n,a,[o,r,u]=[0,0,1],f=!1,d=!1)=>{const m={...No(a,[o,r,u]),width:a.width/u,height:a.height/u},g=[];for(const h of n.values()){const{measured:v,selectable:x=!0,hidden:p=!1}=h;if(d&&!x||p)continue;const b=v.width??h.width??h.initialWidth??null,M=v.height??h.height??h.initialHeight??null,_=po(m,ai(h)),z=(b??0)*(M??0),A=f&&_>0;(!h.internals.handleBounds||A||_>=z||h.dragging)&&g.push(h)}return g},NE=(n,a)=>{const o=new Set;return n.forEach(r=>{o.add(r.id)}),a.filter(r=>o.has(r.source)||o.has(r.target))};function ME(n,a){const o=new Map,r=a?.nodes?new Set(a.nodes.map(u=>u.id)):null;return n.forEach(u=>{u.measured.width&&u.measured.height&&(a?.includeHiddenNodes||!u.hidden)&&(!r||r.has(u.id))&&o.set(u.id,u)}),o}async function AE({nodes:n,width:a,height:o,panZoom:r,minZoom:u,maxZoom:f},d){if(n.size===0)return Promise.resolve(!0);const m=ME(n,d),g=_o(m),h=If(g,a,o,d?.minZoom??u,d?.maxZoom??f,d?.padding??.1);return await r.setViewport(h,{duration:d?.duration,ease:d?.ease,interpolate:d?.interpolate}),Promise.resolve(!0)}function iy({nodeId:n,nextPosition:a,nodeLookup:o,nodeOrigin:r=[0,0],nodeExtent:u,onError:f}){const d=o.get(n),m=d.parentId?o.get(d.parentId):void 0,{x:g,y:h}=m?m.internals.positionAbsolute:{x:0,y:0},v=d.origin??r;let x=d.extent||u;if(d.extent==="parent"&&!d.expandParent)if(!m)f?.("005",mn.error005());else{const b=m.measured.width,M=m.measured.height;b&&M&&(x=[[g,h],[g+b,h+M]])}else m&&ii(d.extent)&&(x=[[d.extent[0][0]+g,d.extent[0][1]+h],[d.extent[1][0]+g,d.extent[1][1]+h]]);const p=ii(x)?ea(a,x,d.measured):a;return(d.measured.width===void 0||d.measured.height===void 0)&&f?.("015",mn.error015()),{position:{x:p.x-g+(d.measured.width??0)*v[0],y:p.y-h+(d.measured.height??0)*v[1]},positionAbsolute:p}}async function TE({nodesToRemove:n=[],edgesToRemove:a=[],nodes:o,edges:r,onBeforeDelete:u}){const f=new Set(n.map(p=>p.id)),d=[];for(const p of o){if(p.deletable===!1)continue;const b=f.has(p.id),M=!b&&p.parentId&&d.find(_=>_.id===p.parentId);(b||M)&&d.push(p)}const m=new Set(a.map(p=>p.id)),g=r.filter(p=>p.deletable!==!1),v=NE(d,g);for(const p of g)m.has(p.id)&&!v.find(M=>M.id===p.id)&&v.push(p);if(!u)return{edges:v,nodes:d};const x=await u({nodes:d,edges:v});return typeof x=="boolean"?x?{edges:v,nodes:d}:{edges:[],nodes:[]}:x}const li=(n,a=0,o=1)=>Math.min(Math.max(n,a),o),ea=(n={x:0,y:0},a,o)=>({x:li(n.x,a[0][0],a[1][0]-(o?.width??0)),y:li(n.y,a[0][1],a[1][1]-(o?.height??0))});function oy(n,a,o){const{width:r,height:u}=$n(o),{x:f,y:d}=o.internals.positionAbsolute;return ea(n,[[f,d],[f+r,d+u]],a)}const y0=(n,a,o)=>n<a?li(Math.abs(n-a),1,a)/a:n>o?-li(Math.abs(n-o),1,a)/a:0,ry=(n,a,o=15,r=40)=>{const u=y0(n.x,r,a.width-r)*o,f=y0(n.y,r,a.height-r)*o;return[u,f]},zs=(n,a)=>({x:Math.min(n.x,a.x),y:Math.min(n.y,a.y),x2:Math.max(n.x2,a.x2),y2:Math.max(n.y2,a.y2)}),Hf=({x:n,y:a,width:o,height:r})=>({x:n,y:a,x2:n+o,y2:a+r}),Ds=({x:n,y:a,x2:o,y2:r})=>({x:n,y:a,width:o-n,height:r-a}),ai=(n,a=[0,0])=>{const{x:o,y:r}=Jf(n)?n.internals.positionAbsolute:wo(n,a);return{x:o,y:r,width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}},bs=(n,a=[0,0])=>{const{x:o,y:r}=Jf(n)?n.internals.positionAbsolute:wo(n,a);return{x:o,y:r,x2:o+(n.measured?.width??n.width??n.initialWidth??0),y2:r+(n.measured?.height??n.height??n.initialHeight??0)}},sy=(n,a)=>Ds(zs(Hf(n),Hf(a))),po=(n,a)=>{const o=Math.max(0,Math.min(n.x+n.width,a.x+a.width)-Math.max(n.x,a.x)),r=Math.max(0,Math.min(n.y+n.height,a.y+a.height)-Math.max(n.y,a.y));return Math.ceil(o*r)},v0=n=>nn(n.width)&&nn(n.height)&&nn(n.x)&&nn(n.y),nn=n=>!isNaN(n)&&isFinite(n),zE=(n,a)=>{},Co=(n,a=[1,1])=>({x:a[0]*Math.round(n.x/a[0]),y:a[1]*Math.round(n.y/a[1])}),No=({x:n,y:a},[o,r,u],f=!1,d=[1,1])=>{const m={x:(n-o)/u,y:(a-r)/u};return f?Co(m,d):m},Ss=({x:n,y:a},[o,r,u])=>({x:n*u+o,y:a*u+r});function Qa(n,a){if(typeof n=="number")return Math.floor((a-a/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(o)}if(typeof n=="string"&&n.endsWith("%")){const o=parseFloat(n);if(!Number.isNaN(o))return Math.floor(a*o*.01)}return console.error(`[React Flow] The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function DE(n,a,o){if(typeof n=="string"||typeof n=="number"){const r=Qa(n,o),u=Qa(n,a);return{top:r,right:u,bottom:r,left:u,x:u*2,y:r*2}}if(typeof n=="object"){const r=Qa(n.top??n.y??0,o),u=Qa(n.bottom??n.y??0,o),f=Qa(n.left??n.x??0,a),d=Qa(n.right??n.x??0,a);return{top:r,right:d,bottom:u,left:f,x:f+d,y:r+u}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function OE(n,a,o,r,u,f){const{x:d,y:m}=Ss(n,[a,o,r]),{x:g,y:h}=Ss({x:n.x+n.width,y:n.y+n.height},[a,o,r]),v=u-g,x=f-h;return{left:Math.floor(d),top:Math.floor(m),right:Math.floor(v),bottom:Math.floor(x)}}const If=(n,a,o,r,u,f)=>{const d=DE(f,a,o),m=(a-d.x)/n.width,g=(o-d.y)/n.height,h=Math.min(m,g),v=li(h,r,u),x=n.x+n.width/2,p=n.y+n.height/2,b=a/2-x*v,M=o/2-p*v,_=OE(n,b,M,v,a,o),z={left:Math.min(_.left-d.left,0),top:Math.min(_.top-d.top,0),right:Math.min(_.right-d.right,0),bottom:Math.min(_.bottom-d.bottom,0)};return{x:b-z.left+z.right,y:M-z.top+z.bottom,zoom:v}},yo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ii(n){return n!=null&&n!=="parent"}function $n(n){return{width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}}function uy(n){return(n.measured?.width??n.width??n.initialWidth)!==void 0&&(n.measured?.height??n.height??n.initialHeight)!==void 0}function cy(n,a={width:0,height:0},o,r,u){const f={...n},d=r.get(o);if(d){const m=d.origin||u;f.x+=d.internals.positionAbsolute.x-(a.width??0)*m[0],f.y+=d.internals.positionAbsolute.y-(a.height??0)*m[1]}return f}function x0(n,a){if(n.size!==a.size)return!1;for(const o of n)if(!a.has(o))return!1;return!0}function RE(){let n,a;return{promise:new Promise((r,u)=>{n=r,a=u}),resolve:n,reject:a}}function HE(n){return{...ey,...n||{}}}function so(n,{snapGrid:a=[0,0],snapToGrid:o=!1,transform:r,containerBounds:u}){const{x:f,y:d}=ln(n),m=No({x:f-(u?.left??0),y:d-(u?.top??0)},r),{x:g,y:h}=o?Co(m,a):m;return{xSnapped:g,ySnapped:h,...m}}const Wf=n=>({width:n.offsetWidth,height:n.offsetHeight}),fy=n=>n?.getRootNode?.()||window?.document,jE=["INPUT","SELECT","TEXTAREA"];function dy(n){const a=n.composedPath?.()?.[0]||n.target;return a?.nodeType!==1?!1:jE.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const hy=n=>"clientX"in n,ln=(n,a)=>{const o=hy(n),r=o?n.clientX:n.touches?.[0].clientX,u=o?n.clientY:n.touches?.[0].clientY;return{x:r-(a?.left??0),y:u-(a?.top??0)}},b0=(n,a,o,r,u)=>{const f=a.querySelectorAll(`.${n}`);return!f||!f.length?null:Array.from(f).map(d=>{const m=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:n,nodeId:u,position:d.getAttribute("data-handlepos"),x:(m.left-o.left)/r,y:(m.top-o.top)/r,...Wf(d)}})};function my({sourceX:n,sourceY:a,targetX:o,targetY:r,sourceControlX:u,sourceControlY:f,targetControlX:d,targetControlY:m}){const g=n*.125+u*.375+d*.375+o*.125,h=a*.125+f*.375+m*.375+r*.125,v=Math.abs(g-n),x=Math.abs(h-a);return[g,h,v,x]}function ns(n,a){return n>=0?.5*n:a*25*Math.sqrt(-n)}function S0({pos:n,x1:a,y1:o,x2:r,y2:u,c:f}){switch(n){case mt.Left:return[a-ns(a-r,f),o];case mt.Right:return[a+ns(r-a,f),o];case mt.Top:return[a,o-ns(o-u,f)];case mt.Bottom:return[a,o+ns(u-o,f)]}}function gy({sourceX:n,sourceY:a,sourcePosition:o=mt.Bottom,targetX:r,targetY:u,targetPosition:f=mt.Top,curvature:d=.25}){const[m,g]=S0({pos:o,x1:n,y1:a,x2:r,y2:u,c:d}),[h,v]=S0({pos:f,x1:r,y1:u,x2:n,y2:a,c:d}),[x,p,b,M]=my({sourceX:n,sourceY:a,targetX:r,targetY:u,sourceControlX:m,sourceControlY:g,targetControlX:h,targetControlY:v});return[`M${n},${a} C${m},${g} ${h},${v} ${r},${u}`,x,p,b,M]}function py({sourceX:n,sourceY:a,targetX:o,targetY:r}){const u=Math.abs(o-n)/2,f=o<n?o+u:o-u,d=Math.abs(r-a)/2,m=r<a?r+d:r-d;return[f,m,u,d]}function LE({sourceNode:n,targetNode:a,selected:o=!1,zIndex:r,elevateOnSelect:u=!1}){if(r!==void 0)return r;const f=u&&o?1e3:0,d=Math.max(n.parentId||u&&n.selected?n.internals.z:0,a.parentId||u&&a.selected?a.internals.z:0);return f+d}function BE({sourceNode:n,targetNode:a,width:o,height:r,transform:u}){const f=zs(bs(n),bs(a));f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);const d={x:-u[0]/u[2],y:-u[1]/u[2],width:o/u[2],height:r/u[2]};return po(d,Ds(f))>0}const UE=({source:n,sourceHandle:a,target:o,targetHandle:r})=>`xy-edge__${n}${a||""}-${o}${r||""}`,VE=(n,a)=>a.some(o=>o.source===n.source&&o.target===n.target&&(o.sourceHandle===n.sourceHandle||!o.sourceHandle&&!n.sourceHandle)&&(o.targetHandle===n.targetHandle||!o.targetHandle&&!n.targetHandle)),yy=(n,a)=>{if(!n.source||!n.target)return a;let o;return ay(n)?o={...n}:o={...n,id:UE(n)},VE(o,a)?a:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,a.concat(o))};function vy({sourceX:n,sourceY:a,targetX:o,targetY:r}){const[u,f,d,m]=py({sourceX:n,sourceY:a,targetX:o,targetY:r});return[`M ${n},${a}L ${o},${r}`,u,f,d,m]}const E0={[mt.Left]:{x:-1,y:0},[mt.Right]:{x:1,y:0},[mt.Top]:{x:0,y:-1},[mt.Bottom]:{x:0,y:1}},$E=({source:n,sourcePosition:a=mt.Bottom,target:o})=>a===mt.Left||a===mt.Right?n.x<o.x?{x:1,y:0}:{x:-1,y:0}:n.y<o.y?{x:0,y:1}:{x:0,y:-1},w0=(n,a)=>Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2));function qE({source:n,sourcePosition:a=mt.Bottom,target:o,targetPosition:r=mt.Top,center:u,offset:f,stepPosition:d}){const m=E0[a],g=E0[r],h={x:n.x+m.x*f,y:n.y+m.y*f},v={x:o.x+g.x*f,y:o.y+g.y*f},x=$E({source:h,sourcePosition:a,target:v}),p=x.x!==0?"x":"y",b=x[p];let M=[],_,z;const A={x:0,y:0},L={x:0,y:0},[,,S,T]=py({sourceX:n.x,sourceY:n.y,targetX:o.x,targetY:o.y});if(m[p]*g[p]===-1){p==="x"?(_=u.x??h.x+(v.x-h.x)*d,z=u.y??(h.y+v.y)/2):(_=u.x??(h.x+v.x)/2,z=u.y??h.y+(v.y-h.y)*d);const V=[{x:_,y:h.y},{x:_,y:v.y}],q=[{x:h.x,y:z},{x:v.x,y:z}];m[p]===b?M=p==="x"?V:q:M=p==="x"?q:V}else{const V=[{x:h.x,y:v.y}],q=[{x:v.x,y:h.y}];if(p==="x"?M=m.x===b?q:V:M=m.y===b?V:q,a===r){const et=Math.abs(n[p]-o[p]);if(et<=f){const P=Math.min(f-1,f-et);m[p]===b?A[p]=(h[p]>n[p]?-1:1)*P:L[p]=(v[p]>o[p]?-1:1)*P}}if(a!==r){const et=p==="x"?"y":"x",P=m[p]===g[et],D=h[et]>v[et],U=h[et]<v[et];(m[p]===1&&(!P&&D||P&&U)||m[p]!==1&&(!P&&U||P&&D))&&(M=p==="x"?V:q)}const J={x:h.x+A.x,y:h.y+A.y},I={x:v.x+L.x,y:v.y+L.y},ut=Math.max(Math.abs(J.x-M[0].x),Math.abs(I.x-M[0].x)),tt=Math.max(Math.abs(J.y-M[0].y),Math.abs(I.y-M[0].y));ut>=tt?(_=(J.x+I.x)/2,z=M[0].y):(_=M[0].x,z=(J.y+I.y)/2)}return[[n,{x:h.x+A.x,y:h.y+A.y},...M,{x:v.x+L.x,y:v.y+L.y},o],_,z,S,T]}function YE(n,a,o,r){const u=Math.min(w0(n,a)/2,w0(a,o)/2,r),{x:f,y:d}=a;if(n.x===f&&f===o.x||n.y===d&&d===o.y)return`L${f} ${d}`;if(n.y===d){const h=n.x<o.x?-1:1,v=n.y<o.y?1:-1;return`L ${f+u*h},${d}Q ${f},${d} ${f},${d+u*v}`}const m=n.x<o.x?1:-1,g=n.y<o.y?-1:1;return`L ${f},${d+u*g}Q ${f},${d} ${f+u*m},${d}`}function jf({sourceX:n,sourceY:a,sourcePosition:o=mt.Bottom,targetX:r,targetY:u,targetPosition:f=mt.Top,borderRadius:d=5,centerX:m,centerY:g,offset:h=20,stepPosition:v=.5}){const[x,p,b,M,_]=qE({source:{x:n,y:a},sourcePosition:o,target:{x:r,y:u},targetPosition:f,center:{x:m,y:g},offset:h,stepPosition:v});return[x.reduce((A,L,S)=>{let T="";return S>0&&S<x.length-1?T=YE(x[S-1],L,x[S+1],d):T=`${S===0?"M":"L"}${L.x} ${L.y}`,A+=T,A},""),p,b,M,_]}function _0(n){return n&&!!(n.internals.handleBounds||n.handles?.length)&&!!(n.measured.width||n.width||n.initialWidth)}function XE(n){const{sourceNode:a,targetNode:o}=n;if(!_0(a)||!_0(o))return null;const r=a.internals.handleBounds||C0(a.handles),u=o.internals.handleBounds||C0(o.handles),f=N0(r?.source??[],n.sourceHandle),d=N0(n.connectionMode===ni.Strict?u?.target??[]:(u?.target??[]).concat(u?.source??[]),n.targetHandle);if(!f||!d)return n.onError?.("008",mn.error008(f?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const m=f?.position||mt.Bottom,g=d?.position||mt.Top,h=vo(a,f,m),v=vo(o,d,g);return{sourceX:h.x,sourceY:h.y,targetX:v.x,targetY:v.y,sourcePosition:m,targetPosition:g}}function C0(n){if(!n)return null;const a=[],o=[];for(const r of n)r.width=r.width??1,r.height=r.height??1,r.type==="source"?a.push(r):r.type==="target"&&o.push(r);return{source:a,target:o}}function vo(n,a,o=mt.Left,r=!1){const u=(a?.x??0)+n.internals.positionAbsolute.x,f=(a?.y??0)+n.internals.positionAbsolute.y,{width:d,height:m}=a??$n(n);if(r)return{x:u+d/2,y:f+m/2};switch(a?.position??o){case mt.Top:return{x:u+d/2,y:f};case mt.Right:return{x:u+d,y:f+m/2};case mt.Bottom:return{x:u+d/2,y:f+m};case mt.Left:return{x:u,y:f+m/2}}}function N0(n,a){return n&&(a?n.find(o=>o.id===a):n[0])||null}function Lf(n,a){return n?typeof n=="string"?n:`${a?`${a}__`:""}${Object.keys(n).sort().map(r=>`${r}=${n[r]}`).join("&")}`:""}function kE(n,{id:a,defaultColor:o,defaultMarkerStart:r,defaultMarkerEnd:u}){const f=new Set;return n.reduce((d,m)=>([m.markerStart||r,m.markerEnd||u].forEach(g=>{if(g&&typeof g=="object"){const h=Lf(g,a);f.has(h)||(d.push({id:h,color:g.color||o,...g}),f.add(h))}}),d),[]).sort((d,m)=>d.id.localeCompare(m.id))}const xy=1e3,GE=10,Pf={nodeOrigin:[0,0],nodeExtent:mo,elevateNodesOnSelect:!0,defaults:{}},ZE={...Pf,checkEquality:!0};function td(n,a){const o={...n};for(const r in a)a[r]!==void 0&&(o[r]=a[r]);return o}function QE(n,a,o){const r=td(Pf,o);for(const u of n.values())if(u.parentId)ed(u,n,a,r);else{const f=wo(u,r.nodeOrigin),d=ii(u.extent)?u.extent:r.nodeExtent,m=ea(f,d,$n(u));u.internals.positionAbsolute=m}}function KE(n,a){if(!n.handles)return n.measured?a?.internals.handleBounds:void 0;const o=[],r=[];for(const u of n.handles){const f={id:u.id,width:u.width??1,height:u.height??1,nodeId:n.id,x:u.x,y:u.y,position:u.position,type:u.type};u.type==="source"?o.push(f):u.type==="target"&&r.push(f)}return{source:o,target:r}}function Bf(n,a,o,r){const u=td(ZE,r);let f={i:-1},d=n.length>0;const m=new Map(a),g=u?.elevateNodesOnSelect?xy:0;a.clear(),o.clear();for(const h of n){let v=m.get(h.id);if(u.checkEquality&&h===v?.internals.userNode)a.set(h.id,v);else{const x=wo(h,u.nodeOrigin),p=ii(h.extent)?h.extent:u.nodeExtent,b=ea(x,p,$n(h));v={...u.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:b,handleBounds:KE(h,v),z:by(h,g),userNode:h}},a.set(h.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(d=!1),h.parentId&&ed(v,a,o,r,f)}return d}function JE(n,a){if(!n.parentId)return;const o=a.get(n.parentId);o?o.set(n.id,n):a.set(n.parentId,new Map([[n.id,n]]))}function ed(n,a,o,r,u){const{elevateNodesOnSelect:f,nodeOrigin:d,nodeExtent:m}=td(Pf,r),g=n.parentId,h=a.get(g);if(!h){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}JE(n,o),u&&!h.parentId&&h.internals.rootParentIndex===void 0&&(h.internals.rootParentIndex=++u.i,h.internals.z=h.internals.z+u.i*GE),u&&h.internals.rootParentIndex!==void 0&&(u.i=h.internals.rootParentIndex);const v=f?xy:0,{x,y:p,z:b}=FE(n,h,d,m,v),{positionAbsolute:M}=n.internals,_=x!==M.x||p!==M.y;(_||b!==n.internals.z)&&a.set(n.id,{...n,internals:{...n.internals,positionAbsolute:_?{x,y:p}:M,z:b}})}function by(n,a){return(nn(n.zIndex)?n.zIndex:0)+(n.selected?a:0)}function FE(n,a,o,r,u){const{x:f,y:d}=a.internals.positionAbsolute,m=$n(n),g=wo(n,o),h=ii(n.extent)?ea(g,n.extent,m):g;let v=ea({x:f+h.x,y:d+h.y},r,m);n.extent==="parent"&&(v=oy(v,m,a));const x=by(n,u),p=a.internals.z??0;return{x:v.x,y:v.y,z:p>=x?p+1:x}}function nd(n,a,o,r=[0,0]){const u=[],f=new Map;for(const d of n){const m=a.get(d.parentId);if(!m)continue;const g=f.get(d.parentId)?.expandedRect??ai(m),h=sy(g,d.rect);f.set(d.parentId,{expandedRect:h,parent:m})}return f.size>0&&f.forEach(({expandedRect:d,parent:m},g)=>{const h=m.internals.positionAbsolute,v=$n(m),x=m.origin??r,p=d.x<h.x?Math.round(Math.abs(h.x-d.x)):0,b=d.y<h.y?Math.round(Math.abs(h.y-d.y)):0,M=Math.max(v.width,Math.round(d.width)),_=Math.max(v.height,Math.round(d.height)),z=(M-v.width)*x[0],A=(_-v.height)*x[1];(p>0||b>0||z||A)&&(u.push({id:g,type:"position",position:{x:m.position.x-p+z,y:m.position.y-b+A}}),o.get(g)?.forEach(L=>{n.some(S=>S.id===L.id)||u.push({id:L.id,type:"position",position:{x:L.position.x+p,y:L.position.y+b}})})),(v.width<d.width||v.height<d.height||p||b)&&u.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:M+(p?x[0]*p-z:0),height:_+(b?x[1]*b-A:0)}})}),u}function IE(n,a,o,r,u,f){const d=r?.querySelector(".xyflow__viewport");let m=!1;if(!d)return{changes:[],updatedInternals:m};const g=[],h=window.getComputedStyle(d),{m22:v}=new window.DOMMatrixReadOnly(h.transform),x=[];for(const p of n.values()){const b=a.get(p.id);if(!b)continue;if(b.hidden){a.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),m=!0;continue}const M=Wf(p.nodeElement),_=b.measured.width!==M.width||b.measured.height!==M.height;if(!!(M.width&&M.height&&(_||!b.internals.handleBounds||p.force))){const A=p.nodeElement.getBoundingClientRect(),L=ii(b.extent)?b.extent:f;let{positionAbsolute:S}=b.internals;b.parentId&&b.extent==="parent"?S=oy(S,M,a.get(b.parentId)):L&&(S=ea(S,L,M));const T={...b,measured:M,internals:{...b.internals,positionAbsolute:S,handleBounds:{source:b0("source",p.nodeElement,A,v,b.id),target:b0("target",p.nodeElement,A,v,b.id)}}};a.set(b.id,T),b.parentId&&ed(T,a,o,{nodeOrigin:u}),m=!0,_&&(g.push({id:b.id,type:"dimensions",dimensions:M}),b.expandParent&&b.parentId&&x.push({id:b.id,parentId:b.parentId,rect:ai(T,u)}))}}if(x.length>0){const p=nd(x,a,o,u);g.push(...p)}return{changes:g,updatedInternals:m}}async function WE({delta:n,panZoom:a,transform:o,translateExtent:r,width:u,height:f}){if(!a||!n.x&&!n.y)return Promise.resolve(!1);const d=await a.setViewportConstrained({x:o[0]+n.x,y:o[1]+n.y,zoom:o[2]},[[0,0],[u,f]],r),m=!!d&&(d.x!==o[0]||d.y!==o[1]||d.k!==o[2]);return Promise.resolve(m)}function M0(n,a,o,r,u,f){let d=u;const m=r.get(d)||new Map;r.set(d,m.set(o,a)),d=`${u}-${n}`;const g=r.get(d)||new Map;if(r.set(d,g.set(o,a)),f){d=`${u}-${n}-${f}`;const h=r.get(d)||new Map;r.set(d,h.set(o,a))}}function Sy(n,a,o){n.clear(),a.clear();for(const r of o){const{source:u,target:f,sourceHandle:d=null,targetHandle:m=null}=r,g={edgeId:r.id,source:u,target:f,sourceHandle:d,targetHandle:m},h=`${u}-${d}--${f}-${m}`,v=`${f}-${m}--${u}-${d}`;M0("source",g,v,n,u,d),M0("target",g,h,n,f,m),a.set(r.id,r)}}function Ey(n,a){if(!n.parentId)return!1;const o=a.get(n.parentId);return o?o.selected?!0:Ey(o,a):!1}function A0(n,a,o){let r=n;do{if(r?.matches?.(a))return!0;if(r===o)return!1;r=r?.parentElement}while(r);return!1}function PE(n,a,o,r){const u=new Map;for(const[f,d]of n)if((d.selected||d.id===r)&&(!d.parentId||!Ey(d,n))&&(d.draggable||a&&typeof d.draggable>"u")){const m=n.get(f);m&&u.set(f,{id:f,position:m.position||{x:0,y:0},distance:{x:o.x-m.internals.positionAbsolute.x,y:o.y-m.internals.positionAbsolute.y},extent:m.extent,parentId:m.parentId,origin:m.origin,expandParent:m.expandParent,internals:{positionAbsolute:m.internals.positionAbsolute||{x:0,y:0}},measured:{width:m.measured.width??0,height:m.measured.height??0}})}return u}function hf({nodeId:n,dragItems:a,nodeLookup:o,dragging:r=!0}){const u=[];for(const[d,m]of a){const g=o.get(d)?.internals.userNode;g&&u.push({...g,position:m.position,dragging:r})}if(!n)return[u[0],u];const f=o.get(n)?.internals.userNode;return[f?{...f,position:a.get(n)?.position||f.position,dragging:r}:u[0],u]}function tw({dragItems:n,snapGrid:a,x:o,y:r}){const u=n.values().next().value;if(!u)return null;const f={x:o-u.distance.x,y:r-u.distance.y},d=Co(f,a);return{x:d.x-f.x,y:d.y-f.y}}function ew({onNodeMouseDown:n,getStoreItems:a,onDragStart:o,onDrag:r,onDragStop:u}){let f={x:null,y:null},d=0,m=new Map,g=!1,h={x:0,y:0},v=null,x=!1,p=null,b=!1,M=!1,_=null;function z({noDragClassName:L,handleSelector:S,domNode:T,isSelectable:$,nodeId:V,nodeClickDistance:q=0}){p=Ue(T);function J({x:et,y:P}){const{nodeLookup:D,nodeExtent:U,snapGrid:N,snapToGrid:H,nodeOrigin:B,onNodeDrag:X,onSelectionDrag:nt,onError:w,updateNodePositions:R}=a();f={x:et,y:P};let K=!1;const F=m.size>1,at=F&&U?Hf(_o(m)):null,ct=F&&H?tw({dragItems:m,snapGrid:N,x:et,y:P}):null;for(const[st,rt]of m){if(!D.has(st))continue;let ft={x:et-rt.distance.x,y:P-rt.distance.y};H&&(ft=ct?{x:Math.round(ft.x+ct.x),y:Math.round(ft.y+ct.y)}:Co(ft,N));let wt=null;if(F&&U&&!rt.extent&&at){const{positionAbsolute:vt}=rt.internals,St=vt.x-at.x+U[0][0],Lt=vt.x+rt.measured.width-at.x2+U[1][0],$t=vt.y-at.y+U[0][1],oe=vt.y+rt.measured.height-at.y2+U[1][1];wt=[[St,$t],[Lt,oe]]}const{position:bt,positionAbsolute:pt}=iy({nodeId:st,nextPosition:ft,nodeLookup:D,nodeExtent:wt||U,nodeOrigin:B,onError:w});K=K||rt.position.x!==bt.x||rt.position.y!==bt.y,rt.position=bt,rt.internals.positionAbsolute=pt}if(M=M||K,!!K&&(R(m,!0),_&&(r||X||!V&&nt))){const[st,rt]=hf({nodeId:V,dragItems:m,nodeLookup:D});r?.(_,m,st,rt),X?.(_,st,rt),V||nt?.(_,rt)}}async function I(){if(!v)return;const{transform:et,panBy:P,autoPanSpeed:D,autoPanOnNodeDrag:U}=a();if(!U){g=!1,cancelAnimationFrame(d);return}const[N,H]=ry(h,v,D);(N!==0||H!==0)&&(f.x=(f.x??0)-N/et[2],f.y=(f.y??0)-H/et[2],await P({x:N,y:H})&&J(f)),d=requestAnimationFrame(I)}function ut(et){const{nodeLookup:P,multiSelectionActive:D,nodesDraggable:U,transform:N,snapGrid:H,snapToGrid:B,selectNodesOnDrag:X,onNodeDragStart:nt,onSelectionDragStart:w,unselectNodesAndEdges:R}=a();x=!0,(!X||!$)&&!D&&V&&(P.get(V)?.selected||R()),$&&X&&V&&n?.(V);const K=so(et.sourceEvent,{transform:N,snapGrid:H,snapToGrid:B,containerBounds:v});if(f=K,m=PE(P,U,K,V),m.size>0&&(o||nt||!V&&w)){const[F,at]=hf({nodeId:V,dragItems:m,nodeLookup:P});o?.(et.sourceEvent,m,F,at),nt?.(et.sourceEvent,F,at),V||w?.(et.sourceEvent,at)}}const tt=Up().clickDistance(q).on("start",et=>{const{domNode:P,nodeDragThreshold:D,transform:U,snapGrid:N,snapToGrid:H}=a();v=P?.getBoundingClientRect()||null,b=!1,M=!1,_=et.sourceEvent,D===0&&ut(et),f=so(et.sourceEvent,{transform:U,snapGrid:N,snapToGrid:H,containerBounds:v}),h=ln(et.sourceEvent,v)}).on("drag",et=>{const{autoPanOnNodeDrag:P,transform:D,snapGrid:U,snapToGrid:N,nodeDragThreshold:H,nodeLookup:B}=a(),X=so(et.sourceEvent,{transform:D,snapGrid:U,snapToGrid:N,containerBounds:v});if(_=et.sourceEvent,(et.sourceEvent.type==="touchmove"&&et.sourceEvent.touches.length>1||V&&!B.has(V))&&(b=!0),!b){if(!g&&P&&x&&(g=!0,I()),!x){const nt=ln(et.sourceEvent,v),w=nt.x-h.x,R=nt.y-h.y;Math.sqrt(w*w+R*R)>H&&ut(et)}(f.x!==X.xSnapped||f.y!==X.ySnapped)&&m&&x&&(h=ln(et.sourceEvent,v),J(X))}}).on("end",et=>{if(!(!x||b)&&(g=!1,x=!1,cancelAnimationFrame(d),m.size>0)){const{nodeLookup:P,updateNodePositions:D,onNodeDragStop:U,onSelectionDragStop:N}=a();if(M&&(D(m,!1),M=!1),u||U||!V&&N){const[H,B]=hf({nodeId:V,dragItems:m,nodeLookup:P,dragging:!1});u?.(et.sourceEvent,m,H,B),U?.(et.sourceEvent,H,B),V||N?.(et.sourceEvent,B)}}}).filter(et=>{const P=et.target;return!et.button&&(!L||!A0(P,`.${L}`,T))&&(!S||A0(P,S,T))});p.call(tt)}function A(){p?.on(".drag",null)}return{update:z,destroy:A}}function nw(n,a,o){const r=[],u={x:n.x-o,y:n.y-o,width:o*2,height:o*2};for(const f of a.values())po(u,ai(f))>0&&r.push(f);return r}const lw=250;function aw(n,a,o,r){let u=[],f=1/0;const d=nw(n,o,a+lw);for(const m of d){const g=[...m.internals.handleBounds?.source??[],...m.internals.handleBounds?.target??[]];for(const h of g){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:v,y:x}=vo(m,h,h.position,!0),p=Math.sqrt(Math.pow(v-n.x,2)+Math.pow(x-n.y,2));p>a||(p<f?(u=[{...h,x:v,y:x}],f=p):p===f&&u.push({...h,x:v,y:x}))}}if(!u.length)return null;if(u.length>1){const m=r.type==="source"?"target":"source";return u.find(g=>g.type===m)??u[0]}return u[0]}function wy(n,a,o,r,u,f=!1){const d=r.get(n);if(!d)return null;const m=u==="strict"?d.internals.handleBounds?.[a]:[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]],g=(o?m?.find(h=>h.id===o):m?.[0])??null;return g&&f?{...g,...vo(d,g,g.position,!0)}:g}function _y(n,a){return n||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function iw(n,a){let o=null;return a?o=!0:n&&!a&&(o=!1),o}const Cy=()=>!0;function ow(n,{connectionMode:a,connectionRadius:o,handleId:r,nodeId:u,edgeUpdaterType:f,isTarget:d,domNode:m,nodeLookup:g,lib:h,autoPanOnConnect:v,flowId:x,panBy:p,cancelConnection:b,onConnectStart:M,onConnect:_,onConnectEnd:z,isValidConnection:A=Cy,onReconnectEnd:L,updateConnection:S,getTransform:T,getFromHandle:$,autoPanSpeed:V,dragThreshold:q=1,handleDomNode:J}){const I=fy(n.target);let ut=0,tt;const{x:et,y:P}=ln(n),D=_y(f,J),U=m?.getBoundingClientRect();let N=!1;if(!U||!D)return;const H=wy(u,D,r,g,a);if(!H)return;let B=ln(n,U),X=!1,nt=null,w=!1,R=null;function K(){if(!v||!U)return;const[bt,pt]=ry(B,U,V);p({x:bt,y:pt}),ut=requestAnimationFrame(K)}const F={...H,nodeId:u,type:D,position:H.position},at=g.get(u);let st={inProgress:!0,isValid:null,from:vo(at,F,mt.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:at,to:B,toHandle:null,toPosition:p0[F.position],toNode:null};function rt(){N=!0,S(st),M?.(n,{nodeId:u,handleId:r,handleType:D})}q===0&&rt();function ft(bt){if(!N){const{x:Lt,y:$t}=ln(bt),oe=Lt-et,$e=$t-P;if(!(oe*oe+$e*$e>q*q))return;rt()}if(!$()||!F){wt(bt);return}const pt=T();B=ln(bt,U),tt=aw(No(B,pt,!1,[1,1]),o,g,F),X||(K(),X=!0);const vt=Ny(bt,{handle:tt,connectionMode:a,fromNodeId:u,fromHandleId:r,fromType:d?"target":"source",isValidConnection:A,doc:I,lib:h,flowId:x,nodeLookup:g});R=vt.handleDomNode,nt=vt.connection,w=iw(!!tt,vt.isValid);const St={...st,isValid:w,to:vt.toHandle&&w?Ss({x:vt.toHandle.x,y:vt.toHandle.y},pt):B,toHandle:vt.toHandle,toPosition:w&&vt.toHandle?vt.toHandle.position:p0[F.position],toNode:vt.toHandle?g.get(vt.toHandle.nodeId):null};w&&tt&&st.toHandle&&St.toHandle&&st.toHandle.type===St.toHandle.type&&st.toHandle.nodeId===St.toHandle.nodeId&&st.toHandle.id===St.toHandle.id&&st.to.x===St.to.x&&st.to.y===St.to.y||(S(St),st=St)}function wt(bt){if(!("touches"in bt&&bt.touches.length>0)){if(N){(tt||R)&&nt&&w&&_?.(nt);const{inProgress:pt,...vt}=st,St={...vt,toPosition:st.toHandle?st.toPosition:null};z?.(bt,St),f&&L?.(bt,St)}b(),cancelAnimationFrame(ut),X=!1,w=!1,nt=null,R=null,I.removeEventListener("mousemove",ft),I.removeEventListener("mouseup",wt),I.removeEventListener("touchmove",ft),I.removeEventListener("touchend",wt)}}I.addEventListener("mousemove",ft),I.addEventListener("mouseup",wt),I.addEventListener("touchmove",ft),I.addEventListener("touchend",wt)}function Ny(n,{handle:a,connectionMode:o,fromNodeId:r,fromHandleId:u,fromType:f,doc:d,lib:m,flowId:g,isValidConnection:h=Cy,nodeLookup:v}){const x=f==="target",p=a?d.querySelector(`.${m}-flow__handle[data-id="${g}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x:b,y:M}=ln(n),_=d.elementFromPoint(b,M),z=_?.classList.contains(`${m}-flow__handle`)?_:p,A={handleDomNode:z,isValid:!1,connection:null,toHandle:null};if(z){const L=_y(void 0,z),S=z.getAttribute("data-nodeid"),T=z.getAttribute("data-handleid"),$=z.classList.contains("connectable"),V=z.classList.contains("connectableend");if(!S||!L)return A;const q={source:x?S:r,sourceHandle:x?T:u,target:x?r:S,targetHandle:x?u:T};A.connection=q;const I=$&&V&&(o===ni.Strict?x&&L==="source"||!x&&L==="target":S!==r||T!==u);A.isValid=I&&h(q),A.toHandle=wy(S,L,T,v,o,!0)}return A}const Uf={onPointerDown:ow,isValid:Ny};function rw({domNode:n,panZoom:a,getTransform:o,getViewScale:r}){const u=Ue(n);function f({translateExtent:m,width:g,height:h,zoomStep:v=1,pannable:x=!0,zoomable:p=!0,inversePan:b=!1}){const M=S=>{if(S.sourceEvent.type!=="wheel"||!a)return;const T=o(),$=S.sourceEvent.ctrlKey&&yo()?10:1,V=-S.sourceEvent.deltaY*(S.sourceEvent.deltaMode===1?.05:S.sourceEvent.deltaMode?1:.002)*v,q=T[2]*Math.pow(2,V*$);a.scaleTo(q)};let _=[0,0];const z=S=>{(S.sourceEvent.type==="mousedown"||S.sourceEvent.type==="touchstart")&&(_=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY])},A=S=>{const T=o();if(S.sourceEvent.type!=="mousemove"&&S.sourceEvent.type!=="touchmove"||!a)return;const $=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY],V=[$[0]-_[0],$[1]-_[1]];_=$;const q=r()*Math.max(T[2],Math.log(T[2]))*(b?-1:1),J={x:T[0]-V[0]*q,y:T[1]-V[1]*q},I=[[0,0],[g,h]];a.setViewportConstrained({x:J.x,y:J.y,zoom:T[2]},I,m)},L=Pp().on("start",z).on("zoom",x?A:null).on("zoom.wheel",p?M:null);u.call(L,{})}function d(){u.on("zoom",null)}return{update:f,destroy:d,pointer:tn}}const Os=n=>({x:n.x,y:n.y,zoom:n.k}),mf=({x:n,y:a,zoom:o})=>Ts.translate(n,a).scale(o),Fa=(n,a)=>n.target.closest(`.${a}`),My=(n,a)=>a===2&&Array.isArray(n)&&n.includes(2),sw=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,gf=(n,a=0,o=sw,r=()=>{})=>{const u=typeof a=="number"&&a>0;return u||r(),u?n.transition().duration(a).ease(o).on("end",r):n},Ay=n=>{const a=n.ctrlKey&&yo()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*a};function uw({zoomPanValues:n,noWheelClassName:a,d3Selection:o,d3Zoom:r,panOnScrollMode:u,panOnScrollSpeed:f,zoomOnPinch:d,onPanZoomStart:m,onPanZoom:g,onPanZoomEnd:h}){return v=>{if(Fa(v,a))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const x=o.property("__zoom").k||1;if(v.ctrlKey&&d){const z=tn(v),A=Ay(v),L=x*Math.pow(2,A);r.scaleTo(o,L,z,v);return}const p=v.deltaMode===1?20:1;let b=u===Il.Vertical?0:v.deltaX*p,M=u===Il.Horizontal?0:v.deltaY*p;!yo()&&v.shiftKey&&u!==Il.Vertical&&(b=v.deltaY*p,M=0),r.translateBy(o,-(b/x)*f,-(M/x)*f,{internal:!0});const _=Os(o.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(g?.(v,_),n.panScrollTimeout=setTimeout(()=>{h?.(v,_),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,m?.(v,_))}}function cw({noWheelClassName:n,preventScrolling:a,d3ZoomHandler:o}){return function(r,u){const f=r.type==="wheel",d=!a&&f&&!r.ctrlKey,m=Fa(r,n);if(r.ctrlKey&&f&&m&&r.preventDefault(),d||m)return null;r.preventDefault(),o.call(this,r,u)}}function fw({zoomPanValues:n,onDraggingChange:a,onPanZoomStart:o}){return r=>{if(r.sourceEvent?.internal)return;const u=Os(r.transform);n.mouseButton=r.sourceEvent?.button||0,n.isZoomingOrPanning=!0,n.prevViewport=u,r.sourceEvent?.type==="mousedown"&&a(!0),o&&o?.(r.sourceEvent,u)}}function dw({zoomPanValues:n,panOnDrag:a,onPaneContextMenu:o,onTransformChange:r,onPanZoom:u}){return f=>{n.usedRightMouseButton=!!(o&&My(a,n.mouseButton??0)),f.sourceEvent?.sync||r([f.transform.x,f.transform.y,f.transform.k]),u&&!f.sourceEvent?.internal&&u?.(f.sourceEvent,Os(f.transform))}}function hw({zoomPanValues:n,panOnDrag:a,panOnScroll:o,onDraggingChange:r,onPanZoomEnd:u,onPaneContextMenu:f}){return d=>{if(!d.sourceEvent?.internal&&(n.isZoomingOrPanning=!1,f&&My(a,n.mouseButton??0)&&!n.usedRightMouseButton&&d.sourceEvent&&f(d.sourceEvent),n.usedRightMouseButton=!1,r(!1),u)){const m=Os(d.transform);n.prevViewport=m,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{u?.(d.sourceEvent,m)},o?150:0)}}}function mw({zoomActivationKeyPressed:n,zoomOnScroll:a,zoomOnPinch:o,panOnDrag:r,panOnScroll:u,zoomOnDoubleClick:f,userSelectionActive:d,noWheelClassName:m,noPanClassName:g,lib:h,connectionInProgress:v}){return x=>{const p=n||a,b=o&&x.ctrlKey,M=x.type==="wheel";if(x.button===1&&x.type==="mousedown"&&(Fa(x,`${h}-flow__node`)||Fa(x,`${h}-flow__edge`)))return!0;if(!r&&!p&&!u&&!f&&!o||d||v&&!M||Fa(x,m)&&M||Fa(x,g)&&(!M||u&&M&&!n)||!o&&x.ctrlKey&&M)return!1;if(!o&&x.type==="touchstart"&&x.touches?.length>1)return x.preventDefault(),!1;if(!p&&!u&&!b&&M||!r&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(r)&&!r.includes(x.button)&&x.type==="mousedown")return!1;const _=Array.isArray(r)&&r.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||M)&&_}}function gw({domNode:n,minZoom:a,maxZoom:o,translateExtent:r,viewport:u,onPanZoom:f,onPanZoomStart:d,onPanZoomEnd:m,onDraggingChange:g}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=n.getBoundingClientRect(),x=Pp().scaleExtent([a,o]).translateExtent(r),p=Ue(n).call(x);L({x:u.x,y:u.y,zoom:li(u.zoom,a,o)},[[0,0],[v.width,v.height]],r);const b=p.on("wheel.zoom"),M=p.on("dblclick.zoom");x.wheelDelta(Ay);function _(tt,et){return p?new Promise(P=>{x?.interpolate(et?.interpolate==="linear"?ro:ss).transform(gf(p,et?.duration,et?.ease,()=>P(!0)),tt)}):Promise.resolve(!1)}function z({noWheelClassName:tt,noPanClassName:et,onPaneContextMenu:P,userSelectionActive:D,panOnScroll:U,panOnDrag:N,panOnScrollMode:H,panOnScrollSpeed:B,preventScrolling:X,zoomOnPinch:nt,zoomOnScroll:w,zoomOnDoubleClick:R,zoomActivationKeyPressed:K,lib:F,onTransformChange:at,connectionInProgress:ct,paneClickDistance:st,selectionOnDrag:rt}){D&&!h.isZoomingOrPanning&&A();const ft=U&&!K&&!D;x.clickDistance(rt?1/0:!nn(st)||st<0?0:st);const wt=ft?uw({zoomPanValues:h,noWheelClassName:tt,d3Selection:p,d3Zoom:x,panOnScrollMode:H,panOnScrollSpeed:B,zoomOnPinch:nt,onPanZoomStart:d,onPanZoom:f,onPanZoomEnd:m}):cw({noWheelClassName:tt,preventScrolling:X,d3ZoomHandler:b});if(p.on("wheel.zoom",wt,{passive:!1}),!D){const pt=fw({zoomPanValues:h,onDraggingChange:g,onPanZoomStart:d});x.on("start",pt);const vt=dw({zoomPanValues:h,panOnDrag:N,onPaneContextMenu:!!P,onPanZoom:f,onTransformChange:at});x.on("zoom",vt);const St=hw({zoomPanValues:h,panOnDrag:N,panOnScroll:U,onPaneContextMenu:P,onPanZoomEnd:m,onDraggingChange:g});x.on("end",St)}const bt=mw({zoomActivationKeyPressed:K,panOnDrag:N,zoomOnScroll:w,panOnScroll:U,zoomOnDoubleClick:R,zoomOnPinch:nt,userSelectionActive:D,noPanClassName:et,noWheelClassName:tt,lib:F,connectionInProgress:ct});x.filter(bt),R?p.on("dblclick.zoom",M):p.on("dblclick.zoom",null)}function A(){x.on("zoom",null)}async function L(tt,et,P){const D=mf(tt),U=x?.constrain()(D,et,P);return U&&await _(U),new Promise(N=>N(U))}async function S(tt,et){const P=mf(tt);return await _(P,et),new Promise(D=>D(P))}function T(tt){if(p){const et=mf(tt),P=p.property("__zoom");(P.k!==tt.zoom||P.x!==tt.x||P.y!==tt.y)&&x?.transform(p,et,null,{sync:!0})}}function $(){const tt=p?Wp(p.node()):{x:0,y:0,k:1};return{x:tt.x,y:tt.y,zoom:tt.k}}function V(tt,et){return p?new Promise(P=>{x?.interpolate(et?.interpolate==="linear"?ro:ss).scaleTo(gf(p,et?.duration,et?.ease,()=>P(!0)),tt)}):Promise.resolve(!1)}function q(tt,et){return p?new Promise(P=>{x?.interpolate(et?.interpolate==="linear"?ro:ss).scaleBy(gf(p,et?.duration,et?.ease,()=>P(!0)),tt)}):Promise.resolve(!1)}function J(tt){x?.scaleExtent(tt)}function I(tt){x?.translateExtent(tt)}function ut(tt){const et=!nn(tt)||tt<0?0:tt;x?.clickDistance(et)}return{update:z,destroy:A,setViewport:S,setViewportConstrained:L,getViewport:$,scaleTo:V,scaleBy:q,setScaleExtent:J,setTranslateExtent:I,syncViewport:T,setClickDistance:ut}}var oi;(function(n){n.Line="line",n.Handle="handle"})(oi||(oi={}));function pw({width:n,prevWidth:a,height:o,prevHeight:r,affectsX:u,affectsY:f}){const d=n-a,m=o-r,g=[d>0?1:d<0?-1:0,m>0?1:m<0?-1:0];return d&&u&&(g[0]=g[0]*-1),m&&f&&(g[1]=g[1]*-1),g}function T0(n){const a=n.includes("right")||n.includes("left"),o=n.includes("bottom")||n.includes("top"),r=n.includes("left"),u=n.includes("top");return{isHorizontal:a,isVertical:o,affectsX:r,affectsY:u}}function vl(n,a){return Math.max(0,a-n)}function xl(n,a){return Math.max(0,n-a)}function ls(n,a,o){return Math.max(0,a-n,n-o)}function z0(n,a){return n?!a:a}function yw(n,a,o,r,u,f,d,m){let{affectsX:g,affectsY:h}=a;const{isHorizontal:v,isVertical:x}=a,p=v&&x,{xSnapped:b,ySnapped:M}=o,{minWidth:_,maxWidth:z,minHeight:A,maxHeight:L}=r,{x:S,y:T,width:$,height:V,aspectRatio:q}=n;let J=Math.floor(v?b-n.pointerX:0),I=Math.floor(x?M-n.pointerY:0);const ut=$+(g?-J:J),tt=V+(h?-I:I),et=-f[0]*$,P=-f[1]*V;let D=ls(ut,_,z),U=ls(tt,A,L);if(d){let B=0,X=0;g&&J<0?B=vl(S+J+et,d[0][0]):!g&&J>0&&(B=xl(S+ut+et,d[1][0])),h&&I<0?X=vl(T+I+P,d[0][1]):!h&&I>0&&(X=xl(T+tt+P,d[1][1])),D=Math.max(D,B),U=Math.max(U,X)}if(m){let B=0,X=0;g&&J>0?B=xl(S+J,m[0][0]):!g&&J<0&&(B=vl(S+ut,m[1][0])),h&&I>0?X=xl(T+I,m[0][1]):!h&&I<0&&(X=vl(T+tt,m[1][1])),D=Math.max(D,B),U=Math.max(U,X)}if(u){if(v){const B=ls(ut/q,A,L)*q;if(D=Math.max(D,B),d){let X=0;!g&&!h||g&&!h&&p?X=xl(T+P+ut/q,d[1][1])*q:X=vl(T+P+(g?J:-J)/q,d[0][1])*q,D=Math.max(D,X)}if(m){let X=0;!g&&!h||g&&!h&&p?X=vl(T+ut/q,m[1][1])*q:X=xl(T+(g?J:-J)/q,m[0][1])*q,D=Math.max(D,X)}}if(x){const B=ls(tt*q,_,z)/q;if(U=Math.max(U,B),d){let X=0;!g&&!h||h&&!g&&p?X=xl(S+tt*q+et,d[1][0])/q:X=vl(S+(h?I:-I)*q+et,d[0][0])/q,U=Math.max(U,X)}if(m){let X=0;!g&&!h||h&&!g&&p?X=vl(S+tt*q,m[1][0])/q:X=xl(S+(h?I:-I)*q,m[0][0])/q,U=Math.max(U,X)}}}I=I+(I<0?U:-U),J=J+(J<0?D:-D),u&&(p?ut>tt*q?I=(z0(g,h)?-J:J)/q:J=(z0(g,h)?-I:I)*q:v?(I=J/q,h=g):(J=I*q,g=h));const N=g?S+J:S,H=h?T+I:T;return{width:$+(g?-J:J),height:V+(h?-I:I),x:f[0]*J*(g?-1:1)+N,y:f[1]*I*(h?-1:1)+H}}const Ty={width:0,height:0,x:0,y:0},vw={...Ty,pointerX:0,pointerY:0,aspectRatio:1};function xw(n){return[[0,0],[n.measured.width,n.measured.height]]}function bw(n,a,o){const r=a.position.x+n.position.x,u=a.position.y+n.position.y,f=n.measured.width??0,d=n.measured.height??0,m=o[0]*f,g=o[1]*d;return[[r-m,u-g],[r+f-m,u+d-g]]}function Sw({domNode:n,nodeId:a,getStoreItems:o,onChange:r,onEnd:u}){const f=Ue(n);let d={controlDirection:T0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function m({controlPosition:h,boundaries:v,keepAspectRatio:x,resizeDirection:p,onResizeStart:b,onResize:M,onResizeEnd:_,shouldResize:z}){let A={...Ty},L={...vw};d={boundaries:v,resizeDirection:p,keepAspectRatio:x,controlDirection:T0(h)};let S,T=null,$=[],V,q,J,I=!1;const ut=Up().on("start",tt=>{const{nodeLookup:et,transform:P,snapGrid:D,snapToGrid:U,nodeOrigin:N,paneDomNode:H}=o();if(S=et.get(a),!S)return;T=H?.getBoundingClientRect()??null;const{xSnapped:B,ySnapped:X}=so(tt.sourceEvent,{transform:P,snapGrid:D,snapToGrid:U,containerBounds:T});A={width:S.measured.width??0,height:S.measured.height??0,x:S.position.x??0,y:S.position.y??0},L={...A,pointerX:B,pointerY:X,aspectRatio:A.width/A.height},V=void 0,S.parentId&&(S.extent==="parent"||S.expandParent)&&(V=et.get(S.parentId),q=V&&S.extent==="parent"?xw(V):void 0),$=[],J=void 0;for(const[nt,w]of et)if(w.parentId===a&&($.push({id:nt,position:{...w.position},extent:w.extent}),w.extent==="parent"||w.expandParent)){const R=bw(w,S,w.origin??N);J?J=[[Math.min(R[0][0],J[0][0]),Math.min(R[0][1],J[0][1])],[Math.max(R[1][0],J[1][0]),Math.max(R[1][1],J[1][1])]]:J=R}b?.(tt,{...A})}).on("drag",tt=>{const{transform:et,snapGrid:P,snapToGrid:D,nodeOrigin:U}=o(),N=so(tt.sourceEvent,{transform:et,snapGrid:P,snapToGrid:D,containerBounds:T}),H=[];if(!S)return;const{x:B,y:X,width:nt,height:w}=A,R={},K=S.origin??U,{width:F,height:at,x:ct,y:st}=yw(L,d.controlDirection,N,d.boundaries,d.keepAspectRatio,K,q,J),rt=F!==nt,ft=at!==w,wt=ct!==B&&rt,bt=st!==X&&ft;if(!wt&&!bt&&!rt&&!ft)return;if((wt||bt||K[0]===1||K[1]===1)&&(R.x=wt?ct:A.x,R.y=bt?st:A.y,A.x=R.x,A.y=R.y,$.length>0)){const Lt=ct-B,$t=st-X;for(const oe of $)oe.position={x:oe.position.x-Lt+K[0]*(F-nt),y:oe.position.y-$t+K[1]*(at-w)},H.push(oe)}if((rt||ft)&&(R.width=rt&&(!d.resizeDirection||d.resizeDirection==="horizontal")?F:A.width,R.height=ft&&(!d.resizeDirection||d.resizeDirection==="vertical")?at:A.height,A.width=R.width,A.height=R.height),V&&S.expandParent){const Lt=K[0]*(R.width??0);R.x&&R.x<Lt&&(A.x=Lt,L.x=L.x-(R.x-Lt));const $t=K[1]*(R.height??0);R.y&&R.y<$t&&(A.y=$t,L.y=L.y-(R.y-$t))}const pt=pw({width:A.width,prevWidth:nt,height:A.height,prevHeight:w,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),vt={...A,direction:pt};z?.(tt,vt)!==!1&&(I=!0,M?.(tt,vt),r(R,H))}).on("end",tt=>{I&&(_?.(tt,{...A}),u?.({...A}),I=!1)});f.call(ut)}function g(){f.on(".drag",null)}return{update:m,destroy:g}}var pf={exports:{}},yf={},vf={exports:{}},xf={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var D0;function Ew(){if(D0)return xf;D0=1;var n=bo();function a(x,p){return x===p&&(x!==0||1/x===1/p)||x!==x&&p!==p}var o=typeof Object.is=="function"?Object.is:a,r=n.useState,u=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(x,p){var b=p(),M=r({inst:{value:b,getSnapshot:p}}),_=M[0].inst,z=M[1];return f(function(){_.value=b,_.getSnapshot=p,g(_)&&z({inst:_})},[x,b,p]),u(function(){return g(_)&&z({inst:_}),x(function(){g(_)&&z({inst:_})})},[x]),d(b),b}function g(x){var p=x.getSnapshot;x=x.value;try{var b=p();return!o(x,b)}catch{return!0}}function h(x,p){return p()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return xf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,xf}var O0;function ww(){return O0||(O0=1,vf.exports=Ew()),vf.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var R0;function _w(){if(R0)return yf;R0=1;var n=bo(),a=ww();function o(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var r=typeof Object.is=="function"?Object.is:o,u=a.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,g=n.useDebugValue;return yf.useSyncExternalStoreWithSelector=function(h,v,x,p,b){var M=f(null);if(M.current===null){var _={hasValue:!1,value:null};M.current=_}else _=M.current;M=m(function(){function A(V){if(!L){if(L=!0,S=V,V=p(V),b!==void 0&&_.hasValue){var q=_.value;if(b(q,V))return T=q}return T=V}if(q=T,r(S,V))return q;var J=p(V);return b!==void 0&&b(q,J)?(S=V,q):(S=V,T=J)}var L=!1,S,T,$=x===void 0?null:x;return[function(){return A(v())},$===null?void 0:function(){return A($())}]},[v,x,p,b]);var z=u(h,M[0],M[1]);return d(function(){_.hasValue=!0,_.value=z},[z]),g(z),z},yf}var H0;function Cw(){return H0||(H0=1,pf.exports=_w()),pf.exports}var Nw=Cw();const zy=Sp(Nw),Mw={},j0=n=>{let a;const o=new Set,r=(v,x)=>{const p=typeof v=="function"?v(a):v;if(!Object.is(p,a)){const b=a;a=x??(typeof p!="object"||p===null)?p:Object.assign({},a,p),o.forEach(M=>M(a,b))}},u=()=>a,g={setState:r,getState:u,getInitialState:()=>h,subscribe:v=>(o.add(v),()=>o.delete(v)),destroy:()=>{(Mw?"production":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."),o.clear()}},h=a=n(r,u,g);return g},Dy=n=>n?j0(n):j0,{useDebugValue:Aw}=Ep,{useSyncExternalStoreWithSelector:Tw}=zy,zw=n=>n;function Oy(n,a=zw,o){const r=Tw(n.subscribe,n.getState,n.getServerState||n.getInitialState,a,o);return Aw(r),r}const L0=(n,a)=>{const o=Dy(n),r=(u,f=a)=>Oy(o,u,f);return Object.assign(r,o),r},Dw=(n,a)=>n?L0(n,a):L0;function Zt(n,a){if(Object.is(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;if(n instanceof Map&&a instanceof Map){if(n.size!==a.size)return!1;for(const[r,u]of n)if(!Object.is(u,a.get(r)))return!1;return!0}if(n instanceof Set&&a instanceof Set){if(n.size!==a.size)return!1;for(const r of n)if(!a.has(r))return!1;return!0}const o=Object.keys(n);if(o.length!==Object.keys(a).length)return!1;for(const r of o)if(!Object.prototype.hasOwnProperty.call(a,r)||!Object.is(n[r],a[r]))return!1;return!0}wp();const Rs=Z.createContext(null),Ow=Rs.Provider,Ry=mn.error001();function zt(n,a){const o=Z.useContext(Rs);if(o===null)throw new Error(Ry);return Oy(o,n,a)}function Gt(){const n=Z.useContext(Rs);if(n===null)throw new Error(Ry);return Z.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const B0={display:"none"},Rw={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Hy="react-flow__node-desc",jy="react-flow__edge-desc",Hw="react-flow__aria-live",jw=n=>n.ariaLiveMessage,Lw=n=>n.ariaLabelConfig;function Bw({rfId:n}){const a=zt(jw);return C.jsx("div",{id:`${Hw}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:Rw,children:a})}function Uw({rfId:n,disableKeyboardA11y:a}){const o=zt(Lw);return C.jsxs(C.Fragment,{children:[C.jsx("div",{id:`${Hy}-${n}`,style:B0,children:a?o["node.a11yDescription.default"]:o["node.a11yDescription.keyboardDisabled"]}),C.jsx("div",{id:`${jy}-${n}`,style:B0,children:o["edge.a11yDescription.default"]}),!a&&C.jsx(Bw,{rfId:n})]})}const Hs=Z.forwardRef(({position:n="top-left",children:a,className:o,style:r,...u},f)=>{const d=`${n}`.split("-");return C.jsx("div",{className:ne(["react-flow__panel",o,...d]),style:r,ref:f,...u,children:a})});Hs.displayName="Panel";function Vw({proOptions:n,position:a="bottom-right"}){return n?.hideAttribution?null:C.jsx(Hs,{position:a,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:C.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const $w=n=>{const a=[],o=[];for(const[,r]of n.nodeLookup)r.selected&&a.push(r.internals.userNode);for(const[,r]of n.edgeLookup)r.selected&&o.push(r);return{selectedNodes:a,selectedEdges:o}},as=n=>n.id;function qw(n,a){return Zt(n.selectedNodes.map(as),a.selectedNodes.map(as))&&Zt(n.selectedEdges.map(as),a.selectedEdges.map(as))}function Yw({onSelectionChange:n}){const a=Gt(),{selectedNodes:o,selectedEdges:r}=zt($w,qw);return Z.useEffect(()=>{const u={nodes:o,edges:r};n?.(u),a.getState().onSelectionChangeHandlers.forEach(f=>f(u))},[o,r,n]),null}const Xw=n=>!!n.onSelectionChangeHandlers;function kw({onSelectionChange:n}){const a=zt(Xw);return n||a?C.jsx(Yw,{onSelectionChange:n}):null}const Ly=[0,0],Gw={x:0,y:0,zoom:1},Zw=["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"],U0=[...Zw,"rfId"],Qw=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges}),V0={translateExtent:mo,nodeOrigin:Ly,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Kw(n){const{setNodes:a,setEdges:o,setMinZoom:r,setMaxZoom:u,setTranslateExtent:f,setNodeExtent:d,reset:m,setDefaultNodesAndEdges:g}=zt(Qw,Zt),h=Gt();Z.useEffect(()=>(g(n.defaultNodes,n.defaultEdges),()=>{v.current=V0,m()}),[]);const v=Z.useRef(V0);return Z.useEffect(()=>{for(const x of U0){const p=n[x],b=v.current[x];p!==b&&(typeof n[x]>"u"||(x==="nodes"?a(p):x==="edges"?o(p):x==="minZoom"?r(p):x==="maxZoom"?u(p):x==="translateExtent"?f(p):x==="nodeExtent"?d(p):x==="ariaLabelConfig"?h.setState({ariaLabelConfig:HE(p)}):x==="fitView"?h.setState({fitViewQueued:p}):x==="fitViewOptions"?h.setState({fitViewOptions:p}):h.setState({[x]:p})))}v.current=n},U0.map(x=>n[x])),null}function $0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Jw(n){const[a,o]=Z.useState(n==="system"?null:n);return Z.useEffect(()=>{if(n!=="system"){o(n);return}const r=$0(),u=()=>o(r?.matches?"dark":"light");return u(),r?.addEventListener("change",u),()=>{r?.removeEventListener("change",u)}},[n]),a!==null?a:$0()?.matches?"dark":"light"}const q0=typeof document<"u"?document:null;function xo(n=null,a={target:q0,actInsideInputWithModifier:!0}){const[o,r]=Z.useState(!1),u=Z.useRef(!1),f=Z.useRef(new Set([])),[d,m]=Z.useMemo(()=>{if(n!==null){const h=(Array.isArray(n)?n:[n]).filter(x=>typeof x=="string").map(x=>x.replace("+",`
`).replace(`
`,`
+`).split(`
`)),v=h.reduce((x,p)=>x.concat(...p),[]);return[h,v]}return[[],[]]},[n]);return Z.useEffect(()=>{const g=a?.target??q0,h=a?.actInsideInputWithModifier??!0;if(n!==null){const v=b=>{if(u.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!u.current||u.current&&!h)&&dy(b))return!1;const _=X0(b.code,m);if(f.current.add(b[_]),Y0(d,f.current,!1)){const z=b.composedPath?.()?.[0]||b.target,A=z?.nodeName==="BUTTON"||z?.nodeName==="A";a.preventDefault!==!1&&(u.current||!A)&&b.preventDefault(),r(!0)}},x=b=>{const M=X0(b.code,m);Y0(d,f.current,!0)?(r(!1),f.current.clear()):f.current.delete(b[M]),b.key==="Meta"&&f.current.clear(),u.current=!1},p=()=>{f.current.clear(),r(!1)};return g?.addEventListener("keydown",v),g?.addEventListener("keyup",x),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{g?.removeEventListener("keydown",v),g?.removeEventListener("keyup",x),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[n,r]),o}function Y0(n,a,o){return n.filter(r=>o||r.length===a.size).some(r=>r.every(u=>a.has(u)))}function X0(n,a){return a.includes(n)?"code":"key"}const Fw=()=>{const n=Gt();return Z.useMemo(()=>({zoomIn:a=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:o}=n.getState();return o?o.scaleBy(1/1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomTo:(a,o)=>{const{panZoom:r}=n.getState();return r?r.scaleTo(a,{duration:o?.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(a,o)=>{const{transform:[r,u,f],panZoom:d}=n.getState();return d?(await d.setViewport({x:a.x??r,y:a.y??u,zoom:a.zoom??f},o),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,o,r]=n.getState().transform;return{x:a,y:o,zoom:r}},setCenter:async(a,o,r)=>n.getState().setCenter(a,o,r),fitBounds:async(a,o)=>{const{width:r,height:u,minZoom:f,maxZoom:d,panZoom:m}=n.getState(),g=If(a,r,u,f,d,o?.padding??.1);return m?(await m.setViewport(g,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,o={})=>{const{transform:r,snapGrid:u,snapToGrid:f,domNode:d}=n.getState();if(!d)return a;const{x:m,y:g}=d.getBoundingClientRect(),h={x:a.x-m,y:a.y-g},v=o.snapGrid??u,x=o.snapToGrid??f;return No(h,r,x,v)},flowToScreenPosition:a=>{const{transform:o,domNode:r}=n.getState();if(!r)return a;const{x:u,y:f}=r.getBoundingClientRect(),d=Ss(a,o);return{x:d.x+u,y:d.y+f}}}),[])};function By(n,a){const o=[],r=new Map,u=[];for(const f of n)if(f.type==="add"){u.push(f);continue}else if(f.type==="remove"||f.type==="replace")r.set(f.id,[f]);else{const d=r.get(f.id);d?d.push(f):r.set(f.id,[f])}for(const f of a){const d=r.get(f.id);if(!d){o.push(f);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){o.push({...d[0].item});continue}const m={...f};for(const g of d)Iw(g,m);o.push(m)}return u.length&&u.forEach(f=>{f.index!==void 0?o.splice(f.index,0,{...f.item}):o.push({...f.item})}),o}function Iw(n,a){switch(n.type){case"select":{a.selected=n.selected;break}case"position":{typeof n.position<"u"&&(a.position=n.position),typeof n.dragging<"u"&&(a.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(a.measured??={},a.measured.width=n.dimensions.width,a.measured.height=n.dimensions.height,n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(a.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(a.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(a.resizing=n.resizing);break}}}function Uy(n,a){return By(n,a)}function Vy(n,a){return By(n,a)}function Kl(n,a){return{id:n,type:"select",selected:a}}function Ia(n,a=new Set,o=!1){const r=[];for(const[u,f]of n){const d=a.has(u);!(f.selected===void 0&&!d)&&f.selected!==d&&(o&&(f.selected=d),r.push(Kl(f.id,d)))}return r}function k0({items:n=[],lookup:a}){const o=[],r=new Map(n.map(u=>[u.id,u]));for(const[u,f]of n.entries()){const d=a.get(f.id),m=d?.internals?.userNode??d;m!==void 0&&m!==f&&o.push({id:f.id,item:f,type:"replace"}),m===void 0&&o.push({item:f,type:"add",index:u})}for(const[u]of a)r.get(u)===void 0&&o.push({id:u,type:"remove"});return o}function G0(n){return{id:n.id,type:"remove"}}const Z0=n=>_E(n),Ww=n=>ay(n);function $y(n){return Z.forwardRef(n)}const Pw=typeof window<"u"?Z.useLayoutEffect:Z.useEffect;function Q0(n){const[a,o]=Z.useState(BigInt(0)),[r]=Z.useState(()=>t_(()=>o(u=>u+BigInt(1))));return Pw(()=>{const u=r.get();u.length&&(n(u),r.reset())},[a]),r}function t_(n){let a=[];return{get:()=>a,reset:()=>{a=[]},push:o=>{a.push(o),n()}}}const qy=Z.createContext(null);function e_({children:n}){const a=Gt(),o=Z.useCallback(m=>{const{nodes:g=[],setNodes:h,hasDefaultNodes:v,onNodesChange:x,nodeLookup:p,fitViewQueued:b}=a.getState();let M=g;for(const z of m)M=typeof z=="function"?z(M):z;const _=k0({items:M,lookup:p});v&&h(M),_.length>0?x?.(_):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:z,nodes:A,setNodes:L}=a.getState();z&&L(A)})},[]),r=Q0(o),u=Z.useCallback(m=>{const{edges:g=[],setEdges:h,hasDefaultEdges:v,onEdgesChange:x,edgeLookup:p}=a.getState();let b=g;for(const M of m)b=typeof M=="function"?M(b):M;v?h(b):x&&x(k0({items:b,lookup:p}))},[]),f=Q0(u),d=Z.useMemo(()=>({nodeQueue:r,edgeQueue:f}),[]);return C.jsx(qy.Provider,{value:d,children:n})}function n_(){const n=Z.useContext(qy);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const l_=n=>!!n.panZoom;function ld(){const n=Fw(),a=Gt(),o=n_(),r=zt(l_),u=Z.useMemo(()=>{const f=x=>a.getState().nodeLookup.get(x),d=x=>{o.nodeQueue.push(x)},m=x=>{o.edgeQueue.push(x)},g=x=>{const{nodeLookup:p,nodeOrigin:b}=a.getState(),M=Z0(x)?x:p.get(x.id),_=M.parentId?cy(M.position,M.measured,M.parentId,p,b):M.position,z={...M,position:_,width:M.measured?.width??M.width,height:M.measured?.height??M.height};return ai(z)},h=(x,p,b={replace:!1})=>{d(M=>M.map(_=>{if(_.id===x){const z=typeof p=="function"?p(_):p;return b.replace&&Z0(z)?z:{..._,...z}}return _}))},v=(x,p,b={replace:!1})=>{m(M=>M.map(_=>{if(_.id===x){const z=typeof p=="function"?p(_):p;return b.replace&&Ww(z)?z:{..._,...z}}return _}))};return{getNodes:()=>a.getState().nodes.map(x=>({...x})),getNode:x=>f(x)?.internals.userNode,getInternalNode:f,getEdges:()=>{const{edges:x=[]}=a.getState();return x.map(p=>({...p}))},getEdge:x=>a.getState().edgeLookup.get(x),setNodes:d,setEdges:m,addNodes:x=>{const p=Array.isArray(x)?x:[x];o.nodeQueue.push(b=>[...b,...p])},addEdges:x=>{const p=Array.isArray(x)?x:[x];o.edgeQueue.push(b=>[...b,...p])},toObject:()=>{const{nodes:x=[],edges:p=[],transform:b}=a.getState(),[M,_,z]=b;return{nodes:x.map(A=>({...A})),edges:p.map(A=>({...A})),viewport:{x:M,y:_,zoom:z}}},deleteElements:async({nodes:x=[],edges:p=[]})=>{const{nodes:b,edges:M,onNodesDelete:_,onEdgesDelete:z,triggerNodeChanges:A,triggerEdgeChanges:L,onDelete:S,onBeforeDelete:T}=a.getState(),{nodes:$,edges:V}=await TE({nodesToRemove:x,edgesToRemove:p,nodes:b,edges:M,onBeforeDelete:T}),q=V.length>0,J=$.length>0;if(q){const I=V.map(G0);z?.(V),L(I)}if(J){const I=$.map(G0);_?.($),A(I)}return(J||q)&&S?.({nodes:$,edges:V}),{deletedNodes:$,deletedEdges:V}},getIntersectingNodes:(x,p=!0,b)=>{const M=v0(x),_=M?x:g(x),z=b!==void 0;return _?(b||a.getState().nodes).filter(A=>{const L=a.getState().nodeLookup.get(A.id);if(L&&!M&&(A.id===x.id||!L.internals.positionAbsolute))return!1;const S=ai(z?A:L),T=po(S,_);return p&&T>0||T>=S.width*S.height||T>=_.width*_.height}):[]},isNodeIntersecting:(x,p,b=!0)=>{const _=v0(x)?x:g(x);if(!_)return!1;const z=po(_,p);return b&&z>0||z>=p.width*p.height||z>=_.width*_.height},updateNode:h,updateNodeData:(x,p,b={replace:!1})=>{h(x,M=>{const _=typeof p=="function"?p(M):p;return b.replace?{...M,data:_}:{...M,data:{...M.data,..._}}},b)},updateEdge:v,updateEdgeData:(x,p,b={replace:!1})=>{v(x,M=>{const _=typeof p=="function"?p(M):p;return b.replace?{...M,data:_}:{...M,data:{...M.data,..._}}},b)},getNodesBounds:x=>{const{nodeLookup:p,nodeOrigin:b}=a.getState();return CE(x,{nodeLookup:p,nodeOrigin:b})},getHandleConnections:({type:x,id:p,nodeId:b})=>Array.from(a.getState().connectionLookup.get(`${b}-${x}${p?`-${p}`:""}`)?.values()??[]),getNodeConnections:({type:x,handleId:p,nodeId:b})=>Array.from(a.getState().connectionLookup.get(`${b}${x?p?`-${x}-${p}`:`-${x}`:""}`)?.values()??[]),fitView:async x=>{const p=a.getState().fitViewResolver??RE();return a.setState({fitViewQueued:!0,fitViewOptions:x,fitViewResolver:p}),o.nodeQueue.push(b=>[...b]),p.promise}}},[]);return Z.useMemo(()=>({...u,...n,viewportInitialized:r}),[r])}const K0=n=>n.selected,a_=typeof window<"u"?window:void 0;function i_({deleteKeyCode:n,multiSelectionKeyCode:a}){const o=Gt(),{deleteElements:r}=ld(),u=xo(n,{actInsideInputWithModifier:!1}),f=xo(a,{target:a_});Z.useEffect(()=>{if(u){const{edges:d,nodes:m}=o.getState();r({nodes:m.filter(K0),edges:d.filter(K0)}),o.setState({nodesSelectionActive:!1})}},[u]),Z.useEffect(()=>{o.setState({multiSelectionActive:f})},[f])}function o_(n){const a=Gt();Z.useEffect(()=>{const o=()=>{if(!n.current||!(n.current.checkVisibility?.()??!0))return!1;const r=Wf(n.current);(r.height===0||r.width===0)&&a.getState().onError?.("004",mn.error004()),a.setState({width:r.width||500,height:r.height||500})};if(n.current){o(),window.addEventListener("resize",o);const r=new ResizeObserver(()=>o());return r.observe(n.current),()=>{window.removeEventListener("resize",o),r&&n.current&&r.unobserve(n.current)}}},[])}const js={position:"absolute",width:"100%",height:"100%",top:0,left:0},r_=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function s_({onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:o=!0,panOnScroll:r=!1,panOnScrollSpeed:u=.5,panOnScrollMode:f=Il.Free,zoomOnDoubleClick:d=!0,panOnDrag:m=!0,defaultViewport:g,translateExtent:h,minZoom:v,maxZoom:x,zoomActivationKeyCode:p,preventScrolling:b=!0,children:M,noWheelClassName:_,noPanClassName:z,onViewportChange:A,isControlledViewport:L,paneClickDistance:S,selectionOnDrag:T}){const $=Gt(),V=Z.useRef(null),{userSelectionActive:q,lib:J,connectionInProgress:I}=zt(r_,Zt),ut=xo(p),tt=Z.useRef();o_(V);const et=Z.useCallback(P=>{A?.({x:P[0],y:P[1],zoom:P[2]}),L||$.setState({transform:P})},[A,L]);return Z.useEffect(()=>{if(V.current){tt.current=gw({domNode:V.current,minZoom:v,maxZoom:x,translateExtent:h,viewport:g,onDraggingChange:N=>$.setState({paneDragging:N}),onPanZoomStart:(N,H)=>{const{onViewportChangeStart:B,onMoveStart:X}=$.getState();X?.(N,H),B?.(H)},onPanZoom:(N,H)=>{const{onViewportChange:B,onMove:X}=$.getState();X?.(N,H),B?.(H)},onPanZoomEnd:(N,H)=>{const{onViewportChangeEnd:B,onMoveEnd:X}=$.getState();X?.(N,H),B?.(H)}});const{x:P,y:D,zoom:U}=tt.current.getViewport();return $.setState({panZoom:tt.current,transform:[P,D,U],domNode:V.current.closest(".react-flow")}),()=>{tt.current?.destroy()}}},[]),Z.useEffect(()=>{tt.current?.update({onPaneContextMenu:n,zoomOnScroll:a,zoomOnPinch:o,panOnScroll:r,panOnScrollSpeed:u,panOnScrollMode:f,zoomOnDoubleClick:d,panOnDrag:m,zoomActivationKeyPressed:ut,preventScrolling:b,noPanClassName:z,userSelectionActive:q,noWheelClassName:_,lib:J,onTransformChange:et,connectionInProgress:I,selectionOnDrag:T,paneClickDistance:S})},[n,a,o,r,u,f,d,m,ut,b,z,q,_,J,et,I,T,S]),C.jsx("div",{className:"react-flow__renderer",ref:V,style:js,children:M})}const u_=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function c_(){const{userSelectionActive:n,userSelectionRect:a}=zt(u_,Zt);return n&&a?C.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const bf=(n,a)=>o=>{o.target===a.current&&n?.(o)},f_=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function d_({isSelecting:n,selectionKeyPressed:a,selectionMode:o=go.Full,panOnDrag:r,paneClickDistance:u,selectionOnDrag:f,onSelectionStart:d,onSelectionEnd:m,onPaneClick:g,onPaneContextMenu:h,onPaneScroll:v,onPaneMouseEnter:x,onPaneMouseMove:p,onPaneMouseLeave:b,children:M}){const _=Gt(),{userSelectionActive:z,elementsSelectable:A,dragging:L,connectionInProgress:S}=zt(f_,Zt),T=A&&(n||z),$=Z.useRef(null),V=Z.useRef(),q=Z.useRef(new Set),J=Z.useRef(new Set),I=Z.useRef(!1),ut=B=>{if(I.current||S){I.current=!1;return}g?.(B),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},tt=B=>{if(Array.isArray(r)&&r?.includes(2)){B.preventDefault();return}h?.(B)},et=v?B=>v(B):void 0,P=B=>{I.current&&(B.stopPropagation(),I.current=!1)},D=B=>{const{resetSelectedElements:X,domNode:nt}=_.getState();if(V.current=nt?.getBoundingClientRect(),!V.current)return;const w=B.target===$.current;if(!w&&!!B.target.closest(".nokey")||!n||!(f&&w||a)||B.button!==0||!B.isPrimary)return;B.target?.setPointerCapture?.(B.pointerId),I.current=!1;const{x:F,y:at}=ln(B.nativeEvent,V.current);_.setState({userSelectionRect:{width:0,height:0,startX:F,startY:at,x:F,y:at}}),w||(B.stopPropagation(),B.preventDefault()),(u===0||a)&&(X(),d?.(B),I.current=!0)},U=B=>{const{userSelectionRect:X,transform:nt,nodeLookup:w,edgeLookup:R,connectionLookup:K,triggerNodeChanges:F,triggerEdgeChanges:at,defaultEdgeOptions:ct,resetSelectedElements:st}=_.getState();if(!V.current||!X)return;const{x:rt,y:ft}=ln(B.nativeEvent,V.current),{startX:wt,startY:bt}=X;if(!I.current&&B.target===$.current&&!a&&u>0){if(Math.hypot(rt-wt,ft-bt)<=u)return;st(),d?.(B)}I.current=!0;const pt={startX:wt,startY:bt,x:rt<wt?rt:wt,y:ft<bt?ft:bt,width:Math.abs(rt-wt),height:Math.abs(ft-bt)},vt=q.current,St=J.current;q.current=new Set(Ff(w,pt,nt,o===go.Partial,!0).map($t=>$t.id)),J.current=new Set;const Lt=ct?.selectable??!0;for(const $t of q.current){const oe=K.get($t);if(oe)for(const{edgeId:$e}of oe.values()){const Je=R.get($e);Je&&(Je.selectable??Lt)&&J.current.add($e)}}if(!x0(vt,q.current)){const $t=Ia(w,q.current,!0);F($t)}if(!x0(St,J.current)){const $t=Ia(R,J.current);at($t)}_.setState({userSelectionRect:pt,userSelectionActive:!0,nodesSelectionActive:!1})},N=B=>{B.button===0&&(B.target?.releasePointerCapture?.(B.pointerId),!z&&B.target===$.current&&_.getState().userSelectionRect&&ut?.(B),_.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:q.current.size>0}),I.current&&m?.(B))},H=r===!0||Array.isArray(r)&&r.includes(0);return C.jsxs("div",{className:ne(["react-flow__pane",{draggable:H,dragging:L,selection:n}]),onClick:T?void 0:bf(ut,$),onContextMenu:bf(tt,$),onWheel:bf(et,$),onPointerEnter:T?void 0:x,onPointerMove:T?U:p,onPointerUp:T?N:void 0,onPointerDownCapture:T?D:void 0,onClickCapture:T?P:void 0,onPointerLeave:b,ref:$,style:js,children:[M,C.jsx(c_,{})]})}function Vf({id:n,store:a,unselect:o=!1,nodeRef:r}){const{addSelectedNodes:u,unselectNodesAndEdges:f,multiSelectionActive:d,nodeLookup:m,onError:g}=a.getState(),h=m.get(n);if(!h){g?.("012",mn.error012(n));return}a.setState({nodesSelectionActive:!1}),h.selected?(o||h.selected&&d)&&(f({nodes:[h],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):u([n])}function Yy({nodeRef:n,disabled:a=!1,noDragClassName:o,handleSelector:r,nodeId:u,isSelectable:f,nodeClickDistance:d}){const m=Gt(),[g,h]=Z.useState(!1),v=Z.useRef();return Z.useEffect(()=>{v.current=ew({getStoreItems:()=>m.getState(),onNodeMouseDown:x=>{Vf({id:x,store:m,nodeRef:n})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),Z.useEffect(()=>{if(a)v.current?.destroy();else if(n.current)return v.current?.update({noDragClassName:o,handleSelector:r,domNode:n.current,isSelectable:f,nodeId:u,nodeClickDistance:d}),()=>{v.current?.destroy()}},[o,r,a,f,n,u]),g}const h_=n=>a=>a.selected&&(a.draggable||n&&typeof a.draggable>"u");function Xy(){const n=Gt();return Z.useCallback(o=>{const{nodeExtent:r,snapToGrid:u,snapGrid:f,nodesDraggable:d,onError:m,updateNodePositions:g,nodeLookup:h,nodeOrigin:v}=n.getState(),x=new Map,p=h_(d),b=u?f[0]:5,M=u?f[1]:5,_=o.direction.x*b*o.factor,z=o.direction.y*M*o.factor;for(const[,A]of h){if(!p(A))continue;let L={x:A.internals.positionAbsolute.x+_,y:A.internals.positionAbsolute.y+z};u&&(L=Co(L,f));const{position:S,positionAbsolute:T}=iy({nodeId:A.id,nextPosition:L,nodeLookup:h,nodeExtent:r,nodeOrigin:v,onError:m});A.position=S,A.internals.positionAbsolute=T,x.set(A.id,A)}g(x)},[])}const ad=Z.createContext(null),m_=ad.Provider;ad.Consumer;const ky=()=>Z.useContext(ad),g_=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),p_=(n,a,o)=>r=>{const{connectionClickStartHandle:u,connectionMode:f,connection:d}=r,{fromHandle:m,toHandle:g,isValid:h}=d,v=g?.nodeId===n&&g?.id===a&&g?.type===o;return{connectingFrom:m?.nodeId===n&&m?.id===a&&m?.type===o,connectingTo:v,clickConnecting:u?.nodeId===n&&u?.id===a&&u?.type===o,isPossibleEndHandle:f===ni.Strict?m?.type!==o:n!==m?.nodeId||a!==m?.id,connectionInProcess:!!m,clickConnectionInProcess:!!u,valid:v&&h}};function y_({type:n="source",position:a=mt.Top,isValidConnection:o,isConnectable:r=!0,isConnectableStart:u=!0,isConnectableEnd:f=!0,id:d,onConnect:m,children:g,className:h,onMouseDown:v,onTouchStart:x,...p},b){const M=d||null,_=n==="target",z=Gt(),A=ky(),{connectOnClick:L,noPanClassName:S,rfId:T}=zt(g_,Zt),{connectingFrom:$,connectingTo:V,clickConnecting:q,isPossibleEndHandle:J,connectionInProcess:I,clickConnectionInProcess:ut,valid:tt}=zt(p_(A,M,n),Zt);A||z.getState().onError?.("010",mn.error010());const et=U=>{const{defaultEdgeOptions:N,onConnect:H,hasDefaultEdges:B}=z.getState(),X={...N,...U};if(B){const{edges:nt,setEdges:w}=z.getState();w(yy(X,nt))}H?.(X),m?.(X)},P=U=>{if(!A)return;const N=hy(U.nativeEvent);if(u&&(N&&U.button===0||!N)){const H=z.getState();Uf.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:H.autoPanOnConnect,connectionMode:H.connectionMode,connectionRadius:H.connectionRadius,domNode:H.domNode,nodeLookup:H.nodeLookup,lib:H.lib,isTarget:_,handleId:M,nodeId:A,flowId:H.rfId,panBy:H.panBy,cancelConnection:H.cancelConnection,onConnectStart:H.onConnectStart,onConnectEnd:H.onConnectEnd,updateConnection:H.updateConnection,onConnect:et,isValidConnection:o||H.isValidConnection,getTransform:()=>z.getState().transform,getFromHandle:()=>z.getState().connection.fromHandle,autoPanSpeed:H.autoPanSpeed,dragThreshold:H.connectionDragThreshold})}N?v?.(U):x?.(U)},D=U=>{const{onClickConnectStart:N,onClickConnectEnd:H,connectionClickStartHandle:B,connectionMode:X,isValidConnection:nt,lib:w,rfId:R,nodeLookup:K,connection:F}=z.getState();if(!A||!B&&!u)return;if(!B){N?.(U.nativeEvent,{nodeId:A,handleId:M,handleType:n}),z.setState({connectionClickStartHandle:{nodeId:A,type:n,id:M}});return}const at=fy(U.target),ct=o||nt,{connection:st,isValid:rt}=Uf.isValid(U.nativeEvent,{handle:{nodeId:A,id:M,type:n},connectionMode:X,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:ct,flowId:R,doc:at,lib:w,nodeLookup:K});rt&&st&&et(st);const ft=structuredClone(F);delete ft.inProgress,ft.toPosition=ft.toHandle?ft.toHandle.position:null,H?.(U,ft),z.setState({connectionClickStartHandle:null})};return C.jsx("div",{"data-handleid":M,"data-nodeid":A,"data-handlepos":a,"data-id":`${T}-${A}-${M}-${n}`,className:ne(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",S,h,{source:!_,target:_,connectable:r,connectablestart:u,connectableend:f,clickconnecting:q,connectingfrom:$,connectingto:V,valid:tt,connectionindicator:r&&(!I||J)&&(I||ut?f:u)}]),onMouseDown:P,onTouchStart:P,onClick:L?D:void 0,ref:b,...p,children:g})}const Sl=Z.memo($y(y_));function v_({data:n,isConnectable:a,sourcePosition:o=mt.Bottom}){return C.jsxs(C.Fragment,{children:[n?.label,C.jsx(Sl,{type:"source",position:o,isConnectable:a})]})}function x_({data:n,isConnectable:a,targetPosition:o=mt.Top,sourcePosition:r=mt.Bottom}){return C.jsxs(C.Fragment,{children:[C.jsx(Sl,{type:"target",position:o,isConnectable:a}),n?.label,C.jsx(Sl,{type:"source",position:r,isConnectable:a})]})}function b_(){return null}function S_({data:n,isConnectable:a,targetPosition:o=mt.Top}){return C.jsxs(C.Fragment,{children:[C.jsx(Sl,{type:"target",position:o,isConnectable:a}),n?.label]})}const Es={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},J0={input:v_,default:x_,output:S_,group:b_};function E_(n){return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??n.style?.width,height:n.height??n.initialHeight??n.style?.height}:{width:n.width??n.style?.width,height:n.height??n.style?.height}}const w_=n=>{const{width:a,height:o,x:r,y:u}=_o(n.nodeLookup,{filter:f=>!!f.selected});return{width:nn(a)?a:null,height:nn(o)?o:null,userSelectionActive:n.userSelectionActive,transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]}) translate(${r}px,${u}px)`}};function __({onSelectionContextMenu:n,noPanClassName:a,disableKeyboardA11y:o}){const r=Gt(),{width:u,height:f,transformString:d,userSelectionActive:m}=zt(w_,Zt),g=Xy(),h=Z.useRef(null);if(Z.useEffect(()=>{o||h.current?.focus({preventScroll:!0})},[o]),Yy({nodeRef:h}),m||!u||!f)return null;const v=n?p=>{const b=r.getState().nodes.filter(M=>M.selected);n(p,b)}:void 0,x=p=>{Object.prototype.hasOwnProperty.call(Es,p.key)&&(p.preventDefault(),g({direction:Es[p.key],factor:p.shiftKey?4:1}))};return C.jsx("div",{className:ne(["react-flow__nodesselection","react-flow__container",a]),style:{transform:d},children:C.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:o?void 0:-1,onKeyDown:o?void 0:x,style:{width:u,height:f}})})}const F0=typeof window<"u"?window:void 0,C_=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function Gy({children:n,onPaneClick:a,onPaneMouseEnter:o,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:d,paneClickDistance:m,deleteKeyCode:g,selectionKeyCode:h,selectionOnDrag:v,selectionMode:x,onSelectionStart:p,onSelectionEnd:b,multiSelectionKeyCode:M,panActivationKeyCode:_,zoomActivationKeyCode:z,elementsSelectable:A,zoomOnScroll:L,zoomOnPinch:S,panOnScroll:T,panOnScrollSpeed:$,panOnScrollMode:V,zoomOnDoubleClick:q,panOnDrag:J,defaultViewport:I,translateExtent:ut,minZoom:tt,maxZoom:et,preventScrolling:P,onSelectionContextMenu:D,noWheelClassName:U,noPanClassName:N,disableKeyboardA11y:H,onViewportChange:B,isControlledViewport:X}){const{nodesSelectionActive:nt,userSelectionActive:w}=zt(C_),R=xo(h,{target:F0}),K=xo(_,{target:F0}),F=K||J,at=K||T,ct=v&&F!==!0,st=R||w||ct;return i_({deleteKeyCode:g,multiSelectionKeyCode:M}),C.jsx(s_,{onPaneContextMenu:f,elementsSelectable:A,zoomOnScroll:L,zoomOnPinch:S,panOnScroll:at,panOnScrollSpeed:$,panOnScrollMode:V,zoomOnDoubleClick:q,panOnDrag:!R&&F,defaultViewport:I,translateExtent:ut,minZoom:tt,maxZoom:et,zoomActivationKeyCode:z,preventScrolling:P,noWheelClassName:U,noPanClassName:N,onViewportChange:B,isControlledViewport:X,paneClickDistance:m,selectionOnDrag:ct,children:C.jsxs(d_,{onSelectionStart:p,onSelectionEnd:b,onPaneClick:a,onPaneMouseEnter:o,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:d,panOnDrag:F,isSelecting:!!st,selectionMode:x,selectionKeyPressed:R,paneClickDistance:m,selectionOnDrag:ct,children:[n,nt&&C.jsx(__,{onSelectionContextMenu:D,noPanClassName:N,disableKeyboardA11y:H})]})})}Gy.displayName="FlowRenderer";const N_=Z.memo(Gy),M_=n=>a=>n?Ff(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(o=>o.id):Array.from(a.nodeLookup.keys());function A_(n){return zt(Z.useCallback(M_(n),[n]),Zt)}const T_=n=>n.updateNodeInternals;function z_(){const n=zt(T_),[a]=Z.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(o=>{const r=new Map;o.forEach(u=>{const f=u.target.getAttribute("data-id");r.set(f,{id:f,nodeElement:u.target,force:!0})}),n(r)}));return Z.useEffect(()=>()=>{a?.disconnect()},[a]),a}function D_({node:n,nodeType:a,hasDimensions:o,resizeObserver:r}){const u=Gt(),f=Z.useRef(null),d=Z.useRef(null),m=Z.useRef(n.sourcePosition),g=Z.useRef(n.targetPosition),h=Z.useRef(a),v=o&&!!n.internals.handleBounds;return Z.useEffect(()=>{f.current&&!n.hidden&&(!v||d.current!==f.current)&&(d.current&&r?.unobserve(d.current),r?.observe(f.current),d.current=f.current)},[v,n.hidden]),Z.useEffect(()=>()=>{d.current&&(r?.unobserve(d.current),d.current=null)},[]),Z.useEffect(()=>{if(f.current){const x=h.current!==a,p=m.current!==n.sourcePosition,b=g.current!==n.targetPosition;(x||p||b)&&(h.current=a,m.current=n.sourcePosition,g.current=n.targetPosition,u.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:f.current,force:!0}]])))}},[n.id,a,n.sourcePosition,n.targetPosition]),f}function O_({id:n,onClick:a,onMouseEnter:o,onMouseMove:r,onMouseLeave:u,onContextMenu:f,onDoubleClick:d,nodesDraggable:m,elementsSelectable:g,nodesConnectable:h,nodesFocusable:v,resizeObserver:x,noDragClassName:p,noPanClassName:b,disableKeyboardA11y:M,rfId:_,nodeTypes:z,nodeClickDistance:A,onError:L}){const{node:S,internals:T,isParent:$}=zt(rt=>{const ft=rt.nodeLookup.get(n),wt=rt.parentLookup.has(n);return{node:ft,internals:ft.internals,isParent:wt}},Zt);let V=S.type||"default",q=z?.[V]||J0[V];q===void 0&&(L?.("003",mn.error003(V)),V="default",q=z?.default||J0.default);const J=!!(S.draggable||m&&typeof S.draggable>"u"),I=!!(S.selectable||g&&typeof S.selectable>"u"),ut=!!(S.connectable||h&&typeof S.connectable>"u"),tt=!!(S.focusable||v&&typeof S.focusable>"u"),et=Gt(),P=uy(S),D=D_({node:S,nodeType:V,hasDimensions:P,resizeObserver:x}),U=Yy({nodeRef:D,disabled:S.hidden||!J,noDragClassName:p,handleSelector:S.dragHandle,nodeId:n,isSelectable:I,nodeClickDistance:A}),N=Xy();if(S.hidden)return null;const H=$n(S),B=E_(S),X=I||J||a||o||r||u,nt=o?rt=>o(rt,{...T.userNode}):void 0,w=r?rt=>r(rt,{...T.userNode}):void 0,R=u?rt=>u(rt,{...T.userNode}):void 0,K=f?rt=>f(rt,{...T.userNode}):void 0,F=d?rt=>d(rt,{...T.userNode}):void 0,at=rt=>{const{selectNodesOnDrag:ft,nodeDragThreshold:wt}=et.getState();I&&(!ft||!J||wt>0)&&Vf({id:n,store:et,nodeRef:D}),a&&a(rt,{...T.userNode})},ct=rt=>{if(!(dy(rt.nativeEvent)||M)){if(ty.includes(rt.key)&&I){const ft=rt.key==="Escape";Vf({id:n,store:et,unselect:ft,nodeRef:D})}else if(J&&S.selected&&Object.prototype.hasOwnProperty.call(Es,rt.key)){rt.preventDefault();const{ariaLabelConfig:ft}=et.getState();et.setState({ariaLiveMessage:ft["node.a11yDescription.ariaLiveMessage"]({direction:rt.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),N({direction:Es[rt.key],factor:rt.shiftKey?4:1})}}},st=()=>{if(M||!D.current?.matches(":focus-visible"))return;const{transform:rt,width:ft,height:wt,autoPanOnNodeFocus:bt,setCenter:pt}=et.getState();if(!bt)return;Ff(new Map([[n,S]]),{x:0,y:0,width:ft,height:wt},rt,!0).length>0||pt(S.position.x+H.width/2,S.position.y+H.height/2,{zoom:rt[2]})};return C.jsx("div",{className:ne(["react-flow__node",`react-flow__node-${V}`,{[b]:J},S.className,{selected:S.selected,selectable:I,parent:$,draggable:J,dragging:U}]),ref:D,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:X?"all":"none",visibility:P?"visible":"hidden",...S.style,...B},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:nt,onMouseMove:w,onMouseLeave:R,onContextMenu:K,onClick:at,onDoubleClick:F,onKeyDown:tt?ct:void 0,tabIndex:tt?0:void 0,onFocus:tt?st:void 0,role:S.ariaRole??(tt?"group":void 0),"aria-roledescription":"node","aria-describedby":M?void 0:`${Hy}-${_}`,"aria-label":S.ariaLabel,...S.domAttributes,children:C.jsx(m_,{value:n,children:C.jsx(q,{id:n,data:S.data,type:V,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:S.selected??!1,selectable:I,draggable:J,deletable:S.deletable??!0,isConnectable:ut,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:U,dragHandle:S.dragHandle,zIndex:T.z,parentId:S.parentId,...H})})})}var R_=Z.memo(O_);const H_=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function Zy(n){const{nodesDraggable:a,nodesConnectable:o,nodesFocusable:r,elementsSelectable:u,onError:f}=zt(H_,Zt),d=A_(n.onlyRenderVisibleElements),m=z_();return C.jsx("div",{className:"react-flow__nodes",style:js,children:d.map(g=>C.jsx(R_,{id:g,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:m,nodesDraggable:a,nodesConnectable:o,nodesFocusable:r,elementsSelectable:u,nodeClickDistance:n.nodeClickDistance,onError:f},g))})}Zy.displayName="NodeRenderer";const j_=Z.memo(Zy);function L_(n){return zt(Z.useCallback(o=>{if(!n)return o.edges.map(u=>u.id);const r=[];if(o.width&&o.height)for(const u of o.edges){const f=o.nodeLookup.get(u.source),d=o.nodeLookup.get(u.target);f&&d&&BE({sourceNode:f,targetNode:d,width:o.width,height:o.height,transform:o.transform})&&r.push(u.id)}return r},[n]),Zt)}const B_=({color:n="none",strokeWidth:a=1})=>{const o={strokeWidth:a,...n&&{stroke:n}};return C.jsx("polyline",{className:"arrow",style:o,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},U_=({color:n="none",strokeWidth:a=1})=>{const o={strokeWidth:a,...n&&{stroke:n,fill:n}};return C.jsx("polyline",{className:"arrowclosed",style:o,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},I0={[Wl.Arrow]:B_,[Wl.ArrowClosed]:U_};function V_(n){const a=Gt();return Z.useMemo(()=>Object.prototype.hasOwnProperty.call(I0,n)?I0[n]:(a.getState().onError?.("009",mn.error009(n)),null),[n])}const $_=({id:n,type:a,color:o,width:r=12.5,height:u=12.5,markerUnits:f="strokeWidth",strokeWidth:d,orient:m="auto-start-reverse"})=>{const g=V_(a);return g?C.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${r}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:m,refX:"0",refY:"0",children:C.jsx(g,{color:o,strokeWidth:d})}):null},Qy=({defaultColor:n,rfId:a})=>{const o=zt(f=>f.edges),r=zt(f=>f.defaultEdgeOptions),u=Z.useMemo(()=>kE(o,{id:a,defaultColor:n,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[o,r,a,n]);return u.length?C.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:C.jsx("defs",{children:u.map(f=>C.jsx($_,{id:f.id,type:f.type,color:f.color,width:f.width,height:f.height,markerUnits:f.markerUnits,strokeWidth:f.strokeWidth,orient:f.orient},f.id))})}):null};Qy.displayName="MarkerDefinitions";var q_=Z.memo(Qy);function Ky({x:n,y:a,label:o,labelStyle:r,labelShowBg:u=!0,labelBgStyle:f,labelBgPadding:d=[2,4],labelBgBorderRadius:m=2,children:g,className:h,...v}){const[x,p]=Z.useState({x:1,y:0,width:0,height:0}),b=ne(["react-flow__edge-textwrapper",h]),M=Z.useRef(null);return Z.useEffect(()=>{if(M.current){const _=M.current.getBBox();p({x:_.x,y:_.y,width:_.width,height:_.height})}},[o]),o?C.jsxs("g",{transform:`translate(${n-x.width/2} ${a-x.height/2})`,className:b,visibility:x.width?"visible":"hidden",...v,children:[u&&C.jsx("rect",{width:x.width+2*d[0],x:-d[0],y:-d[1],height:x.height+2*d[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),C.jsx("text",{className:"react-flow__edge-text",y:x.height/2,dy:"0.3em",ref:M,style:r,children:o}),g]}):null}Ky.displayName="EdgeText";const Y_=Z.memo(Ky);function Ls({path:n,labelX:a,labelY:o,label:r,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:g,interactionWidth:h=20,...v}){return C.jsxs(C.Fragment,{children:[C.jsx("path",{...v,d:n,fill:"none",className:ne(["react-flow__edge-path",v.className])}),h?C.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,r&&nn(a)&&nn(o)?C.jsx(Y_,{x:a,y:o,label:r,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:g}):null]})}function W0({pos:n,x1:a,y1:o,x2:r,y2:u}){return n===mt.Left||n===mt.Right?[.5*(a+r),o]:[a,.5*(o+u)]}function Jy({sourceX:n,sourceY:a,sourcePosition:o=mt.Bottom,targetX:r,targetY:u,targetPosition:f=mt.Top}){const[d,m]=W0({pos:o,x1:n,y1:a,x2:r,y2:u}),[g,h]=W0({pos:f,x1:r,y1:u,x2:n,y2:a}),[v,x,p,b]=my({sourceX:n,sourceY:a,targetX:r,targetY:u,sourceControlX:d,sourceControlY:m,targetControlX:g,targetControlY:h});return[`M${n},${a} C${d},${m} ${g},${h} ${r},${u}`,v,x,p,b]}function Fy(n){return Z.memo(({id:a,sourceX:o,sourceY:r,targetX:u,targetY:f,sourcePosition:d,targetPosition:m,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:b,style:M,markerEnd:_,markerStart:z,interactionWidth:A})=>{const[L,S,T]=Jy({sourceX:o,sourceY:r,sourcePosition:d,targetX:u,targetY:f,targetPosition:m}),$=n.isInternal?void 0:a;return C.jsx(Ls,{id:$,path:L,labelX:S,labelY:T,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:b,style:M,markerEnd:_,markerStart:z,interactionWidth:A})})}const X_=Fy({isInternal:!1}),Iy=Fy({isInternal:!0});X_.displayName="SimpleBezierEdge";Iy.displayName="SimpleBezierEdgeInternal";function Wy(n){return Z.memo(({id:a,sourceX:o,sourceY:r,targetX:u,targetY:f,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:x,style:p,sourcePosition:b=mt.Bottom,targetPosition:M=mt.Top,markerEnd:_,markerStart:z,pathOptions:A,interactionWidth:L})=>{const[S,T,$]=jf({sourceX:o,sourceY:r,sourcePosition:b,targetX:u,targetY:f,targetPosition:M,borderRadius:A?.borderRadius,offset:A?.offset,stepPosition:A?.stepPosition}),V=n.isInternal?void 0:a;return C.jsx(Ls,{id:V,path:S,labelX:T,labelY:$,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:x,style:p,markerEnd:_,markerStart:z,interactionWidth:L})})}const Py=Wy({isInternal:!1}),tv=Wy({isInternal:!0});Py.displayName="SmoothStepEdge";tv.displayName="SmoothStepEdgeInternal";function ev(n){return Z.memo(({id:a,...o})=>{const r=n.isInternal?void 0:a;return C.jsx(Py,{...o,id:r,pathOptions:Z.useMemo(()=>({borderRadius:0,offset:o.pathOptions?.offset}),[o.pathOptions?.offset])})})}const k_=ev({isInternal:!1}),nv=ev({isInternal:!0});k_.displayName="StepEdge";nv.displayName="StepEdgeInternal";function lv(n){return Z.memo(({id:a,sourceX:o,sourceY:r,targetX:u,targetY:f,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:x,style:p,markerEnd:b,markerStart:M,interactionWidth:_})=>{const[z,A,L]=vy({sourceX:o,sourceY:r,targetX:u,targetY:f}),S=n.isInternal?void 0:a;return C.jsx(Ls,{id:S,path:z,labelX:A,labelY:L,label:d,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:x,style:p,markerEnd:b,markerStart:M,interactionWidth:_})})}const G_=lv({isInternal:!1}),av=lv({isInternal:!0});G_.displayName="StraightEdge";av.displayName="StraightEdgeInternal";function iv(n){return Z.memo(({id:a,sourceX:o,sourceY:r,targetX:u,targetY:f,sourcePosition:d=mt.Bottom,targetPosition:m=mt.Top,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:b,style:M,markerEnd:_,markerStart:z,pathOptions:A,interactionWidth:L})=>{const[S,T,$]=gy({sourceX:o,sourceY:r,sourcePosition:d,targetX:u,targetY:f,targetPosition:m,curvature:A?.curvature}),V=n.isInternal?void 0:a;return C.jsx(Ls,{id:V,path:S,labelX:T,labelY:$,label:g,labelStyle:h,labelShowBg:v,labelBgStyle:x,labelBgPadding:p,labelBgBorderRadius:b,style:M,markerEnd:_,markerStart:z,interactionWidth:L})})}const Z_=iv({isInternal:!1}),ov=iv({isInternal:!0});Z_.displayName="BezierEdge";ov.displayName="BezierEdgeInternal";const P0={default:ov,straight:av,step:nv,smoothstep:tv,simplebezier:Iy},tp={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Q_=(n,a,o)=>o===mt.Left?n-a:o===mt.Right?n+a:n,K_=(n,a,o)=>o===mt.Top?n-a:o===mt.Bottom?n+a:n,ep="react-flow__edgeupdater";function np({position:n,centerX:a,centerY:o,radius:r=10,onMouseDown:u,onMouseEnter:f,onMouseOut:d,type:m}){return C.jsx("circle",{onMouseDown:u,onMouseEnter:f,onMouseOut:d,className:ne([ep,`${ep}-${m}`]),cx:Q_(a,r,n),cy:K_(o,r,n),r,stroke:"transparent",fill:"transparent"})}function J_({isReconnectable:n,reconnectRadius:a,edge:o,sourceX:r,sourceY:u,targetX:f,targetY:d,sourcePosition:m,targetPosition:g,onReconnect:h,onReconnectStart:v,onReconnectEnd:x,setReconnecting:p,setUpdateHover:b}){const M=Gt(),_=(T,$)=>{if(T.button!==0)return;const{autoPanOnConnect:V,domNode:q,isValidConnection:J,connectionMode:I,connectionRadius:ut,lib:tt,onConnectStart:et,onConnectEnd:P,cancelConnection:D,nodeLookup:U,rfId:N,panBy:H,updateConnection:B}=M.getState(),X=$.type==="target",nt=(K,F)=>{p(!1),x?.(K,o,$.type,F)},w=K=>h?.(o,K),R=(K,F)=>{p(!0),v?.(T,o,$.type),et?.(K,F)};Uf.onPointerDown(T.nativeEvent,{autoPanOnConnect:V,connectionMode:I,connectionRadius:ut,domNode:q,handleId:$.id,nodeId:$.nodeId,nodeLookup:U,isTarget:X,edgeUpdaterType:$.type,lib:tt,flowId:N,cancelConnection:D,panBy:H,isValidConnection:J,onConnect:w,onConnectStart:R,onConnectEnd:P,onReconnectEnd:nt,updateConnection:B,getTransform:()=>M.getState().transform,getFromHandle:()=>M.getState().connection.fromHandle,dragThreshold:M.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},z=T=>_(T,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),A=T=>_(T,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),L=()=>b(!0),S=()=>b(!1);return C.jsxs(C.Fragment,{children:[(n===!0||n==="source")&&C.jsx(np,{position:m,centerX:r,centerY:u,radius:a,onMouseDown:z,onMouseEnter:L,onMouseOut:S,type:"source"}),(n===!0||n==="target")&&C.jsx(np,{position:g,centerX:f,centerY:d,radius:a,onMouseDown:A,onMouseEnter:L,onMouseOut:S,type:"target"})]})}function F_({id:n,edgesFocusable:a,edgesReconnectable:o,elementsSelectable:r,onClick:u,onDoubleClick:f,onContextMenu:d,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,reconnectRadius:v,onReconnect:x,onReconnectStart:p,onReconnectEnd:b,rfId:M,edgeTypes:_,noPanClassName:z,onError:A,disableKeyboardA11y:L}){let S=zt(pt=>pt.edgeLookup.get(n));const T=zt(pt=>pt.defaultEdgeOptions);S=T?{...T,...S}:S;let $=S.type||"default",V=_?.[$]||P0[$];V===void 0&&(A?.("011",mn.error011($)),$="default",V=_?.default||P0.default);const q=!!(S.focusable||a&&typeof S.focusable>"u"),J=typeof x<"u"&&(S.reconnectable||o&&typeof S.reconnectable>"u"),I=!!(S.selectable||r&&typeof S.selectable>"u"),ut=Z.useRef(null),[tt,et]=Z.useState(!1),[P,D]=Z.useState(!1),U=Gt(),{zIndex:N,sourceX:H,sourceY:B,targetX:X,targetY:nt,sourcePosition:w,targetPosition:R}=zt(Z.useCallback(pt=>{const vt=pt.nodeLookup.get(S.source),St=pt.nodeLookup.get(S.target);if(!vt||!St)return{zIndex:S.zIndex,...tp};const Lt=XE({id:n,sourceNode:vt,targetNode:St,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:pt.connectionMode,onError:A});return{zIndex:LE({selected:S.selected,zIndex:S.zIndex,sourceNode:vt,targetNode:St,elevateOnSelect:pt.elevateEdgesOnSelect}),...Lt||tp}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex]),Zt),K=Z.useMemo(()=>S.markerStart?`url('#${Lf(S.markerStart,M)}')`:void 0,[S.markerStart,M]),F=Z.useMemo(()=>S.markerEnd?`url('#${Lf(S.markerEnd,M)}')`:void 0,[S.markerEnd,M]);if(S.hidden||H===null||B===null||X===null||nt===null)return null;const at=pt=>{const{addSelectedEdges:vt,unselectNodesAndEdges:St,multiSelectionActive:Lt}=U.getState();I&&(U.setState({nodesSelectionActive:!1}),S.selected&&Lt?(St({nodes:[],edges:[S]}),ut.current?.blur()):vt([n])),u&&u(pt,S)},ct=f?pt=>{f(pt,{...S})}:void 0,st=d?pt=>{d(pt,{...S})}:void 0,rt=m?pt=>{m(pt,{...S})}:void 0,ft=g?pt=>{g(pt,{...S})}:void 0,wt=h?pt=>{h(pt,{...S})}:void 0,bt=pt=>{if(!L&&ty.includes(pt.key)&&I){const{unselectNodesAndEdges:vt,addSelectedEdges:St}=U.getState();pt.key==="Escape"?(ut.current?.blur(),vt({edges:[S]})):St([n])}};return C.jsx("svg",{style:{zIndex:N},children:C.jsxs("g",{className:ne(["react-flow__edge",`react-flow__edge-${$}`,S.className,z,{selected:S.selected,animated:S.animated,inactive:!I&&!u,updating:tt,selectable:I}]),onClick:at,onDoubleClick:ct,onContextMenu:st,onMouseEnter:rt,onMouseMove:ft,onMouseLeave:wt,onKeyDown:q?bt:void 0,tabIndex:q?0:void 0,role:S.ariaRole??(q?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":`rf__edge-${n}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":q?`${jy}-${M}`:void 0,ref:ut,...S.domAttributes,children:[!P&&C.jsx(V,{id:n,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:I,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:H,sourceY:B,targetX:X,targetY:nt,sourcePosition:w,targetPosition:R,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:K,markerEnd:F,pathOptions:"pathOptions"in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),J&&C.jsx(J_,{edge:S,isReconnectable:J,reconnectRadius:v,onReconnect:x,onReconnectStart:p,onReconnectEnd:b,sourceX:H,sourceY:B,targetX:X,targetY:nt,sourcePosition:w,targetPosition:R,setUpdateHover:et,setReconnecting:D})]})})}var I_=Z.memo(F_);const W_=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function rv({defaultMarkerColor:n,onlyRenderVisibleElements:a,rfId:o,edgeTypes:r,noPanClassName:u,onReconnect:f,onEdgeContextMenu:d,onEdgeMouseEnter:m,onEdgeMouseMove:g,onEdgeMouseLeave:h,onEdgeClick:v,reconnectRadius:x,onEdgeDoubleClick:p,onReconnectStart:b,onReconnectEnd:M,disableKeyboardA11y:_}){const{edgesFocusable:z,edgesReconnectable:A,elementsSelectable:L,onError:S}=zt(W_,Zt),T=L_(a);return C.jsxs("div",{className:"react-flow__edges",children:[C.jsx(q_,{defaultColor:n,rfId:o}),T.map($=>C.jsx(I_,{id:$,edgesFocusable:z,edgesReconnectable:A,elementsSelectable:L,noPanClassName:u,onReconnect:f,onContextMenu:d,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,onClick:v,reconnectRadius:x,onDoubleClick:p,onReconnectStart:b,onReconnectEnd:M,rfId:o,onError:S,edgeTypes:r,disableKeyboardA11y:_},$))]})}rv.displayName="EdgeRenderer";const P_=Z.memo(rv),t3=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function e3({children:n}){const a=zt(t3);return C.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:n})}function n3(n){const a=ld(),o=Z.useRef(!1);Z.useEffect(()=>{!o.current&&a.viewportInitialized&&n&&(setTimeout(()=>n(a),1),o.current=!0)},[n,a.viewportInitialized])}const l3=n=>n.panZoom?.syncViewport;function a3(n){const a=zt(l3),o=Gt();return Z.useEffect(()=>{n&&(a?.(n),o.setState({transform:[n.x,n.y,n.zoom]}))},[n,a]),null}function i3(n){return n.connection.inProgress?{...n.connection,to:No(n.connection.to,n.transform)}:{...n.connection}}function o3(n){return i3}function r3(n){const a=o3();return zt(a,Zt)}const s3=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function u3({containerStyle:n,style:a,type:o,component:r}){const{nodesConnectable:u,width:f,height:d,isValid:m,inProgress:g}=zt(s3,Zt);return!(f&&u&&g)?null:C.jsx("svg",{style:n,width:f,height:d,className:"react-flow__connectionline react-flow__container",children:C.jsx("g",{className:ne(["react-flow__connection",ly(m)]),children:C.jsx(sv,{style:a,type:o,CustomComponent:r,isValid:m})})})}const sv=({style:n,type:a=bl.Bezier,CustomComponent:o,isValid:r})=>{const{inProgress:u,from:f,fromNode:d,fromHandle:m,fromPosition:g,to:h,toNode:v,toHandle:x,toPosition:p}=r3();if(!u)return;if(o)return C.jsx(o,{connectionLineType:a,connectionLineStyle:n,fromNode:d,fromHandle:m,fromX:f.x,fromY:f.y,toX:h.x,toY:h.y,fromPosition:g,toPosition:p,connectionStatus:ly(r),toNode:v,toHandle:x});let b="";const M={sourceX:f.x,sourceY:f.y,sourcePosition:g,targetX:h.x,targetY:h.y,targetPosition:p};switch(a){case bl.Bezier:[b]=gy(M);break;case bl.SimpleBezier:[b]=Jy(M);break;case bl.Step:[b]=jf({...M,borderRadius:0});break;case bl.SmoothStep:[b]=jf(M);break;default:[b]=vy(M)}return C.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:n})};sv.displayName="ConnectionLine";const c3={};function lp(n=c3){Z.useRef(n),Gt(),Z.useEffect(()=>{},[n])}function f3(){Gt(),Z.useRef(!1),Z.useEffect(()=>{},[])}function uv({nodeTypes:n,edgeTypes:a,onInit:o,onNodeClick:r,onEdgeClick:u,onNodeDoubleClick:f,onEdgeDoubleClick:d,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:v,onSelectionContextMenu:x,onSelectionStart:p,onSelectionEnd:b,connectionLineType:M,connectionLineStyle:_,connectionLineComponent:z,connectionLineContainerStyle:A,selectionKeyCode:L,selectionOnDrag:S,selectionMode:T,multiSelectionKeyCode:$,panActivationKeyCode:V,zoomActivationKeyCode:q,deleteKeyCode:J,onlyRenderVisibleElements:I,elementsSelectable:ut,defaultViewport:tt,translateExtent:et,minZoom:P,maxZoom:D,preventScrolling:U,defaultMarkerColor:N,zoomOnScroll:H,zoomOnPinch:B,panOnScroll:X,panOnScrollSpeed:nt,panOnScrollMode:w,zoomOnDoubleClick:R,panOnDrag:K,onPaneClick:F,onPaneMouseEnter:at,onPaneMouseMove:ct,onPaneMouseLeave:st,onPaneScroll:rt,onPaneContextMenu:ft,paneClickDistance:wt,nodeClickDistance:bt,onEdgeContextMenu:pt,onEdgeMouseEnter:vt,onEdgeMouseMove:St,onEdgeMouseLeave:Lt,reconnectRadius:$t,onReconnect:oe,onReconnectStart:$e,onReconnectEnd:Je,noDragClassName:qn,noWheelClassName:Yn,noPanClassName:_l,disableKeyboardA11y:Cl,nodeExtent:se,rfId:na,viewport:pn,onViewportChange:Xn}){return lp(n),lp(a),f3(),n3(o),a3(pn),C.jsx(N_,{onPaneClick:F,onPaneMouseEnter:at,onPaneMouseMove:ct,onPaneMouseLeave:st,onPaneContextMenu:ft,onPaneScroll:rt,paneClickDistance:wt,deleteKeyCode:J,selectionKeyCode:L,selectionOnDrag:S,selectionMode:T,onSelectionStart:p,onSelectionEnd:b,multiSelectionKeyCode:$,panActivationKeyCode:V,zoomActivationKeyCode:q,elementsSelectable:ut,zoomOnScroll:H,zoomOnPinch:B,zoomOnDoubleClick:R,panOnScroll:X,panOnScrollSpeed:nt,panOnScrollMode:w,panOnDrag:K,defaultViewport:tt,translateExtent:et,minZoom:P,maxZoom:D,onSelectionContextMenu:x,preventScrolling:U,noDragClassName:qn,noWheelClassName:Yn,noPanClassName:_l,disableKeyboardA11y:Cl,onViewportChange:Xn,isControlledViewport:!!pn,children:C.jsxs(e3,{children:[C.jsx(P_,{edgeTypes:a,onEdgeClick:u,onEdgeDoubleClick:d,onReconnect:oe,onReconnectStart:$e,onReconnectEnd:Je,onlyRenderVisibleElements:I,onEdgeContextMenu:pt,onEdgeMouseEnter:vt,onEdgeMouseMove:St,onEdgeMouseLeave:Lt,reconnectRadius:$t,defaultMarkerColor:N,noPanClassName:_l,disableKeyboardA11y:Cl,rfId:na}),C.jsx(u3,{style:_,type:M,component:z,containerStyle:A}),C.jsx("div",{className:"react-flow__edgelabel-renderer"}),C.jsx(j_,{nodeTypes:n,onNodeClick:r,onNodeDoubleClick:f,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:v,nodeClickDistance:bt,onlyRenderVisibleElements:I,noPanClassName:_l,noDragClassName:qn,disableKeyboardA11y:Cl,nodeExtent:se,rfId:na}),C.jsx("div",{className:"react-flow__viewport-portal"})]})})}uv.displayName="GraphView";const d3=Z.memo(uv),ap=({nodes:n,edges:a,defaultNodes:o,defaultEdges:r,width:u,height:f,fitView:d,fitViewOptions:m,minZoom:g=.5,maxZoom:h=2,nodeOrigin:v,nodeExtent:x}={})=>{const p=new Map,b=new Map,M=new Map,_=new Map,z=r??a??[],A=o??n??[],L=v??[0,0],S=x??mo;Sy(M,_,z);const T=Bf(A,p,b,{nodeOrigin:L,nodeExtent:S,elevateNodesOnSelect:!1});let $=[0,0,1];if(d&&u&&f){const V=_o(p,{filter:ut=>!!((ut.width||ut.initialWidth)&&(ut.height||ut.initialHeight))}),{x:q,y:J,zoom:I}=If(V,u,f,g,h,m?.padding??.1);$=[q,J,I]}return{rfId:"1",width:u??0,height:f??0,transform:$,nodes:A,nodesInitialized:T,nodeLookup:p,parentLookup:b,edges:z,edgeLookup:_,connectionLookup:M,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:o!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:g,maxZoom:h,translateExtent:mo,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ni.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:L,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:m,fitViewResolver:null,connection:{...ny},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:zE,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:ey}},h3=({nodes:n,edges:a,defaultNodes:o,defaultEdges:r,width:u,height:f,fitView:d,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:v,nodeExtent:x})=>Dw((p,b)=>{async function M(){const{nodeLookup:_,panZoom:z,fitViewOptions:A,fitViewResolver:L,width:S,height:T,minZoom:$,maxZoom:V}=b();z&&(await AE({nodes:_,width:S,height:T,panZoom:z,minZoom:$,maxZoom:V},A),L?.resolve(!0),p({fitViewResolver:null}))}return{...ap({nodes:n,edges:a,width:u,height:f,fitView:d,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:v,nodeExtent:x,defaultNodes:o,defaultEdges:r}),setNodes:_=>{const{nodeLookup:z,parentLookup:A,nodeOrigin:L,elevateNodesOnSelect:S,fitViewQueued:T}=b(),$=Bf(_,z,A,{nodeOrigin:L,nodeExtent:x,elevateNodesOnSelect:S,checkEquality:!0});T&&$?(M(),p({nodes:_,nodesInitialized:$,fitViewQueued:!1,fitViewOptions:void 0})):p({nodes:_,nodesInitialized:$})},setEdges:_=>{const{connectionLookup:z,edgeLookup:A}=b();Sy(z,A,_),p({edges:_})},setDefaultNodesAndEdges:(_,z)=>{if(_){const{setNodes:A}=b();A(_),p({hasDefaultNodes:!0})}if(z){const{setEdges:A}=b();A(z),p({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:z,nodeLookup:A,parentLookup:L,domNode:S,nodeOrigin:T,nodeExtent:$,debug:V,fitViewQueued:q}=b(),{changes:J,updatedInternals:I}=IE(_,A,L,S,T,$);I&&(QE(A,L,{nodeOrigin:T,nodeExtent:$}),q?(M(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),J?.length>0&&(V&&console.log("React Flow: trigger node changes",J),z?.(J)))},updateNodePositions:(_,z=!1)=>{const A=[],L=[],{nodeLookup:S,triggerNodeChanges:T}=b();for(const[$,V]of _){const q=S.get($),J=!!(q?.expandParent&&q?.parentId&&V?.position),I={id:$,type:"position",position:J?{x:Math.max(0,V.position.x),y:Math.max(0,V.position.y)}:V.position,dragging:z};J&&q.parentId&&A.push({id:$,parentId:q.parentId,rect:{...V.internals.positionAbsolute,width:V.measured.width??0,height:V.measured.height??0}}),L.push(I)}if(A.length>0){const{parentLookup:$,nodeOrigin:V}=b(),q=nd(A,S,$,V);L.push(...q)}T(L)},triggerNodeChanges:_=>{const{onNodesChange:z,setNodes:A,nodes:L,hasDefaultNodes:S,debug:T}=b();if(_?.length){if(S){const $=Uy(_,L);A($)}T&&console.log("React Flow: trigger node changes",_),z?.(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:z,setEdges:A,edges:L,hasDefaultEdges:S,debug:T}=b();if(_?.length){if(S){const $=Vy(_,L);A($)}T&&console.log("React Flow: trigger edge changes",_),z?.(_)}},addSelectedNodes:_=>{const{multiSelectionActive:z,edgeLookup:A,nodeLookup:L,triggerNodeChanges:S,triggerEdgeChanges:T}=b();if(z){const $=_.map(V=>Kl(V,!0));S($);return}S(Ia(L,new Set([..._]),!0)),T(Ia(A))},addSelectedEdges:_=>{const{multiSelectionActive:z,edgeLookup:A,nodeLookup:L,triggerNodeChanges:S,triggerEdgeChanges:T}=b();if(z){const $=_.map(V=>Kl(V,!0));T($);return}T(Ia(A,new Set([..._]))),S(Ia(L,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:z}={})=>{const{edges:A,nodes:L,nodeLookup:S,triggerNodeChanges:T,triggerEdgeChanges:$}=b(),V=_||L,q=z||A,J=V.map(ut=>{const tt=S.get(ut.id);return tt&&(tt.selected=!1),Kl(ut.id,!1)}),I=q.map(ut=>Kl(ut.id,!1));T(J),$(I)},setMinZoom:_=>{const{panZoom:z,maxZoom:A}=b();z?.setScaleExtent([_,A]),p({minZoom:_})},setMaxZoom:_=>{const{panZoom:z,minZoom:A}=b();z?.setScaleExtent([A,_]),p({maxZoom:_})},setTranslateExtent:_=>{b().panZoom?.setTranslateExtent(_),p({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:z,triggerNodeChanges:A,triggerEdgeChanges:L,elementsSelectable:S}=b();if(!S)return;const T=z.reduce((V,q)=>q.selected?[...V,Kl(q.id,!1)]:V,[]),$=_.reduce((V,q)=>q.selected?[...V,Kl(q.id,!1)]:V,[]);A(T),L($)},setNodeExtent:_=>{const{nodes:z,nodeLookup:A,parentLookup:L,nodeOrigin:S,elevateNodesOnSelect:T,nodeExtent:$}=b();_[0][0]===$[0][0]&&_[0][1]===$[0][1]&&_[1][0]===$[1][0]&&_[1][1]===$[1][1]||(Bf(z,A,L,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:T,checkEquality:!1}),p({nodeExtent:_}))},panBy:_=>{const{transform:z,width:A,height:L,panZoom:S,translateExtent:T}=b();return WE({delta:_,panZoom:S,transform:z,translateExtent:T,width:A,height:L})},setCenter:async(_,z,A)=>{const{width:L,height:S,maxZoom:T,panZoom:$}=b();if(!$)return Promise.resolve(!1);const V=typeof A?.zoom<"u"?A.zoom:T;return await $.setViewport({x:L/2-_*V,y:S/2-z*V,zoom:V},{duration:A?.duration,ease:A?.ease,interpolate:A?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...ny}})},updateConnection:_=>{p({connection:_})},reset:()=>p({...ap()})}},Object.is);function m3({initialNodes:n,initialEdges:a,defaultNodes:o,defaultEdges:r,initialWidth:u,initialHeight:f,initialMinZoom:d,initialMaxZoom:m,initialFitViewOptions:g,fitView:h,nodeOrigin:v,nodeExtent:x,children:p}){const[b]=Z.useState(()=>h3({nodes:n,edges:a,defaultNodes:o,defaultEdges:r,width:u,height:f,fitView:h,minZoom:d,maxZoom:m,fitViewOptions:g,nodeOrigin:v,nodeExtent:x}));return C.jsx(Ow,{value:b,children:C.jsx(e_,{children:p})})}function g3({children:n,nodes:a,edges:o,defaultNodes:r,defaultEdges:u,width:f,height:d,fitView:m,fitViewOptions:g,minZoom:h,maxZoom:v,nodeOrigin:x,nodeExtent:p}){return Z.useContext(Rs)?C.jsx(C.Fragment,{children:n}):C.jsx(m3,{initialNodes:a,initialEdges:o,defaultNodes:r,defaultEdges:u,initialWidth:f,initialHeight:d,fitView:m,initialFitViewOptions:g,initialMinZoom:h,initialMaxZoom:v,nodeOrigin:x,nodeExtent:p,children:n})}const p3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function y3({nodes:n,edges:a,defaultNodes:o,defaultEdges:r,className:u,nodeTypes:f,edgeTypes:d,onNodeClick:m,onEdgeClick:g,onInit:h,onMove:v,onMoveStart:x,onMoveEnd:p,onConnect:b,onConnectStart:M,onConnectEnd:_,onClickConnectStart:z,onClickConnectEnd:A,onNodeMouseEnter:L,onNodeMouseMove:S,onNodeMouseLeave:T,onNodeContextMenu:$,onNodeDoubleClick:V,onNodeDragStart:q,onNodeDrag:J,onNodeDragStop:I,onNodesDelete:ut,onEdgesDelete:tt,onDelete:et,onSelectionChange:P,onSelectionDragStart:D,onSelectionDrag:U,onSelectionDragStop:N,onSelectionContextMenu:H,onSelectionStart:B,onSelectionEnd:X,onBeforeDelete:nt,connectionMode:w,connectionLineType:R=bl.Bezier,connectionLineStyle:K,connectionLineComponent:F,connectionLineContainerStyle:at,deleteKeyCode:ct="Backspace",selectionKeyCode:st="Shift",selectionOnDrag:rt=!1,selectionMode:ft=go.Full,panActivationKeyCode:wt="Space",multiSelectionKeyCode:bt=yo()?"Meta":"Control",zoomActivationKeyCode:pt=yo()?"Meta":"Control",snapToGrid:vt,snapGrid:St,onlyRenderVisibleElements:Lt=!1,selectNodesOnDrag:$t,nodesDraggable:oe,autoPanOnNodeFocus:$e,nodesConnectable:Je,nodesFocusable:qn,nodeOrigin:Yn=Ly,edgesFocusable:_l,edgesReconnectable:Cl,elementsSelectable:se=!0,defaultViewport:na=Gw,minZoom:pn=.5,maxZoom:Xn=2,translateExtent:Nl=mo,preventScrolling:Vs=!0,nodeExtent:la,defaultMarkerColor:$s="#b1b1b7",zoomOnScroll:qs=!0,zoomOnPinch:Ml=!0,panOnScroll:pe=!1,panOnScrollSpeed:on=.5,panOnScrollMode:ye=Il.Free,zoomOnDoubleClick:Ys=!0,panOnDrag:Xs=!0,onPaneClick:ks,onPaneMouseEnter:aa,onPaneMouseMove:ia,onPaneMouseLeave:oa,onPaneScroll:yn,onPaneContextMenu:ra,paneClickDistance:Al=0,nodeClickDistance:Gs=0,children:Mo,onReconnect:ri,onReconnectStart:Tl,onReconnectEnd:Zs,onEdgeContextMenu:Ao,onEdgeDoubleClick:To,onEdgeMouseEnter:zo,onEdgeMouseMove:si,onEdgeMouseLeave:ui,reconnectRadius:Do=10,onNodesChange:Oo,onEdgesChange:rn,noDragClassName:le="nodrag",noWheelClassName:he="nowheel",noPanClassName:vn="nopan",fitView:sa,fitViewOptions:Ro,connectOnClick:Qs,attributionPosition:Ho,proOptions:zl,defaultEdgeOptions:ci,elevateNodesOnSelect:kn,elevateEdgesOnSelect:Gn,disableKeyboardA11y:Zn=!1,autoPanOnConnect:Qn,autoPanOnNodeDrag:It,autoPanSpeed:jo,connectionRadius:Lo,isValidConnection:xn,onError:Kn,style:Ks,id:fi,nodeDragThreshold:Bo,connectionDragThreshold:Js,viewport:ua,onViewportChange:ca,width:Fe,height:xe,colorMode:Uo="light",debug:Fs,onScroll:fa,ariaLabelConfig:Vo,...da},Is){const me=fi||"1",di=Jw(Uo),$o=Z.useCallback(ha=>{ha.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fa?.(ha)},[fa]);return C.jsx("div",{"data-testid":"rf__wrapper",...da,onScroll:$o,style:{...Ks,...p3},ref:Is,className:ne(["react-flow",u,di]),id:fi,role:"application",children:C.jsxs(g3,{nodes:n,edges:a,width:Fe,height:xe,fitView:sa,fitViewOptions:Ro,minZoom:pn,maxZoom:Xn,nodeOrigin:Yn,nodeExtent:la,children:[C.jsx(d3,{onInit:h,onNodeClick:m,onEdgeClick:g,onNodeMouseEnter:L,onNodeMouseMove:S,onNodeMouseLeave:T,onNodeContextMenu:$,onNodeDoubleClick:V,nodeTypes:f,edgeTypes:d,connectionLineType:R,connectionLineStyle:K,connectionLineComponent:F,connectionLineContainerStyle:at,selectionKeyCode:st,selectionOnDrag:rt,selectionMode:ft,deleteKeyCode:ct,multiSelectionKeyCode:bt,panActivationKeyCode:wt,zoomActivationKeyCode:pt,onlyRenderVisibleElements:Lt,defaultViewport:na,translateExtent:Nl,minZoom:pn,maxZoom:Xn,preventScrolling:Vs,zoomOnScroll:qs,zoomOnPinch:Ml,zoomOnDoubleClick:Ys,panOnScroll:pe,panOnScrollSpeed:on,panOnScrollMode:ye,panOnDrag:Xs,onPaneClick:ks,onPaneMouseEnter:aa,onPaneMouseMove:ia,onPaneMouseLeave:oa,onPaneScroll:yn,onPaneContextMenu:ra,paneClickDistance:Al,nodeClickDistance:Gs,onSelectionContextMenu:H,onSelectionStart:B,onSelectionEnd:X,onReconnect:ri,onReconnectStart:Tl,onReconnectEnd:Zs,onEdgeContextMenu:Ao,onEdgeDoubleClick:To,onEdgeMouseEnter:zo,onEdgeMouseMove:si,onEdgeMouseLeave:ui,reconnectRadius:Do,defaultMarkerColor:$s,noDragClassName:le,noWheelClassName:he,noPanClassName:vn,rfId:me,disableKeyboardA11y:Zn,nodeExtent:la,viewport:ua,onViewportChange:ca}),C.jsx(Kw,{nodes:n,edges:a,defaultNodes:o,defaultEdges:r,onConnect:b,onConnectStart:M,onConnectEnd:_,onClickConnectStart:z,onClickConnectEnd:A,nodesDraggable:oe,autoPanOnNodeFocus:$e,nodesConnectable:Je,nodesFocusable:qn,edgesFocusable:_l,edgesReconnectable:Cl,elementsSelectable:se,elevateNodesOnSelect:kn,elevateEdgesOnSelect:Gn,minZoom:pn,maxZoom:Xn,nodeExtent:la,onNodesChange:Oo,onEdgesChange:rn,snapToGrid:vt,snapGrid:St,connectionMode:w,translateExtent:Nl,connectOnClick:Qs,defaultEdgeOptions:ci,fitView:sa,fitViewOptions:Ro,onNodesDelete:ut,onEdgesDelete:tt,onDelete:et,onNodeDragStart:q,onNodeDrag:J,onNodeDragStop:I,onSelectionDrag:U,onSelectionDragStart:D,onSelectionDragStop:N,onMove:v,onMoveStart:x,onMoveEnd:p,noPanClassName:vn,nodeOrigin:Yn,rfId:me,autoPanOnConnect:Qn,autoPanOnNodeDrag:It,autoPanSpeed:jo,onError:Kn,connectionRadius:Lo,isValidConnection:xn,selectNodesOnDrag:$t,nodeDragThreshold:Bo,connectionDragThreshold:Js,onBeforeDelete:nt,debug:Fs,ariaLabelConfig:Vo}),C.jsx(kw,{onSelectionChange:P}),Mo,C.jsx(Vw,{proOptions:zl,position:Ho}),C.jsx(Uw,{rfId:me,disableKeyboardA11y:Zn})]})})}var v3=$y(y3);function x3(n){const[a,o]=Z.useState(n),r=Z.useCallback(u=>o(f=>Uy(u,f)),[]);return[a,o,r]}function b3(n){const[a,o]=Z.useState(n),r=Z.useCallback(u=>o(f=>Vy(u,f)),[]);return[a,o,r]}function S3({dimensions:n,lineWidth:a,variant:o,className:r}){return C.jsx("path",{strokeWidth:a,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,className:ne(["react-flow__background-pattern",o,r])})}function E3({radius:n,className:a}){return C.jsx("circle",{cx:n,cy:n,r:n,className:ne(["react-flow__background-pattern","dots",a])})}var El;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(El||(El={}));const w3={[El.Dots]:1,[El.Lines]:1,[El.Cross]:6},_3=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function cv({id:n,variant:a=El.Dots,gap:o=20,size:r,lineWidth:u=1,offset:f=0,color:d,bgColor:m,style:g,className:h,patternClassName:v}){const x=Z.useRef(null),{transform:p,patternId:b}=zt(_3,Zt),M=r||w3[a],_=a===El.Dots,z=a===El.Cross,A=Array.isArray(o)?o:[o,o],L=[A[0]*p[2]||1,A[1]*p[2]||1],S=M*p[2],T=Array.isArray(f)?f:[f,f],$=z?[S,S]:L,V=[T[0]*p[2]||1+$[0]/2,T[1]*p[2]||1+$[1]/2],q=`${b}${n||""}`;return C.jsxs("svg",{className:ne(["react-flow__background",h]),style:{...g,...js,"--xy-background-color-props":m,"--xy-background-pattern-color-props":d},ref:x,"data-testid":"rf__background",children:[C.jsx("pattern",{id:q,x:p[0]%L[0],y:p[1]%L[1],width:L[0],height:L[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${V[0]},-${V[1]})`,children:_?C.jsx(E3,{radius:S/2,className:v}):C.jsx(S3,{dimensions:$,lineWidth:u,variant:a,className:v})}),C.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${q})`})]})}cv.displayName="Background";const C3=Z.memo(cv);function N3(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:C.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function M3(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:C.jsx("path",{d:"M0 0h32v4.2H0z"})})}function A3(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:C.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 T3(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:C.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 z3(){return C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:C.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 is({children:n,className:a,...o}){return C.jsx("button",{type:"button",className:ne(["react-flow__controls-button",a]),...o,children:n})}const D3=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function fv({style:n,showZoom:a=!0,showFitView:o=!0,showInteractive:r=!0,fitViewOptions:u,onZoomIn:f,onZoomOut:d,onFitView:m,onInteractiveChange:g,className:h,children:v,position:x="bottom-left",orientation:p="vertical","aria-label":b}){const M=Gt(),{isInteractive:_,minZoomReached:z,maxZoomReached:A,ariaLabelConfig:L}=zt(D3,Zt),{zoomIn:S,zoomOut:T,fitView:$}=ld(),V=()=>{S(),f?.()},q=()=>{T(),d?.()},J=()=>{$(u),m?.()},I=()=>{M.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),g?.(!_)},ut=p==="horizontal"?"horizontal":"vertical";return C.jsxs(Hs,{className:ne(["react-flow__controls",ut,h]),position:x,style:n,"data-testid":"rf__controls","aria-label":b??L["controls.ariaLabel"],children:[a&&C.jsxs(C.Fragment,{children:[C.jsx(is,{onClick:V,className:"react-flow__controls-zoomin",title:L["controls.zoomIn.ariaLabel"],"aria-label":L["controls.zoomIn.ariaLabel"],disabled:A,children:C.jsx(N3,{})}),C.jsx(is,{onClick:q,className:"react-flow__controls-zoomout",title:L["controls.zoomOut.ariaLabel"],"aria-label":L["controls.zoomOut.ariaLabel"],disabled:z,children:C.jsx(M3,{})})]}),o&&C.jsx(is,{className:"react-flow__controls-fitview",onClick:J,title:L["controls.fitView.ariaLabel"],"aria-label":L["controls.fitView.ariaLabel"],children:C.jsx(A3,{})}),r&&C.jsx(is,{className:"react-flow__controls-interactive",onClick:I,title:L["controls.interactive.ariaLabel"],"aria-label":L["controls.interactive.ariaLabel"],children:_?C.jsx(z3,{}):C.jsx(T3,{})}),v]})}fv.displayName="Controls";const O3=Z.memo(fv);function R3({id:n,x:a,y:o,width:r,height:u,style:f,color:d,strokeColor:m,strokeWidth:g,className:h,borderRadius:v,shapeRendering:x,selected:p,onClick:b}){const{background:M,backgroundColor:_}=f||{},z=d||M||_;return C.jsx("rect",{className:ne(["react-flow__minimap-node",{selected:p},h]),x:a,y:o,rx:v,ry:v,width:r,height:u,style:{fill:z,stroke:m,strokeWidth:g},shapeRendering:x,onClick:b?A=>b(A,n):void 0})}const H3=Z.memo(R3),j3=n=>n.nodes.map(a=>a.id),Sf=n=>n instanceof Function?n:()=>n;function L3({nodeStrokeColor:n,nodeColor:a,nodeClassName:o="",nodeBorderRadius:r=5,nodeStrokeWidth:u,nodeComponent:f=H3,onClick:d}){const m=zt(j3,Zt),g=Sf(a),h=Sf(n),v=Sf(o),x=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return C.jsx(C.Fragment,{children:m.map(p=>C.jsx(U3,{id:p,nodeColorFunc:g,nodeStrokeColorFunc:h,nodeClassNameFunc:v,nodeBorderRadius:r,nodeStrokeWidth:u,NodeComponent:f,onClick:d,shapeRendering:x},p))})}function B3({id:n,nodeColorFunc:a,nodeStrokeColorFunc:o,nodeClassNameFunc:r,nodeBorderRadius:u,nodeStrokeWidth:f,shapeRendering:d,NodeComponent:m,onClick:g}){const{node:h,x:v,y:x,width:p,height:b}=zt(M=>{const{internals:_}=M.nodeLookup.get(n),z=_.userNode,{x:A,y:L}=_.positionAbsolute,{width:S,height:T}=$n(z);return{node:z,x:A,y:L,width:S,height:T}},Zt);return!h||h.hidden||!uy(h)?null:C.jsx(m,{x:v,y:x,width:p,height:b,style:h.style,selected:!!h.selected,className:r(h),color:a(h),borderRadius:u,strokeColor:o(h),strokeWidth:f,shapeRendering:d,onClick:g,id:h.id})}const U3=Z.memo(B3);var V3=Z.memo(L3);const $3=200,q3=150,Y3=n=>!n.hidden,X3=n=>{const a={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:a,boundingRect:n.nodeLookup.size>0?sy(_o(n.nodeLookup,{filter:Y3}),a):a,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},k3="react-flow__minimap-desc";function dv({style:n,className:a,nodeStrokeColor:o,nodeColor:r,nodeClassName:u="",nodeBorderRadius:f=5,nodeStrokeWidth:d,nodeComponent:m,bgColor:g,maskColor:h,maskStrokeColor:v,maskStrokeWidth:x,position:p="bottom-right",onClick:b,onNodeClick:M,pannable:_=!1,zoomable:z=!1,ariaLabel:A,inversePan:L,zoomStep:S=1,offsetScale:T=5}){const $=Gt(),V=Z.useRef(null),{boundingRect:q,viewBB:J,rfId:I,panZoom:ut,translateExtent:tt,flowWidth:et,flowHeight:P,ariaLabelConfig:D}=zt(X3,Zt),U=n?.width??$3,N=n?.height??q3,H=q.width/U,B=q.height/N,X=Math.max(H,B),nt=X*U,w=X*N,R=T*X,K=q.x-(nt-q.width)/2-R,F=q.y-(w-q.height)/2-R,at=nt+R*2,ct=w+R*2,st=`${k3}-${I}`,rt=Z.useRef(0),ft=Z.useRef();rt.current=X,Z.useEffect(()=>{if(V.current&&ut)return ft.current=rw({domNode:V.current,panZoom:ut,getTransform:()=>$.getState().transform,getViewScale:()=>rt.current}),()=>{ft.current?.destroy()}},[ut]),Z.useEffect(()=>{ft.current?.update({translateExtent:tt,width:et,height:P,inversePan:L,pannable:_,zoomStep:S,zoomable:z})},[_,z,L,S,tt,et,P]);const wt=b?vt=>{const[St,Lt]=ft.current?.pointer(vt)||[0,0];b(vt,{x:St,y:Lt})}:void 0,bt=M?Z.useCallback((vt,St)=>{const Lt=$.getState().nodeLookup.get(St).internals.userNode;M(vt,Lt)},[]):void 0,pt=A??D["minimap.ariaLabel"];return C.jsx(Hs,{position:p,style:{...n,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof v=="string"?v:void 0,"--xy-minimap-mask-stroke-width-props":typeof x=="number"?x*X:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:ne(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:C.jsxs("svg",{width:U,height:N,viewBox:`${K} ${F} ${at} ${ct}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":st,ref:V,onClick:wt,children:[pt&&C.jsx("title",{id:st,children:pt}),C.jsx(V3,{onClick:bt,nodeColor:r,nodeStrokeColor:o,nodeBorderRadius:f,nodeClassName:u,nodeStrokeWidth:d,nodeComponent:m}),C.jsx("path",{className:"react-flow__minimap-mask",d:`M${K-R},${F-R}h${at+R*2}v${ct+R*2}h${-at-R*2}z
M${J.x},${J.y}h${J.width}v${J.height}h${-J.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}dv.displayName="MiniMap";const G3=Z.memo(dv),Z3=n=>a=>n?`${Math.max(1/a.transform[2],1)}`:void 0,Q3={[oi.Line]:"right",[oi.Handle]:"bottom-right"};function K3({nodeId:n,position:a,variant:o=oi.Handle,className:r,style:u=void 0,children:f,color:d,minWidth:m=10,minHeight:g=10,maxWidth:h=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:x=!1,resizeDirection:p,autoScale:b=!0,shouldResize:M,onResizeStart:_,onResize:z,onResizeEnd:A}){const L=ky(),S=typeof n=="string"?n:L,T=Gt(),$=Z.useRef(null),V=o===oi.Handle,q=zt(Z.useCallback(Z3(V&&b),[V,b]),Zt),J=Z.useRef(null),I=a??Q3[o];Z.useEffect(()=>{if(!(!$.current||!S))return J.current||(J.current=Sw({domNode:$.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:tt,transform:et,snapGrid:P,snapToGrid:D,nodeOrigin:U,domNode:N}=T.getState();return{nodeLookup:tt,transform:et,snapGrid:P,snapToGrid:D,nodeOrigin:U,paneDomNode:N}},onChange:(tt,et)=>{const{triggerNodeChanges:P,nodeLookup:D,parentLookup:U,nodeOrigin:N}=T.getState(),H=[],B={x:tt.x,y:tt.y},X=D.get(S);if(X&&X.expandParent&&X.parentId){const nt=X.origin??N,w=tt.width??X.measured.width??0,R=tt.height??X.measured.height??0,K={id:X.id,parentId:X.parentId,rect:{width:w,height:R,...cy({x:tt.x??X.position.x,y:tt.y??X.position.y},{width:w,height:R},X.parentId,D,nt)}},F=nd([K],D,U,N);H.push(...F),B.x=tt.x?Math.max(nt[0]*w,tt.x):void 0,B.y=tt.y?Math.max(nt[1]*R,tt.y):void 0}if(B.x!==void 0&&B.y!==void 0){const nt={id:S,type:"position",position:{...B}};H.push(nt)}if(tt.width!==void 0&&tt.height!==void 0){const w={id:S,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:tt.width,height:tt.height}};H.push(w)}for(const nt of et){const w={...nt,type:"position"};H.push(w)}P(H)},onEnd:({width:tt,height:et})=>{const P={id:S,type:"dimensions",resizing:!1,dimensions:{width:tt,height:et}};T.getState().triggerNodeChanges([P])}})),J.current.update({controlPosition:I,boundaries:{minWidth:m,minHeight:g,maxWidth:h,maxHeight:v},keepAspectRatio:x,resizeDirection:p,onResizeStart:_,onResize:z,onResizeEnd:A,shouldResize:M}),()=>{J.current?.destroy()}},[I,m,g,h,v,x,_,z,A,M]);const ut=I.split("-");return C.jsx("div",{className:ne(["react-flow__resize-control","nodrag",...ut,o,r]),ref:$,style:{...u,scale:q,...d&&{[V?"backgroundColor":"borderColor"]:d}},children:f})}Z.memo(K3);const hv={},{useDebugValue:J3}=Ep,{useSyncExternalStoreWithSelector:F3}=zy;let ip=!1;const I3=n=>n;function W3(n,a=I3,o){(hv?"production":void 0)!=="production"&&o&&!ip&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ip=!0);const r=F3(n.subscribe,n.getState,n.getServerState||n.getInitialState,a,o);return J3(r),r}const op=n=>{(hv?"production":void 0)!=="production"&&typeof n!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const a=typeof n=="function"?Dy(n):n,o=(r,u)=>W3(a,r,u);return Object.assign(o,a),o},P3=n=>n?op(n):op,Ef=n=>({system:"systems",container:"containers",component:"components",person:"people",externalSystem:"externalSystems"})[n]||`${n}s`,Ne=P3((n,a)=>({debugMode:!1,metadata:{name:"New C4 Model",version:"1.0",author:"Solution Architect"},currentLevel:"context",selectedElement:null,selectedEdge:null,systems:[],containers:[],components:[],people:[],externalSystems:[],relationships:[],warnings:[],setMetadata:o=>n({metadata:o}),setCurrentLevel:o=>n({currentLevel:o}),setSelectedElement:o=>{a().debugMode&&console.log("[BAC4 Debug] setSelectedElement called:",o?{id:o.id,type:o.type}:null),n({selectedElement:o,selectedEdge:null})},setSelectedEdge:o=>{a().debugMode&&console.log("[BAC4 Debug] setSelectedEdge called:",o?{id:o.id}:null),n({selectedEdge:o,selectedElement:null})},addElement:(o,r)=>{const u={id:`${o}-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,type:o,...r},f=Ef(o);n(g=>({[f]:[...g[f],u]}));const m=a().currentLevel;return o==="container"&&(m==="context"||m==="component"||m==="code")?n({currentLevel:"container"}):o==="component"&&(m==="context"||m==="code")?n({currentLevel:"component"}):o==="system"&&m==="code"&&n({currentLevel:"context"}),u},updateElement:(o,r,u)=>{a().debugMode&&console.log("[BAC4 Debug] updateElement called:",{type:o,id:r,updates:u});const d=Ef(o);n(m=>{const g=m[d].map(x=>x.id===r?{...x,...u}:x),h=g.find(x=>x.id===r),v=m.selectedElement?.id===r?h:m.selectedElement;return m.debugMode&&h&&console.log("[BAC4 Debug] Element updated:",h),{[d]:g,selectedElement:v}})},deleteElement:(o,r)=>{const u=Ef(o);n(f=>({[u]:f[u].filter(d=>d.id!==r),relationships:f.relationships.filter(d=>d.from!==r&&d.to!==r)}))},addRelationship:o=>{const r={id:`rel-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,...o};return n(u=>({relationships:[...u.relationships,r]})),r},updateRelationship:(o,r)=>{a().debugMode&&console.log("[BAC4 Debug] updateRelationship called:",{id:o,updates:r}),n(f=>{const d=f.relationships.map(h=>h.id===o?{...h,...r}:h),m=d.find(h=>h.id===o),g=f.selectedEdge?.id===o?m:f.selectedEdge;return f.debugMode&&m&&console.log("[BAC4 Debug] Relationship updated:",m),{relationships:d,selectedEdge:g}})},deleteRelationship:o=>{n(r=>({relationships:r.relationships.filter(u=>u.id!==o)}))},getAllElements:()=>{const o=a();return[...o.systems,...o.containers,...o.components,...o.people,...o.externalSystems]},getElementById:o=>a().getAllElements().find(u=>u.id===o),clearAll:()=>{n({systems:[],containers:[],components:[],people:[],externalSystems:[],relationships:[],selectedElement:null,warnings:[]})},importModel:o=>{n({metadata:o.metadata||a().metadata,systems:o.systems||[],containers:o.containers||[],components:o.components||[],people:o.people||[],externalSystems:o.externalSystems||[],relationships:o.relationships||[]})},exportModel:()=>{const o=a();return{metadata:o.metadata,systems:o.systems,containers:o.containers,components:o.components,people:o.people,externalSystems:o.externalSystems,relationships:o.relationships}},validateModel:()=>{const o=a(),r=[];o.containers.forEach(m=>{m.parentSystem&&!o.systems.find(g=>g.id===m.parentSystem)&&r.push({type:"warning",message:`Container "${m.name}" references non-existent parent system`,elementId:m.id})}),o.components.forEach(m=>{m.parentContainer&&!o.containers.find(g=>g.id===m.parentContainer)&&r.push({type:"warning",message:`Component "${m.name}" references non-existent parent container`,elementId:m.id})});const u=o.getAllElements(),f=new Set(u.map(m=>m.id));o.relationships.forEach(m=>{f.has(m.from)||r.push({type:"error",message:`Relationship references non-existent source element: ${m.from}`,elementId:m.id}),f.has(m.to)||r.push({type:"error",message:`Relationship references non-existent target element: ${m.to}`,elementId:m.id})});const d=a().getVisibleElements();return d.length>15&&r.push({type:"info",message:`Current view has ${d.length} elements. Consider splitting into multiple diagrams for clarity.`}),n({warnings:r}),r},getVisibleElements:()=>{const o=a();switch(o.currentLevel){case"context":return[...o.systems,...o.people,...o.externalSystems];case"container":return[...o.systems,...o.containers,...o.people,...o.externalSystems];case"component":return[...o.containers,...o.components,...o.people];case"code":return[...o.components];default:return o.getAllElements()}}}));typeof window<"u"&&(window.__ZUSTAND_STORE__=Ne);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const tC=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mv=(...n)=>n.filter((a,o,r)=>!!a&&r.indexOf(a)===o).join(" ");/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var eC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nC=Z.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:u="",children:f,iconNode:d,...m},g)=>Z.createElement("svg",{ref:g,...eC,width:a,height:a,stroke:n,strokeWidth:r?Number(o)*24/Number(a):o,className:mv("lucide",u),...m},[...d.map(([h,v])=>Z.createElement(h,v)),...Array.isArray(f)?f:[f]]));/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Te=(n,a)=>{const o=Z.forwardRef(({className:r,...u},f)=>Z.createElement(nC,{ref:f,iconNode:a,className:mv(`lucide-${tC(n)}`,r),...u}));return o.displayName=`${n}`,o};/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $f=Te("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gv=Te("Component",[["path",{d:"M5.5 8.5 9 12l-3.5 3.5L2 12l3.5-3.5Z",key:"1kciei"}],["path",{d:"m12 2 3.5 3.5L12 9 8.5 5.5 12 2Z",key:"1ome0g"}],["path",{d:"M18.5 8.5 22 12l-3.5 3.5L15 12l3.5-3.5Z",key:"vbupec"}],["path",{d:"m12 15 3.5 3.5L12 22l-3.5-3.5L12 15Z",key:"16csic"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lC=Te("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pv=Te("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wf=Te("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const rp=Te("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sp=Te("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const up=Te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const aC=Te("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yv=Te("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cp=Te("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const iC=Te("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vv=Te("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
* @license lucide-react v0.400.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fp=Te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),oC=({data:n,selected:a})=>{const o=()=>{const f="px-4 py-3 rounded-lg border-2 min-w-[200px] shadow-lg transition-all";switch(n.type){case"system":return`${f} bg-blue-100 border-blue-500 hover:bg-blue-200`;case"container":return`${f} bg-green-100 border-green-500 hover:bg-green-200`;case"component":return`${f} bg-yellow-100 border-yellow-500 hover:bg-yellow-200`;case"person":return`${f} bg-purple-100 border-purple-500 hover:bg-purple-200`;case"externalSystem":return`${f} bg-gray-100 border-gray-500 hover:bg-gray-200`;default:return`${f} bg-white border-gray-300`}},r=()=>{const f="w-5 h-5";switch(n.type){case"system":return C.jsx(yv,{className:f});case"container":return C.jsx($f,{className:f});case"component":return C.jsx(gv,{className:f});case"person":return C.jsx(vv,{className:f});case"externalSystem":return C.jsx(pv,{className:f});default:return C.jsx($f,{className:f})}},u=()=>{switch(n.type){case"system":return"Software System";case"container":return"Container";case"component":return"Component";case"person":return"Person";case"externalSystem":return"External System";default:return n.type}};return C.jsxs("div",{className:`${o()} ${a?"ring-4 ring-blue-400":""}`,children:[C.jsx(Sl,{type:"target",position:mt.Top,id:"top",className:"w-3 h-3"}),C.jsxs("div",{className:"flex items-start gap-2",children:[C.jsx("div",{className:"mt-1",children:r()}),C.jsxs("div",{className:"flex-1",children:[C.jsx("div",{className:"text-xs font-semibold text-gray-600 uppercase tracking-wide mb-1",children:u()}),C.jsx("div",{className:"font-bold text-gray-900 mb-1",children:n.label||n.name||"Unnamed"}),n.technology&&C.jsxs("div",{className:"text-xs text-gray-600 italic mb-1",children:["[",n.technology,"]"]}),n.description&&C.jsx("div",{className:"text-xs text-gray-700 mt-2",children:n.description})]})]}),C.jsx(Sl,{type:"source",position:mt.Bottom,id:"bottom",className:"w-3 h-3"}),C.jsx(Sl,{type:"source",position:mt.Right,id:"right",className:"w-3 h-3"}),C.jsx(Sl,{type:"target",position:mt.Left,id:"left",className:"w-3 h-3"})]})},rC=Z.memo(oC),sC=()=>{const{addElement:n,currentLevel:a}=Ne(),r=[{type:"system",icon:yv,label:"Software System",color:"bg-blue-100 hover:bg-blue-200 text-blue-700",visibleAtLevels:["context","container"]},{type:"container",icon:$f,label:"Container",color:"bg-green-100 hover:bg-green-200 text-green-700",visibleAtLevels:["container","component"]},{type:"component",icon:gv,label:"Component",color:"bg-yellow-100 hover:bg-yellow-200 text-yellow-700",visibleAtLevels:["component","code"]},{type:"person",icon:vv,label:"Person",color:"bg-purple-100 hover:bg-purple-200 text-purple-700",visibleAtLevels:["context","container","component"]},{type:"externalSystem",icon:pv,label:"External System",color:"bg-gray-100 hover:bg-gray-200 text-gray-700",visibleAtLevels:["context","container"]}].filter(d=>d.visibleAtLevels.includes(a)),u=(d,m)=>{d.dataTransfer.setData("application/c4-element-type",m),d.dataTransfer.effectAllowed="move"},f=()=>({context:"Context",container:"Container",component:"Component",code:"Code"})[a]||a;return C.jsxs("aside",{className:"w-64 bg-white border-r border-gray-200 p-4",children:[C.jsx("h2",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wide mb-1",children:"Add Elements"}),C.jsxs("p",{className:"text-xs text-gray-500 mb-4",children:[f()," Level"]}),C.jsx("div",{className:"space-y-2",children:r.length>0?r.map(d=>{const m=d.icon;return C.jsxs("div",{draggable:!0,onDragStart:g=>u(g,d.type),className:`w-full flex items-center gap-3 px-4 py-3 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${d.color}`,children:[C.jsx(m,{className:"w-5 h-5"}),C.jsx("span",{className:"text-sm font-medium",children:d.label})]},d.type)}):C.jsx("div",{className:"text-sm text-gray-500 text-center py-4",children:"No elements can be added at this level"})}),C.jsxs("div",{className:"mt-8 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[C.jsx("h3",{className:"text-xs font-semibold text-blue-900 uppercase mb-2",children:"Quick Tips"}),C.jsxs("ul",{className:"text-xs text-blue-800 space-y-1",children:[C.jsx("li",{children:"• Drag elements to canvas to add"}),C.jsx("li",{children:"• Click elements to edit properties"}),C.jsx("li",{children:"• Drag between elements to create relationships"}),C.jsx("li",{children:"• Use mouse wheel to zoom"})]})]})]})},uC=()=>{const{selectedElement:n,selectedEdge:a,setSelectedElement:o,setSelectedEdge:r,updateElement:u,deleteElement:f,updateRelationship:d,deleteRelationship:m}=Ne(),[g,h]=Z.useState({name:"",description:"",technology:"",tags:""}),[v,x]=Z.useState({description:"",technology:"",arrowDirection:"right",lineStyle:"solid"});Z.useEffect(()=>{if(n&&n.id)try{h({name:n.name||"",description:n.description||"",technology:n.technology||"",tags:Array.isArray(n.tags)?n.tags.join(", "):""})}catch(S){console.error("[BAC4] Error setting formData for element:",S,n),h({name:"Error loading element",description:"",technology:"",tags:""})}},[n?.id]),Z.useEffect(()=>{if(a&&a.id)try{x({description:a.description||"",technology:a.technology||"",arrowDirection:a.arrowDirection||"right",lineStyle:a.lineStyle||"solid"})}catch(S){console.error("[BAC4] Error setting edgeFormData:",S,a),x({description:"Error loading relationship",technology:"",arrowDirection:"right",lineStyle:"solid"})}},[a?.id]);const p=(S,T)=>{h($=>({...$,[S]:T}))},b=(S,T)=>{x($=>({...$,[S]:T}))},M=()=>{if(n){const S={name:g.name,description:g.description,technology:g.technology,tags:g.tags.split(",").map(T=>T.trim()).filter(Boolean)};u(n.type,n.id,S)}},_=()=>{a&&d(a.id,v)},z=(S,T)=>{const $={...v,[S]:T};x($),a&&d(a.id,$)},A=()=>{n&&window.confirm("Are you sure you want to delete this element?")&&(f(n.type,n.id),o(null))},L=()=>{a&&window.confirm("Are you sure you want to delete this relationship?")&&(m(a.id),r(null))};return a&&!n?C.jsxs("aside",{className:"w-80 bg-white border-l border-gray-200 p-4 overflow-y-auto",children:[C.jsxs("div",{className:"flex items-center justify-between mb-4",children:[C.jsx("h2",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wide",children:"Relationship Properties"}),C.jsx("button",{onClick:()=>r(null),className:"p-1 hover:bg-gray-100 rounded",children:C.jsx(fp,{className:"w-4 h-4"})})]}),C.jsxs("div",{className:"space-y-4",children:[C.jsxs("div",{children:[C.jsx("label",{className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"ID"}),C.jsx("div",{className:"px-3 py-2 bg-gray-100 rounded text-xs text-gray-600 font-mono break-all",children:a.id})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"edge-description",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Description"}),C.jsx("input",{id:"edge-description",type:"text",value:v.description,onChange:S=>b("description",S.target.value),onBlur:_,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Makes API calls to"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"edge-technology",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Technology/Protocol"}),C.jsx("input",{id:"edge-technology",type:"text",value:v.technology,onChange:S=>b("technology",S.target.value),onBlur:_,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., REST/HTTPS, gRPC"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"arrow-direction",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Arrow Direction"}),C.jsxs("select",{id:"arrow-direction",value:v.arrowDirection,onChange:S=>z("arrowDirection",S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[C.jsx("option",{value:"right",children:"Right →"}),C.jsx("option",{value:"left",children:"Left ←"}),C.jsx("option",{value:"both",children:"Both ↔"}),C.jsx("option",{value:"none",children:"None —"})]})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"line-style",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Line Style"}),C.jsxs("select",{id:"line-style",value:v.lineStyle,onChange:S=>z("lineStyle",S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[C.jsx("option",{value:"solid",children:"Solid ————"}),C.jsx("option",{value:"dashed",children:"Dashed — — —"}),C.jsx("option",{value:"dotted",children:"Dotted · · · ·"})]})]}),C.jsx("div",{className:"pt-4 border-t border-gray-200",children:C.jsxs("button",{onClick:L,className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors",children:[C.jsx(cp,{className:"w-4 h-4"}),"Delete Relationship"]})})]})]}):n?!n.id||!n.type?(console.error("[BAC4] Invalid selectedElement:",n),C.jsx("aside",{className:"w-80 bg-white border-l border-gray-200 p-4",children:C.jsxs("div",{className:"text-center text-red-500 mt-8",children:[C.jsx("p",{className:"text-sm",children:"Error: Invalid element data"}),C.jsx("button",{onClick:()=>o(null),className:"mt-4 px-4 py-2 bg-gray-200 rounded hover:bg-gray-300",children:"Clear Selection"})]})})):C.jsxs("aside",{className:"w-80 bg-white border-l border-gray-200 p-4 overflow-y-auto",children:[C.jsxs("div",{className:"flex items-center justify-between mb-4",children:[C.jsx("h2",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wide",children:"Properties"}),C.jsx("button",{onClick:()=>o(null),className:"p-1 hover:bg-gray-100 rounded",children:C.jsx(fp,{className:"w-4 h-4"})})]}),C.jsxs("div",{className:"space-y-4",children:[C.jsxs("div",{children:[C.jsx("label",{className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Type"}),C.jsx("div",{className:"px-3 py-2 bg-gray-100 rounded text-sm text-gray-700",children:n.type||"Unknown"})]}),C.jsxs("div",{children:[C.jsx("label",{className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"ID"}),C.jsx("div",{className:"px-3 py-2 bg-gray-100 rounded text-xs text-gray-600 font-mono break-all",children:n.id})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"name",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Name"}),C.jsx("input",{id:"name",type:"text",value:g.name,onChange:S=>p("name",S.target.value),onBlur:M,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter element name"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"technology",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Technology"}),C.jsx("input",{id:"technology",type:"text",value:g.technology,onChange:S=>p("technology",S.target.value),onBlur:M,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Spring Boot, React, PostgreSQL"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"description",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Description"}),C.jsx("textarea",{id:"description",value:g.description,onChange:S=>p("description",S.target.value),onBlur:M,rows:4,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Describe the element's purpose and responsibilities"})]}),C.jsxs("div",{children:[C.jsx("label",{htmlFor:"tags",className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Tags"}),C.jsx("input",{id:"tags",type:"text",value:g.tags,onChange:S=>p("tags",S.target.value),onBlur:M,className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"tag1, tag2, tag3"}),C.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated values"})]}),C.jsxs("div",{children:[C.jsx("label",{className:"block text-xs font-semibold text-gray-600 uppercase mb-1",children:"Position"}),C.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[C.jsxs("div",{children:[C.jsx("span",{className:"text-xs text-gray-500",children:"X:"}),C.jsx("div",{className:"px-3 py-2 bg-gray-100 rounded text-sm text-gray-700",children:Math.round(n.position?.x||0)})]}),C.jsxs("div",{children:[C.jsx("span",{className:"text-xs text-gray-500",children:"Y:"}),C.jsx("div",{className:"px-3 py-2 bg-gray-100 rounded text-sm text-gray-700",children:Math.round(n.position?.y||0)})]})]})]}),C.jsx("div",{className:"pt-4 border-t border-gray-200",children:C.jsxs("button",{onClick:A,className:"w-full flex items-center justify-center gap-2 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors",children:[C.jsx(cp,{className:"w-4 h-4"}),"Delete Element"]})})]})]}):C.jsx("aside",{className:"w-80 bg-white border-l border-gray-200 p-4",children:C.jsx("div",{className:"text-center text-gray-500 mt-8",children:C.jsx("p",{className:"text-sm",children:"Select an element to view and edit its properties"})})})};function cC(n,a){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const o=document.implementation.createHTMLDocument(),r=o.createElement("base"),u=o.createElement("a");return o.head.appendChild(r),o.body.appendChild(u),a&&(r.href=a),u.href=n,u.href}const fC=(()=>{let n=0;const a=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${a()}${n}`)})();function wl(n){const a=[];for(let o=0,r=n.length;o<r;o++)a.push(n[o]);return a}let Ka=null;function xv(n={}){return Ka||(n.includeStyleProperties?(Ka=n.includeStyleProperties,Ka):(Ka=wl(window.getComputedStyle(document.documentElement)),Ka))}function ws(n,a){const r=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(a);return r?parseFloat(r.replace("px","")):0}function dC(n){const a=ws(n,"border-left-width"),o=ws(n,"border-right-width");return n.clientWidth+a+o}function hC(n){const a=ws(n,"border-top-width"),o=ws(n,"border-bottom-width");return n.clientHeight+a+o}function bv(n,a={}){const o=a.width||dC(n),r=a.height||hC(n);return{width:o,height:r}}function mC(){let n,a;try{a=process}catch{}const o=a&&a.env?a.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const Be=16384;function gC(n){(n.width>Be||n.height>Be)&&(n.width>Be&&n.height>Be?n.width>n.height?(n.height*=Be/n.width,n.width=Be):(n.width*=Be/n.height,n.height=Be):n.width>Be?(n.height*=Be/n.width,n.width=Be):(n.width*=Be/n.height,n.height=Be))}function _s(n){return new Promise((a,o)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>a(r))})},r.onerror=o,r.crossOrigin="anonymous",r.decoding="async",r.src=n})}async function pC(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(a=>`data:image/svg+xml;charset=utf-8,${a}`)}async function yC(n,a,o){const r="http://www.w3.org/2000/svg",u=document.createElementNS(r,"svg"),f=document.createElementNS(r,"foreignObject");return u.setAttribute("width",`${a}`),u.setAttribute("height",`${o}`),u.setAttribute("viewBox",`0 0 ${a} ${o}`),f.setAttribute("width","100%"),f.setAttribute("height","100%"),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("externalResourcesRequired","true"),u.appendChild(f),f.appendChild(n),pC(u)}const Ae=(n,a)=>{if(n instanceof a)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===a.name||Ae(o,a)};function vC(n){const a=n.getPropertyValue("content");return`${n.cssText} content: '${a.replace(/'|"/g,"")}';`}function xC(n,a){return xv(a).map(o=>{const r=n.getPropertyValue(o),u=n.getPropertyPriority(o);return`${o}: ${r}${u?" !important":""};`}).join(" ")}function bC(n,a,o,r){const u=`.${n}:${a}`,f=o.cssText?vC(o):xC(o,r);return document.createTextNode(`${u}{${f}}`)}function dp(n,a,o,r){const u=window.getComputedStyle(n,o),f=u.getPropertyValue("content");if(f===""||f==="none")return;const d=fC();try{a.className=`${a.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(bC(d,o,u,r)),a.appendChild(m)}function SC(n,a,o){dp(n,a,":before",o),dp(n,a,":after",o)}const hp="application/font-woff",mp="image/jpeg",EC={woff:hp,woff2:hp,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mp,jpeg:mp,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function wC(n){const a=/\.([^./]*?)$/g.exec(n);return a?a[1]:""}function id(n){const a=wC(n).toLowerCase();return EC[a]||""}function _C(n){return n.split(/,/)[1]}function qf(n){return n.search(/^(data:)/)!==-1}function CC(n,a){return`data:${a};base64,${n}`}async function Sv(n,a,o){const r=await fetch(n,a);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const u=await r.blob();return new Promise((f,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{f(o({res:r,result:m.result}))}catch(g){d(g)}},m.readAsDataURL(u)})}const _f={};function NC(n,a,o){let r=n.replace(/\?.*/,"");return o&&(r=n),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),a?`[${a}]${r}`:r}async function od(n,a,o){const r=NC(n,a,o.includeQueryParams);if(_f[r]!=null)return _f[r];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let u;try{const f=await Sv(n,o.fetchRequestInit,({res:d,result:m})=>(a||(a=d.headers.get("Content-Type")||""),_C(m)));u=CC(f,a)}catch(f){u=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;f&&(d=typeof f=="string"?f:f.message),d&&console.warn(d)}return _f[r]=u,u}async function MC(n){const a=n.toDataURL();return a==="data:,"?n.cloneNode(!1):_s(a)}async function AC(n,a){if(n.currentSrc){const f=document.createElement("canvas"),d=f.getContext("2d");f.width=n.clientWidth,f.height=n.clientHeight,d?.drawImage(n,0,0,f.width,f.height);const m=f.toDataURL();return _s(m)}const o=n.poster,r=id(o),u=await od(o,r,a);return _s(u)}async function TC(n,a){var o;try{if(!((o=n?.contentDocument)===null||o===void 0)&&o.body)return await Bs(n.contentDocument.body,a,!0)}catch{}return n.cloneNode(!1)}async function zC(n,a){return Ae(n,HTMLCanvasElement)?MC(n):Ae(n,HTMLVideoElement)?AC(n,a):Ae(n,HTMLIFrameElement)?TC(n,a):n.cloneNode(Ev(n))}const DC=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",Ev=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function OC(n,a,o){var r,u;if(Ev(a))return a;let f=[];return DC(n)&&n.assignedNodes?f=wl(n.assignedNodes()):Ae(n,HTMLIFrameElement)&&(!((r=n.contentDocument)===null||r===void 0)&&r.body)?f=wl(n.contentDocument.body.childNodes):f=wl(((u=n.shadowRoot)!==null&&u!==void 0?u:n).childNodes),f.length===0||Ae(n,HTMLVideoElement)||await f.reduce((d,m)=>d.then(()=>Bs(m,o)).then(g=>{g&&a.appendChild(g)}),Promise.resolve()),a}function RC(n,a,o){const r=a.style;if(!r)return;const u=window.getComputedStyle(n);u.cssText?(r.cssText=u.cssText,r.transformOrigin=u.transformOrigin):xv(o).forEach(f=>{let d=u.getPropertyValue(f);f==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),Ae(n,HTMLIFrameElement)&&f==="display"&&d==="inline"&&(d="block"),f==="d"&&a.getAttribute("d")&&(d=`path(${a.getAttribute("d")})`),r.setProperty(f,d,u.getPropertyPriority(f))})}function HC(n,a){Ae(n,HTMLTextAreaElement)&&(a.innerHTML=n.value),Ae(n,HTMLInputElement)&&a.setAttribute("value",n.value)}function jC(n,a){if(Ae(n,HTMLSelectElement)){const o=a,r=Array.from(o.children).find(u=>n.value===u.getAttribute("value"));r&&r.setAttribute("selected","")}}function LC(n,a,o){return Ae(a,Element)&&(RC(n,a,o),SC(n,a,o),HC(n,a),jC(n,a)),a}async function BC(n,a){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const r={};for(let f=0;f<o.length;f++){const m=o[f].getAttribute("xlink:href");if(m){const g=n.querySelector(m),h=document.querySelector(m);!g&&h&&!r[m]&&(r[m]=await Bs(h,a,!0))}}const u=Object.values(r);if(u.length){const f="http://www.w3.org/1999/xhtml",d=document.createElementNS(f,"svg");d.setAttribute("xmlns",f),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(f,"defs");d.appendChild(m);for(let g=0;g<u.length;g++)m.appendChild(u[g]);n.appendChild(d)}return n}async function Bs(n,a,o){return!o&&a.filter&&!a.filter(n)?null:Promise.resolve(n).then(r=>zC(r,a)).then(r=>OC(n,r,a)).then(r=>LC(n,r,a)).then(r=>BC(r,a))}const wv=/url\((['"]?)([^'"]+?)\1\)/g,UC=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,VC=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function $C(n){const a=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${a})(['"]?\\))`,"g")}function qC(n){const a=[];return n.replace(wv,(o,r,u)=>(a.push(u),o)),a.filter(o=>!qf(o))}async function YC(n,a,o,r,u){try{const f=o?cC(a,o):a,d=id(a);let m;return u||(m=await od(f,d,r)),n.replace($C(a),`$1${m}$3`)}catch{}return n}function XC(n,{preferredFontFormat:a}){return a?n.replace(VC,o=>{for(;;){const[r,,u]=UC.exec(o)||[];if(!u)return"";if(u===a)return`src: ${r};`}}):n}function _v(n){return n.search(wv)!==-1}async function Cv(n,a,o){if(!_v(n))return n;const r=XC(n,o);return qC(r).reduce((f,d)=>f.then(m=>YC(m,d,a,o)),Promise.resolve(r))}async function Ja(n,a,o){var r;const u=(r=a.style)===null||r===void 0?void 0:r.getPropertyValue(n);if(u){const f=await Cv(u,null,o);return a.style.setProperty(n,f,a.style.getPropertyPriority(n)),!0}return!1}async function kC(n,a){await Ja("background",n,a)||await Ja("background-image",n,a),await Ja("mask",n,a)||await Ja("-webkit-mask",n,a)||await Ja("mask-image",n,a)||await Ja("-webkit-mask-image",n,a)}async function GC(n,a){const o=Ae(n,HTMLImageElement);if(!(o&&!qf(n.src))&&!(Ae(n,SVGImageElement)&&!qf(n.href.baseVal)))return;const r=o?n.src:n.href.baseVal,u=await od(r,id(r),a);await new Promise((f,d)=>{n.onload=f,n.onerror=a.onImageErrorHandler?(...g)=>{try{f(a.onImageErrorHandler(...g))}catch(h){d(h)}}:d;const m=n;m.decode&&(m.decode=f),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=u):n.href.baseVal=u})}async function ZC(n,a){const r=wl(n.childNodes).map(u=>Nv(u,a));await Promise.all(r).then(()=>n)}async function Nv(n,a){Ae(n,Element)&&(await kC(n,a),await GC(n,a),await ZC(n,a))}function QC(n,a){const{style:o}=n;a.backgroundColor&&(o.backgroundColor=a.backgroundColor),a.width&&(o.width=`${a.width}px`),a.height&&(o.height=`${a.height}px`);const r=a.style;return r!=null&&Object.keys(r).forEach(u=>{o[u]=r[u]}),n}const gp={};async function pp(n){let a=gp[n];if(a!=null)return a;const r=await(await fetch(n)).text();return a={url:n,cssText:r},gp[n]=a,a}async function yp(n,a){let o=n.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,f=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(r,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),Sv(m,a.fetchRequestInit,({result:g})=>(o=o.replace(d,`url(${g})`),[d,g]))});return Promise.all(f).then(()=>o)}function vp(n){if(n==null)return[];const a=[],o=/(\/\*[\s\S]*?\*\/)/gi;let r=n.replace(o,"");const u=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const g=u.exec(r);if(g===null)break;a.push(g[0])}r=r.replace(u,"");const f=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let g=f.exec(r);if(g===null){if(g=m.exec(r),g===null)break;f.lastIndex=m.lastIndex}else m.lastIndex=f.lastIndex;a.push(g[0])}return a}async function KC(n,a){const o=[],r=[];return n.forEach(u=>{if("cssRules"in u)try{wl(u.cssRules||[]).forEach((f,d)=>{if(f.type===CSSRule.IMPORT_RULE){let m=d+1;const g=f.href,h=pp(g).then(v=>yp(v,a)).then(v=>vp(v).forEach(x=>{try{u.insertRule(x,x.startsWith("@import")?m+=1:u.cssRules.length)}catch(p){console.error("Error inserting rule from remote css",{rule:x,error:p})}})).catch(v=>{console.error("Error loading remote css",v.toString())});r.push(h)}})}catch(f){const d=n.find(m=>m.href==null)||document.styleSheets[0];u.href!=null&&r.push(pp(u.href).then(m=>yp(m,a)).then(m=>vp(m).forEach(g=>{d.insertRule(g,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",f)}}),Promise.all(r).then(()=>(n.forEach(u=>{if("cssRules"in u)try{wl(u.cssRules||[]).forEach(f=>{o.push(f)})}catch(f){console.error(`Error while reading CSS rules from ${u.href}`,f)}}),o))}function JC(n){return n.filter(a=>a.type===CSSRule.FONT_FACE_RULE).filter(a=>_v(a.style.getPropertyValue("src")))}async function FC(n,a){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=wl(n.ownerDocument.styleSheets),r=await KC(o,a);return JC(r)}function Mv(n){return n.trim().replace(/["']/g,"")}function IC(n){const a=new Set;function o(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(f=>{a.add(Mv(f))}),Array.from(r.children).forEach(f=>{f instanceof HTMLElement&&o(f)})}return o(n),a}async function WC(n,a){const o=await FC(n,a),r=IC(n);return(await Promise.all(o.filter(f=>r.has(Mv(f.style.fontFamily))).map(f=>{const d=f.parentStyleSheet?f.parentStyleSheet.href:null;return Cv(f.cssText,d,a)}))).join(`
`)}async function PC(n,a){const o=a.fontEmbedCSS!=null?a.fontEmbedCSS:a.skipFonts?null:await WC(n,a);if(o){const r=document.createElement("style"),u=document.createTextNode(o);r.appendChild(u),n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r)}}async function Av(n,a={}){const{width:o,height:r}=bv(n,a),u=await Bs(n,a,!0);return await PC(u,a),await Nv(u,a),QC(u,a),await yC(u,o,r)}async function tN(n,a={}){const{width:o,height:r}=bv(n,a),u=await Av(n,a),f=await _s(u),d=document.createElement("canvas"),m=d.getContext("2d"),g=a.pixelRatio||mC(),h=a.canvasWidth||o,v=a.canvasHeight||r;return d.width=h*g,d.height=v*g,a.skipAutoScale||gC(d),d.style.width=`${h}`,d.style.height=`${v}`,a.backgroundColor&&(m.fillStyle=a.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(f,0,0,d.width,d.height),d}async function eN(n,a={}){return(await tN(n,a)).toDataURL()}var ds={exports:{}},nN=ds.exports,xp;function lN(){return xp||(xp=1,(function(n,a){(function(o,r){r()})(nN,function(){function o(h,v){return typeof v>"u"?v={autoBom:!1}:typeof v!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),v={autoBom:!v}),v.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function r(h,v,x){var p=new XMLHttpRequest;p.open("GET",h),p.responseType="blob",p.onload=function(){g(p.response,v,x)},p.onerror=function(){console.error("could not download file")},p.send()}function u(h){var v=new XMLHttpRequest;v.open("HEAD",h,!1);try{v.send()}catch{}return 200<=v.status&&299>=v.status}function f(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var v=document.createEvent("MouseEvents");v.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(v)}}var d=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Fr=="object"&&Fr.global===Fr?Fr:void 0,m=d.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=d.saveAs||(typeof window!="object"||window!==d?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(h,v,x){var p=d.URL||d.webkitURL,b=document.createElement("a");v=v||h.name||"download",b.download=v,b.rel="noopener",typeof h=="string"?(b.href=h,b.origin===location.origin?f(b):u(b.href)?r(h,v,x):f(b,b.target="_blank")):(b.href=p.createObjectURL(h),setTimeout(function(){p.revokeObjectURL(b.href)},4e4),setTimeout(function(){f(b)},0))}:"msSaveOrOpenBlob"in navigator?function(h,v,x){if(v=v||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(o(h,x),v);else if(u(h))r(h,v,x);else{var p=document.createElement("a");p.href=h,p.target="_blank",setTimeout(function(){f(p)})}}:function(h,v,x,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof h=="string")return r(h,v,x);var b=h.type==="application/octet-stream",M=/constructor/i.test(d.HTMLElement)||d.safari,_=/CriOS\/[\d]+/.test(navigator.userAgent);if((_||b&&M||m)&&typeof FileReader<"u"){var z=new FileReader;z.onloadend=function(){var S=z.result;S=_?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},z.readAsDataURL(h)}else{var A=d.URL||d.webkitURL,L=A.createObjectURL(h);p?p.location=L:location.href=L,p=null,setTimeout(function(){A.revokeObjectURL(L)},4e4)}});d.saveAs=g.saveAs=g,n.exports=g})})(ds)),ds.exports}var Us=lN();const aN=async n=>{const a=document.querySelector(".react-flow");if(!a){alert("Canvas not found");return}try{const o=await eN(a,{backgroundColor:"#f9fafb",filter:u=>!u.classList?.contains("react-flow__controls")&&!u.classList?.contains("react-flow__minimap")}),r=`${(n?.metadata?.name||"c4-diagram").replace(/\s+/g,"-").toLowerCase()}.png`;Us.saveAs(o,r)}catch(o){console.error("Error exporting PNG:",o),alert("Failed to export PNG: "+o.message)}},iN=async n=>{const a=document.querySelector(".react-flow");if(!a){alert("Canvas not found");return}try{const o=await Av(a,{backgroundColor:"#f9fafb",filter:u=>!u.classList?.contains("react-flow__controls")&&!u.classList?.contains("react-flow__minimap")}),r=`${(n?.metadata?.name||"c4-diagram").replace(/\s+/g,"-").toLowerCase()}.svg`;Us.saveAs(o,r)}catch(o){console.error("Error exporting SVG:",o),alert("Failed to export SVG: "+o.message)}},oN=n=>{let a="C4Context";n.components?.length>0?a="C4Component":n.containers?.length>0&&(a="C4Container");let o=`${a}
`;return o+=` title ${n.metadata.name}
`,n.people?.forEach(r=>{const u=r.description||"";o+=` Person(${ie(r.id)}, "${r.name}", "${u}")
`}),n.people?.length>0&&(o+=`
`),n.systems?.forEach(r=>{const u=r.description||"",f=r.technology||"";f?o+=` System(${ie(r.id)}, "${r.name}", "${u}", "${f}")
`:o+=` System(${ie(r.id)}, "${r.name}", "${u}")
`}),n.systems?.length>0&&(o+=`
`),n.externalSystems?.forEach(r=>{const u=r.description||"";o+=` System_Ext(${ie(r.id)}, "${r.name}", "${u}")
`}),n.externalSystems?.length>0&&(o+=`
`),n.containers?.forEach(r=>{const u=r.description||"",f=r.technology||"";f?o+=` Container(${ie(r.id)}, "${r.name}", "${f}", "${u}")
`:o+=` Container(${ie(r.id)}, "${r.name}", "${u}")
`}),n.containers?.length>0&&(o+=`
`),n.components?.forEach(r=>{const u=r.description||"",f=r.technology||"";f?o+=` Component(${ie(r.id)}, "${r.name}", "${f}", "${u}")
`:o+=` Component(${ie(r.id)}, "${r.name}", "${u}")
`}),n.components?.length>0&&(o+=`
`),n.relationships?.forEach(r=>{const u=r.description||"uses",f=r.technology||"",d=r.arrowDirection==="left"?"Rel_Back":"Rel";f?o+=` ${d}(${ie(r.from)}, ${ie(r.to)}, "${u}", "${f}")
`:o+=` ${d}(${ie(r.from)}, ${ie(r.to)}, "${u}")
`}),o},Tv=n=>{let a=`@startuml
`;return a+=`!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
`,a+=`title ${n.metadata.name}
`,n.people?.forEach(o=>{a+=`Person(${ie(o.id)}, "${o.name}", "${o.description||""}")
`}),n.systems?.forEach(o=>{a+=`System(${ie(o.id)}, "${o.name}", "${o.description||""}")
`}),n.externalSystems?.forEach(o=>{a+=`System_Ext(${ie(o.id)}, "${o.name}", "${o.description||""}")
`}),n.containers?.forEach(o=>{const r=o.technology?`, "${o.technology}"`:"";a+=`Container(${ie(o.id)}, "${o.name}", "${o.description||""}"${r})
`}),n.components?.forEach(o=>{const r=o.technology?`, "${o.technology}"`:"";a+=`Component(${ie(o.id)}, "${o.name}", "${o.description||""}"${r})
`}),a+=`
`,n.relationships?.forEach(o=>{const r=o.description||"uses",u=o.technology?`, "${o.technology}"`:"";a+=`Rel(${ie(o.from)}, ${ie(o.to)}, "${r}"${u})
`}),a+=`
@enduml`,a},zv=n=>{let a=`# ${n.metadata.name}
`;return a+=`**Version:** ${n.metadata.version}
`,a+=`**Author:** ${n.metadata.author}
`,a+=`---
`,n.systems?.length>0&&(a+=`## Software Systems
`,n.systems.forEach(o=>{a+=`### ${o.name}
`,o.description&&(a+=`${o.description}
`),o.technology&&(a+=`**Technology:** ${o.technology}
`);const r=n.containers?.filter(u=>u.parentSystem===o.id)||[];r.length>0&&(a+=`#### Containers
`,r.forEach(u=>{a+=`- **${u.name}**`,u.technology&&(a+=` (${u.technology})`),u.description&&(a+=`: ${u.description}`),a+=`
`}),a+=`
`)})),n.externalSystems?.length>0&&(a+=`## External Systems
`,n.externalSystems.forEach(o=>{a+=`### ${o.name}
`,o.description&&(a+=`${o.description}
`)})),n.people?.length>0&&(a+=`## People / Actors
`,n.people.forEach(o=>{a+=`### ${o.name}
`,o.description&&(a+=`${o.description}
`)})),n.relationships?.length>0&&(a+=`## Relationships
`,a+=`| From | To | Description | Technology |
`,a+=`|------|-----|-------------|------------|
`,n.relationships.forEach(o=>{const r=bp(n,o.from),u=bp(n,o.to),f=r?.name||o.from,d=u?.name||o.to;a+=`| ${f} | ${d} | ${o.description||"-"} | ${o.technology||"-"} |
`}),a+=`
`),a},rN=n=>{const a=zv(n),o=Tv(n),r=`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${n.metadata.name} - C4 Model</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
line-height: 1.6;
}
h1, h2, h3, h4 { color: #1e293b; }
table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
th, td {
border: 1px solid #e2e8f0;
padding: 0.75rem;
text-align: left;
}
th { background-color: #f1f5f9; font-weight: 600; }
pre {
background-color: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
padding: 1rem;
overflow-x: auto;
}
code {
font-family: 'Monaco', 'Courier New', monospace;
font-size: 0.875rem;
}
.metadata {
background-color: #eff6ff;
border-left: 4px solid #3b82f6;
padding: 1rem;
margin: 1rem 0;
}
</style>
</head>
<body>
<div class="metadata">
<h1>${n.metadata.name}</h1>
<p><strong>Version:</strong> ${n.metadata.version}</p>
<p><strong>Author:</strong> ${n.metadata.author}</p>
</div>
${sN(a)}
<h2>PlantUML Diagram Code</h2>
<pre><code>${o}</code></pre>
<h2>JSON Model</h2>
<pre><code>${JSON.stringify(n,null,2)}</code></pre>
</body>
</html>`,u=new Blob([r],{type:"text/html"});Us.saveAs(u,`${(n.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}.html`)},ie=n=>n.replace(/[^a-zA-Z0-9]/g,"_"),bp=(n,a)=>[...n.systems||[],...n.containers||[],...n.components||[],...n.people||[],...n.externalSystems||[]].find(r=>r.id===a),sN=n=>n.split(`
`).map(a=>a.startsWith("# ")?`<h1>${a.substring(2)}</h1>`:a.startsWith("## ")?`<h2>${a.substring(3)}</h2>`:a.startsWith("### ")?`<h3>${a.substring(4)}</h3>`:a.startsWith("#### ")?`<h4>${a.substring(5)}</h4>`:a.startsWith("- ")?`<li>${a.substring(2)}</li>`:a.startsWith("**")&&a.endsWith("**")?`<p><strong>${a.substring(2,a.length-2)}</strong></p>`:a.trim()==="---"?"<hr>":a.trim()===""?"<br>":`<p>${a}</p>`).join(`
`),Ql=n=>n?n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):"",uN=n=>{const a="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;align=center;spacingTop=8;";switch(n){case"person":return`${a}fillColor=#e1d5e7;strokeColor=#9673a6;`;case"system":return`${a}fillColor=#dae8fc;strokeColor=#6c8ebf;`;case"externalSystem":return`${a}fillColor=#f5f5f5;strokeColor=#666666;dashed=1;`;case"container":return`${a}fillColor=#d5e8d4;strokeColor=#82b366;`;case"component":return`${a}fillColor=#fff2cc;strokeColor=#d6b656;`;default:return`${a}fillColor=#ffffff;strokeColor=#000000;`}},cN=n=>{let a="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;";return n.lineStyle==="dashed"?a+="dashed=1;dashPattern=8 8;":n.lineStyle==="dotted"&&(a+="dashed=1;dashPattern=2 2;"),n.arrowDirection==="left"?a+="startArrow=classic;endArrow=none;":n.arrowDirection==="both"?a+="startArrow=classic;endArrow=classic;":a+="startArrow=none;endArrow=classic;",a+="strokeColor=#666666;",a},fN=n=>{const a=new Date().toISOString(),o=`diagram-${Date.now()}`,r=[...n.people||[],...n.systems||[],...n.externalSystems||[],...n.containers||[],...n.components||[]];let u=1/0,f=1/0,d=-1/0,m=-1/0;r.forEach(z=>{const A=z.position?.x||0,L=z.position?.y||0;u=Math.min(u,A),f=Math.min(f,L),d=Math.max(d,A+220),m=Math.max(m,L+120)});const g=u<50?50-u:0,h=f<50?50-f:0,v=Math.max(1100,d+g+100),x=Math.max(850,m+h+100);let p=`<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="BAC4" modified="${a}" agent="BAC4 C4 Modelling Tool" version="1.0" type="device">
<diagram name="${Ql(n.metadata?.name||"C4 Diagram")}" id="${o}">
<mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="${v}" pageHeight="${x}" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
`;const b=new Map;let M=2;const _=z=>{switch(z){case"person":return"[Person]";case"system":return"[Software System]";case"externalSystem":return"[External System]";case"container":return"[Container]";case"component":return"[Component]";default:return""}};return r.forEach(z=>{const A=`cell-${M++}`;b.set(z.id,A);const L=(z.position?.x||0)+g,S=(z.position?.y||0)+h,T=220,$=120,V=uN(z.type),q=_(z.type),J=z.technology?`[${Ql(z.technology)}]`:"",I=z.description?`<br><font style="font-size: 10px">${Ql(z.description)}</font>`:"",ut=`<b>${Ql(z.name)}</b><br><font style="font-size: 10px; color: #666666;">${q}${J?"<br>"+J:""}</font>${I}`;p+=` <mxCell id="${A}" value="${ut}" style="${V}" vertex="1" parent="1">
<mxGeometry x="${L}" y="${S}" width="${T}" height="${$}" as="geometry" />
</mxCell>
`}),(n.relationships||[]).forEach(z=>{const A=`edge-${M++}`,L=b.get(z.from),S=b.get(z.to);if(!L||!S)return;const T=cN(z),$=z.description||"",V=z.technology?`[${Ql(z.technology)}]`:"",q=V?`${Ql($)}<br><font style="font-size: 9px">${V}</font>`:Ql($);p+=` <mxCell id="${A}" value="${q}" style="${T}" edge="1" parent="1" source="${L}" target="${S}">
<mxGeometry relative="1" as="geometry" />
</mxCell>
`}),p+=` </root>
</mxGraphModel>
</diagram>
</mxfile>`,p},dN=n=>{const a=fN(n),o=new Blob([a],{type:"application/xml"}),r=`${(n.metadata?.name||"c4-diagram").replace(/\s+/g,"-").toLowerCase()}.drawio`;Us.saveAs(o,r)},hN=n=>{const a={person:[],externalSystem:[],system:[],container:[],component:[]};n.forEach(m=>{a[m.type]&&a[m.type].push(m)});const o=100,r=200,u=250;let f=o;const d=[];return Object.keys(a).forEach(m=>{const g=a[m];if(g.length===0)return;const h=g.length*u,v=Math.max(100,(1200-h)/2);g.forEach((x,p)=>{d.push({...x,position:{x:v+p*u,y:f}})}),f+=r}),d},mN=n=>{const a=Math.ceil(Math.sqrt(n.length)),o=300,r=100,u=100;return n.map((f,d)=>{const m=d%a,g=Math.floor(d/a);return{...f,position:{x:r+m*o,y:u+g*o}}})},gN=n=>n.map((u,f)=>{const d=f/n.length*2*Math.PI;return{...u,position:{x:600+300*Math.cos(d),y:400+300*Math.sin(d)}}}),pN=(n,a=[])=>{const d=n.map(g=>({...g,vx:0,vy:0,position:g.position||{x:Math.random()*800+100,y:Math.random()*600+100}})),m=new Map;a.forEach(g=>{m.has(g.from)||m.set(g.from,[]),m.has(g.to)||m.set(g.to,[]),m.get(g.from).push(g.to),m.get(g.to).push(g.from)});for(let g=0;g<50;g++){for(let h=0;h<d.length;h++)for(let v=h+1;v<d.length;v++){const x=d[v].position.x-d[h].position.x,p=d[v].position.y-d[h].position.y,b=x*x+p*p,M=Math.sqrt(b)||1,_=5e3/b,z=x/M*_,A=p/M*_;d[h].vx-=z,d[h].vy-=A,d[v].vx+=z,d[v].vy+=A}a.forEach(h=>{const v=d.find(p=>p.id===h.from),x=d.find(p=>p.id===h.to);if(v&&x){const p=x.position.x-v.position.x,b=x.position.y-v.position.y,M=Math.sqrt(p*p+b*b)||1,_=.01*M,z=p/M*_,A=b/M*_;v.vx+=z,v.vy+=A,x.vx-=z,x.vy-=A}}),d.forEach(h=>{h.vx*=.8,h.vy*=.8,h.position.x+=h.vx,h.position.y+=h.vy,h.position.x=Math.max(50,Math.min(1400,h.position.x)),h.position.y=Math.max(50,Math.min(900,h.position.y))})}return d.map(({vx:g,vy:h,...v})=>v)},yN=n=>{let a=1;const o=new Map,r=h=>(o.has(h)||o.set(h,String(a++)),o.get(h)),u=(n.people||[]).map(h=>({id:r(h.id),name:h.name||"Unnamed Person",description:h.description||"",tags:(h.tags||[]).join(",")||"Person",location:"Unspecified",relationships:[]})),f=[];(n.systems||[]).forEach(h=>{const v=r(h.id);f.push({id:v,name:h.name||"Unnamed System",description:h.description||"",tags:(h.tags||[]).join(",")||"Software System",location:"Unspecified",containers:[],relationships:[]})}),(n.externalSystems||[]).forEach(h=>{const v=r(h.id);f.push({id:v,name:h.name||"Unnamed External System",description:h.description||"",tags:(h.tags||[]).join(",")||"Software System,External",location:"External",containers:[],relationships:[]})}),(n.containers||[]).forEach(h=>{const x={id:r(h.id),name:h.name||"Unnamed Container",description:h.description||"",technology:h.technology||"",tags:(h.tags||[]).join(",")||"Container",components:[],relationships:[]},p=f.find(b=>r(h.parentSystem)===b.id);p?p.containers.push(x):f.length===0?f.push({id:String(a++),name:"Default System",description:"System created to contain orphaned containers",tags:"Software System",location:"Unspecified",containers:[x],relationships:[]}):f[0].containers.push(x)}),(n.components||[]).forEach(h=>{const x={id:r(h.id),name:h.name||"Unnamed Component",description:h.description||"",technology:h.technology||"",tags:(h.tags||[]).join(",")||"Component",relationships:[]};let p=!1;for(const b of f){const M=b.containers.find(_=>r(h.parentContainer)===_.id);if(M){M.components.push(x),p=!0;break}}if(!p){for(const b of f)if(b.containers.length>0){b.containers[0].components.push(x),p=!0;break}}p||(f.length===0?f.push({id:String(a++),name:"Default System",description:"System created to contain orphaned components",tags:"Software System",location:"Unspecified",containers:[{id:String(a++),name:"Default Container",description:"Container created to contain orphaned components",technology:"",tags:"Container",components:[x],relationships:[]}],relationships:[]}):f[0].containers.length===0?f[0].containers.push({id:String(a++),name:"Default Container",description:"Container created to contain orphaned components",technology:"",tags:"Container",components:[x],relationships:[]}):f[0].containers[0].components.push(x))});const d=h=>{const v=r(h.from),x=r(h.to),p={sourceId:v,destinationId:x,description:h.description||"",technology:h.technology||"",tags:h.tags||""},b=u.find(M=>M.id===v);if(b){b.relationships.push(p);return}for(const M of f){if(M.id===v){M.relationships.push(p);return}for(const _ of M.containers){if(_.id===v){_.relationships.push(p);return}for(const z of _.components)if(z.id===v){z.relationships.push(p);return}}}};(n.relationships||[]).forEach(h=>{d(h)});const m={systemLandscapeViews:[],systemContextViews:[],containerViews:[],componentViews:[],configuration:{styles:{elements:[{tag:"Person",shape:"Person",background:"#08427b",color:"#ffffff"},{tag:"Software System",background:"#1168bd",color:"#ffffff"},{tag:"External",background:"#999999",color:"#ffffff"},{tag:"Container",background:"#438dd5",color:"#ffffff"},{tag:"Component",background:"#85bbf0",color:"#000000"}],relationships:[]}}};if(f.length>0||u.length>0){const h=[];let v=100,x=100;u.forEach(p=>{h.push({id:p.id,x:v,y:x}),v+=300,v>1200&&(v=100,x+=300)}),f.forEach(p=>{h.push({id:p.id,x:v,y:x}),v+=300,v>1200&&(v=100,x+=300)}),m.systemLandscapeViews.push({key:"SystemLandscape",description:"System Landscape view",elements:h,relationships:[],automaticLayout:{rankDirection:"TopBottom",rankSeparation:200,nodeSeparation:200}})}return{id:1,name:n.metadata?.name||"Architecture Model",description:`Exported from BAC4 on ${new Date().toISOString()}`,version:n.metadata?.version||"1.0",model:{people:u,softwareSystems:f},views:m,documentation:{},properties:{exportedFrom:"BAC4",author:n.metadata?.author||""}}},vN=n=>{const a={metadata:{name:n.name||"Imported Model",version:n.version||"1.0",author:n.properties?.author||n.lastModifiedUser||"Unknown"},systems:[],containers:[],components:[],people:[],externalSystems:[],relationships:[]},o=new Map;[...n.views?.systemLandscapeViews||[],...n.views?.systemContextViews||[],...n.views?.containerViews||[],...n.views?.componentViews||[]].forEach(m=>{(m.elements||[]).forEach(g=>{g.x!==void 0&&g.y!==void 0&&o.set(g.id,{x:g.x,y:g.y})})});const u=m=>o.get(m)||{x:100,y:100},f=(m,g)=>`${m}-${Date.now()}-${g}-${Math.random().toString(36).substr(2,5)}`,d=new Map;return(n.model?.people||[]).forEach(m=>{const g=f("person",m.id);d.set(m.id,g);const h=u(m.id);a.people.push({id:g,type:"person",name:m.name,description:m.description||"",technology:"",tags:m.tags?m.tags.split(",").map(v=>v.trim()).filter(v=>v!=="Person"):[],position:h})}),(n.model?.softwareSystems||[]).forEach(m=>{const g=m.location==="External"||m.tags&&m.tags.includes("External"),h=f(g?"externalSystem":"system",m.id);d.set(m.id,h);const v=u(m.id),x={id:h,type:g?"externalSystem":"system",name:m.name,description:m.description||"",technology:"",tags:m.tags?m.tags.split(",").map(p=>p.trim()).filter(p=>p!=="Software System"&&p!=="External"):[],position:v};g?a.externalSystems.push(x):a.systems.push(x),(m.containers||[]).forEach(p=>{const b=f("container",p.id);d.set(p.id,b);const M=u(p.id);a.containers.push({id:b,type:"container",name:p.name,description:p.description||"",technology:p.technology||"",tags:p.tags?p.tags.split(",").map(_=>_.trim()).filter(_=>_!=="Container"):[],position:M,parentSystem:h}),(p.components||[]).forEach(_=>{const z=f("component",_.id);d.set(_.id,z);const A=u(_.id);a.components.push({id:z,type:"component",name:_.name,description:_.description||"",technology:_.technology||"",tags:_.tags?_.tags.split(",").map(L=>L.trim()).filter(L=>L!=="Component"):[],position:A,parentContainer:b}),(_.relationships||[]).forEach(L=>{const S=d.get(L.sourceId),T=d.get(L.destinationId);S&&T&&a.relationships.push({id:`rel-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,from:S,to:T,description:L.description||"",technology:L.technology||"",arrowDirection:"right",lineStyle:"solid",animated:!1})})}),(p.relationships||[]).forEach(_=>{const z=d.get(_.sourceId),A=d.get(_.destinationId);z&&A&&a.relationships.push({id:`rel-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,from:z,to:A,description:_.description||"",technology:_.technology||"",arrowDirection:"right",lineStyle:"solid",animated:!1})})}),(m.relationships||[]).forEach(p=>{const b=d.get(p.sourceId),M=d.get(p.destinationId);b&&M&&a.relationships.push({id:`rel-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,from:b,to:M,description:p.description||"",technology:p.technology||"",arrowDirection:"right",lineStyle:"solid",animated:!1})})}),(n.model?.people||[]).forEach(m=>{(m.relationships||[]).forEach(g=>{const h=d.get(g.sourceId),v=d.get(g.destinationId);h&&v&&a.relationships.push({id:`rel-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,from:h,to:v,description:g.description||"",technology:g.technology||"",arrowDirection:"right",lineStyle:"solid",animated:!1})})}),a},xN=()=>{const{metadata:n,setMetadata:a,currentLevel:o,setCurrentLevel:r,exportModel:u,importModel:f,clearAll:d,getAllElements:m,updateElement:g,relationships:h}=Ne(),[v,x]=Z.useState(!1),[p,b]=Z.useState(!1),[M,_]=Z.useState(!1),[z,A]=Z.useState(!1),[L,S]=Z.useState(n.name),T=[{value:"context",label:"Context"},{value:"container",label:"Container"},{value:"component",label:"Component"},{value:"code",label:"Code"}],$=w=>{const R=m();if(R.length>0){if(!window.confirm(`Changing diagram level will clear all elements from the canvas.
Current elements: ${R.length}
Are you sure you want to proceed? This cannot be undone.`))return;d()}r(w)},V=()=>{const w=u(),R=JSON.stringify(w,null,2),K="data:application/json;charset=utf-8,"+encodeURIComponent(R),F=`${(w.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}.json`,at=document.createElement("a");at.setAttribute("href",K),at.setAttribute("download",F),at.click()},q=w=>{const R=w.target.files?.[0];if(R){const K=new FileReader;K.onload=F=>{try{const at=JSON.parse(F.target.result);if(at.model&&(at.views||at.documentation)){const ct=vN(at);f(ct),alert("Structurizr workspace imported successfully!")}else f(at),alert("Model imported successfully!")}catch(at){alert("Error importing model: "+at.message)}},K.readAsText(R)}},J=()=>{const w=u(),R=yN(w),K=JSON.stringify(R,null,2),F="data:application/json;charset=utf-8,"+encodeURIComponent(K),at=`${(w.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}-structurizr.json`,ct=document.createElement("a");ct.setAttribute("href",F),ct.setAttribute("download",at),ct.click(),b(!1)},I=()=>{window.confirm("Are you sure you want to clear all elements? This cannot be undone.")&&d()},ut=()=>{const w=u(),R=Tv(w),K=new Blob([R],{type:"text/plain"}),F=URL.createObjectURL(K),at=document.createElement("a");at.href=F,at.download=`${(w.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}.puml`,at.click(),URL.revokeObjectURL(F),b(!1)},tt=()=>{const w=u(),R=oN(w),K=new Blob([R],{type:"text/plain"}),F=URL.createObjectURL(K),at=document.createElement("a");at.href=F,at.download=`${(w.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}.mmd`,at.click(),URL.revokeObjectURL(F),b(!1)},et=()=>{const w=u(),R=zv(w),K=new Blob([R],{type:"text/markdown"}),F=URL.createObjectURL(K),at=document.createElement("a");at.href=F,at.download=`${(w.metadata?.name||"c4-model").replace(/\s+/g,"-").toLowerCase()}.md`,at.click(),URL.revokeObjectURL(F),b(!1)},P=()=>{const w=u();rN(w),b(!1)},D=async()=>{const w=u();await aN(w),b(!1)},U=async()=>{const w=u();await iN(w),b(!1)},N=()=>{const w=u();dN(w),b(!1)},H=()=>{S(n.name),A(!0)},B=()=>{const w=L.trim();w?a({...n,name:w}):S(n.name),A(!1)},X=w=>{w.key==="Enter"?B():w.key==="Escape"&&(S(n.name),A(!1))},nt=w=>{const R=m();w(R,h).forEach(F=>{g(F.type,F.id,{position:F.position})}),_(!1)};return C.jsx("header",{className:"bg-white border-b border-gray-200 px-4 py-3",children:C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex items-center gap-4",children:[C.jsx("h1",{className:"text-xl font-bold text-gray-900",children:"BAC4 Modelling Tool"}),C.jsx("span",{className:"text-gray-400",children:"|"}),z?C.jsx("input",{type:"text",value:L,onChange:w=>S(w.target.value),onBlur:B,onKeyDown:X,autoFocus:!0,className:"text-sm text-gray-900 font-medium px-2 py-1 border border-blue-500 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 min-w-[200px]"}):C.jsx("div",{onDoubleClick:H,className:"text-sm text-gray-600 cursor-pointer hover:text-gray-900 hover:bg-gray-100 px-2 py-1 rounded transition-colors",title:"Double-click to edit title",children:n.name})]}),C.jsxs("div",{className:"flex items-center gap-4",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("label",{htmlFor:"level-selector",className:"text-sm font-medium text-gray-700",children:"Level:"}),C.jsx("select",{id:"level-selector",value:o,onChange:w=>$(w.target.value),className:"px-3 py-1.5 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500","aria-label":"Select C4 diagram level",children:T.map(w=>C.jsx("option",{value:w.value,children:w.label},w.value))})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsxs("div",{className:"relative",children:[C.jsxs("button",{onClick:()=>b(!p),className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 text-sm transition-colors",title:"Export model",children:[C.jsx(lC,{className:"w-4 h-4"}),"Export"]}),p&&C.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 z-50",children:C.jsxs("div",{className:"py-1",children:[C.jsxs("button",{onClick:V,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(sp,{className:"w-4 h-4"}),"JSON (BAC4)"]}),C.jsxs("button",{onClick:J,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(sp,{className:"w-4 h-4"}),"Structurizr JSON"]}),C.jsx("hr",{className:"my-1"}),C.jsxs("button",{onClick:ut,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(wf,{className:"w-4 h-4"}),"PlantUML"]}),C.jsxs("button",{onClick:tt,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(wf,{className:"w-4 h-4"}),"Mermaid"]}),C.jsxs("button",{onClick:et,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(up,{className:"w-4 h-4"}),"Markdown"]}),C.jsxs("button",{onClick:P,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(up,{className:"w-4 h-4"}),"HTML Document"]}),C.jsx("hr",{className:"my-1"}),C.jsxs("button",{onClick:D,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(rp,{className:"w-4 h-4"}),"PNG Image"]}),C.jsxs("button",{onClick:U,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(rp,{className:"w-4 h-4"}),"SVG Image"]}),C.jsx("hr",{className:"my-1"}),C.jsxs("button",{onClick:N,className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 flex items-center gap-2",children:[C.jsx(wf,{className:"w-4 h-4"}),"Draw.io (.drawio)"]})]})})]}),C.jsxs("label",{className:"flex items-center gap-2 px-3 py-1.5 bg-green-700 text-white rounded-md hover:bg-green-800 text-sm cursor-pointer transition-colors",children:[C.jsx(iC,{className:"w-4 h-4"}),"Import",C.jsx("input",{type:"file",accept:".json",onChange:q,className:"hidden","aria-label":"Import JSON model file"})]}),C.jsxs("div",{className:"relative",children:[C.jsxs("button",{onClick:()=>_(!M),className:"flex items-center gap-2 px-3 py-1.5 bg-purple-600 text-white rounded-md hover:bg-purple-700 text-sm transition-colors",title:"Auto-layout",children:[C.jsx(aC,{className:"w-4 h-4"}),"Layout"]}),M&&C.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-200 z-50",children:C.jsxs("div",{className:"py-1",children:[C.jsx("button",{onClick:()=>nt(hN),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Hierarchical"}),C.jsx("button",{onClick:()=>nt(mN),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Grid"}),C.jsx("button",{onClick:()=>nt(gN),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Circular"}),C.jsx("button",{onClick:()=>nt(pN),className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Force-Directed"})]})})]}),C.jsx("button",{onClick:I,className:"flex items-center gap-2 px-3 py-1.5 bg-red-600 text-white rounded-md hover:bg-red-700 text-sm transition-colors",title:"Clear all elements",children:"Clear All"})]})]})]})})},os="c4-model-autosave",bN=3e4,ao=n=>!n||typeof n!="object"?null:{id:n.id,type:n.type,name:n.name||"",description:n.description||"",technology:n.technology||"",tags:Array.isArray(n.tags)?n.tags:[],position:n.position&&typeof n.position=="object"?{x:Number(n.position.x)||0,y:Number(n.position.y)||0}:{x:0,y:0},width:n.width?Number(n.width):void 0,height:n.height?Number(n.height):void 0},SN=n=>!n||typeof n!="object"?null:{id:n.id,from:n.from,to:n.to,description:n.description||"",technology:n.technology||"",arrowDirection:n.arrowDirection||"right",lineStyle:n.lineStyle||"solid",animated:!!n.animated},Cf=n=>{if(!n||typeof n!="object")return null;const a=(o,r)=>Array.isArray(o)?o.map(r).filter(u=>u!==null):[];return{metadata:n.metadata||{name:"New C4 Model",version:"1.0",author:"Solution Architect"},systems:a(n.systems,ao),containers:a(n.containers,ao),components:a(n.components,ao),people:a(n.people,ao),externalSystems:a(n.externalSystems,ao),relationships:a(n.relationships,SN)}},EN=()=>{const{exportModel:n,importModel:a}=Ne();Z.useEffect(()=>{const o=localStorage.getItem(os);if(o)try{const r=JSON.parse(o),u=Cf(r);u&&window.confirm("Found a previously saved model. Would you like to restore it?")&&(a(u),console.log("Model restored from local storage (sanitized)"))}catch(r){console.error("Error loading saved model:",r),console.warn("Clearing corrupted localStorage data"),localStorage.removeItem(os)}},[a]),Z.useEffect(()=>{const o=setInterval(()=>{const r=n(),u=Cf(r);if(u.systems?.length>0||u.containers?.length>0||u.components?.length>0||u.people?.length>0||u.externalSystems?.length>0)try{localStorage.setItem(os,JSON.stringify(u)),console.log("Model auto-saved to local storage")}catch(f){console.error("Error saving model to localStorage:",f)}},bN);return()=>clearInterval(o)},[n]),Z.useEffect(()=>{const o=()=>{const r=n(),u=Cf(r);if(u.systems?.length>0||u.containers?.length>0||u.components?.length>0||u.people?.length>0||u.externalSystems?.length>0)try{localStorage.setItem(os,JSON.stringify(u))}catch(f){console.error("Error saving model on unload:",f)}};return window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)},[n])},wN={c4Node:rC},_N=(n,a)=>{if(!n?.position||!a?.position)return{sourceHandle:"bottom",targetHandle:"top"};const o=a.position.x-n.position.x,r=a.position.y-n.position.y;return Math.abs(o)>Math.abs(r)?o>0?{sourceHandle:"right",targetHandle:"left"}:{sourceHandle:"left",targetHandle:"right"}:r>0?{sourceHandle:"bottom",targetHandle:"top"}:{sourceHandle:"top",targetHandle:"bottom"}};function CN(){const[n,a,o]=x3([]),[r,u,f]=b3([]),[d,m]=Z.useState(null),{getAllElements:g,relationships:h,updateElement:v,setSelectedElement:x,setSelectedEdge:p,selectedElement:b,currentLevel:M}=Ne(),_=Z.useCallback(P=>{o(P)},[o]),z=Ne(P=>P.systems),A=Ne(P=>P.containers),L=Ne(P=>P.components),S=Ne(P=>P.people),T=Ne(P=>P.externalSystems),$=Ne(P=>P.getVisibleElements);EN(),Z.useEffect(()=>{const D=$().map(U=>({id:U.id,type:"c4Node",position:U.position||{x:Math.random()*400,y:Math.random()*300},data:{...U,label:U.name}}));a(D)},[z,A,L,S,T,M,$,a]),Z.useEffect(()=>{const P=$(),D=h.map(U=>{const N=U.arrowDirection||"right";let H,B;(N==="left"||N==="both")&&(H={type:Wl.ArrowClosed}),(N==="right"||N==="both")&&(B={type:Wl.ArrowClosed});const X=U.lineStyle||"solid";let nt;X==="dashed"?nt="5,5":X==="dotted"&&(nt="2,2");const w=P.find(at=>at.id===U.from),R=P.find(at=>at.id===U.to),{sourceHandle:K,targetHandle:F}=_N(w,R);return{id:U.id,source:U.from,target:U.to,sourceHandle:K,targetHandle:F,label:U.description||"",type:"smoothstep",animated:U.animated||!1,markerStart:H,markerEnd:B,style:{stroke:"#64748b",strokeWidth:2,strokeDasharray:nt},labelStyle:{fill:"#334155",fontSize:12,fontWeight:500},labelBgStyle:{fill:"#f8fafc",fillOpacity:.9}}});u(D)},[h,u,$,z,A,L,S,T]);const V=Z.useCallback((P,D)=>{const U=g().find(N=>N.id===D.id);U&&v(U.type,U.id,{position:{x:D.position.x,y:D.position.y}})},[g,v]),q=Z.useCallback(P=>{const D={...P,type:"smoothstep",animated:!1,markerEnd:{type:Wl.ArrowClosed}};u(H=>yy(D,H));const{source:U,target:N}=P;Ne.getState().addRelationship({from:U,to:N,description:"New relationship",technology:""})},[u]);Z.useEffect(()=>(typeof window<"u"&&(window.__CREATE_CONNECTION__=q),()=>{typeof window<"u"&&delete window.__CREATE_CONNECTION__}),[q]);const J=Z.useCallback((P,D)=>{try{const U=g().find(N=>N.id===D.id);U?(console.log("[BAC4] Node clicked:",U.type,U.id),x(U)):(console.error("[BAC4] Element not found for node:",D.id),x(null))}catch(U){console.error("[BAC4] Error in onNodeClick:",U),x(null)}},[g,x]),I=Z.useCallback((P,D)=>{const U=h.find(N=>N.id===D.id);p(U)},[h,p]),ut=Z.useCallback(()=>{x(null),p(null)},[x,p]),tt=Z.useCallback(P=>{P.preventDefault(),P.dataTransfer.dropEffect="move"},[]),et=Z.useCallback(P=>{P.preventDefault();const D=P.dataTransfer.getData("application/c4-element-type");if(!D||!d)return;const U=d.screenToFlowPosition({x:P.clientX,y:P.clientY}),N={name:`New ${D.charAt(0).toUpperCase()+D.slice(1)}`,description:"",technology:"",position:U};Ne.getState().addElement(D,N)},[d]);return C.jsxs("div",{className:"flex flex-col h-screen bg-gray-50",children:[C.jsx(xN,{}),C.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[C.jsx(sC,{}),C.jsx("div",{className:"flex-1 relative",children:C.jsxs(v3,{nodes:n,edges:r,onNodesChange:_,onEdgesChange:f,onConnect:q,onNodeDragStop:V,onNodeClick:J,onEdgeClick:I,onPaneClick:ut,onDrop:et,onDragOver:tt,onInit:m,nodeTypes:wN,fitView:!0,className:"bg-gray-50",children:[C.jsx(C3,{color:"#cbd5e1",gap:16}),C.jsx(O3,{}),C.jsx(G3,{nodeColor:P=>{switch(P.data.type){case"system":return"#3b82f6";case"container":return"#22c55e";case"component":return"#eab308";case"person":return"#a855f7";case"externalSystem":return"#6b7280";default:return"#94a3b8"}}})]})}),C.jsx(uC,{})]})]})}kx.createRoot(document.getElementById("root")).render(C.jsx(Z.StrictMode,{children:C.jsx(CN,{})}));
</script>
<style>*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.collapse{visibility:collapse}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.z-50{z-index:50}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-screen{height:100vh}.w-3{width:.75rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-64{width:16rem}.w-80{width:20rem}.w-full{width:100%}.min-w-\[200px\]{min-width:200px}.flex-1{flex:1 1 0%}.border-collapse{border-collapse:collapse}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(168 85 247 / var(--tw-border-opacity, 1))}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity, 1))}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-700{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(147 51 234 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tracking-wide{letter-spacing:.025em}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-blue-400{--tw-ring-opacity: 1;--tw-ring-color: rgb(96 165 250 / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}.react-flow__attribution a{color:#6b7280!important}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-700:hover{--tw-bg-opacity: 1;background-color:rgb(126 34 206 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.active\:cursor-grabbing:active{cursor:grabbing}.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}
</style>
</head>
<body>
<div id="root"></div>
</body>
</html>