@pipelex/mthds-ui 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +1,21 @@
1
- "use strict";(()=>{var XT=Object.create;var xg=Object.defineProperty;var qT=Object.getOwnPropertyDescriptor;var ZT=Object.getOwnPropertyNames;var jT=Object.getPrototypeOf,$T=Object.prototype.hasOwnProperty;var en=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var FT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ZT(t))!$T.call(e,i)&&i!==n&&xg(e,i,{get:()=>t[i],enumerable:!(o=qT(t,i))||o.enumerable});return e};var ne=(e,t,n)=>(n=e!=null?XT(jT(e)):{},FT(t||!e||!e.__esModule?xg(n,"default",{value:e,enumerable:!0}):n,e));var Og=en(he=>{"use strict";var Wf=Symbol.for("react.transitional.element"),KT=Symbol.for("react.portal"),QT=Symbol.for("react.fragment"),WT=Symbol.for("react.strict_mode"),JT=Symbol.for("react.profiler"),e2=Symbol.for("react.consumer"),t2=Symbol.for("react.context"),n2=Symbol.for("react.forward_ref"),o2=Symbol.for("react.suspense"),i2=Symbol.for("react.memo"),Cg=Symbol.for("react.lazy"),a2=Symbol.for("react.activity"),_g=Symbol.iterator;function l2(e){return e===null||typeof e!="object"?null:(e=_g&&e[_g]||e["@@iterator"],typeof e=="function"?e:null)}var wg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ag=Object.assign,Mg={};function Va(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||wg}Va.prototype.isReactComponent={};Va.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Va.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dg(){}Dg.prototype=Va.prototype;function Jf(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||wg}var ed=Jf.prototype=new Dg;ed.constructor=Jf;Ag(ed,Va.prototype);ed.isPureReactComponent=!0;var Eg=Array.isArray;function Qf(){}var Ye={H:null,A:null,T:null,S:null},Rg=Object.prototype.hasOwnProperty;function td(e,t,n){var o=n.ref;return{$$typeof:Wf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function r2(e,t){return td(e.type,t,e.props)}function nd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wf}function s2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Tg=/\/+/g;function Kf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?s2(""+e.key):t.toString(36)}function u2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Qf,Qf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ia(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Wf:case KT:l=!0;break;case Cg:return l=e._init,Ia(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Kf(e,0):o,Eg(i)?(n="",l!=null&&(n=l.replace(Tg,"$&/")+"/"),Ia(i,t,n,"",function(u){return u})):i!=null&&(nd(i)&&(i=r2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Tg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Eg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+Kf(o,s),l+=Ia(o,t,n,a,i);else if(s=l2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Kf(o,s++),l+=Ia(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ia(u2(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function ou(e,t,n){if(e==null)return e;var o=[],i=0;return Ia(e,o,"","",function(a){return t.call(n,a,i++)}),o}function c2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ng=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},f2={map:ou,forEach:function(e,t,n){ou(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ou(e,function(){t++}),t},toArray:function(e){return ou(e,function(t){return t})||[]},only:function(e){if(!nd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Activity=a2;he.Children=f2;he.Component=Va;he.Fragment=QT;he.Profiler=JT;he.PureComponent=Jf;he.StrictMode=WT;he.Suspense=o2;he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;he.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};he.cache=function(e){return function(){return e.apply(null,arguments)}};he.cacheSignal=function(){return null};he.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Ag({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Rg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return td(e.type,i,o)};he.createContext=function(e){return e={$$typeof:t2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:e2,_context:e},e};he.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Rg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return td(e,a,i)};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:n2,render:e}};he.isValidElement=nd;he.lazy=function(e){return{$$typeof:Cg,_payload:{_status:-1,_result:e},_init:c2}};he.memo=function(e,t){return{$$typeof:i2,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Qf,Ng)}catch(a){Ng(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};he.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};he.use=function(e){return Ye.H.use(e)};he.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};he.useCallback=function(e,t){return Ye.H.useCallback(e,t)};he.useContext=function(e){return Ye.H.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};he.useEffect=function(e,t){return Ye.H.useEffect(e,t)};he.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};he.useId=function(){return Ye.H.useId()};he.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ye.H.useMemo(e,t)};he.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};he.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};he.useRef=function(e){return Ye.H.useRef(e)};he.useState=function(e){return Ye.H.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ye.H.useTransition()};he.version="19.2.4"});var At=en((Dz,zg)=>{"use strict";zg.exports=Og()});var Yg=en(Fe=>{"use strict";function ld(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<iu(i,t))e[o]=t,e[n]=i,n=o;else break e}}function uo(e){return e.length===0?null:e[0]}function lu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>iu(r,n))s<i&&0>iu(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>iu(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function iu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Lg=performance,Fe.unstable_now=function(){return Lg.now()}):(od=Date,Bg=od.now(),Fe.unstable_now=function(){return od.now()-Bg});var Lg,od,Bg,Oo=[],di=[],d2=1,Ln=null,Pt=3,rd=!1,dr=!1,pr=!1,sd=!1,kg=typeof setTimeout=="function"?setTimeout:null,Gg=typeof clearTimeout=="function"?clearTimeout:null,Hg=typeof setImmediate<"u"?setImmediate:null;function au(e){for(var t=uo(di);t!==null;){if(t.callback===null)lu(di);else if(t.startTime<=e)lu(di),t.sortIndex=t.expirationTime,ld(Oo,t);else break;t=uo(di)}}function ud(e){if(pr=!1,au(e),!dr)if(uo(Oo)!==null)dr=!0,Xa||(Xa=!0,Ya());else{var t=uo(di);t!==null&&cd(ud,t.startTime-e)}}var Xa=!1,mr=-1,Ug=5,Ig=-1;function Vg(){return sd?!0:!(Fe.unstable_now()-Ig<Ug)}function id(){if(sd=!1,Xa){var e=Fe.unstable_now();Ig=e;var t=!0;try{e:{dr=!1,pr&&(pr=!1,Gg(mr),mr=-1),rd=!0;var n=Pt;try{t:{for(au(e),Ln=uo(Oo);Ln!==null&&!(Ln.expirationTime>e&&Vg());){var o=Ln.callback;if(typeof o=="function"){Ln.callback=null,Pt=Ln.priorityLevel;var i=o(Ln.expirationTime<=e);if(e=Fe.unstable_now(),typeof i=="function"){Ln.callback=i,au(e),t=!0;break t}Ln===uo(Oo)&&lu(Oo),au(e)}else lu(Oo);Ln=uo(Oo)}if(Ln!==null)t=!0;else{var a=uo(di);a!==null&&cd(ud,a.startTime-e),t=!1}}break e}finally{Ln=null,Pt=n,rd=!1}t=void 0}}finally{t?Ya():Xa=!1}}}var Ya;typeof Hg=="function"?Ya=function(){Hg(id)}:typeof MessageChannel<"u"?(ad=new MessageChannel,Pg=ad.port2,ad.port1.onmessage=id,Ya=function(){Pg.postMessage(null)}):Ya=function(){kg(id,0)};var ad,Pg;function cd(e,t){mr=kg(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ug=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Pt};Fe.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Fe.unstable_requestPaint=function(){sd=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var o=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:d2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,ld(di,e),uo(Oo)===null&&e===uo(di)&&(pr?(Gg(mr),mr=-1):pr=!0,cd(ud,n-o))):(e.sortIndex=i,ld(Oo,e),dr||rd||(dr=!0,Xa||(Xa=!0,Ya()))),e};Fe.unstable_shouldYield=Vg;Fe.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var qg=en((Oz,Xg)=>{"use strict";Xg.exports=Yg()});var jg=en(Vt=>{"use strict";var p2=At();function Zg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function pi(){}var It={d:{f:pi,r:function(){throw Error(Zg(522))},D:pi,C:pi,L:pi,m:pi,X:pi,S:pi,M:pi},p:0,findDOMNode:null},m2=Symbol.for("react.portal");function h2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var hr=p2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ru(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Zg(299));return h2(e,t,null,n)};Vt.flushSync=function(e){var t=hr.T,n=It.p;try{if(hr.T=null,It.p=2,e)return e()}finally{hr.T=t,It.p=n,It.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,It.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&It.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=ru(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?It.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&It.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ru(t.as,t.crossOrigin);It.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&It.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=ru(n,t.crossOrigin);It.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ru(t.as,t.crossOrigin);It.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else It.d.m(e)};Vt.requestFormReset=function(e){It.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return hr.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return hr.H.useHostTransitionStatus()};Vt.version="19.2.4"});var fd=en((Lz,Fg)=>{"use strict";function $g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($g)}catch(e){console.error(e)}}$g(),Fg.exports=jg()});var r1=en(Oc=>{"use strict";var gt=qg(),x0=At(),g2=fd();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ts(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function E0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function T0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Kg(e){if(ts(e)!==e)throw Error(U(188))}function y2(e){var t=e.alternate;if(!t){if(t=ts(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Kg(i),e;if(a===o)return Kg(i),t;a=a.sibling}throw Error(U(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function N0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,v2=Symbol.for("react.element"),su=Symbol.for("react.transitional.element"),Er=Symbol.for("react.portal"),Ka=Symbol.for("react.fragment"),C0=Symbol.for("react.strict_mode"),qd=Symbol.for("react.profiler"),w0=Symbol.for("react.consumer"),Uo=Symbol.for("react.context"),Up=Symbol.for("react.forward_ref"),Zd=Symbol.for("react.suspense"),jd=Symbol.for("react.suspense_list"),Ip=Symbol.for("react.memo"),mi=Symbol.for("react.lazy"),$d=Symbol.for("react.activity"),b2=Symbol.for("react.memo_cache_sentinel"),Qg=Symbol.iterator;function gr(e){return e===null||typeof e!="object"?null:(e=Qg&&e[Qg]||e["@@iterator"],typeof e=="function"?e:null)}var S2=Symbol.for("react.client.reference");function Fd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===S2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ka:return"Fragment";case qd:return"Profiler";case C0:return"StrictMode";case Zd:return"Suspense";case jd:return"SuspenseList";case $d:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Er:return"Portal";case Uo:return e.displayName||"Context";case w0:return(e._context.displayName||"Context")+".Consumer";case Up:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ip:return t=e.displayName||null,t!==null?t:Fd(e.type)||"Memo";case mi:t=e._payload,e=e._init;try{return Fd(e(t))}catch{}}return null}var Tr=Array.isArray,ce=x0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=g2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ta={pending:!1,data:null,method:null,action:null},Kd=[],Qa=-1;function ho(e){return{current:e}}function Nt(e){0>Qa||(e.current=Kd[Qa],Kd[Qa]=null,Qa--)}function Ie(e,t){Qa++,Kd[Qa]=e.current,e.current=t}var mo=ho(null),Ir=ho(null),Ni=ho(null),Iu=ho(null);function Vu(e,t){switch(Ie(Ni,t),Ie(Ir,e),Ie(mo,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?i0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=i0(t),e=jb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Nt(mo),Ie(mo,e)}function hl(){Nt(mo),Nt(Ir),Nt(Ni)}function Qd(e){e.memoizedState!==null&&Ie(Iu,e);var t=mo.current,n=jb(t,e.type);t!==n&&(Ie(Ir,e),Ie(mo,n))}function Yu(e){Ir.current===e&&(Nt(mo),Nt(Ir)),Iu.current===e&&(Nt(Iu),Wr._currentValue=ta)}var dd,Wg;function Qi(e){if(dd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);dd=t&&t[1]||"",Wg=-1<n.stack.indexOf(`
1
+ "use strict";(()=>{var sN=Object.create;var wg=Object.defineProperty;var uN=Object.getOwnPropertyDescriptor;var cN=Object.getOwnPropertyNames;var fN=Object.getPrototypeOf,dN=Object.prototype.hasOwnProperty;var Wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var pN=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of cN(t))!dN.call(e,i)&&i!==n&&wg(e,i,{get:()=>t[i],enumerable:!(o=uN(t,i))||o.enumerable});return e};var J=(e,t,n)=>(n=e!=null?sN(fN(e)):{},pN(t||!e||!e.__esModule?wg(n,"default",{value:e,enumerable:!0}):n,e));var kg=Wt(pe=>{"use strict";var od=Symbol.for("react.transitional.element"),mN=Symbol.for("react.portal"),hN=Symbol.for("react.fragment"),gN=Symbol.for("react.strict_mode"),yN=Symbol.for("react.profiler"),vN=Symbol.for("react.consumer"),bN=Symbol.for("react.context"),SN=Symbol.for("react.forward_ref"),xN=Symbol.for("react.suspense"),_N=Symbol.for("react.memo"),Og=Symbol.for("react.lazy"),EN=Symbol.for("react.activity"),Ag=Symbol.iterator;function TN(e){return e===null||typeof e!="object"?null:(e=Ag&&e[Ag]||e["@@iterator"],typeof e=="function"?e:null)}var zg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lg=Object.assign,Bg={};function Ka(e,t,n){this.props=e,this.context=t,this.refs=Bg,this.updater=n||zg}Ka.prototype.isReactComponent={};Ka.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ka.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pg(){}Pg.prototype=Ka.prototype;function id(e,t,n){this.props=e,this.context=t,this.refs=Bg,this.updater=n||zg}var ad=id.prototype=new Pg;ad.constructor=id;Lg(ad,Ka.prototype);ad.isPureReactComponent=!0;var Mg=Array.isArray;function nd(){}var Ye={H:null,A:null,T:null,S:null},Hg=Object.prototype.hasOwnProperty;function rd(e,t,n){var o=n.ref;return{$$typeof:od,type:e,key:t,ref:o!==void 0?o:null,props:n}}function NN(e,t){return rd(e.type,t,e.props)}function ld(e){return typeof e=="object"&&e!==null&&e.$$typeof===od}function CN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dg=/\/+/g;function td(e,t){return typeof e=="object"&&e!==null&&e.key!=null?CN(""+e.key):t.toString(36)}function wN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(nd,nd):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Fa(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(a){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case od:case mN:r=!0;break;case Og:return r=e._init,Fa(r(e._payload),t,n,o,i)}}if(r)return i=i(e),r=o===""?"."+td(e,0):o,Mg(i)?(n="",r!=null&&(n=r.replace(Dg,"$&/")+"/"),Fa(i,t,n,"",function(u){return u})):i!=null&&(ld(i)&&(i=NN(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Dg,"$&/")+"/")+r)),t.push(i)),1;r=0;var l=o===""?".":o+":";if(Mg(e))for(var s=0;s<e.length;s++)o=e[s],a=l+td(o,s),r+=Fa(o,t,n,a,i);else if(s=TN(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=l+td(o,s++),r+=Fa(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Fa(wN(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return r}function iu(e,t,n){if(e==null)return e;var o=[],i=0;return Fa(e,o,"","",function(a){return t.call(n,a,i++)}),o}function AN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Rg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},MN={map:iu,forEach:function(e,t,n){iu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return iu(e,function(){t++}),t},toArray:function(e){return iu(e,function(t){return t})||[]},only:function(e){if(!ld(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Activity=EN;pe.Children=MN;pe.Component=Ka;pe.Fragment=hN;pe.Profiler=yN;pe.PureComponent=id;pe.StrictMode=gN;pe.Suspense=xN;pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;pe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};pe.cache=function(e){return function(){return e.apply(null,arguments)}};pe.cacheSignal=function(){return null};pe.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Lg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Hg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var r=Array(a),l=0;l<a;l++)r[l]=arguments[l+2];o.children=r}return rd(e.type,i,o)};pe.createContext=function(e){return e={$$typeof:bN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:vN,_context:e},e};pe.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Hg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var r=arguments.length-2;if(r===1)i.children=n;else if(1<r){for(var l=Array(r),s=0;s<r;s++)l[s]=arguments[s+2];i.children=l}if(e&&e.defaultProps)for(o in r=e.defaultProps,r)i[o]===void 0&&(i[o]=r[o]);return rd(e,a,i)};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:SN,render:e}};pe.isValidElement=ld;pe.lazy=function(e){return{$$typeof:Og,_payload:{_status:-1,_result:e},_init:AN}};pe.memo=function(e,t){return{$$typeof:_N,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(nd,Rg)}catch(a){Rg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};pe.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};pe.use=function(e){return Ye.H.use(e)};pe.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};pe.useCallback=function(e,t){return Ye.H.useCallback(e,t)};pe.useContext=function(e){return Ye.H.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};pe.useEffect=function(e,t){return Ye.H.useEffect(e,t)};pe.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};pe.useId=function(){return Ye.H.useId()};pe.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Ye.H.useMemo(e,t)};pe.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};pe.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};pe.useRef=function(e){return Ye.H.useRef(e)};pe.useState=function(e){return Ye.H.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Ye.H.useTransition()};pe.version="19.2.4"});var Et=Wt((t5,Gg)=>{"use strict";Gg.exports=kg()});var Fg=Wt(Fe=>{"use strict";function fd(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<au(i,t))e[o]=t,e[n]=i,n=o;else break e}}function go(e){return e.length===0?null:e[0]}function lu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var r=2*(o+1)-1,l=e[r],s=r+1,u=e[s];if(0>au(l,n))s<i&&0>au(u,l)?(e[o]=u,e[s]=n,o=s):(e[o]=l,e[r]=n,o=r);else if(s<i&&0>au(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function au(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Ig=performance,Fe.unstable_now=function(){return Ig.now()}):(sd=Date,Ug=sd.now(),Fe.unstable_now=function(){return sd.now()-Ug});var Ig,sd,Ug,Bo=[],pi=[],DN=1,Bn=null,Bt=3,dd=!1,vl=!1,bl=!1,pd=!1,Xg=typeof setTimeout=="function"?setTimeout:null,qg=typeof clearTimeout=="function"?clearTimeout:null,Vg=typeof setImmediate<"u"?setImmediate:null;function ru(e){for(var t=go(pi);t!==null;){if(t.callback===null)lu(pi);else if(t.startTime<=e)lu(pi),t.sortIndex=t.expirationTime,fd(Bo,t);else break;t=go(pi)}}function md(e){if(bl=!1,ru(e),!vl)if(go(Bo)!==null)vl=!0,Wa||(Wa=!0,Qa());else{var t=go(pi);t!==null&&hd(md,t.startTime-e)}}var Wa=!1,Sl=-1,Zg=5,jg=-1;function $g(){return pd?!0:!(Fe.unstable_now()-jg<Zg)}function ud(){if(pd=!1,Wa){var e=Fe.unstable_now();jg=e;var t=!0;try{e:{vl=!1,bl&&(bl=!1,qg(Sl),Sl=-1),dd=!0;var n=Bt;try{t:{for(ru(e),Bn=go(Bo);Bn!==null&&!(Bn.expirationTime>e&&$g());){var o=Bn.callback;if(typeof o=="function"){Bn.callback=null,Bt=Bn.priorityLevel;var i=o(Bn.expirationTime<=e);if(e=Fe.unstable_now(),typeof i=="function"){Bn.callback=i,ru(e),t=!0;break t}Bn===go(Bo)&&lu(Bo),ru(e)}else lu(Bo);Bn=go(Bo)}if(Bn!==null)t=!0;else{var a=go(pi);a!==null&&hd(md,a.startTime-e),t=!1}}break e}finally{Bn=null,Bt=n,dd=!1}t=void 0}}finally{t?Qa():Wa=!1}}}var Qa;typeof Vg=="function"?Qa=function(){Vg(ud)}:typeof MessageChannel<"u"?(cd=new MessageChannel,Yg=cd.port2,cd.port1.onmessage=ud,Qa=function(){Yg.postMessage(null)}):Qa=function(){Xg(ud,0)};var cd,Yg;function hd(e,t){Sl=Xg(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Zg=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Bt};Fe.unstable_next=function(e){switch(Bt){case 1:case 2:case 3:var t=3;break;default:t=Bt}var n=Bt;Bt=t;try{return e()}finally{Bt=n}};Fe.unstable_requestPaint=function(){pd=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Bt;Bt=e;try{return t()}finally{Bt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var o=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:DN++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,fd(pi,e),go(Bo)===null&&e===go(pi)&&(bl?(qg(Sl),Sl=-1):bl=!0,hd(md,n-o))):(e.sortIndex=i,fd(Bo,e),vl||dd||(vl=!0,Wa||(Wa=!0,Qa()))),e};Fe.unstable_shouldYield=$g;Fe.unstable_wrapCallback=function(e){var t=Bt;return function(){var n=Bt;Bt=t;try{return e.apply(this,arguments)}finally{Bt=n}}}});var Qg=Wt((o5,Kg)=>{"use strict";Kg.exports=Fg()});var Jg=Wt(Vt=>{"use strict";var RN=Et();function Wg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function mi(){}var Ut={d:{f:mi,r:function(){throw Error(Wg(522))},D:mi,C:mi,L:mi,m:mi,X:mi,S:mi,M:mi},p:0,findDOMNode:null},ON=Symbol.for("react.portal");function zN(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ON,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var xl=RN.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function su(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ut;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Wg(299));return zN(e,t,null,n)};Vt.flushSync=function(e){var t=xl.T,n=Ut.p;try{if(xl.T=null,Ut.p=2,e)return e()}finally{xl.T=t,Ut.p=n,Ut.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ut.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&Ut.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=su(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Ut.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&Ut.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=su(t.as,t.crossOrigin);Ut.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ut.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=su(n,t.crossOrigin);Ut.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=su(t.as,t.crossOrigin);Ut.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ut.d.m(e)};Vt.requestFormReset=function(e){Ut.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return xl.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return xl.H.useHostTransitionStatus()};Vt.version="19.2.4"});var gd=Wt((a5,ty)=>{"use strict";function ey(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ey)}catch(e){console.error(e)}}ey(),ty.exports=Jg()});var p1=Wt(zc=>{"use strict";var bt=Qg(),w0=Et(),LN=gd();function V(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ls(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function M0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ny(e){if(ls(e)!==e)throw Error(V(188))}function BN(e){var t=e.alternate;if(!t){if(t=ls(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ny(i),e;if(a===o)return ny(i),t;a=a.sibling}throw Error(V(188))}if(n.return!==o.return)n=i,o=a;else{for(var r=!1,l=i.child;l;){if(l===n){r=!0,n=i,o=a;break}if(l===o){r=!0,o=i,n=a;break}l=l.sibling}if(!r){for(l=a.child;l;){if(l===n){r=!0,n=a,o=i;break}if(l===o){r=!0,o=a,n=i;break}l=l.sibling}if(!r)throw Error(V(189))}}if(n.alternate!==o)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function R0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,PN=Symbol.for("react.element"),uu=Symbol.for("react.transitional.element"),Ml=Symbol.for("react.portal"),ir=Symbol.for("react.fragment"),O0=Symbol.for("react.strict_mode"),Kd=Symbol.for("react.profiler"),z0=Symbol.for("react.consumer"),Yo=Symbol.for("react.context"),qp=Symbol.for("react.forward_ref"),Qd=Symbol.for("react.suspense"),Wd=Symbol.for("react.suspense_list"),Zp=Symbol.for("react.memo"),hi=Symbol.for("react.lazy"),Jd=Symbol.for("react.activity"),HN=Symbol.for("react.memo_cache_sentinel"),oy=Symbol.iterator;function _l(e){return e===null||typeof e!="object"?null:(e=oy&&e[oy]||e["@@iterator"],typeof e=="function"?e:null)}var kN=Symbol.for("react.client.reference");function ep(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kN?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ir:return"Fragment";case Kd:return"Profiler";case O0:return"StrictMode";case Qd:return"Suspense";case Wd:return"SuspenseList";case Jd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Ml:return"Portal";case Yo:return e.displayName||"Context";case z0:return(e._context.displayName||"Context")+".Consumer";case qp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Zp:return t=e.displayName||null,t!==null?t:ep(e.type)||"Memo";case hi:t=e._payload,e=e._init;try{return ep(e(t))}catch{}}return null}var Dl=Array.isArray,fe=w0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Me=LN.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,aa={pending:!1,data:null,method:null,action:null},tp=[],ar=-1;function xo(e){return{current:e}}function Ct(e){0>ar||(e.current=tp[ar],tp[ar]=null,ar--)}function Ie(e,t){ar++,tp[ar]=e.current,e.current=t}var So=xo(null),jl=xo(null),Ci=xo(null),Vu=xo(null);function Yu(e,t){switch(Ie(Ci,t),Ie(jl,e),Ie(So,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=c0(t),e=Jb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ct(So),Ie(So,e)}function Er(){Ct(So),Ct(jl),Ct(Ci)}function np(e){e.memoizedState!==null&&Ie(Vu,e);var t=So.current,n=Jb(t,e.type);t!==n&&(Ie(jl,e),Ie(So,n))}function Xu(e){jl.current===e&&(Ct(So),Ct(jl)),Vu.current===e&&(Ct(Vu),is._currentValue=aa)}var yd,iy;function ta(e){if(yd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);yd=t&&t[1]||"",iy=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+dd+e+Wg}var pd=!1;function md(e,t){if(!e||pd)return"";pd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(h){var f=h}Reflect.construct(e,[],d)}else{try{d.call()}catch(h){f=h}e.call(d.prototype)}}else{try{throw Error()}catch(h){f=h}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(h){if(h&&f&&typeof h.stack=="string")return[h.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),l=a[0],r=a[1];if(l&&r){var s=l.split(`
4
- `),u=r.split(`
3
+ `+yd+e+iy}var vd=!1;function bd(e,t){if(!e||vd)return"";vd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(p){var f=p}Reflect.construct(e,[],d)}else{try{d.call()}catch(p){f=p}e.call(d.prototype)}}else{try{throw Error()}catch(p){f=p}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),r=a[0],l=a[1];if(r&&l){var s=r.split(`
4
+ `),u=l.split(`
5
5
  `);for(i=o=0;o<s.length&&!s[o].includes("DetermineComponentFrameRoot");)o++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(o===s.length||i===u.length)for(o=s.length-1,i=u.length-1;1<=o&&0<=i&&s[o]!==u[i];)i--;for(;1<=o&&0<=i;o--,i--)if(s[o]!==u[i]){if(o!==1||i!==1)do if(o--,i--,0>i||s[o]!==u[i]){var c=`
6
- `+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{pd=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qi(n):""}function x2(e,t){switch(e.tag){case 26:case 27:case 5:return Qi(e.type);case 16:return Qi("Lazy");case 13:return e.child!==t&&t!==null?Qi("Suspense Fallback"):Qi("Suspense");case 19:return Qi("SuspenseList");case 0:case 15:return md(e.type,!1);case 11:return md(e.type.render,!1);case 1:return md(e.type,!0);case 31:return Qi("Activity");default:return""}}function Jg(e){try{var t="",n=null;do t+=x2(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
6
+ `+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{vd=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ta(n):""}function GN(e,t){switch(e.tag){case 26:case 27:case 5:return ta(e.type);case 16:return ta("Lazy");case 13:return e.child!==t&&t!==null?ta("Suspense Fallback"):ta("Suspense");case 19:return ta("SuspenseList");case 0:case 15:return bd(e.type,!1);case 11:return bd(e.type.render,!1);case 1:return bd(e.type,!0);case 31:return ta("Activity");default:return""}}function ay(e){try{var t="",n=null;do t+=GN(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
7
7
  Error generating stack: `+o.message+`
8
- `+o.stack}}var Wd=Object.prototype.hasOwnProperty,Vp=gt.unstable_scheduleCallback,hd=gt.unstable_cancelCallback,_2=gt.unstable_shouldYield,E2=gt.unstable_requestPaint,Sn=gt.unstable_now,T2=gt.unstable_getCurrentPriorityLevel,A0=gt.unstable_ImmediatePriority,M0=gt.unstable_UserBlockingPriority,Xu=gt.unstable_NormalPriority,N2=gt.unstable_LowPriority,D0=gt.unstable_IdlePriority,C2=gt.log,w2=gt.unstable_setDisableYieldValue,ns=null,xn=null;function Si(e){if(typeof C2=="function"&&w2(e),xn&&typeof xn.setStrictMode=="function")try{xn.setStrictMode(ns,e)}catch{}}var _n=Math.clz32?Math.clz32:D2,A2=Math.log,M2=Math.LN2;function D2(e){return e>>>=0,e===0?32:31-(A2(e)/M2|0)|0}var uu=256,cu=262144,fu=4194304;function Wi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Wi(o):(l&=r,l!==0?i=Wi(l):n||(n=r&~e,n!==0&&(i=Wi(n))))):(r=o&~a,r!==0?i=Wi(r):l!==0?i=Wi(l):n||(n=o&~e,n!==0&&(i=Wi(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function os(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function R2(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R0(){var e=fu;return fu<<=1,(fu&62914560)===0&&(fu=4194304),e}function gd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function is(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function O2(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-_n(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&O0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function O0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-_n(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function z0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-_n(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function L0(e,t){var n=t&-t;return n=(n&42)!==0?1:Yp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Yp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function B0(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:i1(e.type))}function ey(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var ki=Math.random().toString(36).slice(2),Dt="__reactFiber$"+ki,rn="__reactProps$"+ki,Cl="__reactContainer$"+ki,Jd="__reactEvents$"+ki,z2="__reactListeners$"+ki,L2="__reactHandles$"+ki,ty="__reactResources$"+ki,as="__reactMarker$"+ki;function qp(e){delete e[Dt],delete e[rn],delete e[Jd],delete e[z2],delete e[L2]}function Wa(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cl]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=u0(e);e!==null;){if(n=e[Dt])return n;e=u0(e)}return t}e=n,n=e.parentNode}return null}function wl(e){if(e=e[Dt]||e[Cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function sl(e){var t=e[ty];return t||(t=e[ty]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[as]=!0}var H0=new Set,P0={};function fa(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(P0[e]=t,e=0;e<t.length;e++)H0.add(t[e])}var B2=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]*$"),ny={},oy={};function H2(e){return Wd.call(oy,e)?!0:Wd.call(ny,e)?!1:B2.test(e)?oy[e]=!0:(ny[e]=!0,!1)}function Cu(e,t,n){if(H2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function du(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function zo(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function k0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function P2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ep(e){if(!e._valueTracker){var t=k0(e)?"checked":"value";e._valueTracker=P2(e,t,""+e[t])}}function G0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=k0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function qu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var k2=/[\n"\\]/g;function Gn(e){return e.replace(k2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tp(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Hn(t)):e.value!==""+Hn(t)&&(e.value=""+Hn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?np(e,l,Hn(t)):n!=null?np(e,l,Hn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Hn(r):e.removeAttribute("name")}function U0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){ep(e);return}n=n!=null?""+Hn(n):"",t=t!=null?""+Hn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),ep(e)}function np(e,t,n){t==="number"&&qu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ul(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function I0(e,t,n){if(t!=null&&(t=""+Hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Hn(n):""}function V0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Tr(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Hn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),ep(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var G2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||G2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Y0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&iy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&iy(e,a,t[a])}function Zp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var U2=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"]]),I2=/^[\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 wu(e){return I2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Io(){}var op=null;function jp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ja=null,cl=null;function ay(e){var t=wl(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(tp(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Gn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[rn]||null;if(!i)throw Error(U(90));tp(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&G0(o)}break e;case"textarea":I0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ul(e,!!n.multiple,t,!1)}}}var yd=!1;function X0(e,t,n){if(yd)return e(t,n);yd=!0;try{var o=e(t);return o}finally{if(yd=!1,(Ja!==null||cl!==null)&&(Ac(),Ja&&(t=Ja,e=cl,cl=Ja=null,ay(t),e)))for(t=0;t<e.length;t++)ay(e[t])}}function Vr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[rn]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var Zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ip=!1;if(Zo)try{qa={},Object.defineProperty(qa,"passive",{get:function(){ip=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{ip=!1}var qa,xi=null,$p=null,Au=null;function q0(){if(Au)return Au;var e,t=$p,n=t.length,o,i="value"in xi?xi.value:xi.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return Au=i.slice(e,1<o?1-o:void 0)}function Mu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pu(){return!0}function ly(){return!1}function sn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?pu:ly,this.isPropagationStopped=ly,this}return Ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=pu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pu)},persist:function(){},isPersistent:pu}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yc=sn(da),ls=Ze({},da,{view:0,detail:0}),V2=sn(ls),vd,bd,yr,vc=Ze({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yr&&(yr&&e.type==="mousemove"?(vd=e.screenX-yr.screenX,bd=e.screenY-yr.screenY):bd=vd=0,yr=e),vd)},movementY:function(e){return"movementY"in e?e.movementY:bd}}),ry=sn(vc),Y2=Ze({},vc,{dataTransfer:0}),X2=sn(Y2),q2=Ze({},ls,{relatedTarget:0}),Sd=sn(q2),Z2=Ze({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),j2=sn(Z2),$2=Ze({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),F2=sn($2),K2=Ze({},da,{data:0}),sy=sn(K2),Q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W2={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"},J2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J2[e])?!!t[e]:!1}function Fp(){return eN}var tN=Ze({},ls,{key:function(e){if(e.key){var t=Q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?W2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(e){return e.type==="keypress"?Mu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nN=sn(tN),oN=Ze({},vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uy=sn(oN),iN=Ze({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),aN=sn(iN),lN=Ze({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),rN=sn(lN),sN=Ze({},vc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uN=sn(sN),cN=Ze({},da,{newState:0,oldState:0}),fN=sn(cN),dN=[9,13,27,32],Kp=Zo&&"CompositionEvent"in window,Ar=null;Zo&&"documentMode"in document&&(Ar=document.documentMode);var pN=Zo&&"TextEvent"in window&&!Ar,Z0=Zo&&(!Kp||Ar&&8<Ar&&11>=Ar),cy=" ",fy=!1;function j0(e,t){switch(e){case"keyup":return dN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var el=!1;function mN(e,t){switch(e){case"compositionend":return $0(t);case"keypress":return t.which!==32?null:(fy=!0,cy);case"textInput":return e=t.data,e===cy&&fy?null:e;default:return null}}function hN(e,t){if(el)return e==="compositionend"||!Kp&&j0(e,t)?(e=q0(),Au=$p=xi=null,el=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Z0&&t.locale!=="ko"?null:t.data;default:return null}}var gN={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 dy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gN[e.type]:t==="textarea"}function F0(e,t,n,o){Ja?cl?cl.push(o):cl=[o]:Ja=o,t=uc(t,"onChange"),0<t.length&&(n=new yc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Mr=null,Yr=null;function yN(e){Xb(e,0)}function bc(e){var t=Nr(e);if(G0(t))return e}function py(e,t){if(e==="change")return t}var K0=!1;Zo&&(Zo?(hu="oninput"in document,hu||(xd=document.createElement("div"),xd.setAttribute("oninput","return;"),hu=typeof xd.oninput=="function"),mu=hu):mu=!1,K0=mu&&(!document.documentMode||9<document.documentMode));var mu,hu,xd;function my(){Mr&&(Mr.detachEvent("onpropertychange",Q0),Yr=Mr=null)}function Q0(e){if(e.propertyName==="value"&&bc(Yr)){var t=[];F0(t,Yr,e,jp(e)),X0(yN,t)}}function vN(e,t,n){e==="focusin"?(my(),Mr=t,Yr=n,Mr.attachEvent("onpropertychange",Q0)):e==="focusout"&&my()}function bN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bc(Yr)}function SN(e,t){if(e==="click")return bc(t)}function xN(e,t){if(e==="input"||e==="change")return bc(t)}function _N(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:_N;function Xr(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Wd.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function hy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gy(e,t){var n=hy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=hy(n)}}function W0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?W0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function J0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=qu(e.document)}return t}function Qp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var EN=Zo&&"documentMode"in document&&11>=document.documentMode,tl=null,ap=null,Dr=null,lp=!1;function yy(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;lp||tl==null||tl!==qu(o)||(o=tl,"selectionStart"in o&&Qp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Dr&&Xr(Dr,o)||(Dr=o,o=uc(ap,"onSelect"),0<o.length&&(t=new yc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=tl)))}function Ki(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nl={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},_d={},ev={};Zo&&(ev=document.createElement("div").style,"AnimationEvent"in window||(delete nl.animationend.animation,delete nl.animationiteration.animation,delete nl.animationstart.animation),"TransitionEvent"in window||delete nl.transitionend.transition);function pa(e){if(_d[e])return _d[e];if(!nl[e])return e;var t=nl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ev)return _d[e]=t[n];return e}var tv=pa("animationend"),nv=pa("animationiteration"),ov=pa("animationstart"),TN=pa("transitionrun"),NN=pa("transitionstart"),CN=pa("transitioncancel"),iv=pa("transitionend"),av=new Map,rp="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(" ");rp.push("scrollEnd");function to(e,t){av.set(e,t),fa(t,[e])}var Zu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],ol=0,Wp=0;function Sc(){for(var e=ol,t=Wp=ol=0;t<e;){var n=Bn[t];Bn[t++]=null;var o=Bn[t];Bn[t++]=null;var i=Bn[t];Bn[t++]=null;var a=Bn[t];if(Bn[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&lv(n,i,a)}}function xc(e,t,n,o){Bn[ol++]=e,Bn[ol++]=t,Bn[ol++]=n,Bn[ol++]=o,Wp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Jp(e,t,n,o){return xc(e,t,n,o),ju(e)}function ma(e,t){return xc(e,null,null,t),ju(e)}function lv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-_n(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function ju(e){if(50<Gr)throw Gr=0,Ap=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var il={};function wN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,o){return new wN(e,t,n,o)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yo(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function rv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Du(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")em(e)&&(l=1);else if(typeof e=="string")l=DC(e,n,mo.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $d:return e=vn(31,n,t,i),e.elementType=$d,e.lanes=a,e;case Ka:return na(n.children,i,a,t);case C0:l=8,i|=24;break;case qd:return e=vn(12,n,t,i|2),e.elementType=qd,e.lanes=a,e;case Zd:return e=vn(13,n,t,i),e.elementType=Zd,e.lanes=a,e;case jd:return e=vn(19,n,t,i),e.elementType=jd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Uo:l=10;break e;case w0:l=9;break e;case Up:l=11;break e;case Ip:l=14;break e;case mi:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=vn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function na(e,t,n,o){return e=vn(7,e,o,t),e.lanes=n,e}function Ed(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function sv(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function Td(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vy=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=vy.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Jg(t)},vy.set(e,t),t)}return{value:e,source:t,stack:Jg(t)}}var al=[],ll=0,$u=null,qr=0,Pn=[],kn=0,Li=null,co=1,fo="";function ko(e,t){al[ll++]=qr,al[ll++]=$u,$u=e,qr=t}function uv(e,t,n){Pn[kn++]=co,Pn[kn++]=fo,Pn[kn++]=Li,Li=e;var o=co;e=fo;var i=32-_n(o)-1;o&=~(1<<i),n+=1;var a=32-_n(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,co=1<<32-_n(t)+i|n<<i|o,fo=a+e}else co=1<<a|n<<i|o,fo=e}function tm(e){e.return!==null&&(ko(e,1),uv(e,1,0))}function nm(e){for(;e===$u;)$u=al[--ll],al[ll]=null,qr=al[--ll],al[ll]=null;for(;e===Li;)Li=Pn[--kn],Pn[kn]=null,fo=Pn[--kn],Pn[kn]=null,co=Pn[--kn],Pn[kn]=null}function cv(e,t){Pn[kn++]=co,Pn[kn++]=fo,Pn[kn++]=Li,co=t.id,fo=t.overflow,Li=e}var Rt=null,qe=null,Ce=!1,Ci=null,In=!1,sp=Error(U(519));function Bi(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zr(Un(t,e)),sp}function by(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Dt]=e,t[rn]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Kr.length;n++)xe(Kr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),U0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),V0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Zb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Io),t=!0):t=!1,t||Bi(e,!0)}function Sy(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Rt=Rt.return}}function Za(e){if(e!==Rt)return!1;if(!Ce)return Sy(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||zp(e.type,e.memoizedProps)),n=!n),n&&qe&&Bi(e),Sy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=s0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=s0(e)}else t===27?(t=qe,Gi(e.type)?(e=Pp,Pp=null,qe=e):qe=t):qe=Rt?Yn(e.stateNode.nextSibling):null;return!0}function la(){qe=Rt=null,Ce=!1}function Nd(){var e=Ci;return e!==null&&(an===null?an=e:an.push.apply(an,e),Ci=null),e}function Zr(e){Ci===null?Ci=[e]:Ci.push(e)}var up=ho(null),ha=null,Vo=null;function gi(e,t,n){Ie(up,t._currentValue),t._currentValue=n}function Xo(e){e._currentValue=up.current,Nt(up)}function cp(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function fp(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),cp(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),cp(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function Al(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;Tn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Iu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Wr):e=[Wr])}i=i.return}e!==null&&fp(t,e,n,o),t.flags|=262144}function Fu(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){ha=e,Vo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return fv(ha,e)}function gu(e,t){return ha===null&&ra(e),fv(e,t)}function fv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vo===null){if(e===null)throw Error(U(308));Vo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vo=Vo.next=t;return n}var AN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},MN=gt.unstable_scheduleCallback,DN=gt.unstable_NormalPriority,ct={$$typeof:Uo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function om(){return{controller:new AN,data:new Map,refCount:0}}function rs(e){e.refCount--,e.refCount===0&&MN(DN,function(){e.controller.abort()})}var Rr=null,dp=0,vl=0,fl=null;function RN(e,t){if(Rr===null){var n=Rr=[];dp=0,vl=Am(),fl={status:"pending",value:void 0,then:function(o){n.push(o)}}}return dp++,t.then(xy,xy),t}function xy(){if(--dp===0&&Rr!==null){fl!==null&&(fl.status="fulfilled");var e=Rr;Rr=null,vl=0,fl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ON(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var _y=ce.S;ce.S=function(e,t){Nb=Sn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&RN(e,t),_y!==null&&_y(e,t)};var oa=ho(null);function im(){var e=oa.current;return e!==null?e:Ue.pooledCache}function Ru(e,t){t===null?Ie(oa,oa.current):Ie(oa,t.pool)}function dv(){var e=im();return e===null?null:{parent:ct._currentValue,pool:e}}var Ml=Error(U(460)),am=Error(U(474)),_c=Error(U(542)),Ku={then:function(){}};function Ey(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Io,Io),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ny(e),e;default:if(typeof t.status=="string")t.then(Io,Io);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ny(e),e}throw ia=t,Ml}}function Ji(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ia=n,Ml):n}}var ia=null;function Ty(){if(ia===null)throw Error(U(459));var e=ia;return ia=null,e}function Ny(e){if(e===Ml||e===_c)throw Error(U(483))}var dl=null,jr=0;function yu(e){var t=jr;return jr+=1,dl===null&&(dl=[]),pv(dl,e,t)}function vr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vu(e,t){throw t.$$typeof===v2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function mv(e){function t(p,g){if(e){var m=p.deletions;m===null?(p.deletions=[g],p.flags|=16):m.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function o(p){for(var g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function i(p,g){return p=Yo(p,g),p.index=0,p.sibling=null,p}function a(p,g,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<g?(p.flags|=67108866,g):m):(p.flags|=67108866,g)):(p.flags|=1048576,g)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,g,m,y){return g===null||g.tag!==6?(g=Ed(m,p.mode,y),g.return=p,g):(g=i(g,m),g.return=p,g)}function s(p,g,m,y){var x=m.type;return x===Ka?c(p,g,m.props.children,y,m.key):g!==null&&(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===mi&&Ji(x)===g.type)?(g=i(g,m.props),vr(g,m),g.return=p,g):(g=Du(m.type,m.key,m.props,null,p.mode,y),vr(g,m),g.return=p,g)}function u(p,g,m,y){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=Td(m,p.mode,y),g.return=p,g):(g=i(g,m.children||[]),g.return=p,g)}function c(p,g,m,y,x){return g===null||g.tag!==7?(g=na(m,p.mode,y,x),g.return=p,g):(g=i(g,m),g.return=p,g)}function d(p,g,m){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Ed(""+g,p.mode,m),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case su:return m=Du(g.type,g.key,g.props,null,p.mode,m),vr(m,g),m.return=p,m;case Er:return g=Td(g,p.mode,m),g.return=p,g;case mi:return g=Ji(g),d(p,g,m)}if(Tr(g)||gr(g))return g=na(g,p.mode,m,null),g.return=p,g;if(typeof g.then=="function")return d(p,yu(g),m);if(g.$$typeof===Uo)return d(p,gu(p,g),m);vu(p,g)}return null}function f(p,g,m,y){var x=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,g,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case su:return m.key===x?s(p,g,m,y):null;case Er:return m.key===x?u(p,g,m,y):null;case mi:return m=Ji(m),f(p,g,m,y)}if(Tr(m)||gr(m))return x!==null?null:c(p,g,m,y,null);if(typeof m.then=="function")return f(p,g,yu(m),y);if(m.$$typeof===Uo)return f(p,g,gu(p,m),y);vu(p,m)}return null}function h(p,g,m,y,x){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return p=p.get(m)||null,r(g,p,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case su:return p=p.get(y.key===null?m:y.key)||null,s(g,p,y,x);case Er:return p=p.get(y.key===null?m:y.key)||null,u(g,p,y,x);case mi:return y=Ji(y),h(p,g,m,y,x)}if(Tr(y)||gr(y))return p=p.get(m)||null,c(g,p,y,x,null);if(typeof y.then=="function")return h(p,g,m,yu(y),x);if(y.$$typeof===Uo)return h(p,g,m,gu(g,y),x);vu(g,y)}return null}function v(p,g,m,y){for(var x=null,_=null,E=g,C=g=0,A=null;E!==null&&C<m.length;C++){E.index>C?(A=E,E=null):A=E.sibling;var B=f(p,E,m[C],y);if(B===null){E===null&&(E=A);break}e&&E&&B.alternate===null&&t(p,E),g=a(B,g,C),_===null?x=B:_.sibling=B,_=B,E=A}if(C===m.length)return n(p,E),Ce&&ko(p,C),x;if(E===null){for(;C<m.length;C++)E=d(p,m[C],y),E!==null&&(g=a(E,g,C),_===null?x=E:_.sibling=E,_=E);return Ce&&ko(p,C),x}for(E=o(E);C<m.length;C++)A=h(E,p,C,m[C],y),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?C:A.key),g=a(A,g,C),_===null?x=A:_.sibling=A,_=A);return e&&E.forEach(function(M){return t(p,M)}),Ce&&ko(p,C),x}function b(p,g,m,y){if(m==null)throw Error(U(151));for(var x=null,_=null,E=g,C=g=0,A=null,B=m.next();E!==null&&!B.done;C++,B=m.next()){E.index>C?(A=E,E=null):A=E.sibling;var M=f(p,E,B.value,y);if(M===null){E===null&&(E=A);break}e&&E&&M.alternate===null&&t(p,E),g=a(M,g,C),_===null?x=M:_.sibling=M,_=M,E=A}if(B.done)return n(p,E),Ce&&ko(p,C),x;if(E===null){for(;!B.done;C++,B=m.next())B=d(p,B.value,y),B!==null&&(g=a(B,g,C),_===null?x=B:_.sibling=B,_=B);return Ce&&ko(p,C),x}for(E=o(E);!B.done;C++,B=m.next())B=h(E,p,C,B.value,y),B!==null&&(e&&B.alternate!==null&&E.delete(B.key===null?C:B.key),g=a(B,g,C),_===null?x=B:_.sibling=B,_=B);return e&&E.forEach(function(z){return t(p,z)}),Ce&&ko(p,C),x}function S(p,g,m,y){if(typeof m=="object"&&m!==null&&m.type===Ka&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case su:e:{for(var x=m.key;g!==null;){if(g.key===x){if(x=m.type,x===Ka){if(g.tag===7){n(p,g.sibling),y=i(g,m.props.children),y.return=p,p=y;break e}}else if(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===mi&&Ji(x)===g.type){n(p,g.sibling),y=i(g,m.props),vr(y,m),y.return=p,p=y;break e}n(p,g);break}else t(p,g);g=g.sibling}m.type===Ka?(y=na(m.props.children,p.mode,y,m.key),y.return=p,p=y):(y=Du(m.type,m.key,m.props,null,p.mode,y),vr(y,m),y.return=p,p=y)}return l(p);case Er:e:{for(x=m.key;g!==null;){if(g.key===x)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){n(p,g.sibling),y=i(g,m.children||[]),y.return=p,p=y;break e}else{n(p,g);break}else t(p,g);g=g.sibling}y=Td(m,p.mode,y),y.return=p,p=y}return l(p);case mi:return m=Ji(m),S(p,g,m,y)}if(Tr(m))return v(p,g,m,y);if(gr(m)){if(x=gr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,g,m,y)}if(typeof m.then=="function")return S(p,g,yu(m),y);if(m.$$typeof===Uo)return S(p,g,gu(p,m),y);vu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,g!==null&&g.tag===6?(n(p,g.sibling),y=i(g,m),y.return=p,p=y):(n(p,g),y=Ed(m,p.mode,y),y.return=p,p=y),l(p)):n(p,g)}return function(p,g,m,y){try{jr=0;var x=S(p,g,m,y);return dl=null,x}catch(E){if(E===Ml||E===_c)throw E;var _=vn(29,E,null,p.mode);return _.lanes=y,_.return=p,_}}}var sa=mv(!0),hv=mv(!1),hi=!1;function lm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ai(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Me&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=ju(e),lv(e,null,n),t}return xc(e,o,t,n),ju(e)}function Or(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,z0(e,n)}}function Cd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var mp=!1;function zr(){if(mp){var e=fl;if(e!==null)throw e}}function Lr(e,t,n,o){mp=!1;var i=e.updateQueue;hi=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(Ne&f)===f:(o&f)===f){f!==0&&f===vl&&(mp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:hi=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),Pi|=l,e.lanes=l,e.memoizedState=d}}function gv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function yv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gv(n[e],t)}var bl=ho(null),Qu=ho(0);function Cy(e,t){e=Ko,Ie(Qu,e),Ie(bl,t),Ko=e|t.baseLanes}function hp(){Ie(Qu,Ko),Ie(bl,bl.current)}function rm(){Ko=Qu.current,Nt(bl),Nt(Qu)}var Nn=ho(null),Vn=null;function yi(e){var t=e.alternate;Ie(at,at.current&1),Ie(Nn,e),Vn===null&&(t===null||bl.current!==null||t.memoizedState!==null)&&(Vn=e)}function gp(e){Ie(at,at.current),Ie(Nn,e),Vn===null&&(Vn=e)}function vv(e){e.tag===22?(Ie(at,at.current),Ie(Nn,e),Vn===null&&(Vn=e)):vi(e)}function vi(){Ie(at,at.current),Ie(Nn,Nn.current)}function yn(e){Nt(Nn),Vn===e&&(Vn=null),Nt(at)}var at=ho(0);function Wu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bp(n)||Hp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jo=0,ve=null,ke=null,st=null,Ju=!1,pl=!1,ua=!1,ec=0,$r=0,ml=null,zN=0;function tt(){throw Error(U(321))}function sm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function um(e,t,n,o,i,a){return jo=a,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?Fv:Sm,ua=!1,a=n(o,i),ua=!1,pl&&(a=Sv(t,n,o,i)),bv(e),a}function bv(e){ce.H=Fr;var t=ke!==null&&ke.next!==null;if(jo=0,st=ke=ve=null,Ju=!1,$r=0,ml=null,t)throw Error(U(300));e===null||ft||(e=e.dependencies,e!==null&&Fu(e)&&(ft=!0))}function Sv(e,t,n,o){ve=e;var i=0;do{if(pl&&(ml=null),$r=0,pl=!1,25<=i)throw Error(U(301));if(i+=1,st=ke=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ce.H=Kv,a=t(n,o)}while(pl);return a}function LN(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?ss(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ve.flags|=1024),t}function cm(){var e=ec!==0;return ec=0,e}function fm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function dm(e){if(Ju){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ju=!1}jo=0,st=ke=ve=null,pl=!1,$r=ec=0,ml=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ve.memoizedState=st=e:st=st.next=e,st}function lt(){if(ke===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=st===null?ve.memoizedState:st.next;if(t!==null)st=t,ke=e;else{if(e===null)throw ve.alternate===null?Error(U(467)):Error(U(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},st===null?ve.memoizedState=st=e:st=st.next=e}return st}function Ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ss(e){var t=$r;return $r+=1,ml===null&&(ml=[]),e=pv(ml,e,t),t=ve,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?Fv:Sm),e}function Tc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ss(e);if(e.$$typeof===Uo)return Ot(e)}throw Error(U(438,String(e)))}function pm(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=ve.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ec(),ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=b2;return t.index++,n}function $o(e,t){return typeof t=="function"?t(e):t}function Ou(e){var t=lt();return mm(t,ke,e)}function mm(e,t,n){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ne&d)===d:(jo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===vl&&(c=!0);else if((jo&f)===f){u=u.next,f===vl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,ve.lanes|=f,Pi|=f;d=u.action,ua&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,ve.lanes|=d,Pi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!Tn(a,e.memoizedState)&&(ft=!0,c&&(n=fl,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function wd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);Tn(a,t.memoizedState)||(ft=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function xv(e,t,n){var o=ve,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!Tn((ke||i).memoizedState,n);if(l&&(i.memoizedState=n,ft=!0),i=i.queue,hm(Tv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,Sl(9,{destroy:void 0},Ev.bind(null,o,i,n,t),null),Ue===null)throw Error(U(349));a||(jo&127)!==0||_v(o,t,n)}return n}function _v(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=Ec(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ev(e,t,n,o){t.value=n,t.getSnapshot=o,Nv(t)&&Cv(e)}function Tv(e,t,n){return n(function(){Nv(t)&&Cv(e)})}function Nv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function Cv(e){var t=ma(e,2);t!==null&&ln(t,e,2)}function yp(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),ua){Si(!0);try{n()}finally{Si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t}function wv(e,t,n,o){return e.baseState=n,mm(e,ke,typeof o=="function"?o:$o)}function BN(e,t,n,o,i){if(Cc(e))throw Error(U(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};ce.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Av(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Av(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ce.T,l={};ce.T=l;try{var r=n(i,o),s=ce.S;s!==null&&s(l,r),wy(e,t,r)}catch(u){vp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ce.T=a}}else try{a=n(i,o),wy(e,t,a)}catch(u){vp(e,t,u)}}function wy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Ay(e,t,o)},function(o){return vp(e,t,o)}):Ay(e,t,n)}function Ay(e,t,n){t.status="fulfilled",t.value=n,Mv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Av(e,n)))}function vp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Mv(t),t=t.next;while(t!==o)}e.action=null}function Mv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dv(e,t){return t}function My(e,t){if(Ce){var n=Ue.formState;if(n!==null){e:{var o=ve;if(Ce){if(qe){t:{for(var i=qe,a=In;i.nodeType!==8;){if(!a){i=null;break t}if(i=Yn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Yn(i.nextSibling),o=i.data==="F!";break e}}Bi(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dv,lastRenderedState:t},n.queue=o,n=Zv.bind(null,ve,o),o.dispatch=n,o=yp(!1),a=bm.bind(null,ve,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=BN.bind(null,ve,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Dy(e){var t=lt();return Rv(t,ke,e)}function Rv(e,t,n){if(t=mm(e,t,Dv)[0],e=Ou($o)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=ss(t)}catch(l){throw l===Ml?_c:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,Sl(9,{destroy:void 0},HN.bind(null,i,n),null)),[o,a,e]}function HN(e,t){e.action=t}function Ry(e){var t=lt(),n=ke;if(n!==null)return Rv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Sl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Ec(),ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function Ov(){return lt().memoizedState}function zu(e,t,n,o){var i=Yt();ve.flags|=e,i.memoizedState=Sl(1|t,{destroy:void 0},n,o===void 0?null:o)}function Nc(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;ke!==null&&o!==null&&sm(o,ke.memoizedState.deps)?i.memoizedState=Sl(t,a,n,o):(ve.flags|=e,i.memoizedState=Sl(1|t,a,n,o))}function Oy(e,t){zu(8390656,8,e,t)}function hm(e,t){Nc(2048,8,e,t)}function PN(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=Ec(),ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function zv(e){var t=lt().memoizedState;return PN({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Lv(e,t){return Nc(4,2,e,t)}function Bv(e,t){return Nc(4,4,e,t)}function Hv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pv(e,t,n){n=n!=null?n.concat([e]):null,Nc(4,4,Hv.bind(null,t,e),n)}function gm(){}function kv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&sm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Gv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&sm(t,o[1]))return o[0];if(o=e(),ua){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[o,t],o}function ym(e,t,n){return n===void 0||(jo&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=wb(),ve.lanes|=e,Pi|=e,n)}function Uv(e,t,n,o){return Tn(n,t)?n:bl.current!==null?(e=ym(e,n,o),Tn(e,t)||(ft=!0),e):(jo&42)===0||(jo&1073741824)!==0&&(Ne&261930)===0?(ft=!0,e.memoizedState=n):(e=wb(),ve.lanes|=e,Pi|=e,t)}function Iv(e,t,n,o,i){var a=De.p;De.p=a!==0&&8>a?a:8;var l=ce.T,r={};ce.T=r,bm(e,!1,t,n);try{var s=i(),u=ce.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=ON(s,o);Br(e,t,c,En(e))}else Br(e,t,o,En(e))}catch(d){Br(e,t,{then:function(){},status:"rejected",reason:d},En())}finally{De.p=a,l!==null&&r.types!==null&&(l.types=r.types),ce.T=l}}function kN(){}function bp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=Vv(e).queue;Iv(e,i,t,ta,n===null?kN:function(){return Yv(e),n(o)})}function Vv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ta,baseState:ta,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:ta},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yv(e){var t=Vv(e);t.next===null&&(t=e.alternate.memoizedState),Br(e,t.next.queue,{},En())}function vm(){return Ot(Wr)}function Xv(){return lt().memoizedState}function qv(){return lt().memoizedState}function GN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=En();e=wi(n);var o=Ai(t,e,n);o!==null&&(ln(o,t,n),Or(o,t,n)),t={cache:om()},e.payload=t;return}t=t.return}}function UN(e,t,n){var o=En();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cc(e)?jv(t,n):(n=Jp(e,t,n,o),n!==null&&(ln(n,e,o),$v(n,t,o)))}function Zv(e,t,n){var o=En();Br(e,t,n,o)}function Br(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cc(e))jv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,Tn(r,l))return xc(e,t,i,0),Ue===null&&Sc(),!1}catch{}if(n=Jp(e,t,i,o),n!==null)return ln(n,e,o),$v(n,t,o),!0}return!1}function bm(e,t,n,o){if(o={lane:2,revertLane:Am(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Cc(e)){if(t)throw Error(U(479))}else t=Jp(e,n,o,2),t!==null&&ln(t,e,2)}function Cc(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function jv(e,t){pl=Ju=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $v(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,z0(e,n)}}var Fr={readContext:Ot,use:Tc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Fr.useEffectEvent=tt;var Fv={readContext:Ot,use:Tc,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Oy,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,zu(4194308,4,Hv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){zu(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(ua){Si(!0);try{e()}finally{Si(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(ua){Si(!0);try{n(t)}finally{Si(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=UN.bind(null,ve,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=yp(e);var t=e.queue,n=Zv.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gm,useDeferredValue:function(e,t){var n=Yt();return ym(n,e,t)},useTransition:function(){var e=yp(!1);return e=Iv.bind(null,ve,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=ve,i=Yt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ue===null)throw Error(U(349));(Ne&127)!==0||_v(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Oy(Tv.bind(null,o,a,e),[e]),o.flags|=2048,Sl(9,{destroy:void 0},Ev.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=Ue.identifierPrefix;if(Ce){var n=fo,o=co;n=(o&~(1<<32-_n(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ec++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=zN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vm,useFormState:My,useActionState:My,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=bm.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:pm,useCacheRefresh:function(){return Yt().memoizedState=GN.bind(null,ve)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Me&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},Sm={readContext:Ot,use:Tc,useCallback:kv,useContext:Ot,useEffect:hm,useImperativeHandle:Pv,useInsertionEffect:Lv,useLayoutEffect:Bv,useMemo:Gv,useReducer:Ou,useRef:Ov,useState:function(){return Ou($o)},useDebugValue:gm,useDeferredValue:function(e,t){var n=lt();return Uv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Ou($o)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:xv,useId:Xv,useHostTransitionStatus:vm,useFormState:Dy,useActionState:Dy,useOptimistic:function(e,t){var n=lt();return wv(n,ke,e,t)},useMemoCache:pm,useCacheRefresh:qv};Sm.useEffectEvent=zv;var Kv={readContext:Ot,use:Tc,useCallback:kv,useContext:Ot,useEffect:hm,useImperativeHandle:Pv,useInsertionEffect:Lv,useLayoutEffect:Bv,useMemo:Gv,useReducer:wd,useRef:Ov,useState:function(){return wd($o)},useDebugValue:gm,useDeferredValue:function(e,t){var n=lt();return ke===null?ym(n,e,t):Uv(n,ke.memoizedState,e,t)},useTransition:function(){var e=wd($o)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:ss(e),t]},useSyncExternalStore:xv,useId:Xv,useHostTransitionStatus:vm,useFormState:Ry,useActionState:Ry,useOptimistic:function(e,t){var n=lt();return ke!==null?wv(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:pm,useCacheRefresh:qv};Kv.useEffectEvent=zv;function Ad(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=En(),i=wi(o);i.payload=t,n!=null&&(i.callback=n),t=Ai(e,i,o),t!==null&&(ln(t,e,o),Or(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=En(),i=wi(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ai(e,i,o),t!==null&&(ln(t,e,o),Or(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=En(),o=wi(n);o.tag=2,t!=null&&(o.callback=t),t=Ai(e,o,n),t!==null&&(ln(t,e,n),Or(t,e,n))}};function zy(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Xr(n,o)||!Xr(i,a):!0}function Ly(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&Sp.enqueueReplaceState(t,t.state,null)}function ca(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Qv(e){Zu(e)}function Wv(e){console.error(e)}function Jv(e){Zu(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function By(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function xp(e,t,n){return n=wi(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function eb(e){return e=wi(e),e.tag=3,e}function tb(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){By(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){By(t,n,o),typeof i!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function IN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&Al(t,n,i,!0),n=Nn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?lc():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Ku?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Gd(e,o,i)),!1;case 22:return n.flags|=65536,o===Ku?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),Gd(e,o,i)),!1}throw Error(U(435,n.tag))}return Gd(e,o,i),lc(),!1}if(Ce)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==sp&&(e=Error(U(422),{cause:o}),Zr(Un(e,n)))):(o!==sp&&(t=Error(U(423),{cause:o}),Zr(Un(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Un(o,n),i=xp(e.stateNode,o,i),Cd(e,i),nt!==4&&(nt=2)),!1;var a=Error(U(520),{cause:o});if(a=Un(a,n),kr===null?kr=[a]:kr.push(a),nt!==4&&(nt=2),t===null)return!0;o=Un(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=xp(n.stateNode,o,e),Cd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Mi===null||!Mi.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=eb(i),tb(i,e,n,o),Cd(n,i),!1}n=n.return}while(n!==null);return!1}var xm=Error(U(461)),ft=!1;function Mt(e,t,n,o){t.child=e===null?hv(t,null,n,o):sa(t,e.child,n,o)}function Hy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return ra(t),o=um(e,t,n,l,a,i),r=cm(),e!==null&&!ft?(fm(e,t,i),Fo(e,t,i)):(Ce&&r&&tm(t),t.flags|=1,Mt(e,t,o,i),t.child)}function Py(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!em(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nb(e,t,a,o,i)):(e=Du(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!_m(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Xr,n(l,o)&&e.ref===t.ref)return Fo(e,t,i)}return t.flags|=1,e=Yo(a,o),e.ref=t.ref,e.return=t,t.child=e}function nb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Xr(a,o)&&e.ref===t.ref)if(ft=!1,t.pendingProps=o=a,_m(e,i))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Fo(e,t,i)}return _p(e,t,n,o,i)}function ob(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return ky(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ru(t,a!==null?a.cachePool:null),a!==null?Cy(t,a):hp(),vv(t);else return o=t.lanes=536870912,ky(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Ru(t,a.cachePool),Cy(t,a),vi(t),t.memoizedState=null):(e!==null&&Ru(t,null),hp(),vi(t));return Mt(e,t,i,n),t.child}function Cr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ky(e,t,n,o,i){var a=im();return a=a===null?null:{parent:ct._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ru(t,null),hp(),vv(t),e!==null&&Al(e,t,o,!0),t.childLanes=i,null}function Lu(e,t){return t=nc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gy(e,t,n){return sa(t,e.child,null,n),e=Lu(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function VN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=Lu(t,o),t.lanes=536870912,Cr(null,e);if(gp(t),(e=qe)?(e=Fb(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=sv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return Lu(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(gp(t),i)if(t.flags&256)t.flags&=-257,t=Gy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(ft||Al(e,t,n,!1),i=(n&e.childLanes)!==0,ft||i){if(o=Ue,o!==null&&(l=L0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,ma(e,l),ln(o,e,l),xm;lc(),t=Gy(e,t,n)}else e=a.treeContext,qe=Yn(l.nextSibling),Rt=t,Ce=!0,Ci=null,In=!1,e!==null&&cv(t,e),t=Lu(t,o),t.flags|=4096;return t}return e=Yo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _p(e,t,n,o,i){return ra(t),n=um(e,t,n,o,void 0,i),o=cm(),e!==null&&!ft?(fm(e,t,i),Fo(e,t,i)):(Ce&&o&&tm(t),t.flags|=1,Mt(e,t,n,i),t.child)}function Uy(e,t,n,o,i,a){return ra(t),t.updateQueue=null,n=Sv(t,o,n,i),bv(e),o=cm(),e!==null&&!ft?(fm(e,t,a),Fo(e,t,a)):(Ce&&o&&tm(t),t.flags|=1,Mt(e,t,n,a),t.child)}function Iy(e,t,n,o,i){if(ra(t),t.stateNode===null){var a=il,l=n.contextType;typeof l=="object"&&l!==null&&(a=Ot(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Sp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},lm(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Ot(l):il,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Ad(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&Sp.enqueueReplaceState(a,a.state,null),Lr(t,o,a,i),zr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=ca(n,r);a.props=s;var u=a.context,c=n.contextType;l=il,typeof c=="object"&&c!==null&&(l=Ot(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Ly(t,a,o,l),hi=!1;var f=t.memoizedState;a.state=f,Lr(t,o,a,i),zr(),u=t.memoizedState,r||f!==u||hi?(typeof d=="function"&&(Ad(t,n,d,o),u=t.memoizedState),(s=hi||zy(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,pp(e,t),l=t.memoizedProps,c=ca(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=il,typeof u=="object"&&u!==null&&(s=Ot(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Ly(t,a,o,s),hi=!1,f=t.memoizedState,a.state=f,Lr(t,o,a,i),zr();var h=t.memoizedState;l!==d||f!==h||hi||e!==null&&e.dependencies!==null&&Fu(e.dependencies)?(typeof r=="function"&&(Ad(t,n,r,o),h=t.memoizedState),(c=hi||zy(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Fu(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Bu(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=sa(t,e.child,null,i),t.child=sa(t,null,n,i)):Mt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Fo(e,t,i),e}function Vy(e,t,n,o){return la(),t.flags|=256,Mt(e,t,n,o),t.child}var Md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dd(e){return{baseLanes:e,cachePool:dv()}}function Rd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=bn),e}function ib(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?yi(t):vi(t),(e=qe)?(e=Fb(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=sv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Bi(t);return Hp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(vi(t),i=t.mode,r=nc({mode:"hidden",children:r},i),o=na(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Dd(n),o.childLanes=Rd(e,l,n),t.memoizedState=Md,Cr(null,o)):(yi(t),Ep(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(yi(t),t.flags&=-257,t=Od(e,t,n)):t.memoizedState!==null?(vi(t),t.child=e.child,t.flags|=128,t=null):(vi(t),r=o.fallback,i=t.mode,o=nc({mode:"visible",children:o.children},i),r=na(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,sa(t,e.child,null,n),o=t.child,o.memoizedState=Dd(n),o.childLanes=Rd(e,l,n),t.memoizedState=Md,t=Cr(null,o));else if(yi(t),Hp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,Zr({value:o,source:null,stack:null}),t=Od(e,t,n)}else if(ft||Al(e,t,n,!1),l=(n&e.childLanes)!==0,ft||l){if(l=Ue,l!==null&&(o=L0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ma(e,o),ln(l,e,o),xm;Bp(r)||lc(),t=Od(e,t,n)}else Bp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Yn(r.nextSibling),Rt=t,Ce=!0,Ci=null,In=!1,e!==null&&cv(t,e),t=Ep(t,o.children),t.flags|=4096);return t}return i?(vi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Yo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Yo(u,r):(r=na(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,Cr(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Dd(n):(i=r.cachePool,i!==null?(s=ct._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=dv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Rd(e,l,n),t.memoizedState=Md,Cr(e.child,o)):(yi(t),n=e.child,e=n.sibling,n=Yo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function Ep(e,t){return t=nc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nc(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function Od(e,t,n){return sa(t,e.child,null,n),e=Ep(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),cp(e.return,t,n)}function zd(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function ab(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),Mt(e,t,o,n),o=Ce?qr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yy(e,n,t);else if(e.tag===19)Yy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Wu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zd(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Wu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zd(t,!0,n,null,a,o);break;case"together":zd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Fo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Al(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Yo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function _m(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Fu(e)))}function YN(e,t,n){switch(t.tag){case 3:Vu(t,t.stateNode.containerInfo),gi(t,ct,e.memoizedState.cache),la();break;case 27:case 5:Qd(t);break;case 4:Vu(t,t.stateNode.containerInfo);break;case 10:gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,gp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(yi(t),t.flags|=128,null):(n&t.child.childLanes)!==0?ib(e,t,n):(yi(t),e=Fo(e,t,n),e!==null?e.sibling:null);yi(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(Al(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return ab(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,ob(e,t,n,t.pendingProps);case 24:gi(t,ct,e.memoizedState.cache)}return Fo(e,t,n)}function lb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!_m(e,n)&&(t.flags&128)===0)return ft=!1,YN(e,t,n);ft=(e.flags&131072)!==0}else ft=!1,Ce&&(t.flags&1048576)!==0&&uv(t,qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Ji(t.elementType),t.type=e,typeof e=="function")em(e)?(o=ca(e,o),t.tag=1,t=Iy(null,t,e,o,n)):(t.tag=0,t=_p(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Up){t.tag=11,t=Hy(null,t,e,o,n);break e}else if(i===Ip){t.tag=14,t=Py(null,t,e,o,n);break e}}throw t=Fd(e)||e,Error(U(306,t,""))}}return t;case 0:return _p(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ca(o,t.pendingProps),Iy(e,t,o,i,n);case 3:e:{if(Vu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,pp(e,t),Lr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,gi(t,ct,o),o!==a.cache&&fp(t,[ct],n,!0),zr(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Vy(e,t,o,n);break e}else if(o!==i){i=Un(Error(U(424)),t),Zr(i),t=Vy(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Yn(e.firstChild),Rt=t,Ce=!0,Ci=null,In=!0,n=hv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(la(),o===i){t=Fo(e,t,n);break e}Mt(e,t,o,n)}t=t.child}return t;case 26:return Bu(e,t),e===null?(n=f0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=cc(Ni.current).createElement(n),o[Dt]=t,o[rn]=e,zt(o,n,e),Tt(o),t.stateNode=o):t.memoizedState=f0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qd(t),e===null&&Ce&&(o=t.stateNode=Kb(t.type,t.pendingProps,Ni.current),Rt=t,In=!0,i=qe,Gi(t.type)?(Pp=i,qe=Yn(o.firstChild)):qe=i),Mt(e,t,t.pendingProps.children,n),Bu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=yC(o,t.type,t.pendingProps,In),o!==null?(t.stateNode=o,Rt=t,qe=Yn(o.firstChild),In=!1,i=!0):i=!1),i||Bi(t)),Qd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,zp(i,a)?o=null:l!==null&&zp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=um(e,t,LN,null,null,n),Wr._currentValue=i),Bu(e,t),Mt(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=vC(n,t.pendingProps,In),n!==null?(t.stateNode=n,Rt=t,qe=null,e=!0):e=!1),e||Bi(t)),null;case 13:return ib(e,t,n);case 4:return Vu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=sa(t,null,o,n):Mt(e,t,o,n),t.child;case 11:return Hy(e,t,t.type,t.pendingProps,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,gi(t,t.type,o.value),Mt(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,ra(t),i=Ot(i),o=o(i),t.flags|=1,Mt(e,t,o,n),t.child;case 14:return Py(e,t,t.type,t.pendingProps,n);case 15:return nb(e,t,t.type,t.pendingProps,n);case 19:return ab(e,t,n);case 31:return VN(e,t,n);case 22:return ob(e,t,n,t.pendingProps);case 24:return ra(t),o=Ot(ct),e===null?(i=im(),i===null&&(i=Ue,a=om(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},lm(t),gi(t,ct,i)):((e.lanes&n)!==0&&(pp(e,t),Lr(t,null,null,n),zr()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),gi(t,ct,o)):(o=a.cache,gi(t,ct,o),o!==i.cache&&fp(t,[ct],n,!0))),Mt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function Lo(e){e.flags|=4}function Ld(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Db())e.flags|=8192;else throw ia=Ku,am}else e.flags&=-16777217}function Xy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jb(t))if(Db())e.flags|=8192;else throw ia=Ku,am}function bu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?R0():536870912,e.lanes|=t,xl|=t)}function br(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function XN(e,t,n){var o=t.pendingProps;switch(nm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Xo(ct),hl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Za(t)?Lo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nd())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Lo(t),a!==null?(Xe(t),Xy(t,a)):(Xe(t),Ld(t,i,null,o,n))):a?a!==e.memoizedState?(Lo(t),Xe(t),Xy(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Lo(t),Xe(t),Ld(t,i,e,o,n)),null;case 27:if(Yu(t),n=Ni.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=mo.current,Za(t)?by(t,e):(e=Kb(i,o,n),t.stateNode=e,Lo(t))}return Xe(t),null;case 5:if(Yu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=mo.current,Za(t))by(t,a);else{var l=cc(Ni.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Dt]=t,a[rn]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(zt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Lo(t)}}return Xe(t),Ld(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Lo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Ni.current,Za(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Rt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Zb(e.nodeValue,n)),e||Bi(t,!0)}else e=cc(e).createTextNode(o),e[Dt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Za(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Dt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Za(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Dt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Nd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),bu(t,t.updateQueue),Xe(t),null);case 4:return hl(),e===null&&Mm(t.stateNode.containerInfo),Xe(t),null;case 10:return Xo(t.type),Xe(t),null;case 19:if(Nt(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)br(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Wu(e),a!==null){for(t.flags|=128,br(o,!1),e=a.updateQueue,t.updateQueue=e,bu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)rv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&ko(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Sn()>ic&&(t.flags|=128,i=!0,br(o,!1),t.lanes=4194304)}else{if(!i)if(e=Wu(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,bu(t,e),br(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*Sn()-o.renderingStartTime>ic&&n!==536870912&&(t.flags|=128,i=!0,br(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Sn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&ko(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return yn(t),rm(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&bu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Nt(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xo(ct),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function qN(e,t){switch(nm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xo(ct),hl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Yu(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(U(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(at),null;case 4:return hl(),null;case 10:return Xo(t.type),null;case 22:case 23:return yn(t),rm(),e!==null&&Nt(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xo(ct),null;case 25:return null;default:return null}}function rb(e,t){switch(nm(t),t.tag){case 3:Xo(ct),hl();break;case 26:case 27:case 5:Yu(t);break;case 4:hl();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:Nt(at);break;case 10:Xo(t.type);break;case 22:case 23:yn(t),rm(),e!==null&&Nt(oa);break;case 24:Xo(ct)}}function us(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Oe(t,t.return,r)}}function Hi(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){Oe(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Oe(t,t.return,c)}}function sb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yv(t,n)}catch(o){Oe(e,e.return,o)}}}function ub(e,t,n){n.props=ca(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Oe(e,t,o)}}function Hr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Oe(e,t,i)}}function po(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Oe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function cb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Oe(e,e.return,i)}}function Bd(e,t,n){try{var o=e.stateNode;fC(o,e.type,n,t),o[rn]=t}catch(i){Oe(e,e.return,i)}}function fb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gi(e.type)||e.tag===4}function Hd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Gi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tp(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Io));else if(o!==4&&(o===27&&Gi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Tp(e,t,n),e=e.sibling;e!==null;)Tp(e,t,n),e=e.sibling}function oc(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&Gi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(oc(e,t,n),e=e.sibling;e!==null;)oc(e,t,n),e=e.sibling}function db(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,o,n),t[Dt]=e,t[rn]=n}catch(a){Oe(e,e.return,a)}}var Go=!1,ut=!1,Pd=!1,qy=typeof WeakSet=="function"?WeakSet:Set,Et=null;function ZN(e,t){if(e=e.containerInfo,Rp=mc,e=J0(e),Qp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Op={focusedElem:e,selectionRange:n},mc=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=ca(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Oe(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Lp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,Et=e;break}Et=t.return}}function pb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Ho(e,n),o&4&&us(5,n);break;case 1:if(Ho(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Oe(n,n.return,l)}else{var i=ca(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Oe(n,n.return,l)}}o&64&&sb(n),o&512&&Hr(n,n.return);break;case 3:if(Ho(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yv(e,t)}catch(l){Oe(n,n.return,l)}}break;case 27:t===null&&o&4&&db(n);case 26:case 5:Ho(e,n),t===null&&o&4&&cb(n),o&512&&Hr(n,n.return);break;case 12:Ho(e,n);break;case 31:Ho(e,n),o&4&&gb(e,n);break;case 13:Ho(e,n),o&4&&yb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=tC.bind(null,n),bC(e,n))));break;case 22:if(o=n.memoizedState!==null||Go,!o){t=t!==null&&t.memoizedState!==null||ut,i=Go;var a=ut;Go=o,(ut=t)&&!a?Po(e,n,(n.subtreeFlags&8772)!==0):Ho(e,n),Go=i,ut=a}break;case 30:break;default:Ho(e,n)}}function mb(e){var t=e.alternate;t!==null&&(e.alternate=null,mb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,on=!1;function Bo(e,t,n){for(n=n.child;n!==null;)hb(e,t,n),n=n.sibling}function hb(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(ns,n)}catch{}switch(n.tag){case 26:ut||po(n,t),Bo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||po(n,t);var o=Ke,i=on;Gi(n.type)&&(Ke=n.stateNode,on=!1),Bo(e,t,n),Ur(n.stateNode),Ke=o,on=i;break;case 5:ut||po(n,t);case 6:if(o=Ke,i=on,Ke=null,Bo(e,t,n),Ke=o,on=i,Ke!==null)if(on)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){Oe(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){Oe(n,t,a)}break;case 18:Ke!==null&&(on?(e=Ke,l0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Nl(e)):l0(Ke,n.stateNode));break;case 4:o=Ke,i=on,Ke=n.stateNode.containerInfo,on=!0,Bo(e,t,n),Ke=o,on=i;break;case 0:case 11:case 14:case 15:Hi(2,n,t),ut||Hi(4,n,t),Bo(e,t,n);break;case 1:ut||(po(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&ub(n,t,o)),Bo(e,t,n);break;case 21:Bo(e,t,n);break;case 22:ut=(o=ut)||n.memoizedState!==null,Bo(e,t,n),ut=o;break;default:Bo(e,t,n)}}function gb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nl(e)}catch(n){Oe(t,t.return,n)}}}function yb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(n){Oe(t,t.return,n)}}function jN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qy),t;default:throw Error(U(435,e.tag))}}function Su(e,t){var n=jN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=nC.bind(null,e,o);o.then(i,i)}})}function tn(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(Gi(r.type)){Ke=r.stateNode,on=!1;break e}break;case 5:Ke=r.stateNode,on=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,on=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));hb(a,l,i),Ke=null,on=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vb(t,e),t=t.sibling}var eo=null;function vb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),o&4&&(Hi(3,e,e.return),us(3,e),Hi(5,e,e.return));break;case 1:tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),o&64&&Go&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=eo;if(tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[as]||a[Dt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),zt(a,o,n),a[Dt]=e,Tt(a),o=a;break e;case"link":var l=p0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=p0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Dt]=e,Tt(a),o=a}e.stateNode=o}else m0(i,e.type,e.stateNode);else e.stateNode=d0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?m0(i,e.type,e.stateNode):d0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Bd(e,e.memoizedProps,n.memoizedProps)}break;case 27:tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),n!==null&&o&4&&Bd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(tn(t,e),nn(e),o&512&&(ut||n===null||po(n,n.return)),e.flags&32){i=e.stateNode;try{yl(i,"")}catch(v){Oe(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Bd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Pd=!0);break;case 6:if(tn(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){Oe(e,e.return,v)}}break;case 3:if(ku=null,i=eo,eo=fc(t.containerInfo),tn(t,e),eo=i,nn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Nl(t.containerInfo)}catch(v){Oe(e,e.return,v)}Pd&&(Pd=!1,bb(e));break;case 4:o=eo,eo=fc(e.stateNode.containerInfo),tn(t,e),nn(e),eo=o;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(wc=Sn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Go,c=ut;if(Go=u||i,ut=c||s,tn(t,e),ut=c,Go=u,nn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Go||ut||ea(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){Oe(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){Oe(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?r0(h,!0):r0(s.stateNode,!1)}catch(v){Oe(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,Su(e,n))));break;case 19:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Su(e,o)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(fb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Hd(e);oc(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(yl(l,""),n.flags&=-33);var r=Hd(e);oc(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Hd(e);Tp(e,u,s);break;default:throw Error(U(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ho(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pb(e,t.alternate,t),t=t.sibling}function ea(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),ea(t);break;case 1:po(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&ub(t,t.return,n),ea(t);break;case 27:Ur(t.stateNode);case 26:case 5:po(t,t.return),ea(t);break;case 22:t.memoizedState===null&&ea(t);break;case 30:ea(t);break;default:ea(t)}e=e.sibling}}function Po(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Po(i,a,n),us(4,a);break;case 1:if(Po(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Oe(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)gv(s[i],r)}catch(u){Oe(o,o.return,u)}}n&&l&64&&sb(a),Hr(a,a.return);break;case 27:db(a);case 26:case 5:Po(i,a,n),n&&o===null&&l&4&&cb(a),Hr(a,a.return);break;case 12:Po(i,a,n);break;case 31:Po(i,a,n),n&&l&4&&gb(i,a);break;case 13:Po(i,a,n),n&&l&4&&yb(i,a);break;case 22:a.memoizedState===null&&Po(i,a,n),Hr(a,a.return);break;case 30:break;default:Po(i,a,n)}t=t.sibling}}function Em(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&rs(n))}function Tm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rs(e))}function Jn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sb(e,t,n,o),t=t.sibling}function Sb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,n,o),i&2048&&us(9,t);break;case 1:Jn(e,t,n,o);break;case 3:Jn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rs(e)));break;case 12:if(i&2048){Jn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Oe(t,t.return,s)}}else Jn(e,t,n,o);break;case 31:Jn(e,t,n,o);break;case 13:Jn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Jn(e,t,n,o):Pr(e,t):a._visibility&2?Jn(e,t,n,o):(a._visibility|=2,$a(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Em(l,t);break;case 24:Jn(e,t,n,o),i&2048&&Tm(t.alternate,t);break;default:Jn(e,t,n,o)}}function $a(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:$a(a,l,r,s,i),us(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?$a(a,l,r,s,i):Pr(a,l):(c._visibility|=2,$a(a,l,r,s,i)),i&&u&2048&&Em(l.alternate,l);break;case 24:$a(a,l,r,s,i),i&&u&2048&&Tm(l.alternate,l);break;default:$a(a,l,r,s,i)}t=t.sibling}}function Pr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:Pr(n,o),i&2048&&Em(o.alternate,o);break;case 24:Pr(n,o),i&2048&&Tm(o.alternate,o);break;default:Pr(n,o)}t=t.sibling}}var wr=8192;function ja(e,t,n){if(e.subtreeFlags&wr)for(e=e.child;e!==null;)xb(e,t,n),e=e.sibling}function xb(e,t,n){switch(e.tag){case 26:ja(e,t,n),e.flags&wr&&e.memoizedState!==null&&RC(n,eo,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,n);break;case 3:case 4:var o=eo;eo=fc(e.stateNode.containerInfo),ja(e,t,n),eo=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=wr,wr=16777216,ja(e,t,n),wr=o):ja(e,t,n));break;default:ja(e,t,n)}}function _b(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Tb(o,e)}_b(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eb(e),e=e.sibling}function Eb(e){switch(e.tag){case 0:case 11:case 15:Sr(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Sr(e);break;case 12:Sr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hu(e)):Sr(e);break;default:Sr(e)}}function Hu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Tb(o,e)}_b(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Hu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hu(t));break;default:Hu(t)}e=e.sibling}}function Tb(e,t){for(;Et!==null;){var n=Et;switch(n.tag){case 0:case 11:case 15:Hi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:rs(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,Et=o;else e:for(n=e;Et!==null;){o=Et;var i=o.sibling,a=o.return;if(mb(o),o===n){Et=null;break e}if(i!==null){i.return=a,Et=i;break e}Et=a}}}var $N={getCacheForType:function(e){var t=Ot(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(ct).controller.signal}},FN=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,_e=null,Ne=0,Re=0,gn=null,_i=!1,Dl=!1,Nm=!1,Ko=0,nt=0,Pi=0,aa=0,Cm=0,bn=0,xl=0,kr=null,an=null,Np=!1,wc=0,Nb=0,ic=1/0,ac=null,Mi=null,ht=0,Di=null,_l=null,qo=0,Cp=0,wp=null,Cb=null,Gr=0,Ap=null;function En(){return(Me&2)!==0&&Ne!==0?Ne&-Ne:ce.T!==null?Am():B0()}function wb(){if(bn===0)if((Ne&536870912)===0||Ce){var e=cu;cu<<=1,(cu&3932160)===0&&(cu=262144),bn=e}else bn=536870912;return e=Nn.current,e!==null&&(e.flags|=32),bn}function ln(e,t,n){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(El(e,0),Ei(e,Ne,bn,!1)),is(e,n),((Me&2)===0||e!==Ue)&&(e===Ue&&((Me&2)===0&&(aa|=n),nt===4&&Ei(e,Ne,bn,!1)),go(e))}function Ab(e,t,n){if((Me&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||os(e,t),i=o?WN(e,t):kd(e,t,!0),a=o;do{if(i===0){Dl&&!o&&Ei(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!KN(n)){i=kd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=kr;var s=r.current.memoizedState.isDehydrated;if(s&&(El(r,l).flags|=256),l=kd(r,l,!1),l!==2){if(Nm&&!s){r.errorRecoveryDisabledLanes|=a,aa|=a,i=4;break e}a=an,an=i,a!==null&&(an===null?an=a:an.push.apply(an,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){El(e,0),Ei(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:Ei(o,t,bn,!_i);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=wc+300-Sn(),10<i)){if(Ei(o,t,bn,!_i),gc(o,0,!0)!==0)break e;qo=t,o.timeoutHandle=$b(Zy.bind(null,o,n,an,ac,Np,t,bn,aa,xl,_i,a,"Throttled",-0,0),i);break e}Zy(o,n,an,ac,Np,t,bn,aa,xl,_i,a,null,-0,0)}}break}while(!0);go(e)}function Zy(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Io},xb(t,a,d);var v=(a&62914560)===a?wc-Sn():(a&4194048)===a?Nb-Sn():0;if(v=OC(d,v),v!==null){qo=a,e.cancelPendingCommit=v($y.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),Ei(e,a,l,!u);return}}$y(e,t,a,n,o,i,l,r,s)}function KN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!Tn(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ei(e,t,n,o){t&=~Cm,t&=~aa,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-_n(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&O0(e,n,t)}function Ac(){return(Me&6)===0?(cs(0,!1),!1):!0}function wm(){if(_e!==null){if(Re===0)var e=_e.return;else e=_e,Vo=ha=null,dm(e),dl=null,jr=0,e=_e;for(;e!==null;)rb(e.alternate,e),e=e.return;_e=null}}function El(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,mC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),qo=0,wm(),Ue=e,_e=n=Yo(e.current,null),Ne=t,Re=0,gn=null,_i=!1,Dl=os(e,t),Nm=!1,xl=bn=Cm=aa=Pi=nt=0,an=kr=null,Np=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-_n(o),a=1<<i;t|=e[i],o&=~a}return Ko=t,Sc(),n}function Mb(e,t){ve=null,ce.H=Fr,t===Ml||t===_c?(t=Ty(),Re=3):t===am?(t=Ty(),Re=4):Re=t===xm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gn=t,_e===null&&(nt=1,tc(e,Un(t,e.current)))}function Db(){var e=Nn.current;return e===null?!0:(Ne&4194048)===Ne?Vn===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Vn:!1}function Rb(){var e=ce.H;return ce.H=Fr,e===null?Fr:e}function Ob(){var e=ce.A;return ce.A=$N,e}function lc(){nt=4,_i||(Ne&4194048)!==Ne&&Nn.current!==null||(Dl=!0),(Pi&134217727)===0&&(aa&134217727)===0||Ue===null||Ei(Ue,Ne,bn,!1)}function kd(e,t,n){var o=Me;Me|=2;var i=Rb(),a=Ob();(Ue!==e||Ne!==t)&&(ac=null,El(e,t)),t=!1;var l=nt;e:do try{if(Re!==0&&_e!==null){var r=_e,s=gn;switch(Re){case 8:wm(),l=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var u=Re;if(Re=0,gn=null,rl(e,r,s,u),n&&Dl){l=0;break e}break;default:u=Re,Re=0,gn=null,rl(e,r,s,u)}}QN(),l=nt;break}catch(c){Mb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Vo=ha=null,Me=o,ce.H=i,ce.A=a,_e===null&&(Ue=null,Ne=0,Sc()),l}function QN(){for(;_e!==null;)zb(_e)}function WN(e,t){var n=Me;Me|=2;var o=Rb(),i=Ob();Ue!==e||Ne!==t?(ac=null,ic=Sn()+500,El(e,t)):Dl=os(e,t);e:do try{if(Re!==0&&_e!==null){t=_e;var a=gn;t:switch(Re){case 1:Re=0,gn=null,rl(e,t,a,1);break;case 2:case 9:if(Ey(a)){Re=0,gn=null,jy(t);break}t=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),go(e)},a.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ey(a)?(Re=0,gn=null,jy(t)):(Re=0,gn=null,rl(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?Jb(l):r.stateNode.complete){Re=0,gn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Mc(u)):_e=null}break t}}Re=0,gn=null,rl(e,t,a,5);break;case 6:Re=0,gn=null,rl(e,t,a,6);break;case 8:wm(),nt=6;break e;default:throw Error(U(462))}}JN();break}catch(c){Mb(e,c)}while(!0);return Vo=ha=null,ce.H=o,ce.A=i,Me=n,_e!==null?0:(Ue=null,Ne=0,Sc(),nt)}function JN(){for(;_e!==null&&!_2();)zb(_e)}function zb(e){var t=lb(e.alternate,e,Ko);e.memoizedProps=e.pendingProps,t===null?Mc(e):_e=t}function jy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uy(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Uy(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:dm(t);default:rb(n,t),t=_e=rv(t,Ko),t=lb(n,t,Ko)}e.memoizedProps=e.pendingProps,t===null?Mc(e):_e=t}function rl(e,t,n,o){Vo=ha=null,dm(t),dl=null,jr=0;var i=t.return;try{if(IN(e,i,t,n,Ne)){nt=1,tc(e,Un(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;nt=1,tc(e,Un(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:Dl||(Ne&536870912)!==0?e=!1:(_i=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lb(t,e)):Mc(t)}function Mc(e){var t=e;do{if((t.flags&32768)!==0){Lb(t,_i);return}e=t.return;var n=XN(t.alternate,t,Ko);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);nt===0&&(nt=5)}function Lb(e,t){do{var n=qN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);nt=6,_e=null}function $y(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do Dc();while(ht!==0);if((Me&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Wp,O2(e,n,a,l,r,s),e===Ue&&(_e=Ue=null,Ne=0),_l=t,Di=e,qo=n,Cp=a,wp=i,Cb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,oC(Xu,function(){return Gb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,i=De.p,De.p=2,l=Me,Me|=4;try{ZN(e,t,n)}finally{Me=l,De.p=i,ce.T=o}}ht=1,Bb(),Hb(),Pb()}}function Bb(){if(ht===1){ht=0;var e=Di,t=_l,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{vb(t,e);var a=Op,l=J0(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&W0(r.ownerDocument.documentElement,r)){if(s!==null&&Qp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=gy(r,b),g=gy(r,S);if(p&&g&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==g.node||h.focusOffset!==g.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(g.node,g.offset)):(m.setEnd(g.node,g.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var y=d[r];y.element.scrollLeft=y.left,y.element.scrollTop=y.top}}mc=!!Rp,Op=Rp=null}finally{Me=i,De.p=o,ce.T=n}}e.current=t,ht=2}}function Hb(){if(ht===2){ht=0;var e=Di,t=_l,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{pb(e,t.alternate,t)}finally{Me=i,De.p=o,ce.T=n}}ht=3}}function Pb(){if(ht===4||ht===3){ht=0,E2();var e=Di,t=_l,n=qo,o=Cb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,_l=Di=null,kb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Mi=null),Xp(n),t=t.stateNode,xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(ns,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ce.T,i=De.p,De.p=2,ce.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{ce.T=t,De.p=i}}(qo&3)!==0&&Dc(),go(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Ap?Gr++:(Gr=0,Ap=e):Gr=0,cs(0,!1)}}function kb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rs(t)))}function Dc(){return Bb(),Hb(),Pb(),Gb()}function Gb(){if(ht!==5)return!1;var e=Di,t=Cp;Cp=0;var n=Xp(qo),o=ce.T,i=De.p;try{De.p=32>n?32:n,ce.T=null,n=wp,wp=null;var a=Di,l=qo;if(ht=0,_l=Di=null,qo=0,(Me&6)!==0)throw Error(U(331));var r=Me;if(Me|=4,Eb(a.current),Sb(a,a.current,l,n),Me=r,cs(0,!1),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(ns,a)}catch{}return!0}finally{De.p=i,ce.T=o,kb(e,t)}}function Fy(e,t,n){t=Un(n,t),t=xp(e.stateNode,t,2),e=Ai(e,t,2),e!==null&&(is(e,2),go(e))}function Oe(e,t,n){if(e.tag===3)Fy(e,e,n);else for(;t!==null;){if(t.tag===3){Fy(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mi===null||!Mi.has(o))){e=Un(n,e),n=eb(2),o=Ai(t,n,2),o!==null&&(tb(n,o,t,e),is(o,2),go(o));break}}t=t.return}}function Gd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new FN;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Nm=!0,i.add(n),e=eC.bind(null,e,t,n),t.then(e,e))}function eC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(Ne&n)===n&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>Sn()-wc?(Me&2)===0&&El(e,0):Cm|=n,xl===Ne&&(xl=0)),go(e)}function Ub(e,t){t===0&&(t=R0()),e=ma(e,t),e!==null&&(is(e,t),go(e))}function tC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ub(e,n)}function nC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),Ub(e,n)}function oC(e,t){return Vp(e,t)}var rc=null,Fa=null,Mp=!1,sc=!1,Ud=!1,Ti=0;function go(e){e!==Fa&&e.next===null&&(Fa===null?rc=Fa=e:Fa=Fa.next=e),sc=!0,Mp||(Mp=!0,aC())}function cs(e,t){if(!Ud&&sc){Ud=!0;do for(var n=!1,o=rc;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-_n(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ky(o,a))}else a=Ne,a=gc(o,o===Ue?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||os(o,a)||(n=!0,Ky(o,a));o=o.next}while(n);Ud=!1}}function iC(){Ib()}function Ib(){sc=Mp=!1;var e=0;Ti!==0&&pC()&&(e=Ti);for(var t=Sn(),n=null,o=rc;o!==null;){var i=o.next,a=Vb(o,t);a===0?(o.next=null,n===null?rc=i:n.next=i,i===null&&(Fa=n)):(n=o,(e!==0||(a&3)!==0)&&(sc=!0)),o=i}ht!==0&&ht!==5||cs(e,!1),Ti!==0&&(Ti=0)}function Vb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-_n(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=R2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Ue,n=Ne,n=gc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&hd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||os(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&hd(o),Xp(n)){case 2:case 8:n=M0;break;case 32:n=Xu;break;case 268435456:n=D0;break;default:n=Xu}return o=Yb.bind(null,e),n=Vp(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&hd(o),e.callbackPriority=2,e.callbackNode=null,2}function Yb(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Dc()&&e.callbackNode!==n)return null;var o=Ne;return o=gc(e,e===Ue?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ab(e,o,t),Vb(e,Sn()),e.callbackNode!=null&&e.callbackNode===n?Yb.bind(null,e):null)}function Ky(e,t){if(Dc())return null;Ab(e,t,!0)}function aC(){hC(function(){(Me&6)!==0?Vp(A0,iC):Ib()})}function Am(){if(Ti===0){var e=vl;e===0&&(e=uu,uu<<=1,(uu&261888)===0&&(uu=256)),Ti=e}return Ti}function Qy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wu(""+e)}function Wy(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function lC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=Qy((i[rn]||null).action),l=o.submitter;l&&(t=(t=l[rn]||null)?Qy(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new yc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ti!==0){var s=l?Wy(i,l):new FormData(i);bp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?Wy(i,l):new FormData(i),bp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(xu=0;xu<rp.length;xu++)_u=rp[xu],Jy=_u.toLowerCase(),e0=_u[0].toUpperCase()+_u.slice(1),to(Jy,"on"+e0);var _u,Jy,e0,xu;to(tv,"onAnimationEnd");to(nv,"onAnimationIteration");to(ov,"onAnimationStart");to("dblclick","onDoubleClick");to("focusin","onFocus");to("focusout","onBlur");to(TN,"onTransitionRun");to(NN,"onTransitionStart");to(CN,"onTransitionCancel");to(iv,"onTransitionEnd");gl("onMouseEnter",["mouseout","mouseover"]);gl("onMouseLeave",["mouseout","mouseover"]);gl("onPointerEnter",["pointerout","pointerover"]);gl("onPointerLeave",["pointerout","pointerover"]);fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kr="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(" "),rC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kr));function Xb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Zu(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Zu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Jd];n===void 0&&(n=t[Jd]=new Set);var o=e+"__bubble";n.has(o)||(qb(t,e,2,!1),n.add(o))}function Id(e,t,n){var o=0;t&&(o|=4),qb(n,e,o,t)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function Mm(e){if(!e[Eu]){e[Eu]=!0,H0.forEach(function(n){n!=="selectionchange"&&(rC.has(n)||Id(n,!1,e),Id(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Eu]||(t[Eu]=!0,Id("selectionchange",!1,t))}}function qb(e,t,n,o){switch(i1(t)){case 2:var i=BC;break;case 8:i=HC;break;default:i=zm}n=i.bind(null,t,n,e),i=void 0,!ip||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Vd(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Wa(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}X0(function(){var u=a,c=jp(n),d=[];e:{var f=av.get(e);if(f!==void 0){var h=yc,v=e;switch(e){case"keypress":if(Mu(n)===0)break e;case"keydown":case"keyup":h=nN;break;case"focusin":v="focus",h=Sd;break;case"focusout":v="blur",h=Sd;break;case"beforeblur":case"afterblur":h=Sd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ry;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=X2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=aN;break;case tv:case nv:case ov:h=j2;break;case iv:h=rN;break;case"scroll":case"scrollend":h=V2;break;case"wheel":h=uN;break;case"copy":case"cut":case"paste":h=F2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=uy;break;case"toggle":case"beforetoggle":h=fN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var g=u,m;g!==null;){var y=g;if(m=y.stateNode,y=y.tag,y!==5&&y!==26&&y!==27||m===null||p===null||(y=Vr(g,p),y!=null&&b.push(Qr(g,y,m))),S)break;g=g.return}0<b.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==op&&(v=n.relatedTarget||n.fromElement)&&(Wa(v)||v[Cl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Wa(v):null,v!==null&&(S=ts(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=ry,y="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(b=uy,y="onPointerLeave",p="onPointerEnter",g="pointer"),S=h==null?f:Nr(h),m=v==null?f:Nr(v),f=new b(y,g+"leave",h,n,c),f.target=S,f.relatedTarget=m,y=null,Wa(c)===u&&(b=new b(p,g+"enter",v,n,c),b.target=m,b.relatedTarget=S,y=b),S=y,h&&v)t:{for(b=sC,p=h,g=v,m=0,y=p;y;y=b(y))m++;y=0;for(var x=g;x;x=b(x))y++;for(;0<m-y;)p=b(p),m--;for(;0<y-m;)g=b(g),y--;for(;m--;){if(p===g||g!==null&&p===g.alternate){b=p;break t}p=b(p),g=b(g)}b=null}else b=null;h!==null&&t0(d,f,h,b,!1),v!==null&&S!==null&&t0(d,S,v,b,!0)}}e:{if(f=u?Nr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=py;else if(dy(f))if(K0)_=xN;else{_=bN;var E=vN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Zp(u.elementType)&&(_=py):_=SN;if(_&&(_=_(e,u))){F0(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&np(f,"number",f.value)}switch(E=u?Nr(u):window,e){case"focusin":(dy(E)||E.contentEditable==="true")&&(tl=E,ap=u,Dr=null);break;case"focusout":Dr=ap=tl=null;break;case"mousedown":lp=!0;break;case"contextmenu":case"mouseup":case"dragend":lp=!1,yy(d,n,c);break;case"selectionchange":if(EN)break;case"keydown":case"keyup":yy(d,n,c)}var C;if(Kp)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else el?j0(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(Z0&&n.locale!=="ko"&&(el||A!=="onCompositionStart"?A==="onCompositionEnd"&&el&&(C=q0()):(xi=c,$p="value"in xi?xi.value:xi.textContent,el=!0)),E=uc(u,A),0<E.length&&(A=new sy(A,e,null,n,c),d.push({event:A,listeners:E}),C?A.data=C:(C=$0(n),C!==null&&(A.data=C)))),(C=pN?mN(e,n):hN(e,n))&&(A=uc(u,"onBeforeInput"),0<A.length&&(E=new sy("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:A}),E.data=C)),lC(d,e,u,n,c)}Xb(d,t)})}function Qr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Vr(e,n),i!=null&&o.unshift(Qr(e,i,a)),i=Vr(e,t),i!=null&&o.push(Qr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function sC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function t0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Vr(n,a),u!=null&&l.unshift(Qr(n,u,s))):i||(u=Vr(n,a),u!=null&&l.push(Qr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var uC=/\r\n?/g,cC=/\u0000|\uFFFD/g;function n0(e){return(typeof e=="string"?e:""+e).replace(uC,`
9
- `).replace(cC,"")}function Zb(e,t){return t=n0(t),n0(e)===t}function Pe(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||yl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&yl(e,""+o);break;case"className":du(e,"class",o);break;case"tabIndex":du(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":du(e,n,o);break;case"style":Y0(e,o,a);break;case"data":if(t!=="object"){du(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=wu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=wu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Io);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=wu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Cu(e,"popover",o);break;case"xlinkActuate":zo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":zo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":zo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":zo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":zo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":zo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":zo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":zo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":zo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Cu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=U2.get(n)||n,Cu(e,n,o))}}function Dp(e,t,n,o,i,a){switch(n){case"style":Y0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?yl(e,o):(typeof o=="number"||typeof o=="bigint")&&yl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Io);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[rn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Cu(e,n,o)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,a,l,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),o&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(U(137,t));break;default:Pe(e,t,o,c,n,null)}}U0(e,a,r,s,u,l,i,!1);return;case"select":xe("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:Pe(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?ul(e,!!o,t,!1):n!=null&&ul(e,!!o,n,!0);return;case"textarea":xe("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(U(91));break;default:Pe(e,t,l,r,n,null)}V0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Kr.length;o++)xe(Kr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,u,o,n,null)}return;default:if(Zp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Dp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Pe(e,t,r,o,n,null))}function fC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||Pe(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(U(137,t));break;default:h!==d&&Pe(e,t,f,h,o,d)}}tp(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||Pe(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&Pe(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?ul(e,!!n,f,!1):!!o!=!!n&&(t!=null?ul(e,!!n,t,!0):ul(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Pe(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==a&&Pe(e,t,l,i,o,a)}I0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Pe(e,t,v,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Pe(e,t,s,f,o,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Pe(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:Pe(e,t,u,f,o,h)}return;default:if(Zp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Dp(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||Dp(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&Pe(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||Pe(e,t,d,f,o,h)}function o0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&o0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&o0(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Rp=null,Op=null;function cc(e){return e.nodeType===9?e:e.ownerDocument}function i0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function zp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function pC(){var e=window.event;return e&&e.type==="popstate"?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var $b=typeof setTimeout=="function"?setTimeout:void 0,mC=typeof clearTimeout=="function"?clearTimeout:void 0,a0=typeof Promise=="function"?Promise:void 0,hC=typeof queueMicrotask=="function"?queueMicrotask:typeof a0<"u"?function(e){return a0.resolve(null).then(e).catch(gC)}:$b;function gC(e){setTimeout(function(){throw e})}function Gi(e){return e==="head"}function l0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),Nl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Ur(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ur(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[as]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Ur(e.ownerDocument.body);n=i}while(n);Nl(t)}function r0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Lp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Lp(n),qp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function yC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[as])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Yn(e.nextSibling),e===null)break}return null}function vC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Yn(e.nextSibling),e===null))return null;return e}function Fb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yn(e.nextSibling),e===null))return null;return e}function Bp(e){return e.data==="$?"||e.data==="$~"}function Hp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Pp=null;function s0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Yn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function u0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Kb(e,t,n){switch(t=cc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Ur(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qp(e)}var Xn=new Map,c0=new Set;function fc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qo=De.d;De.d={f:SC,r:xC,D:_C,C:EC,L:TC,m:NC,X:wC,S:CC,M:AC};function SC(){var e=Qo.f(),t=Ac();return e||t}function xC(e){var t=wl(e);t!==null&&t.tag===5&&t.type==="form"?Yv(t):Qo.r(e)}var Rl=typeof document>"u"?null:document;function Qb(e,t,n){var o=Rl;if(o&&typeof t=="string"&&t){var i=Gn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),c0.has(i)||(c0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function _C(e){Qo.D(e),Qb("dns-prefetch",e,null)}function EC(e,t){Qo.C(e,t),Qb("preconnect",e,t)}function TC(e,t,n){Qo.L(e,t,n);var o=Rl;if(o&&e&&t){var i='link[rel="preload"][as="'+Gn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Gn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Gn(n.imageSizes)+'"]')):i+='[href="'+Gn(e)+'"]';var a=i;switch(t){case"style":a=Tl(e);break;case"script":a=Ol(e)}Xn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(fs(a))||t==="script"&&o.querySelector(ds(a))||(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function NC(e,t){Qo.m(e,t);var n=Rl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Gn(o)+'"][href="'+Gn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Ol(e)}if(!Xn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Xn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ds(a)))return}o=n.createElement("link"),zt(o,"link",e),Tt(o),n.head.appendChild(o)}}}function CC(e,t,n){Qo.S(e,t,n);var o=Rl;if(o&&e){var i=sl(o).hoistableStyles,a=Tl(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(fs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xn.get(a))&&Dm(e,n);var s=l=o.createElement("link");Tt(s),zt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Pu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function wC(e,t){Qo.X(e,t);var n=Rl;if(n&&e){var o=sl(n).hoistableScripts,i=Ol(e),a=o.get(i);a||(a=n.querySelector(ds(i)),a||(e=Ze({src:e,async:!0},t),(t=Xn.get(i))&&Rm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function AC(e,t){Qo.M(e,t);var n=Rl;if(n&&e){var o=sl(n).hoistableScripts,i=Ol(e),a=o.get(i);a||(a=n.querySelector(ds(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Xn.get(i))&&Rm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function f0(e,t,n,o){var i=(i=Ni.current)?fc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Tl(n.href),n=sl(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Tl(n.href);var a=sl(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(fs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Xn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xn.set(e,n),a||MC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ol(n),n=sl(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function Tl(e){return'href="'+Gn(e)+'"'}function fs(e){return'link[rel="stylesheet"]['+e+"]"}function Wb(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function MC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),zt(t,"link",n),Tt(t),e.head.appendChild(t))}function Ol(e){return'[src="'+Gn(e)+'"]'}function ds(e){return"script[async]"+e}function d0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Gn(n.href)+'"]');if(o)return t.instance=o,Tt(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Tt(o),zt(o,"style",i),Pu(o,n.precedence,e),t.instance=o;case"stylesheet":i=Tl(n.href);var a=e.querySelector(fs(i));if(a)return t.state.loading|=4,t.instance=a,Tt(a),a;o=Wb(n),(i=Xn.get(i))&&Dm(o,i),a=(e.ownerDocument||e).createElement("link"),Tt(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),t.state.loading|=4,Pu(a,n.precedence,e),t.instance=a;case"script":return a=Ol(n.src),(i=e.querySelector(ds(a)))?(t.instance=i,Tt(i),i):(o=n,(i=Xn.get(a))&&(o=Ze({},n),Rm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),zt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Pu(o,n.precedence,e));return t.instance}function Pu(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Dm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ku=null;function p0(e,t,n){if(ku===null){var o=new Map,i=ku=new Map;i.set(n,o)}else i=ku,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[as]||a[Dt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function m0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function DC(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Jb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function RC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Tl(o.href),a=t.querySelector(fs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,o=Wb(o),(i=Xn.get(i))&&Dm(o,i),a=a.createElement("link"),Tt(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=dc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xd=0;function OC(e,t){return e.stylesheets&&e.count===0&&Gu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Gu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Xd===0&&(Xd=62500*dC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Gu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Xd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pc=null;function Gu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pc=new Map,t.forEach(zC,e),pc=null,dc.call(e))}function zC(e,t){if(!(t.state.loading&4)){var n=pc.get(e);if(n)var o=n.get(null);else{n=new Map,pc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=dc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Wr={$$typeof:Uo,Provider:null,Consumer:null,_currentValue:ta,_currentValue2:ta,_threadCount:0};function LC(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gd(0),this.hiddenUpdates=gd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function e1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new LC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=vn(3,null,null,t),e.current=a,a.stateNode=e,t=om(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},lm(a),e}function t1(e){return e?(e=il,e):il}function n1(e,t,n,o,i,a){i=t1(i),o.context===null?o.context=i:o.pendingContext=i,o=wi(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Ai(e,o,t),n!==null&&(ln(n,e,t),Or(n,e,t))}function h0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Om(e,t){h0(e,t),(e=e.alternate)&&h0(e,t)}function o1(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&ln(t,e,67108864),Om(e,67108864)}}function g0(e){if(e.tag===13||e.tag===31){var t=En();t=Yp(t);var n=ma(e,t);n!==null&&ln(n,e,t),Om(e,t)}}var mc=!0;function BC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=2,zm(e,t,n,o)}finally{De.p=a,ce.T=i}}function HC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=8,zm(e,t,n,o)}finally{De.p=a,ce.T=i}}function zm(e,t,n,o){if(mc){var i=kp(o);if(i===null)Vd(e,t,o,hc,n),y0(e,o);else if(kC(i,e,t,n,o))o.stopPropagation();else if(y0(e,o),t&4&&-1<PC.indexOf(e)){for(;i!==null;){var a=wl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Wi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-_n(l);r.entanglements[1]|=s,l&=~s}go(a),(Me&6)===0&&(ic=Sn()+500,cs(0,!1))}}break;case 31:case 13:r=ma(a,2),r!==null&&ln(r,a,2),Ac(),Om(a,2)}if(a=kp(o),a===null&&Vd(e,t,o,hc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Vd(e,t,o,null,n)}}function kp(e){return e=jp(e),Lm(e)}var hc=null;function Lm(e){if(hc=null,e=Wa(e),e!==null){var t=ts(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=E0(t),e!==null)return e;e=null}else if(n===31){if(e=T0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hc=e,null}function i1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(T2()){case A0:return 2;case M0:return 8;case Xu:case N2:return 32;case D0:return 268435456;default:return 32}default:return 32}}var Gp=!1,Ri=null,Oi=null,zi=null,Jr=new Map,es=new Map,bi=[],PC="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 y0(e,t){switch(e){case"focusin":case"focusout":Ri=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":Jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":es.delete(t.pointerId)}}function xr(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wl(t),t!==null&&o1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kC(e,t,n,o,i){switch(t){case"focusin":return Ri=xr(Ri,e,t,n,o,i),!0;case"dragenter":return Oi=xr(Oi,e,t,n,o,i),!0;case"mouseover":return zi=xr(zi,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Jr.set(a,xr(Jr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,es.set(a,xr(es.get(a)||null,e,t,n,o,i)),!0}return!1}function a1(e){var t=Wa(e.target);if(t!==null){var n=ts(t);if(n!==null){if(t=n.tag,t===13){if(t=E0(n),t!==null){e.blockedOn=t,ey(e.priority,function(){g0(n)});return}}else if(t===31){if(t=T0(n),t!==null){e.blockedOn=t,ey(e.priority,function(){g0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);op=o,n.target.dispatchEvent(o),op=null}else return t=wl(n),t!==null&&o1(t),e.blockedOn=n,!1;t.shift()}return!0}function v0(e,t,n){Uu(e)&&n.delete(t)}function GC(){Gp=!1,Ri!==null&&Uu(Ri)&&(Ri=null),Oi!==null&&Uu(Oi)&&(Oi=null),zi!==null&&Uu(zi)&&(zi=null),Jr.forEach(v0),es.forEach(v0)}function Tu(e,t){e.blockedOn===t&&(e.blockedOn=null,Gp||(Gp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,GC)))}var Nu=null;function b0(e){Nu!==e&&(Nu=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){Nu===e&&(Nu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(Lm(o||n)===null)continue;break}var a=wl(n);a!==null&&(e.splice(t,3),t-=3,bp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function Nl(e){function t(s){return Tu(s,e)}Ri!==null&&Tu(Ri,e),Oi!==null&&Tu(Oi,e),zi!==null&&Tu(zi,e),Jr.forEach(t),es.forEach(t);for(var n=0;n<bi.length;n++){var o=bi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<bi.length&&(n=bi[0],n.blockedOn===null);)a1(n),n.blockedOn===null&&bi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[rn]||null;if(typeof a=="function")l||b0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[rn]||null)r=l.formAction;else if(Lm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),b0(n)}}}function l1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Bm(e){this._internalRoot=e}Rc.prototype.render=Bm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=En();n1(n,o,e,t,null,null)};Rc.prototype.unmount=Bm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;n1(e.current,2,null,e,null,null),Ac(),t[Cl]=null}};function Rc(e){this._internalRoot=e}Rc.prototype.unstable_scheduleHydration=function(e){if(e){var t=B0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bi.length&&t!==0&&t<bi[n].priority;n++);bi.splice(n,0,e),n===0&&a1(e)}};var S0=x0.version;if(S0!=="19.2.4")throw Error(U(527,S0,"19.2.4"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=y2(t),e=e!==null?N0(e):null,e=e===null?null:e.stateNode,e};var UC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(_r=__REACT_DEVTOOLS_GLOBAL_HOOK__,!_r.isDisabled&&_r.supportsFiber))try{ns=_r.inject(UC),xn=_r}catch{}var _r;Oc.createRoot=function(e,t){if(!_0(e))throw Error(U(299));var n=!1,o="",i=Qv,a=Wv,l=Jv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=e1(e,1,!1,null,null,n,o,null,i,a,l,l1),e[Cl]=t.current,Mm(e),new Bm(t)};Oc.hydrateRoot=function(e,t,n){if(!_0(e))throw Error(U(299));var o=!1,i="",a=Qv,l=Wv,r=Jv,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=e1(e,1,!0,t,n??null,o,i,s,a,l,r,l1),t.context=t1(null),n=t.current,o=En(),o=Yp(o),i=wi(o),i.callback=null,Ai(n,i,o),n=o,t.current.lanes=n,is(t,n),go(t),e[Cl]=t.current,Mm(e),new Rc(t)};Oc.version="19.2.4"});var c1=en((Hz,u1)=>{"use strict";function s1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s1)}catch(e){console.error(e)}}s1(),u1.exports=r1()});var _1=en(kc=>{"use strict";var XC=Symbol.for("react.transitional.element"),qC=Symbol.for("react.fragment");function x1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:XC,type:e,key:o,ref:t!==void 0?t:null,props:n}}kc.Fragment=qC;kc.jsx=x1;kc.jsxs=x1});var pe=en((Iz,E1)=>{"use strict";E1.exports=_1()});var l_=en(a_=>{"use strict";var Wl=At();function UM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var IM=typeof Object.is=="function"?Object.is:UM,VM=Wl.useState,YM=Wl.useEffect,XM=Wl.useLayoutEffect,qM=Wl.useDebugValue;function ZM(e,t){var n=t(),o=VM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return XM(function(){i.value=n,i.getSnapshot=t,Nh(i)&&a({inst:i})},[e,n,t]),YM(function(){return Nh(i)&&a({inst:i}),e(function(){Nh(i)&&a({inst:i})})},[e]),qM(n),n}function Nh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!IM(e,n)}catch{return!0}}function jM(e,t){return t()}var $M=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jM:ZM;a_.useSyncExternalStore=Wl.useSyncExternalStore!==void 0?Wl.useSyncExternalStore:$M});var s_=en((LH,r_)=>{"use strict";r_.exports=l_()});var c_=en(u_=>{"use strict";var Df=At(),FM=s_();function KM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QM=typeof Object.is=="function"?Object.is:KM,WM=FM.useSyncExternalStore,JM=Df.useRef,eD=Df.useEffect,tD=Df.useMemo,nD=Df.useDebugValue;u_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=JM(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=tD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,QM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=WM(e,a[0],a[1]);return eD(function(){l.hasValue=!0,l.value=r},[r]),nD(r),r}});var d_=en((HH,f_)=>{"use strict";f_.exports=c_()});var Pa=ne(At(),1),DT=ne(c1(),1);var IC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeStructure:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},f1=new Set(Object.keys(IC)),zl="pipeCard",d1="default",p1="controllerGroup",Hm="stuff_";function Ui(e){return Hm+e}function Ll(e){return e.startsWith(Hm)}function ps(e){return e.slice(Hm.length)}var Cn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},zc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},no={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},ga={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},un={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_RIGHT:"center-right"};function m1(e){return e===un.CENTER_LEFT||e===un.CENTER_RIGHT?"vertical":"horizontal"}function h1(e){switch(e){case un.TOP_LEFT:case un.CENTER_LEFT:case un.BOTTOM_LEFT:return"left";case un.TOP_RIGHT:case un.CENTER_RIGHT:case un.BOTTOM_RIGHT:return"right";case un.TOP_CENTER:case un.BOTTOM_CENTER:return"center";default:return e}}var Lc=40,Bc=48,Hc=20,ya="arrowclosed";function g1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function y1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var ms=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},v1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),b1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Ii(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function wn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new ms(e,t)}function yo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${wn(e)}`),e}function S1(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.name,`${t}.name`)}function VC(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!v1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...v1].join(", ")}, got ${JSON.stringify(e.status)}`),yo(e.pipe_code,`${t}.pipe_code`);let n=yo(e.pipe_type,`${t}.pipe_type`);f1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),yo(e.description,`${t}.description`),yo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Ii(o)||vt(`${t}.io`,`expected an object, got ${wn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${wn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${wn(o.outputs)}`),o.inputs.forEach((i,a)=>S1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>S1(i,`${t}.io.outputs[${a}]`))}function YC(e,t){Ii(e)||vt(t,`expected an object, got ${wn(e)}`),yo(e.id,`${t}.id`),yo(e.source,`${t}.source`),yo(e.target,`${t}.target`),(typeof e.kind!="string"||!b1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...b1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Pc(e){return Ii(e)||vt("",`expected a GraphSpec object, got ${wn(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${wn(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${wn(e.edges)}`),Ii(e.meta)||vt("meta",`expected an object, got ${wn(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Ii(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${wn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Ii(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${wn(e.concept_registry)}`),e.nodes.forEach((t,n)=>VC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>YC(t,`edges[${n}]`)),e}function Bl(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),yo(e.pipe_code,`${t}.pipe_code`),e}var fe=ne(At(),1);var H=ne(pe()),P=ne(At());function ot(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=ot(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var ZC={value:()=>{}};function N1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Gc(n)}function Gc(e){this._=e}function jC(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Gc.prototype=N1.prototype={constructor:Gc,on:function(e,t){var n=this._,o=jC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=$C(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=T1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=T1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Gc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function $C(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function T1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=ZC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var va=N1;var Uc="http://www.w3.org/1999/xhtml",Pm={svg:"http://www.w3.org/2000/svg",xhtml:Uc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Wo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Pm.hasOwnProperty(t)?{space:Pm[t],local:e}:e}function FC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Uc&&t.documentElement.namespaceURI===Uc?t.createElement(e):t.createElementNS(n,e)}}function KC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ic(e){var t=Wo(e);return(t.local?KC:FC)(t)}function QC(){}function ba(e){return e==null?QC:function(){return this.querySelector(e)}}function C1(e){typeof e!="function"&&(e=ba(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new it(o,this._parents)}function km(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function WC(){return[]}function hs(e){return e==null?WC:function(){return this.querySelectorAll(e)}}function JC(e){return function(){return km(e.apply(this,arguments))}}function w1(e){typeof e=="function"?e=JC(e):e=hs(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new it(o,i)}function gs(e){return function(){return this.matches(e)}}function Vc(e){return function(t){return t.matches(e)}}var ew=Array.prototype.find;function tw(e){return function(){return ew.call(this.children,e)}}function nw(){return this.firstElementChild}function A1(e){return this.select(e==null?nw:tw(typeof e=="function"?e:Vc(e)))}var ow=Array.prototype.filter;function iw(){return Array.from(this.children)}function aw(e){return function(){return ow.call(this.children,e)}}function M1(e){return this.selectAll(e==null?iw:aw(typeof e=="function"?e:Vc(e)))}function D1(e){typeof e!="function"&&(e=gs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new it(o,this._parents)}function Yc(e){return new Array(e.length)}function R1(){return new it(this._enter||this._groups.map(Yc),this._parents)}function ys(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ys.prototype={constructor:ys,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function O1(e){return function(){return e}}function lw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new ys(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function rw(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new ys(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function sw(e){return e.__data__}function z1(e,t){if(!arguments.length)return Array.from(this,sw);var n=t?rw:lw,o=this._parents,i=this._groups;typeof e!="function"&&(e=O1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=uw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var g=0,m=0,y,x;g<v;++g)if(y=b[g]){for(g>=m&&(m=g+1);!(x=S[m])&&++m<v;);y._next=x||null}}return l=new it(l,o),l._enter=r,l._exit=s,l}function uw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L1(){return new it(this._exit||this._groups.map(Yc),this._parents)}function B1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function H1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new it(r,this._parents)}function P1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function k1(e){e||(e=cw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new it(i,this._parents).order()}function cw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function G1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U1(){return Array.from(this)}function I1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function V1(){let e=0;for(let t of this)++e;return e}function Y1(){return!this.node()}function X1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function fw(e){return function(){this.removeAttribute(e)}}function dw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pw(e,t){return function(){this.setAttribute(e,t)}}function mw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function hw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function gw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function q1(e,t){var n=Wo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?dw:fw:typeof t=="function"?n.local?gw:hw:n.local?mw:pw)(n,t))}function Xc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function yw(e){return function(){this.style.removeProperty(e)}}function vw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function bw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Z1(e,t,n){return arguments.length>1?this.each((t==null?yw:typeof t=="function"?bw:vw)(e,t,n??"")):Vi(this.node(),e)}function Vi(e,t){return e.style.getPropertyValue(t)||Xc(e).getComputedStyle(e,null).getPropertyValue(t)}function Sw(e){return function(){delete this[e]}}function xw(e,t){return function(){this[e]=t}}function _w(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function j1(e,t){return arguments.length>1?this.each((t==null?Sw:typeof t=="function"?_w:xw)(e,t)):this.node()[e]}function $1(e){return e.trim().split(/^|\s+/)}function Gm(e){return e.classList||new F1(e)}function F1(e){this._node=e,this._names=$1(e.getAttribute("class")||"")}F1.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function K1(e,t){for(var n=Gm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Q1(e,t){for(var n=Gm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Ew(e){return function(){K1(this,e)}}function Tw(e){return function(){Q1(this,e)}}function Nw(e,t){return function(){(t.apply(this,arguments)?K1:Q1)(this,e)}}function W1(e,t){var n=$1(e+"");if(arguments.length<2){for(var o=Gm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Nw:t?Ew:Tw)(n,t))}function Cw(){this.textContent=""}function ww(e){return function(){this.textContent=e}}function Aw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function J1(e){return arguments.length?this.each(e==null?Cw:(typeof e=="function"?Aw:ww)(e)):this.node().textContent}function Mw(){this.innerHTML=""}function Dw(e){return function(){this.innerHTML=e}}function Rw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function eS(e){return arguments.length?this.each(e==null?Mw:(typeof e=="function"?Rw:Dw)(e)):this.node().innerHTML}function Ow(){this.nextSibling&&this.parentNode.appendChild(this)}function tS(){return this.each(Ow)}function zw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function nS(){return this.each(zw)}function oS(e){var t=typeof e=="function"?e:Ic(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lw(){return null}function iS(e,t){var n=typeof e=="function"?e:Ic(e),o=t==null?Lw:typeof t=="function"?t:ba(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Bw(){var e=this.parentNode;e&&e.removeChild(this)}function aS(){return this.each(Bw)}function Hw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Pw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lS(e){return this.select(e?Pw:Hw)}function rS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kw(e){return function(t){e.call(this,t,this.__data__)}}function Gw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Uw(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function Iw(e,t,n){return function(){var o=this.__on,i,a=kw(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function sS(e,t,n){var o=Gw(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?Iw:Uw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function uS(e,t,n){var o=Xc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Vw(e,t){return function(){return uS(this,e,t)}}function Yw(e,t){return function(){return uS(this,e,t.apply(this,arguments))}}function cS(e,t){return this.each((typeof t=="function"?Yw:Vw)(e,t))}function*fS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Um=[null];function it(e,t){this._groups=e,this._parents=t}function dS(){return new it([[document.documentElement]],Um)}function Xw(){return this}it.prototype=dS.prototype={constructor:it,select:C1,selectAll:w1,selectChild:A1,selectChildren:M1,filter:D1,data:z1,enter:R1,exit:L1,join:B1,merge:H1,selection:Xw,order:P1,sort:k1,call:G1,nodes:U1,node:I1,size:V1,empty:Y1,each:X1,attr:q1,style:Z1,property:j1,classed:W1,text:J1,html:eS,raise:tS,lower:nS,append:oS,insert:iS,remove:aS,clone:lS,datum:rS,on:sS,dispatch:cS,[Symbol.iterator]:fS};var Jo=dS;function Ct(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Um)}function pS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=pS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var mS={passive:!1},Sa={capture:!0,passive:!1};function qc(e){e.stopImmediatePropagation()}function Yi(e){e.preventDefault(),e.stopImmediatePropagation()}function vs(e){var t=e.document.documentElement,n=Ct(e).on("dragstart.drag",Yi,Sa);"onselectstart"in t?n.on("selectstart.drag",Yi,Sa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function bs(e,t){var n=e.document.documentElement,o=Ct(e).on("dragstart.drag",null);t&&(o.on("click.drag",Yi,Sa),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ss=e=>()=>e;function xs(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}xs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function qw(e){return!e.ctrlKey&&!e.button}function Zw(){return this.parentNode}function jw(e,t){return t??{x:e.x,y:e.y}}function $w(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zc(){var e=qw,t=Zw,n=jw,o=$w,i={},a=va("start","drag","end"),l=0,r,s,u,c,d=0;function f(y){y.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,mS).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(y,x){if(!(c||!e.call(this,y,x))){var _=m(this,t.call(this,y,x),y,x,"mouse");_&&(Ct(y.view).on("mousemove.drag",v,Sa).on("mouseup.drag",b,Sa),vs(y.view),qc(y),u=!1,r=y.clientX,s=y.clientY,_("start",y))}}function v(y){if(Yi(y),!u){var x=y.clientX-r,_=y.clientY-s;u=x*x+_*_>d}i.mouse("drag",y)}function b(y){Ct(y.view).on("mousemove.drag mouseup.drag",null),bs(y.view,u),Yi(y),i.mouse("end",y)}function S(y,x){if(e.call(this,y,x)){var _=y.changedTouches,E=t.call(this,y,x),C=_.length,A,B;for(A=0;A<C;++A)(B=m(this,E,y,x,_[A].identifier,_[A]))&&(qc(y),B("start",y,_[A]))}}function p(y){var x=y.changedTouches,_=x.length,E,C;for(E=0;E<_;++E)(C=i[x[E].identifier])&&(Yi(y),C("drag",y,x[E]))}function g(y){var x=y.changedTouches,_=x.length,E,C;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(C=i[x[E].identifier])&&(qc(y),C("end",y,x[E]))}function m(y,x,_,E,C,A){var B=a.copy(),M=Xt(A||_,x),z,I,T;if((T=n.call(y,new xs("beforestart",{sourceEvent:_,target:f,identifier:C,active:l,x:M[0],y:M[1],dx:0,dy:0,dispatch:B}),E))!=null)return z=T.x-M[0]||0,I=T.y-M[1]||0,function D(N,O,R){var L=M,V;switch(N){case"start":i[C]=D,V=l++;break;case"end":delete i[C],--l;case"drag":M=Xt(R||O,x),V=l;break}B.call(N,y,new xs(N,{sourceEvent:O,subject:T,target:f,identifier:C,active:V,x:M[0]+z,y:M[1]+I,dx:M[0]-L[0],dy:M[1]-L[1],dispatch:B}),E)}}return f.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Ss(!!y),f):e},f.container=function(y){return arguments.length?(t=typeof y=="function"?y:Ss(y),f):t},f.subject=function(y){return arguments.length?(n=typeof y=="function"?y:Ss(y),f):n},f.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:Ss(!!y),f):o},f.on=function(){var y=a.on.apply(a,arguments);return y===a?f:y},f.clickDistance=function(y){return arguments.length?(d=(y=+y)*y,f):Math.sqrt(d)},f}function jc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Im(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ts(){}var _s=.7,Kc=1/_s,Hl="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fw=/^#([0-9a-f]{3,8})$/,Kw=new RegExp(`^rgb\\(${Hl},${Hl},${Hl}\\)$`),Qw=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),Ww=new RegExp(`^rgba\\(${Hl},${Hl},${Hl},${Es}\\)$`),Jw=new RegExp(`^rgba\\(${vo},${vo},${vo},${Es}\\)$`),eA=new RegExp(`^hsl\\(${Es},${vo},${vo}\\)$`),tA=new RegExp(`^hsla\\(${Es},${vo},${vo},${Es}\\)$`),hS={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};jc(Ts,io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gS,formatHex:gS,formatHex8:nA,formatHsl:oA,formatRgb:yS,toString:yS});function gS(){return this.rgb().formatHex()}function nA(){return this.rgb().formatHex8()}function oA(){return ES(this).formatHsl()}function yS(){return this.rgb().formatRgb()}function io(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vS(t):n===3?new cn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?$c(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?$c(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Kw.exec(e))?new cn(t[1],t[2],t[3],1):(t=Qw.exec(e))?new cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ww.exec(e))?$c(t[1],t[2],t[3],t[4]):(t=Jw.exec(e))?$c(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eA.exec(e))?xS(t[1],t[2]/100,t[3]/100,1):(t=tA.exec(e))?xS(t[1],t[2]/100,t[3]/100,t[4]):hS.hasOwnProperty(e)?vS(hS[e]):e==="transparent"?new cn(NaN,NaN,NaN,0):null}function vS(e){return new cn(e>>16&255,e>>8&255,e&255,1)}function $c(e,t,n,o){return o<=0&&(e=t=n=NaN),new cn(e,t,n,o)}function iA(e){return e instanceof Ts||(e=io(e)),e?(e=e.rgb(),new cn(e.r,e.g,e.b,e.opacity)):new cn}function Pl(e,t,n,o){return arguments.length===1?iA(e):new cn(e,t,n,o??1)}function cn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}jc(cn,Pl,Im(Ts,{brighter(e){return e=e==null?Kc:Math.pow(Kc,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_s:Math.pow(_s,e),new cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cn(_a(this.r),_a(this.g),_a(this.b),Qc(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:bS,formatHex:bS,formatHex8:aA,formatRgb:SS,toString:SS}));function bS(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}`}function aA(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}${xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function SS(){let e=Qc(this.opacity);return`${e===1?"rgb(":"rgba("}${_a(this.r)}, ${_a(this.g)}, ${_a(this.b)}${e===1?")":`, ${e})`}`}function Qc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _a(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xa(e){return e=_a(e),(e<16?"0":"")+e.toString(16)}function xS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oo(e,t,n,o)}function ES(e){if(e instanceof oo)return new oo(e.h,e.s,e.l,e.opacity);if(e instanceof Ts||(e=io(e)),!e)return new oo;if(e instanceof oo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new oo(l,r,s,e.opacity)}function TS(e,t,n,o){return arguments.length===1?ES(e):new oo(e,t,n,o??1)}function oo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}jc(oo,TS,Im(Ts,{brighter(e){return e=e==null?Kc:Math.pow(Kc,e),new oo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_s:Math.pow(_s,e),new oo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new cn(Vm(e>=240?e-240:e+120,i,o),Vm(e,i,o),Vm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new oo(_S(this.h),Fc(this.s),Fc(this.l),Qc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Qc(this.opacity);return`${e===1?"hsl(":"hsla("}${_S(this.h)}, ${Fc(this.s)*100}%, ${Fc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _S(e){return e=(e||0)%360,e<0?e+360:e}function Fc(e){return Math.max(0,Math.min(1,e||0))}function Vm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Ym(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function NS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Ym((n-o/t)*t,l,i,a,r)}}function CS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Ym((n-o/t)*t,i,a,l,r)}}var Ns=e=>()=>e;function lA(e,t){return function(n){return e+n*t}}function rA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function wS(e){return(e=+e)==1?Wc:function(t,n){return n-t?rA(t,n,e):Ns(isNaN(t)?n:t)}}function Wc(e,t){var n=t-e;return n?lA(e,n):Ns(isNaN(e)?t:e)}var Ea=(function e(t){var n=wS(t);function o(i,a){var l=n((i=Pl(i)).r,(a=Pl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Wc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function AS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=Pl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var sA=AS(NS),uA=AS(CS);function MS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function DS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function RS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=ei(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function OS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ei(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var qm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xm=new RegExp(qm.source,"g");function cA(e){return function(){return e}}function fA(e){return function(t){return e(t)+""}}function Cs(e,t){var n=qm.lastIndex=Xm.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=qm.exec(e))&&(i=Xm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:qt(o,i)})),n=Xm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?fA(s[0].x):cA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function ei(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ns(t):(n==="number"?qt:n==="string"?(o=io(t))?(t=o,Ea):Cs:t instanceof io?Ea:t instanceof Date?OS:DS(t)?MS:Array.isArray(t)?RS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?zS:qt)(e,t)}var LS=180/Math.PI,Jc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*LS,skewX:Math.atan(s)*LS,scaleX:l,scaleY:r}}var ef;function BS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jc:Zm(t.a,t.b,t.c,t.d,t.e,t.f)}function HS(e){return e==null?Jc:(ef||(ef=document.createElementNS("http://www.w3.org/2000/svg","g")),ef.setAttribute("transform",e),(e=ef.transform.baseVal.consolidate())?(e=e.matrix,Zm(e.a,e.b,e.c,e.d,e.e,e.f)):Jc)}function PS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:qt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:qt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var jm=PS(BS,"px, ","px)","deg)"),$m=PS(HS,", ",")",")");var dA=1e-12;function kS(e){return((e=Math.exp(e))+1/e)/2}function pA(e){return((e=Math.exp(e))-1/e)/2}function mA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Ta=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,v=d-s,b=h*h+v*v,S,p;if(b<dA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var g=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*g),y=(f*f-u*u-o*b)/(2*f*n*g),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(y*y+1)-y);p=(_-x)/t,S=function(E){var C=E*p,A=kS(x),B=u/(n*g)*(A*mA(t*C+x)-pA(x));return[r+B*h,s+B*v,u*A/kS(t*C+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var kl=0,As=0,ws=0,US=1e3,tf,Ms,nf=0,Na=0,of=0,Ds=typeof performance=="object"&&performance.now?performance:Date,IS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Os(){return Na||(IS(hA),Na=Ds.now()+of)}function hA(){Na=0}function Rs(){this._call=this._time=this._next=null}Rs.prototype=af.prototype={constructor:Rs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Os():+n)+(t==null?0:+t),!this._next&&Ms!==this&&(Ms?Ms._next=this:tf=this,Ms=this),this._call=e,this._time=n,Fm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fm())}};function af(e,t,n){var o=new Rs;return o.restart(e,t,n),o}function VS(){Os(),++kl;for(var e=tf,t;e;)(t=Na-e._time)>=0&&e._call.call(void 0,t),e=e._next;--kl}function GS(){Na=(nf=Ds.now())+of,kl=As=0;try{VS()}finally{kl=0,yA(),Na=0}}function gA(){var e=Ds.now(),t=e-nf;t>US&&(of-=t,nf=e)}function yA(){for(var e,t=tf,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:tf=n);Ms=e,Fm(o)}function Fm(e){if(!kl){As&&(As=clearTimeout(As));var t=e-Na;t>24?(e<1/0&&(As=setTimeout(GS,e-Ds.now()-of)),ws&&(ws=clearInterval(ws))):(ws||(nf=Ds.now(),ws=setInterval(gA,US)),kl=1,IS(GS))}}function lf(e,t,n){var o=new Rs;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var vA=va("start","end","cancel","interrupt"),bA=[],qS=0,YS=1,sf=2,rf=3,XS=4,uf=5,zs=6;function Xi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;SA(e,n,{name:t,index:o,group:i,on:vA,tween:bA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:qS})}function Ls(e,t){var n=bt(e,t);if(n.state>qS)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=bt(e,t);if(n.state>rf)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function SA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=af(a,0,n.time);function a(u){n.state=YS,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==YS)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===rf)return lf(l);h.state===XS?(h.state=zs,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=zs,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(lf(function(){n.state===rf&&(n.state=XS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=sf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sf){for(n.state=rf,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=uf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===uf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=zs,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Ca(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>sf&&o.state<uf,o.state=zs,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function ZS(e){return this.each(function(){Ca(this,e)})}function xA(e,t){var n,o;return function(){var i=Lt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function _A(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Lt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function jS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?xA:_A)(n,e,t))}function Gl(e,t,n){var o=e._id;return e.each(function(){var i=Lt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function cf(e,t){var n;return(typeof t=="number"?qt:t instanceof io?Ea:(n=io(t))?(t=n,Ea):Cs)(e,t)}function EA(e){return function(){this.removeAttribute(e)}}function TA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function NA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function CA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function wA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function AA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function $S(e,t){var n=Wo(e),o=n==="transform"?$m:cf;return this.attrTween(e,typeof t=="function"?(n.local?AA:wA)(n,o,Gl(this,"attr."+e,t)):t==null?(n.local?TA:EA)(n):(n.local?CA:NA)(n,o,t))}function MA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function DA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function RA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&DA(e,a)),n}return i._value=t,i}function OA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&MA(e,a)),n}return i._value=t,i}function FS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Wo(e);return this.tween(n,(o.local?RA:OA)(o,t))}function zA(e,t){return function(){Ls(this,e).delay=+t.apply(this,arguments)}}function LA(e,t){return t=+t,function(){Ls(this,e).delay=t}}function KS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zA:LA)(t,e)):bt(this.node(),t).delay}function BA(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){Lt(this,e).duration=t}}function QS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?BA:HA)(t,e)):bt(this.node(),t).duration}function PA(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function WS(e){var t=this._id;return arguments.length?this.each(PA(t,e)):bt(this.node(),t).ease}function kA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function JS(e){if(typeof e!="function")throw new Error;return this.each(kA(this._id,e))}function ex(e){typeof e!="function"&&(e=gs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new Zt(o,this._parents,this._name,this._id)}function tx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new Zt(l,this._parents,this._name,this._id)}function GA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function UA(e,t,n){var o,i,a=GA(t)?Ls:Lt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function nx(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(UA(n,e,t))}function IA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ox(){return this.on("end.remove",IA(this._id))}function ix(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ba(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Xi(u[f],t,n,f,u,bt(c,n)));return new Zt(a,this._parents,t,n)}function ax(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hs(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Xi(h,t,n,b,f,v);a.push(f),l.push(c)}return new Zt(a,l,t,n)}var VA=Jo.prototype.constructor;function lx(){return new VA(this._groups,this._parents)}function YA(e,t){var n,o,i;return function(){var a=Vi(this,e),l=(this.style.removeProperty(e),Vi(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function rx(e){return function(){this.style.removeProperty(e)}}function XA(e,t,n){var o,i=n+"",a;return function(){var l=Vi(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function qA(e,t,n){var o,i,a;return function(){var l=Vi(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Vi(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function ZA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=Lt(this,e),u=s.on,c=s.value[a]==null?r||(r=rx(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function sx(e,t,n){var o=(e+="")=="transform"?jm:cf;return t==null?this.styleTween(e,YA(e,o)).on("end.style."+e,rx(e)):typeof t=="function"?this.styleTween(e,qA(e,o,Gl(this,"style."+e,t))).each(ZA(this._id,e)):this.styleTween(e,XA(e,o,t),n).on("end.style."+e,null)}function jA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function $A(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&jA(e,l,n)),o}return a._value=t,a}function ux(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,$A(e,t,n??""))}function FA(e){return function(){this.textContent=e}}function KA(e){return function(){var t=e(this);this.textContent=t??""}}function cx(e){return this.tween("text",typeof e=="function"?KA(Gl(this,"text",e)):FA(e==null?"":e+""))}function QA(e){return function(t){this.textContent=e.call(this,t)}}function WA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&QA(i)),t}return o._value=e,o}function fx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,WA(e))}function dx(){for(var e=this._name,t=this._id,n=ff(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=bt(s,t);Xi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function px(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=Lt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var JA=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function mx(e){return Jo().transition(e)}function ff(){return++JA}var ti=Jo.prototype;Zt.prototype=mx.prototype={constructor:Zt,select:ix,selectAll:ax,selectChild:ti.selectChild,selectChildren:ti.selectChildren,filter:ex,merge:tx,selection:lx,transition:dx,call:ti.call,nodes:ti.nodes,node:ti.node,size:ti.size,empty:ti.empty,each:ti.each,on:nx,attr:$S,attrTween:FS,style:sx,styleTween:ux,text:cx,textTween:fx,remove:ox,tween:jS,delay:KS,duration:QS,ease:WS,easeVarying:JS,end:px,[Symbol.iterator]:ti[Symbol.iterator]};function df(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var eM={time:null,delay:0,duration:250,ease:df};function tM(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function hx(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=ff(),(n=eM).time=Os(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Xi(s,e,t,u,l,n||tM(s,t));return new Zt(o,this._parents,e,t)}Jo.prototype.interrupt=ZS;Jo.prototype.transition=hx;var Bs=e=>()=>e;function Km(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function ao(e,t,n){this.k=e,this.x=t,this.y=n}ao.prototype={constructor:ao,scale:function(e){return e===1?this:new ao(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ao(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wa=new ao(1,0,0);Hs.prototype=ao.prototype;function Hs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return wa;return e.__zoom}function pf(e){e.stopImmediatePropagation()}function Ul(e){e.preventDefault(),e.stopImmediatePropagation()}function nM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function oM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function gx(){return this.__zoom||wa}function iM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function aM(){return navigator.maxTouchPoints||"ontouchstart"in this}function lM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function mf(){var e=nM,t=oM,n=lM,o=iM,i=aM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Ta,u=va("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",gx).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,D,N,O){var R=T.selection?T.selection():T;R.property("__zoom",gx),T!==R?x(T,D,N,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},p.scaleBy=function(T,D,N,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof D=="function"?D.apply(this,arguments):D;return R*L},N,O)},p.scaleTo=function(T,D,N,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=N==null?y(R):typeof N=="function"?N.apply(this,arguments):N,k=L.invert(V),G=typeof D=="function"?D.apply(this,arguments):D;return n(m(g(L,G),V,k),R,l)},N,O)},p.translateBy=function(T,D,N,O){p.transform(T,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof N=="function"?N.apply(this,arguments):N),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,D,N,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,k=O==null?y(L):typeof O=="function"?O.apply(this,arguments):O;return n(wa.translate(k[0],k[1]).scale(V.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof N=="function"?-N.apply(this,arguments):-N),L,l)},O,R)};function g(T,D){return D=Math.max(a[0],Math.min(a[1],D)),D===T.k?T:new ao(D,T.x,T.y)}function m(T,D,N){var O=D[0]-N[0]*T.k,R=D[1]-N[1]*T.k;return O===T.x&&R===T.y?T:new ao(T.k,O,R)}function y(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,D,N,O){T.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,L=arguments,V=_(R,L).event(O),k=t.apply(R,L),G=N==null?y(k):typeof N=="function"?N.apply(R,L):N,q=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),Z=R.__zoom,j=typeof D=="function"?D.apply(R,L):D,se=s(Z.invert(G).concat(q/Z.k),j.invert(G).concat(q/j.k));return function(ee){if(ee===1)ee=j;else{var X=se(ee),Q=q/X[2];ee=new ao(Q,G[0]-X[0]*Q,G[1]-X[1]*Q)}V.zoom(null,ee)}})}function _(T,D,N){return!N&&T.__zooming||new E(T,D)}function E(T,D){this.that=T,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,D),this.taps=0}E.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,D){return this.mouse&&T!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var D=Ct(this.that).datum();u.call(T,this.that,new Km(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),D)}};function C(T,...D){if(!e.apply(this,arguments))return;var N=_(this,D).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(N.wheel)(N.mouse[0][0]!==L[0]||N.mouse[0][1]!==L[1])&&(N.mouse[1]=O.invert(N.mouse[0]=L)),clearTimeout(N.wheel);else{if(O.k===R)return;N.mouse=[L,O.invert(L)],Ca(this),N.start()}Ul(T),N.wheel=setTimeout(V,v),N.zoom("mouse",n(m(g(O,R),N.mouse[0],N.mouse[1]),N.extent,l));function V(){N.wheel=null,N.end()}}function A(T,...D){if(f||!e.apply(this,arguments))return;var N=T.currentTarget,O=_(this,D,!0).event(T),R=Ct(T.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",q,!0),L=Xt(T,N),V=T.clientX,k=T.clientY;vs(T.view),pf(T),O.mouse=[L,this.__zoom.invert(L)],Ca(this),O.start();function G(Z){if(Ul(Z),!O.moved){var j=Z.clientX-V,se=Z.clientY-k;O.moved=j*j+se*se>b}O.event(Z).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=Xt(Z,N),O.mouse[1]),O.extent,l))}function q(Z){R.on("mousemove.zoom mouseup.zoom",null),bs(Z.view,O.moved),Ul(Z),O.event(Z).end()}}function B(T,...D){if(e.apply(this,arguments)){var N=this.__zoom,O=Xt(T.changedTouches?T.changedTouches[0]:T,this),R=N.invert(O),L=N.k*(T.shiftKey?.5:2),V=n(m(g(N,L),O,R),t.apply(this,D),l);Ul(T),r>0?Ct(this).transition().duration(r).call(x,V,O,T):Ct(this).call(p.transform,V,O,T)}}function M(T,...D){if(e.apply(this,arguments)){var N=T.touches,O=N.length,R=_(this,D,T.changedTouches.length===O).event(T),L,V,k,G;for(pf(T),V=0;V<O;++V)k=N[V],G=Xt(k,this),G=[G,this.__zoom.invert(G),k.identifier],R.touch0?!R.touch1&&R.touch0[2]!==G[2]&&(R.touch1=G,R.taps=0):(R.touch0=G,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=G[0],c=setTimeout(function(){c=null},h)),Ca(this),R.start())}}function z(T,...D){if(this.__zooming){var N=_(this,D).event(T),O=T.changedTouches,R=O.length,L,V,k,G;for(Ul(T),L=0;L<R;++L)V=O[L],k=Xt(V,this),N.touch0&&N.touch0[2]===V.identifier?N.touch0[0]=k:N.touch1&&N.touch1[2]===V.identifier&&(N.touch1[0]=k);if(V=N.that.__zoom,N.touch1){var q=N.touch0[0],Z=N.touch0[1],j=N.touch1[0],se=N.touch1[1],ee=(ee=j[0]-q[0])*ee+(ee=j[1]-q[1])*ee,X=(X=se[0]-Z[0])*X+(X=se[1]-Z[1])*X;V=g(V,Math.sqrt(ee/X)),k=[(q[0]+j[0])/2,(q[1]+j[1])/2],G=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(N.touch0)k=N.touch0[0],G=N.touch0[1];else return;N.zoom("touch",n(m(V,k,G),N.extent,l))}}function I(T,...D){if(this.__zooming){var N=_(this,D).event(T),O=T.changedTouches,R=O.length,L,V;for(pf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],N.touch0&&N.touch0[2]===V.identifier?delete N.touch0:N.touch1&&N.touch1[2]===V.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&&(V=Xt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var k=Ct(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Bs(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Bs(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Bs(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Bs([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var An={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Zl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],th=["Enter"," ","Escape"],nh={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},ji;(function(e){e.Strict="strict",e.Loose="loose"})(ji||(ji={}));var ni;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ni||(ni={}));var Aa;(function(e){e.Partial="partial",e.Full="full"})(Aa||(Aa={}));var oh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},bo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(bo||(bo={}));var Yl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Yl||(Yl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var yx={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function ih(e){return e===null?null:e?"valid":"invalid"}var ah=e=>"id"in e&&"source"in e&&"target"in e,Dx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),lh=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Gs=(e,t=[0,0])=>{let{width:n,height:o}=So(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},rh=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):lh(i)?i:t.nodeLookup.get(i.id));let r=l?yf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Sf(n)},jl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=bf(n,yf(i)),o=!0)}),o?Sf(n):{x:0,y:0,width:0,height:0}},vf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Kl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=$l(r,Da(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},Rx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function rM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Ox({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=rM(e,l),s=jl(r),u=Us(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function sh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",An.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&ql(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=ql(d)?Ma(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",An.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function zx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=Rx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var Xl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ma=(e={x:0,y:0},t,n)=>({x:Xl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Xl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Lx(e,t,n){let{width:o,height:i}=So(n),{x:a,y:l}=n.internals.positionAbsolute;return Ma(e,[[a,l],[a+o,l+i]],t)}var vx=(e,t,n)=>e<t?Xl(Math.abs(e-t),1,t)/t:e>n?-Xl(Math.abs(e-n),1,t)/t:0,Bx=(e,t,n=15,o=40)=>{let i=vx(e.x,o,t.width-o)*n,a=vx(e.y,o,t.height-o)*n;return[i,a]},bf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),eh=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Sf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Da=(e,t=[0,0])=>{let{x:n,y:o}=lh(e)?e.internals.positionAbsolute:Gs(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},yf=(e,t=[0,0])=>{let{x:n,y:o}=lh(e)?e.internals.positionAbsolute:Gs(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},uh=(e,t)=>Sf(bf(eh(e),eh(t))),$l=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},ch=e=>qn(e.width)&&qn(e.height)&&qn(e.x)&&qn(e.y),qn=e=>!isNaN(e)&&isFinite(e),fh=(e,t)=>{},Fl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Kl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Fl(r,l):r},ks=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Il(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function sM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Il(e,n),i=Il(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Il(e.top??e.y??0,n),i=Il(e.bottom??e.y??0,n),a=Il(e.left??e.x??0,t),l=Il(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function uM(e,t,n,o,i,a){let{x:l,y:r}=ks(e,[t,n,o]),{x:s,y:u}=ks({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Us=(e,t,n,o,i,a)=>{let l=sM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=Xl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=uM(e,h,v,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:v-S.top+S.bottom,zoom:c}},Ql=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function ql(e){return e!=null&&e!=="parent"}function So(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function dh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function ph(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function mh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Hx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Px(e){return{...nh,...e||{}}}function Ps(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=Zn(e),r=Kl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Fl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var xf=e=>({width:e.offsetWidth,height:e.offsetHeight}),hh=e=>e?.getRootNode?.()||window?.document,cM=["INPUT","SELECT","TEXTAREA"];function gh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:cM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var yh=e=>"clientX"in e,Zn=(e,t)=>{let n=yh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},bx=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...xf(l)}})};function _f({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function hf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Sx({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-hf(t-o,a),n];case W.Right:return[t+hf(o-t,a),n];case W.Top:return[t,n-hf(n-i,a)];case W.Bottom:return[t,n+hf(i-n,a)]}}function Ef({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=Sx({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=Sx({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=_f({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,v]}function vh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function kx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function Gx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=bf(yf(e),yf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return $l(l,Sf(a))>0}var fM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,dM=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),bh=(e,t,n={})=>{if(!e.source||!e.target)return fh("006",An.error006()),t;let o=n.getEdgeId||fM,i;return ah(e)?i={...e}:i={...e,id:o(e)},dM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Tf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=vh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var xx={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},pM=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},_x=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function mM({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=xx[t],s=xx[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=pM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},g={x:0,y:0},[,,m,y]=vh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let I=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*I:g[f]=(c[f]>n[f]?-1:1)*I}}if(t!==o){let z=f==="x"?"y":"x",I=r[f]===s[z],T=u[z]>c[z],D=u[z]<c[z];(r[f]===1&&(!I&&T||I&&D)||r[f]!==1&&(!I&&D||I&&T))&&(v=f==="x"?_:E)}let C={x:u.x+p.x,y:u.y+p.y},A={x:c.x+g.x,y:c.y+g.y},B=Math.max(Math.abs(C.x-v[0].x),Math.abs(A.x-v[0].x)),M=Math.max(Math.abs(C.y-v[0].y),Math.abs(A.y-v[0].y));B>=M?(b=(C.x+A.x)/2,S=v[0].y):(b=v[0].x,S=(C.y+A.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+g.x,y:c.y+g.y},n],b,S,m,y]}function hM(e,t,n,o){let i=Math.min(_x(e,t)/2,_x(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function Is({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,v,b]=mM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,g,m)=>{let y="";return m>0&&m<d.length-1?y=hM(d[m-1],g,d[m+1],l):y=`${m===0?"M":"L"}${g.x} ${g.y}`,p+=y,p},""),f,h,v,b]}function Ex(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ux(e){let{sourceNode:t,targetNode:n}=e;if(!Ex(t)||!Ex(n))return null;let o=t.internals.handleBounds||Tx(t.handles),i=n.internals.handleBounds||Tx(n.handles),a=Nx(o?.source??[],e.sourceHandle),l=Nx(e.connectionMode===ji.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",An.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=$i(t,a,r),c=$i(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Tx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function $i(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??So(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function Nx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Nf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Ix(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=Nf(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var Vx=1e3,gM=10,Sh={nodeOrigin:[0,0],nodeExtent:Zl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},yM={...Sh,checkEquality:!0};function xh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Yx(e,t,n){let o=xh(Sh,n);for(let i of e.values())if(i.parentId)Eh(i,e,t,o);else{let a=Gs(i,o.nodeOrigin),l=ql(i.extent)?i.extent:o.nodeExtent,r=Ma(a,l,So(i));i.internals.positionAbsolute=r}}function vM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function _h(e){return e==="manual"}function Cf(e,t,n,o={}){let i=xh(yM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!_h(i.zIndexMode)?Vx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=Gs(u,i.nodeOrigin),f=ql(u.extent)?u.extent:i.nodeExtent,h=Ma(d,f,So(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:vM(u,c),z:Xx(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&Eh(c,t,n,o,a)}return s}function bM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Eh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=xh(Sh,o),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}bM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*gM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!_h(s)?Vx:0,{x:f,y:h,z:v}=SM(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Xx(e,t,n){let o=qn(e.zIndex)?e.zIndex:0;return _h(n)?o:o+(e.selected?t:0)}function SM(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=So(e),u=Gs(e,n),c=ql(e.extent)?Ma(u,e.extent,s):u,d=Ma({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Lx(d,s,t));let f=Xx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function wf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??Da(r),u=uh(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=So(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(g=>{e.some(m=>m.id===g.id)||i.push({id:g.id,type:"position",position:{x:g.position.x+f,y:g.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function qx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=xf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let g=h.nodeElement.getBoundingClientRect(),m=ql(v.extent)?v.extent:a,{positionAbsolute:y}=v.internals;v.parentId&&v.extent==="parent"?y=Lx(y,b,t.get(v.parentId)):m&&(y=Ma(y,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:y,handleBounds:{source:bx("source",h.nodeElement,g,d,v.id),target:bx("target",h.nodeElement,g,d,v.id)}}};t.set(v.id,x),v.parentId&&Eh(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Da(x,i)}))}}if(f.length>0){let h=wf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function Zx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function Cx(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function Th(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;Cx("source",s,c,e,i,l),Cx("target",s,u,e,a,r),t.set(o.id,o)}}function jx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:jx(n,t):!1}function wx(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function xM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!jx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Qm({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function _M({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=Fl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function $x({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,v=!1,b=null;function S({noDragClassName:g,handleSelector:m,domNode:y,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Ct(y);function C({x:z,y:I}){let{nodeLookup:T,nodeExtent:D,snapGrid:N,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:k,updateNodePositions:G}=t();a={x:z,y:I};let q=!1,Z=r.size>1,j=Z&&D?eh(jl(r)):null,se=Z&&O?_M({dragItems:r,snapGrid:N,x:z,y:I}):null;for(let[ee,X]of r){if(!T.has(ee))continue;let Q={x:z-X.distance.x,y:I-X.distance.y};O&&(Q=se?{x:Math.round(Q.x+se.x),y:Math.round(Q.y+se.y)}:Fl(Q,N));let ue=null;if(Z&&D&&!X.extent&&j){let{positionAbsolute:te}=X.internals,Te=te.x-j.x+D[0][0],de=te.x+X.measured.width-j.x2+D[1][0],be=te.y-j.y+D[0][1],Le=te.y+X.measured.height-j.y2+D[1][1];ue=[[Te,be],[de,Le]]}let{position:ge,positionAbsolute:ie}=sh({nodeId:ee,nextPosition:Q,nodeLookup:T,nodeExtent:ue||D,nodeOrigin:R,onError:k});q=q||X.position.x!==ge.x||X.position.y!==ge.y,X.position=ge,X.internals.positionAbsolute=ie}if(v=v||q,!!q&&(G(r,!0),b&&(o||L||!_&&V))){let[ee,X]=Qm({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,ee,X),L?.(b,ee,X),_||V?.(b,X)}}async function A(){if(!c)return;let{transform:z,panBy:I,autoPanSpeed:T,autoPanOnNodeDrag:D}=t();if(!D){s=!1,cancelAnimationFrame(l);return}let[N,O]=Bx(u,c,T);(N!==0||O!==0)&&(a.x=(a.x??0)-N/z[2],a.y=(a.y??0)-O/z[2],await I({x:N,y:O})&&C(a)),l=requestAnimationFrame(A)}function B(z){let{nodeLookup:I,multiSelectionActive:T,nodesDraggable:D,transform:N,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:k,unselectNodesAndEdges:G}=t();d=!0,(!L||!x)&&!T&&_&&(I.get(_)?.selected||G()),x&&L&&_&&e?.(_);let q=Ps(z.sourceEvent,{transform:N,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=xM(I,D,q,_),r.size>0&&(n||V||!_&&k)){let[Z,j]=Qm({nodeId:_,dragItems:r,nodeLookup:I});n?.(z.sourceEvent,r,Z,j),V?.(z.sourceEvent,Z,j),_||k?.(z.sourceEvent,j)}}let M=Zc().clickDistance(E).on("start",z=>{let{domNode:I,nodeDragThreshold:T,transform:D,snapGrid:N,snapToGrid:O}=t();c=I?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&B(z),a=Ps(z.sourceEvent,{transform:D,snapGrid:N,snapToGrid:O,containerBounds:c}),u=Zn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:I,transform:T,snapGrid:D,snapToGrid:N,nodeDragThreshold:O,nodeLookup:R}=t(),L=Ps(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:N,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&I&&d&&(s=!0,A()),!d){let V=Zn(z.sourceEvent,c),k=V.x-u.x,G=V.y-u.y;Math.sqrt(k*k+G*G)>O&&B(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=Zn(z.sourceEvent,c),C(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:I,updateNodePositions:T,onNodeDragStop:D,onSelectionDragStop:N}=t();if(v&&(T(r,!1),v=!1),i||D||!_&&N){let[O,R]=Qm({nodeId:_,dragItems:r,nodeLookup:I,dragging:!1});i?.(z.sourceEvent,r,O,R),D?.(z.sourceEvent,O,R),_||N?.(z.sourceEvent,R)}}}).filter(z=>{let I=z.target;return!z.button&&(!g||!wx(I,`.${g}`,y))&&(!m||wx(I,m,y))});f.call(M)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function EM(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())$l(i,Da(a))>0&&o.push(a);return o}var TM=250;function NM(e,t,n,o){let i=[],a=1/0,l=EM(e,n,t+TM);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=$i(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function Fx(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...$i(l,s,s.position,!0)}:s}function Kx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function CM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Qx=()=>!0;function wM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:v,onConnect:b,onConnectEnd:S,isValidConnection:p=Qx,onReconnectEnd:g,updateConnection:m,getTransform:y,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:C}){let A=hh(e.target),B=0,M,{x:z,y:I}=Zn(e),T=Kx(a,C),D=r?.getBoundingClientRect(),N=!1;if(!D||!T)return;let O=Fx(i,T,o,s,t);if(!O)return;let R=Zn(e,D),L=!1,V=null,k=!1,G=null;function q(){if(!c||!D)return;let[ge,ie]=Bx(R,D,_);f({x:ge,y:ie}),B=requestAnimationFrame(q)}let Z={...O,nodeId:i,type:T,position:O.position},j=s.get(i),ee={inProgress:!0,isValid:null,from:$i(j,Z,W.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:R,toHandle:null,toPosition:yx[Z.position],toNode:null,pointer:R};function X(){N=!0,m(ee),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(ge){if(!N){let{x:Le,y:Be}=Zn(ge),dt=Le-z,Gt=Be-I;if(!(dt*dt+Gt*Gt>E*E))return;X()}if(!x()||!Z){ue(ge);return}let ie=y();R=Zn(ge,D),M=NM(Kl(R,ie,!1,[1,1]),n,s,Z),L||(q(),L=!0);let te=Wx(ge,{handle:M,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:A,lib:u,flowId:d,nodeLookup:s});G=te.handleDomNode,V=te.connection,k=CM(!!M,te.isValid);let Te=s.get(i),de=Te?$i(Te,Z,W.Left,!0):ee.from,be={...ee,from:de,isValid:k,to:te.toHandle&&k?ks({x:te.toHandle.x,y:te.toHandle.y},ie):R,toHandle:te.toHandle,toPosition:k&&te.toHandle?te.toHandle.position:yx[Z.position],toNode:te.toHandle?s.get(te.toHandle.nodeId):null,pointer:R};m(be),ee=be}function ue(ge){if(!("touches"in ge&&ge.touches.length>0)){if(N){(M||G)&&V&&k&&b?.(V);let{inProgress:ie,...te}=ee,Te={...te,toPosition:ee.toHandle?ee.toPosition:null};S?.(ge,Te),a&&g?.(ge,Te)}h(),cancelAnimationFrame(B),L=!1,k=!1,V=null,G=null,A.removeEventListener("mousemove",Q),A.removeEventListener("mouseup",ue),A.removeEventListener("touchmove",Q),A.removeEventListener("touchend",ue)}}A.addEventListener("mousemove",Q),A.addEventListener("mouseup",ue),A.addEventListener("touchmove",Q),A.addEventListener("touchend",ue)}function Wx(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=Qx,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:v}=Zn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let g=Kx(void 0,S),m=S.getAttribute("data-nodeid"),y=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!g)return p;let E={source:d?m:o,sourceHandle:d?y:i,target:d?o:m,targetHandle:d?i:y};p.connection=E;let A=x&&_&&(n===ji.Strict?d&&g==="source"||!d&&g==="target":m!==o||y!==i);p.isValid=A&&u(E),p.toHandle=Fx(m,g,y,c,n,!0)}return p}var Af={onPointerDown:wM,isValid:Wx};function Jx({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Ct(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let y=n(),x=m.sourceEvent.ctrlKey&&Ql()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=y[2]*Math.pow(2,_*x);t.scaleTo(E)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let y=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(y[2],Math.log(y[2]))*(h?-1:1),C={x:y[0]-_[0]*E,y:y[1]-_[1]*E},A=[[0,0],[s,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:y[2]},A,r)},g=mf().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(g,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:Xt}}var Mf=e=>({x:e.x,y:e.y,zoom:e.k}),Wm=({x:e,y:t,zoom:n})=>wa.translate(e,t).scale(n),Vl=(e,t)=>e.target.closest(`.${t}`),e_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),AM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Jm=(e,t=0,n=AM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},t_=e=>{let t=e.ctrlKey&&Ql()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function MM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Vl(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=Xt(c),p=t_(c),g=d*Math.pow(2,p);o.scaleTo(n,g,S,c);return}let f=c.deltaMode===1?20:1,h=i===ni.Vertical?0:c.deltaX*f,v=i===ni.Horizontal?0:c.deltaY*f;!Ql()&&c.shiftKey&&i!==ni.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Mf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function DM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Vl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function RM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Mf(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function OM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&e_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Mf(a.transform))}}function zM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&e_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Mf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function LM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Vl(d,`${u}-flow__node`)||Vl(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Vl(d,r)&&v||Vl(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function n_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=mf().scaleExtent([t,n]).translateExtent(o),f=Ct(e).call(d);g({x:i.x,y:i.y,zoom:Xl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(t_);function b(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).transform(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function S({noWheelClassName:M,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:T,panOnScroll:D,panOnDrag:N,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:k,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Z,onTransformChange:j,connectionInProgress:se,paneClickDistance:ee,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=D&&!q&&!T;d.clickDistance(X?1/0:!qn(ee)||ee<0?0:ee);let ue=Q?MM({zoomPanValues:u,noWheelClassName:M,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):DM({noWheelClassName:M,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ue,{passive:!1}),!T){let ie=RM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ie);let te=OM({zoomPanValues:u,panOnDrag:N,onPaneContextMenu:!!I,onPanZoom:a,onTransformChange:j});d.on("zoom",te);let Te=zM({zoomPanValues:u,panOnDrag:N,panOnScroll:D,onPaneContextMenu:I,onPanZoomEnd:r,onDraggingChange:s});d.on("end",Te)}let ge=LM({zoomActivationKeyPressed:q,panOnDrag:N,zoomOnScroll:k,panOnScroll:D,zoomOnDoubleClick:G,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:M,lib:Z,connectionInProgress:se});d.filter(ge),G?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function g(M,z,I){let T=Wm(M),D=d?.constrain()(T,z,I);return D&&await b(D),new Promise(N=>N(D))}async function m(M,z){let I=Wm(M);return await b(I,z),new Promise(T=>T(I))}function y(M){if(f){let z=Wm(M),I=f.property("__zoom");(I.k!==M.zoom||I.x!==M.x||I.y!==M.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let M=f?Hs(f.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function _(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).scaleTo(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function E(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?ei:Ta).scaleBy(Jm(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function C(M){d?.scaleExtent(M)}function A(M){d?.translateExtent(M)}function B(M){let z=!qn(M)||M<0?0:M;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:g,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:C,setTranslateExtent:A,syncViewport:y,setClickDistance:B}}var Fi;(function(e){e.Line="line",e.Handle="handle"})(Fi||(Fi={}));function BM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function Ax(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function qi(e,t){return Math.max(0,t-e)}function Zi(e,t){return Math.max(0,e-t)}function gf(e,t,n){return Math.max(0,t-e,e-n)}function Mx(e,t){return e?!t:t}function HM(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:g}=o,{x:m,y,width:x,height:_,aspectRatio:E}=e,C=Math.floor(c?h-e.pointerX:0),A=Math.floor(d?v-e.pointerY:0),B=x+(s?-C:C),M=_+(u?-A:A),z=-a[0]*x,I=-a[1]*_,T=gf(B,b,S),D=gf(M,p,g);if(l){let R=0,L=0;s&&C<0?R=qi(m+C+z,l[0][0]):!s&&C>0&&(R=Zi(m+B+z,l[1][0])),u&&A<0?L=qi(y+A+I,l[0][1]):!u&&A>0&&(L=Zi(y+M+I,l[1][1])),T=Math.max(T,R),D=Math.max(D,L)}if(r){let R=0,L=0;s&&C>0?R=Zi(m+C,r[0][0]):!s&&C<0&&(R=qi(m+B,r[1][0])),u&&A>0?L=Zi(y+A,r[0][1]):!u&&A<0&&(L=qi(y+M,r[1][1])),T=Math.max(T,R),D=Math.max(D,L)}if(i){if(c){let R=gf(B/E,p,g)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=Zi(y+I+B/E,l[1][1])*E:L=qi(y+I+(s?C:-C)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=qi(y+B/E,r[1][1])*E:L=Zi(y+(s?C:-C)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=gf(M*E,b,S)/E;if(D=Math.max(D,R),l){let L=0;!s&&!u||u&&!s&&f?L=Zi(m+M*E+z,l[1][0])/E:L=qi(m+(u?A:-A)*E+z,l[0][0])/E,D=Math.max(D,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=qi(m+M*E,r[1][0])/E:L=Zi(m+(u?A:-A)*E,r[0][0])/E,D=Math.max(D,L)}}}A=A+(A<0?D:-D),C=C+(C<0?T:-T),i&&(f?B>M*E?A=(Mx(s,u)?-C:C)/E:C=(Mx(s,u)?-A:A)*E:c?(A=C/E,u=s):(C=A*E,s=u));let N=s?m+C:m,O=u?y+A:y;return{width:x+(s?-C:C),height:_+(u?-A:A),x:a[0]*C*(s?-1:1)+N,y:a[1]*A*(u?-1:1)+O}}var o_={width:0,height:0,x:0,y:0},PM={...o_,pointerX:0,pointerY:0,aspectRatio:1};function kM(e){return[[0,0],[e.measured.width,e.measured.height]]}function GM(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function i_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Ct(e),l={controlDirection:Ax("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:S}){let p={...o_},g={...PM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Ax(u)};let m,y=null,x=[],_,E,C,A=!1,B=Zc().on("start",M=>{let{nodeLookup:z,transform:I,snapGrid:T,snapToGrid:D,nodeOrigin:N,paneDomNode:O}=n();if(m=z.get(t),!m)return;y=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=Ps(M.sourceEvent,{transform:I,snapGrid:T,snapToGrid:D,containerBounds:y});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},g={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?kM(_):void 0),x=[],C=void 0;for(let[V,k]of z)if(k.parentId===t&&(x.push({id:V,position:{...k.position},extent:k.extent}),k.extent==="parent"||k.expandParent)){let G=GM(k,m,k.origin??N);C?C=[[Math.min(G[0][0],C[0][0]),Math.min(G[0][1],C[0][1])],[Math.max(G[1][0],C[1][0]),Math.max(G[1][1],C[1][1])]]:C=G}h?.(M,{...p})}).on("drag",M=>{let{transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D}=n(),N=Ps(M.sourceEvent,{transform:z,snapGrid:I,snapToGrid:T,containerBounds:y}),O=[];if(!m)return;let{x:R,y:L,width:V,height:k}=p,G={},q=m.origin??D,{width:Z,height:j,x:se,y:ee}=HM(g,l.controlDirection,N,l.boundaries,l.keepAspectRatio,q,E,C),X=Z!==V,Q=j!==k,ue=se!==R&&X,ge=ee!==L&&Q;if(!ue&&!ge&&!X&&!Q)return;if((ue||ge||q[0]===1||q[1]===1)&&(G.x=ue?se:p.x,G.y=ge?ee:p.y,p.x=G.x,p.y=G.y,x.length>0)){let de=se-R,be=ee-L;for(let Le of x)Le.position={x:Le.position.x-de+q[0]*(Z-V),y:Le.position.y-be+q[1]*(j-k)},O.push(Le)}if((X||Q)&&(G.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Z:p.width,G.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:p.height,p.width=G.width,p.height=G.height),_&&m.expandParent){let de=q[0]*(G.width??0);G.x&&G.x<de&&(p.x=de,g.x=g.x-(G.x-de));let be=q[1]*(G.height??0);G.y&&G.y<be&&(p.y=be,g.y=g.y-(G.y-be))}let ie=BM({width:p.width,prevWidth:V,height:p.height,prevHeight:k,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),te={...p,direction:ie};S?.(M,te)!==!1&&(A=!0,v?.(M,te),o(G,O))}).on("end",M=>{A&&(b?.(M,{...p}),i?.({...p}),A=!1)});a.call(B)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var y_=ne(At(),1),v_=ne(d_(),1);var m_={},p_=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(m_.env?m_.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(o,i,s);return s},h_=e=>e?p_(e):p_;var{useDebugValue:oD}=y_.default,{useSyncExternalStoreWithSelector:iD}=v_.default,aD=e=>e;function Ch(e,t=aD,n){let o=iD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oD(o),o}var g_=(e,t)=>{let n=h_(e),o=(i,a=t)=>Ch(n,i,a);return Object.assign(o,n),o},b_=(e,t)=>e?g_(e,t):g_;function je(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var lD=ne(fd()),Lf=(0,P.createContext)(null),rD=Lf.Provider,Y_=An.error001();function Ae(e,t){let n=(0,P.useContext)(Lf);if(n===null)throw new Error(Y_);return Ch(n,e,t)}function Qe(){let e=(0,P.useContext)(Lf);if(e===null)throw new Error(Y_);return(0,P.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var S_={display:"none"},sD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},X_="react-flow__node-desc",q_="react-flow__edge-desc",uD="react-flow__aria-live",cD=e=>e.ariaLiveMessage,fD=e=>e.ariaLabelConfig;function dD({rfId:e}){let t=Ae(cD);return(0,H.jsx)("div",{id:`${uD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:sD,children:t})}function pD({rfId:e,disableKeyboardA11y:t}){let n=Ae(fD);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{id:`${X_}-${e}`,style:S_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,H.jsx)("div",{id:`${q_}-${e}`,style:S_,children:n["edge.a11yDescription.default"]}),!t&&(0,H.jsx)(dD,{rfId:e})]})}var er=(0,P.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,H.jsx)("div",{className:ot(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});er.displayName="Panel";function mD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,H.jsx)(er,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,H.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var hD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Rf=e=>e.id;function gD(e,t){return je(e.selectedNodes.map(Rf),t.selectedNodes.map(Rf))&&je(e.selectedEdges.map(Rf),t.selectedEdges.map(Rf))}function yD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=Ae(hD,gD);return(0,P.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var vD=e=>!!e.onSelectionChangeHandlers;function bD({onSelectionChange:e}){let t=Ae(vD);return e||t?(0,H.jsx)(yD,{onSelectionChange:e}):null}var Z_=[0,0],SD={x:0,y:0,zoom:1},xD=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],x_=[...xD,"rfId"],_D=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),__={translateExtent:Zl,nodeOrigin:Z_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ED(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Ae(_D,je),u=Qe();(0,P.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=__,r()}),[]);let c=(0,P.useRef)(__);return(0,P.useEffect)(()=>{for(let d of x_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Px(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},x_.map(d=>e[d])),null}function E_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function TD(e){let[t,n]=(0,P.useState)(e==="system"?null:e);return(0,P.useEffect)(()=>{if(e!=="system"){n(e);return}let o=E_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:E_()?.matches?"dark":"light"}var T_=typeof document<"u"?document:null;function Vs(e=null,t={target:T_,actInsideInputWithModifier:!0}){let[n,o]=(0,P.useState)(!1),i=(0,P.useRef)(!1),a=(0,P.useRef)(new Set([])),[l,r]=(0,P.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
8
+ `+o.stack}}var op=Object.prototype.hasOwnProperty,jp=bt.unstable_scheduleCallback,Sd=bt.unstable_cancelCallback,IN=bt.unstable_shouldYield,UN=bt.unstable_requestPaint,Sn=bt.unstable_now,VN=bt.unstable_getCurrentPriorityLevel,L0=bt.unstable_ImmediatePriority,B0=bt.unstable_UserBlockingPriority,qu=bt.unstable_NormalPriority,YN=bt.unstable_LowPriority,P0=bt.unstable_IdlePriority,XN=bt.log,qN=bt.unstable_setDisableYieldValue,ss=null,xn=null;function xi(e){if(typeof XN=="function"&&qN(e),xn&&typeof xn.setStrictMode=="function")try{xn.setStrictMode(ss,e)}catch{}}var _n=Math.clz32?Math.clz32:$N,ZN=Math.log,jN=Math.LN2;function $N(e){return e>>>=0,e===0?32:31-(ZN(e)/jN|0)|0}var cu=256,fu=262144,du=4194304;function na(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function yc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var l=o&134217727;return l!==0?(o=l&~a,o!==0?i=na(o):(r&=l,r!==0?i=na(r):n||(n=l&~e,n!==0&&(i=na(n))))):(l=o&~a,l!==0?i=na(l):r!==0?i=na(r):n||(n=o&~e,n!==0&&(i=na(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function us(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function FN(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H0(){var e=du;return du<<=1,(du&62914560)===0&&(du=4194304),e}function xd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function KN(e,t,n,o,i,a){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=r&~n;0<n;){var c=31-_n(n),d=1<<c;l[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var p=f[c];p!==null&&(p.lane&=-536870913)}n&=~d}o!==0&&k0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(r&~t))}function k0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-_n(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function G0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-_n(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function I0(e,t){var n=t&-t;return n=(n&42)!==0?1:$p(n),(n&(e.suspendedLanes|t))!==0?0:n}function $p(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Fp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function U0(){var e=Me.p;return e!==0?e:(e=window.event,e===void 0?32:c1(e.type))}function ry(e,t){var n=Me.p;try{return Me.p=e,t()}finally{Me.p=n}}var Gi=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Gi,an="__reactProps$"+Gi,Lr="__reactContainer$"+Gi,ip="__reactEvents$"+Gi,QN="__reactListeners$"+Gi,WN="__reactHandles$"+Gi,ly="__reactResources$"+Gi,fs="__reactMarker$"+Gi;function Kp(e){delete e[Mt],delete e[an],delete e[ip],delete e[QN],delete e[WN]}function rr(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lr]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=h0(e);e!==null;){if(n=e[Mt])return n;e=h0(e)}return t}e=n,n=e.parentNode}return null}function Br(e){if(e=e[Mt]||e[Lr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Rl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(V(33))}function gr(e){var t=e[ly];return t||(t=e[ly]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[fs]=!0}var V0=new Set,Y0={};function ha(e,t){Tr(e,t),Tr(e+"Capture",t)}function Tr(e,t){for(Y0[e]=t,e=0;e<t.length;e++)V0.add(t[e])}var JN=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]*$"),sy={},uy={};function e2(e){return op.call(uy,e)?!0:op.call(sy,e)?!1:JN.test(e)?uy[e]=!0:(sy[e]=!0,!1)}function wu(e,t,n){if(e2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function pu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Po(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function X0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function t2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(r){n=""+r,a.call(this,r)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ap(e){if(!e._valueTracker){var t=X0(e)?"checked":"value";e._valueTracker=t2(e,t,""+e[t])}}function q0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=X0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Zu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var n2=/[\n"\\]/g;function In(e){return e.replace(n2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function rp(e,t,n,o,i,a,r,l){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Hn(t)):e.value!==""+Hn(t)&&(e.value=""+Hn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?lp(e,r,Hn(t)):n!=null?lp(e,r,Hn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Hn(l):e.removeAttribute("name")}function Z0(e,t,n,o,i,a,r,l){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){ap(e);return}n=n!=null?""+Hn(n):"",t=t!=null?""+Hn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=l?e.checked:!!o,e.defaultChecked=!!o,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),ap(e)}function lp(e,t,n){t==="number"&&Zu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function yr(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Hn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function j0(e,t,n){if(t!=null&&(t=""+Hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Hn(n):""}function $0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(V(92));if(Dl(o)){if(1<o.length)throw Error(V(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Hn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),ap(e)}function Nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var o2=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 cy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||o2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function F0(e,t,n){if(t!=null&&typeof t!="object")throw Error(V(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&cy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&cy(e,a,t[a])}function Qp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i2=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"]]),a2=/^[\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 Au(e){return a2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xo(){}var sp=null;function Wp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lr=null,vr=null;function fy(e){var t=Br(e);if(t&&(e=t.stateNode)){var n=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(rp(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+In(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[an]||null;if(!i)throw Error(V(90));rp(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&q0(o)}break e;case"textarea":j0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&yr(e,!!n.multiple,t,!1)}}}var _d=!1;function K0(e,t,n){if(_d)return e(t,n);_d=!0;try{var o=e(t);return o}finally{if(_d=!1,(lr!==null||vr!==null)&&(Mc(),lr&&(t=lr,e=vr,vr=lr=null,fy(t),e)))for(t=0;t<e.length;t++)fy(e[t])}}function $l(e,t){var n=e.stateNode;if(n===null)return null;var o=n[an]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var Fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),up=!1;if(Fo)try{Ja={},Object.defineProperty(Ja,"passive",{get:function(){up=!0}}),window.addEventListener("test",Ja,Ja),window.removeEventListener("test",Ja,Ja)}catch{up=!1}var Ja,_i=null,Jp=null,Mu=null;function Q0(){if(Mu)return Mu;var e,t=Jp,n=t.length,o,i="value"in _i?_i.value:_i.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var r=n-e;for(o=1;o<=r&&t[n-o]===i[a-o];o++);return Mu=i.slice(e,1<o?1-o:void 0)}function Du(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mu(){return!0}function dy(){return!1}function rn(e){function t(n,o,i,a,r){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=r,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?mu:dy,this.isPropagationStopped=dy,this}return Ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=mu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=mu)},persist:function(){},isPersistent:mu}),t}var ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vc=rn(ga),ds=Ze({},ga,{view:0,detail:0}),r2=rn(ds),Ed,Td,El,bc=Ze({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:em,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==El&&(El&&e.type==="mousemove"?(Ed=e.screenX-El.screenX,Td=e.screenY-El.screenY):Td=Ed=0,El=e),Ed)},movementY:function(e){return"movementY"in e?e.movementY:Td}}),py=rn(bc),l2=Ze({},bc,{dataTransfer:0}),s2=rn(l2),u2=Ze({},ds,{relatedTarget:0}),Nd=rn(u2),c2=Ze({},ga,{animationName:0,elapsedTime:0,pseudoElement:0}),f2=rn(c2),d2=Ze({},ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),p2=rn(d2),m2=Ze({},ga,{data:0}),my=rn(m2),h2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g2={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"},y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=y2[e])?!!t[e]:!1}function em(){return v2}var b2=Ze({},ds,{key:function(e){if(e.key){var t=h2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Du(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:em,charCode:function(e){return e.type==="keypress"?Du(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Du(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S2=rn(b2),x2=Ze({},bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hy=rn(x2),_2=Ze({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:em}),E2=rn(_2),T2=Ze({},ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),N2=rn(T2),C2=Ze({},bc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),w2=rn(C2),A2=Ze({},ga,{newState:0,oldState:0}),M2=rn(A2),D2=[9,13,27,32],tm=Fo&&"CompositionEvent"in window,Ll=null;Fo&&"documentMode"in document&&(Ll=document.documentMode);var R2=Fo&&"TextEvent"in window&&!Ll,W0=Fo&&(!tm||Ll&&8<Ll&&11>=Ll),gy=" ",yy=!1;function J0(e,t){switch(e){case"keyup":return D2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ev(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sr=!1;function O2(e,t){switch(e){case"compositionend":return ev(t);case"keypress":return t.which!==32?null:(yy=!0,gy);case"textInput":return e=t.data,e===gy&&yy?null:e;default:return null}}function z2(e,t){if(sr)return e==="compositionend"||!tm&&J0(e,t)?(e=Q0(),Mu=Jp=_i=null,sr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return W0&&t.locale!=="ko"?null:t.data;default:return null}}var L2={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 vy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!L2[e.type]:t==="textarea"}function tv(e,t,n,o){lr?vr?vr.push(o):vr=[o]:lr=o,t=cc(t,"onChange"),0<t.length&&(n=new vc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Bl=null,Fl=null;function B2(e){Kb(e,0)}function Sc(e){var t=Rl(e);if(q0(t))return e}function by(e,t){if(e==="change")return t}var nv=!1;Fo&&(Fo?(gu="oninput"in document,gu||(Cd=document.createElement("div"),Cd.setAttribute("oninput","return;"),gu=typeof Cd.oninput=="function"),hu=gu):hu=!1,nv=hu&&(!document.documentMode||9<document.documentMode));var hu,gu,Cd;function Sy(){Bl&&(Bl.detachEvent("onpropertychange",ov),Fl=Bl=null)}function ov(e){if(e.propertyName==="value"&&Sc(Fl)){var t=[];tv(t,Fl,e,Wp(e)),K0(B2,t)}}function P2(e,t,n){e==="focusin"?(Sy(),Bl=t,Fl=n,Bl.attachEvent("onpropertychange",ov)):e==="focusout"&&Sy()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sc(Fl)}function k2(e,t){if(e==="click")return Sc(t)}function G2(e,t){if(e==="input"||e==="change")return Sc(t)}function I2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:I2;function Kl(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!op.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function xy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _y(e,t){var n=xy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xy(n)}}function iv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function av(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zu(e.document)}return t}function nm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var U2=Fo&&"documentMode"in document&&11>=document.documentMode,ur=null,cp=null,Pl=null,fp=!1;function Ey(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fp||ur==null||ur!==Zu(o)||(o=ur,"selectionStart"in o&&nm(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Pl&&Kl(Pl,o)||(Pl=o,o=cc(cp,"onSelect"),0<o.length&&(t=new vc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=ur)))}function ea(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:ea("Animation","AnimationEnd"),animationiteration:ea("Animation","AnimationIteration"),animationstart:ea("Animation","AnimationStart"),transitionrun:ea("Transition","TransitionRun"),transitionstart:ea("Transition","TransitionStart"),transitioncancel:ea("Transition","TransitionCancel"),transitionend:ea("Transition","TransitionEnd")},wd={},rv={};Fo&&(rv=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function ya(e){if(wd[e])return wd[e];if(!cr[e])return e;var t=cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rv)return wd[e]=t[n];return e}var lv=ya("animationend"),sv=ya("animationiteration"),uv=ya("animationstart"),V2=ya("transitionrun"),Y2=ya("transitionstart"),X2=ya("transitioncancel"),cv=ya("transitionend"),fv=new Map,dp="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(" ");dp.push("scrollEnd");function to(e,t){fv.set(e,t),ha(t,[e])}var ju=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pn=[],fr=0,om=0;function xc(){for(var e=fr,t=om=fr=0;t<e;){var n=Pn[t];Pn[t++]=null;var o=Pn[t];Pn[t++]=null;var i=Pn[t];Pn[t++]=null;var a=Pn[t];if(Pn[t++]=null,o!==null&&i!==null){var r=o.pending;r===null?i.next=i:(i.next=r.next,r.next=i),o.pending=i}a!==0&&dv(n,i,a)}}function _c(e,t,n,o){Pn[fr++]=e,Pn[fr++]=t,Pn[fr++]=n,Pn[fr++]=o,om|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function im(e,t,n,o){return _c(e,t,n,o),$u(e)}function va(e,t){return _c(e,null,null,t),$u(e)}function dv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-_n(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function $u(e){if(50<ql)throw ql=0,zp=null,Error(V(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var dr={};function q2(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,o){return new q2(e,t,n,o)}function am(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zo(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ru(e,t,n,o,i,a){var r=0;if(o=e,typeof e=="function")am(e)&&(r=1);else if(typeof e=="string")r=$C(e,n,So.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Jd:return e=vn(31,n,t,i),e.elementType=Jd,e.lanes=a,e;case ir:return ra(n.children,i,a,t);case O0:r=8,i|=24;break;case Kd:return e=vn(12,n,t,i|2),e.elementType=Kd,e.lanes=a,e;case Qd:return e=vn(13,n,t,i),e.elementType=Qd,e.lanes=a,e;case Wd:return e=vn(19,n,t,i),e.elementType=Wd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yo:r=10;break e;case z0:r=9;break e;case qp:r=11;break e;case Zp:r=14;break e;case hi:r=16,o=null;break e}r=29,n=Error(V(130,e===null?"null":typeof e,"")),o=null}return t=vn(r,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function ra(e,t,n,o){return e=vn(7,e,o,t),e.lanes=n,e}function Ad(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function mv(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function Md(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ty=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=Ty.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ay(t)},Ty.set(e,t),t)}return{value:e,source:t,stack:ay(t)}}var pr=[],mr=0,Fu=null,Ql=0,kn=[],Gn=0,Bi=null,yo=1,vo="";function Uo(e,t){pr[mr++]=Ql,pr[mr++]=Fu,Fu=e,Ql=t}function hv(e,t,n){kn[Gn++]=yo,kn[Gn++]=vo,kn[Gn++]=Bi,Bi=e;var o=yo;e=vo;var i=32-_n(o)-1;o&=~(1<<i),n+=1;var a=32-_n(t)+i;if(30<a){var r=i-i%5;a=(o&(1<<r)-1).toString(32),o>>=r,i-=r,yo=1<<32-_n(t)+i|n<<i|o,vo=a+e}else yo=1<<a|n<<i|o,vo=e}function rm(e){e.return!==null&&(Uo(e,1),hv(e,1,0))}function lm(e){for(;e===Fu;)Fu=pr[--mr],pr[mr]=null,Ql=pr[--mr],pr[mr]=null;for(;e===Bi;)Bi=kn[--Gn],kn[Gn]=null,vo=kn[--Gn],kn[Gn]=null,yo=kn[--Gn],kn[Gn]=null}function gv(e,t){kn[Gn++]=yo,kn[Gn++]=vo,kn[Gn++]=Bi,yo=t.id,vo=t.overflow,Bi=e}var Dt=null,qe=null,Te=!1,wi=null,Vn=!1,pp=Error(V(519));function Pi(e){var t=Error(V(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wl(Un(t,e)),pp}function Ny(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Mt]=e,t[an]=o,n){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(n=0;n<ns.length;n++)ve(ns[n],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Z0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),$0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Wb(t.textContent,n)?(o.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),o.onScroll!=null&&ve("scroll",t),o.onScrollEnd!=null&&ve("scrollend",t),o.onClick!=null&&(t.onclick=Xo),t=!0):t=!1,t||Pi(e,!0)}function Cy(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:Dt=Dt.return}}function er(e){if(e!==Dt)return!1;if(!Te)return Cy(e),Te=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||kp(e.type,e.memoizedProps)),n=!n),n&&qe&&Pi(e),Cy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));qe=m0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));qe=m0(e)}else t===27?(t=qe,Ii(e.type)?(e=Vp,Vp=null,qe=e):qe=t):qe=Dt?Xn(e.stateNode.nextSibling):null;return!0}function ca(){qe=Dt=null,Te=!1}function Dd(){var e=wi;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),wi=null),e}function Wl(e){wi===null?wi=[e]:wi.push(e)}var mp=xo(null),ba=null,qo=null;function yi(e,t,n){Ie(mp,t._currentValue),t._currentValue=n}function jo(e){e._currentValue=mp.current,Ct(mp)}function hp(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function gp(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var r=i.child;a=a.firstContext;e:for(;a!==null;){var l=a;a=i;for(var s=0;s<t.length;s++)if(l.context===t[s]){a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),hp(a.return,n,e),o||(r=null);break e}a=l.next}}else if(i.tag===18){if(r=i.return,r===null)throw Error(V(341));r.lanes|=n,a=r.alternate,a!==null&&(a.lanes|=n),hp(r,n,e),r=null}else r=i.child;if(r!==null)r.return=i;else for(r=i;r!==null;){if(r===e){r=null;break}if(i=r.sibling,i!==null){i.return=r.return,r=i;break}r=r.return}i=r}}function Pr(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var r=i.alternate;if(r===null)throw Error(V(387));if(r=r.memoizedProps,r!==null){var l=i.type;Tn(i.pendingProps.value,r.value)||(e!==null?e.push(l):e=[l])}}else if(i===Vu.current){if(r=i.alternate,r===null)throw Error(V(387));r.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(is):e=[is])}i=i.return}e!==null&&gp(t,e,n,o),t.flags|=262144}function Ku(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fa(e){ba=e,qo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return yv(ba,e)}function yu(e,t){return ba===null&&fa(e),yv(e,t)}function yv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qo===null){if(e===null)throw Error(V(308));qo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qo=qo.next=t;return n}var Z2=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},j2=bt.unstable_scheduleCallback,$2=bt.unstable_NormalPriority,pt={$$typeof:Yo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sm(){return{controller:new Z2,data:new Map,refCount:0}}function ps(e){e.refCount--,e.refCount===0&&j2($2,function(){e.controller.abort()})}var Hl=null,yp=0,Cr=0,br=null;function F2(e,t){if(Hl===null){var n=Hl=[];yp=0,Cr=zm(),br={status:"pending",value:void 0,then:function(o){n.push(o)}}}return yp++,t.then(wy,wy),t}function wy(){if(--yp===0&&Hl!==null){br!==null&&(br.status="fulfilled");var e=Hl;Hl=null,Cr=0,br=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function K2(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var Ay=fe.S;fe.S=function(e,t){Rb=Sn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&F2(e,t),Ay!==null&&Ay(e,t)};var la=xo(null);function um(){var e=la.current;return e!==null?e:ke.pooledCache}function Ou(e,t){t===null?Ie(la,la.current):Ie(la,t.pool)}function vv(){var e=um();return e===null?null:{parent:pt._currentValue,pool:e}}var Hr=Error(V(460)),cm=Error(V(474)),Ec=Error(V(542)),Qu={then:function(){}};function My(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xo,Xo),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ry(e),e;default:if(typeof t.status=="string")t.then(Xo,Xo);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(V(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ry(e),e}throw sa=t,Hr}}function oa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(sa=n,Hr):n}}var sa=null;function Dy(){if(sa===null)throw Error(V(459));var e=sa;return sa=null,e}function Ry(e){if(e===Hr||e===Ec)throw Error(V(483))}var Sr=null,Jl=0;function vu(e){var t=Jl;return Jl+=1,Sr===null&&(Sr=[]),bv(Sr,e,t)}function Tl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function bu(e,t){throw t.$$typeof===PN?Error(V(525)):(e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Sv(e){function t(g,h){if(e){var m=g.deletions;m===null?(g.deletions=[h],g.flags|=16):m.push(h)}}function n(g,h){if(!e)return null;for(;h!==null;)t(g,h),h=h.sibling;return null}function o(g){for(var h=new Map;g!==null;)g.key!==null?h.set(g.key,g):h.set(g.index,g),g=g.sibling;return h}function i(g,h){return g=Zo(g,h),g.index=0,g.sibling=null,g}function a(g,h,m){return g.index=m,e?(m=g.alternate,m!==null?(m=m.index,m<h?(g.flags|=67108866,h):m):(g.flags|=67108866,h)):(g.flags|=1048576,h)}function r(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function l(g,h,m,y){return h===null||h.tag!==6?(h=Ad(m,g.mode,y),h.return=g,h):(h=i(h,m),h.return=g,h)}function s(g,h,m,y){var S=m.type;return S===ir?c(g,h,m.props.children,y,m.key):h!==null&&(h.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&oa(S)===h.type)?(h=i(h,m.props),Tl(h,m),h.return=g,h):(h=Ru(m.type,m.key,m.props,null,g.mode,y),Tl(h,m),h.return=g,h)}function u(g,h,m,y){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=Md(m,g.mode,y),h.return=g,h):(h=i(h,m.children||[]),h.return=g,h)}function c(g,h,m,y,S){return h===null||h.tag!==7?(h=ra(m,g.mode,y,S),h.return=g,h):(h=i(h,m),h.return=g,h)}function d(g,h,m){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Ad(""+h,g.mode,m),h.return=g,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case uu:return m=Ru(h.type,h.key,h.props,null,g.mode,m),Tl(m,h),m.return=g,m;case Ml:return h=Md(h,g.mode,m),h.return=g,h;case hi:return h=oa(h),d(g,h,m)}if(Dl(h)||_l(h))return h=ra(h,g.mode,m,null),h.return=g,h;if(typeof h.then=="function")return d(g,vu(h),m);if(h.$$typeof===Yo)return d(g,yu(g,h),m);bu(g,h)}return null}function f(g,h,m,y){var S=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return S!==null?null:l(g,h,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case uu:return m.key===S?s(g,h,m,y):null;case Ml:return m.key===S?u(g,h,m,y):null;case hi:return m=oa(m),f(g,h,m,y)}if(Dl(m)||_l(m))return S!==null?null:c(g,h,m,y,null);if(typeof m.then=="function")return f(g,h,vu(m),y);if(m.$$typeof===Yo)return f(g,h,yu(g,m),y);bu(g,m)}return null}function p(g,h,m,y,S){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return g=g.get(m)||null,l(h,g,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case uu:return g=g.get(y.key===null?m:y.key)||null,s(h,g,y,S);case Ml:return g=g.get(y.key===null?m:y.key)||null,u(h,g,y,S);case hi:return y=oa(y),p(g,h,m,y,S)}if(Dl(y)||_l(y))return g=g.get(m)||null,c(h,g,y,S,null);if(typeof y.then=="function")return p(g,h,m,vu(y),S);if(y.$$typeof===Yo)return p(g,h,m,yu(h,y),S);bu(h,y)}return null}function v(g,h,m,y){for(var S=null,E=null,_=h,w=h=0,C=null;_!==null&&w<m.length;w++){_.index>w?(C=_,_=null):C=_.sibling;var B=f(g,_,m[w],y);if(B===null){_===null&&(_=C);break}e&&_&&B.alternate===null&&t(g,_),h=a(B,h,w),E===null?S=B:E.sibling=B,E=B,_=C}if(w===m.length)return n(g,_),Te&&Uo(g,w),S;if(_===null){for(;w<m.length;w++)_=d(g,m[w],y),_!==null&&(h=a(_,h,w),E===null?S=_:E.sibling=_,E=_);return Te&&Uo(g,w),S}for(_=o(_);w<m.length;w++)C=p(_,g,w,m[w],y),C!==null&&(e&&C.alternate!==null&&_.delete(C.key===null?w:C.key),h=a(C,h,w),E===null?S=C:E.sibling=C,E=C);return e&&_.forEach(function(M){return t(g,M)}),Te&&Uo(g,w),S}function b(g,h,m,y){if(m==null)throw Error(V(151));for(var S=null,E=null,_=h,w=h=0,C=null,B=m.next();_!==null&&!B.done;w++,B=m.next()){_.index>w?(C=_,_=null):C=_.sibling;var M=f(g,_,B.value,y);if(M===null){_===null&&(_=C);break}e&&_&&M.alternate===null&&t(g,_),h=a(M,h,w),E===null?S=M:E.sibling=M,E=M,_=C}if(B.done)return n(g,_),Te&&Uo(g,w),S;if(_===null){for(;!B.done;w++,B=m.next())B=d(g,B.value,y),B!==null&&(h=a(B,h,w),E===null?S=B:E.sibling=B,E=B);return Te&&Uo(g,w),S}for(_=o(_);!B.done;w++,B=m.next())B=p(_,g,w,B.value,y),B!==null&&(e&&B.alternate!==null&&_.delete(B.key===null?w:B.key),h=a(B,h,w),E===null?S=B:E.sibling=B,E=B);return e&&_.forEach(function(z){return t(g,z)}),Te&&Uo(g,w),S}function x(g,h,m,y){if(typeof m=="object"&&m!==null&&m.type===ir&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case uu:e:{for(var S=m.key;h!==null;){if(h.key===S){if(S=m.type,S===ir){if(h.tag===7){n(g,h.sibling),y=i(h,m.props.children),y.return=g,g=y;break e}}else if(h.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===hi&&oa(S)===h.type){n(g,h.sibling),y=i(h,m.props),Tl(y,m),y.return=g,g=y;break e}n(g,h);break}else t(g,h);h=h.sibling}m.type===ir?(y=ra(m.props.children,g.mode,y,m.key),y.return=g,g=y):(y=Ru(m.type,m.key,m.props,null,g.mode,y),Tl(y,m),y.return=g,g=y)}return r(g);case Ml:e:{for(S=m.key;h!==null;){if(h.key===S)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(g,h.sibling),y=i(h,m.children||[]),y.return=g,g=y;break e}else{n(g,h);break}else t(g,h);h=h.sibling}y=Md(m,g.mode,y),y.return=g,g=y}return r(g);case hi:return m=oa(m),x(g,h,m,y)}if(Dl(m))return v(g,h,m,y);if(_l(m)){if(S=_l(m),typeof S!="function")throw Error(V(150));return m=S.call(m),b(g,h,m,y)}if(typeof m.then=="function")return x(g,h,vu(m),y);if(m.$$typeof===Yo)return x(g,h,yu(g,m),y);bu(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,h!==null&&h.tag===6?(n(g,h.sibling),y=i(h,m),y.return=g,g=y):(n(g,h),y=Ad(m,g.mode,y),y.return=g,g=y),r(g)):n(g,h)}return function(g,h,m,y){try{Jl=0;var S=x(g,h,m,y);return Sr=null,S}catch(_){if(_===Hr||_===Ec)throw _;var E=vn(29,_,null,g.mode);return E.lanes=y,E.return=g,E}}}var da=Sv(!0),xv=Sv(!1),gi=!1;function fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mi(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=$u(e),dv(e,null,n),t}return _c(e,o,t,n),$u(e)}function kl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,G0(e,n)}}function Rd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=r:a=a.next=r,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bp=!1;function Gl(){if(bp){var e=br;if(e!==null)throw e}}function Il(e,t,n,o){bp=!1;var i=e.updateQueue;gi=!1;var a=i.firstBaseUpdate,r=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,r===null?a=u:r.next=u,r=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==r&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;r=0,c=u=s=null,l=a;do{var f=l.lane&-536870913,p=f!==l.lane;if(p?(Ee&f)===f:(o&f)===f){f!==0&&f===Cr&&(bp=!0),c!==null&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var v=e,b=l;f=t;var x=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(x,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(x,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:gi=!0}}f=l.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,s=d):c=c.next=p,r|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),ki|=r,e.lanes=r,e.memoizedState=d}}function _v(e,t){if(typeof e!="function")throw Error(V(191,e));e.call(t)}function Ev(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)_v(n[e],t)}var wr=xo(null),Wu=xo(0);function Oy(e,t){e=Jo,Ie(Wu,e),Ie(wr,t),Jo=e|t.baseLanes}function Sp(){Ie(Wu,Jo),Ie(wr,wr.current)}function dm(){Jo=Wu.current,Ct(wr),Ct(Wu)}var Nn=xo(null),Yn=null;function vi(e){var t=e.alternate;Ie(st,st.current&1),Ie(Nn,e),Yn===null&&(t===null||wr.current!==null||t.memoizedState!==null)&&(Yn=e)}function xp(e){Ie(st,st.current),Ie(Nn,e),Yn===null&&(Yn=e)}function Tv(e){e.tag===22?(Ie(st,st.current),Ie(Nn,e),Yn===null&&(Yn=e)):bi(e)}function bi(){Ie(st,st.current),Ie(Nn,Nn.current)}function yn(e){Ct(Nn),Yn===e&&(Yn=null),Ct(st)}var st=xo(0);function Ju(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ip(n)||Up(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ko=0,he=null,He=null,ft=null,ec=!1,xr=!1,pa=!1,tc=0,es=0,_r=null,Q2=0;function it(){throw Error(V(321))}function pm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function mm(e,t,n,o,i,a){return Ko=a,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fe.H=e===null||e.memoizedState===null?tb:Nm,pa=!1,a=n(o,i),pa=!1,xr&&(a=Cv(t,n,o,i)),Nv(e),a}function Nv(e){fe.H=ts;var t=He!==null&&He.next!==null;if(Ko=0,ft=He=he=null,ec=!1,es=0,_r=null,t)throw Error(V(300));e===null||mt||(e=e.dependencies,e!==null&&Ku(e)&&(mt=!0))}function Cv(e,t,n,o){he=e;var i=0;do{if(xr&&(_r=null),es=0,xr=!1,25<=i)throw Error(V(301));if(i+=1,ft=He=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}fe.H=nb,a=t(n,o)}while(xr);return a}function W2(){var e=fe.H,t=e.useState()[0];return t=typeof t.then=="function"?ms(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(he.flags|=1024),t}function hm(){var e=tc!==0;return tc=0,e}function gm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ym(e){if(ec){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ec=!1}Ko=0,ft=He=he=null,xr=!1,es=tc=0,_r=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?he.memoizedState=ft=e:ft=ft.next=e,ft}function ut(){if(He===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=ft===null?he.memoizedState:ft.next;if(t!==null)ft=t,He=e;else{if(e===null)throw he.alternate===null?Error(V(467)):Error(V(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},ft===null?he.memoizedState=ft=e:ft=ft.next=e}return ft}function Tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ms(e){var t=es;return es+=1,_r===null&&(_r=[]),e=bv(_r,e,t),t=he,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,fe.H=t===null||t.memoizedState===null?tb:Nm),e}function Nc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ms(e);if(e.$$typeof===Yo)return Rt(e)}throw Error(V(438,String(e)))}function vm(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=he.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Tc(),he.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=HN;return t.index++,n}function Qo(e,t){return typeof t=="function"?t(e):t}function zu(e){var t=ut();return bm(t,He,e)}function bm(e,t,n){var o=e.queue;if(o===null)throw Error(V(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var r=i.next;i.next=a.next,a.next=r}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var l=r=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ee&d)===d:(Ko&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Cr&&(c=!0);else if((Ko&f)===f){u=u.next,f===Cr&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=d,r=a):s=s.next=d,he.lanes|=f,ki|=f;d=u.action,pa&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(l=s=f,r=a):s=s.next=f,he.lanes|=d,ki|=d;u=u.next}while(u!==null&&u!==t);if(s===null?r=a:s.next=l,!Tn(a,e.memoizedState)&&(mt=!0,c&&(n=br,n!==null)))throw n;e.memoizedState=a,e.baseState=r,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Od(e){var t=ut(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var r=i=i.next;do a=e(a,r.action),r=r.next;while(r!==i);Tn(a,t.memoizedState)||(mt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function wv(e,t,n){var o=he,i=ut(),a=Te;if(a){if(n===void 0)throw Error(V(407));n=n()}else n=t();var r=!Tn((He||i).memoizedState,n);if(r&&(i.memoizedState=n,mt=!0),i=i.queue,Sm(Dv.bind(null,o,i,e),[e]),i.getSnapshot!==t||r||ft!==null&&ft.memoizedState.tag&1){if(o.flags|=2048,Ar(9,{destroy:void 0},Mv.bind(null,o,i,n,t),null),ke===null)throw Error(V(349));a||(Ko&127)!==0||Av(o,t,n)}return n}function Av(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=Tc(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mv(e,t,n,o){t.value=n,t.getSnapshot=o,Rv(t)&&Ov(e)}function Dv(e,t,n){return n(function(){Rv(t)&&Ov(e)})}function Rv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function Ov(e){var t=va(e,2);t!==null&&on(t,e,2)}function _p(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),pa){xi(!0);try{n()}finally{xi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function zv(e,t,n,o){return e.baseState=n,bm(e,He,typeof o=="function"?o:Qo)}function J2(e,t,n,o,i){if(wc(e))throw Error(V(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){a.listeners.push(r)}};fe.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Lv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Lv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=fe.T,r={};fe.T=r;try{var l=n(i,o),s=fe.S;s!==null&&s(r,l),zy(e,t,l)}catch(u){Ep(e,t,u)}finally{a!==null&&r.types!==null&&(a.types=r.types),fe.T=a}}else try{a=n(i,o),zy(e,t,a)}catch(u){Ep(e,t,u)}}function zy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Ly(e,t,o)},function(o){return Ep(e,t,o)}):Ly(e,t,n)}function Ly(e,t,n){t.status="fulfilled",t.value=n,Bv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Lv(e,n)))}function Ep(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Bv(t),t=t.next;while(t!==o)}e.action=null}function Bv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pv(e,t){return t}function By(e,t){if(Te){var n=ke.formState;if(n!==null){e:{var o=he;if(Te){if(qe){t:{for(var i=qe,a=Vn;i.nodeType!==8;){if(!a){i=null;break t}if(i=Xn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Xn(i.nextSibling),o=i.data==="F!";break e}}Pi(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pv,lastRenderedState:t},n.queue=o,n=Wv.bind(null,he,o),o.dispatch=n,o=_p(!1),a=Tm.bind(null,he,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=J2.bind(null,he,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Py(e){var t=ut();return Hv(t,He,e)}function Hv(e,t,n){if(t=bm(e,t,Pv)[0],e=zu(Qo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=ms(t)}catch(r){throw r===Hr?Ec:r}else o=t;t=ut();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(he.flags|=2048,Ar(9,{destroy:void 0},eC.bind(null,i,n),null)),[o,a,e]}function eC(e,t){e.action=t}function Hy(e){var t=ut(),n=He;if(n!==null)return Hv(t,n,e);ut(),t=t.memoizedState,n=ut();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Ar(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=he.updateQueue,t===null&&(t=Tc(),he.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function kv(){return ut().memoizedState}function Lu(e,t,n,o){var i=Yt();he.flags|=e,i.memoizedState=Ar(1|t,{destroy:void 0},n,o===void 0?null:o)}function Cc(e,t,n,o){var i=ut();o=o===void 0?null:o;var a=i.memoizedState.inst;He!==null&&o!==null&&pm(o,He.memoizedState.deps)?i.memoizedState=Ar(t,a,n,o):(he.flags|=e,i.memoizedState=Ar(1|t,a,n,o))}function ky(e,t){Lu(8390656,8,e,t)}function Sm(e,t){Cc(2048,8,e,t)}function tC(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Tc(),he.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gv(e){var t=ut().memoizedState;return tC({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(V(440));return t.impl.apply(void 0,arguments)}}function Iv(e,t){return Cc(4,2,e,t)}function Uv(e,t){return Cc(4,4,e,t)}function Vv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Yv(e,t,n){n=n!=null?n.concat([e]):null,Cc(4,4,Vv.bind(null,t,e),n)}function xm(){}function Xv(e,t){var n=ut();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&pm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function qv(e,t){var n=ut();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&pm(t,o[1]))return o[0];if(o=e(),pa){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[o,t],o}function _m(e,t,n){return n===void 0||(Ko&1073741824)!==0&&(Ee&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=zb(),he.lanes|=e,ki|=e,n)}function Zv(e,t,n,o){return Tn(n,t)?n:wr.current!==null?(e=_m(e,n,o),Tn(e,t)||(mt=!0),e):(Ko&42)===0||(Ko&1073741824)!==0&&(Ee&261930)===0?(mt=!0,e.memoizedState=n):(e=zb(),he.lanes|=e,ki|=e,t)}function jv(e,t,n,o,i){var a=Me.p;Me.p=a!==0&&8>a?a:8;var r=fe.T,l={};fe.T=l,Tm(e,!1,t,n);try{var s=i(),u=fe.S;if(u!==null&&u(l,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=K2(s,o);Ul(e,t,c,En(e))}else Ul(e,t,o,En(e))}catch(d){Ul(e,t,{then:function(){},status:"rejected",reason:d},En())}finally{Me.p=a,r!==null&&l.types!==null&&(r.types=l.types),fe.T=r}}function nC(){}function Tp(e,t,n,o){if(e.tag!==5)throw Error(V(476));var i=$v(e).queue;jv(e,i,t,aa,n===null?nC:function(){return Fv(e),n(o)})}function $v(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:aa,baseState:aa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:aa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fv(e){var t=$v(e);t.next===null&&(t=e.alternate.memoizedState),Ul(e,t.next.queue,{},En())}function Em(){return Rt(is)}function Kv(){return ut().memoizedState}function Qv(){return ut().memoizedState}function oC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=En();e=Ai(n);var o=Mi(t,e,n);o!==null&&(on(o,t,n),kl(o,t,n)),t={cache:sm()},e.payload=t;return}t=t.return}}function iC(e,t,n){var o=En();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},wc(e)?Jv(t,n):(n=im(e,t,n,o),n!==null&&(on(n,e,o),eb(n,t,o)))}function Wv(e,t,n){var o=En();Ul(e,t,n,o)}function Ul(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(wc(e))Jv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var r=t.lastRenderedState,l=a(r,n);if(i.hasEagerState=!0,i.eagerState=l,Tn(l,r))return _c(e,t,i,0),ke===null&&xc(),!1}catch{}if(n=im(e,t,i,o),n!==null)return on(n,e,o),eb(n,t,o),!0}return!1}function Tm(e,t,n,o){if(o={lane:2,revertLane:zm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},wc(e)){if(t)throw Error(V(479))}else t=im(e,n,o,2),t!==null&&on(t,e,2)}function wc(e){var t=e.alternate;return e===he||t!==null&&t===he}function Jv(e,t){xr=ec=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eb(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,G0(e,n)}}var ts={readContext:Rt,use:Nc,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};ts.useEffectEvent=it;var tb={readContext:Rt,use:Nc,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:ky,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Lu(4194308,4,Vv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lu(4194308,4,e,t)},useInsertionEffect:function(e,t){Lu(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(pa){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(pa){xi(!0);try{n(t)}finally{xi(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=iC.bind(null,he,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=_p(e);var t=e.queue,n=Wv.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xm,useDeferredValue:function(e,t){var n=Yt();return _m(n,e,t)},useTransition:function(){var e=_p(!1);return e=jv.bind(null,he,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=he,i=Yt();if(Te){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),ke===null)throw Error(V(349));(Ee&127)!==0||Av(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ky(Dv.bind(null,o,a,e),[e]),o.flags|=2048,Ar(9,{destroy:void 0},Mv.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=ke.identifierPrefix;if(Te){var n=vo,o=yo;n=(o&~(1<<32-_n(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=tc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Q2++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Em,useFormState:By,useActionState:By,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Tm.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:vm,useCacheRefresh:function(){return Yt().memoizedState=oC.bind(null,he)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Ae&2)!==0)throw Error(V(440));return n.impl.apply(void 0,arguments)}}},Nm={readContext:Rt,use:Nc,useCallback:Xv,useContext:Rt,useEffect:Sm,useImperativeHandle:Yv,useInsertionEffect:Iv,useLayoutEffect:Uv,useMemo:qv,useReducer:zu,useRef:kv,useState:function(){return zu(Qo)},useDebugValue:xm,useDeferredValue:function(e,t){var n=ut();return Zv(n,He.memoizedState,e,t)},useTransition:function(){var e=zu(Qo)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:ms(e),t]},useSyncExternalStore:wv,useId:Kv,useHostTransitionStatus:Em,useFormState:Py,useActionState:Py,useOptimistic:function(e,t){var n=ut();return zv(n,He,e,t)},useMemoCache:vm,useCacheRefresh:Qv};Nm.useEffectEvent=Gv;var nb={readContext:Rt,use:Nc,useCallback:Xv,useContext:Rt,useEffect:Sm,useImperativeHandle:Yv,useInsertionEffect:Iv,useLayoutEffect:Uv,useMemo:qv,useReducer:Od,useRef:kv,useState:function(){return Od(Qo)},useDebugValue:xm,useDeferredValue:function(e,t){var n=ut();return He===null?_m(n,e,t):Zv(n,He.memoizedState,e,t)},useTransition:function(){var e=Od(Qo)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:ms(e),t]},useSyncExternalStore:wv,useId:Kv,useHostTransitionStatus:Em,useFormState:Hy,useActionState:Hy,useOptimistic:function(e,t){var n=ut();return He!==null?zv(n,He,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:vm,useCacheRefresh:Qv};nb.useEffectEvent=Gv;function zd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Np={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=En(),i=Ai(o);i.payload=t,n!=null&&(i.callback=n),t=Mi(e,i,o),t!==null&&(on(t,e,o),kl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=En(),i=Ai(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mi(e,i,o),t!==null&&(on(t,e,o),kl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=En(),o=Ai(n);o.tag=2,t!=null&&(o.callback=t),t=Mi(e,o,n),t!==null&&(on(t,e,n),kl(t,e,n))}};function Gy(e,t,n,o,i,a,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,r):t.prototype&&t.prototype.isPureReactComponent?!Kl(n,o)||!Kl(i,a):!0}function Iy(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&Np.enqueueReplaceState(t,t.state,null)}function ma(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function ob(e){ju(e)}function ib(e){console.error(e)}function ab(e){ju(e)}function nc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Uy(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Cp(e,t,n){return n=Ai(n),n.tag=3,n.payload={element:null},n.callback=function(){nc(e,t)},n}function rb(e){return e=Ai(e),e.tag=3,e}function lb(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){Uy(t,n,o)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Uy(t,n,o),typeof i!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var l=o.stack;this.componentDidCatch(o.value,{componentStack:l!==null?l:""})})}function aC(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&Pr(t,n,i,!0),n=Nn.current,n!==null){switch(n.tag){case 31:case 13:return Yn===null?lc():n.alternate===null&&at===0&&(at=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Qu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Xd(e,o,i)),!1;case 22:return n.flags|=65536,o===Qu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),Xd(e,o,i)),!1}throw Error(V(435,n.tag))}return Xd(e,o,i),lc(),!1}if(Te)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==pp&&(e=Error(V(422),{cause:o}),Wl(Un(e,n)))):(o!==pp&&(t=Error(V(423),{cause:o}),Wl(Un(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Un(o,n),i=Cp(e.stateNode,o,i),Rd(e,i),at!==4&&(at=2)),!1;var a=Error(V(520),{cause:o});if(a=Un(a,n),Xl===null?Xl=[a]:Xl.push(a),at!==4&&(at=2),t===null)return!0;o=Un(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Cp(n.stateNode,o,e),Rd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Di===null||!Di.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=rb(i),lb(i,e,n,o),Rd(n,i),!1}n=n.return}while(n!==null);return!1}var Cm=Error(V(461)),mt=!1;function At(e,t,n,o){t.child=e===null?xv(t,null,n,o):da(t,e.child,n,o)}function Vy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var r={};for(var l in o)l!=="ref"&&(r[l]=o[l])}else r=o;return fa(t),o=mm(e,t,n,r,a,i),l=hm(),e!==null&&!mt?(gm(e,t,i),Wo(e,t,i)):(Te&&l&&rm(t),t.flags|=1,At(e,t,o,i),t.child)}function Yy(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!am(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sb(e,t,a,o,i)):(e=Ru(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wm(e,i)){var r=a.memoizedProps;if(n=n.compare,n=n!==null?n:Kl,n(r,o)&&e.ref===t.ref)return Wo(e,t,i)}return t.flags|=1,e=Zo(a,o),e.ref=t.ref,e.return=t,t.child=e}function sb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Kl(a,o)&&e.ref===t.ref)if(mt=!1,t.pendingProps=o=a,wm(e,i))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,Wo(e,t,i)}return wp(e,t,n,o,i)}function ub(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return Xy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ou(t,a!==null?a.cachePool:null),a!==null?Oy(t,a):Sp(),Tv(t);else return o=t.lanes=536870912,Xy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Ou(t,a.cachePool),Oy(t,a),bi(t),t.memoizedState=null):(e!==null&&Ou(t,null),Sp(),bi(t));return At(e,t,i,n),t.child}function Ol(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xy(e,t,n,o,i){var a=um();return a=a===null?null:{parent:pt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ou(t,null),Sp(),Tv(t),e!==null&&Pr(e,t,o,!0),t.childLanes=i,null}function Bu(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qy(e,t,n){return da(t,e.child,null,n),e=Bu(t,t.pendingProps),e.flags|=2,yn(t),t.memoizedState=null,e}function rC(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(o.mode==="hidden")return e=Bu(t,o),t.lanes=536870912,Ol(null,e);if(xp(t),(e=qe)?(e=t1(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi!==null?{id:yo,overflow:vo}:null,retryLane:536870912,hydrationErrors:null},n=mv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return Bu(t,o)}var a=e.memoizedState;if(a!==null){var r=a.dehydrated;if(xp(t),i)if(t.flags&256)t.flags&=-257,t=qy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(V(558));else if(mt||Pr(e,t,n,!1),i=(n&e.childLanes)!==0,mt||i){if(o=ke,o!==null&&(r=I0(o,n),r!==0&&r!==a.retryLane))throw a.retryLane=r,va(e,r),on(o,e,r),Cm;lc(),t=qy(e,t,n)}else e=a.treeContext,qe=Xn(r.nextSibling),Dt=t,Te=!0,wi=null,Vn=!1,e!==null&&gv(t,e),t=Bu(t,o),t.flags|=4096;return t}return e=Zo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Pu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(V(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function wp(e,t,n,o,i){return fa(t),n=mm(e,t,n,o,void 0,i),o=hm(),e!==null&&!mt?(gm(e,t,i),Wo(e,t,i)):(Te&&o&&rm(t),t.flags|=1,At(e,t,n,i),t.child)}function Zy(e,t,n,o,i,a){return fa(t),t.updateQueue=null,n=Cv(t,o,n,i),Nv(e),o=hm(),e!==null&&!mt?(gm(e,t,a),Wo(e,t,a)):(Te&&o&&rm(t),t.flags|=1,At(e,t,n,a),t.child)}function jy(e,t,n,o,i){if(fa(t),t.stateNode===null){var a=dr,r=n.contextType;typeof r=="object"&&r!==null&&(a=Rt(r)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Np,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},fm(t),r=n.contextType,a.context=typeof r=="object"&&r!==null?Rt(r):dr,a.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(zd(t,n,r,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(r=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),r!==a.state&&Np.enqueueReplaceState(a,a.state,null),Il(t,o,a,i),Gl(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var l=t.memoizedProps,s=ma(n,l);a.props=s;var u=a.context,c=n.contextType;r=dr,typeof c=="object"&&c!==null&&(r=Rt(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l||u!==r)&&Iy(t,a,o,r),gi=!1;var f=t.memoizedState;a.state=f,Il(t,o,a,i),Gl(),u=t.memoizedState,l||f!==u||gi?(typeof d=="function"&&(zd(t,n,d,o),u=t.memoizedState),(s=gi||Gy(t,n,s,o,f,u,r))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=r,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,vp(e,t),r=t.memoizedProps,c=ma(n,r),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=dr,typeof u=="object"&&u!==null&&(s=Rt(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r!==d||f!==s)&&Iy(t,a,o,s),gi=!1,f=t.memoizedState,a.state=f,Il(t,o,a,i),Gl();var p=t.memoizedState;r!==d||f!==p||gi||e!==null&&e.dependencies!==null&&Ku(e.dependencies)?(typeof l=="function"&&(zd(t,n,l,o),p=t.memoizedState),(c=gi||Gy(t,n,c,o,f,p,s)||e!==null&&e.dependencies!==null&&Ku(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,p,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,p,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=p),a.props=o,a.state=p,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Pu(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=da(t,e.child,null,i),t.child=da(t,null,n,i)):At(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Wo(e,t,i),e}function $y(e,t,n,o){return ca(),t.flags|=256,At(e,t,n,o),t.child}var Ld={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bd(e){return{baseLanes:e,cachePool:vv()}}function Pd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=bn),e}function cb(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,r;if((r=a)||(r=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),r&&(i=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(i?vi(t):bi(t),(e=qe)?(e=t1(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Bi!==null?{id:yo,overflow:vo}:null,retryLane:536870912,hydrationErrors:null},n=mv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Pi(t);return Up(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,i?(bi(t),i=t.mode,l=oc({mode:"hidden",children:l},i),o=ra(o,i,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,o=t.child,o.memoizedState=Bd(n),o.childLanes=Pd(e,r,n),t.memoizedState=Ld,Ol(null,o)):(vi(t),Ap(t,l))}var s=e.memoizedState;if(s!==null&&(l=s.dehydrated,l!==null)){if(a)t.flags&256?(vi(t),t.flags&=-257,t=Hd(e,t,n)):t.memoizedState!==null?(bi(t),t.child=e.child,t.flags|=128,t=null):(bi(t),l=o.fallback,i=t.mode,o=oc({mode:"visible",children:o.children},i),l=ra(l,i,n,null),l.flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,da(t,e.child,null,n),o=t.child,o.memoizedState=Bd(n),o.childLanes=Pd(e,r,n),t.memoizedState=Ld,t=Ol(null,o));else if(vi(t),Up(l)){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;r=u,o=Error(V(419)),o.stack="",o.digest=r,Wl({value:o,source:null,stack:null}),t=Hd(e,t,n)}else if(mt||Pr(e,t,n,!1),r=(n&e.childLanes)!==0,mt||r){if(r=ke,r!==null&&(o=I0(r,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,va(e,o),on(r,e,o),Cm;Ip(l)||lc(),t=Hd(e,t,n)}else Ip(l)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Xn(l.nextSibling),Dt=t,Te=!0,wi=null,Vn=!1,e!==null&&gv(t,e),t=Ap(t,o.children),t.flags|=4096);return t}return i?(bi(t),l=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Zo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?l=Zo(u,l):(l=ra(l,i,n,null),l.flags|=2),l.return=t,o.return=t,o.sibling=l,t.child=o,Ol(null,o),o=t.child,l=e.child.memoizedState,l===null?l=Bd(n):(i=l.cachePool,i!==null?(s=pt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=vv(),l={baseLanes:l.baseLanes|n,cachePool:i}),o.memoizedState=l,o.childLanes=Pd(e,r,n),t.memoizedState=Ld,Ol(e.child,o)):(vi(t),n=e.child,e=n.sibling,n=Zo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Ap(e,t){return t=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function Hd(e,t,n){return da(t,e.child,null,n),e=Ap(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),hp(e.return,t,n)}function kd(e,t,n,o,i,a){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=o,r.tail=n,r.tailMode=i,r.treeForkCount=a)}function fb(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var r=st.current,l=(r&2)!==0;if(l?(r=r&1|2,t.flags|=128):r&=1,Ie(st,r),At(e,t,o,n),o=Te?Ql:0,!l&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fy(e,n,t);else if(e.tag===19)Fy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ju(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),kd(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ju(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}kd(t,!0,n,null,a,o);break;case"together":kd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Wo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ki|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Pr(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=Zo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ku(e)))}function lC(e,t,n){switch(t.tag){case 3:Yu(t,t.stateNode.containerInfo),yi(t,pt,e.memoizedState.cache),ca();break;case 27:case 5:np(t);break;case 4:Yu(t,t.stateNode.containerInfo);break;case 10:yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(vi(t),t.flags|=128,null):(n&t.child.childLanes)!==0?cb(e,t,n):(vi(t),e=Wo(e,t,n),e!==null?e.sibling:null);vi(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(Pr(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return fb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(st,st.current),o)break;return null;case 22:return t.lanes=0,ub(e,t,n,t.pendingProps);case 24:yi(t,pt,e.memoizedState.cache)}return Wo(e,t,n)}function db(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!wm(e,n)&&(t.flags&128)===0)return mt=!1,lC(e,t,n);mt=(e.flags&131072)!==0}else mt=!1,Te&&(t.flags&1048576)!==0&&hv(t,Ql,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=oa(t.elementType),t.type=e,typeof e=="function")am(e)?(o=ma(e,o),t.tag=1,t=jy(null,t,e,o,n)):(t.tag=0,t=wp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===qp){t.tag=11,t=Vy(null,t,e,o,n);break e}else if(i===Zp){t.tag=14,t=Yy(null,t,e,o,n);break e}}throw t=ep(e)||e,Error(V(306,t,""))}}return t;case 0:return wp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ma(o,t.pendingProps),jy(e,t,o,i,n);case 3:e:{if(Yu(t,t.stateNode.containerInfo),e===null)throw Error(V(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,vp(e,t),Il(t,o,null,n);var r=t.memoizedState;if(o=r.cache,yi(t,pt,o),o!==a.cache&&gp(t,[pt],n,!0),Gl(),o=r.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=$y(e,t,o,n);break e}else if(o!==i){i=Un(Error(V(424)),t),Wl(i),t=$y(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Xn(e.firstChild),Dt=t,Te=!0,wi=null,Vn=!0,n=xv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ca(),o===i){t=Wo(e,t,n);break e}At(e,t,o,n)}t=t.child}return t;case 26:return Pu(e,t),e===null?(n=y0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(n=t.type,e=t.pendingProps,o=fc(Ci.current).createElement(n),o[Mt]=t,o[an]=e,Ot(o,n,e),Nt(o),t.stateNode=o):t.memoizedState=y0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return np(t),e===null&&Te&&(o=t.stateNode=n1(t.type,t.pendingProps,Ci.current),Dt=t,Vn=!0,i=qe,Ii(t.type)?(Vp=i,qe=Xn(o.firstChild)):qe=i),At(e,t,t.pendingProps.children,n),Pu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((i=o=qe)&&(o=BC(o,t.type,t.pendingProps,Vn),o!==null?(t.stateNode=o,Dt=t,qe=Xn(o.firstChild),Vn=!1,i=!0):i=!1),i||Pi(t)),np(t),i=t.type,a=t.pendingProps,r=e!==null?e.memoizedProps:null,o=a.children,kp(i,a)?o=null:r!==null&&kp(i,r)&&(t.flags|=32),t.memoizedState!==null&&(i=mm(e,t,W2,null,null,n),is._currentValue=i),Pu(e,t),At(e,t,o,n),t.child;case 6:return e===null&&Te&&((e=n=qe)&&(n=PC(n,t.pendingProps,Vn),n!==null?(t.stateNode=n,Dt=t,qe=null,e=!0):e=!1),e||Pi(t)),null;case 13:return cb(e,t,n);case 4:return Yu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=da(t,null,o,n):At(e,t,o,n),t.child;case 11:return Vy(e,t,t.type,t.pendingProps,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,yi(t,t.type,o.value),At(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,fa(t),i=Rt(i),o=o(i),t.flags|=1,At(e,t,o,n),t.child;case 14:return Yy(e,t,t.type,t.pendingProps,n);case 15:return sb(e,t,t.type,t.pendingProps,n);case 19:return fb(e,t,n);case 31:return rC(e,t,n);case 22:return ub(e,t,n,t.pendingProps);case 24:return fa(t),o=Rt(pt),e===null?(i=um(),i===null&&(i=ke,a=sm(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},fm(t),yi(t,pt,i)):((e.lanes&n)!==0&&(vp(e,t),Il(t,null,null,n),Gl()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),yi(t,pt,o)):(o=a.cache,yi(t,pt,o),o!==i.cache&&gp(t,[pt],n,!0))),At(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(V(156,t.tag))}function Ho(e){e.flags|=4}function Gd(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pb())e.flags|=8192;else throw sa=Qu,cm}else e.flags&=-16777217}function Ky(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!a1(t))if(Pb())e.flags|=8192;else throw sa=Qu,cm}function Su(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H0():536870912,e.lanes|=t,Mr|=t)}function Nl(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function sC(e,t,n){var o=t.pendingProps;switch(lm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),jo(pt),Er(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(er(t)?Ho(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dd())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ho(t),a!==null?(Xe(t),Ky(t,a)):(Xe(t),Gd(t,i,null,o,n))):a?a!==e.memoizedState?(Ho(t),Xe(t),Ky(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Ho(t),Xe(t),Gd(t,i,e,o,n)),null;case 27:if(Xu(t),n=Ci.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Ho(t);else{if(!o){if(t.stateNode===null)throw Error(V(166));return Xe(t),null}e=So.current,er(t)?Ny(t,e):(e=n1(i,o,n),t.stateNode=e,Ho(t))}return Xe(t),null;case 5:if(Xu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Ho(t);else{if(!o){if(t.stateNode===null)throw Error(V(166));return Xe(t),null}if(a=So.current,er(t))Ny(t,a);else{var r=fc(Ci.current);switch(a){case 1:a=r.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=r.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=r.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=r.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=r.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?r.createElement("select",{is:o.is}):r.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?r.createElement(i,{is:o.is}):r.createElement(i)}}a[Mt]=t,a[an]=o;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)a.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=a;e:switch(Ot(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Ho(t)}}return Xe(t),Gd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Ho(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(V(166));if(e=Ci.current,er(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Dt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Wb(e.nodeValue,n)),e||Pi(t,!0)}else e=fc(e).createTextNode(o),e[Mt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=er(t),n!==null){if(e===null){if(!o)throw Error(V(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(557));e[Mt]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(yn(t),t):(yn(t),null);if((t.flags&128)!==0)throw Error(V(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=er(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[Mt]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Dd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(yn(t),t):(yn(t),null)}return yn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Su(t,t.updateQueue),Xe(t),null);case 4:return Er(),e===null&&Lm(t.stateNode.containerInfo),Xe(t),null;case 10:return jo(t.type),Xe(t),null;case 19:if(Ct(st),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)Nl(o,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Ju(e),a!==null){for(t.flags|=128,Nl(o,!1),e=a.updateQueue,t.updateQueue=e,Su(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pv(n,e),n=n.sibling;return Ie(st,st.current&1|2),Te&&Uo(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&Sn()>ac&&(t.flags|=128,i=!0,Nl(o,!1),t.lanes=4194304)}else{if(!i)if(e=Ju(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Su(t,e),Nl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Te)return Xe(t),null}else 2*Sn()-o.renderingStartTime>ac&&n!==536870912&&(t.flags|=128,i=!0,Nl(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Sn(),e.sibling=null,n=st.current,Ie(st,i?n&1|2:n&1),Te&&Uo(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return yn(t),dm(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&Su(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Ct(la),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),jo(pt),Xe(t),null;case 25:return null;case 30:return null}throw Error(V(156,t.tag))}function uC(e,t){switch(lm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(pt),Er(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xu(t),null;case 31:if(t.memoizedState!==null){if(yn(t),t.alternate===null)throw Error(V(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ct(st),null;case 4:return Er(),null;case 10:return jo(t.type),null;case 22:case 23:return yn(t),dm(),e!==null&&Ct(la),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return jo(pt),null;case 25:return null;default:return null}}function pb(e,t){switch(lm(t),t.tag){case 3:jo(pt),Er();break;case 26:case 27:case 5:Xu(t);break;case 4:Er();break;case 31:t.memoizedState!==null&&yn(t);break;case 13:yn(t);break;case 19:Ct(st);break;case 10:jo(t.type);break;case 22:case 23:yn(t),dm(),e!==null&&Ct(la);break;case 24:jo(pt)}}function hs(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,r=n.inst;o=a(),r.destroy=o}n=n.next}while(n!==i)}}catch(l){ze(t,t.return,l)}}function Hi(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var r=o.inst,l=r.destroy;if(l!==void 0){r.destroy=void 0,i=t;var s=n,u=l;try{u()}catch(c){ze(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){ze(t,t.return,c)}}function mb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ev(t,n)}catch(o){ze(e,e.return,o)}}}function hb(e,t,n){n.props=ma(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){ze(e,t,o)}}function Vl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){ze(e,t,i)}}function bo(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){ze(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){ze(e,t,i)}else n.current=null}function gb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){ze(e,e.return,i)}}function Id(e,t,n){try{var o=e.stateNode;MC(o,e.type,n,t),o[an]=t}catch(i){ze(e,e.return,i)}}function yb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ii(e.type)||e.tag===4}function Ud(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ii(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mp(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xo));else if(o!==4&&(o===27&&Ii(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Mp(e,t,n),e=e.sibling;e!==null;)Mp(e,t,n),e=e.sibling}function ic(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&Ii(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}function vb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ot(t,o,n),t[Mt]=e,t[an]=n}catch(a){ze(e,e.return,a)}}var Vo=!1,dt=!1,Vd=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function cC(e,t){if(e=e.containerInfo,Pp=hc,e=av(e),nm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var r=0,l=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=r+i),d!==a||o!==0&&d.nodeType!==3||(s=r+o),d.nodeType===3&&(r+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=r),f===a&&++c===o&&(s=r),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hp={focusedElem:e,selectionRange:n},hc=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){switch(t=Tt,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=ma(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){ze(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Gp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(V(163))}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}}function bb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Go(e,n),o&4&&hs(5,n);break;case 1:if(Go(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){ze(n,n.return,r)}else{var i=ma(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){ze(n,n.return,r)}}o&64&&mb(n),o&512&&Vl(n,n.return);break;case 3:if(Go(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ev(e,t)}catch(r){ze(n,n.return,r)}}break;case 27:t===null&&o&4&&vb(n);case 26:case 5:Go(e,n),t===null&&o&4&&gb(n),o&512&&Vl(n,n.return);break;case 12:Go(e,n);break;case 31:Go(e,n),o&4&&_b(e,n);break;case 13:Go(e,n),o&4&&Eb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bC.bind(null,n),HC(e,n))));break;case 22:if(o=n.memoizedState!==null||Vo,!o){t=t!==null&&t.memoizedState!==null||dt,i=Vo;var a=dt;Vo=o,(dt=t)&&!a?Io(e,n,(n.subtreeFlags&8772)!==0):Go(e,n),Vo=i,dt=a}break;case 30:break;default:Go(e,n)}}function Sb(e){var t=e.alternate;t!==null&&(e.alternate=null,Sb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Kp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,tn=!1;function ko(e,t,n){for(n=n.child;n!==null;)xb(e,t,n),n=n.sibling}function xb(e,t,n){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(ss,n)}catch{}switch(n.tag){case 26:dt||bo(n,t),ko(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:dt||bo(n,t);var o=Ke,i=tn;Ii(n.type)&&(Ke=n.stateNode,tn=!1),ko(e,t,n),Zl(n.stateNode),Ke=o,tn=i;break;case 5:dt||bo(n,t);case 6:if(o=Ke,i=tn,Ke=null,ko(e,t,n),Ke=o,tn=i,Ke!==null)if(tn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){ze(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){ze(n,t,a)}break;case 18:Ke!==null&&(tn?(e=Ke,d0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),zr(e)):d0(Ke,n.stateNode));break;case 4:o=Ke,i=tn,Ke=n.stateNode.containerInfo,tn=!0,ko(e,t,n),Ke=o,tn=i;break;case 0:case 11:case 14:case 15:Hi(2,n,t),dt||Hi(4,n,t),ko(e,t,n);break;case 1:dt||(bo(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&hb(n,t,o)),ko(e,t,n);break;case 21:ko(e,t,n);break;case 22:dt=(o=dt)||n.memoizedState!==null,ko(e,t,n),dt=o;break;default:ko(e,t,n)}}function _b(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zr(e)}catch(n){ze(t,t.return,n)}}}function Eb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zr(e)}catch(n){ze(t,t.return,n)}}function fC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qy),t;default:throw Error(V(435,e.tag))}}function xu(e,t){var n=fC(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=SC.bind(null,e,o);o.then(i,i)}})}function Jt(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,r=t,l=r;e:for(;l!==null;){switch(l.tag){case 27:if(Ii(l.type)){Ke=l.stateNode,tn=!1;break e}break;case 5:Ke=l.stateNode,tn=!1;break e;case 3:case 4:Ke=l.stateNode.containerInfo,tn=!0;break e}l=l.return}if(Ke===null)throw Error(V(160));xb(a,r,i),Ke=null,tn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tb(t,e),t=t.sibling}var eo=null;function Tb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),en(e),o&4&&(Hi(3,e,e.return),hs(3,e),Hi(5,e,e.return));break;case 1:Jt(t,e),en(e),o&512&&(dt||n===null||bo(n,n.return)),o&64&&Vo&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=eo;if(Jt(t,e),en(e),o&512&&(dt||n===null||bo(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[fs]||a[Mt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Ot(a,o,n),a[Mt]=e,Nt(a),o=a;break e;case"link":var r=b0("link","href",i).get(o+(n.href||""));if(r){for(var l=0;l<r.length;l++)if(a=r[l],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(l,1);break t}}a=i.createElement(o),Ot(a,o,n),i.head.appendChild(a);break;case"meta":if(r=b0("meta","content",i).get(o+(n.content||""))){for(l=0;l<r.length;l++)if(a=r[l],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(l,1);break t}}a=i.createElement(o),Ot(a,o,n),i.head.appendChild(a);break;default:throw Error(V(468,o))}a[Mt]=e,Nt(a),o=a}e.stateNode=o}else S0(i,e.type,e.stateNode);else e.stateNode=v0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?S0(i,e.type,e.stateNode):v0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Id(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jt(t,e),en(e),o&512&&(dt||n===null||bo(n,n.return)),n!==null&&o&4&&Id(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jt(t,e),en(e),o&512&&(dt||n===null||bo(n,n.return)),e.flags&32){i=e.stateNode;try{Nr(i,"")}catch(v){ze(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Id(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Vd=!0);break;case 6:if(Jt(t,e),en(e),o&4){if(e.stateNode===null)throw Error(V(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){ze(e,e.return,v)}}break;case 3:if(Gu=null,i=eo,eo=dc(t.containerInfo),Jt(t,e),eo=i,en(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{zr(t.containerInfo)}catch(v){ze(e,e.return,v)}Vd&&(Vd=!1,Nb(e));break;case 4:o=eo,eo=dc(e.stateNode.containerInfo),Jt(t,e),en(e),eo=o;break;case 12:Jt(t,e),en(e);break;case 31:Jt(t,e),en(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,xu(e,o)));break;case 13:Jt(t,e),en(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ac=Sn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,xu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Vo,c=dt;if(Vo=u||i,dt=c||s,Jt(t,e),dt=c,Vo=u,en(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Vo||dt||ia(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)r=a.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{l=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){ze(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){ze(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var p=s.stateNode;i?p0(p,!0):p0(s.stateNode,!1)}catch(v){ze(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,xu(e,n))));break;case 19:Jt(t,e),en(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,xu(e,o)));break;case 30:break;case 21:break;default:Jt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(yb(o)){n=o;break}o=o.return}if(n==null)throw Error(V(160));switch(n.tag){case 27:var i=n.stateNode,a=Ud(e);ic(e,a,i);break;case 5:var r=n.stateNode;n.flags&32&&(Nr(r,""),n.flags&=-33);var l=Ud(e);ic(e,l,r);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Ud(e);Mp(e,u,s);break;default:throw Error(V(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Go(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bb(e,t.alternate,t),t=t.sibling}function ia(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hi(4,t,t.return),ia(t);break;case 1:bo(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&hb(t,t.return,n),ia(t);break;case 27:Zl(t.stateNode);case 26:case 5:bo(t,t.return),ia(t);break;case 22:t.memoizedState===null&&ia(t);break;case 30:ia(t);break;default:ia(t)}e=e.sibling}}function Io(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,r=a.flags;switch(a.tag){case 0:case 11:case 15:Io(i,a,n),hs(4,a);break;case 1:if(Io(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){ze(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var l=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)_v(s[i],l)}catch(u){ze(o,o.return,u)}}n&&r&64&&mb(a),Vl(a,a.return);break;case 27:vb(a);case 26:case 5:Io(i,a,n),n&&o===null&&r&4&&gb(a),Vl(a,a.return);break;case 12:Io(i,a,n);break;case 31:Io(i,a,n),n&&r&4&&_b(i,a);break;case 13:Io(i,a,n),n&&r&4&&Eb(i,a);break;case 22:a.memoizedState===null&&Io(i,a,n),Vl(a,a.return);break;case 30:break;default:Io(i,a,n)}t=t.sibling}}function Am(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ps(n))}function Mm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e))}function Jn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cb(e,t,n,o),t=t.sibling}function Cb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,n,o),i&2048&&hs(9,t);break;case 1:Jn(e,t,n,o);break;case 3:Jn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e)));break;case 12:if(i&2048){Jn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,r=a.id,l=a.onPostCommit;typeof l=="function"&&l(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){ze(t,t.return,s)}}else Jn(e,t,n,o);break;case 31:Jn(e,t,n,o);break;case 13:Jn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,r=t.alternate,t.memoizedState!==null?a._visibility&2?Jn(e,t,n,o):Yl(e,t):a._visibility&2?Jn(e,t,n,o):(a._visibility|=2,nr(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Am(r,t);break;case 24:Jn(e,t,n,o),i&2048&&Mm(t.alternate,t);break;default:Jn(e,t,n,o)}}function nr(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,r=t,l=n,s=o,u=r.flags;switch(r.tag){case 0:case 11:case 15:nr(a,r,l,s,i),hs(8,r);break;case 23:break;case 22:var c=r.stateNode;r.memoizedState!==null?c._visibility&2?nr(a,r,l,s,i):Yl(a,r):(c._visibility|=2,nr(a,r,l,s,i)),i&&u&2048&&Am(r.alternate,r);break;case 24:nr(a,r,l,s,i),i&&u&2048&&Mm(r.alternate,r);break;default:nr(a,r,l,s,i)}t=t.sibling}}function Yl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:Yl(n,o),i&2048&&Am(o.alternate,o);break;case 24:Yl(n,o),i&2048&&Mm(o.alternate,o);break;default:Yl(n,o)}t=t.sibling}}var zl=8192;function tr(e,t,n){if(e.subtreeFlags&zl)for(e=e.child;e!==null;)wb(e,t,n),e=e.sibling}function wb(e,t,n){switch(e.tag){case 26:tr(e,t,n),e.flags&zl&&e.memoizedState!==null&&FC(n,eo,e.memoizedState,e.memoizedProps);break;case 5:tr(e,t,n);break;case 3:case 4:var o=eo;eo=dc(e.stateNode.containerInfo),tr(e,t,n),eo=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=zl,zl=16777216,tr(e,t,n),zl=o):tr(e,t,n));break;default:tr(e,t,n)}}function Ab(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Cl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Tt=o,Db(o,e)}Ab(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mb(e),e=e.sibling}function Mb(e){switch(e.tag){case 0:case 11:case 15:Cl(e),e.flags&2048&&Hi(9,e,e.return);break;case 3:Cl(e);break;case 12:Cl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hu(e)):Cl(e);break;default:Cl(e)}}function Hu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Tt=o,Db(o,e)}Ab(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hi(8,t,t.return),Hu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hu(t));break;default:Hu(t)}e=e.sibling}}function Db(e,t){for(;Tt!==null;){var n=Tt;switch(n.tag){case 0:case 11:case 15:Hi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ps(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,Tt=o;else e:for(n=e;Tt!==null;){o=Tt;var i=o.sibling,a=o.return;if(Sb(o),o===n){Tt=null;break e}if(i!==null){i.return=a,Tt=i;break e}Tt=a}}}var dC={getCacheForType:function(e){var t=Rt(pt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(pt).controller.signal}},pC=typeof WeakMap=="function"?WeakMap:Map,Ae=0,ke=null,be=null,Ee=0,Oe=0,gn=null,Ei=!1,kr=!1,Dm=!1,Jo=0,at=0,ki=0,ua=0,Rm=0,bn=0,Mr=0,Xl=null,nn=null,Dp=!1,Ac=0,Rb=0,ac=1/0,rc=null,Di=null,vt=0,Ri=null,Dr=null,$o=0,Rp=0,Op=null,Ob=null,ql=0,zp=null;function En(){return(Ae&2)!==0&&Ee!==0?Ee&-Ee:fe.T!==null?zm():U0()}function zb(){if(bn===0)if((Ee&536870912)===0||Te){var e=fu;fu<<=1,(fu&3932160)===0&&(fu=262144),bn=e}else bn=536870912;return e=Nn.current,e!==null&&(e.flags|=32),bn}function on(e,t,n){(e===ke&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Rr(e,0),Ti(e,Ee,bn,!1)),cs(e,n),((Ae&2)===0||e!==ke)&&(e===ke&&((Ae&2)===0&&(ua|=n),at===4&&Ti(e,Ee,bn,!1)),_o(e))}function Lb(e,t,n){if((Ae&6)!==0)throw Error(V(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||us(e,t),i=o?gC(e,t):Yd(e,t,!0),a=o;do{if(i===0){kr&&!o&&Ti(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!mC(n)){i=Yd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var l=e;i=Xl;var s=l.current.memoizedState.isDehydrated;if(s&&(Rr(l,r).flags|=256),r=Yd(l,r,!1),r!==2){if(Dm&&!s){l.errorRecoveryDisabledLanes|=a,ua|=a,i=4;break e}a=nn,nn=i,a!==null&&(nn===null?nn=a:nn.push.apply(nn,a))}i=r}if(a=!1,i!==2)continue}}if(i===1){Rr(e,0),Ti(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(V(345));case 4:if((t&4194048)!==t)break;case 6:Ti(o,t,bn,!Ei);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(V(329))}if((t&62914560)===t&&(i=Ac+300-Sn(),10<i)){if(Ti(o,t,bn,!Ei),yc(o,0,!0)!==0)break e;$o=t,o.timeoutHandle=e1(Wy.bind(null,o,n,nn,rc,Dp,t,bn,ua,Mr,Ei,a,"Throttled",-0,0),i);break e}Wy(o,n,nn,rc,Dp,t,bn,ua,Mr,Ei,a,null,-0,0)}}break}while(!0);_o(e)}function Wy(e,t,n,o,i,a,r,l,s,u,c,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xo},wb(t,a,d);var v=(a&62914560)===a?Ac-Sn():(a&4194048)===a?Rb-Sn():0;if(v=KC(d,v),v!==null){$o=a,e.cancelPendingCommit=v(e0.bind(null,e,t,a,n,o,i,r,l,s,c,d,null,f,p)),Ti(e,a,r,!u);return}}e0(e,t,a,n,o,i,r,l,s)}function mC(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!Tn(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ti(e,t,n,o){t&=~Rm,t&=~ua,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-_n(i),r=1<<a;o[a]=-1,i&=~r}n!==0&&k0(e,n,t)}function Mc(){return(Ae&6)===0?(gs(0,!1),!1):!0}function Om(){if(be!==null){if(Oe===0)var e=be.return;else e=be,qo=ba=null,ym(e),Sr=null,Jl=0,e=be;for(;e!==null;)pb(e.alternate,e),e=e.return;be=null}}function Rr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,OC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),$o=0,Om(),ke=e,be=n=Zo(e.current,null),Ee=t,Oe=0,gn=null,Ei=!1,kr=us(e,t),Dm=!1,Mr=bn=Rm=ua=ki=at=0,nn=Xl=null,Dp=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-_n(o),a=1<<i;t|=e[i],o&=~a}return Jo=t,xc(),n}function Bb(e,t){he=null,fe.H=ts,t===Hr||t===Ec?(t=Dy(),Oe=3):t===cm?(t=Dy(),Oe=4):Oe=t===Cm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gn=t,be===null&&(at=1,nc(e,Un(t,e.current)))}function Pb(){var e=Nn.current;return e===null?!0:(Ee&4194048)===Ee?Yn===null:(Ee&62914560)===Ee||(Ee&536870912)!==0?e===Yn:!1}function Hb(){var e=fe.H;return fe.H=ts,e===null?ts:e}function kb(){var e=fe.A;return fe.A=dC,e}function lc(){at=4,Ei||(Ee&4194048)!==Ee&&Nn.current!==null||(kr=!0),(ki&134217727)===0&&(ua&134217727)===0||ke===null||Ti(ke,Ee,bn,!1)}function Yd(e,t,n){var o=Ae;Ae|=2;var i=Hb(),a=kb();(ke!==e||Ee!==t)&&(rc=null,Rr(e,t)),t=!1;var r=at;e:do try{if(Oe!==0&&be!==null){var l=be,s=gn;switch(Oe){case 8:Om(),r=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var u=Oe;if(Oe=0,gn=null,hr(e,l,s,u),n&&kr){r=0;break e}break;default:u=Oe,Oe=0,gn=null,hr(e,l,s,u)}}hC(),r=at;break}catch(c){Bb(e,c)}while(!0);return t&&e.shellSuspendCounter++,qo=ba=null,Ae=o,fe.H=i,fe.A=a,be===null&&(ke=null,Ee=0,xc()),r}function hC(){for(;be!==null;)Gb(be)}function gC(e,t){var n=Ae;Ae|=2;var o=Hb(),i=kb();ke!==e||Ee!==t?(rc=null,ac=Sn()+500,Rr(e,t)):kr=us(e,t);e:do try{if(Oe!==0&&be!==null){t=be;var a=gn;t:switch(Oe){case 1:Oe=0,gn=null,hr(e,t,a,1);break;case 2:case 9:if(My(a)){Oe=0,gn=null,Jy(t);break}t=function(){Oe!==2&&Oe!==9||ke!==e||(Oe=7),_o(e)},a.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:My(a)?(Oe=0,gn=null,Jy(t)):(Oe=0,gn=null,hr(e,t,a,7));break;case 5:var r=null;switch(be.tag){case 26:r=be.memoizedState;case 5:case 27:var l=be;if(r?a1(r):l.stateNode.complete){Oe=0,gn=null;var s=l.sibling;if(s!==null)be=s;else{var u=l.return;u!==null?(be=u,Dc(u)):be=null}break t}}Oe=0,gn=null,hr(e,t,a,5);break;case 6:Oe=0,gn=null,hr(e,t,a,6);break;case 8:Om(),at=6;break e;default:throw Error(V(462))}}yC();break}catch(c){Bb(e,c)}while(!0);return qo=ba=null,fe.H=o,fe.A=i,Ae=n,be!==null?0:(ke=null,Ee=0,xc(),at)}function yC(){for(;be!==null&&!IN();)Gb(be)}function Gb(e){var t=db(e.alternate,e,Jo);e.memoizedProps=e.pendingProps,t===null?Dc(e):be=t}function Jy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zy(n,t,t.pendingProps,t.type,void 0,Ee);break;case 11:t=Zy(n,t,t.pendingProps,t.type.render,t.ref,Ee);break;case 5:ym(t);default:pb(n,t),t=be=pv(t,Jo),t=db(n,t,Jo)}e.memoizedProps=e.pendingProps,t===null?Dc(e):be=t}function hr(e,t,n,o){qo=ba=null,ym(t),Sr=null,Jl=0;var i=t.return;try{if(aC(e,i,t,n,Ee)){at=1,nc(e,Un(n,e.current)),be=null;return}}catch(a){if(i!==null)throw be=i,a;at=1,nc(e,Un(n,e.current)),be=null;return}t.flags&32768?(Te||o===1?e=!0:kr||(Ee&536870912)!==0?e=!1:(Ei=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Ib(t,e)):Dc(t)}function Dc(e){var t=e;do{if((t.flags&32768)!==0){Ib(t,Ei);return}e=t.return;var n=sC(t.alternate,t,Jo);if(n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);at===0&&(at=5)}function Ib(e,t){do{var n=uC(e.alternate,e);if(n!==null){n.flags&=32767,be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=n}while(e!==null);at=6,be=null}function e0(e,t,n,o,i,a,r,l,s){e.cancelPendingCommit=null;do Rc();while(vt!==0);if((Ae&6)!==0)throw Error(V(327));if(t!==null){if(t===e.current)throw Error(V(177));if(a=t.lanes|t.childLanes,a|=om,KN(e,n,a,r,l,s),e===ke&&(be=ke=null,Ee=0),Dr=t,Ri=e,$o=n,Rp=a,Op=i,Ob=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xC(qu,function(){return qb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=fe.T,fe.T=null,i=Me.p,Me.p=2,r=Ae,Ae|=4;try{cC(e,t,n)}finally{Ae=r,Me.p=i,fe.T=o}}vt=1,Ub(),Vb(),Yb()}}function Ub(){if(vt===1){vt=0;var e=Ri,t=Dr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=fe.T,fe.T=null;var o=Me.p;Me.p=2;var i=Ae;Ae|=4;try{Tb(t,e);var a=Hp,r=av(e.containerInfo),l=a.focusedElem,s=a.selectionRange;if(r!==l&&l&&l.ownerDocument&&iv(l.ownerDocument.documentElement,l)){if(s!==null&&nm(l)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(c,l.value.length);else{var d=l.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),v=l.textContent.length,b=Math.min(s.start,v),x=s.end===void 0?b:Math.min(s.end,v);!p.extend&&b>x&&(r=x,x=b,b=r);var g=_y(l,b),h=_y(l,x);if(g&&h&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==h.node||p.focusOffset!==h.offset)){var m=d.createRange();m.setStart(g.node,g.offset),p.removeAllRanges(),b>x?(p.addRange(m),p.extend(h.node,h.offset)):(m.setEnd(h.node,h.offset),p.addRange(m))}}}}for(d=[],p=l;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<d.length;l++){var y=d[l];y.element.scrollLeft=y.left,y.element.scrollTop=y.top}}hc=!!Pp,Hp=Pp=null}finally{Ae=i,Me.p=o,fe.T=n}}e.current=t,vt=2}}function Vb(){if(vt===2){vt=0;var e=Ri,t=Dr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=fe.T,fe.T=null;var o=Me.p;Me.p=2;var i=Ae;Ae|=4;try{bb(e,t.alternate,t)}finally{Ae=i,Me.p=o,fe.T=n}}vt=3}}function Yb(){if(vt===4||vt===3){vt=0,UN();var e=Ri,t=Dr,n=$o,o=Ob;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,Dr=Ri=null,Xb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Di=null),Fp(n),t=t.stateNode,xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(ss,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=fe.T,i=Me.p,Me.p=2,fe.T=null;try{for(var a=e.onRecoverableError,r=0;r<o.length;r++){var l=o[r];a(l.value,{componentStack:l.stack})}}finally{fe.T=t,Me.p=i}}($o&3)!==0&&Rc(),_o(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===zp?ql++:(ql=0,zp=e):ql=0,gs(0,!1)}}function Xb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ps(t)))}function Rc(){return Ub(),Vb(),Yb(),qb()}function qb(){if(vt!==5)return!1;var e=Ri,t=Rp;Rp=0;var n=Fp($o),o=fe.T,i=Me.p;try{Me.p=32>n?32:n,fe.T=null,n=Op,Op=null;var a=Ri,r=$o;if(vt=0,Dr=Ri=null,$o=0,(Ae&6)!==0)throw Error(V(331));var l=Ae;if(Ae|=4,Mb(a.current),Cb(a,a.current,r,n),Ae=l,gs(0,!1),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(ss,a)}catch{}return!0}finally{Me.p=i,fe.T=o,Xb(e,t)}}function t0(e,t,n){t=Un(n,t),t=Cp(e.stateNode,t,2),e=Mi(e,t,2),e!==null&&(cs(e,2),_o(e))}function ze(e,t,n){if(e.tag===3)t0(e,e,n);else for(;t!==null;){if(t.tag===3){t0(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Di===null||!Di.has(o))){e=Un(n,e),n=rb(2),o=Mi(t,n,2),o!==null&&(lb(n,o,t,e),cs(o,2),_o(o));break}}t=t.return}}function Xd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new pC;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Dm=!0,i.add(n),e=vC.bind(null,e,t,n),t.then(e,e))}function vC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(Ee&n)===n&&(at===4||at===3&&(Ee&62914560)===Ee&&300>Sn()-Ac?(Ae&2)===0&&Rr(e,0):Rm|=n,Mr===Ee&&(Mr=0)),_o(e)}function Zb(e,t){t===0&&(t=H0()),e=va(e,t),e!==null&&(cs(e,t),_o(e))}function bC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zb(e,n)}function SC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(V(314))}o!==null&&o.delete(t),Zb(e,n)}function xC(e,t){return jp(e,t)}var sc=null,or=null,Lp=!1,uc=!1,qd=!1,Ni=0;function _o(e){e!==or&&e.next===null&&(or===null?sc=or=e:or=or.next=e),uc=!0,Lp||(Lp=!0,EC())}function gs(e,t){if(!qd&&uc){qd=!0;do for(var n=!1,o=sc;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var r=o.suspendedLanes,l=o.pingedLanes;a=(1<<31-_n(42|e)+1)-1,a&=i&~(r&~l),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,n0(o,a))}else a=Ee,a=yc(o,o===ke?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||us(o,a)||(n=!0,n0(o,a));o=o.next}while(n);qd=!1}}function _C(){jb()}function jb(){uc=Lp=!1;var e=0;Ni!==0&&RC()&&(e=Ni);for(var t=Sn(),n=null,o=sc;o!==null;){var i=o.next,a=$b(o,t);a===0?(o.next=null,n===null?sc=i:n.next=i,i===null&&(or=n)):(n=o,(e!==0||(a&3)!==0)&&(uc=!0)),o=i}vt!==0&&vt!==5||gs(e,!1),Ni!==0&&(Ni=0)}function $b(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var r=31-_n(a),l=1<<r,s=i[r];s===-1?((l&n)===0||(l&o)!==0)&&(i[r]=FN(l,t)):s<=t&&(e.expiredLanes|=l),a&=~l}if(t=ke,n=Ee,n=yc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Sd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||us(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&Sd(o),Fp(n)){case 2:case 8:n=B0;break;case 32:n=qu;break;case 268435456:n=P0;break;default:n=qu}return o=Fb.bind(null,e),n=jp(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&Sd(o),e.callbackPriority=2,e.callbackNode=null,2}function Fb(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Rc()&&e.callbackNode!==n)return null;var o=Ee;return o=yc(e,e===ke?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Lb(e,o,t),$b(e,Sn()),e.callbackNode!=null&&e.callbackNode===n?Fb.bind(null,e):null)}function n0(e,t){if(Rc())return null;Lb(e,t,!0)}function EC(){zC(function(){(Ae&6)!==0?jp(L0,_C):jb()})}function zm(){if(Ni===0){var e=Cr;e===0&&(e=cu,cu<<=1,(cu&261888)===0&&(cu=256)),Ni=e}return Ni}function o0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Au(""+e)}function i0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function TC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=o0((i[an]||null).action),r=o.submitter;r&&(t=(t=r[an]||null)?o0(t.formAction):r.getAttribute("formAction"),t!==null&&(a=t,r=null));var l=new vc("action","action",null,o,i);e.push({event:l,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ni!==0){var s=r?i0(i,r):new FormData(i);Tp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(l.preventDefault(),s=r?i0(i,r):new FormData(i),Tp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(_u=0;_u<dp.length;_u++)Eu=dp[_u],a0=Eu.toLowerCase(),r0=Eu[0].toUpperCase()+Eu.slice(1),to(a0,"on"+r0);var Eu,a0,r0,_u;to(lv,"onAnimationEnd");to(sv,"onAnimationIteration");to(uv,"onAnimationStart");to("dblclick","onDoubleClick");to("focusin","onFocus");to("focusout","onBlur");to(V2,"onTransitionRun");to(Y2,"onTransitionStart");to(X2,"onTransitionCancel");to(cv,"onTransitionEnd");Tr("onMouseEnter",["mouseout","mouseover"]);Tr("onMouseLeave",["mouseout","mouseover"]);Tr("onPointerEnter",["pointerout","pointerover"]);Tr("onPointerLeave",["pointerout","pointerover"]);ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ha("onBeforeInput",["compositionend","keypress","textInput","paste"]);ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ns="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(" "),NC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ns));function Kb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var r=o.length-1;0<=r;r--){var l=o[r],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(c){ju(c)}i.currentTarget=null,a=s}else for(r=0;r<o.length;r++){if(l=o[r],s=l.instance,u=l.currentTarget,l=l.listener,s!==a&&i.isPropagationStopped())break e;a=l,i.currentTarget=u;try{a(i)}catch(c){ju(c)}i.currentTarget=null,a=s}}}}function ve(e,t){var n=t[ip];n===void 0&&(n=t[ip]=new Set);var o=e+"__bubble";n.has(o)||(Qb(t,e,2,!1),n.add(o))}function Zd(e,t,n){var o=0;t&&(o|=4),Qb(n,e,o,t)}var Tu="_reactListening"+Math.random().toString(36).slice(2);function Lm(e){if(!e[Tu]){e[Tu]=!0,V0.forEach(function(n){n!=="selectionchange"&&(NC.has(n)||Zd(n,!1,e),Zd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Tu]||(t[Tu]=!0,Zd("selectionchange",!1,t))}}function Qb(e,t,n,o){switch(c1(t)){case 2:var i=JC;break;case 8:i=ew;break;default:i=km}n=i.bind(null,t,n,e),i=void 0,!up||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jd(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var r=o.tag;if(r===3||r===4){var l=o.stateNode.containerInfo;if(l===i)break;if(r===4)for(r=o.return;r!==null;){var s=r.tag;if((s===3||s===4)&&r.stateNode.containerInfo===i)return;r=r.return}for(;l!==null;){if(r=rr(l),r===null)return;if(s=r.tag,s===5||s===6||s===26||s===27){o=a=r;continue e}l=l.parentNode}}o=o.return}K0(function(){var u=a,c=Wp(n),d=[];e:{var f=fv.get(e);if(f!==void 0){var p=vc,v=e;switch(e){case"keypress":if(Du(n)===0)break e;case"keydown":case"keyup":p=S2;break;case"focusin":v="focus",p=Nd;break;case"focusout":v="blur",p=Nd;break;case"beforeblur":case"afterblur":p=Nd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=py;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=s2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=E2;break;case lv:case sv:case uv:p=f2;break;case cv:p=N2;break;case"scroll":case"scrollend":p=r2;break;case"wheel":p=w2;break;case"copy":case"cut":case"paste":p=p2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=hy;break;case"toggle":case"beforetoggle":p=M2}var b=(t&4)!==0,x=!b&&(e==="scroll"||e==="scrollend"),g=b?f!==null?f+"Capture":null:f;b=[];for(var h=u,m;h!==null;){var y=h;if(m=y.stateNode,y=y.tag,y!==5&&y!==26&&y!==27||m===null||g===null||(y=$l(h,g),y!=null&&b.push(os(h,y,m))),x)break;h=h.return}0<b.length&&(f=new p(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==sp&&(v=n.relatedTarget||n.fromElement)&&(rr(v)||v[Lr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?rr(v):null,v!==null&&(x=ls(v),b=v.tag,v!==x||b!==5&&b!==27&&b!==6)&&(v=null)):(p=null,v=u),p!==v)){if(b=py,y="onMouseLeave",g="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(b=hy,y="onPointerLeave",g="onPointerEnter",h="pointer"),x=p==null?f:Rl(p),m=v==null?f:Rl(v),f=new b(y,h+"leave",p,n,c),f.target=x,f.relatedTarget=m,y=null,rr(c)===u&&(b=new b(g,h+"enter",v,n,c),b.target=m,b.relatedTarget=x,y=b),x=y,p&&v)t:{for(b=CC,g=p,h=v,m=0,y=g;y;y=b(y))m++;y=0;for(var S=h;S;S=b(S))y++;for(;0<m-y;)g=b(g),m--;for(;0<y-m;)h=b(h),y--;for(;m--;){if(g===h||h!==null&&g===h.alternate){b=g;break t}g=b(g),h=b(h)}b=null}else b=null;p!==null&&l0(d,f,p,b,!1),v!==null&&x!==null&&l0(d,x,v,b,!0)}}e:{if(f=u?Rl(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=by;else if(vy(f))if(nv)E=G2;else{E=H2;var _=P2}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Qp(u.elementType)&&(E=by):E=k2;if(E&&(E=E(e,u))){tv(d,E,n,c);break e}_&&_(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&lp(f,"number",f.value)}switch(_=u?Rl(u):window,e){case"focusin":(vy(_)||_.contentEditable==="true")&&(ur=_,cp=u,Pl=null);break;case"focusout":Pl=cp=ur=null;break;case"mousedown":fp=!0;break;case"contextmenu":case"mouseup":case"dragend":fp=!1,Ey(d,n,c);break;case"selectionchange":if(U2)break;case"keydown":case"keyup":Ey(d,n,c)}var w;if(tm)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else sr?J0(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(W0&&n.locale!=="ko"&&(sr||C!=="onCompositionStart"?C==="onCompositionEnd"&&sr&&(w=Q0()):(_i=c,Jp="value"in _i?_i.value:_i.textContent,sr=!0)),_=cc(u,C),0<_.length&&(C=new my(C,e,null,n,c),d.push({event:C,listeners:_}),w?C.data=w:(w=ev(n),w!==null&&(C.data=w)))),(w=R2?O2(e,n):z2(e,n))&&(C=cc(u,"onBeforeInput"),0<C.length&&(_=new my("onBeforeInput","beforeinput",null,n,c),d.push({event:_,listeners:C}),_.data=w)),TC(d,e,u,n,c)}Kb(d,t)})}function os(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=$l(e,n),i!=null&&o.unshift(os(e,i,a)),i=$l(e,t),i!=null&&o.push(os(e,i,a))),e.tag===3)return o;e=e.return}return[]}function CC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function l0(e,t,n,o,i){for(var a=t._reactName,r=[];n!==null&&n!==o;){var l=n,s=l.alternate,u=l.stateNode;if(l=l.tag,s!==null&&s===o)break;l!==5&&l!==26&&l!==27||u===null||(s=u,i?(u=$l(n,a),u!=null&&r.unshift(os(n,u,s))):i||(u=$l(n,a),u!=null&&r.push(os(n,u,s)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var wC=/\r\n?/g,AC=/\u0000|\uFFFD/g;function s0(e){return(typeof e=="string"?e:""+e).replace(wC,`
9
+ `).replace(AC,"")}function Wb(e,t){return t=s0(t),s0(e)===t}function Pe(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Nr(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Nr(e,""+o);break;case"className":pu(e,"class",o);break;case"tabIndex":pu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":pu(e,n,o);break;case"style":F0(e,o,a);break;case"data":if(t!=="object"){pu(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Au(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Au(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Xo);break;case"onScroll":o!=null&&ve("scroll",e);break;case"onScrollEnd":o!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(V(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(V(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=Au(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":ve("beforetoggle",e),ve("toggle",e),wu(e,"popover",o);break;case"xlinkActuate":Po(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Po(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Po(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Po(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Po(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Po(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Po(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Po(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Po(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":wu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=i2.get(n)||n,wu(e,n,o))}}function Bp(e,t,n,o,i,a){switch(n){case"style":F0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(V(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(V(60));e.innerHTML=n}}break;case"children":typeof o=="string"?Nr(e,o):(typeof o=="number"||typeof o=="bigint")&&Nr(e,""+o);break;case"onScroll":o!=null&&ve("scroll",e);break;case"onScrollEnd":o!=null&&ve("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Xo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Y0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[an]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):wu(e,n,o)}}}function Ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var r=n[a];if(r!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(V(137,t));default:Pe(e,t,a,r,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),o&&Pe(e,t,"src",n.src,n,null);return;case"input":ve("invalid",e);var l=a=r=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":r=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":l=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(V(137,t));break;default:Pe(e,t,o,c,n,null)}}Z0(e,a,l,s,u,r,i,!1);return;case"select":ve("invalid",e),o=r=a=null;for(i in n)if(n.hasOwnProperty(i)&&(l=n[i],l!=null))switch(i){case"value":a=l;break;case"defaultValue":r=l;break;case"multiple":o=l;default:Pe(e,t,i,l,n,null)}t=a,n=r,e.multiple=!!o,t!=null?yr(e,!!o,t,!1):n!=null&&yr(e,!!o,n,!0);return;case"textarea":ve("invalid",e),a=i=o=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":o=l;break;case"defaultValue":i=l;break;case"children":a=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(V(91));break;default:Pe(e,t,r,l,n,null)}$0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,s,o,n,null));return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(o=0;o<ns.length;o++)ve(ns[o],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(V(137,t));default:Pe(e,t,u,o,n,null)}return;default:if(Qp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Bp(e,t,c,o,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(o=n[l],o!=null&&Pe(e,t,l,o,n,null))}function MC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,r=null,l=null,s=null,u=null,c=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(p)||Pe(e,t,p,null,o,d)}}for(var f in o){var p=o[f];if(d=n[f],o.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":a=p;break;case"name":i=p;break;case"checked":u=p;break;case"defaultChecked":c=p;break;case"value":r=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(V(137,t));break;default:p!==d&&Pe(e,t,f,p,o,d)}}rp(e,r,l,s,u,c,a,i);return;case"select":p=r=l=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":p=s;default:o.hasOwnProperty(a)||Pe(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":l=a;break;case"multiple":r=a;default:a!==s&&Pe(e,t,i,a,o,s)}t=l,n=r,o=p,f!=null?yr(e,!!n,f,!1):!!o!=!!n&&(t!=null?yr(e,!!n,t,!0):yr(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(l in n)if(i=n[l],n.hasOwnProperty(l)&&i!=null&&!o.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Pe(e,t,l,null,o,i)}for(r in o)if(i=o[r],a=n[r],o.hasOwnProperty(r)&&(i!=null||a!=null))switch(r){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(V(91));break;default:i!==a&&Pe(e,t,r,i,o,a)}j0(e,f,p);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Pe(e,t,v,null,o,f));for(s in o)f=o[s],p=n[s],o.hasOwnProperty(s)&&f!==p&&(f!=null||p!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Pe(e,t,s,f,o,p));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Pe(e,t,b,null,o,f);for(u in o)if(f=o[u],p=n[u],o.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(V(137,t));break;default:Pe(e,t,u,f,o,p)}return;default:if(Qp(t)){for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!==void 0&&!o.hasOwnProperty(x)&&Bp(e,t,x,void 0,o,f);for(c in o)f=o[c],p=n[c],!o.hasOwnProperty(c)||f===p||f===void 0&&p===void 0||Bp(e,t,c,f,o,p);return}}for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!o.hasOwnProperty(g)&&Pe(e,t,g,null,o,f);for(d in o)f=o[d],p=n[d],!o.hasOwnProperty(d)||f===p||f==null&&p==null||Pe(e,t,d,f,o,p)}function u0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function DC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,r=i.initiatorType,l=i.duration;if(a&&l&&u0(r)){for(r=0,l=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>l)break;var c=s.transferSize,d=s.initiatorType;c&&u0(d)&&(s=s.responseEnd,r+=c*(s<l?1:(l-u)/(s-u)))}if(--o,t+=8*(a+r)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Pp=null,Hp=null;function fc(e){return e.nodeType===9?e:e.ownerDocument}function c0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function kp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function RC(){var e=window.event;return e&&e.type==="popstate"?e===$d?!1:($d=e,!0):($d=null,!1)}var e1=typeof setTimeout=="function"?setTimeout:void 0,OC=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,zC=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(LC)}:e1;function LC(e){setTimeout(function(){throw e})}function Ii(e){return e==="head"}function d0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),zr(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Zl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Zl(n);for(var a=n.firstChild;a;){var r=a.nextSibling,l=a.nodeName;a[fs]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=r}}else n==="body"&&Zl(e.ownerDocument.body);n=i}while(n);zr(t)}function p0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Gp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Gp(n),Kp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function BC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[fs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Xn(e.nextSibling),e===null)break}return null}function PC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Xn(e.nextSibling),e===null))return null;return e}function t1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xn(e.nextSibling),e===null))return null;return e}function Ip(e){return e.data==="$?"||e.data==="$~"}function Up(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function HC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Vp=null;function m0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Xn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function h0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function n1(e,t,n){switch(t=fc(n),e){case"html":if(e=t.documentElement,!e)throw Error(V(452));return e;case"head":if(e=t.head,!e)throw Error(V(453));return e;case"body":if(e=t.body,!e)throw Error(V(454));return e;default:throw Error(V(451))}}function Zl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Kp(e)}var qn=new Map,g0=new Set;function dc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ei=Me.d;Me.d={f:kC,r:GC,D:IC,C:UC,L:VC,m:YC,X:qC,S:XC,M:ZC};function kC(){var e=ei.f(),t=Mc();return e||t}function GC(e){var t=Br(e);t!==null&&t.tag===5&&t.type==="form"?Fv(t):ei.r(e)}var Gr=typeof document>"u"?null:document;function o1(e,t,n){var o=Gr;if(o&&typeof t=="string"&&t){var i=In(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),g0.has(i)||(g0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Ot(t,"link",e),Nt(t),o.head.appendChild(t)))}}function IC(e){ei.D(e),o1("dns-prefetch",e,null)}function UC(e,t){ei.C(e,t),o1("preconnect",e,t)}function VC(e,t,n){ei.L(e,t,n);var o=Gr;if(o&&e&&t){var i='link[rel="preload"][as="'+In(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+In(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+In(n.imageSizes)+'"]')):i+='[href="'+In(e)+'"]';var a=i;switch(t){case"style":a=Or(e);break;case"script":a=Ir(e)}qn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),qn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(ys(a))||t==="script"&&o.querySelector(vs(a))||(t=o.createElement("link"),Ot(t,"link",e),Nt(t),o.head.appendChild(t)))}}function YC(e,t){ei.m(e,t);var n=Gr;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+In(o)+'"][href="'+In(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Ir(e)}if(!qn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),qn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(vs(a)))return}o=n.createElement("link"),Ot(o,"link",e),Nt(o),n.head.appendChild(o)}}}function XC(e,t,n){ei.S(e,t,n);var o=Gr;if(o&&e){var i=gr(o).hoistableStyles,a=Or(e);t=t||"default";var r=i.get(a);if(!r){var l={loading:0,preload:null};if(r=o.querySelector(ys(a)))l.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=qn.get(a))&&Bm(e,n);var s=r=o.createElement("link");Nt(s),Ot(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){l.loading|=1}),s.addEventListener("error",function(){l.loading|=2}),l.loading|=4,ku(r,t,o)}r={type:"stylesheet",instance:r,count:1,state:l},i.set(a,r)}}}function qC(e,t){ei.X(e,t);var n=Gr;if(n&&e){var o=gr(n).hoistableScripts,i=Ir(e),a=o.get(i);a||(a=n.querySelector(vs(i)),a||(e=Ze({src:e,async:!0},t),(t=qn.get(i))&&Pm(e,t),a=n.createElement("script"),Nt(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function ZC(e,t){ei.M(e,t);var n=Gr;if(n&&e){var o=gr(n).hoistableScripts,i=Ir(e),a=o.get(i);a||(a=n.querySelector(vs(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=qn.get(i))&&Pm(e,t),a=n.createElement("script"),Nt(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function y0(e,t,n,o){var i=(i=Ci.current)?dc(i):null;if(!i)throw Error(V(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Or(n.href),n=gr(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Or(n.href);var a=gr(i).hoistableStyles,r=a.get(e);if(r||(i=i.ownerDocument||i,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,r),(a=i.querySelector(ys(e)))&&!a._p&&(r.instance=a,r.state.loading=5),qn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},qn.set(e,n),a||jC(i,e,n,r.state))),t&&o===null)throw Error(V(528,""));return r}if(t&&o!==null)throw Error(V(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ir(n),n=gr(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(V(444,e))}}function Or(e){return'href="'+In(e)+'"'}function ys(e){return'link[rel="stylesheet"]['+e+"]"}function i1(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function jC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Ot(t,"link",n),Nt(t),e.head.appendChild(t))}function Ir(e){return'[src="'+In(e)+'"]'}function vs(e){return"script[async]"+e}function v0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+In(n.href)+'"]');if(o)return t.instance=o,Nt(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Nt(o),Ot(o,"style",i),ku(o,n.precedence,e),t.instance=o;case"stylesheet":i=Or(n.href);var a=e.querySelector(ys(i));if(a)return t.state.loading|=4,t.instance=a,Nt(a),a;o=i1(n),(i=qn.get(i))&&Bm(o,i),a=(e.ownerDocument||e).createElement("link"),Nt(a);var r=a;return r._p=new Promise(function(l,s){r.onload=l,r.onerror=s}),Ot(a,"link",o),t.state.loading|=4,ku(a,n.precedence,e),t.instance=a;case"script":return a=Ir(n.src),(i=e.querySelector(vs(a)))?(t.instance=i,Nt(i),i):(o=n,(i=qn.get(a))&&(o=Ze({},n),Pm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),Nt(i),Ot(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(V(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,ku(o,n.precedence,e));return t.instance}function ku(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,r=0;r<o.length;r++){var l=o[r];if(l.dataset.precedence===t)a=l;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Bm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Pm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Gu=null;function b0(e,t,n){if(Gu===null){var o=new Map,i=Gu=new Map;i.set(n,o)}else i=Gu,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[fs]||a[Mt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var r=a.getAttribute(t)||"";r=e+r;var l=o.get(r);l?l.push(a):o.set(r,[a])}}return o}function S0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function $C(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function a1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function FC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Or(o.href),a=t.querySelector(ys(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,o=i1(o),(i=qn.get(i))&&Bm(o,i),a=a.createElement("link"),Nt(a);var r=a;r._p=new Promise(function(l,s){r.onload=l,r.onerror=s}),Ot(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=pc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Fd=0;function KC(e,t){return e.stylesheets&&e.count===0&&Iu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Iu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Fd===0&&(Fd=62500*DC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Iu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Fd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function pc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Iu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mc=null;function Iu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mc=new Map,t.forEach(QC,e),mc=null,pc.call(e))}function QC(e,t){if(!(t.state.loading&4)){var n=mc.get(e);if(n)var o=n.get(null);else{n=new Map,mc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var r=i[a];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),o=r)}o&&n.set(null,o)}i=t.instance,r=i.getAttribute("data-precedence"),a=n.get(r)||o,a===o&&n.set(null,i),n.set(r,i),this.count++,o=pc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var is={$$typeof:Yo,Provider:null,Consumer:null,_currentValue:aa,_currentValue2:aa,_threadCount:0};function WC(e,t,n,o,i,a,r,l,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xd(0),this.hiddenUpdates=xd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function r1(e,t,n,o,i,a,r,l,s,u,c,d){return e=new WC(e,t,n,r,s,u,c,d,l),t=1,a===!0&&(t|=24),a=vn(3,null,null,t),e.current=a,a.stateNode=e,t=sm(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},fm(a),e}function l1(e){return e?(e=dr,e):dr}function s1(e,t,n,o,i,a){i=l1(i),o.context===null?o.context=i:o.pendingContext=i,o=Ai(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Mi(e,o,t),n!==null&&(on(n,e,t),kl(n,e,t))}function x0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hm(e,t){x0(e,t),(e=e.alternate)&&x0(e,t)}function u1(e){if(e.tag===13||e.tag===31){var t=va(e,67108864);t!==null&&on(t,e,67108864),Hm(e,67108864)}}function _0(e){if(e.tag===13||e.tag===31){var t=En();t=$p(t);var n=va(e,t);n!==null&&on(n,e,t),Hm(e,t)}}var hc=!0;function JC(e,t,n,o){var i=fe.T;fe.T=null;var a=Me.p;try{Me.p=2,km(e,t,n,o)}finally{Me.p=a,fe.T=i}}function ew(e,t,n,o){var i=fe.T;fe.T=null;var a=Me.p;try{Me.p=8,km(e,t,n,o)}finally{Me.p=a,fe.T=i}}function km(e,t,n,o){if(hc){var i=Yp(o);if(i===null)jd(e,t,o,gc,n),E0(e,o);else if(nw(i,e,t,n,o))o.stopPropagation();else if(E0(e,o),t&4&&-1<tw.indexOf(e)){for(;i!==null;){var a=Br(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var r=na(a.pendingLanes);if(r!==0){var l=a;for(l.pendingLanes|=2,l.entangledLanes|=2;r;){var s=1<<31-_n(r);l.entanglements[1]|=s,r&=~s}_o(a),(Ae&6)===0&&(ac=Sn()+500,gs(0,!1))}}break;case 31:case 13:l=va(a,2),l!==null&&on(l,a,2),Mc(),Hm(a,2)}if(a=Yp(o),a===null&&jd(e,t,o,gc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else jd(e,t,o,null,n)}}function Yp(e){return e=Wp(e),Gm(e)}var gc=null;function Gm(e){if(gc=null,e=rr(e),e!==null){var t=ls(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=M0(t),e!==null)return e;e=null}else if(n===31){if(e=D0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gc=e,null}function c1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(VN()){case L0:return 2;case B0:return 8;case qu:case YN:return 32;case P0:return 268435456;default:return 32}default:return 32}}var Xp=!1,Oi=null,zi=null,Li=null,as=new Map,rs=new Map,Si=[],tw="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 E0(e,t){switch(e){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":zi=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":as.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rs.delete(t.pointerId)}}function wl(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Br(t),t!==null&&u1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function nw(e,t,n,o,i){switch(t){case"focusin":return Oi=wl(Oi,e,t,n,o,i),!0;case"dragenter":return zi=wl(zi,e,t,n,o,i),!0;case"mouseover":return Li=wl(Li,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return as.set(a,wl(as.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,rs.set(a,wl(rs.get(a)||null,e,t,n,o,i)),!0}return!1}function f1(e){var t=rr(e.target);if(t!==null){var n=ls(t);if(n!==null){if(t=n.tag,t===13){if(t=M0(n),t!==null){e.blockedOn=t,ry(e.priority,function(){_0(n)});return}}else if(t===31){if(t=D0(n),t!==null){e.blockedOn=t,ry(e.priority,function(){_0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);sp=o,n.target.dispatchEvent(o),sp=null}else return t=Br(n),t!==null&&u1(t),e.blockedOn=n,!1;t.shift()}return!0}function T0(e,t,n){Uu(e)&&n.delete(t)}function ow(){Xp=!1,Oi!==null&&Uu(Oi)&&(Oi=null),zi!==null&&Uu(zi)&&(zi=null),Li!==null&&Uu(Li)&&(Li=null),as.forEach(T0),rs.forEach(T0)}function Nu(e,t){e.blockedOn===t&&(e.blockedOn=null,Xp||(Xp=!0,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,ow)))}var Cu=null;function N0(e){Cu!==e&&(Cu=e,bt.unstable_scheduleCallback(bt.unstable_NormalPriority,function(){Cu===e&&(Cu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(Gm(o||n)===null)continue;break}var a=Br(n);a!==null&&(e.splice(t,3),t-=3,Tp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function zr(e){function t(s){return Nu(s,e)}Oi!==null&&Nu(Oi,e),zi!==null&&Nu(zi,e),Li!==null&&Nu(Li,e),as.forEach(t),rs.forEach(t);for(var n=0;n<Si.length;n++){var o=Si[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Si.length&&(n=Si[0],n.blockedOn===null);)f1(n),n.blockedOn===null&&Si.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],r=i[an]||null;if(typeof a=="function")r||N0(n);else if(r){var l=null;if(a&&a.hasAttribute("formAction")){if(i=a,r=a[an]||null)l=r.formAction;else if(Gm(i)!==null)continue}else l=r.action;typeof l=="function"?n[o+1]=l:(n.splice(o,3),o-=3),N0(n)}}}function d1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(r){return i=r})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Im(e){this._internalRoot=e}Oc.prototype.render=Im.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));var n=t.current,o=En();s1(n,o,e,t,null,null)};Oc.prototype.unmount=Im.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;s1(e.current,2,null,e,null,null),Mc(),t[Lr]=null}};function Oc(e){this._internalRoot=e}Oc.prototype.unstable_scheduleHydration=function(e){if(e){var t=U0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Si.length&&t!==0&&t<Si[n].priority;n++);Si.splice(n,0,e),n===0&&f1(e)}};var C0=w0.version;if(C0!=="19.2.4")throw Error(V(527,C0,"19.2.4"));Me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=BN(t),e=e!==null?R0(e):null,e=e===null?null:e.stateNode,e};var iw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:fe,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Al=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Al.isDisabled&&Al.supportsFiber))try{ss=Al.inject(iw),xn=Al}catch{}var Al;zc.createRoot=function(e,t){if(!A0(e))throw Error(V(299));var n=!1,o="",i=ob,a=ib,r=ab;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=r1(e,1,!1,null,null,n,o,null,i,a,r,d1),e[Lr]=t.current,Lm(e),new Im(t)};zc.hydrateRoot=function(e,t,n){if(!A0(e))throw Error(V(299));var o=!1,i="",a=ob,r=ib,l=ab,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=r1(e,1,!0,t,n??null,o,i,s,a,r,l,d1),t.context=l1(null),n=t.current,o=En(),o=$p(o),i=Ai(o),i.callback=null,Mi(n,i,o),n=o,t.current.lanes=n,cs(t,n),_o(t),e[Lr]=t.current,Lm(e),new Oc(t)};zc.version="19.2.4"});var g1=Wt((l5,h1)=>{"use strict";function m1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m1)}catch(e){console.error(e)}}m1(),h1.exports=p1()});var R1=Wt(Ic=>{"use strict";var sw=Symbol.for("react.transitional.element"),uw=Symbol.for("react.fragment");function D1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:sw,type:e,key:o,ref:t!==void 0?t:null,props:n}}Ic.Fragment=uw;Ic.jsx=D1;Ic.jsxs=D1});var de=Wt((d5,O1)=>{"use strict";O1.exports=R1()});var h_=Wt(m_=>{"use strict";var rl=Et();function iD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aD=typeof Object.is=="function"?Object.is:iD,rD=rl.useState,lD=rl.useEffect,sD=rl.useLayoutEffect,uD=rl.useDebugValue;function cD(e,t){var n=t(),o=rD({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return sD(function(){i.value=n,i.getSnapshot=t,Dh(i)&&a({inst:i})},[e,n,t]),lD(function(){return Dh(i)&&a({inst:i}),e(function(){Dh(i)&&a({inst:i})})},[e]),uD(n),n}function Dh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!aD(e,n)}catch{return!0}}function fD(e,t){return t()}var dD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fD:cD;m_.useSyncExternalStore=rl.useSyncExternalStore!==void 0?rl.useSyncExternalStore:dD});var y_=Wt((aH,g_)=>{"use strict";g_.exports=h_()});var b_=Wt(v_=>{"use strict";var Of=Et(),pD=y_();function mD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hD=typeof Object.is=="function"?Object.is:mD,gD=pD.useSyncExternalStore,yD=Of.useRef,vD=Of.useEffect,bD=Of.useMemo,SD=Of.useDebugValue;v_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=yD(null);if(a.current===null){var r={hasValue:!1,value:null};a.current=r}else r=a.current;a=bD(function(){function s(p){if(!u){if(u=!0,c=p,p=o(p),i!==void 0&&r.hasValue){var v=r.value;if(i(v,p))return d=v}return d=p}if(v=d,hD(c,p))return v;var b=o(p);return i!==void 0&&i(v,b)?(c=p,v):(c=p,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var l=gD(e,a[0],a[1]);return vD(function(){r.hasValue=!0,r.value=l},[l]),SD(l),l}});var x_=Wt((lH,S_)=>{"use strict";S_.exports=b_()});var Va=J(Et(),1),$T=J(g1(),1);var aw={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeStructure:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},y1=new Set(Object.keys(aw)),Lc={DRY:"dry",LIVE:"live",STATIC:"static"},Ur="pipeCard",v1="default",b1="controllerGroup",Um="stuff_";function Ui(e){return Um+e}function Vr(e){return e.startsWith(Um)}function bs(e){return e.slice(Um.length)}function Eo(e){return e?.meta?.mode}function S1(e){return Eo(e)===Lc.STATIC}function x1(e){return Eo(e)===Lc.DRY}var Cn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Bc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},no={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},Sa={DARK:"dark",LIGHT:"light"},St={DARK:"dark",LIGHT:"light",SYSTEM:"system"},Je={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_RIGHT:"center-right"};function _1(e){return e===Je.CENTER_LEFT||e===Je.CENTER_RIGHT?"vertical":"horizontal"}function E1(e){switch(e){case Je.TOP_LEFT:case Je.CENTER_LEFT:case Je.BOTTOM_LEFT:return"left";case Je.TOP_RIGHT:case Je.CENTER_RIGHT:case Je.BOTTOM_RIGHT:return"right";case Je.TOP_CENTER:case Je.BOTTOM_CENTER:return"center";default:return e}}var ln={VALIDATING:"validating",VALID:"valid",INVALID:"invalid",ERROR:"error"},Pc=40,Hc=48,kc=20,xa="arrowclosed";function T1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function N1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var Ss=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},C1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),w1=new Set(["dry","live","static"]),A1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function wn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function ht(e,t){throw new Ss(e,t)}function To(e,t){return(typeof e!="string"||e.length===0)&&ht(t,`expected a non-empty string, got ${wn(e)}`),e}function M1(e,t){Vi(e)||ht(t,`expected an object, got ${wn(e)}`),To(e.name,`${t}.name`)}function rw(e,t){Vi(e)||ht(t,`expected an object, got ${wn(e)}`),To(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&ht(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!C1.has(e.status))&&ht(`${t}.status`,`expected one of ${[...C1].join(", ")}, got ${JSON.stringify(e.status)}`),To(e.pipe_code,`${t}.pipe_code`);let n=To(e.pipe_type,`${t}.pipe_type`);y1.has(n)||ht(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),To(e.description,`${t}.description`),To(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Vi(o)||ht(`${t}.io`,`expected an object, got ${wn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||ht(`${t}.io.inputs`,`expected an array, got ${wn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||ht(`${t}.io.outputs`,`expected an array, got ${wn(o.outputs)}`),o.inputs.forEach((i,a)=>M1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>M1(i,`${t}.io.outputs[${a}]`))}function lw(e,t){Vi(e)||ht(t,`expected an object, got ${wn(e)}`),To(e.id,`${t}.id`),To(e.source,`${t}.source`),To(e.target,`${t}.target`),(typeof e.kind!="string"||!A1.has(e.kind))&&ht(`${t}.kind`,`expected one of ${[...A1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Gc(e){return Vi(e)||ht("",`expected a GraphSpec object, got ${wn(e)}`),Array.isArray(e.nodes)||ht("nodes",`expected an array, got ${wn(e.nodes)}`),Array.isArray(e.edges)||ht("edges",`expected an array, got ${wn(e.edges)}`),Vi(e.meta)||ht("meta",`expected an object, got ${wn(e.meta)}`),e.meta.format!=="mthds"&&ht("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.meta.mode!==void 0&&(typeof e.meta.mode!="string"||!w1.has(e.meta.mode))&&ht("meta.mode",`expected one of ${[...w1].join(", ")} when present, got ${JSON.stringify(e.meta.mode)}`),e.pipe_registry!==void 0&&!Vi(e.pipe_registry)&&ht("pipe_registry",`expected an object when present, got ${wn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Vi(e.concept_registry)&&ht("concept_registry",`expected an object when present, got ${wn(e.concept_registry)}`),e.nodes.forEach((t,n)=>rw(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>lw(t,`edges[${n}]`)),e}function Yr(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&ht(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),To(e.pipe_code,`${t}.pipe_code`),e}var ie=J(Et(),1);var P=J(de()),k=J(Et());function rt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=rt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var cw={value:()=>{}};function L1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Uc(n)}function Uc(e){this._=e}function fw(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Uc.prototype=L1.prototype={constructor:Uc,on:function(e,t){var n=this._,o=fw(e+"",n),i,a=-1,r=o.length;if(arguments.length<2){for(;++a<r;)if((i=(e=o[a]).type)&&(i=dw(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<r;)if(i=(e=o[a]).type)n[i]=z1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=z1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Uc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function dw(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function z1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=cw,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var _a=L1;var Vc="http://www.w3.org/1999/xhtml",Vm={svg:"http://www.w3.org/2000/svg",xhtml:Vc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ti(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Vm.hasOwnProperty(t)?{space:Vm[t],local:e}:e}function pw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vc&&t.documentElement.namespaceURI===Vc?t.createElement(e):t.createElementNS(n,e)}}function mw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yc(e){var t=ti(e);return(t.local?mw:pw)(t)}function hw(){}function Ea(e){return e==null?hw:function(){return this.querySelector(e)}}function B1(e){typeof e!="function"&&(e=Ea(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],r=a.length,l=o[i]=new Array(r),s,u,c=0;c<r;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),l[c]=u);return new lt(o,this._parents)}function Ym(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gw(){return[]}function xs(e){return e==null?gw:function(){return this.querySelectorAll(e)}}function yw(e){return function(){return Ym(e.apply(this,arguments))}}function P1(e){typeof e=="function"?e=yw(e):e=xs(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var r=t[a],l=r.length,s,u=0;u<l;++u)(s=r[u])&&(o.push(e.call(s,s.__data__,u,r)),i.push(s));return new lt(o,i)}function _s(e){return function(){return this.matches(e)}}function Xc(e){return function(t){return t.matches(e)}}var vw=Array.prototype.find;function bw(e){return function(){return vw.call(this.children,e)}}function Sw(){return this.firstElementChild}function H1(e){return this.select(e==null?Sw:bw(typeof e=="function"?e:Xc(e)))}var xw=Array.prototype.filter;function _w(){return Array.from(this.children)}function Ew(e){return function(){return xw.call(this.children,e)}}function k1(e){return this.selectAll(e==null?_w:Ew(typeof e=="function"?e:Xc(e)))}function G1(e){typeof e!="function"&&(e=_s(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],r=a.length,l=o[i]=[],s,u=0;u<r;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&l.push(s);return new lt(o,this._parents)}function qc(e){return new Array(e.length)}function I1(){return new lt(this._enter||this._groups.map(qc),this._parents)}function Es(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Es.prototype={constructor:Es,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function U1(e){return function(){return e}}function Tw(e,t,n,o,i,a){for(var r=0,l,s=t.length,u=a.length;r<u;++r)(l=t[r])?(l.__data__=a[r],o[r]=l):n[r]=new Es(e,a[r]);for(;r<s;++r)(l=t[r])&&(i[r]=l)}function Nw(e,t,n,o,i,a,r){var l,s,u=new Map,c=t.length,d=a.length,f=new Array(c),p;for(l=0;l<c;++l)(s=t[l])&&(f[l]=p=r.call(s,s.__data__,l,t)+"",u.has(p)?i[l]=s:u.set(p,s));for(l=0;l<d;++l)p=r.call(e,a[l],l,a)+"",(s=u.get(p))?(o[l]=s,s.__data__=a[l],u.delete(p)):n[l]=new Es(e,a[l]);for(l=0;l<c;++l)(s=t[l])&&u.get(f[l])===s&&(i[l]=s)}function Cw(e){return e.__data__}function V1(e,t){if(!arguments.length)return Array.from(this,Cw);var n=t?Nw:Tw,o=this._parents,i=this._groups;typeof e!="function"&&(e=U1(e));for(var a=i.length,r=new Array(a),l=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,p=ww(e.call(c,c&&c.__data__,u,o)),v=p.length,b=l[u]=new Array(v),x=r[u]=new Array(v),g=s[u]=new Array(f);n(c,d,b,x,g,p,t);for(var h=0,m=0,y,S;h<v;++h)if(y=b[h]){for(h>=m&&(m=h+1);!(S=x[m])&&++m<v;);y._next=S||null}}return r=new lt(r,o),r._enter=l,r._exit=s,r}function ww(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Y1(){return new lt(this._exit||this._groups.map(qc),this._parents)}function X1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function q1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,r=Math.min(i,a),l=new Array(i),s=0;s<r;++s)for(var u=n[s],c=o[s],d=u.length,f=l[s]=new Array(d),p,v=0;v<d;++v)(p=u[v]||c[v])&&(f[v]=p);for(;s<i;++s)l[s]=n[s];return new lt(l,this._parents)}function Z1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],r;--i>=0;)(r=o[i])&&(a&&r.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(r,a),a=r);return this}function j1(e){e||(e=Aw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var r=n[a],l=r.length,s=i[a]=new Array(l),u,c=0;c<l;++c)(u=r[c])&&(s[c]=u);s.sort(t)}return new lt(i,this._parents).order()}function Aw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function F1(){return Array.from(this)}function K1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var r=o[i];if(r)return r}return null}function Q1(){let e=0;for(let t of this)++e;return e}function W1(){return!this.node()}function J1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,r=i.length,l;a<r;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function Mw(e){return function(){this.removeAttribute(e)}}function Dw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rw(e,t){return function(){this.setAttribute(e,t)}}function Ow(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function zw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Lw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function eS(e,t){var n=ti(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Dw:Mw:typeof t=="function"?n.local?Lw:zw:n.local?Ow:Rw)(n,t))}function Zc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Bw(e){return function(){this.style.removeProperty(e)}}function Pw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Hw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function tS(e,t,n){return arguments.length>1?this.each((t==null?Bw:typeof t=="function"?Hw:Pw)(e,t,n??"")):Yi(this.node(),e)}function Yi(e,t){return e.style.getPropertyValue(t)||Zc(e).getComputedStyle(e,null).getPropertyValue(t)}function kw(e){return function(){delete this[e]}}function Gw(e,t){return function(){this[e]=t}}function Iw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function nS(e,t){return arguments.length>1?this.each((t==null?kw:typeof t=="function"?Iw:Gw)(e,t)):this.node()[e]}function oS(e){return e.trim().split(/^|\s+/)}function Xm(e){return e.classList||new iS(e)}function iS(e){this._node=e,this._names=oS(e.getAttribute("class")||"")}iS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function aS(e,t){for(var n=Xm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function rS(e,t){for(var n=Xm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Uw(e){return function(){aS(this,e)}}function Vw(e){return function(){rS(this,e)}}function Yw(e,t){return function(){(t.apply(this,arguments)?aS:rS)(this,e)}}function lS(e,t){var n=oS(e+"");if(arguments.length<2){for(var o=Xm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Yw:t?Uw:Vw)(n,t))}function Xw(){this.textContent=""}function qw(e){return function(){this.textContent=e}}function Zw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function sS(e){return arguments.length?this.each(e==null?Xw:(typeof e=="function"?Zw:qw)(e)):this.node().textContent}function jw(){this.innerHTML=""}function $w(e){return function(){this.innerHTML=e}}function Fw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function uS(e){return arguments.length?this.each(e==null?jw:(typeof e=="function"?Fw:$w)(e)):this.node().innerHTML}function Kw(){this.nextSibling&&this.parentNode.appendChild(this)}function cS(){return this.each(Kw)}function Qw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fS(){return this.each(Qw)}function dS(e){var t=typeof e=="function"?e:Yc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ww(){return null}function pS(e,t){var n=typeof e=="function"?e:Yc(e),o=t==null?Ww:typeof t=="function"?t:Ea(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Jw(){var e=this.parentNode;e&&e.removeChild(this)}function mS(){return this.each(Jw)}function eA(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tA(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function hS(e){return this.select(e?tA:eA)}function gS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function nA(e){return function(t){e.call(this,t,this.__data__)}}function oA(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function iA(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function aA(e,t,n){return function(){var o=this.__on,i,a=nA(t);if(o){for(var r=0,l=o.length;r<l;++r)if((i=o[r]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function yS(e,t,n){var o=oA(e+""),i,a=o.length,r;if(arguments.length<2){var l=this.node().__on;if(l){for(var s=0,u=l.length,c;s<u;++s)for(i=0,c=l[s];i<a;++i)if((r=o[i]).type===c.type&&r.name===c.name)return c.value}return}for(l=t?aA:iA,i=0;i<a;++i)this.each(l(o[i],t,n));return this}function vS(e,t,n){var o=Zc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function rA(e,t){return function(){return vS(this,e,t)}}function lA(e,t){return function(){return vS(this,e,t.apply(this,arguments))}}function bS(e,t){return this.each((typeof t=="function"?lA:rA)(e,t))}function*SS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,r;i<a;++i)(r=o[i])&&(yield r)}var qm=[null];function lt(e,t){this._groups=e,this._parents=t}function xS(){return new lt([[document.documentElement]],qm)}function sA(){return this}lt.prototype=xS.prototype={constructor:lt,select:B1,selectAll:P1,selectChild:H1,selectChildren:k1,filter:G1,data:V1,enter:I1,exit:Y1,join:X1,merge:q1,selection:sA,order:Z1,sort:j1,call:$1,nodes:F1,node:K1,size:Q1,empty:W1,each:J1,attr:eS,style:tS,property:nS,classed:lS,text:sS,html:uS,raise:cS,lower:fS,append:dS,insert:pS,remove:mS,clone:hS,datum:gS,on:yS,dispatch:bS,[Symbol.iterator]:SS};var ni=xS;function wt(e){return typeof e=="string"?new lt([[document.querySelector(e)]],[document.documentElement]):new lt([[e]],qm)}function _S(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=_S(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var ES={passive:!1},Ta={capture:!0,passive:!1};function jc(e){e.stopImmediatePropagation()}function Xi(e){e.preventDefault(),e.stopImmediatePropagation()}function Ts(e){var t=e.document.documentElement,n=wt(e).on("dragstart.drag",Xi,Ta);"onselectstart"in t?n.on("selectstart.drag",Xi,Ta):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Ns(e,t){var n=e.document.documentElement,o=wt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Xi,Ta),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Cs=e=>()=>e;function ws(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:r,y:l,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:r,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}ws.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function uA(e){return!e.ctrlKey&&!e.button}function cA(){return this.parentNode}function fA(e,t){return t??{x:e.x,y:e.y}}function dA(){return navigator.maxTouchPoints||"ontouchstart"in this}function $c(){var e=uA,t=cA,n=fA,o=dA,i={},a=_a("start","drag","end"),r=0,l,s,u,c,d=0;function f(y){y.on("mousedown.drag",p).filter(o).on("touchstart.drag",x).on("touchmove.drag",g,ES).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(y,S){if(!(c||!e.call(this,y,S))){var E=m(this,t.call(this,y,S),y,S,"mouse");E&&(wt(y.view).on("mousemove.drag",v,Ta).on("mouseup.drag",b,Ta),Ts(y.view),jc(y),u=!1,l=y.clientX,s=y.clientY,E("start",y))}}function v(y){if(Xi(y),!u){var S=y.clientX-l,E=y.clientY-s;u=S*S+E*E>d}i.mouse("drag",y)}function b(y){wt(y.view).on("mousemove.drag mouseup.drag",null),Ns(y.view,u),Xi(y),i.mouse("end",y)}function x(y,S){if(e.call(this,y,S)){var E=y.changedTouches,_=t.call(this,y,S),w=E.length,C,B;for(C=0;C<w;++C)(B=m(this,_,y,S,E[C].identifier,E[C]))&&(jc(y),B("start",y,E[C]))}}function g(y){var S=y.changedTouches,E=S.length,_,w;for(_=0;_<E;++_)(w=i[S[_].identifier])&&(Xi(y),w("drag",y,S[_]))}function h(y){var S=y.changedTouches,E=S.length,_,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),_=0;_<E;++_)(w=i[S[_].identifier])&&(jc(y),w("end",y,S[_]))}function m(y,S,E,_,w,C){var B=a.copy(),M=Xt(C||E,S),z,I,T;if((T=n.call(y,new ws("beforestart",{sourceEvent:E,target:f,identifier:w,active:r,x:M[0],y:M[1],dx:0,dy:0,dispatch:B}),_))!=null)return z=T.x-M[0]||0,I=T.y-M[1]||0,function D(A,R,O){var L=M,Y;switch(A){case"start":i[w]=D,Y=r++;break;case"end":delete i[w],--r;case"drag":M=Xt(O||R,S),Y=r;break}B.call(A,y,new ws(A,{sourceEvent:R,subject:T,target:f,identifier:w,active:Y,x:M[0]+z,y:M[1]+I,dx:M[0]-L[0],dy:M[1]-L[1],dispatch:B}),_)}}return f.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Cs(!!y),f):e},f.container=function(y){return arguments.length?(t=typeof y=="function"?y:Cs(y),f):t},f.subject=function(y){return arguments.length?(n=typeof y=="function"?y:Cs(y),f):n},f.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:Cs(!!y),f):o},f.on=function(){var y=a.on.apply(a,arguments);return y===a?f:y},f.clickDistance=function(y){return arguments.length?(d=(y=+y)*y,f):Math.sqrt(d)},f}function Fc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ds(){}var As=.7,Wc=1/As,Xr="\\s*([+-]?\\d+)\\s*",Ms="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",No="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pA=/^#([0-9a-f]{3,8})$/,mA=new RegExp(`^rgb\\(${Xr},${Xr},${Xr}\\)$`),hA=new RegExp(`^rgb\\(${No},${No},${No}\\)$`),gA=new RegExp(`^rgba\\(${Xr},${Xr},${Xr},${Ms}\\)$`),yA=new RegExp(`^rgba\\(${No},${No},${No},${Ms}\\)$`),vA=new RegExp(`^hsl\\(${Ms},${No},${No}\\)$`),bA=new RegExp(`^hsla\\(${Ms},${No},${No},${Ms}\\)$`),TS={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};Fc(Ds,io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:NS,formatHex:NS,formatHex8:SA,formatHsl:xA,formatRgb:CS,toString:CS});function NS(){return this.rgb().formatHex()}function SA(){return this.rgb().formatHex8()}function xA(){return OS(this).formatHsl()}function CS(){return this.rgb().formatRgb()}function io(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=pA.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wS(t):n===3?new sn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Kc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Kc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=mA.exec(e))?new sn(t[1],t[2],t[3],1):(t=hA.exec(e))?new sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gA.exec(e))?Kc(t[1],t[2],t[3],t[4]):(t=yA.exec(e))?Kc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vA.exec(e))?DS(t[1],t[2]/100,t[3]/100,1):(t=bA.exec(e))?DS(t[1],t[2]/100,t[3]/100,t[4]):TS.hasOwnProperty(e)?wS(TS[e]):e==="transparent"?new sn(NaN,NaN,NaN,0):null}function wS(e){return new sn(e>>16&255,e>>8&255,e&255,1)}function Kc(e,t,n,o){return o<=0&&(e=t=n=NaN),new sn(e,t,n,o)}function _A(e){return e instanceof Ds||(e=io(e)),e?(e=e.rgb(),new sn(e.r,e.g,e.b,e.opacity)):new sn}function qr(e,t,n,o){return arguments.length===1?_A(e):new sn(e,t,n,o??1)}function sn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Fc(sn,qr,Zm(Ds,{brighter(e){return e=e==null?Wc:Math.pow(Wc,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?As:Math.pow(As,e),new sn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sn(Ca(this.r),Ca(this.g),Ca(this.b),Jc(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:AS,formatHex:AS,formatHex8:EA,formatRgb:MS,toString:MS}));function AS(){return`#${Na(this.r)}${Na(this.g)}${Na(this.b)}`}function EA(){return`#${Na(this.r)}${Na(this.g)}${Na(this.b)}${Na((isNaN(this.opacity)?1:this.opacity)*255)}`}function MS(){let e=Jc(this.opacity);return`${e===1?"rgb(":"rgba("}${Ca(this.r)}, ${Ca(this.g)}, ${Ca(this.b)}${e===1?")":`, ${e})`}`}function Jc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ca(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Na(e){return e=Ca(e),(e<16?"0":"")+e.toString(16)}function DS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new oo(e,t,n,o)}function OS(e){if(e instanceof oo)return new oo(e.h,e.s,e.l,e.opacity);if(e instanceof Ds||(e=io(e)),!e)return new oo;if(e instanceof oo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),r=NaN,l=a-i,s=(a+i)/2;return l?(t===a?r=(n-o)/l+(n<o)*6:n===a?r=(o-t)/l+2:r=(t-n)/l+4,l/=s<.5?a+i:2-a-i,r*=60):l=s>0&&s<1?0:r,new oo(r,l,s,e.opacity)}function zS(e,t,n,o){return arguments.length===1?OS(e):new oo(e,t,n,o??1)}function oo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Fc(oo,zS,Zm(Ds,{brighter(e){return e=e==null?Wc:Math.pow(Wc,e),new oo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?As:Math.pow(As,e),new oo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new sn(jm(e>=240?e-240:e+120,i,o),jm(e,i,o),jm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new oo(RS(this.h),Qc(this.s),Qc(this.l),Jc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Jc(this.opacity);return`${e===1?"hsl(":"hsla("}${RS(this.h)}, ${Qc(this.s)*100}%, ${Qc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function RS(e){return e=(e||0)%360,e<0?e+360:e}function Qc(e){return Math.max(0,Math.min(1,e||0))}function jm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function $m(e,t,n,o,i){var a=e*e,r=a*e;return((1-3*e+3*a-r)*t+(4-6*a+3*r)*n+(1+3*e+3*a-3*r)*o+r*i)/6}function LS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],r=o>0?e[o-1]:2*i-a,l=o<t-1?e[o+2]:2*a-i;return $m((n-o/t)*t,r,i,a,l)}}function BS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],r=e[(o+1)%t],l=e[(o+2)%t];return $m((n-o/t)*t,i,a,r,l)}}var Rs=e=>()=>e;function TA(e,t){return function(n){return e+n*t}}function NA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function PS(e){return(e=+e)==1?ef:function(t,n){return n-t?NA(t,n,e):Rs(isNaN(t)?n:t)}}function ef(e,t){var n=t-e;return n?TA(e,n):Rs(isNaN(e)?t:e)}var wa=(function e(t){var n=PS(t);function o(i,a){var r=n((i=qr(i)).r,(a=qr(a)).r),l=n(i.g,a.g),s=n(i.b,a.b),u=ef(i.opacity,a.opacity);return function(c){return i.r=r(c),i.g=l(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function HS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),r,l;for(r=0;r<n;++r)l=qr(t[r]),o[r]=l.r||0,i[r]=l.g||0,a[r]=l.b||0;return o=e(o),i=e(i),a=e(a),l.opacity=1,function(s){return l.r=o(s),l.g=i(s),l.b=a(s),l+""}}}var CA=HS(LS),wA=HS(BS);function kS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function GS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),r;for(r=0;r<o;++r)i[r]=oi(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(l){for(r=0;r<o;++r)a[r]=i[r](l);return a}}function US(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function VS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=oi(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Km=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fm=new RegExp(Km.source,"g");function AA(e){return function(){return e}}function MA(e){return function(t){return e(t)+""}}function Os(e,t){var n=Km.lastIndex=Fm.lastIndex=0,o,i,a,r=-1,l=[],s=[];for(e=e+"",t=t+"";(o=Km.exec(e))&&(i=Fm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[r]?l[r]+=a:l[++r]=a),(o=o[0])===(i=i[0])?l[r]?l[r]+=i:l[++r]=i:(l[++r]=null,s.push({i:r,x:qt(o,i)})),n=Fm.lastIndex;return n<t.length&&(a=t.slice(n),l[r]?l[r]+=a:l[++r]=a),l.length<2?s[0]?MA(s[0].x):AA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)l[(d=s[c]).i]=d.x(u);return l.join("")})}function oi(e,t){var n=typeof t,o;return t==null||n==="boolean"?Rs(t):(n==="number"?qt:n==="string"?(o=io(t))?(t=o,wa):Os:t instanceof io?wa:t instanceof Date?US:GS(t)?kS:Array.isArray(t)?IS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?VS:qt)(e,t)}var YS=180/Math.PI,tf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qm(e,t,n,o,i,a){var r,l,s;return(r=Math.sqrt(e*e+t*t))&&(e/=r,t/=r),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,s/=l),e*o<t*n&&(e=-e,t=-t,s=-s,r=-r),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*YS,skewX:Math.atan(s)*YS,scaleX:r,scaleY:l}}var nf;function XS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?tf:Qm(t.a,t.b,t.c,t.d,t.e,t.f)}function qS(e){return e==null?tf:(nf||(nf=document.createElementNS("http://www.w3.org/2000/svg","g")),nf.setAttribute("transform",e),(e=nf.transform.baseVal.consolidate())?(e=e.matrix,Qm(e.a,e.b,e.c,e.d,e.e,e.f)):tf)}function ZS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,p,v){if(u!==d||c!==f){var b=p.push("translate(",null,t,null,n);v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function r(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:qt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function l(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:qt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,p,v){if(u!==d||c!==f){var b=p.push(i(p)+"scale(",null,",",null,")");v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d!==1||f!==1)&&p.push(i(p)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),r(u.rotate,c.rotate,d,f),l(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(p){for(var v=-1,b=f.length,x;++v<b;)d[(x=f[v]).i]=x.x(p);return d.join("")}}}var Wm=ZS(XS,"px, ","px)","deg)"),Jm=ZS(qS,", ",")",")");var DA=1e-12;function jS(e){return((e=Math.exp(e))+1/e)/2}function RA(e){return((e=Math.exp(e))-1/e)/2}function OA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Aa=(function e(t,n,o){function i(a,r){var l=a[0],s=a[1],u=a[2],c=r[0],d=r[1],f=r[2],p=c-l,v=d-s,b=p*p+v*v,x,g;if(b<DA)g=Math.log(f/u)/t,x=function(_){return[l+_*p,s+_*v,u*Math.exp(t*_*g)]};else{var h=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*h),y=(f*f-u*u-o*b)/(2*f*n*h),S=Math.log(Math.sqrt(m*m+1)-m),E=Math.log(Math.sqrt(y*y+1)-y);g=(E-S)/t,x=function(_){var w=_*g,C=jS(S),B=u/(n*h)*(C*OA(t*w+S)-RA(S));return[l+B*p,s+B*v,u*C/jS(t*w+S)]}}return x.duration=g*1e3*t/Math.SQRT2,x}return i.rho=function(a){var r=Math.max(.001,+a),l=r*r,s=l*l;return e(r,l,s)},i})(Math.SQRT2,2,4);var Zr=0,Ls=0,zs=0,FS=1e3,of,Bs,af=0,Ma=0,rf=0,Ps=typeof performance=="object"&&performance.now?performance:Date,KS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ks(){return Ma||(KS(zA),Ma=Ps.now()+rf)}function zA(){Ma=0}function Hs(){this._call=this._time=this._next=null}Hs.prototype=lf.prototype={constructor:Hs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ks():+n)+(t==null?0:+t),!this._next&&Bs!==this&&(Bs?Bs._next=this:of=this,Bs=this),this._call=e,this._time=n,eh()},stop:function(){this._call&&(this._call=null,this._time=1/0,eh())}};function lf(e,t,n){var o=new Hs;return o.restart(e,t,n),o}function QS(){ks(),++Zr;for(var e=of,t;e;)(t=Ma-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zr}function $S(){Ma=(af=Ps.now())+rf,Zr=Ls=0;try{QS()}finally{Zr=0,BA(),Ma=0}}function LA(){var e=Ps.now(),t=e-af;t>FS&&(rf-=t,af=e)}function BA(){for(var e,t=of,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:of=n);Bs=e,eh(o)}function eh(e){if(!Zr){Ls&&(Ls=clearTimeout(Ls));var t=e-Ma;t>24?(e<1/0&&(Ls=setTimeout($S,e-Ps.now()-rf)),zs&&(zs=clearInterval(zs))):(zs||(af=Ps.now(),zs=setInterval(LA,FS)),Zr=1,KS($S))}}function sf(e,t,n){var o=new Hs;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var PA=_a("start","end","cancel","interrupt"),HA=[],ex=0,WS=1,cf=2,uf=3,JS=4,ff=5,Gs=6;function qi(e,t,n,o,i,a){var r=e.__transition;if(!r)e.__transition={};else if(n in r)return;kA(e,n,{name:t,index:o,group:i,on:PA,tween:HA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ex})}function Is(e,t){var n=xt(e,t);if(n.state>ex)throw new Error("too late; already scheduled");return n}function zt(e,t){var n=xt(e,t);if(n.state>uf)throw new Error("too late; already running");return n}function xt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function kA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=lf(a,0,n.time);function a(u){n.state=WS,n.timer.restart(r,n.delay,n.time),n.delay<=u&&r(u-n.delay)}function r(u){var c,d,f,p;if(n.state!==WS)return s();for(c in o)if(p=o[c],p.name===n.name){if(p.state===uf)return sf(r);p.state===JS?(p.state=Gs,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=Gs,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(sf(function(){n.state===uf&&(n.state=JS,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=cf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===cf){for(n.state=uf,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=ff,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===ff&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Gs,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Da(e,t){var n=e.__transition,o,i,a=!0,r;if(n){t=t==null?null:t+"";for(r in n){if((o=n[r]).name!==t){a=!1;continue}i=o.state>cf&&o.state<ff,o.state=Gs,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[r]}a&&delete e.__transition}}function tx(e){return this.each(function(){Da(this,e)})}function GA(e,t){var n,o;return function(){var i=zt(this,e),a=i.tween;if(a!==n){o=n=a;for(var r=0,l=o.length;r<l;++r)if(o[r].name===t){o=o.slice(),o.splice(r,1);break}}i.tween=o}}function IA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=zt(this,e),r=a.tween;if(r!==o){i=(o=r).slice();for(var l={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=l;break}s===u&&i.push(l)}a.tween=i}}function nx(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=xt(this.node(),n).tween,i=0,a=o.length,r;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((t==null?GA:IA)(n,e,t))}function jr(e,t,n){var o=e._id;return e.each(function(){var i=zt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return xt(i,o).value[t]}}function df(e,t){var n;return(typeof t=="number"?qt:t instanceof io?wa:(n=io(t))?(t=n,wa):Os)(e,t)}function UA(e){return function(){this.removeAttribute(e)}}function VA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function YA(e,t,n){var o,i=n+"",a;return function(){var r=this.getAttribute(e);return r===i?null:r===o?a:a=t(o=r,n)}}function XA(e,t,n){var o,i=n+"",a;return function(){var r=this.getAttributeNS(e.space,e.local);return r===i?null:r===o?a:a=t(o=r,n)}}function qA(e,t,n){var o,i,a;return function(){var r,l=n(this),s;return l==null?void this.removeAttribute(e):(r=this.getAttribute(e),s=l+"",r===s?null:r===o&&s===i?a:(i=s,a=t(o=r,l)))}}function ZA(e,t,n){var o,i,a;return function(){var r,l=n(this),s;return l==null?void this.removeAttributeNS(e.space,e.local):(r=this.getAttributeNS(e.space,e.local),s=l+"",r===s?null:r===o&&s===i?a:(i=s,a=t(o=r,l)))}}function ox(e,t){var n=ti(e),o=n==="transform"?Jm:df;return this.attrTween(e,typeof t=="function"?(n.local?ZA:qA)(n,o,jr(this,"attr."+e,t)):t==null?(n.local?VA:UA)(n):(n.local?XA:YA)(n,o,t))}function jA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function $A(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function FA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&$A(e,a)),n}return i._value=t,i}function KA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&jA(e,a)),n}return i._value=t,i}function ix(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=ti(e);return this.tween(n,(o.local?FA:KA)(o,t))}function QA(e,t){return function(){Is(this,e).delay=+t.apply(this,arguments)}}function WA(e,t){return t=+t,function(){Is(this,e).delay=t}}function ax(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?QA:WA)(t,e)):xt(this.node(),t).delay}function JA(e,t){return function(){zt(this,e).duration=+t.apply(this,arguments)}}function eM(e,t){return t=+t,function(){zt(this,e).duration=t}}function rx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?JA:eM)(t,e)):xt(this.node(),t).duration}function tM(e,t){if(typeof t!="function")throw new Error;return function(){zt(this,e).ease=t}}function lx(e){var t=this._id;return arguments.length?this.each(tM(t,e)):xt(this.node(),t).ease}function nM(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;zt(this,e).ease=n}}function sx(e){if(typeof e!="function")throw new Error;return this.each(nM(this._id,e))}function ux(e){typeof e!="function"&&(e=_s(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],r=a.length,l=o[i]=[],s,u=0;u<r;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&l.push(s);return new Zt(o,this._parents,this._name,this._id)}function cx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),r=new Array(o),l=0;l<a;++l)for(var s=t[l],u=n[l],c=s.length,d=r[l]=new Array(c),f,p=0;p<c;++p)(f=s[p]||u[p])&&(d[p]=f);for(;l<o;++l)r[l]=t[l];return new Zt(r,this._parents,this._name,this._id)}function oM(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function iM(e,t,n){var o,i,a=oM(t)?Is:zt;return function(){var r=a(this,e),l=r.on;l!==o&&(i=(o=l).copy()).on(t,n),r.on=i}}function fx(e,t){var n=this._id;return arguments.length<2?xt(this.node(),n).on.on(e):this.each(iM(n,e,t))}function aM(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function dx(){return this.on("end.remove",aM(this._id))}function px(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ea(e));for(var o=this._groups,i=o.length,a=new Array(i),r=0;r<i;++r)for(var l=o[r],s=l.length,u=a[r]=new Array(s),c,d,f=0;f<s;++f)(c=l[f])&&(d=e.call(c,c.__data__,f,l))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,qi(u[f],t,n,f,u,xt(c,n)));return new Zt(a,this._parents,t,n)}function mx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xs(e));for(var o=this._groups,i=o.length,a=[],r=[],l=0;l<i;++l)for(var s=o[l],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),p,v=xt(c,n),b=0,x=f.length;b<x;++b)(p=f[b])&&qi(p,t,n,b,f,v);a.push(f),r.push(c)}return new Zt(a,r,t,n)}var rM=ni.prototype.constructor;function hx(){return new rM(this._groups,this._parents)}function lM(e,t){var n,o,i;return function(){var a=Yi(this,e),r=(this.style.removeProperty(e),Yi(this,e));return a===r?null:a===n&&r===o?i:i=t(n=a,o=r)}}function gx(e){return function(){this.style.removeProperty(e)}}function sM(e,t,n){var o,i=n+"",a;return function(){var r=Yi(this,e);return r===i?null:r===o?a:a=t(o=r,n)}}function uM(e,t,n){var o,i,a;return function(){var r=Yi(this,e),l=n(this),s=l+"";return l==null&&(s=l=(this.style.removeProperty(e),Yi(this,e))),r===s?null:r===o&&s===i?a:(i=s,a=t(o=r,l))}}function cM(e,t){var n,o,i,a="style."+t,r="end."+a,l;return function(){var s=zt(this,e),u=s.on,c=s.value[a]==null?l||(l=gx(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(r,i=c),s.on=o}}function yx(e,t,n){var o=(e+="")=="transform"?Wm:df;return t==null?this.styleTween(e,lM(e,o)).on("end.style."+e,gx(e)):typeof t=="function"?this.styleTween(e,uM(e,o,jr(this,"style."+e,t))).each(cM(this._id,e)):this.styleTween(e,sM(e,o,t),n).on("end.style."+e,null)}function fM(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function dM(e,t,n){var o,i;function a(){var r=t.apply(this,arguments);return r!==i&&(o=(i=r)&&fM(e,r,n)),o}return a._value=t,a}function vx(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,dM(e,t,n??""))}function pM(e){return function(){this.textContent=e}}function mM(e){return function(){var t=e(this);this.textContent=t??""}}function bx(e){return this.tween("text",typeof e=="function"?mM(jr(this,"text",e)):pM(e==null?"":e+""))}function hM(e){return function(t){this.textContent=e.call(this,t)}}function gM(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&hM(i)),t}return o._value=e,o}function Sx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,gM(e))}function xx(){for(var e=this._name,t=this._id,n=pf(),o=this._groups,i=o.length,a=0;a<i;++a)for(var r=o[a],l=r.length,s,u=0;u<l;++u)if(s=r[u]){var c=xt(s,t);qi(s,e,n,u,r,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function _x(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,r){var l={value:r},s={value:function(){--i===0&&a()}};n.each(function(){var u=zt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),u.on=t}),i===0&&a()})}var yM=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Ex(e){return ni().transition(e)}function pf(){return++yM}var ii=ni.prototype;Zt.prototype=Ex.prototype={constructor:Zt,select:px,selectAll:mx,selectChild:ii.selectChild,selectChildren:ii.selectChildren,filter:ux,merge:cx,selection:hx,transition:xx,call:ii.call,nodes:ii.nodes,node:ii.node,size:ii.size,empty:ii.empty,each:ii.each,on:fx,attr:ox,attrTween:ix,style:yx,styleTween:vx,text:bx,textTween:Sx,remove:dx,tween:nx,delay:ax,duration:rx,ease:lx,easeVarying:sx,end:_x,[Symbol.iterator]:ii[Symbol.iterator]};function mf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var vM={time:null,delay:0,duration:250,ease:mf};function bM(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Tx(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=pf(),(n=vM).time=ks(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var r=o[a],l=r.length,s,u=0;u<l;++u)(s=r[u])&&qi(s,e,t,u,r,n||bM(s,t));return new Zt(o,this._parents,e,t)}ni.prototype.interrupt=tx;ni.prototype.transition=Tx;var Us=e=>()=>e;function th(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function ao(e,t,n){this.k=e,this.x=t,this.y=n}ao.prototype={constructor:ao,scale:function(e){return e===1?this:new ao(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ao(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ra=new ao(1,0,0);Vs.prototype=ao.prototype;function Vs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ra;return e.__zoom}function hf(e){e.stopImmediatePropagation()}function $r(e){e.preventDefault(),e.stopImmediatePropagation()}function SM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Nx(){return this.__zoom||Ra}function _M(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EM(){return navigator.maxTouchPoints||"ontouchstart"in this}function TM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],r=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),r>a?(a+r)/2:Math.min(0,a)||Math.max(0,r))}function gf(){var e=SM,t=xM,n=TM,o=_M,i=EM,a=[0,1/0],r=[[-1/0,-1/0],[1/0,1/0]],l=250,s=Aa,u=_a("start","zoom","end"),c,d,f,p=500,v=150,b=0,x=10;function g(T){T.property("__zoom",Nx).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(T,D,A,R){var O=T.selection?T.selection():T;O.property("__zoom",Nx),T!==O?S(T,D,A,R):O.interrupt().each(function(){E(this,arguments).event(R).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},g.scaleBy=function(T,D,A,R){g.scaleTo(T,function(){var O=this.__zoom.k,L=typeof D=="function"?D.apply(this,arguments):D;return O*L},A,R)},g.scaleTo=function(T,D,A,R){g.transform(T,function(){var O=t.apply(this,arguments),L=this.__zoom,Y=A==null?y(O):typeof A=="function"?A.apply(this,arguments):A,G=L.invert(Y),X=typeof D=="function"?D.apply(this,arguments):D;return n(m(h(L,X),Y,G),O,r)},A,R)},g.translateBy=function(T,D,A,R){g.transform(T,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof A=="function"?A.apply(this,arguments):A),t.apply(this,arguments),r)},null,R)},g.translateTo=function(T,D,A,R,O){g.transform(T,function(){var L=t.apply(this,arguments),Y=this.__zoom,G=R==null?y(L):typeof R=="function"?R.apply(this,arguments):R;return n(Ra.translate(G[0],G[1]).scale(Y.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof A=="function"?-A.apply(this,arguments):-A),L,r)},R,O)};function h(T,D){return D=Math.max(a[0],Math.min(a[1],D)),D===T.k?T:new ao(D,T.x,T.y)}function m(T,D,A){var R=D[0]-A[0]*T.k,O=D[1]-A[1]*T.k;return R===T.x&&O===T.y?T:new ao(T.k,R,O)}function y(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function S(T,D,A,R){T.on("start.zoom",function(){E(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(R).end()}).tween("zoom",function(){var O=this,L=arguments,Y=E(O,L).event(R),G=t.apply(O,L),X=A==null?y(G):typeof A=="function"?A.apply(O,L):A,F=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),K=O.__zoom,$=typeof D=="function"?D.apply(O,L):D,le=s(K.invert(X).concat(F/K.k),$.invert(X).concat(F/$.k));return function(W){if(W===1)W=$;else{var j=le(W),te=F/j[2];W=new ao(te,X[0]-j[0]*te,X[1]-j[1]*te)}Y.zoom(null,W)}})}function E(T,D,A){return!A&&T.__zooming||new _(T,D)}function _(T,D){this.that=T,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,D),this.taps=0}_.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,D){return this.mouse&&T!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var D=wt(this.that).datum();u.call(T,this.that,new th(T,{sourceEvent:this.sourceEvent,target:g,type:T,transform:this.that.__zoom,dispatch:u}),D)}};function w(T,...D){if(!e.apply(this,arguments))return;var A=E(this,D).event(T),R=this.__zoom,O=Math.max(a[0],Math.min(a[1],R.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(A.wheel)(A.mouse[0][0]!==L[0]||A.mouse[0][1]!==L[1])&&(A.mouse[1]=R.invert(A.mouse[0]=L)),clearTimeout(A.wheel);else{if(R.k===O)return;A.mouse=[L,R.invert(L)],Da(this),A.start()}$r(T),A.wheel=setTimeout(Y,v),A.zoom("mouse",n(m(h(R,O),A.mouse[0],A.mouse[1]),A.extent,r));function Y(){A.wheel=null,A.end()}}function C(T,...D){if(f||!e.apply(this,arguments))return;var A=T.currentTarget,R=E(this,D,!0).event(T),O=wt(T.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",F,!0),L=Xt(T,A),Y=T.clientX,G=T.clientY;Ts(T.view),hf(T),R.mouse=[L,this.__zoom.invert(L)],Da(this),R.start();function X(K){if($r(K),!R.moved){var $=K.clientX-Y,le=K.clientY-G;R.moved=$*$+le*le>b}R.event(K).zoom("mouse",n(m(R.that.__zoom,R.mouse[0]=Xt(K,A),R.mouse[1]),R.extent,r))}function F(K){O.on("mousemove.zoom mouseup.zoom",null),Ns(K.view,R.moved),$r(K),R.event(K).end()}}function B(T,...D){if(e.apply(this,arguments)){var A=this.__zoom,R=Xt(T.changedTouches?T.changedTouches[0]:T,this),O=A.invert(R),L=A.k*(T.shiftKey?.5:2),Y=n(m(h(A,L),R,O),t.apply(this,D),r);$r(T),l>0?wt(this).transition().duration(l).call(S,Y,R,T):wt(this).call(g.transform,Y,R,T)}}function M(T,...D){if(e.apply(this,arguments)){var A=T.touches,R=A.length,O=E(this,D,T.changedTouches.length===R).event(T),L,Y,G,X;for(hf(T),Y=0;Y<R;++Y)G=A[Y],X=Xt(G,this),X=[X,this.__zoom.invert(X),G.identifier],O.touch0?!O.touch1&&O.touch0[2]!==X[2]&&(O.touch1=X,O.taps=0):(O.touch0=X,L=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(O.taps<2&&(d=X[0],c=setTimeout(function(){c=null},p)),Da(this),O.start())}}function z(T,...D){if(this.__zooming){var A=E(this,D).event(T),R=T.changedTouches,O=R.length,L,Y,G,X;for($r(T),L=0;L<O;++L)Y=R[L],G=Xt(Y,this),A.touch0&&A.touch0[2]===Y.identifier?A.touch0[0]=G:A.touch1&&A.touch1[2]===Y.identifier&&(A.touch1[0]=G);if(Y=A.that.__zoom,A.touch1){var F=A.touch0[0],K=A.touch0[1],$=A.touch1[0],le=A.touch1[1],W=(W=$[0]-F[0])*W+(W=$[1]-F[1])*W,j=(j=le[0]-K[0])*j+(j=le[1]-K[1])*j;Y=h(Y,Math.sqrt(W/j)),G=[(F[0]+$[0])/2,(F[1]+$[1])/2],X=[(K[0]+le[0])/2,(K[1]+le[1])/2]}else if(A.touch0)G=A.touch0[0],X=A.touch0[1];else return;A.zoom("touch",n(m(Y,G,X),A.extent,r))}}function I(T,...D){if(this.__zooming){var A=E(this,D).event(T),R=T.changedTouches,O=R.length,L,Y;for(hf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),L=0;L<O;++L)Y=R[L],A.touch0&&A.touch0[2]===Y.identifier?delete A.touch0:A.touch1&&A.touch1[2]===Y.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(Y=Xt(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<x)){var G=wt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return g.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Us(+T),g):o},g.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Us(!!T),g):e},g.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Us(!!T),g):i},g.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Us([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),g):t},g.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],g):[a[0],a[1]]},g.translateExtent=function(T){return arguments.length?(r[0][0]=+T[0][0],r[1][0]=+T[1][0],r[0][1]=+T[0][1],r[1][1]=+T[1][1],g):[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},g.constrain=function(T){return arguments.length?(n=T,g):n},g.duration=function(T){return arguments.length?(l=+T,g):l},g.interpolate=function(T){return arguments.length?(s=T,g):s},g.on=function(){var T=u.on.apply(u,arguments);return T===u?g:T},g.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,g):Math.sqrt(b)},g.tapDistance=function(T){return arguments.length?(x=+T,g):x},g}var An={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},el=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],rh=["Enter"," ","Escape"],lh={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},$i;(function(e){e.Strict="strict",e.Loose="loose"})($i||($i={}));var ai;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ai||(ai={}));var Oa;(function(e){e.Partial="partial",e.Full="full"})(Oa||(Oa={}));var sh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Co;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Co||(Co={}));var Qr;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Qr||(Qr={}));var ne;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ne||(ne={}));var Cx={[ne.Left]:ne.Right,[ne.Right]:ne.Left,[ne.Top]:ne.Bottom,[ne.Bottom]:ne.Top};function uh(e){return e===null?null:e?"valid":"invalid"}var ch=e=>"id"in e&&"source"in e&&"target"in e,Gx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),fh=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var qs=(e,t=[0,0])=>{let{width:n,height:o}=wo(e),i=e.origin??t,a=n*i[0],r=o*i[1];return{x:e.position.x-a,y:e.position.y-r}},dh=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",r=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(r=a?t.nodeLookup.get(i):fh(i)?i:t.nodeLookup.get(i.id));let l=r?bf(r,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return xf(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return _f(n)},tl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=xf(n,bf(i)),o=!0)}),o?_f(n):{x:0,y:0,width:0,height:0}},Sf=(e,t,[n,o,i]=[0,0,1],a=!1,r=!1)=>{let l={...il(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(r&&!d||f)continue;let p=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=nl(l,La(u)),x=(p??0)*(v??0),g=a&&b>0;(!u.internals.handleBounds||g||b>=x||u.dragging)&&s.push(u)}return s},Ix=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function NM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Ux({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},r){if(e.size===0)return Promise.resolve(!0);let l=NM(e,r),s=tl(l),u=Zs(s,t,n,r?.minZoom??i,r?.maxZoom??a,r?.padding??.1);return await o.setViewport(u,{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate}),Promise.resolve(!0)}function ph({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let r=n.get(e),l=r.parentId?n.get(r.parentId):void 0,{x:s,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=r.origin??o,d=r.extent||i;if(r.extent==="parent"&&!r.expandParent)if(!l)a?.("005",An.error005());else{let p=l.measured.width,v=l.measured.height;p&&v&&(d=[[s,u],[s+p,u+v]])}else l&&Jr(r.extent)&&(d=[[r.extent[0][0]+s,r.extent[0][1]+u],[r.extent[1][0]+s,r.extent[1][1]+u]]);let f=Jr(d)?za(t,d,r.measured):t;return(r.measured.width===void 0||r.measured.height===void 0)&&a?.("015",An.error015()),{position:{x:f.x-s+(r.measured.width??0)*c[0],y:f.y-u+(r.measured.height??0)*c[1]},positionAbsolute:f}}async function Vx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),r=[];for(let f of n){if(f.deletable===!1)continue;let p=a.has(f.id),v=!p&&f.parentId&&r.find(b=>b.id===f.parentId);(p||v)&&r.push(f)}let l=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=Ix(r,s);for(let f of s)l.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:r};let d=await i({nodes:r,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:r}:{edges:[],nodes:[]}:d}var Wr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),za=(e={x:0,y:0},t,n)=>({x:Wr(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Wr(e.y,t[0][1],t[1][1]-(n?.height??0))});function Yx(e,t,n){let{width:o,height:i}=wo(n),{x:a,y:r}=n.internals.positionAbsolute;return za(e,[[a,r],[a+o,r+i]],t)}var wx=(e,t,n)=>e<t?Wr(Math.abs(e-t),1,t)/t:e>n?-Wr(Math.abs(e-n),1,t)/t:0,Xx=(e,t,n=15,o=40)=>{let i=wx(e.x,o,t.width-o)*n,a=wx(e.y,o,t.height-o)*n;return[i,a]},xf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ah=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),_f=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),La=(e,t=[0,0])=>{let{x:n,y:o}=fh(e)?e.internals.positionAbsolute:qs(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},bf=(e,t=[0,0])=>{let{x:n,y:o}=fh(e)?e.internals.positionAbsolute:qs(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},mh=(e,t)=>_f(xf(ah(e),ah(t))),nl=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},hh=e=>Zn(e.width)&&Zn(e.height)&&Zn(e.x)&&Zn(e.y),Zn=e=>!isNaN(e)&&isFinite(e),gh=(e,t)=>{},ol=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),il=({x:e,y:t},[n,o,i],a=!1,r=[1,1])=>{let l={x:(e-n)/i,y:(t-o)/i};return a?ol(l,r):l},Xs=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Fr(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function CM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Fr(e,n),i=Fr(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Fr(e.top??e.y??0,n),i=Fr(e.bottom??e.y??0,n),a=Fr(e.left??e.x??0,t),r=Fr(e.right??e.x??0,t);return{top:o,right:r,bottom:i,left:a,x:a+r,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function wM(e,t,n,o,i,a){let{x:r,y:l}=Xs(e,[t,n,o]),{x:s,y:u}=Xs({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(r),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(d)}}var Zs=(e,t,n,o,i,a)=>{let r=CM(a,t,n),l=(t-r.x)/e.width,s=(n-r.y)/e.height,u=Math.min(l,s),c=Wr(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*c,v=n/2-f*c,b=wM(e,p,v,c,t,n),x={left:Math.min(b.left-r.left,0),top:Math.min(b.top-r.top,0),right:Math.min(b.right-r.right,0),bottom:Math.min(b.bottom-r.bottom,0)};return{x:p-x.left+x.right,y:v-x.top+x.bottom,zoom:c}},al=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Jr(e){return e!=null&&e!=="parent"}function wo(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function yh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function vh(e,t={width:0,height:0},n,o,i){let a={...e},r=o.get(n);if(r){let l=r.origin||i;a.x+=r.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=r.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function bh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function qx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Zx(e){return{...lh,...e||{}}}function Ys(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:r}=jn(e),l=il({x:a-(i?.left??0),y:r-(i?.top??0)},o),{x:s,y:u}=n?ol(l,t):l;return{xSnapped:s,ySnapped:u,...l}}var Ef=e=>({width:e.offsetWidth,height:e.offsetHeight}),Sh=e=>e?.getRootNode?.()||window?.document,AM=["INPUT","SELECT","TEXTAREA"];function xh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:AM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var _h=e=>"clientX"in e,jn=(e,t)=>{let n=_h(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},Ax=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(r=>{let l=r.getBoundingClientRect();return{id:r.getAttribute("data-handleid"),type:e,nodeId:i,position:r.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Ef(r)}})};function Tf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:r,targetControlY:l}){let s=e*.125+i*.375+r*.375+n*.125,u=t*.125+a*.375+l*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function yf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Mx({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case ne.Left:return[t-yf(t-o,a),n];case ne.Right:return[t+yf(o-t,a),n];case ne.Top:return[t,n-yf(n-i,a)];case ne.Bottom:return[t,n+yf(i-n,a)]}}function Nf({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:o,targetY:i,targetPosition:a=ne.Top,curvature:r=.25}){let[l,s]=Mx({pos:n,x1:e,y1:t,x2:o,y2:i,c:r}),[u,c]=Mx({pos:a,x1:o,y1:i,x2:e,y2:t,c:r}),[d,f,p,v]=Tf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${s} ${u},${c} ${o},${i}`,d,f,p,v]}function Eh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,r=Math.abs(o-t)/2,l=o<t?o+r:o-r;return[a,l,i,r]}function jx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let r=i&&n?o+1e3:o,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return r+l}function $x({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=xf(bf(e),bf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let r={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return nl(r,_f(a))>0}var MM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,DM=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Th=(e,t,n={})=>{if(!e.source||!e.target)return gh("006",An.error006()),t;let o=n.getEdgeId||MM,i;return ch(e)?i={...e}:i={...e,id:o(e)},DM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Cf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,r,l]=Eh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,r,l]}var Dx={[ne.Left]:{x:-1,y:0},[ne.Right]:{x:1,y:0},[ne.Top]:{x:0,y:-1},[ne.Bottom]:{x:0,y:1}},RM=({source:e,sourcePosition:t=ne.Bottom,target:n})=>t===ne.Left||t===ne.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Rx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function OM({source:e,sourcePosition:t=ne.Bottom,target:n,targetPosition:o=ne.Top,center:i,offset:a,stepPosition:r}){let l=Dx[t],s=Dx[o],u={x:e.x+l.x*a,y:e.y+l.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=RM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",p=d[f],v=[],b,x,g={x:0,y:0},h={x:0,y:0},[,,m,y]=Eh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*r,x=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,x=i.y??u.y+(c.y-u.y)*r);let E=[{x:b,y:u.y},{x:b,y:c.y}],_=[{x:u.x,y:x},{x:c.x,y:x}];l[f]===p?v=f==="x"?E:_:v=f==="x"?_:E}else{let E=[{x:u.x,y:c.y}],_=[{x:c.x,y:u.y}];if(f==="x"?v=l.x===p?_:E:v=l.y===p?E:_,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let I=Math.min(a-1,a-z);l[f]===p?g[f]=(u[f]>e[f]?-1:1)*I:h[f]=(c[f]>n[f]?-1:1)*I}}if(t!==o){let z=f==="x"?"y":"x",I=l[f]===s[z],T=u[z]>c[z],D=u[z]<c[z];(l[f]===1&&(!I&&T||I&&D)||l[f]!==1&&(!I&&D||I&&T))&&(v=f==="x"?E:_)}let w={x:u.x+g.x,y:u.y+g.y},C={x:c.x+h.x,y:c.y+h.y},B=Math.max(Math.abs(w.x-v[0].x),Math.abs(C.x-v[0].x)),M=Math.max(Math.abs(w.y-v[0].y),Math.abs(C.y-v[0].y));B>=M?(b=(w.x+C.x)/2,x=v[0].y):(b=v[0].x,x=(w.y+C.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...v,{x:c.x+h.x,y:c.y+h.y},n],b,x,m,y]}function zM(e,t,n,o){let i=Math.min(Rx(e,t)/2,Rx(t,n)/2,o),{x:a,y:r}=t;if(e.x===a&&a===n.x||e.y===r&&r===n.y)return`L${a} ${r}`;if(e.y===r){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${r}Q ${a},${r} ${a},${r+i*c}`}let l=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${r+i*s}Q ${a},${r} ${a+i*l},${r}`}function js({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:o,targetY:i,targetPosition:a=ne.Top,borderRadius:r=5,centerX:l,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,p,v,b]=OM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:l,y:s},offset:u,stepPosition:c});return[d.reduce((g,h,m)=>{let y="";return m>0&&m<d.length-1?y=zM(d[m-1],h,d[m+1],r):y=`${m===0?"M":"L"}${h.x} ${h.y}`,g+=y,g},""),f,p,v,b]}function Ox(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Fx(e){let{sourceNode:t,targetNode:n}=e;if(!Ox(t)||!Ox(n))return null;let o=t.internals.handleBounds||zx(t.handles),i=n.internals.handleBounds||zx(n.handles),a=Lx(o?.source??[],e.sourceHandle),r=Lx(e.connectionMode===$i.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!r)return e.onError?.("008",An.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let l=a?.position||ne.Bottom,s=r?.position||ne.Top,u=Fi(t,a,l),c=Fi(n,r,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:s}}function zx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Fi(e,t,n=ne.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:r,height:l}=t??wo(e);if(o)return{x:i+r/2,y:a+l/2};switch(t?.position??n){case ne.Top:return{x:i+r/2,y:a};case ne.Right:return{x:i+r,y:a+l/2};case ne.Bottom:return{x:i+r/2,y:a+l};case ne.Left:return{x:i,y:a+l/2}}}function Lx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function wf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Kx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((r,l)=>([l.markerStart||o,l.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=wf(s,t);a.has(u)||(r.push({id:u,color:s.color||n,...s}),a.add(u))}}),r),[]).sort((r,l)=>r.id.localeCompare(l.id))}var Qx=1e3,LM=10,Nh={nodeOrigin:[0,0],nodeExtent:el,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},BM={...Nh,checkEquality:!0};function Ch(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Wx(e,t,n){let o=Ch(Nh,n);for(let i of e.values())if(i.parentId)Ah(i,e,t,o);else{let a=qs(i,o.nodeOrigin),r=Jr(i.extent)?i.extent:o.nodeExtent,l=za(a,r,wo(i));i.internals.positionAbsolute=l}}function PM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function wh(e){return e==="manual"}function Af(e,t,n,o={}){let i=Ch(BM,o),a={i:0},r=new Map(t),l=i?.elevateNodesOnSelect&&!wh(i.zIndexMode)?Qx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=r.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=qs(u,i.nodeOrigin),f=Jr(u.extent)?u.extent:i.nodeExtent,p=za(d,f,wo(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:p,handleBounds:PM(u,c),z:Jx(u,l,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&Ah(c,t,n,o,a)}return s}function HM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Ah(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:r,nodeExtent:l,zIndexMode:s}=Ch(Nh,o),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}HM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*LM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!wh(s)?Qx:0,{x:f,y:p,z:v}=kM(e,c,r,l,d,s),{positionAbsolute:b}=e.internals,x=f!==b.x||p!==b.y;(x||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:f,y:p}:b,z:v}})}function Jx(e,t,n){let o=Zn(e.zIndex)?e.zIndex:0;return wh(n)?o:o+(e.selected?t:0)}function kM(e,t,n,o,i,a){let{x:r,y:l}=t.internals.positionAbsolute,s=wo(e),u=qs(e,n),c=Jr(e.extent)?za(u,e.extent,s):u,d=za({x:r+c.x,y:l+c.y},o,s);e.extent==="parent"&&(d=Yx(d,s,t));let f=Jx(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function Mf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let r of e){let l=t.get(r.parentId);if(!l)continue;let s=a.get(r.parentId)?.expandedRect??La(l),u=mh(s,r.rect);a.set(r.parentId,{expandedRect:u,parent:l})}return a.size>0&&a.forEach(({expandedRect:r,parent:l},s)=>{let u=l.internals.positionAbsolute,c=wo(l),d=l.origin??o,f=r.x<u.x?Math.round(Math.abs(u.x-r.x)):0,p=r.y<u.y?Math.round(Math.abs(u.y-r.y)):0,v=Math.max(c.width,Math.round(r.width)),b=Math.max(c.height,Math.round(r.height)),x=(v-c.width)*d[0],g=(b-c.height)*d[1];(f>0||p>0||x||g)&&(i.push({id:s,type:"position",position:{x:l.position.x-f+x,y:l.position.y-p+g}}),n.get(s)?.forEach(h=>{e.some(m=>m.id===h.id)||i.push({id:h.id,type:"position",position:{x:h.position.x+f,y:h.position.y+p}})})),(c.width<r.width||c.height<r.height||f||p)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-x:0),height:b+(p?d[1]*p-g:0)}})}),i}function e_(e,t,n,o,i,a,r){let l=o?.querySelector(".xyflow__viewport"),s=!1;if(!l)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let p of e.values()){let v=t.get(p.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=Ef(p.nodeElement),x=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(x||!v.internals.handleBounds||p.force))){let h=p.nodeElement.getBoundingClientRect(),m=Jr(v.extent)?v.extent:a,{positionAbsolute:y}=v.internals;v.parentId&&v.extent==="parent"?y=Yx(y,b,t.get(v.parentId)):m&&(y=za(y,m,b));let S={...v,measured:b,internals:{...v.internals,positionAbsolute:y,handleBounds:{source:Ax("source",p.nodeElement,h,d,v.id),target:Ax("target",p.nodeElement,h,d,v.id)}}};t.set(v.id,S),v.parentId&&Ah(S,t,n,{nodeOrigin:i,zIndexMode:r}),s=!0,x&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:La(S,i)}))}}if(f.length>0){let p=Mf(f,t,n,i);u.push(...p)}return{changes:u,updatedInternals:s}}async function t_({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let r=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),l=!!r&&(r.x!==n[0]||r.y!==n[1]||r.k!==n[2]);return Promise.resolve(l)}function Bx(e,t,n,o,i,a){let r=i,l=o.get(r)||new Map;o.set(r,l.set(n,t)),r=`${i}-${e}`;let s=o.get(r)||new Map;if(o.set(r,s.set(n,t)),a){r=`${i}-${e}-${a}`;let u=o.get(r)||new Map;o.set(r,u.set(n,t))}}function Mh(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:r=null,targetHandle:l=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:r,targetHandle:l},u=`${i}-${r}--${a}-${l}`,c=`${a}-${l}--${i}-${r}`;Bx("source",s,c,e,i,r),Bx("target",s,u,e,a,l),t.set(o.id,o)}}function n_(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:n_(n,t):!1}function Px(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function GM(e,t,n,o){let i=new Map;for(let[a,r]of e)if((r.selected||r.id===o)&&(!r.parentId||!n_(r,e))&&(r.draggable||t&&typeof r.draggable>"u")){let l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function nh({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[r,l]of t){let s=n.get(r)?.internals.userNode;s&&i.push({...s,position:l.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function IM({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},r=ol(a,t);return{x:r.x-a.x,y:r.y-a.y}}function o_({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},r=0,l=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,p=!1,v=!1,b=null;function x({noDragClassName:h,handleSelector:m,domNode:y,isSelectable:S,nodeId:E,nodeClickDistance:_=0}){f=wt(y);function w({x:z,y:I}){let{nodeLookup:T,nodeExtent:D,snapGrid:A,snapToGrid:R,nodeOrigin:O,onNodeDrag:L,onSelectionDrag:Y,onError:G,updateNodePositions:X}=t();a={x:z,y:I};let F=!1,K=l.size>1,$=K&&D?ah(tl(l)):null,le=K&&R?IM({dragItems:l,snapGrid:A,x:z,y:I}):null;for(let[W,j]of l){if(!T.has(W))continue;let te={x:z-j.distance.x,y:I-j.distance.y};R&&(te=le?{x:Math.round(te.x+le.x),y:Math.round(te.y+le.y)}:ol(te,A));let ge=null;if(K&&D&&!j.extent&&$){let{positionAbsolute:Q}=j.internals,xe=Q.x-$.x+D[0][0],Ne=Q.x+j.measured.width-$.x2+D[1][0],_e=Q.y-$.y+D[0][1],et=Q.y+j.measured.height-$.y2+D[1][1];ge=[[xe,_e],[Ne,et]]}let{position:me,positionAbsolute:re}=ph({nodeId:W,nextPosition:te,nodeLookup:T,nodeExtent:ge||D,nodeOrigin:O,onError:G});F=F||j.position.x!==me.x||j.position.y!==me.y,j.position=me,j.internals.positionAbsolute=re}if(v=v||F,!!F&&(X(l,!0),b&&(o||L||!E&&Y))){let[W,j]=nh({nodeId:E,dragItems:l,nodeLookup:T});o?.(b,l,W,j),L?.(b,W,j),E||Y?.(b,j)}}async function C(){if(!c)return;let{transform:z,panBy:I,autoPanSpeed:T,autoPanOnNodeDrag:D}=t();if(!D){s=!1,cancelAnimationFrame(r);return}let[A,R]=Xx(u,c,T);(A!==0||R!==0)&&(a.x=(a.x??0)-A/z[2],a.y=(a.y??0)-R/z[2],await I({x:A,y:R})&&w(a)),r=requestAnimationFrame(C)}function B(z){let{nodeLookup:I,multiSelectionActive:T,nodesDraggable:D,transform:A,snapGrid:R,snapToGrid:O,selectNodesOnDrag:L,onNodeDragStart:Y,onSelectionDragStart:G,unselectNodesAndEdges:X}=t();d=!0,(!L||!S)&&!T&&E&&(I.get(E)?.selected||X()),S&&L&&E&&e?.(E);let F=Ys(z.sourceEvent,{transform:A,snapGrid:R,snapToGrid:O,containerBounds:c});if(a=F,l=GM(I,D,F,E),l.size>0&&(n||Y||!E&&G)){let[K,$]=nh({nodeId:E,dragItems:l,nodeLookup:I});n?.(z.sourceEvent,l,K,$),Y?.(z.sourceEvent,K,$),E||G?.(z.sourceEvent,$)}}let M=$c().clickDistance(_).on("start",z=>{let{domNode:I,nodeDragThreshold:T,transform:D,snapGrid:A,snapToGrid:R}=t();c=I?.getBoundingClientRect()||null,p=!1,v=!1,b=z.sourceEvent,T===0&&B(z),a=Ys(z.sourceEvent,{transform:D,snapGrid:A,snapToGrid:R,containerBounds:c}),u=jn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:I,transform:T,snapGrid:D,snapToGrid:A,nodeDragThreshold:R,nodeLookup:O}=t(),L=Ys(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:A,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||E&&!O.has(E))&&(p=!0),!p){if(!s&&I&&d&&(s=!0,C()),!d){let Y=jn(z.sourceEvent,c),G=Y.x-u.x,X=Y.y-u.y;Math.sqrt(G*G+X*X)>R&&B(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&l&&d&&(u=jn(z.sourceEvent,c),w(L))}}).on("end",z=>{if(!(!d||p)&&(s=!1,d=!1,cancelAnimationFrame(r),l.size>0)){let{nodeLookup:I,updateNodePositions:T,onNodeDragStop:D,onSelectionDragStop:A}=t();if(v&&(T(l,!1),v=!1),i||D||!E&&A){let[R,O]=nh({nodeId:E,dragItems:l,nodeLookup:I,dragging:!1});i?.(z.sourceEvent,l,R,O),D?.(z.sourceEvent,R,O),E||A?.(z.sourceEvent,O)}}}).filter(z=>{let I=z.target;return!z.button&&(!h||!Px(I,`.${h}`,y))&&(!m||Px(I,m,y))});f.call(M)}function g(){f?.on(".drag",null)}return{update:x,destroy:g}}function UM(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())nl(i,La(a))>0&&o.push(a);return o}var VM=250;function YM(e,t,n,o){let i=[],a=1/0,r=UM(e,n,t+VM);for(let l of r){let s=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=Fi(l,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let l=o.type==="source"?"target":"source";return i.find(s=>s.type===l)??i[0]}return i[0]}function i_(e,t,n,o,i,a=!1){let r=o.get(e);if(!r)return null;let l=i==="strict"?r.internals.handleBounds?.[t]:[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]],s=(n?l?.find(u=>u.id===n):l?.[0])??null;return s&&a?{...s,...Fi(r,s,s.position,!0)}:s}function a_(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function XM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var r_=()=>!0;function qM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:r,domNode:l,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:p,onConnectStart:v,onConnect:b,onConnectEnd:x,isValidConnection:g=r_,onReconnectEnd:h,updateConnection:m,getTransform:y,getFromHandle:S,autoPanSpeed:E,dragThreshold:_=1,handleDomNode:w}){let C=Sh(e.target),B=0,M,{x:z,y:I}=jn(e),T=a_(a,w),D=l?.getBoundingClientRect(),A=!1;if(!D||!T)return;let R=i_(i,T,o,s,t);if(!R)return;let O=jn(e,D),L=!1,Y=null,G=!1,X=null;function F(){if(!c||!D)return;let[me,re]=Xx(O,D,E);f({x:me,y:re}),B=requestAnimationFrame(F)}let K={...R,nodeId:i,type:T,position:R.position},$=s.get(i),W={inProgress:!0,isValid:null,from:Fi($,K,ne.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:$,to:O,toHandle:null,toPosition:Cx[K.position],toNode:null,pointer:O};function j(){A=!0,m(W),v?.(e,{nodeId:i,handleId:o,handleType:T})}_===0&&j();function te(me){if(!A){let{x:et,y:De}=jn(me),we=et-z,tt=De-I;if(!(we*we+tt*tt>_*_))return;j()}if(!S()||!K){ge(me);return}let re=y();O=jn(me,D),M=YM(il(O,re,!1,[1,1]),n,s,K),L||(F(),L=!0);let Q=l_(me,{handle:M,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:r?"target":"source",isValidConnection:g,doc:C,lib:u,flowId:d,nodeLookup:s});X=Q.handleDomNode,Y=Q.connection,G=XM(!!M,Q.isValid);let xe=s.get(i),Ne=xe?Fi(xe,K,ne.Left,!0):W.from,_e={...W,from:Ne,isValid:G,to:Q.toHandle&&G?Xs({x:Q.toHandle.x,y:Q.toHandle.y},re):O,toHandle:Q.toHandle,toPosition:G&&Q.toHandle?Q.toHandle.position:Cx[K.position],toNode:Q.toHandle?s.get(Q.toHandle.nodeId):null,pointer:O};m(_e),W=_e}function ge(me){if(!("touches"in me&&me.touches.length>0)){if(A){(M||X)&&Y&&G&&b?.(Y);let{inProgress:re,...Q}=W,xe={...Q,toPosition:W.toHandle?W.toPosition:null};x?.(me,xe),a&&h?.(me,xe)}p(),cancelAnimationFrame(B),L=!1,G=!1,Y=null,X=null,C.removeEventListener("mousemove",te),C.removeEventListener("mouseup",ge),C.removeEventListener("touchmove",te),C.removeEventListener("touchend",ge)}}C.addEventListener("mousemove",te),C.addEventListener("mouseup",ge),C.addEventListener("touchmove",te),C.addEventListener("touchend",ge)}function l_(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:r,lib:l,flowId:s,isValidConnection:u=r_,nodeLookup:c}){let d=a==="target",f=t?r.querySelector(`.${l}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:v}=jn(e),b=r.elementFromPoint(p,v),x=b?.classList.contains(`${l}-flow__handle`)?b:f,g={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){let h=a_(void 0,x),m=x.getAttribute("data-nodeid"),y=x.getAttribute("data-handleid"),S=x.classList.contains("connectable"),E=x.classList.contains("connectableend");if(!m||!h)return g;let _={source:d?m:o,sourceHandle:d?y:i,target:d?o:m,targetHandle:d?i:y};g.connection=_;let C=S&&E&&(n===$i.Strict?d&&h==="source"||!d&&h==="target":m!==o||y!==i);g.isValid=C&&u(_),g.toHandle=i_(m,h,y,c,n,!0)}return g}var Df={onPointerDown:qM,isValid:l_};function s_({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=wt(e);function a({translateExtent:l,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:p=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let y=n(),S=m.sourceEvent.ctrlKey&&al()?10:1,E=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,_=y[2]*Math.pow(2,E*S);t.scaleTo(_)},b=[0,0],x=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},g=m=>{let y=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let S=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],E=[S[0]-b[0],S[1]-b[1]];b=S;let _=o()*Math.max(y[2],Math.log(y[2]))*(p?-1:1),w={x:y[0]-E[0]*_,y:y[1]-E[1]*_},C=[[0,0],[s,u]];t.setViewportConstrained({x:w.x,y:w.y,zoom:y[2]},C,l)},h=gf().on("start",x).on("zoom",d?g:null).on("zoom.wheel",f?v:null);i.call(h,{})}function r(){i.on("zoom",null)}return{update:a,destroy:r,pointer:Xt}}var Rf=e=>({x:e.x,y:e.y,zoom:e.k}),oh=({x:e,y:t,zoom:n})=>Ra.translate(e,t).scale(n),Kr=(e,t)=>e.target.closest(`.${t}`),u_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),ZM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ih=(e,t=0,n=ZM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},c_=e=>{let t=e.ctrlKey&&al()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function jM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:r,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Kr(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&r){let x=Xt(c),g=c_(c),h=d*Math.pow(2,g);o.scaleTo(n,h,x,c);return}let f=c.deltaMode===1?20:1,p=i===ai.Vertical?0:c.deltaX*f,v=i===ai.Horizontal?0:c.deltaY*f;!al()&&c.shiftKey&&i!==ai.Vertical&&(p=c.deltaY*f,v=0),o.translateBy(n,-(p/d)*a,-(v/d)*a,{internal:!0});let b=Rf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(c,b))}}function $M({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",r=!t&&a&&!o.ctrlKey,l=Kr(o,e);if(o.ctrlKey&&a&&l&&o.preventDefault(),r||l)return null;o.preventDefault(),n.call(this,o,i)}}function FM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Rf(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function KM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&u_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Rf(a.transform))}}function QM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return r=>{if(!r.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&u_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&r.sourceEvent&&a(r.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let l=Rf(r.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(r.sourceEvent,l)},n?150:0)}}}function WM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:r,noWheelClassName:l,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,p=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Kr(d,`${u}-flow__node`)||Kr(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||r||c&&!v||Kr(d,l)&&v||Kr(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!p&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function f_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:r,onPanZoomEnd:l,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=gf().scaleExtent([t,n]).translateExtent(o),f=wt(e).call(d);h({x:i.x,y:i.y,zoom:Wr(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let p=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(c_);function b(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?oi:Aa).transform(ih(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function x({noWheelClassName:M,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:T,panOnScroll:D,panOnDrag:A,panOnScrollMode:R,panOnScrollSpeed:O,preventScrolling:L,zoomOnPinch:Y,zoomOnScroll:G,zoomOnDoubleClick:X,zoomActivationKeyPressed:F,lib:K,onTransformChange:$,connectionInProgress:le,paneClickDistance:W,selectionOnDrag:j}){T&&!u.isZoomingOrPanning&&g();let te=D&&!F&&!T;d.clickDistance(j?1/0:!Zn(W)||W<0?0:W);let ge=te?jM({zoomPanValues:u,noWheelClassName:M,d3Selection:f,d3Zoom:d,panOnScrollMode:R,panOnScrollSpeed:O,zoomOnPinch:Y,onPanZoomStart:r,onPanZoom:a,onPanZoomEnd:l}):$M({noWheelClassName:M,preventScrolling:L,d3ZoomHandler:p});if(f.on("wheel.zoom",ge,{passive:!1}),!T){let re=FM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:r});d.on("start",re);let Q=KM({zoomPanValues:u,panOnDrag:A,onPaneContextMenu:!!I,onPanZoom:a,onTransformChange:$});d.on("zoom",Q);let xe=QM({zoomPanValues:u,panOnDrag:A,panOnScroll:D,onPaneContextMenu:I,onPanZoomEnd:l,onDraggingChange:s});d.on("end",xe)}let me=WM({zoomActivationKeyPressed:F,panOnDrag:A,zoomOnScroll:G,panOnScroll:D,zoomOnDoubleClick:X,zoomOnPinch:Y,userSelectionActive:T,noPanClassName:z,noWheelClassName:M,lib:K,connectionInProgress:le});d.filter(me),X?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function g(){d.on("zoom",null)}async function h(M,z,I){let T=oh(M),D=d?.constrain()(T,z,I);return D&&await b(D),new Promise(A=>A(D))}async function m(M,z){let I=oh(M);return await b(I,z),new Promise(T=>T(I))}function y(M){if(f){let z=oh(M),I=f.property("__zoom");(I.k!==M.zoom||I.x!==M.x||I.y!==M.y)&&d?.transform(f,z,null,{sync:!0})}}function S(){let M=f?Vs(f.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function E(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?oi:Aa).scaleTo(ih(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function _(M,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?oi:Aa).scaleBy(ih(f,z?.duration,z?.ease,()=>I(!0)),M)}):Promise.resolve(!1)}function w(M){d?.scaleExtent(M)}function C(M){d?.translateExtent(M)}function B(M){let z=!Zn(M)||M<0?0:M;d?.clickDistance(z)}return{update:x,destroy:g,setViewport:m,setViewportConstrained:h,getViewport:S,scaleTo:E,scaleBy:_,setScaleExtent:w,setTranslateExtent:C,syncViewport:y,setClickDistance:B}}var Ki;(function(e){e.Line="line",e.Handle="handle"})(Ki||(Ki={}));function JM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let r=e-t,l=n-o,s=[r>0?1:r<0?-1:0,l>0?1:l<0?-1:0];return r&&i&&(s[0]=s[0]*-1),l&&a&&(s[1]=s[1]*-1),s}function Hx(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function Zi(e,t){return Math.max(0,t-e)}function ji(e,t){return Math.max(0,e-t)}function vf(e,t,n){return Math.max(0,t-e,e-n)}function kx(e,t){return e?!t:t}function eD(e,t,n,o,i,a,r,l){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:p,ySnapped:v}=n,{minWidth:b,maxWidth:x,minHeight:g,maxHeight:h}=o,{x:m,y,width:S,height:E,aspectRatio:_}=e,w=Math.floor(c?p-e.pointerX:0),C=Math.floor(d?v-e.pointerY:0),B=S+(s?-w:w),M=E+(u?-C:C),z=-a[0]*S,I=-a[1]*E,T=vf(B,b,x),D=vf(M,g,h);if(r){let O=0,L=0;s&&w<0?O=Zi(m+w+z,r[0][0]):!s&&w>0&&(O=ji(m+B+z,r[1][0])),u&&C<0?L=Zi(y+C+I,r[0][1]):!u&&C>0&&(L=ji(y+M+I,r[1][1])),T=Math.max(T,O),D=Math.max(D,L)}if(l){let O=0,L=0;s&&w>0?O=ji(m+w,l[0][0]):!s&&w<0&&(O=Zi(m+B,l[1][0])),u&&C>0?L=ji(y+C,l[0][1]):!u&&C<0&&(L=Zi(y+M,l[1][1])),T=Math.max(T,O),D=Math.max(D,L)}if(i){if(c){let O=vf(B/_,g,h)*_;if(T=Math.max(T,O),r){let L=0;!s&&!u||s&&!u&&f?L=ji(y+I+B/_,r[1][1])*_:L=Zi(y+I+(s?w:-w)/_,r[0][1])*_,T=Math.max(T,L)}if(l){let L=0;!s&&!u||s&&!u&&f?L=Zi(y+B/_,l[1][1])*_:L=ji(y+(s?w:-w)/_,l[0][1])*_,T=Math.max(T,L)}}if(d){let O=vf(M*_,b,x)/_;if(D=Math.max(D,O),r){let L=0;!s&&!u||u&&!s&&f?L=ji(m+M*_+z,r[1][0])/_:L=Zi(m+(u?C:-C)*_+z,r[0][0])/_,D=Math.max(D,L)}if(l){let L=0;!s&&!u||u&&!s&&f?L=Zi(m+M*_,l[1][0])/_:L=ji(m+(u?C:-C)*_,l[0][0])/_,D=Math.max(D,L)}}}C=C+(C<0?D:-D),w=w+(w<0?T:-T),i&&(f?B>M*_?C=(kx(s,u)?-w:w)/_:w=(kx(s,u)?-C:C)*_:c?(C=w/_,u=s):(w=C*_,s=u));let A=s?m+w:m,R=u?y+C:y;return{width:S+(s?-w:w),height:E+(u?-C:C),x:a[0]*w*(s?-1:1)+A,y:a[1]*C*(u?-1:1)+R}}var d_={width:0,height:0,x:0,y:0},tD={...d_,pointerX:0,pointerY:0,aspectRatio:1};function nD(e){return[[0,0],[e.measured.width,e.measured.height]]}function oD(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,r=e.measured.height??0,l=n[0]*a,s=n[1]*r;return[[o-l,i-s],[o+a-l,i+r-s]]}function p_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=wt(e),r={controlDirection:Hx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:p,onResize:v,onResizeEnd:b,shouldResize:x}){let g={...d_},h={...tD};r={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Hx(u)};let m,y=null,S=[],E,_,w,C=!1,B=$c().on("start",M=>{let{nodeLookup:z,transform:I,snapGrid:T,snapToGrid:D,nodeOrigin:A,paneDomNode:R}=n();if(m=z.get(t),!m)return;y=R?.getBoundingClientRect()??null;let{xSnapped:O,ySnapped:L}=Ys(M.sourceEvent,{transform:I,snapGrid:T,snapToGrid:D,containerBounds:y});g={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},h={...g,pointerX:O,pointerY:L,aspectRatio:g.width/g.height},E=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(E=z.get(m.parentId),_=E&&m.extent==="parent"?nD(E):void 0),S=[],w=void 0;for(let[Y,G]of z)if(G.parentId===t&&(S.push({id:Y,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){let X=oD(G,m,G.origin??A);w?w=[[Math.min(X[0][0],w[0][0]),Math.min(X[0][1],w[0][1])],[Math.max(X[1][0],w[1][0]),Math.max(X[1][1],w[1][1])]]:w=X}p?.(M,{...g})}).on("drag",M=>{let{transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D}=n(),A=Ys(M.sourceEvent,{transform:z,snapGrid:I,snapToGrid:T,containerBounds:y}),R=[];if(!m)return;let{x:O,y:L,width:Y,height:G}=g,X={},F=m.origin??D,{width:K,height:$,x:le,y:W}=eD(h,r.controlDirection,A,r.boundaries,r.keepAspectRatio,F,_,w),j=K!==Y,te=$!==G,ge=le!==O&&j,me=W!==L&&te;if(!ge&&!me&&!j&&!te)return;if((ge||me||F[0]===1||F[1]===1)&&(X.x=ge?le:g.x,X.y=me?W:g.y,g.x=X.x,g.y=X.y,S.length>0)){let Ne=le-O,_e=W-L;for(let et of S)et.position={x:et.position.x-Ne+F[0]*(K-Y),y:et.position.y-_e+F[1]*($-G)},R.push(et)}if((j||te)&&(X.width=j&&(!r.resizeDirection||r.resizeDirection==="horizontal")?K:g.width,X.height=te&&(!r.resizeDirection||r.resizeDirection==="vertical")?$:g.height,g.width=X.width,g.height=X.height),E&&m.expandParent){let Ne=F[0]*(X.width??0);X.x&&X.x<Ne&&(g.x=Ne,h.x=h.x-(X.x-Ne));let _e=F[1]*(X.height??0);X.y&&X.y<_e&&(g.y=_e,h.y=h.y-(X.y-_e))}let re=JM({width:g.width,prevWidth:Y,height:g.height,prevHeight:G,affectsX:r.controlDirection.affectsX,affectsY:r.controlDirection.affectsY}),Q={...g,direction:re};x?.(M,Q)!==!1&&(C=!0,v?.(M,Q),o(X,R))}).on("end",M=>{C&&(b?.(M,{...g}),i?.({...g}),C=!1)});a.call(B)}function s(){a.on(".drag",null)}return{update:l,destroy:s}}var C_=J(Et(),1),w_=J(x_(),1);var E_={},__=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let p=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,p))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(E_.env?E_.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(o,i,s);return s},T_=e=>e?__(e):__;var{useDebugValue:xD}=C_.default,{useSyncExternalStoreWithSelector:_D}=w_.default,ED=e=>e;function Rh(e,t=ED,n){let o=_D(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return xD(o),o}var N_=(e,t)=>{let n=T_(e),o=(i,a=t)=>Rh(n,i,a);return Object.assign(o,n),o},A_=(e,t)=>e?N_(e,t):N_;function je(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var TD=J(gd()),Pf=(0,k.createContext)(null),ND=Pf.Provider,W_=An.error001();function Ce(e,t){let n=(0,k.useContext)(Pf);if(n===null)throw new Error(W_);return Rh(n,e,t)}function Qe(){let e=(0,k.useContext)(Pf);if(e===null)throw new Error(W_);return(0,k.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var M_={display:"none"},CD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},J_="react-flow__node-desc",eE="react-flow__edge-desc",wD="react-flow__aria-live",AD=e=>e.ariaLiveMessage,MD=e=>e.ariaLabelConfig;function DD({rfId:e}){let t=Ce(AD);return(0,P.jsx)("div",{id:`${wD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:CD,children:t})}function RD({rfId:e,disableKeyboardA11y:t}){let n=Ce(MD);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{id:`${J_}-${e}`,style:M_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,P.jsx)("div",{id:`${eE}-${e}`,style:M_,children:n["edge.a11yDescription.default"]}),!t&&(0,P.jsx)(DD,{rfId:e})]})}var sl=(0,k.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let r=`${e}`.split("-");return(0,P.jsx)("div",{className:rt(["react-flow__panel",n,...r]),style:o,ref:a,...i,children:t})});sl.displayName="Panel";function OD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,P.jsx)(sl,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,P.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var zD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},zf=e=>e.id;function LD(e,t){return je(e.selectedNodes.map(zf),t.selectedNodes.map(zf))&&je(e.selectedEdges.map(zf),t.selectedEdges.map(zf))}function BD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=Ce(zD,LD);return(0,k.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var PD=e=>!!e.onSelectionChangeHandlers;function HD({onSelectionChange:e}){let t=Ce(PD);return e||t?(0,P.jsx)(BD,{onSelectionChange:e}):null}var tE=[0,0],kD={x:0,y:0,zoom:1},GD=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],D_=[...GD,"rfId"],ID=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),R_={translateExtent:el,nodeOrigin:tE,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function UD(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:r,reset:l,setDefaultNodesAndEdges:s}=Ce(ID,je),u=Qe();(0,k.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=R_,l()}),[]);let c=(0,k.useRef)(R_);return(0,k.useEffect)(()=>{for(let d of D_){let f=e[d],p=c.current[d];f!==p&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?r(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Zx(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},D_.map(d=>e[d])),null}function O_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function VD(e){let[t,n]=(0,k.useState)(e==="system"?null:e);return(0,k.useEffect)(()=>{if(e!=="system"){n(e);return}let o=O_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:O_()?.matches?"dark":"light"}var z_=typeof document<"u"?document:null;function $s(e=null,t={target:z_,actInsideInputWithModifier:!0}){let[n,o]=(0,k.useState)(!1),i=(0,k.useRef)(!1),a=(0,k.useRef)(new Set([])),[r,l]=(0,k.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
10
10
  `).replace(`
11
11
 
12
12
  `,`
13
13
  +`).split(`
14
- `)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,P.useEffect)(()=>{let s=t?.target??T_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&gh(h))return!1;let b=C_(h.code,r);if(a.current.add(h[b]),N_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let v=C_(h.code,r);N_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function N_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function C_(e,t){return t.includes(e)?"code":"key"}var ND=()=>{let e=Qe();return(0,P.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Us(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Kl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=ks(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function j_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)CD(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function CD(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function $_(e,t){return j_(e,t)}function F_(e,t){return j_(e,t)}function Ra(e,t){return{id:e,type:"select",selected:t}}function Jl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(Ra(a.id,l)))}return o}function w_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function A_(e){return{id:e.id,type:"remove"}}var M_=e=>Dx(e),wD=e=>ah(e);function K_(e){return(0,P.forwardRef)(e)}var AD=typeof window<"u"?P.useLayoutEffect:P.useEffect;function D_(e){let[t,n]=(0,P.useState)(BigInt(0)),[o]=(0,P.useState)(()=>MD(()=>n(i=>i+BigInt(1))));return AD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function MD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Q_=(0,P.createContext)(null);function DD({children:e}){let t=Qe(),n=(0,P.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=w_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:g,setNodes:m}=t.getState();p&&m(g)})},[]),o=D_(n),i=(0,P.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(w_({items:h,lookup:f}))},[]),a=D_(i),l=(0,P.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,H.jsx)(Q_.Provider,{value:l,children:e})}function RD(){let e=(0,P.useContext)(Q_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var OD=e=>!!e.panZoom;function Dh(){let e=ND(),t=Qe(),n=RD(),o=Ae(OD),i=(0,P.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),v=M_(d)?d:f.get(d.id),b=v.parentId?ph(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Da(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&M_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&wD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:g,onDelete:m,onBeforeDelete:y}=t.getState(),{nodes:x,edges:_}=await zx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:y}),E=_.length>0,C=x.length>0;if(E){let A=_.map(A_);S?.(_),g(A)}if(C){let A=x.map(A_);b?.(x),p(A)}return(C||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=ch(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let g=t.getState().nodeLookup.get(p.id);if(g&&!v&&(p.id===d.id||!g.internals.positionAbsolute))return!1;let m=Da(S?p:g),y=$l(m,b);return f&&y>0||y>=m.width*m.height||y>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=ch(d)?d:s(d);if(!b)return!1;let S=$l(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return rh(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??Hx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,P.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var R_=e=>e.selected,zD=typeof window<"u"?window:void 0;function LD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Dh(),i=Vs(e,{actInsideInputWithModifier:!1}),a=Vs(t,{target:zD});(0,P.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(R_),edges:l.filter(R_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,P.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function BD(e){let t=Qe();(0,P.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=xf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",An.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var Bf={position:"absolute",width:"100%",height:"100%",top:0,left:0},HD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function PD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ni.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:g,paneClickDistance:m,selectionOnDrag:y}){let x=Qe(),_=(0,P.useRef)(null),{userSelectionActive:E,lib:C,connectionInProgress:A}=Ae(HD,je),B=Vs(f),M=(0,P.useRef)();BD(_);let z=(0,P.useCallback)(I=>{p?.({x:I[0],y:I[1],zoom:I[2]}),g||x.setState({transform:I})},[p,g]);return(0,P.useEffect)(()=>{if(_.current){M.current=n_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:N=>x.setState(O=>O.paneDragging===N?O:{paneDragging:N}),onPanZoomStart:(N,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(N,O),R?.(O)},onPanZoom:(N,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(N,O),R?.(O)},onPanZoomEnd:(N,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(N,O),R?.(O)}});let{x:I,y:T,zoom:D}=M.current.getViewport();return x.setState({panZoom:M.current,transform:[I,T,D],domNode:_.current.closest(".react-flow")}),()=>{M.current?.destroy()}}},[]),(0,P.useEffect)(()=>{M.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:B,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:C,onTransformChange:z,connectionInProgress:A,selectionOnDrag:y,paneClickDistance:m})},[e,t,n,o,i,a,l,r,B,h,S,E,b,C,z,A,y,m]),(0,H.jsx)("div",{className:"react-flow__renderer",ref:_,style:Bf,children:v})}var kD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function GD(){let{userSelectionActive:e,userSelectionRect:t}=Ae(kD,je);return e&&t?(0,H.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var wh=(e,t)=>n=>{n.target===t.current&&e?.(n)},UD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function ID({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Aa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:g,connectionInProgress:m}=Ae(UD,je),y=p&&(e||S),x=(0,P.useRef)(null),_=(0,P.useRef)(),E=(0,P.useRef)(new Set),C=(0,P.useRef)(new Set),A=(0,P.useRef)(!1),B=R=>{if(A.current||m){A.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},M=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,I=R=>{A.current&&(R.stopPropagation(),A.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),A.current=!1;let{x:q,y:Z}=Zn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Z,x:q,y:Z}}),V||(R.stopPropagation(),R.preventDefault())},D=R=>{let{userSelectionRect:L,transform:V,nodeLookup:k,edgeLookup:G,connectionLookup:q,triggerNodeChanges:Z,triggerEdgeChanges:j,defaultEdgeOptions:se,resetSelectedElements:ee}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=Zn(R.nativeEvent,_.current),{startX:ue,startY:ge}=L;if(!A.current){let be=t?0:i;if(Math.hypot(X-ue,Q-ge)<=be)return;ee(),l?.(R)}A.current=!0;let ie={startX:ue,startY:ge,x:X<ue?X:ue,y:Q<ge?Q:ge,width:Math.abs(X-ue),height:Math.abs(Q-ge)},te=E.current,Te=C.current;E.current=new Set(vf(k,ie,V,n===Aa.Partial,!0).map(be=>be.id)),C.current=new Set;let de=se?.selectable??!0;for(let be of E.current){let Le=q.get(be);if(Le)for(let{edgeId:Be}of Le.values()){let dt=G.get(Be);dt&&(dt.selectable??de)&&C.current.add(Be)}}if(!mh(te,E.current)){let be=Jl(k,E.current,!0);Z(be)}if(!mh(Te,C.current)){let be=Jl(G,C.current);j(be)}b.setState({userSelectionRect:ie,userSelectionActive:!0,nodesSelectionActive:!1})},N=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&B?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,H.jsxs)("div",{className:ot(["react-flow__pane",{draggable:O,dragging:g,selection:e}]),onClick:y?void 0:wh(B,x),onContextMenu:wh(M,x),onWheel:wh(z,x),onPointerEnter:y?void 0:d,onPointerMove:y?D:f,onPointerUp:y?N:void 0,onPointerDownCapture:y?T:void 0,onClickCapture:y?I:void 0,onPointerLeave:h,ref:x,style:Bf,children:[v,(0,H.jsx)(GD,{})]})}function Mh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",An.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function W_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,P.useState)(!1),c=(0,P.useRef)();return(0,P.useEffect)(()=>{c.current=$x({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{Mh({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,P.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var VD=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function J_(){let e=Qe();return(0,P.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=VD(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let g={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(g=Fl(g,a));let{position:m,positionAbsolute:y}=sh({nodeId:p.id,nextPosition:g,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=y,d.set(p.id,p)}s(d)},[])}var Rh=(0,P.createContext)(null),YD=Rh.Provider;Rh.Consumer;var eE=()=>(0,P.useContext)(Rh),XD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qD=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===ji.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function ZD({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let v=l||null,b=e==="target",S=Qe(),p=eE(),{connectOnClick:g,noPanClassName:m,rfId:y}=Ae(XD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:C,connectionInProcess:A,clickConnectionInProcess:B,valid:M}=Ae(qD(p,v,e),je);p||S.getState().onError?.("010",An.error010());let z=D=>{let{defaultEdgeOptions:N,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...N,...D};if(R){let{edges:V,setEdges:k}=S.getState();k(bh(L,V))}O?.(L),r?.(L)},I=D=>{if(!p)return;let N=yh(D.nativeEvent);if(i&&(N&&D.button===0||!N)){let O=S.getState();Af.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}N?c?.(D):d?.(D)},T=D=>{let{onClickConnectStart:N,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:k,rfId:G,nodeLookup:q,connection:Z}=S.getState();if(!p||!R&&!i)return;if(!R){N?.(D.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let j=hh(D.target),se=n||V,{connection:ee,isValid:X}=Af.isValid(D.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:se,flowId:G,doc:j,lib:k,nodeLookup:q});X&&ee&&z(ee);let Q=structuredClone(Z);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(D,Q),S.setState({connectionClickStartHandle:null})};return(0,H.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${y}-${p}-${v}-${e}`,className:ot(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:M,connectionindicator:o&&(!A||C)&&(A||B?a:i)}]),onMouseDown:I,onTouchStart:I,onClick:g?T:void 0,ref:h,...f,children:s})}var Oa=(0,P.memo)(K_(ZD));function jD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[e?.label,(0,H.jsx)(Oa,{type:"source",position:n,isConnectable:t})]})}function $D({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Oa,{type:"target",position:n,isConnectable:t}),e?.label,(0,H.jsx)(Oa,{type:"source",position:o,isConnectable:t})]})}function FD(){return null}function KD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Oa,{type:"target",position:n,isConnectable:t}),e?.label]})}var zf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},O_={input:jD,default:$D,output:KD,group:FD};function QD(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var WD=e=>{let{width:t,height:n,x:o,y:i}=jl(e.nodeLookup,{filter:a=>!!a.selected});return{width:qn(t)?t:null,height:qn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function JD({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=Ae(WD,je),s=J_(),u=(0,P.useRef)(null);(0,P.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(W_({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(zf,h.key)&&(h.preventDefault(),s({direction:zf[h.key],factor:h.shiftKey?4:1}))};return(0,H.jsx)("div",{className:ot(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,H.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var z_=typeof window<"u"?window:void 0,eR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function tE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:y,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:C,defaultViewport:A,translateExtent:B,minZoom:M,maxZoom:z,preventScrolling:I,onSelectionContextMenu:T,noWheelClassName:D,noPanClassName:N,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:k}=Ae(eR,je),G=Vs(u,{target:z_}),q=Vs(b,{target:z_}),Z=q||C,j=q||y,se=c&&Z!==!0,ee=G||k||se;return LD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,H.jsx)(PD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!G&&Z,defaultViewport:A,translateExtent:B,minZoom:M,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:I,noWheelClassName:D,noPanClassName:N,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:se,children:(0,H.jsxs)(ID,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:Z,isSelecting:!!ee,selectionMode:d,selectionKeyPressed:G,paneClickDistance:r,selectionOnDrag:se,children:[e,V&&(0,H.jsx)(JD,{onSelectionContextMenu:T,noPanClassName:N,disableKeyboardA11y:O})]})})}tE.displayName="FlowRenderer";var tR=(0,P.memo)(tE),nR=e=>t=>e?vf(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function oR(e){return Ae((0,P.useCallback)(nR(e),[e]),je)}var iR=e=>e.updateNodeInternals;function aR(){let e=Ae(iR),[t]=(0,P.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,P.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function lR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,P.useRef)(null),l=(0,P.useRef)(null),r=(0,P.useRef)(e.sourcePosition),s=(0,P.useRef)(e.targetPosition),u=(0,P.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,P.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,P.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,P.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function rR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:g}){let{node:m,internals:y,isParent:x}=Ae(X=>{let Q=X.nodeLookup.get(e),ue=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ue}},je),_=m.type||"default",E=S?.[_]||O_[_];E===void 0&&(g?.("003",An.error003(_)),_="default",E=S?.default||O_.default);let C=!!(m.draggable||r&&typeof m.draggable>"u"),A=!!(m.selectable||s&&typeof m.selectable>"u"),B=!!(m.connectable||u&&typeof m.connectable>"u"),M=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),I=dh(m),T=lR({node:m,nodeType:_,hasDimensions:I,resizeObserver:d}),D=W_({nodeRef:T,disabled:m.hidden||!C,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:A,nodeClickDistance:p}),N=J_();if(m.hidden)return null;let O=So(m),R=QD(m),L=A||C||t||n||o||i,V=n?X=>n(X,{...y.userNode}):void 0,k=o?X=>o(X,{...y.userNode}):void 0,G=i?X=>i(X,{...y.userNode}):void 0,q=a?X=>a(X,{...y.userNode}):void 0,Z=l?X=>l(X,{...y.userNode}):void 0,j=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ue}=z.getState();A&&(!Q||!C||ue>0)&&Mh({id:e,store:z,nodeRef:T}),t&&t(X,{...y.userNode})},se=X=>{if(!(gh(X.nativeEvent)||v)){if(th.includes(X.key)&&A){let Q=X.key==="Escape";Mh({id:e,store:z,unselect:Q,nodeRef:T})}else if(C&&m.selected&&Object.prototype.hasOwnProperty.call(zf,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~y.positionAbsolute.x,y:~~y.positionAbsolute.y})}),N({direction:zf[X.key],factor:X.shiftKey?4:1})}}},ee=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ue,autoPanOnNodeFocus:ge,setCenter:ie}=z.getState();if(!ge)return;vf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ue},X,!0).length>0||ie(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,H.jsx)("div",{className:ot(["react-flow__node",`react-flow__node-${_}`,{[h]:C},m.className,{selected:m.selected,selectable:A,parent:x,draggable:C,dragging:D}]),ref:T,style:{zIndex:y.z,transform:`translate(${y.positionAbsolute.x}px,${y.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:I?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:k,onMouseLeave:G,onContextMenu:q,onClick:j,onDoubleClick:Z,onKeyDown:M?se:void 0,tabIndex:M?0:void 0,onFocus:M?ee:void 0,role:m.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${X_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,H.jsx)(YD,{value:e,children:(0,H.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:y.positionAbsolute.x,positionAbsoluteY:y.positionAbsolute.y,selected:m.selected??!1,selectable:A,draggable:C,deletable:m.deletable??!0,isConnectable:B,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:D,dragHandle:m.dragHandle,zIndex:y.z,parentId:m.parentId,...O})})})}var sR=(0,P.memo)(rR),uR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function nE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ae(uR,je),l=oR(e.onlyRenderVisibleElements),r=aR();return(0,H.jsx)("div",{className:"react-flow__nodes",style:Bf,children:l.map(s=>(0,H.jsx)(sR,{id:s,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}nE.displayName="NodeRenderer";var cR=(0,P.memo)(nE);function fR(e){return Ae((0,P.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&Gx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var dR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,H.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},pR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,H.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},L_={[Yl.Arrow]:dR,[Yl.ArrowClosed]:pR};function mR(e){let t=Qe();return(0,P.useMemo)(()=>Object.prototype.hasOwnProperty.call(L_,e)?L_[e]:(t.getState().onError?.("009",An.error009(e)),null),[e])}var hR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=mR(t);return s?(0,H.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,H.jsx)(s,{color:n,strokeWidth:l})}):null},oE=({defaultColor:e,rfId:t})=>{let n=Ae(a=>a.edges),o=Ae(a=>a.defaultEdgeOptions),i=(0,P.useMemo)(()=>Ix(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,H.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,H.jsx)("defs",{children:i.map(a=>(0,H.jsx)(hR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};oE.displayName="MarkerDefinitions";var gR=(0,P.memo)(oE);function iE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,P.useState)({x:1,y:0,width:0,height:0}),h=ot(["react-flow__edge-textwrapper",u]),v=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,H.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,H.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,H.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}iE.displayName="EdgeText";var yR=(0,P.memo)(iE);function Hf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("path",{...c,d:e,fill:"none",className:ot(["react-flow__edge-path",c.className])}),u?(0,H.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&qn(t)&&qn(n)?(0,H.jsx)(yR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function B_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function aE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=B_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=B_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=_f({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function lE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[g,m,y]=aE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:x,path:g,labelX:m,labelY:y,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var vR=lE({isInternal:!1}),rE=lE({isInternal:!0});vR.displayName="SimpleBezierEdge";rE.displayName="SimpleBezierEdgeInternal";function sE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:g})=>{let[m,y,x]=Is({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:_,path:m,labelX:y,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:g})})}var uE=sE({isInternal:!1}),cE=sE({isInternal:!0});uE.displayName="SmoothStepEdge";cE.displayName="SmoothStepEdgeInternal";function fE(e){return(0,P.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,H.jsx)(uE,{...n,id:o,pathOptions:(0,P.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var bR=fE({isInternal:!1}),dE=fE({isInternal:!0});bR.displayName="StepEdge";dE.displayName="StepEdgeInternal";function pE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})=>{let[S,p,g]=Tf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:m,path:S,labelX:p,labelY:g,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var SR=pE({isInternal:!1}),mE=pE({isInternal:!0});SR.displayName="StraightEdge";mE.displayName="StraightEdgeInternal";function hE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:g})=>{let[m,y,x]=Ef({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,H.jsx)(Hf,{id:_,path:m,labelX:y,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:g})})}var xR=hE({isInternal:!1}),gE=hE({isInternal:!0});xR.displayName="BezierEdge";gE.displayName="BezierEdgeInternal";var H_={default:gE,straight:mE,step:dE,smoothstep:cE,simplebezier:rE},P_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},_R=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,ER=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,k_="react-flow__edgeupdater";function G_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,H.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:ot([k_,`${k_}-${r}`]),cx:_R(t,o,e),cy:ER(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function TR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let v=Qe(),b=(y,x)=>{if(y.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:C,connectionRadius:A,lib:B,onConnectStart:M,cancelConnection:z,nodeLookup:I,rfId:T,panBy:D,updateConnection:N}=v.getState(),O=x.type==="target",R=(k,G)=>{f(!1),d?.(k,n,x.type,G)},L=k=>u?.(n,k),V=(k,G)=>{f(!0),c?.(y,n,x.type),M?.(k,G)};Af.onPointerDown(y.nativeEvent,{autoPanOnConnect:_,connectionMode:C,connectionRadius:A,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:I,isTarget:O,edgeUpdaterType:x.type,lib:B,flowId:T,cancelConnection:z,panBy:D,isValidConnection:(...k)=>v.getState().isValidConnection?.(...k)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...k)=>v.getState().onConnectEnd?.(...k),onReconnectEnd:R,updateConnection:N,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:y.currentTarget})},S=y=>b(y,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=y=>b(y,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),g=()=>h(!0),m=()=>h(!1);return(0,H.jsxs)(H.Fragment,{children:[(e===!0||e==="source")&&(0,H.jsx)(G_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:g,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,H.jsx)(G_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:g,onMouseOut:m,type:"target"})]})}function NR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:g}){let m=Ae(ie=>ie.edgeLookup.get(e)),y=Ae(ie=>ie.defaultEdgeOptions);m=y?{...y,...m}:m;let x=m.type||"default",_=b?.[x]||H_[x];_===void 0&&(p?.("011",An.error011(x)),x="default",_=b?.default||H_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),C=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),A=!!(m.selectable||o&&typeof m.selectable>"u"),B=(0,P.useRef)(null),[M,z]=(0,P.useState)(!1),[I,T]=(0,P.useState)(!1),D=Qe(),{zIndex:N,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G}=Ae((0,P.useCallback)(ie=>{let te=ie.nodeLookup.get(m.source),Te=ie.nodeLookup.get(m.target);if(!te||!Te)return{zIndex:m.zIndex,...P_};let de=Ux({id:e,sourceNode:te,targetNode:Te,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ie.connectionMode,onError:p});return{zIndex:kx({selected:m.selected,zIndex:m.zIndex,sourceNode:te,targetNode:Te,elevateOnSelect:ie.elevateEdgesOnSelect,zIndexMode:ie.zIndexMode}),...de||P_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,P.useMemo)(()=>m.markerStart?`url('#${Nf(m.markerStart,v)}')`:void 0,[m.markerStart,v]),Z=(0,P.useMemo)(()=>m.markerEnd?`url('#${Nf(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let j=ie=>{let{addSelectedEdges:te,unselectNodesAndEdges:Te,multiSelectionActive:de}=D.getState();A&&(D.setState({nodesSelectionActive:!1}),m.selected&&de?(Te({nodes:[],edges:[m]}),B.current?.blur()):te([e])),i&&i(ie,m)},se=a?ie=>{a(ie,{...m})}:void 0,ee=l?ie=>{l(ie,{...m})}:void 0,X=r?ie=>{r(ie,{...m})}:void 0,Q=s?ie=>{s(ie,{...m})}:void 0,ue=u?ie=>{u(ie,{...m})}:void 0,ge=ie=>{if(!g&&th.includes(ie.key)&&A){let{unselectNodesAndEdges:te,addSelectedEdges:Te}=D.getState();ie.key==="Escape"?(B.current?.blur(),te({edges:[m]})):Te([e])}};return(0,H.jsx)("svg",{style:{zIndex:N},children:(0,H.jsxs)("g",{className:ot(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!A&&!i,updating:M,selectable:A}]),onClick:j,onDoubleClick:se,onContextMenu:ee,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ue,onKeyDown:E?ge:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":E?`${q_}-${v}`:void 0,ref:B,...m.domAttributes,children:[!I&&(0,H.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:A,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:Z,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),C&&(0,H.jsx)(TR,{edge:m,isReconnectable:C,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,setUpdateHover:z,setReconnecting:T})]})})}var CR=(0,P.memo)(NR),wR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function yE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,onError:m}=Ae(wR,je),y=fR(t);return(0,H.jsxs)("div",{className:"react-flow__edges",children:[(0,H.jsx)(gR,{defaultColor:e,rfId:n}),y.map(x=>(0,H.jsx)(CR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}yE.displayName="EdgeRenderer";var AR=(0,P.memo)(yE),MR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function DR({children:e}){let t=Ae(MR);return(0,H.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function RR(e){let t=Dh(),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var OR=e=>e.panZoom?.syncViewport;function zR(e){let t=Ae(OR),n=Qe();return(0,P.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function U_(e){return e.connection.inProgress?{...e.connection,to:Kl(e.connection.to,e.transform)}:{...e.connection}}function LR(e){return e?n=>{let o=U_(n);return e(o)}:U_}function BR(e){let t=LR(e);return Ae(t,je)}var HR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function PR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Ae(HR,je);return!(a&&i&&s)?null:(0,H.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,H.jsx)("g",{className:ot(["react-flow__connection",ih(r)]),children:(0,H.jsx)(vE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var vE=({style:e,type:t=bo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=BR();if(!i)return;if(n)return(0,H.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:ih(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case bo.Bezier:[v]=Ef(b);break;case bo.SimpleBezier:[v]=aE(b);break;case bo.Step:[v]=Is({...b,borderRadius:0});break;case bo.SmoothStep:[v]=Is(b);break;default:[v]=Tf(b)}return(0,H.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};vE.displayName="ConnectionLine";var kR={};function I_(e=kR){let t=(0,P.useRef)(e),n=Qe();(0,P.useEffect)(()=>{},[e])}function GR(){let e=Qe(),t=(0,P.useRef)(!1);(0,P.useEffect)(()=>{},[])}function bE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:g,selectionOnDrag:m,selectionMode:y,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:C,onlyRenderVisibleElements:A,elementsSelectable:B,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,preventScrolling:D,defaultMarkerColor:N,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,zoomOnDoubleClick:G,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ue,nodeClickDistance:ge,onEdgeContextMenu:ie,onEdgeMouseEnter:te,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,noDragClassName:Gt,noWheelClassName:hn,noPanClassName:rt,disableKeyboardA11y:Rn,nodeExtent:Wt,rfId:Jt,viewport:St,onViewportChange:$e}){return I_(e),I_(t),GR(),RR(n),zR(St),(0,H.jsx)(tR,{onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ue,deleteKeyCode:C,selectionKeyCode:g,selectionOnDrag:m,selectionMode:y,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:B,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:G,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,panOnDrag:q,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,onSelectionContextMenu:d,preventScrolling:D,noDragClassName:Gt,noWheelClassName:hn,noPanClassName:rt,disableKeyboardA11y:Rn,onViewportChange:$e,isControlledViewport:!!St,children:(0,H.jsxs)(DR,{children:[(0,H.jsx)(AR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,onlyRenderVisibleElements:A,onEdgeContextMenu:ie,onEdgeMouseEnter:te,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,defaultMarkerColor:N,noPanClassName:rt,disableKeyboardA11y:Rn,rfId:Jt}),(0,H.jsx)(PR,{style:b,type:v,component:S,containerStyle:p}),(0,H.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,H.jsx)(cR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:ge,onlyRenderVisibleElements:A,noPanClassName:rt,noDragClassName:Gt,disableKeyboardA11y:Rn,nodeExtent:Wt,rfId:Jt}),(0,H.jsx)("div",{className:"react-flow__viewport-portal"})]})})}bE.displayName="GraphView";var UR=(0,P.memo)(bE),V_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,v=new Map,b=new Map,S=new Map,p=o??t??[],g=n??e??[],m=c??[0,0],y=d??Zl;Th(b,S,p);let x=Cf(g,h,v,{nodeOrigin:m,nodeExtent:y,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=jl(h,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:C,y:A,zoom:B}=Us(E,i,a,s,u,r?.padding??.1);_=[C,A,B]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:g,nodesInitialized:x,nodeLookup:h,parentLookup:v,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:Zl,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ji.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...oh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:nh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},IR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>b_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:g,fitViewResolver:m,width:y,height:x,minZoom:_,maxZoom:E}=v();p&&(await Ox({nodes:S,width:y,height:x,panZoom:p,minZoom:_,maxZoom:E},g),m?.resolve(!0),h({fitViewResolver:null}))}return{...V_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:g,nodeOrigin:m,elevateNodesOnSelect:y,fitViewQueued:x,zIndexMode:_}=v(),E=Cf(S,p,g,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:y,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:g}=v();Th(p,g,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:g}=v();g(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:g}=v();g(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:g,parentLookup:m,domNode:y,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:C,zIndexMode:A}=v(),{changes:B,updatedInternals:M}=qx(S,g,m,y,x,_,A);M&&(Yx(g,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:A}),C?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),B?.length>0&&(E&&console.log("React Flow: trigger node changes",B),p?.(B)))},updateNodePositions:(S,p=!1)=>{let g=[],m=[],{nodeLookup:y,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:C}=v();for(let[A,B]of S){let M=y.get(A),z=!!(M?.expandParent&&M?.parentId&&B?.position),I={id:A,type:"position",position:z?{x:Math.max(0,B.position.x),y:Math.max(0,B.position.y)}:B.position,dragging:p};if(M&&_.inProgress&&_.fromNode.id===M.id){let T=$i(M,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&M.parentId&&g.push({id:A,parentId:M.parentId,rect:{...B.internals.positionAbsolute,width:B.measured.width??0,height:B.measured.height??0}}),m.push(I)}if(g.length>0){let{parentLookup:A,nodeOrigin:B}=v(),M=wf(g,y,A,B);m.push(...M)}for(let A of C.values())m=A(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:g,nodes:m,hasDefaultNodes:y,debug:x}=v();if(S?.length){if(y){let _=$_(S,m);g(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:g,edges:m,hasDefaultEdges:y,debug:x}=v();if(S?.length){if(y){let _=F_(S,m);g(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Ra(E,!0));y(_);return}y(Jl(m,new Set([...S]),!0)),x(Jl(g))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Ra(E,!0));x(_);return}x(Jl(g,new Set([...S]))),y(Jl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:g,nodes:m,nodeLookup:y,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,C=p||g,A=[];for(let M of E){if(!M.selected)continue;let z=y.get(M.id);z&&(z.selected=!1),A.push(Ra(M.id,!1))}let B=[];for(let M of C)M.selected&&B.push(Ra(M.id,!1));x(A),_(B)},setMinZoom:S=>{let{panZoom:p,maxZoom:g}=v();p?.setScaleExtent([S,g]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:g}=v();p?.setScaleExtent([g,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:g,triggerEdgeChanges:m,elementsSelectable:y}=v();if(!y)return;let x=p.reduce((E,C)=>C.selected?[...E,Ra(C.id,!1)]:E,[]),_=S.reduce((E,C)=>C.selected?[...E,Ra(C.id,!1)]:E,[]);g(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:g,parentLookup:m,nodeOrigin:y,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Cf(p,g,m,{nodeOrigin:y,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:g,height:m,panZoom:y,translateExtent:x}=v();return Zx({delta:S,panZoom:y,transform:p,translateExtent:x,width:g,height:m})},setCenter:async(S,p,g)=>{let{width:m,height:y,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof g?.zoom<"u"?g.zoom:x;return await _.setViewport({x:m/2-S*E,y:y/2-p*E,zoom:E},{duration:g?.duration,ease:g?.ease,interpolate:g?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...oh}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...V_()})}},Object.is);function VR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[v]=(0,P.useState)(()=>IR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,H.jsx)(rD,{value:v,children:(0,H.jsx)(DD,{children:h})})}function YR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,P.useContext)(Lf)?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(VR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var XR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function qR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:A,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onSelectionChange:I,onSelectionDragStart:T,onSelectionDrag:D,onSelectionDragStop:N,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:k,connectionLineType:G=bo.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,deleteKeyCode:se="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:X=!1,selectionMode:Q=Aa.Full,panActivationKeyCode:ue="Space",multiSelectionKeyCode:ge=Ql()?"Meta":"Control",zoomActivationKeyCode:ie=Ql()?"Meta":"Control",snapToGrid:te,snapGrid:Te,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:be,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,nodeOrigin:hn=Z_,edgesFocusable:rt,edgesReconnectable:Rn,elementsSelectable:Wt=!0,defaultViewport:Jt=SD,minZoom:St=.5,maxZoom:$e=2,translateExtent:ro=Zl,preventScrolling:ri=!0,nodeExtent:$n,defaultMarkerColor:si="#b1b1b7",zoomOnScroll:Fn=!0,zoomOnPinch:On=!0,panOnScroll:No=!1,panOnScrollSpeed:pt=.5,panOnScrollMode:Kn=ni.Free,zoomOnDoubleClick:Qn=!0,panOnDrag:Co=!0,onPaneClick:wo,onPaneMouseEnter:ui,onPaneMouseMove:ci,onPaneMouseLeave:ka,onPaneScroll:Ao,onPaneContextMenu:Ga,paneClickDistance:Ua=1,nodeClickDistance:We=0,children:Mo,onReconnect:Do,onReconnectStart:Ro,onReconnectEnd:me,onEdgeContextMenu:re,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ye,onEdgeMouseLeave:He,reconnectRadius:wt=10,onNodesChange:Wn,onEdgesChange:zn,noDragClassName:fi="nodrag",noWheelClassName:xt="nowheel",noPanClassName:rr="nopan",fitView:sr,fitViewOptions:ur,connectOnClick:eu,attributionPosition:tu,proOptions:oe,defaultEdgeOptions:w,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,connectionRadius:Ut,isValidConnection:so,onError:cr,style:mt,id:fr,nodeDragThreshold:nu,connectionDragThreshold:OT,viewport:zT,onViewportChange:LT,width:BT,height:HT,colorMode:PT="light",debug:kT,onScroll:vg,ariaLabelConfig:GT,zIndexMode:bg="basic",...UT},IT){let Ff=fr||"1",VT=TD(PT),YT=(0,P.useCallback)(Sg=>{Sg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),vg?.(Sg)},[vg]);return(0,H.jsx)("div",{"data-testid":"rf__wrapper",...UT,onScroll:YT,style:{...mt,...XR},ref:IT,className:ot(["react-flow",i,VT]),id:fr,role:"application",children:(0,H.jsxs)(YR,{nodes:e,edges:t,width:BT,height:HT,fitView:sr,fitViewOptions:ur,minZoom:St,maxZoom:$e,nodeOrigin:hn,nodeExtent:$n,zIndexMode:bg,children:[(0,H.jsx)(UR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:G,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,selectionKeyCode:ee,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:se,multiSelectionKeyCode:ge,panActivationKeyCode:ue,zoomActivationKeyCode:ie,onlyRenderVisibleElements:de,defaultViewport:Jt,translateExtent:ro,minZoom:St,maxZoom:$e,preventScrolling:ri,zoomOnScroll:Fn,zoomOnPinch:On,zoomOnDoubleClick:Qn,panOnScroll:No,panOnScrollSpeed:pt,panOnScrollMode:Kn,panOnDrag:Co,onPaneClick:wo,onPaneMouseEnter:ui,onPaneMouseMove:ci,onPaneMouseLeave:ka,onPaneScroll:Ao,onPaneContextMenu:Ga,paneClickDistance:Ua,nodeClickDistance:We,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:Do,onReconnectStart:Ro,onReconnectEnd:me,onEdgeContextMenu:re,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ye,onEdgeMouseLeave:He,reconnectRadius:wt,defaultMarkerColor:si,noDragClassName:fi,noWheelClassName:xt,noPanClassName:rr,rfId:Ff,disableKeyboardA11y:Ge,nodeExtent:$n,viewport:zT,onViewportChange:LT}),(0,H.jsx)(ED,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,edgesFocusable:rt,edgesReconnectable:Rn,elementsSelectable:Wt,elevateNodesOnSelect:Y,elevateEdgesOnSelect:F,minZoom:St,maxZoom:$e,nodeExtent:$n,onNodesChange:Wn,onEdgesChange:zn,snapToGrid:te,snapGrid:Te,connectionMode:k,translateExtent:ro,connectOnClick:eu,defaultEdgeOptions:w,fitView:sr,fitViewOptions:ur,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onNodeDragStart:E,onNodeDrag:C,onNodeDragStop:A,onSelectionDrag:D,onSelectionDragStart:T,onSelectionDragStop:N,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:rr,nodeOrigin:hn,rfId:Ff,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,onError:cr,connectionRadius:Ut,isValidConnection:so,selectNodesOnDrag:be,nodeDragThreshold:nu,connectionDragThreshold:OT,onBeforeDelete:V,debug:kT,ariaLabelConfig:GT,zIndexMode:bg}),(0,H.jsx)(bD,{onSelectionChange:I}),Mo,(0,H.jsx)(mD,{proOptions:oe,position:tu}),(0,H.jsx)(pD,{rfId:Ff,disableKeyboardA11y:Ge})]})})}var SE=K_(qR);function xE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>$_(i,a)),[]);return[t,n,o]}function _E(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>F_(i,a)),[]);return[t,n,o]}var t8=An.error014();function ZR({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,H.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ot(["react-flow__background-pattern",n,o])})}function jR({radius:e,className:t}){return(0,H.jsx)("circle",{cx:e,cy:e,r:e,className:ot(["react-flow__background-pattern","dots",t])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));var $R={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},FR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function EE({id:e,variant:t=xo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,P.useRef)(null),{transform:f,patternId:h}=Ae(FR,je),v=o||$R[t],b=t===xo.Dots,S=t===xo.Cross,p=Array.isArray(n)?n:[n,n],g=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],y=Array.isArray(a)?a:[a,a],x=S?[m,m]:g,_=[y[0]*f[2]||1+x[0]/2,y[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,H.jsxs)("svg",{className:ot(["react-flow__background",u]),style:{...s,...Bf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,H.jsx)("pattern",{id:E,x:f[0]%g[0],y:f[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,H.jsx)(jR,{radius:m/2,className:c}):(0,H.jsx)(ZR,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,H.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}EE.displayName="Background";var TE=(0,P.memo)(EE);function KR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,H.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,H.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function WR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,H.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function JR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 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 eO(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Of({children:e,className:t,...n}){return(0,H.jsx)("button",{type:"button",className:ot(["react-flow__controls-button",t]),...n,children:e})}var tO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function NE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:g}=Ae(tO,je),{zoomIn:m,zoomOut:y,fitView:x}=Dh(),_=()=>{m(),a?.()},E=()=>{y(),l?.()},C=()=>{x(i),r?.()},A=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,H.jsxs)(er,{className:ot(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??g["controls.ariaLabel"],children:[t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Of,{onClick:_,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:p,children:(0,H.jsx)(KR,{})}),(0,H.jsx)(Of,{onClick:E,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:S,children:(0,H.jsx)(QR,{})})]}),n&&(0,H.jsx)(Of,{className:"react-flow__controls-fitview",onClick:C,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:(0,H.jsx)(WR,{})}),o&&(0,H.jsx)(Of,{className:"react-flow__controls-interactive",onClick:A,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:b?(0,H.jsx)(eO,{}):(0,H.jsx)(JR,{})}),c]})}NE.displayName="Controls";var n8=(0,P.memo)(NE);function nO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:v,backgroundColor:b}=a||{},S=l||v||b;return(0,H.jsx)("rect",{className:ot(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var oO=(0,P.memo)(nO),iO=e=>e.nodes.map(t=>t.id),Ah=e=>e instanceof Function?e:()=>e;function aO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=oO,onClick:l}){let r=Ae(iO,je),s=Ah(t),u=Ah(e),c=Ah(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,H.jsx)(H.Fragment,{children:r.map(f=>(0,H.jsx)(rO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function lO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=Ae(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y:g}=b.internals.positionAbsolute,{width:m,height:y}=So(S);return{node:S,x:p,y:g,width:m,height:y}},je);return!u||u.hidden||!dh(u)?null:(0,H.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var rO=(0,P.memo)(lO),sO=(0,P.memo)(aO),uO=200,cO=150,fO=e=>!e.hidden,dO=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?uh(jl(e.nodeLookup,{filter:fO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},pO="react-flow__minimap-desc";function CE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:g,zoomStep:m=1,offsetScale:y=5}){let x=Qe(),_=(0,P.useRef)(null),{boundingRect:E,viewBB:C,rfId:A,panZoom:B,translateExtent:M,flowWidth:z,flowHeight:I,ariaLabelConfig:T}=Ae(dO,je),D=e?.width??uO,N=e?.height??cO,O=E.width/D,R=E.height/N,L=Math.max(O,R),V=L*D,k=L*N,G=y*L,q=E.x-(V-E.width)/2-G,Z=E.y-(k-E.height)/2-G,j=V+G*2,se=k+G*2,ee=`${pO}-${A}`,X=(0,P.useRef)(0),Q=(0,P.useRef)();X.current=L,(0,P.useEffect)(()=>{if(_.current&&B)return Q.current=Jx({domNode:_.current,panZoom:B,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[B]),(0,P.useEffect)(()=>{Q.current?.update({translateExtent:M,width:z,height:I,inversePan:g,pannable:b,zoomStep:m,zoomable:S})},[b,S,g,m,M,z,I]);let ue=h?te=>{let[Te,de]=Q.current?.pointer(te)||[0,0];h(te,{x:Te,y:de})}:void 0,ge=v?(0,P.useCallback)((te,Te)=>{let de=x.getState().nodeLookup.get(Te).internals.userNode;v(te,de)},[]):void 0,ie=p??T["minimap.ariaLabel"];return(0,H.jsx)(er,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:ot(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,H.jsxs)("svg",{width:D,height:N,viewBox:`${q} ${Z} ${j} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:_,onClick:ue,children:[ie&&(0,H.jsx)("title",{id:ee,children:ie}),(0,H.jsx)(sO,{onClick:ge,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,H.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-G},${Z-G}h${j+G*2}v${se+G*2}h${-j-G*2}z
15
- M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}CE.displayName="MiniMap";var o8=(0,P.memo)(CE),mO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,hO={[Fi.Line]:"right",[Fi.Handle]:"bottom-right"};function gO({nodeId:e,position:t,variant:n=Fi.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let g=eE(),m=typeof e=="string"?e:g,y=Qe(),x=(0,P.useRef)(null),_=n===Fi.Handle,E=Ae((0,P.useCallback)(mO(_&&h),[_,h]),je),C=(0,P.useRef)(null),A=t??hO[n];(0,P.useEffect)(()=>{if(!(!x.current||!m))return C.current||(C.current=i_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,domNode:N}=y.getState();return{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,paneDomNode:N}},onChange:(M,z)=>{let{triggerNodeChanges:I,nodeLookup:T,parentLookup:D,nodeOrigin:N}=y.getState(),O=[],R={x:M.x,y:M.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??N,k=M.width??L.measured.width??0,G=M.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:k,height:G,...ph({x:M.x??L.position.x,y:M.y??L.position.y},{width:k,height:G},L.parentId,T,V)}},Z=wf([q],T,D,N);O.push(...Z),R.x=M.x?Math.max(V[0]*k,M.x):void 0,R.y=M.y?Math.max(V[1]*G,M.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(M.width!==void 0&&M.height!==void 0){let k={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};O.push(k)}for(let V of z){let k={...V,type:"position"};O.push(k)}I(O)},onEnd:({width:M,height:z})=>{let I={id:m,type:"dimensions",resizing:!1,dimensions:{width:M,height:z}};y.getState().triggerNodeChanges([I])}})),C.current.update({controlPosition:A,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{C.current?.destroy()}},[A,r,s,u,c,d,b,S,p,v]);let B=A.split("-");return(0,H.jsx)("div",{className:ot(["react-flow__resize-control","nodrag",...B,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var i8=(0,P.memo)(gO);var Oh=ne(At(),1);var wE="(prefers-color-scheme: dark)";function yO(e){return e?ga.DARK:ga.LIGHT}function zh(){return typeof window>"u"||typeof window.matchMedia!="function"?ga.DARK:yO(window.matchMedia(wE).matches)}function vO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(wE);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function bO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:vO,getSnapshot:zh,getServerSnapshot:()=>ga.DARK}}function AE(e){let t=Oh.default.useMemo(()=>bO(e),[e]);return Oh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function ME(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io,u=l.has(r.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function _o(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>SO(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function SO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function DE(e,t){return e.pipe_registry?.[t]}function Lh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function RE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Pf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function OE(e){if(!e)return null;if(typeof e=="string")return RE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(RE(o))return o;return null}function zE(e){if(!e)return null;if(typeof e=="string")return Pf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Pf(o))return o;return null}function LE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function BE(e){let t=i=>{let a=i.inner_html;return typeof a=="string"&&a.trim()!==""?a:null};if(!e||typeof e!="object"||Array.isArray(e))return null;let n=e,o=t(n);if(o!=null)return o;for(let i of Object.values(n))if(i&&typeof i=="object"&&!Array.isArray(i)){let a=t(i);if(a!=null)return a}return null}function Bh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function HE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=Bh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function PE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Hh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var fn=ne(At(),1);var{entries:ZE,setPrototypeOf:kE,isFrozen:xO,getPrototypeOf:_O,getOwnPropertyDescriptor:EO}=Object,{freeze:$t,seal:jn,create:$s}=Object,{apply:Yh,construct:Xh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});jn||(jn=function(t){return t});Yh||(Yh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Xh||(Xh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Ys=Ft(Array.prototype.forEach),TO=Ft(Array.prototype.lastIndexOf),GE=Ft(Array.prototype.pop),Xs=Ft(Array.prototype.push),NO=Ft(Array.prototype.splice),Gf=Ft(String.prototype.toLowerCase),Ph=Ft(String.prototype.toString),kh=Ft(String.prototype.match),tr=Ft(String.prototype.replace),CO=Ft(String.prototype.indexOf),wO=Ft(String.prototype.trim),lo=Ft(Object.prototype.hasOwnProperty),jt=Ft(RegExp.prototype.test),qs=AO(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Yh(e,t,o)}}function AO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Xh(e,n)}}function Se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gf;kE&&kE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(xO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function MO(e){for(let t=0;t<e.length;t++)lo(e,t)||(e[t]=null);return e}function Eo(e){let t=$s(null);for(let[n,o]of ZE(e))lo(e,n)&&(Array.isArray(o)?t[n]=MO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Eo(o):t[n]=o);return t}function Zs(e,t){for(;e!==null;){let o=EO(e,t);if(o){if(o.get)return Ft(o.get);if(typeof o.value=="function")return Ft(o.value)}e=_O(e)}function n(){return null}return n}var UE=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gh=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Uh=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),DO=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ih=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),IE=$t(["#text"]),VE=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Vh=$t(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),YE=$t(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),OO=jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zO=jn(/<%[\w\W]*|[\w\W]*%>/gm),LO=jn(/\$\{[\w\W]*/gm),BO=jn(/^data-[\-\w.\u00B7-\uFFFF]+$/),HO=jn(/^aria-[\-\w]+$/),jE=jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),PO=jn(/^(?:\w+script|data):/i),kO=jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$E=jn(/^html$/i),GO=jn(/^[a-z][.\w]*(-[.\w]+)+$/i),XE=Object.freeze({__proto__:null,ARIA_ATTR:HO,ATTR_WHITESPACE:kO,CUSTOM_ELEMENT:GO,DATA_ATTR:BO,DOCTYPE_NAME:$E,ERB_EXPR:zO,IS_ALLOWED_URI:jE,IS_SCRIPT_OR_DATA:PO,MUSTACHE_EXPR:OO,TMPLIT_EXPR:LO}),js={element:1,text:3,progressingInstruction:7,comment:8,document:9},UO=function(){return typeof window>"u"?null:window},IO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},qE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function FE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UO(),t=oe=>FE(oe);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==js.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,v=s.prototype,b=Zs(v,"cloneNode"),S=Zs(v,"remove"),p=Zs(v,"nextSibling"),g=Zs(v,"childNodes"),m=Zs(v,"parentNode");if(typeof l=="function"){let oe=n.createElement("template");oe.content&&oe.content.ownerDocument&&(n=oe.content.ownerDocument)}let y,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:C,getElementsByTagName:A}=n,{importNode:B}=o,M=qE();t.isSupported=typeof ZE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:I,TMPLIT_EXPR:T,DATA_ATTR:D,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=XE,{IS_ALLOWED_URI:V}=XE,k=null,G=Se({},[...UE,...Gh,...Uh,...Ih,...IE]),q=null,Z=Se({},[...VE,...Vh,...YE,...kf]),j=Object.seal($s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,ee=null,X=Object.seal($s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ue=!0,ge=!1,ie=!0,te=!1,Te=!0,de=!1,be=!1,Le=!1,Be=!1,dt=!1,Gt=!1,hn=!0,rt=!1,Rn="user-content-",Wt=!0,Jt=!1,St={},$e=null,ro=Se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ri=null,$n=Se({},["audio","video","img","source","image","track"]),si=null,Fn=Se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),On="http://www.w3.org/1998/Math/MathML",No="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",Kn=pt,Qn=!1,Co=null,wo=Se({},[On,No,pt],Ph),ui=Se({},["mi","mo","mn","ms","mtext"]),ci=Se({},["annotation-xml"]),ka=Se({},["title","style","font","a","script"]),Ao=null,Ga=["application/xhtml+xml","text/html"],Ua="text/html",We=null,Mo=null,Do=n.createElement("form"),Ro=function(w){return w instanceof RegExp||w instanceof Function},me=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Mo&&Mo===w)){if((!w||typeof w!="object")&&(w={}),w=Eo(w),Ao=Ga.indexOf(w.PARSER_MEDIA_TYPE)===-1?Ua:w.PARSER_MEDIA_TYPE,We=Ao==="application/xhtml+xml"?Ph:Gf,k=lo(w,"ALLOWED_TAGS")?Se({},w.ALLOWED_TAGS,We):G,q=lo(w,"ALLOWED_ATTR")?Se({},w.ALLOWED_ATTR,We):Z,Co=lo(w,"ALLOWED_NAMESPACES")?Se({},w.ALLOWED_NAMESPACES,Ph):wo,si=lo(w,"ADD_URI_SAFE_ATTR")?Se(Eo(Fn),w.ADD_URI_SAFE_ATTR,We):Fn,ri=lo(w,"ADD_DATA_URI_TAGS")?Se(Eo($n),w.ADD_DATA_URI_TAGS,We):$n,$e=lo(w,"FORBID_CONTENTS")?Se({},w.FORBID_CONTENTS,We):ro,se=lo(w,"FORBID_TAGS")?Se({},w.FORBID_TAGS,We):Eo({}),ee=lo(w,"FORBID_ATTR")?Se({},w.FORBID_ATTR,We):Eo({}),St=lo(w,"USE_PROFILES")?w.USE_PROFILES:!1,Q=w.ALLOW_ARIA_ATTR!==!1,ue=w.ALLOW_DATA_ATTR!==!1,ge=w.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=w.SAFE_FOR_TEMPLATES||!1,Te=w.SAFE_FOR_XML!==!1,de=w.WHOLE_DOCUMENT||!1,Be=w.RETURN_DOM||!1,dt=w.RETURN_DOM_FRAGMENT||!1,Gt=w.RETURN_TRUSTED_TYPE||!1,Le=w.FORCE_BODY||!1,hn=w.SANITIZE_DOM!==!1,rt=w.SANITIZE_NAMED_PROPS||!1,Wt=w.KEEP_CONTENT!==!1,Jt=w.IN_PLACE||!1,V=w.ALLOWED_URI_REGEXP||jE,Kn=w.NAMESPACE||pt,ui=w.MATHML_TEXT_INTEGRATION_POINTS||ui,ci=w.HTML_INTEGRATION_POINTS||ci,j=w.CUSTOM_ELEMENT_HANDLING||$s(null),w.CUSTOM_ELEMENT_HANDLING&&Ro(w.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=w.CUSTOM_ELEMENT_HANDLING.tagNameCheck),w.CUSTOM_ELEMENT_HANDLING&&Ro(w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=w.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=w.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(ue=!1),dt&&(Be=!0),St&&(k=Se({},IE),q=$s(null),St.html===!0&&(Se(k,UE),Se(q,VE)),St.svg===!0&&(Se(k,Gh),Se(q,Vh),Se(q,kf)),St.svgFilters===!0&&(Se(k,Uh),Se(q,Vh),Se(q,kf)),St.mathMl===!0&&(Se(k,Ih),Se(q,YE),Se(q,kf))),X.tagCheck=null,X.attributeCheck=null,w.ADD_TAGS&&(typeof w.ADD_TAGS=="function"?X.tagCheck=w.ADD_TAGS:(k===G&&(k=Eo(k)),Se(k,w.ADD_TAGS,We))),w.ADD_ATTR&&(typeof w.ADD_ATTR=="function"?X.attributeCheck=w.ADD_ATTR:(q===Z&&(q=Eo(q)),Se(q,w.ADD_ATTR,We))),w.ADD_URI_SAFE_ATTR&&Se(si,w.ADD_URI_SAFE_ATTR,We),w.FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,w.FORBID_CONTENTS,We)),w.ADD_FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,w.ADD_FORBID_CONTENTS,We)),Wt&&(k["#text"]=!0),de&&Se(k,["html","head","body"]),k.table&&(Se(k,["tbody"]),delete se.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=w.TRUSTED_TYPES_POLICY,x=y.createHTML("")}else y===void 0&&(y=IO(h,i)),y!==null&&typeof x=="string"&&(x=y.createHTML(""));$t&&$t(w),Mo=w}},re=Se({},[...Gh,...Uh,...DO]),ae=Se({},[...Ih,...RO]),we=function(w){let Y=m(w);(!Y||!Y.tagName)&&(Y={namespaceURI:Kn,tagName:"template"});let F=Gf(w.tagName),Ge=Gf(Y.tagName);return Co[w.namespaceURI]?w.namespaceURI===No?Y.namespaceURI===pt?F==="svg":Y.namespaceURI===On?F==="svg"&&(Ge==="annotation-xml"||ui[Ge]):!!re[F]:w.namespaceURI===On?Y.namespaceURI===pt?F==="math":Y.namespaceURI===No?F==="math"&&ci[Ge]:!!ae[F]:w.namespaceURI===pt?Y.namespaceURI===No&&!ci[Ge]||Y.namespaceURI===On&&!ui[Ge]?!1:!ae[F]&&(ka[F]||!re[F]):!!(Ao==="application/xhtml+xml"&&Co[w.namespaceURI]):!1},ye=function(w){Xs(t.removed,{element:w});try{m(w).removeChild(w)}catch{S(w)}},He=function(w,Y){try{Xs(t.removed,{attribute:Y.getAttributeNode(w),from:Y})}catch{Xs(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(w),w==="is")if(Be||dt)try{ye(Y)}catch{}else try{Y.setAttribute(w,"")}catch{}},wt=function(w){let Y=null,F=null;if(Le)w="<remove></remove>"+w;else{let et=kh(w,/^[\r\n\t ]+/);F=et&&et[0]}Ao==="application/xhtml+xml"&&Kn===pt&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");let Ge=y?y.createHTML(w):w;if(Kn===pt)try{Y=new f().parseFromString(Ge,Ao)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Kn,"template",null);try{Y.documentElement.innerHTML=Qn?x:Ge}catch{}}let _t=Y.body||Y.documentElement;return w&&F&&_t.insertBefore(n.createTextNode(F),_t.childNodes[0]||null),Kn===pt?A.call(Y,de?"html":"body")[0]:de?Y.documentElement:_t},Wn=function(w){return E.call(w.ownerDocument||w,w,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},zn=function(w){return w instanceof d&&(typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||!(w.attributes instanceof c)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function")},fi=function(w){return typeof r=="function"&&w instanceof r};function xt(oe,w,Y){Ys(oe,F=>{F.call(t,w,Y,Mo)})}let rr=function(w){let Y=null;if(xt(M.beforeSanitizeElements,w,null),zn(w))return ye(w),!0;let F=We(w.nodeName);if(xt(M.uponSanitizeElement,w,{tagName:F,allowedTags:k}),Te&&w.hasChildNodes()&&!fi(w.firstElementChild)&&jt(/<[/\w!]/g,w.innerHTML)&&jt(/<[/\w!]/g,w.textContent)||Te&&w.namespaceURI===pt&&F==="style"&&fi(w.firstElementChild)||w.nodeType===js.progressingInstruction||Te&&w.nodeType===js.comment&&jt(/<[/\w]/g,w.data))return ye(w),!0;if(se[F]||!(X.tagCheck instanceof Function&&X.tagCheck(F))&&!k[F]){if(!se[F]&&ur(F)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F)))return!1;if(Wt&&!$e[F]){let Ge=m(w)||w.parentNode,_t=g(w)||w.childNodes;if(_t&&Ge){let et=_t.length;for(let Ht=et-1;Ht>=0;--Ht){let Ut=b(_t[Ht],!0);Ut.__removalCount=(w.__removalCount||0)+1,Ge.insertBefore(Ut,p(w))}}}return ye(w),!0}return w instanceof s&&!we(w)||(F==="noscript"||F==="noembed"||F==="noframes")&&jt(/<\/no(script|embed|frames)/i,w.innerHTML)?(ye(w),!0):(te&&w.nodeType===js.text&&(Y=w.textContent,Ys([z,I,T],Ge=>{Y=tr(Y,Ge," ")}),w.textContent!==Y&&(Xs(t.removed,{element:w.cloneNode()}),w.textContent=Y)),xt(M.afterSanitizeElements,w,null),!1)},sr=function(w,Y,F){if(ee[Y]||hn&&(Y==="id"||Y==="name")&&(F in n||F in Do))return!1;if(!(ue&&!ee[Y]&&jt(D,Y))){if(!(Q&&jt(N,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,w))){if(!q[Y]||ee[Y]){if(!(ur(w)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,w)||j.tagNameCheck instanceof Function&&j.tagNameCheck(w))&&(j.attributeNameCheck instanceof RegExp&&jt(j.attributeNameCheck,Y)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(Y,w))||Y==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F))))return!1}else if(!si[Y]){if(!jt(V,tr(F,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&w!=="script"&&CO(F,"data:")===0&&ri[w])){if(!(ge&&!jt(O,tr(F,R,"")))){if(F)return!1}}}}}}}return!0},ur=function(w){return w!=="annotation-xml"&&kh(w,L)},eu=function(w){xt(M.beforeSanitizeAttributes,w,null);let{attributes:Y}=w;if(!Y||zn(w))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let _t=Y[Ge],{name:et,namespaceURI:Ht,value:Ut}=_t,so=We(et),cr=Ut,mt=et==="value"?cr:wO(cr);if(F.attrName=so,F.attrValue=mt,F.keepAttr=!0,F.forceKeepAttr=void 0,xt(M.uponSanitizeAttribute,w,F),mt=F.attrValue,rt&&(so==="id"||so==="name")&&(He(et,w),mt=Rn+mt),Te&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){He(et,w);continue}if(so==="attributename"&&kh(mt,"href")){He(et,w);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){He(et,w);continue}if(!ie&&jt(/\/>/i,mt)){He(et,w);continue}te&&Ys([z,I,T],nu=>{mt=tr(mt,nu," ")});let fr=We(w.nodeName);if(!sr(fr,so,mt)){He(et,w);continue}if(y&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ht)switch(h.getAttributeType(fr,so)){case"TrustedHTML":{mt=y.createHTML(mt);break}case"TrustedScriptURL":{mt=y.createScriptURL(mt);break}}if(mt!==cr)try{Ht?w.setAttributeNS(Ht,et,mt):w.setAttribute(et,mt),zn(w)?ye(w):GE(t.removed)}catch{He(et,w)}}xt(M.afterSanitizeAttributes,w,null)},tu=function(w){let Y=null,F=Wn(w);for(xt(M.beforeSanitizeShadowDOM,w,null);Y=F.nextNode();)xt(M.uponSanitizeShadowNode,Y,null),rr(Y),eu(Y),Y.content instanceof a&&tu(Y.content);xt(M.afterSanitizeShadowDOM,w,null)};return t.sanitize=function(oe){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,F=null,Ge=null,_t=null;if(Qn=!oe,Qn&&(oe="<!-->"),typeof oe!="string"&&!fi(oe))if(typeof oe.toString=="function"){if(oe=oe.toString(),typeof oe!="string")throw qs("dirty is not a string, aborting")}else throw qs("toString is not a function");if(!t.isSupported)return oe;if(be||me(w),t.removed=[],typeof oe=="string"&&(Jt=!1),Jt){if(oe.nodeName){let Ut=We(oe.nodeName);if(!k[Ut]||se[Ut])throw qs("root node is forbidden and cannot be sanitized in-place")}}else if(oe instanceof r)Y=wt("<!---->"),F=Y.ownerDocument.importNode(oe,!0),F.nodeType===js.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?Y=F:Y.appendChild(F);else{if(!Be&&!te&&!de&&oe.indexOf("<")===-1)return y&&Gt?y.createHTML(oe):oe;if(Y=wt(oe),!Y)return Be?null:Gt?x:""}Y&&Le&&ye(Y.firstChild);let et=Wn(Jt?oe:Y);for(;Ge=et.nextNode();)rr(Ge),eu(Ge),Ge.content instanceof a&&tu(Ge.content);if(Jt)return oe;if(Be){if(te){Y.normalize();let Ut=Y.innerHTML;Ys([z,I,T],so=>{Ut=tr(Ut,so," ")}),Y.innerHTML=Ut}if(dt)for(_t=C.call(Y.ownerDocument);Y.firstChild;)_t.appendChild(Y.firstChild);else _t=Y;return(q.shadowroot||q.shadowrootmode)&&(_t=B.call(o,_t,!0)),_t}let Ht=de?Y.outerHTML:Y.innerHTML;return de&&k["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&jt($E,Y.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
16
- `+Ht),te&&Ys([z,I,T],Ut=>{Ht=tr(Ht,Ut," ")}),y&&Gt?y.createHTML(Ht):Ht},t.setConfig=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};me(oe),be=!0},t.clearConfig=function(){Mo=null,be=!1},t.isValidAttribute=function(oe,w,Y){Mo||me({});let F=We(oe),Ge=We(w);return sr(F,Ge,Y)},t.addHook=function(oe,w){typeof w=="function"&&Xs(M[oe],w)},t.removeHook=function(oe,w){if(w!==void 0){let Y=TO(M[oe],w);return Y===-1?void 0:NO(M[oe],Y,1)[0]}return GE(M[oe])},t.removeHooks=function(oe){M[oe]=[]},t.removeAllHooks=function(){M=qE()},t}var qh=FE();var le=ne(pe(),1),VO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),YO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),XO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),qO=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),KE=(0,le.jsx)("svg",{viewBox:"0 0 24 24",children:(0,le.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Uf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Zh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function QE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function If({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=fn.default.useState("html"),[r,s]=fn.default.useState(!1),u=fn.default.useRef(null),c=fn.default.useMemo(()=>zE(e.data),[e.data]),d=fn.default.useMemo(()=>OE(e.data),[e.data]),f=fn.default.useMemo(()=>LE(e.data),[e.data]),h=fn.default.useMemo(()=>Bh(e.data),[e.data]),v=fn.default.useMemo(()=>BE(e.data),[e.data]),[b,S]=fn.default.useState(null);fn.default.useEffect(()=>{if(S(null),!f||!n||c)return;let N=!1;return n(f).then(O=>{N||S(Pf(O)?O:null)}).catch(()=>{N||S(null)}),()=>{N=!0}},[f,n,c]);let p=c??b,g=d??b,m=fn.default.useMemo(()=>HE(e.data,e.contentType,g??f),[e.data,e.contentType,g,f]),y=m==="application/pdf",x=m?.startsWith("image/")??!1,_=PE(m??e.contentType),{jsonString:E,jsonError:C}=fn.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(N){return{jsonString:null,jsonError:N instanceof Error?N.message:String(N)}}},[e.data]);fn.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(N=>{N.setAttribute("target","_blank"),N.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function A(N){let O=h||e.name;return(0,le.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,le.jsx)("div",{className:"stuff-viewer-local-file-icon",children:KE}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[O&&(0,le.jsx)("div",{className:"stuff-viewer-local-file-name",children:O}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[N," \u2014 no preview available"]})]})]})}function B(N){return(0,le.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,le.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,le.jsx)("div",{className:"stuff-viewer-error-detail",children:N})]})}function M(){if(a==="html"){if(y){if(o!==!1&&p){let O=p.includes("#")?p:`${p}#pagemode=none`;return(0,le.jsx)("div",{className:"stuff-viewer-pdf",children:(0,le.jsx)("embed",{src:O,type:"application/pdf"})})}if(g){let O=h||e.name;return(0,le.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:T,children:[(0,le.jsx)("div",{className:"stuff-viewer-local-file-icon",children:KE}),(0,le.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[O&&(0,le.jsx)("div",{className:"stuff-viewer-local-file-name",children:O}),(0,le.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return A("PDF")}return x?p?(0,le.jsx)("div",{className:"stuff-viewer-image",children:(0,le.jsx)("img",{src:p,alt:e.name??"(unnamed stuff)"})}):A("Image"):v!=null?(0,le.jsx)("iframe",{className:"stuff-viewer-html-frame",title:e.name?`${e.name} preview`:"HTML preview",sandbox:"",srcDoc:qh.sanitize(v,{WHOLE_DOCUMENT:!0})}):e.dataHtml?(0,le.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:qh.sanitize(e.dataHtml)}}):E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,le.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Uf(e.dataText)}}):E?(0,le.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Uf(E)}}):C?B(C):(0,le.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function z(){let N;a==="json"?N=E||"":a==="text"?N=e.dataText||E||"":N=v||e.dataText||e.dataHtml||E||"",N&&navigator.clipboard&&navigator.clipboard.writeText(N).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function I(){if(x&&g){let N=m?.split("/")[1]||"png";QE(g,`${e.name||"stuff"}.${N}`);return}if(y&&g){QE(g,`${e.name||"stuff"}.pdf`);return}a==="json"?Zh(E||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Zh(e.dataText||E||"",`${e.name||"stuff"}.txt`,"text/plain"):Zh(v||e.dataHtml||E||"",`${e.name||"stuff"}.html`,"text/html")}function T(){if(g){if(i){i(g,h??void 0);return}window.open(g,"_blank","noopener,noreferrer")}}let D=["stuff-viewer",t].filter(Boolean).join(" ");return(0,le.jsxs)("div",{className:D,children:[(0,le.jsxs)("div",{className:"stuff-viewer-header",children:[(0,le.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,le.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,le.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,le.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(N=>(0,le.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===N?" stuff-viewer-tab--active":""}`,onClick:()=>l(N),children:N==="html"?_:N==="json"?"JSON":"Pretty"},N))}),(0,le.jsxs)("div",{className:"stuff-viewer-actions",children:[g&&(0,le.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:T,title:"Open in new window","aria-label":"Open in new window",children:qO}),(0,le.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:z,title:"Copy","aria-label":"Copy",children:r?YO:VO}),(0,le.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:I,title:"Download","aria-label":"Download",children:XO})]})]}),(0,le.jsx)("div",{className:"stuff-viewer-content",ref:u,children:M()})]})}var WE=ne(At(),1);var za=ne(pe(),1);function JE({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){WE.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,za.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,za.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,za.jsxs)("div",{className:"detail-panel-content",children:[(0,za.jsx)("div",{className:"detail-panel-close-row",children:(0,za.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var La=ne(At(),1),ZO=.6;function eT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=La.default.useState(e),[l,r]=La.default.useState(!1),s=La.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=La.default.useRef(null),c=La.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*ZO):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return La.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,g=Math.max(t,Math.min(S,b+p));a(g),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var lT=ne(At(),1);var Vf=ne(At(),1),Ve=ne(pe(),1);function jh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function K({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function $h({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var jO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),$O=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),FO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),tT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function Mn({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Vf.useState)(!1),[a,l]=(0,Vf.useState)(!1),[r,s]=(0,Vf.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?$O:jO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...tT,color:a?"#10b981":"#64748b"},children:a?KO:FO}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:tT,children:[(0,Ve.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ve.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Bt=ne(pe(),1);function Fh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsx)(K,{label:"Model",value:h}),v&&v!==h&&(0,Bt.jsx)(K,{label:"Model (object)",value:v}),(0,Bt.jsx)(K,{label:"Structuring",value:d||e.structuring_method}),(0,Bt.jsx)(K,{label:"Multiple Output",value:f}),(0,Bt.jsx)(K,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Bt.jsx)(K,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Bt.jsx)(K,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Bt.jsx)(K,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Bt.jsx)(K,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Bt.jsx)(K,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Bt.jsx)(Mn,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Bt.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}var dn=ne(pe(),1);function Kh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(K,{label:"Model",value:o||e.img_gen_choice}),(0,dn.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,dn.jsx)(Mn,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,dn.jsx)(K,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,dn.jsx)(K,{label:"Output Format",value:e.output_format}),(0,dn.jsx)(K,{label:"Background",value:e.background}),(0,dn.jsx)(K,{label:"Is Raw",value:e.is_raw}),(0,dn.jsx)(K,{label:"Seed",value:e.seed}),(0,dn.jsx)(K,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}var pn=ne(pe(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,pn.jsxs)(pn.Fragment,{children:[(0,pn.jsx)(K,{label:"Model",value:n||e.extract_choice}),(0,pn.jsx)(K,{label:"Document Variable",value:e.document_stuff_name}),(0,pn.jsx)(K,{label:"Caption Images",value:e.should_caption_images}),(0,pn.jsx)(K,{label:"Max Page Images",value:e.max_page_images}),(0,pn.jsx)(K,{label:"Include Page Views",value:e.should_include_page_views}),(0,pn.jsx)(K,{label:"Page Views DPI",value:e.page_views_dpi}),(0,pn.jsx)(K,{label:"Render JS",value:e.render_js}),(0,pn.jsx)(K,{label:"Include Raw HTML",value:e.include_raw_html}),(0,pn.jsx)(K,{label:"Image Variable",value:e.image_stuff_name})]})}var mn=ne(pe(),1);function Wh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,mn.jsxs)(mn.Fragment,{children:[(0,mn.jsx)(K,{label:"Model",value:n||e.search_choice}),(0,mn.jsx)(Mn,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,mn.jsx)(K,{label:"Max Results",value:e.max_results_override}),(0,mn.jsx)(K,{label:"Include Images",value:e.include_images_override}),(0,mn.jsx)(K,{label:"Structured Output",value:e.is_structured_output}),(0,mn.jsx)(K,{label:"From Date",value:e.from_date}),(0,mn.jsx)(K,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,mn.jsx)(K,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,mn.jsx)(K,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}var QO=["model","llm_handle","handle","llm_name","name"];function nT(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function oT(e){if(typeof e=="string")return nT(e);if(e&&typeof e=="object")for(let t of QO){let n=nT(e[t]);if(n)return n}}var To=ne(pe(),1);function Jh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.is_multiple_output,i=t?.rendered_user_prompt,a=n||oT(e.llm_choice);return(0,To.jsxs)(To.Fragment,{children:[(0,To.jsx)(K,{label:"Model",value:a}),(0,To.jsx)(K,{label:"Text Variable",value:e.text_input_name}),(0,To.jsx)(K,{label:"Multiple Output",value:o}),(0,To.jsx)(K,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,To.jsx)(Mn,{label:"Prompt",templateText:void 0,renderedText:i})]})}var ze=ne(pe(),1);function WO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var JO=60;function e3(e){return e.length>JO||e.includes(`
17
- `)}function t3({label:e,value:t}){return(0,ze.jsxs)("div",{className:"detail-field-block",children:[(0,ze.jsx)("div",{className:"detail-field-block-label",children:e}),(0,ze.jsx)("div",{className:"detail-field-block-value",children:t})]})}function iT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,ze.jsxs)(ze.Fragment,{children:[o.map(([r,s])=>{let u=WO(s);return e3(u)?(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(t3,{label:r,value:u})},r):(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(K,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(Mn,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,ze.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,ze.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,ze.jsx)(iT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function eg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(K,{label:"Mode",value:o||(l?"construct":"template")}),(0,ze.jsx)(K,{label:"Category",value:e.category}),(0,ze.jsx)(K,{label:"Templating Style",value:e.templating_style}),e.template&&(0,ze.jsx)(Mn,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,ze.jsx)(iT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}var kt=ne(pe(),1);function tg({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)($h,{label:"Expression",text:e.expression}),n&&(0,kt.jsx)(K,{label:"Expression Result",value:n}),(0,kt.jsxs)("div",{children:[(0,kt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,kt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:i}),(0,kt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,kt.jsxs)("div",{className:"detail-kv-row",children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,kt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,kt.jsx)(K,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}var oi=ne(pe(),1);function ng({blueprint:e}){return(0,oi.jsxs)("div",{children:[(0,oi.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,oi.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,oi.jsxs)("div",{className:"detail-step-item",children:[(0,oi.jsx)("span",{className:"detail-step-index",children:n+1}),(0,oi.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,oi.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}var Dn=ne(pe(),1);function og({blueprint:e}){return(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsxs)("div",{children:[(0,Dn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Dn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Dn.jsxs)("div",{className:"detail-step-item",children:[(0,Dn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Dn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Dn.jsx)(K,{label:"Add Each Output",value:e.add_each_output}),(0,Dn.jsx)(K,{label:"Combined Output",value:e.combined_output})]})}var ii=ne(pe(),1);function ig({blueprint:e,executionData:t}){let n=t?.item_count;return(0,ii.jsxs)(ii.Fragment,{children:[(0,ii.jsx)(K,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,ii.jsx)(K,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,ii.jsx)(K,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,ii.jsx)(K,{label:"Items Processed",value:n})]})}var aT=new Set(["PipeLLM","PipeImgGen","PipeExtract","PipeSearch","PipeStructure","PipeCompose","PipeSequence","PipeParallel","PipeCondition","PipeBatch"]);function ag(e,t){return aT.has(e)?!t:!0}var J=ne(pe(),1),n3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},o3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),i3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function rT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=o3.has(o),a=n3[o],l=e.status,r=i3[l]??"#6272a4",s=lT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=DE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("div",{className:"detail-sticky-header",children:[(0,J.jsxs)("div",{className:"detail-header",children:[(0,J.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,J.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,J.jsxs)("div",{className:"detail-status",children:[(0,J.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,J.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,J.jsx)("span",{className:"detail-duration",children:jh(e.timing.duration)})]}),d&&(0,J.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,J.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,J.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,J.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,J.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,J.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,J.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,J.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,J.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,J.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,J.jsx)(a3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,J.jsx)(l3,{executionData:e.execution_data,pipeType:o,hasBlueprint:!!s}),e.error&&(0,J.jsxs)("div",{className:"detail-error",children:[(0,J.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,J.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,J.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,J.jsx)(K,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,J.jsxs)("div",{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,J.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,J.jsxs)("span",{className:"detail-tag",children:[(0,J.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,J.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,J.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function a3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,J.jsx)(Fh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,J.jsx)(Kh,{blueprint:e,executionData:t});case"PipeCompose":return(0,J.jsx)(eg,{blueprint:e,executionData:t});case"PipeExtract":return(0,J.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,J.jsx)(Wh,{blueprint:e,executionData:t});case"PipeStructure":return(0,J.jsx)(Jh,{blueprint:e,executionData:t});case"PipeSequence":return(0,J.jsx)(ng,{blueprint:e,executionData:t});case"PipeParallel":return(0,J.jsx)(og,{blueprint:e,executionData:t});case"PipeCondition":return(0,J.jsx)(tg,{blueprint:e,executionData:t});case"PipeBatch":return(0,J.jsx)(ig,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,J.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function l3({executionData:e,pipeType:t,hasBlueprint:n}){return ag(t,n)?(0,J.jsx)(r3,{data:e}):null}function r3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,J.jsx)(K,{label:n,value:String(o)},n))]})}var lg=ne(At(),1);var Ee=ne(pe(),1);function rg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(s3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function s3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=lg.default.useState(l?"data":"structure"),u=lg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(u3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(If,{stuff:f3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function u3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:c3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function c3(e){return typeof e.type=="string"?e.type:Array.isArray(e.type)?e.type.join(" | "):e.anyOf?"union":e.allOf?"all":typeof e.$ref=="string"?e.$ref.split("/").pop()??"(unresolved type)":"(unresolved type)"}function f3(e){return d3(e)?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function d3(e){return"contentType"in e||"dataText"in e||"dataHtml"in e}function nr(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function or(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function Yf(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var p3=7,m3=48,h3=140;function g3(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=Bl(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=Yf(u);o.push({id:u.id,type:zl,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Ui(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*p3+m3,v=Math.max(h3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,g=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:d1,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${g}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Ui(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ya,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Ui(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ya,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Ui(s.source_stuff_digest),c=Ui(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ya,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Ui(s.source_stuff_digest),c=Ui(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ya,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=_o(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function sT(e,t){if(e){let n=ME(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:g3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function cT(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function y3(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function Fs(e,t,n){let o=y3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Xf(e,t,n){return Fs(e,t,n)??e}function uT(e,t){return e.nodes.find(n=>n.id===t)}function sg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=_o(n,t),l=new Map;for(let p of o){let m=uT(n,p)?.io?.outputs;if(m)for(let y of m){if(!y.digest)continue;let x=l.get(y.digest);x||(x=new Set,l.set(y.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!Ll(p.id))continue;let g=l.get(ps(p.id));if(!g)continue;let m=a[p.id],y=null,x=new Set;for(;m&&!x.has(m);)x.add(m),g.has(m)&&(y=m),m=a[m];if(!y)continue;let _=a[y];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)Fs(p.id,a,o)||r.push(p);for(let p of o){if(Fs(p,a,o))continue;let g=uT(n,p);if(!g)continue;let m=Yf(Bl(g,p));i&&(m.onExpand=x=>i(p,x));let y={id:p,type:zl,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:g,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:g.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(y)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||Fs(p,a,o)||s.add(p);let u={};for(let p of s){let g=t.containmentTree[p]??[],m=[];for(let y of g){let x=Fs(y,a,o);x&&x!==y||m.push(y)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let g of p)c.add(g);let d={};for(let[p,g]of Object.entries(t.stuffProducers))d[p]=Xf(g,a,o);let f={};for(let[p,g]of Object.entries(t.stuffConsumers)){let m=new Set;for(let y of g)m.add(Xf(y,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let g=Xf(p.source,a,o),m=Xf(p.target,a,o);if(g===m)continue;let y=p._batchEdge?"batch":"data",x=`${g}->${m}|${y}`;if(v.has(x))continue;let _={...p,source:g,target:m,id:p.id};p._batchEdge&&(g!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=_o({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let g=b[p.source]||null,m=b[p.target]||null;if(g&&m&&g!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:y,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:ya,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var v3=window.ELK,fT=v3;function b3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var S3="_in",x3="_out";function cg(e){return e+S3}function fg(e){return e+x3}function _3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:cg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:fg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var E3=320,hT=28,T3=24,ug=8,N3=22,C3=50,w3=16,A3=3,dT=38,pT=30,qf=22,M3=140,D3=100,R3=17,O3=58,z3=5.5,L3=5,B3=4.5,H3=4;function P3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-hT,i=Math.max(1,Math.floor(o/z3)),a=Math.ceil(e.length/i);return Math.min(A3,Math.max(1,a))}function k3(e,t){let n=Math.min(M3,Math.ceil(e.length*L3)),o=Math.min(D3,Math.ceil(t.length*B3));return n+o+R3}function mT(e,t){if(e.length===0)return 0;let n=t-hT-O3,o=1,i=0;for(let a of e){let l=k3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function ir(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===zl,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],v=d.description||n.nodeData?.description||"",b=T3+(t?C3:N3),S=P3(v,t,u);S>0&&(b+=ug+S*w3);let p=f.slice(0,H3);if(p.length>0)if(b+=ug,t)b+=dT+(p.length-1)*qf;else{let g=mT(p,u);b+=pT+(g-1)*qf}if(h.length>0)if(b+=ug,t)b+=dT+(h.length-1)*qf;else{let g=mT(h,u);b+=pT+(g-1)*qf}c=Math.min(E3,b)}else c=a?120:70;return{width:u,height:c}}function G3(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function Zf(e,t,n){return{id:e,width:t.width,height:t.height,ports:_3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function gT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=b3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(C=>{let A=ir(C,l);return x[C.id]=A,Zf(C.id,A,i)}),E=t.map(C=>({id:C.id,sources:[fg(C.source)],targets:[cg(C.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=_o(n,o),h=G3(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let E=1+(h[x]??0)*.15,C=Math.round(Lc*E),A=Math.round(Bc*E),B=Math.round(Hc*E),M={"elk.padding":`[top=${A},left=${C},bottom=${B},right=${C}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],I=o.containmentTree[x]||[];for(let T of I)if(o.controllerNodeIds.has(T)){let D=S[T];D&&z.push(D)}else{let D=b.get(T);if(D){let N=ir(D,l);v[T]=N,z.push(Zf(T,N,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(D=>D.id===T.id)){let D=ir(T,l);v[T.id]=D,z.push(Zf(T.id,D,i))}S[x]={id:x,layoutOptions:M,children:z}}let g=[];for(let x of p)if(!f[x]){let _=S[x];_&&g.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=ir(x,l);v[x.id]=_,g.push(Zf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),y=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[fg(x.source)],targets:[cg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:g,edges:y},dimensionMap:v}}function yT(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var dg=null;function U3(){return dg||(dg=new fT),dg}async function jf(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=gT(e,t,i??null,a??null,n,o),u=await U3().layout(r),c=yT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??ir(h,l),S=b.width,p=b.height,g=h.data.pipeCardData,y=g?{...g,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:y},style:{...h.style,width:S+"px",height:p+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Ks=5;function I3(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function V3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Bl(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=_o(e,t),c={};for(let[v,b]of Object.entries(u))Ll(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(M=>i[M]),p=c[v]||[],g=[...S,...p];if(g.length===0)continue;let m,y,x,_,E=o?.[v];if(E)m=E.x,y=E.y,x=E.width,_=E.height;else{let M=1/0,z=1/0,I=-1/0,T=-1/0;for(let V of g){let k=i[V],G=k.position,q=g1(k),Z=y1(k);M=Math.min(M,G.x),z=Math.min(z,G.y),I=Math.max(I,G.x+q),T=Math.max(T,G.y+Z)}let N=1+(l[v]??0)*.15,O=Math.round(Lc*N),R=Math.round(Bc*N),L=Math.round(Hc*N);m=M-O,y=z-R,x=I-M+2*O,_=T-z+R+L}let C=a[v];if(!C)throw new ms(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let A=C.pipe_code,B={id:v,type:p1,data:{label:A,pipeType:C.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:A,labelText:A},position:{x:m,y},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(B),i[v]=B;for(let M of g)h[M]=v}for(let[v,b]of Object.entries(h)){let S=i[v],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function ar(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let y of n.nodes)o.controllerNodeIds.has(y.id)&&(d[y.id]=y.pipe_type);for(let y of o.controllerNodeIds){let x=o.containmentTree[y]||[];u[y]=x.length;let _=d[y];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Ks&&!a?.has(y)&&c.add(y)}let f=e,h=t;if(c.size>0){let y=new Set;for(let _ of c){let C=(o.containmentTree[_]||[]).slice(Ks);for(let A of C)if(y.add(A),o.controllerNodeIds.has(A))for(let B of I3(A,o.containmentTree,o.controllerNodeIds))y.add(B)}let x=_o(n,o);for(let _ of e){if(!Ll(_.id)||y.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!y.has(E))continue;let C=t.filter(A=>{if(A.source!==_.id&&A.target!==_.id)return!1;let B=A.source===_.id?A.target:A.source;return!Ll(B)});(C.length===0||C.every(A=>{let B=A.source===_.id?A.target:A.source;return y.has(B)}))&&y.add(_.id)}f=e.filter(_=>!y.has(_.id)),h=t.filter(_=>!y.has(_.source)&&!y.has(_.target))}let v=V3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let y of v){let x=u[y.id]??0,_=c.has(y.id);if(y.data.childCount=x,y.data.isCollapsed=_,l){let E=y.id;y.data.onToggleCollapse=()=>l(E)}if(s){let E=y.id;y.data.onToggleFold=C=>s(E,C)}}let b=[...v,...f],S={};for(let y of b)S[y.id]=y;let p={},g=new Set;function m(y){if(p[y]!==void 0)return p[y];if(g.has(y))throw new Error(`Cycle detected in node parent chain: node "${y}" references itself as an ancestor`);g.add(y);let x=S[y];return p[y]=x&&x.parentId?1+m(x.parentId):0,g.delete(y),p[y]}for(let y of b)m(y.id);return b.sort((y,x)=>p[y.id]-p[x.id]),{nodes:b,edges:h}}var vT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},Y3={...vT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},X3={...vT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function $f(e){return e===ga.LIGHT?X3:Y3}var Ba={direction:"LR",showControllers:!1,foldMode:no.EXPANDED,theme:yt.SYSTEM,toolbarPosition:un.TOP_RIGHT,nodesep:50,ranksep:100,edgeType:zc.DEFAULT,initialZoom:null,panToTop:!0};var Ha=ne(pe(),1);function q3(e){return e.kind==="pipe"?(0,Ha.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ha.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ha.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ha.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ha.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function lr(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:q3(t.data.labelDescriptor)}}:t)}var $=ne(pe(),1),Z3=15;var j3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,$.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),$3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),F3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),K3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Q3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,$.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,$.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),W3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,$.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,$.jsx)("path",{d:"m7 16.5 5-3"}),(0,$.jsx)("path",{d:"M7 16.5v5.17"}),(0,$.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,$.jsx)("path",{d:"m17 16.5-5-3"}),(0,$.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,$.jsx)("path",{d:"M17 16.5v5.17"}),(0,$.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,$.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,$.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,$.jsx)("path",{d:"M12 13.5V8"})]}),J3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,$.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,$.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,$.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,$.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),ez=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,$.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,$.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,$.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,$.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),tz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,$.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,$.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,$.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,$.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,$.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,$.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,$.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,$.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),nz=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),oz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,$.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),pg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function ST(e){let t=pg.indexOf(e);return pg[(t+1)%pg.length]}function iz(e){return e===yt.LIGHT?tz:e===yt.DARK?nz:oz}function bT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=ST(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function xT({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0,position:v}){let b=d!==void 0&&f!==void 0,S=m1(v),g=h1(v)==="right"&&h>0?{marginRight:Z3+h}:void 0,m=e===Cn.TB||e===Cn.BT,y=m?"Switch to horizontal layout":"Switch to vertical layout",x=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",_=r||s,E=u?"Fold all controllers (nothing to fold)":"Fold all controllers",C=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,$.jsx)(er,{position:v,className:"graph-toolbar-panel",style:g,children:(0,$.jsxs)("div",{className:`graph-toolbar graph-toolbar--${S}`,children:[r&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:E,"aria-label":E,children:J3}),s&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:C,"aria-label":C,children:ez}),_&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:x,"aria-label":x,children:W3}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(m?Cn.LR:Cn.TB),title:y,"aria-label":y,children:m?j3:$3}),(a||i||l)&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:F3}),i&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:K3}),l&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:Q3}),b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(ST(d)),title:bT(d),"aria-label":bT(d),children:iz(d)})]})]})})}var ai=ne(pe(),1),az={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function lz(e){return e?az[e]:{badge:"",icon:""}}function rz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function sz({data:e}){let t=lz(e.pipeType),n=rz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Ks,i=o?(e.childCount??0)-Ks:0;return(0,ai.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ai.jsxs)("div",{className:"controller-group-header",children:[(0,ai.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ai.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ai.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ai.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,ai.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var _T={controllerGroup:sz};var ET=ne(At(),1),Je=ne(pe(),1),uz={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},cz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function fz(e){return e in cz}var dz={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},mg=4;function pz(e){return uz[e]}function Kt({data:e,children:t}){let n=pz(e.pipeType),o=dz[e.status],i=e.status==="running",a=fz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,ET.useState)(!1),u=e.inputs.length>mg,c=u&&!r?e.inputs.slice(0,mg):e.inputs,d=e.inputs.length-mg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Je.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Je.jsxs)("div",{className:"pipe-card-header",children:[(0,Je.jsx)("span",{className:b,children:n}),(0,Je.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Je.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Je.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Je.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Je.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Je.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Je.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Je.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var mz={PipeLLM:Kt,PipeExtract:Kt,PipeCompose:Kt,PipeImgGen:Kt,PipeSearch:Kt,PipeFunc:Kt,PipeStructure:Kt,PipeSignature:Kt,PipeSequence:Kt,PipeParallel:Kt,PipeCondition:Kt,PipeBatch:Kt};function TT(e){return mz[e]}var li=ne(pe(),1);function hz({data:e}){let t=TT(e.pipeType)??Kt;return(0,li.jsx)(t,{data:e})}function NT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(Oa,{type:"target",position:n}),(0,li.jsx)(hz,{data:o}),(0,li.jsx)(Oa,{type:"source",position:t})]}):null}var Qt=ne(pe(),1),gz={..._T,pipeCard:NT};function yz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?Lh(n,t.concept):void 0;return(0,Qt.jsx)(Qt.Fragment,{children:l?(0,Qt.jsx)(rg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Qt.jsx)(If,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function vz(e,t){return e===no.FOLDED?new Set(t):new Set}function bz(e,t){return e??t??Ba.theme??yt.SYSTEM}function hg(e,t){return e===yt.SYSTEM?t:e}function Sz(e,t){return e??t??Ba.toolbarPosition}function Qs(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function Ws(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function CT(e){let{graphspec:t,config:n=Ba,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,toolbarPosition:s,systemTheme:u,showThemeToggle:c=!0,onThemeChange:d,onNavigateToPipe:f,onStuffNodeClick:h,onReactFlowInit:v,statusMap:b,onNodeSelect:S,onPaneClick:p,renderDetailExtra:g,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:x}=e,_=fe.default.useMemo(()=>t===null?null:Pc(t),[t]),[E,C]=fe.default.useState(()=>o??n.direction??Ba.direction??Cn.TB),A=bz(r,n.theme),[B,M]=fe.default.useState(A),z=fe.default.useRef(A);fe.default.useEffect(()=>{A!==z.current&&(z.current=A,M(A))},[A]);let I=AE(u),T=hg(B,I),D=fe.default.useRef(d);D.current=d;let N=fe.default.useRef({mode:B,resolvedTheme:T});fe.default.useEffect(()=>{let me=N.current;(me.mode!==B||me.resolvedTheme!==T)&&(N.current={mode:B,resolvedTheme:T},D.current?.(B,T))},[B,T]);let O=a??n.foldMode??Ba.foldMode??no.EXPANDED,[R,L]=fe.default.useState(()=>O===no.FOLDED?!0:i??n.showControllers??Ba.showControllers??!1),V=fe.default.useRef(O);V.current=O;let k=fe.default.useRef(null),[G,q]=fe.default.useState(null),[Z,j]=fe.default.useState(null),{width:se,isDragging:ee,handleMouseDown:X}=eT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:k});fe.default.useEffect(()=>{q(null),j(null)},[_]),fe.default.useEffect(()=>{let me=k.current;if(!me)return;let re=$f(T),ae=n.paletteColors,we=ae?{...re,...ae}:re;for(let[ye,He]of Object.entries(we))me.style.setProperty(ye,He);return()=>{for(let ye of Object.keys(we))me.style.removeProperty(ye)}},[n.paletteColors,T]);let[Q,ue,ge]=xE([]),[ie,te,Te]=_E([]),de=fe.default.useRef(null),be=fe.default.useRef(null),Le=fe.default.useRef(null),Be=fe.default.useRef(null),[dt,Gt]=fe.default.useState(new Set),hn=fe.default.useCallback(me=>{Gt(re=>{let ae=new Set(re);return ae.has(me)?ae.delete(me):ae.add(me),ae})},[]),[rt,Rn]=fe.default.useState(new Set),Wt=fe.default.useCallback((me,re)=>{Rn(ae=>{let we=new Set(ae),ye=!we.has(me),He=Le.current,wt=!re?.soloMode&&He?.graphspec&&He.analysis?cT(me,He.graphspec,He.analysis.controllerNodeIds):new Set([me]);for(let Wn of wt)ye?we.add(Wn):we.delete(Wn);return we})},[]),Jt=n.edgeType||zc.DEFAULT,St=fe.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),$e=fe.default.useRef(R);$e.current=R;let ro=fe.default.useRef(E);ro.current=E;let ri=fe.default.useRef(St);ri.current=St;let $n=fe.default.useRef(n.initialZoom);$n.current=n.initialZoom;let si=fe.default.useRef(n.panToTop);si.current=n.panToTop;let Fn=fe.default.useRef(dt);Fn.current=dt;let On=fe.default.useRef(hn);On.current=hn;let No=fe.default.useRef(rt);No.current=rt;let pt=fe.default.useRef(Wt);pt.current=Wt;let Kn=fe.default.useRef(!0),Qn=fe.default.useRef(0),Co=fe.default.useRef(!1),wo=fe.default.useRef(b);wo.current=b,fe.default.useEffect(()=>{if(!be.current)return;let me=!1;return(async()=>{try{let re=be.current;if(!re)return;let ae=await jf(re.nodes,re.edges,E,St,re._graphspec,re._analysis);if(me)return;Be.current={nodes:ae.nodes,edges:ae.edges,controllerPositions:ae.controllerPositions};let we=ar(Qs(ae.nodes),ae.edges,re._graphspec,re._analysis,$e.current,Fn.current,On.current,ae.controllerPositions,pt.current);ue(Ws(nr(lr(we.nodes)),wo.current)),te(or(we.edges)),setTimeout(()=>{!me&&de.current&&de.current.fitView({padding:.1})},50)}catch(re){console.error("[GraphViewer] ELK layout failed:",re)}})(),()=>{me=!0}},[E,St]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let me=Qs(Be.current.nodes),re=Be.current.edges,ae=ar(me,re,be.current._graphspec,be.current._analysis,R,dt,hn,Be.current.controllerPositions,Wt);ue(Ws(nr(lr(ae.nodes)),wo.current)),te(or(ae.edges))},[R,dt,hn,Wt]),fe.default.useEffect(()=>{if(!_){be.current=null,Le.current=null,Be.current=null,ue([]),te([]);return}let me=!1;Gt(new Set),Fn.current=new Set;let{graphData:re,analysis:ae}=sT(_,Jt);Le.current={nodes:re.nodes,edges:re.edges,analysis:ae,graphspec:_};let we=ae?vz(V.current,ae.controllerNodeIds):new Set;Rn(we),No.current=we,Co.current=we.size>0,Qn.current=we.size,we.size>0&&!$e.current&&(L(!0),$e.current=!0);let ye=we.size>0&&ae?sg({nodes:re.nodes,edges:re.edges},ae,_,we,pt.current):{nodes:re.nodes,edges:re.edges,analysis:ae};return be.current={nodes:ye.nodes,edges:ye.edges,_analysis:ye.analysis,_graphspec:_},(async()=>{try{let He=ro.current,wt=ri.current,zn=ye.nodes.some(xt=>!xt.position||xt.position.x===0&&xt.position.y===0)?await jf(ye.nodes,ye.edges,He,wt,_,ye.analysis):{nodes:ye.nodes,edges:ye.edges,controllerPositions:{}};if(me)return;Be.current={nodes:zn.nodes,edges:zn.edges,controllerPositions:zn.controllerPositions};let fi=ar(Qs(zn.nodes),zn.edges,_,ye.analysis,$e.current,Fn.current,On.current,zn.controllerPositions,pt.current);ue(Ws(nr(lr(fi.nodes)),wo.current)),te(or(fi.edges)),setTimeout(()=>{if(!me&&de.current&&(de.current.fitView({padding:.1}),$n.current!==void 0&&$n.current!==null&&de.current.zoomTo($n.current),si.current)){let xt=de.current.getViewport();de.current.setViewport({x:xt.x,y:20,zoom:xt.zoom})}},100)}catch(He){console.error("[GraphViewer] ELK layout failed:",He)}})(),()=>{me=!0}},[_,Jt]),fe.default.useEffect(()=>{if(Kn.current){Kn.current=!1,Qn.current=rt.size;return}if(Co.current){Co.current=!1,Qn.current=rt.size;return}let me=Qn.current;if(Qn.current=rt.size,me===0&&rt.size===0||!Le.current||!Le.current.analysis)return;let re=Le.current,ae=re.graphspec,we=re.analysis;if(!ae||!we)return;let ye=!1,He=sg({nodes:re.nodes,edges:re.edges},we,ae,rt,Wt);return be.current={nodes:He.nodes,edges:He.edges,_analysis:He.analysis,_graphspec:ae},(async()=>{try{let wt=await jf(He.nodes,He.edges,ro.current,ri.current,ae,He.analysis);if(ye)return;Be.current={nodes:wt.nodes,edges:wt.edges,controllerPositions:wt.controllerPositions};let Wn=ar(Qs(wt.nodes),wt.edges,ae,He.analysis,$e.current,Fn.current,On.current,wt.controllerPositions,pt.current);ue(Ws(nr(lr(Wn.nodes)),wo.current)),te(or(Wn.edges)),setTimeout(()=>{!ye&&de.current&&de.current.fitView({padding:.1})},50)}catch(wt){console.error("[GraphViewer] ELK layout failed:",wt)}})(),()=>{ye=!0}},[rt,Wt]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let me=Qs(Be.current.nodes),re=Be.current.edges,ae=ar(me,re,be.current._graphspec,be.current._analysis,$e.current,Fn.current,On.current,Be.current.controllerPositions,pt.current);ue(Ws(nr(lr(ae.nodes)),b)),te(or(ae.edges))},[b]);let ui=fe.default.useCallback((me,re)=>{let ae=re.data;if(S?.(re.id,ae,me),ae.isController||ae.isPipe){let we=ae.pipeCode||ae.labelText;we&&f&&f(we,ae.pipeCardData?.status)}else if(ae.isStuff&&h&&_){let we=ps(re.id),ye=Hh(_,we);ye&&h(ye)}if(j(null),G?.nodeId===re.id&&!Z)q(null);else if(ae.isPipe||ae.isController)q({kind:"pipe",nodeId:re.id,nodeData:ae});else if(ae.isStuff&&_){let we=ps(re.id),ye=Hh(_,we);q({kind:"stuff",nodeId:re.id,nodeData:ae,stuffData:ye??void 0})}ue(we=>we.map(ye=>({...ye,selected:ye.id===re.id})))},[ue,f,S,h,_,G,Z]),ci=fe.default.useCallback(me=>{de.current=me,v&&v(me)},[v]),ka=fe.default.useCallback(()=>{q(null),j(null),p?.()},[p]),Ao=fe.default.useCallback(me=>{if(!_)return;let re=Lh(_,me);re&&j(re)},[_]),Ga=G?.kind==="pipe"&&_?_.nodes.find(me=>me.pipe_code===G.nodeData.pipeCode):void 0,Ua=G!==null||Z!==null,We=Sz(s,n.toolbarPosition),Do=Le.current?.analysis?.controllerNodeIds,Ro=fe.default.useMemo(()=>!R||!Do||Do.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>Rn(new Set(Do)),onExpandAll:()=>Rn(new Set),foldAllDisabled:rt.size===Do.size,expandAllDisabled:rt.size===0},[R,Do,rt]);return(0,Qt.jsxs)("div",{ref:k,className:`react-flow-container react-flow-container--theme-${T} react-flow-container--mode-${B}`,children:[(0,Qt.jsxs)(SE,{nodes:Q,edges:ie,nodeTypes:gz,onNodesChange:ge,onEdgesChange:Te,onNodeClick:ui,onPaneClick:ka,onInit:ci,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:Jt},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:[(0,Qt.jsx)(TE,{variant:xo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"}),!l&&(0,Qt.jsx)(xT,{direction:E,onDirectionChange:C,showControllers:R,onShowControllersChange:L,onZoomIn:()=>{de.current?.zoomIn()},onZoomOut:()=>{de.current?.zoomOut()},onFitView:()=>{de.current?.fitView({padding:.1})},onFoldAll:Ro.onFoldAll,onExpandAll:Ro.onExpandAll,foldAllDisabled:Ro.foldAllDisabled,expandAllDisabled:Ro.expandAllDisabled,themeMode:c?B:void 0,onThemeModeChange:c?M:void 0,rightOffset:Ua?se:0,position:We})]}),(0,Qt.jsxs)(JE,{isOpen:Ua,onClose:ka,width:se,isDragging:ee,onResizeHandleMouseDown:X,children:[Z?(0,Qt.jsx)(rg,{concept:Z}):Ga&&_?(0,Qt.jsx)(rT,{node:Ga,spec:_,onConceptClick:Ao}):G?.stuffData?(0,Qt.jsx)(yz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:_,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:x}):null,g&&G&&!Z&&g(G.nodeId,G.nodeData)]})]})}function xz(e){if(e==null)return no.EXPANDED;if(e===no.FOLDED||e===no.EXPANDED||e===no.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function _z(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function Ez(e){if(e==null)return Cn.LR;if(e===Cn.LR||e===Cn.RL||e===Cn.TB||e===Cn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Tz(e){if(e==null)return;let t=Object.values(un);if(t.includes(e))return e;throw new Error(`Invalid toolbarPosition in standalone config: ${JSON.stringify(e)} \u2014 expected one of ${t.map(n=>`"${n}"`).join(", ")}.`)}function gg(e,t){let n=e&&typeof e=="object"?e:{},o=Ez(n.direction),i=!!n.showControllers,a=xz(n.foldMode),l=_z(n.theme),r=Tz(n.toolbarPosition);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l,toolbarPosition:r},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function wT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Js=gg({},null),yg=null;function AT(e){return wT(document.getElementById(e)?.textContent,e)}function Nz(e,t){let n=$f(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function RT(e,t){document.body.setAttribute("data-theme",e),Nz(t,Js.config.paletteColors)}function Cz(){return Pa.default.createElement(CT,{...Js,onThemeChange:(e,t)=>{RT(e,t)}})}function wz({message:e}){return Pa.default.createElement("div",{className:"standalone-error",role:"alert"},Pa.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Pa.default.createElement("pre",{className:"standalone-error-message"},e))}function MT(){let e=document.getElementById("root");if(!e)return;let t=(0,DT.createRoot)(e);yg=()=>{t.render(Pa.default.createElement(Cz))},yg(),setTimeout(()=>{try{let n=AT("pipelex-config"),o=AT("pipelex-graphspec"),i=o===null?null:Pc(o);Js=gg(n,i),RT(Js.theme,hg(Js.theme,zh())),yg?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Pa.default.createElement(wz,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",MT):MT();})();
14
+ `)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,k.useEffect)(()=>{let s=t?.target??z_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=p=>{if(i.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!i.current||i.current&&!u)&&xh(p))return!1;let b=B_(p.code,l);if(a.current.add(p[b]),L_(r,a.current,!1)){let x=p.composedPath?.()?.[0]||p.target,g=x?.nodeName==="BUTTON"||x?.nodeName==="A";t.preventDefault!==!1&&(i.current||!g)&&p.preventDefault(),o(!0)}},d=p=>{let v=B_(p.code,l);L_(r,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(p[v]),p.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function L_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function B_(e,t){return t.includes(e)?"code":"key"}var YD=()=>{let e=Qe();return(0,k.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:r}=e.getState();return r?(await r.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:r,panZoom:l}=e.getState(),s=Zs(t,o,i,a,r,n?.padding??.1);return l?(await l.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:r}=e.getState();if(!r)return t;let{x:l,y:s}=r.getBoundingClientRect(),u={x:t.x-l,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return il(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),r=Xs(t,n);return{x:r.x+i,y:r.y+a}}}),[])};function nE(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let r=o.get(a.id);r?r.push(a):o.set(a.id,[a])}for(let a of t){let r=o.get(a.id);if(!r){n.push(a);continue}if(r[0].type==="remove")continue;if(r[0].type==="replace"){n.push({...r[0].item});continue}let l={...a};for(let s of r)XD(s,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function XD(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function oE(e,t){return nE(e,t)}function iE(e,t){return nE(e,t)}function Ba(e,t){return{id:e,type:"select",selected:t}}function ll(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let r=t.has(i);!(a.selected===void 0&&!r)&&a.selected!==r&&(n&&(a.selected=r),o.push(Ba(a.id,r)))}return o}function P_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let r=t.get(a.id),l=r?.internals?.userNode??r;l!==void 0&&l!==a&&n.push({id:a.id,item:a,type:"replace"}),l===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function H_(e){return{id:e.id,type:"remove"}}var k_=e=>Gx(e),qD=e=>ch(e);function aE(e){return(0,k.forwardRef)(e)}var ZD=typeof window<"u"?k.useLayoutEffect:k.useEffect;function G_(e){let[t,n]=(0,k.useState)(BigInt(0)),[o]=(0,k.useState)(()=>jD(()=>n(i=>i+BigInt(1))));return ZD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function jD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var rE=(0,k.createContext)(null);function $D({children:e}){let t=Qe(),n=(0,k.useCallback)(l=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:p,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let g of l)b=typeof g=="function"?g(b):g;let x=P_({items:b,lookup:f});for(let g of v.values())x=g(x);c&&u(b),x.length>0?d?.(x):p&&window.requestAnimationFrame(()=>{let{fitViewQueued:g,nodes:h,setNodes:m}=t.getState();g&&m(h)})},[]),o=G_(n),i=(0,k.useCallback)(l=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),p=s;for(let v of l)p=typeof v=="function"?v(p):v;c?u(p):d&&d(P_({items:p,lookup:f}))},[]),a=G_(i),r=(0,k.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,P.jsx)(rE.Provider,{value:r,children:e})}function FD(){let e=(0,k.useContext)(rE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var KD=e=>!!e.panZoom;function Bh(){let e=YD(),t=Qe(),n=FD(),o=Ce(KD),i=(0,k.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),r=d=>{n.nodeQueue.push(d)},l=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:p}=t.getState(),v=k_(d)?d:f.get(d.id),b=v.parentId?vh(v.position,v.measured,v.parentId,f,p):v.position,x={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return La(x)},u=(d,f,p={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let x=typeof f=="function"?f(b):f;return p.replace&&k_(x)?x:{...b,...x}}return b}))},c=(d,f,p={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let x=typeof f=="function"?f(b):f;return p.replace&&qD(x)?x:{...b,...x}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:r,setEdges:l,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(p=>[...p,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(p=>[...p,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:p}=t.getState(),[v,b,x]=p;return{nodes:d.map(g=>({...g})),edges:f.map(g=>({...g})),viewport:{x:v,y:b,zoom:x}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:p,edges:v,onNodesDelete:b,onEdgesDelete:x,triggerNodeChanges:g,triggerEdgeChanges:h,onDelete:m,onBeforeDelete:y}=t.getState(),{nodes:S,edges:E}=await Vx({nodesToRemove:d,edgesToRemove:f,nodes:p,edges:v,onBeforeDelete:y}),_=E.length>0,w=S.length>0;if(_){let C=E.map(H_);x?.(E),h(C)}if(w){let C=S.map(H_);b?.(S),g(C)}return(w||_)&&m?.({nodes:S,edges:E}),{deletedNodes:S,deletedEdges:E}},getIntersectingNodes:(d,f=!0,p)=>{let v=hh(d),b=v?d:s(d),x=p!==void 0;return b?(p||t.getState().nodes).filter(g=>{let h=t.getState().nodeLookup.get(g.id);if(h&&!v&&(g.id===d.id||!h.internals.positionAbsolute))return!1;let m=La(x?g:h),y=nl(m,b);return f&&y>0||y>=m.width*m.height||y>=b.width*b.height}):[]},isNodeIntersecting:(d,f,p=!0)=>{let b=hh(d)?d:s(d);if(!b)return!1;let x=nl(b,f);return p&&x>0||x>=f.width*f.height||x>=b.width*b.height},updateNode:u,updateNodeData:(d,f,p={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return p.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},p)},updateEdge:c,updateEdgeData:(d,f,p={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return p.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},p)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:p}=t.getState();return dh(d,{nodeLookup:f,nodeOrigin:p})},getHandleConnections:({type:d,id:f,nodeId:p})=>Array.from(t.getState().connectionLookup.get(`${p}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:p})=>Array.from(t.getState().connectionLookup.get(`${p}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??qx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(p=>[...p]),f.promise}}},[]);return(0,k.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var I_=e=>e.selected,QD=typeof window<"u"?window:void 0;function WD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Bh(),i=$s(e,{actInsideInputWithModifier:!1}),a=$s(t,{target:QD});(0,k.useEffect)(()=>{if(i){let{edges:r,nodes:l}=n.getState();o({nodes:l.filter(I_),edges:r.filter(I_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,k.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function JD(e){let t=Qe();(0,k.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=Ef(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",An.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var Hf={position:"absolute",width:"100%",height:"100%",top:0,left:0},eR=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function tR({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ai.Free,zoomOnDoubleClick:r=!0,panOnDrag:l=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:p=!0,children:v,noWheelClassName:b,noPanClassName:x,onViewportChange:g,isControlledViewport:h,paneClickDistance:m,selectionOnDrag:y}){let S=Qe(),E=(0,k.useRef)(null),{userSelectionActive:_,lib:w,connectionInProgress:C}=Ce(eR,je),B=$s(f),M=(0,k.useRef)();JD(E);let z=(0,k.useCallback)(I=>{g?.({x:I[0],y:I[1],zoom:I[2]}),h||S.setState({transform:I})},[g,h]);return(0,k.useEffect)(()=>{if(E.current){M.current=f_({domNode:E.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:A=>S.setState(R=>R.paneDragging===A?R:{paneDragging:A}),onPanZoomStart:(A,R)=>{let{onViewportChangeStart:O,onMoveStart:L}=S.getState();L?.(A,R),O?.(R)},onPanZoom:(A,R)=>{let{onViewportChange:O,onMove:L}=S.getState();L?.(A,R),O?.(R)},onPanZoomEnd:(A,R)=>{let{onViewportChangeEnd:O,onMoveEnd:L}=S.getState();L?.(A,R),O?.(R)}});let{x:I,y:T,zoom:D}=M.current.getViewport();return S.setState({panZoom:M.current,transform:[I,T,D],domNode:E.current.closest(".react-flow")}),()=>{M.current?.destroy()}}},[]),(0,k.useEffect)(()=>{M.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:r,panOnDrag:l,zoomActivationKeyPressed:B,preventScrolling:p,noPanClassName:x,userSelectionActive:_,noWheelClassName:b,lib:w,onTransformChange:z,connectionInProgress:C,selectionOnDrag:y,paneClickDistance:m})},[e,t,n,o,i,a,r,l,B,p,x,_,b,w,z,C,y,m]),(0,P.jsx)("div",{className:"react-flow__renderer",ref:E,style:Hf,children:v})}var nR=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function oR(){let{userSelectionActive:e,userSelectionRect:t}=Ce(nR,je);return e&&t?(0,P.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Oh=(e,t)=>n=>{n.target===t.current&&e?.(n)},iR=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function aR({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Oa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:r,onSelectionEnd:l,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:p,children:v}){let b=Qe(),{userSelectionActive:x,elementsSelectable:g,dragging:h,connectionInProgress:m}=Ce(iR,je),y=g&&(e||x),S=(0,k.useRef)(null),E=(0,k.useRef)(),_=(0,k.useRef)(new Set),w=(0,k.useRef)(new Set),C=(0,k.useRef)(!1),B=O=>{if(C.current||m){C.current=!1;return}s?.(O),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},M=O=>{if(Array.isArray(o)&&o?.includes(2)){O.preventDefault();return}u?.(O)},z=c?O=>c(O):void 0,I=O=>{C.current&&(O.stopPropagation(),C.current=!1)},T=O=>{let{domNode:L}=b.getState();if(E.current=L?.getBoundingClientRect(),!E.current)return;let Y=O.target===S.current;if(!Y&&!!O.target.closest(".nokey")||!e||!(a&&Y||t)||O.button!==0||!O.isPrimary)return;O.target?.setPointerCapture?.(O.pointerId),C.current=!1;let{x:F,y:K}=jn(O.nativeEvent,E.current);b.setState({userSelectionRect:{width:0,height:0,startX:F,startY:K,x:F,y:K}}),Y||(O.stopPropagation(),O.preventDefault())},D=O=>{let{userSelectionRect:L,transform:Y,nodeLookup:G,edgeLookup:X,connectionLookup:F,triggerNodeChanges:K,triggerEdgeChanges:$,defaultEdgeOptions:le,resetSelectedElements:W}=b.getState();if(!E.current||!L)return;let{x:j,y:te}=jn(O.nativeEvent,E.current),{startX:ge,startY:me}=L;if(!C.current){let _e=t?0:i;if(Math.hypot(j-ge,te-me)<=_e)return;W(),r?.(O)}C.current=!0;let re={startX:ge,startY:me,x:j<ge?j:ge,y:te<me?te:me,width:Math.abs(j-ge),height:Math.abs(te-me)},Q=_.current,xe=w.current;_.current=new Set(Sf(G,re,Y,n===Oa.Partial,!0).map(_e=>_e.id)),w.current=new Set;let Ne=le?.selectable??!0;for(let _e of _.current){let et=F.get(_e);if(et)for(let{edgeId:De}of et.values()){let we=X.get(De);we&&(we.selectable??Ne)&&w.current.add(De)}}if(!bh(Q,_.current)){let _e=ll(G,_.current,!0);K(_e)}if(!bh(xe,w.current)){let _e=ll(X,w.current);$(_e)}b.setState({userSelectionRect:re,userSelectionActive:!0,nodesSelectionActive:!1})},A=O=>{O.button===0&&(O.target?.releasePointerCapture?.(O.pointerId),!x&&O.target===S.current&&b.getState().userSelectionRect&&B?.(O),b.setState({userSelectionActive:!1,userSelectionRect:null}),C.current&&(l?.(O),b.setState({nodesSelectionActive:_.current.size>0})))},R=o===!0||Array.isArray(o)&&o.includes(0);return(0,P.jsxs)("div",{className:rt(["react-flow__pane",{draggable:R,dragging:h,selection:e}]),onClick:y?void 0:Oh(B,S),onContextMenu:Oh(M,S),onWheel:Oh(z,S),onPointerEnter:y?void 0:d,onPointerMove:y?D:f,onPointerUp:y?A:void 0,onPointerDownCapture:y?T:void 0,onClickCapture:y?I:void 0,onPointerLeave:p,ref:S,style:Hf,children:[v,(0,P.jsx)(oR,{})]})}function Lh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:r,nodeLookup:l,onError:s}=t.getState(),u=l.get(e);if(!u){s?.("012",An.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&r)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function lE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:r}){let l=Qe(),[s,u]=(0,k.useState)(!1),c=(0,k.useRef)();return(0,k.useEffect)(()=>{c.current=o_({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{Lh({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,k.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:r}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,r]),s}var rR=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function sE(){let e=Qe();return(0,k.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:r,onError:l,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=rR(r),p=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*p*n.factor,x=n.direction.y*v*n.factor;for(let[,g]of u){if(!f(g))continue;let h={x:g.internals.positionAbsolute.x+b,y:g.internals.positionAbsolute.y+x};i&&(h=ol(h,a));let{position:m,positionAbsolute:y}=ph({nodeId:g.id,nextPosition:h,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:l});g.position=m,g.internals.positionAbsolute=y,d.set(g.id,g)}s(d)},[])}var Ph=(0,k.createContext)(null),lR=Ph.Provider;Ph.Consumer;var uE=()=>(0,k.useContext)(Ph),sR=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),uR=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:r}=o,{fromHandle:l,toHandle:s,isValid:u}=r,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===$i.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:c&&u}};function cR({type:e="source",position:t=ne.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:r,onConnect:l,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},p){let v=r||null,b=e==="target",x=Qe(),g=uE(),{connectOnClick:h,noPanClassName:m,rfId:y}=Ce(sR,je),{connectingFrom:S,connectingTo:E,clickConnecting:_,isPossibleEndHandle:w,connectionInProcess:C,clickConnectionInProcess:B,valid:M}=Ce(uR(g,v,e),je);g||x.getState().onError?.("010",An.error010());let z=D=>{let{defaultEdgeOptions:A,onConnect:R,hasDefaultEdges:O}=x.getState(),L={...A,...D};if(O){let{edges:Y,setEdges:G}=x.getState();G(Th(L,Y))}R?.(L),l?.(L)},I=D=>{if(!g)return;let A=_h(D.nativeEvent);if(i&&(A&&D.button===0||!A)){let R=x.getState();Df.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:b,handleId:v,nodeId:g,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...O)=>x.getState().onConnectEnd?.(...O),updateConnection:R.updateConnection,onConnect:z,isValidConnection:n||((...O)=>x.getState().isValidConnection?.(...O)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}A?c?.(D):d?.(D)},T=D=>{let{onClickConnectStart:A,onClickConnectEnd:R,connectionClickStartHandle:O,connectionMode:L,isValidConnection:Y,lib:G,rfId:X,nodeLookup:F,connection:K}=x.getState();if(!g||!O&&!i)return;if(!O){A?.(D.nativeEvent,{nodeId:g,handleId:v,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:g,type:e,id:v}});return}let $=Sh(D.target),le=n||Y,{connection:W,isValid:j}=Df.isValid(D.nativeEvent,{handle:{nodeId:g,id:v,type:e},connectionMode:L,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:le,flowId:X,doc:$,lib:G,nodeLookup:F});j&&W&&z(W);let te=structuredClone(K);delete te.inProgress,te.toPosition=te.toHandle?te.toHandle.position:null,R?.(D,te),x.setState({connectionClickStartHandle:null})};return(0,P.jsx)("div",{"data-handleid":v,"data-nodeid":g,"data-handlepos":t,"data-id":`${y}-${g}-${v}-${e}`,className:rt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:_,connectingfrom:S,connectingto:E,valid:M,connectionindicator:o&&(!C||w)&&(C||B?a:i)}]),onMouseDown:I,onTouchStart:I,onClick:h?T:void 0,ref:p,...f,children:s})}var Pa=(0,k.memo)(aE(cR));function fR({data:e,isConnectable:t,sourcePosition:n=ne.Bottom}){return(0,P.jsxs)(P.Fragment,{children:[e?.label,(0,P.jsx)(Pa,{type:"source",position:n,isConnectable:t})]})}function dR({data:e,isConnectable:t,targetPosition:n=ne.Top,sourcePosition:o=ne.Bottom}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Pa,{type:"target",position:n,isConnectable:t}),e?.label,(0,P.jsx)(Pa,{type:"source",position:o,isConnectable:t})]})}function pR(){return null}function mR({data:e,isConnectable:t,targetPosition:n=ne.Top}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Pa,{type:"target",position:n,isConnectable:t}),e?.label]})}var Bf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},U_={input:fR,default:dR,output:mR,group:pR};function hR(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var gR=e=>{let{width:t,height:n,x:o,y:i}=tl(e.nodeLookup,{filter:a=>!!a.selected});return{width:Zn(t)?t:null,height:Zn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function yR({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:r,userSelectionActive:l}=Ce(gR,je),s=sE(),u=(0,k.useRef)(null);(0,k.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!l&&i!==null&&a!==null;if(lE({nodeRef:u,disabled:!c}),!c)return null;let d=e?p=>{let v=o.getState().nodes.filter(b=>b.selected);e(p,v)}:void 0,f=p=>{Object.prototype.hasOwnProperty.call(Bf,p.key)&&(p.preventDefault(),s({direction:Bf[p.key],factor:p.shiftKey?4:1}))};return(0,P.jsx)("div",{className:rt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:r},children:(0,P.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var V_=typeof window<"u"?window:void 0,vR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function cE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:r,paneClickDistance:l,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:x,elementsSelectable:g,zoomOnScroll:h,zoomOnPinch:m,panOnScroll:y,panOnScrollSpeed:S,panOnScrollMode:E,zoomOnDoubleClick:_,panOnDrag:w,defaultViewport:C,translateExtent:B,minZoom:M,maxZoom:z,preventScrolling:I,onSelectionContextMenu:T,noWheelClassName:D,noPanClassName:A,disableKeyboardA11y:R,onViewportChange:O,isControlledViewport:L}){let{nodesSelectionActive:Y,userSelectionActive:G}=Ce(vR,je),X=$s(u,{target:V_}),F=$s(b,{target:V_}),K=F||w,$=F||y,le=c&&K!==!0,W=X||G||le;return WD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,P.jsx)(tR,{onPaneContextMenu:a,elementsSelectable:g,zoomOnScroll:h,zoomOnPinch:m,panOnScroll:$,panOnScrollSpeed:S,panOnScrollMode:E,zoomOnDoubleClick:_,panOnDrag:!X&&K,defaultViewport:C,translateExtent:B,minZoom:M,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:I,noWheelClassName:D,noPanClassName:A,onViewportChange:O,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:le,children:(0,P.jsxs)(aR,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:r,panOnDrag:K,isSelecting:!!W,selectionMode:d,selectionKeyPressed:X,paneClickDistance:l,selectionOnDrag:le,children:[e,Y&&(0,P.jsx)(yR,{onSelectionContextMenu:T,noPanClassName:A,disableKeyboardA11y:R})]})})}cE.displayName="FlowRenderer";var bR=(0,k.memo)(cE),SR=e=>t=>e?Sf(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function xR(e){return Ce((0,k.useCallback)(SR(e),[e]),je)}var _R=e=>e.updateNodeInternals;function ER(){let e=Ce(_R),[t]=(0,k.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,k.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function TR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,k.useRef)(null),r=(0,k.useRef)(null),l=(0,k.useRef)(e.sourcePosition),s=(0,k.useRef)(e.targetPosition),u=(0,k.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,k.useEffect)(()=>{a.current&&!e.hidden&&(!c||r.current!==a.current)&&(r.current&&o?.unobserve(r.current),o?.observe(a.current),r.current=a.current)},[c,e.hidden]),(0,k.useEffect)(()=>()=>{r.current&&(o?.unobserve(r.current),r.current=null)},[]),(0,k.useEffect)(()=>{if(a.current){let d=u.current!==t,f=l.current!==e.sourcePosition,p=s.current!==e.targetPosition;(d||f||p)&&(u.current=t,l.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function NR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:r,nodesDraggable:l,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:v,rfId:b,nodeTypes:x,nodeClickDistance:g,onError:h}){let{node:m,internals:y,isParent:S}=Ce(j=>{let te=j.nodeLookup.get(e),ge=j.parentLookup.has(e);return{node:te,internals:te.internals,isParent:ge}},je),E=m.type||"default",_=x?.[E]||U_[E];_===void 0&&(h?.("003",An.error003(E)),E="default",_=x?.default||U_.default);let w=!!(m.draggable||l&&typeof m.draggable>"u"),C=!!(m.selectable||s&&typeof m.selectable>"u"),B=!!(m.connectable||u&&typeof m.connectable>"u"),M=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),I=yh(m),T=TR({node:m,nodeType:E,hasDimensions:I,resizeObserver:d}),D=lE({nodeRef:T,disabled:m.hidden||!w,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:C,nodeClickDistance:g}),A=sE();if(m.hidden)return null;let R=wo(m),O=hR(m),L=C||w||t||n||o||i,Y=n?j=>n(j,{...y.userNode}):void 0,G=o?j=>o(j,{...y.userNode}):void 0,X=i?j=>i(j,{...y.userNode}):void 0,F=a?j=>a(j,{...y.userNode}):void 0,K=r?j=>r(j,{...y.userNode}):void 0,$=j=>{let{selectNodesOnDrag:te,nodeDragThreshold:ge}=z.getState();C&&(!te||!w||ge>0)&&Lh({id:e,store:z,nodeRef:T}),t&&t(j,{...y.userNode})},le=j=>{if(!(xh(j.nativeEvent)||v)){if(rh.includes(j.key)&&C){let te=j.key==="Escape";Lh({id:e,store:z,unselect:te,nodeRef:T})}else if(w&&m.selected&&Object.prototype.hasOwnProperty.call(Bf,j.key)){j.preventDefault();let{ariaLabelConfig:te}=z.getState();z.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:j.key.replace("Arrow","").toLowerCase(),x:~~y.positionAbsolute.x,y:~~y.positionAbsolute.y})}),A({direction:Bf[j.key],factor:j.shiftKey?4:1})}}},W=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:j,width:te,height:ge,autoPanOnNodeFocus:me,setCenter:re}=z.getState();if(!me)return;Sf(new Map([[e,m]]),{x:0,y:0,width:te,height:ge},j,!0).length>0||re(m.position.x+R.width/2,m.position.y+R.height/2,{zoom:j[2]})};return(0,P.jsx)("div",{className:rt(["react-flow__node",`react-flow__node-${E}`,{[p]:w},m.className,{selected:m.selected,selectable:C,parent:S,draggable:w,dragging:D}]),ref:T,style:{zIndex:y.z,transform:`translate(${y.positionAbsolute.x}px,${y.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:I?"visible":"hidden",...m.style,...O},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Y,onMouseMove:G,onMouseLeave:X,onContextMenu:F,onClick:$,onDoubleClick:K,onKeyDown:M?le:void 0,tabIndex:M?0:void 0,onFocus:M?W:void 0,role:m.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${J_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,P.jsx)(lR,{value:e,children:(0,P.jsx)(_,{id:e,data:m.data,type:E,positionAbsoluteX:y.positionAbsolute.x,positionAbsoluteY:y.positionAbsolute.y,selected:m.selected??!1,selectable:C,draggable:w,deletable:m.deletable??!0,isConnectable:B,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:D,dragHandle:m.dragHandle,zIndex:y.z,parentId:m.parentId,...R})})})}var CR=(0,k.memo)(NR),wR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function fE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ce(wR,je),r=xR(e.onlyRenderVisibleElements),l=ER();return(0,P.jsx)("div",{className:"react-flow__nodes",style:Hf,children:r.map(s=>(0,P.jsx)(CR,{id:s,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}fE.displayName="NodeRenderer";var AR=(0,k.memo)(fE);function MR(e){return Ce((0,k.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),r=n.nodeLookup.get(i.target);a&&r&&$x({sourceNode:a,targetNode:r,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var DR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,P.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},RR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,P.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Y_={[Qr.Arrow]:DR,[Qr.ArrowClosed]:RR};function OR(e){let t=Qe();return(0,k.useMemo)(()=>Object.prototype.hasOwnProperty.call(Y_,e)?Y_[e]:(t.getState().onError?.("009",An.error009(e)),null),[e])}var zR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:r,orient:l="auto-start-reverse"})=>{let s=OR(t);return s?(0,P.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:(0,P.jsx)(s,{color:n,strokeWidth:r})}):null},dE=({defaultColor:e,rfId:t})=>{let n=Ce(a=>a.edges),o=Ce(a=>a.defaultEdgeOptions),i=(0,k.useMemo)(()=>Kx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,P.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,P.jsx)("defs",{children:i.map(a=>(0,P.jsx)(zR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};dE.displayName="MarkerDefinitions";var LR=(0,k.memo)(dE);function pE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:r=[2,4],labelBgBorderRadius:l=2,children:s,className:u,...c}){let[d,f]=(0,k.useState)({x:1,y:0,width:0,height:0}),p=rt(["react-flow__edge-textwrapper",u]),v=(0,k.useRef)(null);return(0,k.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,P.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,P.jsx)("rect",{width:d.width+2*r[0],x:-r[0],y:-r[1],height:d.height+2*r[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),(0,P.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}pE.displayName="EdgeText";var BR=(0,k.memo)(pE);function kf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:r,labelBgPadding:l,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("path",{...c,d:e,fill:"none",className:rt(["react-flow__edge-path",c.className])}),u?(0,P.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Zn(t)&&Zn(n)?(0,P.jsx)(BR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:r,labelBgPadding:l,labelBgBorderRadius:s}):null]})}function X_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===ne.Left||e===ne.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function mE({sourceX:e,sourceY:t,sourcePosition:n=ne.Bottom,targetX:o,targetY:i,targetPosition:a=ne.Top}){let[r,l]=X_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=X_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,p]=Tf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:l,targetControlX:s,targetControlY:u});return[`M${e},${t} C${r},${l} ${s},${u} ${o},${i}`,c,d,f,p]}function hE(e){return(0,k.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:r,targetPosition:l,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:v,markerEnd:b,markerStart:x,interactionWidth:g})=>{let[h,m,y]=mE({sourceX:n,sourceY:o,sourcePosition:r,targetX:i,targetY:a,targetPosition:l}),S=e.isInternal?void 0:t;return(0,P.jsx)(kf,{id:S,path:h,labelX:m,labelY:y,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:v,markerEnd:b,markerStart:x,interactionWidth:g})})}var PR=hE({isInternal:!1}),gE=hE({isInternal:!0});PR.displayName="SimpleBezierEdge";gE.displayName="SimpleBezierEdgeInternal";function yE(e){return(0,k.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:r,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:p=ne.Bottom,targetPosition:v=ne.Top,markerEnd:b,markerStart:x,pathOptions:g,interactionWidth:h})=>{let[m,y,S]=js({sourceX:n,sourceY:o,sourcePosition:p,targetX:i,targetY:a,targetPosition:v,borderRadius:g?.borderRadius,offset:g?.offset,stepPosition:g?.stepPosition}),E=e.isInternal?void 0:t;return(0,P.jsx)(kf,{id:E,path:m,labelX:y,labelY:S,label:r,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:x,interactionWidth:h})})}var vE=yE({isInternal:!1}),bE=yE({isInternal:!0});vE.displayName="SmoothStepEdge";bE.displayName="SmoothStepEdgeInternal";function SE(e){return(0,k.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,P.jsx)(vE,{...n,id:o,pathOptions:(0,k.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var HR=SE({isInternal:!1}),xE=SE({isInternal:!0});HR.displayName="StepEdge";xE.displayName="StepEdgeInternal";function _E(e){return(0,k.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:r,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:v,interactionWidth:b})=>{let[x,g,h]=Cf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,P.jsx)(kf,{id:m,path:x,labelX:g,labelY:h,label:r,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:v,interactionWidth:b})})}var kR=_E({isInternal:!1}),EE=_E({isInternal:!0});kR.displayName="StraightEdge";EE.displayName="StraightEdgeInternal";function TE(e){return(0,k.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:r=ne.Bottom,targetPosition:l=ne.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:v,markerEnd:b,markerStart:x,pathOptions:g,interactionWidth:h})=>{let[m,y,S]=Nf({sourceX:n,sourceY:o,sourcePosition:r,targetX:i,targetY:a,targetPosition:l,curvature:g?.curvature}),E=e.isInternal?void 0:t;return(0,P.jsx)(kf,{id:E,path:m,labelX:y,labelY:S,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:v,markerEnd:b,markerStart:x,interactionWidth:h})})}var GR=TE({isInternal:!1}),NE=TE({isInternal:!0});GR.displayName="BezierEdge";NE.displayName="BezierEdgeInternal";var q_={default:NE,straight:EE,step:xE,smoothstep:bE,simplebezier:gE},Z_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},IR=(e,t,n)=>n===ne.Left?e-t:n===ne.Right?e+t:e,UR=(e,t,n)=>n===ne.Top?e-t:n===ne.Bottom?e+t:e,j_="react-flow__edgeupdater";function $_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:r,type:l}){return(0,P.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:r,className:rt([j_,`${j_}-${l}`]),cx:IR(t,o,e),cy:UR(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function VR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:r,sourcePosition:l,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let v=Qe(),b=(y,S)=>{if(y.button!==0)return;let{autoPanOnConnect:E,domNode:_,connectionMode:w,connectionRadius:C,lib:B,onConnectStart:M,cancelConnection:z,nodeLookup:I,rfId:T,panBy:D,updateConnection:A}=v.getState(),R=S.type==="target",O=(G,X)=>{f(!1),d?.(G,n,S.type,X)},L=G=>u?.(n,G),Y=(G,X)=>{f(!0),c?.(y,n,S.type),M?.(G,X)};Df.onPointerDown(y.nativeEvent,{autoPanOnConnect:E,connectionMode:w,connectionRadius:C,domNode:_,handleId:S.id,nodeId:S.nodeId,nodeLookup:I,isTarget:R,edgeUpdaterType:S.type,lib:B,flowId:T,cancelConnection:z,panBy:D,isValidConnection:(...G)=>v.getState().isValidConnection?.(...G)??!0,onConnect:L,onConnectStart:Y,onConnectEnd:(...G)=>v.getState().onConnectEnd?.(...G),onReconnectEnd:O,updateConnection:A,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:y.currentTarget})},x=y=>b(y,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=y=>b(y,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),h=()=>p(!0),m=()=>p(!1);return(0,P.jsxs)(P.Fragment,{children:[(e===!0||e==="source")&&(0,P.jsx)($_,{position:l,centerX:o,centerY:i,radius:t,onMouseDown:x,onMouseEnter:h,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,P.jsx)($_,{position:s,centerX:a,centerY:r,radius:t,onMouseDown:g,onMouseEnter:h,onMouseOut:m,type:"target"})]})}function YR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:r,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:v,edgeTypes:b,noPanClassName:x,onError:g,disableKeyboardA11y:h}){let m=Ce(re=>re.edgeLookup.get(e)),y=Ce(re=>re.defaultEdgeOptions);m=y?{...y,...m}:m;let S=m.type||"default",E=b?.[S]||q_[S];E===void 0&&(g?.("011",An.error011(S)),S="default",E=b?.default||q_.default);let _=!!(m.focusable||t&&typeof m.focusable>"u"),w=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),C=!!(m.selectable||o&&typeof m.selectable>"u"),B=(0,k.useRef)(null),[M,z]=(0,k.useState)(!1),[I,T]=(0,k.useState)(!1),D=Qe(),{zIndex:A,sourceX:R,sourceY:O,targetX:L,targetY:Y,sourcePosition:G,targetPosition:X}=Ce((0,k.useCallback)(re=>{let Q=re.nodeLookup.get(m.source),xe=re.nodeLookup.get(m.target);if(!Q||!xe)return{zIndex:m.zIndex,...Z_};let Ne=Fx({id:e,sourceNode:Q,targetNode:xe,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:re.connectionMode,onError:g});return{zIndex:jx({selected:m.selected,zIndex:m.zIndex,sourceNode:Q,targetNode:xe,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode}),...Ne||Z_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),F=(0,k.useMemo)(()=>m.markerStart?`url('#${wf(m.markerStart,v)}')`:void 0,[m.markerStart,v]),K=(0,k.useMemo)(()=>m.markerEnd?`url('#${wf(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||R===null||O===null||L===null||Y===null)return null;let $=re=>{let{addSelectedEdges:Q,unselectNodesAndEdges:xe,multiSelectionActive:Ne}=D.getState();C&&(D.setState({nodesSelectionActive:!1}),m.selected&&Ne?(xe({nodes:[],edges:[m]}),B.current?.blur()):Q([e])),i&&i(re,m)},le=a?re=>{a(re,{...m})}:void 0,W=r?re=>{r(re,{...m})}:void 0,j=l?re=>{l(re,{...m})}:void 0,te=s?re=>{s(re,{...m})}:void 0,ge=u?re=>{u(re,{...m})}:void 0,me=re=>{if(!h&&rh.includes(re.key)&&C){let{unselectNodesAndEdges:Q,addSelectedEdges:xe}=D.getState();re.key==="Escape"?(B.current?.blur(),Q({edges:[m]})):xe([e])}};return(0,P.jsx)("svg",{style:{zIndex:A},children:(0,P.jsxs)("g",{className:rt(["react-flow__edge",`react-flow__edge-${S}`,m.className,x,{selected:m.selected,animated:m.animated,inactive:!C&&!i,updating:M,selectable:C}]),onClick:$,onDoubleClick:le,onContextMenu:W,onMouseEnter:j,onMouseMove:te,onMouseLeave:ge,onKeyDown:_?me:void 0,tabIndex:_?0:void 0,role:m.ariaRole??(_?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":_?`${eE}-${v}`:void 0,ref:B,...m.domAttributes,children:[!I&&(0,P.jsx)(E,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:C,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:R,sourceY:O,targetX:L,targetY:Y,sourcePosition:G,targetPosition:X,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:F,markerEnd:K,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),w&&(0,P.jsx)(VR,{edge:m,isReconnectable:w,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:R,sourceY:O,targetX:L,targetY:Y,sourcePosition:G,targetPosition:X,setUpdateHover:z,setReconnecting:T})]})})}var XR=(0,k.memo)(YR),qR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function CE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:r,onEdgeMouseEnter:l,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:x,edgesReconnectable:g,elementsSelectable:h,onError:m}=Ce(qR,je),y=MR(t);return(0,P.jsxs)("div",{className:"react-flow__edges",children:[(0,P.jsx)(LR,{defaultColor:e,rfId:n}),y.map(S=>(0,P.jsx)(XR,{id:S,edgesFocusable:x,edgesReconnectable:g,elementsSelectable:h,noPanClassName:i,onReconnect:a,onContextMenu:r,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},S))]})}CE.displayName="EdgeRenderer";var ZR=(0,k.memo)(CE),jR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function $R({children:e}){let t=Ce(jR);return(0,P.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function FR(e){let t=Bh(),n=(0,k.useRef)(!1);(0,k.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var KR=e=>e.panZoom?.syncViewport;function QR(e){let t=Ce(KR),n=Qe();return(0,k.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function F_(e){return e.connection.inProgress?{...e.connection,to:il(e.connection.to,e.transform)}:{...e.connection}}function WR(e){return e?n=>{let o=F_(n);return e(o)}:F_}function JR(e){let t=WR(e);return Ce(t,je)}var eO=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function tO({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:r,isValid:l,inProgress:s}=Ce(eO,je);return!(a&&i&&s)?null:(0,P.jsx)("svg",{style:e,width:a,height:r,className:"react-flow__connectionline react-flow__container",children:(0,P.jsx)("g",{className:rt(["react-flow__connection",uh(l)]),children:(0,P.jsx)(wE,{style:t,type:n,CustomComponent:o,isValid:l})})})}var wE=({style:e,type:t=Co.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:r,fromHandle:l,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:p}=JR();if(!i)return;if(n)return(0,P.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:r,fromHandle:l,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:uh(o),toNode:c,toHandle:d,pointer:p});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case Co.Bezier:[v]=Nf(b);break;case Co.SimpleBezier:[v]=mE(b);break;case Co.Step:[v]=js({...b,borderRadius:0});break;case Co.SmoothStep:[v]=js(b);break;default:[v]=Cf(b)}return(0,P.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};wE.displayName="ConnectionLine";var nO={};function K_(e=nO){let t=(0,k.useRef)(e),n=Qe();(0,k.useEffect)(()=>{},[e])}function oO(){let e=Qe(),t=(0,k.useRef)(!1);(0,k.useEffect)(()=>{},[])}function AE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:r,onNodeMouseEnter:l,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:x,connectionLineContainerStyle:g,selectionKeyCode:h,selectionOnDrag:m,selectionMode:y,multiSelectionKeyCode:S,panActivationKeyCode:E,zoomActivationKeyCode:_,deleteKeyCode:w,onlyRenderVisibleElements:C,elementsSelectable:B,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,preventScrolling:D,defaultMarkerColor:A,zoomOnScroll:R,zoomOnPinch:O,panOnScroll:L,panOnScrollSpeed:Y,panOnScrollMode:G,zoomOnDoubleClick:X,panOnDrag:F,onPaneClick:K,onPaneMouseEnter:$,onPaneMouseMove:le,onPaneMouseLeave:W,onPaneScroll:j,onPaneContextMenu:te,paneClickDistance:ge,nodeClickDistance:me,onEdgeContextMenu:re,onEdgeMouseEnter:Q,onEdgeMouseMove:xe,onEdgeMouseLeave:Ne,reconnectRadius:_e,onReconnect:et,onReconnectStart:De,onReconnectEnd:we,noDragClassName:tt,noWheelClassName:Be,noPanClassName:pn,disableKeyboardA11y:lo,nodeExtent:On,rfId:nt,viewport:_t,onViewportChange:We}){return K_(e),K_(t),oO(),FR(n),QR(_t),(0,P.jsx)(bR,{onPaneClick:K,onPaneMouseEnter:$,onPaneMouseMove:le,onPaneMouseLeave:W,onPaneContextMenu:te,onPaneScroll:j,paneClickDistance:ge,deleteKeyCode:w,selectionKeyCode:h,selectionOnDrag:m,selectionMode:y,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:E,zoomActivationKeyCode:_,elementsSelectable:B,zoomOnScroll:R,zoomOnPinch:O,zoomOnDoubleClick:X,panOnScroll:L,panOnScrollSpeed:Y,panOnScrollMode:G,panOnDrag:F,defaultViewport:M,translateExtent:z,minZoom:I,maxZoom:T,onSelectionContextMenu:d,preventScrolling:D,noDragClassName:tt,noWheelClassName:Be,noPanClassName:pn,disableKeyboardA11y:lo,onViewportChange:We,isControlledViewport:!!_t,children:(0,P.jsxs)($R,{children:[(0,P.jsx)(ZR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:r,onReconnect:et,onReconnectStart:De,onReconnectEnd:we,onlyRenderVisibleElements:C,onEdgeContextMenu:re,onEdgeMouseEnter:Q,onEdgeMouseMove:xe,onEdgeMouseLeave:Ne,reconnectRadius:_e,defaultMarkerColor:A,noPanClassName:pn,disableKeyboardA11y:lo,rfId:nt}),(0,P.jsx)(tO,{style:b,type:v,component:x,containerStyle:g}),(0,P.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,P.jsx)(AR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:me,onlyRenderVisibleElements:C,noPanClassName:pn,noDragClassName:tt,disableKeyboardA11y:lo,nodeExtent:On,rfId:nt}),(0,P.jsx)("div",{className:"react-flow__viewport-portal"})]})})}AE.displayName="GraphView";var iO=(0,k.memo)(AE),Q_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:r,fitViewOptions:l,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let p=new Map,v=new Map,b=new Map,x=new Map,g=o??t??[],h=n??e??[],m=c??[0,0],y=d??el;Mh(b,x,g);let S=Af(h,p,v,{nodeOrigin:m,nodeExtent:y,zIndexMode:f}),E=[0,0,1];if(r&&i&&a){let _=tl(p,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:w,y:C,zoom:B}=Zs(_,i,a,s,u,l?.padding??.1);E=[w,C,B]}return{rfId:"1",width:i??0,height:a??0,transform:E,nodes:h,nodesInitialized:S,nodeLookup:p,parentLookup:v,edges:g,edgeLookup:x,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:el,nodeExtent:y,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:$i.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:r??!1,fitViewOptions:l,fitViewResolver:null,connection:{...sh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:gh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:lh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},aO=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:r,fitViewOptions:l,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>A_((p,v)=>{async function b(){let{nodeLookup:x,panZoom:g,fitViewOptions:h,fitViewResolver:m,width:y,height:S,minZoom:E,maxZoom:_}=v();g&&(await Ux({nodes:x,width:y,height:S,panZoom:g,minZoom:E,maxZoom:_},h),m?.resolve(!0),p({fitViewResolver:null}))}return{...Q_({nodes:e,edges:t,width:i,height:a,fitView:r,fitViewOptions:l,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:x=>{let{nodeLookup:g,parentLookup:h,nodeOrigin:m,elevateNodesOnSelect:y,fitViewQueued:S,zIndexMode:E}=v(),_=Af(x,g,h,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:y,checkEquality:!0,zIndexMode:E});S&&_?(b(),p({nodes:x,nodesInitialized:_,fitViewQueued:!1,fitViewOptions:void 0})):p({nodes:x,nodesInitialized:_})},setEdges:x=>{let{connectionLookup:g,edgeLookup:h}=v();Mh(g,h,x),p({edges:x})},setDefaultNodesAndEdges:(x,g)=>{if(x){let{setNodes:h}=v();h(x),p({hasDefaultNodes:!0})}if(g){let{setEdges:h}=v();h(g),p({hasDefaultEdges:!0})}},updateNodeInternals:x=>{let{triggerNodeChanges:g,nodeLookup:h,parentLookup:m,domNode:y,nodeOrigin:S,nodeExtent:E,debug:_,fitViewQueued:w,zIndexMode:C}=v(),{changes:B,updatedInternals:M}=e_(x,h,m,y,S,E,C);M&&(Wx(h,m,{nodeOrigin:S,nodeExtent:E,zIndexMode:C}),w?(b(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),B?.length>0&&(_&&console.log("React Flow: trigger node changes",B),g?.(B)))},updateNodePositions:(x,g=!1)=>{let h=[],m=[],{nodeLookup:y,triggerNodeChanges:S,connection:E,updateConnection:_,onNodesChangeMiddlewareMap:w}=v();for(let[C,B]of x){let M=y.get(C),z=!!(M?.expandParent&&M?.parentId&&B?.position),I={id:C,type:"position",position:z?{x:Math.max(0,B.position.x),y:Math.max(0,B.position.y)}:B.position,dragging:g};if(M&&E.inProgress&&E.fromNode.id===M.id){let T=Fi(M,E.fromHandle,ne.Left,!0);_({...E,from:T})}z&&M.parentId&&h.push({id:C,parentId:M.parentId,rect:{...B.internals.positionAbsolute,width:B.measured.width??0,height:B.measured.height??0}}),m.push(I)}if(h.length>0){let{parentLookup:C,nodeOrigin:B}=v(),M=Mf(h,y,C,B);m.push(...M)}for(let C of w.values())m=C(m);S(m)},triggerNodeChanges:x=>{let{onNodesChange:g,setNodes:h,nodes:m,hasDefaultNodes:y,debug:S}=v();if(x?.length){if(y){let E=oE(x,m);h(E)}S&&console.log("React Flow: trigger node changes",x),g?.(x)}},triggerEdgeChanges:x=>{let{onEdgesChange:g,setEdges:h,edges:m,hasDefaultEdges:y,debug:S}=v();if(x?.length){if(y){let E=iE(x,m);h(E)}S&&console.log("React Flow: trigger edge changes",x),g?.(x)}},addSelectedNodes:x=>{let{multiSelectionActive:g,edgeLookup:h,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:S}=v();if(g){let E=x.map(_=>Ba(_,!0));y(E);return}y(ll(m,new Set([...x]),!0)),S(ll(h))},addSelectedEdges:x=>{let{multiSelectionActive:g,edgeLookup:h,nodeLookup:m,triggerNodeChanges:y,triggerEdgeChanges:S}=v();if(g){let E=x.map(_=>Ba(_,!0));S(E);return}S(ll(h,new Set([...x]))),y(ll(m,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:g}={})=>{let{edges:h,nodes:m,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:E}=v(),_=x||m,w=g||h,C=[];for(let M of _){if(!M.selected)continue;let z=y.get(M.id);z&&(z.selected=!1),C.push(Ba(M.id,!1))}let B=[];for(let M of w)M.selected&&B.push(Ba(M.id,!1));S(C),E(B)},setMinZoom:x=>{let{panZoom:g,maxZoom:h}=v();g?.setScaleExtent([x,h]),p({minZoom:x})},setMaxZoom:x=>{let{panZoom:g,minZoom:h}=v();g?.setScaleExtent([h,x]),p({maxZoom:x})},setTranslateExtent:x=>{v().panZoom?.setTranslateExtent(x),p({translateExtent:x})},resetSelectedElements:()=>{let{edges:x,nodes:g,triggerNodeChanges:h,triggerEdgeChanges:m,elementsSelectable:y}=v();if(!y)return;let S=g.reduce((_,w)=>w.selected?[..._,Ba(w.id,!1)]:_,[]),E=x.reduce((_,w)=>w.selected?[..._,Ba(w.id,!1)]:_,[]);h(S),m(E)},setNodeExtent:x=>{let{nodes:g,nodeLookup:h,parentLookup:m,nodeOrigin:y,elevateNodesOnSelect:S,nodeExtent:E,zIndexMode:_}=v();x[0][0]===E[0][0]&&x[0][1]===E[0][1]&&x[1][0]===E[1][0]&&x[1][1]===E[1][1]||(Af(g,h,m,{nodeOrigin:y,nodeExtent:x,elevateNodesOnSelect:S,checkEquality:!1,zIndexMode:_}),p({nodeExtent:x}))},panBy:x=>{let{transform:g,width:h,height:m,panZoom:y,translateExtent:S}=v();return t_({delta:x,panZoom:y,transform:g,translateExtent:S,width:h,height:m})},setCenter:async(x,g,h)=>{let{width:m,height:y,maxZoom:S,panZoom:E}=v();if(!E)return Promise.resolve(!1);let _=typeof h?.zoom<"u"?h.zoom:S;return await E.setViewport({x:m/2-x*_,y:y/2-g*_,zoom:_},{duration:h?.duration,ease:h?.ease,interpolate:h?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...sh}})},updateConnection:x=>{p({connection:x})},reset:()=>p({...Q_()})}},Object.is);function rO({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:r,initialMaxZoom:l,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:p}){let[v]=(0,k.useState)(()=>aO({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:r,maxZoom:l,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,P.jsx)(ND,{value:v,children:(0,P.jsx)($D,{children:p})})}function lO({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:r,fitView:l,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,k.useContext)(Pf)?(0,P.jsx)(P.Fragment,{children:e}):(0,P.jsx)(rO,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:r,fitView:l,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var sO={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function uO({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:r,onNodeClick:l,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:v,onConnectEnd:b,onClickConnectStart:x,onClickConnectEnd:g,onNodeMouseEnter:h,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:S,onNodeDoubleClick:E,onNodeDragStart:_,onNodeDrag:w,onNodeDragStop:C,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onSelectionChange:I,onSelectionDragStart:T,onSelectionDrag:D,onSelectionDragStop:A,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:L,onBeforeDelete:Y,connectionMode:G,connectionLineType:X=Co.Bezier,connectionLineStyle:F,connectionLineComponent:K,connectionLineContainerStyle:$,deleteKeyCode:le="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:j=!1,selectionMode:te=Oa.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:me=al()?"Meta":"Control",zoomActivationKeyCode:re=al()?"Meta":"Control",snapToGrid:Q,snapGrid:xe,onlyRenderVisibleElements:Ne=!1,selectNodesOnDrag:_e,nodesDraggable:et,autoPanOnNodeFocus:De,nodesConnectable:we,nodesFocusable:tt,nodeOrigin:Be=tE,edgesFocusable:pn,edgesReconnectable:lo,elementsSelectable:On=!0,defaultViewport:nt=kD,minZoom:_t=.5,maxZoom:We=2,translateExtent:so=el,preventScrolling:Oo=!0,nodeExtent:kt,defaultMarkerColor:zo="#b1b1b7",zoomOnScroll:ui=!0,zoomOnPinch:Kn=!0,panOnScroll:Lo=!1,panOnScrollSpeed:ct=.5,panOnScrollMode:Gt=ai.Free,zoomOnDoubleClick:uo=!0,panOnDrag:mn=!0,onPaneClick:Ya,onPaneMouseEnter:zn,onPaneMouseMove:co,onPaneMouseLeave:Xa,onPaneScroll:fo,onPaneContextMenu:ml,paneClickDistance:qa=1,nodeClickDistance:$e=0,children:Ln,onReconnect:Za,onReconnectStart:Qt,onReconnectEnd:ci,onEdgeContextMenu:Wi,onEdgeDoubleClick:po,onEdgeMouseEnter:hl,onEdgeMouseMove:It,onEdgeMouseLeave:Qn,reconnectRadius:Ji=10,onNodesChange:ja,onEdgesChange:fi,noDragClassName:di="nodrag",noWheelClassName:hn="nowheel",noPanClassName:$a="nopan",fitView:Wn,fitViewOptions:mo,connectOnClick:ue,attributionPosition:ae,proOptions:U,defaultEdgeOptions:N,elevateNodesOnSelect:H=!0,elevateEdgesOnSelect:q=!1,disableKeyboardA11y:ce=!1,autoPanOnConnect:Ve,autoPanOnNodeDrag:Re,autoPanSpeed:gt,connectionRadius:ot,isValidConnection:ho,onError:gl,style:yt,id:yl,nodeDragThreshold:ou,connectionDragThreshold:KT,viewport:QT,onViewportChange:WT,width:JT,height:eN,colorMode:tN="light",debug:nN,onScroll:Tg,ariaLabelConfig:oN,zIndexMode:Ng="basic",...iN},aN){let ed=yl||"1",rN=VD(tN),lN=(0,k.useCallback)(Cg=>{Cg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Tg?.(Cg)},[Tg]);return(0,P.jsx)("div",{"data-testid":"rf__wrapper",...iN,onScroll:lN,style:{...yt,...sO},ref:aN,className:rt(["react-flow",i,rN]),id:yl,role:"application",children:(0,P.jsxs)(lO,{nodes:e,edges:t,width:JT,height:eN,fitView:Wn,fitViewOptions:mo,minZoom:_t,maxZoom:We,nodeOrigin:Be,nodeExtent:kt,zIndexMode:Ng,children:[(0,P.jsx)(iO,{onInit:u,onNodeClick:l,onEdgeClick:s,onNodeMouseEnter:h,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:S,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:r,connectionLineType:X,connectionLineStyle:F,connectionLineComponent:K,connectionLineContainerStyle:$,selectionKeyCode:W,selectionOnDrag:j,selectionMode:te,deleteKeyCode:le,multiSelectionKeyCode:me,panActivationKeyCode:ge,zoomActivationKeyCode:re,onlyRenderVisibleElements:Ne,defaultViewport:nt,translateExtent:so,minZoom:_t,maxZoom:We,preventScrolling:Oo,zoomOnScroll:ui,zoomOnPinch:Kn,zoomOnDoubleClick:uo,panOnScroll:Lo,panOnScrollSpeed:ct,panOnScrollMode:Gt,panOnDrag:mn,onPaneClick:Ya,onPaneMouseEnter:zn,onPaneMouseMove:co,onPaneMouseLeave:Xa,onPaneScroll:fo,onPaneContextMenu:ml,paneClickDistance:qa,nodeClickDistance:$e,onSelectionContextMenu:R,onSelectionStart:O,onSelectionEnd:L,onReconnect:Za,onReconnectStart:Qt,onReconnectEnd:ci,onEdgeContextMenu:Wi,onEdgeDoubleClick:po,onEdgeMouseEnter:hl,onEdgeMouseMove:It,onEdgeMouseLeave:Qn,reconnectRadius:Ji,defaultMarkerColor:zo,noDragClassName:di,noWheelClassName:hn,noPanClassName:$a,rfId:ed,disableKeyboardA11y:ce,nodeExtent:kt,viewport:QT,onViewportChange:WT}),(0,P.jsx)(UD,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:p,onConnectStart:v,onConnectEnd:b,onClickConnectStart:x,onClickConnectEnd:g,nodesDraggable:et,autoPanOnNodeFocus:De,nodesConnectable:we,nodesFocusable:tt,edgesFocusable:pn,edgesReconnectable:lo,elementsSelectable:On,elevateNodesOnSelect:H,elevateEdgesOnSelect:q,minZoom:_t,maxZoom:We,nodeExtent:kt,onNodesChange:ja,onEdgesChange:fi,snapToGrid:Q,snapGrid:xe,connectionMode:G,translateExtent:so,connectOnClick:ue,defaultEdgeOptions:N,fitView:Wn,fitViewOptions:mo,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onNodeDragStart:_,onNodeDrag:w,onNodeDragStop:C,onSelectionDrag:D,onSelectionDragStart:T,onSelectionDragStop:A,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:$a,nodeOrigin:Be,rfId:ed,autoPanOnConnect:Ve,autoPanOnNodeDrag:Re,autoPanSpeed:gt,onError:gl,connectionRadius:ot,isValidConnection:ho,selectNodesOnDrag:_e,nodeDragThreshold:ou,connectionDragThreshold:KT,onBeforeDelete:Y,debug:nN,ariaLabelConfig:oN,zIndexMode:Ng}),(0,P.jsx)(HD,{onSelectionChange:I}),Ln,(0,P.jsx)(OD,{proOptions:U,position:ae}),(0,P.jsx)(RD,{rfId:ed,disableKeyboardA11y:ce})]})})}var ME=aE(uO);function DE(e){let[t,n]=(0,k.useState)(e),o=(0,k.useCallback)(i=>n(a=>oE(i,a)),[]);return[t,n,o]}function RE(e){let[t,n]=(0,k.useState)(e),o=(0,k.useCallback)(i=>n(a=>iE(i,a)),[]);return[t,n,o]}var CH=An.error014();function cO({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,P.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:rt(["react-flow__background-pattern",n,o])})}function fO({radius:e,className:t}){return(0,P.jsx)("circle",{cx:e,cy:e,r:e,className:rt(["react-flow__background-pattern","dots",t])})}var Ao;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ao||(Ao={}));var dO={[Ao.Dots]:1,[Ao.Lines]:1,[Ao.Cross]:6},pO=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function OE({id:e,variant:t=Ao.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:r,bgColor:l,style:s,className:u,patternClassName:c}){let d=(0,k.useRef)(null),{transform:f,patternId:p}=Ce(pO,je),v=o||dO[t],b=t===Ao.Dots,x=t===Ao.Cross,g=Array.isArray(n)?n:[n,n],h=[g[0]*f[2]||1,g[1]*f[2]||1],m=v*f[2],y=Array.isArray(a)?a:[a,a],S=x?[m,m]:h,E=[y[0]*f[2]||1+S[0]/2,y[1]*f[2]||1+S[1]/2],_=`${p}${e||""}`;return(0,P.jsxs)("svg",{className:rt(["react-flow__background",u]),style:{...s,...Hf,"--xy-background-color-props":l,"--xy-background-pattern-color-props":r},ref:d,"data-testid":"rf__background",children:[(0,P.jsx)("pattern",{id:_,x:f[0]%h[0],y:f[1]%h[1],width:h[0],height:h[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:b?(0,P.jsx)(fO,{radius:m/2,className:c}):(0,P.jsx)(cO,{dimensions:S,lineWidth:i,variant:t,className:c})}),(0,P.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${_})`})]})}OE.displayName="Background";var zE=(0,k.memo)(OE);function mO(){return(0,P.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,P.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hO(){return(0,P.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,P.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function gO(){return(0,P.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,P.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 yO(){return(0,P.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,P.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 vO(){return(0,P.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,P.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 Lf({children:e,className:t,...n}){return(0,P.jsx)("button",{type:"button",className:rt(["react-flow__controls-button",t]),...n,children:e})}var bO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function LE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:r,onFitView:l,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":p}){let v=Qe(),{isInteractive:b,minZoomReached:x,maxZoomReached:g,ariaLabelConfig:h}=Ce(bO,je),{zoomIn:m,zoomOut:y,fitView:S}=Bh(),E=()=>{m(),a?.()},_=()=>{y(),r?.()},w=()=>{S(i),l?.()},C=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,P.jsxs)(sl,{className:rt(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":p??h["controls.ariaLabel"],children:[t&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Lf,{onClick:E,className:"react-flow__controls-zoomin",title:h["controls.zoomIn.ariaLabel"],"aria-label":h["controls.zoomIn.ariaLabel"],disabled:g,children:(0,P.jsx)(mO,{})}),(0,P.jsx)(Lf,{onClick:_,className:"react-flow__controls-zoomout",title:h["controls.zoomOut.ariaLabel"],"aria-label":h["controls.zoomOut.ariaLabel"],disabled:x,children:(0,P.jsx)(hO,{})})]}),n&&(0,P.jsx)(Lf,{className:"react-flow__controls-fitview",onClick:w,title:h["controls.fitView.ariaLabel"],"aria-label":h["controls.fitView.ariaLabel"],children:(0,P.jsx)(gO,{})}),o&&(0,P.jsx)(Lf,{className:"react-flow__controls-interactive",onClick:C,title:h["controls.interactive.ariaLabel"],"aria-label":h["controls.interactive.ariaLabel"],children:b?(0,P.jsx)(vO,{}):(0,P.jsx)(yO,{})}),c]})}LE.displayName="Controls";var wH=(0,k.memo)(LE);function SO({id:e,x:t,y:n,width:o,height:i,style:a,color:r,strokeColor:l,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:p}){let{background:v,backgroundColor:b}=a||{},x=r||v||b;return(0,P.jsx)("rect",{className:rt(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:x,stroke:l,strokeWidth:s},shapeRendering:d,onClick:p?g=>p(g,e):void 0})}var xO=(0,k.memo)(SO),_O=e=>e.nodes.map(t=>t.id),zh=e=>e instanceof Function?e:()=>e;function EO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=xO,onClick:r}){let l=Ce(_O,je),s=zh(t),u=zh(e),c=zh(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,P.jsx)(P.Fragment,{children:l.map(f=>(0,P.jsx)(NO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:r,shapeRendering:d},f))})}function TO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:r,NodeComponent:l,onClick:s}){let{node:u,x:c,y:d,width:f,height:p}=Ce(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let x=b.internals.userNode,{x:g,y:h}=b.internals.positionAbsolute,{width:m,height:y}=wo(x);return{node:x,x:g,y:h,width:m,height:y}},je);return!u||u.hidden||!yh(u)?null:(0,P.jsx)(l,{x:c,y:d,width:f,height:p,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:r,onClick:s,id:u.id})}var NO=(0,k.memo)(TO),CO=(0,k.memo)(EO),wO=200,AO=150,MO=e=>!e.hidden,DO=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?mh(tl(e.nodeLookup,{filter:MO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},RO="react-flow__minimap-desc";function BE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:r,nodeComponent:l,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:p,onNodeClick:v,pannable:b=!1,zoomable:x=!1,ariaLabel:g,inversePan:h,zoomStep:m=1,offsetScale:y=5}){let S=Qe(),E=(0,k.useRef)(null),{boundingRect:_,viewBB:w,rfId:C,panZoom:B,translateExtent:M,flowWidth:z,flowHeight:I,ariaLabelConfig:T}=Ce(DO,je),D=e?.width??wO,A=e?.height??AO,R=_.width/D,O=_.height/A,L=Math.max(R,O),Y=L*D,G=L*A,X=y*L,F=_.x-(Y-_.width)/2-X,K=_.y-(G-_.height)/2-X,$=Y+X*2,le=G+X*2,W=`${RO}-${C}`,j=(0,k.useRef)(0),te=(0,k.useRef)();j.current=L,(0,k.useEffect)(()=>{if(E.current&&B)return te.current=s_({domNode:E.current,panZoom:B,getTransform:()=>S.getState().transform,getViewScale:()=>j.current}),()=>{te.current?.destroy()}},[B]),(0,k.useEffect)(()=>{te.current?.update({translateExtent:M,width:z,height:I,inversePan:h,pannable:b,zoomStep:m,zoomable:x})},[b,x,h,m,M,z,I]);let ge=p?Q=>{let[xe,Ne]=te.current?.pointer(Q)||[0,0];p(Q,{x:xe,y:Ne})}:void 0,me=v?(0,k.useCallback)((Q,xe)=>{let Ne=S.getState().nodeLookup.get(xe).internals.userNode;v(Q,Ne)},[]):void 0,re=g??T["minimap.ariaLabel"];return(0,P.jsx)(sl,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof r=="number"?r:void 0},className:rt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,P.jsxs)("svg",{width:D,height:A,viewBox:`${F} ${K} ${$} ${le}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":W,ref:E,onClick:ge,children:[re&&(0,P.jsx)("title",{id:W,children:re}),(0,P.jsx)(CO,{onClick:me,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:r,nodeComponent:l}),(0,P.jsx)("path",{className:"react-flow__minimap-mask",d:`M${F-X},${K-X}h${$+X*2}v${le+X*2}h${-$-X*2}z
15
+ M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}BE.displayName="MiniMap";var AH=(0,k.memo)(BE),OO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,zO={[Ki.Line]:"right",[Ki.Handle]:"bottom-right"};function LO({nodeId:e,position:t,variant:n=Ki.Handle,className:o,style:i=void 0,children:a,color:r,minWidth:l=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:v,onResizeStart:b,onResize:x,onResizeEnd:g}){let h=uE(),m=typeof e=="string"?e:h,y=Qe(),S=(0,k.useRef)(null),E=n===Ki.Handle,_=Ce((0,k.useCallback)(OO(E&&p),[E,p]),je),w=(0,k.useRef)(null),C=t??zO[n];(0,k.useEffect)(()=>{if(!(!S.current||!m))return w.current||(w.current=p_({domNode:S.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,domNode:A}=y.getState();return{nodeLookup:M,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:D,paneDomNode:A}},onChange:(M,z)=>{let{triggerNodeChanges:I,nodeLookup:T,parentLookup:D,nodeOrigin:A}=y.getState(),R=[],O={x:M.x,y:M.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let Y=L.origin??A,G=M.width??L.measured.width??0,X=M.height??L.measured.height??0,F={id:L.id,parentId:L.parentId,rect:{width:G,height:X,...vh({x:M.x??L.position.x,y:M.y??L.position.y},{width:G,height:X},L.parentId,T,Y)}},K=Mf([F],T,D,A);R.push(...K),O.x=M.x?Math.max(Y[0]*G,M.x):void 0,O.y=M.y?Math.max(Y[1]*X,M.y):void 0}if(O.x!==void 0&&O.y!==void 0){let Y={id:m,type:"position",position:{...O}};R.push(Y)}if(M.width!==void 0&&M.height!==void 0){let G={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};R.push(G)}for(let Y of z){let G={...Y,type:"position"};R.push(G)}I(R)},onEnd:({width:M,height:z})=>{let I={id:m,type:"dimensions",resizing:!1,dimensions:{width:M,height:z}};y.getState().triggerNodeChanges([I])}})),w.current.update({controlPosition:C,boundaries:{minWidth:l,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:x,onResizeEnd:g,shouldResize:v}),()=>{w.current?.destroy()}},[C,l,s,u,c,d,b,x,g,v]);let B=C.split("-");return(0,P.jsx)("div",{className:rt(["react-flow__resize-control","nodrag",...B,n,o]),ref:S,style:{...i,scale:_,...r&&{[E?"backgroundColor":"borderColor"]:r}},children:a})}var MH=(0,k.memo)(LO);var Hh=J(Et(),1);var PE="(prefers-color-scheme: dark)";function BO(e){return e?Sa.DARK:Sa.LIGHT}function kh(){return typeof window>"u"||typeof window.matchMedia!="function"?Sa.DARK:BO(window.matchMedia(PE).matches)}function PO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(PE);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function HO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:PO,getSnapshot:kh,getServerSnapshot:()=>Sa.DARK}}function HE(e){let t=Hh.default.useMemo(()=>HO(e),[e]);return Hh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function kE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let l of e.edges)l.kind==="contains"&&(i[l.source]||(i[l.source]=[]),i[l.source].push(l.target),a.add(l.target));let r=new Set(Object.keys(i));for(let l of e.nodes){let s=l.io,u=r.has(l.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=l.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(l.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:r,childNodeIds:a,containmentTree:i}}function $n(e,t){let n={};for(let[r,l]of Object.entries(t.containmentTree))for(let s of l)n[s]=r;for(let[r,l]of Object.entries(t.stuffProducers)){let s="stuff_"+r,u=n[l];u&&(n[s]=u)}for(let r of e.nodes){if(!t.controllerNodeIds.has(r.id))continue;let l=n[r.id];if(l)for(let s of r.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=l)}}for(let r of e.edges)if(r.kind==="batch_item"&&r.target_stuff_digest){let l="stuff_"+r.target_stuff_digest;t.controllerNodeIds.has(r.source)&&(n[l]=r.source)}let o=new Set;for(let r of e.edges)(r.kind==="batch_item"||r.kind==="batch_aggregate"||r.kind==="parallel_combine")&&(r.source_stuff_digest&&o.add(r.source_stuff_digest),r.target_stuff_digest&&o.add(r.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(r=>r.startsWith(i));for(let r of a){let l=r.slice(i.length),s=n[r];if(!s)continue;let u=t.stuffConsumers[l]||[];if(u.length===0){o.has(l)||delete n[r];continue}for(;s;){let c=s;if(u.some(p=>kO(p,c,n)))break;let f=n[s];f?(n[r]=f,s=f):(delete n[r],s=void 0)}}return n}function kO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function GE(e,t){return e.pipe_registry?.[t]}function Gh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function Gf(e,t){let n={pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(o=>({name:o.name,concept:o.concept??""})),outputs:e.io.outputs.map(o=>({name:o.name,concept:o.concept??""}))};return t!==void 0&&(n.graphMode=t),e.tags!==void 0&&(n.tags=e.tags),n}function UE(e,t,n){let o=new Set([e]),a=t.nodes.find(r=>r.id===e)?.pipe_code;if(!a)return o;for(let r of t.nodes)r.pipe_code===a&&n.has(r.id)&&o.add(r.id);return o}function GO(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function Qi(e,t,n){let o=GO(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function If(e,t,n){return Qi(e,t,n)??e}function IE(e,t){return e.nodes.find(n=>n.id===t)}function Ih(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=$n(n,t),r=Eo(n),l=new Map;for(let h of o){let y=IE(n,h)?.io?.outputs;if(y)for(let S of y){if(!S.digest)continue;let E=l.get(S.digest);E||(E=new Set,l.set(S.digest,E)),E.add(h)}}if(l.size>0)for(let h of e.nodes){if(!Vr(h.id))continue;let m=l.get(bs(h.id));if(!m)continue;let y=a[h.id],S=null,E=new Set;for(;y&&!E.has(y);)E.add(y),m.has(y)&&(S=y),y=a[y];if(!S)continue;let _=a[S];_?a[h.id]=_:delete a[h.id]}let s=[];for(let h of e.nodes)Qi(h.id,a,o)||s.push(h);for(let h of o){if(Qi(h,a,o))continue;let m=IE(n,h);if(!m)continue;let y=Gf(Yr(m,h),r);i&&(y.onExpand=E=>i(h,E));let S={id:h,type:Ur,data:{labelDescriptor:{kind:"pipe",label:y.pipeCode,isFailed:y.status==="failed"},nodeData:m,isPipe:!1,isStuff:!1,isController:!0,labelText:y.pipeCode,pipeCode:y.pipeCode,pipeType:m.pipe_type,graphMode:r,pipeCardData:y},position:{x:0,y:0}};s.push(S)}let u=new Set;for(let h of t.controllerNodeIds)o.has(h)||Qi(h,a,o)||u.add(h);let c={};for(let h of u){let m=t.containmentTree[h]??[],y=[];for(let S of m){let E=Qi(S,a,o);E&&E!==S||y.push(S)}c[h]=y}let d=new Set;for(let h of Object.values(c))for(let m of h)d.add(m);let f={};for(let[h,m]of Object.entries(t.stuffProducers))f[h]=If(m,a,o);let p={};for(let[h,m]of Object.entries(t.stuffConsumers)){let y=new Set;for(let S of m)y.add(If(S,a,o));p[h]=[...y]}let v={stuffRegistry:t.stuffRegistry,stuffProducers:f,stuffConsumers:p,controllerNodeIds:u,childNodeIds:d,containmentTree:c},b=new Map;for(let h of e.edges){let m=If(h.source,a,o),y=If(h.target,a,o);if(m===y)continue;let S=h._batchEdge?"batch":"data",E=`${m}->${y}|${S}`;if(b.has(E))continue;let _={...h,source:m,target:y,id:h.id};h._batchEdge&&(m!==h.source||y!==h.target)&&(_.label="[N]"),delete _._crossGroup,b.set(E,_)}let x=$n({...n,edges:n.edges.filter(h=>h.kind!=="contains"?!0:u.has(h.source))},v),g=[];for(let h of b.values()){let m=x[h.source]||null,y=x[h.target]||null;if(m&&y&&m!==y)h._crossGroup=!0,h.style={...h.style,strokeWidth:1.5,opacity:.65};else if(h.style&&(h.style.opacity===.65||h.style.strokeWidth===1.5)){let{opacity:S,strokeWidth:E,..._}=h.style;h.style={..._,strokeWidth:2},h.markerEnd||(h.markerEnd={type:xa,color:"var(--color-edge)"})}g.push(h)}return{nodes:s,edges:g,analysis:v}}function VE(e,t){return e.nodeId?[e.nodeId]:e.pipeCode?t.nodes.filter(n=>n.pipe_code===e.pipeCode).map(n=>n.id):[]}function YE(e,t,n,o){let i=new Map;if(!e||e.length===0||!t)return i;for(let a of e)for(let r of VE(a,t)){let l=Qi(r,n,o)??r,s=i.get(l),u=[a.message,...a.suggestedFix?[`Fix: ${a.suggestedFix}`]:[]];s?(a.severity==="error"&&(s.severity="error"),s.count+=1,s.lines.push(...u)):i.set(l,{severity:a.severity,count:1,lines:u})}return i}function XE(e,t,n,o,i){if(!t)return null;for(let a of VE(e,t)){let r=Qi(a,n,o)??a;if(i.has(r))return r}return null}function qE(e,t,n){return e.map(o=>{let i=t.get(o.id);if(!i&&!o.data.validation&&!o.data.pipeCardData?.validation)return o;let a=i?n:void 0;return{...o,data:{...o.data,validation:i,onValidationBadgeClick:a,pipeCardData:o.data.pipeCardData?{...o.data.pipeCardData,validation:i,onValidationBadgeClick:a}:o.data.pipeCardData}}})}function ZE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Uf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function jE(e){if(!e)return null;if(typeof e=="string")return ZE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(ZE(o))return o;return null}function $E(e){if(!e)return null;if(typeof e=="string")return Uf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Uf(o))return o;return null}function FE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function KE(e){let t=i=>{let a=i.inner_html;return typeof a=="string"&&a.trim()!==""?a:null};if(!e||typeof e!="object"||Array.isArray(e))return null;let n=e,o=t(n);if(o!=null)return o;for(let i of Object.values(n))if(i&&typeof i=="object"&&!Array.isArray(i)){let a=t(i);if(a!=null)return a}return null}function Uh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function QE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=Uh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function WE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Vh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var un=J(Et(),1);var{entries:lT,setPrototypeOf:JE,isFrozen:IO,getPrototypeOf:UO,getOwnPropertyDescriptor:VO}=Object,{freeze:$t,seal:Fn,create:eu}=Object,{apply:Fh,construct:Kh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});Fn||(Fn=function(t){return t});Fh||(Fh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Kh||(Kh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Fs=Ft(Array.prototype.forEach),YO=Ft(Array.prototype.lastIndexOf),eT=Ft(Array.prototype.pop),Ks=Ft(Array.prototype.push),XO=Ft(Array.prototype.splice),Yf=Ft(String.prototype.toLowerCase),Yh=Ft(String.prototype.toString),Xh=Ft(String.prototype.match),ul=Ft(String.prototype.replace),qO=Ft(String.prototype.indexOf),ZO=Ft(String.prototype.trim),ro=Ft(Object.prototype.hasOwnProperty),jt=Ft(RegExp.prototype.test),Qs=jO(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Fh(e,t,o)}}function jO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Kh(e,n)}}function ye(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yf;JE&&JE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(IO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function $O(e){for(let t=0;t<e.length;t++)ro(e,t)||(e[t]=null);return e}function Mo(e){let t=eu(null);for(let[n,o]of lT(e))ro(e,n)&&(Array.isArray(o)?t[n]=$O(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Mo(o):t[n]=o);return t}function Ws(e,t){for(;e!==null;){let o=VO(e,t);if(o){if(o.get)return Ft(o.get);if(typeof o.value=="function")return Ft(o.value)}e=UO(e)}function n(){return null}return n}var tT=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qh=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Zh=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),FO=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jh=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),KO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),nT=$t(["#text"]),oT=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$h=$t(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iT=$t(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Vf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QO=Fn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),WO=Fn(/<%[\w\W]*|[\w\W]*%>/gm),JO=Fn(/\$\{[\w\W]*/gm),e3=Fn(/^data-[\-\w.\u00B7-\uFFFF]+$/),t3=Fn(/^aria-[\-\w]+$/),sT=Fn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),n3=Fn(/^(?:\w+script|data):/i),o3=Fn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),uT=Fn(/^html$/i),i3=Fn(/^[a-z][.\w]*(-[.\w]+)+$/i),aT=Object.freeze({__proto__:null,ARIA_ATTR:t3,ATTR_WHITESPACE:o3,CUSTOM_ELEMENT:i3,DATA_ATTR:e3,DOCTYPE_NAME:uT,ERB_EXPR:WO,IS_ALLOWED_URI:sT,IS_SCRIPT_OR_DATA:n3,MUSTACHE_EXPR:QO,TMPLIT_EXPR:JO}),Js={element:1,text:3,progressingInstruction:7,comment:8,document:9},a3=function(){return typeof window>"u"?null:window},r3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(r){return r},createScriptURL(r){return r}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},rT=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function cT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a3(),t=U=>cT(U);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Js.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:r,Node:l,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=s.prototype,b=Ws(v,"cloneNode"),x=Ws(v,"remove"),g=Ws(v,"nextSibling"),h=Ws(v,"childNodes"),m=Ws(v,"parentNode");if(typeof r=="function"){let U=n.createElement("template");U.content&&U.content.ownerDocument&&(n=U.content.ownerDocument)}let y,S="",{implementation:E,createNodeIterator:_,createDocumentFragment:w,getElementsByTagName:C}=n,{importNode:B}=o,M=rT();t.isSupported=typeof lT=="function"&&typeof m=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:I,TMPLIT_EXPR:T,DATA_ATTR:D,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:L}=aT,{IS_ALLOWED_URI:Y}=aT,G=null,X=ye({},[...tT,...qh,...Zh,...jh,...nT]),F=null,K=ye({},[...oT,...$h,...iT,...Vf]),$=Object.seal(eu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),le=null,W=null,j=Object.seal(eu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),te=!0,ge=!0,me=!1,re=!0,Q=!1,xe=!0,Ne=!1,_e=!1,et=!1,De=!1,we=!1,tt=!1,Be=!0,pn=!1,lo="user-content-",On=!0,nt=!1,_t={},We=null,so=ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Oo=null,kt=ye({},["audio","video","img","source","image","track"]),zo=null,ui=ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kn="http://www.w3.org/1998/Math/MathML",Lo="http://www.w3.org/2000/svg",ct="http://www.w3.org/1999/xhtml",Gt=ct,uo=!1,mn=null,Ya=ye({},[Kn,Lo,ct],Yh),zn=ye({},["mi","mo","mn","ms","mtext"]),co=ye({},["annotation-xml"]),Xa=ye({},["title","style","font","a","script"]),fo=null,ml=["application/xhtml+xml","text/html"],qa="text/html",$e=null,Ln=null,Za=n.createElement("form"),Qt=function(N){return N instanceof RegExp||N instanceof Function},ci=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ln&&Ln===N)){if((!N||typeof N!="object")&&(N={}),N=Mo(N),fo=ml.indexOf(N.PARSER_MEDIA_TYPE)===-1?qa:N.PARSER_MEDIA_TYPE,$e=fo==="application/xhtml+xml"?Yh:Yf,G=ro(N,"ALLOWED_TAGS")?ye({},N.ALLOWED_TAGS,$e):X,F=ro(N,"ALLOWED_ATTR")?ye({},N.ALLOWED_ATTR,$e):K,mn=ro(N,"ALLOWED_NAMESPACES")?ye({},N.ALLOWED_NAMESPACES,Yh):Ya,zo=ro(N,"ADD_URI_SAFE_ATTR")?ye(Mo(ui),N.ADD_URI_SAFE_ATTR,$e):ui,Oo=ro(N,"ADD_DATA_URI_TAGS")?ye(Mo(kt),N.ADD_DATA_URI_TAGS,$e):kt,We=ro(N,"FORBID_CONTENTS")?ye({},N.FORBID_CONTENTS,$e):so,le=ro(N,"FORBID_TAGS")?ye({},N.FORBID_TAGS,$e):Mo({}),W=ro(N,"FORBID_ATTR")?ye({},N.FORBID_ATTR,$e):Mo({}),_t=ro(N,"USE_PROFILES")?N.USE_PROFILES:!1,te=N.ALLOW_ARIA_ATTR!==!1,ge=N.ALLOW_DATA_ATTR!==!1,me=N.ALLOW_UNKNOWN_PROTOCOLS||!1,re=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=N.SAFE_FOR_TEMPLATES||!1,xe=N.SAFE_FOR_XML!==!1,Ne=N.WHOLE_DOCUMENT||!1,De=N.RETURN_DOM||!1,we=N.RETURN_DOM_FRAGMENT||!1,tt=N.RETURN_TRUSTED_TYPE||!1,et=N.FORCE_BODY||!1,Be=N.SANITIZE_DOM!==!1,pn=N.SANITIZE_NAMED_PROPS||!1,On=N.KEEP_CONTENT!==!1,nt=N.IN_PLACE||!1,Y=N.ALLOWED_URI_REGEXP||sT,Gt=N.NAMESPACE||ct,zn=N.MATHML_TEXT_INTEGRATION_POINTS||zn,co=N.HTML_INTEGRATION_POINTS||co,$=N.CUSTOM_ELEMENT_HANDLING||eu(null),N.CUSTOM_ELEMENT_HANDLING&&Qt(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Qt(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(ge=!1),we&&(De=!0),_t&&(G=ye({},nT),F=eu(null),_t.html===!0&&(ye(G,tT),ye(F,oT)),_t.svg===!0&&(ye(G,qh),ye(F,$h),ye(F,Vf)),_t.svgFilters===!0&&(ye(G,Zh),ye(F,$h),ye(F,Vf)),_t.mathMl===!0&&(ye(G,jh),ye(F,iT),ye(F,Vf))),j.tagCheck=null,j.attributeCheck=null,N.ADD_TAGS&&(typeof N.ADD_TAGS=="function"?j.tagCheck=N.ADD_TAGS:(G===X&&(G=Mo(G)),ye(G,N.ADD_TAGS,$e))),N.ADD_ATTR&&(typeof N.ADD_ATTR=="function"?j.attributeCheck=N.ADD_ATTR:(F===K&&(F=Mo(F)),ye(F,N.ADD_ATTR,$e))),N.ADD_URI_SAFE_ATTR&&ye(zo,N.ADD_URI_SAFE_ATTR,$e),N.FORBID_CONTENTS&&(We===so&&(We=Mo(We)),ye(We,N.FORBID_CONTENTS,$e)),N.ADD_FORBID_CONTENTS&&(We===so&&(We=Mo(We)),ye(We,N.ADD_FORBID_CONTENTS,$e)),On&&(G["#text"]=!0),Ne&&ye(G,["html","head","body"]),G.table&&(ye(G,["tbody"]),delete le.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Qs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Qs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=N.TRUSTED_TYPES_POLICY,S=y.createHTML("")}else y===void 0&&(y=r3(p,i)),y!==null&&typeof S=="string"&&(S=y.createHTML(""));$t&&$t(N),Ln=N}},Wi=ye({},[...qh,...Zh,...FO]),po=ye({},[...jh,...KO]),hl=function(N){let H=m(N);(!H||!H.tagName)&&(H={namespaceURI:Gt,tagName:"template"});let q=Yf(N.tagName),ce=Yf(H.tagName);return mn[N.namespaceURI]?N.namespaceURI===Lo?H.namespaceURI===ct?q==="svg":H.namespaceURI===Kn?q==="svg"&&(ce==="annotation-xml"||zn[ce]):!!Wi[q]:N.namespaceURI===Kn?H.namespaceURI===ct?q==="math":H.namespaceURI===Lo?q==="math"&&co[ce]:!!po[q]:N.namespaceURI===ct?H.namespaceURI===Lo&&!co[ce]||H.namespaceURI===Kn&&!zn[ce]?!1:!po[q]&&(Xa[q]||!Wi[q]):!!(fo==="application/xhtml+xml"&&mn[N.namespaceURI]):!1},It=function(N){Ks(t.removed,{element:N});try{m(N).removeChild(N)}catch{x(N)}},Qn=function(N,H){try{Ks(t.removed,{attribute:H.getAttributeNode(N),from:H})}catch{Ks(t.removed,{attribute:null,from:H})}if(H.removeAttribute(N),N==="is")if(De||we)try{It(H)}catch{}else try{H.setAttribute(N,"")}catch{}},Ji=function(N){let H=null,q=null;if(et)N="<remove></remove>"+N;else{let Re=Xh(N,/^[\r\n\t ]+/);q=Re&&Re[0]}fo==="application/xhtml+xml"&&Gt===ct&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");let ce=y?y.createHTML(N):N;if(Gt===ct)try{H=new f().parseFromString(ce,fo)}catch{}if(!H||!H.documentElement){H=E.createDocument(Gt,"template",null);try{H.documentElement.innerHTML=uo?S:ce}catch{}}let Ve=H.body||H.documentElement;return N&&q&&Ve.insertBefore(n.createTextNode(q),Ve.childNodes[0]||null),Gt===ct?C.call(H,Ne?"html":"body")[0]:Ne?H.documentElement:Ve},ja=function(N){return _.call(N.ownerDocument||N,N,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},fi=function(N){return N instanceof d&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof c)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},di=function(N){return typeof l=="function"&&N instanceof l};function hn(U,N,H){Fs(U,q=>{q.call(t,N,H,Ln)})}let $a=function(N){let H=null;if(hn(M.beforeSanitizeElements,N,null),fi(N))return It(N),!0;let q=$e(N.nodeName);if(hn(M.uponSanitizeElement,N,{tagName:q,allowedTags:G}),xe&&N.hasChildNodes()&&!di(N.firstElementChild)&&jt(/<[/\w!]/g,N.innerHTML)&&jt(/<[/\w!]/g,N.textContent)||xe&&N.namespaceURI===ct&&q==="style"&&di(N.firstElementChild)||N.nodeType===Js.progressingInstruction||xe&&N.nodeType===Js.comment&&jt(/<[/\w]/g,N.data))return It(N),!0;if(le[q]||!(j.tagCheck instanceof Function&&j.tagCheck(q))&&!G[q]){if(!le[q]&&mo(q)&&($.tagNameCheck instanceof RegExp&&jt($.tagNameCheck,q)||$.tagNameCheck instanceof Function&&$.tagNameCheck(q)))return!1;if(On&&!We[q]){let ce=m(N)||N.parentNode,Ve=h(N)||N.childNodes;if(Ve&&ce){let Re=Ve.length;for(let gt=Re-1;gt>=0;--gt){let ot=b(Ve[gt],!0);ot.__removalCount=(N.__removalCount||0)+1,ce.insertBefore(ot,g(N))}}}return It(N),!0}return N instanceof s&&!hl(N)||(q==="noscript"||q==="noembed"||q==="noframes")&&jt(/<\/no(script|embed|frames)/i,N.innerHTML)?(It(N),!0):(Q&&N.nodeType===Js.text&&(H=N.textContent,Fs([z,I,T],ce=>{H=ul(H,ce," ")}),N.textContent!==H&&(Ks(t.removed,{element:N.cloneNode()}),N.textContent=H)),hn(M.afterSanitizeElements,N,null),!1)},Wn=function(N,H,q){if(W[H]||Be&&(H==="id"||H==="name")&&(q in n||q in Za))return!1;if(!(ge&&!W[H]&&jt(D,H))){if(!(te&&jt(A,H))){if(!(j.attributeCheck instanceof Function&&j.attributeCheck(H,N))){if(!F[H]||W[H]){if(!(mo(N)&&($.tagNameCheck instanceof RegExp&&jt($.tagNameCheck,N)||$.tagNameCheck instanceof Function&&$.tagNameCheck(N))&&($.attributeNameCheck instanceof RegExp&&jt($.attributeNameCheck,H)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(H,N))||H==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&jt($.tagNameCheck,q)||$.tagNameCheck instanceof Function&&$.tagNameCheck(q))))return!1}else if(!zo[H]){if(!jt(Y,ul(q,O,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&N!=="script"&&qO(q,"data:")===0&&Oo[N])){if(!(me&&!jt(R,ul(q,O,"")))){if(q)return!1}}}}}}}return!0},mo=function(N){return N!=="annotation-xml"&&Xh(N,L)},ue=function(N){hn(M.beforeSanitizeAttributes,N,null);let{attributes:H}=N;if(!H||fi(N))return;let q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0},ce=H.length;for(;ce--;){let Ve=H[ce],{name:Re,namespaceURI:gt,value:ot}=Ve,ho=$e(Re),gl=ot,yt=Re==="value"?gl:ZO(gl);if(q.attrName=ho,q.attrValue=yt,q.keepAttr=!0,q.forceKeepAttr=void 0,hn(M.uponSanitizeAttribute,N,q),yt=q.attrValue,pn&&(ho==="id"||ho==="name")&&(Qn(Re,N),yt=lo+yt),xe&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){Qn(Re,N);continue}if(ho==="attributename"&&Xh(yt,"href")){Qn(Re,N);continue}if(q.forceKeepAttr)continue;if(!q.keepAttr){Qn(Re,N);continue}if(!re&&jt(/\/>/i,yt)){Qn(Re,N);continue}Q&&Fs([z,I,T],ou=>{yt=ul(yt,ou," ")});let yl=$e(N.nodeName);if(!Wn(yl,ho,yt)){Qn(Re,N);continue}if(y&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!gt)switch(p.getAttributeType(yl,ho)){case"TrustedHTML":{yt=y.createHTML(yt);break}case"TrustedScriptURL":{yt=y.createScriptURL(yt);break}}if(yt!==gl)try{gt?N.setAttributeNS(gt,Re,yt):N.setAttribute(Re,yt),fi(N)?It(N):eT(t.removed)}catch{Qn(Re,N)}}hn(M.afterSanitizeAttributes,N,null)},ae=function(N){let H=null,q=ja(N);for(hn(M.beforeSanitizeShadowDOM,N,null);H=q.nextNode();)hn(M.uponSanitizeShadowNode,H,null),$a(H),ue(H),H.content instanceof a&&ae(H.content);hn(M.afterSanitizeShadowDOM,N,null)};return t.sanitize=function(U){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,q=null,ce=null,Ve=null;if(uo=!U,uo&&(U="<!-->"),typeof U!="string"&&!di(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw Qs("dirty is not a string, aborting")}else throw Qs("toString is not a function");if(!t.isSupported)return U;if(_e||ci(N),t.removed=[],typeof U=="string"&&(nt=!1),nt){if(U.nodeName){let ot=$e(U.nodeName);if(!G[ot]||le[ot])throw Qs("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof l)H=Ji("<!---->"),q=H.ownerDocument.importNode(U,!0),q.nodeType===Js.element&&q.nodeName==="BODY"||q.nodeName==="HTML"?H=q:H.appendChild(q);else{if(!De&&!Q&&!Ne&&U.indexOf("<")===-1)return y&&tt?y.createHTML(U):U;if(H=Ji(U),!H)return De?null:tt?S:""}H&&et&&It(H.firstChild);let Re=ja(nt?U:H);for(;ce=Re.nextNode();)$a(ce),ue(ce),ce.content instanceof a&&ae(ce.content);if(nt)return U;if(De){if(Q){H.normalize();let ot=H.innerHTML;Fs([z,I,T],ho=>{ot=ul(ot,ho," ")}),H.innerHTML=ot}if(we)for(Ve=w.call(H.ownerDocument);H.firstChild;)Ve.appendChild(H.firstChild);else Ve=H;return(F.shadowroot||F.shadowrootmode)&&(Ve=B.call(o,Ve,!0)),Ve}let gt=Ne?H.outerHTML:H.innerHTML;return Ne&&G["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&jt(uT,H.ownerDocument.doctype.name)&&(gt="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
16
+ `+gt),Q&&Fs([z,I,T],ot=>{gt=ul(gt,ot," ")}),y&&tt?y.createHTML(gt):gt},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ci(U),_e=!0},t.clearConfig=function(){Ln=null,_e=!1},t.isValidAttribute=function(U,N,H){Ln||ci({});let q=$e(U),ce=$e(N);return Wn(q,ce,H)},t.addHook=function(U,N){typeof N=="function"&&Ks(M[U],N)},t.removeHook=function(U,N){if(N!==void 0){let H=YO(M[U],N);return H===-1?void 0:XO(M[U],H,1)[0]}return eT(M[U])},t.removeHooks=function(U){M[U]=[]},t.removeAllHooks=function(){M=rT()},t}var Qh=cT();var se=J(de(),1),l3=(0,se.jsx)("svg",{viewBox:"0 0 24 24",children:(0,se.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),s3=(0,se.jsx)("svg",{viewBox:"0 0 24 24",children:(0,se.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),u3=(0,se.jsx)("svg",{viewBox:"0 0 24 24",children:(0,se.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),c3=(0,se.jsx)("svg",{viewBox:"0 0 24 24",children:(0,se.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),fT=(0,se.jsx)("svg",{viewBox:"0 0 24 24",children:(0,se.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Xf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Wh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function dT(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function qf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,r]=un.default.useState("html"),[l,s]=un.default.useState(!1),u=un.default.useRef(null),c=un.default.useMemo(()=>$E(e.data),[e.data]),d=un.default.useMemo(()=>jE(e.data),[e.data]),f=un.default.useMemo(()=>FE(e.data),[e.data]),p=un.default.useMemo(()=>Uh(e.data),[e.data]),v=un.default.useMemo(()=>KE(e.data),[e.data]),[b,x]=un.default.useState(null);un.default.useEffect(()=>{if(x(null),!f||!n||c)return;let A=!1;return n(f).then(R=>{A||x(Uf(R)?R:null)}).catch(()=>{A||x(null)}),()=>{A=!0}},[f,n,c]);let g=c??b,h=d??b,m=un.default.useMemo(()=>QE(e.data,e.contentType,h??f),[e.data,e.contentType,h,f]),y=m==="application/pdf",S=m?.startsWith("image/")??!1,E=WE(m??e.contentType),{jsonString:_,jsonError:w}=un.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);un.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function C(A){let R=p||e.name;return(0,se.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,se.jsx)("div",{className:"stuff-viewer-local-file-icon",children:fT}),(0,se.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[R&&(0,se.jsx)("div",{className:"stuff-viewer-local-file-name",children:R}),(0,se.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function B(A){return(0,se.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,se.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,se.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function M(){if(a==="html"){if(y){if(o!==!1&&g){let R=g.includes("#")?g:`${g}#pagemode=none`;return(0,se.jsx)("div",{className:"stuff-viewer-pdf",children:(0,se.jsx)("embed",{src:R,type:"application/pdf"})})}if(h){let R=p||e.name;return(0,se.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:T,children:[(0,se.jsx)("div",{className:"stuff-viewer-local-file-icon",children:fT}),(0,se.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[R&&(0,se.jsx)("div",{className:"stuff-viewer-local-file-name",children:R}),(0,se.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return C("PDF")}return S?g?(0,se.jsx)("div",{className:"stuff-viewer-image",children:(0,se.jsx)("img",{src:g,alt:e.name??"(unnamed stuff)"})}):C("Image"):v!=null?(0,se.jsx)("iframe",{className:"stuff-viewer-html-frame",title:e.name?`${e.name} preview`:"HTML preview",sandbox:"",srcDoc:Qh.sanitize(v,{WHOLE_DOCUMENT:!0})}):e.dataHtml?(0,se.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:Qh.sanitize(e.dataHtml)}}):_?(0,se.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Xf(_)}}):w?B(w):(0,se.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,se.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Xf(_)}}):w?B(w):(0,se.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,se.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Xf(e.dataText)}}):_?(0,se.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Xf(_)}}):w?B(w):(0,se.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function z(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=v||e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function I(){if(S&&h){let A=m?.split("/")[1]||"png";dT(h,`${e.name||"stuff"}.${A}`);return}if(y&&h){dT(h,`${e.name||"stuff"}.pdf`);return}a==="json"?Wh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Wh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Wh(v||e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function T(){if(h){if(i){i(h,p??void 0);return}window.open(h,"_blank","noopener,noreferrer")}}let D=["stuff-viewer",t].filter(Boolean).join(" ");return(0,se.jsxs)("div",{className:D,children:[(0,se.jsxs)("div",{className:"stuff-viewer-header",children:[(0,se.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,se.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,se.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,se.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,se.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>r(A),children:A==="html"?E:A==="json"?"JSON":"Pretty"},A))}),(0,se.jsxs)("div",{className:"stuff-viewer-actions",children:[h&&(0,se.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:T,title:"Open in new window","aria-label":"Open in new window",children:c3}),(0,se.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${l?" stuff-viewer-action-btn--copied":""}`,onClick:z,title:"Copy","aria-label":"Copy",children:l?s3:l3}),(0,se.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:I,title:"Download","aria-label":"Download",children:u3})]})]}),(0,se.jsx)("div",{className:"stuff-viewer-content",ref:u,children:M()})]})}var pT=J(Et(),1);var Ha=J(de(),1);function mT({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:r=!0}){pT.default.useEffect(()=>{if(!e||!r)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,r,t]);let l=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,Ha.jsxs)("div",{className:l,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Ha.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Ha.jsxs)("div",{className:"detail-panel-content",children:[(0,Ha.jsx)("div",{className:"detail-panel-close-row",children:(0,Ha.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var ka=J(Et(),1),f3=.6;function hT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=ka.default.useState(e),[r,l]=ka.default.useState(!1),s=ka.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=ka.default.useRef(null),c=ka.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,p=f?Math.min(n,f*f3):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:p},l(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return ka.default.useEffect(()=>{if(!r)return;let d=p=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:x}=s.current,g=v-p.clientX,h=Math.max(t,Math.min(x,b+g));a(h),u.current=null})},f=()=>{l(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[r,t]),{width:i,isDragging:r,handleMouseDown:c}}var xT=J(Et(),1);var Zf=J(Et(),1),Ue=J(de(),1);function Jh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function ee({label:e,value:t}){return t==null?null:(0,Ue.jsxs)("div",{className:"detail-kv-row",children:[(0,Ue.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ue.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function eg({label:e,text:t}){return t?(0,Ue.jsxs)("div",{children:[(0,Ue.jsx)("div",{className:"detail-section-label",children:e}),(0,Ue.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var d3=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),p3=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),m3=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),h3=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),gT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function Mn({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Zf.useState)(!1),[a,r]=(0,Zf.useState)(!1),[l,s]=(0,Zf.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function p(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})}return(0,Ue.jsxs)("div",{children:[(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ue.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ue.jsx)("button",{onClick:()=>s(v=>!v),title:l?"Collapse prompt":"Expand prompt","aria-label":l?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:l?p3:d3}),(0,Ue.jsx)("button",{onClick:p,title:"Copy prompt","aria-label":"Copy prompt",style:{...gT,color:a?"#10b981":"#64748b"},children:a?h3:m3}),d&&(0,Ue.jsxs)("button",{onClick:()=>i(v=>!v),style:gT,children:[(0,Ue.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ue.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ue.jsx)("div",{className:`detail-prompt-block ${l?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Lt=J(de(),1);function tg({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,r=n.system_document_references&&n.system_document_references.length>0,l=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,p=l||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Lt.jsxs)(Lt.Fragment,{children:[(0,Lt.jsx)(ee,{label:"Model",value:p}),v&&v!==p&&(0,Lt.jsx)(ee,{label:"Model (object)",value:v}),(0,Lt.jsx)(ee,{label:"Structuring",value:d||e.structuring_method}),(0,Lt.jsx)(ee,{label:"Multiple Output",value:f}),(0,Lt.jsx)(ee,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Lt.jsx)(ee,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Lt.jsx)(ee,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Lt.jsx)(ee,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Lt.jsx)(ee,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),r&&(0,Lt.jsx)(ee,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Lt.jsx)(Mn,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Lt.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}var cn=J(de(),1);function ng({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(ee,{label:"Model",value:o||e.img_gen_choice}),(0,cn.jsx)(Mn,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,cn.jsx)(Mn,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,cn.jsx)(ee,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,cn.jsx)(ee,{label:"Output Format",value:e.output_format}),(0,cn.jsx)(ee,{label:"Background",value:e.background}),(0,cn.jsx)(ee,{label:"Is Raw",value:e.is_raw}),(0,cn.jsx)(ee,{label:"Seed",value:e.seed}),(0,cn.jsx)(ee,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}var fn=J(de(),1);function og({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(ee,{label:"Model",value:n||e.extract_choice}),(0,fn.jsx)(ee,{label:"Document Variable",value:e.document_stuff_name}),(0,fn.jsx)(ee,{label:"Caption Images",value:e.should_caption_images}),(0,fn.jsx)(ee,{label:"Max Page Images",value:e.max_page_images}),(0,fn.jsx)(ee,{label:"Include Page Views",value:e.should_include_page_views}),(0,fn.jsx)(ee,{label:"Page Views DPI",value:e.page_views_dpi}),(0,fn.jsx)(ee,{label:"Render JS",value:e.render_js}),(0,fn.jsx)(ee,{label:"Include Raw HTML",value:e.include_raw_html}),(0,fn.jsx)(ee,{label:"Image Variable",value:e.image_stuff_name})]})}var dn=J(de(),1);function ig({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(ee,{label:"Model",value:n||e.search_choice}),(0,dn.jsx)(Mn,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,dn.jsx)(ee,{label:"Max Results",value:e.max_results_override}),(0,dn.jsx)(ee,{label:"Include Images",value:e.include_images_override}),(0,dn.jsx)(ee,{label:"Structured Output",value:e.is_structured_output}),(0,dn.jsx)(ee,{label:"From Date",value:e.from_date}),(0,dn.jsx)(ee,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,dn.jsx)(ee,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,dn.jsx)(ee,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}var g3=["model","llm_handle","handle","llm_name","name"];function yT(e){if(typeof e!="string")return;let t=e.trim();return t.length>0?t:void 0}function vT(e){if(typeof e=="string")return yT(e);if(e&&typeof e=="object")for(let t of g3){let n=yT(e[t]);if(n)return n}}var Do=J(de(),1);function ag({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.is_multiple_output,i=t?.rendered_user_prompt,a=n||vT(e.llm_choice);return(0,Do.jsxs)(Do.Fragment,{children:[(0,Do.jsx)(ee,{label:"Model",value:a}),(0,Do.jsx)(ee,{label:"Text Variable",value:e.text_input_name}),(0,Do.jsx)(ee,{label:"Multiple Output",value:o}),(0,Do.jsx)(ee,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Do.jsx)(Mn,{label:"Prompt",templateText:void 0,renderedText:i})]})}var Le=J(de(),1);function y3(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var v3=60;function b3(e){return e.length>v3||e.includes(`
17
+ `)}function S3({label:e,value:t}){return(0,Le.jsxs)("div",{className:"detail-field-block",children:[(0,Le.jsx)("div",{className:"detail-field-block-label",children:e}),(0,Le.jsx)("div",{className:"detail-field-block-value",children:t})]})}function bT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[l,s]of Object.entries(e.fields))s.method==="template"?a.push([l,s]):s.method==="nested"?i.push([l,s]):o.push([l,s]);let r=t>0?{paddingLeft:t*12}:void 0;return(0,Le.jsxs)(Le.Fragment,{children:[o.map(([l,s])=>{let u=y3(s);return b3(u)?(0,Le.jsx)("div",{style:r,children:(0,Le.jsx)(S3,{label:l,value:u})},l):(0,Le.jsx)("div",{style:r,children:(0,Le.jsx)(ee,{label:l,value:u})},l)}),a.map(([l,s])=>{let u=n?.[l]?.rendered;return(0,Le.jsx)("div",{style:r,children:(0,Le.jsx)(Mn,{label:`Template \u2014 ${l}`,templateText:s.template??null,renderedText:u})},l)}),i.map(([l,s])=>s.nested?(0,Le.jsxs)("div",{children:[(0,Le.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,Le.jsx)("span",{className:"detail-nested-header-name",children:l}),(0,Le.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,Le.jsx)(bT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},l):null)]})}function rg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,r=a!==null&&Object.keys(a.fields).length>0;return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(ee,{label:"Mode",value:o||(r?"construct":"template")}),(0,Le.jsx)(ee,{label:"Category",value:e.category}),(0,Le.jsx)(ee,{label:"Templating Style",value:e.templating_style}),e.template&&(0,Le.jsx)(Mn,{label:"Template",templateText:e.template,renderedText:n}),r&&(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,Le.jsx)(bT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}var Pt=J(de(),1);function lg({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(eg,{label:"Expression",text:e.expression}),n&&(0,Pt.jsx)(ee,{label:"Expression Result",value:n}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Pt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Pt.jsx)("span",{className:"detail-kv-key",children:i}),(0,Pt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Pt.jsxs)("div",{className:"detail-kv-row",children:[(0,Pt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Pt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Pt.jsx)(ee,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}var ri=J(de(),1);function sg({blueprint:e}){return(0,ri.jsxs)("div",{children:[(0,ri.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,ri.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,ri.jsxs)("div",{className:"detail-step-item",children:[(0,ri.jsx)("span",{className:"detail-step-index",children:n+1}),(0,ri.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ri.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}var Dn=J(de(),1);function ug({blueprint:e}){return(0,Dn.jsxs)(Dn.Fragment,{children:[(0,Dn.jsxs)("div",{children:[(0,Dn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Dn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Dn.jsxs)("div",{className:"detail-step-item",children:[(0,Dn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Dn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Dn.jsx)(ee,{label:"Add Each Output",value:e.add_each_output}),(0,Dn.jsx)(ee,{label:"Combined Output",value:e.combined_output})]})}var li=J(de(),1);function cg({blueprint:e,executionData:t}){let n=t?.item_count;return(0,li.jsxs)(li.Fragment,{children:[(0,li.jsx)(ee,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,li.jsx)(ee,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,li.jsx)(ee,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,li.jsx)(ee,{label:"Items Processed",value:n})]})}var ST=new Set(["PipeLLM","PipeImgGen","PipeExtract","PipeSearch","PipeStructure","PipeCompose","PipeSequence","PipeParallel","PipeCondition","PipeBatch"]);function fg(e,t){return ST.has(e)?!t:!0}var oe=J(de(),1),x3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},_3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),E3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function _T({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=_3.has(o),a=S1(t),r=!a&&!x1(t),l=x3[o],s=e.status,u=E3[s]??"#6272a4",c=xT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let v=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,b=GE(t,v);if(b)return b;for(let[x,g]of Object.entries(t.pipe_registry))if(x.endsWith(`.${e.pipe_code}`))return g},[e.pipe_code,t]),d=e.io?.inputs??[],f=e.io?.outputs??[],p=c?.description??e.description;return(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsxs)("div",{className:"detail-sticky-header",children:[(0,oe.jsxs)("div",{className:"detail-header",children:[(0,oe.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:l}),(0,oe.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),!a&&(0,oe.jsxs)("div",{className:"detail-status",children:[(0,oe.jsx)("span",{className:"detail-status-dot",style:{background:u}}),(0,oe.jsx)("span",{className:"detail-status-label",style:{color:u},children:s}),e.timing?.duration!=null&&(0,oe.jsx)("span",{className:"detail-duration",children:Jh(e.timing.duration)})]}),p&&(0,oe.jsx)("div",{className:"detail-description",children:p}),d.length>0&&(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,oe.jsx)("div",{className:"detail-io-list",children:d.map((v,b)=>(0,oe.jsxs)("div",{className:"detail-io-pill",style:{cursor:v.concept&&n?"pointer":void 0},onClick:()=>v.concept&&n?.(v.concept),children:[(0,oe.jsx)("span",{className:"detail-io-name",children:v.name}),v.concept&&(0,oe.jsx)("span",{className:"detail-io-concept",children:v.concept})]},b))})]}),f.length>0&&(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,oe.jsx)("div",{className:"detail-io-list",children:f.map((v,b)=>(0,oe.jsxs)("div",{className:"detail-io-pill",style:{cursor:v.concept&&n?"pointer":void 0},onClick:()=>v.concept&&n?.(v.concept),children:[(0,oe.jsx)("span",{className:"detail-io-name",children:v.name}),v.concept&&(0,oe.jsx)("span",{className:"detail-io-concept",children:v.concept})]},b))})]}),(d.length>0||f.length>0)&&(0,oe.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),c&&(0,oe.jsx)(T3,{blueprint:c,executionData:r?e.execution_data:void 0}),r&&e.execution_data&&Object.keys(e.execution_data).length>0&&(0,oe.jsx)(N3,{executionData:e.execution_data,pipeType:o,hasBlueprint:!!c}),e.error&&(0,oe.jsxs)("div",{className:"detail-error",children:[(0,oe.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,oe.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,oe.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),r&&e.metrics&&Object.keys(e.metrics).length>0&&(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([v,b])=>(0,oe.jsx)(ee,{label:v,value:typeof b=="number"?b.toLocaleString():String(b)},v))]}),e.tags&&Object.keys(e.tags).length>0&&(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,oe.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([v,b])=>(0,oe.jsxs)("span",{className:"detail-tag",children:[(0,oe.jsxs)("span",{className:"detail-tag-key",children:[v,": "]}),(0,oe.jsx)("span",{className:"detail-tag-value",children:b})]},v))})]}),!c&&(0,oe.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function T3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,oe.jsx)(tg,{blueprint:e,executionData:t});case"PipeImgGen":return(0,oe.jsx)(ng,{blueprint:e,executionData:t});case"PipeCompose":return(0,oe.jsx)(rg,{blueprint:e,executionData:t});case"PipeExtract":return(0,oe.jsx)(og,{blueprint:e,executionData:t});case"PipeSearch":return(0,oe.jsx)(ig,{blueprint:e,executionData:t});case"PipeStructure":return(0,oe.jsx)(ag,{blueprint:e,executionData:t});case"PipeSequence":return(0,oe.jsx)(sg,{blueprint:e,executionData:t});case"PipeParallel":return(0,oe.jsx)(ug,{blueprint:e,executionData:t});case"PipeCondition":return(0,oe.jsx)(lg,{blueprint:e,executionData:t});case"PipeBatch":return(0,oe.jsx)(cg,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,oe.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function N3({executionData:e,pipeType:t,hasBlueprint:n}){return fg(t,n)?(0,oe.jsx)(C3,{data:e}):null}function C3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,oe.jsx)(ee,{label:n,value:String(o)},n))]})}var dg=J(Et(),1);var Se=J(de(),1);function pg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:r}){return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("div",{className:"detail-header",children:[(0,Se.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Se.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Se.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Se.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Se.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Se.jsx)(w3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},r??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function w3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let r=!!t&&!n,[l,s]=dg.default.useState(r?"data":"structure"),u=dg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Se.jsxs)("div",{children:[(0,Se.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Se.jsx)(A3,{schema:e.json_schema,isDryRun:n})]}):(0,Se.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!r)return f;let p=b=>{let x;switch(b.key){case"ArrowLeft":case"ArrowRight":x=l==="data"?"structure":"data";break;case"Home":x="data";break;case"End":x="structure";break;default:return}b.preventDefault(),s(x),document.getElementById(c(x))?.focus()},v=(b,x)=>(0,Se.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":l===b,"aria-controls":d(b),tabIndex:l===b?0:-1,className:`detail-tab ${l===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:p,children:x});return(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Se.jsx)("div",{role:"tabpanel",id:d(l),"aria-labelledby":c(l),children:l==="data"?(0,Se.jsx)(qf,{stuff:D3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function A3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Se.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([r])=>o.has(r)):i;return(0,Se.jsxs)("table",{className:"detail-schema-table",children:[(0,Se.jsx)("thead",{children:(0,Se.jsxs)("tr",{children:[(0,Se.jsx)("th",{children:"Field"}),(0,Se.jsx)("th",{children:"Type"}),(0,Se.jsx)("th",{}),(0,Se.jsx)("th",{children:"Description"})]})}),(0,Se.jsx)("tbody",{children:a.map(([r,l])=>(0,Se.jsxs)("tr",{children:[(0,Se.jsx)("td",{className:"detail-schema-field",children:r}),(0,Se.jsx)("td",{className:"detail-schema-type",children:M3(l)}),(0,Se.jsx)("td",{children:o.has(r)&&(0,Se.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Se.jsx)("td",{children:l.description??""})]},r))})]})}function M3(e){return typeof e.type=="string"?e.type:Array.isArray(e.type)?e.type.join(" | "):e.anyOf?"union":e.allOf?"all":typeof e.$ref=="string"?e.$ref.split("/").pop()??"(unresolved type)":"(unresolved type)"}function D3(e){return R3(e)?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function R3(e){return"contentType"in e||"dataText"in e||"dataHtml"in e}function ET(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function cl(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}var O3=7,z3=48,L3=140;function B3(e,t,n){let o=[],i=[],a=Eo(e),r=new Set;for(let c of e.edges)c.kind==="parallel_combine"&&c.target_stuff_digest&&r.add(c.target_stuff_digest);let l=new Set;for(let c of Object.values(t.stuffProducers))l.add(c);for(let c of Object.values(t.stuffConsumers))for(let d of c)l.add(d);for(let c of e.nodes){if(!l.has(c.id))continue;let d=Yr(c,`nodes[${c.id}]`),f=d.status==="failed",p=d.pipe_code,v=Gf(d,a);o.push({id:d.id,type:Ur,data:{labelDescriptor:{kind:"pipe",label:p,isFailed:f},nodeData:d,isPipe:!0,isStuff:!1,labelText:p,pipeCode:v.pipeCode,pipeType:d.pipe_type,graphMode:a,pipeCardData:v},position:{x:0,y:0}})}for(let[c,d]of Object.entries(t.stuffRegistry)){let f=Ui(c),p=d.name,v=d.concept||"",b=Math.max(p.length,v.length)*O3+z3,x=Math.max(L3,b),g=r.has(c),h=!t.stuffProducers[c]&&!g,m=!h&&!g&&!t.stuffConsumers[c]?.length,y=g?"combined":h?"input":m?"output":void 0,S=h?"var(--color-stuff-input-border, #50FA7B)":m?"var(--color-stuff-output-border, #a78bfa)":g?"var(--color-parallel-combine)":"var(--color-stuff-border)";o.push({id:f,type:v1,data:{labelDescriptor:{kind:"stuff",label:p,concept:v},isStuff:!0,isPipe:!1,labelText:p,stuffRole:y,stuffDigest:c},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${S}`,borderRadius:"999px",padding:"0",width:x+"px",boxShadow:"var(--shadow-md)"}})}let s=0;for(let[c,d]of Object.entries(t.stuffProducers)){let f=Ui(c);i.push({id:"edge_"+s++,source:d,target:f,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:xa,color:"var(--color-edge)"}})}for(let[c,d]of Object.entries(t.stuffConsumers)){let f=Ui(c);for(let p of d)i.push({id:"edge_"+s++,source:f,target:p,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:xa,color:"var(--color-edge)"}})}for(let c of e.edges){if(c.kind!=="parallel_combine"||!c.source_stuff_digest||!c.target_stuff_digest||!t.stuffRegistry[c.source_stuff_digest]||!t.stuffRegistry[c.target_stuff_digest])continue;let d=Ui(c.source_stuff_digest),f=Ui(c.target_stuff_digest);i.push({id:c.id,source:d,target:f,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:xa,color:"var(--color-parallel-combine)"}})}for(let c of e.edges){if(c.kind!=="batch_item"&&c.kind!=="batch_aggregate"||!c.source_stuff_digest||!c.target_stuff_digest||!t.stuffRegistry[c.source_stuff_digest]||!t.stuffRegistry[c.target_stuff_digest])continue;let d=Ui(c.source_stuff_digest),f=Ui(c.target_stuff_digest),p=c.kind==="batch_item";i.push({id:c.id,source:d,target:f,type:n,animated:!1,_batchEdge:!0,label:c.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:p?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:p?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:xa,color:p?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let u=$n(e,t);for(let c of i){let d=u[c.source]||null,f=u[c.target]||null;d&&f&&d!==f&&(c._crossGroup=!0,c.style={...c.style,strokeWidth:1.5,opacity:.65})}for(let c of i)c._batchEdge&&(c.style={...c.style,opacity:.7});return{nodes:o,edges:i}}function TT(e,t){if(e){let n=kE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:B3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}var P3=window.ELK,NT=P3;function H3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var k3="_in",G3="_out";function hg(e){return e+k3}function gg(e){return e+G3}function I3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],r=n==="LR"||n==="RL",l=r?n==="LR"?0:t.width:t.width/2,s=r?t.height/2:n==="TB"?0:t.height,u=r?n==="LR"?t.width:0:t.width/2,c=r?t.height/2:n==="TB"?t.height:0;return[{id:hg(e),x:l,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:gg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var U3=320,MT=28,V3=24,mg=8,Y3=22,X3=50,q3=16,Z3=3,CT=38,wT=30,jf=22,j3=140,$3=100,F3=17,K3=58,Q3=5.5,W3=5,J3=4.5,e4=4;function t4(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-MT,i=Math.max(1,Math.floor(o/Q3)),a=Math.ceil(e.length/i);return Math.min(Z3,Math.max(1,a))}function n4(e,t){let n=Math.min(j3,Math.ceil(e.length*W3)),o=Math.min($3,Math.ceil(t.length*J3));return n+o+F3}function AT(e,t){if(e.length===0)return 0;let n=t-MT-K3,o=1,i=0;for(let a of e){let r=n4(a.name,a.concept);if(i===0){i=r;continue}i+r<=n?i+=r:(o+=1,i=r)}return o}function fl(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Ur,r=t?180:280,l=t?240:400,s=Math.max(180,Math.min(l,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=l:u=Math.max(a?r:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],p=d.outputs??[],v=d.description||n.nodeData?.description||"",b=V3+(t?X3:Y3),x=t4(v,t,u);x>0&&(b+=mg+x*q3);let g=f.slice(0,e4);if(g.length>0)if(b+=mg,t)b+=CT+(g.length-1)*jf;else{let h=AT(g,u);b+=wT+(h-1)*jf}if(p.length>0)if(b+=mg,t)b+=CT+(p.length-1)*jf;else{let h=AT(p,u);b+=wT+(h-1)*jf}c=Math.min(U3,b)}else c=a?120:70;return{width:u,height:c}}function o4(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let r=t[a]||[],l=-1;for(let s of r)e.has(s)&&(l=Math.max(l,i(s)));return o.delete(a),n[a]=l+1,n[a]}for(let a of e)i(a);return n}function $f(e,t,n){return{id:e,width:t.width,height:t.height,ports:I3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function DT(e,t,n,o,i,a){let r=i==="LR"||i==="RL",l=a?.nodesep??80,s=a?.ranksep??70,u=H3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(l),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let S={},E=e.map(w=>{let C=fl(w,r);return S[w.id]=C,$f(w.id,C,i)}),_=t.map(w=>({id:w.id,sources:[gg(w.source)],targets:[hg(w.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:E,edges:_},dimensionMap:S}}let f=$n(n,o),p=o4(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let S of e)b.set(S.id,S);let x={},g=Array.from(o.controllerNodeIds);g.sort((S,E)=>(p[S]??0)-(p[E]??0));for(let S of g){let _=1+(p[S]??0)*.15,w=Math.round(Pc*_),C=Math.round(Hc*_),B=Math.round(kc*_),M={"elk.padding":`[top=${C},left=${w},bottom=${B},right=${w}]`,"elk.spacing.nodeNode":String(l),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],I=o.containmentTree[S]||[];for(let T of I)if(o.controllerNodeIds.has(T)){let D=x[T];D&&z.push(D)}else{let D=b.get(T);if(D){let A=fl(D,r);v[T]=A,z.push($f(T,A,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===S&&!z.some(D=>D.id===T.id)){let D=fl(T,r);v[T.id]=D,z.push($f(T.id,D,i))}x[S]={id:S,layoutOptions:M,children:z}}let h=[];for(let S of g)if(!f[S]){let E=x[S];E&&h.push(E)}for(let S of e)if(!f[S.id]&&!o.controllerNodeIds.has(S.id)){let E=fl(S,r);v[S.id]=E,h.push($f(S.id,E,i))}let m=new Set(e.map(S=>S.id)),y=t.filter(S=>m.has(S.source)&&m.has(S.target)).map(S=>({id:S.id,sources:[gg(S.source)],targets:[hg(S.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:h,edges:y},dimensionMap:v}}function RT(e){let t={};function n(o,i,a){let r=i+(o.x??0),l=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:r,y:l,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,r,l)}return n(e,0,0),t}var yg=null;function i4(){return yg||(yg=new NT),yg}async function Ff(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let r=n==="LR"||n==="RL",{elkGraph:l,dimensionMap:s}=DT(e,t,i??null,a??null,n,o),u=await i4().layout(l),c=RT(u),d={};if(a)for(let p of a.controllerNodeIds)c[p]&&(d[p]=c[p]);return{nodes:e.map(p=>{let v=c[p.id],b=s[p.id]??fl(p,r),x=b.width,g=b.height,h=p.data.pipeCardData,y=h?{...h,direction:r?"LR":"TB"}:void 0;return{...p,data:{...p.data,_estimatedWidth:x,_estimatedHeight:g,pipeCardData:y},style:{...p.style,width:x+"px",height:g+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:r?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:r?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var tu=5;function a4(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let r of t[a]||[])o.add(r),n.has(r)&&i.push(r)}return o}function r4(e,t,n,o){let i={},a=Eo(e);for(let b of n)i[b.id]=b;let r={};for(let b of e.nodes)t.controllerNodeIds.has(b.id)&&(r[b.id]=Yr(b,`nodes[${b.id}]`));let l={},s=new Set;function u(b){if(l[b]!==void 0)return l[b];if(s.has(b))throw new Error(`Cycle detected in containment tree: controller "${b}" is part of a containment cycle`);s.add(b);let x=t.containmentTree[b]||[],g=-1;for(let h of x)t.controllerNodeIds.has(h)&&(g=Math.max(g,u(h)));return s.delete(b),l[b]=g+1,l[b]}let c=$n(e,t),d={};for(let[b,x]of Object.entries(c))Vr(b)&&i[b]&&(d[x]||(d[x]=[]),d[x].push(b));let f=Array.from(t.controllerNodeIds);for(let b of f)u(b);f.sort((b,x)=>l[b]-l[x]);let p=[],v={};for(let b of f){let g=(t.containmentTree[b]||[]).filter(z=>i[z]),h=d[b]||[],m=[...g,...h];if(m.length===0)continue;let y,S,E,_,w=o?.[b];if(w)y=w.x,S=w.y,E=w.width,_=w.height;else{let z=1/0,I=1/0,T=-1/0,D=-1/0;for(let G of m){let X=i[G],F=X.position,K=T1(X),$=N1(X);z=Math.min(z,F.x),I=Math.min(I,F.y),T=Math.max(T,F.x+K),D=Math.max(D,F.y+$)}let R=1+(l[b]??0)*.15,O=Math.round(Pc*R),L=Math.round(Hc*R),Y=Math.round(kc*R);y=z-O,S=I-L,E=T-z+2*O,_=D-I+L+Y}let C=r[b];if(!C)throw new Ss(`nodes[${b}]`,`controller "${b}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let B=C.pipe_code,M={id:b,type:b1,data:{label:B,pipeType:C.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:B,labelText:B,graphMode:a},position:{x:y,y:S},style:{width:E+"px",height:_+"px",padding:"0"}};p.push(M),i[b]=M;for(let z of m)v[z]=b}for(let[b,x]of Object.entries(v)){let g=i[b],h=i[x];!g||!h||(g.position={x:g.position.x-h.position.x,y:g.position.y-h.position.y},g.parentId=x,g.extent="parent")}return p}function Ga(e,t,n,o,i,a,r,l,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let y of n.nodes)o.controllerNodeIds.has(y.id)&&(d[y.id]=y.pipe_type);for(let y of o.controllerNodeIds){let S=o.containmentTree[y]||[];u[y]=S.length;let E=d[y];(E==="PipeParallel"||E==="PipeBatch")&&S.length>tu&&!a?.has(y)&&c.add(y)}let f=e,p=t;if(c.size>0){let y=new Set;for(let E of c){let w=(o.containmentTree[E]||[]).slice(tu);for(let C of w)if(y.add(C),o.controllerNodeIds.has(C))for(let B of a4(C,o.containmentTree,o.controllerNodeIds))y.add(B)}let S=$n(n,o);for(let E of e){if(!Vr(E.id)||y.has(E.id))continue;let _=S[E.id];if(!_||!c.has(_)&&!y.has(_))continue;let w=t.filter(C=>{if(C.source!==E.id&&C.target!==E.id)return!1;let B=C.source===E.id?C.target:C.source;return!Vr(B)});(w.length===0||w.every(C=>{let B=C.source===E.id?C.target:C.source;return y.has(B)}))&&y.add(E.id)}f=e.filter(E=>!y.has(E.id)),p=t.filter(E=>!y.has(E.source)&&!y.has(E.target))}let v=r4(n,o,f,l);if(v.length===0)return{nodes:f,edges:p};for(let y of v){let S=u[y.id]??0,E=c.has(y.id);if(y.data.childCount=S,y.data.isCollapsed=E,r){let _=y.id;y.data.onToggleCollapse=()=>r(_)}if(s){let _=y.id;y.data.onToggleFold=w=>s(_,w)}}let b=[...v,...f],x={};for(let y of b)x[y.id]=y;let g={},h=new Set;function m(y){if(g[y]!==void 0)return g[y];if(h.has(y))throw new Error(`Cycle detected in node parent chain: node "${y}" references itself as an ancestor`);h.add(y);let S=x[y];return g[y]=S&&S.parentId?1+m(S.parentId):0,h.delete(y),g[y]}for(let y of b)m(y.id);return b.sort((y,S)=>g[y.id]-g[S.id]),{nodes:b,edges:p}}var OT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},l4={...OT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},s4={...OT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function Kf(e){return e===Sa.LIGHT?s4:l4}var Ia={direction:"LR",showControllers:!1,foldMode:no.EXPANDED,theme:St.SYSTEM,toolbarPosition:Je.TOP_RIGHT,nodesep:50,ranksep:100,edgeType:Bc.DEFAULT,initialZoom:null,panToTop:!0};var Ua=J(de(),1);function u4(e){return e.kind==="pipe"?(0,Ua.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ua.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ua.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ua.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ua.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function zT(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:u4(t.data.labelDescriptor)}}:t)}var dl=J(Et(),1);var Rn=J(de(),1);function Qf(e,t){let n=t===1?"1 issue":`${t} issues`;switch(e){case ln.VALIDATING:return t>0?`Validating method\u2026 \u2014 ${n}`:"Validating method\u2026";case ln.VALID:return t>0?`Method is valid \u2014 ${n}`:"Method is valid";case ln.INVALID:return`Method is invalid \u2014 ${n}`;case ln.ERROR:return"Validation could not run";default:return e}}function LT(e){switch(e){case Je.TOP_LEFT:case Je.TOP_CENTER:return"down-start";case Je.TOP_RIGHT:return"down-end";case Je.BOTTOM_LEFT:case Je.BOTTOM_CENTER:return"up-start";case Je.BOTTOM_RIGHT:return"up-end";case Je.CENTER_LEFT:return"side-end";case Je.CENTER_RIGHT:return"side-start";default:return e}}function c4(e){switch(e){case ln.VALIDATING:return"Validating\u2026";case ln.VALID:return"No issues found.";case ln.INVALID:return"No details available.";case ln.ERROR:return"Validation could not run.";default:return e}}function BT({state:e,issues:t,onIssueClick:n,placement:o,id:i}){return(0,Rn.jsxs)("div",{id:i,className:`graph-validation-panel graph-validation-panel--${o}`,role:"region","aria-label":"Validation issues",children:[(0,Rn.jsx)("div",{className:"graph-validation-panel-header",children:Qf(e,t.length)}),t.length===0?(0,Rn.jsx)("div",{className:"graph-validation-empty",children:c4(e)}):(0,Rn.jsx)("ul",{className:"graph-validation-issues",role:"list",children:t.map((a,r)=>{let l=n!==void 0,s=(a.context||a.file)&&(0,Rn.jsxs)("div",{className:"graph-validation-issue-meta",children:[a.context&&(0,Rn.jsx)("span",{className:"graph-validation-issue-context",children:a.context}),a.file&&(0,Rn.jsx)("span",{className:"graph-validation-issue-file",children:a.file})]});return(0,Rn.jsx)("li",{className:`graph-validation-issue graph-validation-issue--${a.severity}`+(l?" graph-validation-issue--clickable":""),children:(0,Rn.jsxs)("div",{className:"graph-validation-issue-body",role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>n(r,a):void 0,onKeyDown:l?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),n(r,a))}:void 0,children:[s,(0,Rn.jsx)("div",{className:"graph-validation-issue-message",children:a.message}),a.suggestedFix&&(0,Rn.jsx)("div",{className:"graph-validation-issue-fix",children:a.suggestedFix})]})},r)})})]})}var Z=J(de(),1),f4=15;var d4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Z.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),p4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),m4=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),h4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),g4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,Z.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,Z.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,Z.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),y4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,Z.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,Z.jsx)("path",{d:"m7 16.5 5-3"}),(0,Z.jsx)("path",{d:"M7 16.5v5.17"}),(0,Z.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,Z.jsx)("path",{d:"m17 16.5-5-3"}),(0,Z.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,Z.jsx)("path",{d:"M17 16.5v5.17"}),(0,Z.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,Z.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,Z.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,Z.jsx)("path",{d:"M12 13.5V8"})]}),v4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,Z.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,Z.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,Z.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,Z.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),b4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,Z.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,Z.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,Z.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,Z.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),S4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,Z.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,Z.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,Z.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,Z.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,Z.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,Z.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),x4=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),_4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,Z.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,Z.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),E4=(0,Z.jsx)("svg",{className:"graph-toolbar-validation-spin",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),T4=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("polyline",{points:"20 6 9 17 4 12"})}),N4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,Z.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,Z.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),C4=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),(0,Z.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,Z.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]});function w4(e){switch(e){case ln.VALIDATING:return E4;case ln.VALID:return T4;case ln.INVALID:return N4;case ln.ERROR:return C4;default:return e}}var vg=[St.SYSTEM,St.LIGHT,St.DARK];function HT(e){let t=vg.indexOf(e);return vg[(t+1)%vg.length]}function A4(e){return e===St.LIGHT?S4:e===St.DARK?x4:_4}function PT(e){let t={[St.SYSTEM]:"system",[St.LIGHT]:"light",[St.DARK]:"dark"},n=HT(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function kT({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:r,onFoldAll:l,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:p=0,position:v,validationState:b,validationIssues:x=[],onValidationIssueClick:g,validationOpen:h=!1,onValidationOpenChange:m}){let y=d!==void 0&&f!==void 0,S=_1(v),E=m??(()=>{}),_=dl.default.useRef(E);_.current=E;let w=dl.default.useRef(null),C=dl.default.useId();dl.default.useEffect(()=>{b===void 0&&_.current(!1)},[b]),dl.default.useEffect(()=>{if(!h)return;let O=Y=>{let G=w.current;G&&Y.target instanceof Node&&!G.contains(Y.target)&&_.current(!1)},L=Y=>{Y.key==="Escape"&&_.current(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",L)}},[h]);let M=E1(v)==="right"&&p>0?{marginRight:f4+p}:void 0,z=e===Cn.TB||e===Cn.BT,I=z?"Switch to horizontal layout":"Switch to vertical layout",T=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",D=l||s,A=u?"Fold all controllers (nothing to fold)":"Fold all controllers",R=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,Z.jsx)(sl,{position:v,className:"graph-toolbar-panel",style:M,children:(0,Z.jsxs)("div",{className:`graph-toolbar graph-toolbar--${S}`,children:[b!==void 0&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"graph-toolbar-validation",ref:w,children:[(0,Z.jsxs)("button",{type:"button",className:`graph-toolbar-btn graph-toolbar-validation-btn graph-toolbar-validation-btn--${b}`,onClick:()=>E(!h),title:Qf(b,x.length),"aria-label":Qf(b,x.length),"aria-expanded":h,"aria-haspopup":"true","aria-controls":C,children:[w4(b),x.length>0&&(0,Z.jsx)("span",{className:"graph-toolbar-validation-badge",children:x.length>99?"99+":x.length})]}),h&&(0,Z.jsx)(BT,{id:C,state:b,issues:x,onIssueClick:g,placement:LT(v)})]}),(0,Z.jsx)("div",{className:"graph-toolbar-separator"})]}),l&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,disabled:u,title:A,"aria-label":A,children:v4}),s&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:R,"aria-label":R,children:b4}),D&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:T,"aria-label":T,children:y4}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(z?Cn.LR:Cn.TB),title:I,"aria-label":I,children:z?d4:p4}),(a||i||r)&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:m4}),i&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:h4}),r&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,title:"Fit view","aria-label":"Fit view",children:g4}),y&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(HT(d)),title:PT(d),"aria-label":PT(d),children:A4(d)})]})]})})}var bg=J(de(),1);function Wf({validation:e,onClick:t}){let n=`${e.count} validation ${e.count===1?"issue":"issues"}`,o=e.lines.join(`
18
+ `),i=`node-validation-badge node-validation-badge--${e.severity}`,a=e.count>99?"99+":String(e.count);return t?(0,bg.jsx)("button",{type:"button",className:i,title:o,"aria-label":`${n} \u2014 open validation panel`,onClick:r=>{r.stopPropagation(),t()},children:a}):(0,bg.jsx)("span",{className:i,title:o,"aria-label":n,children:a})}function Jf(e){return e?` node-validation-ring--${e.severity}`:""}var Ro=J(de(),1),M4={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function D4(e){return e?M4[e]:{badge:"",icon:""}}function R4(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function O4({data:e}){let t=D4(e.pipeType),n=R4(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>tu,i=o?(e.childCount??0)-tu:0;return(0,Ro.jsxs)("div",{className:`controller-group-node ${n}${Jf(e.validation)}`,children:[(0,Ro.jsxs)("div",{className:"controller-group-header",children:[(0,Ro.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,Ro.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,Ro.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,Ro.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"}),e.validation&&(0,Ro.jsx)(Wf,{validation:e.validation,onClick:e.onValidationBadgeClick})]}),o&&(0,Ro.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var GT={controllerGroup:O4};var IT=J(Et(),1);var Ge=J(de(),1),z4={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeStructure:"Structure",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},L4={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function B4(e){return e in L4}var P4={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},Sg=4;function H4(e){return z4[e]}function Kt({data:e,children:t}){let n=H4(e.pipeType),o=P4[e.status],i=e.status==="running",a=B4(e.pipeType),r=e.pipeType==="PipeSignature",l=e.graphMode==="static",s=l?e.tags?.outcome:void 0,u=l?e.tags?.batch_multiplicity:void 0,[c,d]=(0,IT.useState)(!1),f=e.inputs.length>Sg,p=f&&!c?e.inputs.slice(0,Sg):e.inputs,v=e.inputs.length-Sg,b=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",x=a?" pipe-card--controller":"",g=r?" pipe-card--signature":"",h=l?" pipe-card--static":"",m=a?"pipe-card-badge pipe-card-badge--controller":r?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge",y=Jf(e.validation);return(0,Ge.jsxs)("div",{className:`pipe-card ${b}${x}${g}${h}${y}`,children:[(0,Ge.jsxs)("div",{className:"pipe-card-header",children:[(0,Ge.jsx)("span",{className:m,children:n}),(0,Ge.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),!l&&(0,Ge.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Ge.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Ge.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"}),e.validation&&(0,Ge.jsx)(Wf,{validation:e.validation,onClick:e.onValidationBadgeClick})]}),(s||u)&&(0,Ge.jsxs)("div",{className:"pipe-card-annotations",children:[s&&(0,Ge.jsxs)("span",{className:"pipe-card-annotation pipe-card-annotation--outcome",children:["outcome: ",s]}),u&&(0,Ge.jsx)("span",{className:"pipe-card-annotation pipe-card-annotation--batch",children:u})]}),e.description&&(0,Ge.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Ge.jsxs)("div",{className:"pipe-card-io",children:[(0,Ge.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Ge.jsxs)("div",{className:"pipe-card-io-pills",children:[p.map(S=>(0,Ge.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Ge.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Ge.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),f&&(0,Ge.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),d(E=>!E)},children:c?"show less":`+${v} more`})]})]}),e.outputs.length>0&&(0,Ge.jsxs)("div",{className:"pipe-card-io",children:[(0,Ge.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Ge.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Ge.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Ge.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Ge.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var k4={PipeLLM:Kt,PipeExtract:Kt,PipeCompose:Kt,PipeImgGen:Kt,PipeSearch:Kt,PipeFunc:Kt,PipeStructure:Kt,PipeSignature:Kt,PipeSequence:Kt,PipeParallel:Kt,PipeCondition:Kt,PipeBatch:Kt};function UT(e){return k4[e]}var si=J(de(),1);function G4({data:e}){let t=UT(e.pipeType)??Kt;return(0,si.jsx)(t,{data:e})}function VT({data:e,sourcePosition:t=ne.Bottom,targetPosition:n=ne.Top}){let o=e.pipeCardData;return o?(0,si.jsxs)(si.Fragment,{children:[(0,si.jsx)(Pa,{type:"target",position:n}),(0,si.jsx)(G4,{data:o}),(0,si.jsx)(Pa,{type:"source",position:t})]}):null}var Ht=J(de(),1),I4={...GT,pipeCard:VT};function U4({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let r=t.concept&&n?Gh(n,t.concept):void 0,l=Eo(n)===Lc.DRY;return(0,Ht.jsx)(Ht.Fragment,{children:r?(0,Ht.jsx)(pg,{concept:r,ioData:t,isDryRun:l,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):l?(0,Ht.jsx)("div",{className:"detail-not-available",children:"Dry run data hidden"}):(0,Ht.jsx)(qf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function V4(e,t){return e===no.FOLDED?new Set(t):new Set}function Y4(e,t){return e??t??Ia.theme??St.SYSTEM}function xg(e,t){return e===St.SYSTEM?t:e}function X4(e,t){return e??t??Ia.toolbarPosition}function YT(e){return e?.replace(/\s*\bnode-validation-flash\b/,"")||void 0}function pl(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function q4(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{if(n.data.graphMode==="static"||n.data.pipeCardData?.graphMode==="static")return n;let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function XT(e){let{graphspec:t,config:n=Ia,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:r=!1,theme:l,toolbarPosition:s,systemTheme:u,showThemeToggle:c=!0,onThemeChange:d,onNavigateToPipe:f,onStuffNodeClick:p,onReactFlowInit:v,statusMap:b,onNodeSelect:x,onPaneClick:g,renderDetailExtra:h,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:S,validationState:E,validationIssues:_,onValidationIssueClick:w}=e,C=ie.default.useMemo(()=>t===null?null:Gc(t),[t]),[B,M]=ie.default.useState(()=>o??n.direction??Ia.direction??Cn.TB),z=Y4(l,n.theme),[I,T]=ie.default.useState(z),D=ie.default.useRef(z);ie.default.useEffect(()=>{z!==D.current&&(D.current=z,T(z))},[z]);let A=HE(u),R=xg(I,A),O=ie.default.useRef(d);O.current=d;let L=ie.default.useRef({mode:I,resolvedTheme:R});ie.default.useEffect(()=>{let ue=L.current;(ue.mode!==I||ue.resolvedTheme!==R)&&(L.current={mode:I,resolvedTheme:R},O.current?.(I,R))},[I,R]);let Y=a??n.foldMode??Ia.foldMode??no.EXPANDED,[G,X]=ie.default.useState(()=>Y===no.FOLDED?!0:i??n.showControllers??Ia.showControllers??!1),F=ie.default.useRef(Y);F.current=Y;let K=ie.default.useRef(null),[$,le]=ie.default.useState(null),[W,j]=ie.default.useState(null),{width:te,isDragging:ge,handleMouseDown:me}=hT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:K});ie.default.useEffect(()=>{le(null),j(null)},[C]),ie.default.useEffect(()=>{let ue=K.current;if(!ue)return;let ae=Kf(R),U=n.paletteColors,N=U?{...ae,...U}:ae;for(let[H,q]of Object.entries(N))ue.style.setProperty(H,q);return()=>{for(let H of Object.keys(N))ue.style.removeProperty(H)}},[n.paletteColors,R]);let[re,Q,xe]=DE([]),[Ne,_e,et]=RE([]),De=ie.default.useRef(null),we=ie.default.useRef(null),tt=ie.default.useRef(null),Be=ie.default.useRef(null),[pn,lo]=ie.default.useState(new Set),On=ie.default.useCallback(ue=>{lo(ae=>{let U=new Set(ae);return U.has(ue)?U.delete(ue):U.add(ue),U})},[]),[nt,_t]=ie.default.useState(new Set),We=ie.default.useCallback((ue,ae)=>{_t(U=>{let N=new Set(U),H=!N.has(ue),q=tt.current,ce=!ae?.soloMode&&q?.graphspec&&q.analysis?UE(ue,q.graphspec,q.analysis.controllerNodeIds):new Set([ue]);for(let Ve of ce)H?N.add(Ve):N.delete(Ve);return N})},[]),so=n.edgeType||Bc.DEFAULT,Oo=ie.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),kt=ie.default.useRef(G);kt.current=G;let zo=ie.default.useRef(B);zo.current=B;let ui=ie.default.useRef(Oo);ui.current=Oo;let Kn=ie.default.useRef(n.initialZoom);Kn.current=n.initialZoom;let Lo=ie.default.useRef(n.panToTop);Lo.current=n.panToTop;let ct=ie.default.useRef(pn);ct.current=pn;let Gt=ie.default.useRef(On);Gt.current=On;let uo=ie.default.useRef(nt);uo.current=nt;let mn=ie.default.useRef(We);mn.current=We;let Ya=ie.default.useRef(!0),zn=ie.default.useRef(0),co=ie.default.useRef(!1),Xa=ie.default.useRef(b);Xa.current=b;let fo=ie.default.useRef(_);fo.current=_;let[ml,qa]=ie.default.useState(!1),$e=ie.default.useCallback(()=>qa(!0),[]),Ln=E!==void 0&&!r,Za=ie.default.useRef(Ln);Za.current=Ln;let Qt=ie.default.useCallback(ue=>{let ae=tt.current,U=YE(fo.current,ae?.graphspec??null,ae?.childToCtrl??{},uo.current);return qE(q4(ET(zT(ue)),Xa.current),U,Za.current?$e:void 0)},[$e]),ci=ie.default.useRef([]);ci.current=re;let Wi=ie.default.useRef(w);Wi.current=w;let po=ie.default.useRef(null);ie.default.useEffect(()=>()=>{po.current&&clearTimeout(po.current)},[]);let hl=ie.default.useCallback((ue,ae)=>{Wi.current?.(ue,ae);let U=tt.current;if(!U?.graphspec||!U.analysis)return;let N=XE(ae,U.graphspec,U.childToCtrl,uo.current,new Set(ci.current.map(H=>H.id)));N&&(De.current?.fitView({nodes:[{id:N}],duration:500,padding:.4}),po.current&&clearTimeout(po.current),Q(H=>H.map(q=>{let ce=YT(q.className);return q.id===N?{...q,className:ce?`${ce} node-validation-flash`:"node-validation-flash"}:ce===q.className?q:{...q,className:ce}})),po.current=setTimeout(()=>{Q(H=>H.map(q=>{let ce=YT(q.className);return ce===q.className?q:{...q,className:ce}}))},1800))},[Q]);ie.default.useEffect(()=>{if(!we.current)return;let ue=!1;return(async()=>{try{let ae=we.current;if(!ae)return;let U=await Ff(ae.nodes,ae.edges,B,Oo,ae._graphspec,ae._analysis);if(ue)return;Be.current={nodes:U.nodes,edges:U.edges,controllerPositions:U.controllerPositions,graphspec:ae._graphspec};let N=Ga(pl(U.nodes),U.edges,ae._graphspec,ae._analysis,kt.current,ct.current,Gt.current,U.controllerPositions,mn.current);Q(Qt(N.nodes)),_e(cl(N.edges)),setTimeout(()=>{!ue&&De.current&&De.current.fitView({padding:.1})},50)}catch(ae){console.error("[GraphViewer] ELK layout failed:",ae)}})(),()=>{ue=!0}},[B,Oo]),ie.default.useEffect(()=>{if(!Be.current||!we.current||Be.current.graphspec!==we.current._graphspec)return;let ue=pl(Be.current.nodes),ae=Be.current.edges,U=Ga(ue,ae,we.current._graphspec,we.current._analysis,G,pn,On,Be.current.controllerPositions,We);Q(Qt(U.nodes)),_e(cl(U.edges))},[G,pn,On,We,Qt]),ie.default.useEffect(()=>{if(!C){we.current=null,tt.current=null,Be.current=null,Q([]),_e([]);return}let ue=!1;lo(new Set),ct.current=new Set;let{graphData:ae,analysis:U}=TT(C,so);tt.current={nodes:ae.nodes,edges:ae.edges,analysis:U,graphspec:C,childToCtrl:U?$n(C,U):{}};let N=U?V4(F.current,U.controllerNodeIds):new Set;_t(N),uo.current=N,co.current=N.size>0,zn.current=N.size,N.size>0&&!kt.current&&(X(!0),kt.current=!0);let H=N.size>0&&U?Ih({nodes:ae.nodes,edges:ae.edges},U,C,N,mn.current):{nodes:ae.nodes,edges:ae.edges,analysis:U};return we.current={nodes:H.nodes,edges:H.edges,_analysis:H.analysis,_graphspec:C},(async()=>{try{let q=zo.current,ce=ui.current,Re=H.nodes.some(ot=>!ot.position||ot.position.x===0&&ot.position.y===0)?await Ff(H.nodes,H.edges,q,ce,C,H.analysis):{nodes:H.nodes,edges:H.edges,controllerPositions:{}};if(ue)return;Be.current={nodes:Re.nodes,edges:Re.edges,controllerPositions:Re.controllerPositions,graphspec:C};let gt=Ga(pl(Re.nodes),Re.edges,C,H.analysis,kt.current,ct.current,Gt.current,Re.controllerPositions,mn.current);Q(Qt(gt.nodes)),_e(cl(gt.edges)),setTimeout(()=>{if(!ue&&De.current&&(De.current.fitView({padding:.1}),Kn.current!==void 0&&Kn.current!==null&&De.current.zoomTo(Kn.current),Lo.current)){let ot=De.current.getViewport();De.current.setViewport({x:ot.x,y:20,zoom:ot.zoom})}},100)}catch(q){console.error("[GraphViewer] ELK layout failed:",q)}})(),()=>{ue=!0}},[C,so]),ie.default.useEffect(()=>{if(Ya.current){Ya.current=!1,zn.current=nt.size;return}if(co.current){co.current=!1,zn.current=nt.size;return}let ue=zn.current;if(zn.current=nt.size,ue===0&&nt.size===0||!tt.current||!tt.current.analysis)return;let ae=tt.current,U=ae.graphspec,N=ae.analysis;if(!U||!N)return;let H=!1,q=Ih({nodes:ae.nodes,edges:ae.edges},N,U,nt,We);return we.current={nodes:q.nodes,edges:q.edges,_analysis:q.analysis,_graphspec:U},(async()=>{try{let ce=await Ff(q.nodes,q.edges,zo.current,ui.current,U,q.analysis);if(H)return;Be.current={nodes:ce.nodes,edges:ce.edges,controllerPositions:ce.controllerPositions,graphspec:U};let Ve=Ga(pl(ce.nodes),ce.edges,U,q.analysis,kt.current,ct.current,Gt.current,ce.controllerPositions,mn.current);Q(Qt(Ve.nodes)),_e(cl(Ve.edges)),setTimeout(()=>{!H&&De.current&&De.current.fitView({padding:.1})},50)}catch(ce){console.error("[GraphViewer] ELK layout failed:",ce)}})(),()=>{H=!0}},[nt,We]),ie.default.useEffect(()=>{if(!Be.current||!we.current||Be.current.graphspec!==we.current._graphspec)return;let ue=pl(Be.current.nodes),ae=Be.current.edges,U=Ga(ue,ae,we.current._graphspec,we.current._analysis,kt.current,ct.current,Gt.current,Be.current.controllerPositions,mn.current);Q(Qt(U.nodes)),_e(cl(U.edges))},[b,Qt]),ie.default.useEffect(()=>{if(!Be.current||!we.current||Be.current.graphspec!==we.current._graphspec)return;let ue=pl(Be.current.nodes),ae=Ga(ue,Be.current.edges,we.current._graphspec,we.current._analysis,kt.current,ct.current,Gt.current,Be.current.controllerPositions,mn.current);Q(Qt(ae.nodes))},[_,Ln,Qt]);let It=ie.default.useCallback((ue,ae)=>{let U=ae.data;if(x?.(ae.id,U,ue),U.isController||U.isPipe){let N=U.pipeCode||U.labelText;N&&f&&f(N,U.pipeCardData?.status)}else if(U.isStuff&&p&&C){let N=bs(ae.id),H=Vh(C,N);H&&p(H)}if(j(null),$?.nodeId===ae.id&&!W)le(null);else if(U.isPipe||U.isController)le({kind:"pipe",nodeId:ae.id,nodeData:U});else if(U.isStuff&&C){let N=bs(ae.id),H=Vh(C,N);le({kind:"stuff",nodeId:ae.id,nodeData:U,stuffData:H??void 0})}Q(N=>N.map(H=>({...H,selected:H.id===ae.id})))},[Q,f,x,p,C,$,W]),Qn=ie.default.useCallback(ue=>{De.current=ue,v&&v(ue)},[v]),Ji=ie.default.useCallback(()=>{le(null),j(null),g?.()},[g]),ja=ie.default.useCallback(ue=>{if(!C)return;let ae=Gh(C,ue);ae&&j(ae)},[C]),fi=$?.kind==="pipe"&&C?C.nodes.find(ue=>ue.pipe_code===$.nodeData.pipeCode):void 0,di=$!==null||W!==null,hn=X4(s,n.toolbarPosition),Wn=tt.current?.analysis?.controllerNodeIds,mo=ie.default.useMemo(()=>!G||!Wn||Wn.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>_t(new Set(Wn)),onExpandAll:()=>_t(new Set),foldAllDisabled:nt.size===Wn.size,expandAllDisabled:nt.size===0},[G,Wn,nt]);return(0,Ht.jsxs)("div",{ref:K,className:`react-flow-container react-flow-container--theme-${R} react-flow-container--mode-${I}`,children:[(0,Ht.jsxs)(ME,{nodes:re,edges:Ne,nodeTypes:I4,onNodesChange:xe,onEdgesChange:et,onNodeClick:It,onPaneClick:Ji,onInit:Qn,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:so},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:[(0,Ht.jsx)(zE,{variant:Ao.Dots,gap:20,size:1,color:"var(--color-bg-dots)"}),!r&&(0,Ht.jsx)(kT,{direction:B,onDirectionChange:M,showControllers:G,onShowControllersChange:X,onZoomIn:()=>{De.current?.zoomIn()},onZoomOut:()=>{De.current?.zoomOut()},onFitView:()=>{De.current?.fitView({padding:.1})},onFoldAll:mo.onFoldAll,onExpandAll:mo.onExpandAll,foldAllDisabled:mo.foldAllDisabled,expandAllDisabled:mo.expandAllDisabled,themeMode:c?I:void 0,onThemeModeChange:c?T:void 0,rightOffset:di?te:0,position:hn,validationState:E,validationIssues:_,onValidationIssueClick:w?hl:void 0,validationOpen:ml,onValidationOpenChange:qa})]}),(0,Ht.jsxs)(mT,{isOpen:di,onClose:Ji,width:te,isDragging:ge,onResizeHandleMouseDown:me,children:[W?(0,Ht.jsx)(pg,{concept:W}):fi&&C?(0,Ht.jsx)(_T,{node:fi,spec:C,onConceptClick:ja}):$?.stuffData?(0,Ht.jsx)(U4,{nodeId:$.nodeId,stuffData:$.stuffData,graphspec:C,resolveStorageUrl:m,canEmbedPdf:y,onOpenExternally:S}):null,h&&$&&!W&&h($.nodeId,$.nodeData)]})]})}function Z4(e){if(e==null)return no.EXPANDED;if(e===no.FOLDED||e===no.EXPANDED||e===no.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function j4(e){if(e==null)return St.SYSTEM;if(e===St.LIGHT||e===St.DARK||e===St.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function $4(e){if(e==null)return Cn.LR;if(e===Cn.LR||e===Cn.RL||e===Cn.TB||e===Cn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function F4(e){if(e==null)return;let t=Object.values(Je);if(t.includes(e))return e;throw new Error(`Invalid toolbarPosition in standalone config: ${JSON.stringify(e)} \u2014 expected one of ${t.map(n=>`"${n}"`).join(", ")}.`)}function _g(e,t){let n=e&&typeof e=="object"?e:{},o=$4(n.direction),i=!!n.showControllers,a=Z4(n.foldMode),r=j4(n.theme),l=F4(n.toolbarPosition);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:r,toolbarPosition:l},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:r}}function qT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var nu=_g({},null),Eg=null;function ZT(e){return qT(document.getElementById(e)?.textContent,e)}function K4(e,t){let n=Kf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function FT(e,t){document.body.setAttribute("data-theme",e),K4(t,nu.config.paletteColors)}function Q4(){return Va.default.createElement(XT,{...nu,onThemeChange:(e,t)=>{FT(e,t)}})}function W4({message:e}){return Va.default.createElement("div",{className:"standalone-error",role:"alert"},Va.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Va.default.createElement("pre",{className:"standalone-error-message"},e))}function jT(){let e=document.getElementById("root");if(!e)return;let t=(0,$T.createRoot)(e);Eg=()=>{t.render(Va.default.createElement(Q4))},Eg(),setTimeout(()=>{try{let n=ZT("pipelex-config"),o=ZT("pipelex-graphspec"),i=o===null?null:Gc(o);nu=_g(n,i),FT(nu.theme,xg(nu.theme,kh())),Eg?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Va.default.createElement(W4,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",jT):jT();})();
18
19
  /*! Bundled license information:
19
20
 
20
21
  react/cjs/react.production.js: