@exaudeus/workrail 3.16.0 → 3.18.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.
Files changed (68) hide show
  1. package/dist/application/services/validation-engine.js +7 -11
  2. package/dist/application/services/workflow-compiler.js +9 -11
  3. package/dist/application/use-cases/raw-workflow-file-scanner.js +10 -13
  4. package/dist/cli/commands/index.d.ts +1 -1
  5. package/dist/cli/commands/index.js +2 -1
  6. package/dist/cli/commands/init.d.ts +10 -0
  7. package/dist/cli/commands/init.js +72 -0
  8. package/dist/cli.js +13 -1
  9. package/dist/config/config-file.d.ts +8 -0
  10. package/dist/config/config-file.js +141 -0
  11. package/dist/config/feature-flags.js +8 -0
  12. package/dist/console/assets/index-BwJelCXK.js +28 -0
  13. package/dist/console/index.html +1 -1
  14. package/dist/di/container.d.ts +1 -0
  15. package/dist/di/container.js +24 -7
  16. package/dist/infrastructure/session/HttpServer.d.ts +0 -1
  17. package/dist/infrastructure/session/HttpServer.js +4 -46
  18. package/dist/manifest.json +120 -128
  19. package/dist/mcp/assert-output.js +2 -1
  20. package/dist/mcp/dev-mode.d.ts +1 -0
  21. package/dist/mcp/dev-mode.js +12 -0
  22. package/dist/mcp/handler-factory.d.ts +1 -1
  23. package/dist/mcp/handler-factory.js +8 -7
  24. package/dist/mcp/handlers/shared/request-workflow-reader.d.ts +1 -0
  25. package/dist/mcp/handlers/shared/request-workflow-reader.js +90 -20
  26. package/dist/mcp/handlers/v2-advance-core/assessment-consequences.d.ts +1 -1
  27. package/dist/mcp/handlers/v2-advance-core/assessment-consequences.js +14 -11
  28. package/dist/mcp/handlers/v2-advance-core/assessment-validation.d.ts +5 -3
  29. package/dist/mcp/handlers/v2-advance-core/assessment-validation.js +109 -87
  30. package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +0 -4
  31. package/dist/mcp/handlers/v2-advance-core/input-validation.js +1 -3
  32. package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +8 -3
  33. package/dist/mcp/handlers/v2-advance-core/outcome-success.js +8 -3
  34. package/dist/mcp/handlers/v2-execution/continue-advance.d.ts +1 -0
  35. package/dist/mcp/handlers/v2-execution/continue-advance.js +3 -1
  36. package/dist/mcp/handlers/v2-execution/continue-rehydrate.d.ts +1 -0
  37. package/dist/mcp/handlers/v2-execution/continue-rehydrate.js +2 -1
  38. package/dist/mcp/handlers/v2-execution/index.js +2 -0
  39. package/dist/mcp/handlers/v2-execution/replay.d.ts +2 -0
  40. package/dist/mcp/handlers/v2-execution/replay.js +7 -4
  41. package/dist/mcp/handlers/v2-execution/start.js +48 -20
  42. package/dist/mcp/handlers/v2-workflow.js +4 -2
  43. package/dist/mcp/output-schemas.d.ts +17 -12
  44. package/dist/mcp/output-schemas.js +12 -11
  45. package/dist/mcp/server.js +3 -2
  46. package/dist/mcp/v2-response-formatter.d.ts +1 -1
  47. package/dist/mcp/v2-response-formatter.js +2 -3
  48. package/dist/types/workflow-definition.d.ts +3 -1
  49. package/dist/types/workflow-definition.js +2 -0
  50. package/dist/v2/durable-core/domain/prompt-renderer.d.ts +1 -0
  51. package/dist/v2/durable-core/domain/prompt-renderer.js +5 -2
  52. package/dist/v2/durable-core/schemas/compiled-workflow/index.js +4 -3
  53. package/dist/v2/infra/local/pinned-workflow-store/index.d.ts +2 -0
  54. package/dist/v2/infra/local/pinned-workflow-store/index.js +49 -0
  55. package/dist/v2/infra/local/remembered-roots-store/index.d.ts +3 -1
  56. package/dist/v2/infra/local/remembered-roots-store/index.js +6 -3
  57. package/dist/v2/infra/local/workspace-anchor/index.js +4 -2
  58. package/dist/v2/ports/pinned-workflow-store.port.d.ts +2 -0
  59. package/dist/v2/usecases/console-routes.js +3 -2
  60. package/package.json +1 -1
  61. package/spec/authoring-spec.json +3 -3
  62. package/spec/workflow.schema.json +1 -2
  63. package/workflows/workflow-for-workflows.json +558 -448
  64. package/dist/console/assets/index-BE5PAgPO.js +0 -28
  65. package/dist/env-flags.d.ts +0 -1
  66. package/dist/env-flags.js +0 -4
  67. package/dist/mcp/handlers/v2-resolve-refs-envelope.d.ts +0 -5
  68. package/dist/mcp/handlers/v2-resolve-refs-envelope.js +0 -17
@@ -1,28 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=r(o);fetch(o.href,l)}})();function Ic(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xh={exports:{}},vs={};var Dx;function l2(){if(Dx)return vs;Dx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var f in o)f!=="key"&&(l[f]=o[f])}else l=o;return o=l.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:l}}return vs.Fragment=t,vs.jsx=r,vs.jsxs=r,vs}var zx;function u2(){return zx||(zx=1,xh.exports=l2()),xh.exports}var b=u2(),vh={exports:{}},Me={};var Lx;function c2(){if(Lx)return Me;Lx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,N={};function w(z,$,R){this.props=z,this.context=$,this.refs=N,this.updater=R||S}w.prototype.isReactComponent={},w.prototype.setState=function(z,$){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,$,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=w.prototype;function _(z,$,R){this.props=z,this.context=$,this.refs=N,this.updater=R||S}var M=_.prototype=new O;M.constructor=_,E(M,w.prototype),M.isPureReactComponent=!0;var B=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function H(z,$,R){var te=R.ref;return{$$typeof:e,type:z,key:$,ref:te!==void 0?te:null,props:R}}function q(z,$){return H(z.type,$,z.props)}function L(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function P(z){var $={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(R){return $[R]})}var K=/\/+/g;function I(z,$){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):$.toString(36)}function V(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(k,k):(z.status="pending",z.then(function($){z.status==="pending"&&(z.status="fulfilled",z.value=$)},function($){z.status==="pending"&&(z.status="rejected",z.reason=$)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function j(z,$,R,te,ue){var ce=typeof z;(ce==="undefined"||ce==="boolean")&&(z=null);var fe=!1;if(z===null)fe=!0;else switch(ce){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(z.$$typeof){case e:case t:fe=!0;break;case p:return fe=z._init,j(fe(z._payload),$,R,te,ue)}}if(fe)return ue=ue(z),fe=te===""?"."+I(z,0):te,B(ue)?(R="",fe!=null&&(R=fe.replace(K,"$&/")+"/"),j(ue,$,R,"",function(be){return be})):ue!=null&&(L(ue)&&(ue=q(ue,R+(ue.key==null||z&&z.key===ue.key?"":(""+ue.key).replace(K,"$&/")+"/")+fe)),$.push(ue)),1;fe=0;var le=te===""?".":te+":";if(B(z))for(var pe=0;pe<z.length;pe++)te=z[pe],ce=le+I(te,pe),fe+=j(te,$,R,ce,ue);else if(pe=v(z),typeof pe=="function")for(z=pe.call(z),pe=0;!(te=z.next()).done;)te=te.value,ce=le+I(te,pe++),fe+=j(te,$,R,ce,ue);else if(ce==="object"){if(typeof z.then=="function")return j(V(z),$,R,te,ue);throw $=String(z),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return fe}function F(z,$,R){if(z==null)return z;var te=[],ue=0;return j(z,te,"","",function(ce){return $.call(R,ce,ue++)}),te}function X(z){if(z._status===-1){var $=z._result;$=$(),$.then(function(R){(z._status===0||z._status===-1)&&(z._status=1,z._result=R)},function(R){(z._status===0||z._status===-1)&&(z._status=2,z._result=R)}),z._status===-1&&(z._status=0,z._result=$)}if(z._status===1)return z._result.default;throw z._result}var Z=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},A={map:F,forEach:function(z,$,R){F(z,function(){$.apply(this,arguments)},R)},count:function(z){var $=0;return F(z,function(){$++}),$},toArray:function(z){return F(z,function($){return $})||[]},only:function(z){if(!L(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Me.Activity=g,Me.Children=A,Me.Component=w,Me.Fragment=r,Me.Profiler=o,Me.PureComponent=_,Me.StrictMode=a,Me.Suspense=h,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Me.__COMPILER_RUNTIME={__proto__:null,c:function(z){return D.H.useMemoCache(z)}},Me.cache=function(z){return function(){return z.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(z,$,R){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var te=E({},z.props),ue=z.key;if($!=null)for(ce in $.key!==void 0&&(ue=""+$.key),$)!U.call($,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&$.ref===void 0||(te[ce]=$[ce]);var ce=arguments.length-2;if(ce===1)te.children=R;else if(1<ce){for(var fe=Array(ce),le=0;le<ce;le++)fe[le]=arguments[le+2];te.children=fe}return H(z.type,ue,te)},Me.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},Me.createElement=function(z,$,R){var te,ue={},ce=null;if($!=null)for(te in $.key!==void 0&&(ce=""+$.key),$)U.call($,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ue[te]=$[te]);var fe=arguments.length-2;if(fe===1)ue.children=R;else if(1<fe){for(var le=Array(fe),pe=0;pe<fe;pe++)le[pe]=arguments[pe+2];ue.children=le}if(z&&z.defaultProps)for(te in fe=z.defaultProps,fe)ue[te]===void 0&&(ue[te]=fe[te]);return H(z,ce,ue)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(z){return{$$typeof:f,render:z}},Me.isValidElement=L,Me.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:X}},Me.memo=function(z,$){return{$$typeof:d,type:z,compare:$===void 0?null:$}},Me.startTransition=function(z){var $=D.T,R={};D.T=R;try{var te=z(),ue=D.S;ue!==null&&ue(R,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(k,Z)}catch(ce){Z(ce)}finally{$!==null&&R.types!==null&&($.types=R.types),D.T=$}},Me.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Me.use=function(z){return D.H.use(z)},Me.useActionState=function(z,$,R){return D.H.useActionState(z,$,R)},Me.useCallback=function(z,$){return D.H.useCallback(z,$)},Me.useContext=function(z){return D.H.useContext(z)},Me.useDebugValue=function(){},Me.useDeferredValue=function(z,$){return D.H.useDeferredValue(z,$)},Me.useEffect=function(z,$){return D.H.useEffect(z,$)},Me.useEffectEvent=function(z){return D.H.useEffectEvent(z)},Me.useId=function(){return D.H.useId()},Me.useImperativeHandle=function(z,$,R){return D.H.useImperativeHandle(z,$,R)},Me.useInsertionEffect=function(z,$){return D.H.useInsertionEffect(z,$)},Me.useLayoutEffect=function(z,$){return D.H.useLayoutEffect(z,$)},Me.useMemo=function(z,$){return D.H.useMemo(z,$)},Me.useOptimistic=function(z,$){return D.H.useOptimistic(z,$)},Me.useReducer=function(z,$,R){return D.H.useReducer(z,$,R)},Me.useRef=function(z){return D.H.useRef(z)},Me.useState=function(z){return D.H.useState(z)},Me.useSyncExternalStore=function(z,$,R){return D.H.useSyncExternalStore(z,$,R)},Me.useTransition=function(){return D.H.useTransition()},Me.version="19.2.4",Me}var Ix;function ll(){return Ix||(Ix=1,vh.exports=c2()),vh.exports}var Y=ll();const co=Ic(Y);var bh={exports:{}},bs={},Sh={exports:{}},wh={};var Bx;function f2(){return Bx||(Bx=1,(function(e){function t(j,F){var X=j.length;j.push(F);e:for(;0<X;){var Z=X-1>>>1,A=j[Z];if(0<o(A,F))j[Z]=F,j[X]=A,X=Z;else break e}}function r(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var F=j[0],X=j.pop();if(X!==F){j[0]=X;e:for(var Z=0,A=j.length,z=A>>>1;Z<z;){var $=2*(Z+1)-1,R=j[$],te=$+1,ue=j[te];if(0>o(R,X))te<A&&0>o(ue,R)?(j[Z]=ue,j[te]=X,Z=te):(j[Z]=R,j[$]=X,Z=$);else if(te<A&&0>o(ue,X))j[Z]=ue,j[te]=X,Z=te;else break e}}return F}function o(j,F){var X=j.sortIndex-F.sortIndex;return X!==0?X:j.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],d=[],p=1,g=null,y=3,v=!1,S=!1,E=!1,N=!1,w=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function M(j){for(var F=r(d);F!==null;){if(F.callback===null)a(d);else if(F.startTime<=j)a(d),F.sortIndex=F.expirationTime,t(h,F);else break;F=r(d)}}function B(j){if(E=!1,M(j),!S)if(r(h)!==null)S=!0,k||(k=!0,P());else{var F=r(d);F!==null&&V(B,F.startTime-j)}}var k=!1,D=-1,U=5,H=-1;function q(){return N?!0:!(e.unstable_now()-H<U)}function L(){if(N=!1,k){var j=e.unstable_now();H=j;var F=!0;try{e:{S=!1,E&&(E=!1,O(D),D=-1),v=!0;var X=y;try{t:{for(M(j),g=r(h);g!==null&&!(g.expirationTime>j&&q());){var Z=g.callback;if(typeof Z=="function"){g.callback=null,y=g.priorityLevel;var A=Z(g.expirationTime<=j);if(j=e.unstable_now(),typeof A=="function"){g.callback=A,M(j),F=!0;break t}g===r(h)&&a(h),M(j)}else a(h);g=r(h)}if(g!==null)F=!0;else{var z=r(d);z!==null&&V(B,z.startTime-j),F=!1}}break e}finally{g=null,y=X,v=!1}F=void 0}}finally{F?P():k=!1}}}var P;if(typeof _=="function")P=function(){_(L)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,I=K.port2;K.port1.onmessage=L,P=function(){I.postMessage(null)}}else P=function(){w(L,0)};function V(j,F){D=w(function(){j(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(j){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var X=y;y=F;try{return j()}finally{y=X}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(j,F){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var X=y;y=j;try{return F()}finally{y=X}},e.unstable_scheduleCallback=function(j,F,X){var Z=e.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?Z+X:Z):X=Z,j){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=X+A,j={id:p++,callback:F,priorityLevel:j,startTime:X,expirationTime:A,sortIndex:-1},X>Z?(j.sortIndex=X,t(d,j),r(h)===null&&j===r(d)&&(E?(O(D),D=-1):E=!0,V(B,X-Z))):(j.sortIndex=A,t(h,j),S||v||(S=!0,k||(k=!0,P()))),j},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(j){var F=y;return function(){var X=y;y=F;try{return j.apply(this,arguments)}finally{y=X}}}})(wh)),wh}var Hx;function d2(){return Hx||(Hx=1,Sh.exports=f2()),Sh.exports}var Eh={exports:{}},zt={};var Px;function h2(){if(Px)return zt;Px=1;var e=ll();function t(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(h,d,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:d,implementation:p}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,zt.createPortal=function(h,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return l(h,d,null,p)},zt.flushSync=function(h){var d=u.T,p=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=d,a.p=p,a.d.f()}},zt.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(h,d))},zt.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},zt.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var p=d.as,g=f(p,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,v=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?a.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:v}):p==="script"&&a.d.X(h,{crossOrigin:g,integrity:y,fetchPriority:v,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},zt.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=f(d.as,d.crossOrigin);a.d.M(h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(h)},zt.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,g=f(p,d.crossOrigin);a.d.L(h,p,{crossOrigin:g,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},zt.preloadModule=function(h,d){if(typeof h=="string")if(d){var p=f(d.as,d.crossOrigin);a.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(h)},zt.requestFormReset=function(h){a.d.r(h)},zt.unstable_batchedUpdates=function(h,d){return h(d)},zt.useFormState=function(h,d,p){return u.H.useFormState(h,d,p)},zt.useFormStatus=function(){return u.H.useHostTransitionStatus()},zt.version="19.2.4",zt}var Ux;function O1(){if(Ux)return Eh.exports;Ux=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=h2(),Eh.exports}var qx;function p2(){if(qx)return bs;qx=1;var e=d2(),t=ll(),r=O1();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var i=n,s=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(s=i.return),n=i.return;while(n)}return i.tag===3?s:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(l(n)!==n)throw Error(a(188))}function d(n){var i=n.alternate;if(!i){if(i=l(n),i===null)throw Error(a(188));return i!==n?null:n}for(var s=n,c=i;;){var m=s.return;if(m===null)break;var x=m.alternate;if(x===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===x.child){for(x=m.child;x;){if(x===s)return h(m),n;if(x===c)return h(m),i;x=x.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=x;else{for(var C=!1,T=m.child;T;){if(T===s){C=!0,s=m,c=x;break}if(T===c){C=!0,c=m,s=x;break}T=T.sibling}if(!C){for(T=x.child;T;){if(T===s){C=!0,s=x,c=m;break}if(T===c){C=!0,c=x,s=m;break}T=T.sibling}if(!C)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:i}function p(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=p(n),i!==null)return i;n=n.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),_=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function P(n){return n===null||typeof n!="object"?null:(n=L&&n[L]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function I(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===K?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case w:return"Profiler";case N:return"StrictMode";case B:return"Suspense";case k:return"SuspenseList";case H:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case _:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case M:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return i=n.displayName||null,i!==null?i:I(n.type)||"Memo";case U:i=n._payload,n=n._init;try{return I(n(i))}catch{}}return null}var V=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},Z=[],A=-1;function z(n){return{current:n}}function $(n){0>A||(n.current=Z[A],Z[A]=null,A--)}function R(n,i){A++,Z[A]=n.current,n.current=i}var te=z(null),ue=z(null),ce=z(null),fe=z(null);function le(n,i){switch(R(ce,i),R(ue,n),R(te,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?rx(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=rx(i),n=ix(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}$(te),R(te,n)}function pe(){$(te),$(ue),$(ce)}function be(n){n.memoizedState!==null&&R(fe,n);var i=te.current,s=ix(i,n.type);i!==s&&(R(ue,n),R(te,s))}function Se(n){ue.current===n&&($(te),$(ue)),fe.current===n&&($(fe),ms._currentValue=X)}var ye,we;function Re(n){if(ye===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);ye=i&&i[1]||"",we=-1<s.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ye+n+we}var He=!1;function Ie(n,i){if(!n||He)return"";He=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(re){var ne=re}Reflect.construct(n,[],se)}else{try{se.call()}catch(re){ne=re}n.call(se.prototype)}}else{try{throw Error()}catch(re){ne=re}(se=n())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(re){if(re&&ne&&typeof re.stack=="string")return[re.stack,ne.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),C=x[0],T=x[1];if(C&&T){var G=C.split(`
4
- `),ee=T.split(`
5
- `);for(m=c=0;c<G.length&&!G[c].includes("DetermineComponentFrameRoot");)c++;for(;m<ee.length&&!ee[m].includes("DetermineComponentFrameRoot");)m++;if(c===G.length||m===ee.length)for(c=G.length-1,m=ee.length-1;1<=c&&0<=m&&G[c]!==ee[m];)m--;for(;1<=c&&0<=m;c--,m--)if(G[c]!==ee[m]){if(c!==1||m!==1)do if(c--,m--,0>m||G[c]!==ee[m]){var ae=`
6
- `+G[c].replace(" at new "," at ");return n.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",n.displayName)),ae}while(1<=c&&0<=m);break}}}finally{He=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?Re(s):""}function Qe(n,i){switch(n.tag){case 26:case 27:case 5:return Re(n.type);case 16:return Re("Lazy");case 13:return n.child!==i&&i!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Ie(n.type,!1);case 11:return Ie(n.type.render,!1);case 1:return Ie(n.type,!0);case 31:return Re("Activity");default:return""}}function _t(n){try{var i="",s=null;do i+=Qe(n,s),s=n,n=n.return;while(n);return i}catch(c){return`
7
- Error generating stack: `+c.message+`
8
- `+c.stack}}var it=Object.prototype.hasOwnProperty,Ot=e.unstable_scheduleCallback,qt=e.unstable_cancelCallback,An=e.unstable_shouldYield,vn=e.unstable_requestPaint,Ne=e.unstable_now,ut=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,Ee=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,Bt=e.log,Rn=e.unstable_setDisableYieldValue,Nt=null,dt=null;function jt(n){if(typeof Bt=="function"&&Rn(n),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Nt,n)}catch{}}var $e=Math.clz32?Math.clz32:of,Un=Math.log,on=Math.LN2;function of(n){return n>>>=0,n===0?32:31-(Un(n)/on|0)|0}var ua=256,ca=262144,fa=4194304;function nr(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function da(n,i,s){var c=n.pendingLanes;if(c===0)return 0;var m=0,x=n.suspendedLanes,C=n.pingedLanes;n=n.warmLanes;var T=c&134217727;return T!==0?(c=T&~x,c!==0?m=nr(c):(C&=T,C!==0?m=nr(C):s||(s=T&~n,s!==0&&(m=nr(s))))):(T=c&~x,T!==0?m=nr(T):C!==0?m=nr(C):s||(s=c&~n,s!==0&&(m=nr(s)))),m===0?0:i!==0&&i!==m&&(i&x)===0&&(x=m&-m,s=i&-i,x>=s||x===32&&(s&4194048)!==0)?i:m}function vi(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function sf(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 vl(){var n=fa;return fa<<=1,(fa&62914560)===0&&(fa=4194304),n}function No(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function bi(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function lf(n,i,s,c,m,x){var C=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var T=n.entanglements,G=n.expirationTimes,ee=n.hiddenUpdates;for(s=C&~s;0<s;){var ae=31-$e(s),se=1<<ae;T[ae]=0,G[ae]=-1;var ne=ee[ae];if(ne!==null)for(ee[ae]=null,ae=0;ae<ne.length;ae++){var re=ne[ae];re!==null&&(re.lane&=-536870913)}s&=~se}c!==0&&bl(n,c,0),x!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=x&~(C&~i))}function bl(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-$e(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|s&261930}function Sl(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var c=31-$e(s),m=1<<c;m&i|n[c]&i&&(n[c]|=i),s&=~m}}function wl(n,i){var s=i&-i;return s=(s&42)!==0?1:Mo(s),(s&(n.suspendedLanes|i))!==0?0:s}function Mo(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function ko(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function El(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:Mx(n.type))}function Cl(n,i){var s=F.p;try{return F.p=n,i()}finally{F.p=s}}var qn=Math.random().toString(36).slice(2),wt="__reactFiber$"+qn,Dt="__reactProps$"+qn,rr="__reactContainer$"+qn,ha="__reactEvents$"+qn,_l="__reactListeners$"+qn,uf="__reactHandles$"+qn,Nl="__reactResources$"+qn,Si="__reactMarker$"+qn;function To(n){delete n[wt],delete n[Dt],delete n[ha],delete n[_l],delete n[uf]}function Ar(n){var i=n[wt];if(i)return i;for(var s=n.parentNode;s;){if(i=s[rr]||s[wt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=fx(n);n!==null;){if(s=n[wt])return s;n=fx(n)}return i}n=s,s=n.parentNode}return null}function Rr(n){if(n=n[wt]||n[rr]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Or(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function jr(n){var i=n[Nl];return i||(i=n[Nl]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function mt(n){n[Si]=!0}var Ml=new Set,kl={};function ir(n,i){Dr(n,i),Dr(n+"Capture",i)}function Dr(n,i){for(kl[n]=i,n=0;n<i.length;n++)Ml.add(i[n])}var cf=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]*$"),Ao={},Tl={};function ff(n){return it.call(Tl,n)?!0:it.call(Ao,n)?!1:cf.test(n)?Tl[n]=!0:(Ao[n]=!0,!1)}function pa(n,i,s){if(ff(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function ma(n,i,s){if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+s)}}function On(n,i,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+c)}}function Vt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Al(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function df(n,i,s){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,x=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return m.call(this)},set:function(C){s=""+C,x.call(this,C)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(C){s=""+C},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ga(n){if(!n._valueTracker){var i=Al(n)?"checked":"value";n._valueTracker=df(n,i,""+n[i])}}function Rl(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return n&&(c=Al(n)?n.checked?"true":"false":n.value),n=c,n!==s?(i.setValue(n),!0):!1}function wi(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var hf=/[\n"\\]/g;function Ft(n){return n.replace(hf,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ei(n,i,s,c,m,x,C,T){n.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.type=C:n.removeAttribute("type"),i!=null?C==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Vt(i)):n.value!==""+Vt(i)&&(n.value=""+Vt(i)):C!=="submit"&&C!=="reset"||n.removeAttribute("value"),i!=null?Ro(n,C,Vt(i)):s!=null?Ro(n,C,Vt(s)):c!=null&&n.removeAttribute("value"),m==null&&x!=null&&(n.defaultChecked=!!x),m!=null&&(n.checked=m&&typeof m!="function"&&typeof m!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+Vt(T):n.removeAttribute("name")}function Ol(n,i,s,c,m,x,C,T){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(n.type=x),i!=null||s!=null){if(!(x!=="submit"&&x!=="reset"||i!=null)){ga(n);return}s=s!=null?""+Vt(s):"",i=i!=null?""+Vt(i):s,T||i===n.value||(n.value=i),n.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=T?n.checked:!!c,n.defaultChecked=!!c,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(n.name=C),ga(n)}function Ro(n,i,s){i==="number"&&wi(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function ar(n,i,s,c){if(n=n.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<n.length;s++)m=i.hasOwnProperty("$"+n[s].value),n[s].selected!==m&&(n[s].selected=m),m&&c&&(n[s].defaultSelected=!0)}else{for(s=""+Vt(s),i=null,m=0;m<n.length;m++){if(n[m].value===s){n[m].selected=!0,c&&(n[m].defaultSelected=!0);return}i!==null||n[m].disabled||(i=n[m])}i!==null&&(i.selected=!0)}}function Wm(n,i,s){if(i!=null&&(i=""+Vt(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+Vt(s):""}function Jm(n,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(V(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Vt(i),n.defaultValue=s,c=n.textContent,c===s&&c!==""&&c!==null&&(n.value=c),ga(n)}function ya(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var rC=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 eg(n,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,s):typeof s!="number"||s===0||rC.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function tg(n,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&eg(n,m,c)}else for(var x in i)i.hasOwnProperty(x)&&eg(n,x,i[x])}function pf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 iC=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"]]),aC=/^[\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 jl(n){return aC.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function or(){}var mf=null;function gf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var xa=null,va=null;function ng(n){var i=Rr(n);if(i&&(n=i.stateNode)){var s=n[Dt]||null;e:switch(n=i.stateNode,i.type){case"input":if(Ei(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Ft(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==n&&c.form===n.form){var m=c[Dt]||null;if(!m)throw Error(a(90));Ei(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===n.form&&Rl(c)}break e;case"textarea":Wm(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&ar(n,!!s.multiple,i,!1)}}}var yf=!1;function rg(n,i,s){if(yf)return n(i,s);yf=!0;try{var c=n(i);return c}finally{if(yf=!1,(xa!==null||va!==null)&&(bu(),xa&&(i=xa,n=va,va=xa=null,ng(i),n)))for(i=0;i<n.length;i++)ng(n[i])}}function Oo(n,i){var s=n.stateNode;if(s===null)return null;var c=s[Dt]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var sr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xf=!1;if(sr)try{var jo={};Object.defineProperty(jo,"passive",{get:function(){xf=!0}}),window.addEventListener("test",jo,jo),window.removeEventListener("test",jo,jo)}catch{xf=!1}var zr=null,vf=null,Dl=null;function ig(){if(Dl)return Dl;var n,i=vf,s=i.length,c,m="value"in zr?zr.value:zr.textContent,x=m.length;for(n=0;n<s&&i[n]===m[n];n++);var C=s-n;for(c=1;c<=C&&i[s-c]===m[x-c];c++);return Dl=m.slice(n,1<c?1-c:void 0)}function zl(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Ll(){return!0}function ag(){return!1}function Yt(n){function i(s,c,m,x,C){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(s=n[T],this[T]=s?s(x):x[T]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Ll:ag,this.isPropagationStopped=ag,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ll)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ll)},persist:function(){},isPersistent:Ll}),i}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Il=Yt(Ci),Do=g({},Ci,{view:0,detail:0}),oC=Yt(Do),bf,Sf,zo,Bl=g({},Do,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ef,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==zo&&(zo&&n.type==="mousemove"?(bf=n.screenX-zo.screenX,Sf=n.screenY-zo.screenY):Sf=bf=0,zo=n),bf)},movementY:function(n){return"movementY"in n?n.movementY:Sf}}),og=Yt(Bl),sC=g({},Bl,{dataTransfer:0}),lC=Yt(sC),uC=g({},Do,{relatedTarget:0}),wf=Yt(uC),cC=g({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),fC=Yt(cC),dC=g({},Ci,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),hC=Yt(dC),pC=g({},Ci,{data:0}),sg=Yt(pC),mC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gC={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"},yC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xC(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=yC[n])?!!i[n]:!1}function Ef(){return xC}var vC=g({},Do,{key:function(n){if(n.key){var i=mC[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=zl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?gC[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ef,charCode:function(n){return n.type==="keypress"?zl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?zl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),bC=Yt(vC),SC=g({},Bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lg=Yt(SC),wC=g({},Do,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ef}),EC=Yt(wC),CC=g({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),_C=Yt(CC),NC=g({},Bl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),MC=Yt(NC),kC=g({},Ci,{newState:0,oldState:0}),TC=Yt(kC),AC=[9,13,27,32],Cf=sr&&"CompositionEvent"in window,Lo=null;sr&&"documentMode"in document&&(Lo=document.documentMode);var RC=sr&&"TextEvent"in window&&!Lo,ug=sr&&(!Cf||Lo&&8<Lo&&11>=Lo),cg=" ",fg=!1;function dg(n,i){switch(n){case"keyup":return AC.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hg(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ba=!1;function OC(n,i){switch(n){case"compositionend":return hg(i);case"keypress":return i.which!==32?null:(fg=!0,cg);case"textInput":return n=i.data,n===cg&&fg?null:n;default:return null}}function jC(n,i){if(ba)return n==="compositionend"||!Cf&&dg(n,i)?(n=ig(),Dl=vf=zr=null,ba=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return ug&&i.locale!=="ko"?null:i.data;default:return null}}var DC={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 pg(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!DC[n.type]:i==="textarea"}function mg(n,i,s,c){xa?va?va.push(c):va=[c]:xa=c,i=Mu(i,"onChange"),0<i.length&&(s=new Il("onChange","change",null,s,c),n.push({event:s,listeners:i}))}var Io=null,Bo=null;function zC(n){K0(n,0)}function Hl(n){var i=Or(n);if(Rl(i))return n}function gg(n,i){if(n==="change")return i}var yg=!1;if(sr){var _f;if(sr){var Nf="oninput"in document;if(!Nf){var xg=document.createElement("div");xg.setAttribute("oninput","return;"),Nf=typeof xg.oninput=="function"}_f=Nf}else _f=!1;yg=_f&&(!document.documentMode||9<document.documentMode)}function vg(){Io&&(Io.detachEvent("onpropertychange",bg),Bo=Io=null)}function bg(n){if(n.propertyName==="value"&&Hl(Bo)){var i=[];mg(i,Bo,n,gf(n)),rg(zC,i)}}function LC(n,i,s){n==="focusin"?(vg(),Io=i,Bo=s,Io.attachEvent("onpropertychange",bg)):n==="focusout"&&vg()}function IC(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Hl(Bo)}function BC(n,i){if(n==="click")return Hl(i)}function HC(n,i){if(n==="input"||n==="change")return Hl(i)}function PC(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var sn=typeof Object.is=="function"?Object.is:PC;function Ho(n,i){if(sn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!it.call(i,m)||!sn(n[m],i[m]))return!1}return!0}function Sg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function wg(n,i){var s=Sg(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=i&&c>=i)return{node:s,offset:i-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Sg(s)}}function Eg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Eg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Cg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=wi(n.document);i instanceof n.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)n=i.contentWindow;else break;i=wi(n.document)}return i}function Mf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var UC=sr&&"documentMode"in document&&11>=document.documentMode,Sa=null,kf=null,Po=null,Tf=!1;function _g(n,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Tf||Sa==null||Sa!==wi(c)||(c=Sa,"selectionStart"in c&&Mf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Po&&Ho(Po,c)||(Po=c,c=Mu(kf,"onSelect"),0<c.length&&(i=new Il("onSelect","select",null,i,s),n.push({event:i,listeners:c}),i.target=Sa)))}function _i(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var wa={animationend:_i("Animation","AnimationEnd"),animationiteration:_i("Animation","AnimationIteration"),animationstart:_i("Animation","AnimationStart"),transitionrun:_i("Transition","TransitionRun"),transitionstart:_i("Transition","TransitionStart"),transitioncancel:_i("Transition","TransitionCancel"),transitionend:_i("Transition","TransitionEnd")},Af={},Ng={};sr&&(Ng=document.createElement("div").style,"AnimationEvent"in window||(delete wa.animationend.animation,delete wa.animationiteration.animation,delete wa.animationstart.animation),"TransitionEvent"in window||delete wa.transitionend.transition);function Ni(n){if(Af[n])return Af[n];if(!wa[n])return n;var i=wa[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in Ng)return Af[n]=i[s];return n}var Mg=Ni("animationend"),kg=Ni("animationiteration"),Tg=Ni("animationstart"),qC=Ni("transitionrun"),VC=Ni("transitionstart"),FC=Ni("transitioncancel"),Ag=Ni("transitionend"),Rg=new Map,Rf="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(" ");Rf.push("scrollEnd");function jn(n,i){Rg.set(n,i),ir(i,[n])}var Pl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},bn=[],Ea=0,Of=0;function Ul(){for(var n=Ea,i=Of=Ea=0;i<n;){var s=bn[i];bn[i++]=null;var c=bn[i];bn[i++]=null;var m=bn[i];bn[i++]=null;var x=bn[i];if(bn[i++]=null,c!==null&&m!==null){var C=c.pending;C===null?m.next=m:(m.next=C.next,C.next=m),c.pending=m}x!==0&&Og(s,m,x)}}function ql(n,i,s,c){bn[Ea++]=n,bn[Ea++]=i,bn[Ea++]=s,bn[Ea++]=c,Of|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function jf(n,i,s,c){return ql(n,i,s,c),Vl(n)}function Mi(n,i){return ql(n,null,null,i),Vl(n)}function Og(n,i,s){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s);for(var m=!1,x=n.return;x!==null;)x.childLanes|=s,c=x.alternate,c!==null&&(c.childLanes|=s),x.tag===22&&(n=x.stateNode,n===null||n._visibility&1||(m=!0)),n=x,x=x.return;return n.tag===3?(x=n.stateNode,m&&i!==null&&(m=31-$e(s),n=x.hiddenUpdates,c=n[m],c===null?n[m]=[i]:c.push(i),i.lane=s|536870912),x):null}function Vl(n){if(50<ls)throw ls=0,qd=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var Ca={};function YC(n,i,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(n,i,s,c){return new YC(n,i,s,c)}function Df(n){return n=n.prototype,!(!n||!n.isReactComponent)}function lr(n,i){var s=n.alternate;return s===null?(s=ln(n.tag,i,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=i,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,i=n.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function jg(n,i){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,i=s.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Fl(n,i,s,c,m,x){var C=0;if(c=n,typeof n=="function")Df(n)&&(C=1);else if(typeof n=="string")C=Z_(n,s,te.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case H:return n=ln(31,s,i,m),n.elementType=H,n.lanes=x,n;case E:return ki(s.children,m,x,i);case N:C=8,m|=24;break;case w:return n=ln(12,s,i,m|2),n.elementType=w,n.lanes=x,n;case B:return n=ln(13,s,i,m),n.elementType=B,n.lanes=x,n;case k:return n=ln(19,s,i,m),n.elementType=k,n.lanes=x,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case _:C=10;break e;case O:C=9;break e;case M:C=11;break e;case D:C=14;break e;case U:C=16,c=null;break e}C=29,s=Error(a(130,n===null?"null":typeof n,"")),c=null}return i=ln(C,s,i,m),i.elementType=n,i.type=c,i.lanes=x,i}function ki(n,i,s,c){return n=ln(7,n,c,i),n.lanes=s,n}function zf(n,i,s){return n=ln(6,n,null,i),n.lanes=s,n}function Dg(n){var i=ln(18,null,null,0);return i.stateNode=n,i}function Lf(n,i,s){return i=ln(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var zg=new WeakMap;function Sn(n,i){if(typeof n=="object"&&n!==null){var s=zg.get(n);return s!==void 0?s:(i={value:n,source:i,stack:_t(i)},zg.set(n,i),i)}return{value:n,source:i,stack:_t(i)}}var _a=[],Na=0,Yl=null,Uo=0,wn=[],En=0,Lr=null,Vn=1,Fn="";function ur(n,i){_a[Na++]=Uo,_a[Na++]=Yl,Yl=n,Uo=i}function Lg(n,i,s){wn[En++]=Vn,wn[En++]=Fn,wn[En++]=Lr,Lr=n;var c=Vn;n=Fn;var m=32-$e(c)-1;c&=~(1<<m),s+=1;var x=32-$e(i)+m;if(30<x){var C=m-m%5;x=(c&(1<<C)-1).toString(32),c>>=C,m-=C,Vn=1<<32-$e(i)+m|s<<m|c,Fn=x+n}else Vn=1<<x|s<<m|c,Fn=n}function If(n){n.return!==null&&(ur(n,1),Lg(n,1,0))}function Bf(n){for(;n===Yl;)Yl=_a[--Na],_a[Na]=null,Uo=_a[--Na],_a[Na]=null;for(;n===Lr;)Lr=wn[--En],wn[En]=null,Fn=wn[--En],wn[En]=null,Vn=wn[--En],wn[En]=null}function Ig(n,i){wn[En++]=Vn,wn[En++]=Fn,wn[En++]=Lr,Vn=i.id,Fn=i.overflow,Lr=n}var Mt=null,nt=null,Be=!1,Ir=null,Cn=!1,Hf=Error(a(519));function Br(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qo(Sn(i,n)),Hf}function Bg(n){var i=n.stateNode,s=n.type,c=n.memoizedProps;switch(i[wt]=n,i[Dt]=c,s){case"dialog":De("cancel",i),De("close",i);break;case"iframe":case"object":case"embed":De("load",i);break;case"video":case"audio":for(s=0;s<cs.length;s++)De(cs[s],i);break;case"source":De("error",i);break;case"img":case"image":case"link":De("error",i),De("load",i);break;case"details":De("toggle",i);break;case"input":De("invalid",i),Ol(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":De("invalid",i);break;case"textarea":De("invalid",i),Jm(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||tx(i.textContent,s)?(c.popover!=null&&(De("beforetoggle",i),De("toggle",i)),c.onScroll!=null&&De("scroll",i),c.onScrollEnd!=null&&De("scrollend",i),c.onClick!=null&&(i.onclick=or),i=!0):i=!1,i||Br(n,!0)}function Hg(n){for(Mt=n.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Mt=Mt.return}}function Ma(n){if(n!==Mt)return!1;if(!Be)return Hg(n),Be=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||rh(n.type,n.memoizedProps)),s=!s),s&&nt&&Br(n),Hg(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));nt=cx(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));nt=cx(n)}else i===27?(i=nt,Wr(n.type)?(n=lh,lh=null,nt=n):nt=i):nt=Mt?Nn(n.stateNode.nextSibling):null;return!0}function Ti(){nt=Mt=null,Be=!1}function Pf(){var n=Ir;return n!==null&&(Qt===null?Qt=n:Qt.push.apply(Qt,n),Ir=null),n}function qo(n){Ir===null?Ir=[n]:Ir.push(n)}var Uf=z(null),Ai=null,cr=null;function Hr(n,i,s){R(Uf,i._currentValue),i._currentValue=s}function fr(n){n._currentValue=Uf.current,$(Uf)}function qf(n,i,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===s)break;n=n.return}}function Vf(n,i,s,c){var m=n.child;for(m!==null&&(m.return=n);m!==null;){var x=m.dependencies;if(x!==null){var C=m.child;x=x.firstContext;e:for(;x!==null;){var T=x;x=m;for(var G=0;G<i.length;G++)if(T.context===i[G]){x.lanes|=s,T=x.alternate,T!==null&&(T.lanes|=s),qf(x.return,s,n),c||(C=null);break e}x=T.next}}else if(m.tag===18){if(C=m.return,C===null)throw Error(a(341));C.lanes|=s,x=C.alternate,x!==null&&(x.lanes|=s),qf(C,s,n),C=null}else C=m.child;if(C!==null)C.return=m;else for(C=m;C!==null;){if(C===n){C=null;break}if(m=C.sibling,m!==null){m.return=C.return,C=m;break}C=C.return}m=C}}function ka(n,i,s,c){n=null;for(var m=i,x=!1;m!==null;){if(!x){if((m.flags&524288)!==0)x=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var C=m.alternate;if(C===null)throw Error(a(387));if(C=C.memoizedProps,C!==null){var T=m.type;sn(m.pendingProps.value,C.value)||(n!==null?n.push(T):n=[T])}}else if(m===fe.current){if(C=m.alternate,C===null)throw Error(a(387));C.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(n!==null?n.push(ms):n=[ms])}m=m.return}n!==null&&Vf(i,n,s,c),i.flags|=262144}function $l(n){for(n=n.firstContext;n!==null;){if(!sn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ri(n){Ai=n,cr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function kt(n){return Pg(Ai,n)}function Gl(n,i){return Ai===null&&Ri(n),Pg(n,i)}function Pg(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},cr===null){if(n===null)throw Error(a(308));cr=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else cr=cr.next=i;return s}var $C=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},GC=e.unstable_scheduleCallback,XC=e.unstable_NormalPriority,gt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ff(){return{controller:new $C,data:new Map,refCount:0}}function Vo(n){n.refCount--,n.refCount===0&&GC(XC,function(){n.controller.abort()})}var Fo=null,Yf=0,Ta=0,Aa=null;function QC(n,i){if(Fo===null){var s=Fo=[];Yf=0,Ta=Xd(),Aa={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Yf++,i.then(Ug,Ug),i}function Ug(){if(--Yf===0&&Fo!==null){Aa!==null&&(Aa.status="fulfilled");var n=Fo;Fo=null,Ta=0,Aa=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function ZC(n,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var qg=j.S;j.S=function(n,i){_0=Ne(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&QC(n,i),qg!==null&&qg(n,i)};var Oi=z(null);function $f(){var n=Oi.current;return n!==null?n:Je.pooledCache}function Xl(n,i){i===null?R(Oi,Oi.current):R(Oi,i.pool)}function Vg(){var n=$f();return n===null?null:{parent:gt._currentValue,pool:n}}var Ra=Error(a(460)),Gf=Error(a(474)),Ql=Error(a(542)),Zl={then:function(){}};function Fg(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Yg(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(or,or),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Gg(n),n;default:if(typeof i.status=="string")i.then(or,or);else{if(n=Je,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Gg(n),n}throw Di=i,Ra}}function ji(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Di=s,Ra):s}}var Di=null;function $g(){if(Di===null)throw Error(a(459));var n=Di;return Di=null,n}function Gg(n){if(n===Ra||n===Ql)throw Error(a(483))}var Oa=null,Yo=0;function Kl(n){var i=Yo;return Yo+=1,Oa===null&&(Oa=[]),Yg(Oa,n,i)}function $o(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Wl(n,i){throw i.$$typeof===y?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function Xg(n){function i(W,Q){if(n){var J=W.deletions;J===null?(W.deletions=[Q],W.flags|=16):J.push(Q)}}function s(W,Q){if(!n)return null;for(;Q!==null;)i(W,Q),Q=Q.sibling;return null}function c(W){for(var Q=new Map;W!==null;)W.key!==null?Q.set(W.key,W):Q.set(W.index,W),W=W.sibling;return Q}function m(W,Q){return W=lr(W,Q),W.index=0,W.sibling=null,W}function x(W,Q,J){return W.index=J,n?(J=W.alternate,J!==null?(J=J.index,J<Q?(W.flags|=67108866,Q):J):(W.flags|=67108866,Q)):(W.flags|=1048576,Q)}function C(W){return n&&W.alternate===null&&(W.flags|=67108866),W}function T(W,Q,J,oe){return Q===null||Q.tag!==6?(Q=zf(J,W.mode,oe),Q.return=W,Q):(Q=m(Q,J),Q.return=W,Q)}function G(W,Q,J,oe){var xe=J.type;return xe===E?ae(W,Q,J.props.children,oe,J.key):Q!==null&&(Q.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===U&&ji(xe)===Q.type)?(Q=m(Q,J.props),$o(Q,J),Q.return=W,Q):(Q=Fl(J.type,J.key,J.props,null,W.mode,oe),$o(Q,J),Q.return=W,Q)}function ee(W,Q,J,oe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==J.containerInfo||Q.stateNode.implementation!==J.implementation?(Q=Lf(J,W.mode,oe),Q.return=W,Q):(Q=m(Q,J.children||[]),Q.return=W,Q)}function ae(W,Q,J,oe,xe){return Q===null||Q.tag!==7?(Q=ki(J,W.mode,oe,xe),Q.return=W,Q):(Q=m(Q,J),Q.return=W,Q)}function se(W,Q,J){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=zf(""+Q,W.mode,J),Q.return=W,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return J=Fl(Q.type,Q.key,Q.props,null,W.mode,J),$o(J,Q),J.return=W,J;case S:return Q=Lf(Q,W.mode,J),Q.return=W,Q;case U:return Q=ji(Q),se(W,Q,J)}if(V(Q)||P(Q))return Q=ki(Q,W.mode,J,null),Q.return=W,Q;if(typeof Q.then=="function")return se(W,Kl(Q),J);if(Q.$$typeof===_)return se(W,Gl(W,Q),J);Wl(W,Q)}return null}function ne(W,Q,J,oe){var xe=Q!==null?Q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return xe!==null?null:T(W,Q,""+J,oe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case v:return J.key===xe?G(W,Q,J,oe):null;case S:return J.key===xe?ee(W,Q,J,oe):null;case U:return J=ji(J),ne(W,Q,J,oe)}if(V(J)||P(J))return xe!==null?null:ae(W,Q,J,oe,null);if(typeof J.then=="function")return ne(W,Q,Kl(J),oe);if(J.$$typeof===_)return ne(W,Q,Gl(W,J),oe);Wl(W,J)}return null}function re(W,Q,J,oe,xe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return W=W.get(J)||null,T(Q,W,""+oe,xe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return W=W.get(oe.key===null?J:oe.key)||null,G(Q,W,oe,xe);case S:return W=W.get(oe.key===null?J:oe.key)||null,ee(Q,W,oe,xe);case U:return oe=ji(oe),re(W,Q,J,oe,xe)}if(V(oe)||P(oe))return W=W.get(J)||null,ae(Q,W,oe,xe,null);if(typeof oe.then=="function")return re(W,Q,J,Kl(oe),xe);if(oe.$$typeof===_)return re(W,Q,J,Gl(Q,oe),xe);Wl(Q,oe)}return null}function me(W,Q,J,oe){for(var xe=null,qe=null,ge=Q,Te=Q=0,Le=null;ge!==null&&Te<J.length;Te++){ge.index>Te?(Le=ge,ge=null):Le=ge.sibling;var Ve=ne(W,ge,J[Te],oe);if(Ve===null){ge===null&&(ge=Le);break}n&&ge&&Ve.alternate===null&&i(W,ge),Q=x(Ve,Q,Te),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve,ge=Le}if(Te===J.length)return s(W,ge),Be&&ur(W,Te),xe;if(ge===null){for(;Te<J.length;Te++)ge=se(W,J[Te],oe),ge!==null&&(Q=x(ge,Q,Te),qe===null?xe=ge:qe.sibling=ge,qe=ge);return Be&&ur(W,Te),xe}for(ge=c(ge);Te<J.length;Te++)Le=re(ge,W,Te,J[Te],oe),Le!==null&&(n&&Le.alternate!==null&&ge.delete(Le.key===null?Te:Le.key),Q=x(Le,Q,Te),qe===null?xe=Le:qe.sibling=Le,qe=Le);return n&&ge.forEach(function(ri){return i(W,ri)}),Be&&ur(W,Te),xe}function Ce(W,Q,J,oe){if(J==null)throw Error(a(151));for(var xe=null,qe=null,ge=Q,Te=Q=0,Le=null,Ve=J.next();ge!==null&&!Ve.done;Te++,Ve=J.next()){ge.index>Te?(Le=ge,ge=null):Le=ge.sibling;var ri=ne(W,ge,Ve.value,oe);if(ri===null){ge===null&&(ge=Le);break}n&&ge&&ri.alternate===null&&i(W,ge),Q=x(ri,Q,Te),qe===null?xe=ri:qe.sibling=ri,qe=ri,ge=Le}if(Ve.done)return s(W,ge),Be&&ur(W,Te),xe;if(ge===null){for(;!Ve.done;Te++,Ve=J.next())Ve=se(W,Ve.value,oe),Ve!==null&&(Q=x(Ve,Q,Te),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve);return Be&&ur(W,Te),xe}for(ge=c(ge);!Ve.done;Te++,Ve=J.next())Ve=re(ge,W,Te,Ve.value,oe),Ve!==null&&(n&&Ve.alternate!==null&&ge.delete(Ve.key===null?Te:Ve.key),Q=x(Ve,Q,Te),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve);return n&&ge.forEach(function(s2){return i(W,s2)}),Be&&ur(W,Te),xe}function We(W,Q,J,oe){if(typeof J=="object"&&J!==null&&J.type===E&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case v:e:{for(var xe=J.key;Q!==null;){if(Q.key===xe){if(xe=J.type,xe===E){if(Q.tag===7){s(W,Q.sibling),oe=m(Q,J.props.children),oe.return=W,W=oe;break e}}else if(Q.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===U&&ji(xe)===Q.type){s(W,Q.sibling),oe=m(Q,J.props),$o(oe,J),oe.return=W,W=oe;break e}s(W,Q);break}else i(W,Q);Q=Q.sibling}J.type===E?(oe=ki(J.props.children,W.mode,oe,J.key),oe.return=W,W=oe):(oe=Fl(J.type,J.key,J.props,null,W.mode,oe),$o(oe,J),oe.return=W,W=oe)}return C(W);case S:e:{for(xe=J.key;Q!==null;){if(Q.key===xe)if(Q.tag===4&&Q.stateNode.containerInfo===J.containerInfo&&Q.stateNode.implementation===J.implementation){s(W,Q.sibling),oe=m(Q,J.children||[]),oe.return=W,W=oe;break e}else{s(W,Q);break}else i(W,Q);Q=Q.sibling}oe=Lf(J,W.mode,oe),oe.return=W,W=oe}return C(W);case U:return J=ji(J),We(W,Q,J,oe)}if(V(J))return me(W,Q,J,oe);if(P(J)){if(xe=P(J),typeof xe!="function")throw Error(a(150));return J=xe.call(J),Ce(W,Q,J,oe)}if(typeof J.then=="function")return We(W,Q,Kl(J),oe);if(J.$$typeof===_)return We(W,Q,Gl(W,J),oe);Wl(W,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,Q!==null&&Q.tag===6?(s(W,Q.sibling),oe=m(Q,J),oe.return=W,W=oe):(s(W,Q),oe=zf(J,W.mode,oe),oe.return=W,W=oe),C(W)):s(W,Q)}return function(W,Q,J,oe){try{Yo=0;var xe=We(W,Q,J,oe);return Oa=null,xe}catch(ge){if(ge===Ra||ge===Ql)throw ge;var qe=ln(29,ge,null,W.mode);return qe.lanes=oe,qe.return=W,qe}}}var zi=Xg(!0),Qg=Xg(!1),Pr=!1;function Xf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qf(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ur(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function qr(n,i,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Fe&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=Vl(n),Og(n,null,s),i}return ql(n,c,i,s),Vl(n)}function Go(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,Sl(n,s)}}function Zf(n,i){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,x=null;if(s=s.firstBaseUpdate,s!==null){do{var C={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};x===null?m=x=C:x=x.next=C,s=s.next}while(s!==null);x===null?m=x=i:x=x.next=i}else m=x=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var Kf=!1;function Xo(){if(Kf){var n=Aa;if(n!==null)throw n}}function Qo(n,i,s,c){Kf=!1;var m=n.updateQueue;Pr=!1;var x=m.firstBaseUpdate,C=m.lastBaseUpdate,T=m.shared.pending;if(T!==null){m.shared.pending=null;var G=T,ee=G.next;G.next=null,C===null?x=ee:C.next=ee,C=G;var ae=n.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==C&&(T===null?ae.firstBaseUpdate=ee:T.next=ee,ae.lastBaseUpdate=G))}if(x!==null){var se=m.baseState;C=0,ae=ee=G=null,T=x;do{var ne=T.lane&-536870913,re=ne!==T.lane;if(re?(ze&ne)===ne:(c&ne)===ne){ne!==0&&ne===Ta&&(Kf=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var me=n,Ce=T;ne=i;var We=s;switch(Ce.tag){case 1:if(me=Ce.payload,typeof me=="function"){se=me.call(We,se,ne);break e}se=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Ce.payload,ne=typeof me=="function"?me.call(We,se,ne):me,ne==null)break e;se=g({},se,ne);break e;case 2:Pr=!0}}ne=T.callback,ne!==null&&(n.flags|=64,re&&(n.flags|=8192),re=m.callbacks,re===null?m.callbacks=[ne]:re.push(ne))}else re={lane:ne,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(ee=ae=re,G=se):ae=ae.next=re,C|=ne;if(T=T.next,T===null){if(T=m.shared.pending,T===null)break;re=T,T=re.next,re.next=null,m.lastBaseUpdate=re,m.shared.pending=null}}while(!0);ae===null&&(G=se),m.baseState=G,m.firstBaseUpdate=ee,m.lastBaseUpdate=ae,x===null&&(m.shared.lanes=0),Gr|=C,n.lanes=C,n.memoizedState=se}}function Zg(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function Kg(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)Zg(s[n],i)}var ja=z(null),Jl=z(0);function Wg(n,i){n=br,R(Jl,n),R(ja,i),br=n|i.baseLanes}function Wf(){R(Jl,br),R(ja,ja.current)}function Jf(){br=Jl.current,$(ja),$(Jl)}var un=z(null),_n=null;function Vr(n){var i=n.alternate;R(ht,ht.current&1),R(un,n),_n===null&&(i===null||ja.current!==null||i.memoizedState!==null)&&(_n=n)}function ed(n){R(ht,ht.current),R(un,n),_n===null&&(_n=n)}function Jg(n){n.tag===22?(R(ht,ht.current),R(un,n),_n===null&&(_n=n)):Fr()}function Fr(){R(ht,ht.current),R(un,un.current)}function cn(n){$(un),_n===n&&(_n=null),$(ht)}var ht=z(0);function eu(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||oh(s)||sh(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var dr=0,ke=null,Ze=null,yt=null,tu=!1,Da=!1,Li=!1,nu=0,Zo=0,za=null,KC=0;function ct(){throw Error(a(321))}function td(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!sn(n[s],i[s]))return!1;return!0}function nd(n,i,s,c,m,x){return dr=x,ke=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,j.H=n===null||n.memoizedState===null?Ly:yd,Li=!1,x=s(c,m),Li=!1,Da&&(x=ty(i,s,c,m)),ey(n),x}function ey(n){j.H=Jo;var i=Ze!==null&&Ze.next!==null;if(dr=0,yt=Ze=ke=null,tu=!1,Zo=0,za=null,i)throw Error(a(300));n===null||xt||(n=n.dependencies,n!==null&&$l(n)&&(xt=!0))}function ty(n,i,s,c){ke=n;var m=0;do{if(Da&&(za=null),Zo=0,Da=!1,25<=m)throw Error(a(301));if(m+=1,yt=Ze=null,n.updateQueue!=null){var x=n.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}j.H=Iy,x=i(s,c)}while(Da);return x}function WC(){var n=j.H,i=n.useState()[0];return i=typeof i.then=="function"?Ko(i):i,n=n.useState()[0],(Ze!==null?Ze.memoizedState:null)!==n&&(ke.flags|=1024),i}function rd(){var n=nu!==0;return nu=0,n}function id(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function ad(n){if(tu){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}tu=!1}dr=0,yt=Ze=ke=null,Da=!1,Zo=nu=0,za=null}function Ht(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?ke.memoizedState=yt=n:yt=yt.next=n,yt}function pt(){if(Ze===null){var n=ke.alternate;n=n!==null?n.memoizedState:null}else n=Ze.next;var i=yt===null?ke.memoizedState:yt.next;if(i!==null)yt=i,Ze=n;else{if(n===null)throw ke.alternate===null?Error(a(467)):Error(a(310));Ze=n,n={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},yt===null?ke.memoizedState=yt=n:yt=yt.next=n}return yt}function ru(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ko(n){var i=Zo;return Zo+=1,za===null&&(za=[]),n=Yg(za,n,i),i=ke,(yt===null?i.memoizedState:yt.next)===null&&(i=i.alternate,j.H=i===null||i.memoizedState===null?Ly:yd),n}function iu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Ko(n);if(n.$$typeof===_)return kt(n)}throw Error(a(438,String(n)))}function od(n){var i=null,s=ke.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=ke.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=ru(),ke.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),c=0;c<n;c++)s[c]=q;return i.index++,s}function hr(n,i){return typeof i=="function"?i(n):i}function au(n){var i=pt();return sd(i,Ze,n)}function sd(n,i,s){var c=n.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=n.baseQueue,x=c.pending;if(x!==null){if(m!==null){var C=m.next;m.next=x.next,x.next=C}i.baseQueue=m=x,c.pending=null}if(x=n.baseState,m===null)n.memoizedState=x;else{i=m.next;var T=C=null,G=null,ee=i,ae=!1;do{var se=ee.lane&-536870913;if(se!==ee.lane?(ze&se)===se:(dr&se)===se){var ne=ee.revertLane;if(ne===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),se===Ta&&(ae=!0);else if((dr&ne)===ne){ee=ee.next,ne===Ta&&(ae=!0);continue}else se={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},G===null?(T=G=se,C=x):G=G.next=se,ke.lanes|=ne,Gr|=ne;se=ee.action,Li&&s(x,se),x=ee.hasEagerState?ee.eagerState:s(x,se)}else ne={lane:se,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},G===null?(T=G=ne,C=x):G=G.next=ne,ke.lanes|=se,Gr|=se;ee=ee.next}while(ee!==null&&ee!==i);if(G===null?C=x:G.next=T,!sn(x,n.memoizedState)&&(xt=!0,ae&&(s=Aa,s!==null)))throw s;n.memoizedState=x,n.baseState=C,n.baseQueue=G,c.lastRenderedState=x}return m===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function ld(n){var i=pt(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var c=s.dispatch,m=s.pending,x=i.memoizedState;if(m!==null){s.pending=null;var C=m=m.next;do x=n(x,C.action),C=C.next;while(C!==m);sn(x,i.memoizedState)||(xt=!0),i.memoizedState=x,i.baseQueue===null&&(i.baseState=x),s.lastRenderedState=x}return[x,c]}function ny(n,i,s){var c=ke,m=pt(),x=Be;if(x){if(s===void 0)throw Error(a(407));s=s()}else s=i();var C=!sn((Ze||m).memoizedState,s);if(C&&(m.memoizedState=s,xt=!0),m=m.queue,fd(ay.bind(null,c,m,n),[n]),m.getSnapshot!==i||C||yt!==null&&yt.memoizedState.tag&1){if(c.flags|=2048,La(9,{destroy:void 0},iy.bind(null,c,m,s,i),null),Je===null)throw Error(a(349));x||(dr&127)!==0||ry(c,i,s)}return s}function ry(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=ke.updateQueue,i===null?(i=ru(),ke.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function iy(n,i,s,c){i.value=s,i.getSnapshot=c,oy(i)&&sy(n)}function ay(n,i,s){return s(function(){oy(i)&&sy(n)})}function oy(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!sn(n,s)}catch{return!0}}function sy(n){var i=Mi(n,2);i!==null&&Zt(i,n,2)}function ud(n){var i=Ht();if(typeof n=="function"){var s=n;if(n=s(),Li){jt(!0);try{s()}finally{jt(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:n},i}function ly(n,i,s,c){return n.baseState=s,sd(n,Ze,typeof c=="function"?c:hr)}function JC(n,i,s,c,m){if(lu(n))throw Error(a(485));if(n=i.action,n!==null){var x={payload:m,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){x.listeners.push(C)}};j.T!==null?s(!0):x.isTransition=!1,c(x),s=i.pending,s===null?(x.next=i.pending=x,uy(i,x)):(x.next=s.next,i.pending=s.next=x)}}function uy(n,i){var s=i.action,c=i.payload,m=n.state;if(i.isTransition){var x=j.T,C={};j.T=C;try{var T=s(m,c),G=j.S;G!==null&&G(C,T),cy(n,i,T)}catch(ee){cd(n,i,ee)}finally{x!==null&&C.types!==null&&(x.types=C.types),j.T=x}}else try{x=s(m,c),cy(n,i,x)}catch(ee){cd(n,i,ee)}}function cy(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){fy(n,i,c)},function(c){return cd(n,i,c)}):fy(n,i,s)}function fy(n,i,s){i.status="fulfilled",i.value=s,dy(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,uy(n,s)))}function cd(n,i,s){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,dy(i),i=i.next;while(i!==c)}n.action=null}function dy(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function hy(n,i){return i}function py(n,i){if(Be){var s=Je.formState;if(s!==null){e:{var c=ke;if(Be){if(nt){t:{for(var m=nt,x=Cn;m.nodeType!==8;){if(!x){m=null;break t}if(m=Nn(m.nextSibling),m===null){m=null;break t}}x=m.data,m=x==="F!"||x==="F"?m:null}if(m){nt=Nn(m.nextSibling),c=m.data==="F!";break e}}Br(c)}c=!1}c&&(i=s[0])}}return s=Ht(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hy,lastRenderedState:i},s.queue=c,s=jy.bind(null,ke,c),c.dispatch=s,c=ud(!1),x=gd.bind(null,ke,!1,c.queue),c=Ht(),m={state:i,dispatch:null,action:n,pending:null},c.queue=m,s=JC.bind(null,ke,m,x,s),m.dispatch=s,c.memoizedState=n,[i,s,!1]}function my(n){var i=pt();return gy(i,Ze,n)}function gy(n,i,s){if(i=sd(n,i,hy)[0],n=au(hr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=Ko(i)}catch(C){throw C===Ra?Ql:C}else c=i;i=pt();var m=i.queue,x=m.dispatch;return s!==i.memoizedState&&(ke.flags|=2048,La(9,{destroy:void 0},e_.bind(null,m,s),null)),[c,x,n]}function e_(n,i){n.action=i}function yy(n){var i=pt(),s=Ze;if(s!==null)return gy(i,s,n);pt(),i=i.memoizedState,s=pt();var c=s.queue.dispatch;return s.memoizedState=n,[i,c,!1]}function La(n,i,s,c){return n={tag:n,create:s,deps:c,inst:i,next:null},i=ke.updateQueue,i===null&&(i=ru(),ke.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,i.lastEffect=n),n}function xy(){return pt().memoizedState}function ou(n,i,s,c){var m=Ht();ke.flags|=n,m.memoizedState=La(1|i,{destroy:void 0},s,c===void 0?null:c)}function su(n,i,s,c){var m=pt();c=c===void 0?null:c;var x=m.memoizedState.inst;Ze!==null&&c!==null&&td(c,Ze.memoizedState.deps)?m.memoizedState=La(i,x,s,c):(ke.flags|=n,m.memoizedState=La(1|i,x,s,c))}function vy(n,i){ou(8390656,8,n,i)}function fd(n,i){su(2048,8,n,i)}function t_(n){ke.flags|=4;var i=ke.updateQueue;if(i===null)i=ru(),ke.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function by(n){var i=pt().memoizedState;return t_({ref:i,nextImpl:n}),function(){if((Fe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Sy(n,i){return su(4,2,n,i)}function wy(n,i){return su(4,4,n,i)}function Ey(n,i){if(typeof i=="function"){n=n();var s=i(n);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Cy(n,i,s){s=s!=null?s.concat([n]):null,su(4,4,Ey.bind(null,i,n),s)}function dd(){}function _y(n,i){var s=pt();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&td(i,c[1])?c[0]:(s.memoizedState=[n,i],n)}function Ny(n,i){var s=pt();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&td(i,c[1]))return c[0];if(c=n(),Li){jt(!0);try{n()}finally{jt(!1)}}return s.memoizedState=[c,i],c}function hd(n,i,s){return s===void 0||(dr&1073741824)!==0&&(ze&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=M0(),ke.lanes|=n,Gr|=n,s)}function My(n,i,s,c){return sn(s,i)?s:ja.current!==null?(n=hd(n,s,c),sn(n,i)||(xt=!0),n):(dr&42)===0||(dr&1073741824)!==0&&(ze&261930)===0?(xt=!0,n.memoizedState=s):(n=M0(),ke.lanes|=n,Gr|=n,i)}function ky(n,i,s,c,m){var x=F.p;F.p=x!==0&&8>x?x:8;var C=j.T,T={};j.T=T,gd(n,!1,i,s);try{var G=m(),ee=j.S;if(ee!==null&&ee(T,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ae=ZC(G,c);Wo(n,i,ae,hn(n))}else Wo(n,i,c,hn(n))}catch(se){Wo(n,i,{then:function(){},status:"rejected",reason:se},hn())}finally{F.p=x,C!==null&&T.types!==null&&(C.types=T.types),j.T=C}}function n_(){}function pd(n,i,s,c){if(n.tag!==5)throw Error(a(476));var m=Ty(n).queue;ky(n,m,i,X,s===null?n_:function(){return Ay(n),s(c)})}function Ty(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:X},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hr,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Ay(n){var i=Ty(n);i.next===null&&(i=n.alternate.memoizedState),Wo(n,i.next.queue,{},hn())}function md(){return kt(ms)}function Ry(){return pt().memoizedState}function Oy(){return pt().memoizedState}function r_(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=hn();n=Ur(s);var c=qr(i,n,s);c!==null&&(Zt(c,i,s),Go(c,i,s)),i={cache:Ff()},n.payload=i;return}i=i.return}}function i_(n,i,s){var c=hn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lu(n)?Dy(i,s):(s=jf(n,i,s,c),s!==null&&(Zt(s,n,c),zy(s,i,c)))}function jy(n,i,s){var c=hn();Wo(n,i,s,c)}function Wo(n,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(lu(n))Dy(i,m);else{var x=n.alternate;if(n.lanes===0&&(x===null||x.lanes===0)&&(x=i.lastRenderedReducer,x!==null))try{var C=i.lastRenderedState,T=x(C,s);if(m.hasEagerState=!0,m.eagerState=T,sn(T,C))return ql(n,i,m,0),Je===null&&Ul(),!1}catch{}if(s=jf(n,i,m,c),s!==null)return Zt(s,n,c),zy(s,i,c),!0}return!1}function gd(n,i,s,c){if(c={lane:2,revertLane:Xd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lu(n)){if(i)throw Error(a(479))}else i=jf(n,s,c,2),i!==null&&Zt(i,n,2)}function lu(n){var i=n.alternate;return n===ke||i!==null&&i===ke}function Dy(n,i){Da=tu=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function zy(n,i,s){if((s&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,Sl(n,s)}}var Jo={readContext:kt,use:iu,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};Jo.useEffectEvent=ct;var Ly={readContext:kt,use:iu,useCallback:function(n,i){return Ht().memoizedState=[n,i===void 0?null:i],n},useContext:kt,useEffect:vy,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,ou(4194308,4,Ey.bind(null,i,n),s)},useLayoutEffect:function(n,i){return ou(4194308,4,n,i)},useInsertionEffect:function(n,i){ou(4,2,n,i)},useMemo:function(n,i){var s=Ht();i=i===void 0?null:i;var c=n();if(Li){jt(!0);try{n()}finally{jt(!1)}}return s.memoizedState=[c,i],c},useReducer:function(n,i,s){var c=Ht();if(s!==void 0){var m=s(i);if(Li){jt(!0);try{s(i)}finally{jt(!1)}}}else m=i;return c.memoizedState=c.baseState=m,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:m},c.queue=n,n=n.dispatch=i_.bind(null,ke,n),[c.memoizedState,n]},useRef:function(n){var i=Ht();return n={current:n},i.memoizedState=n},useState:function(n){n=ud(n);var i=n.queue,s=jy.bind(null,ke,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:dd,useDeferredValue:function(n,i){var s=Ht();return hd(s,n,i)},useTransition:function(){var n=ud(!1);return n=ky.bind(null,ke,n.queue,!0,!1),Ht().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var c=ke,m=Ht();if(Be){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Je===null)throw Error(a(349));(ze&127)!==0||ry(c,i,s)}m.memoizedState=s;var x={value:s,getSnapshot:i};return m.queue=x,vy(ay.bind(null,c,x,n),[n]),c.flags|=2048,La(9,{destroy:void 0},iy.bind(null,c,x,s,i),null),s},useId:function(){var n=Ht(),i=Je.identifierPrefix;if(Be){var s=Fn,c=Vn;s=(c&~(1<<32-$e(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=nu++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=KC++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:md,useFormState:py,useActionState:py,useOptimistic:function(n){var i=Ht();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=gd.bind(null,ke,!0,s),s.dispatch=i,[n,i]},useMemoCache:od,useCacheRefresh:function(){return Ht().memoizedState=r_.bind(null,ke)},useEffectEvent:function(n){var i=Ht(),s={impl:n};return i.memoizedState=s,function(){if((Fe&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},yd={readContext:kt,use:iu,useCallback:_y,useContext:kt,useEffect:fd,useImperativeHandle:Cy,useInsertionEffect:Sy,useLayoutEffect:wy,useMemo:Ny,useReducer:au,useRef:xy,useState:function(){return au(hr)},useDebugValue:dd,useDeferredValue:function(n,i){var s=pt();return My(s,Ze.memoizedState,n,i)},useTransition:function(){var n=au(hr)[0],i=pt().memoizedState;return[typeof n=="boolean"?n:Ko(n),i]},useSyncExternalStore:ny,useId:Ry,useHostTransitionStatus:md,useFormState:my,useActionState:my,useOptimistic:function(n,i){var s=pt();return ly(s,Ze,n,i)},useMemoCache:od,useCacheRefresh:Oy};yd.useEffectEvent=by;var Iy={readContext:kt,use:iu,useCallback:_y,useContext:kt,useEffect:fd,useImperativeHandle:Cy,useInsertionEffect:Sy,useLayoutEffect:wy,useMemo:Ny,useReducer:ld,useRef:xy,useState:function(){return ld(hr)},useDebugValue:dd,useDeferredValue:function(n,i){var s=pt();return Ze===null?hd(s,n,i):My(s,Ze.memoizedState,n,i)},useTransition:function(){var n=ld(hr)[0],i=pt().memoizedState;return[typeof n=="boolean"?n:Ko(n),i]},useSyncExternalStore:ny,useId:Ry,useHostTransitionStatus:md,useFormState:yy,useActionState:yy,useOptimistic:function(n,i){var s=pt();return Ze!==null?ly(s,Ze,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:od,useCacheRefresh:Oy};Iy.useEffectEvent=by;function xd(n,i,s,c){i=n.memoizedState,s=s(c,i),s=s==null?i:g({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var vd={enqueueSetState:function(n,i,s){n=n._reactInternals;var c=hn(),m=Ur(c);m.payload=i,s!=null&&(m.callback=s),i=qr(n,m,c),i!==null&&(Zt(i,n,c),Go(i,n,c))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var c=hn(),m=Ur(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=qr(n,m,c),i!==null&&(Zt(i,n,c),Go(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=hn(),c=Ur(s);c.tag=2,i!=null&&(c.callback=i),i=qr(n,c,s),i!==null&&(Zt(i,n,s),Go(i,n,s))}};function By(n,i,s,c,m,x,C){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,x,C):i.prototype&&i.prototype.isPureReactComponent?!Ho(s,c)||!Ho(m,x):!0}function Hy(n,i,s,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==n&&vd.enqueueReplaceState(i,i.state,null)}function Ii(n,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(n=n.defaultProps){s===i&&(s=g({},s));for(var m in n)s[m]===void 0&&(s[m]=n[m])}return s}function Py(n){Pl(n)}function Uy(n){console.error(n)}function qy(n){Pl(n)}function uu(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Vy(n,i,s){try{var c=n.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function bd(n,i,s){return s=Ur(s),s.tag=3,s.payload={element:null},s.callback=function(){uu(n,i)},s}function Fy(n){return n=Ur(n),n.tag=3,n}function Yy(n,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var x=c.value;n.payload=function(){return m(x)},n.callback=function(){Vy(i,s,c)}}var C=s.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(n.callback=function(){Vy(i,s,c),typeof m!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function a_(n,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&ka(i,s,m,!0),s=un.current,s!==null){switch(s.tag){case 31:case 13:return _n===null?Su():s.alternate===null&&ft===0&&(ft=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===Zl?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Yd(n,c,m)),!1;case 22:return s.flags|=65536,c===Zl?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Yd(n,c,m)),!1}throw Error(a(435,s.tag))}return Yd(n,c,m),Su(),!1}if(Be)return i=un.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==Hf&&(n=Error(a(422),{cause:c}),qo(Sn(n,s)))):(c!==Hf&&(i=Error(a(423),{cause:c}),qo(Sn(i,s))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,c=Sn(c,s),m=bd(n.stateNode,c,m),Zf(n,m),ft!==4&&(ft=2)),!1;var x=Error(a(520),{cause:c});if(x=Sn(x,s),ss===null?ss=[x]:ss.push(x),ft!==4&&(ft=2),i===null)return!0;c=Sn(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=m&-m,s.lanes|=n,n=bd(s.stateNode,c,n),Zf(s,n),!1;case 1:if(i=s.type,x=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Xr===null||!Xr.has(x))))return s.flags|=65536,m&=-m,s.lanes|=m,m=Fy(m),Yy(m,n,s,c),Zf(s,m),!1}s=s.return}while(s!==null);return!1}var Sd=Error(a(461)),xt=!1;function Tt(n,i,s,c){i.child=n===null?Qg(i,null,s,c):zi(i,n.child,s,c)}function $y(n,i,s,c,m){s=s.render;var x=i.ref;if("ref"in c){var C={};for(var T in c)T!=="ref"&&(C[T]=c[T])}else C=c;return Ri(i),c=nd(n,i,s,C,x,m),T=rd(),n!==null&&!xt?(id(n,i,m),pr(n,i,m)):(Be&&T&&If(i),i.flags|=1,Tt(n,i,c,m),i.child)}function Gy(n,i,s,c,m){if(n===null){var x=s.type;return typeof x=="function"&&!Df(x)&&x.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=x,Xy(n,i,x,c,m)):(n=Fl(s.type,null,c,i,i.mode,m),n.ref=i.ref,n.return=i,i.child=n)}if(x=n.child,!Td(n,m)){var C=x.memoizedProps;if(s=s.compare,s=s!==null?s:Ho,s(C,c)&&n.ref===i.ref)return pr(n,i,m)}return i.flags|=1,n=lr(x,c),n.ref=i.ref,n.return=i,i.child=n}function Xy(n,i,s,c,m){if(n!==null){var x=n.memoizedProps;if(Ho(x,c)&&n.ref===i.ref)if(xt=!1,i.pendingProps=c=x,Td(n,m))(n.flags&131072)!==0&&(xt=!0);else return i.lanes=n.lanes,pr(n,i,m)}return wd(n,i,s,c,m)}function Qy(n,i,s,c){var m=c.children,x=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(x=x!==null?x.baseLanes|s:s,n!==null){for(c=i.child=n.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~x}else c=0,i.child=null;return Zy(n,i,x,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Xl(i,x!==null?x.cachePool:null),x!==null?Wg(i,x):Wf(),Jg(i);else return c=i.lanes=536870912,Zy(n,i,x!==null?x.baseLanes|s:s,s,c)}else x!==null?(Xl(i,x.cachePool),Wg(i,x),Fr(),i.memoizedState=null):(n!==null&&Xl(i,null),Wf(),Fr());return Tt(n,i,m,s),i.child}function es(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Zy(n,i,s,c,m){var x=$f();return x=x===null?null:{parent:gt._currentValue,pool:x},i.memoizedState={baseLanes:s,cachePool:x},n!==null&&Xl(i,null),Wf(),Jg(i),n!==null&&ka(n,i,c,!0),i.childLanes=m,null}function cu(n,i){return i=du({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Ky(n,i,s){return zi(i,n.child,null,s),n=cu(i,i.pendingProps),n.flags|=2,cn(i),i.memoizedState=null,n}function o_(n,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Be){if(c.mode==="hidden")return n=cu(i,c),i.lanes=536870912,es(null,n);if(ed(i),(n=nt)?(n=ux(n,Cn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Lr!==null?{id:Vn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=Dg(n),s.return=i,i.child=s,Mt=i,nt=null)):n=null,n===null)throw Br(i);return i.lanes=536870912,null}return cu(i,c)}var x=n.memoizedState;if(x!==null){var C=x.dehydrated;if(ed(i),m)if(i.flags&256)i.flags&=-257,i=Ky(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(xt||ka(n,i,s,!1),m=(s&n.childLanes)!==0,xt||m){if(c=Je,c!==null&&(C=wl(c,s),C!==0&&C!==x.retryLane))throw x.retryLane=C,Mi(n,C),Zt(c,n,C),Sd;Su(),i=Ky(n,i,s)}else n=x.treeContext,nt=Nn(C.nextSibling),Mt=i,Be=!0,Ir=null,Cn=!1,n!==null&&Ig(i,n),i=cu(i,c),i.flags|=4096;return i}return n=lr(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function fu(n,i){var s=i.ref;if(s===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function wd(n,i,s,c,m){return Ri(i),s=nd(n,i,s,c,void 0,m),c=rd(),n!==null&&!xt?(id(n,i,m),pr(n,i,m)):(Be&&c&&If(i),i.flags|=1,Tt(n,i,s,m),i.child)}function Wy(n,i,s,c,m,x){return Ri(i),i.updateQueue=null,s=ty(i,c,s,m),ey(n),c=rd(),n!==null&&!xt?(id(n,i,x),pr(n,i,x)):(Be&&c&&If(i),i.flags|=1,Tt(n,i,s,x),i.child)}function Jy(n,i,s,c,m){if(Ri(i),i.stateNode===null){var x=Ca,C=s.contextType;typeof C=="object"&&C!==null&&(x=kt(C)),x=new s(c,x),i.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=vd,i.stateNode=x,x._reactInternals=i,x=i.stateNode,x.props=c,x.state=i.memoizedState,x.refs={},Xf(i),C=s.contextType,x.context=typeof C=="object"&&C!==null?kt(C):Ca,x.state=i.memoizedState,C=s.getDerivedStateFromProps,typeof C=="function"&&(xd(i,s,C,c),x.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(C=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),C!==x.state&&vd.enqueueReplaceState(x,x.state,null),Qo(i,c,x,m),Xo(),x.state=i.memoizedState),typeof x.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){x=i.stateNode;var T=i.memoizedProps,G=Ii(s,T);x.props=G;var ee=x.context,ae=s.contextType;C=Ca,typeof ae=="object"&&ae!==null&&(C=kt(ae));var se=s.getDerivedStateFromProps;ae=typeof se=="function"||typeof x.getSnapshotBeforeUpdate=="function",T=i.pendingProps!==T,ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T||ee!==C)&&Hy(i,x,c,C),Pr=!1;var ne=i.memoizedState;x.state=ne,Qo(i,c,x,m),Xo(),ee=i.memoizedState,T||ne!==ee||Pr?(typeof se=="function"&&(xd(i,s,se,c),ee=i.memoizedState),(G=Pr||By(i,s,G,c,ne,ee,C))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(i.flags|=4194308)):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=ee),x.props=c,x.state=ee,x.context=C,c=G):(typeof x.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{x=i.stateNode,Qf(n,i),C=i.memoizedProps,ae=Ii(s,C),x.props=ae,se=i.pendingProps,ne=x.context,ee=s.contextType,G=Ca,typeof ee=="object"&&ee!==null&&(G=kt(ee)),T=s.getDerivedStateFromProps,(ee=typeof T=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==se||ne!==G)&&Hy(i,x,c,G),Pr=!1,ne=i.memoizedState,x.state=ne,Qo(i,c,x,m),Xo();var re=i.memoizedState;C!==se||ne!==re||Pr||n!==null&&n.dependencies!==null&&$l(n.dependencies)?(typeof T=="function"&&(xd(i,s,T,c),re=i.memoizedState),(ae=Pr||By(i,s,ae,c,ne,re,G)||n!==null&&n.dependencies!==null&&$l(n.dependencies))?(ee||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,re,G),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,re,G)),typeof x.componentDidUpdate=="function"&&(i.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===n.memoizedProps&&ne===n.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===n.memoizedProps&&ne===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=re),x.props=c,x.state=re,x.context=G,c=ae):(typeof x.componentDidUpdate!="function"||C===n.memoizedProps&&ne===n.memoizedState||(i.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===n.memoizedProps&&ne===n.memoizedState||(i.flags|=1024),c=!1)}return x=c,fu(n,i),c=(i.flags&128)!==0,x||c?(x=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:x.render(),i.flags|=1,n!==null&&c?(i.child=zi(i,n.child,null,m),i.child=zi(i,null,s,m)):Tt(n,i,s,m),i.memoizedState=x.state,n=i.child):n=pr(n,i,m),n}function e0(n,i,s,c){return Ti(),i.flags|=256,Tt(n,i,s,c),i.child}var Ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cd(n){return{baseLanes:n,cachePool:Vg()}}function _d(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=dn),n}function t0(n,i,s){var c=i.pendingProps,m=!1,x=(i.flags&128)!==0,C;if((C=x)||(C=n!==null&&n.memoizedState===null?!1:(ht.current&2)!==0),C&&(m=!0,i.flags&=-129),C=(i.flags&32)!==0,i.flags&=-33,n===null){if(Be){if(m?Vr(i):Fr(),(n=nt)?(n=ux(n,Cn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Lr!==null?{id:Vn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=Dg(n),s.return=i,i.child=s,Mt=i,nt=null)):n=null,n===null)throw Br(i);return sh(n)?i.lanes=32:i.lanes=536870912,null}var T=c.children;return c=c.fallback,m?(Fr(),m=i.mode,T=du({mode:"hidden",children:T},m),c=ki(c,m,s,null),T.return=i,c.return=i,T.sibling=c,i.child=T,c=i.child,c.memoizedState=Cd(s),c.childLanes=_d(n,C,s),i.memoizedState=Ed,es(null,c)):(Vr(i),Nd(i,T))}var G=n.memoizedState;if(G!==null&&(T=G.dehydrated,T!==null)){if(x)i.flags&256?(Vr(i),i.flags&=-257,i=Md(n,i,s)):i.memoizedState!==null?(Fr(),i.child=n.child,i.flags|=128,i=null):(Fr(),T=c.fallback,m=i.mode,c=du({mode:"visible",children:c.children},m),T=ki(T,m,s,null),T.flags|=2,c.return=i,T.return=i,c.sibling=T,i.child=c,zi(i,n.child,null,s),c=i.child,c.memoizedState=Cd(s),c.childLanes=_d(n,C,s),i.memoizedState=Ed,i=es(null,c));else if(Vr(i),sh(T)){if(C=T.nextSibling&&T.nextSibling.dataset,C)var ee=C.dgst;C=ee,c=Error(a(419)),c.stack="",c.digest=C,qo({value:c,source:null,stack:null}),i=Md(n,i,s)}else if(xt||ka(n,i,s,!1),C=(s&n.childLanes)!==0,xt||C){if(C=Je,C!==null&&(c=wl(C,s),c!==0&&c!==G.retryLane))throw G.retryLane=c,Mi(n,c),Zt(C,n,c),Sd;oh(T)||Su(),i=Md(n,i,s)}else oh(T)?(i.flags|=192,i.child=n.child,i=null):(n=G.treeContext,nt=Nn(T.nextSibling),Mt=i,Be=!0,Ir=null,Cn=!1,n!==null&&Ig(i,n),i=Nd(i,c.children),i.flags|=4096);return i}return m?(Fr(),T=c.fallback,m=i.mode,G=n.child,ee=G.sibling,c=lr(G,{mode:"hidden",children:c.children}),c.subtreeFlags=G.subtreeFlags&65011712,ee!==null?T=lr(ee,T):(T=ki(T,m,s,null),T.flags|=2),T.return=i,c.return=i,c.sibling=T,i.child=c,es(null,c),c=i.child,T=n.child.memoizedState,T===null?T=Cd(s):(m=T.cachePool,m!==null?(G=gt._currentValue,m=m.parent!==G?{parent:G,pool:G}:m):m=Vg(),T={baseLanes:T.baseLanes|s,cachePool:m}),c.memoizedState=T,c.childLanes=_d(n,C,s),i.memoizedState=Ed,es(n.child,c)):(Vr(i),s=n.child,n=s.sibling,s=lr(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,n!==null&&(C=i.deletions,C===null?(i.deletions=[n],i.flags|=16):C.push(n)),i.child=s,i.memoizedState=null,s)}function Nd(n,i){return i=du({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function du(n,i){return n=ln(22,n,null,i),n.lanes=0,n}function Md(n,i,s){return zi(i,n.child,null,s),n=Nd(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function n0(n,i,s){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),qf(n.return,i,s)}function kd(n,i,s,c,m,x){var C=n.memoizedState;C===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:x}:(C.isBackwards=i,C.rendering=null,C.renderingStartTime=0,C.last=c,C.tail=s,C.tailMode=m,C.treeForkCount=x)}function r0(n,i,s){var c=i.pendingProps,m=c.revealOrder,x=c.tail;c=c.children;var C=ht.current,T=(C&2)!==0;if(T?(C=C&1|2,i.flags|=128):C&=1,R(ht,C),Tt(n,i,c,s),c=Be?Uo:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&n0(n,s,i);else if(n.tag===19)n0(n,s,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)n=s.alternate,n!==null&&eu(n)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),kd(i,!1,m,s,x,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(n=m.alternate,n!==null&&eu(n)===null){i.child=m;break}n=m.sibling,m.sibling=s,s=m,m=n}kd(i,!0,s,null,x,c);break;case"together":kd(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function pr(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Gr|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(ka(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,s=lr(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=lr(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function Td(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&$l(n)))}function s_(n,i,s){switch(i.tag){case 3:le(i,i.stateNode.containerInfo),Hr(i,gt,n.memoizedState.cache),Ti();break;case 27:case 5:be(i);break;case 4:le(i,i.stateNode.containerInfo);break;case 10:Hr(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ed(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Vr(i),i.flags|=128,null):(s&i.child.childLanes)!==0?t0(n,i,s):(Vr(i),n=pr(n,i,s),n!==null?n.sibling:null);Vr(i);break;case 19:var m=(n.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(ka(n,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return r0(n,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),R(ht,ht.current),c)break;return null;case 22:return i.lanes=0,Qy(n,i,s,i.pendingProps);case 24:Hr(i,gt,n.memoizedState.cache)}return pr(n,i,s)}function i0(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)xt=!0;else{if(!Td(n,s)&&(i.flags&128)===0)return xt=!1,s_(n,i,s);xt=(n.flags&131072)!==0}else xt=!1,Be&&(i.flags&1048576)!==0&&Lg(i,Uo,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=ji(i.elementType),i.type=n,typeof n=="function")Df(n)?(c=Ii(n,c),i.tag=1,i=Jy(null,i,n,c,s)):(i.tag=0,i=wd(null,i,n,c,s));else{if(n!=null){var m=n.$$typeof;if(m===M){i.tag=11,i=$y(null,i,n,c,s);break e}else if(m===D){i.tag=14,i=Gy(null,i,n,c,s);break e}}throw i=I(n)||n,Error(a(306,i,""))}}return i;case 0:return wd(n,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=Ii(c,i.pendingProps),Jy(n,i,c,m,s);case 3:e:{if(le(i,i.stateNode.containerInfo),n===null)throw Error(a(387));c=i.pendingProps;var x=i.memoizedState;m=x.element,Qf(n,i),Qo(i,c,null,s);var C=i.memoizedState;if(c=C.cache,Hr(i,gt,c),c!==x.cache&&Vf(i,[gt],s,!0),Xo(),c=C.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:C.cache},i.updateQueue.baseState=x,i.memoizedState=x,i.flags&256){i=e0(n,i,c,s);break e}else if(c!==m){m=Sn(Error(a(424)),i),qo(m),i=e0(n,i,c,s);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,nt=Nn(n.firstChild),Mt=i,Be=!0,Ir=null,Cn=!0,s=Qg(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ti(),c===m){i=pr(n,i,s);break e}Tt(n,i,c,s)}i=i.child}return i;case 26:return fu(n,i),n===null?(s=mx(i.type,null,i.pendingProps,null))?i.memoizedState=s:Be||(s=i.type,n=i.pendingProps,c=ku(ce.current).createElement(s),c[wt]=i,c[Dt]=n,At(c,s,n),mt(c),i.stateNode=c):i.memoizedState=mx(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return be(i),n===null&&Be&&(c=i.stateNode=dx(i.type,i.pendingProps,ce.current),Mt=i,Cn=!0,m=nt,Wr(i.type)?(lh=m,nt=Nn(c.firstChild)):nt=m),Tt(n,i,i.pendingProps.children,s),fu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Be&&((m=c=nt)&&(c=I_(c,i.type,i.pendingProps,Cn),c!==null?(i.stateNode=c,Mt=i,nt=Nn(c.firstChild),Cn=!1,m=!0):m=!1),m||Br(i)),be(i),m=i.type,x=i.pendingProps,C=n!==null?n.memoizedProps:null,c=x.children,rh(m,x)?c=null:C!==null&&rh(m,C)&&(i.flags|=32),i.memoizedState!==null&&(m=nd(n,i,WC,null,null,s),ms._currentValue=m),fu(n,i),Tt(n,i,c,s),i.child;case 6:return n===null&&Be&&((n=s=nt)&&(s=B_(s,i.pendingProps,Cn),s!==null?(i.stateNode=s,Mt=i,nt=null,n=!0):n=!1),n||Br(i)),null;case 13:return t0(n,i,s);case 4:return le(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=zi(i,null,c,s):Tt(n,i,c,s),i.child;case 11:return $y(n,i,i.type,i.pendingProps,s);case 7:return Tt(n,i,i.pendingProps,s),i.child;case 8:return Tt(n,i,i.pendingProps.children,s),i.child;case 12:return Tt(n,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Hr(i,i.type,c.value),Tt(n,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,Ri(i),m=kt(m),c=c(m),i.flags|=1,Tt(n,i,c,s),i.child;case 14:return Gy(n,i,i.type,i.pendingProps,s);case 15:return Xy(n,i,i.type,i.pendingProps,s);case 19:return r0(n,i,s);case 31:return o_(n,i,s);case 22:return Qy(n,i,s,i.pendingProps);case 24:return Ri(i),c=kt(gt),n===null?(m=$f(),m===null&&(m=Je,x=Ff(),m.pooledCache=x,x.refCount++,x!==null&&(m.pooledCacheLanes|=s),m=x),i.memoizedState={parent:c,cache:m},Xf(i),Hr(i,gt,m)):((n.lanes&s)!==0&&(Qf(n,i),Qo(i,null,null,s),Xo()),m=n.memoizedState,x=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),Hr(i,gt,c)):(c=x.cache,Hr(i,gt,c),c!==m.cache&&Vf(i,[gt],s,!0))),Tt(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function mr(n){n.flags|=4}function Ad(n,i,s,c,m){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(m&335544128)===m)if(n.stateNode.complete)n.flags|=8192;else if(R0())n.flags|=8192;else throw Di=Zl,Gf}else n.flags&=-16777217}function a0(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!bx(i))if(R0())n.flags|=8192;else throw Di=Zl,Gf}function hu(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?vl():536870912,n.lanes|=i,Pa|=i)}function ts(n,i){if(!Be)switch(n.tailMode){case"hidden":i=n.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function rt(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(i)for(var m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=c,n.childLanes=s,i}function l_(n,i,s){var c=i.pendingProps;switch(Bf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(i),null;case 1:return rt(i),null;case 3:return s=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),fr(gt),pe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Ma(i)?mr(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Pf())),rt(i),null;case 26:var m=i.type,x=i.memoizedState;return n===null?(mr(i),x!==null?(rt(i),a0(i,x)):(rt(i),Ad(i,m,null,c,s))):x?x!==n.memoizedState?(mr(i),rt(i),a0(i,x)):(rt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&mr(i),rt(i),Ad(i,m,n,c,s)),null;case 27:if(Se(i),s=ce.current,m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&mr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return rt(i),null}n=te.current,Ma(i)?Bg(i):(n=dx(m,c,s),i.stateNode=n,mr(i))}return rt(i),null;case 5:if(Se(i),m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&mr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return rt(i),null}if(x=te.current,Ma(i))Bg(i);else{var C=ku(ce.current);switch(x){case 1:x=C.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:x=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":x=C.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":x=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":x=C.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?C.createElement("select",{is:c.is}):C.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?C.createElement(m,{is:c.is}):C.createElement(m)}}x[wt]=i,x[Dt]=c;e:for(C=i.child;C!==null;){if(C.tag===5||C.tag===6)x.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===i)break e;for(;C.sibling===null;){if(C.return===null||C.return===i)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}i.stateNode=x;e:switch(At(x,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&mr(i)}}return rt(i),Ad(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&mr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(n=ce.current,Ma(i)){if(n=i.stateNode,s=i.memoizedProps,c=null,m=Mt,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}n[wt]=i,n=!!(n.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||tx(n.nodeValue,s)),n||Br(i,!0)}else n=ku(n).createTextNode(c),n[wt]=i,i.stateNode=n}return rt(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(c=Ma(i),s!==null){if(n===null){if(!c)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[wt]=i}else Ti(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rt(i),n=!1}else s=Pf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(cn(i),i):(cn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return rt(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(m=Ma(i),c!==null&&c.dehydrated!==null){if(n===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[wt]=i}else Ti(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rt(i),m=!1}else m=Pf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(cn(i),i):(cn(i),null)}return cn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,n=n!==null&&n.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==m&&(c.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),hu(i,i.updateQueue),rt(i),null);case 4:return pe(),n===null&&Wd(i.stateNode.containerInfo),rt(i),null;case 10:return fr(i.type),rt(i),null;case 19:if($(ht),c=i.memoizedState,c===null)return rt(i),null;if(m=(i.flags&128)!==0,x=c.rendering,x===null)if(m)ts(c,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(x=eu(n),x!==null){for(i.flags|=128,ts(c,!1),n=x.updateQueue,i.updateQueue=n,hu(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)jg(s,n),s=s.sibling;return R(ht,ht.current&1|2),Be&&ur(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&Ne()>xu&&(i.flags|=128,m=!0,ts(c,!1),i.lanes=4194304)}else{if(!m)if(n=eu(x),n!==null){if(i.flags|=128,m=!0,n=n.updateQueue,i.updateQueue=n,hu(i,n),ts(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!Be)return rt(i),null}else 2*Ne()-c.renderingStartTime>xu&&s!==536870912&&(i.flags|=128,m=!0,ts(c,!1),i.lanes=4194304);c.isBackwards?(x.sibling=i.child,i.child=x):(n=c.last,n!==null?n.sibling=x:i.child=x,c.last=x)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=Ne(),n.sibling=null,s=ht.current,R(ht,m?s&1|2:s&1),Be&&ur(i,c.treeForkCount),n):(rt(i),null);case 22:case 23:return cn(i),Jf(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(rt(i),i.subtreeFlags&6&&(i.flags|=8192)):rt(i),s=i.updateQueue,s!==null&&hu(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),n!==null&&$(Oi),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),fr(gt),rt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function u_(n,i){switch(Bf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return fr(gt),pe(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Se(i),null;case 31:if(i.memoizedState!==null){if(cn(i),i.alternate===null)throw Error(a(340));Ti()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(cn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ti()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return $(ht),null;case 4:return pe(),null;case 10:return fr(i.type),null;case 22:case 23:return cn(i),Jf(),n!==null&&$(Oi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return fr(gt),null;case 25:return null;default:return null}}function o0(n,i){switch(Bf(i),i.tag){case 3:fr(gt),pe();break;case 26:case 27:case 5:Se(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&cn(i);break;case 13:cn(i);break;case 19:$(ht);break;case 10:fr(i.type);break;case 22:case 23:cn(i),Jf(),n!==null&&$(Oi);break;case 24:fr(gt)}}function ns(n,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&n)===n){c=void 0;var x=s.create,C=s.inst;c=x(),C.destroy=c}s=s.next}while(s!==m)}}catch(T){Xe(i,i.return,T)}}function Yr(n,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var x=m.next;c=x;do{if((c.tag&n)===n){var C=c.inst,T=C.destroy;if(T!==void 0){C.destroy=void 0,m=i;var G=s,ee=T;try{ee()}catch(ae){Xe(m,G,ae)}}}c=c.next}while(c!==x)}}catch(ae){Xe(i,i.return,ae)}}function s0(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{Kg(i,s)}catch(c){Xe(n,n.return,c)}}}function l0(n,i,s){s.props=Ii(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(c){Xe(n,i,c)}}function rs(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof s=="function"?n.refCleanup=s(c):s.current=c}}catch(m){Xe(n,i,m)}}function Yn(n,i){var s=n.ref,c=n.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Xe(n,i,m)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Xe(n,i,m)}else s.current=null}function u0(n){var i=n.type,s=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Xe(n,n.return,m)}}function Rd(n,i,s){try{var c=n.stateNode;R_(c,n.type,s,i),c[Dt]=i}catch(m){Xe(n,n.return,m)}}function c0(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Wr(n.type)||n.tag===4}function Od(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||c0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Wr(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function jd(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(n),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=or));else if(c!==4&&(c===27&&Wr(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(jd(n,i,s),n=n.sibling;n!==null;)jd(n,i,s),n=n.sibling}function pu(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(c!==4&&(c===27&&Wr(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(pu(n,i,s),n=n.sibling;n!==null;)pu(n,i,s),n=n.sibling}function f0(n){var i=n.stateNode,s=n.memoizedProps;try{for(var c=n.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);At(i,c,s),i[wt]=n,i[Dt]=s}catch(x){Xe(n,n.return,x)}}var gr=!1,vt=!1,Dd=!1,d0=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function c_(n,i){if(n=n.containerInfo,th=zu,n=Cg(n),Mf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{s.nodeType,x.nodeType}catch{s=null;break e}var C=0,T=-1,G=-1,ee=0,ae=0,se=n,ne=null;t:for(;;){for(var re;se!==s||m!==0&&se.nodeType!==3||(T=C+m),se!==x||c!==0&&se.nodeType!==3||(G=C+c),se.nodeType===3&&(C+=se.nodeValue.length),(re=se.firstChild)!==null;)ne=se,se=re;for(;;){if(se===n)break t;if(ne===s&&++ee===m&&(T=C),ne===x&&++ae===c&&(G=C),(re=se.nextSibling)!==null)break;se=ne,ne=se.parentNode}se=re}s=T===-1||G===-1?null:{start:T,end:G}}else s=null}s=s||{start:0,end:0}}else s=null;for(nh={focusedElem:n,selectionRange:s},zu=!1,Ct=i;Ct!==null;)if(i=Ct,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Ct=n;else for(;Ct!==null;){switch(i=Ct,x=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)m=n[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&x!==null){n=void 0,s=i,m=x.memoizedProps,x=x.memoizedState,c=s.stateNode;try{var me=Ii(s.type,m);n=c.getSnapshotBeforeUpdate(me,x),c.__reactInternalSnapshotBeforeUpdate=n}catch(Ce){Xe(s,s.return,Ce)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)ah(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,Ct=n;break}Ct=i.return}}function h0(n,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:xr(n,s),c&4&&ns(5,s);break;case 1:if(xr(n,s),c&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(C){Xe(s,s.return,C)}else{var m=Ii(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(m,i,n.__reactInternalSnapshotBeforeUpdate)}catch(C){Xe(s,s.return,C)}}c&64&&s0(s),c&512&&rs(s,s.return);break;case 3:if(xr(n,s),c&64&&(n=s.updateQueue,n!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{Kg(n,i)}catch(C){Xe(s,s.return,C)}}break;case 27:i===null&&c&4&&f0(s);case 26:case 5:xr(n,s),i===null&&c&4&&u0(s),c&512&&rs(s,s.return);break;case 12:xr(n,s);break;case 31:xr(n,s),c&4&&g0(n,s);break;case 13:xr(n,s),c&4&&y0(n,s),c&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=v_.bind(null,s),H_(n,s))));break;case 22:if(c=s.memoizedState!==null||gr,!c){i=i!==null&&i.memoizedState!==null||vt,m=gr;var x=vt;gr=c,(vt=i)&&!x?vr(n,s,(s.subtreeFlags&8772)!==0):xr(n,s),gr=m,vt=x}break;case 30:break;default:xr(n,s)}}function p0(n){var i=n.alternate;i!==null&&(n.alternate=null,p0(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&To(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var at=null,$t=!1;function yr(n,i,s){for(s=s.child;s!==null;)m0(n,i,s),s=s.sibling}function m0(n,i,s){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Nt,s)}catch{}switch(s.tag){case 26:vt||Yn(s,i),yr(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:vt||Yn(s,i);var c=at,m=$t;Wr(s.type)&&(at=s.stateNode,$t=!1),yr(n,i,s),ds(s.stateNode),at=c,$t=m;break;case 5:vt||Yn(s,i);case 6:if(c=at,m=$t,at=null,yr(n,i,s),at=c,$t=m,at!==null)if($t)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(s.stateNode)}catch(x){Xe(s,i,x)}else try{at.removeChild(s.stateNode)}catch(x){Xe(s,i,x)}break;case 18:at!==null&&($t?(n=at,sx(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),Xa(n)):sx(at,s.stateNode));break;case 4:c=at,m=$t,at=s.stateNode.containerInfo,$t=!0,yr(n,i,s),at=c,$t=m;break;case 0:case 11:case 14:case 15:Yr(2,s,i),vt||Yr(4,s,i),yr(n,i,s);break;case 1:vt||(Yn(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&l0(s,i,c)),yr(n,i,s);break;case 21:yr(n,i,s);break;case 22:vt=(c=vt)||s.memoizedState!==null,yr(n,i,s),vt=c;break;default:yr(n,i,s)}}function g0(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Xa(n)}catch(s){Xe(i,i.return,s)}}}function y0(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Xa(n)}catch(s){Xe(i,i.return,s)}}function f_(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new d0),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new d0),i;default:throw Error(a(435,n.tag))}}function mu(n,i){var s=f_(n);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=b_.bind(null,n,c);c.then(m,m)}})}function Gt(n,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],x=n,C=i,T=C;e:for(;T!==null;){switch(T.tag){case 27:if(Wr(T.type)){at=T.stateNode,$t=!1;break e}break;case 5:at=T.stateNode,$t=!1;break e;case 3:case 4:at=T.stateNode.containerInfo,$t=!0;break e}T=T.return}if(at===null)throw Error(a(160));m0(x,C,m),at=null,$t=!1,x=m.alternate,x!==null&&(x.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)x0(i,n),i=i.sibling}var Dn=null;function x0(n,i){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Gt(i,n),Xt(n),c&4&&(Yr(3,n,n.return),ns(3,n),Yr(5,n,n.return));break;case 1:Gt(i,n),Xt(n),c&512&&(vt||s===null||Yn(s,s.return)),c&64&&gr&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Dn;if(Gt(i,n),Xt(n),c&512&&(vt||s===null||Yn(s,s.return)),c&4){var x=s!==null?s.memoizedState:null;if(c=n.memoizedState,s===null)if(c===null)if(n.stateNode===null){e:{c=n.type,s=n.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":x=m.getElementsByTagName("title")[0],(!x||x[Si]||x[wt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=m.createElement(c),m.head.insertBefore(x,m.querySelector("head > title"))),At(x,c,s),x[wt]=n,mt(x),c=x;break e;case"link":var C=xx("link","href",m).get(c+(s.href||""));if(C){for(var T=0;T<C.length;T++)if(x=C[T],x.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&x.getAttribute("rel")===(s.rel==null?null:s.rel)&&x.getAttribute("title")===(s.title==null?null:s.title)&&x.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){C.splice(T,1);break t}}x=m.createElement(c),At(x,c,s),m.head.appendChild(x);break;case"meta":if(C=xx("meta","content",m).get(c+(s.content||""))){for(T=0;T<C.length;T++)if(x=C[T],x.getAttribute("content")===(s.content==null?null:""+s.content)&&x.getAttribute("name")===(s.name==null?null:s.name)&&x.getAttribute("property")===(s.property==null?null:s.property)&&x.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&x.getAttribute("charset")===(s.charSet==null?null:s.charSet)){C.splice(T,1);break t}}x=m.createElement(c),At(x,c,s),m.head.appendChild(x);break;default:throw Error(a(468,c))}x[wt]=n,mt(x),c=x}n.stateNode=c}else vx(m,n.type,n.stateNode);else n.stateNode=yx(m,c,n.memoizedProps);else x!==c?(x===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):x.count--,c===null?vx(m,n.type,n.stateNode):yx(m,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Rd(n,n.memoizedProps,s.memoizedProps)}break;case 27:Gt(i,n),Xt(n),c&512&&(vt||s===null||Yn(s,s.return)),s!==null&&c&4&&Rd(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Gt(i,n),Xt(n),c&512&&(vt||s===null||Yn(s,s.return)),n.flags&32){m=n.stateNode;try{ya(m,"")}catch(me){Xe(n,n.return,me)}}c&4&&n.stateNode!=null&&(m=n.memoizedProps,Rd(n,m,s!==null?s.memoizedProps:m)),c&1024&&(Dd=!0);break;case 6:if(Gt(i,n),Xt(n),c&4){if(n.stateNode===null)throw Error(a(162));c=n.memoizedProps,s=n.stateNode;try{s.nodeValue=c}catch(me){Xe(n,n.return,me)}}break;case 3:if(Ru=null,m=Dn,Dn=Tu(i.containerInfo),Gt(i,n),Dn=m,Xt(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{Xa(i.containerInfo)}catch(me){Xe(n,n.return,me)}Dd&&(Dd=!1,v0(n));break;case 4:c=Dn,Dn=Tu(n.stateNode.containerInfo),Gt(i,n),Xt(n),Dn=c;break;case 12:Gt(i,n),Xt(n);break;case 31:Gt(i,n),Xt(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,mu(n,c)));break;case 13:Gt(i,n),Xt(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(yu=Ne()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,mu(n,c)));break;case 22:m=n.memoizedState!==null;var G=s!==null&&s.memoizedState!==null,ee=gr,ae=vt;if(gr=ee||m,vt=ae||G,Gt(i,n),vt=ae,gr=ee,Xt(n),c&8192)e:for(i=n.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||G||gr||vt||Bi(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){G=s=i;try{if(x=G.stateNode,m)C=x.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{T=G.stateNode;var se=G.memoizedProps.style,ne=se!=null&&se.hasOwnProperty("display")?se.display:null;T.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(me){Xe(G,G.return,me)}}}else if(i.tag===6){if(s===null){G=i;try{G.stateNode.nodeValue=m?"":G.memoizedProps}catch(me){Xe(G,G.return,me)}}}else if(i.tag===18){if(s===null){G=i;try{var re=G.stateNode;m?lx(re,!0):lx(G.stateNode,!1)}catch(me){Xe(G,G.return,me)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=n.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,mu(n,s))));break;case 19:Gt(i,n),Xt(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,mu(n,c)));break;case 30:break;case 21:break;default:Gt(i,n),Xt(n)}}function Xt(n){var i=n.flags;if(i&2){try{for(var s,c=n.return;c!==null;){if(c0(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,x=Od(n);pu(n,x,m);break;case 5:var C=s.stateNode;s.flags&32&&(ya(C,""),s.flags&=-33);var T=Od(n);pu(n,T,C);break;case 3:case 4:var G=s.stateNode.containerInfo,ee=Od(n);jd(n,ee,G);break;default:throw Error(a(161))}}catch(ae){Xe(n,n.return,ae)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function v0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;v0(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function xr(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)h0(n,i.alternate,i),i=i.sibling}function Bi(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Yr(4,i,i.return),Bi(i);break;case 1:Yn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&l0(i,i.return,s),Bi(i);break;case 27:ds(i.stateNode);case 26:case 5:Yn(i,i.return),Bi(i);break;case 22:i.memoizedState===null&&Bi(i);break;case 30:Bi(i);break;default:Bi(i)}n=n.sibling}}function vr(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=n,x=i,C=x.flags;switch(x.tag){case 0:case 11:case 15:vr(m,x,s),ns(4,x);break;case 1:if(vr(m,x,s),c=x,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ee){Xe(c,c.return,ee)}if(c=x,m=c.updateQueue,m!==null){var T=c.stateNode;try{var G=m.shared.hiddenCallbacks;if(G!==null)for(m.shared.hiddenCallbacks=null,m=0;m<G.length;m++)Zg(G[m],T)}catch(ee){Xe(c,c.return,ee)}}s&&C&64&&s0(x),rs(x,x.return);break;case 27:f0(x);case 26:case 5:vr(m,x,s),s&&c===null&&C&4&&u0(x),rs(x,x.return);break;case 12:vr(m,x,s);break;case 31:vr(m,x,s),s&&C&4&&g0(m,x);break;case 13:vr(m,x,s),s&&C&4&&y0(m,x);break;case 22:x.memoizedState===null&&vr(m,x,s),rs(x,x.return);break;case 30:break;default:vr(m,x,s)}i=i.sibling}}function zd(n,i){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&Vo(s))}function Ld(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Vo(n))}function zn(n,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)b0(n,i,s,c),i=i.sibling}function b0(n,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:zn(n,i,s,c),m&2048&&ns(9,i);break;case 1:zn(n,i,s,c);break;case 3:zn(n,i,s,c),m&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Vo(n)));break;case 12:if(m&2048){zn(n,i,s,c),n=i.stateNode;try{var x=i.memoizedProps,C=x.id,T=x.onPostCommit;typeof T=="function"&&T(C,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(G){Xe(i,i.return,G)}}else zn(n,i,s,c);break;case 31:zn(n,i,s,c);break;case 13:zn(n,i,s,c);break;case 23:break;case 22:x=i.stateNode,C=i.alternate,i.memoizedState!==null?x._visibility&2?zn(n,i,s,c):is(n,i):x._visibility&2?zn(n,i,s,c):(x._visibility|=2,Ia(n,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&zd(C,i);break;case 24:zn(n,i,s,c),m&2048&&Ld(i.alternate,i);break;default:zn(n,i,s,c)}}function Ia(n,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var x=n,C=i,T=s,G=c,ee=C.flags;switch(C.tag){case 0:case 11:case 15:Ia(x,C,T,G,m),ns(8,C);break;case 23:break;case 22:var ae=C.stateNode;C.memoizedState!==null?ae._visibility&2?Ia(x,C,T,G,m):is(x,C):(ae._visibility|=2,Ia(x,C,T,G,m)),m&&ee&2048&&zd(C.alternate,C);break;case 24:Ia(x,C,T,G,m),m&&ee&2048&&Ld(C.alternate,C);break;default:Ia(x,C,T,G,m)}i=i.sibling}}function is(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,c=i,m=c.flags;switch(c.tag){case 22:is(s,c),m&2048&&zd(c.alternate,c);break;case 24:is(s,c),m&2048&&Ld(c.alternate,c);break;default:is(s,c)}i=i.sibling}}var as=8192;function Ba(n,i,s){if(n.subtreeFlags&as)for(n=n.child;n!==null;)S0(n,i,s),n=n.sibling}function S0(n,i,s){switch(n.tag){case 26:Ba(n,i,s),n.flags&as&&n.memoizedState!==null&&K_(s,Dn,n.memoizedState,n.memoizedProps);break;case 5:Ba(n,i,s);break;case 3:case 4:var c=Dn;Dn=Tu(n.stateNode.containerInfo),Ba(n,i,s),Dn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=as,as=16777216,Ba(n,i,s),as=c):Ba(n,i,s));break;default:Ba(n,i,s)}}function w0(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function os(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Ct=c,C0(c,n)}w0(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)E0(n),n=n.sibling}function E0(n){switch(n.tag){case 0:case 11:case 15:os(n),n.flags&2048&&Yr(9,n,n.return);break;case 3:os(n);break;case 12:os(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,gu(n)):os(n);break;default:os(n)}}function gu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Ct=c,C0(c,n)}w0(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Yr(8,i,i.return),gu(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,gu(i));break;default:gu(i)}n=n.sibling}}function C0(n,i){for(;Ct!==null;){var s=Ct;switch(s.tag){case 0:case 11:case 15:Yr(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Vo(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Ct=c;else e:for(s=n;Ct!==null;){c=Ct;var m=c.sibling,x=c.return;if(p0(c),c===s){Ct=null;break e}if(m!==null){m.return=x,Ct=m;break e}Ct=x}}}var d_={getCacheForType:function(n){var i=kt(gt),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return kt(gt).controller.signal}},h_=typeof WeakMap=="function"?WeakMap:Map,Fe=0,Je=null,je=null,ze=0,Ge=0,fn=null,$r=!1,Ha=!1,Id=!1,br=0,ft=0,Gr=0,Hi=0,Bd=0,dn=0,Pa=0,ss=null,Qt=null,Hd=!1,yu=0,_0=0,xu=1/0,vu=null,Xr=null,Et=0,Qr=null,Ua=null,Sr=0,Pd=0,Ud=null,N0=null,ls=0,qd=null;function hn(){return(Fe&2)!==0&&ze!==0?ze&-ze:j.T!==null?Xd():El()}function M0(){if(dn===0)if((ze&536870912)===0||Be){var n=ca;ca<<=1,(ca&3932160)===0&&(ca=262144),dn=n}else dn=536870912;return n=un.current,n!==null&&(n.flags|=32),dn}function Zt(n,i,s){(n===Je&&(Ge===2||Ge===9)||n.cancelPendingCommit!==null)&&(qa(n,0),Zr(n,ze,dn,!1)),bi(n,s),((Fe&2)===0||n!==Je)&&(n===Je&&((Fe&2)===0&&(Hi|=s),ft===4&&Zr(n,ze,dn,!1)),$n(n))}function k0(n,i,s){if((Fe&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&n.expiredLanes)===0||vi(n,i),m=c?g_(n,i):Fd(n,i,!0),x=c;do{if(m===0){Ha&&!c&&Zr(n,i,0,!1);break}else{if(s=n.current.alternate,x&&!p_(s)){m=Fd(n,i,!1),x=!1;continue}if(m===2){if(x=i,n.errorRecoveryDisabledLanes&x)var C=0;else C=n.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){i=C;e:{var T=n;m=ss;var G=T.current.memoizedState.isDehydrated;if(G&&(qa(T,C).flags|=256),C=Fd(T,C,!1),C!==2){if(Id&&!G){T.errorRecoveryDisabledLanes|=x,Hi|=x,m=4;break e}x=Qt,Qt=m,x!==null&&(Qt===null?Qt=x:Qt.push.apply(Qt,x))}m=C}if(x=!1,m!==2)continue}}if(m===1){qa(n,0),Zr(n,i,0,!0);break}e:{switch(c=n,x=m,x){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Zr(c,i,dn,!$r);break e;case 2:Qt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=yu+300-Ne(),10<m)){if(Zr(c,i,dn,!$r),da(c,0,!0)!==0)break e;Sr=i,c.timeoutHandle=ax(T0.bind(null,c,s,Qt,vu,Hd,i,dn,Hi,Pa,$r,x,"Throttled",-0,0),m);break e}T0(c,s,Qt,vu,Hd,i,dn,Hi,Pa,$r,x,null,-0,0)}}break}while(!0);$n(n)}function T0(n,i,s,c,m,x,C,T,G,ee,ae,se,ne,re){if(n.timeoutHandle=-1,se=i.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},S0(i,x,se);var me=(x&62914560)===x?yu-Ne():(x&4194048)===x?_0-Ne():0;if(me=W_(se,me),me!==null){Sr=x,n.cancelPendingCommit=me(I0.bind(null,n,i,x,s,c,m,C,T,G,ae,se,null,ne,re)),Zr(n,x,C,!ee);return}}I0(n,i,x,s,c,m,C,T,G)}function p_(n){for(var i=n;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],x=m.getSnapshot;m=m.value;try{if(!sn(x(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Zr(n,i,s,c){i&=~Bd,i&=~Hi,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var m=i;0<m;){var x=31-$e(m),C=1<<x;c[x]=-1,m&=~C}s!==0&&bl(n,s,i)}function bu(){return(Fe&6)===0?(us(0),!1):!0}function Vd(){if(je!==null){if(Ge===0)var n=je.return;else n=je,cr=Ai=null,ad(n),Oa=null,Yo=0,n=je;for(;n!==null;)o0(n.alternate,n),n=n.return;je=null}}function qa(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,D_(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),Sr=0,Vd(),Je=n,je=s=lr(n.current,null),ze=i,Ge=0,fn=null,$r=!1,Ha=vi(n,i),Id=!1,Pa=dn=Bd=Hi=Gr=ft=0,Qt=ss=null,Hd=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var m=31-$e(c),x=1<<m;i|=n[m],c&=~x}return br=i,Ul(),s}function A0(n,i){ke=null,j.H=Jo,i===Ra||i===Ql?(i=$g(),Ge=3):i===Gf?(i=$g(),Ge=4):Ge=i===Sd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,fn=i,je===null&&(ft=1,uu(n,Sn(i,n.current)))}function R0(){var n=un.current;return n===null?!0:(ze&4194048)===ze?_n===null:(ze&62914560)===ze||(ze&536870912)!==0?n===_n:!1}function O0(){var n=j.H;return j.H=Jo,n===null?Jo:n}function j0(){var n=j.A;return j.A=d_,n}function Su(){ft=4,$r||(ze&4194048)!==ze&&un.current!==null||(Ha=!0),(Gr&134217727)===0&&(Hi&134217727)===0||Je===null||Zr(Je,ze,dn,!1)}function Fd(n,i,s){var c=Fe;Fe|=2;var m=O0(),x=j0();(Je!==n||ze!==i)&&(vu=null,qa(n,i)),i=!1;var C=ft;e:do try{if(Ge!==0&&je!==null){var T=je,G=fn;switch(Ge){case 8:Vd(),C=6;break e;case 3:case 2:case 9:case 6:un.current===null&&(i=!0);var ee=Ge;if(Ge=0,fn=null,Va(n,T,G,ee),s&&Ha){C=0;break e}break;default:ee=Ge,Ge=0,fn=null,Va(n,T,G,ee)}}m_(),C=ft;break}catch(ae){A0(n,ae)}while(!0);return i&&n.shellSuspendCounter++,cr=Ai=null,Fe=c,j.H=m,j.A=x,je===null&&(Je=null,ze=0,Ul()),C}function m_(){for(;je!==null;)D0(je)}function g_(n,i){var s=Fe;Fe|=2;var c=O0(),m=j0();Je!==n||ze!==i?(vu=null,xu=Ne()+500,qa(n,i)):Ha=vi(n,i);e:do try{if(Ge!==0&&je!==null){i=je;var x=fn;t:switch(Ge){case 1:Ge=0,fn=null,Va(n,i,x,1);break;case 2:case 9:if(Fg(x)){Ge=0,fn=null,z0(i);break}i=function(){Ge!==2&&Ge!==9||Je!==n||(Ge=7),$n(n)},x.then(i,i);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Fg(x)?(Ge=0,fn=null,z0(i)):(Ge=0,fn=null,Va(n,i,x,7));break;case 5:var C=null;switch(je.tag){case 26:C=je.memoizedState;case 5:case 27:var T=je;if(C?bx(C):T.stateNode.complete){Ge=0,fn=null;var G=T.sibling;if(G!==null)je=G;else{var ee=T.return;ee!==null?(je=ee,wu(ee)):je=null}break t}}Ge=0,fn=null,Va(n,i,x,5);break;case 6:Ge=0,fn=null,Va(n,i,x,6);break;case 8:Vd(),ft=6;break e;default:throw Error(a(462))}}y_();break}catch(ae){A0(n,ae)}while(!0);return cr=Ai=null,j.H=c,j.A=m,Fe=s,je!==null?0:(Je=null,ze=0,Ul(),ft)}function y_(){for(;je!==null&&!An();)D0(je)}function D0(n){var i=i0(n.alternate,n,br);n.memoizedProps=n.pendingProps,i===null?wu(n):je=i}function z0(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=Wy(s,i,i.pendingProps,i.type,void 0,ze);break;case 11:i=Wy(s,i,i.pendingProps,i.type.render,i.ref,ze);break;case 5:ad(i);default:o0(s,i),i=je=jg(i,br),i=i0(s,i,br)}n.memoizedProps=n.pendingProps,i===null?wu(n):je=i}function Va(n,i,s,c){cr=Ai=null,ad(i),Oa=null,Yo=0;var m=i.return;try{if(a_(n,m,i,s,ze)){ft=1,uu(n,Sn(s,n.current)),je=null;return}}catch(x){if(m!==null)throw je=m,x;ft=1,uu(n,Sn(s,n.current)),je=null;return}i.flags&32768?(Be||c===1?n=!0:Ha||(ze&536870912)!==0?n=!1:($r=n=!0,(c===2||c===9||c===3||c===6)&&(c=un.current,c!==null&&c.tag===13&&(c.flags|=16384))),L0(i,n)):wu(i)}function wu(n){var i=n;do{if((i.flags&32768)!==0){L0(i,$r);return}n=i.return;var s=l_(i.alternate,i,br);if(s!==null){je=s;return}if(i=i.sibling,i!==null){je=i;return}je=i=n}while(i!==null);ft===0&&(ft=5)}function L0(n,i){do{var s=u_(n.alternate,n);if(s!==null){s.flags&=32767,je=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){je=n;return}je=n=s}while(n!==null);ft=6,je=null}function I0(n,i,s,c,m,x,C,T,G){n.cancelPendingCommit=null;do Eu();while(Et!==0);if((Fe&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(x=i.lanes|i.childLanes,x|=Of,lf(n,s,x,C,T,G),n===Je&&(je=Je=null,ze=0),Ua=i,Qr=n,Sr=s,Pd=x,Ud=m,N0=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,S_(Ee,function(){return q0(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=j.T,j.T=null,m=F.p,F.p=2,C=Fe,Fe|=4;try{c_(n,i,s)}finally{Fe=C,F.p=m,j.T=c}}Et=1,B0(),H0(),P0()}}function B0(){if(Et===1){Et=0;var n=Qr,i=Ua,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=j.T,j.T=null;var c=F.p;F.p=2;var m=Fe;Fe|=4;try{x0(i,n);var x=nh,C=Cg(n.containerInfo),T=x.focusedElem,G=x.selectionRange;if(C!==T&&T&&T.ownerDocument&&Eg(T.ownerDocument.documentElement,T)){if(G!==null&&Mf(T)){var ee=G.start,ae=G.end;if(ae===void 0&&(ae=ee),"selectionStart"in T)T.selectionStart=ee,T.selectionEnd=Math.min(ae,T.value.length);else{var se=T.ownerDocument||document,ne=se&&se.defaultView||window;if(ne.getSelection){var re=ne.getSelection(),me=T.textContent.length,Ce=Math.min(G.start,me),We=G.end===void 0?Ce:Math.min(G.end,me);!re.extend&&Ce>We&&(C=We,We=Ce,Ce=C);var W=wg(T,Ce),Q=wg(T,We);if(W&&Q&&(re.rangeCount!==1||re.anchorNode!==W.node||re.anchorOffset!==W.offset||re.focusNode!==Q.node||re.focusOffset!==Q.offset)){var J=se.createRange();J.setStart(W.node,W.offset),re.removeAllRanges(),Ce>We?(re.addRange(J),re.extend(Q.node,Q.offset)):(J.setEnd(Q.node,Q.offset),re.addRange(J))}}}}for(se=[],re=T;re=re.parentNode;)re.nodeType===1&&se.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<se.length;T++){var oe=se[T];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}zu=!!th,nh=th=null}finally{Fe=m,F.p=c,j.T=s}}n.current=i,Et=2}}function H0(){if(Et===2){Et=0;var n=Qr,i=Ua,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=j.T,j.T=null;var c=F.p;F.p=2;var m=Fe;Fe|=4;try{h0(n,i.alternate,i)}finally{Fe=m,F.p=c,j.T=s}}Et=3}}function P0(){if(Et===4||Et===3){Et=0,vn();var n=Qr,i=Ua,s=Sr,c=N0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Et=5:(Et=0,Ua=Qr=null,U0(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(Xr=null),ko(s),i=i.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Nt,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=j.T,m=F.p,F.p=2,j.T=null;try{for(var x=n.onRecoverableError,C=0;C<c.length;C++){var T=c[C];x(T.value,{componentStack:T.stack})}}finally{j.T=i,F.p=m}}(Sr&3)!==0&&Eu(),$n(n),m=n.pendingLanes,(s&261930)!==0&&(m&42)!==0?n===qd?ls++:(ls=0,qd=n):ls=0,us(0)}}function U0(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Vo(i)))}function Eu(){return B0(),H0(),P0(),q0()}function q0(){if(Et!==5)return!1;var n=Qr,i=Pd;Pd=0;var s=ko(Sr),c=j.T,m=F.p;try{F.p=32>s?32:s,j.T=null,s=Ud,Ud=null;var x=Qr,C=Sr;if(Et=0,Ua=Qr=null,Sr=0,(Fe&6)!==0)throw Error(a(331));var T=Fe;if(Fe|=4,E0(x.current),b0(x,x.current,C,s),Fe=T,us(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Nt,x)}catch{}return!0}finally{F.p=m,j.T=c,U0(n,i)}}function V0(n,i,s){i=Sn(s,i),i=bd(n.stateNode,i,2),n=qr(n,i,2),n!==null&&(bi(n,2),$n(n))}function Xe(n,i,s){if(n.tag===3)V0(n,n,s);else for(;i!==null;){if(i.tag===3){V0(i,n,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Xr===null||!Xr.has(c))){n=Sn(s,n),s=Fy(2),c=qr(i,s,2),c!==null&&(Yy(s,c,i,n),bi(c,2),$n(c));break}}i=i.return}}function Yd(n,i,s){var c=n.pingCache;if(c===null){c=n.pingCache=new h_;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(Id=!0,m.add(s),n=x_.bind(null,n,i,s),i.then(n,n))}function x_(n,i,s){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,Je===n&&(ze&s)===s&&(ft===4||ft===3&&(ze&62914560)===ze&&300>Ne()-yu?(Fe&2)===0&&qa(n,0):Bd|=s,Pa===ze&&(Pa=0)),$n(n)}function F0(n,i){i===0&&(i=vl()),n=Mi(n,i),n!==null&&(bi(n,i),$n(n))}function v_(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),F0(n,s)}function b_(n,i){var s=0;switch(n.tag){case 31:case 13:var c=n.stateNode,m=n.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),F0(n,s)}function S_(n,i){return Ot(n,i)}var Cu=null,Fa=null,$d=!1,_u=!1,Gd=!1,Kr=0;function $n(n){n!==Fa&&n.next===null&&(Fa===null?Cu=Fa=n:Fa=Fa.next=n),_u=!0,$d||($d=!0,E_())}function us(n,i){if(!Gd&&_u){Gd=!0;do for(var s=!1,c=Cu;c!==null;){if(n!==0){var m=c.pendingLanes;if(m===0)var x=0;else{var C=c.suspendedLanes,T=c.pingedLanes;x=(1<<31-$e(42|n)+1)-1,x&=m&~(C&~T),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(s=!0,X0(c,x))}else x=ze,x=da(c,c===Je?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||vi(c,x)||(s=!0,X0(c,x));c=c.next}while(s);Gd=!1}}function w_(){Y0()}function Y0(){_u=$d=!1;var n=0;Kr!==0&&j_()&&(n=Kr);for(var i=Ne(),s=null,c=Cu;c!==null;){var m=c.next,x=$0(c,i);x===0?(c.next=null,s===null?Cu=m:s.next=m,m===null&&(Fa=s)):(s=c,(n!==0||(x&3)!==0)&&(_u=!0)),c=m}Et!==0&&Et!==5||us(n),Kr!==0&&(Kr=0)}function $0(n,i){for(var s=n.suspendedLanes,c=n.pingedLanes,m=n.expirationTimes,x=n.pendingLanes&-62914561;0<x;){var C=31-$e(x),T=1<<C,G=m[C];G===-1?((T&s)===0||(T&c)!==0)&&(m[C]=sf(T,i)):G<=i&&(n.expiredLanes|=T),x&=~T}if(i=Je,s=ze,s=da(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,s===0||n===i&&(Ge===2||Ge===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&qt(c),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||vi(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(c!==null&&qt(c),ko(s)){case 2:case 8:s=he;break;case 32:s=Ee;break;case 268435456:s=Pe;break;default:s=Ee}return c=G0.bind(null,n),s=Ot(s,c),n.callbackPriority=i,n.callbackNode=s,i}return c!==null&&c!==null&&qt(c),n.callbackPriority=2,n.callbackNode=null,2}function G0(n,i){if(Et!==0&&Et!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Eu()&&n.callbackNode!==s)return null;var c=ze;return c=da(n,n===Je?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(k0(n,c,i),$0(n,Ne()),n.callbackNode!=null&&n.callbackNode===s?G0.bind(null,n):null)}function X0(n,i){if(Eu())return null;k0(n,i,!0)}function E_(){z_(function(){(Fe&6)!==0?Ot(ie,w_):Y0()})}function Xd(){if(Kr===0){var n=Ta;n===0&&(n=ua,ua<<=1,(ua&261888)===0&&(ua=256)),Kr=n}return Kr}function Q0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:jl(""+n)}function Z0(n,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,n.id&&s.setAttribute("form",n.id),i.parentNode.insertBefore(s,i),n=new FormData(n),s.parentNode.removeChild(s),n}function C_(n,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var x=Q0((m[Dt]||null).action),C=c.submitter;C&&(i=(i=C[Dt]||null)?Q0(i.formAction):C.getAttribute("formAction"),i!==null&&(x=i,C=null));var T=new Il("action","action",null,c,m);n.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Kr!==0){var G=C?Z0(m,C):new FormData(m);pd(s,{pending:!0,data:G,method:m.method,action:x},null,G)}}else typeof x=="function"&&(T.preventDefault(),G=C?Z0(m,C):new FormData(m),pd(s,{pending:!0,data:G,method:m.method,action:x},x,G))},currentTarget:m}]})}}for(var Qd=0;Qd<Rf.length;Qd++){var Zd=Rf[Qd],__=Zd.toLowerCase(),N_=Zd[0].toUpperCase()+Zd.slice(1);jn(__,"on"+N_)}jn(Mg,"onAnimationEnd"),jn(kg,"onAnimationIteration"),jn(Tg,"onAnimationStart"),jn("dblclick","onDoubleClick"),jn("focusin","onFocus"),jn("focusout","onBlur"),jn(qC,"onTransitionRun"),jn(VC,"onTransitionStart"),jn(FC,"onTransitionCancel"),jn(Ag,"onTransitionEnd"),Dr("onMouseEnter",["mouseout","mouseover"]),Dr("onMouseLeave",["mouseout","mouseover"]),Dr("onPointerEnter",["pointerout","pointerover"]),Dr("onPointerLeave",["pointerout","pointerover"]),ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ir("onBeforeInput",["compositionend","keypress","textInput","paste"]),ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="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(" "),M_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cs));function K0(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],m=c.event;c=c.listeners;e:{var x=void 0;if(i)for(var C=c.length-1;0<=C;C--){var T=c[C],G=T.instance,ee=T.currentTarget;if(T=T.listener,G!==x&&m.isPropagationStopped())break e;x=T,m.currentTarget=ee;try{x(m)}catch(ae){Pl(ae)}m.currentTarget=null,x=G}else for(C=0;C<c.length;C++){if(T=c[C],G=T.instance,ee=T.currentTarget,T=T.listener,G!==x&&m.isPropagationStopped())break e;x=T,m.currentTarget=ee;try{x(m)}catch(ae){Pl(ae)}m.currentTarget=null,x=G}}}}function De(n,i){var s=i[ha];s===void 0&&(s=i[ha]=new Set);var c=n+"__bubble";s.has(c)||(W0(i,n,2,!1),s.add(c))}function Kd(n,i,s){var c=0;i&&(c|=4),W0(s,n,c,i)}var Nu="_reactListening"+Math.random().toString(36).slice(2);function Wd(n){if(!n[Nu]){n[Nu]=!0,Ml.forEach(function(s){s!=="selectionchange"&&(M_.has(s)||Kd(s,!1,n),Kd(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Nu]||(i[Nu]=!0,Kd("selectionchange",!1,i))}}function W0(n,i,s,c){switch(Mx(i)){case 2:var m=t2;break;case 8:m=n2;break;default:m=hh}s=m.bind(null,i,s,n),m=void 0,!xf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?n.addEventListener(i,s,{capture:!0,passive:m}):n.addEventListener(i,s,!0):m!==void 0?n.addEventListener(i,s,{passive:m}):n.addEventListener(i,s,!1)}function Jd(n,i,s,c,m){var x=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var C=c.tag;if(C===3||C===4){var T=c.stateNode.containerInfo;if(T===m)break;if(C===4)for(C=c.return;C!==null;){var G=C.tag;if((G===3||G===4)&&C.stateNode.containerInfo===m)return;C=C.return}for(;T!==null;){if(C=Ar(T),C===null)return;if(G=C.tag,G===5||G===6||G===26||G===27){c=x=C;continue e}T=T.parentNode}}c=c.return}rg(function(){var ee=x,ae=gf(s),se=[];e:{var ne=Rg.get(n);if(ne!==void 0){var re=Il,me=n;switch(n){case"keypress":if(zl(s)===0)break e;case"keydown":case"keyup":re=bC;break;case"focusin":me="focus",re=wf;break;case"focusout":me="blur",re=wf;break;case"beforeblur":case"afterblur":re=wf;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=og;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=lC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=EC;break;case Mg:case kg:case Tg:re=fC;break;case Ag:re=_C;break;case"scroll":case"scrollend":re=oC;break;case"wheel":re=MC;break;case"copy":case"cut":case"paste":re=hC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=lg;break;case"toggle":case"beforetoggle":re=TC}var Ce=(i&4)!==0,We=!Ce&&(n==="scroll"||n==="scrollend"),W=Ce?ne!==null?ne+"Capture":null:ne;Ce=[];for(var Q=ee,J;Q!==null;){var oe=Q;if(J=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||J===null||W===null||(oe=Oo(Q,W),oe!=null&&Ce.push(fs(Q,oe,J))),We)break;Q=Q.return}0<Ce.length&&(ne=new re(ne,me,null,s,ae),se.push({event:ne,listeners:Ce}))}}if((i&7)===0){e:{if(ne=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",ne&&s!==mf&&(me=s.relatedTarget||s.fromElement)&&(Ar(me)||me[rr]))break e;if((re||ne)&&(ne=ae.window===ae?ae:(ne=ae.ownerDocument)?ne.defaultView||ne.parentWindow:window,re?(me=s.relatedTarget||s.toElement,re=ee,me=me?Ar(me):null,me!==null&&(We=l(me),Ce=me.tag,me!==We||Ce!==5&&Ce!==27&&Ce!==6)&&(me=null)):(re=null,me=ee),re!==me)){if(Ce=og,oe="onMouseLeave",W="onMouseEnter",Q="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=lg,oe="onPointerLeave",W="onPointerEnter",Q="pointer"),We=re==null?ne:Or(re),J=me==null?ne:Or(me),ne=new Ce(oe,Q+"leave",re,s,ae),ne.target=We,ne.relatedTarget=J,oe=null,Ar(ae)===ee&&(Ce=new Ce(W,Q+"enter",me,s,ae),Ce.target=J,Ce.relatedTarget=We,oe=Ce),We=oe,re&&me)t:{for(Ce=k_,W=re,Q=me,J=0,oe=W;oe;oe=Ce(oe))J++;oe=0;for(var xe=Q;xe;xe=Ce(xe))oe++;for(;0<J-oe;)W=Ce(W),J--;for(;0<oe-J;)Q=Ce(Q),oe--;for(;J--;){if(W===Q||Q!==null&&W===Q.alternate){Ce=W;break t}W=Ce(W),Q=Ce(Q)}Ce=null}else Ce=null;re!==null&&J0(se,ne,re,Ce,!1),me!==null&&We!==null&&J0(se,We,me,Ce,!0)}}e:{if(ne=ee?Or(ee):window,re=ne.nodeName&&ne.nodeName.toLowerCase(),re==="select"||re==="input"&&ne.type==="file")var qe=gg;else if(pg(ne))if(yg)qe=HC;else{qe=IC;var ge=LC}else re=ne.nodeName,!re||re.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&pf(ee.elementType)&&(qe=gg):qe=BC;if(qe&&(qe=qe(n,ee))){mg(se,qe,s,ae);break e}ge&&ge(n,ne,ee),n==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&Ro(ne,"number",ne.value)}switch(ge=ee?Or(ee):window,n){case"focusin":(pg(ge)||ge.contentEditable==="true")&&(Sa=ge,kf=ee,Po=null);break;case"focusout":Po=kf=Sa=null;break;case"mousedown":Tf=!0;break;case"contextmenu":case"mouseup":case"dragend":Tf=!1,_g(se,s,ae);break;case"selectionchange":if(UC)break;case"keydown":case"keyup":_g(se,s,ae)}var Te;if(Cf)e:{switch(n){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else ba?dg(n,s)&&(Le="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(ug&&s.locale!=="ko"&&(ba||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&ba&&(Te=ig()):(zr=ae,vf="value"in zr?zr.value:zr.textContent,ba=!0)),ge=Mu(ee,Le),0<ge.length&&(Le=new sg(Le,n,null,s,ae),se.push({event:Le,listeners:ge}),Te?Le.data=Te:(Te=hg(s),Te!==null&&(Le.data=Te)))),(Te=RC?OC(n,s):jC(n,s))&&(Le=Mu(ee,"onBeforeInput"),0<Le.length&&(ge=new sg("onBeforeInput","beforeinput",null,s,ae),se.push({event:ge,listeners:Le}),ge.data=Te)),C_(se,n,ee,s,ae)}K0(se,i)})}function fs(n,i,s){return{instance:n,listener:i,currentTarget:s}}function Mu(n,i){for(var s=i+"Capture",c=[];n!==null;){var m=n,x=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||x===null||(m=Oo(n,s),m!=null&&c.unshift(fs(n,m,x)),m=Oo(n,i),m!=null&&c.push(fs(n,m,x))),n.tag===3)return c;n=n.return}return[]}function k_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function J0(n,i,s,c,m){for(var x=i._reactName,C=[];s!==null&&s!==c;){var T=s,G=T.alternate,ee=T.stateNode;if(T=T.tag,G!==null&&G===c)break;T!==5&&T!==26&&T!==27||ee===null||(G=ee,m?(ee=Oo(s,x),ee!=null&&C.unshift(fs(s,ee,G))):m||(ee=Oo(s,x),ee!=null&&C.push(fs(s,ee,G)))),s=s.return}C.length!==0&&n.push({event:i,listeners:C})}var T_=/\r\n?/g,A_=/\u0000|\uFFFD/g;function ex(n){return(typeof n=="string"?n:""+n).replace(T_,`
9
- `).replace(A_,"")}function tx(n,i){return i=ex(i),ex(n)===i}function Ke(n,i,s,c,m,x){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||ya(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&ya(n,""+c);break;case"className":ma(n,"class",c);break;case"tabIndex":ma(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ma(n,s,c);break;case"style":tg(n,c,x);break;case"data":if(i!=="object"){ma(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=jl(""+c),n.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(s,"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 x=="function"&&(s==="formAction"?(i!=="input"&&Ke(n,i,"name",m.name,m,null),Ke(n,i,"formEncType",m.formEncType,m,null),Ke(n,i,"formMethod",m.formMethod,m,null),Ke(n,i,"formTarget",m.formTarget,m,null)):(Ke(n,i,"encType",m.encType,m,null),Ke(n,i,"method",m.method,m,null),Ke(n,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=jl(""+c),n.setAttribute(s,c);break;case"onClick":c!=null&&(n.onclick=or);break;case"onScroll":c!=null&&De("scroll",n);break;case"onScrollEnd":c!=null&&De("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}s=jl(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""+c):n.removeAttribute(s);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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":c===!0?n.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,c):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(s,c):n.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(s):n.setAttribute(s,c);break;case"popover":De("beforetoggle",n),De("toggle",n),pa(n,"popover",c);break;case"xlinkActuate":On(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":On(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":On(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":On(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":On(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":On(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":On(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":On(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":On(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":pa(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=iC.get(s)||s,pa(n,s,c))}}function eh(n,i,s,c,m,x){switch(s){case"style":tg(n,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof c=="string"?ya(n,c):(typeof c=="number"||typeof c=="bigint")&&ya(n,""+c);break;case"onScroll":c!=null&&De("scroll",n);break;case"onScrollEnd":c!=null&&De("scrollend",n);break;case"onClick":c!=null&&(n.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kl.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),x=n[Dt]||null,x=x!=null?x[s]:null,typeof x=="function"&&n.removeEventListener(i,x,m),typeof c=="function")){typeof x!="function"&&x!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,c,m);break e}s in n?n[s]=c:c===!0?n.setAttribute(s,""):pa(n,s,c)}}}function At(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",n),De("load",n);var c=!1,m=!1,x;for(x in s)if(s.hasOwnProperty(x)){var C=s[x];if(C!=null)switch(x){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(n,i,x,C,s,null)}}m&&Ke(n,i,"srcSet",s.srcSet,s,null),c&&Ke(n,i,"src",s.src,s,null);return;case"input":De("invalid",n);var T=x=C=m=null,G=null,ee=null;for(c in s)if(s.hasOwnProperty(c)){var ae=s[c];if(ae!=null)switch(c){case"name":m=ae;break;case"type":C=ae;break;case"checked":G=ae;break;case"defaultChecked":ee=ae;break;case"value":x=ae;break;case"defaultValue":T=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(a(137,i));break;default:Ke(n,i,c,ae,s,null)}}Ol(n,x,T,G,ee,C,m,!1);return;case"select":De("invalid",n),c=C=x=null;for(m in s)if(s.hasOwnProperty(m)&&(T=s[m],T!=null))switch(m){case"value":x=T;break;case"defaultValue":C=T;break;case"multiple":c=T;default:Ke(n,i,m,T,s,null)}i=x,s=C,n.multiple=!!c,i!=null?ar(n,!!c,i,!1):s!=null&&ar(n,!!c,s,!0);return;case"textarea":De("invalid",n),x=m=c=null;for(C in s)if(s.hasOwnProperty(C)&&(T=s[C],T!=null))switch(C){case"value":c=T;break;case"defaultValue":m=T;break;case"children":x=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(a(91));break;default:Ke(n,i,C,T,s,null)}Jm(n,c,m,x);return;case"option":for(G in s)s.hasOwnProperty(G)&&(c=s[G],c!=null)&&(G==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":Ke(n,i,G,c,s,null));return;case"dialog":De("beforetoggle",n),De("toggle",n),De("cancel",n),De("close",n);break;case"iframe":case"object":De("load",n);break;case"video":case"audio":for(c=0;c<cs.length;c++)De(cs[c],n);break;case"image":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"embed":case"source":case"link":De("error",n),De("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in s)if(s.hasOwnProperty(ee)&&(c=s[ee],c!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(n,i,ee,c,s,null)}return;default:if(pf(i)){for(ae in s)s.hasOwnProperty(ae)&&(c=s[ae],c!==void 0&&eh(n,i,ae,c,s,void 0));return}}for(T in s)s.hasOwnProperty(T)&&(c=s[T],c!=null&&Ke(n,i,T,c,s,null))}function R_(n,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,x=null,C=null,T=null,G=null,ee=null,ae=null;for(re in s){var se=s[re];if(s.hasOwnProperty(re)&&se!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":G=se;default:c.hasOwnProperty(re)||Ke(n,i,re,null,c,se)}}for(var ne in c){var re=c[ne];if(se=s[ne],c.hasOwnProperty(ne)&&(re!=null||se!=null))switch(ne){case"type":x=re;break;case"name":m=re;break;case"checked":ee=re;break;case"defaultChecked":ae=re;break;case"value":C=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:re!==se&&Ke(n,i,ne,re,c,se)}}Ei(n,C,T,G,ee,ae,x,m);return;case"select":re=C=T=ne=null;for(x in s)if(G=s[x],s.hasOwnProperty(x)&&G!=null)switch(x){case"value":break;case"multiple":re=G;default:c.hasOwnProperty(x)||Ke(n,i,x,null,c,G)}for(m in c)if(x=c[m],G=s[m],c.hasOwnProperty(m)&&(x!=null||G!=null))switch(m){case"value":ne=x;break;case"defaultValue":T=x;break;case"multiple":C=x;default:x!==G&&Ke(n,i,m,x,c,G)}i=T,s=C,c=re,ne!=null?ar(n,!!s,ne,!1):!!c!=!!s&&(i!=null?ar(n,!!s,i,!0):ar(n,!!s,s?[]:"",!1));return;case"textarea":re=ne=null;for(T in s)if(m=s[T],s.hasOwnProperty(T)&&m!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ke(n,i,T,null,c,m)}for(C in c)if(m=c[C],x=s[C],c.hasOwnProperty(C)&&(m!=null||x!=null))switch(C){case"value":ne=m;break;case"defaultValue":re=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==x&&Ke(n,i,C,m,c,x)}Wm(n,ne,re);return;case"option":for(var me in s)ne=s[me],s.hasOwnProperty(me)&&ne!=null&&!c.hasOwnProperty(me)&&(me==="selected"?n.selected=!1:Ke(n,i,me,null,c,ne));for(G in c)ne=c[G],re=s[G],c.hasOwnProperty(G)&&ne!==re&&(ne!=null||re!=null)&&(G==="selected"?n.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":Ke(n,i,G,ne,c,re));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 Ce in s)ne=s[Ce],s.hasOwnProperty(Ce)&&ne!=null&&!c.hasOwnProperty(Ce)&&Ke(n,i,Ce,null,c,ne);for(ee in c)if(ne=c[ee],re=s[ee],c.hasOwnProperty(ee)&&ne!==re&&(ne!=null||re!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:Ke(n,i,ee,ne,c,re)}return;default:if(pf(i)){for(var We in s)ne=s[We],s.hasOwnProperty(We)&&ne!==void 0&&!c.hasOwnProperty(We)&&eh(n,i,We,void 0,c,ne);for(ae in c)ne=c[ae],re=s[ae],!c.hasOwnProperty(ae)||ne===re||ne===void 0&&re===void 0||eh(n,i,ae,ne,c,re);return}}for(var W in s)ne=s[W],s.hasOwnProperty(W)&&ne!=null&&!c.hasOwnProperty(W)&&Ke(n,i,W,null,c,ne);for(se in c)ne=c[se],re=s[se],!c.hasOwnProperty(se)||ne===re||ne==null&&re==null||Ke(n,i,se,ne,c,re)}function nx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],x=m.transferSize,C=m.initiatorType,T=m.duration;if(x&&T&&nx(C)){for(C=0,T=m.responseEnd,c+=1;c<s.length;c++){var G=s[c],ee=G.startTime;if(ee>T)break;var ae=G.transferSize,se=G.initiatorType;ae&&nx(se)&&(G=G.responseEnd,C+=ae*(G<T?1:(T-ee)/(G-ee)))}if(--c,i+=8*(x+C)/(m.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var th=null,nh=null;function ku(n){return n.nodeType===9?n:n.ownerDocument}function rx(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ix(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function rh(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var ih=null;function j_(){var n=window.event;return n&&n.type==="popstate"?n===ih?!1:(ih=n,!0):(ih=null,!1)}var ax=typeof setTimeout=="function"?setTimeout:void 0,D_=typeof clearTimeout=="function"?clearTimeout:void 0,ox=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof ox<"u"?function(n){return ox.resolve(null).then(n).catch(L_)}:ax;function L_(n){setTimeout(function(){throw n})}function Wr(n){return n==="head"}function sx(n,i){var s=i,c=0;do{var m=s.nextSibling;if(n.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){n.removeChild(m),Xa(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")ds(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,ds(s);for(var x=s.firstChild;x;){var C=x.nextSibling,T=x.nodeName;x[Si]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&x.rel.toLowerCase()==="stylesheet"||s.removeChild(x),x=C}}else s==="body"&&ds(n.ownerDocument.body);s=m}while(s);Xa(i)}function lx(n,i){var s=n;n=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=c}while(s)}function ah(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ah(s),To(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function I_(n,i,s,c){for(;n.nodeType===1;){var m=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Si])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(x=n.getAttribute("rel"),x==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(x!==m.rel||n.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||n.getAttribute("title")!==(m.title==null?null:m.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(x=n.getAttribute("src"),(x!==(m.src==null?null:m.src)||n.getAttribute("type")!==(m.type==null?null:m.type)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&x&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var x=m.name==null?null:""+m.name;if(m.type==="hidden"&&n.getAttribute("name")===x)return n}else return n;if(n=Nn(n.nextSibling),n===null)break}return null}function B_(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=Nn(n.nextSibling),n===null))return null;return n}function ux(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Nn(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function sh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function H_(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function Nn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var lh=null;function cx(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return Nn(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function fx(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return n;i--}else s!=="/$"&&s!=="/&"||i++}n=n.previousSibling}return null}function dx(n,i,s){switch(i=ku(s),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function ds(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);To(n)}var Mn=new Map,hx=new Set;function Tu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var wr=F.d;F.d={f:P_,r:U_,D:q_,C:V_,L:F_,m:Y_,X:G_,S:$_,M:X_};function P_(){var n=wr.f(),i=bu();return n||i}function U_(n){var i=Rr(n);i!==null&&i.tag===5&&i.type==="form"?Ay(i):wr.r(n)}var Ya=typeof document>"u"?null:document;function px(n,i,s){var c=Ya;if(c&&typeof i=="string"&&i){var m=Ft(i);m='link[rel="'+n+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),hx.has(m)||(hx.add(m),n={rel:n,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),At(i,"link",n),mt(i),c.head.appendChild(i)))}}function q_(n){wr.D(n),px("dns-prefetch",n,null)}function V_(n,i){wr.C(n,i),px("preconnect",n,i)}function F_(n,i,s){wr.L(n,i,s);var c=Ya;if(c&&n&&i){var m='link[rel="preload"][as="'+Ft(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Ft(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Ft(s.imageSizes)+'"]')):m+='[href="'+Ft(n)+'"]';var x=m;switch(i){case"style":x=$a(n);break;case"script":x=Ga(n)}Mn.has(x)||(n=g({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),Mn.set(x,n),c.querySelector(m)!==null||i==="style"&&c.querySelector(hs(x))||i==="script"&&c.querySelector(ps(x))||(i=c.createElement("link"),At(i,"link",n),mt(i),c.head.appendChild(i)))}}function Y_(n,i){wr.m(n,i);var s=Ya;if(s&&n){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Ft(c)+'"][href="'+Ft(n)+'"]',x=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Ga(n)}if(!Mn.has(x)&&(n=g({rel:"modulepreload",href:n},i),Mn.set(x,n),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(ps(x)))return}c=s.createElement("link"),At(c,"link",n),mt(c),s.head.appendChild(c)}}}function $_(n,i,s){wr.S(n,i,s);var c=Ya;if(c&&n){var m=jr(c).hoistableStyles,x=$a(n);i=i||"default";var C=m.get(x);if(!C){var T={loading:0,preload:null};if(C=c.querySelector(hs(x)))T.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":i},s),(s=Mn.get(x))&&uh(n,s);var G=C=c.createElement("link");mt(G),At(G,"link",n),G._p=new Promise(function(ee,ae){G.onload=ee,G.onerror=ae}),G.addEventListener("load",function(){T.loading|=1}),G.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Au(C,i,c)}C={type:"stylesheet",instance:C,count:1,state:T},m.set(x,C)}}}function G_(n,i){wr.X(n,i);var s=Ya;if(s&&n){var c=jr(s).hoistableScripts,m=Ga(n),x=c.get(m);x||(x=s.querySelector(ps(m)),x||(n=g({src:n,async:!0},i),(i=Mn.get(m))&&ch(n,i),x=s.createElement("script"),mt(x),At(x,"link",n),s.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(m,x))}}function X_(n,i){wr.M(n,i);var s=Ya;if(s&&n){var c=jr(s).hoistableScripts,m=Ga(n),x=c.get(m);x||(x=s.querySelector(ps(m)),x||(n=g({src:n,async:!0,type:"module"},i),(i=Mn.get(m))&&ch(n,i),x=s.createElement("script"),mt(x),At(x,"link",n),s.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(m,x))}}function mx(n,i,s,c){var m=(m=ce.current)?Tu(m):null;if(!m)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=$a(s.href),s=jr(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=$a(s.href);var x=jr(m).hoistableStyles,C=x.get(n);if(C||(m=m.ownerDocument||m,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(n,C),(x=m.querySelector(hs(n)))&&!x._p&&(C.instance=x,C.state.loading=5),Mn.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Mn.set(n,s),x||Q_(m,n,s,C.state))),i&&c===null)throw Error(a(528,""));return C}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ga(s),s=jr(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function $a(n){return'href="'+Ft(n)+'"'}function hs(n){return'link[rel="stylesheet"]['+n+"]"}function gx(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function Q_(n,i,s,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),At(i,"link",s),mt(i),n.head.appendChild(i))}function Ga(n){return'[src="'+Ft(n)+'"]'}function ps(n){return"script[async]"+n}function yx(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+Ft(s.href)+'"]');if(c)return i.instance=c,mt(c),c;var m=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),mt(c),At(c,"style",m),Au(c,s.precedence,n),i.instance=c;case"stylesheet":m=$a(s.href);var x=n.querySelector(hs(m));if(x)return i.state.loading|=4,i.instance=x,mt(x),x;c=gx(s),(m=Mn.get(m))&&uh(c,m),x=(n.ownerDocument||n).createElement("link"),mt(x);var C=x;return C._p=new Promise(function(T,G){C.onload=T,C.onerror=G}),At(x,"link",c),i.state.loading|=4,Au(x,s.precedence,n),i.instance=x;case"script":return x=Ga(s.src),(m=n.querySelector(ps(x)))?(i.instance=m,mt(m),m):(c=s,(m=Mn.get(x))&&(c=g({},s),ch(c,m)),n=n.ownerDocument||n,m=n.createElement("script"),mt(m),At(m,"link",c),n.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Au(c,s.precedence,n));return i.instance}function Au(n,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,x=m,C=0;C<c.length;C++){var T=c[C];if(T.dataset.precedence===i)x=T;else if(x!==m)break}x?x.parentNode.insertBefore(n,x.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function uh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function ch(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Ru=null;function xx(n,i,s){if(Ru===null){var c=new Map,m=Ru=new Map;m.set(s,c)}else m=Ru,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(n))return c;for(c.set(n,null),s=s.getElementsByTagName(n),m=0;m<s.length;m++){var x=s[m];if(!(x[Si]||x[wt]||n==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var C=x.getAttribute(i)||"";C=n+C;var T=c.get(C);T?T.push(x):c.set(C,[x])}}return c}function vx(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function Z_(n,i,s){if(s===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function bx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function K_(n,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=$a(c.href),x=i.querySelector(hs(m));if(x){i=x._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Ou.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=x,mt(x);return}x=i.ownerDocument||i,c=gx(c),(m=Mn.get(m))&&uh(c,m),x=x.createElement("link"),mt(x);var C=x;C._p=new Promise(function(T,G){C.onload=T,C.onerror=G}),At(x,"link",c),s.instance=x}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Ou.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var fh=0;function W_(n,i){return n.stylesheets&&n.count===0&&Du(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var c=setTimeout(function(){if(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend){var x=n.unsuspend;n.unsuspend=null,x()}},6e4+i);0<n.imgBytes&&fh===0&&(fh=62500*O_());var m=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend)){var x=n.unsuspend;n.unsuspend=null,x()}},(n.imgBytes>fh?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Ou(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Du(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var ju=null;function Du(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,ju=new Map,i.forEach(J_,n),ju=null,Ou.call(n))}function J_(n,i){if(!(i.state.loading&4)){var s=ju.get(n);if(s)var c=s.get(null);else{s=new Map,ju.set(n,s);for(var m=n.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<m.length;x++){var C=m[x];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(s.set(C.dataset.precedence,C),c=C)}c&&s.set(null,c)}m=i.instance,C=m.getAttribute("data-precedence"),x=s.get(C)||c,x===c&&s.set(null,m),s.set(C,m),this.count++,c=Ou.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),x?x.parentNode.insertBefore(m,x.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(m,n.firstChild)),i.state.loading|=4}}var ms={$$typeof:_,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function e2(n,i,s,c,m,x,C,T,G){this.tag=1,this.containerInfo=n,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=No(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=No(0),this.hiddenUpdates=No(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=x,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Sx(n,i,s,c,m,x,C,T,G,ee,ae,se){return n=new e2(n,i,s,C,G,ee,ae,se,T),i=1,x===!0&&(i|=24),x=ln(3,null,null,i),n.current=x,x.stateNode=n,i=Ff(),i.refCount++,n.pooledCache=i,i.refCount++,x.memoizedState={element:c,isDehydrated:s,cache:i},Xf(x),n}function wx(n){return n?(n=Ca,n):Ca}function Ex(n,i,s,c,m,x){m=wx(m),c.context===null?c.context=m:c.pendingContext=m,c=Ur(i),c.payload={element:s},x=x===void 0?null:x,x!==null&&(c.callback=x),s=qr(n,c,i),s!==null&&(Zt(s,n,i),Go(s,n,i))}function Cx(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function dh(n,i){Cx(n,i),(n=n.alternate)&&Cx(n,i)}function _x(n){if(n.tag===13||n.tag===31){var i=Mi(n,67108864);i!==null&&Zt(i,n,67108864),dh(n,67108864)}}function Nx(n){if(n.tag===13||n.tag===31){var i=hn();i=Mo(i);var s=Mi(n,i);s!==null&&Zt(s,n,i),dh(n,i)}}var zu=!0;function t2(n,i,s,c){var m=j.T;j.T=null;var x=F.p;try{F.p=2,hh(n,i,s,c)}finally{F.p=x,j.T=m}}function n2(n,i,s,c){var m=j.T;j.T=null;var x=F.p;try{F.p=8,hh(n,i,s,c)}finally{F.p=x,j.T=m}}function hh(n,i,s,c){if(zu){var m=ph(c);if(m===null)Jd(n,i,c,Lu,s),kx(n,c);else if(i2(m,n,i,s,c))c.stopPropagation();else if(kx(n,c),i&4&&-1<r2.indexOf(n)){for(;m!==null;){var x=Rr(m);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var C=nr(x.pendingLanes);if(C!==0){var T=x;for(T.pendingLanes|=2,T.entangledLanes|=2;C;){var G=1<<31-$e(C);T.entanglements[1]|=G,C&=~G}$n(x),(Fe&6)===0&&(xu=Ne()+500,us(0))}}break;case 31:case 13:T=Mi(x,2),T!==null&&Zt(T,x,2),bu(),dh(x,2)}if(x=ph(c),x===null&&Jd(n,i,c,Lu,s),x===m)break;m=x}m!==null&&c.stopPropagation()}else Jd(n,i,c,null,s)}}function ph(n){return n=gf(n),mh(n)}var Lu=null;function mh(n){if(Lu=null,n=Ar(n),n!==null){var i=l(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=u(i),n!==null)return n;n=null}else if(s===31){if(n=f(i),n!==null)return n;n=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Lu=n,null}function Mx(n){switch(n){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(ut()){case ie:return 2;case he:return 8;case Ee:case Oe:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var gh=!1,Jr=null,ei=null,ti=null,gs=new Map,ys=new Map,ni=[],r2="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 kx(n,i){switch(n){case"focusin":case"focusout":Jr=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":gs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ys.delete(i.pointerId)}}function xs(n,i,s,c,m,x){return n===null||n.nativeEvent!==x?(n={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:x,targetContainers:[m]},i!==null&&(i=Rr(i),i!==null&&_x(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),n)}function i2(n,i,s,c,m){switch(i){case"focusin":return Jr=xs(Jr,n,i,s,c,m),!0;case"dragenter":return ei=xs(ei,n,i,s,c,m),!0;case"mouseover":return ti=xs(ti,n,i,s,c,m),!0;case"pointerover":var x=m.pointerId;return gs.set(x,xs(gs.get(x)||null,n,i,s,c,m)),!0;case"gotpointercapture":return x=m.pointerId,ys.set(x,xs(ys.get(x)||null,n,i,s,c,m)),!0}return!1}function Tx(n){var i=Ar(n.target);if(i!==null){var s=l(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){n.blockedOn=i,Cl(n.priority,function(){Nx(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,Cl(n.priority,function(){Nx(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Iu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=ph(n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);mf=c,s.target.dispatchEvent(c),mf=null}else return i=Rr(s),i!==null&&_x(i),n.blockedOn=s,!1;i.shift()}return!0}function Ax(n,i,s){Iu(n)&&s.delete(i)}function a2(){gh=!1,Jr!==null&&Iu(Jr)&&(Jr=null),ei!==null&&Iu(ei)&&(ei=null),ti!==null&&Iu(ti)&&(ti=null),gs.forEach(Ax),ys.forEach(Ax)}function Bu(n,i){n.blockedOn===i&&(n.blockedOn=null,gh||(gh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,a2)))}var Hu=null;function Rx(n){Hu!==n&&(Hu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hu===n&&(Hu=null);for(var i=0;i<n.length;i+=3){var s=n[i],c=n[i+1],m=n[i+2];if(typeof c!="function"){if(mh(c||s)===null)continue;break}var x=Rr(s);x!==null&&(n.splice(i,3),i-=3,pd(x,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function Xa(n){function i(G){return Bu(G,n)}Jr!==null&&Bu(Jr,n),ei!==null&&Bu(ei,n),ti!==null&&Bu(ti,n),gs.forEach(i),ys.forEach(i);for(var s=0;s<ni.length;s++){var c=ni[s];c.blockedOn===n&&(c.blockedOn=null)}for(;0<ni.length&&(s=ni[0],s.blockedOn===null);)Tx(s),s.blockedOn===null&&ni.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],x=s[c+1],C=m[Dt]||null;if(typeof x=="function")C||Rx(s);else if(C){var T=null;if(x&&x.hasAttribute("formAction")){if(m=x,C=x[Dt]||null)T=C.formAction;else if(mh(m)!==null)continue}else T=C.action;typeof T=="function"?s[c+1]=T:(s.splice(c,3),c-=3),Rx(s)}}}function Ox(){function n(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(C){return m=C})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function yh(n){this._internalRoot=n}Pu.prototype.render=yh.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=hn();Ex(s,c,n,i,null,null)},Pu.prototype.unmount=yh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ex(n.current,2,null,n,null,null),bu(),i[rr]=null}};function Pu(n){this._internalRoot=n}Pu.prototype.unstable_scheduleHydration=function(n){if(n){var i=El();n={blockedOn:null,target:n,priority:i};for(var s=0;s<ni.length&&i!==0&&i<ni[s].priority;s++);ni.splice(s,0,n),s===0&&Tx(n)}};var jx=t.version;if(jx!=="19.2.4")throw Error(a(527,jx,"19.2.4"));F.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=d(i),n=n!==null?p(n):null,n=n===null?null:n.stateNode,n};var o2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uu.isDisabled&&Uu.supportsFiber)try{Nt=Uu.inject(o2),dt=Uu}catch{}}return bs.createRoot=function(n,i){if(!o(n))throw Error(a(299));var s=!1,c="",m=Py,x=Uy,C=qy;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(C=i.onRecoverableError)),i=Sx(n,1,!1,null,null,s,c,null,m,x,C,Ox),n[rr]=i.current,Wd(n),new yh(i)},bs.hydrateRoot=function(n,i,s){if(!o(n))throw Error(a(299));var c=!1,m="",x=Py,C=Uy,T=qy,G=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(C=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError),s.formState!==void 0&&(G=s.formState)),i=Sx(n,1,!0,i,s??null,c,m,G,x,C,T,Ox),i.context=wx(null),s=i.current,c=hn(),c=Mo(c),m=Ur(c),m.callback=null,qr(s,m,c),s=c,i.current.lanes=s,bi(i,s),$n(i),n[rr]=i.current,Wd(n),new Pu(i)},bs.version="19.2.4",bs}var Vx;function m2(){if(Vx)return bh.exports;Vx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),bh.exports=p2(),bh.exports}var g2=m2(),ul=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},y2=class extends ul{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},em=new y2,x2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},v2=class{#e=x2;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Vi=new v2;function b2(e){setTimeout(e,0)}var S2=typeof window>"u"||"Deno"in globalThis;function Wt(){}function w2(e,t){return typeof e=="function"?e(t):e}function cp(e){return typeof e=="number"&&e>=0&&e!==1/0}function j1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function di(e,t){return typeof e=="function"?e(t):e}function kn(e,t){return typeof e=="function"?e(t):e}function Fx(e,t){const{type:r="all",exact:a,fetchStatus:o,predicate:l,queryKey:u,stale:f}=e;if(u){if(a){if(t.queryHash!==tm(u,t.options))return!1}else if(!qs(t.queryKey,u))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||o&&o!==t.state.fetchStatus||l&&!l(t))}function Yx(e,t){const{exact:r,status:a,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Us(t.options.mutationKey)!==Us(l))return!1}else if(!qs(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||o&&!o(t))}function tm(e,t){return(t?.queryKeyHashFn||Us)(e)}function Us(e){return JSON.stringify(e,(t,r)=>dp(r)?Object.keys(r).sort().reduce((a,o)=>(a[o]=r[o],a),{}):r)}function qs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>qs(e[r],t[r])):!1}var E2=Object.prototype.hasOwnProperty;function D1(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=$x(e)&&$x(t);if(!a&&!(dp(e)&&dp(t)))return t;const l=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),f=u.length,h=a?new Array(f):{};let d=0;for(let p=0;p<f;p++){const g=a?p:u[p],y=e[g],v=t[g];if(y===v){h[g]=y,(a?p<l:E2.call(e,g))&&d++;continue}if(y===null||v===null||typeof y!="object"||typeof v!="object"){h[g]=v;continue}const S=D1(y,v,r+1);h[g]=S,S===y&&d++}return l===f&&d===l?e:h}function fp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function $x(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dp(e){if(!Gx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Gx(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Gx(e){return Object.prototype.toString.call(e)==="[object Object]"}function C2(e){return new Promise(t=>{Vi.setTimeout(t,e)})}function hp(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?D1(e,t):t}function _2(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function N2(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var nm=Symbol();function z1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===nm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function L1(e,t){return typeof e=="function"?e(...t):!!e}function M2(e,t,r){let a=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),a||(a=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var Vs=(()=>{let e=()=>S2;return{isServer(){return e()},setIsServer(t){e=t}}})();function pp(){let e,t;const r=new Promise((o,l)=>{e=o,t=l});r.status="pending",r.catch(()=>{});function a(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{a({status:"fulfilled",value:o}),e(o)},r.reject=o=>{a({status:"rejected",reason:o}),t(o)},r}var k2=b2;function T2(){let e=[],t=0,r=f=>{f()},a=f=>{f()},o=k2;const l=f=>{t?e.push(f):o(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&o(()=>{a(()=>{f.forEach(h=>{r(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},batchCalls:f=>(...h)=>{l(()=>{f(...h)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{o=f}}}var Rt=T2(),A2=class extends ul{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},gc=new A2;function R2(e){return Math.min(1e3*2**e,3e4)}function I1(e){return(e??"online")==="online"?gc.isOnline():!0}var mp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function B1(e){let t=!1,r=0,a;const o=pp(),l=()=>o.status!=="pending",u=E=>{if(!l()){const N=new mp(E);y(N),e.onCancel?.(N)}},f=()=>{t=!0},h=()=>{t=!1},d=()=>em.isFocused()&&(e.networkMode==="always"||gc.isOnline())&&e.canRun(),p=()=>I1(e.networkMode)&&e.canRun(),g=E=>{l()||(a?.(),o.resolve(E))},y=E=>{l()||(a?.(),o.reject(E))},v=()=>new Promise(E=>{a=N=>{(l()||d())&&E(N)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let E;const N=r===0?e.initialPromise:void 0;try{E=N??e.fn()}catch(w){E=Promise.reject(w)}Promise.resolve(E).then(g).catch(w=>{if(l())return;const O=e.retry??(Vs.isServer()?0:3),_=e.retryDelay??R2,M=typeof _=="function"?_(r,w):_,B=O===!0||typeof O=="number"&&r<O||typeof O=="function"&&O(r,w);if(t||!B){y(w);return}r++,e.onFail?.(r,w),C2(M).then(()=>d()?void 0:v()).then(()=>{t?y(w):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(a?.(),o),cancelRetry:f,continueRetry:h,canStart:p,start:()=>(p()?S():v().then(S),o)}}var H1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cp(this.gcTime)&&(this.#e=Vi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vs.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Vi.clearTimeout(this.#e),this.#e=void 0)}},O2=class extends H1{#e;#t;#n;#i;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Qx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Qx(this.options);t.data!==void 0&&(this.setState(Xx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=hp(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>kn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>di(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!j1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#s()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},o=()=>{const f=z1(this.options,t),d=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(p),p})();return this.#a=!1,this.options.persister?this.options.persister(f,d,this):f(d)},u=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return a(f),f})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=B1({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:f=>{f instanceof mp&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,h)=>{this.#l({type:"failed",failureCount:f,error:h})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof mp){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#l({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#l(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...P1(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Xx(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const o=e.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),Rt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function P1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var j2=class extends ul{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=pp(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#o;#a;#s;#l;#h;#p;#c;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Zx(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gp(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gp(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof kn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!fp(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Kx(this.#t,r,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==r||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||di(this.options.staleTime,this.#t)!==di(t.staleTime,this.#t))&&this.#g();const o=this.#y();a&&(this.#t!==r||kn(this.options.enabled,this.#t)!==kn(t.enabled,this.#t)||o!==this.#u)&&this.#x(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return z2(this,r)&&(this.#i=r,this.#o=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Wt)),t}#g(){this.#b();const e=di(this.options.staleTime,this.#t);if(Vs.isServer()||this.#i.isStale||!cp(e))return;const r=j1(this.#i.dataUpdatedAt,e)+1;this.#c=Vi.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#S(),this.#u=e,!(Vs.isServer()||kn(this.options.enabled,this.#t)===!1||!cp(this.#u)||this.#u===0)&&(this.#f=Vi.setInterval(()=>{(this.options.refetchIntervalInBackground||em.isFocused())&&this.#d()},this.#u))}#v(){this.#g(),this.#x(this.#y())}#b(){this.#c&&(Vi.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#f&&(Vi.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const r=this.#t,a=this.options,o=this.#i,l=this.#r,u=this.#o,h=e!==r?e.state:this.#n,{state:d}=e;let p={...d},g=!1,y;if(t._optimisticResults){const U=this.hasListeners(),H=!U&&Zx(e,t),q=U&&Kx(e,r,t,a);(H||q)&&(p={...p,...P1(d.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:S,status:E}=p;y=p.data;let N=!1;if(t.placeholderData!==void 0&&y===void 0&&E==="pending"){let U;o?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(U=o.data,N=!0):U=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,U!==void 0&&(E="success",y=hp(o?.data,U,t),g=!0)}if(t.select&&y!==void 0&&!N)if(o&&y===l?.data&&t.select===this.#l)y=this.#h;else try{this.#l=t.select,y=t.select(y),y=hp(o?.data,y,t),this.#h=y,this.#s=null}catch(U){this.#s=U}this.#s&&(v=this.#s,y=this.#h,S=Date.now(),E="error");const w=p.fetchStatus==="fetching",O=E==="pending",_=E==="error",M=O&&w,B=y!==void 0,D={status:E,fetchStatus:p.fetchStatus,isPending:O,isSuccess:E==="success",isError:_,isInitialLoading:M,isLoading:M,data:y,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:w,isRefetching:w&&!O,isLoadingError:_&&!B,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:_&&B,isStale:rm(e,t),refetch:this.refetch,promise:this.#a,isEnabled:kn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const U=D.data!==void 0,H=D.status==="error"&&!U,q=K=>{H?K.reject(D.error):U&&K.resolve(D.data)},L=()=>{const K=this.#a=D.promise=pp();q(K)},P=this.#a;switch(P.status){case"pending":e.queryHash===r.queryHash&&q(P);break;case"fulfilled":(H||D.data!==P.value)&&L();break;case"rejected":(!H||D.error!==P.reason)&&L();break}}return D}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#p=this.#t),fp(t,e))return;this.#i=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!this.#m.size)return!0;const l=new Set(o??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#i).some(u=>{const f=u;return this.#i[f]!==e[f]&&l.has(f)})};this.#E({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#E(e){Rt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function D2(e,t){return kn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Zx(e,t){return D2(e,t)||e.state.data!==void 0&&gp(e,t,t.refetchOnMount)}function gp(e,t,r){if(kn(t.enabled,e)!==!1&&di(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&rm(e,t)}return!1}function Kx(e,t,r,a){return(e!==t||kn(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&rm(e,r)}function rm(e,t){return kn(t.enabled,e)!==!1&&e.isStaleByTime(di(t.staleTime,e))}function z2(e,t){return!fp(e.getCurrentResult(),t)}function Wx(e){return{onFetch:(t,r)=>{const a=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},h=0;const d=async()=>{let p=!1;const g=S=>{M2(S,()=>t.signal,()=>p=!0)},y=z1(t.options,t.fetchOptions),v=async(S,E,N)=>{if(p)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const O=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:E,direction:N?"backward":"forward",meta:t.options.meta};return g(k),k})(),_=await y(O),{maxPages:M}=t.options,B=N?N2:_2;return{pages:B(S.pages,_,M),pageParams:B(S.pageParams,E,M)}};if(o&&l.length){const S=o==="backward",E=S?L2:Jx,N={pages:l,pageParams:u},w=E(a,N);f=await v(N,w,S)}else{const S=e??l.length;do{const E=h===0?u[0]??a.initialPageParam:Jx(a,f);if(h>0&&E==null)break;f=await v(f,E),h++}while(h<S)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=d}}}function Jx(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function L2(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var I2=class extends H1{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||B2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=B1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",o=!this.#i.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#i.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,r),await this.options.onSuccess?.(l,e,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,e,this.state.context,r),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Rt.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function B2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H2=class extends ul{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const a=new I2({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=qu(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=qu(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=qu(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(o=>o.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=qu(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Rt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Yx(t,r))}findAll(e={}){return this.getAll().filter(t=>Yx(e,t))}notify(e){Rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Rt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Wt))))}};function qu(e){return e.options.scope?.id}var P2=class extends ul{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,o=t.queryHash??tm(a,t);let l=this.get(o);return l||(l=new O2({client:e,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Rt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Fx(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Fx(e,r)):t}notify(e){Rt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Rt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},U2=class{#e;#t;#n;#i;#r;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new P2,this.#t=e.mutationCache||new H2,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=em.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=gc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(di(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,u=w2(t,l);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Rt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Rt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return Rt.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Rt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(a).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return Rt.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Rt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,r);return r.throwOnError||(l=l.catch(Wt)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(di(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=Wx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=Wx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],r={};return t.forEach(a=>{qs(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{qs(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=tm(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},U1=Y.createContext(void 0),im=e=>{const t=Y.useContext(U1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},q2=({client:e,children:t})=>(Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(U1.Provider,{value:e,children:t})),q1=Y.createContext(!1),V2=()=>Y.useContext(q1);q1.Provider;function F2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Y2=Y.createContext(F2()),$2=()=>Y.useContext(Y2),G2=(e,t,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?L1(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},X2=e=>{Y.useEffect(()=>{e.clearReset()},[e])},Q2=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(o&&e.data===void 0||L1(r,[e.error,a])),Z2=e=>{if(e.suspense){const r=o=>o==="static"?o:Math.max(o??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...o)=>r(a(...o)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},K2=(e,t)=>e.isLoading&&e.isFetching&&!t,W2=(e,t)=>e?.suspense&&t.isPending,ev=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function J2(e,t,r){const a=V2(),o=$2(),l=im(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const f=l.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",Z2(u),G2(u,o,f),X2(o);const h=!l.getQueryCache().get(u.queryHash),[d]=Y.useState(()=>new t(l,u)),p=d.getOptimisticResult(u),g=!a&&e.subscribed!==!1;if(Y.useSyncExternalStore(Y.useCallback(y=>{const v=g?d.subscribe(Rt.batchCalls(y)):Wt;return d.updateResult(),v},[d,g]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Y.useEffect(()=>{d.setOptions(u)},[u,d]),W2(u,p))throw ev(u,d,o);if(Q2({result:p,errorResetBoundary:o,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,p),u.experimental_prefetchInRender&&!Vs.isServer()&&K2(p,a)&&(h?ev(u,d,o):f?.promise)?.catch(Wt).finally(()=>{d.updateResult()}),u.notifyOnChangeProps?p:d.trackResult(p)}function gi(e,t){return J2(e,j2)}var Os=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function Ch(e){const t=Y.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function eN(e,t,r={},a={}){Y.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},r);return o.observe(e.current),()=>{o.disconnect()}},[t,r,a.disabled,e])}function tN(e){const t=Y.useRef(null);return Y.useImperativeHandle(e,()=>t.current,[]),t}var V1=!1;function Fs(e){return e[e.length-1]}function nN(e){return typeof e=="function"}function ui(e,t){return nN(e)?e(t):e}var rN=Object.prototype.hasOwnProperty,tv=Object.prototype.propertyIsEnumerable,iN=()=>Object.create(null),Pi=(e,t)=>Fi(e,t,iN);function Fi(e,t,r=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const o=t,l=iv(e)&&iv(o);if(!l&&!(fo(e)&&fo(o)))return o;const u=l?e:nv(e);if(!u)return o;const f=l?o:nv(o);if(!f)return o;const h=u.length,d=f.length,p=l?new Array(d):r();let g=0;for(let y=0;y<d;y++){const v=l?y:f[y],S=e[v],E=o[v];if(S===E){p[v]=S,(l?y<h:rN.call(e,v))&&g++;continue}if(S===null||E===null||typeof S!="object"||typeof E!="object"){p[v]=E;continue}const N=Fi(S,E,r,a+1);p[v]=N,N===S&&g++}return h===d&&g===h?e:p}function nv(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!tv.call(e,o))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const a=t;for(const o of r){if(!tv.call(e,o))return!1;a.push(o)}return a}function fo(e){if(!rv(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!rv(r)||!r.hasOwnProperty("isPrototypeOf"))}function rv(e){return Object.prototype.toString.call(e)==="[object Object]"}function iv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xi(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,o=e.length;a<o;a++)if(!Xi(e[a],t[a],r))return!1;return!0}if(fo(e)&&fo(t)){const a=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!Xi(e[u],t[u],r))return!1;return!0}let o=0;if(!a)o=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&o++;let l=0;for(const u in t)if((!a||t[u]!==void 0)&&(l++,l>o||!Xi(e[u],t[u],r)))return!1;return o===l}return!1}function ho(e){let t,r;const a=new Promise((o,l)=>{t=o,r=l});return a.status="pending",a.resolve=o=>{a.status="resolved",a.value=o,t(o),e?.(o)},a.reject=o=>{a.status="rejected",r(o)},a}function Ys(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function aN(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function av(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return aN(t)}var oN=["http:","https:","mailto:","tel:"];function yc(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function Ss(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let r=0,a="",o;for(;(o=t.exec(e))!==null;)a+=av(e.slice(r,o.index))+o[0],r=t.lastIndex;a=a+av(r?e.slice(r):e);let l=!1;return a.startsWith("//")&&(l=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:l}}function sN(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function lN(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Mr(){throw new Error("Invariant failed")}function $s(e){const t=new Map;let r,a;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,a&&(a.next=l,l.prev=a)):(l.next.prev=void 0,r=l.next,l.next=void 0,a&&(l.prev=a,a.next=l)),a=l)};return{get(l){const u=t.get(l);if(u)return o(u),u.value},set(l,u){if(t.size>=e&&r){const h=r;t.delete(h.key),h.next&&(r=h.next,h.next.prev=void 0),h===a&&(a=void 0)}const f=t.get(l);if(f)f.value=u,o(f);else{const h={key:l,value:u,prev:a};a&&(a.next=h),a=h,r||(r=h),t.set(l,h)}},clear(){t.clear(),r=void 0,a=void 0}}}var Yi=4,F1=5;function uN(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function am(e,t,r=new Uint16Array(6)){const a=e.indexOf("/",t),o=a===-1?e.length:a,l=e.substring(t,o);if(!l||!l.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r;if(l==="$"){const f=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=f,r[4]=f,r[5]=f,r}if(l.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=o,r[4]=o,r[5]=o,r;const u=uN(l);if(u){const[f,h]=u,d=l.charCodeAt(f+1);if(d===45){if(f+2<l.length&&l.charCodeAt(f+2)===36){const p=f+3,g=h;if(p<g)return r[0]=3,r[1]=t+f,r[2]=t+p,r[3]=t+g,r[4]=t+h+1,r[5]=o,r}}else if(d===36){const p=f+1,g=f+2;return g===h?(r[0]=2,r[1]=t+f,r[2]=t+p,r[3]=t+g,r[4]=t+h+1,r[5]=e.length,r):(r[0]=1,r[1]=t+f,r[2]=t+g,r[3]=t+h,r[4]=t+h+1,r[5]=o,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=o,r[4]=o,r[5]=o,r}function Bc(e,t,r,a,o,l,u){u?.(r);let f=a;{const h=r.fullPath??r.from,d=h.length,p=r.options?.caseSensitive??e,g=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<d;){const v=am(h,f,t);let S;const E=f,N=v[5];switch(f=N+1,l++,v[0]){case 0:{const w=h.substring(v[2],v[3]);if(p){const O=o.static?.get(w);if(O)S=O;else{o.static??=new Map;const _=$i(r.fullPath??r.from);_.parent=o,_.depth=l,S=_,o.static.set(w,_)}}else{const O=w.toLowerCase(),_=o.staticInsensitive?.get(O);if(_)S=_;else{o.staticInsensitive??=new Map;const M=$i(r.fullPath??r.from);M.parent=o,M.depth=l,S=M,o.staticInsensitive.set(O,M)}}break}case 1:{const w=h.substring(E,v[1]),O=h.substring(v[4],N),_=p&&!!(w||O),M=w?_?w:w.toLowerCase():void 0,B=O?_?O:O.toLowerCase():void 0,k=!g&&o.dynamic?.find(D=>!D.skipOnParamError&&D.caseSensitive===_&&D.prefix===M&&D.suffix===B);if(k)S=k;else{const D=Nh(1,r.fullPath??r.from,_,M,B);S=D,D.depth=l,D.parent=o,o.dynamic??=[],o.dynamic.push(D)}break}case 3:{const w=h.substring(E,v[1]),O=h.substring(v[4],N),_=p&&!!(w||O),M=w?_?w:w.toLowerCase():void 0,B=O?_?O:O.toLowerCase():void 0,k=!g&&o.optional?.find(D=>!D.skipOnParamError&&D.caseSensitive===_&&D.prefix===M&&D.suffix===B);if(k)S=k;else{const D=Nh(3,r.fullPath??r.from,_,M,B);S=D,D.parent=o,D.depth=l,o.optional??=[],o.optional.push(D)}break}case 2:{const w=h.substring(E,v[1]),O=h.substring(v[4],N),_=p&&!!(w||O),M=w?_?w:w.toLowerCase():void 0,B=O?_?O:O.toLowerCase():void 0,k=Nh(2,r.fullPath??r.from,_,M,B);S=k,k.parent=o,k.depth=l,o.wildcard??=[],o.wildcard.push(k)}}o=S}if(g&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const v=$i(r.fullPath??r.from);v.kind=F1,v.parent=o,l++,v.depth=l,o.pathless??=[],o.pathless.push(v),o=v}const y=(r.path||!r.children)&&!r.isRoot;if(y&&h.endsWith("/")){const v=$i(r.fullPath??r.from);v.kind=Yi,v.parent=o,l++,v.depth=l,o.index=v,o=v}o.parse=r.options?.params?.parse??null,o.skipOnParamError=g,o.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,y&&!o.route&&(o.route=r,o.fullPath=r.fullPath??r.from)}if(r.children)for(const h of r.children)Bc(e,t,h,f,o,l,u)}function _h(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function si(e){if(e.pathless)for(const t of e.pathless)si(t);if(e.static)for(const t of e.static.values())si(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())si(t);if(e.dynamic?.length){e.dynamic.sort(_h);for(const t of e.dynamic)si(t)}if(e.optional?.length){e.optional.sort(_h);for(const t of e.optional)si(t)}if(e.wildcard?.length){e.wildcard.sort(_h);for(const t of e.wildcard)si(t)}}function $i(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Nh(e,t,r,a,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:a,suffix:o}}function cN(e,t){const r=$i("/"),a=new Uint16Array(6);for(const o of e)Bc(!1,a,o,1,r,0);si(r),t.masksTree=r,t.flatCache=$s(1e3)}function fN(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const a=om(e,t.masksTree);return t.flatCache.set(e,a),a}function dN(e,t,r,a,o){e||="/",a||="/";const l=t?`case\0${e}`:e;let u=o.singleCache.get(l);return u||(u=$i("/"),Bc(t,new Uint16Array(6),{from:e},1,u,0),o.singleCache.set(l,u)),om(a,u,r)}function hN(e,t,r=!1){const a=r?e:`nofuzz\0${e}`,o=t.matchCache.get(a);if(o!==void 0)return o;e||="/";let l;try{l=om(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)l=null;else throw u}return l&&(l.branch=gN(l.route)),t.matchCache.set(a,l),l}function pN(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function mN(e,t=!1,r){const a=$i(e.fullPath),o=new Uint16Array(6),l={},u={};let f=0;return Bc(t,o,e,1,a,0,h=>{if(r?.(h,f),h.id in l&&Mr(),l[h.id]=h,f!==0&&h.path){const d=pN(h.fullPath);(!u[d]||h.fullPath.endsWith("/"))&&(u[d]=h)}f++}),si(a),{processedTree:{segmentTree:a,singleCache:$s(1e3),matchCache:$s(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function om(e,t,r=!1){const a=e.split("/"),o=xN(e,a,t,r);if(!o)return null;const[l]=Y1(e,a,o);return{route:o.node.route,rawParams:l,parsedParams:o.parsedParams}}function Y1(e,t,r){const a=yN(r.node);let o=null;const l=Object.create(null);let u=r.extract?.part??0,f=r.extract?.node??0,h=r.extract?.path??0,d=r.extract?.segment??0;for(;f<a.length;u++,f++,h++,d++){const p=a[f];if(p.kind===Yi)break;if(p.kind===F1){d--,u--,h--;continue}const g=t[u],y=h;if(g&&(h+=g.length),p.kind===1){o??=r.node.fullPath.split("/");const v=o[d],S=p.prefix?.length??0;if(v.charCodeAt(S)===123){const E=p.suffix?.length??0,N=v.substring(S+2,v.length-E-1),w=g.substring(S,g.length-E);l[N]=decodeURIComponent(w)}else{const E=v.substring(1);l[E]=decodeURIComponent(g)}}else if(p.kind===3){if(r.skipped&1<<f){u--,h=y-1;continue}o??=r.node.fullPath.split("/");const v=o[d],S=p.prefix?.length??0,E=p.suffix?.length??0,N=v.substring(S+3,v.length-E-1),w=p.suffix||p.prefix?g.substring(S,g.length-E):g;w&&(l[N]=decodeURIComponent(w))}else if(p.kind===2){const v=p,S=e.substring(y+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),E=decodeURIComponent(S);l["*"]=E,l._splat=E;break}}return r.rawParams&&Object.assign(l,r.rawParams),[l,{part:u,node:f,path:h,segment:d}]}function gN(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function yN(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function xN(e,t,r,a){if(e==="/"&&r.index)return{node:r.index,skipped:0};const o=!Fs(t),l=o&&e!=="/",u=t.length-(o?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,d=null,p=null;for(;f.length;){const g=f.pop(),{node:y,index:v,skipped:S,depth:E,statics:N,dynamics:w,optionals:O}=g;let{extract:_,rawParams:M,parsedParams:B}=g;if(y.skipOnParamError){if(!Mh(e,t,g))continue;M=g.rawParams,_=g.extract,B=g.parsedParams}a&&y.route&&y.kind!==Yi&&ws(d,g)&&(d=g);const k=v===u;if(k&&(y.route&&!l&&ws(p,g)&&(p=g),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=k?void 0:t[v];let U;if(k&&y.index){const H={node:y.index,index:v,skipped:S,depth:E+1,statics:N,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B};let q=!0;if(y.index.skipOnParamError&&(Mh(e,t,H)||(q=!1)),q){if(N===u&&!w&&!O&&!S)return H;ws(p,H)&&(p=H)}}if(y.wildcard&&ws(h,g))for(const H of y.wildcard){const{prefix:q,suffix:L}=H;if(q&&(k||!(H.caseSensitive?D:U??=D.toLowerCase()).startsWith(q)))continue;if(L){if(k)continue;const K=t.slice(v).join("/").slice(-L.length);if((H.caseSensitive?K:K.toLowerCase())!==L)continue}const P={node:H,index:u,skipped:S,depth:E,statics:N,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B};if(!(H.skipOnParamError&&!Mh(e,t,P))){h=P;break}}if(y.optional){const H=S|1<<E,q=E+1;for(let L=y.optional.length-1;L>=0;L--){const P=y.optional[L];f.push({node:P,index:v,skipped:H,depth:q,statics:N,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B})}if(!k)for(let L=y.optional.length-1;L>=0;L--){const P=y.optional[L],{prefix:K,suffix:I}=P;if(K||I){const V=P.caseSensitive?D:U??=D.toLowerCase();if(K&&!V.startsWith(K)||I&&!V.endsWith(I))continue}f.push({node:P,index:v+1,skipped:S,depth:q,statics:N,dynamics:w,optionals:O+1,extract:_,rawParams:M,parsedParams:B})}}if(!k&&y.dynamic&&D)for(let H=y.dynamic.length-1;H>=0;H--){const q=y.dynamic[H],{prefix:L,suffix:P}=q;if(L||P){const K=q.caseSensitive?D:U??=D.toLowerCase();if(L&&!K.startsWith(L)||P&&!K.endsWith(P))continue}f.push({node:q,index:v+1,skipped:S,depth:E+1,statics:N,dynamics:w+1,optionals:O,extract:_,rawParams:M,parsedParams:B})}if(!k&&y.staticInsensitive){const H=y.staticInsensitive.get(U??=D.toLowerCase());H&&f.push({node:H,index:v+1,skipped:S,depth:E+1,statics:N+1,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B})}if(!k&&y.static){const H=y.static.get(D);H&&f.push({node:H,index:v+1,skipped:S,depth:E+1,statics:N+1,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B})}if(y.pathless){const H=E+1;for(let q=y.pathless.length-1;q>=0;q--){const L=y.pathless[q];f.push({node:L,index:v,skipped:S,depth:H,statics:N,dynamics:w,optionals:O,extract:_,rawParams:M,parsedParams:B})}}}if(p&&h)return ws(h,p)?p:h;if(p)return p;if(h)return h;if(a&&d){let g=d.index;for(let v=0;v<d.index;v++)g+=t[v].length;const y=g===e.length?"/":e.slice(g);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(y),d}return null}function Mh(e,t,r){try{const[a,o]=Y1(e,t,r);r.rawParams=a,r.extract=o;const l=r.node.parse(a);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,l),!0}catch{return null}}function ws(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Yi)>(e.node.kind===Yi)||t.node.kind===Yi==(e.node.kind===Yi)&&t.depth>e.depth))):!0}function ac(e){return sm(e.filter(t=>t!==void 0).join("/"))}function sm(e){return e.replace(/\/{2,}/g,"/")}function $1(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function hi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function G1(e){return hi($1(e))}function xc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function vN(e,t,r){return xc(e,r)===xc(t,r)}function bN({base:e,to:t,trailingSlash:r="never",cache:a}){const o=t.startsWith("/"),l=!o&&t===".";let u;if(a){u=o?t:l?e:e+"\0"+t;const g=a.get(u);if(g)return g}let f;if(l)f=e.split("/");else if(o)f=t.split("/");else{for(f=e.split("/");f.length>1&&Fs(f)==="";)f.pop();const g=t.split("/");for(let y=0,v=g.length;y<v;y++){const S=g[y];S===""?y?y===v-1&&f.push(S):f=[S]:S===".."?f.pop():S==="."||f.push(S)}}f.length>1&&(Fs(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let h,d="";for(let g=0;g<f.length;g++){g>0&&(d+="/");const y=f[g];if(!y)continue;h=am(y,0,h);const v=h[0];if(v===0){d+=y;continue}const S=h[5],E=y.substring(0,h[1]),N=y.substring(h[4],S),w=y.substring(h[2],h[3]);v===1?d+=E||N?`${E}{$${w}}${N}`:`$${w}`:v===2?d+=E||N?`${E}{$}${N}`:"$":d+=`${E}{-$${w}}${N}`}d=sm(d);const p=d||"/";return u&&a&&a.set(u,p),p}function SN(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),r=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(r,"g");return o=>o.replace(a,l=>t.get(l)??l)}function kh(e,t,r){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(o=>sv(o,r)).join("/"):sv(a,r)}function ov({path:e,params:t,decoder:r,...a}){let o=!1;const l=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:o};const u=e.length;let f=0,h,d="";for(;f<u;){const p=f;h=am(e,p,h);const g=h[5];if(f=g+1,p===g)continue;const y=h[0];if(y===0){d+="/"+e.substring(p,g);continue}if(y===2){const v=t._splat;l._splat=v,l["*"]=v;const S=e.substring(p,h[1]),E=e.substring(h[4],g);if(!v){o=!0,(S||E)&&(d+="/"+S+E);continue}const N=kh("_splat",t,r);d+="/"+S+N+E;continue}if(y===1){const v=e.substring(h[2],h[3]);!o&&!(v in t)&&(o=!0),l[v]=t[v];const S=e.substring(p,h[1]),E=e.substring(h[4],g),N=kh(v,t,r)??"undefined";d+="/"+S+N+E;continue}if(y===3){const v=e.substring(h[2],h[3]),S=t[v];if(S==null)continue;l[v]=S;const E=e.substring(p,h[1]),N=e.substring(h[4],g),w=kh(v,t,r)??"";d+="/"+E+w+N;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:l,interpolatedPath:d||"/",isMissingParams:o}}function sv(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function Pt(e){return!!e?.isNotFound}function wN(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var EN="tsr-scroll-restoration-v1_3";function CN(){const e=wN();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");fo(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=ui(a,t)||t},persist:()=>{try{e.setItem(EN,JSON.stringify(t))}catch{}}}}var lv=CN(),_N=e=>e.state.__TSR_key||e.href;function NN(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var Vu=!1,Es="window",uv="data-scroll-restoration-id";function MN(e,t){if(!lv)return;const r=lv;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Vu=!1;const a=e.options.getScrollRestorationKey||_N,o=new Map;window.history.scrollRestoration="manual";const l=f=>{if(!(Vu||!e.isScrollRestoring))if(f.target===document||f.target===window)o.set(Es,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=f.target;o.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},u=f=>{if(!e.isScrollRestoring||!f||o.size===0||!r)return;const h=r.state[f]||={};for(const[d,p]of o){let g;if(d===Es)g=Es;else if(d.isConnected){const y=d.getAttribute(uv);g=y?`[${uv}="${y}"]`:NN(d)}g&&(h[g]=p)}};document.addEventListener("scroll",l,!0),e.subscribe("onBeforeLoad",f=>{u(f.fromLocation?a(f.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{u(a(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",f=>{const h=a(f.toLocation),d=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Vu=!0;try{const g=e.isScrollRestoring?r.state[h]:void 0;let y=!1;if(g)for(const v in g){const S=g[v];if(!fo(S))continue;const{scrollX:E,scrollY:N}=S;if(!(!Number.isFinite(E)||!Number.isFinite(N))){if(v===Es)window.scrollTo({top:N,left:E,behavior:d}),y=!0;else if(v){let w;try{w=document.querySelector(v)}catch{continue}w&&(w.scrollLeft=E,w.scrollTop=N,y=!0)}}}if(!y){const v=e.history.location.hash.slice(1);if(v){const S=window.history.state?.__hashScrollIntoViewOptions??!0;if(S){const E=document.getElementById(v);E&&E.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:d};if(window.scrollTo(S),p)for(const E of p){if(E===Es)continue;const N=typeof E=="function"?E():document.querySelector(E);N&&N.scrollTo(S)}}}}finally{Vu=!1}e.isScrollRestoring&&r.set(g=>(g[h]||={},g))}})}function kN(e,t=String){const r=new URLSearchParams;for(const a in e){const o=e[a];o!==void 0&&r.set(a,t(o))}return r.toString()}function Th(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function TN(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[a,o]of t.entries()){const l=r[a];l==null?r[a]=Th(o):Array.isArray(l)?l.push(Th(o)):r[a]=[l,Th(o)]}return r}var AN=ON(JSON.parse),RN=jN(JSON.stringify,JSON.parse);function ON(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=TN(t);for(const a in r){const o=r[a];if(typeof o=="string")try{r[a]=e(o)}catch{}}return r}}function jN(e,t){const r=typeof t=="function";function a(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(r&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=kN(o,a);return l?`?${l}`:""}}var Qi="__root__";function DN(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function en(e){return e instanceof Response&&!!e.options}function zN(e){return{input:({url:t})=>{for(const r of e)t=yp(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=X1(e[r],t);return t}}}function LN(e){const t=G1(e.basepath),r=`/${t}`,a=`${r}/`,o=e.caseSensitive?r:r.toLowerCase(),l=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===o?u.pathname="/":f.startsWith(l)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=ac(["/",t,u.pathname]),u)}}function yp(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function X1(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function IN(e,t){const{createMutableStore:r,createReadonlyStore:a,batch:o,init:l}=t,u=new Map,f=new Map,h=new Map,d=r(e.status),p=r(e.loadedAt),g=r(e.isLoading),y=r(e.isTransitioning),v=r(e.location),S=r(e.resolvedLocation),E=r(e.statusCode),N=r(e.redirect),w=r([]),O=r([]),_=r([]),M=a(()=>Ah(u,w.state)),B=a(()=>Ah(f,O.state)),k=a(()=>Ah(h,_.state)),D=a(()=>w.state[0]),U=a(()=>w.state.some(F=>u.get(F)?.state.status==="pending")),H=a(()=>({locationHref:v.state.href,resolvedLocationHref:S.state?.href,status:d.state})),q=a(()=>({status:d.state,loadedAt:p.state,isLoading:g.state,isTransitioning:y.state,matches:M.state,location:v.state,resolvedLocation:S.state,statusCode:E.state,redirect:N.state})),L=$s(64);function P(F){let X=L.get(F);return X||(X=a(()=>{const Z=w.state;for(const A of Z){const z=u.get(A);if(z&&z.routeId===F)return z.state}}),L.set(F,X)),X}const K={status:d,loadedAt:p,isLoading:g,isTransitioning:y,location:v,resolvedLocation:S,statusCode:E,redirect:N,matchesId:w,pendingMatchesId:O,cachedMatchesId:_,activeMatchesSnapshot:M,pendingMatchesSnapshot:B,cachedMatchesSnapshot:k,firstMatchId:D,hasPendingMatches:U,matchRouteReactivity:H,activeMatchStoresById:u,pendingMatchStoresById:f,cachedMatchStoresById:h,__store:q,getMatchStoreByRouteId:P,setActiveMatches:I,setPendingMatches:V,setCachedMatches:j};I(e.matches),l?.(K);function I(F){Rh(F,u,w,r,o)}function V(F){Rh(F,f,O,r,o)}function j(F){Rh(F,h,_,r,o)}return K}function Ah(e,t){const r=[];for(const a of t){const o=e.get(a);o&&r.push(o.state)}return r}function Rh(e,t,r,a,o){const l=e.map(f=>f.id),u=new Set(l);o(()=>{for(const f of t.keys())u.has(f)||t.delete(f);for(const f of e){const h=t.get(f.id);if(!h){const d=a(f);d.routeId=f.routeId,t.set(f.id,d);continue}h.routeId=f.routeId,h.state!==f&&h.setState(()=>f)}lN(r.state,l)||r.setState(()=>l)})}var xp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},BN=e=>e.stores.matchesId.state.some(t=>e.stores.activeMatchStoresById.get(t)?.state._forcePending),Hc=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Zi=(e,t,r=!0)=>{const a={...e.router.options.context??{}},o=r?t:t-1;for(let l=0;l<=o;l++){const u=e.matches[l];if(!u)continue;const f=e.router.getMatch(u.id);f&&Object.assign(a,f.__routeContext,f.__beforeLoadContext)}return a},cv=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,a=e.matches.findIndex(u=>u.routeId===e.router.routeTree.id),o=a>=0?a:0;let l=r?e.matches.findIndex(u=>u.routeId===r):e.firstBadMatchIndex??e.matches.length-1;l<0&&(l=o);for(let u=l;u>=0;u--){const f=e.matches[u];if(e.router.looseRoutesById[f.routeId].options.notFoundComponent)return u}return r?l:o},ci=(e,t,r)=>{if(!(!en(r)&&!Pt(r)))throw en(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,a=>({...a,status:en(r)?"redirected":a.status==="pending"?"success":a.status,context:Zi(e,t.index),isFetching:!1,error:r})),Pt(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),en(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},Q1=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},fv=(e,t,r)=>{const a=Zi(e,r);e.updateMatch(t,o=>({...o,context:a}))},Cs=(e,t,r,a)=>{const{id:o,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(r instanceof Promise)throw r;r.routerCode=a,e.firstBadMatchIndex??=t,ci(e,e.router.getMatch(o),r);try{u.options.onError?.(r)}catch(f){r=f,ci(e,e.router.getMatch(o),r)}e.updateMatch(o,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!en(r)&&!Pt(r)&&(e.serialError??=r)},Z1=(e,t,r,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const o=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Hc(e,t)&&(r.options.loader||r.options.beforeLoad||W1(r))&&typeof o=="number"&&o!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent)){const l=setTimeout(()=>{xp(e)},o);a._nonReactive.pendingTimeout=l}},HN=(e,t,r)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;Z1(e,t,r,a);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&ci(e,l,l.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(o):o()},PN=(e,t,r,a)=>{const o=e.router.getMatch(t);let l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=ho(()=>{l?.resolve(),l=void 0});const{paramsError:u,searchError:f}=o;u&&Cs(e,r,u,"PARSE_PARAMS"),f&&Cs(e,r,f,"VALIDATE_SEARCH"),Z1(e,t,a,o);const h=new AbortController;let d=!1;const p=()=>{d||(d=!0,e.updateMatch(t,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:h})))},g=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{p(),g()});return}o._nonReactive.beforeLoadPromise=ho();const y={...Zi(e,r,!1),...o.__routeContext},{search:v,params:S,cause:E}=o,N=Hc(e,t),w={search:v,abortController:h,params:S,preload:N,context:y,location:e.location,navigate:M=>e.router.navigate({...M,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":E,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},O=M=>{if(M===void 0){e.router.batch(()=>{p(),g()});return}(en(M)||Pt(M))&&(p(),Cs(e,r,M,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,B=>({...B,__beforeLoadContext:M})),g()})};let _;try{if(_=a.options.beforeLoad(w),Ys(_))return p(),_.catch(M=>{Cs(e,r,M,"BEFORE_LOAD")}).then(O)}catch(M){p(),Cs(e,r,M,"BEFORE_LOAD")}O(_)},UN=(e,t)=>{const{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a],l=()=>f(),u=()=>PN(e,r,t,o),f=()=>{if(Q1(e,r))return;const h=HN(e,r,o);return Ys(h)?h.then(u):u()};return l()},qN=(e,t,r)=>{const a=e.router.getMatch(t);if(!a||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([r.options.head?.(o),r.options.scripts?.(o),r.options.headers?.(o)]).then(([l,u,f])=>({meta:l?.meta,links:l?.links,headScripts:l?.scripts,headers:f,scripts:u,styles:l?.styles}))},K1=(e,t,r,a,o)=>{const l=t[a-1],{params:u,loaderDeps:f,abortController:h,cause:d}=e.router.getMatch(r),p=Zi(e,a),g=Hc(e,r);return{params:u,deps:f,preload:!!g,parentMatchPromise:l,abortController:h,context:p,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:g?"preload":d,route:o,...e.router.options.additionalContext}},dv=async(e,t,r,a,o)=>{try{const l=e.router.getMatch(r);try{(!(V1??e.router.isServer)||l.ssr===!0)&&Gs(o);const u=o.options.loader,f=typeof u=="function"?u:u?.handler,h=f?.(K1(e,t,r,a,o)),d=!!f&&Ys(h);if((d||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||l._nonReactive.minPendingPromise)&&e.updateMatch(r,g=>({...g,isFetching:"loader"})),f){const g=d?await h:h;ci(e,e.router.getMatch(r),g),g!==void 0&&e.updateMatch(r,y=>({...y,loaderData:g}))}o._lazyPromise&&await o._lazyPromise;const p=l._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(r,g=>({...g,error:void 0,context:Zi(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(u){let f=u;if(f?.name==="AbortError"){if(l.abortController.signal.aborted){l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Zi(e,a)}));return}const h=l._nonReactive.minPendingPromise;h&&await h,Pt(u)&&await o.options.notFoundComponent?.preload?.(),ci(e,e.router.getMatch(r),u);try{o.options.onError?.(u)}catch(d){f=d,ci(e,e.router.getMatch(r),d)}!en(f)&&!Pt(f)&&await Gs(o,["errorComponent"]),e.updateMatch(r,d=>({...d,error:f,context:Zi(e,a),status:"error",isFetching:!1}))}}catch(l){const u=e.router.getMatch(r);u&&(u._nonReactive.loaderPromise=void 0),ci(e,u,l)}},VN=async(e,t,r)=>{async function a(v,S,E,N,w){const O=Date.now()-S.updatedAt,_=v?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,M=w.options.shouldReload,B=typeof M=="function"?M(K1(e,t,o,r,w)):M,{status:k,invalid:D}=N,U=O>=_&&(!!e.forceStaleReload||N.cause==="enter"||E!==void 0&&E!==N.id);u=k==="success"&&(D||(B??U)),v&&w.options.preload===!1||(u&&!e.sync&&p?(f=!0,(async()=>{try{await dv(e,t,o,r,w);const H=e.router.getMatch(o);H._nonReactive.loaderPromise?.resolve(),H._nonReactive.loadPromise?.resolve(),H._nonReactive.loaderPromise=void 0,H._nonReactive.loadPromise=void 0}catch(H){en(H)&&await e.router.navigate(H.options)}})()):k!=="success"||u?await dv(e,t,o,r,w):fv(e,o,r))}const{id:o,routeId:l}=e.matches[r];let u=!1,f=!1;const h=e.router.looseRoutesById[l],d=h.options.loader,p=((typeof d=="function"?void 0:d?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Q1(e,o)){if(!e.router.getMatch(o))return e.matches[r];fv(e,o,r)}else{const v=e.router.getMatch(o),S=e.router.stores.matchesId.state[r],E=(S&&e.router.stores.activeMatchStoresById.get(S)||null)?.routeId===l?S:e.router.stores.activeMatchesSnapshot.state.find(w=>w.routeId===l)?.id,N=Hc(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const w=e.router.getMatch(o),O=w._nonReactive.error||w.error;O&&ci(e,w,O),w.status==="pending"&&await a(N,v,E,w,h)}else{const w=N&&!e.router.stores.activeMatchStoresById.has(o),O=e.router.getMatch(o);O._nonReactive.loaderPromise=ho(),w!==O.preload&&e.updateMatch(o,_=>({..._,preload:w})),await a(N,v,E,O,h)}}const g=e.router.getMatch(o);f||(g._nonReactive.loaderPromise?.resolve(),g._nonReactive.loadPromise?.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,f||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const y=f?g.isFetching:!1;return y!==g.isFetching||g.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:y,invalid:!1})),e.router.getMatch(o)):g};async function hv(e){const t=e,r=[];BN(t.router)&&xp(t);let a;for(let y=0;y<t.matches.length;y++){try{const v=UN(t,y);Ys(v)&&await v}catch(v){if(en(v))throw v;if(Pt(v))a=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,l=a&&!t.preload?cv(t,a):void 0,u=a&&t.preload?0:l!==void 0?Math.min(l+1,o):o;let f,h;for(let y=0;y<u;y++)r.push(VN(t,r,y));try{await Promise.all(r)}catch{const y=await Promise.allSettled(r);for(const v of y){if(v.status!=="rejected")continue;const S=v.reason;if(en(S))throw S;Pt(S)?f??=S:h??=S}if(h!==void 0)throw h}const d=f??(a&&!t.preload?a:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!d&&a&&t.preload)return t.matches;if(d){const y=cv(t,d);y===void 0&&Mr();const v=t.matches[y],S=t.router.looseRoutesById[v.routeId],E=t.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&E&&(S.options.notFoundComponent=E),d.routeId=v.routeId;const N=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,w=>({...w,...N?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:d},isFetching:!1})),p=y,await Gs(S,["notFoundComponent"])}else if(!t.preload){const y=t.matches[0];y.globalNotFound||t.router.getMatch(y.id)?.globalNotFound&&t.updateMatch(y.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const y=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Gs(y,["errorComponent"])}for(let y=0;y<=p;y++){const{id:v,routeId:S}=t.matches[y],E=t.router.looseRoutesById[S];try{const N=qN(t,v,E);if(N){const w=await N;t.updateMatch(v,O=>({...O,...w}))}}catch(N){console.error(`Error executing head for route ${S}:`,N)}}const g=xp(t);if(Ys(g)&&await g,d)throw d;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function pv(e,t){const r=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Gs(e,t=oc){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:o,...l}=a.options;Object.assign(e.options,l),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===oc?(()=>{if(e._componentsPromise===void 0){const a=pv(e,oc);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():pv(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function W1(e){for(const t of oc)if(e.options[t]?.preload)return!0;return!1}var oc=["component","errorComponent","pendingComponent","notFoundComponent"],pi="__TSR_index",mv="popstate",gv="beforeunload";function FN(e){let t=e.getLocation();const r=new Set,a=u=>{t=e.getLocation(),r.forEach(f=>f({location:t,action:u}))},o=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},l=async({task:u,navigateOpts:f,...h})=>{if(f?.ignoreBlocker??!1){u();return}const d=e.getBlockers?.()??[],p=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&d.length&&p)for(const g of d){const y=Xs(h.path,h.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:h.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,h)=>{const d=t.state[pi];f=yv(d+1,f),l({task:()=>{e.pushState(u,f),a({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:f})},replace:(u,f,h)=>{const d=t.state[pi];f=yv(d,f),l({task:()=>{e.replaceState(u,f),a({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:f})},go:(u,f)=>{l({task:()=>{e.go(u),o({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[pi]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const h=e.getBlockers?.()??[];e.setBlockers?.(h.filter(d=>d!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function yv(e,t){t||(t={});const r=lm();return{...t,key:r,__TSR_key:r,[pi]:e}}function J1(e){const t=e?.window??(typeof document<"u"?window:void 0),r=t.history.pushState,a=t.history.replaceState;let o=[];const l=()=>o,u=U=>o=U,f=e?.createHref??(U=>U),h=e?.parseLocation??(()=>Xs(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const U=lm();t.history.replaceState({[pi]:0,key:U,__TSR_key:U},"")}let d=h(),p,g=!1,y=!1,v=!1,S=!1;const E=()=>d;let N,w;const O=()=>{N&&(D._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),D._ignoreSubscribers=!1,N=void 0,w=void 0,p=void 0)},_=(U,H,q)=>{const L=f(H);w||(p=d),d=Xs(H,q),N={href:L,state:q,isPush:N?.isPush||U==="push"},w||(w=Promise.resolve().then(()=>O()))},M=U=>{d=h(),D.notify({type:U})},B=async()=>{if(y){y=!1;return}const U=h(),H=U.state[pi]-d.state[pi],q=H===1,L=H===-1,P=!q&&!L||g;g=!1;const K=P?"GO":L?"BACK":"FORWARD",I=P?{type:"GO",index:H}:{type:L?"BACK":"FORWARD"};if(v)v=!1;else{const V=l();if(typeof document<"u"&&V.length){for(const j of V)if(await j.blockerFn({currentLocation:d,nextLocation:U,action:K})){y=!0,t.history.go(1),D.notify(I);return}}}d=h(),D.notify(I)},k=U=>{if(S){S=!1;return}let H=!1;const q=l();if(typeof document<"u"&&q.length)for(const L of q){const P=L.enableBeforeUnload??!0;if(P===!0){H=!0;break}if(typeof P=="function"&&P()===!0){H=!0;break}}if(H)return U.preventDefault(),U.returnValue=""},D=FN({getLocation:E,getLength:()=>t.history.length,pushState:(U,H)=>_("push",U,H),replaceState:(U,H)=>_("replace",U,H),back:U=>(U&&(v=!0),S=!0,t.history.back()),forward:U=>{U&&(v=!0),S=!0,t.history.forward()},go:U=>{g=!0,t.history.go(U)},createHref:U=>f(U),flush:O,destroy:()=>{t.history.pushState=r,t.history.replaceState=a,t.removeEventListener(gv,k,{capture:!0}),t.removeEventListener(mv,B)},onBlocked:()=>{p&&d!==p&&(d=p)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(gv,k,{capture:!0}),t.addEventListener(mv,B),t.history.pushState=function(...U){const H=r.apply(t.history,U);return D._ignoreSubscribers||M("PUSH"),H},t.history.replaceState=function(...U){const H=a.apply(t.history,U);return D._ignoreSubscribers||M("REPLACE"),H},D}function YN(e){const t=typeof document<"u"?window:void 0;return J1({window:t,parseLocation:()=>{const r=t.location.hash.split("#").slice(1),a=r[0]??"/",o=t.location.search,l=r.slice(1);return Xs(`${a}${o}${l.length===0?"":`#${l.join("#")}`}`,t.history.state)},createHref:r=>`${t.location.pathname}${t.location.search}#${r}`})}function $N(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Xs(e,t){const r=$N(e),a=r.indexOf("#"),o=r.indexOf("?"),l=lm();return{href:r,pathname:r.substring(0,a>0?o>0?Math.min(a,o):a:o>0?o:r.length),hash:a>-1?r.substring(a):"",search:o>-1?r.slice(o,a===-1?void 0:a):"",state:t||{[pi]:0,key:l,__TSR_key:l}}}function lm(){return(Math.random()+1).toString(36).substring(7)}function io(e,t){const r=t,a=e;return{fromLocation:r,toLocation:a,pathChanged:r?.pathname!==a.pathname,hrefChanged:r?.href!==a.href,hashChanged:r?.hash!==a.hash}}var GN=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{const a=this.options,o=this.basepath??a?.basepath??"/",l=this.basepath===void 0,u=a?.rewrite;if(this.options={...a,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=SN(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=J1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=$s(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=IN(QN(this.latestLocation),p),MN(this)}let f=!1;const h=this.options.basepath??"/",d=this.options.rewrite;if(l||o!==h||u!==d){this.basepath=h;const p=[],g=G1(h);g&&g!=="/"&&p.push(LN({basepath:h})),d&&p.push(d),this.rewrite=p.length===0?void 0:p.length===1?p[0]:zN(p),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=mN(this.routeTree,this.options.caseSensitive,(a,o)=>{a.init({originalIndex:o})});return this.options.routeMasks&&cN(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,a)=>{const o={eventType:r,fn:a};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=r=>{this.subscribers.forEach(a=>{a.eventType===r.type&&a.fn(r)})},this.parseLocation=(r,a)=>{const o=({pathname:h,search:d,hash:p,href:g,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const w=this.options.parseSearch(d),O=this.options.stringifySearch(w);return{href:h+O+p,publicHref:h+O+p,pathname:Ss(h).path,external:!1,searchStr:O,search:Pi(a?.search,w),hash:Ss(p.slice(1)).path,state:Fi(a?.state,y)}}const v=new URL(g,this.origin),S=yp(this.rewrite,v),E=this.options.parseSearch(S.search),N=this.options.stringifySearch(E);return S.search=N,{href:S.href.replace(S.origin,""),publicHref:g,pathname:Ss(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:N,search:Pi(a?.search,E),hash:Ss(S.hash.slice(1)).path,state:Fi(a?.state,y)}},l=o(r),{__tempLocation:u,__tempKey:f}=l.state;if(u&&(!f||f===this.tempLocationKey)){const h=o(u);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathWithBase=(r,a)=>bN({base:r,to:sm(a),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,a,o)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:a},o):this.matchRoutesInternal(r,a),this.getMatchedRoutes=r=>ZN({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const a=this.getMatch(r);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{if(this.stores.pendingMatchStoresById.has(r))return;const a=this.stores.activeMatchStoresById.get(r)?.state;a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const a=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(u);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??f.fullPath,d=this.resolvePathWithBase(h,"."),p=f.search,g=Object.assign(Object.create(null),f.params),y=l.to?this.resolvePathWithBase(d,`${l.to}`):this.resolvePathWithBase(d,"."),v=l.params===!1||l.params===null?Object.create(null):(l.params??!0)===!0?g:Object.assign(g,ui(l.params,g)),S=this.getMatchedRoutes(y);let E=S.matchedRoutes;if((!S.foundRoute||S.foundRoute.path!=="/"&&S.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(v).length>0)for(const q of E){const L=q.options.params?.stringify??q.options.stringifyParams;if(L)try{Object.assign(v,L(v))}catch{}}const N=r.leaveParams?y:Ss(ov({path:y,params:v,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let w=p;if(r._includeValidateSearch&&this.options.search?.strict){const q={};E.forEach(L=>{if(L.options.validateSearch)try{Object.assign(q,sc(L.options.validateSearch,{...q,...w}))}catch{}}),w=q}w=KN({search:w,dest:l,destRoutes:E,_includeValidateSearch:r._includeValidateSearch}),w=Pi(p,w);const O=this.options.stringifySearch(w),_=l.hash===!0?u.hash:l.hash?ui(l.hash,u.hash):void 0,M=_?`#${_}`:"";let B=l.state===!0?u.state:l.state?ui(l.state,u.state):{};B=Fi(u.state,B);const k=`${N}${O}${M}`;let D,U,H=!1;if(this.rewrite){const q=new URL(k,this.origin),L=X1(this.rewrite,q);D=q.href.replace(q.origin,""),L.origin!==this.origin?(U=L.href,H=!0):U=L.pathname+L.search+L.hash}else D=sN(k),U=D;return{publicHref:U,href:D,pathname:N,search:w,searchStr:O,state:B,hash:_??"",external:H,unmaskOnReload:l.unmaskOnReload}},o=(l={},u)=>{const f=a(l);let h=u?a(u):void 0;if(!h){const d=Object.create(null);if(this.options.routeMasks){const p=fN(f.pathname,this.processedTree);if(p){Object.assign(d,p.rawParams);const{from:g,params:y,...v}=p.route,S=y===!1||y===null?Object.create(null):(y??!0)===!0?d:Object.assign(d,ui(y,d));u={from:r.from,...v,params:S},h=a(u)}}}return h&&(f.maskedLocation=h),f};return r.mask?o(r,{from:r.from,...r.mask}):o(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:a,...o})=>{const l=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(p=>{o.state[p]=this.latestLocation.state[p]});const d=Xi(o.state,this.latestLocation.state);return h.forEach(p=>{delete o.state[p]}),d},u=hi(this.latestLocation.href)===hi(o.href);let f=this.commitLocationPromise;if(this.commitLocationPromise=ho(()=>{f?.resolve(),f=void 0}),u&&l())this.load();else{let{maskedLocation:h,hashScrollIntoView:d,...p}=o;h&&(p={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:a})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:a,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:u,href:f,...h}={})=>{if(f){const g=this.history.location.state.__TSR_index,y=Xs(f,{__TSR_index:r?g:g+1}),v=new URL(y.pathname,this.origin);h.to=yp(this.rewrite,v).pathname,h.search=this.options.parseSearch(y.search),h.hash=y.hash.slice(1)}const d=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=d;const p=this.commitLocation({...d,viewTransition:l,replace:r,resetScroll:a,hashScrollIntoView:o,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===d&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:a,href:o,publicHref:l,...u})=>{let f=!1;if(o)try{new URL(`${o}`),f=!0}catch{}if(f&&!a&&(a=!0),a){if(r!==void 0||!o){const d=this.buildLocation({to:r,...u});o=o??d.publicHref,l=l??d.publicHref}const h=!f&&l?l:o;if(yc(h,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const d=this.history.getBlockers?.()??[];for(const p of d)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...u,href:o,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatchesSnapshot.state.filter(o=>!r.some(l=>l.id===o.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(r),this.stores.setCachedMatches(a)})},this.load=async r=>{let a,o,l;const u=this.stores.resolvedLocation.state??this.stores.location.state;for(l=new Promise(h=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,p=this.stores.resolvedLocation.state,g=io(d,p);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await hv({router:this,sync:r?.sync,forceStaleReload:u.href===d.href,matches:this.stores.pendingMatchesSnapshot.state,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=null,v=null,S=null,E=null;this.batch(()=>{const N=this.stores.pendingMatchesSnapshot.state,w=N.length,O=this.stores.activeMatchesSnapshot.state;y=w?O.filter(B=>!this.stores.pendingMatchStoresById.has(B.id)):null;const _=new Set;for(const B of this.stores.pendingMatchStoresById.values())B.routeId&&_.add(B.routeId);const M=new Set;for(const B of this.stores.activeMatchStoresById.values())B.routeId&&M.add(B.routeId);v=w?O.filter(B=>!_.has(B.routeId)):null,S=w?N.filter(B=>!M.has(B.routeId)):null,E=w?N.filter(B=>M.has(B.routeId)):O,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),w&&(this.stores.setActiveMatches(N),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...y.filter(B=>B.status!=="error"&&B.status!=="notFound"&&B.status!=="redirected")]),this.clearExpiredCache())});for(const[N,w]of[[v,"onLeave"],[S,"onEnter"],[E,"onStay"]])if(N)for(const O of N)this.looseRoutesById[O.routeId].options[w]?.(O)})})}})}catch(d){en(d)?(a=d,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Pt(d)&&(o=d);const p=a?a.status:o?404:this.stores.activeMatchesSnapshot.state.some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>p),this.stores.redirect.setState(()=>a)})}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let f;this.hasNotFoundMatch()?f=404:this.stores.activeMatchesSnapshot.state.some(h=>h.status==="error")&&(f=500),f!==void 0&&this.stores.statusCode.setState(()=>f)},this.startViewTransition=r=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.stores.resolvedLocation.state,f=typeof a.types=="function"?a.types(io(l,u)):a.types;if(f===!1){r();return}o={update:r,types:f}}else o=r;document.startViewTransition(o)}else r()},this.updateMatch=(r,a)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStoresById.get(r);if(o){o.setState(a);return}const l=this.stores.activeMatchStoresById.get(r);if(l){l.setState(a);return}const u=this.stores.cachedMatchStoresById.get(r);if(u){const f=a(u.state);f.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(h=>h.filter(d=>d!==r)):u.setState(()=>f)}})},this.getMatch=r=>this.stores.cachedMatchStoresById.get(r)?.state??this.stores.pendingMatchStoresById.get(r)?.state??this.stores.activeMatchStoresById.get(r)?.state,this.invalidate=r=>{const a=o=>r?.filter?.(o)??!0?{...o,invalid:!0,...r?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(a)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(a)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(a))}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const a=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const o=r.options._builtLocation??this.buildLocation(r.options),l=this.getParsedLocationHref(o);r.options.href=l,r.headers.set("Location",l)}else if(a)try{const o=new URL(a);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;r.options.href=l,r.headers.set("Location",l)}}catch{}if(r.options.href&&!r.options._builtLocation&&yc(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const a=r?.filter;a!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(o=>!a(o))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const r=Date.now(),a=o=>{const l=this.looseRoutesById[o.routeId];if(!l.options.loader)return!0;const u=(o.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:r-o.updatedAt>=u};this.clearCache({filter:a})},this.loadRouteChunk=Gs,this.preloadRoute=async r=>{const a=r._builtLocation??this.buildLocation(r);let o=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:r});const l=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),u=new Set([...l,...this.stores.cachedMatchesId.state]),f=o.filter(h=>!u.has(h.id));if(f.length){const h=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...h,...f])}try{return o=await hv({router:this,matches:o,location:a,preload:!0,updateMatch:(h,d)=>{l.has(h)?o=o.map(p=>p.id===h?d(p):p):this.updateMatch(h,d)}}),o}catch(h){if(en(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:a});Pt(h)||console.error(h);return}},this.matchRoute=(r,a)=>{const o={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},l=this.buildLocation(o);if(a?.pending&&this.stores.status.state!=="pending")return!1;const u=(a?.pending===void 0?!this.stores.isLoading.state:a.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,f=dN(l.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,u.pathname,this.processedTree);return!f||r.params&&!Xi(f.rawParams,r.params,{partial:!0})?!1:a?.includeSearch??!0?Xi(u.search,l.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(r=>r.status==="notFound"||r.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??RN,parseSearch:e.parseSearch??AN,protocolAllowlist:e.protocolAllowlist??oN}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const r=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:o,parsedParams:l}=r;let{matchedRoutes:u}=r,f=!1;(a?a.path!=="/"&&o["**"]:hi(e.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:f=!0);const h=f?JN(this.options.notFoundMode,u):void 0,d=new Array(u.length),p=new Map;for(const g of this.stores.activeMatchStoresById.values())g.routeId&&p.set(g.routeId,g.state);for(let g=0;g<u.length;g++){const y=u[g],v=d[g-1];let S,E,N;{const K=v?.search??e.search,I=v?._strictSearch??void 0;try{const V=sc(y.options.validateSearch,{...K})??void 0;S={...K,...V},E={...I,...V},N=void 0}catch(V){let j=V;if(V instanceof vc||(j=new vc(V.message,{cause:V})),t?.throwOnError)throw j;S=K,E={},N=j}}const w=y.options.loaderDeps?.({search:S})??"",O=w?JSON.stringify(w):"",{interpolatedPath:_,usedParams:M}=ov({path:y.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),B=y.id+_+O,k=this.getMatch(B),D=p.get(y.id),U=k?._strictParams??M;let H;if(!k)try{xv(y,M,l,U)}catch(K){if(Pt(K)||en(K)?H=K:H=new XN(K.message,{cause:K}),t?.throwOnError)throw H}Object.assign(o,U);const q=D?"stay":"enter";let L;if(k)L={...k,cause:q,params:D?.params??o,_strictParams:U,search:Pi(D?D.search:k.search,S),_strictSearch:E};else{const K=y.options.loader||y.options.beforeLoad||y.lazyFn||W1(y)?"pending":"success";L={id:B,ssr:y.options.ssr,index:g,routeId:y.id,params:D?.params??o,_strictParams:U,pathname:_,updatedAt:Date.now(),search:D?Pi(D.search,S):S,_strictSearch:E,searchError:void 0,status:K,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:ho()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:D?Fi(D.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:y.options.staticData||{},fullPath:y.fullPath}}t?.preload||(L.globalNotFound=h===y.id),L.searchError=N;const P=this.getParentContext(v);L.context={...P,...L.__routeContext,...L.__beforeLoadContext},d[g]=L}for(let g=0;g<d.length;g++){const y=d[g],v=this.looseRoutesById[y.routeId],S=this.getMatch(y.id),E=p.get(y.routeId);if(y.params=E?Pi(E.params,o):o,!S){const N=d[g-1],w=this.getParentContext(N);if(v.options.context){const O={deps:y.loaderDeps,params:y.params,context:w??{},location:e,navigate:_=>this.navigate({..._,_fromLocation:e}),buildLocation:this.buildLocation,cause:y.cause,abortController:y.abortController,preload:!!y.preload,matches:d,routeId:v.id};y.__routeContext=v.options.context(O)??void 0}y.context={...w,...y.__routeContext,...y.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:r,parsedParams:a}=this.getMatchedRoutes(e.pathname),o=Fs(t),l={...e.search};for(const p of t)try{Object.assign(l,sc(p.options.validateSearch,l))}catch{}const u=Fs(this.stores.matchesId.state),f=u&&this.stores.activeMatchStoresById.get(u)?.state,h=f&&f.routeId===o.id&&f.pathname===e.pathname;let d;if(h)d=f.params;else{const p=Object.assign(Object.create(null),r);for(const g of t)try{xv(g,r,a??{},p)}catch{}d=p}return{matchedRoutes:t,fullPath:o.fullPath,search:l,params:d}}},vc=class extends Error{},XN=class extends Error{};function QN(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function sc(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new vc("Async validation not supported");if(r.issues)throw new vc(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function ZN({pathname:e,routesById:t,processedTree:r}){const a=Object.create(null),o=hi(e);let l,u;const f=hN(o,r,!0);return f&&(l=f.route,Object.assign(a,f.rawParams),u=Object.assign(Object.create(null),f.parsedParams)),{matchedRoutes:f?.branch||[t.__root__],routeParams:a,foundRoute:l,parsedParams:u}}function KN({search:e,dest:t,destRoutes:r,_includeValidateSearch:a}){return WN(r)(e,t,a??!1)}function WN(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:u,next:f})=>{let h=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(h=o.options.preSearchFilters.reduce((p,g)=>g(p),u));const d=f(h);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,g)=>g(p),d):d};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:u,next:f})=>{const h=f(u);if(!t._includeValidateSearch)return h;try{return{...h,...sc(o.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(l)}}const r=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:ui(l.search,o):{}};t.middlewares.push(r);const a=(o,l,u)=>{if(o>=u.length)return l;const f=u[o];return f({search:l,next:d=>a(o+1,d,u)})};return function(l,u,f){return t.dest=u,t._includeValidateSearch=f,a(0,l,t.middlewares)}}function JN(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.children)return a.id}return Qi}function xv(e,t,r,a){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const l in t)l in r&&(a[l]=r[l]);else{const l=o(a);Object.assign(a,l)}}var eM="Error preloading route! ☝️",eS=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Qi:this.parentRoute||Mr();let o=a?Qi:r?.path;o&&o!=="/"&&(o=$1(o));const l=r?.id||o;let u=a?Qi:ac([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);o==="__root__"&&(o="/"),u!=="__root__"&&(u=ac(["/",u]));const f=u==="__root__"?"/":ac([this.parentRoute.fullPath,o]);this._path=o,this._id=u,this._fullPath=f,this._to=hi(f)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>DN({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},tM=class extends eS{constructor(e){super(e)}};function nM(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.state,r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(r)}}}function um(e){const t=e.errorComponent??cm;return b.jsx(rM,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:a})=>r?Y.createElement(t,{error:r,reset:a}):e.children})}var rM=class extends Y.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function cm({error:e}){const[t,r]=Y.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(a=>!a),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function iM({children:e,fallback:t=null}){return tS()?b.jsx(co.Fragment,{children:e}):b.jsx(co.Fragment,{children:t})}function tS(){return co.useSyncExternalStore(aM,()=>!0,()=>!1)}function aM(){return()=>{}}var nS=Y.createContext(null);function rn(e){return Y.useContext(nS)}var Pc=Y.createContext(void 0),oM=Y.createContext(void 0),ot=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(ot||{});function sM({update:e,notify:t,unwatched:r}){return{link:a,unlink:o,propagate:l,checkDirty:u,shallowPropagate:f};function a(d,p,g){const y=p.depsTail;if(y!==void 0&&y.dep===d)return;const v=y!==void 0?y.nextDep:p.deps;if(v!==void 0&&v.dep===d){v.version=g,p.depsTail=v;return}const S=d.subsTail;if(S!==void 0&&S.version===g&&S.sub===p)return;const E=p.depsTail=d.subsTail={version:g,dep:d,sub:p,prevDep:y,nextDep:v,prevSub:S,nextSub:void 0};v!==void 0&&(v.prevDep=E),y!==void 0?y.nextDep=E:p.deps=E,S!==void 0?S.nextSub=E:d.subs=E}function o(d,p=d.sub){const g=d.dep,y=d.prevDep,v=d.nextDep,S=d.nextSub,E=d.prevSub;return v!==void 0?v.prevDep=y:p.depsTail=y,y!==void 0?y.nextDep=v:p.deps=v,S!==void 0?S.prevSub=E:g.subsTail=E,E!==void 0?E.nextSub=S:(g.subs=S)===void 0&&r(g),v}function l(d){let p=d.nextSub,g;e:do{const y=d.sub;let v=y.flags;if(v&60?v&12?v&4?!(v&48)&&h(d,y)?(y.flags=v|40,v&=1):v=0:y.flags=v&-9|32:v=0:y.flags=v|32,v&2&&t(y),v&1){const S=y.subs;if(S!==void 0){const E=(d=S).nextSub;E!==void 0&&(g={value:p,prev:g},p=E);continue}}if((d=p)!==void 0){p=d.nextSub;continue}for(;g!==void 0;)if(d=g.value,g=g.prev,d!==void 0){p=d.nextSub;continue e}break}while(!0)}function u(d,p){let g,y=0,v=!1;e:do{const S=d.dep,E=S.flags;if(p.flags&16)v=!0;else if((E&17)===17){if(e(S)){const N=S.subs;N.nextSub!==void 0&&f(N),v=!0}}else if((E&33)===33){(d.nextSub!==void 0||d.prevSub!==void 0)&&(g={value:d,prev:g}),d=S.deps,p=S,++y;continue}if(!v){const N=d.nextDep;if(N!==void 0){d=N;continue}}for(;y--;){const N=p.subs,w=N.nextSub!==void 0;if(w?(d=g.value,g=g.prev):d=N,v){if(e(p)){w&&f(N),p=d.sub;continue}v=!1}else p.flags&=-33;p=d.sub;const O=d.nextDep;if(O!==void 0){d=O;continue e}}return v}while(!0)}function f(d){do{const p=d.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&t(p))}while((d=d.nextSub)!==void 0)}function h(d,p){let g=p.depsTail;for(;g!==void 0;){if(g===d)return!0;g=g.prevDep}return!1}}function fm(e,t,r){const a=typeof e=="object",o=a?e:void 0;return{next:(a?e.next:e)?.bind(o),error:(a?e.error:t)?.bind(o),complete:(a?e.complete:r)?.bind(o)}}const vp=[];let lc=0;const{link:vv,unlink:lM,propagate:uM,checkDirty:rS,shallowPropagate:bv}=sM({update(e){return e._update()},notify(e){vp[bp++]=e,e.flags&=~ot.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ot.Mutable|ot.Dirty,bc(e))}});let Fu=0,bp=0,Qn,Sp=0;function iS(e){try{++Sp,e()}finally{--Sp||aS()}}function bc(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=lM(r,e)}function aS(){if(!(Sp>0)){for(;Fu<bp;){const e=vp[Fu];vp[Fu++]=void 0,e.notify()}Fu=0,bp=0}}function oS(e,t){const r=typeof e=="function",a=e,o={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?ot.None:ot.Mutable,get(){return Qn!==void 0&&vv(o,Qn,lc),o._snapshot},subscribe(l){const u=fm(l),f={current:!1},h=cM(()=>{o.get(),f.current?u.next?.(o._snapshot):f.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(l){const u=Qn,f=Object.is;if(r)Qn=o,++lc,o.depsTail=void 0;else if(l===void 0)return!1;r&&(o.flags=ot.Mutable|ot.RecursedCheck);try{const h=o._snapshot,d=typeof l=="function"?l(h):l===void 0&&r?a(h):l;return h===void 0||!f(h,d)?(o._snapshot=d,!0):!1}finally{Qn=u,r&&(o.flags&=~ot.RecursedCheck),bc(o)}}};return r?(o.flags=ot.Mutable|ot.Dirty,o.get=function(){const l=o.flags;if(l&ot.Dirty||l&ot.Pending&&rS(o.deps,o)){if(o._update()){const u=o.subs;u!==void 0&&bv(u)}}else l&ot.Pending&&(o.flags=l&~ot.Pending);return Qn!==void 0&&vv(o,Qn,lc),o._snapshot}):o.set=function(l){if(o._update(l)){const u=o.subs;u!==void 0&&(uM(u),bv(u),aS())}},o}function cM(e){const t=()=>{const a=Qn;Qn=r,++lc,r.depsTail=void 0,r.flags=ot.Watching|ot.RecursedCheck;try{return e()}finally{Qn=a,r.flags&=~ot.RecursedCheck,bc(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ot.Watching|ot.RecursedCheck,notify(){const a=this.flags;a&ot.Dirty||a&ot.Pending&&rS(this.deps,this)?t():this.flags=ot.Watching},stop(){this.flags=ot.None,this.depsTail=void 0,bc(this)}};return t(),r}class fM{constructor(t){this.atom=oS(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(fm(t))}}class dM{constructor(t){this.atom=oS(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(fm(t))}}function Sv(e){return typeof e=="function"?new dM(e):new fM(e)}var Oh={exports:{}},jh={},Dh={exports:{}},zh={};var wv;function hM(){if(wv)return zh;wv=1;var e=ll();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var r=typeof Object.is=="function"?Object.is:t,a=e.useState,o=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function f(g,y){var v=y(),S=a({inst:{value:v,getSnapshot:y}}),E=S[0].inst,N=S[1];return l(function(){E.value=v,E.getSnapshot=y,h(E)&&N({inst:E})},[g,v,y]),o(function(){return h(E)&&N({inst:E}),g(function(){h(E)&&N({inst:E})})},[g]),u(v),v}function h(g){var y=g.getSnapshot;g=g.value;try{var v=y();return!r(g,v)}catch{return!0}}function d(g,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:f;return zh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,zh}var Ev;function pM(){return Ev||(Ev=1,Dh.exports=hM()),Dh.exports}var Cv;function mM(){if(Cv)return jh;Cv=1;var e=ll(),t=pM();function r(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var a=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,f=e.useMemo,h=e.useDebugValue;return jh.useSyncExternalStoreWithSelector=function(d,p,g,y,v){var S=l(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=f(function(){function w(k){if(!O){if(O=!0,_=k,k=y(k),v!==void 0&&E.hasValue){var D=E.value;if(v(D,k))return M=D}return M=k}if(D=M,a(_,k))return D;var U=y(k);return v!==void 0&&v(D,U)?(_=k,D):(_=k,M=U)}var O=!1,_,M,B=g===void 0?null:g;return[function(){return w(p())},B===null?void 0:function(){return w(B())}]},[p,g,y,v]);var N=o(d,S[0],S[1]);return u(function(){E.hasValue=!0,E.value=N},[N]),h(N),N},jh}var _v;function gM(){return _v||(_v=1,Oh.exports=mM()),Oh.exports}var sS=gM();const yM=Ic(sS);function xM(e,t){return e===t}function Ut(e,t,r=xM){const a=Y.useCallback(u=>{if(!e)return()=>{};const{unsubscribe:f}=e.subscribe(u);return f},[e]),o=Y.useCallback(()=>e?.get(),[e]);return sS.useSyncExternalStoreWithSelector(a,o,o,t,r)}var vM={state:void 0,get:()=>{},subscribe:()=>()=>{}};function aa(e){const t=rn(),r=Y.useContext(e.from?oM:Pc),a=e.from??r,o=a?e.from?t.stores.getMatchStoreByRouteId(a):t.stores.activeMatchStoresById.get(a):void 0,l=Y.useRef(void 0);return Ut(o??vM,u=>{if((e.shouldThrow??!0)&&!u&&Mr(),u===void 0)return;const f=e.select?e.select(u):u;if(e.structuralSharing??t.options.defaultStructuralSharing){const h=Fi(l.current,f);return l.current=h,h}return f})}function lS(e){return aa({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function uS(e){const{select:t,...r}=e;return aa({...r,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function cS(e){return aa({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function fS(e){return aa({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Uc(e){const t=rn();return Y.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}function dS(e){return aa({...e,select:t=>e.select?e.select(t.context):t.context})}var bM=O1();function SM(e,t){const r=rn(),a=tN(t),{activeProps:o,inactiveProps:l,activeOptions:u,to:f,preload:h,preloadDelay:d,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:v,viewTransition:S,children:E,target:N,disabled:w,style:O,className:_,onClick:M,onBlur:B,onFocus:k,onMouseEnter:D,onMouseLeave:U,onTouchStart:H,ignoreBlocker:q,params:L,search:P,hash:K,state:I,mask:V,reloadDocument:j,unsafeRelative:F,from:X,_fromLocation:Z,...A}=e,z=tS(),$=Y.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),R=Ut(r.stores.location,Ne=>Ne,(Ne,ut)=>Ne.href===ut.href),te=Y.useMemo(()=>{const Ne={_fromLocation:R,...$};return r.buildLocation(Ne)},[r,R,$]),ue=te.maskedLocation?te.maskedLocation.publicHref:te.publicHref,ce=te.maskedLocation?te.maskedLocation.external:te.external,fe=Y.useMemo(()=>MM(ue,ce,r.history,w),[w,ce,ue,r.history]),le=Y.useMemo(()=>{if(fe?.external)return yc(fe.href,r.protocolAllowlist)?void 0:fe.href;if(!kM(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),yc(f,r.protocolAllowlist)?void 0:f}catch{}},[f,fe,r.protocolAllowlist]),pe=Y.useMemo(()=>{if(le)return!1;if(u?.exact){if(!vN(R.pathname,te.pathname,r.basepath))return!1}else{const Ne=xc(R.pathname,r.basepath),ut=xc(te.pathname,r.basepath);if(!(Ne.startsWith(ut)&&(Ne.length===ut.length||Ne[ut.length]==="/")))return!1}return(u?.includeSearch??!0)&&!Xi(R.search,te.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?z&&R.hash===te.hash:!0},[u?.exact,u?.explicitUndefined,u?.includeHash,u?.includeSearch,R,le,z,te.hash,te.pathname,te.search,r.basepath]),be=pe?ui(o,{})??wM:Lh,Se=pe?Lh:ui(l,{})??Lh,ye=[_,be.className,Se.className].filter(Boolean).join(" "),we=(O||be.style||Se.style)&&{...O,...be.style,...Se.style},[Re,He]=Y.useState(!1),Ie=Y.useRef(!1),Qe=e.reloadDocument||le?!1:h??r.options.defaultPreload,_t=d??r.options.defaultPreloadDelay??0,it=Y.useCallback(()=>{r.preloadRoute({...$,_builtLocation:te}).catch(Ne=>{console.warn(Ne),console.warn(eM)})},[r,$,te]);eN(a,Y.useCallback(Ne=>{Ne?.isIntersecting&&it()},[it]),NM,{disabled:!!w||Qe!=="viewport"}),Y.useEffect(()=>{Ie.current||!w&&Qe==="render"&&(it(),Ie.current=!0)},[w,it,Qe]);const Ot=Ne=>{const ut=Ne.currentTarget.getAttribute("target"),ie=N!==void 0?N:ut;if(!w&&!TM(Ne)&&!Ne.defaultPrevented&&(!ie||ie==="_self")&&Ne.button===0){Ne.preventDefault(),bM.flushSync(()=>{He(!0)});const he=r.subscribe("onResolved",()=>{he(),He(!1)});r.navigate({...$,replace:g,resetScroll:v,hashScrollIntoView:p,startTransition:y,viewTransition:S,ignoreBlocker:q})}};if(le)return{...A,ref:a,href:le,...E&&{children:E},...N&&{target:N},...w&&{disabled:w},...O&&{style:O},..._&&{className:_},...M&&{onClick:M},...B&&{onBlur:B},...k&&{onFocus:k},...D&&{onMouseEnter:D},...U&&{onMouseLeave:U},...H&&{onTouchStart:H}};const qt=Ne=>{if(w||Qe!=="intent")return;if(!_t){it();return}const ut=Ne.currentTarget;if(_s.has(ut))return;const ie=setTimeout(()=>{_s.delete(ut),it()},_t);_s.set(ut,ie)},An=Ne=>{w||Qe!=="intent"||it()},vn=Ne=>{if(w||!Qe||!_t)return;const ut=Ne.currentTarget,ie=_s.get(ut);ie&&(clearTimeout(ie),_s.delete(ut))};return{...A,...be,...Se,href:fe?.href,ref:a,onClick:Qa([M,Ot]),onBlur:Qa([B,vn]),onFocus:Qa([k,qt]),onMouseEnter:Qa([D,qt]),onMouseLeave:Qa([U,vn]),onTouchStart:Qa([H,An]),disabled:!!w,target:N,...we&&{style:we},...ye&&{className:ye},...w&&EM,...pe&&CM,...z&&Re&&_M}}var Lh={},wM={className:"active"},EM={role:"link","aria-disabled":!0},CM={"data-status":"active","aria-current":"page"},_M={"data-transitioning":"transitioning"},_s=new WeakMap,NM={rootMargin:"100px"},Qa=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function MM(e,t,r,a){if(!a)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function kM(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var hS=Y.forwardRef((e,t)=>{const{_asChild:r,...a}=e,{type:o,...l}=SM(a,t),u=typeof a.children=="function"?a.children({isActive:l["data-status"]==="active"}):a.children;if(!r){const{disabled:f,...h}=l;return Y.createElement("a",h,u)}return Y.createElement(r,l,u)});function TM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var AM=class extends eS{constructor(e){super(e),this.useMatch=t=>aa({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>dS({...t,from:this.id}),this.useSearch=t=>fS({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>cS({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>uS({...t,from:this.id}),this.useLoaderData=t=>lS({...t,from:this.id}),this.useNavigate=()=>Uc({from:this.fullPath}),this.Link=co.forwardRef((t,r)=>b.jsx(hS,{ref:r,from:this.fullPath,...t}))}};function cl(e){return new AM(e)}var RM=class extends tM{constructor(e){super(e),this.useMatch=t=>aa({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>dS({...t,from:this.id}),this.useSearch=t=>fS({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>cS({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>uS({...t,from:this.id}),this.useLoaderData=t=>lS({...t,from:this.id}),this.useNavigate=()=>Uc({from:this.fullPath}),this.Link=co.forwardRef((t,r)=>b.jsx(hS,{ref:r,from:this.fullPath,...t}))}};function OM(e){return new RM(e)}function jM(e){const t=rn(),r=`not-found-${Ut(t.stores.location,a=>a.pathname)}-${Ut(t.stores.status,a=>a)}`;return b.jsx(um,{getResetKey:()=>r,onCatch:(a,o)=>{if(Pt(a))e.onCatch?.(a,o);else throw a},errorComponent:({error:a})=>{if(Pt(a))return e.fallback?.(a);throw a},children:e.children})}function DM(){return b.jsx("p",{children:"Not Found"})}function eo(e){return b.jsx(b.Fragment,{children:e.children})}function pS(e,t,r){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...r}):b.jsx(DM,{})}function zM(e){return null}function LM(){return zM(rn()),null}var mS=Y.memo(function({matchId:t}){const r=rn(),a=r.stores.activeMatchStoresById.get(t);a||Mr();const o=Ut(r.stores.loadedAt,u=>u),l=Ut(a,u=>u);return b.jsx(IM,{router:r,matchId:t,resetKey:o,matchState:Y.useMemo(()=>{const u=l.routeId,f=r.routesById[u].parentRoute?.id;return{routeId:u,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:f}},[l._displayPending,l.routeId,l.ssr,r.routesById])})});function IM({router:e,matchId:t,resetKey:r,matchState:a}){const o=e.routesById[a.routeId],l=o.options.pendingComponent??e.options.defaultPendingComponent,u=l?b.jsx(l,{}):null,f=o.options.errorComponent??e.options.defaultErrorComponent,h=o.options.onCatch??e.options.defaultOnCatch,d=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=a.ssr===!1||a.ssr==="data-only",g=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||p))?Y.Suspense:eo,y=f?um:eo,v=d?jM:eo;return b.jsxs(o.isRoot?o.options.shellComponent??eo:eo,{children:[b.jsx(Pc.Provider,{value:t,children:b.jsx(g,{fallback:u,children:b.jsx(y,{getResetKey:()=>r,errorComponent:f||cm,onCatch:(S,E)=>{if(Pt(S))throw S.routeId??=a.routeId,S;h?.(S,E)},children:b.jsx(v,{fallback:S=>{if(S.routeId??=a.routeId,!d||S.routeId&&S.routeId!==a.routeId||!S.routeId&&!o.isRoot)throw S;return Y.createElement(d,S)},children:p||a._displayPending?b.jsx(iM,{fallback:u,children:b.jsx(Nv,{matchId:t})}):b.jsx(Nv,{matchId:t})})})})}),a.parentRouteId===Qi?b.jsxs(b.Fragment,{children:[b.jsx(BM,{resetKey:r}),e.options.scrollRestoration&&V1?b.jsx(LM,{}):null]}):null]})}function BM({resetKey:e}){const t=rn(),r=Y.useRef(void 0);return Os(()=>{const a=t.latestLocation.href;(r.current===void 0||r.current!==a)&&(t.emit({type:"onRendered",...io(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var Nv=Y.memo(function({matchId:t}){const r=rn(),a=r.stores.activeMatchStoresById.get(t);a||Mr();const o=Ut(a,d=>d),l=o.routeId,u=r.routesById[l],f=Y.useMemo(()=>{const d=(r.routesById[l].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:l,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return d?JSON.stringify(d):void 0},[l,o.loaderDeps,o._strictParams,o._strictSearch,r.options.defaultRemountDeps,r.routesById]),h=Y.useMemo(()=>{const d=u.options.component??r.options.defaultComponent;return d?b.jsx(d,{},f):b.jsx(HM,{})},[f,u.options.component,r.options.defaultComponent]);if(o._displayPending)throw r.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw r.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const d=u.options.pendingMinMs??r.options.defaultPendingMinMs;if(d){const p=r.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const g=ho();p._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),p._nonReactive.minPendingPromise=void 0},d)}}throw r.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Pt(o.error)||Mr(),pS(r,u,o.error);if(o.status==="redirected")throw en(o.error)||Mr(),r.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error")throw o.error;return h}),HM=Y.memo(function(){const t=rn(),r=Y.useContext(Pc);let a,o=!1,l;{const d=r?t.stores.activeMatchStoresById.get(r):void 0;[a,o]=Ut(d,p=>[p?.routeId,p?.globalNotFound??!1]),l=Ut(t.stores.matchesId,p=>p[p.findIndex(g=>g===r)+1])}const u=a?t.routesById[a]:void 0,f=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(o)return u||Mr(),pS(t,u,void 0);if(!l)return null;const h=b.jsx(mS,{matchId:l});return a===Qi?b.jsx(Y.Suspense,{fallback:f,children:h}):h});function PM(){const e=rn(),t=Y.useRef({router:e,mounted:!1}),[r,a]=Y.useState(!1),o=Ut(e.stores.isLoading,g=>g),l=Ut(e.stores.hasPendingMatches,g=>g),u=Ch(o),f=o||r||l,h=Ch(f),d=o||l,p=Ch(d);return e.startTransition=g=>{a(!0),Y.startTransition(()=>{g(),a(!1)})},Y.useEffect(()=>{const g=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return hi(e.latestLocation.publicHref)!==hi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{g()}},[e,e.history]),Os(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(y){console.error(y)}})()},[e]),Os(()=>{u&&!o&&e.emit({type:"onLoad",...io(e.stores.location.state,e.stores.resolvedLocation.state)})},[u,e,o]),Os(()=>{p&&!d&&e.emit({type:"onBeforeRouteMount",...io(e.stores.location.state,e.stores.resolvedLocation.state)})},[d,p,e]),Os(()=>{if(h&&!f){const g=io(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...g}),iS(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),g.hrefChanged&&nM(e)}},[f,h,e]),null}function UM(){const e=rn(),t=e.routesById[Qi].options.pendingComponent??e.options.defaultPendingComponent,r=t?b.jsx(t,{}):null,a=b.jsxs(typeof document<"u"&&e.ssr?eo:Y.Suspense,{fallback:r,children:[b.jsx(PM,{}),b.jsx(qM,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:a}):a}function qM(){const e=rn(),t=Ut(e.stores.firstMatchId,o=>o),r=Ut(e.stores.loadedAt,o=>o),a=t?b.jsx(mS,{matchId:t}):null;return b.jsx(Pc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:b.jsx(um,{getResetKey:()=>r,errorComponent:cm,onCatch:void 0,children:a})})}function VM(){const e=rn();return Ut(e.stores.matchRouteReactivity,t=>t),Y.useCallback(t=>{const{pending:r,caseSensitive:a,fuzzy:o,includeSearch:l,...u}=t;return e.matchRoute(u,{pending:r,caseSensitive:a,fuzzy:o,includeSearch:l})},[e])}var FM=e=>({createMutableStore:Sv,createReadonlyStore:Sv,batch:iS}),YM=e=>new $M(e),$M=class extends GN{constructor(e){super(e,FM)}};function GM({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const a=b.jsx(nS.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:a}):a}function XM({router:e,...t}){return b.jsx(GM,{router:e,...t,children:b.jsx(UM,{})})}function QM(e){const r=rn();return Y.useRef(void 0),Ut(r.stores.__store,a=>a)}const wp=new Set,Lt=new WeakMap,ea=new WeakMap,gn=new WeakMap,Qs=new WeakMap,Ih=new WeakMap,js=new WeakMap,Ki=new WeakMap,fi=new WeakMap,to=new WeakSet;let Jt,dm=0,hm=0;const _r="__aa_tgt",Zs="__aa_del",Sc="__aa_new",gS=e=>{const t=JM(e);t&&t.forEach(r=>ek(r))},ZM=e=>{e.forEach(t=>{t.target===Jt&&KM(),Lt.has(t.target)&&oa(t.target)})};function yS(e){const t=e.getBoundingClientRect(),r=Jt?.clientWidth||0,a=Jt?.clientHeight||0;return t.bottom<0||t.top>a||t.right<0||t.left>r}function pm(e){const t=Qs.get(e);t?.disconnect();let r=Lt.get(e),a=0;const o=5;r||(r=po(e),Lt.set(e,r));const{offsetWidth:l,offsetHeight:u}=Jt,h=[r.top-o,l-(r.left+o+r.width),u-(r.top+o+r.height),r.left-o].map(p=>`${-1*Math.floor(p)}px`).join(" "),d=new IntersectionObserver(()=>{++a>1&&oa(e)},{root:Jt,threshold:1,rootMargin:h});d.observe(e),Qs.set(e,d)}function oa(e,t=!0){clearTimeout(fi.get(e));const r=qc(e),a=t?Ks(r)?500:r.duration:0;fi.set(e,setTimeout(async()=>{const o=gn.get(e);try{await o?.finished,Lt.set(e,po(e)),pm(e)}catch{}},a))}function KM(){clearTimeout(fi.get(Jt)),fi.set(Jt,setTimeout(()=>{wp.forEach(e=>uc(e,t=>xS(()=>oa(t))))},100))}function WM(e){setTimeout(()=>{js.set(e,setInterval(()=>xS(oa.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function xS(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let Cr;const vS=typeof window<"u"&&"ResizeObserver"in window;vS&&(Jt=document.documentElement,new MutationObserver(gS),Cr=new ResizeObserver(ZM),window.addEventListener("scroll",()=>{hm=window.scrollY,dm=window.scrollX}),Cr.observe(Jt));function JM(e){return e.reduce((a,o)=>[...a,...Array.from(o.addedNodes),...Array.from(o.removedNodes)],[]).every(a=>a.nodeName==="#comment")?!1:e.reduce((a,o)=>{if(a===!1)return!1;if(o.target instanceof Element){if(Bh(o.target),!a.has(o.target)){a.add(o.target);for(let l=0;l<o.target.children.length;l++){const u=o.target.children.item(l);if(u){if(Zs in u)return!1;Bh(o.target,u),a.add(u)}}}if(o.removedNodes.length)for(let l=0;l<o.removedNodes.length;l++){const u=o.removedNodes[l];if(Zs in u)return!1;u instanceof Element&&(a.add(u),Bh(o.target,u),ea.set(u,[o.previousSibling,o.nextSibling]))}}return a},new Set)}function Bh(e,t){!t&&!(_r in e)?Object.defineProperty(e,_r,{value:e}):t&&!(_r in t)&&Object.defineProperty(t,_r,{value:e})}function ek(e){var t,r;const a=e.isConnected,o=Lt.has(e);a&&ea.has(e)&&ea.delete(e),((t=gn.get(e))===null||t===void 0?void 0:t.playState)!=="finished"&&((r=gn.get(e))===null||r===void 0||r.cancel()),Sc in e?Mv(e):o&&a?nk(e):o&&!a?rk(e):Mv(e)}function Gn(e){return Number(e.replace(/[^0-9.\-]/g,""))}function tk(e){let t=e.parentElement;for(;t;){if(t.scrollLeft||t.scrollTop)return{x:t.scrollLeft,y:t.scrollTop};t=t.parentElement}return{x:0,y:0}}function po(e){const t=e.getBoundingClientRect(),{x:r,y:a}=tk(e);return{top:t.top+a,left:t.left+r,width:t.width,height:t.height}}function bS(e,t,r){let a=t.width,o=t.height,l=r.width,u=r.height;const f=getComputedStyle(e);if(f.getPropertyValue("box-sizing")==="content-box"){const d=Gn(f.paddingTop)+Gn(f.paddingBottom)+Gn(f.borderTopWidth)+Gn(f.borderBottomWidth),p=Gn(f.paddingLeft)+Gn(f.paddingRight)+Gn(f.borderRightWidth)+Gn(f.borderLeftWidth);a-=p,l-=p,o-=d,u-=d}return[a,l,o,u].map(Math.round)}function qc(e){return _r in e&&Ki.has(e[_r])?Ki.get(e[_r]):{duration:250,easing:"ease-in-out"}}function SS(e){if(_r in e)return e[_r]}function mm(e){const t=SS(e);return t?to.has(t):!1}function uc(e,...t){t.forEach(r=>r(e,Ki.has(e)));for(let r=0;r<e.children.length;r++){const a=e.children.item(r);a&&t.forEach(o=>o(a,Ki.has(a)))}}function gm(e){return Array.isArray(e)?e:[e]}function Ks(e){return typeof e=="function"}function nk(e){const t=Lt.get(e),r=po(e);if(!mm(e))return Lt.set(e,r);if(yS(e)){Lt.set(e,r),pm(e);return}let a;if(!t)return;const o=qc(e);if(typeof o!="function"){let l=t.left-r.left,u=t.top-r.top;const f=t.left+t.width-(r.left+r.width);t.top+t.height-(r.top+r.height)==0&&(u=0),f==0&&(l=0);const[d,p,g,y]=bS(e,t,r),v={transform:`translate(${l}px, ${u}px)`},S={transform:"translate(0, 0)"};d!==p&&(v.width=`${d}px`,S.width=`${p}px`),g!==y&&(v.height=`${g}px`,S.height=`${y}px`),a=e.animate([v,S],{duration:o.duration,easing:o.easing})}else{const[l]=gm(o(e,"remain",t,r));a=new Animation(l),a.play()}gn.set(e,a),Lt.set(e,r),a.addEventListener("finish",oa.bind(null,e,!1),{once:!0})}function Mv(e){Sc in e&&delete e[Sc];const t=po(e);Lt.set(e,t);const r=qc(e);if(!mm(e))return;if(yS(e)){pm(e);return}let a;if(typeof r!="function")a=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:r.duration*1.5,easing:"ease-in"});else{const[o]=gm(r(e,"add",t));a=new Animation(o),a.play()}gn.set(e,a),a.addEventListener("finish",oa.bind(null,e,!1),{once:!0})}function kv(e,t){var r;e.remove(),Lt.delete(e),ea.delete(e),gn.delete(e),(r=Qs.get(e))===null||r===void 0||r.disconnect(),setTimeout(()=>{if(Zs in e&&delete e[Zs],Object.defineProperty(e,Sc,{value:!0,configurable:!0}),t&&e instanceof HTMLElement)for(const a in t)e.style[a]=""},0)}function rk(e){var t;if(!ea.has(e)||!Lt.has(e))return;const[r,a]=ea.get(e);Object.defineProperty(e,Zs,{value:!0,configurable:!0});const o=window.scrollX,l=window.scrollY;if(a&&a.parentNode&&a.parentNode instanceof Element?a.parentNode.insertBefore(e,a):r&&r.parentNode?r.parentNode.appendChild(e):(t=SS(e))===null||t===void 0||t.appendChild(e),!mm(e))return kv(e);const[u,f,h,d]=ak(e),p=qc(e),g=Lt.get(e);(o!==dm||l!==hm)&&ik(e,o,l,p);let y,v={position:"absolute",top:`${u}px`,left:`${f}px`,width:`${h}px`,height:`${d}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!Ks(p))Object.assign(e.style,v),y=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:p.duration,easing:"ease-out"});else{const[S,E]=gm(p(e,"remove",g));E?.styleReset!==!1&&(v=E?.styleReset||v,Object.assign(e.style,v)),y=new Animation(S),y.play()}gn.set(e,y),y.addEventListener("finish",()=>kv(e,v),{once:!0})}function ik(e,t,r,a){const o=dm-t,l=hm-r,u=document.documentElement.style.scrollBehavior;if(getComputedStyle(Jt).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+o,window.scrollY+l),!e.parentElement)return;const h=e.parentElement;let d=h.clientHeight,p=h.clientWidth;const g=performance.now();function y(){requestAnimationFrame(()=>{if(!Ks(a)){const v=d-h.clientHeight,S=p-h.clientWidth;g+a.duration>performance.now()?(window.scrollTo({left:window.scrollX-S,top:window.scrollY-v}),d=h.clientHeight,p=h.clientWidth,y()):document.documentElement.style.scrollBehavior=u}})}y()}function ak(e){var t;const r=Lt.get(e),[a,,o]=bS(e,r,po(e));let l=e.parentElement;for(;l&&(getComputedStyle(l).position==="static"||l instanceof HTMLBodyElement);)l=l.parentElement;l||(l=document.body);const u=getComputedStyle(l),f=!gn.has(e)||((t=gn.get(e))===null||t===void 0?void 0:t.playState)==="finished"?po(l):Lt.get(l),h=Math.round(r.top-f.top)-Gn(u.borderTopWidth),d=Math.round(r.left-f.left)-Gn(u.borderLeftWidth);return[h,d,a,o]}function ok(e,t={}){if(vS&&Cr&&!(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!Ks(t)&&!t.disrespectUserMotionPreference)){to.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),uc(e,oa,WM,u=>Cr?.observe(u)),Ks(t)?Ki.set(e,t):Ki.set(e,{duration:250,easing:"ease-in-out",...t});const l=new MutationObserver(gS);l.observe(e,{childList:!0}),Ih.set(e,l),wp.add(e)}return Object.freeze({parent:e,enable:()=>{to.add(e)},disable:()=>{to.delete(e),uc(e,a=>{const o=gn.get(a);try{o?.cancel()}catch{}gn.delete(a);const l=fi.get(a);l&&clearTimeout(l),fi.delete(a);const u=js.get(a);u&&clearInterval(u),js.delete(a)})},isEnabled:()=>to.has(e),destroy:()=>{to.delete(e),wp.delete(e),Ki.delete(e);const a=Ih.get(e);a?.disconnect(),Ih.delete(e),uc(e,o=>{Cr?.unobserve(o);const l=gn.get(o);try{l?.cancel()}catch{}gn.delete(o);const u=Qs.get(o);u?.disconnect(),Qs.delete(o);const f=js.get(o);f&&clearInterval(f),js.delete(o);const h=fi.get(o);h&&clearTimeout(h),fi.delete(o),Lt.delete(o),ea.delete(o)})}})}function wS(e){const[t,r]=Y.useState(),a=Y.useMemo(()=>e,[]),o=Y.useCallback(u=>{u instanceof HTMLElement?r(ok(u,a)):r(void 0)},[a]),l=Y.useCallback(u=>{t&&(u?t.enable():t.disable())},[t]);return Y.useEffect(()=>()=>{var u;(u=t?.destroy)===null||u===void 0||u.call(t)},[t]),[o,l]}function sk(e,t){return e.isLoading?{state:"loading"}:e.isError?{state:"error",message:e.error instanceof Error?e.error.message:"Could not load performance data.",retry:t}:e.data===null?{state:"devModeOff"}:e.data===void 0?{state:"loading"}:e.data.devMode===!1?{state:"devModeOff"}:{state:"data",data:e.data}}class Vc extends Error{constructor(t,r){super(`HTTP ${t}: ${r}`),this.status=t,this.name="HttpError"}}async function yi(e){const t=await fetch(e);if(!t.ok)throw new Vc(t.status,t.statusText);const r=await t.json();if(!r.success||!r.data)throw new Error(r.error??"Unknown error");return r.data}function ES(){return gi({queryKey:["sessions"],queryFn:()=>yi("/api/v2/sessions"),refetchInterval:3e4,staleTime:25e3})}function lk(e){return gi({queryKey:["session",e],queryFn:()=>yi(`/api/v2/sessions/${e}`),enabled:!!e,refetchInterval:5e3,refetchIntervalInBackground:!1,staleTime:3e3})}function uk(e,t){return gi({queryKey:["node",e,t],queryFn:()=>yi(`/api/v2/sessions/${e}/nodes/${t}`),enabled:!!t})}function ck(){return gi({queryKey:["worktrees"],queryFn:()=>yi("/api/v2/worktrees"),refetchInterval:3e4,staleTime:2e4})}function fk(){return gi({queryKey:["workflows"],queryFn:()=>yi("/api/v2/workflows"),staleTime:1/0,refetchInterval:!1})}function dk(){const e=gi({queryKey:["perf","tool-calls"],queryFn:async()=>{try{return await yi("/api/v2/perf/tool-calls")}catch(r){if(r instanceof Vc&&r.status===404)return null;throw r}},refetchInterval:5e3,staleTime:3e3,refetchIntervalInBackground:!1});return sk(e,()=>{e.refetch()})}function hk(){const e=gi({queryKey:["perf","dev-mode-check"],queryFn:async()=>{try{return(await yi("/api/v2/perf/tool-calls?limit=1")).devMode===!0}catch(t){if(t instanceof Vc&&t.status===404)return!1;throw t}},staleTime:1/0,refetchInterval:!1,retry:!1});return e.isLoading?null:e.isError?!1:e.data??!1}function pk(e){return gi({queryKey:["workflow",e],queryFn:()=>yi(`/api/v2/workflows/${e}`),enabled:e!==null,staleTime:1/0,refetchInterval:!1})}function mk(){const e=im();Y.useEffect(()=>{let t=null,r=null;function a(){t=new EventSource("/api/v2/workspace/events"),t.onmessage=o=>{try{JSON.parse(o.data).type==="change"&&e.invalidateQueries({queryKey:["sessions"]})}catch{}},t.onerror=()=>{t?.close(),t=null,r=setTimeout(a,5e3)}}return a(),()=>{r!==null&&clearTimeout(r),t?.close()}},[e])}const gk={in_progress:{label:"In Progress",color:"var(--accent)"},dormant:{label:"Dormant",color:"var(--text-secondary)"},complete:{label:"Complete",color:"var(--success)"},complete_with_gaps:{label:"Gaps",color:"var(--warning)"},blocked:{label:"Blocked",color:"var(--blocked)"}};function CS({status:e}){const t=gk[e];return b.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:`color-mix(in srgb, ${t.color} 12%, transparent)`,color:t.color},children:t.label})}function _S({health:e}){return e==="healthy"?null:b.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:"var(--error)20",color:"var(--error)"},children:"Corrupt"})}function wo(e){const t=Date.now()-e;if(t<0)return"just now";const r=Math.floor(t/1e3);if(r<60)return"just now";const a=Math.floor(r/60);if(a<60)return`${a}m ago`;const o=Math.floor(a/60);if(o<24)return`${o}h ago`;const l=Math.floor(o/24);if(l<7)return`${l}d ago`;const u=Math.floor(l/7);return u<5?`${u}w ago`:`${Math.floor(l/30)}mo ago`}const wc={in_progress:0,blocked:1,dormant:2,complete_with_gaps:3,complete:4},Ep=[{value:"recent",label:"Recent",compareFn:(e,t)=>t.lastModifiedMs-e.lastModifiedMs},{value:"status",label:"Status",compareFn:(e,t)=>wc[e.status]-wc[t.status]||t.lastModifiedMs-e.lastModifiedMs},{value:"workflow",label:"Workflow",compareFn:(e,t)=>(e.workflowName??e.workflowId??"").localeCompare(t.workflowName??t.workflowId??"")||t.lastModifiedMs-e.lastModifiedMs},{value:"nodes",label:"Node count",compareFn:(e,t)=>t.nodeCount-e.nodeCount||t.lastModifiedMs-e.lastModifiedMs}],Cp=[{value:"none",label:"No grouping",keyFn:null},{value:"workflow",label:"Workflow",keyFn:e=>e.workflowName??e.workflowId??"Unknown workflow"},{value:"status",label:"Status",keyFn:e=>e.status,groupCompareFn:(e,t)=>(wc[e]??99)-(wc[t]??99)},{value:"branch",label:"Branch",keyFn:e=>e.gitBranch??"No branch"}],yk=[{value:"all",label:"All"},{value:"in_progress",label:"In Progress"},{value:"dormant",label:"Dormant"},{value:"complete",label:"Complete"},{value:"complete_with_gaps",label:"Gaps"},{value:"blocked",label:"Blocked"}],ao=25;function xk(e,t,r,a){let o=[...e];if(r!=="all"&&(o=o.filter(l=>l.status===r)),a!==null&&(o=o.filter(l=>l.repoRoot===a||l.repoRoot===null)),t.trim()){const l=t.toLowerCase();o=o.filter(u=>(u.sessionTitle??"").toLowerCase().includes(l)||(u.workflowName??"").toLowerCase().includes(l)||(u.workflowId??"").toLowerCase().includes(l)||u.sessionId.toLowerCase().includes(l)||(u.gitBranch??"").toLowerCase().includes(l))}return o}function vk(e,t){const r=Ep.find(a=>a.value===t)??Ep[0];return[...e].sort(r.compareFn)}function bk(e,t){const r=Cp.find(l=>l.value===t)??Cp[0];if(!r.keyFn)return[{label:"",sessions:e}];const a=new Map;for(const l of e){const u=r.keyFn(l),f=a.get(u)??[];f.push(l),a.set(u,f)}const o=r.groupCompareFn??((l,u)=>l.localeCompare(u));return Array.from(a.entries()).sort(([l],[u])=>o(l,u)).map(([l,u])=>({label:l,sessions:u}))}function Sk(e,t){const[r,a]=Y.useState(e),o=Y.useRef(null);return Y.useEffect(()=>(o.current!==null&&clearTimeout(o.current),o.current=setTimeout(()=>a(e),t),()=>{o.current!==null&&clearTimeout(o.current)}),[e,t]),r}function wk({onSelectSession:e,initialSearch:t="",initialRepoRoot:r=null}){const{data:a,isLoading:o,error:l}=ES(),[u,f]=Y.useState(t),[h]=Y.useState(r),[d,p]=Y.useState("recent"),[g,y]=Y.useState("none"),[v,S]=Y.useState("all"),[E,N]=Y.useState(0),w=Sk(u,200),O=Y.useCallback(P=>{f(P),N(0)},[]),_=Y.useCallback(P=>{p(P),N(0)},[]),M=Y.useCallback(P=>{y(P),N(0)},[]),B=Y.useCallback(P=>{S(P),N(0)},[]),k=Y.useMemo(()=>{if(!a)return{groups:[],total:0,filtered:0};const P=xk(a.sessions,w,v,h),K=vk(P,d);return{groups:bk(K,g),total:a.sessions.length,filtered:P.length}},[a,w,v,h,d,g]),D=Y.useMemo(()=>{if(!a)return{};const P={all:a.sessions.length};for(const K of a.sessions)P[K.status]=(P[K.status]??0)+1;return P},[a]);if(o)return b.jsx("div",{className:"flex items-center justify-center py-20",children:b.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading sessions..."})});if(l)return b.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load sessions: ",l.message]});if(!a||a.sessions.length===0)return b.jsxs("div",{className:"text-center py-16",children:[b.jsx("p",{className:"text-[var(--text-secondary)] text-lg",children:"No v2 sessions found"}),b.jsx("p",{className:"text-[var(--text-muted)] text-sm mt-2",children:"Sessions will appear here when workflows are executed with v2 tools enabled."})]});const U=g!=="none",H=E*ao,q=H+ao,L=Math.ceil(k.filtered/ao);return b.jsxs("div",{className:"space-y-4",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("h2",{className:"text-lg font-medium text-[var(--text-primary)]",children:["Sessions",b.jsx("span",{className:"text-[var(--text-muted)] font-normal ml-2 text-sm",children:k.filtered===k.total?k.total:`${k.filtered} / ${k.total}`})]})}),b.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[b.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-[360px]",children:[b.jsx("input",{type:"text",value:u,onChange:P=>O(P.target.value),placeholder:"Search sessions...",className:"w-full bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-3 py-1.5 text-sm text-[var(--text-primary)] placeholder-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)] transition-colors"}),u&&b.jsx("button",{onClick:()=>O(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-xs",children:"clear"})]}),b.jsx(Tv,{label:"Sort",value:d,options:Ep,onChange:_}),b.jsx(Tv,{label:"Group",value:g,options:Cp,onChange:M})]}),b.jsx("div",{className:"flex flex-wrap gap-1.5",children:yk.map(P=>{const K=D[P.value]??0;if(P.value!=="all"&&K===0)return null;const I=v===P.value;return b.jsxs("button",{onClick:()=>B(P.value),className:`px-2.5 py-1 rounded-full text-xs font-medium transition-colors cursor-pointer ${I?"bg-[var(--accent)] text-white":"bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-card)] hover:text-[var(--text-primary)]"}`,children:[P.label,b.jsx("span",{className:"ml-1 opacity-70",children:K})]},P.value)})}),k.filtered===0?b.jsx("div",{className:"text-center py-12 text-[var(--text-muted)] text-sm",children:"No sessions match the current filters"}):U?b.jsx("div",{className:"space-y-6",children:k.groups.map(P=>b.jsx(Ek,{label:P.label,sessions:P.sessions,sort:d,statusFilter:v,onSelectSession:e},P.label+"-"+d+"-"+v))}):b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"space-y-2",children:k.groups[0]?.sessions.slice(H,q).map(P=>b.jsx(MS,{session:P,onClick:()=>e(P.sessionId)},P.sessionId))}),L>1&&b.jsx(NS,{page:E,totalPages:L,onPageChange:N})]})]})}function Tv({label:e,value:t,options:r,onChange:a}){return b.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-[var(--text-muted)]",children:[e,b.jsx("select",{value:t,onChange:o=>a(o.target.value),className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-2 py-1.5 text-xs text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent)] cursor-pointer",children:r.map(o=>b.jsx("option",{value:o.value,children:o.label},o.value))})]})}function Ek({label:e,sessions:t,sort:r,statusFilter:a,onSelectSession:o}){const[l,u]=Y.useState(!1),[f,h]=Y.useState(0);Y.useEffect(()=>h(0),[t.length]);const d=Math.ceil(t.length/ao),p=f*ao,g=p+ao,y=t.slice(p,g);return b.jsxs("div",{children:[b.jsxs("button",{onClick:()=>u(!l),className:"flex items-center gap-2 mb-2 cursor-pointer group",children:[b.jsx("span",{className:"text-[var(--text-muted)] text-xs transition-transform duration-150",style:{transform:l?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),b.jsx("span",{className:"text-sm font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors",children:e}),b.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",t.length,")"]})]}),!l&&b.jsxs("div",{className:"ml-4",children:[b.jsx("div",{className:"space-y-2",children:y.map(v=>b.jsx(MS,{session:v,onClick:()=>o(v.sessionId)},v.sessionId))}),d>1&&b.jsx("div",{className:"mt-2",children:b.jsx(NS,{page:f,totalPages:d,onPageChange:h})})]})]})}function NS({page:e,totalPages:t,onPageChange:r}){return b.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[b.jsx("button",{onClick:()=>r(e-1),disabled:e===0,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Prev"}),b.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[e+1," / ",t]}),b.jsx("button",{onClick:()=>r(e+1),disabled:e>=t-1,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Next"})]})}function MS({session:e,onClick:t}){const r=e.sessionTitle,a=e.workflowName??e.workflowId,o=wo(e.lastModifiedMs);return b.jsxs("button",{onClick:t,className:"w-full text-left bg-[var(--bg-card)] border border-[var(--border)] rounded-lg px-4 py-3 hover:border-[var(--accent)] transition-colors cursor-pointer group",children:[b.jsxs("div",{className:"flex items-start justify-between gap-3",children:[b.jsx("div",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"text-sm font-medium text-[var(--text-primary)] line-clamp-1 group-hover:text-[var(--accent)] transition-colors",children:r??a??"Unnamed session"})}),b.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums",children:o}),b.jsx(_S,{health:e.health}),b.jsx(CS,{status:e.status})]})]}),b.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[r&&a&&b.jsx(Yu,{children:a}),e.gitBranch&&b.jsx(Yu,{icon:"branch",children:e.gitBranch}),b.jsxs(Yu,{icon:"graph",children:[e.nodeCount,"N / ",e.edgeCount,"E"]}),e.tipCount>1&&b.jsxs(Yu,{icon:"fork",children:[e.tipCount," tips"]}),e.hasUnresolvedGaps&&b.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] text-[var(--warning)]",children:"⚠ gaps"})]}),b.jsx("div",{className:"mt-1.5 font-mono text-[10px] text-[var(--text-muted)] opacity-60 group-hover:opacity-100 transition-opacity truncate",children:e.sessionId})]})}const Ck={branch:b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:b.jsx("path",{d:"M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.5 2.5 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Z"})}),graph:b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:b.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.5 2.5 0 0 1 2 11.5Z"})}),fork:b.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:b.jsx("path",{d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm2.122-.75a2.25 2.25 0 1 0-3.244 0A2.5 2.5 0 0 0 2 5v5.5A2.5 2.5 0 0 0 4.5 13h3.25a.75.75 0 0 0 0-1.5H4.5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v5.5a1 1 0 0 1-1 1H8.75Z"})})};function Yu({children:e,icon:t}){return b.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-[var(--bg-secondary)] text-[10px] text-[var(--text-muted)] max-w-[200px] truncate",children:[t&&Ck[t],e]})}const _k=720*60*60*1e3,Av={in_progress:0,dormant:0,blocked:1,complete_with_gaps:2,complete:3};function Nk(e){if(e.length!==0)return[...e].sort((t,r)=>{const a=Av[t.status]-Av[r.status];return a!==0?a:r.lastModifiedMs-t.lastModifiedMs})[0]}function Mk(e,t,r){const a=e.primarySession?.status;if(a==="in_progress"||a==="dormant"||a==="blocked")return"visible";const o=(e.worktree?.changedCount??0)>0,l=(e.worktree?.aheadCount??0)>0;return o||l||r-e.activityMs<_k||t==="all"?"visible":"hidden"}function Rv(e){switch(e.primarySession?.status){case"in_progress":return 0;case"blocked":return 1;case"dormant":return 2;default:return(e.worktree?.changedCount??0)>0||(e.worktree?.aheadCount??0)>0?3:4}}function kk(e,t,r){return[...e].filter(a=>Mk(a,t,r)==="visible").sort((a,o)=>{const l=Rv(a)-Rv(o);return l!==0?l:o.activityMs-a.activityMs})}function Tk(e,t){const r=new Map;for(const h of t)for(const d of h.worktrees)d.branch!==null&&r.set(`${d.branch}\0${h.repoRoot}`,{wt:d,repoName:h.repoName});const a=new Map;for(const h of t)for(const d of h.worktrees)a.set(d.path,h.repoRoot);const o=new Map;for(const h of e){if(h.repoRoot===null||h.gitBranch===null)continue;const d=a.get(h.repoRoot)??h.repoRoot,p=`${h.gitBranch}\0${d}`,g=o.get(p);g?g.push(h):o.set(p,[h])}const l=new Map;for(const h of t)l.set(h.repoRoot,h.repoName);const u=[],f=new Set;for(const[h,d]of o){const[p,g]=h.split("\0"),y=r.get(h),v=Nk(d),S=Math.max(v?.lastModifiedMs??0,y?.wt.headTimestampMs??0),E=y?.repoName??l.get(g)??g.split("/").at(-1)??g;u.push({branch:p,repoRoot:g,repoName:E,worktree:y?.wt,primarySession:v,allSessions:d,activityMs:S}),f.add(h)}for(const[h,{wt:d,repoName:p}]of r){if(f.has(h))continue;const[g,y]=h.split("\0");u.push({branch:g,repoRoot:y,repoName:p,worktree:d,primarySession:void 0,allSessions:[],activityMs:d.headTimestampMs})}return u}function Ak(e){return e.reduce((t,r)=>{const a=r.primarySession?.status;return a==="blocked"||a==="dormant"?t+1:t},0)}const Rk={blocked:"var(--blocked)",dormant:"var(--text-muted)",complete_with_gaps:"var(--warning)",in_progress:"var(--accent)",complete:"var(--success)"},Ov={in_progress:"In progress",dormant:"Dormant",blocked:"Blocked",complete_with_gaps:"Complete with gaps",complete:"Complete"},kS=[{workflow:"coding task workflow",task:"add a dark mode toggle to the settings page"},{workflow:"coding task workflow",task:"write tests for the authentication module"},{workflow:"coding task workflow",task:"refactor the data layer to use a repository pattern"},{workflow:"coding task workflow",task:"add pagination to the search results view"},{workflow:"bug investigation workflow",task:"find why the API returns 500 on logout"},{workflow:"bug investigation workflow",task:"trace why notifications stop sending after 24 hours"},{workflow:"bug investigation workflow",task:"figure out why the build is failing on CI but not locally"},{workflow:"MR review workflow",task:"review my latest changes on this branch"},{workflow:"MR review workflow",task:"review PR #123 before it merges"}],Hh=["The DAG view shows every node the agent created, including blocked attempts and alternative paths.","Dormant sessions have been idle for 3 days -- return to the original conversation to resume.","Gaps are open questions the agent flagged but could not resolve. Check them in the node detail panel.","The preferred tip node (highlighted in yellow in the DAG) is the most recent forward position.","Complete with gaps means the workflow finished but left critical follow-ups unresolved.","The tip count badge shows how many execution paths a session explored.","Use j and k to navigate between branches, Enter to expand, and / to open the full session archive."];function Ok(e){return e[Math.floor(Math.random()*e.length)]}function jk(e){return e.replace(/^#{1,6}\s+/gm,"").replace(/\*{1,3}([^*\n]+)\*{1,3}/g,"$1").replace(/^[-*+]\s+/gm,"").replace(/`([^`]+)`/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\n+/g," ").replace(/\s{2,}/g," ").trim()}function Dk(e,t=220){const r=jk(e);if(r.length<=t)return r;const a=r.lastIndexOf(" ",t);return r.slice(0,a>0?a:t)+"…"}function zk({hidden:e=!1}){const t=Uc(),{data:r,isLoading:a,error:o,refetch:l}=ES(),{data:u,isFetching:f}=ck();mk();const[h,d]=Y.useState("active"),[p,g]=Y.useState(-1),[y,v]=Y.useState(!1),[S,E]=Y.useState(null),N=Y.useRef(0),w=Y.useRef(!0),O=Y.useRef(new Map),_=Y.useCallback(q=>{N.current=window.scrollY,t({to:"/session/$sessionId",params:{sessionId:q}})},[t]);Y.useEffect(()=>{if(w.current){w.current=!1;return}if(!e){const q=requestAnimationFrame(()=>{window.scrollTo({top:N.current})});return()=>cancelAnimationFrame(q)}},[e]);const{repoGroups:M,orderedItems:B,needsAttentionCount:k,archiveRepos:D}=Y.useMemo(()=>{const q=Date.now(),L={repoGroups:[],orderedItems:[],needsAttentionCount:0,archiveRepos:[]};if(!r)return L;const P=u?.repos??[],K=Tk(r.sessions,P),I=new Map;for(const Z of K)I.has(Z.repoRoot)||I.set(Z.repoRoot,Z.repoName);const V=y?K.filter(Z=>{const A=Z.primarySession?.status;return A==="blocked"||A==="dormant"}):K,j=new Map;for(const Z of V){const A=j.get(Z.repoRoot);A?A.push(Z):j.set(Z.repoRoot,[Z])}const F=[...j.entries()].map(([Z,A])=>({repoRoot:Z,repoName:A[0].repoName,sortedItems:kk(A,h,q)})).filter(Z=>Z.sortedItems.length>0).sort((Z,A)=>{const z=Z.sortedItems.some(R=>R.primarySession?.status==="in_progress"||R.primarySession?.status==="blocked")?0:1,$=A.sortedItems.some(R=>R.primarySession?.status==="in_progress"||R.primarySession?.status==="blocked")?0:1;return z!==$?z-$:Z.repoName.localeCompare(A.repoName)}),X=F.flatMap(Z=>Z.sortedItems);return{repoGroups:F,orderedItems:X,needsAttentionCount:Ak(K),archiveRepos:[...I.entries()]}},[r,u,h,y]);Y.useEffect(()=>{g(-1)},[B.length]);const U=Y.useCallback(()=>{v(q=>{const L=!q;return d(L?"all":"active"),L})},[]);Xk({items:B,focusedIndex:p,setFocusedIndex:g,onSelectSession:_,scope:h,setScope:d,refetch:l,archive:S,setArchive:E,disabled:e});const H=(r?.totalCount??0)>0;return a?b.jsx("div",{className:`flex items-center justify-center py-32 ${e?"hidden":""}`,children:b.jsx("div",{className:"text-[var(--text-muted)] text-sm",children:"Loading workspace..."})}):o?b.jsxs("div",{className:`text-[var(--error)] bg-[var(--bg-card)] border border-[var(--border)] rounded-lg p-4 text-sm ${e?"hidden":""}`,children:["Failed to load workspace: ",o.message]}):S!==null?b.jsxs("div",{className:`space-y-4 ${e?"hidden":""}`,children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:()=>E(null),className:"text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors text-sm",children:"← Back to Workspace"}),S.repoName&&b.jsx("span",{className:"text-sm text-[var(--text-muted)] font-mono",children:S.repoName})]}),b.jsx(wk,{onSelectSession:_,initialRepoRoot:S.repoRoot??null})]}):b.jsxs("div",{className:`space-y-5 ${e?"hidden":""}`,children:[H?b.jsxs(b.Fragment,{children:[k>0&&b.jsx(Yk,{count:k,active:y,onFocusAttention:U}),b.jsx(Fk,{scope:h,onChange:d}),M.length===0?b.jsx("div",{className:"text-sm text-[var(--text-muted)] py-8 text-center",children:"No branches match the current filter."}):b.jsx("div",{className:"space-y-6",children:M.map((q,L)=>{const P=M.slice(0,L).reduce((K,I)=>K+I.sortedItems.length,0);return b.jsx(Lk,{group:q,showHeader:M.length>1,focusedIndex:p,groupOffset:P,worktreesFetching:f,onSelectSession:_,expandStateRef:O},q.repoRoot)})}),b.jsx($k,{repos:D,onOpen:(q,L)=>E({repoName:q,repoRoot:L})})]}):b.jsxs(b.Fragment,{children:[b.jsx(Gk,{prompt:Ok(kS)}),b.jsx(Dv,{})]}),b.jsx(Dv,{})]})}const jv=12;function Lk({group:e,showHeader:t,focusedIndex:r,groupOffset:a,worktreesFetching:o,onSelectSession:l,expandStateRef:u}){const[f,h]=Y.useState(!1),d=f?e.sortedItems:e.sortedItems.slice(0,jv),p=e.sortedItems.length-jv,g=e.sortedItems.filter(v=>v.primarySession?.status==="in_progress"||v.primarySession?.status==="blocked").length,y=e.sortedItems.filter(v=>(v.worktree?.changedCount??0)>0).length;return b.jsxs("section",{children:[t&&b.jsxs("div",{style:{position:"sticky",top:"var(--app-header-height)",zIndex:10},className:"flex items-center gap-2 border-b border-[var(--border)] pb-2 mb-2 bg-[var(--bg-primary)]",children:[b.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] font-mono",children:e.repoName}),g>0&&b.jsxs("span",{className:"text-xs font-medium text-[var(--accent)]",children:["● ",g," active"]}),y>0&&b.jsxs("span",{className:"text-xs font-medium text-orange-400",children:["· ",y," uncommitted"]})]}),b.jsxs("div",{className:"space-y-px",children:[d.map((v,S)=>{const E=a+S,N=r===E;if(v.allSessions.length===0)return b.jsx(Pk,{item:v,isFocused:N,worktreesFetching:o,expandStateRef:u},`${v.branch}\0${v.repoRoot}`);if(v.allSessions.length>1)return b.jsx(Bk,{item:v,isFocused:N,worktreesFetching:o,onSelectSession:l,expandStateRef:u},`${v.branch}\0${v.repoRoot}`);const w=v.allSessions[0];return b.jsx("div",{className:N?"ring-2 ring-[var(--accent)] ring-offset-1 rounded":"",children:b.jsx(_p,{session:w,item:v,showBranch:!0,onSelect:()=>l(w.sessionId)})},`${v.branch}\0${v.repoRoot}`)}),!f&&p>0&&b.jsxs("button",{type:"button",onClick:()=>h(!0),className:"w-full text-left px-3 py-2 text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:["show ",p," more ",p===1?"branch":"branches"," →"]})]})]})}const Ik=(e,t)=>{const r=o=>o.status==="in_progress"||o.status==="dormant"?0:o.status==="blocked"?1:2,a=r(e)-r(t);return a!==0?a:t.lastModifiedMs-e.lastModifiedMs};function Bk({item:e,isFocused:t,worktreesFetching:r,onSelectSession:a,expandStateRef:o}){const l=`${e.branch}\0${e.repoRoot}`,u=()=>o.current?.get(l)??{filesExpanded:!1,unpushedExpanded:!1},[f,h]=Y.useState(!1),[d,p]=Y.useState(()=>u().filesExpanded),[g,y]=Y.useState(()=>u().unpushedExpanded),[v]=wS(),S=[...e.allSessions].sort(Ik),E=Y.useCallback(()=>{p(_=>{const M=!_,B=o.current?.get(l)??{filesExpanded:!1,unpushedExpanded:!1};return o.current?.set(l,{...B,filesExpanded:M}),M})},[l,o]),N=Y.useCallback(()=>{y(_=>{const M=!_,B=o.current?.get(l)??{filesExpanded:!1,unpushedExpanded:!1};return o.current?.set(l,{...B,unpushedExpanded:M}),M})},[l,o]),w=S.filter(_=>_.status==="in_progress"||_.status==="blocked"||_.status==="dormant"),O=S.filter(_=>_.status!=="in_progress"&&_.status!=="blocked"&&_.status!=="dormant");return b.jsxs("div",{ref:v,className:t?"ring-2 ring-[var(--accent)] ring-offset-1 rounded":"",children:[b.jsx(Hk,{item:e,worktreesFetching:r,filesExpanded:d,onToggleFiles:E,unpushedExpanded:g,onToggleUnpushed:N}),d&&e.worktree&&e.worktree.changedFiles.length>0&&b.jsx(AS,{files:e.worktree.changedFiles}),g&&e.worktree&&b.jsx(RS,{commits:e.worktree.unpushedCommits,count:e.worktree.aheadCount}),w.map(_=>b.jsx(_p,{session:_,showBranch:!1,onSelect:()=>a(_.sessionId)},_.sessionId)),O.length>0&&b.jsxs(b.Fragment,{children:[f&&O.map(_=>b.jsx(_p,{session:_,showBranch:!1,onSelect:()=>a(_.sessionId)},_.sessionId)),b.jsx("button",{type:"button",onClick:()=>h(_=>!_),className:"w-full text-left px-3 py-1.5 text-[10px] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:f?"hide history ▴":`${O.length} completed workflow${O.length!==1?"s":""} ▾`})]})]})}function _p({session:e,item:t,showBranch:r,onSelect:a}){const o=Rk[e.status],l=e.status==="dormant",u=e.workflowName??e.workflowId??null,f=wo(e.lastModifiedMs),h=e.sessionTitle?.trim()||u||e.sessionId.slice(0,8),d=e.recapSnippet&&!e.sessionTitle?Dk(e.recapSnippet,100):null;return b.jsxs("button",{type:"button",onClick:a,className:"w-full text-left flex items-start gap-3 px-3 py-2.5 rounded hover:bg-[var(--bg-card)] transition-colors group",children:[l?b.jsx("div",{className:"w-1.5 h-1.5 rounded-full shrink-0 mt-[3px] border-2 bg-transparent",style:{borderColor:o},title:Ov.dormant}):b.jsx("div",{className:"w-1.5 h-1.5 rounded-full shrink-0 mt-[3px]",style:{backgroundColor:o},title:Ov[e.status]}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("p",{className:"text-sm text-[var(--text-primary)] group-hover:text-[var(--accent)] transition-colors leading-snug mb-0.5 max-w-prose line-clamp-2",children:h}),b.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r&&t&&b.jsx("span",{className:"font-mono text-xs text-[var(--text-muted)] truncate flex-1",children:t.branch}),r&&t?.worktree?.isMerged&&t.worktree.branch!==null&&t.worktree.branch!=="main"&&b.jsx(ym,{}),!r&&u&&b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] shrink-0",children:u}),e.hasUnresolvedGaps&&b.jsx("span",{title:"Unresolved gaps",className:"text-[10px] text-[var(--warning)] shrink-0",children:"⚠"}),b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums shrink-0 ml-auto",children:f})]}),d&&b.jsx("p",{className:"text-xs text-[var(--text-muted)] truncate leading-snug",children:d})]})]})}function Hk({item:e,worktreesFetching:t,filesExpanded:r,onToggleFiles:a,unpushedExpanded:o,onToggleUnpushed:l}){const u=wo(e.activityMs);return b.jsxs("div",{className:"flex items-center gap-2 px-3 pt-2 pb-1",children:[b.jsx("span",{className:"font-mono text-xs font-medium text-[var(--text-secondary)] truncate flex-1",children:e.branch}),e.worktree?.isMerged&&e.worktree.branch!==null&&e.worktree.branch!=="main"&&b.jsx(ym,{}),b.jsx(TS,{item:e,fetching:t,compact:!0,filesExpanded:r,onToggleFiles:a,unpushedExpanded:o,onToggleUnpushed:l}),b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums shrink-0",children:u})]})}function Pk({item:e,isFocused:t,worktreesFetching:r,expandStateRef:a}){const o=`${e.branch}\0${e.repoRoot}`,l=()=>a.current?.get(o)??{filesExpanded:!1,unpushedExpanded:!1},[u,f]=Y.useState(()=>l().filesExpanded),[h,d]=Y.useState(()=>l().unpushedExpanded),[p]=wS(),g=wo(e.activityMs),y=Y.useCallback(()=>{f(S=>{const E=!S,N=a.current?.get(o)??{filesExpanded:!1,unpushedExpanded:!1};return a.current?.set(o,{...N,filesExpanded:E}),E})},[o,a]),v=Y.useCallback(()=>{d(S=>{const E=!S,N=a.current?.get(o)??{filesExpanded:!1,unpushedExpanded:!1};return a.current?.set(o,{...N,unpushedExpanded:E}),E})},[o,a]);return b.jsxs("div",{ref:p,children:[b.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 rounded ${t?"ring-2 ring-[var(--accent)] ring-offset-1":""}`,children:[b.jsx("div",{className:"w-1.5 h-1.5 rounded-full shrink-0 bg-[var(--border)]",title:"No sessions"}),b.jsx("span",{className:"font-mono text-xs text-[var(--text-muted)] truncate flex-1",children:e.branch}),e.worktree?.isMerged&&e.worktree.branch!==null&&e.worktree.branch!=="main"&&b.jsx(ym,{}),b.jsx(TS,{item:e,fetching:r,compact:!0,filesExpanded:u,onToggleFiles:y,unpushedExpanded:h,onToggleUnpushed:v}),e.worktree?.headMessage&&b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] truncate hidden sm:block max-w-[200px] opacity-60",children:e.worktree.headMessage}),b.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums shrink-0",children:g})]}),u&&e.worktree&&e.worktree.changedFiles.length>0&&b.jsx(AS,{files:e.worktree.changedFiles}),h&&e.worktree&&b.jsx(RS,{commits:e.worktree.unpushedCommits,count:e.worktree.aheadCount})]})}function TS({item:e,fetching:t,compact:r=!1,filesExpanded:a,onToggleFiles:o,unpushedExpanded:l,onToggleUnpushed:u}){if(t&&e.worktree===void 0)return b.jsx("span",{className:"flex gap-1",children:b.jsx(Vk,{})});const f=e.worktree;if(!f)return null;const h=f.changedCount,d=f.aheadCount;if(h===0&&d===0)return null;const p=`text-xs px-1.5 py-0.5 rounded bg-orange-500/10 text-orange-400 border border-orange-500/20 tabular-nums${r?" text-[10px]":""}`;return b.jsxs("span",{className:"flex items-center gap-1",children:[h>0&&(o?b.jsxs("button",{type:"button","aria-expanded":a??!1,"aria-label":`Show ${h} uncommitted file${h===1?"":"s"}`,title:`${h} file${h===1?"":"s"} edited but not yet committed — click to expand`,onClick:o,className:`${p} cursor-pointer hover:bg-orange-500/20 transition-colors focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-1${a?" ring-1 ring-orange-500/40":""}`,children:[h," uncommitted"]}):b.jsxs("span",{title:`${h} file${h===1?"":"s"} edited but not yet committed`,className:p,children:[h," uncommitted"]})),d>0&&(u?b.jsxs("button",{type:"button","aria-expanded":l??!1,"aria-label":`Show ${d} unpushed commit${d===1?"":"s"}`,title:`${d} commit${d===1?"":"s"} not yet pushed -- click to expand`,onClick:u,className:`text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400 border border-blue-500/20 cursor-pointer hover:bg-blue-500/20 transition-colors focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-1 tabular-nums${r?" text-[10px]":""}${l?" ring-1 ring-blue-500/40":""}`,children:[d," unpushed"]}):b.jsxs("span",{title:`${d} commit${d===1?"":"s"} not yet pushed`,className:`text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400 border border-blue-500/20 tabular-nums${r?" text-[10px]":""}`,children:[d," unpushed"]}))]})}const Uk={modified:"var(--warning)",added:"var(--success)",deleted:"var(--error)",untracked:"#a0a0a0",renamed:"var(--accent)",other:"#a0a0a0"},qk={modified:"M",added:"A",deleted:"D",untracked:"?",renamed:"R",other:"~"};function AS({files:e}){return b.jsx("div",{className:"mx-3 mb-1 max-h-48 overflow-y-auto rounded border border-[var(--border)] bg-[var(--bg-card)]",children:e.map((t,r)=>b.jsxs("div",{className:"flex items-center gap-2 px-2 py-0.5 hover:bg-[var(--bg-tertiary)]",children:[b.jsx("span",{className:"text-[10px] font-mono font-semibold w-3 shrink-0 tabular-nums",style:{color:Uk[t.status]},title:t.status,children:qk[t.status]}),b.jsx("span",{className:"font-mono text-[11px] text-[var(--text-secondary)] truncate",children:t.path})]},r))})}function RS({commits:e,count:t}){return e.length===0?b.jsx("div",{className:"mx-3 mb-1 px-2 py-1.5 rounded border border-[var(--border)] bg-[var(--bg-card)]",children:b.jsx("span",{className:"text-[11px] text-[var(--text-muted)] italic",children:t!==void 0&&t>0?`${t} commit${t===1?"":"s"} ahead -- details unavailable`:"No unpushed commits"})}):b.jsx("div",{className:"mx-3 mb-1 max-h-48 overflow-y-auto rounded border border-[var(--border)] bg-[var(--bg-card)]",children:e.map((r,a)=>b.jsxs("div",{className:"flex items-center gap-2 px-2 py-0.5 hover:bg-[var(--bg-tertiary)]",children:[b.jsx("span",{className:"font-mono text-[10px] text-[var(--text-muted)] shrink-0 tabular-nums w-14",children:r.hash}),b.jsx("span",{className:"font-mono text-[11px] text-[var(--text-secondary)] truncate",children:r.message})]},a))})}function ym(){return b.jsx("span",{title:"Merged into main",className:"text-[10px] px-1.5 py-0.5 rounded bg-green-500/10 text-green-400 border border-green-500/20 shrink-0",children:"merged"})}function Vk(){return b.jsx("span",{className:"inline-block h-5 w-20 rounded bg-[var(--bg-tertiary)] animate-pulse"})}function Fk({scope:e,onChange:t}){return b.jsx("div",{className:"flex items-center gap-1",children:["active","all"].map(r=>b.jsx("button",{type:"button",onClick:()=>t(r),className:`px-3 py-1 rounded-full text-xs font-medium transition-colors capitalize ${e===r?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:r==="active"?"Active":"All"},r))})}function Yk({count:e,active:t,onFocusAttention:r}){return b.jsxs("button",{type:"button",onClick:r,className:`w-full flex items-center gap-3 bg-[var(--bg-card)] border rounded-lg px-4 py-2.5 overflow-hidden text-left transition-colors hover:border-[var(--blocked)] ${t?"border-[var(--blocked)]":"border-[var(--border)]"}`,style:{borderLeftColor:"var(--blocked)",borderLeftWidth:"3px"},title:t?"Click to show all branches":"Click to focus on sessions needing attention",children:[b.jsxs("span",{className:"text-sm font-medium",style:{color:"var(--blocked)"},children:[e," session",e!==1?"s":""," ",e!==1?"need":"needs"," attention"]}),b.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t?"-- click to clear filter":"-- click to focus"})]})}function $k({repos:e,onOpen:t}){return b.jsxs("div",{className:"flex flex-col gap-1 pt-2 border-t border-[var(--border)]",children:[e.map(([r,a])=>b.jsxs("button",{type:"button",onClick:()=>t(a,r),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors text-left",children:["All ",a," sessions →"]},r)),e.length!==1&&b.jsx("button",{type:"button",onClick:()=>t(void 0,void 0),className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors text-left",children:"All sessions →"})]})}function Gk({prompt:e}){return b.jsxs("div",{className:"flex flex-col items-center gap-8 py-20 text-center",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)] mb-3",children:"Ready when you are"}),b.jsx("p",{className:"text-sm text-[var(--text-muted)] max-w-sm leading-relaxed",children:"Sessions appear here when your agent runs a workflow. Start one by telling your agent:"})]}),b.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] rounded-xl px-6 py-5 max-w-lg w-full text-left",children:[b.jsx("p",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wider mb-2",children:"Try this prompt"}),b.jsxs("p",{className:"text-[var(--text-primary)] text-sm leading-relaxed",children:['"Use the'," ",b.jsx("span",{className:"text-[var(--accent)] font-medium",children:e.workflow})," ","to ",e.task,'"']})]}),b.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["Prompts rotate each visit -- there are ",kS.length," to discover."]})]})}function Dv(){const[e,t]=Y.useState(()=>Math.floor(Math.random()*Hh.length)),[r,a]=Y.useState(!1);return Y.useEffect(()=>{let o=null;const l=setInterval(()=>{a(!0),o=setTimeout(()=>{t(u=>(u+1)%Hh.length),a(!1),o=null},300)},6e4);return()=>{clearInterval(l),o!==null&&clearTimeout(o)}},[]),b.jsxs("div",{className:"flex items-start gap-3 bg-[var(--bg-card)] border border-[var(--border)] rounded-lg px-4 py-3",children:[b.jsx("div",{className:"w-0.5 shrink-0 self-stretch rounded-full",style:{backgroundColor:"var(--accent)"}}),b.jsxs("div",{style:{opacity:r?0:1,transition:"opacity 300ms"},children:[b.jsx("span",{className:"text-[10px] font-semibold text-[var(--accent)] uppercase tracking-widest",children:"Tip"}),b.jsx("p",{className:"text-sm text-[var(--text-secondary)] mt-1 leading-relaxed",children:Hh[e]})]})]})}function Xk({items:e,focusedIndex:t,setFocusedIndex:r,onSelectSession:a,scope:o,setScope:l,refetch:u,archive:f,setArchive:h,disabled:d}){const p=Y.useRef(e);p.current=e;const g=Y.useRef(a);g.current=a;const y=Y.useRef(o);y.current=o;const v=Y.useRef(t);v.current=t;const S=Y.useRef(f);S.current=f;const E=Y.useRef(d);E.current=d,Y.useEffect(()=>{function N(w){if(E.current||w.metaKey||w.ctrlKey||w.altKey)return;const O=document.activeElement;if(O instanceof HTMLInputElement||O instanceof HTMLTextAreaElement||O instanceof HTMLSelectElement)return;if(w.key==="Escape"&&S.current!==null){h(null);return}const _=p.current,M=v.current;switch(w.key){case"j":case"ArrowDown":{w.preventDefault();const B=Math.min(M+1,_.length-1);r(B);break}case"k":case"ArrowUp":{w.preventDefault();const B=Math.max(M-1,0);r(B);break}case"Enter":case" ":{if(w.preventDefault(),M>=0&&M<_.length){const k=_[M].primarySession?.sessionId;k&&g.current(k)}break}case"Escape":break;case"/":{w.preventDefault(),h({repoName:void 0,repoRoot:void 0});break}case"r":{w.preventDefault(),u();break}case"a":{w.preventDefault(),l(y.current==="active"?"all":"active");break}}}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[r,l,u,h])}function St(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,a;r<e.length;r++)(a=St(e[r]))!==""&&(t+=(t&&" ")+a);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var Qk={value:()=>{}};function Fc(){for(var e=0,t=arguments.length,r={},a;e<t;++e){if(!(a=arguments[e]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new cc(r)}function cc(e){this._=e}function Zk(e,t){return e.trim().split(/^|\s+/).map(function(r){var a="",o=r.indexOf(".");if(o>=0&&(a=r.slice(o+1),r=r.slice(0,o)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}cc.prototype=Fc.prototype={constructor:cc,on:function(e,t){var r=this._,a=Zk(e+"",r),o,l=-1,u=a.length;if(arguments.length<2){for(;++l<u;)if((o=(e=a[l]).type)&&(o=Kk(r[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<u;)if(o=(e=a[l]).type)r[o]=zv(r[o],e.name,t);else if(t==null)for(o in r)r[o]=zv(r[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new cc(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var r=new Array(o),a=0,o,l;a<o;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],a=0,o=l.length;a<o;++a)l[a].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],o=0,l=a.length;o<l;++o)a[o].value.apply(t,r)}};function Kk(e,t){for(var r=0,a=e.length,o;r<a;++r)if((o=e[r]).name===t)return o.value}function zv(e,t,r){for(var a=0,o=e.length;a<o;++a)if(e[a].name===t){e[a]=Qk,e=e.slice(0,a).concat(e.slice(a+1));break}return r!=null&&e.push({name:t,value:r}),e}var Np="http://www.w3.org/1999/xhtml";const Lv={svg:"http://www.w3.org/2000/svg",xhtml:Np,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Lv.hasOwnProperty(t)?{space:Lv[t],local:e}:e}function Wk(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Np&&t.documentElement.namespaceURI===Np?t.createElement(e):t.createElementNS(r,e)}}function Jk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function OS(e){var t=Yc(e);return(t.local?Jk:Wk)(t)}function eT(){}function xm(e){return e==null?eT:function(){return this.querySelector(e)}}function tT(e){typeof e!="function"&&(e=xm(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var l=t[o],u=l.length,f=a[o]=new Array(u),h,d,p=0;p<u;++p)(h=l[p])&&(d=e.call(h,h.__data__,p,l))&&("__data__"in h&&(d.__data__=h.__data__),f[p]=d);return new xn(a,this._parents)}function nT(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function rT(){return[]}function jS(e){return e==null?rT:function(){return this.querySelectorAll(e)}}function iT(e){return function(){return nT(e.apply(this,arguments))}}function aT(e){typeof e=="function"?e=iT(e):e=jS(e);for(var t=this._groups,r=t.length,a=[],o=[],l=0;l<r;++l)for(var u=t[l],f=u.length,h,d=0;d<f;++d)(h=u[d])&&(a.push(e.call(h,h.__data__,d,u)),o.push(h));return new xn(a,o)}function DS(e){return function(){return this.matches(e)}}function zS(e){return function(t){return t.matches(e)}}var oT=Array.prototype.find;function sT(e){return function(){return oT.call(this.children,e)}}function lT(){return this.firstElementChild}function uT(e){return this.select(e==null?lT:sT(typeof e=="function"?e:zS(e)))}var cT=Array.prototype.filter;function fT(){return Array.from(this.children)}function dT(e){return function(){return cT.call(this.children,e)}}function hT(e){return this.selectAll(e==null?fT:dT(typeof e=="function"?e:zS(e)))}function pT(e){typeof e!="function"&&(e=DS(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var l=t[o],u=l.length,f=a[o]=[],h,d=0;d<u;++d)(h=l[d])&&e.call(h,h.__data__,d,l)&&f.push(h);return new xn(a,this._parents)}function LS(e){return new Array(e.length)}function mT(){return new xn(this._enter||this._groups.map(LS),this._parents)}function Ec(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ec.prototype={constructor:Ec,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 gT(e){return function(){return e}}function yT(e,t,r,a,o,l){for(var u=0,f,h=t.length,d=l.length;u<d;++u)(f=t[u])?(f.__data__=l[u],a[u]=f):r[u]=new Ec(e,l[u]);for(;u<h;++u)(f=t[u])&&(o[u]=f)}function xT(e,t,r,a,o,l,u){var f,h,d=new Map,p=t.length,g=l.length,y=new Array(p),v;for(f=0;f<p;++f)(h=t[f])&&(y[f]=v=u.call(h,h.__data__,f,t)+"",d.has(v)?o[f]=h:d.set(v,h));for(f=0;f<g;++f)v=u.call(e,l[f],f,l)+"",(h=d.get(v))?(a[f]=h,h.__data__=l[f],d.delete(v)):r[f]=new Ec(e,l[f]);for(f=0;f<p;++f)(h=t[f])&&d.get(y[f])===h&&(o[f]=h)}function vT(e){return e.__data__}function bT(e,t){if(!arguments.length)return Array.from(this,vT);var r=t?xT:yT,a=this._parents,o=this._groups;typeof e!="function"&&(e=gT(e));for(var l=o.length,u=new Array(l),f=new Array(l),h=new Array(l),d=0;d<l;++d){var p=a[d],g=o[d],y=g.length,v=ST(e.call(p,p&&p.__data__,d,a)),S=v.length,E=f[d]=new Array(S),N=u[d]=new Array(S),w=h[d]=new Array(y);r(p,g,E,N,w,v,t);for(var O=0,_=0,M,B;O<S;++O)if(M=E[O]){for(O>=_&&(_=O+1);!(B=N[_])&&++_<S;);M._next=B||null}}return u=new xn(u,a),u._enter=f,u._exit=h,u}function ST(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wT(){return new xn(this._exit||this._groups.map(LS),this._parents)}function ET(e,t,r){var a=this.enter(),o=this,l=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),r==null?l.remove():r(l),a&&o?a.merge(o).order():o}function CT(e){for(var t=e.selection?e.selection():e,r=this._groups,a=t._groups,o=r.length,l=a.length,u=Math.min(o,l),f=new Array(o),h=0;h<u;++h)for(var d=r[h],p=a[h],g=d.length,y=f[h]=new Array(g),v,S=0;S<g;++S)(v=d[S]||p[S])&&(y[S]=v);for(;h<o;++h)f[h]=r[h];return new xn(f,this._parents)}function _T(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var a=e[t],o=a.length-1,l=a[o],u;--o>=0;)(u=a[o])&&(l&&u.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(u,l),l=u);return this}function NT(e){e||(e=MT);function t(g,y){return g&&y?e(g.__data__,y.__data__):!g-!y}for(var r=this._groups,a=r.length,o=new Array(a),l=0;l<a;++l){for(var u=r[l],f=u.length,h=o[l]=new Array(f),d,p=0;p<f;++p)(d=u[p])&&(h[p]=d);h.sort(t)}return new xn(o,this._parents).order()}function MT(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function kT(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function TT(){return Array.from(this)}function AT(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var a=e[t],o=0,l=a.length;o<l;++o){var u=a[o];if(u)return u}return null}function RT(){let e=0;for(const t of this)++e;return e}function OT(){return!this.node()}function jT(e){for(var t=this._groups,r=0,a=t.length;r<a;++r)for(var o=t[r],l=0,u=o.length,f;l<u;++l)(f=o[l])&&e.call(f,f.__data__,l,o);return this}function DT(e){return function(){this.removeAttribute(e)}}function zT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LT(e,t){return function(){this.setAttribute(e,t)}}function IT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function BT(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function HT(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function PT(e,t){var r=Yc(e);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((t==null?r.local?zT:DT:typeof t=="function"?r.local?HT:BT:r.local?IT:LT)(r,t))}function IS(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function UT(e){return function(){this.style.removeProperty(e)}}function qT(e,t,r){return function(){this.style.setProperty(e,t,r)}}function VT(e,t,r){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,r)}}function FT(e,t,r){return arguments.length>1?this.each((t==null?UT:typeof t=="function"?VT:qT)(e,t,r??"")):mo(this.node(),e)}function mo(e,t){return e.style.getPropertyValue(t)||IS(e).getComputedStyle(e,null).getPropertyValue(t)}function YT(e){return function(){delete this[e]}}function $T(e,t){return function(){this[e]=t}}function GT(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function XT(e,t){return arguments.length>1?this.each((t==null?YT:typeof t=="function"?GT:$T)(e,t)):this.node()[e]}function BS(e){return e.trim().split(/^|\s+/)}function vm(e){return e.classList||new HS(e)}function HS(e){this._node=e,this._names=BS(e.getAttribute("class")||"")}HS.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 PS(e,t){for(var r=vm(e),a=-1,o=t.length;++a<o;)r.add(t[a])}function US(e,t){for(var r=vm(e),a=-1,o=t.length;++a<o;)r.remove(t[a])}function QT(e){return function(){PS(this,e)}}function ZT(e){return function(){US(this,e)}}function KT(e,t){return function(){(t.apply(this,arguments)?PS:US)(this,e)}}function WT(e,t){var r=BS(e+"");if(arguments.length<2){for(var a=vm(this.node()),o=-1,l=r.length;++o<l;)if(!a.contains(r[o]))return!1;return!0}return this.each((typeof t=="function"?KT:t?QT:ZT)(r,t))}function JT(){this.textContent=""}function eA(e){return function(){this.textContent=e}}function tA(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function nA(e){return arguments.length?this.each(e==null?JT:(typeof e=="function"?tA:eA)(e)):this.node().textContent}function rA(){this.innerHTML=""}function iA(e){return function(){this.innerHTML=e}}function aA(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function oA(e){return arguments.length?this.each(e==null?rA:(typeof e=="function"?aA:iA)(e)):this.node().innerHTML}function sA(){this.nextSibling&&this.parentNode.appendChild(this)}function lA(){return this.each(sA)}function uA(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cA(){return this.each(uA)}function fA(e){var t=typeof e=="function"?e:OS(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dA(){return null}function hA(e,t){var r=typeof e=="function"?e:OS(e),a=t==null?dA:typeof t=="function"?t:xm(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function pA(){var e=this.parentNode;e&&e.removeChild(this)}function mA(){return this.each(pA)}function gA(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yA(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xA(e){return this.select(e?yA:gA)}function vA(e){return arguments.length?this.property("__data__",e):this.node().__data__}function bA(e){return function(t){e.call(this,t,this.__data__)}}function SA(e){return e.trim().split(/^|\s+/).map(function(t){var r="",a=t.indexOf(".");return a>=0&&(r=t.slice(a+1),t=t.slice(0,a)),{type:t,name:r}})}function wA(e){return function(){var t=this.__on;if(t){for(var r=0,a=-1,o=t.length,l;r<o;++r)l=t[r],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++a]=l;++a?t.length=a:delete this.__on}}}function EA(e,t,r){return function(){var a=this.__on,o,l=bA(t);if(a){for(var u=0,f=a.length;u<f;++u)if((o=a[u]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=l,o.options=r),o.value=t;return}}this.addEventListener(e.type,l,r),o={type:e.type,name:e.name,value:t,listener:l,options:r},a?a.push(o):this.__on=[o]}}function CA(e,t,r){var a=SA(e+""),o,l=a.length,u;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,d=f.length,p;h<d;++h)for(o=0,p=f[h];o<l;++o)if((u=a[o]).type===p.type&&u.name===p.name)return p.value}return}for(f=t?EA:wA,o=0;o<l;++o)this.each(f(a[o],t,r));return this}function qS(e,t,r){var a=IS(e),o=a.CustomEvent;typeof o=="function"?o=new o(t,r):(o=a.document.createEvent("Event"),r?(o.initEvent(t,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function _A(e,t){return function(){return qS(this,e,t)}}function NA(e,t){return function(){return qS(this,e,t.apply(this,arguments))}}function MA(e,t){return this.each((typeof t=="function"?NA:_A)(e,t))}function*kA(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var a=e[t],o=0,l=a.length,u;o<l;++o)(u=a[o])&&(yield u)}var VS=[null];function xn(e,t){this._groups=e,this._parents=t}function fl(){return new xn([[document.documentElement]],VS)}function TA(){return this}xn.prototype=fl.prototype={constructor:xn,select:tT,selectAll:aT,selectChild:uT,selectChildren:hT,filter:pT,data:bT,enter:mT,exit:wT,join:ET,merge:CT,selection:TA,order:_T,sort:NT,call:kT,nodes:TT,node:AT,size:RT,empty:OT,each:jT,attr:PT,style:FT,property:XT,classed:WT,text:nA,html:oA,raise:lA,lower:cA,append:fA,insert:hA,remove:mA,clone:xA,datum:vA,on:CA,dispatch:MA,[Symbol.iterator]:kA};function mn(e){return typeof e=="string"?new xn([[document.querySelector(e)]],[document.documentElement]):new xn([[e]],VS)}function AA(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ln(e,t){if(e=AA(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const RA={passive:!1},Ws={capture:!0,passive:!1};function Ph(e){e.stopImmediatePropagation()}function oo(e){e.preventDefault(),e.stopImmediatePropagation()}function FS(e){var t=e.document.documentElement,r=mn(e).on("dragstart.drag",oo,Ws);"onselectstart"in t?r.on("selectstart.drag",oo,Ws):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function YS(e,t){var r=e.document.documentElement,a=mn(e).on("dragstart.drag",null);t&&(a.on("click.drag",oo,Ws),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const $u=e=>()=>e;function Mp(e,{sourceEvent:t,subject:r,target:a,identifier:o,active:l,x:u,y:f,dx:h,dy:d,dispatch:p}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:p}})}Mp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function OA(e){return!e.ctrlKey&&!e.button}function jA(){return this.parentNode}function DA(e,t){return t??{x:e.x,y:e.y}}function zA(){return navigator.maxTouchPoints||"ontouchstart"in this}function $S(){var e=OA,t=jA,r=DA,a=zA,o={},l=Fc("start","drag","end"),u=0,f,h,d,p,g=0;function y(M){M.on("mousedown.drag",v).filter(a).on("touchstart.drag",N).on("touchmove.drag",w,RA).on("touchend.drag touchcancel.drag",O).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(M,B){if(!(p||!e.call(this,M,B))){var k=_(this,t.call(this,M,B),M,B,"mouse");k&&(mn(M.view).on("mousemove.drag",S,Ws).on("mouseup.drag",E,Ws),FS(M.view),Ph(M),d=!1,f=M.clientX,h=M.clientY,k("start",M))}}function S(M){if(oo(M),!d){var B=M.clientX-f,k=M.clientY-h;d=B*B+k*k>g}o.mouse("drag",M)}function E(M){mn(M.view).on("mousemove.drag mouseup.drag",null),YS(M.view,d),oo(M),o.mouse("end",M)}function N(M,B){if(e.call(this,M,B)){var k=M.changedTouches,D=t.call(this,M,B),U=k.length,H,q;for(H=0;H<U;++H)(q=_(this,D,M,B,k[H].identifier,k[H]))&&(Ph(M),q("start",M,k[H]))}}function w(M){var B=M.changedTouches,k=B.length,D,U;for(D=0;D<k;++D)(U=o[B[D].identifier])&&(oo(M),U("drag",M,B[D]))}function O(M){var B=M.changedTouches,k=B.length,D,U;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),D=0;D<k;++D)(U=o[B[D].identifier])&&(Ph(M),U("end",M,B[D]))}function _(M,B,k,D,U,H){var q=l.copy(),L=Ln(H||k,B),P,K,I;if((I=r.call(M,new Mp("beforestart",{sourceEvent:k,target:y,identifier:U,active:u,x:L[0],y:L[1],dx:0,dy:0,dispatch:q}),D))!=null)return P=I.x-L[0]||0,K=I.y-L[1]||0,function V(j,F,X){var Z=L,A;switch(j){case"start":o[U]=V,A=u++;break;case"end":delete o[U],--u;case"drag":L=Ln(X||F,B),A=u;break}q.call(j,M,new Mp(j,{sourceEvent:F,subject:I,target:y,identifier:U,active:A,x:L[0]+P,y:L[1]+K,dx:L[0]-Z[0],dy:L[1]-Z[1],dispatch:q}),D)}}return y.filter=function(M){return arguments.length?(e=typeof M=="function"?M:$u(!!M),y):e},y.container=function(M){return arguments.length?(t=typeof M=="function"?M:$u(M),y):t},y.subject=function(M){return arguments.length?(r=typeof M=="function"?M:$u(M),y):r},y.touchable=function(M){return arguments.length?(a=typeof M=="function"?M:$u(!!M),y):a},y.on=function(){var M=l.on.apply(l,arguments);return M===l?y:M},y.clickDistance=function(M){return arguments.length?(g=(M=+M)*M,y):Math.sqrt(g)},y}function bm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function GS(e,t){var r=Object.create(e.prototype);for(var a in t)r[a]=t[a];return r}function dl(){}var Js=.7,Cc=1/Js,so="\\s*([+-]?\\d+)\\s*",el="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",LA=/^#([0-9a-f]{3,8})$/,IA=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),BA=new RegExp(`^rgb\\(${Wn},${Wn},${Wn}\\)$`),HA=new RegExp(`^rgba\\(${so},${so},${so},${el}\\)$`),PA=new RegExp(`^rgba\\(${Wn},${Wn},${Wn},${el}\\)$`),UA=new RegExp(`^hsl\\(${el},${Wn},${Wn}\\)$`),qA=new RegExp(`^hsla\\(${el},${Wn},${Wn},${el}\\)$`),Iv={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};bm(dl,ta,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Bv,formatHex:Bv,formatHex8:VA,formatHsl:FA,formatRgb:Hv,toString:Hv});function Bv(){return this.rgb().formatHex()}function VA(){return this.rgb().formatHex8()}function FA(){return XS(this).formatHsl()}function Hv(){return this.rgb().formatRgb()}function ta(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=LA.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Pv(t):r===3?new tn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Gu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Gu(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=IA.exec(e))?new tn(t[1],t[2],t[3],1):(t=BA.exec(e))?new tn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=HA.exec(e))?Gu(t[1],t[2],t[3],t[4]):(t=PA.exec(e))?Gu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UA.exec(e))?Vv(t[1],t[2]/100,t[3]/100,1):(t=qA.exec(e))?Vv(t[1],t[2]/100,t[3]/100,t[4]):Iv.hasOwnProperty(e)?Pv(Iv[e]):e==="transparent"?new tn(NaN,NaN,NaN,0):null}function Pv(e){return new tn(e>>16&255,e>>8&255,e&255,1)}function Gu(e,t,r,a){return a<=0&&(e=t=r=NaN),new tn(e,t,r,a)}function YA(e){return e instanceof dl||(e=ta(e)),e?(e=e.rgb(),new tn(e.r,e.g,e.b,e.opacity)):new tn}function kp(e,t,r,a){return arguments.length===1?YA(e):new tn(e,t,r,a??1)}function tn(e,t,r,a){this.r=+e,this.g=+t,this.b=+r,this.opacity=+a}bm(tn,kp,GS(dl,{brighter(e){return e=e==null?Cc:Math.pow(Cc,e),new tn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Js:Math.pow(Js,e),new tn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tn(Wi(this.r),Wi(this.g),Wi(this.b),_c(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uv,formatHex:Uv,formatHex8:$A,formatRgb:qv,toString:qv}));function Uv(){return`#${Gi(this.r)}${Gi(this.g)}${Gi(this.b)}`}function $A(){return`#${Gi(this.r)}${Gi(this.g)}${Gi(this.b)}${Gi((isNaN(this.opacity)?1:this.opacity)*255)}`}function qv(){const e=_c(this.opacity);return`${e===1?"rgb(":"rgba("}${Wi(this.r)}, ${Wi(this.g)}, ${Wi(this.b)}${e===1?")":`, ${e})`}`}function _c(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gi(e){return e=Wi(e),(e<16?"0":"")+e.toString(16)}function Vv(e,t,r,a){return a<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new In(e,t,r,a)}function XS(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof dl||(e=ta(e)),!e)return new In;if(e instanceof In)return e;e=e.rgb();var t=e.r/255,r=e.g/255,a=e.b/255,o=Math.min(t,r,a),l=Math.max(t,r,a),u=NaN,f=l-o,h=(l+o)/2;return f?(t===l?u=(r-a)/f+(r<a)*6:r===l?u=(a-t)/f+2:u=(t-r)/f+4,f/=h<.5?l+o:2-l-o,u*=60):f=h>0&&h<1?0:u,new In(u,f,h,e.opacity)}function GA(e,t,r,a){return arguments.length===1?XS(e):new In(e,t,r,a??1)}function In(e,t,r,a){this.h=+e,this.s=+t,this.l=+r,this.opacity=+a}bm(In,GA,GS(dl,{brighter(e){return e=e==null?Cc:Math.pow(Cc,e),new In(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Js:Math.pow(Js,e),new In(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,r=this.l,a=r+(r<.5?r:1-r)*t,o=2*r-a;return new tn(Uh(e>=240?e-240:e+120,o,a),Uh(e,o,a),Uh(e<120?e+240:e-120,o,a),this.opacity)},clamp(){return new In(Fv(this.h),Xu(this.s),Xu(this.l),_c(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_c(this.opacity);return`${e===1?"hsl(":"hsla("}${Fv(this.h)}, ${Xu(this.s)*100}%, ${Xu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fv(e){return e=(e||0)%360,e<0?e+360:e}function Xu(e){return Math.max(0,Math.min(1,e||0))}function Uh(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Sm=e=>()=>e;function XA(e,t){return function(r){return e+r*t}}function QA(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(a){return Math.pow(e+a*t,r)}}function ZA(e){return(e=+e)==1?QS:function(t,r){return r-t?QA(t,r,e):Sm(isNaN(t)?r:t)}}function QS(e,t){var r=t-e;return r?XA(e,r):Sm(isNaN(e)?t:e)}const Nc=(function e(t){var r=ZA(t);function a(o,l){var u=r((o=kp(o)).r,(l=kp(l)).r),f=r(o.g,l.g),h=r(o.b,l.b),d=QS(o.opacity,l.opacity);return function(p){return o.r=u(p),o.g=f(p),o.b=h(p),o.opacity=d(p),o+""}}return a.gamma=e,a})(1);function KA(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,a=t.slice(),o;return function(l){for(o=0;o<r;++o)a[o]=e[o]*(1-l)+t[o]*l;return a}}function WA(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function JA(e,t){var r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),l=new Array(r),u;for(u=0;u<a;++u)o[u]=Ls(e[u],t[u]);for(;u<r;++u)l[u]=t[u];return function(f){for(u=0;u<a;++u)l[u]=o[u](f);return l}}function eR(e,t){var r=new Date;return e=+e,t=+t,function(a){return r.setTime(e*(1-a)+t*a),r}}function Zn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function tR(e,t){var r={},a={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=Ls(e[o],t[o]):a[o]=t[o];return function(l){for(o in r)a[o]=r[o](l);return a}}var Tp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qh=new RegExp(Tp.source,"g");function nR(e){return function(){return e}}function rR(e){return function(t){return e(t)+""}}function ZS(e,t){var r=Tp.lastIndex=qh.lastIndex=0,a,o,l,u=-1,f=[],h=[];for(e=e+"",t=t+"";(a=Tp.exec(e))&&(o=qh.exec(t));)(l=o.index)>r&&(l=t.slice(r,l),f[u]?f[u]+=l:f[++u]=l),(a=a[0])===(o=o[0])?f[u]?f[u]+=o:f[++u]=o:(f[++u]=null,h.push({i:u,x:Zn(a,o)})),r=qh.lastIndex;return r<t.length&&(l=t.slice(r),f[u]?f[u]+=l:f[++u]=l),f.length<2?h[0]?rR(h[0].x):nR(t):(t=h.length,function(d){for(var p=0,g;p<t;++p)f[(g=h[p]).i]=g.x(d);return f.join("")})}function Ls(e,t){var r=typeof t,a;return t==null||r==="boolean"?Sm(t):(r==="number"?Zn:r==="string"?(a=ta(t))?(t=a,Nc):ZS:t instanceof ta?Nc:t instanceof Date?eR:WA(t)?KA:Array.isArray(t)?JA:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tR:Zn)(e,t)}var Yv=180/Math.PI,Ap={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function KS(e,t,r,a,o,l){var u,f,h;return(u=Math.sqrt(e*e+t*t))&&(e/=u,t/=u),(h=e*r+t*a)&&(r-=e*h,a-=t*h),(f=Math.sqrt(r*r+a*a))&&(r/=f,a/=f,h/=f),e*a<t*r&&(e=-e,t=-t,h=-h,u=-u),{translateX:o,translateY:l,rotate:Math.atan2(t,e)*Yv,skewX:Math.atan(h)*Yv,scaleX:u,scaleY:f}}var Qu;function iR(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ap:KS(t.a,t.b,t.c,t.d,t.e,t.f)}function aR(e){return e==null||(Qu||(Qu=document.createElementNS("http://www.w3.org/2000/svg","g")),Qu.setAttribute("transform",e),!(e=Qu.transform.baseVal.consolidate()))?Ap:(e=e.matrix,KS(e.a,e.b,e.c,e.d,e.e,e.f))}function WS(e,t,r,a){function o(d){return d.length?d.pop()+" ":""}function l(d,p,g,y,v,S){if(d!==g||p!==y){var E=v.push("translate(",null,t,null,r);S.push({i:E-4,x:Zn(d,g)},{i:E-2,x:Zn(p,y)})}else(g||y)&&v.push("translate("+g+t+y+r)}function u(d,p,g,y){d!==p?(d-p>180?p+=360:p-d>180&&(d+=360),y.push({i:g.push(o(g)+"rotate(",null,a)-2,x:Zn(d,p)})):p&&g.push(o(g)+"rotate("+p+a)}function f(d,p,g,y){d!==p?y.push({i:g.push(o(g)+"skewX(",null,a)-2,x:Zn(d,p)}):p&&g.push(o(g)+"skewX("+p+a)}function h(d,p,g,y,v,S){if(d!==g||p!==y){var E=v.push(o(v)+"scale(",null,",",null,")");S.push({i:E-4,x:Zn(d,g)},{i:E-2,x:Zn(p,y)})}else(g!==1||y!==1)&&v.push(o(v)+"scale("+g+","+y+")")}return function(d,p){var g=[],y=[];return d=e(d),p=e(p),l(d.translateX,d.translateY,p.translateX,p.translateY,g,y),u(d.rotate,p.rotate,g,y),f(d.skewX,p.skewX,g,y),h(d.scaleX,d.scaleY,p.scaleX,p.scaleY,g,y),d=p=null,function(v){for(var S=-1,E=y.length,N;++S<E;)g[(N=y[S]).i]=N.x(v);return g.join("")}}}var oR=WS(iR,"px, ","px)","deg)"),sR=WS(aR,", ",")",")"),lR=1e-12;function $v(e){return((e=Math.exp(e))+1/e)/2}function uR(e){return((e=Math.exp(e))-1/e)/2}function cR(e){return((e=Math.exp(2*e))-1)/(e+1)}const fc=(function e(t,r,a){function o(l,u){var f=l[0],h=l[1],d=l[2],p=u[0],g=u[1],y=u[2],v=p-f,S=g-h,E=v*v+S*S,N,w;if(E<lR)w=Math.log(y/d)/t,N=function(D){return[f+D*v,h+D*S,d*Math.exp(t*D*w)]};else{var O=Math.sqrt(E),_=(y*y-d*d+a*E)/(2*d*r*O),M=(y*y-d*d-a*E)/(2*y*r*O),B=Math.log(Math.sqrt(_*_+1)-_),k=Math.log(Math.sqrt(M*M+1)-M);w=(k-B)/t,N=function(D){var U=D*w,H=$v(B),q=d/(r*O)*(H*cR(t*U+B)-uR(B));return[f+q*v,h+q*S,d*H/$v(t*U+B)]}}return N.duration=w*1e3*t/Math.SQRT2,N}return o.rho=function(l){var u=Math.max(.001,+l),f=u*u,h=f*f;return e(u,f,h)},o})(Math.SQRT2,2,4);var go=0,Ds=0,Ns=0,JS=1e3,Mc,zs,kc=0,na=0,$c=0,tl=typeof performance=="object"&&performance.now?performance:Date,ew=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function wm(){return na||(ew(fR),na=tl.now()+$c)}function fR(){na=0}function Tc(){this._call=this._time=this._next=null}Tc.prototype=tw.prototype={constructor:Tc,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?wm():+r)+(t==null?0:+t),!this._next&&zs!==this&&(zs?zs._next=this:Mc=this,zs=this),this._call=e,this._time=r,Rp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rp())}};function tw(e,t,r){var a=new Tc;return a.restart(e,t,r),a}function dR(){wm(),++go;for(var e=Mc,t;e;)(t=na-e._time)>=0&&e._call.call(void 0,t),e=e._next;--go}function Gv(){na=(kc=tl.now())+$c,go=Ds=0;try{dR()}finally{go=0,pR(),na=0}}function hR(){var e=tl.now(),t=e-kc;t>JS&&($c-=t,kc=e)}function pR(){for(var e,t=Mc,r,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Mc=r);zs=e,Rp(a)}function Rp(e){if(!go){Ds&&(Ds=clearTimeout(Ds));var t=e-na;t>24?(e<1/0&&(Ds=setTimeout(Gv,e-tl.now()-$c)),Ns&&(Ns=clearInterval(Ns))):(Ns||(kc=tl.now(),Ns=setInterval(hR,JS)),go=1,ew(Gv))}}function Xv(e,t,r){var a=new Tc;return t=t==null?0:+t,a.restart(o=>{a.stop(),e(o+t)},t,r),a}var mR=Fc("start","end","cancel","interrupt"),gR=[],nw=0,Qv=1,Op=2,dc=3,Zv=4,jp=5,hc=6;function Gc(e,t,r,a,o,l){var u=e.__transition;if(!u)e.__transition={};else if(r in u)return;yR(e,r,{name:t,index:a,group:o,on:mR,tween:gR,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:nw})}function Em(e,t){var r=Pn(e,t);if(r.state>nw)throw new Error("too late; already scheduled");return r}function tr(e,t){var r=Pn(e,t);if(r.state>dc)throw new Error("too late; already running");return r}function Pn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function yR(e,t,r){var a=e.__transition,o;a[t]=r,r.timer=tw(l,0,r.time);function l(d){r.state=Qv,r.timer.restart(u,r.delay,r.time),r.delay<=d&&u(d-r.delay)}function u(d){var p,g,y,v;if(r.state!==Qv)return h();for(p in a)if(v=a[p],v.name===r.name){if(v.state===dc)return Xv(u);v.state===Zv?(v.state=hc,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete a[p]):+p<t&&(v.state=hc,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete a[p])}if(Xv(function(){r.state===dc&&(r.state=Zv,r.timer.restart(f,r.delay,r.time),f(d))}),r.state=Op,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Op){for(r.state=dc,o=new Array(y=r.tween.length),p=0,g=-1;p<y;++p)(v=r.tween[p].value.call(e,e.__data__,r.index,r.group))&&(o[++g]=v);o.length=g+1}}function f(d){for(var p=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(h),r.state=jp,1),g=-1,y=o.length;++g<y;)o[g].call(e,p);r.state===jp&&(r.on.call("end",e,e.__data__,r.index,r.group),h())}function h(){r.state=hc,r.timer.stop(),delete a[t];for(var d in a)return;delete e.__transition}}function pc(e,t){var r=e.__transition,a,o,l=!0,u;if(r){t=t==null?null:t+"";for(u in r){if((a=r[u]).name!==t){l=!1;continue}o=a.state>Op&&a.state<jp,a.state=hc,a.timer.stop(),a.on.call(o?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete r[u]}l&&delete e.__transition}}function xR(e){return this.each(function(){pc(this,e)})}function vR(e,t){var r,a;return function(){var o=tr(this,e),l=o.tween;if(l!==r){a=r=l;for(var u=0,f=a.length;u<f;++u)if(a[u].name===t){a=a.slice(),a.splice(u,1);break}}o.tween=a}}function bR(e,t,r){var a,o;if(typeof r!="function")throw new Error;return function(){var l=tr(this,e),u=l.tween;if(u!==a){o=(a=u).slice();for(var f={name:t,value:r},h=0,d=o.length;h<d;++h)if(o[h].name===t){o[h]=f;break}h===d&&o.push(f)}l.tween=o}}function SR(e,t){var r=this._id;if(e+="",arguments.length<2){for(var a=Pn(this.node(),r).tween,o=0,l=a.length,u;o<l;++o)if((u=a[o]).name===e)return u.value;return null}return this.each((t==null?vR:bR)(r,e,t))}function Cm(e,t,r){var a=e._id;return e.each(function(){var o=tr(this,a);(o.value||(o.value={}))[t]=r.apply(this,arguments)}),function(o){return Pn(o,a).value[t]}}function rw(e,t){var r;return(typeof t=="number"?Zn:t instanceof ta?Nc:(r=ta(t))?(t=r,Nc):ZS)(e,t)}function wR(e){return function(){this.removeAttribute(e)}}function ER(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CR(e,t,r){var a,o=r+"",l;return function(){var u=this.getAttribute(e);return u===o?null:u===a?l:l=t(a=u,r)}}function _R(e,t,r){var a,o=r+"",l;return function(){var u=this.getAttributeNS(e.space,e.local);return u===o?null:u===a?l:l=t(a=u,r)}}function NR(e,t,r){var a,o,l;return function(){var u,f=r(this),h;return f==null?void this.removeAttribute(e):(u=this.getAttribute(e),h=f+"",u===h?null:u===a&&h===o?l:(o=h,l=t(a=u,f)))}}function MR(e,t,r){var a,o,l;return function(){var u,f=r(this),h;return f==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),h=f+"",u===h?null:u===a&&h===o?l:(o=h,l=t(a=u,f)))}}function kR(e,t){var r=Yc(e),a=r==="transform"?sR:rw;return this.attrTween(e,typeof t=="function"?(r.local?MR:NR)(r,a,Cm(this,"attr."+e,t)):t==null?(r.local?ER:wR)(r):(r.local?_R:CR)(r,a,t))}function TR(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function AR(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function RR(e,t){var r,a;function o(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&AR(e,l)),r}return o._value=t,o}function OR(e,t){var r,a;function o(){var l=t.apply(this,arguments);return l!==a&&(r=(a=l)&&TR(e,l)),r}return o._value=t,o}function jR(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var a=Yc(e);return this.tween(r,(a.local?RR:OR)(a,t))}function DR(e,t){return function(){Em(this,e).delay=+t.apply(this,arguments)}}function zR(e,t){return t=+t,function(){Em(this,e).delay=t}}function LR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DR:zR)(t,e)):Pn(this.node(),t).delay}function IR(e,t){return function(){tr(this,e).duration=+t.apply(this,arguments)}}function BR(e,t){return t=+t,function(){tr(this,e).duration=t}}function HR(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?IR:BR)(t,e)):Pn(this.node(),t).duration}function PR(e,t){if(typeof t!="function")throw new Error;return function(){tr(this,e).ease=t}}function UR(e){var t=this._id;return arguments.length?this.each(PR(t,e)):Pn(this.node(),t).ease}function qR(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;tr(this,e).ease=r}}function VR(e){if(typeof e!="function")throw new Error;return this.each(qR(this._id,e))}function FR(e){typeof e!="function"&&(e=DS(e));for(var t=this._groups,r=t.length,a=new Array(r),o=0;o<r;++o)for(var l=t[o],u=l.length,f=a[o]=[],h,d=0;d<u;++d)(h=l[d])&&e.call(h,h.__data__,d,l)&&f.push(h);return new kr(a,this._parents,this._name,this._id)}function YR(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,a=t.length,o=r.length,l=Math.min(a,o),u=new Array(a),f=0;f<l;++f)for(var h=t[f],d=r[f],p=h.length,g=u[f]=new Array(p),y,v=0;v<p;++v)(y=h[v]||d[v])&&(g[v]=y);for(;f<a;++f)u[f]=t[f];return new kr(u,this._parents,this._name,this._id)}function $R(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function GR(e,t,r){var a,o,l=$R(t)?Em:tr;return function(){var u=l(this,e),f=u.on;f!==a&&(o=(a=f).copy()).on(t,r),u.on=o}}function XR(e,t){var r=this._id;return arguments.length<2?Pn(this.node(),r).on.on(e):this.each(GR(r,e,t))}function QR(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function ZR(){return this.on("end.remove",QR(this._id))}function KR(e){var t=this._name,r=this._id;typeof e!="function"&&(e=xm(e));for(var a=this._groups,o=a.length,l=new Array(o),u=0;u<o;++u)for(var f=a[u],h=f.length,d=l[u]=new Array(h),p,g,y=0;y<h;++y)(p=f[y])&&(g=e.call(p,p.__data__,y,f))&&("__data__"in p&&(g.__data__=p.__data__),d[y]=g,Gc(d[y],t,r,y,d,Pn(p,r)));return new kr(l,this._parents,t,r)}function WR(e){var t=this._name,r=this._id;typeof e!="function"&&(e=jS(e));for(var a=this._groups,o=a.length,l=[],u=[],f=0;f<o;++f)for(var h=a[f],d=h.length,p,g=0;g<d;++g)if(p=h[g]){for(var y=e.call(p,p.__data__,g,h),v,S=Pn(p,r),E=0,N=y.length;E<N;++E)(v=y[E])&&Gc(v,t,r,E,y,S);l.push(y),u.push(p)}return new kr(l,u,t,r)}var JR=fl.prototype.constructor;function e3(){return new JR(this._groups,this._parents)}function t3(e,t){var r,a,o;return function(){var l=mo(this,e),u=(this.style.removeProperty(e),mo(this,e));return l===u?null:l===r&&u===a?o:o=t(r=l,a=u)}}function iw(e){return function(){this.style.removeProperty(e)}}function n3(e,t,r){var a,o=r+"",l;return function(){var u=mo(this,e);return u===o?null:u===a?l:l=t(a=u,r)}}function r3(e,t,r){var a,o,l;return function(){var u=mo(this,e),f=r(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(e),mo(this,e))),u===h?null:u===a&&h===o?l:(o=h,l=t(a=u,f))}}function i3(e,t){var r,a,o,l="style."+t,u="end."+l,f;return function(){var h=tr(this,e),d=h.on,p=h.value[l]==null?f||(f=iw(t)):void 0;(d!==r||o!==p)&&(a=(r=d).copy()).on(u,o=p),h.on=a}}function a3(e,t,r){var a=(e+="")=="transform"?oR:rw;return t==null?this.styleTween(e,t3(e,a)).on("end.style."+e,iw(e)):typeof t=="function"?this.styleTween(e,r3(e,a,Cm(this,"style."+e,t))).each(i3(this._id,e)):this.styleTween(e,n3(e,a,t),r).on("end.style."+e,null)}function o3(e,t,r){return function(a){this.style.setProperty(e,t.call(this,a),r)}}function s3(e,t,r){var a,o;function l(){var u=t.apply(this,arguments);return u!==o&&(a=(o=u)&&o3(e,u,r)),a}return l._value=t,l}function l3(e,t,r){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,s3(e,t,r??""))}function u3(e){return function(){this.textContent=e}}function c3(e){return function(){var t=e(this);this.textContent=t??""}}function f3(e){return this.tween("text",typeof e=="function"?c3(Cm(this,"text",e)):u3(e==null?"":e+""))}function d3(e){return function(t){this.textContent=e.call(this,t)}}function h3(e){var t,r;function a(){var o=e.apply(this,arguments);return o!==r&&(t=(r=o)&&d3(o)),t}return a._value=e,a}function p3(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,h3(e))}function m3(){for(var e=this._name,t=this._id,r=aw(),a=this._groups,o=a.length,l=0;l<o;++l)for(var u=a[l],f=u.length,h,d=0;d<f;++d)if(h=u[d]){var p=Pn(h,t);Gc(h,e,r,d,u,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new kr(a,this._parents,e,r)}function g3(){var e,t,r=this,a=r._id,o=r.size();return new Promise(function(l,u){var f={value:u},h={value:function(){--o===0&&l()}};r.each(function(){var d=tr(this,a),p=d.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(f),t._.interrupt.push(f),t._.end.push(h)),d.on=t}),o===0&&l()})}var y3=0;function kr(e,t,r,a){this._groups=e,this._parents=t,this._name=r,this._id=a}function aw(){return++y3}var Er=fl.prototype;kr.prototype={constructor:kr,select:KR,selectAll:WR,selectChild:Er.selectChild,selectChildren:Er.selectChildren,filter:FR,merge:YR,selection:e3,transition:m3,call:Er.call,nodes:Er.nodes,node:Er.node,size:Er.size,empty:Er.empty,each:Er.each,on:XR,attr:kR,attrTween:jR,style:a3,styleTween:l3,text:f3,textTween:p3,remove:ZR,tween:SR,delay:LR,duration:HR,ease:UR,easeVarying:VR,end:g3,[Symbol.iterator]:Er[Symbol.iterator]};function x3(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var v3={time:null,delay:0,duration:250,ease:x3};function b3(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function S3(e){var t,r;e instanceof kr?(t=e._id,e=e._name):(t=aw(),(r=v3).time=wm(),e=e==null?null:e+"");for(var a=this._groups,o=a.length,l=0;l<o;++l)for(var u=a[l],f=u.length,h,d=0;d<f;++d)(h=u[d])&&Gc(h,e,t,d,u,r||b3(h,t));return new kr(a,this._parents,e,t)}fl.prototype.interrupt=xR;fl.prototype.transition=S3;const Zu=e=>()=>e;function w3(e,{sourceEvent:t,target:r,transform:a,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:o}})}function Nr(e,t,r){this.k=e,this.x=t,this.y=r}Nr.prototype={constructor:Nr,scale:function(e){return e===1?this:new Nr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Nr(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 Xc=new Nr(1,0,0);ow.prototype=Nr.prototype;function ow(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xc;return e.__zoom}function Vh(e){e.stopImmediatePropagation()}function Ms(e){e.preventDefault(),e.stopImmediatePropagation()}function E3(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function C3(){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 Kv(){return this.__zoom||Xc}function _3(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function N3(){return navigator.maxTouchPoints||"ontouchstart"in this}function M3(e,t,r){var a=e.invertX(t[0][0])-r[0][0],o=e.invertX(t[1][0])-r[1][0],l=e.invertY(t[0][1])-r[0][1],u=e.invertY(t[1][1])-r[1][1];return e.translate(o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o),u>l?(l+u)/2:Math.min(0,l)||Math.max(0,u))}function sw(){var e=E3,t=C3,r=M3,a=_3,o=N3,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],f=250,h=fc,d=Fc("start","zoom","end"),p,g,y,v=500,S=150,E=0,N=10;function w(I){I.property("__zoom",Kv).on("wheel.zoom",U,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",q).filter(o).on("touchstart.zoom",L).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",K).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(I,V,j,F){var X=I.selection?I.selection():I;X.property("__zoom",Kv),I!==X?B(I,V,j,F):X.interrupt().each(function(){k(this,arguments).event(F).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},w.scaleBy=function(I,V,j,F){w.scaleTo(I,function(){var X=this.__zoom.k,Z=typeof V=="function"?V.apply(this,arguments):V;return X*Z},j,F)},w.scaleTo=function(I,V,j,F){w.transform(I,function(){var X=t.apply(this,arguments),Z=this.__zoom,A=j==null?M(X):typeof j=="function"?j.apply(this,arguments):j,z=Z.invert(A),$=typeof V=="function"?V.apply(this,arguments):V;return r(_(O(Z,$),A,z),X,u)},j,F)},w.translateBy=function(I,V,j,F){w.transform(I,function(){return r(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof j=="function"?j.apply(this,arguments):j),t.apply(this,arguments),u)},null,F)},w.translateTo=function(I,V,j,F,X){w.transform(I,function(){var Z=t.apply(this,arguments),A=this.__zoom,z=F==null?M(Z):typeof F=="function"?F.apply(this,arguments):F;return r(Xc.translate(z[0],z[1]).scale(A.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof j=="function"?-j.apply(this,arguments):-j),Z,u)},F,X)};function O(I,V){return V=Math.max(l[0],Math.min(l[1],V)),V===I.k?I:new Nr(V,I.x,I.y)}function _(I,V,j){var F=V[0]-j[0]*I.k,X=V[1]-j[1]*I.k;return F===I.x&&X===I.y?I:new Nr(I.k,F,X)}function M(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function B(I,V,j,F){I.on("start.zoom",function(){k(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(F).end()}).tween("zoom",function(){var X=this,Z=arguments,A=k(X,Z).event(F),z=t.apply(X,Z),$=j==null?M(z):typeof j=="function"?j.apply(X,Z):j,R=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),te=X.__zoom,ue=typeof V=="function"?V.apply(X,Z):V,ce=h(te.invert($).concat(R/te.k),ue.invert($).concat(R/ue.k));return function(fe){if(fe===1)fe=ue;else{var le=ce(fe),pe=R/le[2];fe=new Nr(pe,$[0]-le[0]*pe,$[1]-le[1]*pe)}A.zoom(null,fe)}})}function k(I,V,j){return!j&&I.__zooming||new D(I,V)}function D(I,V){this.that=I,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,V),this.taps=0}D.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,V){return this.mouse&&I!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var V=mn(this.that).datum();d.call(I,this.that,new w3(I,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),V)}};function U(I,...V){if(!e.apply(this,arguments))return;var j=k(this,V).event(I),F=this.__zoom,X=Math.max(l[0],Math.min(l[1],F.k*Math.pow(2,a.apply(this,arguments)))),Z=Ln(I);if(j.wheel)(j.mouse[0][0]!==Z[0]||j.mouse[0][1]!==Z[1])&&(j.mouse[1]=F.invert(j.mouse[0]=Z)),clearTimeout(j.wheel);else{if(F.k===X)return;j.mouse=[Z,F.invert(Z)],pc(this),j.start()}Ms(I),j.wheel=setTimeout(A,S),j.zoom("mouse",r(_(O(F,X),j.mouse[0],j.mouse[1]),j.extent,u));function A(){j.wheel=null,j.end()}}function H(I,...V){if(y||!e.apply(this,arguments))return;var j=I.currentTarget,F=k(this,V,!0).event(I),X=mn(I.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",R,!0),Z=Ln(I,j),A=I.clientX,z=I.clientY;FS(I.view),Vh(I),F.mouse=[Z,this.__zoom.invert(Z)],pc(this),F.start();function $(te){if(Ms(te),!F.moved){var ue=te.clientX-A,ce=te.clientY-z;F.moved=ue*ue+ce*ce>E}F.event(te).zoom("mouse",r(_(F.that.__zoom,F.mouse[0]=Ln(te,j),F.mouse[1]),F.extent,u))}function R(te){X.on("mousemove.zoom mouseup.zoom",null),YS(te.view,F.moved),Ms(te),F.event(te).end()}}function q(I,...V){if(e.apply(this,arguments)){var j=this.__zoom,F=Ln(I.changedTouches?I.changedTouches[0]:I,this),X=j.invert(F),Z=j.k*(I.shiftKey?.5:2),A=r(_(O(j,Z),F,X),t.apply(this,V),u);Ms(I),f>0?mn(this).transition().duration(f).call(B,A,F,I):mn(this).call(w.transform,A,F,I)}}function L(I,...V){if(e.apply(this,arguments)){var j=I.touches,F=j.length,X=k(this,V,I.changedTouches.length===F).event(I),Z,A,z,$;for(Vh(I),A=0;A<F;++A)z=j[A],$=Ln(z,this),$=[$,this.__zoom.invert($),z.identifier],X.touch0?!X.touch1&&X.touch0[2]!==$[2]&&(X.touch1=$,X.taps=0):(X.touch0=$,Z=!0,X.taps=1+!!p);p&&(p=clearTimeout(p)),Z&&(X.taps<2&&(g=$[0],p=setTimeout(function(){p=null},v)),pc(this),X.start())}}function P(I,...V){if(this.__zooming){var j=k(this,V).event(I),F=I.changedTouches,X=F.length,Z,A,z,$;for(Ms(I),Z=0;Z<X;++Z)A=F[Z],z=Ln(A,this),j.touch0&&j.touch0[2]===A.identifier?j.touch0[0]=z:j.touch1&&j.touch1[2]===A.identifier&&(j.touch1[0]=z);if(A=j.that.__zoom,j.touch1){var R=j.touch0[0],te=j.touch0[1],ue=j.touch1[0],ce=j.touch1[1],fe=(fe=ue[0]-R[0])*fe+(fe=ue[1]-R[1])*fe,le=(le=ce[0]-te[0])*le+(le=ce[1]-te[1])*le;A=O(A,Math.sqrt(fe/le)),z=[(R[0]+ue[0])/2,(R[1]+ue[1])/2],$=[(te[0]+ce[0])/2,(te[1]+ce[1])/2]}else if(j.touch0)z=j.touch0[0],$=j.touch0[1];else return;j.zoom("touch",r(_(A,z,$),j.extent,u))}}function K(I,...V){if(this.__zooming){var j=k(this,V).event(I),F=I.changedTouches,X=F.length,Z,A;for(Vh(I),y&&clearTimeout(y),y=setTimeout(function(){y=null},v),Z=0;Z<X;++Z)A=F[Z],j.touch0&&j.touch0[2]===A.identifier?delete j.touch0:j.touch1&&j.touch1[2]===A.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(A=Ln(A,this),Math.hypot(g[0]-A[0],g[1]-A[1])<N)){var z=mn(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return w.wheelDelta=function(I){return arguments.length?(a=typeof I=="function"?I:Zu(+I),w):a},w.filter=function(I){return arguments.length?(e=typeof I=="function"?I:Zu(!!I),w):e},w.touchable=function(I){return arguments.length?(o=typeof I=="function"?I:Zu(!!I),w):o},w.extent=function(I){return arguments.length?(t=typeof I=="function"?I:Zu([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),w):t},w.scaleExtent=function(I){return arguments.length?(l[0]=+I[0],l[1]=+I[1],w):[l[0],l[1]]},w.translateExtent=function(I){return arguments.length?(u[0][0]=+I[0][0],u[1][0]=+I[1][0],u[0][1]=+I[0][1],u[1][1]=+I[1][1],w):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},w.constrain=function(I){return arguments.length?(r=I,w):r},w.duration=function(I){return arguments.length?(f=+I,w):f},w.interpolate=function(I){return arguments.length?(h=I,w):h},w.on=function(){var I=d.on.apply(d,arguments);return I===d?w:I},w.clickDistance=function(I){return arguments.length?(E=(I=+I)*I,w):Math.sqrt(E)},w.tapDistance=function(I){return arguments.length?(N=+I,w):N},w}const Jn={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:r,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:a}", 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."},nl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],lw=["Enter"," ","Escape"],uw={"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:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var yo;(function(e){e.Strict="strict",e.Loose="loose"})(yo||(yo={}));var Ji;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ji||(Ji={}));var rl;(function(e){e.Partial="partial",e.Full="full"})(rl||(rl={}));const cw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var li;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(li||(li={}));var Ac;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ac||(Ac={}));var ve;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ve||(ve={}));const Wv={[ve.Left]:ve.Right,[ve.Right]:ve.Left,[ve.Top]:ve.Bottom,[ve.Bottom]:ve.Top};function fw(e){return e===null?null:e?"valid":"invalid"}const dw=e=>"id"in e&&"source"in e&&"target"in e,k3=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),_m=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),hl=(e,t=[0,0])=>{const{width:r,height:a}=Tr(e),o=e.origin??t,l=r*o[0],u=a*o[1];return{x:e.position.x-l,y:e.position.y-u}},T3=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((a,o)=>{const l=typeof o=="string";let u=!t.nodeLookup&&!l?o:void 0;t.nodeLookup&&(u=l?t.nodeLookup.get(o):_m(o)?o:t.nodeLookup.get(o.id));const f=u?Rc(u,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Qc(a,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Zc(r)},pl=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(r=Qc(r,Rc(o)),a=!0)}),a?Zc(r):{x:0,y:0,width:0,height:0}},Nm=(e,t,[r,a,o]=[0,0,1],l=!1,u=!1)=>{const f={...gl(t,[r,a,o]),width:t.width/o,height:t.height/o},h=[];for(const d of e.values()){const{measured:p,selectable:g=!0,hidden:y=!1}=d;if(u&&!g||y)continue;const v=p.width??d.width??d.initialWidth??null,S=p.height??d.height??d.initialHeight??null,E=il(f,vo(d)),N=(v??0)*(S??0),w=l&&E>0;(!d.internals.handleBounds||w||E>=N||d.dragging)&&h.push(d)}return h},A3=(e,t)=>{const r=new Set;return e.forEach(a=>{r.add(a.id)}),t.filter(a=>r.has(a.source)||r.has(a.target))};function R3(e,t){const r=new Map,a=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&(t?.includeHiddenNodes||!o.hidden)&&(!a||a.has(o.id))&&r.set(o.id,o)}),r}async function O3({nodes:e,width:t,height:r,panZoom:a,minZoom:o,maxZoom:l},u){if(e.size===0)return Promise.resolve(!0);const f=R3(e,u),h=pl(f),d=Mm(h,t,r,u?.minZoom??o,u?.maxZoom??l,u?.padding??.1);return await a.setViewport(d,{duration:u?.duration,ease:u?.ease,interpolate:u?.interpolate}),Promise.resolve(!0)}function hw({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:o,onError:l}){const u=r.get(e),f=u.parentId?r.get(u.parentId):void 0,{x:h,y:d}=f?f.internals.positionAbsolute:{x:0,y:0},p=u.origin??a;let g=u.extent||o;if(u.extent==="parent"&&!u.expandParent)if(!f)l?.("005",Jn.error005());else{const v=f.measured.width,S=f.measured.height;v&&S&&(g=[[h,d],[h+v,d+S]])}else f&&bo(u.extent)&&(g=[[u.extent[0][0]+h,u.extent[0][1]+d],[u.extent[1][0]+h,u.extent[1][1]+d]]);const y=bo(g)?ra(t,g,u.measured):t;return(u.measured.width===void 0||u.measured.height===void 0)&&l?.("015",Jn.error015()),{position:{x:y.x-h+(u.measured.width??0)*p[0],y:y.y-d+(u.measured.height??0)*p[1]},positionAbsolute:y}}async function j3({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:a,onBeforeDelete:o}){const l=new Set(e.map(y=>y.id)),u=[];for(const y of r){if(y.deletable===!1)continue;const v=l.has(y.id),S=!v&&y.parentId&&u.find(E=>E.id===y.parentId);(v||S)&&u.push(y)}const f=new Set(t.map(y=>y.id)),h=a.filter(y=>y.deletable!==!1),p=A3(u,h);for(const y of h)f.has(y.id)&&!p.find(S=>S.id===y.id)&&p.push(y);if(!o)return{edges:p,nodes:u};const g=await o({nodes:u,edges:p});return typeof g=="boolean"?g?{edges:p,nodes:u}:{edges:[],nodes:[]}:g}const xo=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),ra=(e={x:0,y:0},t,r)=>({x:xo(e.x,t[0][0],t[1][0]-(r?.width??0)),y:xo(e.y,t[0][1],t[1][1]-(r?.height??0))});function pw(e,t,r){const{width:a,height:o}=Tr(r),{x:l,y:u}=r.internals.positionAbsolute;return ra(e,[[l,u],[l+a,u+o]],t)}const Jv=(e,t,r)=>e<t?xo(Math.abs(e-t),1,t)/t:e>r?-xo(Math.abs(e-r),1,t)/t:0,mw=(e,t,r=15,a=40)=>{const o=Jv(e.x,a,t.width-a)*r,l=Jv(e.y,a,t.height-a)*r;return[o,l]},Qc=(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)}),Dp=({x:e,y:t,width:r,height:a})=>({x:e,y:t,x2:e+r,y2:t+a}),Zc=({x:e,y:t,x2:r,y2:a})=>({x:e,y:t,width:r-e,height:a-t}),vo=(e,t=[0,0])=>{const{x:r,y:a}=_m(e)?e.internals.positionAbsolute:hl(e,t);return{x:r,y:a,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Rc=(e,t=[0,0])=>{const{x:r,y:a}=_m(e)?e.internals.positionAbsolute:hl(e,t);return{x:r,y:a,x2:r+(e.measured?.width??e.width??e.initialWidth??0),y2:a+(e.measured?.height??e.height??e.initialHeight??0)}},gw=(e,t)=>Zc(Qc(Dp(e),Dp(t))),il=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),a=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*a)},eb=e=>Bn(e.width)&&Bn(e.height)&&Bn(e.x)&&Bn(e.y),Bn=e=>!isNaN(e)&&isFinite(e),D3=(e,t)=>{},ml=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),gl=({x:e,y:t},[r,a,o],l=!1,u=[1,1])=>{const f={x:(e-r)/o,y:(t-a)/o};return l?ml(f,u):f},Oc=({x:e,y:t},[r,a,o])=>({x:e*o+r,y:t*o+a});function Za(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.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 z3(e,t,r){if(typeof e=="string"||typeof e=="number"){const a=Za(e,r),o=Za(e,t);return{top:a,right:o,bottom:a,left:o,x:o*2,y:a*2}}if(typeof e=="object"){const a=Za(e.top??e.y??0,r),o=Za(e.bottom??e.y??0,r),l=Za(e.left??e.x??0,t),u=Za(e.right??e.x??0,t);return{top:a,right:u,bottom:o,left:l,x:l+u,y:a+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function L3(e,t,r,a,o,l){const{x:u,y:f}=Oc(e,[t,r,a]),{x:h,y:d}=Oc({x:e.x+e.width,y:e.y+e.height},[t,r,a]),p=o-h,g=l-d;return{left:Math.floor(u),top:Math.floor(f),right:Math.floor(p),bottom:Math.floor(g)}}const Mm=(e,t,r,a,o,l)=>{const u=z3(l,t,r),f=(t-u.x)/e.width,h=(r-u.y)/e.height,d=Math.min(f,h),p=xo(d,a,o),g=e.x+e.width/2,y=e.y+e.height/2,v=t/2-g*p,S=r/2-y*p,E=L3(e,v,S,p,t,r),N={left:Math.min(E.left-u.left,0),top:Math.min(E.top-u.top,0),right:Math.min(E.right-u.right,0),bottom:Math.min(E.bottom-u.bottom,0)};return{x:v-N.left+N.right,y:S-N.top+N.bottom,zoom:p}},al=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function bo(e){return e!=null&&e!=="parent"}function Tr(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function yw(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function xw(e,t={width:0,height:0},r,a,o){const l={...e},u=a.get(r);if(u){const f=u.origin||o;l.x+=u.internals.positionAbsolute.x-(t.width??0)*f[0],l.y+=u.internals.positionAbsolute.y-(t.height??0)*f[1]}return l}function tb(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function I3(){let e,t;return{promise:new Promise((a,o)=>{e=a,t=o}),resolve:e,reject:t}}function B3(e){return{...uw,...e||{}}}function Is(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:a,containerBounds:o}){const{x:l,y:u}=Hn(e),f=gl({x:l-(o?.left??0),y:u-(o?.top??0)},a),{x:h,y:d}=r?ml(f,t):f;return{xSnapped:h,ySnapped:d,...f}}const km=e=>({width:e.offsetWidth,height:e.offsetHeight}),vw=e=>e?.getRootNode?.()||window?.document,H3=["INPUT","SELECT","TEXTAREA"];function bw(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:H3.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Sw=e=>"clientX"in e,Hn=(e,t)=>{const r=Sw(e),a=r?e.clientX:e.touches?.[0].clientX,o=r?e.clientY:e.touches?.[0].clientY;return{x:a-(t?.left??0),y:o-(t?.top??0)}},nb=(e,t,r,a,o)=>{const l=t.querySelectorAll(`.${e}`);return!l||!l.length?null:Array.from(l).map(u=>{const f=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:o,position:u.getAttribute("data-handlepos"),x:(f.left-r.left)/a,y:(f.top-r.top)/a,...km(u)}})};function ww({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:f}){const h=e*.125+o*.375+u*.375+r*.125,d=t*.125+l*.375+f*.375+a*.125,p=Math.abs(h-e),g=Math.abs(d-t);return[h,d,p,g]}function Ku(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function rb({pos:e,x1:t,y1:r,x2:a,y2:o,c:l}){switch(e){case ve.Left:return[t-Ku(t-a,l),r];case ve.Right:return[t+Ku(a-t,l),r];case ve.Top:return[t,r-Ku(r-o,l)];case ve.Bottom:return[t,r+Ku(o-r,l)]}}function Ew({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:a,targetY:o,targetPosition:l=ve.Top,curvature:u=.25}){const[f,h]=rb({pos:r,x1:e,y1:t,x2:a,y2:o,c:u}),[d,p]=rb({pos:l,x1:a,y1:o,x2:e,y2:t,c:u}),[g,y,v,S]=ww({sourceX:e,sourceY:t,targetX:a,targetY:o,sourceControlX:f,sourceControlY:h,targetControlX:d,targetControlY:p});return[`M${e},${t} C${f},${h} ${d},${p} ${a},${o}`,g,y,v,S]}function Cw({sourceX:e,sourceY:t,targetX:r,targetY:a}){const o=Math.abs(r-e)/2,l=r<e?r+o:r-o,u=Math.abs(a-t)/2,f=a<t?a+u:a-u;return[l,f,o,u]}function P3({sourceNode:e,targetNode:t,selected:r=!1,zIndex:a=0,elevateOnSelect:o=!1,zIndexMode:l="basic"}){if(l==="manual")return a;const u=o&&r?a+1e3:a,f=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return u+f}function U3({sourceNode:e,targetNode:t,width:r,height:a,transform:o}){const l=Qc(Rc(e),Rc(t));l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const u={x:-o[0]/o[2],y:-o[1]/o[2],width:r/o[2],height:a/o[2]};return il(u,Zc(l))>0}const q3=({source:e,sourceHandle:t,target:r,targetHandle:a})=>`xy-edge__${e}${t||""}-${r}${a||""}`,V3=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),F3=(e,t,r={})=>{if(!e.source||!e.target)return t;const a=r.getEdgeId||q3;let o;return dw(e)?o={...e}:o={...e,id:a(e)},V3(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function _w({sourceX:e,sourceY:t,targetX:r,targetY:a}){const[o,l,u,f]=Cw({sourceX:e,sourceY:t,targetX:r,targetY:a});return[`M ${e},${t}L ${r},${a}`,o,l,u,f]}const ib={[ve.Left]:{x:-1,y:0},[ve.Right]:{x:1,y:0},[ve.Top]:{x:0,y:-1},[ve.Bottom]:{x:0,y:1}},Y3=({source:e,sourcePosition:t=ve.Bottom,target:r})=>t===ve.Left||t===ve.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},ab=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function $3({source:e,sourcePosition:t=ve.Bottom,target:r,targetPosition:a=ve.Top,center:o,offset:l,stepPosition:u}){const f=ib[t],h=ib[a],d={x:e.x+f.x*l,y:e.y+f.y*l},p={x:r.x+h.x*l,y:r.y+h.y*l},g=Y3({source:d,sourcePosition:t,target:p}),y=g.x!==0?"x":"y",v=g[y];let S=[],E,N;const w={x:0,y:0},O={x:0,y:0},[,,_,M]=Cw({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(f[y]*h[y]===-1){y==="x"?(E=o.x??d.x+(p.x-d.x)*u,N=o.y??(d.y+p.y)/2):(E=o.x??(d.x+p.x)/2,N=o.y??d.y+(p.y-d.y)*u);const U=[{x:E,y:d.y},{x:E,y:p.y}],H=[{x:d.x,y:N},{x:p.x,y:N}];f[y]===v?S=y==="x"?U:H:S=y==="x"?H:U}else{const U=[{x:d.x,y:p.y}],H=[{x:p.x,y:d.y}];if(y==="x"?S=f.x===v?H:U:S=f.y===v?U:H,t===a){const I=Math.abs(e[y]-r[y]);if(I<=l){const V=Math.min(l-1,l-I);f[y]===v?w[y]=(d[y]>e[y]?-1:1)*V:O[y]=(p[y]>r[y]?-1:1)*V}}if(t!==a){const I=y==="x"?"y":"x",V=f[y]===h[I],j=d[I]>p[I],F=d[I]<p[I];(f[y]===1&&(!V&&j||V&&F)||f[y]!==1&&(!V&&F||V&&j))&&(S=y==="x"?U:H)}const q={x:d.x+w.x,y:d.y+w.y},L={x:p.x+O.x,y:p.y+O.y},P=Math.max(Math.abs(q.x-S[0].x),Math.abs(L.x-S[0].x)),K=Math.max(Math.abs(q.y-S[0].y),Math.abs(L.y-S[0].y));P>=K?(E=(q.x+L.x)/2,N=S[0].y):(E=S[0].x,N=(q.y+L.y)/2)}const B={x:d.x+w.x,y:d.y+w.y},k={x:p.x+O.x,y:p.y+O.y};return[[e,...B.x!==S[0].x||B.y!==S[0].y?[B]:[],...S,...k.x!==S[S.length-1].x||k.y!==S[S.length-1].y?[k]:[],r],E,N,_,M]}function G3(e,t,r,a){const o=Math.min(ab(e,t)/2,ab(t,r)/2,a),{x:l,y:u}=t;if(e.x===l&&l===r.x||e.y===u&&u===r.y)return`L${l} ${u}`;if(e.y===u){const d=e.x<r.x?-1:1,p=e.y<r.y?1:-1;return`L ${l+o*d},${u}Q ${l},${u} ${l},${u+o*p}`}const f=e.x<r.x?1:-1,h=e.y<r.y?-1:1;return`L ${l},${u+o*h}Q ${l},${u} ${l+o*f},${u}`}function zp({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:a,targetY:o,targetPosition:l=ve.Top,borderRadius:u=5,centerX:f,centerY:h,offset:d=20,stepPosition:p=.5}){const[g,y,v,S,E]=$3({source:{x:e,y:t},sourcePosition:r,target:{x:a,y:o},targetPosition:l,center:{x:f,y:h},offset:d,stepPosition:p});let N=`M${g[0].x} ${g[0].y}`;for(let w=1;w<g.length-1;w++)N+=G3(g[w-1],g[w],g[w+1],u);return N+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[N,y,v,S,E]}function ob(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function X3(e){const{sourceNode:t,targetNode:r}=e;if(!ob(t)||!ob(r))return null;const a=t.internals.handleBounds||sb(t.handles),o=r.internals.handleBounds||sb(r.handles),l=lb(a?.source??[],e.sourceHandle),u=lb(e.connectionMode===yo.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!l||!u)return e.onError?.("008",Jn.error008(l?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=l?.position||ve.Bottom,h=u?.position||ve.Top,d=ia(t,l,f),p=ia(r,u,h);return{sourceX:d.x,sourceY:d.y,targetX:p.x,targetY:p.y,sourcePosition:f,targetPosition:h}}function sb(e){if(!e)return null;const t=[],r=[];for(const a of e)a.width=a.width??1,a.height=a.height??1,a.type==="source"?t.push(a):a.type==="target"&&r.push(a);return{source:t,target:r}}function ia(e,t,r=ve.Left,a=!1){const o=(t?.x??0)+e.internals.positionAbsolute.x,l=(t?.y??0)+e.internals.positionAbsolute.y,{width:u,height:f}=t??Tr(e);if(a)return{x:o+u/2,y:l+f/2};switch(t?.position??r){case ve.Top:return{x:o+u/2,y:l};case ve.Right:return{x:o+u,y:l+f/2};case ve.Bottom:return{x:o+u/2,y:l+f};case ve.Left:return{x:o,y:l+f/2}}}function lb(e,t){return e&&(t?e.find(r=>r.id===t):e[0])||null}function Lp(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function Q3(e,{id:t,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:o}){const l=new Set;return e.reduce((u,f)=>([f.markerStart||a,f.markerEnd||o].forEach(h=>{if(h&&typeof h=="object"){const d=Lp(h,t);l.has(d)||(u.push({id:d,color:h.color||r,...h}),l.add(d))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))}const Nw=1e3,Z3=10,Tm={nodeOrigin:[0,0],nodeExtent:nl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},K3={...Tm,checkEquality:!0};function Am(e,t){const r={...e};for(const a in t)t[a]!==void 0&&(r[a]=t[a]);return r}function W3(e,t,r){const a=Am(Tm,r);for(const o of e.values())if(o.parentId)Om(o,e,t,a);else{const l=hl(o,a.nodeOrigin),u=bo(o.extent)?o.extent:a.nodeExtent,f=ra(l,u,Tr(o));o.internals.positionAbsolute=f}}function J3(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const r=[],a=[];for(const o of e.handles){const l={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?r.push(l):o.type==="target"&&a.push(l)}return{source:r,target:a}}function Rm(e){return e==="manual"}function Ip(e,t,r,a={}){const o=Am(K3,a),l={i:0},u=new Map(t),f=o?.elevateNodesOnSelect&&!Rm(o.zIndexMode)?Nw:0;let h=e.length>0,d=!1;t.clear(),r.clear();for(const p of e){let g=u.get(p.id);if(o.checkEquality&&p===g?.internals.userNode)t.set(p.id,g);else{const y=hl(p,o.nodeOrigin),v=bo(p.extent)?p.extent:o.nodeExtent,S=ra(y,v,Tr(p));g={...o.defaults,...p,measured:{width:p.measured?.width,height:p.measured?.height},internals:{positionAbsolute:S,handleBounds:J3(p,g),z:Mw(p,f,o.zIndexMode),userNode:p}},t.set(p.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(h=!1),p.parentId&&Om(g,t,r,a,l),d||=p.selected??!1}return{nodesInitialized:h,hasSelectedNodes:d}}function eO(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Om(e,t,r,a,o){const{elevateNodesOnSelect:l,nodeOrigin:u,nodeExtent:f,zIndexMode:h}=Am(Tm,a),d=e.parentId,p=t.get(d);if(!p){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}eO(e,r),o&&!p.parentId&&p.internals.rootParentIndex===void 0&&h==="auto"&&(p.internals.rootParentIndex=++o.i,p.internals.z=p.internals.z+o.i*Z3),o&&p.internals.rootParentIndex!==void 0&&(o.i=p.internals.rootParentIndex);const g=l&&!Rm(h)?Nw:0,{x:y,y:v,z:S}=tO(e,p,u,f,g,h),{positionAbsolute:E}=e.internals,N=y!==E.x||v!==E.y;(N||S!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:N?{x:y,y:v}:E,z:S}})}function Mw(e,t,r){const a=Bn(e.zIndex)?e.zIndex:0;return Rm(r)?a:a+(e.selected?t:0)}function tO(e,t,r,a,o,l){const{x:u,y:f}=t.internals.positionAbsolute,h=Tr(e),d=hl(e,r),p=bo(e.extent)?ra(d,e.extent,h):d;let g=ra({x:u+p.x,y:f+p.y},a,h);e.extent==="parent"&&(g=pw(g,h,t));const y=Mw(e,o,l),v=t.internals.z??0;return{x:g.x,y:g.y,z:v>=y?v+1:y}}function jm(e,t,r,a=[0,0]){const o=[],l=new Map;for(const u of e){const f=t.get(u.parentId);if(!f)continue;const h=l.get(u.parentId)?.expandedRect??vo(f),d=gw(h,u.rect);l.set(u.parentId,{expandedRect:d,parent:f})}return l.size>0&&l.forEach(({expandedRect:u,parent:f},h)=>{const d=f.internals.positionAbsolute,p=Tr(f),g=f.origin??a,y=u.x<d.x?Math.round(Math.abs(d.x-u.x)):0,v=u.y<d.y?Math.round(Math.abs(d.y-u.y)):0,S=Math.max(p.width,Math.round(u.width)),E=Math.max(p.height,Math.round(u.height)),N=(S-p.width)*g[0],w=(E-p.height)*g[1];(y>0||v>0||N||w)&&(o.push({id:h,type:"position",position:{x:f.position.x-y+N,y:f.position.y-v+w}}),r.get(h)?.forEach(O=>{e.some(_=>_.id===O.id)||o.push({id:O.id,type:"position",position:{x:O.position.x+y,y:O.position.y+v}})})),(p.width<u.width||p.height<u.height||y||v)&&o.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:S+(y?g[0]*y-N:0),height:E+(v?g[1]*v-w:0)}})}),o}function nO(e,t,r,a,o,l,u){const f=a?.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const d=[],p=window.getComputedStyle(f),{m22:g}=new window.DOMMatrixReadOnly(p.transform),y=[];for(const v of e.values()){const S=t.get(v.id);if(!S)continue;if(S.hidden){t.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),h=!0;continue}const E=km(v.nodeElement),N=S.measured.width!==E.width||S.measured.height!==E.height;if(!!(E.width&&E.height&&(N||!S.internals.handleBounds||v.force))){const O=v.nodeElement.getBoundingClientRect(),_=bo(S.extent)?S.extent:l;let{positionAbsolute:M}=S.internals;S.parentId&&S.extent==="parent"?M=pw(M,E,t.get(S.parentId)):_&&(M=ra(M,_,E));const B={...S,measured:E,internals:{...S.internals,positionAbsolute:M,handleBounds:{source:nb("source",v.nodeElement,O,g,S.id),target:nb("target",v.nodeElement,O,g,S.id)}}};t.set(S.id,B),S.parentId&&Om(B,t,r,{nodeOrigin:o,zIndexMode:u}),h=!0,N&&(d.push({id:S.id,type:"dimensions",dimensions:E}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:vo(B,o)}))}}if(y.length>0){const v=jm(y,t,r,o);d.push(...v)}return{changes:d,updatedInternals:h}}async function rO({delta:e,panZoom:t,transform:r,translateExtent:a,width:o,height:l}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const u=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[o,l]],a),f=!!u&&(u.x!==r[0]||u.y!==r[1]||u.k!==r[2]);return Promise.resolve(f)}function ub(e,t,r,a,o,l){let u=o;const f=a.get(u)||new Map;a.set(u,f.set(r,t)),u=`${o}-${e}`;const h=a.get(u)||new Map;if(a.set(u,h.set(r,t)),l){u=`${o}-${e}-${l}`;const d=a.get(u)||new Map;a.set(u,d.set(r,t))}}function kw(e,t,r){e.clear(),t.clear();for(const a of r){const{source:o,target:l,sourceHandle:u=null,targetHandle:f=null}=a,h={edgeId:a.id,source:o,target:l,sourceHandle:u,targetHandle:f},d=`${o}-${u}--${l}-${f}`,p=`${l}-${f}--${o}-${u}`;ub("source",h,p,e,o,u),ub("target",h,d,e,l,f),t.set(a.id,a)}}function Tw(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:Tw(r,t):!1}function cb(e,t,r){let a=e;do{if(a?.matches?.(t))return!0;if(a===r)return!1;a=a?.parentElement}while(a);return!1}function iO(e,t,r,a){const o=new Map;for(const[l,u]of e)if((u.selected||u.id===a)&&(!u.parentId||!Tw(u,e))&&(u.draggable||t&&typeof u.draggable>"u")){const f=e.get(l);f&&o.set(l,{id:l,position:f.position||{x:0,y:0},distance:{x:r.x-f.internals.positionAbsolute.x,y:r.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return o}function Fh({nodeId:e,dragItems:t,nodeLookup:r,dragging:a=!0}){const o=[];for(const[u,f]of t){const h=r.get(u)?.internals.userNode;h&&o.push({...h,position:f.position,dragging:a})}if(!e)return[o[0],o];const l=r.get(e)?.internals.userNode;return[l?{...l,position:t.get(e)?.position||l.position,dragging:a}:o[0],o]}function aO({dragItems:e,snapGrid:t,x:r,y:a}){const o=e.values().next().value;if(!o)return null;const l={x:r-o.distance.x,y:a-o.distance.y},u=ml(l,t);return{x:u.x-l.x,y:u.y-l.y}}function oO({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:a,onDragStop:o}){let l={x:null,y:null},u=0,f=new Map,h=!1,d={x:0,y:0},p=null,g=!1,y=null,v=!1,S=!1,E=null;function N({noDragClassName:O,handleSelector:_,domNode:M,isSelectable:B,nodeId:k,nodeClickDistance:D=0}){y=mn(M);function U({x:P,y:K}){const{nodeLookup:I,nodeExtent:V,snapGrid:j,snapToGrid:F,nodeOrigin:X,onNodeDrag:Z,onSelectionDrag:A,onError:z,updateNodePositions:$}=t();l={x:P,y:K};let R=!1;const te=f.size>1,ue=te&&V?Dp(pl(f)):null,ce=te&&F?aO({dragItems:f,snapGrid:j,x:P,y:K}):null;for(const[fe,le]of f){if(!I.has(fe))continue;let pe={x:P-le.distance.x,y:K-le.distance.y};F&&(pe=ce?{x:Math.round(pe.x+ce.x),y:Math.round(pe.y+ce.y)}:ml(pe,j));let be=null;if(te&&V&&!le.extent&&ue){const{positionAbsolute:we}=le.internals,Re=we.x-ue.x+V[0][0],He=we.x+le.measured.width-ue.x2+V[1][0],Ie=we.y-ue.y+V[0][1],Qe=we.y+le.measured.height-ue.y2+V[1][1];be=[[Re,Ie],[He,Qe]]}const{position:Se,positionAbsolute:ye}=hw({nodeId:fe,nextPosition:pe,nodeLookup:I,nodeExtent:be||V,nodeOrigin:X,onError:z});R=R||le.position.x!==Se.x||le.position.y!==Se.y,le.position=Se,le.internals.positionAbsolute=ye}if(S=S||R,!!R&&($(f,!0),E&&(a||Z||!k&&A))){const[fe,le]=Fh({nodeId:k,dragItems:f,nodeLookup:I});a?.(E,f,fe,le),Z?.(E,fe,le),k||A?.(E,le)}}async function H(){if(!p)return;const{transform:P,panBy:K,autoPanSpeed:I,autoPanOnNodeDrag:V}=t();if(!V){h=!1,cancelAnimationFrame(u);return}const[j,F]=mw(d,p,I);(j!==0||F!==0)&&(l.x=(l.x??0)-j/P[2],l.y=(l.y??0)-F/P[2],await K({x:j,y:F})&&U(l)),u=requestAnimationFrame(H)}function q(P){const{nodeLookup:K,multiSelectionActive:I,nodesDraggable:V,transform:j,snapGrid:F,snapToGrid:X,selectNodesOnDrag:Z,onNodeDragStart:A,onSelectionDragStart:z,unselectNodesAndEdges:$}=t();g=!0,(!Z||!B)&&!I&&k&&(K.get(k)?.selected||$()),B&&Z&&k&&e?.(k);const R=Is(P.sourceEvent,{transform:j,snapGrid:F,snapToGrid:X,containerBounds:p});if(l=R,f=iO(K,V,R,k),f.size>0&&(r||A||!k&&z)){const[te,ue]=Fh({nodeId:k,dragItems:f,nodeLookup:K});r?.(P.sourceEvent,f,te,ue),A?.(P.sourceEvent,te,ue),k||z?.(P.sourceEvent,ue)}}const L=$S().clickDistance(D).on("start",P=>{const{domNode:K,nodeDragThreshold:I,transform:V,snapGrid:j,snapToGrid:F}=t();p=K?.getBoundingClientRect()||null,v=!1,S=!1,E=P.sourceEvent,I===0&&q(P),l=Is(P.sourceEvent,{transform:V,snapGrid:j,snapToGrid:F,containerBounds:p}),d=Hn(P.sourceEvent,p)}).on("drag",P=>{const{autoPanOnNodeDrag:K,transform:I,snapGrid:V,snapToGrid:j,nodeDragThreshold:F,nodeLookup:X}=t(),Z=Is(P.sourceEvent,{transform:I,snapGrid:V,snapToGrid:j,containerBounds:p});if(E=P.sourceEvent,(P.sourceEvent.type==="touchmove"&&P.sourceEvent.touches.length>1||k&&!X.has(k))&&(v=!0),!v){if(!h&&K&&g&&(h=!0,H()),!g){const A=Hn(P.sourceEvent,p),z=A.x-d.x,$=A.y-d.y;Math.sqrt(z*z+$*$)>F&&q(P)}(l.x!==Z.xSnapped||l.y!==Z.ySnapped)&&f&&g&&(d=Hn(P.sourceEvent,p),U(Z))}}).on("end",P=>{if(!(!g||v)&&(h=!1,g=!1,cancelAnimationFrame(u),f.size>0)){const{nodeLookup:K,updateNodePositions:I,onNodeDragStop:V,onSelectionDragStop:j}=t();if(S&&(I(f,!1),S=!1),o||V||!k&&j){const[F,X]=Fh({nodeId:k,dragItems:f,nodeLookup:K,dragging:!1});o?.(P.sourceEvent,f,F,X),V?.(P.sourceEvent,F,X),k||j?.(P.sourceEvent,X)}}}).filter(P=>{const K=P.target;return!P.button&&(!O||!cb(K,`.${O}`,M))&&(!_||cb(K,_,M))});y.call(L)}function w(){y?.on(".drag",null)}return{update:N,destroy:w}}function sO(e,t,r){const a=[],o={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const l of t.values())il(o,vo(l))>0&&a.push(l);return a}const lO=250;function uO(e,t,r,a){let o=[],l=1/0;const u=sO(e,r,t+lO);for(const f of u){const h=[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]];for(const d of h){if(a.nodeId===d.nodeId&&a.type===d.type&&a.id===d.id)continue;const{x:p,y:g}=ia(f,d,d.position,!0),y=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(g-e.y,2));y>t||(y<l?(o=[{...d,x:p,y:g}],l=y):y===l&&o.push({...d,x:p,y:g}))}}if(!o.length)return null;if(o.length>1){const f=a.type==="source"?"target":"source";return o.find(h=>h.type===f)??o[0]}return o[0]}function Aw(e,t,r,a,o,l=!1){const u=a.get(e);if(!u)return null;const f=o==="strict"?u.internals.handleBounds?.[t]:[...u.internals.handleBounds?.source??[],...u.internals.handleBounds?.target??[]],h=(r?f?.find(d=>d.id===r):f?.[0])??null;return h&&l?{...h,...ia(u,h,h.position,!0)}:h}function Rw(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function cO(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const Ow=()=>!0;function fO(e,{connectionMode:t,connectionRadius:r,handleId:a,nodeId:o,edgeUpdaterType:l,isTarget:u,domNode:f,nodeLookup:h,lib:d,autoPanOnConnect:p,flowId:g,panBy:y,cancelConnection:v,onConnectStart:S,onConnect:E,onConnectEnd:N,isValidConnection:w=Ow,onReconnectEnd:O,updateConnection:_,getTransform:M,getFromHandle:B,autoPanSpeed:k,dragThreshold:D=1,handleDomNode:U}){const H=vw(e.target);let q=0,L;const{x:P,y:K}=Hn(e),I=Rw(l,U),V=f?.getBoundingClientRect();let j=!1;if(!V||!I)return;const F=Aw(o,I,a,h,t);if(!F)return;let X=Hn(e,V),Z=!1,A=null,z=!1,$=null;function R(){if(!p||!V)return;const[Se,ye]=mw(X,V,k);y({x:Se,y:ye}),q=requestAnimationFrame(R)}const te={...F,nodeId:o,type:I,position:F.position},ue=h.get(o);let fe={inProgress:!0,isValid:null,from:ia(ue,te,ve.Left,!0),fromHandle:te,fromPosition:te.position,fromNode:ue,to:X,toHandle:null,toPosition:Wv[te.position],toNode:null,pointer:X};function le(){j=!0,_(fe),S?.(e,{nodeId:o,handleId:a,handleType:I})}D===0&&le();function pe(Se){if(!j){const{x:Qe,y:_t}=Hn(Se),it=Qe-P,Ot=_t-K;if(!(it*it+Ot*Ot>D*D))return;le()}if(!B()||!te){be(Se);return}const ye=M();X=Hn(Se,V),L=uO(gl(X,ye,!1,[1,1]),r,h,te),Z||(R(),Z=!0);const we=jw(Se,{handle:L,connectionMode:t,fromNodeId:o,fromHandleId:a,fromType:u?"target":"source",isValidConnection:w,doc:H,lib:d,flowId:g,nodeLookup:h});$=we.handleDomNode,A=we.connection,z=cO(!!L,we.isValid);const Re=h.get(o),He=Re?ia(Re,te,ve.Left,!0):fe.from,Ie={...fe,from:He,isValid:z,to:we.toHandle&&z?Oc({x:we.toHandle.x,y:we.toHandle.y},ye):X,toHandle:we.toHandle,toPosition:z&&we.toHandle?we.toHandle.position:Wv[te.position],toNode:we.toHandle?h.get(we.toHandle.nodeId):null,pointer:X};_(Ie),fe=Ie}function be(Se){if(!("touches"in Se&&Se.touches.length>0)){if(j){(L||$)&&A&&z&&E?.(A);const{inProgress:ye,...we}=fe,Re={...we,toPosition:fe.toHandle?fe.toPosition:null};N?.(Se,Re),l&&O?.(Se,Re)}v(),cancelAnimationFrame(q),Z=!1,z=!1,A=null,$=null,H.removeEventListener("mousemove",pe),H.removeEventListener("mouseup",be),H.removeEventListener("touchmove",pe),H.removeEventListener("touchend",be)}}H.addEventListener("mousemove",pe),H.addEventListener("mouseup",be),H.addEventListener("touchmove",pe),H.addEventListener("touchend",be)}function jw(e,{handle:t,connectionMode:r,fromNodeId:a,fromHandleId:o,fromType:l,doc:u,lib:f,flowId:h,isValidConnection:d=Ow,nodeLookup:p}){const g=l==="target",y=t?u.querySelector(`.${f}-flow__handle[data-id="${h}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:v,y:S}=Hn(e),E=u.elementFromPoint(v,S),N=E?.classList.contains(`${f}-flow__handle`)?E:y,w={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const O=Rw(void 0,N),_=N.getAttribute("data-nodeid"),M=N.getAttribute("data-handleid"),B=N.classList.contains("connectable"),k=N.classList.contains("connectableend");if(!_||!O)return w;const D={source:g?_:a,sourceHandle:g?M:o,target:g?a:_,targetHandle:g?o:M};w.connection=D;const H=B&&k&&(r===yo.Strict?g&&O==="source"||!g&&O==="target":_!==a||M!==o);w.isValid=H&&d(D),w.toHandle=Aw(_,O,M,p,r,!0)}return w}const Bp={onPointerDown:fO,isValid:jw};function dO({domNode:e,panZoom:t,getTransform:r,getViewScale:a}){const o=mn(e);function l({translateExtent:f,width:h,height:d,zoomStep:p=1,pannable:g=!0,zoomable:y=!0,inversePan:v=!1}){const S=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const M=r(),B=_.sourceEvent.ctrlKey&&al()?10:1,k=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*p,D=M[2]*Math.pow(2,k*B);t.scaleTo(D)};let E=[0,0];const N=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(E=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},w=_=>{const M=r();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const B=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],k=[B[0]-E[0],B[1]-E[1]];E=B;const D=a()*Math.max(M[2],Math.log(M[2]))*(v?-1:1),U={x:M[0]-k[0]*D,y:M[1]-k[1]*D},H=[[0,0],[h,d]];t.setViewportConstrained({x:U.x,y:U.y,zoom:M[2]},H,f)},O=sw().on("start",N).on("zoom",g?w:null).on("zoom.wheel",y?S:null);o.call(O,{})}function u(){o.on("zoom",null)}return{update:l,destroy:u,pointer:Ln}}const Kc=e=>({x:e.x,y:e.y,zoom:e.k}),Yh=({x:e,y:t,zoom:r})=>Xc.translate(e,t).scale(r),no=(e,t)=>e.target.closest(`.${t}`),Dw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hO=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,$h=(e,t=0,r=hO,a=()=>{})=>{const o=typeof t=="number"&&t>0;return o||a(),o?e.transition().duration(t).ease(r).on("end",a):e},zw=e=>{const t=e.ctrlKey&&al()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function pO({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:a,panOnScrollMode:o,panOnScrollSpeed:l,zoomOnPinch:u,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:d}){return p=>{if(no(p,t))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const g=r.property("__zoom").k||1;if(p.ctrlKey&&u){const N=Ln(p),w=zw(p),O=g*Math.pow(2,w);a.scaleTo(r,O,N,p);return}const y=p.deltaMode===1?20:1;let v=o===Ji.Vertical?0:p.deltaX*y,S=o===Ji.Horizontal?0:p.deltaY*y;!al()&&p.shiftKey&&o!==Ji.Vertical&&(v=p.deltaY*y,S=0),a.translateBy(r,-(v/g)*l,-(S/g)*l,{internal:!0});const E=Kc(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(h?.(p,E),e.panScrollTimeout=setTimeout(()=>{d?.(p,E),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,f?.(p,E))}}function mO({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(a,o){const l=a.type==="wheel",u=!t&&l&&!a.ctrlKey,f=no(a,e);if(a.ctrlKey&&l&&f&&a.preventDefault(),u||f)return null;a.preventDefault(),r.call(this,a,o)}}function gO({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return a=>{if(a.sourceEvent?.internal)return;const o=Kc(a.transform);e.mouseButton=a.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,a.sourceEvent?.type==="mousedown"&&t(!0),r&&r?.(a.sourceEvent,o)}}function yO({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:a,onPanZoom:o}){return l=>{e.usedRightMouseButton=!!(r&&Dw(t,e.mouseButton??0)),l.sourceEvent?.sync||a([l.transform.x,l.transform.y,l.transform.k]),o&&!l.sourceEvent?.internal&&o?.(l.sourceEvent,Kc(l.transform))}}function xO({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:o,onPaneContextMenu:l}){return u=>{if(!u.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,l&&Dw(t,e.mouseButton??0)&&!e.usedRightMouseButton&&u.sourceEvent&&l(u.sourceEvent),e.usedRightMouseButton=!1,a(!1),o)){const f=Kc(u.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(u.sourceEvent,f)},r?150:0)}}}function vO({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:a,panOnScroll:o,zoomOnDoubleClick:l,userSelectionActive:u,noWheelClassName:f,noPanClassName:h,lib:d,connectionInProgress:p}){return g=>{const y=e||t,v=r&&g.ctrlKey,S=g.type==="wheel";if(g.button===1&&g.type==="mousedown"&&(no(g,`${d}-flow__node`)||no(g,`${d}-flow__edge`)))return!0;if(!a&&!y&&!o&&!l&&!r||u||p&&!S||no(g,f)&&S||no(g,h)&&(!S||o&&S&&!e)||!r&&g.ctrlKey&&S)return!1;if(!r&&g.type==="touchstart"&&g.touches?.length>1)return g.preventDefault(),!1;if(!y&&!o&&!v&&S||!a&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(a)&&!a.includes(g.button)&&g.type==="mousedown")return!1;const E=Array.isArray(a)&&a.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||S)&&E}}function bO({domNode:e,minZoom:t,maxZoom:r,translateExtent:a,viewport:o,onPanZoom:l,onPanZoomStart:u,onPanZoomEnd:f,onDraggingChange:h}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),g=sw().scaleExtent([t,r]).translateExtent(a),y=mn(e).call(g);O({x:o.x,y:o.y,zoom:xo(o.zoom,t,r)},[[0,0],[p.width,p.height]],a);const v=y.on("wheel.zoom"),S=y.on("dblclick.zoom");g.wheelDelta(zw);function E(L,P){return y?new Promise(K=>{g?.interpolate(P?.interpolate==="linear"?Ls:fc).transform($h(y,P?.duration,P?.ease,()=>K(!0)),L)}):Promise.resolve(!1)}function N({noWheelClassName:L,noPanClassName:P,onPaneContextMenu:K,userSelectionActive:I,panOnScroll:V,panOnDrag:j,panOnScrollMode:F,panOnScrollSpeed:X,preventScrolling:Z,zoomOnPinch:A,zoomOnScroll:z,zoomOnDoubleClick:$,zoomActivationKeyPressed:R,lib:te,onTransformChange:ue,connectionInProgress:ce,paneClickDistance:fe,selectionOnDrag:le}){I&&!d.isZoomingOrPanning&&w();const pe=V&&!R&&!I;g.clickDistance(le?1/0:!Bn(fe)||fe<0?0:fe);const be=pe?pO({zoomPanValues:d,noWheelClassName:L,d3Selection:y,d3Zoom:g,panOnScrollMode:F,panOnScrollSpeed:X,zoomOnPinch:A,onPanZoomStart:u,onPanZoom:l,onPanZoomEnd:f}):mO({noWheelClassName:L,preventScrolling:Z,d3ZoomHandler:v});if(y.on("wheel.zoom",be,{passive:!1}),!I){const ye=gO({zoomPanValues:d,onDraggingChange:h,onPanZoomStart:u});g.on("start",ye);const we=yO({zoomPanValues:d,panOnDrag:j,onPaneContextMenu:!!K,onPanZoom:l,onTransformChange:ue});g.on("zoom",we);const Re=xO({zoomPanValues:d,panOnDrag:j,panOnScroll:V,onPaneContextMenu:K,onPanZoomEnd:f,onDraggingChange:h});g.on("end",Re)}const Se=vO({zoomActivationKeyPressed:R,panOnDrag:j,zoomOnScroll:z,panOnScroll:V,zoomOnDoubleClick:$,zoomOnPinch:A,userSelectionActive:I,noPanClassName:P,noWheelClassName:L,lib:te,connectionInProgress:ce});g.filter(Se),$?y.on("dblclick.zoom",S):y.on("dblclick.zoom",null)}function w(){g.on("zoom",null)}async function O(L,P,K){const I=Yh(L),V=g?.constrain()(I,P,K);return V&&await E(V),new Promise(j=>j(V))}async function _(L,P){const K=Yh(L);return await E(K,P),new Promise(I=>I(K))}function M(L){if(y){const P=Yh(L),K=y.property("__zoom");(K.k!==L.zoom||K.x!==L.x||K.y!==L.y)&&g?.transform(y,P,null,{sync:!0})}}function B(){const L=y?ow(y.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function k(L,P){return y?new Promise(K=>{g?.interpolate(P?.interpolate==="linear"?Ls:fc).scaleTo($h(y,P?.duration,P?.ease,()=>K(!0)),L)}):Promise.resolve(!1)}function D(L,P){return y?new Promise(K=>{g?.interpolate(P?.interpolate==="linear"?Ls:fc).scaleBy($h(y,P?.duration,P?.ease,()=>K(!0)),L)}):Promise.resolve(!1)}function U(L){g?.scaleExtent(L)}function H(L){g?.translateExtent(L)}function q(L){const P=!Bn(L)||L<0?0:L;g?.clickDistance(P)}return{update:N,destroy:w,setViewport:_,setViewportConstrained:O,getViewport:B,scaleTo:k,scaleBy:D,setScaleExtent:U,setTranslateExtent:H,syncViewport:M,setClickDistance:q}}var So;(function(e){e.Line="line",e.Handle="handle"})(So||(So={}));function SO({width:e,prevWidth:t,height:r,prevHeight:a,affectsX:o,affectsY:l}){const u=e-t,f=r-a,h=[u>0?1:u<0?-1:0,f>0?1:f<0?-1:0];return u&&o&&(h[0]=h[0]*-1),f&&l&&(h[1]=h[1]*-1),h}function fb(e){const t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),a=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:a,affectsY:o}}function ii(e,t){return Math.max(0,t-e)}function ai(e,t){return Math.max(0,e-t)}function Wu(e,t,r){return Math.max(0,t-e,e-r)}function db(e,t){return e?!t:t}function wO(e,t,r,a,o,l,u,f){let{affectsX:h,affectsY:d}=t;const{isHorizontal:p,isVertical:g}=t,y=p&&g,{xSnapped:v,ySnapped:S}=r,{minWidth:E,maxWidth:N,minHeight:w,maxHeight:O}=a,{x:_,y:M,width:B,height:k,aspectRatio:D}=e;let U=Math.floor(p?v-e.pointerX:0),H=Math.floor(g?S-e.pointerY:0);const q=B+(h?-U:U),L=k+(d?-H:H),P=-l[0]*B,K=-l[1]*k;let I=Wu(q,E,N),V=Wu(L,w,O);if(u){let X=0,Z=0;h&&U<0?X=ii(_+U+P,u[0][0]):!h&&U>0&&(X=ai(_+q+P,u[1][0])),d&&H<0?Z=ii(M+H+K,u[0][1]):!d&&H>0&&(Z=ai(M+L+K,u[1][1])),I=Math.max(I,X),V=Math.max(V,Z)}if(f){let X=0,Z=0;h&&U>0?X=ai(_+U,f[0][0]):!h&&U<0&&(X=ii(_+q,f[1][0])),d&&H>0?Z=ai(M+H,f[0][1]):!d&&H<0&&(Z=ii(M+L,f[1][1])),I=Math.max(I,X),V=Math.max(V,Z)}if(o){if(p){const X=Wu(q/D,w,O)*D;if(I=Math.max(I,X),u){let Z=0;!h&&!d||h&&!d&&y?Z=ai(M+K+q/D,u[1][1])*D:Z=ii(M+K+(h?U:-U)/D,u[0][1])*D,I=Math.max(I,Z)}if(f){let Z=0;!h&&!d||h&&!d&&y?Z=ii(M+q/D,f[1][1])*D:Z=ai(M+(h?U:-U)/D,f[0][1])*D,I=Math.max(I,Z)}}if(g){const X=Wu(L*D,E,N)/D;if(V=Math.max(V,X),u){let Z=0;!h&&!d||d&&!h&&y?Z=ai(_+L*D+P,u[1][0])/D:Z=ii(_+(d?H:-H)*D+P,u[0][0])/D,V=Math.max(V,Z)}if(f){let Z=0;!h&&!d||d&&!h&&y?Z=ii(_+L*D,f[1][0])/D:Z=ai(_+(d?H:-H)*D,f[0][0])/D,V=Math.max(V,Z)}}}H=H+(H<0?V:-V),U=U+(U<0?I:-I),o&&(y?q>L*D?H=(db(h,d)?-U:U)/D:U=(db(h,d)?-H:H)*D:p?(H=U/D,d=h):(U=H*D,h=d));const j=h?_+U:_,F=d?M+H:M;return{width:B+(h?-U:U),height:k+(d?-H:H),x:l[0]*U*(h?-1:1)+j,y:l[1]*H*(d?-1:1)+F}}const Lw={width:0,height:0,x:0,y:0},EO={...Lw,pointerX:0,pointerY:0,aspectRatio:1};function CO(e){return[[0,0],[e.measured.width,e.measured.height]]}function _O(e,t,r){const a=t.position.x+e.position.x,o=t.position.y+e.position.y,l=e.measured.width??0,u=e.measured.height??0,f=r[0]*l,h=r[1]*u;return[[a-f,o-h],[a+l-f,o+u-h]]}function NO({domNode:e,nodeId:t,getStoreItems:r,onChange:a,onEnd:o}){const l=mn(e);let u={controlDirection:fb("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:d,boundaries:p,keepAspectRatio:g,resizeDirection:y,onResizeStart:v,onResize:S,onResizeEnd:E,shouldResize:N}){let w={...Lw},O={...EO};u={boundaries:p,resizeDirection:y,keepAspectRatio:g,controlDirection:fb(d)};let _,M=null,B=[],k,D,U,H=!1;const q=$S().on("start",L=>{const{nodeLookup:P,transform:K,snapGrid:I,snapToGrid:V,nodeOrigin:j,paneDomNode:F}=r();if(_=P.get(t),!_)return;M=F?.getBoundingClientRect()??null;const{xSnapped:X,ySnapped:Z}=Is(L.sourceEvent,{transform:K,snapGrid:I,snapToGrid:V,containerBounds:M});w={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},O={...w,pointerX:X,pointerY:Z,aspectRatio:w.width/w.height},k=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(k=P.get(_.parentId),D=k&&_.extent==="parent"?CO(k):void 0),B=[],U=void 0;for(const[A,z]of P)if(z.parentId===t&&(B.push({id:A,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const $=_O(z,_,z.origin??j);U?U=[[Math.min($[0][0],U[0][0]),Math.min($[0][1],U[0][1])],[Math.max($[1][0],U[1][0]),Math.max($[1][1],U[1][1])]]:U=$}v?.(L,{...w})}).on("drag",L=>{const{transform:P,snapGrid:K,snapToGrid:I,nodeOrigin:V}=r(),j=Is(L.sourceEvent,{transform:P,snapGrid:K,snapToGrid:I,containerBounds:M}),F=[];if(!_)return;const{x:X,y:Z,width:A,height:z}=w,$={},R=_.origin??V,{width:te,height:ue,x:ce,y:fe}=wO(O,u.controlDirection,j,u.boundaries,u.keepAspectRatio,R,D,U),le=te!==A,pe=ue!==z,be=ce!==X&&le,Se=fe!==Z&&pe;if(!be&&!Se&&!le&&!pe)return;if((be||Se||R[0]===1||R[1]===1)&&($.x=be?ce:w.x,$.y=Se?fe:w.y,w.x=$.x,w.y=$.y,B.length>0)){const He=ce-X,Ie=fe-Z;for(const Qe of B)Qe.position={x:Qe.position.x-He+R[0]*(te-A),y:Qe.position.y-Ie+R[1]*(ue-z)},F.push(Qe)}if((le||pe)&&($.width=le&&(!u.resizeDirection||u.resizeDirection==="horizontal")?te:w.width,$.height=pe&&(!u.resizeDirection||u.resizeDirection==="vertical")?ue:w.height,w.width=$.width,w.height=$.height),k&&_.expandParent){const He=R[0]*($.width??0);$.x&&$.x<He&&(w.x=He,O.x=O.x-($.x-He));const Ie=R[1]*($.height??0);$.y&&$.y<Ie&&(w.y=Ie,O.y=O.y-($.y-Ie))}const ye=SO({width:w.width,prevWidth:A,height:w.height,prevHeight:z,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),we={...w,direction:ye};N?.(L,we)!==!1&&(H=!0,S?.(L,we),a($,F))}).on("end",L=>{H&&(E?.(L,{...w}),o?.({...w}),H=!1)});l.call(q)}function h(){l.on(".drag",null)}return{update:f,destroy:h}}const MO={},hb=e=>{let t;const r=new Set,a=(p,g)=>{const y=typeof p=="function"?p(t):p;if(!Object.is(y,t)){const v=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),r.forEach(S=>S(t,v))}},o=()=>t,h={setState:a,getState:o,getInitialState:()=>d,subscribe:p=>(r.add(p),()=>r.delete(p)),destroy:()=>{(MO?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},d=t=e(a,o,h);return h},kO=e=>e?hb(e):hb,{useDebugValue:TO}=co,{useSyncExternalStoreWithSelector:AO}=yM,RO=e=>e;function Iw(e,t=RO,r){const a=AO(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return TO(a),a}const pb=(e,t)=>{const r=kO(e),a=(o,l=t)=>Iw(r,o,l);return Object.assign(a,r),a},OO=(e,t)=>e?pb(e,t):pb;function st(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(const[a,o]of e)if(!Object.is(o,t.get(a)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const a of e)if(!t.has(a))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(t,a)||!Object.is(e[a],t[a]))return!1;return!0}const Wc=Y.createContext(null),jO=Wc.Provider,Bw=Jn.error001();function Ue(e,t){const r=Y.useContext(Wc);if(r===null)throw new Error(Bw);return Iw(r,e,t)}function lt(){const e=Y.useContext(Wc);if(e===null)throw new Error(Bw);return Y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const mb={display:"none"},DO={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Hw="react-flow__node-desc",Pw="react-flow__edge-desc",zO="react-flow__aria-live",LO=e=>e.ariaLiveMessage,IO=e=>e.ariaLabelConfig;function BO({rfId:e}){const t=Ue(LO);return b.jsx("div",{id:`${zO}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:DO,children:t})}function HO({rfId:e,disableKeyboardA11y:t}){const r=Ue(IO);return b.jsxs(b.Fragment,{children:[b.jsx("div",{id:`${Hw}-${e}`,style:mb,children:t?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),b.jsx("div",{id:`${Pw}-${e}`,style:mb,children:r["edge.a11yDescription.default"]}),!t&&b.jsx(BO,{rfId:e})]})}const Jc=Y.forwardRef(({position:e="top-left",children:t,className:r,style:a,...o},l)=>{const u=`${e}`.split("-");return b.jsx("div",{className:St(["react-flow__panel",r,...u]),style:a,ref:l,...o,children:t})});Jc.displayName="Panel";function PO({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:b.jsx(Jc,{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:b.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const UO=e=>{const t=[],r=[];for(const[,a]of e.nodeLookup)a.selected&&t.push(a.internals.userNode);for(const[,a]of e.edgeLookup)a.selected&&r.push(a);return{selectedNodes:t,selectedEdges:r}},Ju=e=>e.id;function qO(e,t){return st(e.selectedNodes.map(Ju),t.selectedNodes.map(Ju))&&st(e.selectedEdges.map(Ju),t.selectedEdges.map(Ju))}function VO({onSelectionChange:e}){const t=lt(),{selectedNodes:r,selectedEdges:a}=Ue(UO,qO);return Y.useEffect(()=>{const o={nodes:r,edges:a};e?.(o),t.getState().onSelectionChangeHandlers.forEach(l=>l(o))},[r,a,e]),null}const FO=e=>!!e.onSelectionChangeHandlers;function YO({onSelectionChange:e}){const t=Ue(FO);return e||t?b.jsx(VO,{onSelectionChange:e}):null}const Hp=typeof window<"u"?Y.useLayoutEffect:Y.useEffect,Uw=[0,0],$O={x:0,y:0,zoom:1},GO=["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"],gb=[...GO,"rfId"],XO=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}),yb={translateExtent:nl,nodeOrigin:Uw,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function QO(e){const{setNodes:t,setEdges:r,setMinZoom:a,setMaxZoom:o,setTranslateExtent:l,setNodeExtent:u,reset:f,setDefaultNodesAndEdges:h}=Ue(XO,st),d=lt();Hp(()=>(h(e.defaultNodes,e.defaultEdges),()=>{p.current=yb,f()}),[]);const p=Y.useRef(yb);return Hp(()=>{for(const g of gb){const y=e[g],v=p.current[g];y!==v&&(typeof e[g]>"u"||(g==="nodes"?t(y):g==="edges"?r(y):g==="minZoom"?a(y):g==="maxZoom"?o(y):g==="translateExtent"?l(y):g==="nodeExtent"?u(y):g==="ariaLabelConfig"?d.setState({ariaLabelConfig:B3(y)}):g==="fitView"?d.setState({fitViewQueued:y}):g==="fitViewOptions"?d.setState({fitViewOptions:y}):d.setState({[g]:y})))}p.current=e},gb.map(g=>e[g])),null}function xb(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ZO(e){const[t,r]=Y.useState(e==="system"?null:e);return Y.useEffect(()=>{if(e!=="system"){r(e);return}const a=xb(),o=()=>r(a?.matches?"dark":"light");return o(),a?.addEventListener("change",o),()=>{a?.removeEventListener("change",o)}},[e]),t!==null?t:xb()?.matches?"dark":"light"}const vb=typeof document<"u"?document:null;function ol(e=null,t={target:vb,actInsideInputWithModifier:!0}){const[r,a]=Y.useState(!1),o=Y.useRef(!1),l=Y.useRef(new Set([])),[u,f]=Y.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(g=>typeof g=="string").map(g=>g.replace("+",`
10
- `).replace(`
11
-
12
- `,`
13
- +`).split(`
14
- `)),p=d.reduce((g,y)=>g.concat(...y),[]);return[d,p]}return[[],[]]},[e]);return Y.useEffect(()=>{const h=t?.target??vb,d=t?.actInsideInputWithModifier??!0;if(e!==null){const p=v=>{if(o.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!o.current||o.current&&!d)&&bw(v))return!1;const E=Sb(v.code,f);if(l.current.add(v[E]),bb(u,l.current,!1)){const N=v.composedPath?.()?.[0]||v.target,w=N?.nodeName==="BUTTON"||N?.nodeName==="A";t.preventDefault!==!1&&(o.current||!w)&&v.preventDefault(),a(!0)}},g=v=>{const S=Sb(v.code,f);bb(u,l.current,!0)?(a(!1),l.current.clear()):l.current.delete(v[S]),v.key==="Meta"&&l.current.clear(),o.current=!1},y=()=>{l.current.clear(),a(!1)};return h?.addEventListener("keydown",p),h?.addEventListener("keyup",g),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{h?.removeEventListener("keydown",p),h?.removeEventListener("keyup",g),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,a]),r}function bb(e,t,r){return e.filter(a=>r||a.length===t.size).some(a=>a.every(o=>t.has(o)))}function Sb(e,t){return t.includes(e)?"code":"key"}const KO=()=>{const e=lt();return Y.useMemo(()=>({zoomIn:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,r)=>{const{panZoom:a}=e.getState();return a?a.scaleTo(t,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[a,o,l],panZoom:u}=e.getState();return u?(await u.setViewport({x:t.x??a,y:t.y??o,zoom:t.zoom??l},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,r,a]=e.getState().transform;return{x:t,y:r,zoom:a}},setCenter:async(t,r,a)=>e.getState().setCenter(t,r,a),fitBounds:async(t,r)=>{const{width:a,height:o,minZoom:l,maxZoom:u,panZoom:f}=e.getState(),h=Mm(t,a,o,l,u,r?.padding??.1);return f?(await f.setViewport(h,{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,r={})=>{const{transform:a,snapGrid:o,snapToGrid:l,domNode:u}=e.getState();if(!u)return t;const{x:f,y:h}=u.getBoundingClientRect(),d={x:t.x-f,y:t.y-h},p=r.snapGrid??o,g=r.snapToGrid??l;return gl(d,a,g,p)},flowToScreenPosition:t=>{const{transform:r,domNode:a}=e.getState();if(!a)return t;const{x:o,y:l}=a.getBoundingClientRect(),u=Oc(t,r);return{x:u.x+o,y:u.y+l}}}),[])};function qw(e,t){const r=[],a=new Map,o=[];for(const l of e)if(l.type==="add"){o.push(l);continue}else if(l.type==="remove"||l.type==="replace")a.set(l.id,[l]);else{const u=a.get(l.id);u?u.push(l):a.set(l.id,[l])}for(const l of t){const u=a.get(l.id);if(!u){r.push(l);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){r.push({...u[0].item});continue}const f={...l};for(const h of u)WO(h,f);r.push(f)}return o.length&&o.forEach(l=>{l.index!==void 0?r.splice(l.index,0,{...l.item}):r.push({...l.item})}),r}function WO(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 JO(e,t){return qw(e,t)}function ej(e,t){return qw(e,t)}function qi(e,t){return{id:e,type:"select",selected:t}}function ro(e,t=new Set,r=!1){const a=[];for(const[o,l]of e){const u=t.has(o);!(l.selected===void 0&&!u)&&l.selected!==u&&(r&&(l.selected=u),a.push(qi(l.id,u)))}return a}function wb({items:e=[],lookup:t}){const r=[],a=new Map(e.map(o=>[o.id,o]));for(const[o,l]of e.entries()){const u=t.get(l.id),f=u?.internals?.userNode??u;f!==void 0&&f!==l&&r.push({id:l.id,item:l,type:"replace"}),f===void 0&&r.push({item:l,type:"add",index:o})}for(const[o]of t)a.get(o)===void 0&&r.push({id:o,type:"remove"});return r}function Eb(e){return{id:e.id,type:"remove"}}const Cb=e=>k3(e),tj=e=>dw(e);function Vw(e){return Y.forwardRef(e)}function _b(e){const[t,r]=Y.useState(BigInt(0)),[a]=Y.useState(()=>nj(()=>r(o=>o+BigInt(1))));return Hp(()=>{const o=a.get();o.length&&(e(o),a.reset())},[t]),a}function nj(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:r=>{t.push(r),e()}}}const Fw=Y.createContext(null);function rj({children:e}){const t=lt(),r=Y.useCallback(f=>{const{nodes:h=[],setNodes:d,hasDefaultNodes:p,onNodesChange:g,nodeLookup:y,fitViewQueued:v,onNodesChangeMiddlewareMap:S}=t.getState();let E=h;for(const w of f)E=typeof w=="function"?w(E):w;let N=wb({items:E,lookup:y});for(const w of S.values())N=w(N);p&&d(E),N.length>0?g?.(N):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:O,setNodes:_}=t.getState();w&&_(O)})},[]),a=_b(r),o=Y.useCallback(f=>{const{edges:h=[],setEdges:d,hasDefaultEdges:p,onEdgesChange:g,edgeLookup:y}=t.getState();let v=h;for(const S of f)v=typeof S=="function"?S(v):S;p?d(v):g&&g(wb({items:v,lookup:y}))},[]),l=_b(o),u=Y.useMemo(()=>({nodeQueue:a,edgeQueue:l}),[]);return b.jsx(Fw.Provider,{value:u,children:e})}function ij(){const e=Y.useContext(Fw);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const aj=e=>!!e.panZoom;function Dm(){const e=KO(),t=lt(),r=ij(),a=Ue(aj),o=Y.useMemo(()=>{const l=g=>t.getState().nodeLookup.get(g),u=g=>{r.nodeQueue.push(g)},f=g=>{r.edgeQueue.push(g)},h=g=>{const{nodeLookup:y,nodeOrigin:v}=t.getState(),S=Cb(g)?g:y.get(g.id),E=S.parentId?xw(S.position,S.measured,S.parentId,y,v):S.position,N={...S,position:E,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return vo(N)},d=(g,y,v={replace:!1})=>{u(S=>S.map(E=>{if(E.id===g){const N=typeof y=="function"?y(E):y;return v.replace&&Cb(N)?N:{...E,...N}}return E}))},p=(g,y,v={replace:!1})=>{f(S=>S.map(E=>{if(E.id===g){const N=typeof y=="function"?y(E):y;return v.replace&&tj(N)?N:{...E,...N}}return E}))};return{getNodes:()=>t.getState().nodes.map(g=>({...g})),getNode:g=>l(g)?.internals.userNode,getInternalNode:l,getEdges:()=>{const{edges:g=[]}=t.getState();return g.map(y=>({...y}))},getEdge:g=>t.getState().edgeLookup.get(g),setNodes:u,setEdges:f,addNodes:g=>{const y=Array.isArray(g)?g:[g];r.nodeQueue.push(v=>[...v,...y])},addEdges:g=>{const y=Array.isArray(g)?g:[g];r.edgeQueue.push(v=>[...v,...y])},toObject:()=>{const{nodes:g=[],edges:y=[],transform:v}=t.getState(),[S,E,N]=v;return{nodes:g.map(w=>({...w})),edges:y.map(w=>({...w})),viewport:{x:S,y:E,zoom:N}}},deleteElements:async({nodes:g=[],edges:y=[]})=>{const{nodes:v,edges:S,onNodesDelete:E,onEdgesDelete:N,triggerNodeChanges:w,triggerEdgeChanges:O,onDelete:_,onBeforeDelete:M}=t.getState(),{nodes:B,edges:k}=await j3({nodesToRemove:g,edgesToRemove:y,nodes:v,edges:S,onBeforeDelete:M}),D=k.length>0,U=B.length>0;if(D){const H=k.map(Eb);N?.(k),O(H)}if(U){const H=B.map(Eb);E?.(B),w(H)}return(U||D)&&_?.({nodes:B,edges:k}),{deletedNodes:B,deletedEdges:k}},getIntersectingNodes:(g,y=!0,v)=>{const S=eb(g),E=S?g:h(g),N=v!==void 0;return E?(v||t.getState().nodes).filter(w=>{const O=t.getState().nodeLookup.get(w.id);if(O&&!S&&(w.id===g.id||!O.internals.positionAbsolute))return!1;const _=vo(N?w:O),M=il(_,E);return y&&M>0||M>=_.width*_.height||M>=E.width*E.height}):[]},isNodeIntersecting:(g,y,v=!0)=>{const E=eb(g)?g:h(g);if(!E)return!1;const N=il(E,y);return v&&N>0||N>=y.width*y.height||N>=E.width*E.height},updateNode:d,updateNodeData:(g,y,v={replace:!1})=>{d(g,S=>{const E=typeof y=="function"?y(S):y;return v.replace?{...S,data:E}:{...S,data:{...S.data,...E}}},v)},updateEdge:p,updateEdgeData:(g,y,v={replace:!1})=>{p(g,S=>{const E=typeof y=="function"?y(S):y;return v.replace?{...S,data:E}:{...S,data:{...S.data,...E}}},v)},getNodesBounds:g=>{const{nodeLookup:y,nodeOrigin:v}=t.getState();return T3(g,{nodeLookup:y,nodeOrigin:v})},getHandleConnections:({type:g,id:y,nodeId:v})=>Array.from(t.getState().connectionLookup.get(`${v}-${g}${y?`-${y}`:""}`)?.values()??[]),getNodeConnections:({type:g,handleId:y,nodeId:v})=>Array.from(t.getState().connectionLookup.get(`${v}${g?y?`-${g}-${y}`:`-${g}`:""}`)?.values()??[]),fitView:async g=>{const y=t.getState().fitViewResolver??I3();return t.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:y}),r.nodeQueue.push(v=>[...v]),y.promise}}},[]);return Y.useMemo(()=>({...o,...e,viewportInitialized:a}),[a])}const Nb=e=>e.selected,oj=typeof window<"u"?window:void 0;function sj({deleteKeyCode:e,multiSelectionKeyCode:t}){const r=lt(),{deleteElements:a}=Dm(),o=ol(e,{actInsideInputWithModifier:!1}),l=ol(t,{target:oj});Y.useEffect(()=>{if(o){const{edges:u,nodes:f}=r.getState();a({nodes:f.filter(Nb),edges:u.filter(Nb)}),r.setState({nodesSelectionActive:!1})}},[o]),Y.useEffect(()=>{r.setState({multiSelectionActive:l})},[l])}function lj(e){const t=lt();Y.useEffect(()=>{const r=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;const a=km(e.current);(a.height===0||a.width===0)&&t.getState().onError?.("004",Jn.error004()),t.setState({width:a.width||500,height:a.height||500})};if(e.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(e.current),()=>{window.removeEventListener("resize",r),a&&e.current&&a.unobserve(e.current)}}},[])}const ef={position:"absolute",width:"100%",height:"100%",top:0,left:0},uj=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function cj({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:o=.5,panOnScrollMode:l=Ji.Free,zoomOnDoubleClick:u=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:d,minZoom:p,maxZoom:g,zoomActivationKeyCode:y,preventScrolling:v=!0,children:S,noWheelClassName:E,noPanClassName:N,onViewportChange:w,isControlledViewport:O,paneClickDistance:_,selectionOnDrag:M}){const B=lt(),k=Y.useRef(null),{userSelectionActive:D,lib:U,connectionInProgress:H}=Ue(uj,st),q=ol(y),L=Y.useRef();lj(k);const P=Y.useCallback(K=>{w?.({x:K[0],y:K[1],zoom:K[2]}),O||B.setState({transform:K})},[w,O]);return Y.useEffect(()=>{if(k.current){L.current=bO({domNode:k.current,minZoom:p,maxZoom:g,translateExtent:d,viewport:h,onDraggingChange:j=>B.setState(F=>F.paneDragging===j?F:{paneDragging:j}),onPanZoomStart:(j,F)=>{const{onViewportChangeStart:X,onMoveStart:Z}=B.getState();Z?.(j,F),X?.(F)},onPanZoom:(j,F)=>{const{onViewportChange:X,onMove:Z}=B.getState();Z?.(j,F),X?.(F)},onPanZoomEnd:(j,F)=>{const{onViewportChangeEnd:X,onMoveEnd:Z}=B.getState();Z?.(j,F),X?.(F)}});const{x:K,y:I,zoom:V}=L.current.getViewport();return B.setState({panZoom:L.current,transform:[K,I,V],domNode:k.current.closest(".react-flow")}),()=>{L.current?.destroy()}}},[]),Y.useEffect(()=>{L.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:o,panOnScrollMode:l,zoomOnDoubleClick:u,panOnDrag:f,zoomActivationKeyPressed:q,preventScrolling:v,noPanClassName:N,userSelectionActive:D,noWheelClassName:E,lib:U,onTransformChange:P,connectionInProgress:H,selectionOnDrag:M,paneClickDistance:_})},[e,t,r,a,o,l,u,f,q,v,N,D,E,U,P,H,M,_]),b.jsx("div",{className:"react-flow__renderer",ref:k,style:ef,children:S})}const fj=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function dj(){const{userSelectionActive:e,userSelectionRect:t}=Ue(fj,st);return e&&t?b.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Gh=(e,t)=>r=>{r.target===t.current&&e?.(r)},hj=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function pj({isSelecting:e,selectionKeyPressed:t,selectionMode:r=rl.Full,panOnDrag:a,paneClickDistance:o,selectionOnDrag:l,onSelectionStart:u,onSelectionEnd:f,onPaneClick:h,onPaneContextMenu:d,onPaneScroll:p,onPaneMouseEnter:g,onPaneMouseMove:y,onPaneMouseLeave:v,children:S}){const E=lt(),{userSelectionActive:N,elementsSelectable:w,dragging:O,connectionInProgress:_}=Ue(hj,st),M=w&&(e||N),B=Y.useRef(null),k=Y.useRef(),D=Y.useRef(new Set),U=Y.useRef(new Set),H=Y.useRef(!1),q=X=>{if(H.current||_){H.current=!1;return}h?.(X),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},L=X=>{if(Array.isArray(a)&&a?.includes(2)){X.preventDefault();return}d?.(X)},P=p?X=>p(X):void 0,K=X=>{H.current&&(X.stopPropagation(),H.current=!1)},I=X=>{const{domNode:Z}=E.getState();if(k.current=Z?.getBoundingClientRect(),!k.current)return;const A=X.target===B.current;if(!A&&!!X.target.closest(".nokey")||!e||!(l&&A||t)||X.button!==0||!X.isPrimary)return;X.target?.setPointerCapture?.(X.pointerId),H.current=!1;const{x:R,y:te}=Hn(X.nativeEvent,k.current);E.setState({userSelectionRect:{width:0,height:0,startX:R,startY:te,x:R,y:te}}),A||(X.stopPropagation(),X.preventDefault())},V=X=>{const{userSelectionRect:Z,transform:A,nodeLookup:z,edgeLookup:$,connectionLookup:R,triggerNodeChanges:te,triggerEdgeChanges:ue,defaultEdgeOptions:ce,resetSelectedElements:fe}=E.getState();if(!k.current||!Z)return;const{x:le,y:pe}=Hn(X.nativeEvent,k.current),{startX:be,startY:Se}=Z;if(!H.current){const Ie=t?0:o;if(Math.hypot(le-be,pe-Se)<=Ie)return;fe(),u?.(X)}H.current=!0;const ye={startX:be,startY:Se,x:le<be?le:be,y:pe<Se?pe:Se,width:Math.abs(le-be),height:Math.abs(pe-Se)},we=D.current,Re=U.current;D.current=new Set(Nm(z,ye,A,r===rl.Partial,!0).map(Ie=>Ie.id)),U.current=new Set;const He=ce?.selectable??!0;for(const Ie of D.current){const Qe=R.get(Ie);if(Qe)for(const{edgeId:_t}of Qe.values()){const it=$.get(_t);it&&(it.selectable??He)&&U.current.add(_t)}}if(!tb(we,D.current)){const Ie=ro(z,D.current,!0);te(Ie)}if(!tb(Re,U.current)){const Ie=ro($,U.current);ue(Ie)}E.setState({userSelectionRect:ye,userSelectionActive:!0,nodesSelectionActive:!1})},j=X=>{X.button===0&&(X.target?.releasePointerCapture?.(X.pointerId),!N&&X.target===B.current&&E.getState().userSelectionRect&&q?.(X),E.setState({userSelectionActive:!1,userSelectionRect:null}),H.current&&(f?.(X),E.setState({nodesSelectionActive:D.current.size>0})))},F=a===!0||Array.isArray(a)&&a.includes(0);return b.jsxs("div",{className:St(["react-flow__pane",{draggable:F,dragging:O,selection:e}]),onClick:M?void 0:Gh(q,B),onContextMenu:Gh(L,B),onWheel:Gh(P,B),onPointerEnter:M?void 0:g,onPointerMove:M?V:y,onPointerUp:M?j:void 0,onPointerDownCapture:M?I:void 0,onClickCapture:M?K:void 0,onPointerLeave:v,ref:B,style:ef,children:[S,b.jsx(dj,{})]})}function Pp({id:e,store:t,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:o,unselectNodesAndEdges:l,multiSelectionActive:u,nodeLookup:f,onError:h}=t.getState(),d=f.get(e);if(!d){h?.("012",Jn.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(r||d.selected&&u)&&(l({nodes:[d],edges:[]}),requestAnimationFrame(()=>a?.current?.blur())):o([e])}function Yw({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:a,nodeId:o,isSelectable:l,nodeClickDistance:u}){const f=lt(),[h,d]=Y.useState(!1),p=Y.useRef();return Y.useEffect(()=>{p.current=oO({getStoreItems:()=>f.getState(),onNodeMouseDown:g=>{Pp({id:g,store:f,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),Y.useEffect(()=>{if(!(t||!e.current||!p.current))return p.current.update({noDragClassName:r,handleSelector:a,domNode:e.current,isSelectable:l,nodeId:o,nodeClickDistance:u}),()=>{p.current?.destroy()}},[r,a,t,l,e,o,u]),h}const mj=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function $w(){const e=lt();return Y.useCallback(r=>{const{nodeExtent:a,snapToGrid:o,snapGrid:l,nodesDraggable:u,onError:f,updateNodePositions:h,nodeLookup:d,nodeOrigin:p}=e.getState(),g=new Map,y=mj(u),v=o?l[0]:5,S=o?l[1]:5,E=r.direction.x*v*r.factor,N=r.direction.y*S*r.factor;for(const[,w]of d){if(!y(w))continue;let O={x:w.internals.positionAbsolute.x+E,y:w.internals.positionAbsolute.y+N};o&&(O=ml(O,l));const{position:_,positionAbsolute:M}=hw({nodeId:w.id,nextPosition:O,nodeLookup:d,nodeExtent:a,nodeOrigin:p,onError:f});w.position=_,w.internals.positionAbsolute=M,g.set(w.id,w)}h(g)},[])}const zm=Y.createContext(null),gj=zm.Provider;zm.Consumer;const Gw=()=>Y.useContext(zm),yj=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),xj=(e,t,r)=>a=>{const{connectionClickStartHandle:o,connectionMode:l,connection:u}=a,{fromHandle:f,toHandle:h,isValid:d}=u,p=h?.nodeId===e&&h?.id===t&&h?.type===r;return{connectingFrom:f?.nodeId===e&&f?.id===t&&f?.type===r,connectingTo:p,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===r,isPossibleEndHandle:l===yo.Strict?f?.type!==r:e!==f?.nodeId||t!==f?.id,connectionInProcess:!!f,clickConnectionInProcess:!!o,valid:p&&d}};function vj({type:e="source",position:t=ve.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:o=!0,isConnectableEnd:l=!0,id:u,onConnect:f,children:h,className:d,onMouseDown:p,onTouchStart:g,...y},v){const S=u||null,E=e==="target",N=lt(),w=Gw(),{connectOnClick:O,noPanClassName:_,rfId:M}=Ue(yj,st),{connectingFrom:B,connectingTo:k,clickConnecting:D,isPossibleEndHandle:U,connectionInProcess:H,clickConnectionInProcess:q,valid:L}=Ue(xj(w,S,e),st);w||N.getState().onError?.("010",Jn.error010());const P=V=>{const{defaultEdgeOptions:j,onConnect:F,hasDefaultEdges:X}=N.getState(),Z={...j,...V};if(X){const{edges:A,setEdges:z}=N.getState();z(F3(Z,A))}F?.(Z),f?.(Z)},K=V=>{if(!w)return;const j=Sw(V.nativeEvent);if(o&&(j&&V.button===0||!j)){const F=N.getState();Bp.onPointerDown(V.nativeEvent,{handleDomNode:V.currentTarget,autoPanOnConnect:F.autoPanOnConnect,connectionMode:F.connectionMode,connectionRadius:F.connectionRadius,domNode:F.domNode,nodeLookup:F.nodeLookup,lib:F.lib,isTarget:E,handleId:S,nodeId:w,flowId:F.rfId,panBy:F.panBy,cancelConnection:F.cancelConnection,onConnectStart:F.onConnectStart,onConnectEnd:(...X)=>N.getState().onConnectEnd?.(...X),updateConnection:F.updateConnection,onConnect:P,isValidConnection:r||((...X)=>N.getState().isValidConnection?.(...X)??!0),getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,autoPanSpeed:F.autoPanSpeed,dragThreshold:F.connectionDragThreshold})}j?p?.(V):g?.(V)},I=V=>{const{onClickConnectStart:j,onClickConnectEnd:F,connectionClickStartHandle:X,connectionMode:Z,isValidConnection:A,lib:z,rfId:$,nodeLookup:R,connection:te}=N.getState();if(!w||!X&&!o)return;if(!X){j?.(V.nativeEvent,{nodeId:w,handleId:S,handleType:e}),N.setState({connectionClickStartHandle:{nodeId:w,type:e,id:S}});return}const ue=vw(V.target),ce=r||A,{connection:fe,isValid:le}=Bp.isValid(V.nativeEvent,{handle:{nodeId:w,id:S,type:e},connectionMode:Z,fromNodeId:X.nodeId,fromHandleId:X.id||null,fromType:X.type,isValidConnection:ce,flowId:$,doc:ue,lib:z,nodeLookup:R});le&&fe&&P(fe);const pe=structuredClone(te);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,F?.(V,pe),N.setState({connectionClickStartHandle:null})};return b.jsx("div",{"data-handleid":S,"data-nodeid":w,"data-handlepos":t,"data-id":`${M}-${w}-${S}-${e}`,className:St(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,d,{source:!E,target:E,connectable:a,connectablestart:o,connectableend:l,clickconnecting:D,connectingfrom:B,connectingto:k,valid:L,connectionindicator:a&&(!H||U)&&(H||q?l:o)}]),onMouseDown:K,onTouchStart:K,onClick:O?I:void 0,ref:v,...y,children:h})}const jc=Y.memo(Vw(vj));function bj({data:e,isConnectable:t,sourcePosition:r=ve.Bottom}){return b.jsxs(b.Fragment,{children:[e?.label,b.jsx(jc,{type:"source",position:r,isConnectable:t})]})}function Sj({data:e,isConnectable:t,targetPosition:r=ve.Top,sourcePosition:a=ve.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(jc,{type:"target",position:r,isConnectable:t}),e?.label,b.jsx(jc,{type:"source",position:a,isConnectable:t})]})}function wj(){return null}function Ej({data:e,isConnectable:t,targetPosition:r=ve.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(jc,{type:"target",position:r,isConnectable:t}),e?.label]})}const Dc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Mb={input:bj,default:Sj,output:Ej,group:wj};function Cj(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}}const _j=e=>{const{width:t,height:r,x:a,y:o}=pl(e.nodeLookup,{filter:l=>!!l.selected});return{width:Bn(t)?t:null,height:Bn(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${a}px,${o}px)`}};function Nj({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const a=lt(),{width:o,height:l,transformString:u,userSelectionActive:f}=Ue(_j,st),h=$w(),d=Y.useRef(null);Y.useEffect(()=>{r||d.current?.focus({preventScroll:!0})},[r]);const p=!f&&o!==null&&l!==null;if(Yw({nodeRef:d,disabled:!p}),!p)return null;const g=e?v=>{const S=a.getState().nodes.filter(E=>E.selected);e(v,S)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(Dc,v.key)&&(v.preventDefault(),h({direction:Dc[v.key],factor:v.shiftKey?4:1}))};return b.jsx("div",{className:St(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u},children:b.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:r?void 0:-1,onKeyDown:r?void 0:y,style:{width:o,height:l}})})}const kb=typeof window<"u"?window:void 0,Mj=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Xw({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:l,onPaneScroll:u,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:d,selectionOnDrag:p,selectionMode:g,onSelectionStart:y,onSelectionEnd:v,multiSelectionKeyCode:S,panActivationKeyCode:E,zoomActivationKeyCode:N,elementsSelectable:w,zoomOnScroll:O,zoomOnPinch:_,panOnScroll:M,panOnScrollSpeed:B,panOnScrollMode:k,zoomOnDoubleClick:D,panOnDrag:U,defaultViewport:H,translateExtent:q,minZoom:L,maxZoom:P,preventScrolling:K,onSelectionContextMenu:I,noWheelClassName:V,noPanClassName:j,disableKeyboardA11y:F,onViewportChange:X,isControlledViewport:Z}){const{nodesSelectionActive:A,userSelectionActive:z}=Ue(Mj,st),$=ol(d,{target:kb}),R=ol(E,{target:kb}),te=R||U,ue=R||M,ce=p&&te!==!0,fe=$||z||ce;return sj({deleteKeyCode:h,multiSelectionKeyCode:S}),b.jsx(cj,{onPaneContextMenu:l,elementsSelectable:w,zoomOnScroll:O,zoomOnPinch:_,panOnScroll:ue,panOnScrollSpeed:B,panOnScrollMode:k,zoomOnDoubleClick:D,panOnDrag:!$&&te,defaultViewport:H,translateExtent:q,minZoom:L,maxZoom:P,zoomActivationKeyCode:N,preventScrolling:K,noWheelClassName:V,noPanClassName:j,onViewportChange:X,isControlledViewport:Z,paneClickDistance:f,selectionOnDrag:ce,children:b.jsxs(pj,{onSelectionStart:y,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:l,onPaneScroll:u,panOnDrag:te,isSelecting:!!fe,selectionMode:g,selectionKeyPressed:$,paneClickDistance:f,selectionOnDrag:ce,children:[e,A&&b.jsx(Nj,{onSelectionContextMenu:I,noPanClassName:j,disableKeyboardA11y:F})]})})}Xw.displayName="FlowRenderer";const kj=Y.memo(Xw),Tj=e=>t=>e?Nm(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(r=>r.id):Array.from(t.nodeLookup.keys());function Aj(e){return Ue(Y.useCallback(Tj(e),[e]),st)}const Rj=e=>e.updateNodeInternals;function Oj(){const e=Ue(Rj),[t]=Y.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(o=>{const l=o.target.getAttribute("data-id");a.set(l,{id:l,nodeElement:o.target,force:!0})}),e(a)}));return Y.useEffect(()=>()=>{t?.disconnect()},[t]),t}function jj({node:e,nodeType:t,hasDimensions:r,resizeObserver:a}){const o=lt(),l=Y.useRef(null),u=Y.useRef(null),f=Y.useRef(e.sourcePosition),h=Y.useRef(e.targetPosition),d=Y.useRef(t),p=r&&!!e.internals.handleBounds;return Y.useEffect(()=>{l.current&&!e.hidden&&(!p||u.current!==l.current)&&(u.current&&a?.unobserve(u.current),a?.observe(l.current),u.current=l.current)},[p,e.hidden]),Y.useEffect(()=>()=>{u.current&&(a?.unobserve(u.current),u.current=null)},[]),Y.useEffect(()=>{if(l.current){const g=d.current!==t,y=f.current!==e.sourcePosition,v=h.current!==e.targetPosition;(g||y||v)&&(d.current=t,f.current=e.sourcePosition,h.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:l.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),l}function Dj({id:e,onClick:t,onMouseEnter:r,onMouseMove:a,onMouseLeave:o,onContextMenu:l,onDoubleClick:u,nodesDraggable:f,elementsSelectable:h,nodesConnectable:d,nodesFocusable:p,resizeObserver:g,noDragClassName:y,noPanClassName:v,disableKeyboardA11y:S,rfId:E,nodeTypes:N,nodeClickDistance:w,onError:O}){const{node:_,internals:M,isParent:B}=Ue(le=>{const pe=le.nodeLookup.get(e),be=le.parentLookup.has(e);return{node:pe,internals:pe.internals,isParent:be}},st);let k=_.type||"default",D=N?.[k]||Mb[k];D===void 0&&(O?.("003",Jn.error003(k)),k="default",D=N?.default||Mb.default);const U=!!(_.draggable||f&&typeof _.draggable>"u"),H=!!(_.selectable||h&&typeof _.selectable>"u"),q=!!(_.connectable||d&&typeof _.connectable>"u"),L=!!(_.focusable||p&&typeof _.focusable>"u"),P=lt(),K=yw(_),I=jj({node:_,nodeType:k,hasDimensions:K,resizeObserver:g}),V=Yw({nodeRef:I,disabled:_.hidden||!U,noDragClassName:y,handleSelector:_.dragHandle,nodeId:e,isSelectable:H,nodeClickDistance:w}),j=$w();if(_.hidden)return null;const F=Tr(_),X=Cj(_),Z=H||U||t||r||a||o,A=r?le=>r(le,{...M.userNode}):void 0,z=a?le=>a(le,{...M.userNode}):void 0,$=o?le=>o(le,{...M.userNode}):void 0,R=l?le=>l(le,{...M.userNode}):void 0,te=u?le=>u(le,{...M.userNode}):void 0,ue=le=>{const{selectNodesOnDrag:pe,nodeDragThreshold:be}=P.getState();H&&(!pe||!U||be>0)&&Pp({id:e,store:P,nodeRef:I}),t&&t(le,{...M.userNode})},ce=le=>{if(!(bw(le.nativeEvent)||S)){if(lw.includes(le.key)&&H){const pe=le.key==="Escape";Pp({id:e,store:P,unselect:pe,nodeRef:I})}else if(U&&_.selected&&Object.prototype.hasOwnProperty.call(Dc,le.key)){le.preventDefault();const{ariaLabelConfig:pe}=P.getState();P.setState({ariaLiveMessage:pe["node.a11yDescription.ariaLiveMessage"]({direction:le.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),j({direction:Dc[le.key],factor:le.shiftKey?4:1})}}},fe=()=>{if(S||!I.current?.matches(":focus-visible"))return;const{transform:le,width:pe,height:be,autoPanOnNodeFocus:Se,setCenter:ye}=P.getState();if(!Se)return;Nm(new Map([[e,_]]),{x:0,y:0,width:pe,height:be},le,!0).length>0||ye(_.position.x+F.width/2,_.position.y+F.height/2,{zoom:le[2]})};return b.jsx("div",{className:St(["react-flow__node",`react-flow__node-${k}`,{[v]:U},_.className,{selected:_.selected,selectable:H,parent:B,draggable:U,dragging:V}]),ref:I,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:Z?"all":"none",visibility:K?"visible":"hidden",..._.style,...X},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:A,onMouseMove:z,onMouseLeave:$,onContextMenu:R,onClick:ue,onDoubleClick:te,onKeyDown:L?ce:void 0,tabIndex:L?0:void 0,onFocus:L?fe:void 0,role:_.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Hw}-${E}`,"aria-label":_.ariaLabel,..._.domAttributes,children:b.jsx(gj,{value:e,children:b.jsx(D,{id:e,data:_.data,type:k,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:_.selected??!1,selectable:H,draggable:U,deletable:_.deletable??!0,isConnectable:q,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:V,dragHandle:_.dragHandle,zIndex:M.z,parentId:_.parentId,...F})})})}var zj=Y.memo(Dj);const Lj=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Qw(e){const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:a,elementsSelectable:o,onError:l}=Ue(Lj,st),u=Aj(e.onlyRenderVisibleElements),f=Oj();return b.jsx("div",{className:"react-flow__nodes",style:ef,children:u.map(h=>b.jsx(zj,{id:h,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:f,nodesDraggable:t,nodesConnectable:r,nodesFocusable:a,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:l},h))})}Qw.displayName="NodeRenderer";const Ij=Y.memo(Qw);function Bj(e){return Ue(Y.useCallback(r=>{if(!e)return r.edges.map(o=>o.id);const a=[];if(r.width&&r.height)for(const o of r.edges){const l=r.nodeLookup.get(o.source),u=r.nodeLookup.get(o.target);l&&u&&U3({sourceNode:l,targetNode:u,width:r.width,height:r.height,transform:r.transform})&&a.push(o.id)}return a},[e]),st)}const Hj=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e}};return b.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Pj=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e,fill:e}};return b.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Tb={[Ac.Arrow]:Hj,[Ac.ArrowClosed]:Pj};function Uj(e){const t=lt();return Y.useMemo(()=>Object.prototype.hasOwnProperty.call(Tb,e)?Tb[e]:(t.getState().onError?.("009",Jn.error009(e)),null),[e])}const qj=({id:e,type:t,color:r,width:a=12.5,height:o=12.5,markerUnits:l="strokeWidth",strokeWidth:u,orient:f="auto-start-reverse"})=>{const h=Uj(t);return h?b.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${a}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:f,refX:"0",refY:"0",children:b.jsx(h,{color:r,strokeWidth:u})}):null},Zw=({defaultColor:e,rfId:t})=>{const r=Ue(l=>l.edges),a=Ue(l=>l.defaultEdgeOptions),o=Y.useMemo(()=>Q3(r,{id:t,defaultColor:e,defaultMarkerStart:a?.markerStart,defaultMarkerEnd:a?.markerEnd}),[r,a,t,e]);return o.length?b.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:b.jsx("defs",{children:o.map(l=>b.jsx(qj,{id:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient},l.id))})}):null};Zw.displayName="MarkerDefinitions";var Vj=Y.memo(Zw);function Kw({x:e,y:t,label:r,labelStyle:a,labelShowBg:o=!0,labelBgStyle:l,labelBgPadding:u=[2,4],labelBgBorderRadius:f=2,children:h,className:d,...p}){const[g,y]=Y.useState({x:1,y:0,width:0,height:0}),v=St(["react-flow__edge-textwrapper",d]),S=Y.useRef(null);return Y.useEffect(()=>{if(S.current){const E=S.current.getBBox();y({x:E.x,y:E.y,width:E.width,height:E.height})}},[r]),r?b.jsxs("g",{transform:`translate(${e-g.width/2} ${t-g.height/2})`,className:v,visibility:g.width?"visible":"hidden",...p,children:[o&&b.jsx("rect",{width:g.width+2*u[0],x:-u[0],y:-u[1],height:g.height+2*u[1],className:"react-flow__edge-textbg",style:l,rx:f,ry:f}),b.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:S,style:a,children:r}),h]}):null}Kw.displayName="EdgeText";const Fj=Y.memo(Kw);function tf({path:e,labelX:t,labelY:r,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:d=20,...p}){return b.jsxs(b.Fragment,{children:[b.jsx("path",{...p,d:e,fill:"none",className:St(["react-flow__edge-path",p.className])}),d?b.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,a&&Bn(t)&&Bn(r)?b.jsx(Fj,{x:t,y:r,label:a,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function Ab({pos:e,x1:t,y1:r,x2:a,y2:o}){return e===ve.Left||e===ve.Right?[.5*(t+a),r]:[t,.5*(r+o)]}function Ww({sourceX:e,sourceY:t,sourcePosition:r=ve.Bottom,targetX:a,targetY:o,targetPosition:l=ve.Top}){const[u,f]=Ab({pos:r,x1:e,y1:t,x2:a,y2:o}),[h,d]=Ab({pos:l,x1:a,y1:o,x2:e,y2:t}),[p,g,y,v]=ww({sourceX:e,sourceY:t,targetX:a,targetY:o,sourceControlX:u,sourceControlY:f,targetControlX:h,targetControlY:d});return[`M${e},${t} C${u},${f} ${h},${d} ${a},${o}`,p,g,y,v]}function Jw(e){return Y.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:l,sourcePosition:u,targetPosition:f,label:h,labelStyle:d,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:S,markerEnd:E,markerStart:N,interactionWidth:w})=>{const[O,_,M]=Ww({sourceX:r,sourceY:a,sourcePosition:u,targetX:o,targetY:l,targetPosition:f}),B=e.isInternal?void 0:t;return b.jsx(tf,{id:B,path:O,labelX:_,labelY:M,label:h,labelStyle:d,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:S,markerEnd:E,markerStart:N,interactionWidth:w})})}const Yj=Jw({isInternal:!1}),eE=Jw({isInternal:!0});Yj.displayName="SimpleBezierEdge";eE.displayName="SimpleBezierEdgeInternal";function tE(e){return Y.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:l,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:y,sourcePosition:v=ve.Bottom,targetPosition:S=ve.Top,markerEnd:E,markerStart:N,pathOptions:w,interactionWidth:O})=>{const[_,M,B]=zp({sourceX:r,sourceY:a,sourcePosition:v,targetX:o,targetY:l,targetPosition:S,borderRadius:w?.borderRadius,offset:w?.offset,stepPosition:w?.stepPosition}),k=e.isInternal?void 0:t;return b.jsx(tf,{id:k,path:_,labelX:M,labelY:B,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:y,markerEnd:E,markerStart:N,interactionWidth:O})})}const nE=tE({isInternal:!1}),rE=tE({isInternal:!0});nE.displayName="SmoothStepEdge";rE.displayName="SmoothStepEdgeInternal";function iE(e){return Y.memo(({id:t,...r})=>{const a=e.isInternal?void 0:t;return b.jsx(nE,{...r,id:a,pathOptions:Y.useMemo(()=>({borderRadius:0,offset:r.pathOptions?.offset}),[r.pathOptions?.offset])})})}const $j=iE({isInternal:!1}),aE=iE({isInternal:!0});$j.displayName="StepEdge";aE.displayName="StepEdgeInternal";function oE(e){return Y.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:l,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:y,markerEnd:v,markerStart:S,interactionWidth:E})=>{const[N,w,O]=_w({sourceX:r,sourceY:a,targetX:o,targetY:l}),_=e.isInternal?void 0:t;return b.jsx(tf,{id:_,path:N,labelX:w,labelY:O,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:y,markerEnd:v,markerStart:S,interactionWidth:E})})}const Gj=oE({isInternal:!1}),sE=oE({isInternal:!0});Gj.displayName="StraightEdge";sE.displayName="StraightEdgeInternal";function lE(e){return Y.memo(({id:t,sourceX:r,sourceY:a,targetX:o,targetY:l,sourcePosition:u=ve.Bottom,targetPosition:f=ve.Top,label:h,labelStyle:d,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:S,markerEnd:E,markerStart:N,pathOptions:w,interactionWidth:O})=>{const[_,M,B]=Ew({sourceX:r,sourceY:a,sourcePosition:u,targetX:o,targetY:l,targetPosition:f,curvature:w?.curvature}),k=e.isInternal?void 0:t;return b.jsx(tf,{id:k,path:_,labelX:M,labelY:B,label:h,labelStyle:d,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:S,markerEnd:E,markerStart:N,interactionWidth:O})})}const Xj=lE({isInternal:!1}),uE=lE({isInternal:!0});Xj.displayName="BezierEdge";uE.displayName="BezierEdgeInternal";const Rb={default:uE,straight:sE,step:aE,smoothstep:rE,simplebezier:eE},Ob={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Qj=(e,t,r)=>r===ve.Left?e-t:r===ve.Right?e+t:e,Zj=(e,t,r)=>r===ve.Top?e-t:r===ve.Bottom?e+t:e,jb="react-flow__edgeupdater";function Db({position:e,centerX:t,centerY:r,radius:a=10,onMouseDown:o,onMouseEnter:l,onMouseOut:u,type:f}){return b.jsx("circle",{onMouseDown:o,onMouseEnter:l,onMouseOut:u,className:St([jb,`${jb}-${f}`]),cx:Qj(t,a,e),cy:Zj(r,a,e),r:a,stroke:"transparent",fill:"transparent"})}function Kj({isReconnectable:e,reconnectRadius:t,edge:r,sourceX:a,sourceY:o,targetX:l,targetY:u,sourcePosition:f,targetPosition:h,onReconnect:d,onReconnectStart:p,onReconnectEnd:g,setReconnecting:y,setUpdateHover:v}){const S=lt(),E=(M,B)=>{if(M.button!==0)return;const{autoPanOnConnect:k,domNode:D,connectionMode:U,connectionRadius:H,lib:q,onConnectStart:L,cancelConnection:P,nodeLookup:K,rfId:I,panBy:V,updateConnection:j}=S.getState(),F=B.type==="target",X=(z,$)=>{y(!1),g?.(z,r,B.type,$)},Z=z=>d?.(r,z),A=(z,$)=>{y(!0),p?.(M,r,B.type),L?.(z,$)};Bp.onPointerDown(M.nativeEvent,{autoPanOnConnect:k,connectionMode:U,connectionRadius:H,domNode:D,handleId:B.id,nodeId:B.nodeId,nodeLookup:K,isTarget:F,edgeUpdaterType:B.type,lib:q,flowId:I,cancelConnection:P,panBy:V,isValidConnection:(...z)=>S.getState().isValidConnection?.(...z)??!0,onConnect:Z,onConnectStart:A,onConnectEnd:(...z)=>S.getState().onConnectEnd?.(...z),onReconnectEnd:X,updateConnection:j,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},N=M=>E(M,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),w=M=>E(M,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),O=()=>v(!0),_=()=>v(!1);return b.jsxs(b.Fragment,{children:[(e===!0||e==="source")&&b.jsx(Db,{position:f,centerX:a,centerY:o,radius:t,onMouseDown:N,onMouseEnter:O,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&b.jsx(Db,{position:h,centerX:l,centerY:u,radius:t,onMouseDown:w,onMouseEnter:O,onMouseOut:_,type:"target"})]})}function Wj({id:e,edgesFocusable:t,edgesReconnectable:r,elementsSelectable:a,onClick:o,onDoubleClick:l,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:d,reconnectRadius:p,onReconnect:g,onReconnectStart:y,onReconnectEnd:v,rfId:S,edgeTypes:E,noPanClassName:N,onError:w,disableKeyboardA11y:O}){let _=Ue(ye=>ye.edgeLookup.get(e));const M=Ue(ye=>ye.defaultEdgeOptions);_=M?{...M,..._}:_;let B=_.type||"default",k=E?.[B]||Rb[B];k===void 0&&(w?.("011",Jn.error011(B)),B="default",k=E?.default||Rb.default);const D=!!(_.focusable||t&&typeof _.focusable>"u"),U=typeof g<"u"&&(_.reconnectable||r&&typeof _.reconnectable>"u"),H=!!(_.selectable||a&&typeof _.selectable>"u"),q=Y.useRef(null),[L,P]=Y.useState(!1),[K,I]=Y.useState(!1),V=lt(),{zIndex:j,sourceX:F,sourceY:X,targetX:Z,targetY:A,sourcePosition:z,targetPosition:$}=Ue(Y.useCallback(ye=>{const we=ye.nodeLookup.get(_.source),Re=ye.nodeLookup.get(_.target);if(!we||!Re)return{zIndex:_.zIndex,...Ob};const He=X3({id:e,sourceNode:we,targetNode:Re,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:ye.connectionMode,onError:w});return{zIndex:P3({selected:_.selected,zIndex:_.zIndex,sourceNode:we,targetNode:Re,elevateOnSelect:ye.elevateEdgesOnSelect,zIndexMode:ye.zIndexMode}),...He||Ob}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),st),R=Y.useMemo(()=>_.markerStart?`url('#${Lp(_.markerStart,S)}')`:void 0,[_.markerStart,S]),te=Y.useMemo(()=>_.markerEnd?`url('#${Lp(_.markerEnd,S)}')`:void 0,[_.markerEnd,S]);if(_.hidden||F===null||X===null||Z===null||A===null)return null;const ue=ye=>{const{addSelectedEdges:we,unselectNodesAndEdges:Re,multiSelectionActive:He}=V.getState();H&&(V.setState({nodesSelectionActive:!1}),_.selected&&He?(Re({nodes:[],edges:[_]}),q.current?.blur()):we([e])),o&&o(ye,_)},ce=l?ye=>{l(ye,{..._})}:void 0,fe=u?ye=>{u(ye,{..._})}:void 0,le=f?ye=>{f(ye,{..._})}:void 0,pe=h?ye=>{h(ye,{..._})}:void 0,be=d?ye=>{d(ye,{..._})}:void 0,Se=ye=>{if(!O&&lw.includes(ye.key)&&H){const{unselectNodesAndEdges:we,addSelectedEdges:Re}=V.getState();ye.key==="Escape"?(q.current?.blur(),we({edges:[_]})):Re([e])}};return b.jsx("svg",{style:{zIndex:j},children:b.jsxs("g",{className:St(["react-flow__edge",`react-flow__edge-${B}`,_.className,N,{selected:_.selected,animated:_.animated,inactive:!H&&!o,updating:L,selectable:H}]),onClick:ue,onDoubleClick:ce,onContextMenu:fe,onMouseEnter:le,onMouseMove:pe,onMouseLeave:be,onKeyDown:D?Se:void 0,tabIndex:D?0:void 0,role:_.ariaRole??(D?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":D?`${Pw}-${S}`:void 0,ref:q,..._.domAttributes,children:[!K&&b.jsx(k,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:H,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:F,sourceY:X,targetX:Z,targetY:A,sourcePosition:z,targetPosition:$,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:R,markerEnd:te,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),U&&b.jsx(Kj,{edge:_,isReconnectable:U,reconnectRadius:p,onReconnect:g,onReconnectStart:y,onReconnectEnd:v,sourceX:F,sourceY:X,targetX:Z,targetY:A,sourcePosition:z,targetPosition:$,setUpdateHover:P,setReconnecting:I})]})})}var Jj=Y.memo(Wj);const eD=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function cE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:r,edgeTypes:a,noPanClassName:o,onReconnect:l,onEdgeContextMenu:u,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:d,onEdgeClick:p,reconnectRadius:g,onEdgeDoubleClick:y,onReconnectStart:v,onReconnectEnd:S,disableKeyboardA11y:E}){const{edgesFocusable:N,edgesReconnectable:w,elementsSelectable:O,onError:_}=Ue(eD,st),M=Bj(t);return b.jsxs("div",{className:"react-flow__edges",children:[b.jsx(Vj,{defaultColor:e,rfId:r}),M.map(B=>b.jsx(Jj,{id:B,edgesFocusable:N,edgesReconnectable:w,elementsSelectable:O,noPanClassName:o,onReconnect:l,onContextMenu:u,onMouseEnter:f,onMouseMove:h,onMouseLeave:d,onClick:p,reconnectRadius:g,onDoubleClick:y,onReconnectStart:v,onReconnectEnd:S,rfId:r,onError:_,edgeTypes:a,disableKeyboardA11y:E},B))]})}cE.displayName="EdgeRenderer";const tD=Y.memo(cE),nD=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function rD({children:e}){const t=Ue(nD);return b.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function iD(e){const t=Dm(),r=Y.useRef(!1);Y.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const aD=e=>e.panZoom?.syncViewport;function oD(e){const t=Ue(aD),r=lt();return Y.useEffect(()=>{e&&(t?.(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function sD(e){return e.connection.inProgress?{...e.connection,to:gl(e.connection.to,e.transform)}:{...e.connection}}function lD(e){return sD}function uD(e){const t=lD();return Ue(t,st)}const cD=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function fD({containerStyle:e,style:t,type:r,component:a}){const{nodesConnectable:o,width:l,height:u,isValid:f,inProgress:h}=Ue(cD,st);return!(l&&o&&h)?null:b.jsx("svg",{style:e,width:l,height:u,className:"react-flow__connectionline react-flow__container",children:b.jsx("g",{className:St(["react-flow__connection",fw(f)]),children:b.jsx(fE,{style:t,type:r,CustomComponent:a,isValid:f})})})}const fE=({style:e,type:t=li.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:o,from:l,fromNode:u,fromHandle:f,fromPosition:h,to:d,toNode:p,toHandle:g,toPosition:y,pointer:v}=uD();if(!o)return;if(r)return b.jsx(r,{connectionLineType:t,connectionLineStyle:e,fromNode:u,fromHandle:f,fromX:l.x,fromY:l.y,toX:d.x,toY:d.y,fromPosition:h,toPosition:y,connectionStatus:fw(a),toNode:p,toHandle:g,pointer:v});let S="";const E={sourceX:l.x,sourceY:l.y,sourcePosition:h,targetX:d.x,targetY:d.y,targetPosition:y};switch(t){case li.Bezier:[S]=Ew(E);break;case li.SimpleBezier:[S]=Ww(E);break;case li.Step:[S]=zp({...E,borderRadius:0});break;case li.SmoothStep:[S]=zp(E);break;default:[S]=_w(E)}return b.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};fE.displayName="ConnectionLine";const dD={};function zb(e=dD){Y.useRef(e),lt(),Y.useEffect(()=>{},[e])}function hD(){lt(),Y.useRef(!1),Y.useEffect(()=>{},[])}function dE({nodeTypes:e,edgeTypes:t,onInit:r,onNodeClick:a,onEdgeClick:o,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:d,onNodeContextMenu:p,onSelectionContextMenu:g,onSelectionStart:y,onSelectionEnd:v,connectionLineType:S,connectionLineStyle:E,connectionLineComponent:N,connectionLineContainerStyle:w,selectionKeyCode:O,selectionOnDrag:_,selectionMode:M,multiSelectionKeyCode:B,panActivationKeyCode:k,zoomActivationKeyCode:D,deleteKeyCode:U,onlyRenderVisibleElements:H,elementsSelectable:q,defaultViewport:L,translateExtent:P,minZoom:K,maxZoom:I,preventScrolling:V,defaultMarkerColor:j,zoomOnScroll:F,zoomOnPinch:X,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:z,zoomOnDoubleClick:$,panOnDrag:R,onPaneClick:te,onPaneMouseEnter:ue,onPaneMouseMove:ce,onPaneMouseLeave:fe,onPaneScroll:le,onPaneContextMenu:pe,paneClickDistance:be,nodeClickDistance:Se,onEdgeContextMenu:ye,onEdgeMouseEnter:we,onEdgeMouseMove:Re,onEdgeMouseLeave:He,reconnectRadius:Ie,onReconnect:Qe,onReconnectStart:_t,onReconnectEnd:it,noDragClassName:Ot,noWheelClassName:qt,noPanClassName:An,disableKeyboardA11y:vn,nodeExtent:Ne,rfId:ut,viewport:ie,onViewportChange:he}){return zb(e),zb(t),hD(),iD(r),oD(ie),b.jsx(kj,{onPaneClick:te,onPaneMouseEnter:ue,onPaneMouseMove:ce,onPaneMouseLeave:fe,onPaneContextMenu:pe,onPaneScroll:le,paneClickDistance:be,deleteKeyCode:U,selectionKeyCode:O,selectionOnDrag:_,selectionMode:M,onSelectionStart:y,onSelectionEnd:v,multiSelectionKeyCode:B,panActivationKeyCode:k,zoomActivationKeyCode:D,elementsSelectable:q,zoomOnScroll:F,zoomOnPinch:X,zoomOnDoubleClick:$,panOnScroll:Z,panOnScrollSpeed:A,panOnScrollMode:z,panOnDrag:R,defaultViewport:L,translateExtent:P,minZoom:K,maxZoom:I,onSelectionContextMenu:g,preventScrolling:V,noDragClassName:Ot,noWheelClassName:qt,noPanClassName:An,disableKeyboardA11y:vn,onViewportChange:he,isControlledViewport:!!ie,children:b.jsxs(rD,{children:[b.jsx(tD,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:u,onReconnect:Qe,onReconnectStart:_t,onReconnectEnd:it,onlyRenderVisibleElements:H,onEdgeContextMenu:ye,onEdgeMouseEnter:we,onEdgeMouseMove:Re,onEdgeMouseLeave:He,reconnectRadius:Ie,defaultMarkerColor:j,noPanClassName:An,disableKeyboardA11y:vn,rfId:ut}),b.jsx(fD,{style:E,type:S,component:N,containerStyle:w}),b.jsx("div",{className:"react-flow__edgelabel-renderer"}),b.jsx(Ij,{nodeTypes:e,onNodeClick:a,onNodeDoubleClick:l,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:d,onNodeContextMenu:p,nodeClickDistance:Se,onlyRenderVisibleElements:H,noPanClassName:An,noDragClassName:Ot,disableKeyboardA11y:vn,nodeExtent:Ne,rfId:ut}),b.jsx("div",{className:"react-flow__viewport-portal"})]})})}dE.displayName="GraphView";const pD=Y.memo(dE),Lb=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:l,fitView:u,fitViewOptions:f,minZoom:h=.5,maxZoom:d=2,nodeOrigin:p,nodeExtent:g,zIndexMode:y="basic"}={})=>{const v=new Map,S=new Map,E=new Map,N=new Map,w=a??t??[],O=r??e??[],_=p??[0,0],M=g??nl;kw(E,N,w);const{nodesInitialized:B}=Ip(O,v,S,{nodeOrigin:_,nodeExtent:M,zIndexMode:y});let k=[0,0,1];if(u&&o&&l){const D=pl(v,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:U,y:H,zoom:q}=Mm(D,o,l,h,d,f?.padding??.1);k=[U,H,q]}return{rfId:"1",width:o??0,height:l??0,transform:k,nodes:O,nodesInitialized:B,nodeLookup:v,parentLookup:S,edges:w,edgeLookup:N,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:h,maxZoom:d,translateExtent:nl,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:yo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,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:u??!1,fitViewOptions:f,fitViewResolver:null,connection:{...cw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:D3,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:uw,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},mD=({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:l,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:d,nodeOrigin:p,nodeExtent:g,zIndexMode:y})=>OO((v,S)=>{async function E(){const{nodeLookup:N,panZoom:w,fitViewOptions:O,fitViewResolver:_,width:M,height:B,minZoom:k,maxZoom:D}=S();w&&(await O3({nodes:N,width:M,height:B,panZoom:w,minZoom:k,maxZoom:D},O),_?.resolve(!0),v({fitViewResolver:null}))}return{...Lb({nodes:e,edges:t,width:o,height:l,fitView:u,fitViewOptions:f,minZoom:h,maxZoom:d,nodeOrigin:p,nodeExtent:g,defaultNodes:r,defaultEdges:a,zIndexMode:y}),setNodes:N=>{const{nodeLookup:w,parentLookup:O,nodeOrigin:_,elevateNodesOnSelect:M,fitViewQueued:B,zIndexMode:k,nodesSelectionActive:D}=S(),{nodesInitialized:U,hasSelectedNodes:H}=Ip(N,w,O,{nodeOrigin:_,nodeExtent:g,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:k}),q=D&&H;B&&U?(E(),v({nodes:N,nodesInitialized:U,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:q})):v({nodes:N,nodesInitialized:U,nodesSelectionActive:q})},setEdges:N=>{const{connectionLookup:w,edgeLookup:O}=S();kw(w,O,N),v({edges:N})},setDefaultNodesAndEdges:(N,w)=>{if(N){const{setNodes:O}=S();O(N),v({hasDefaultNodes:!0})}if(w){const{setEdges:O}=S();O(w),v({hasDefaultEdges:!0})}},updateNodeInternals:N=>{const{triggerNodeChanges:w,nodeLookup:O,parentLookup:_,domNode:M,nodeOrigin:B,nodeExtent:k,debug:D,fitViewQueued:U,zIndexMode:H}=S(),{changes:q,updatedInternals:L}=nO(N,O,_,M,B,k,H);L&&(W3(O,_,{nodeOrigin:B,nodeExtent:k,zIndexMode:H}),U?(E(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),q?.length>0&&(D&&console.log("React Flow: trigger node changes",q),w?.(q)))},updateNodePositions:(N,w=!1)=>{const O=[];let _=[];const{nodeLookup:M,triggerNodeChanges:B,connection:k,updateConnection:D,onNodesChangeMiddlewareMap:U}=S();for(const[H,q]of N){const L=M.get(H),P=!!(L?.expandParent&&L?.parentId&&q?.position),K={id:H,type:"position",position:P?{x:Math.max(0,q.position.x),y:Math.max(0,q.position.y)}:q.position,dragging:w};if(L&&k.inProgress&&k.fromNode.id===L.id){const I=ia(L,k.fromHandle,ve.Left,!0);D({...k,from:I})}P&&L.parentId&&O.push({id:H,parentId:L.parentId,rect:{...q.internals.positionAbsolute,width:q.measured.width??0,height:q.measured.height??0}}),_.push(K)}if(O.length>0){const{parentLookup:H,nodeOrigin:q}=S(),L=jm(O,M,H,q);_.push(...L)}for(const H of U.values())_=H(_);B(_)},triggerNodeChanges:N=>{const{onNodesChange:w,setNodes:O,nodes:_,hasDefaultNodes:M,debug:B}=S();if(N?.length){if(M){const k=JO(N,_);O(k)}B&&console.log("React Flow: trigger node changes",N),w?.(N)}},triggerEdgeChanges:N=>{const{onEdgesChange:w,setEdges:O,edges:_,hasDefaultEdges:M,debug:B}=S();if(N?.length){if(M){const k=ej(N,_);O(k)}B&&console.log("React Flow: trigger edge changes",N),w?.(N)}},addSelectedNodes:N=>{const{multiSelectionActive:w,edgeLookup:O,nodeLookup:_,triggerNodeChanges:M,triggerEdgeChanges:B}=S();if(w){const k=N.map(D=>qi(D,!0));M(k);return}M(ro(_,new Set([...N]),!0)),B(ro(O))},addSelectedEdges:N=>{const{multiSelectionActive:w,edgeLookup:O,nodeLookup:_,triggerNodeChanges:M,triggerEdgeChanges:B}=S();if(w){const k=N.map(D=>qi(D,!0));B(k);return}B(ro(O,new Set([...N]))),M(ro(_,new Set,!0))},unselectNodesAndEdges:({nodes:N,edges:w}={})=>{const{edges:O,nodes:_,nodeLookup:M,triggerNodeChanges:B,triggerEdgeChanges:k}=S(),D=N||_,U=w||O,H=[];for(const L of D){if(!L.selected)continue;const P=M.get(L.id);P&&(P.selected=!1),H.push(qi(L.id,!1))}const q=[];for(const L of U)L.selected&&q.push(qi(L.id,!1));B(H),k(q)},setMinZoom:N=>{const{panZoom:w,maxZoom:O}=S();w?.setScaleExtent([N,O]),v({minZoom:N})},setMaxZoom:N=>{const{panZoom:w,minZoom:O}=S();w?.setScaleExtent([O,N]),v({maxZoom:N})},setTranslateExtent:N=>{S().panZoom?.setTranslateExtent(N),v({translateExtent:N})},resetSelectedElements:()=>{const{edges:N,nodes:w,triggerNodeChanges:O,triggerEdgeChanges:_,elementsSelectable:M}=S();if(!M)return;const B=w.reduce((D,U)=>U.selected?[...D,qi(U.id,!1)]:D,[]),k=N.reduce((D,U)=>U.selected?[...D,qi(U.id,!1)]:D,[]);O(B),_(k)},setNodeExtent:N=>{const{nodes:w,nodeLookup:O,parentLookup:_,nodeOrigin:M,elevateNodesOnSelect:B,nodeExtent:k,zIndexMode:D}=S();N[0][0]===k[0][0]&&N[0][1]===k[0][1]&&N[1][0]===k[1][0]&&N[1][1]===k[1][1]||(Ip(w,O,_,{nodeOrigin:M,nodeExtent:N,elevateNodesOnSelect:B,checkEquality:!1,zIndexMode:D}),v({nodeExtent:N}))},panBy:N=>{const{transform:w,width:O,height:_,panZoom:M,translateExtent:B}=S();return rO({delta:N,panZoom:M,transform:w,translateExtent:B,width:O,height:_})},setCenter:async(N,w,O)=>{const{width:_,height:M,maxZoom:B,panZoom:k}=S();if(!k)return Promise.resolve(!1);const D=typeof O?.zoom<"u"?O.zoom:B;return await k.setViewport({x:_/2-N*D,y:M/2-w*D,zoom:D},{duration:O?.duration,ease:O?.ease,interpolate:O?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...cw}})},updateConnection:N=>{v({connection:N})},reset:()=>v({...Lb()})}},Object.is);function gD({initialNodes:e,initialEdges:t,defaultNodes:r,defaultEdges:a,initialWidth:o,initialHeight:l,initialMinZoom:u,initialMaxZoom:f,initialFitViewOptions:h,fitView:d,nodeOrigin:p,nodeExtent:g,zIndexMode:y,children:v}){const[S]=Y.useState(()=>mD({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,width:o,height:l,fitView:d,minZoom:u,maxZoom:f,fitViewOptions:h,nodeOrigin:p,nodeExtent:g,zIndexMode:y}));return b.jsx(jO,{value:S,children:b.jsx(rj,{children:v})})}function yD({children:e,nodes:t,edges:r,defaultNodes:a,defaultEdges:o,width:l,height:u,fitView:f,fitViewOptions:h,minZoom:d,maxZoom:p,nodeOrigin:g,nodeExtent:y,zIndexMode:v}){return Y.useContext(Wc)?b.jsx(b.Fragment,{children:e}):b.jsx(gD,{initialNodes:t,initialEdges:r,defaultNodes:a,defaultEdges:o,initialWidth:l,initialHeight:u,fitView:f,initialFitViewOptions:h,initialMinZoom:d,initialMaxZoom:p,nodeOrigin:g,nodeExtent:y,zIndexMode:v,children:e})}const xD={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function vD({nodes:e,edges:t,defaultNodes:r,defaultEdges:a,className:o,nodeTypes:l,edgeTypes:u,onNodeClick:f,onEdgeClick:h,onInit:d,onMove:p,onMoveStart:g,onMoveEnd:y,onConnect:v,onConnectStart:S,onConnectEnd:E,onClickConnectStart:N,onClickConnectEnd:w,onNodeMouseEnter:O,onNodeMouseMove:_,onNodeMouseLeave:M,onNodeContextMenu:B,onNodeDoubleClick:k,onNodeDragStart:D,onNodeDrag:U,onNodeDragStop:H,onNodesDelete:q,onEdgesDelete:L,onDelete:P,onSelectionChange:K,onSelectionDragStart:I,onSelectionDrag:V,onSelectionDragStop:j,onSelectionContextMenu:F,onSelectionStart:X,onSelectionEnd:Z,onBeforeDelete:A,connectionMode:z,connectionLineType:$=li.Bezier,connectionLineStyle:R,connectionLineComponent:te,connectionLineContainerStyle:ue,deleteKeyCode:ce="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:le=!1,selectionMode:pe=rl.Full,panActivationKeyCode:be="Space",multiSelectionKeyCode:Se=al()?"Meta":"Control",zoomActivationKeyCode:ye=al()?"Meta":"Control",snapToGrid:we,snapGrid:Re,onlyRenderVisibleElements:He=!1,selectNodesOnDrag:Ie,nodesDraggable:Qe,autoPanOnNodeFocus:_t,nodesConnectable:it,nodesFocusable:Ot,nodeOrigin:qt=Uw,edgesFocusable:An,edgesReconnectable:vn,elementsSelectable:Ne=!0,defaultViewport:ut=$O,minZoom:ie=.5,maxZoom:he=2,translateExtent:Ee=nl,preventScrolling:Oe=!0,nodeExtent:Pe,defaultMarkerColor:Bt="#b1b1b7",zoomOnScroll:Rn=!0,zoomOnPinch:Nt=!0,panOnScroll:dt=!1,panOnScrollSpeed:jt=.5,panOnScrollMode:$e=Ji.Free,zoomOnDoubleClick:Un=!0,panOnDrag:on=!0,onPaneClick:of,onPaneMouseEnter:ua,onPaneMouseMove:ca,onPaneMouseLeave:fa,onPaneScroll:nr,onPaneContextMenu:da,paneClickDistance:vi=1,nodeClickDistance:sf=0,children:vl,onReconnect:No,onReconnectStart:bi,onReconnectEnd:lf,onEdgeContextMenu:bl,onEdgeDoubleClick:Sl,onEdgeMouseEnter:wl,onEdgeMouseMove:Mo,onEdgeMouseLeave:ko,reconnectRadius:El=10,onNodesChange:Cl,onEdgesChange:qn,noDragClassName:wt="nodrag",noWheelClassName:Dt="nowheel",noPanClassName:rr="nopan",fitView:ha,fitViewOptions:_l,connectOnClick:uf,attributionPosition:Nl,proOptions:Si,defaultEdgeOptions:To,elevateNodesOnSelect:Ar=!0,elevateEdgesOnSelect:Rr=!1,disableKeyboardA11y:Or=!1,autoPanOnConnect:jr,autoPanOnNodeDrag:mt,autoPanSpeed:Ml,connectionRadius:kl,isValidConnection:ir,onError:Dr,style:cf,id:Ao,nodeDragThreshold:Tl,connectionDragThreshold:ff,viewport:pa,onViewportChange:ma,width:On,height:Vt,colorMode:Al="light",debug:df,onScroll:ga,ariaLabelConfig:Rl,zIndexMode:wi="basic",...hf},Ft){const Ei=Ao||"1",Ol=ZO(Al),Ro=Y.useCallback(ar=>{ar.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ga?.(ar)},[ga]);return b.jsx("div",{"data-testid":"rf__wrapper",...hf,onScroll:Ro,style:{...cf,...xD},ref:Ft,className:St(["react-flow",o,Ol]),id:Ao,role:"application",children:b.jsxs(yD,{nodes:e,edges:t,width:On,height:Vt,fitView:ha,fitViewOptions:_l,minZoom:ie,maxZoom:he,nodeOrigin:qt,nodeExtent:Pe,zIndexMode:wi,children:[b.jsx(QO,{nodes:e,edges:t,defaultNodes:r,defaultEdges:a,onConnect:v,onConnectStart:S,onConnectEnd:E,onClickConnectStart:N,onClickConnectEnd:w,nodesDraggable:Qe,autoPanOnNodeFocus:_t,nodesConnectable:it,nodesFocusable:Ot,edgesFocusable:An,edgesReconnectable:vn,elementsSelectable:Ne,elevateNodesOnSelect:Ar,elevateEdgesOnSelect:Rr,minZoom:ie,maxZoom:he,nodeExtent:Pe,onNodesChange:Cl,onEdgesChange:qn,snapToGrid:we,snapGrid:Re,connectionMode:z,translateExtent:Ee,connectOnClick:uf,defaultEdgeOptions:To,fitView:ha,fitViewOptions:_l,onNodesDelete:q,onEdgesDelete:L,onDelete:P,onNodeDragStart:D,onNodeDrag:U,onNodeDragStop:H,onSelectionDrag:V,onSelectionDragStart:I,onSelectionDragStop:j,onMove:p,onMoveStart:g,onMoveEnd:y,noPanClassName:rr,nodeOrigin:qt,rfId:Ei,autoPanOnConnect:jr,autoPanOnNodeDrag:mt,autoPanSpeed:Ml,onError:Dr,connectionRadius:kl,isValidConnection:ir,selectNodesOnDrag:Ie,nodeDragThreshold:Tl,connectionDragThreshold:ff,onBeforeDelete:A,debug:df,ariaLabelConfig:Rl,zIndexMode:wi}),b.jsx(pD,{onInit:d,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:O,onNodeMouseMove:_,onNodeMouseLeave:M,onNodeContextMenu:B,onNodeDoubleClick:k,nodeTypes:l,edgeTypes:u,connectionLineType:$,connectionLineStyle:R,connectionLineComponent:te,connectionLineContainerStyle:ue,selectionKeyCode:fe,selectionOnDrag:le,selectionMode:pe,deleteKeyCode:ce,multiSelectionKeyCode:Se,panActivationKeyCode:be,zoomActivationKeyCode:ye,onlyRenderVisibleElements:He,defaultViewport:ut,translateExtent:Ee,minZoom:ie,maxZoom:he,preventScrolling:Oe,zoomOnScroll:Rn,zoomOnPinch:Nt,zoomOnDoubleClick:Un,panOnScroll:dt,panOnScrollSpeed:jt,panOnScrollMode:$e,panOnDrag:on,onPaneClick:of,onPaneMouseEnter:ua,onPaneMouseMove:ca,onPaneMouseLeave:fa,onPaneScroll:nr,onPaneContextMenu:da,paneClickDistance:vi,nodeClickDistance:sf,onSelectionContextMenu:F,onSelectionStart:X,onSelectionEnd:Z,onReconnect:No,onReconnectStart:bi,onReconnectEnd:lf,onEdgeContextMenu:bl,onEdgeDoubleClick:Sl,onEdgeMouseEnter:wl,onEdgeMouseMove:Mo,onEdgeMouseLeave:ko,reconnectRadius:El,defaultMarkerColor:Bt,noDragClassName:wt,noWheelClassName:Dt,noPanClassName:rr,rfId:Ei,disableKeyboardA11y:Or,nodeExtent:Pe,viewport:pa,onViewportChange:ma}),b.jsx(YO,{onSelectionChange:K}),vl,b.jsx(PO,{proOptions:Si,position:Nl}),b.jsx(HO,{rfId:Ei,disableKeyboardA11y:Or})]})})}var bD=Vw(vD);function SD({dimensions:e,lineWidth:t,variant:r,className:a}){return b.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:St(["react-flow__background-pattern",r,a])})}function wD({radius:e,className:t}){return b.jsx("circle",{cx:e,cy:e,r:e,className:St(["react-flow__background-pattern","dots",t])})}var mi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(mi||(mi={}));const ED={[mi.Dots]:1,[mi.Lines]:1,[mi.Cross]:6},CD=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function hE({id:e,variant:t=mi.Dots,gap:r=20,size:a,lineWidth:o=1,offset:l=0,color:u,bgColor:f,style:h,className:d,patternClassName:p}){const g=Y.useRef(null),{transform:y,patternId:v}=Ue(CD,st),S=a||ED[t],E=t===mi.Dots,N=t===mi.Cross,w=Array.isArray(r)?r:[r,r],O=[w[0]*y[2]||1,w[1]*y[2]||1],_=S*y[2],M=Array.isArray(l)?l:[l,l],B=N?[_,_]:O,k=[M[0]*y[2]||1+B[0]/2,M[1]*y[2]||1+B[1]/2],D=`${v}${e||""}`;return b.jsxs("svg",{className:St(["react-flow__background",d]),style:{...h,...ef,"--xy-background-color-props":f,"--xy-background-pattern-color-props":u},ref:g,"data-testid":"rf__background",children:[b.jsx("pattern",{id:D,x:y[0]%O[0],y:y[1]%O[1],width:O[0],height:O[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:E?b.jsx(wD,{radius:_/2,className:p}):b.jsx(SD,{dimensions:B,lineWidth:o,variant:t,className:p})}),b.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${D})`})]})}hE.displayName="Background";Y.memo(hE);function _D(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:b.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function ND(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:b.jsx("path",{d:"M0 0h32v4.2H0z"})})}function MD(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:b.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function kD(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function TD(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function ec({children:e,className:t,...r}){return b.jsx("button",{type:"button",className:St(["react-flow__controls-button",t]),...r,children:e})}const AD=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function pE({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:o,onZoomIn:l,onZoomOut:u,onFitView:f,onInteractiveChange:h,className:d,children:p,position:g="bottom-left",orientation:y="vertical","aria-label":v}){const S=lt(),{isInteractive:E,minZoomReached:N,maxZoomReached:w,ariaLabelConfig:O}=Ue(AD,st),{zoomIn:_,zoomOut:M,fitView:B}=Dm(),k=()=>{_(),l?.()},D=()=>{M(),u?.()},U=()=>{B(o),f?.()},H=()=>{S.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),h?.(!E)},q=y==="horizontal"?"horizontal":"vertical";return b.jsxs(Jc,{className:St(["react-flow__controls",q,d]),position:g,style:e,"data-testid":"rf__controls","aria-label":v??O["controls.ariaLabel"],children:[t&&b.jsxs(b.Fragment,{children:[b.jsx(ec,{onClick:k,className:"react-flow__controls-zoomin",title:O["controls.zoomIn.ariaLabel"],"aria-label":O["controls.zoomIn.ariaLabel"],disabled:w,children:b.jsx(_D,{})}),b.jsx(ec,{onClick:D,className:"react-flow__controls-zoomout",title:O["controls.zoomOut.ariaLabel"],"aria-label":O["controls.zoomOut.ariaLabel"],disabled:N,children:b.jsx(ND,{})})]}),r&&b.jsx(ec,{className:"react-flow__controls-fitview",onClick:U,title:O["controls.fitView.ariaLabel"],"aria-label":O["controls.fitView.ariaLabel"],children:b.jsx(MD,{})}),a&&b.jsx(ec,{className:"react-flow__controls-interactive",onClick:H,title:O["controls.interactive.ariaLabel"],"aria-label":O["controls.interactive.ariaLabel"],children:E?b.jsx(TD,{}):b.jsx(kD,{})}),p]})}pE.displayName="Controls";Y.memo(pE);function RD({id:e,x:t,y:r,width:a,height:o,style:l,color:u,strokeColor:f,strokeWidth:h,className:d,borderRadius:p,shapeRendering:g,selected:y,onClick:v}){const{background:S,backgroundColor:E}=l||{},N=u||S||E;return b.jsx("rect",{className:St(["react-flow__minimap-node",{selected:y},d]),x:t,y:r,rx:p,ry:p,width:a,height:o,style:{fill:N,stroke:f,strokeWidth:h},shapeRendering:g,onClick:v?w=>v(w,e):void 0})}const OD=Y.memo(RD),jD=e=>e.nodes.map(t=>t.id),Xh=e=>e instanceof Function?e:()=>e;function DD({nodeStrokeColor:e,nodeColor:t,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l=OD,onClick:u}){const f=Ue(jD,st),h=Xh(t),d=Xh(e),p=Xh(r),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return b.jsx(b.Fragment,{children:f.map(y=>b.jsx(LD,{id:y,nodeColorFunc:h,nodeStrokeColorFunc:d,nodeClassNameFunc:p,nodeBorderRadius:a,nodeStrokeWidth:o,NodeComponent:l,onClick:u,shapeRendering:g},y))})}function zD({id:e,nodeColorFunc:t,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:o,nodeStrokeWidth:l,shapeRendering:u,NodeComponent:f,onClick:h}){const{node:d,x:p,y:g,width:y,height:v}=Ue(S=>{const E=S.nodeLookup.get(e);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const N=E.internals.userNode,{x:w,y:O}=E.internals.positionAbsolute,{width:_,height:M}=Tr(N);return{node:N,x:w,y:O,width:_,height:M}},st);return!d||d.hidden||!yw(d)?null:b.jsx(f,{x:p,y:g,width:y,height:v,style:d.style,selected:!!d.selected,className:a(d),color:t(d),borderRadius:o,strokeColor:r(d),strokeWidth:l,shapeRendering:u,onClick:h,id:d.id})}const LD=Y.memo(zD);var ID=Y.memo(DD);const BD=200,HD=150,PD=e=>!e.hidden,UD=e=>{const 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?gw(pl(e.nodeLookup,{filter:PD}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},qD="react-flow__minimap-desc";function mE({style:e,className:t,nodeStrokeColor:r,nodeColor:a,nodeClassName:o="",nodeBorderRadius:l=5,nodeStrokeWidth:u,nodeComponent:f,bgColor:h,maskColor:d,maskStrokeColor:p,maskStrokeWidth:g,position:y="bottom-right",onClick:v,onNodeClick:S,pannable:E=!1,zoomable:N=!1,ariaLabel:w,inversePan:O,zoomStep:_=1,offsetScale:M=5}){const B=lt(),k=Y.useRef(null),{boundingRect:D,viewBB:U,rfId:H,panZoom:q,translateExtent:L,flowWidth:P,flowHeight:K,ariaLabelConfig:I}=Ue(UD,st),V=e?.width??BD,j=e?.height??HD,F=D.width/V,X=D.height/j,Z=Math.max(F,X),A=Z*V,z=Z*j,$=M*Z,R=D.x-(A-D.width)/2-$,te=D.y-(z-D.height)/2-$,ue=A+$*2,ce=z+$*2,fe=`${qD}-${H}`,le=Y.useRef(0),pe=Y.useRef();le.current=Z,Y.useEffect(()=>{if(k.current&&q)return pe.current=dO({domNode:k.current,panZoom:q,getTransform:()=>B.getState().transform,getViewScale:()=>le.current}),()=>{pe.current?.destroy()}},[q]),Y.useEffect(()=>{pe.current?.update({translateExtent:L,width:P,height:K,inversePan:O,pannable:E,zoomStep:_,zoomable:N})},[E,N,O,_,L,P,K]);const be=v?we=>{const[Re,He]=pe.current?.pointer(we)||[0,0];v(we,{x:Re,y:He})}:void 0,Se=S?Y.useCallback((we,Re)=>{const He=B.getState().nodeLookup.get(Re).internals.userNode;S(we,He)},[]):void 0,ye=w??I["minimap.ariaLabel"];return b.jsx(Jc,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof g=="number"?g*Z:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:St(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:b.jsxs("svg",{width:V,height:j,viewBox:`${R} ${te} ${ue} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":fe,ref:k,onClick:be,children:[ye&&b.jsx("title",{id:fe,children:ye}),b.jsx(ID,{onClick:Se,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:l,nodeClassName:o,nodeStrokeWidth:u,nodeComponent:f}),b.jsx("path",{className:"react-flow__minimap-mask",d:`M${R-$},${te-$}h${ue+$*2}v${ce+$*2}h${-ue-$*2}z
15
- M${U.x},${U.y}h${U.width}v${U.height}h${-U.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}mE.displayName="MiniMap";Y.memo(mE);const VD=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,FD={[So.Line]:"right",[So.Handle]:"bottom-right"};function YD({nodeId:e,position:t,variant:r=So.Handle,className:a,style:o=void 0,children:l,color:u,minWidth:f=10,minHeight:h=10,maxWidth:d=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:g=!1,resizeDirection:y,autoScale:v=!0,shouldResize:S,onResizeStart:E,onResize:N,onResizeEnd:w}){const O=Gw(),_=typeof e=="string"?e:O,M=lt(),B=Y.useRef(null),k=r===So.Handle,D=Ue(Y.useCallback(VD(k&&v),[k,v]),st),U=Y.useRef(null),H=t??FD[r];Y.useEffect(()=>{if(!(!B.current||!_))return U.current||(U.current=NO({domNode:B.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:L,transform:P,snapGrid:K,snapToGrid:I,nodeOrigin:V,domNode:j}=M.getState();return{nodeLookup:L,transform:P,snapGrid:K,snapToGrid:I,nodeOrigin:V,paneDomNode:j}},onChange:(L,P)=>{const{triggerNodeChanges:K,nodeLookup:I,parentLookup:V,nodeOrigin:j}=M.getState(),F=[],X={x:L.x,y:L.y},Z=I.get(_);if(Z&&Z.expandParent&&Z.parentId){const A=Z.origin??j,z=L.width??Z.measured.width??0,$=L.height??Z.measured.height??0,R={id:Z.id,parentId:Z.parentId,rect:{width:z,height:$,...xw({x:L.x??Z.position.x,y:L.y??Z.position.y},{width:z,height:$},Z.parentId,I,A)}},te=jm([R],I,V,j);F.push(...te),X.x=L.x?Math.max(A[0]*z,L.x):void 0,X.y=L.y?Math.max(A[1]*$,L.y):void 0}if(X.x!==void 0&&X.y!==void 0){const A={id:_,type:"position",position:{...X}};F.push(A)}if(L.width!==void 0&&L.height!==void 0){const z={id:_,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};F.push(z)}for(const A of P){const z={...A,type:"position"};F.push(z)}K(F)},onEnd:({width:L,height:P})=>{const K={id:_,type:"dimensions",resizing:!1,dimensions:{width:L,height:P}};M.getState().triggerNodeChanges([K])}})),U.current.update({controlPosition:H,boundaries:{minWidth:f,minHeight:h,maxWidth:d,maxHeight:p},keepAspectRatio:g,resizeDirection:y,onResizeStart:E,onResize:N,onResizeEnd:w,shouldResize:S}),()=>{U.current?.destroy()}},[H,f,h,d,p,g,E,N,w,S]);const q=H.split("-");return b.jsx("div",{className:St(["react-flow__resize-control","nodrag",...q,r,a]),ref:B,style:{...o,scale:D,...u&&{[k?"backgroundColor":"borderColor"]:u}},children:l})}Y.memo(YD);const Ib=268,Bb=112,Ka=56,Up=220,Hb=172,qp=124,Pb=104,Ub=600;function $D(e){if(e.nodes.length===0)return{nodes:[],edges:[],graphWidth:Ka*2,graphHeight:Ka*2,currentNodeId:null,startNodeId:null,latestBranchNodeId:null,summary:{currentNodeLabel:"No active node",lineageNodeCount:0,sideNodeCount:0,alternateBranchCount:0,blockedAttemptCount:0}};const t=new Map(e.nodes.map(q=>[q.nodeId,q])),r=new Map;for(const q of e.nodes){if(!q.parentNodeId)continue;const L=r.get(q.parentNodeId)??[];L.push(q),r.set(q.parentNodeId,L)}for(const q of r.values())q.sort((L,P)=>L.createdAtEventIndex-P.createdAtEventIndex);const a=GD(e),o=a?XD(a,t):new Set,l=QD(e.nodes,t),u=new Map,f=new Map,h=new Map,d=new Set,p=new Set;let g=0,y=0;const v=()=>{g+=1;const q=Math.ceil(g/2);return g%2===1?-q:q},S=(q,L,P,K)=>{if(u.has(q))return;u.set(q,L),f.set(q,P),h.set(q,K);const I=r.get(q)??[];if(I.length===0)return;const[V,...j]=I;V&&S(V.nodeId,L,P,K);let F=1;for(const X of j){const Z=L<0?L-F:L+F;S(X.nodeId,Z,P,K),F+=1}},E=[...o].sort((q,L)=>(l.get(q)??0)-(l.get(L)??0));for(const q of E){u.set(q,0),f.set(q,"active"),h.set(q,null);const L=r.get(q)??[];for(const P of L){if(o.has(P.nodeId))continue;y+=1;const K=P.nodeKind==="blocked_attempt"?"blocked":"alternate";K==="blocked"?p.add(P.nodeId):d.add(P.nodeId),S(P.nodeId,v(),K,y)}}const N=e.nodes.filter(q=>!q.parentNodeId||!t.has(q.parentNodeId)).sort((q,L)=>q.createdAtEventIndex-L.createdAtEventIndex);for(const q of N)if(!u.has(q.nodeId)){if(!o.has(q.nodeId)){y+=1;const L=q.nodeKind==="blocked_attempt"?"blocked":"alternate";L==="blocked"?p.add(q.nodeId):d.add(q.nodeId),S(q.nodeId,v(),L,y);continue}u.set(q.nodeId,0),f.set(q.nodeId,"active"),h.set(q.nodeId,null)}for(const q of e.nodes)if(!u.has(q.nodeId)){y+=1;const L=q.nodeKind==="blocked_attempt"?"blocked":"alternate";L==="blocked"?p.add(q.nodeId):d.add(q.nodeId),S(q.nodeId,v(),L,y)}const w=Math.min(...u.values()),O=Math.max(...u.values()),_=ZD(e.nodes,l,t,o),M=e.nodes.map(q=>{const L=o.has(q.nodeId),P=_.get(q.nodeId)??0;return{node:q,depth:P,lane:u.get(q.nodeId)??0,x:Ub+Ka+P*Ib,y:Ka+((u.get(q.nodeId)??0)-w)*Bb,isActiveLineage:L,isCurrent:q.nodeId===a,branchKind:f.get(q.nodeId)??"alternate",branchIndex:h.get(q.nodeId)??null}}),B=M.reduce((q,L)=>Math.max(q,L.depth),0),k=a?t.get(a)??null:null,D=[...d,...p].map(q=>t.get(q)).filter(q=>!!q).sort((q,L)=>L.createdAtEventIndex-q.createdAtEventIndex)[0]??null,U={currentNodeLabel:k?.stepLabel??(k?Lm(k.nodeId):"No active node"),lineageNodeCount:o.size,sideNodeCount:e.nodes.length-o.size,alternateBranchCount:d.size,blockedAttemptCount:e.nodes.filter(q=>q.nodeKind==="blocked_attempt").length},H=new Set(M.map(q=>q.node.nodeId));return{nodes:M,edges:e.edges.filter(q=>H.has(q.fromNodeId)&&H.has(q.toNodeId)),graphWidth:Ub*2+Ka*2+B*Ib+Up,graphHeight:Ka*2+(O-w)*Bb+qp,currentNodeId:a,startNodeId:E[0]??N[0]?.nodeId??null,latestBranchNodeId:D?.nodeId??null,summary:U}}function GD(e){if(e.preferredTipNodeId)return e.preferredTipNodeId;const t=e.nodes.find(a=>a.isPreferredTip);if(t)return t.nodeId;const r=e.nodes.filter(a=>a.isTip).sort((a,o)=>o.createdAtEventIndex-a.createdAtEventIndex)[0];return r?r.nodeId:[...e.nodes].sort((a,o)=>o.createdAtEventIndex-a.createdAtEventIndex)[0]?.nodeId??null}function XD(e,t){const r=new Set;let a=e;for(;a&&!r.has(a);){r.add(a);const o=t.get(a)?.parentNodeId??null;a=o&&t.has(o)?o:null}return r}function QD(e,t){const r=new Map,a=new Set,o=l=>{const u=r.get(l);if(u!==void 0)return u;if(a.has(l))return r.set(l,0),0;a.add(l);const h=t.get(l)?.parentNodeId??null;if(!h||!t.has(h))return r.set(l,0),a.delete(l),0;const d=o(h)+1;return r.set(l,d),a.delete(l),d};for(const l of e)o(l.nodeId);return r}function Lm(e){return e.slice(-8)}function ZD(e,t,r,a){const o=new Map;for(const f of a)o.set(f,t.get(f)??0);const l=new Set,u=f=>{const h=o.get(f);if(h!==void 0)return h;if(l.has(f)){const v=t.get(f)??0;return o.set(f,v),v}l.add(f);const p=r.get(f)?.parentNodeId??null;if(!p||!r.has(p)){const v=t.get(f)??0;return o.set(f,v),l.delete(f),v}const y=u(p)+1;return o.set(f,y),l.delete(f),y};for(const f of e)o.has(f.nodeId)||u(f.nodeId);return o}function KD({run:e,selectedNodeId:t=null,onNodeClick:r}){const a=Y.useRef(null),o=Y.useRef(null),l=Y.useRef(!1),[u,f]=Y.useState(null),[h,d]=Y.useState(null),p=Y.useRef(null),g=Y.useMemo(()=>$D(e),[e]),y=Y.useMemo(()=>new Map(g.nodes.map(M=>[M.node.nodeId,M])),[g.nodes]),v=e.status==="in_progress",S=Y.useCallback((M,B="smooth")=>{if(!M)return;const k=o.current,D=y.get(M);if(!k||!D)return;a.current?.scrollIntoView({behavior:B,block:"nearest"});const U=D.isActiveLineage?Up:Hb,H=D.isActiveLineage?qp:Pb;k.scrollTo({left:Math.max(0,D.x-k.clientWidth/2+U/2),top:Math.max(0,D.y-k.clientHeight/2+H/2),behavior:B})},[y]);Y.useEffect(()=>{l.current||g.currentNodeId&&(l.current=!0,S(g.currentNodeId,"auto"))},[]);const{nodes:E,edges:N}=Y.useMemo(()=>{const M=g.currentNodeId?g.edges.find(D=>D.toNodeId===g.currentNodeId)?.fromNodeId??null:null,B=g.nodes.map(D=>{const{node:U,isActiveLineage:H,isCurrent:q}=D,L=U.nodeId===t,P=H?Up:Hb,K=H?qp:Pb,I=nz(U,H,q,L),V=ez(U,H),j=gE(U,D.branchKind,D.branchIndex);return{id:U.nodeId,position:{x:D.x,y:D.y},data:{label:b.jsx(WD,{node:U,isActiveLineage:H,isCurrent:q,isSelected:L,isLiveRun:v,branchKind:D.branchKind,branchIndex:D.branchIndex,displayLabel:j,stepNumber:H?D.depth+1:null,totalSteps:H?g.summary.lineageNodeCount:null})},style:{width:P,height:K,padding:0,borderRadius:0,border:`1px solid ${I}`,background:V,color:"var(--text-primary)",boxShadow:L?"0 0 0 1px rgba(244, 179, 65, 0.7), 0 0 18px rgba(244, 179, 65, 0.16)":q?"0 0 0 1px rgba(0, 240, 255, 0.65), 0 0 24px rgba(0, 240, 255, 0.18)":H?"0 0 16px rgba(0, 240, 255, 0.1)":"none",opacity:H?1:.72,cursor:"pointer",display:"flex",alignItems:"stretch",justifyContent:"stretch"}}}),k=g.edges.map((D,U)=>{const H=y.get(D.fromNodeId),q=y.get(D.toNodeId),L=!!(H?.isActiveLineage&&q?.isActiveLineage),P=v&&!!g.currentNodeId&&D.toNodeId===g.currentNodeId&&D.fromNodeId===M;return{id:`lineage-edge-${U}`,source:D.fromNodeId,target:D.toNodeId,type:"smoothstep",animated:P,className:P?"workrail-current-lineage-edge":void 0,style:{stroke:P?"var(--accent-strong)":L?D.edgeKind==="checkpoint"?"var(--success)":"var(--accent-strong)":"rgba(123, 141, 167, 0.45)",strokeWidth:P?2.6:L?2.2:1.5,opacity:L?1:.72}}});return{nodes:B,edges:k}},[v,g.currentNodeId,g.edges,g.nodes,y,t]),w=Y.useCallback((M,B)=>{r?.(B.id)},[r]),O=Y.useCallback((M,B)=>{const k=y.get(B.id)?.node.stepLabel??null;if(!k||k.length<=35)return;const D=o.current?.getBoundingClientRect();if(!D)return;const U=M.clientX-D.left+12,H=M.clientY-D.top+16,q=Math.min(U,(o.current?.clientWidth??9999)-272);p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>{f(k),d({x:q,y:H})},300)},[y]),_=Y.useCallback(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null),f(null),d(null)},[]);return b.jsxs("div",{ref:a,className:"h-full flex flex-col bg-[var(--bg-primary)]",children:[b.jsxs("div",{className:"border-b border-[var(--border)] px-4 py-3 console-blueprint-grid",children:[b.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[b.jsxs("div",{className:"flex flex-wrap gap-2",children:[b.jsx(Ui,{label:"Current",value:g.summary.currentNodeLabel,emphasis:!0}),b.jsx(Ui,{label:"Status",value:sz(e.status)}),b.jsx(Ui,{label:"Active lineage",value:`${g.summary.lineageNodeCount} nodes`}),b.jsx(Ui,{label:"Alternate branches",value:`${g.summary.alternateBranchCount}`}),b.jsx(Ui,{label:"Historical nodes",value:`${g.summary.sideNodeCount}`}),b.jsx(Ui,{label:"Blocked attempts",value:`${g.summary.blockedAttemptCount}`}),b.jsx(Ui,{label:"Critical gaps",value:e.hasUnresolvedCriticalGaps?"Present":"None"})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Qh,{onClick:()=>S(g.startNodeId),children:"Start"}),b.jsx(Qh,{onClick:()=>S(g.currentNodeId),children:"Current"}),b.jsx(Qh,{onClick:()=>S(g.latestBranchNodeId),children:"Latest branch"})]})]}),b.jsx(JD,{model:g,selectedNodeId:t,onNavigateToNode:S})]}),b.jsxs("div",{ref:o,className:"relative flex-1 overflow-auto lineage-scroll-surface",children:[b.jsx("div",{style:{width:Math.max(g.graphWidth,960),height:Math.max(g.graphHeight,360)},children:b.jsx(bD,{nodes:E,edges:N,fitView:!1,defaultViewport:{x:0,y:0,zoom:1},proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,preventScrolling:!1,colorMode:"dark",onNodeClick:w,onNodeMouseEnter:O,onNodeMouseLeave:_,style:{background:"transparent"}})}),u&&h&&b.jsx("div",{style:{position:"absolute",left:h.x,top:h.y,pointerEvents:"none",zIndex:50,maxWidth:260,background:"rgba(10, 12, 20, 0.96)",border:"1px solid rgba(123, 141, 167, 0.35)",padding:"6px 10px",fontSize:12,lineHeight:1.5,color:"var(--text-primary)",wordWrap:"break-word",boxShadow:"0 4px 16px rgba(0,0,0,0.4)"},children:u})]})]})}function WD({node:e,isActiveLineage:t,isCurrent:r,isSelected:a,isLiveRun:o,branchKind:l,branchIndex:u,displayLabel:f,stepNumber:h,totalSteps:d}){const p=iz(e);return b.jsxs("div",{className:`relative flex h-full w-full flex-col text-left overflow-hidden ${r&&o?"workrail-current-lineage-node":""} ${a?"workrail-selected-lineage-node":""}`,children:[p&&b.jsx("div",{style:{position:"absolute",left:0,top:0,bottom:0,width:3,background:p,pointerEvents:"none"}}),b.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-hidden px-3 py-3",children:[b.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em]",style:{color:tz(l,t)},children:oz(e.nodeKind,l,u)}),b.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[a&&b.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em]",style:{color:"var(--warning)"},children:"Selected"}),r&&b.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em]",style:{color:o?"var(--accent-strong)":"var(--text-secondary)"},children:"Current"})]})]}),b.jsx("div",{className:t?"text-sm font-medium leading-snug":"text-[13px] leading-snug",style:{color:"var(--text-primary)",display:"-webkit-box",WebkitLineClamp:t?4:3,WebkitBoxOrient:"vertical",overflow:"hidden"},children:f})]}),b.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-[rgba(255,255,255,0.06)] bg-[rgba(0,0,0,0.18)] px-3 py-2",children:[b.jsx("span",{className:"min-w-0 truncate font-mono text-[11px] text-[var(--text-secondary)]",children:h!==null&&d!==null?`${h} / ${d}`:`evt ${e.createdAtEventIndex}`}),e.isTip?b.jsx("span",{className:"shrink-0 font-mono text-[10px] uppercase tracking-[0.18em]",style:{color:e.isPreferredTip?"var(--warning)":"var(--text-muted)"},children:e.isPreferredTip?"Preferred tip":"Tip"}):b.jsx("span",{className:"shrink-0 font-mono text-[10px] uppercase tracking-[0.18em] text-transparent",children:"spacer"})]})]})}function JD({model:e,selectedNodeId:t,onNavigateToNode:r}){const a=e.nodes.filter(l=>l.isActiveLineage),o=e.nodes.filter(l=>!l.isActiveLineage).slice(-8);return b.jsx("div",{className:"mt-3 border border-[var(--border)] bg-[rgba(10,10,10,0.38)] px-3 py-2",children:b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:"Lineage rail"}),a.map(l=>b.jsx(qb,{label:l.node.stepLabel??Lm(l.node.nodeId),isCurrent:l.isCurrent,isSelected:l.node.nodeId===t,tone:"active",onClick:()=>r(l.node.nodeId)},l.node.nodeId)),o.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"mx-1 h-px w-6 bg-[var(--border)]"}),o.map(l=>b.jsx(qb,{label:gE(l.node,l.branchKind,l.branchIndex),isCurrent:!1,isSelected:l.node.nodeId===t,tone:l.branchKind==="blocked"?"blocked":"side",onClick:()=>r(l.node.nodeId)},l.node.nodeId))]})]})})}function Ui({label:e,value:t,emphasis:r=!1}){return b.jsxs("div",{className:"min-w-[120px] border px-3 py-2",style:{borderColor:r?"rgba(0, 240, 255, 0.42)":"var(--border)",background:r?"rgba(0, 240, 255, 0.08)":"rgba(15, 19, 31, 0.78)"},children:[b.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:e}),b.jsx("div",{className:"mt-1 text-sm text-[var(--text-primary)]",children:t})]})}function Qh({children:e,onClick:t}){return b.jsx("button",{type:"button",onClick:t,className:"border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 font-mono text-[11px] uppercase tracking-[0.18em] text-[var(--text-secondary)] transition-colors hover:border-[var(--accent-strong)] hover:text-[var(--text-primary)]",children:e})}function qb({label:e,isCurrent:t,isSelected:r,tone:a,onClick:o}){const l=r?"rgba(244, 179, 65, 0.16)":a==="active"?t?"rgba(0, 240, 255, 0.2)":"rgba(0, 240, 255, 0.08)":a==="blocked"?"rgba(239, 68, 68, 0.12)":"rgba(125, 136, 156, 0.12)",u=r?"rgba(244, 179, 65, 0.48)":a==="active"?t?"rgba(0, 240, 255, 0.6)":"rgba(0, 240, 255, 0.32)":a==="blocked"?"rgba(239, 68, 68, 0.34)":"rgba(125, 136, 156, 0.3)";return b.jsx("button",{type:"button",title:e,onClick:o,className:"border px-2 py-1 font-mono text-[10px] uppercase tracking-[0.16em] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]",style:{background:l,borderColor:u},children:lz(e)})}function ez(e,t){return e.nodeKind==="blocked_attempt"?t?"rgba(80, 24, 31, 0.92)":"rgba(52, 24, 30, 0.82)":e.nodeKind==="checkpoint"?t?"rgba(18, 61, 51, 0.92)":"rgba(18, 43, 38, 0.82)":t?"rgba(27, 31, 44, 0.96)":"rgba(24, 28, 39, 0.82)"}function tz(e,t){return e==="blocked"?"var(--error)":e==="alternate"?t?"var(--accent-strong)":"rgba(186, 197, 219, 0.72)":t?"var(--accent-strong)":"var(--text-muted)"}function nz(e,t,r,a){return a?"var(--warning)":r?"var(--accent-strong)":e.nodeKind==="blocked_attempt"?t?"var(--error)":"rgba(239, 68, 68, 0.5)":e.nodeKind==="checkpoint"?t?"var(--success)":"rgba(34, 197, 94, 0.45)":t?"rgba(0, 240, 255, 0.55)":"rgba(123, 141, 167, 0.45)"}const rz=[{test:e=>e.hasFailedValidations,color:"var(--error)"},{test:e=>e.hasGaps,color:"var(--warning)"},{test:e=>e.hasRecap||e.hasArtifacts,color:"var(--accent)"}];function iz(e){return rz.find(t=>t.test(e))?.color??null}function az(e){switch(e){case"blocked_attempt":return"Blocked";case"checkpoint":return"Checkpoint";case"step":return"Step"}}function oz(e,t,r){return t==="blocked"?r?`Blocked branch ${r}`:"Blocked branch":t==="alternate"?r?`Alt branch ${r}`:"Alt branch":az(e)}function sz(e){switch(e){case"complete":return"Complete";case"complete_with_gaps":return"Complete with gaps";case"blocked":return"Blocked";case"in_progress":return"In progress"}}function gE(e,t,r){return e.stepLabel?e.stepLabel:t==="blocked"?r?`Blocked attempt ${r}`:"Blocked attempt":t==="alternate"?r?`Alternate path ${r}`:"Alternate path":Lm(e.nodeId)}function lz(e){return e.length>18?`${e.slice(0,18)}…`:e}function uz(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const cz=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dz={};function Vb(e,t){return(dz.jsx?fz:cz).test(e)}const hz=/[ \t\n\f\r]/g;function pz(e){return typeof e=="object"?e.type==="text"?Fb(e.value):!1:Fb(e)}function Fb(e){return e.replace(hz,"")===""}class yl{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}yl.prototype.normal={};yl.prototype.property={};yl.prototype.space=void 0;function yE(e,t){const r={},a={};for(const o of e)Object.assign(r,o.property),Object.assign(a,o.normal);return new yl(r,a,t)}function Vp(e){return e.toLowerCase()}class an{constructor(t,r){this.attribute=r,this.property=t}}an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let mz=0;const Ae=sa(),bt=sa(),Fp=sa(),de=sa(),et=sa(),lo=sa(),pn=sa();function sa(){return 2**++mz}const Yp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:bt,commaOrSpaceSeparated:pn,commaSeparated:lo,number:de,overloadedBoolean:Fp,spaceSeparated:et},Symbol.toStringTag,{value:"Module"})),Zh=Object.keys(Yp);class Im extends an{constructor(t,r,a,o){let l=-1;if(super(t,r),Yb(this,"space",o),typeof a=="number")for(;++l<Zh.length;){const u=Zh[l];Yb(this,Zh[l],(a&Yp[u])===Yp[u])}}}Im.prototype.defined=!0;function Yb(e,t,r){r&&(e[t]=r)}function Eo(e){const t={},r={};for(const[a,o]of Object.entries(e.properties)){const l=new Im(a,e.transform(e.attributes||{},a),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,r[Vp(a)]=a,r[Vp(l.attribute)]=a}return new yl(t,r,e.space)}const xE=Eo({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:et,ariaCurrent:null,ariaDescribedBy:et,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:et,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:et,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:et,ariaLevel:de,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:et,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:et,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:bt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function vE(e,t){return t in e?e[t]:t}function bE(e,t){return vE(e,t.toLowerCase())}const gz=Eo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:lo,acceptCharset:et,accessKey:et,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:et,autoFocus:Ae,autoPlay:Ae,blocking:et,capture:null,charSet:null,checked:Ae,cite:null,className:et,cols:de,colSpan:null,content:null,contentEditable:bt,controls:Ae,controlsList:et,coords:de|lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:Fp,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:et,height:de,hidden:Fp,high:de,href:null,hrefLang:null,htmlFor:et,httpEquiv:et,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:et,itemRef:et,itemScope:Ae,itemType:et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ae,optimum:de,pattern:null,ping:et,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:et,required:Ae,reversed:Ae,rows:de,rowSpan:de,sandbox:et,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:bt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:et,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:bE}),yz=Eo({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pn,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:lo,g2:lo,glyphName:lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pn,rev:pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pn,requiredFeatures:pn,requiredFonts:pn,requiredFormats:pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pn,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:vE}),SE=Eo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),wE=Eo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bE}),EE=Eo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xz={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vz=/[A-Z]/g,$b=/-[a-z]/g,bz=/^data[-\w.:]+$/i;function Sz(e,t){const r=Vp(t);let a=t,o=an;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&bz.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace($b,Ez);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!$b.test(l)){let u=l.replace(vz,wz);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Im}return new o(a,t)}function wz(e){return"-"+e.toLowerCase()}function Ez(e){return e.charAt(1).toUpperCase()}const Cz=yE([xE,gz,SE,wE,EE],"html"),Bm=yE([xE,yz,SE,wE,EE],"svg");function _z(e){return e.join(" ").trim()}var Wa={},Kh,Gb;function Nz(){if(Gb)return Kh;Gb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
16
- `,d="/",p="*",g="",y="comment",v="declaration";function S(N,w){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];w=w||{};var O=1,_=1;function M(I){var V=I.match(t);V&&(O+=V.length);var j=I.lastIndexOf(h);_=~j?I.length-j:_+I.length}function B(){var I={line:O,column:_};return function(V){return V.position=new k(I),H(),V}}function k(I){this.start=I,this.end={line:O,column:_},this.source=w.source}k.prototype.content=N;function D(I){var V=new Error(w.source+":"+O+":"+_+": "+I);if(V.reason=I,V.filename=w.source,V.line=O,V.column=_,V.source=N,!w.silent)throw V}function U(I){var V=I.exec(N);if(V){var j=V[0];return M(j),N=N.slice(j.length),V}}function H(){U(r)}function q(I){var V;for(I=I||[];V=L();)V!==!1&&I.push(V);return I}function L(){var I=B();if(!(d!=N.charAt(0)||p!=N.charAt(1))){for(var V=2;g!=N.charAt(V)&&(p!=N.charAt(V)||d!=N.charAt(V+1));)++V;if(V+=2,g===N.charAt(V-1))return D("End of comment missing");var j=N.slice(2,V-2);return _+=2,M(j),N=N.slice(V),_+=2,I({type:y,comment:j})}}function P(){var I=B(),V=U(a);if(V){if(L(),!U(o))return D("property missing ':'");var j=U(l),F=I({type:v,property:E(V[0].replace(e,g)),value:j?E(j[0].replace(e,g)):g});return U(u),F}}function K(){var I=[];q(I);for(var V;V=P();)V!==!1&&(I.push(V),q(I));return I}return H(),K()}function E(N){return N?N.replace(f,g):g}return Kh=S,Kh}var Xb;function Mz(){if(Xb)return Wa;Xb=1;var e=Wa&&Wa.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.default=r;const t=e(Nz());function r(a,o){let l=null;if(!a||typeof a!="string")return l;const u=(0,t.default)(a),f=typeof o=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:d,value:p}=h;f?o(d,p,h):p&&(l=l||{},l[d]=p)}),l}return Wa}var ks={},Qb;function kz(){if(Qb)return ks;Qb=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(d){return!d||r.test(d)||e.test(d)},u=function(d,p){return p.toUpperCase()},f=function(d,p){return"".concat(p,"-")},h=function(d,p){return p===void 0&&(p={}),l(d)?d:(d=d.toLowerCase(),p.reactCompat?d=d.replace(o,f):d=d.replace(a,f),d.replace(t,u))};return ks.camelCase=h,ks}var Ts,Zb;function Tz(){if(Zb)return Ts;Zb=1;var e=Ts&&Ts.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Mz()),r=kz();function a(o,l){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(f,h){f&&h&&(u[(0,r.camelCase)(f,l)]=h)}),u}return a.default=a,Ts=a,Ts}var Az=Tz();const Rz=Ic(Az),CE=_E("end"),Hm=_E("start");function _E(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function Oz(e){const t=Hm(e),r=CE(e);if(t&&r)return{start:t,end:r}}function Bs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kb(e.position):"start"in e||"end"in e?Kb(e):"line"in e||"column"in e?$p(e):""}function $p(e){return Wb(e&&e.line)+":"+Wb(e&&e.column)}function Kb(e){return $p(e&&e.start)+"-"+$p(e&&e.end)}function Wb(e){return e&&typeof e=="number"?e:1}class It extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let o="",l={},u=!1;if(r&&("line"in r&&"column"in r?l={place:r}:"start"in r&&"end"in r?l={place:r}:"type"in r?l={ancestors:[r],place:r.position}:l={...r}),typeof t=="string"?o=t:!l.cause&&t&&(u=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?l.ruleId=a:(l.source=a.slice(0,h),l.ruleId=a.slice(h+1))}if(!l.place&&l.ancestors&&l.ancestors){const h=l.ancestors[l.ancestors.length-1];h&&(l.place=h.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Bs(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=u&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}It.prototype.file="";It.prototype.name="";It.prototype.reason="";It.prototype.message="";It.prototype.stack="";It.prototype.column=void 0;It.prototype.line=void 0;It.prototype.ancestors=void 0;It.prototype.cause=void 0;It.prototype.fatal=void 0;It.prototype.place=void 0;It.prototype.ruleId=void 0;It.prototype.source=void 0;const Pm={}.hasOwnProperty,jz=new Map,Dz=/[A-Z]/g,zz=new Set(["table","tbody","thead","tfoot","tr"]),Lz=new Set(["td","th"]),NE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Iz(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=Yz(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=Fz(r,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Bm:Cz,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=ME(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function ME(e,t,r){if(t.type==="element")return Bz(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Hz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Uz(e,t,r);if(t.type==="mdxjsEsm")return Pz(e,t);if(t.type==="root")return qz(e,t,r);if(t.type==="text")return Vz(e,t)}function Bz(e,t,r){const a=e.schema;let o=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(o=Bm,e.schema=o),e.ancestors.push(t);const l=TE(e,t.tagName,!1),u=$z(e,t);let f=qm(e,t);return zz.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!pz(h):!0})),kE(e,u,l,t),Um(u,f),e.ancestors.pop(),e.schema=a,e.create(t,l,u,r)}function Hz(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}sl(e,t.position)}function Pz(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sl(e,t.position)}function Uz(e,t,r){const a=e.schema;let o=a;t.name==="svg"&&a.space==="html"&&(o=Bm,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:TE(e,t.name,!0),u=Gz(e,t),f=qm(e,t);return kE(e,u,l,t),Um(u,f),e.ancestors.pop(),e.schema=a,e.create(t,l,u,r)}function qz(e,t,r){const a={};return Um(a,qm(e,t)),e.create(t,e.Fragment,a,r)}function Vz(e,t){return t.value}function kE(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function Um(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Fz(e,t,r){return a;function a(o,l,u,f){const d=Array.isArray(u.children)?r:t;return f?d(l,u,f):d(l,u)}}function Yz(e,t){return r;function r(a,o,l,u){const f=Array.isArray(l.children),h=Hm(a);return t(o,l,u,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function $z(e,t){const r={};let a,o;for(o in t.properties)if(o!=="children"&&Pm.call(t.properties,o)){const l=Xz(e,o,t.properties[o]);if(l){const[u,f]=l;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&Lz.has(t.tagName)?a=f:r[u]=f}}if(a){const l=r.style||(r.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function Gz(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const u=l.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else sl(e,t.position);else{const o=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else sl(e,t.position);else l=a.value===null?!0:a.value;r[o]=l}return r}function qm(e,t){const r=[];let a=-1;const o=e.passKeys?new Map:jz;for(;++a<t.children.length;){const l=t.children[a];let u;if(e.passKeys){const h=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(h){const d=o.get(h)||0;u=h+"-"+d,o.set(h,d+1)}}const f=ME(e,l,u);f!==void 0&&r.push(f)}return r}function Xz(e,t,r){const a=Sz(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?uz(r):_z(r)),a.property==="style"){let o=typeof r=="object"?r:Qz(e,String(r));return e.stylePropertyNameCase==="css"&&(o=Zz(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&a.space?xz[a.property]||a.property:a.attribute,r]}}function Qz(e,t){try{return Rz(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,o=new It("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=NE+"#cannot-parse-style-attribute",o}}function TE(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,u;for(;++l<o.length;){const f=Vb(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}a=u}else a=Vb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const o=a.value;return Pm.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(a);sl(e)}function sl(e,t){const r=new It("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=NE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Zz(e){const t={};let r;for(r in e)Pm.call(e,r)&&(t[Kz(r)]=e[r]);return t}function Kz(e){let t=e.replace(Dz,Wz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Wz(e){return"-"+e.toLowerCase()}const Wh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Jz={};function e4(e,t){const r=Jz,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return AE(e,a,o)}function AE(e,t,r){if(t4(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Jb(e.children,t,r)}return Array.isArray(e)?Jb(e,t,r):""}function Jb(e,t,r){const a=[];let o=-1;for(;++o<e.length;)a[o]=AE(e[o],t,r);return a.join("")}function t4(e){return!!(e&&typeof e=="object")}const e1=document.createElement("i");function Vm(e){const t="&"+e+";";e1.innerHTML=t;const r=e1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function er(e,t,r,a){const o=e.length;let l=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,a.length<1e4)u=Array.from(a),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);l<a.length;)u=a.slice(l,l+1e4),u.unshift(t,0),e.splice(...u),l+=1e4,t+=1e4}function Tn(e,t){return e.length>0?(er(e,e.length,0,t),e):t}const t1={}.hasOwnProperty;function n4(e){const t={};let r=-1;for(;++r<e.length;)r4(t,e[r]);return t}function r4(e,t){let r;for(r in t){const o=(t1.call(e,r)?e[r]:void 0)||(e[r]={}),l=t[r];let u;if(l)for(u in l){t1.call(o,u)||(o[u]=[]);const f=l[u];i4(o[u],Array.isArray(f)?f:f?[f]:[])}}}function i4(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);er(e,0,0,a)}function RE(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function uo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kn=xi(/[A-Za-z]/),yn=xi(/[\dA-Za-z]/),a4=xi(/[#-'*+\--9=?A-Z^-~]/);function Gp(e){return e!==null&&(e<32||e===127)}const Xp=xi(/\d/),o4=xi(/[\dA-Fa-f]/),s4=xi(/[!-/:-@[-`{-~]/);function _e(e){return e!==null&&e<-2}function nn(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const l4=xi(new RegExp("\\p{P}|\\p{S}","u")),u4=xi(/\s/);function xi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Co(e){const t=[];let r=-1,a=0,o=0;for(;++r<e.length;){const l=e.charCodeAt(r);let u="";if(l===37&&yn(e.charCodeAt(r+1))&&yn(e.charCodeAt(r+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(r+1);l<56320&&f>56319&&f<57344?(u=String.fromCharCode(l,f),o=1):u="�"}else u=String.fromCharCode(l);u&&(t.push(e.slice(a,r),encodeURIComponent(u)),a=r+o+1,u=""),o&&(r+=o,o=0)}return t.join("")+e.slice(a)}function tt(e,t,r,a){const o=a?a-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(h){return Ye(h)?(e.enter(r),f(h)):t(h)}function f(h){return Ye(h)&&l++<o?(e.consume(h),f):(e.exit(r),t(h))}}const c4={tokenize:f4};function f4(e){const t=e.attempt(this.parser.constructs.contentInitial,a,o);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),tt(e,t,"linePrefix")}function o(f){return e.enter("paragraph"),l(f)}function l(f){const h=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return _e(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),u)}}const d4={tokenize:h4},n1={tokenize:p4};function h4(e){const t=this,r=[];let a=0,o,l,u;return f;function f(_){if(a<r.length){const M=r[a];return t.containerState=M[1],e.attempt(M[0].continuation,h,d)(_)}return d(_)}function h(_){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&O();const M=t.events.length;let B=M,k;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){k=t.events[B][1].end;break}w(a);let D=M;for(;D<t.events.length;)t.events[D][1].end={...k},D++;return er(t.events,B+1,0,t.events.slice(M)),t.events.length=D,d(_)}return f(_)}function d(_){if(a===r.length){if(!o)return y(_);if(o.currentConstruct&&o.currentConstruct.concrete)return S(_);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(n1,p,g)(_)}function p(_){return o&&O(),w(a),y(_)}function g(_){return t.parser.lazy[t.now().line]=a!==r.length,u=t.now().offset,S(_)}function y(_){return t.containerState={},e.attempt(n1,v,S)(_)}function v(_){return a++,r.push([t.currentConstruct,t.containerState]),y(_)}function S(_){if(_===null){o&&O(),w(0),e.consume(_);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),E(_)}function E(_){if(_===null){N(e.exit("chunkFlow"),!0),w(0),e.consume(_);return}return _e(_)?(e.consume(_),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(_),E)}function N(_,M){const B=t.sliceStream(_);if(M&&B.push(null),_.previous=l,l&&(l.next=_),l=_,o.defineSkip(_.start),o.write(B),t.parser.lazy[_.start.line]){let k=o.events.length;for(;k--;)if(o.events[k][1].start.offset<u&&(!o.events[k][1].end||o.events[k][1].end.offset>u))return;const D=t.events.length;let U=D,H,q;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(H){q=t.events[U][1].end;break}H=!0}for(w(a),k=D;k<t.events.length;)t.events[k][1].end={...q},k++;er(t.events,U+1,0,t.events.slice(D)),t.events.length=k}}function w(_){let M=r.length;for(;M-- >_;){const B=r[M];t.containerState=B[1],B[0].exit.call(t,e)}r.length=_}function O(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function p4(e,t,r){return tt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function r1(e){if(e===null||nn(e)||u4(e))return 1;if(l4(e))return 2}function Fm(e,t,r){const a=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!a.includes(l)&&(t=l(t,r),a.push(l))}return t}const Qp={name:"attention",resolveAll:m4,tokenize:g4};function m4(e,t){let r=-1,a,o,l,u,f,h,d,p;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const g={...e[a][1].end},y={...e[r][1].start};i1(g,-h),i1(y,h),u={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:y},l={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},o={type:h>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[a][1].end={...u.start},e[r][1].start={...f.end},d=[],e[a][1].end.offset-e[a][1].start.offset&&(d=Tn(d,[["enter",e[a][1],t],["exit",e[a][1],t]])),d=Tn(d,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",l,t]]),d=Tn(d,Fm(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),d=Tn(d,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(p=2,d=Tn(d,[["enter",e[r][1],t],["exit",e[r][1],t]])):p=0,er(e,a-1,r-a+3,d),r=a+d.length-p-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function g4(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,o=r1(a);let l;return u;function u(h){return l=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===l)return e.consume(h),f;const d=e.exit("attentionSequence"),p=r1(h),g=!p||p===2&&o||r.includes(h),y=!o||o===2&&p||r.includes(a);return d._open=!!(l===42?g:g&&(o||!y)),d._close=!!(l===42?y:y&&(p||!g)),t(h)}}function i1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const y4={name:"autolink",tokenize:x4};function x4(e,t,r){let a=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return Kn(v)?(e.consume(v),u):v===64?r(v):d(v)}function u(v){return v===43||v===45||v===46||yn(v)?(a=1,f(v)):d(v)}function f(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||yn(v))&&a++<32?(e.consume(v),f):(a=0,d(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Gp(v)?r(v):(e.consume(v),h)}function d(v){return v===64?(e.consume(v),p):a4(v)?(e.consume(v),d):r(v)}function p(v){return yn(v)?g(v):r(v)}function g(v){return v===46?(e.consume(v),a=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):y(v)}function y(v){if((v===45||yn(v))&&a++<63){const S=v===45?y:g;return e.consume(v),S}return r(v)}}const nf={partial:!0,tokenize:v4};function v4(e,t,r){return a;function a(l){return Ye(l)?tt(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||_e(l)?t(l):r(l)}}const OE={continuation:{tokenize:S4},exit:w4,name:"blockQuote",tokenize:b4};function b4(e,t,r){const a=this;return o;function o(u){if(u===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),l}return r(u)}function l(u){return Ye(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function S4(e,t,r){const a=this;return o;function o(u){return Ye(u)?tt(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return e.attempt(OE,t,r)(u)}}function w4(e){e.exit("blockQuote")}const jE={name:"characterEscape",tokenize:E4};function E4(e,t,r){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return s4(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(l)}}const DE={name:"characterReference",tokenize:C4};function C4(e,t,r){const a=this;let o=0,l,u;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),l=31,u=yn,p(g))}function d(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,u=o4,p):(e.enter("characterReferenceValue"),l=7,u=Xp,p(g))}function p(g){if(g===59&&o){const y=e.exit("characterReferenceValue");return u===yn&&!Vm(a.sliceSerialize(y))?r(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&o++<l?(e.consume(g),p):r(g)}}const a1={partial:!0,tokenize:N4},o1={concrete:!0,name:"codeFenced",tokenize:_4};function _4(e,t,r){const a=this,o={partial:!0,tokenize:B};let l=0,u=0,f;return h;function h(k){return d(k)}function d(k){const D=a.events[a.events.length-1];return l=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,f=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===f?(u++,e.consume(k),p):u<3?r(k):(e.exit("codeFencedFenceSequence"),Ye(k)?tt(e,g,"whitespace")(k):g(k))}function g(k){return k===null||_e(k)?(e.exit("codeFencedFence"),a.interrupt?t(k):e.check(a1,E,M)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||_e(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(k)):Ye(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,v,"whitespace")(k)):k===96&&k===f?r(k):(e.consume(k),y)}function v(k){return k===null||_e(k)?g(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(k))}function S(k){return k===null||_e(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(k)):k===96&&k===f?r(k):(e.consume(k),S)}function E(k){return e.attempt(o,M,N)(k)}function N(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),w}function w(k){return l>0&&Ye(k)?tt(e,O,"linePrefix",l+1)(k):O(k)}function O(k){return k===null||_e(k)?e.check(a1,E,M)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||_e(k)?(e.exit("codeFlowValue"),O(k)):(e.consume(k),_)}function M(k){return e.exit("codeFenced"),t(k)}function B(k,D,U){let H=0;return q;function q(V){return k.enter("lineEnding"),k.consume(V),k.exit("lineEnding"),L}function L(V){return k.enter("codeFencedFence"),Ye(V)?tt(k,P,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):P(V)}function P(V){return V===f?(k.enter("codeFencedFenceSequence"),K(V)):U(V)}function K(V){return V===f?(H++,k.consume(V),K):H>=u?(k.exit("codeFencedFenceSequence"),Ye(V)?tt(k,I,"whitespace")(V):I(V)):U(V)}function I(V){return V===null||_e(V)?(k.exit("codeFencedFence"),D(V)):U(V)}}}function N4(e,t,r){const a=this;return o;function o(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l)}function l(u){return a.parser.lazy[a.now().line]?r(u):t(u)}}const Jh={name:"codeIndented",tokenize:k4},M4={partial:!0,tokenize:T4};function k4(e,t,r){const a=this;return o;function o(d){return e.enter("codeIndented"),tt(e,l,"linePrefix",5)(d)}function l(d){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(d):r(d)}function u(d){return d===null?h(d):_e(d)?e.attempt(M4,u,h)(d):(e.enter("codeFlowValue"),f(d))}function f(d){return d===null||_e(d)?(e.exit("codeFlowValue"),u(d)):(e.consume(d),f)}function h(d){return e.exit("codeIndented"),t(d)}}function T4(e,t,r){const a=this;return o;function o(u){return a.parser.lazy[a.now().line]?r(u):_e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):tt(e,l,"linePrefix",5)(u)}function l(u){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):_e(u)?o(u):r(u)}}const A4={name:"codeText",previous:O4,resolve:R4,tokenize:j4};function R4(e){let t=e.length-4,r=3,a,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)o===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(o=a):(a===t||e[a][1].type==="lineEnding")&&(e[o][1].type="codeTextData",a!==o+2&&(e[o][1].end=e[a-1][1].end,e.splice(o+2,a-o-2),t-=a-o-2,a=o+2),o=void 0);return e}function O4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function j4(e,t,r){let a=0,o,l;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?r(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(l=e.enter("codeTextSequence"),o=0,p(g)):_e(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),d(g))}function d(g){return g===null||g===32||g===96||_e(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),d)}function p(g){return g===96?(e.consume(g),o++,p):o===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(l.type="codeTextData",d(g))}}class D4{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const o=r||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return a&&As(this.left,a),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),As(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),As(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);As(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);As(this.left,r.reverse())}}}function As(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function zE(e){const t={};let r=-1,a,o,l,u,f,h,d;const p=new D4(e);for(;++r<p.length;){for(;r in t;)r=t[r];if(a=p.get(r),r&&a[1].type==="chunkFlow"&&p.get(r-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,l=0,l<h.length&&h[l][1].type==="lineEndingBlank"&&(l+=2),l<h.length&&h[l][1].type==="content"))for(;++l<h.length&&h[l][1].type!=="content";)h[l][1].type==="chunkText"&&(h[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,z4(p,r)),r=t[r],d=!0);else if(a[1]._container){for(l=r,o=void 0;l--;)if(u=p.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=l);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(a[1].end={...p.get(o)[1].start},f=p.slice(o,r),f.unshift(a),p.splice(o,r-o+1,f))}}return er(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!d}function z4(e,t){const r=e.get(t)[1],a=e.get(t)[2];let o=t-1;const l=[];let u=r._tokenizer;u||(u=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,h=[],d={};let p,g,y=-1,v=r,S=0,E=0;const N=[E];for(;v;){for(;e.get(++o)[1]!==v;);l.push(o),v._tokenizer||(p=a.sliceStream(v),v.next||p.push(null),g&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=r;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(E=y+1,N.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),y=N.length;y--;){const w=f.slice(N[y],N[y+1]),O=l.pop();h.push([O,O+w.length-1]),e.splice(O,2,w)}for(h.reverse(),y=-1;++y<h.length;)d[S+h[y][0]]=S+h[y][1],S+=h[y][1]-h[y][0]-1;return d}const L4={resolve:B4,tokenize:H4},I4={partial:!0,tokenize:P4};function B4(e){return zE(e),e}function H4(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?l(f):_e(f)?e.check(I4,u,l)(f):(e.consume(f),o)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function P4(e,t,r){const a=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),tt(e,l,"linePrefix")}function l(u){if(u===null||_e(u))return r(u);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,r,t)(u)}}function LE(e,t,r,a,o,l,u,f,h){const d=h||Number.POSITIVE_INFINITY;let p=0;return g;function g(w){return w===60?(e.enter(a),e.enter(o),e.enter(l),e.consume(w),e.exit(l),y):w===null||w===32||w===41||Gp(w)?r(w):(e.enter(a),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(w))}function y(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(o),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(f),y(w)):w===null||w===60||_e(w)?r(w):(e.consume(w),w===92?S:v)}function S(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function E(w){return!p&&(w===null||w===41||nn(w))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(a),t(w)):p<d&&w===40?(e.consume(w),p++,E):w===41?(e.consume(w),p--,E):w===null||w===32||w===40||Gp(w)?r(w):(e.consume(w),w===92?N:E)}function N(w){return w===40||w===41||w===92?(e.consume(w),E):E(w)}}function IE(e,t,r,a,o,l){const u=this;let f=0,h;return d;function d(v){return e.enter(a),e.enter(o),e.consume(v),e.exit(o),e.enter(l),p}function p(v){return f>999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(v):v===93?(e.exit(l),e.enter(o),e.consume(v),e.exit(o),e.exit(a),t):_e(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||_e(v)||f++>999?(e.exit("chunkString"),p(v)):(e.consume(v),h||(h=!Ye(v)),v===92?y:g)}function y(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function BE(e,t,r,a,o,l){let u;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(o),e.consume(y),e.exit(o),u=y===40?41:y,h):r(y)}function h(y){return y===u?(e.enter(o),e.consume(y),e.exit(o),e.exit(a),t):(e.enter(l),d(y))}function d(y){return y===u?(e.exit(l),h(u)):y===null?r(y):_e(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),tt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===u||y===null||_e(y)?(e.exit("chunkString"),d(y)):(e.consume(y),y===92?g:p)}function g(y){return y===u||y===92?(e.consume(y),p):p(y)}}function Hs(e,t){let r;return a;function a(o){return _e(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,a):Ye(o)?tt(e,a,r?"linePrefix":"lineSuffix")(o):t(o)}}const U4={name:"definition",tokenize:V4},q4={partial:!0,tokenize:F4};function V4(e,t,r){const a=this;let o;return l;function l(v){return e.enter("definition"),u(v)}function u(v){return IE.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return o=uo(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):r(v)}function h(v){return nn(v)?Hs(e,d)(v):d(v)}function d(v){return LE(e,p,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(q4,g,g)(v)}function g(v){return Ye(v)?tt(e,y,"whitespace")(v):y(v)}function y(v){return v===null||_e(v)?(e.exit("definition"),a.parser.defined.push(o),t(v)):r(v)}}function F4(e,t,r){return a;function a(f){return nn(f)?Hs(e,o)(f):r(f)}function o(f){return BE(e,l,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return Ye(f)?tt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||_e(f)?t(f):r(f)}}const Y4={name:"hardBreakEscape",tokenize:$4};function $4(e,t,r){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return _e(l)?(e.exit("hardBreakEscape"),t(l)):r(l)}}const G4={name:"headingAtx",resolve:X4,tokenize:Q4};function X4(e,t){let r=e.length-2,a=3,o,l;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(o={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},l={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},er(e,a,r-a+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function Q4(e,t,r){let a=0;return o;function o(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&a++<6?(e.consume(p),u):p===null||nn(p)?(e.exit("atxHeadingSequence"),f(p)):r(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),h(p)):p===null||_e(p)?(e.exit("atxHeading"),t(p)):Ye(p)?tt(e,f,"whitespace")(p):(e.enter("atxHeadingText"),d(p))}function h(p){return p===35?(e.consume(p),h):(e.exit("atxHeadingSequence"),f(p))}function d(p){return p===null||p===35||nn(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),d)}}const Z4=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],s1=["pre","script","style","textarea"],K4={concrete:!0,name:"htmlFlow",resolveTo:e5,tokenize:t5},W4={partial:!0,tokenize:r5},J4={partial:!0,tokenize:n5};function e5(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function t5(e,t,r){const a=this;let o,l,u,f,h;return d;function d(R){return p(R)}function p(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),g}function g(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),l=!0,E):R===63?(e.consume(R),o=3,a.interrupt?t:A):Kn(R)?(e.consume(R),u=String.fromCharCode(R),N):r(R)}function y(R){return R===45?(e.consume(R),o=2,v):R===91?(e.consume(R),o=5,f=0,S):Kn(R)?(e.consume(R),o=4,a.interrupt?t:A):r(R)}function v(R){return R===45?(e.consume(R),a.interrupt?t:A):r(R)}function S(R){const te="CDATA[";return R===te.charCodeAt(f++)?(e.consume(R),f===te.length?a.interrupt?t:P:S):r(R)}function E(R){return Kn(R)?(e.consume(R),u=String.fromCharCode(R),N):r(R)}function N(R){if(R===null||R===47||R===62||nn(R)){const te=R===47,ue=u.toLowerCase();return!te&&!l&&s1.includes(ue)?(o=1,a.interrupt?t(R):P(R)):Z4.includes(u.toLowerCase())?(o=6,te?(e.consume(R),w):a.interrupt?t(R):P(R)):(o=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(R):l?O(R):_(R))}return R===45||yn(R)?(e.consume(R),u+=String.fromCharCode(R),N):r(R)}function w(R){return R===62?(e.consume(R),a.interrupt?t:P):r(R)}function O(R){return Ye(R)?(e.consume(R),O):q(R)}function _(R){return R===47?(e.consume(R),q):R===58||R===95||Kn(R)?(e.consume(R),M):Ye(R)?(e.consume(R),_):q(R)}function M(R){return R===45||R===46||R===58||R===95||yn(R)?(e.consume(R),M):B(R)}function B(R){return R===61?(e.consume(R),k):Ye(R)?(e.consume(R),B):_(R)}function k(R){return R===null||R===60||R===61||R===62||R===96?r(R):R===34||R===39?(e.consume(R),h=R,D):Ye(R)?(e.consume(R),k):U(R)}function D(R){return R===h?(e.consume(R),h=null,H):R===null||_e(R)?r(R):(e.consume(R),D)}function U(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||nn(R)?B(R):(e.consume(R),U)}function H(R){return R===47||R===62||Ye(R)?_(R):r(R)}function q(R){return R===62?(e.consume(R),L):r(R)}function L(R){return R===null||_e(R)?P(R):Ye(R)?(e.consume(R),L):r(R)}function P(R){return R===45&&o===2?(e.consume(R),j):R===60&&o===1?(e.consume(R),F):R===62&&o===4?(e.consume(R),z):R===63&&o===3?(e.consume(R),A):R===93&&o===5?(e.consume(R),Z):_e(R)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(W4,$,K)(R)):R===null||_e(R)?(e.exit("htmlFlowData"),K(R)):(e.consume(R),P)}function K(R){return e.check(J4,I,$)(R)}function I(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),V}function V(R){return R===null||_e(R)?K(R):(e.enter("htmlFlowData"),P(R))}function j(R){return R===45?(e.consume(R),A):P(R)}function F(R){return R===47?(e.consume(R),u="",X):P(R)}function X(R){if(R===62){const te=u.toLowerCase();return s1.includes(te)?(e.consume(R),z):P(R)}return Kn(R)&&u.length<8?(e.consume(R),u+=String.fromCharCode(R),X):P(R)}function Z(R){return R===93?(e.consume(R),A):P(R)}function A(R){return R===62?(e.consume(R),z):R===45&&o===2?(e.consume(R),A):P(R)}function z(R){return R===null||_e(R)?(e.exit("htmlFlowData"),$(R)):(e.consume(R),z)}function $(R){return e.exit("htmlFlow"),t(R)}}function n5(e,t,r){const a=this;return o;function o(u){return _e(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):r(u)}function l(u){return a.parser.lazy[a.now().line]?r(u):t(u)}}function r5(e,t,r){return a;function a(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(nf,t,r)}}const i5={name:"htmlText",tokenize:a5};function a5(e,t,r){const a=this;let o,l,u;return f;function f(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),h}function h(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),B):A===63?(e.consume(A),_):Kn(A)?(e.consume(A),U):r(A)}function d(A){return A===45?(e.consume(A),p):A===91?(e.consume(A),l=0,S):Kn(A)?(e.consume(A),O):r(A)}function p(A){return A===45?(e.consume(A),v):r(A)}function g(A){return A===null?r(A):A===45?(e.consume(A),y):_e(A)?(u=g,F(A)):(e.consume(A),g)}function y(A){return A===45?(e.consume(A),v):g(A)}function v(A){return A===62?j(A):A===45?y(A):g(A)}function S(A){const z="CDATA[";return A===z.charCodeAt(l++)?(e.consume(A),l===z.length?E:S):r(A)}function E(A){return A===null?r(A):A===93?(e.consume(A),N):_e(A)?(u=E,F(A)):(e.consume(A),E)}function N(A){return A===93?(e.consume(A),w):E(A)}function w(A){return A===62?j(A):A===93?(e.consume(A),w):E(A)}function O(A){return A===null||A===62?j(A):_e(A)?(u=O,F(A)):(e.consume(A),O)}function _(A){return A===null?r(A):A===63?(e.consume(A),M):_e(A)?(u=_,F(A)):(e.consume(A),_)}function M(A){return A===62?j(A):_(A)}function B(A){return Kn(A)?(e.consume(A),k):r(A)}function k(A){return A===45||yn(A)?(e.consume(A),k):D(A)}function D(A){return _e(A)?(u=D,F(A)):Ye(A)?(e.consume(A),D):j(A)}function U(A){return A===45||yn(A)?(e.consume(A),U):A===47||A===62||nn(A)?H(A):r(A)}function H(A){return A===47?(e.consume(A),j):A===58||A===95||Kn(A)?(e.consume(A),q):_e(A)?(u=H,F(A)):Ye(A)?(e.consume(A),H):j(A)}function q(A){return A===45||A===46||A===58||A===95||yn(A)?(e.consume(A),q):L(A)}function L(A){return A===61?(e.consume(A),P):_e(A)?(u=L,F(A)):Ye(A)?(e.consume(A),L):H(A)}function P(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),o=A,K):_e(A)?(u=P,F(A)):Ye(A)?(e.consume(A),P):(e.consume(A),I)}function K(A){return A===o?(e.consume(A),o=void 0,V):A===null?r(A):_e(A)?(u=K,F(A)):(e.consume(A),K)}function I(A){return A===null||A===34||A===39||A===60||A===61||A===96?r(A):A===47||A===62||nn(A)?H(A):(e.consume(A),I)}function V(A){return A===47||A===62||nn(A)?H(A):r(A)}function j(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):r(A)}function F(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),X}function X(A){return Ye(A)?tt(e,Z,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Z(A)}function Z(A){return e.enter("htmlTextData"),u(A)}}const Ym={name:"labelEnd",resolveAll:u5,resolveTo:c5,tokenize:f5},o5={tokenize:d5},s5={tokenize:h5},l5={tokenize:p5};function u5(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const o=a.type==="labelImage"?4:2;a.type="data",t+=o}}return e.length!==r.length&&er(e,0,e.length,r),e}function c5(e,t){let r=e.length,a=0,o,l,u,f;for(;r--;)if(o=e[r][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=r,o.type!=="labelLink")){a=2;break}}else o.type==="labelEnd"&&(u=r);const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[l][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",h,t],["enter",d,t]],f=Tn(f,e.slice(l+1,l+a+3)),f=Tn(f,[["enter",p,t]]),f=Tn(f,Fm(t.parser.constructs.insideSpan.null,e.slice(l+a+4,u-3),t)),f=Tn(f,[["exit",p,t],e[u-2],e[u-1],["exit",d,t]]),f=Tn(f,e.slice(u+1)),f=Tn(f,[["exit",h,t]]),er(e,l,e.length,f),e}function f5(e,t,r){const a=this;let o=a.events.length,l,u;for(;o--;)if((a.events[o][1].type==="labelImage"||a.events[o][1].type==="labelLink")&&!a.events[o][1]._balanced){l=a.events[o][1];break}return f;function f(y){return l?l._inactive?g(y):(u=a.parser.defined.includes(uo(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):r(y)}function h(y){return y===40?e.attempt(o5,p,u?p:g)(y):y===91?e.attempt(s5,p,u?d:g)(y):u?p(y):g(y)}function d(y){return e.attempt(l5,p,g)(y)}function p(y){return t(y)}function g(y){return l._balanced=!0,r(y)}}function d5(e,t,r){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return nn(g)?Hs(e,l)(g):l(g)}function l(g){return g===41?p(g):LE(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return nn(g)?Hs(e,h)(g):p(g)}function f(g){return r(g)}function h(g){return g===34||g===39||g===40?BE(e,d,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function d(g){return nn(g)?Hs(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):r(g)}}function h5(e,t,r){const a=this;return o;function o(f){return IE.call(a,e,l,u,"reference","referenceMarker","referenceString")(f)}function l(f){return a.parser.defined.includes(uo(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function u(f){return r(f)}}function p5(e,t,r){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):r(l)}}const m5={name:"labelStartImage",resolveAll:Ym.resolveAll,tokenize:g5};function g5(e,t,r){const a=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):r(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const y5={name:"labelStartLink",resolveAll:Ym.resolveAll,tokenize:x5};function x5(e,t,r){const a=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(u):t(u)}}const ep={name:"lineEnding",tokenize:v5};function v5(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const mc={name:"thematicBreak",tokenize:b5};function b5(e,t,r){let a=0,o;return l;function l(d){return e.enter("thematicBreak"),u(d)}function u(d){return o=d,f(d)}function f(d){return d===o?(e.enter("thematicBreakSequence"),h(d)):a>=3&&(d===null||_e(d))?(e.exit("thematicBreak"),t(d)):r(d)}function h(d){return d===o?(e.consume(d),a++,h):(e.exit("thematicBreakSequence"),Ye(d)?tt(e,f,"whitespace")(d):f(d))}}const Kt={continuation:{tokenize:C5},exit:N5,name:"list",tokenize:E5},S5={partial:!0,tokenize:M5},w5={partial:!0,tokenize:_5};function E5(e,t,r){const a=this,o=a.events[a.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return f;function f(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Xp(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(mc,r,d)(v):d(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return r(v)}function h(v){return Xp(v)&&++u<10?(e.consume(v),h):(!a.interrupt||u<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),d(v)):r(v)}function d(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(nf,a.interrupt?r:p,e.attempt(S5,y,g))}function p(v){return a.containerState.initialBlankLine=!0,l++,y(v)}function g(v){return Ye(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),y):r(v)}function y(v){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function C5(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(nf,o,l);function o(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,tt(e,t,"listItemIndent",a.containerState.size+1)(f)}function l(f){return a.containerState.furtherBlankLines||!Ye(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(w5,t,u)(f))}function u(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,tt(e,e.attempt(Kt,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function _5(e,t,r){const a=this;return tt(e,o,"listItemIndent",a.containerState.size+1);function o(l){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(l):r(l)}}function N5(e){e.exit(this.containerState.type)}function M5(e,t,r){const a=this;return tt(e,o,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const u=a.events[a.events.length-1];return!Ye(l)&&u&&u[1].type==="listItemPrefixWhitespace"?t(l):r(l)}}const l1={name:"setextUnderline",resolveTo:k5,tokenize:T5};function k5(e,t){let r=e.length,a,o,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!l&&e[r][1].type==="definition"&&(l=r);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",u,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function T5(e,t,r){const a=this;let o;return l;function l(d){let p=a.events.length,g;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){g=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),o=d,u(d)):r(d)}function u(d){return e.enter("setextHeadingLineSequence"),f(d)}function f(d){return d===o?(e.consume(d),f):(e.exit("setextHeadingLineSequence"),Ye(d)?tt(e,h,"lineSuffix")(d):h(d))}function h(d){return d===null||_e(d)?(e.exit("setextHeadingLine"),t(d)):r(d)}}const A5={tokenize:R5};function R5(e){const t=this,r=e.attempt(nf,a,e.attempt(this.parser.constructs.flowInitial,o,tt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(L4,o)),"linePrefix")));return r;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const O5={resolveAll:PE()},j5=HE("string"),D5=HE("text");function HE(e){return{resolveAll:PE(e==="text"?z5:void 0),tokenize:t};function t(r){const a=this,o=this.parser.constructs[e],l=r.attempt(o,u,f);return u;function u(p){return d(p)?l(p):f(p)}function f(p){if(p===null){r.consume(p);return}return r.enter("data"),r.consume(p),h}function h(p){return d(p)?(r.exit("data"),l(p)):(r.consume(p),h)}function d(p){if(p===null)return!0;const g=o[p];let y=-1;if(g)for(;++y<g.length;){const v=g[y];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function PE(e){return t;function t(r,a){let o=-1,l;for(;++o<=r.length;)l===void 0?r[o]&&r[o][1].type==="data"&&(l=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==l+2&&(r[l][1].end=r[o-1][1].end,r.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(r,a):r}}function z5(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],o=t.sliceStream(a);let l=o.length,u=-1,f=0,h;for(;l--;){const d=o[l];if(typeof d=="string"){for(u=d.length;d.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(d===-2)h=!0,f++;else if(d!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const d={type:r===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:a.start._bufferIndex+u,_index:a.start._index+l,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...d.start},a.start.offset===a.end.offset?Object.assign(a,d):(e.splice(r,0,["enter",d,t],["exit",d,t]),r+=2)}r++}return e}const L5={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:OE},I5={91:U4},B5={[-2]:Jh,[-1]:Jh,32:Jh},H5={35:G4,42:mc,45:[l1,mc],60:K4,61:l1,95:mc,96:o1,126:o1},P5={38:DE,92:jE},U5={[-5]:ep,[-4]:ep,[-3]:ep,33:m5,38:DE,42:Qp,60:[y4,i5],91:y5,92:[Y4,jE],93:Ym,95:Qp,96:A4},q5={null:[Qp,O5]},V5={null:[42,95]},F5={null:[]},Y5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:V5,contentInitial:I5,disable:F5,document:L5,flow:H5,flowInitial:B5,insideSpan:q5,string:P5,text:U5},Symbol.toStringTag,{value:"Module"}));function $5(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},l=[];let u=[],f=[];const h={attempt:D(B),check:D(k),consume:O,enter:_,exit:M,interrupt:D(k,{interrupt:!0})},d={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:v,write:g};let p=t.tokenize.call(d,h);return t.resolveAll&&l.push(t),d;function g(L){return u=Tn(u,L),N(),u[u.length-1]!==null?[]:(U(t,0),d.events=Fm(l,d.events,d),d.events)}function y(L,P){return X5(v(L),P)}function v(L){return G5(u,L)}function S(){const{_bufferIndex:L,_index:P,line:K,column:I,offset:V}=a;return{_bufferIndex:L,_index:P,line:K,column:I,offset:V}}function E(L){o[L.line]=L.column,q()}function N(){let L;for(;a._index<u.length;){const P=u[a._index];if(typeof P=="string")for(L=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===L&&a._bufferIndex<P.length;)w(P.charCodeAt(a._bufferIndex));else w(P)}}function w(L){p=p(L)}function O(L){_e(L)?(a.line++,a.column=1,a.offset+=L===-3?2:1,q()):L!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),d.previous=L}function _(L,P){const K=P||{};return K.type=L,K.start=S(),d.events.push(["enter",K,d]),f.push(K),K}function M(L){const P=f.pop();return P.end=S(),d.events.push(["exit",P,d]),P}function B(L,P){U(L,P.from)}function k(L,P){P.restore()}function D(L,P){return K;function K(I,V,j){let F,X,Z,A;return Array.isArray(I)?$(I):"tokenize"in I?$([I]):z(I);function z(ce){return fe;function fe(le){const pe=le!==null&&ce[le],be=le!==null&&ce.null,Se=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(be)?be:be?[be]:[]];return $(Se)(le)}}function $(ce){return F=ce,X=0,ce.length===0?j:R(ce[X])}function R(ce){return fe;function fe(le){return A=H(),Z=ce,ce.partial||(d.currentConstruct=ce),ce.name&&d.parser.constructs.disable.null.includes(ce.name)?ue():ce.tokenize.call(P?Object.assign(Object.create(d),P):d,h,te,ue)(le)}}function te(ce){return L(Z,A),V}function ue(ce){return A.restore(),++X<F.length?R(F[X]):j}}}function U(L,P){L.resolveAll&&!l.includes(L)&&l.push(L),L.resolve&&er(d.events,P,d.events.length-P,L.resolve(d.events.slice(P),d)),L.resolveTo&&(d.events=L.resolveTo(d.events,d))}function H(){const L=S(),P=d.previous,K=d.currentConstruct,I=d.events.length,V=Array.from(f);return{from:I,restore:j};function j(){a=L,d.previous=P,d.currentConstruct=K,d.events.length=I,f=V,q()}}function q(){a.line in o&&a.column<2&&(a.column=o[a.line],a.offset+=o[a.line]-1)}}function G5(e,t){const r=t.start._index,a=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let u;if(r===o)u=[e[r].slice(a,l)];else{if(u=e.slice(r,o),a>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(a):u.shift()}l>0&&u.push(e[o].slice(0,l))}return u}function X5(e,t){let r=-1;const a=[];let o;for(;++r<e.length;){const l=e[r];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
17
- `;break}case-3:{u=`\r
18
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(l)}o=l===-2,a.push(u)}return a.join("")}function Q5(e){const a={constructs:n4([Y5,...(e||{}).extensions||[]]),content:o(c4),defined:[],document:o(d4),flow:o(A5),lazy:{},string:o(j5),text:o(D5)};return a;function o(l){return u;function u(f){return $5(a,l,f)}}}function Z5(e){for(;!zE(e););return e}const u1=/[\0\t\n\r]/g;function K5(){let e=1,t="",r=!0,a;return o;function o(l,u,f){const h=[];let d,p,g,y,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),g=0,t="",r&&(l.charCodeAt(0)===65279&&g++,r=void 0);g<l.length;){if(u1.lastIndex=g,d=u1.exec(l),y=d&&d.index!==void 0?d.index:l.length,v=l.charCodeAt(y),!d){t=l.slice(g);break}if(v===10&&g===y&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<y&&(h.push(l.slice(g,y)),e+=y-g),v){case 0:{h.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,h.push(-2);e++<p;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=y+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const W5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function J5(e){return e.replace(W5,eL)}function eL(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),l=o===120||o===88;return RE(r.slice(l?2:1),l?16:10)}return Vm(r)||e}const UE={}.hasOwnProperty;function tL(e,t,r){return typeof t!="string"&&(r=t,t=void 0),nL(r)(Z5(Q5(r).document().write(K5()(e,t,!0))))}function nL(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(it),autolinkProtocol:H,autolinkEmail:H,atxHeading:l(He),blockQuote:l(be),characterEscape:H,characterReference:H,codeFenced:l(Se),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(Se,u),codeText:l(ye,u),codeTextData:H,data:H,codeFlowValue:H,definition:l(we),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(Re),hardBreakEscape:l(Ie),hardBreakTrailing:l(Ie),htmlFlow:l(Qe,u),htmlFlowData:H,htmlText:l(Qe,u),htmlTextData:H,image:l(_t),label:u,link:l(it),listItem:l(qt),listItemValue:y,listOrdered:l(Ot,g),listUnordered:l(Ot),paragraph:l(An),reference:R,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(He),strong:l(vn),thematicBreak:l(ut)},exit:{atxHeading:h(),atxHeadingSequence:B,autolink:h(),autolinkEmail:pe,autolinkProtocol:le,blockQuote:h(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:ce,characterReference:fe,codeFenced:h(N),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:q,codeIndented:h(w),codeText:h(V),codeTextData:q,data:q,definition:h(),definitionDestinationString:M,definitionLabelString:O,definitionTitleString:_,emphasis:h(),hardBreakEscape:h(P),hardBreakTrailing:h(P),htmlFlow:h(K),htmlFlowData:q,htmlText:h(I),htmlTextData:q,image:h(F),label:Z,labelText:X,lineEnding:L,link:h(j),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:te,resourceDestinationString:A,resourceTitleString:z,resource:$,setextHeading:h(U),setextHeadingLineSequence:D,setextHeadingText:k,strong:h(),thematicBreak:h()}};qE(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(ie){let he={type:"root",children:[]};const Ee={stack:[he],tokenStack:[],config:t,enter:f,exit:d,buffer:u,resume:p,data:r},Oe=[];let Pe=-1;for(;++Pe<ie.length;)if(ie[Pe][1].type==="listOrdered"||ie[Pe][1].type==="listUnordered")if(ie[Pe][0]==="enter")Oe.push(Pe);else{const Bt=Oe.pop();Pe=o(ie,Bt,Pe)}for(Pe=-1;++Pe<ie.length;){const Bt=t[ie[Pe][0]];UE.call(Bt,ie[Pe][1].type)&&Bt[ie[Pe][1].type].call(Object.assign({sliceSerialize:ie[Pe][2].sliceSerialize},Ee),ie[Pe][1])}if(Ee.tokenStack.length>0){const Bt=Ee.tokenStack[Ee.tokenStack.length-1];(Bt[1]||c1).call(Ee,void 0,Bt[0])}for(he.position={start:oi(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:oi(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<t.transforms.length;)he=t.transforms[Pe](he)||he;return he}function o(ie,he,Ee){let Oe=he-1,Pe=-1,Bt=!1,Rn,Nt,dt,jt;for(;++Oe<=Ee;){const $e=ie[Oe];switch($e[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{$e[0]==="enter"?Pe++:Pe--,jt=void 0;break}case"lineEndingBlank":{$e[0]==="enter"&&(Rn&&!jt&&!Pe&&!dt&&(dt=Oe),jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jt=void 0}if(!Pe&&$e[0]==="enter"&&$e[1].type==="listItemPrefix"||Pe===-1&&$e[0]==="exit"&&($e[1].type==="listUnordered"||$e[1].type==="listOrdered")){if(Rn){let Un=Oe;for(Nt=void 0;Un--;){const on=ie[Un];if(on[1].type==="lineEnding"||on[1].type==="lineEndingBlank"){if(on[0]==="exit")continue;Nt&&(ie[Nt][1].type="lineEndingBlank",Bt=!0),on[1].type="lineEnding",Nt=Un}else if(!(on[1].type==="linePrefix"||on[1].type==="blockQuotePrefix"||on[1].type==="blockQuotePrefixWhitespace"||on[1].type==="blockQuoteMarker"||on[1].type==="listItemIndent"))break}dt&&(!Nt||dt<Nt)&&(Rn._spread=!0),Rn.end=Object.assign({},Nt?ie[Nt][1].start:$e[1].end),ie.splice(Nt||Oe,0,["exit",Rn,$e[2]]),Oe++,Ee++}if($e[1].type==="listItemPrefix"){const Un={type:"listItem",_spread:!1,start:Object.assign({},$e[1].start),end:void 0};Rn=Un,ie.splice(Oe,0,["enter",Un,$e[2]]),Oe++,Ee++,dt=void 0,jt=!0}}}return ie[he][1]._spread=Bt,Ee}function l(ie,he){return Ee;function Ee(Oe){f.call(this,ie(Oe),Oe),he&&he.call(this,Oe)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(ie,he,Ee){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([he,Ee||void 0]),ie.position={start:oi(he.start),end:void 0}}function h(ie){return he;function he(Ee){ie&&ie.call(this,Ee),d.call(this,Ee)}}function d(ie,he){const Ee=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==ie.type&&(he?he.call(this,ie,Oe[0]):(Oe[1]||c1).call(this,ie,Oe[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Bs({start:ie.start,end:ie.end})+"): it’s not open");Ee.position.end=oi(ie.end)}function p(){return e4(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y(ie){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.lang=ie}function S(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.meta=ie}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.value=ie.replace(/(\r?\n|\r)$/g,"")}function O(ie){const he=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=he,Ee.identifier=uo(this.sliceSerialize(ie)).toLowerCase()}function _(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.title=ie}function M(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.url=ie}function B(ie){const he=this.stack[this.stack.length-1];if(!he.depth){const Ee=this.sliceSerialize(ie).length;he.depth=Ee}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function D(ie){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function H(ie){const Ee=this.stack[this.stack.length-1].children;let Oe=Ee[Ee.length-1];(!Oe||Oe.type!=="text")&&(Oe=Ne(),Oe.position={start:oi(ie.start),end:void 0},Ee.push(Oe)),this.stack.push(Oe)}function q(ie){const he=this.stack.pop();he.value+=this.sliceSerialize(ie),he.position.end=oi(ie.end)}function L(ie){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=he.children[he.children.length-1];Ee.position.end=oi(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(H.call(this,ie),q.call(this,ie))}function P(){this.data.atHardBreak=!0}function K(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.value=ie}function I(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.value=ie}function V(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.value=ie}function j(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=he,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function F(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=he,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function X(ie){const he=this.sliceSerialize(ie),Ee=this.stack[this.stack.length-2];Ee.label=J5(he),Ee.identifier=uo(he).toLowerCase()}function Z(){const ie=this.stack[this.stack.length-1],he=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const Oe=ie.children;Ee.children=Oe}else Ee.alt=he}function A(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.url=ie}function z(){const ie=this.resume(),he=this.stack[this.stack.length-1];he.title=ie}function $(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function te(ie){const he=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=he,Ee.identifier=uo(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function ue(ie){this.data.characterReferenceType=ie.type}function ce(ie){const he=this.sliceSerialize(ie),Ee=this.data.characterReferenceType;let Oe;Ee?(Oe=RE(he,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=Vm(he);const Pe=this.stack[this.stack.length-1];Pe.value+=Oe}function fe(ie){const he=this.stack.pop();he.position.end=oi(ie.end)}function le(ie){q.call(this,ie);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(ie)}function pe(ie){q.call(this,ie);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(ie)}function be(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function He(){return{type:"heading",depth:0,children:[]}}function Ie(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function _t(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function Ot(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function qt(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function An(){return{type:"paragraph",children:[]}}function vn(){return{type:"strong",children:[]}}function Ne(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function oi(e){return{line:e.line,column:e.column,offset:e.offset}}function qE(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?qE(e,a):rL(e,a)}}function rL(e,t){let r;for(r in t)if(UE.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function c1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bs({start:t.start,end:t.end})+") is still open")}function iL(e){const t=this;t.parser=r;function r(a){return tL(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function aL(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function oL(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
19
- `}]}function sL(e,t){const r=t.value?t.value+`
20
- `:"",a={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(a.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function lL(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uL(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cL(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),o=Co(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let u,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=l+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,h);const d={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,d),e.applyData(t,d)}function fL(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dL(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function VE(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=a:o.push({type:"text",value:a}),o}function hL(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return VE(e,t);const o={src:Co(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(o.title=a.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function pL(e,t){const r={src:Co(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function mL(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function gL(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return VE(e,t);const o={href:Co(a.url||"")};a.title!==null&&a.title!==void 0&&(o.title=a.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function yL(e,t){const r={href:Co(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function xL(e,t,r){const a=e.all(t),o=r?vL(r):FE(t),l={},u=[];if(typeof t.checked=="boolean"){const p=a[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const p=a[f];(o||f!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
21
- `}),p.type==="element"&&p.tagName==="p"&&!o?u.push(...p.children):u.push(p)}const h=a[a.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
22
- `});const d={type:"element",tagName:"li",properties:l,children:u};return e.patch(t,d),e.applyData(t,d)}function vL(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=FE(r[a])}return t}function FE(e){const t=e.spread;return t??e.children.length>1}function bL(e,t){const r={},a=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++o<a.length;){const u=a[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function SL(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wL(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function EL(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function CL(e,t){const r=e.all(t),a=r.shift(),o=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],u),o.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Hm(t.children[1]),h=CE(t.children[t.children.length-1]);f&&h&&(u.position={start:f,end:h}),o.push(u)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function _L(e,t,r){const a=r?r.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,f=u?u.length:t.children.length;let h=-1;const d=[];for(;++h<f;){const g=t.children[h],y={},v=u?u[h]:void 0;v&&(y.align=v);let S={type:"element",tagName:l,properties:y,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),d.push(S)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,p),e.applyData(t,p)}function NL(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const f1=9,d1=32;function ML(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),o=0;const l=[];for(;a;)l.push(h1(t.slice(o,a.index),o>0,!0),a[0]),o=a.index+a[0].length,a=r.exec(t);return l.push(h1(t.slice(o),o>0,!1)),l.join("")}function h1(e,t,r){let a=0,o=e.length;if(t){let l=e.codePointAt(a);for(;l===f1||l===d1;)a++,l=e.codePointAt(a)}if(r){let l=e.codePointAt(o-1);for(;l===f1||l===d1;)o--,l=e.codePointAt(o-1)}return o>a?e.slice(a,o):""}function kL(e,t){const r={type:"text",value:ML(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function TL(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const AL={blockquote:aL,break:oL,code:sL,delete:lL,emphasis:uL,footnoteReference:cL,heading:fL,html:dL,imageReference:hL,image:pL,inlineCode:mL,linkReference:gL,link:yL,listItem:xL,list:bL,paragraph:SL,root:wL,strong:EL,table:CL,tableCell:NL,tableRow:_L,text:kL,thematicBreak:TL,toml:tc,yaml:tc,definition:tc,footnoteDefinition:tc};function tc(){}const YE=-1,rf=0,Ps=1,zc=2,$m=3,Gm=4,Xm=5,Qm=6,$E=7,GE=8,p1=typeof self=="object"?self:globalThis,RL=(e,t)=>{const r=(o,l)=>(e.set(l,o),o),a=o=>{if(e.has(o))return e.get(o);const[l,u]=t[o];switch(l){case rf:case YE:return r(u,o);case Ps:{const f=r([],o);for(const h of u)f.push(a(h));return f}case zc:{const f=r({},o);for(const[h,d]of u)f[a(h)]=a(d);return f}case $m:return r(new Date(u),o);case Gm:{const{source:f,flags:h}=u;return r(new RegExp(f,h),o)}case Xm:{const f=r(new Map,o);for(const[h,d]of u)f.set(a(h),a(d));return f}case Qm:{const f=r(new Set,o);for(const h of u)f.add(a(h));return f}case $E:{const{name:f,message:h}=u;return r(new p1[f](h),o)}case GE:return r(BigInt(u),o);case"BigInt":return r(Object(BigInt(u)),o);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return r(new DataView(f),u)}}return r(new p1[l](u),o)};return a},m1=e=>RL(new Map,e)(0),Ja="",{toString:OL}={},{keys:jL}=Object,Rs=e=>{const t=typeof e;if(t!=="object"||!e)return[rf,t];const r=OL.call(e).slice(8,-1);switch(r){case"Array":return[Ps,Ja];case"Object":return[zc,Ja];case"Date":return[$m,Ja];case"RegExp":return[Gm,Ja];case"Map":return[Xm,Ja];case"Set":return[Qm,Ja];case"DataView":return[Ps,r]}return r.includes("Array")?[Ps,r]:r.includes("Error")?[$E,r]:[zc,r]},nc=([e,t])=>e===rf&&(t==="function"||t==="symbol"),DL=(e,t,r,a)=>{const o=(u,f)=>{const h=a.push(u)-1;return r.set(f,h),h},l=u=>{if(r.has(u))return r.get(u);let[f,h]=Rs(u);switch(f){case rf:{let p=u;switch(h){case"bigint":f=GE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);p=null;break;case"undefined":return o([YE],u)}return o([f,p],u)}case Ps:{if(h){let y=u;return h==="DataView"?y=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(u)),o([h,[...y]],u)}const p=[],g=o([f,p],u);for(const y of u)p.push(l(y));return g}case zc:{if(h)switch(h){case"BigInt":return o([h,u.toString()],u);case"Boolean":case"Number":case"String":return o([h,u.valueOf()],u)}if(t&&"toJSON"in u)return l(u.toJSON());const p=[],g=o([f,p],u);for(const y of jL(u))(e||!nc(Rs(u[y])))&&p.push([l(y),l(u[y])]);return g}case $m:return o([f,u.toISOString()],u);case Gm:{const{source:p,flags:g}=u;return o([f,{source:p,flags:g}],u)}case Xm:{const p=[],g=o([f,p],u);for(const[y,v]of u)(e||!(nc(Rs(y))||nc(Rs(v))))&&p.push([l(y),l(v)]);return g}case Qm:{const p=[],g=o([f,p],u);for(const y of u)(e||!nc(Rs(y)))&&p.push(l(y));return g}}const{message:d}=u;return o([f,{name:h,message:d}],u)};return l},g1=(e,{json:t,lossy:r}={})=>{const a=[];return DL(!(t||r),!!t,new Map,a)(e),a},Lc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?m1(g1(e,t)):structuredClone(e):(e,t)=>m1(g1(e,t));function zL(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function LL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function IL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||zL,a=e.options.footnoteBackLabel||LL,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[h]);if(!d)continue;const p=e.all(d),g=String(d.identifier).toUpperCase(),y=Co(g.toLowerCase());let v=0;const S=[],E=e.footnoteCounts.get(g);for(;E!==void 0&&++v<=E;){S.length>0&&S.push({type:"text",value:" "});let O=typeof r=="string"?r:r(h,v);typeof O=="string"&&(O={type:"text",value:O}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const O=N.children[N.children.length-1];O&&O.type==="text"?O.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else p.push(...S);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(p,!0)};e.patch(d,w),f.push(w)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Lc(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
23
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
24
- `}]}}const XE=(function(e){if(e==null)return UL;if(typeof e=="function")return af(e);if(typeof e=="object")return Array.isArray(e)?BL(e):HL(e);if(typeof e=="string")return PL(e);throw new Error("Expected function, string, or object as test")});function BL(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=XE(e[r]);return af(a);function a(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function HL(e){const t=e;return af(r);function r(a){const o=a;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function PL(e){return af(t);function t(r){return r&&r.type===e}}function af(e){return t;function t(r,a,o){return!!(qL(r)&&e.call(this,r,typeof a=="number"?a:void 0,o||void 0))}}function UL(){return!0}function qL(e){return e!==null&&typeof e=="object"&&"type"in e}const QE=[],VL=!0,y1=!1,FL="skip";function YL(e,t,r,a){let o;typeof t=="function"&&typeof r!="function"?(a=r,r=t):o=t;const l=XE(o),u=a?-1:1;f(e,void 0,[])();function f(h,d,p){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return y;function y(){let v=QE,S,E,N;if((!t||l(h,d,p[p.length-1]||void 0))&&(v=$L(r(h,p)),v[0]===y1))return v;if("children"in h&&h.children){const w=h;if(w.children&&v[0]!==FL)for(E=(a?w.children.length:-1)+u,N=p.concat(w);E>-1&&E<w.children.length;){const O=w.children[E];if(S=f(O,E,N)(),S[0]===y1)return S;E=typeof S[1]=="number"?S[1]:E+u}}return v}}}function $L(e){return Array.isArray(e)?e:typeof e=="number"?[VL,e]:e==null?QE:[e]}function ZE(e,t,r,a){let o,l,u;typeof t=="function"&&typeof r!="function"?(l=void 0,u=t,o=r):(l=t,u=r,o=a),YL(e,l,f,o);function f(h,d){const p=d[d.length-1],g=p?p.children.indexOf(h):void 0;return u(h,g,p)}}const Zp={}.hasOwnProperty,GL={};function XL(e,t){const r=t||GL,a=new Map,o=new Map,l=new Map,u={...AL,...r.handlers},f={all:d,applyData:ZL,definitionById:a,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:u,one:h,options:r,patch:QL,wrap:WL};return ZE(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?a:o,y=String(p.identifier).toUpperCase();g.has(y)||g.set(y,p)}}),f;function h(p,g){const y=p.type,v=f.handlers[y];if(Zp.call(f.handlers,y)&&v)return v(f,p,g);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in p){const{children:E,...N}=p,w=Lc(N);return w.children=f.all(p),w}return Lc(p)}return(f.options.unknownHandler||KL)(f,p,g)}function d(p){const g=[];if("children"in p){const y=p.children;let v=-1;for(;++v<y.length;){const S=f.one(y[v],p);if(S){if(v&&y[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=x1(S.value)),!Array.isArray(S)&&S.type==="element")){const E=S.children[0];E&&E.type==="text"&&(E.value=x1(E.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function QL(e,t){e.position&&(t.position=Oz(e))}function ZL(e,t){let r=t;if(e&&e.data){const a=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const u="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:u}}r.type==="element"&&l&&Object.assign(r.properties,Lc(l)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function KL(e,t){const r=t.data||{},a="value"in t&&!(Zp.call(r,"hProperties")||Zp.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function WL(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
25
- `});++a<e.length;)a&&r.push({type:"text",value:`
26
- `}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
27
- `}),r}function x1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function v1(e,t){const r=XL(e,t),a=r.one(e,void 0),o=IL(r),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
28
- `},o),l}function JL(e,t){return e&&"run"in e?async function(r,a){const o=v1(r,{file:a,...t});await e.run(o,a)}:function(r,a){return v1(r,{file:a,...e||t})}}function b1(e){if(e)throw e}var tp,S1;function e6(){if(S1)return tp;S1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},l=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var p=e.call(d,"constructor"),g=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!p&&!g)return!1;var y;for(y in d);return typeof y>"u"||e.call(d,y)},u=function(d,p){r&&p.name==="__proto__"?r(d,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):d[p.name]=p.newValue},f=function(d,p){if(p==="__proto__")if(e.call(d,p)){if(a)return a(d,p).value}else return;return d[p]};return tp=function h(){var d,p,g,y,v,S,E=arguments[0],N=1,w=arguments.length,O=!1;for(typeof E=="boolean"&&(O=E,E=arguments[1]||{},N=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});N<w;++N)if(d=arguments[N],d!=null)for(p in d)g=f(E,p),y=f(d,p),E!==y&&(O&&y&&(l(y)||(v=o(y)))?(v?(v=!1,S=g&&o(g)?g:[]):S=g&&l(g)?g:{},u(E,{name:p,newValue:h(O,S,y)})):typeof y<"u"&&u(E,{name:p,newValue:y}));return E},tp}var t6=e6();const np=Ic(t6);function Kp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function n6(){const e=[],t={run:r,use:a};return t;function r(...o){let l=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...o);function f(h,...d){const p=e[++l];let g=-1;if(h){u(h);return}for(;++g<o.length;)(d[g]===null||d[g]===void 0)&&(d[g]=o[g]);o=d,p?r6(p,f)(...d):u(null,...d)}}function a(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function r6(e,t){let r;return a;function a(...u){const f=e.length>u.length;let h;f&&u.push(o);try{h=e.apply(this,u)}catch(d){const p=d;if(f&&r)throw p;return o(p)}f||(h&&h.then&&typeof h.then=="function"?h.then(l,o):h instanceof Error?o(h):l(h))}function o(u,...f){r||(r=!0,t(u,...f))}function l(u){o(null,u)}}const Xn={basename:i6,dirname:a6,extname:o6,join:s6,sep:"/"};function i6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xl(e);let r=0,a=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){r=o+1;break}}else a<0&&(l=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let u=-1,f=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){r=o+1;break}}else u<0&&(l=!0,u=o+1),f>-1&&(e.codePointAt(o)===t.codePointAt(f--)?f<0&&(a=o):(f=-1,a=u));return r===a?a=u:a<0&&(a=e.length),e.slice(r,a)}function a6(e){if(xl(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function o6(e){xl(e);let t=e.length,r=-1,a=0,o=-1,l=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){a=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||r<0||l===0||l===1&&o===r-1&&o===a+1?"":e.slice(o,r)}function s6(...e){let t=-1,r;for(;++t<e.length;)xl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":l6(r)}function l6(e){xl(e);const t=e.codePointAt(0)===47;let r=u6(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function u6(e,t){let r="",a=0,o=-1,l=0,u=-1,f,h;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(o===u-1||l===1))if(o!==u-1&&l===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",a=0):(r=r.slice(0,h),a=r.length-1-r.lastIndexOf("/")),o=u,l=0;continue}}else if(r.length>0){r="",a=0,o=u,l=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(o+1,u):r=e.slice(o+1,u),a=u-o-1;o=u,l=0}else f===46&&l>-1?l++:l=-1}return r}function xl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c6={cwd:f6};function f6(){return"/"}function Wp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d6(e){if(typeof e=="string")e=new URL(e);else if(!Wp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return h6(e)}function h6(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const rp=["history","path","basename","stem","extname","dirname"];class KE{constructor(t){let r;t?Wp(t)?r={path:t}:typeof t=="string"||p6(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":c6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<rp.length;){const l=rp[a];l in r&&r[l]!==void 0&&r[l]!==null&&(this[l]=l==="history"?[...r[l]]:r[l])}let o;for(o in r)rp.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?Xn.basename(this.path):void 0}set basename(t){ap(t,"basename"),ip(t,"basename"),this.path=Xn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xn.dirname(this.path):void 0}set dirname(t){w1(this.basename,"dirname"),this.path=Xn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xn.extname(this.path):void 0}set extname(t){if(ip(t,"extname"),w1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Wp(t)&&(t=d6(t)),ap(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xn.basename(this.path,this.extname):void 0}set stem(t){ap(t,"stem"),ip(t,"stem"),this.path=Xn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const o=this.message(t,r,a);throw o.fatal=!0,o}info(t,r,a){const o=this.message(t,r,a);return o.fatal=void 0,o}message(t,r,a){const o=new It(t,r,a);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ip(e,t){if(e&&e.includes(Xn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xn.sep+"`")}function ap(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function w1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function p6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const m6=(function(e){const a=this.constructor.prototype,o=a[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),g6={}.hasOwnProperty;class Zm extends m6{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=n6()}copy(){const t=new Zm;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data(np(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(lp("data",this.frozen),this.namespace[t]=r,this):g6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(lp("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const o=r.call(t,...a);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=rc(t),a=this.parser||this.Parser;return op("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),op("process",this.parser||this.Parser),sp("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(l,u){const f=rc(t),h=a.parse(f);a.run(h,f,function(p,g,y){if(p||!g||!y)return d(p);const v=g,S=a.stringify(v,y);v6(S)?y.value=S:y.result=S,d(p,y)});function d(p,g){p||!g?u(p):l?l(g):r(void 0,g)}}}processSync(t){let r=!1,a;return this.freeze(),op("processSync",this.parser||this.Parser),sp("processSync",this.compiler||this.Compiler),this.process(t,o),C1("processSync","process",r),a;function o(l,u){r=!0,b1(l),a=u}}run(t,r,a){E1(t),this.freeze();const o=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?l(void 0,a):new Promise(l);function l(u,f){const h=rc(r);o.run(t,h,d);function d(p,g,y){const v=g||t;p?f(p):u?u(v):a(void 0,v,y)}}}runSync(t,r){let a=!1,o;return this.run(t,r,l),C1("runSync","run",a),o;function l(u,f){b1(u),o=f,a=!0}}stringify(t,r){this.freeze();const a=rc(r),o=this.compiler||this.Compiler;return sp("stringify",o),E1(t),o(t,a)}use(t,...r){const a=this.attachers,o=this.namespace;if(lp("use",this.frozen),t!=null)if(typeof t=="function")h(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(d){if(typeof d=="function")h(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[p,...g]=d;h(p,g)}else u(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function u(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(d.plugins),d.settings&&(o.settings=np(!0,o.settings,d.settings))}function f(d){let p=-1;if(d!=null)if(Array.isArray(d))for(;++p<d.length;){const g=d[p];l(g)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function h(d,p){let g=-1,y=-1;for(;++g<a.length;)if(a[g][0]===d){y=g;break}if(y===-1)a.push([d,...p]);else if(p.length>0){let[v,...S]=p;const E=a[y][1];Kp(E)&&Kp(v)&&(v=np(!0,E,v)),a[y]=[d,v,...S]}}}}const y6=new Zm().freeze();function op(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function lp(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function E1(e){if(!Kp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function C1(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rc(e){return x6(e)?e:new KE(e)}function x6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function v6(e){return typeof e=="string"||b6(e)}function b6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const S6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_1=[],N1={allowDangerousHtml:!0},w6=/^(https?|ircs?|mailto|xmpp)$/i,E6=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function C6(e){const t=_6(e),r=N6(e);return M6(t.runSync(t.parse(r),r),e)}function _6(e){const t=e.rehypePlugins||_1,r=e.remarkPlugins||_1,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...N1}:N1;return y6().use(iL).use(r).use(JL,a).use(t)}function N6(e){const t=e.children||"",r=new KE;return typeof t=="string"&&(r.value=t),r}function M6(e,t){const r=t.allowedElements,a=t.allowElement,o=t.components,l=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||k6;for(const p of E6)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+S6+p.id,void 0);return ZE(e,d),Iz(e,{Fragment:b.Fragment,components:o,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function d(p,g,y){if(p.type==="raw"&&y&&typeof g=="number")return u?y.children.splice(g,1):y.children[g]={type:"text",value:p.value},g;if(p.type==="element"){let v;for(v in Wh)if(Object.hasOwn(Wh,v)&&Object.hasOwn(p.properties,v)){const S=p.properties[v],E=Wh[v];(E===null||E.includes(p.tagName))&&(p.properties[v]=h(String(S||""),v,p))}}if(p.type==="element"){let v=r?!r.includes(p.tagName):l?l.includes(p.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(p,g,y)),v&&y&&typeof g=="number")return f&&p.children?y.children.splice(g,1,...p.children):y.children.splice(g,1),g}}}function k6(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||r!==-1&&t>r||a!==-1&&t>a||w6.test(e.slice(0,t))?e:""}function WE({children:e,className:t}){return b.jsx("div",{className:`markdown-view ${t??""}`,children:b.jsx(C6,{children:e})})}function T6({sessionId:e,nodeId:t,runStatus:r="complete",currentNodeId:a=null}){const{data:o,isLoading:l,error:u}=uk(e,t);return t?b.jsxs("div",{children:[b.jsx(A6,{stepLabel:o?.stepLabel??null,nodeId:t}),b.jsxs("div",{className:"p-4 space-y-4",children:[l&&b.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading..."}),u&&b.jsx("div",{className:"text-[var(--error)] text-sm bg-[var(--bg-primary)] border border-[var(--border)] px-4 py-3",children:u.message}),o&&b.jsx(O6,{detail:o,runStatus:r,currentNodeId:a})]})]}):b.jsx("div",{className:"px-5 py-8 text-sm text-[var(--text-secondary)]",children:"Select a node in the lineage to inspect its recap, validations, gaps, and artifacts."})}function A6({stepLabel:e,nodeId:t}){return b.jsxs("div",{className:"px-5 py-4 border-b border-[var(--border)] console-blueprint-grid",children:[b.jsx("div",{className:"text-base font-semibold text-[var(--text-primary)] leading-tight",children:e??"Untitled node"}),b.jsx("div",{className:"mt-1 font-mono text-[11px] text-[var(--text-muted)] truncate",children:t})]})}const R6=[{id:"recap",column:"primary",render:({detail:e,runStatus:t,currentNodeId:r})=>e.recapMarkdown?b.jsx(L6,{markdown:e.recapMarkdown},"recap"):t==="in_progress"&&e.nodeId===r&&!e.recapMarkdown?b.jsx(j6,{detail:e},"recap-in-progress"):null},{id:"validations",column:"primary",render:({detail:e})=>e.validations.length>0?b.jsx(B6,{validations:e.validations},"validations"):null},{id:"gaps",column:"primary",render:({detail:e})=>e.gaps.length>0?b.jsx(P6,{gaps:e.gaps},"gaps"):null},{id:"advance-outcome",column:"primary",render:({detail:e})=>e.advanceOutcome?b.jsx(I6,{outcome:e.advanceOutcome},"advance-outcome"):null},{id:"artifacts",column:"primary",render:({detail:e})=>e.artifacts.length>0?b.jsx(V6,{artifacts:e.artifacts},"artifacts"):null},{id:"node-meta",column:"primary",render:({detail:e})=>b.jsx(z6,{detail:e},"node-meta")}];function O6(e){return b.jsx("div",{className:"space-y-4",children:R6.map(t=>t.render(e))})}function j6({detail:e}){return b.jsx(la,{title:"Recap",children:b.jsxs("div",{className:"space-y-4 text-sm text-[var(--text-secondary)]",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx(D6,{children:"In progress"}),b.jsxs("span",{className:"font-mono text-xs text-[var(--text-muted)]",children:["event #",e.createdAtEventIndex]})]}),b.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1.15fr)_minmax(0,0.85fr)]",children:[b.jsx(M1,{label:"Current focus",value:e.stepLabel??"Current workflow step",supportingText:"This step is still running, so the recap will appear once execution finishes."}),b.jsx(M1,{label:"Current state",value:"Waiting for step completion",supportingText:"The node has been created and selected as the current workflow position.",mono:!0})]}),b.jsxs("div",{className:"bg-[var(--bg-primary)] border border-[var(--border)] overflow-hidden",children:[b.jsx("div",{className:"px-4 py-3 border-b border-[var(--border)]",children:b.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:"What lands here next"})}),b.jsxs("div",{className:"p-4 grid gap-3 md:grid-cols-3",children:[b.jsx(up,{title:"Recap",description:"A step summary is written when this node completes."}),b.jsx(up,{title:"Validations",description:"Validation results appear if this step records contract checks."}),b.jsx(up,{title:"Artifacts",description:"Generated outputs show up here after the step produces them."})]})]})]})})}function D6({children:e}){return b.jsx("span",{className:"inline-flex items-center px-2 py-1 font-medium text-xs",style:{backgroundColor:"rgba(0, 240, 255, 0.12)",color:"var(--accent-strong)"},children:e})}function M1({label:e,value:t,supportingText:r,mono:a=!1}){return b.jsxs("div",{className:"bg-[var(--bg-primary)] border border-[var(--border)] px-4 py-3 space-y-2",children:[b.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:e}),b.jsx("div",{className:a?"font-mono text-sm text-[var(--text-primary)]":"text-[var(--text-primary)]",children:t}),b.jsx("div",{className:"text-xs text-[var(--text-muted)] leading-relaxed",children:r})]})}function up({title:e,description:t}){return b.jsxs("div",{className:"border border-[var(--border)] bg-[rgba(255,255,255,0.02)] px-3 py-3 space-y-2",children:[b.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-secondary)]",children:e}),b.jsx("div",{className:"text-xs text-[var(--text-muted)] leading-relaxed",children:t})]})}function z6({detail:e}){return b.jsx(la,{title:"Node details",children:b.jsxs("div",{className:"space-y-3",children:[b.jsx(ic,{label:"Kind",value:b.jsx(Y6,{kind:e.nodeKind})}),b.jsx(ic,{label:"Event index",value:String(e.createdAtEventIndex),mono:!0}),b.jsx(ic,{label:"Parent",value:e.parentNodeId??"Root",mono:!0}),b.jsx(ic,{label:"Tip state",value:e.isTip?e.isPreferredTip?"Preferred tip":"Tip":"Historical"})]})})}function L6({markdown:e}){return b.jsx(la,{title:"Recap",children:b.jsx(WE,{children:e})})}function I6({outcome:e}){const t=e.kind==="advanced";return b.jsx(la,{title:"Advance outcome",children:b.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[b.jsx("span",{className:"inline-flex items-center px-2 py-1 font-medium",style:{backgroundColor:t?"var(--success)20":"var(--blocked)20",color:t?"var(--success)":"var(--blocked)"},children:t?"Advanced":"Blocked"}),b.jsxs("span",{className:"text-[var(--text-muted)]",children:["attempt ",e.attemptId.slice(-8)," at event #",e.recordedAtEventIndex]})]})})}function B6({validations:e}){return b.jsx(la,{title:`Validations (${e.length})`,children:b.jsx("div",{className:"space-y-2",children:e.map(t=>b.jsx(H6,{validation:t},t.validationId))})})}function H6({validation:e}){const t=e.outcome==="pass";return b.jsxs("div",{className:"bg-[var(--bg-primary)] border border-[var(--border)] px-4 py-3 text-xs space-y-2",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("span",{className:"inline-flex items-center px-2 py-1 font-medium",style:{backgroundColor:t?"var(--success)20":"var(--error)20",color:t?"var(--success)":"var(--error)"},children:t?"Pass":"Fail"}),b.jsx("span",{className:"text-[var(--text-muted)] font-mono",children:e.contractRef})]}),e.issues.length>0&&b.jsxs("div",{className:"space-y-1",children:[b.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Issues"}),b.jsx("ul",{className:"list-disc list-inside text-[var(--error)] space-y-0.5",children:e.issues.map((r,a)=>b.jsx("li",{children:r},a))})]}),e.suggestions.length>0&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Suggestions"}),b.jsx("ul",{className:"list-disc list-inside text-[var(--text-secondary)] space-y-0.5",children:e.suggestions.map((r,a)=>b.jsx("li",{children:r},a))})]})]})}function P6({gaps:e}){return b.jsx(la,{title:`Gaps (${e.length})`,children:b.jsx("div",{className:"space-y-2",children:e.map(t=>b.jsxs("div",{className:"flex items-start gap-3 text-xs bg-[var(--bg-primary)] border border-[var(--border)] px-3 py-3",children:[b.jsx("span",{className:"shrink-0 inline-flex items-center px-2 py-1 font-medium",style:{backgroundColor:t.isResolved?"var(--success)20":t.severity==="critical"?"var(--error)20":"var(--warning)20",color:t.isResolved?"var(--success)":t.severity==="critical"?"var(--error)":"var(--warning)"},children:t.isResolved?"Resolved":t.severity==="critical"?"Critical":"Non-critical"}),b.jsx("span",{className:"text-[var(--text-secondary)] leading-relaxed",children:t.summary})]},t.gapId))})})}const k1=1e5,U6=[{prefix:"text/",render:e=>b.jsx("pre",{className:"text-[var(--text-secondary)] whitespace-pre-wrap break-words font-mono max-h-40 overflow-y-auto",children:typeof e=="string"?e:String(e)})},{prefix:"application/json",render:e=>b.jsx("pre",{className:"text-[var(--text-secondary)] whitespace-pre-wrap break-words font-mono max-h-40 overflow-y-auto",children:typeof e=="string"?e:JSON.stringify(e,null,2)})}];function q6(e){if(e.byteLength>k1)return b.jsxs("div",{className:"text-[var(--text-muted)] italic",children:["Content too large to display (",Jp(e.byteLength)," -- limit ",Jp(k1),")"]});const t=U6.find(r=>e.contentType.startsWith(r.prefix));return t?t.render(e.content):b.jsx("pre",{className:"text-[var(--text-secondary)] whitespace-pre-wrap break-words font-mono max-h-40 overflow-y-auto",children:typeof e.content=="string"?e.content:JSON.stringify(e.content,null,2)})}function V6({artifacts:e}){return b.jsx(la,{title:`Artifacts (${e.length})`,children:b.jsx("div",{className:"space-y-2",children:e.map(t=>b.jsxs("div",{className:"bg-[var(--bg-primary)] border border-[var(--border)] px-4 py-3 text-xs space-y-2",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[var(--text-muted)]",children:[b.jsx("span",{children:t.contentType}),b.jsx("span",{children:"·"}),b.jsx("span",{children:Jp(t.byteLength)})]}),q6(t)]},t.sha256))})})}function la({title:e,children:t}){return b.jsxs("div",{children:[b.jsx("div",{className:"mb-2",children:b.jsx("h3",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:e})}),t]})}function ic({label:e,value:t,mono:r=!1}){return b.jsxs("div",{className:"bg-[var(--bg-primary)] border border-[var(--border)] px-4 py-3",children:[b.jsx("div",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:e}),b.jsx("div",{className:r?"mt-2 font-mono text-sm text-[var(--text-secondary)] truncate":"mt-2 text-sm text-[var(--text-primary)]",children:t})]})}const F6={step:{label:"Step",color:"var(--accent)"},checkpoint:{label:"Checkpoint",color:"var(--success)"},blocked_attempt:{label:"Blocked",color:"var(--error)"}};function Y6({kind:e}){const t=F6[e];return b.jsx("span",{className:"inline-flex items-center px-2 py-1 font-medium",style:{backgroundColor:`${t.color}20`,color:t.color},children:t.label})}function Jp(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const $6=1;function G6(e){return`polygon(${e}px 0, 100% 0, 100% 100%, 0 100%, 0 ${e}px)`}function JE({cut:e=12,borderColor:t="var(--border)",background:r="var(--bg-card)",dropShadow:a,className:o,style:l,children:u}){const f=G6(e);return b.jsxs("div",{className:o,style:{filter:a?`${a}`:void 0,...l},children:[b.jsx("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,background:t,clipPath:f,pointerEvents:"none"}}),b.jsx("div",{style:{position:"absolute",inset:$6,background:r,clipPath:f,display:"flex",flexDirection:"column",overflow:"hidden"},children:u})]})}function X6(e){return e.length>16?`…${e.slice(-16)}`:e}function Q6({data:e}){const t=e.runs[0]??null,r=t?.workflowName??t?.workflowId??"--",a=t?.workflowHash?.slice(0,12)??"--";return b.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] px-5 py-4",children:[e.sessionTitle&&b.jsx("h2",{className:"text-base font-medium text-[var(--text-primary)] mb-3",children:e.sessionTitle}),b.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-8 gap-y-2",children:[b.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)] self-center",children:"Session"}),b.jsx("dd",{className:"font-mono text-xs text-[var(--text-secondary)] self-center",children:X6(e.sessionId)}),b.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)] self-center",children:"Workflow"}),b.jsx("dd",{className:"text-sm text-[var(--text-primary)] self-center",children:r}),b.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)] self-center",children:"Hash"}),b.jsx("dd",{className:"font-mono text-xs text-[var(--text-secondary)] self-center",children:a}),b.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)] self-center",children:"Status"}),b.jsxs("dd",{className:"self-center flex items-center gap-2",children:[b.jsx(_S,{health:e.health}),e.health==="healthy"&&b.jsx("span",{className:"text-sm text-[var(--text-primary)]",children:"Healthy"})]}),b.jsx("dt",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)] self-center",children:"Runs"}),b.jsxs("dd",{className:"text-sm text-[var(--text-primary)] self-center",children:[e.runs.length," run",e.runs.length!==1?"s":""]})]})]})}function Z6({runs:e}){const r=e.some(a=>a.preferredTipNodeId!==null)?"Nodes with a gold border are the current execution tips — click any node to inspect its execution detail.":"Click any node in the DAG to inspect its execution detail.";return b.jsx("p",{className:"border border-[var(--border)] px-4 py-3 text-xs text-[var(--text-muted)]",children:r})}function K6({sessionId:e}){const{data:t,isLoading:r,error:a}=lk(e),[o,l]=Y.useState(null),u=Y.useCallback((h,d)=>{l(p=>p?.runId===h&&p?.nodeId===d?null:{runId:h,nodeId:d})},[]);if(r)return b.jsx("div",{className:"text-[var(--text-secondary)]",children:"Loading session..."});if(a)return b.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load session: ",a.message]});if(!t)return null;const f=o?t.runs.find(h=>h.runId===o.runId)??null:null;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"space-y-4",children:[b.jsx(Q6,{data:t}),t.runs.length===0?b.jsx("div",{className:"text-center py-16 text-[var(--text-secondary)]",children:"No runs in this session"}):b.jsxs(b.Fragment,{children:[o===null&&b.jsx(Z6,{runs:t.runs}),b.jsx("div",{className:"space-y-6",children:t.runs.map(h=>b.jsx(W6,{run:h,selectedNodeId:o?.runId===h.runId?o.nodeId:null,onNodeClick:u},h.runId))})]})]}),b.jsxs(JE,{cut:18,borderColor:"rgba(0, 240, 255, 0.28)",background:"color-mix(in srgb, var(--bg-card) 92%, var(--accent) 8%)",dropShadow:"drop-shadow(0 16px 48px rgba(0,0,0,0.8)) drop-shadow(0 2px 8px rgba(0,0,0,0.55))",className:"fixed top-3 right-3 bottom-3 w-[560px] max-w-[calc(92vw-12px)] transition-transform duration-200 ease-out",style:{zIndex:40,transform:o?"translateX(0)":"translateX(calc(100% + 12px))"},children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)] shrink-0 console-blueprint-grid",children:[b.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.18em] text-[var(--text-muted)]",children:"Node detail"}),b.jsx("button",{onClick:()=>l(null),className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors text-xl leading-none px-1","aria-label":"Close",children:"×"})]}),b.jsx("div",{className:"flex-1 overflow-auto",children:b.jsx(T6,{sessionId:e,nodeId:o?.nodeId??null,runStatus:f?.status??"complete",currentNodeId:f?.preferredTipNodeId??null})})]})]})}function W6({run:e,selectedNodeId:t,onNodeClick:r}){return b.jsxs(JE,{cut:10,className:"relative",style:{height:"506px"},children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)] shrink-0",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:e.workflowName??e.workflowId??"Run"}),b.jsx("span",{className:"font-mono text-xs text-[var(--text-muted)]",children:e.runId}),b.jsxs("span",{className:"font-mono text-xs text-[var(--text-muted)]",children:[e.nodes.length," nodes · ",e.tipNodeIds.length," tip",e.tipNodeIds.length!==1?"s":""]})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[e.hasUnresolvedCriticalGaps&&b.jsx("span",{className:"text-xs text-[var(--warning)]",children:"Critical gaps"}),b.jsx(CS,{status:e.status})]})]}),b.jsx("div",{className:"flex-1",children:b.jsx(KD,{run:e,selectedNodeId:t,onNodeClick:a=>r(e.runId,a)})})]})}const eC=[{id:"coding",label:"Coding"},{id:"review_audit",label:"Review & Audit"},{id:"investigation",label:"Investigation"},{id:"design",label:"Design"},{id:"documentation",label:"Documentation"},{id:"tickets",label:"Tickets"},{id:"learning",label:"Learning"},{id:"authoring",label:"Workflow Authoring"}],tC=Object.fromEntries(eC.map(e=>[e.id,e.label]));function J6({selectedTag:e,onSelectTag:t,onSelectWorkflow:r}){const{data:a,isLoading:o,isError:l,error:u,refetch:f}=fk(),h=a?.workflows.filter(g=>!g.tags.includes("routines"))??[],d=e?h.filter(g=>g.tags.includes(e)):h,p=new Set(h.flatMap(g=>g.tags));return b.jsxs("div",{className:"space-y-4","aria-busy":o,children:[b.jsxs("div",{role:"group","aria-label":"Filter workflows by category",className:"flex flex-wrap gap-1.5",children:[b.jsx(T1,{label:"All",isActive:e===null,disabled:o,onClick:()=>t(null)}),eC.filter(g=>p.has(g.id)||!a).map(g=>b.jsx(T1,{label:g.label,isActive:e===g.id,disabled:o,onClick:()=>t(e===g.id?null:g.id)},g.id))]}),o?b.jsx(tI,{}):l?b.jsx(nI,{message:u instanceof Error?u.message:"Could not load workflows.",onRetry:()=>{f()}}):d.length===0?b.jsx("p",{className:"text-sm text-[var(--text-muted)] py-8 text-center",children:"No workflows in this category."}):b.jsx("div",{className:"space-y-px",children:d.map(g=>b.jsx(eI,{workflow:g,onSelect:()=>r(g.id)},g.id))})]})}function T1({label:e,isActive:t,disabled:r,onClick:a}){return b.jsxs("button",{type:"button",onClick:a,disabled:r,"aria-pressed":t,className:["px-3 py-2 min-w-[44px] rounded-full text-xs font-medium transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",t?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"].join(" "),children:[e,t&&b.jsx("span",{className:"sr-only",children:"(selected)"})]})}function eI({workflow:e,onSelect:t}){const r=e.tags.filter(o=>o!=="routines").map(o=>tC[o]??o),a=[e.name,e.description,r.length>0?`Tag: ${r.join(", ")}`:null,`Source: ${e.source.displayName}`].filter(Boolean).join(". ");return b.jsx("button",{type:"button",onClick:t,"aria-label":a,className:"w-full text-left flex items-start gap-3 px-3 py-2.5 rounded hover:bg-[var(--bg-card)] transition-colors group",children:b.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[b.jsx("p",{className:"text-sm text-[var(--text-primary)] group-hover:text-[var(--accent)] transition-colors leading-snug truncate",children:e.name}),b.jsx("p",{className:"text-xs text-[var(--text-secondary)] truncate",children:e.description}),b.jsxs("div",{className:"flex items-center gap-2",children:[r.map(o=>b.jsx("span",{"aria-hidden":"true",className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-muted)]",children:o},o)),b.jsx("span",{"aria-hidden":"true",className:"text-[10px] px-1.5 py-0.5 rounded border border-[var(--border)] text-[var(--text-muted)]",children:e.source.displayName})]})]})})}function tI(){return b.jsx("div",{className:"space-y-px animate-pulse","aria-busy":"true","aria-label":"Loading workflows",children:Array.from({length:8}).map((e,t)=>b.jsxs("div",{className:"px-3 py-3 space-y-1.5",children:[b.jsx("div",{className:"h-4 w-2/3 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-3 w-full rounded bg-[var(--bg-tertiary)]"}),b.jsxs("div",{className:"flex gap-1.5",children:[b.jsx("div",{className:"h-4 w-14 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-4 w-16 rounded bg-[var(--bg-tertiary)]"})]})]},t))})}function nI({message:e,onRetry:t}){return b.jsxs("div",{className:"space-y-3 py-8 text-center",children:[b.jsx("p",{className:"text-sm text-[var(--error)]",children:e}),b.jsx("button",{type:"button",onClick:t,className:"text-sm text-[var(--accent)] hover:text-[var(--accent-hover)] transition-colors",children:"Try again"})]})}function rI({workflowId:e,onBack:t}){const o=im().getQueryData(["workflows"])?.workflows.find(E=>E.id===e),{data:l,isLoading:u,isError:f,error:h,refetch:d}=pk(e),p="Workflows",g=l?.name??o?.name??e,y=l?.description??o?.description??null,v=l?.tags??o?.tags??[],S=l?.source??o?.source??null;return b.jsxs("div",{className:"space-y-5 max-w-3xl",children:[b.jsxs("button",{type:"button",onClick:t,"aria-label":p,className:"text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors text-sm",children:["← ",p]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)] leading-snug",children:g}),b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.filter(E=>E!=="routines").map(E=>b.jsx("span",{"aria-hidden":"true",className:"text-[10px] px-2 py-0.5 rounded bg-[var(--bg-tertiary)] text-[var(--text-secondary)]",children:tC[E]??E},E)),S&&b.jsx("span",{"aria-hidden":"true",className:"text-[10px] px-2 py-0.5 rounded bg-[var(--bg-secondary)] text-[var(--text-muted)] border border-[var(--border)]",children:S.displayName}),l&&b.jsxs("span",{className:"text-[10px] text-[var(--text-muted)]",children:[l.stepCount," ",l.stepCount===1?"step":"steps"]})]}),y&&b.jsx("p",{className:"text-sm text-[var(--text-secondary)] leading-relaxed",children:y})]}),u&&!o?b.jsx(aI,{}):f?b.jsx(oI,{message:h instanceof Error?h.message:"Could not load workflow details.",is404:h instanceof Vc&&h.status===404,onRetry:()=>{d()},onBack:t}):l?b.jsx(iI,{detail:l}):b.jsx("div",{className:"space-y-4",children:b.jsx(nC,{})})]})}function iI({detail:e}){const t=e.about!==void 0&&e.about.length>0,r=e.examples!==void 0&&e.examples.length>0,a=e.preconditions!==void 0&&e.preconditions.length>0;return t||r||a?b.jsxs("div",{className:"space-y-6",children:[t&&b.jsxs("section",{children:[b.jsx("h3",{className:"text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider mb-3",children:"About"}),b.jsx(WE,{children:e.about})]}),r&&b.jsxs("section",{children:[b.jsx("h3",{className:"text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider mb-3",children:"Try it with:"}),b.jsx("ul",{className:"space-y-2",children:e.examples.map(l=>b.jsxs("li",{className:"flex items-start gap-3 bg-[var(--bg-card)] border border-[var(--border)] rounded-lg px-4 py-3",children:[b.jsx("div",{className:"w-0.5 shrink-0 self-stretch rounded-full",style:{backgroundColor:"var(--accent)"}}),b.jsxs("span",{className:"text-sm text-[var(--text-secondary)] leading-relaxed",children:['"',l,'"']})]},l))})]}),a&&b.jsxs("section",{children:[b.jsx("h3",{className:"text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider mb-3",children:"Before you start:"}),b.jsx("ul",{className:"space-y-1.5",children:e.preconditions.map(l=>b.jsxs("li",{className:"flex items-start gap-2 text-sm text-[var(--text-secondary)]",children:[b.jsx("span",{className:"shrink-0 text-[var(--text-muted)] mt-0.5",children:"•"}),b.jsx("span",{children:l})]},l))})]})]}):b.jsx("p",{className:"text-sm text-[var(--text-muted)] italic",children:"No extended description available for this workflow."})}function nC(){return b.jsxs("div",{className:"space-y-3 animate-pulse",children:[b.jsx("div",{className:"h-3 w-16 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-4 w-5/6 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-4 w-4/6 rounded bg-[var(--bg-tertiary)]"})]})}function aI(){return b.jsxs("div",{className:"space-y-6 animate-pulse",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx("div",{className:"h-6 w-1/2 rounded bg-[var(--bg-tertiary)]"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("div",{className:"h-5 w-16 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-5 w-24 rounded bg-[var(--bg-tertiary)]"})]}),b.jsx("div",{className:"h-4 w-full rounded bg-[var(--bg-tertiary)]"})]}),b.jsx(nC,{})]})}function oI({message:e,is404:t,onRetry:r,onBack:a}){return b.jsxs("div",{className:"space-y-4 bg-[var(--bg-card)] border border-[var(--border)] rounded-lg p-4",children:[b.jsx("p",{className:"text-sm text-[var(--error)]",children:t?"Workflow not found.":e}),b.jsxs("div",{className:"flex gap-3",children:[!t&&b.jsx("button",{type:"button",onClick:r,className:"text-sm text-[var(--accent)] hover:text-[var(--accent-hover)] transition-colors",children:"Try again"}),b.jsx("button",{type:"button",onClick:a,"aria-label":"Back to workflows list",className:"text-sm text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:"← Back to Workflows"})]})]})}const A1=[{key:"tool",label:"Tool",minWidth:"180px"},{key:"duration",label:"Duration",width:"220px"},{key:"started",label:"Started",width:"100px"},{key:"outcome",label:"Outcome"}],R1=[{value:"recent",label:"Recent first",compareFn:(e,t)=>t.startedAtMs-e.startedAtMs},{value:"slowest",label:"Slowest first",compareFn:(e,t)=>t.durationMs-e.durationMs}],Km={success:{color:"var(--success)",label:"OK",isError:!1},error:{color:"var(--error)",label:"Error",isError:!0},unknown_tool:{color:"var(--warning)",label:"Unknown",isError:!0}};function sI(){const e=dk(),[t,r]=Y.useState("recent");if(e.state==="loading")return b.jsx(dI,{});if(e.state==="devModeOff")return b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("p",{className:"text-sm text-[var(--text-muted)] text-center",children:"nothing to see here"})});if(e.state==="error")return b.jsxs("div",{className:"space-y-3 py-8 text-center",children:[b.jsx("p",{className:"text-sm text-[var(--error)]",children:e.message}),b.jsx("button",{type:"button",onClick:e.retry,className:"text-sm text-[var(--accent)] hover:text-[var(--accent-hover)] transition-colors",children:"Try again"})]});const{observations:a,total:o}=e.data;return b.jsx(lI,{observations:a,total:o,sortOrder:t,onSortChange:r})}function lI({observations:e,total:t,sortOrder:r,onSortChange:a}){const o=Y.useMemo(()=>{const p=R1.find(g=>g.value===r);return[...e].sort(p.compareFn)},[e,r]),l=Y.useMemo(()=>o.reduce((p,g)=>Math.max(p,g.durationMs),0),[o]),u=e.filter(p=>Km[p.outcome].isError).length,f=e.length>0?Math.round(e.reduce((p,g)=>p+g.durationMs,0)/e.length):null,h=e.length>0?e.reduce((p,g)=>Math.max(p,g.startedAtMs),0):null,d=t>e.length?`${e.length} of ${t} recorded`:`${t} recorded`;return b.jsxs("div",{className:"space-y-3",children:[b.jsxs("p",{className:"text-sm text-[var(--text-secondary)]",children:[d," | ",b.jsxs("span",{style:{color:u>0?"var(--error)":"var(--text-muted)"},children:[u," errors"]})," | ","avg ",f!==null?`${f}ms`:"--"," | ","last call ",h!==null?wo(h):"no calls yet"]}),b.jsx("div",{role:"radiogroup","aria-label":"Sort order",className:"flex items-center gap-1",children:R1.map(p=>b.jsx(fI,{label:p.label,isActive:r===p.value,onClick:()=>a(p.value)},p.value))}),b.jsxs("table",{className:"w-full text-sm border-collapse",children:[b.jsx("thead",{children:b.jsx("tr",{className:"text-xs text-[var(--text-muted)] border-b border-[var(--border)]",children:A1.map(p=>b.jsx("th",{scope:"col",className:"text-left py-2 pr-4 font-medium",style:{width:p.width,minWidth:p.minWidth},children:p.label},p.key))})}),b.jsx("tbody",{children:o.length===0?b.jsx("tr",{children:b.jsx("td",{colSpan:A1.length,className:"py-8 text-center text-sm text-[var(--text-muted)]",children:"No tool calls recorded yet. Run a workflow to see timing data."})}):o.map((p,g)=>b.jsx(uI,{obs:p,maxDuration:l},`${p.startedAtMs}-${p.toolName}-${g}`))})]})]})}function uI({obs:e,maxDuration:t}){const r=Km[e.outcome].isError,a=t>0?Math.round(e.durationMs/t*120):0;return b.jsxs("tr",{className:"border-b border-[var(--border)] hover:bg-[var(--bg-card)] transition-colors",style:{borderLeft:r?"2px solid var(--error)":"2px solid transparent"},children:[b.jsx("td",{className:"py-2 pr-4 font-mono text-[var(--text-primary)] overflow-hidden text-ellipsis",title:e.toolName,style:{minWidth:"180px",maxWidth:"240px"},children:b.jsx("span",{className:"block truncate",children:e.toolName})}),b.jsxs("td",{className:"py-2 pr-4",style:{width:"220px"},children:[b.jsxs("span",{className:"font-mono text-[var(--text-primary)]",children:[e.durationMs,"ms"]}),b.jsx("div",{"aria-hidden":"true",className:"h-1 rounded mt-1",style:{backgroundColor:"var(--accent)",width:`${a}px`,maxWidth:"120px"}})]}),b.jsx("td",{className:"py-2 pr-4 text-[var(--text-secondary)]",style:{width:"100px"},children:wo(e.startedAtMs)}),b.jsx("td",{className:"py-2",children:b.jsx(cI,{outcome:e.outcome})})]})}function cI({outcome:e}){const t=Km[e];return b.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-xs font-medium",style:{color:t.color,backgroundColor:`color-mix(in srgb, ${t.color} 12%, transparent)`},children:t.label})}function fI({label:e,isActive:t,onClick:r}){return b.jsx("button",{type:"button",role:"radio",onClick:r,"aria-checked":t,className:["px-3 py-2 rounded text-xs font-medium min-w-[44px] transition-colors",t?"text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"].join(" "),children:e})}function dI(){return b.jsxs("div",{className:"space-y-3 animate-pulse","aria-busy":"true","aria-label":"Loading performance data",children:[b.jsx("div",{className:"h-4 w-64 rounded bg-[var(--bg-tertiary)]"}),b.jsxs("div",{className:"flex gap-1",children:[b.jsx("div",{className:"h-8 w-24 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-8 w-24 rounded bg-[var(--bg-tertiary)]"})]}),b.jsxs("div",{className:"flex gap-4 border-b border-[var(--border)] pb-2",children:[b.jsx("div",{className:"h-3 w-20 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-3 w-16 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-3 w-14 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-3 w-14 rounded bg-[var(--bg-tertiary)]"})]}),Array.from({length:8}).map((e,t)=>b.jsxs("div",{className:"flex gap-4 py-2",children:[b.jsx("div",{className:"h-4 rounded bg-[var(--bg-tertiary)]",style:{minWidth:"180px",width:"180px"}}),b.jsxs("div",{className:"space-y-1",style:{width:"220px"},children:[b.jsx("div",{className:"h-4 w-16 rounded bg-[var(--bg-tertiary)]"}),b.jsx("div",{className:"h-1 w-20 rounded bg-[var(--bg-tertiary)]"})]}),b.jsx("div",{className:"h-4 w-16 rounded bg-[var(--bg-tertiary)]",style:{width:"100px"}}),b.jsx("div",{className:"h-5 w-12 rounded bg-[var(--bg-tertiary)]"})]},t))]})}function hI(){const e=Uc(),t=VM(),{location:r}=QM(),a=t({to:"/session/$sessionId"}),o=t({to:"/workflows"}),l=t({to:"/workflows/$workflowId"}),u=t({to:"/perf"}),f=a!==!1,h=o!==!1||l!==!1,d=l!==!1,p=hk(),g=u!==!1,y=g&&p===!0,v=f?a.sessionId:null,S=d?l.workflowId:null,E=new URLSearchParams(r.search).get("tag"),N=Y.useCallback(()=>{e({to:"/"})},[e]),w=Y.useCallback(k=>{e({to:"/workflows",search:{tag:k??void 0}})},[e]),O=Y.useCallback(k=>{e({to:"/workflows/$workflowId",params:{workflowId:k},search:{tag:E??void 0}})},[e,E]),_=Y.useCallback(()=>{e({to:"/workflows",search:{tag:E??void 0}})},[e,E]),M=p===!0?["/","/workflows","/perf"]:["/","/workflows"],B=Y.useRef(null);return Y.useEffect(()=>{const k=B.current;if(!k)return;function D(U){if(U.key==="ArrowLeft"||U.key==="ArrowRight"){U.preventDefault();const H=y?2:h?1:0,q=U.key==="ArrowRight"?1:-1,L=(H+q+M.length)%M.length,P=M[L];e(P==="/workflows"?{to:"/workflows",search:{tag:void 0}}:{to:P})}}return k.addEventListener("keydown",D),()=>k.removeEventListener("keydown",D)},[h,y,e,M]),b.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",style:{"--app-header-height":"61px"},children:[b.jsx("header",{className:"sticky top-0 z-20 border-b border-[var(--border)] px-6 py-4 bg-[var(--bg-primary)]",children:b.jsxs("div",{className:"flex items-center gap-4",children:[f&&b.jsx("button",{onClick:N,className:"text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:"← Back"}),b.jsx("h1",{className:"text-lg font-semibold text-[var(--text-primary)]",children:"WorkRail Console"}),f&&v&&b.jsx("span",{className:"text-sm text-[var(--text-muted)] font-mono",children:v}),!f&&b.jsxs("div",{role:"tablist","aria-label":"Console sections",ref:B,className:"flex items-center gap-1 ml-4",children:[b.jsx("button",{role:"tab",id:"tab-workspace","aria-selected":!h&&!g,"aria-controls":"panel-workspace",tabIndex:!h&&!g?0:-1,onClick:()=>{e({to:"/"})},className:["px-3 py-1 rounded text-sm font-medium transition-colors",!h&&!g?"text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"].join(" "),children:"Workspace"}),b.jsx("button",{role:"tab",id:"tab-workflows","aria-selected":h,"aria-controls":"panel-workflows",tabIndex:h?0:-1,onClick:()=>{e({to:"/workflows",search:{tag:void 0}})},className:["px-3 py-1 rounded text-sm font-medium transition-colors",h?"text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"].join(" "),children:"Workflows"}),p===!0&&b.jsx("button",{role:"tab",id:"tab-perf","aria-selected":y,"aria-controls":"panel-perf",tabIndex:y?0:-1,onClick:()=>{e({to:"/perf"})},className:["px-3 py-1 rounded text-sm font-medium transition-colors",y?"text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"].join(" "),children:"Performance"})]})]})}),b.jsxs("main",{className:"p-6",children:[b.jsxs("div",{id:"panel-workspace",role:"tabpanel","aria-labelledby":"tab-workspace",hidden:h||g,children:[b.jsx(zk,{hidden:f}),f&&v&&b.jsx(K6,{sessionId:v})]}),h&&b.jsx("div",{id:"panel-workflows",role:"tabpanel","aria-labelledby":"tab-workflows",children:d&&S?b.jsx(rI,{workflowId:S,onBack:_}):b.jsx(J6,{selectedTag:E,onSelectTag:w,onSelectWorkflow:O})}),g&&b.jsx("div",{id:"panel-perf",role:"tabpanel","aria-labelledby":"tab-perf",children:b.jsx(sI,{})})]})]})}const _o=OM({component:hI}),pI=cl({getParentRoute:()=>_o,path:"/",component:()=>null}),mI=cl({getParentRoute:()=>_o,path:"/session/$sessionId",component:()=>null}),gI=cl({getParentRoute:()=>_o,path:"/workflows",validateSearch:e=>({tag:typeof e.tag=="string"?e.tag:void 0}),component:()=>null}),yI=cl({getParentRoute:()=>_o,path:"/workflows/$workflowId",validateSearch:e=>({tag:typeof e.tag=="string"?e.tag:void 0}),component:()=>null}),xI=cl({getParentRoute:()=>_o,path:"/perf",component:()=>null}),vI=_o.addChildren([pI,mI,gI,yI,xI]),bI=YM({routeTree:vI,history:YN()}),SI=new U2({defaultOptions:{queries:{refetchInterval:5e3,staleTime:2e3}}});g2.createRoot(document.getElementById("root")).render(b.jsx(Y.StrictMode,{children:b.jsx(q2,{client:SI,children:b.jsx(XM,{router:bI})})}));