@exellix/jobs-ui 1.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -37
- package/dist/assets/index-CUeGAvCJ.css +1 -0
- package/dist/assets/index-D_JRmMIk.js +61 -0
- package/dist/index.html +14 -0
- package/package.json +23 -25
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -17
- package/dist/cli.js.map +0 -1
- package/dist/http/server.d.ts +0 -13
- package/dist/http/server.d.ts.map +0 -1
- package/dist/http/server.js +0 -43
- package/dist/http/server.js.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/queries.d.ts +0 -26
- package/dist/queries.d.ts.map +0 -1
- package/dist/queries.js +0 -33
- package/dist/queries.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var Ix=Object.defineProperty;var Lp=l=>{throw TypeError(l)};var Wx=(l,s,c)=>s in l?Ix(l,s,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[s]=c;var Bp=(l,s,c)=>Wx(l,typeof s!="symbol"?s+"":s,c),Uo=(l,s,c)=>s.has(l)||Lp("Cannot "+c);var N=(l,s,c)=>(Uo(l,s,"read from private field"),c?c.call(l):s.get(l)),ce=(l,s,c)=>s.has(l)?Lp("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(l):s.set(l,c),te=(l,s,c,u)=>(Uo(l,s,"write to private field"),u?u.call(l,c):s.set(l,c),c),je=(l,s,c)=>(Uo(l,s,"access private method"),c);var Ir=(l,s,c,u)=>({set _(d){te(l,s,d,c)},get _(){return N(l,s,u)}});(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function c(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=c(d);fetch(d.href,f)}})();var Lo={exports:{}},vs={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Hp;function Px(){if(Hp)return vs;Hp=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function c(u,d,f){var p=null;if(f!==void 0&&(p=""+f),d.key!==void 0&&(p=""+d.key),"key"in d){f={};for(var m in d)m!=="key"&&(f[m]=d[m])}else f=d;return d=f.ref,{$$typeof:l,type:u,key:p,ref:d!==void 0?d:null,props:f}}return vs.Fragment=s,vs.jsx=c,vs.jsxs=c,vs}var Qp;function eb(){return Qp||(Qp=1,Lo.exports=Px()),Lo.exports}var i=eb(),Bo={exports:{}},ye={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Gp;function tb(){if(Gp)return ye;Gp=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),T=Symbol.iterator;function R(C){return C===null||typeof C!="object"?null:(C=T&&C[T]||C["@@iterator"],typeof C=="function"?C:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,H={};function U(C,z,F){this.props=C,this.context=z,this.refs=H,this.updater=F||w}U.prototype.isReactComponent={},U.prototype.setState=function(C,z){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,z,"setState")},U.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function X(){}X.prototype=U.prototype;function G(C,z,F){this.props=C,this.context=z,this.refs=H,this.updater=F||w}var V=G.prototype=new X;V.constructor=G,q(V,U.prototype),V.isPureReactComponent=!0;var P=Array.isArray;function J(){}var Z={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function O(C,z,F){var ee=F.ref;return{$$typeof:l,type:C,key:z,ref:ee!==void 0?ee:null,props:F}}function le(C,z){return O(C.type,z,C.props)}function ue(C){return typeof C=="object"&&C!==null&&C.$$typeof===l}function de(C){var z={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(F){return z[F]})}var se=/\/+/g;function Ne(C,z){return typeof C=="object"&&C!==null&&C.key!=null?de(""+C.key):z.toString(36)}function pe(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(J,J):(C.status="pending",C.then(function(z){C.status==="pending"&&(C.status="fulfilled",C.value=z)},function(z){C.status==="pending"&&(C.status="rejected",C.reason=z)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function Q(C,z,F,ee,he){var ge=typeof C;(ge==="undefined"||ge==="boolean")&&(C=null);var W=!1;if(C===null)W=!0;else switch(ge){case"bigint":case"string":case"number":W=!0;break;case"object":switch(C.$$typeof){case l:case s:W=!0;break;case b:return W=C._init,Q(W(C._payload),z,F,ee,he)}}if(W)return he=he(C),W=ee===""?"."+Ne(C,0):ee,P(he)?(F="",W!=null&&(F=W.replace(se,"$&/")+"/"),Q(he,z,F,"",function(Wa){return Wa})):he!=null&&(ue(he)&&(he=le(he,F+(he.key==null||C&&C.key===he.key?"":(""+he.key).replace(se,"$&/")+"/")+W)),z.push(he)),1;W=0;var Ee=ee===""?".":ee+":";if(P(C))for(var _e=0;_e<C.length;_e++)ee=C[_e],ge=Ee+Ne(ee,_e),W+=Q(ee,z,F,ge,he);else if(_e=R(C),typeof _e=="function")for(C=_e.call(C),_e=0;!(ee=C.next()).done;)ee=ee.value,ge=Ee+Ne(ee,_e++),W+=Q(ee,z,F,ge,he);else if(ge==="object"){if(typeof C.then=="function")return Q(pe(C),z,F,ee,he);throw z=String(C),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return W}function $(C,z,F){if(C==null)return C;var ee=[],he=0;return Q(C,ee,"","",function(ge){return z.call(F,ge,he++)}),ee}function B(C){if(C._status===-1){var z=C._result;z=z(),z.then(function(F){(C._status===0||C._status===-1)&&(C._status=1,C._result=F)},function(F){(C._status===0||C._status===-1)&&(C._status=2,C._result=F)}),C._status===-1&&(C._status=0,C._result=z)}if(C._status===1)return C._result.default;throw C._result}var ne=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},me={map:$,forEach:function(C,z,F){$(C,function(){z.apply(this,arguments)},F)},count:function(C){var z=0;return $(C,function(){z++}),z},toArray:function(C){return $(C,function(z){return z})||[]},only:function(C){if(!ue(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ye.Activity=x,ye.Children=me,ye.Component=U,ye.Fragment=c,ye.Profiler=d,ye.PureComponent=G,ye.StrictMode=u,ye.Suspense=y,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ye.__COMPILER_RUNTIME={__proto__:null,c:function(C){return Z.H.useMemoCache(C)}},ye.cache=function(C){return function(){return C.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(C,z,F){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ee=q({},C.props),he=C.key;if(z!=null)for(ge in z.key!==void 0&&(he=""+z.key),z)!I.call(z,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&z.ref===void 0||(ee[ge]=z[ge]);var ge=arguments.length-2;if(ge===1)ee.children=F;else if(1<ge){for(var W=Array(ge),Ee=0;Ee<ge;Ee++)W[Ee]=arguments[Ee+2];ee.children=W}return O(C.type,he,ee)},ye.createContext=function(C){return C={$$typeof:p,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:f,_context:C},C},ye.createElement=function(C,z,F){var ee,he={},ge=null;if(z!=null)for(ee in z.key!==void 0&&(ge=""+z.key),z)I.call(z,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(he[ee]=z[ee]);var W=arguments.length-2;if(W===1)he.children=F;else if(1<W){for(var Ee=Array(W),_e=0;_e<W;_e++)Ee[_e]=arguments[_e+2];he.children=Ee}if(C&&C.defaultProps)for(ee in W=C.defaultProps,W)he[ee]===void 0&&(he[ee]=W[ee]);return O(C,ge,he)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(C){return{$$typeof:m,render:C}},ye.isValidElement=ue,ye.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:B}},ye.memo=function(C,z){return{$$typeof:g,type:C,compare:z===void 0?null:z}},ye.startTransition=function(C){var z=Z.T,F={};Z.T=F;try{var ee=C(),he=Z.S;he!==null&&he(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(J,ne)}catch(ge){ne(ge)}finally{z!==null&&F.types!==null&&(z.types=F.types),Z.T=z}},ye.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ye.use=function(C){return Z.H.use(C)},ye.useActionState=function(C,z,F){return Z.H.useActionState(C,z,F)},ye.useCallback=function(C,z){return Z.H.useCallback(C,z)},ye.useContext=function(C){return Z.H.useContext(C)},ye.useDebugValue=function(){},ye.useDeferredValue=function(C,z){return Z.H.useDeferredValue(C,z)},ye.useEffect=function(C,z){return Z.H.useEffect(C,z)},ye.useEffectEvent=function(C){return Z.H.useEffectEvent(C)},ye.useId=function(){return Z.H.useId()},ye.useImperativeHandle=function(C,z,F){return Z.H.useImperativeHandle(C,z,F)},ye.useInsertionEffect=function(C,z){return Z.H.useInsertionEffect(C,z)},ye.useLayoutEffect=function(C,z){return Z.H.useLayoutEffect(C,z)},ye.useMemo=function(C,z){return Z.H.useMemo(C,z)},ye.useOptimistic=function(C,z){return Z.H.useOptimistic(C,z)},ye.useReducer=function(C,z,F){return Z.H.useReducer(C,z,F)},ye.useRef=function(C){return Z.H.useRef(C)},ye.useState=function(C){return Z.H.useState(C)},ye.useSyncExternalStore=function(C,z,F){return Z.H.useSyncExternalStore(C,z,F)},ye.useTransition=function(){return Z.H.useTransition()},ye.version="19.2.7",ye}var kp;function yd(){return kp||(kp=1,Bo.exports=tb()),Bo.exports}var j=yd(),Ho={exports:{}},gs={},Qo={exports:{}},Go={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Yp;function ab(){return Yp||(Yp=1,(function(l){function s(Q,$){var B=Q.length;Q.push($);e:for(;0<B;){var ne=B-1>>>1,me=Q[ne];if(0<d(me,$))Q[ne]=$,Q[B]=me,B=ne;else break e}}function c(Q){return Q.length===0?null:Q[0]}function u(Q){if(Q.length===0)return null;var $=Q[0],B=Q.pop();if(B!==$){Q[0]=B;e:for(var ne=0,me=Q.length,C=me>>>1;ne<C;){var z=2*(ne+1)-1,F=Q[z],ee=z+1,he=Q[ee];if(0>d(F,B))ee<me&&0>d(he,F)?(Q[ne]=he,Q[ee]=B,ne=ee):(Q[ne]=F,Q[z]=B,ne=z);else if(ee<me&&0>d(he,B))Q[ne]=he,Q[ee]=B,ne=ee;else break e}}return $}function d(Q,$){var B=Q.sortIndex-$.sortIndex;return B!==0?B:Q.id-$.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var p=Date,m=p.now();l.unstable_now=function(){return p.now()-m}}var y=[],g=[],b=1,x=null,T=3,R=!1,w=!1,q=!1,H=!1,U=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function V(Q){for(var $=c(g);$!==null;){if($.callback===null)u(g);else if($.startTime<=Q)u(g),$.sortIndex=$.expirationTime,s(y,$);else break;$=c(g)}}function P(Q){if(q=!1,V(Q),!w)if(c(y)!==null)w=!0,J||(J=!0,de());else{var $=c(g);$!==null&&pe(P,$.startTime-Q)}}var J=!1,Z=-1,I=5,O=-1;function le(){return H?!0:!(l.unstable_now()-O<I)}function ue(){if(H=!1,J){var Q=l.unstable_now();O=Q;var $=!0;try{e:{w=!1,q&&(q=!1,X(Z),Z=-1),R=!0;var B=T;try{t:{for(V(Q),x=c(y);x!==null&&!(x.expirationTime>Q&&le());){var ne=x.callback;if(typeof ne=="function"){x.callback=null,T=x.priorityLevel;var me=ne(x.expirationTime<=Q);if(Q=l.unstable_now(),typeof me=="function"){x.callback=me,V(Q),$=!0;break t}x===c(y)&&u(y),V(Q)}else u(y);x=c(y)}if(x!==null)$=!0;else{var C=c(g);C!==null&&pe(P,C.startTime-Q),$=!1}}break e}finally{x=null,T=B,R=!1}$=void 0}}finally{$?de():J=!1}}}var de;if(typeof G=="function")de=function(){G(ue)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,Ne=se.port2;se.port1.onmessage=ue,de=function(){Ne.postMessage(null)}}else de=function(){U(ue,0)};function pe(Q,$){Z=U(function(){Q(l.unstable_now())},$)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Q){Q.callback=null},l.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<Q?Math.floor(1e3/Q):5},l.unstable_getCurrentPriorityLevel=function(){return T},l.unstable_next=function(Q){switch(T){case 1:case 2:case 3:var $=3;break;default:$=T}var B=T;T=$;try{return Q()}finally{T=B}},l.unstable_requestPaint=function(){H=!0},l.unstable_runWithPriority=function(Q,$){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var B=T;T=Q;try{return $()}finally{T=B}},l.unstable_scheduleCallback=function(Q,$,B){var ne=l.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?ne+B:ne):B=ne,Q){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=B+me,Q={id:b++,callback:$,priorityLevel:Q,startTime:B,expirationTime:me,sortIndex:-1},B>ne?(Q.sortIndex=B,s(g,Q),c(y)===null&&Q===c(g)&&(q?(X(Z),Z=-1):q=!0,pe(P,B-ne))):(Q.sortIndex=me,s(y,Q),w||R||(w=!0,J||(J=!0,de()))),Q},l.unstable_shouldYield=le,l.unstable_wrapCallback=function(Q){var $=T;return function(){var B=T;T=$;try{return Q.apply(this,arguments)}finally{T=B}}}})(Go)),Go}var Kp;function nb(){return Kp||(Kp=1,Qo.exports=ab()),Qo.exports}var ko={exports:{}},mt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Xp;function lb(){if(Xp)return mt;Xp=1;var l=yd();function s(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var u={d:{f:c,r:function(){throw Error(s(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(y,g,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:x==null?null:""+x,children:y,containerInfo:g,implementation:b}}var p=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,mt.createPortal=function(y,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return f(y,g,null,b)},mt.flushSync=function(y){var g=p.T,b=u.p;try{if(p.T=null,u.p=2,y)return y()}finally{p.T=g,u.p=b,u.d.f()}},mt.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(y,g))},mt.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},mt.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var b=g.as,x=m(b,g.crossOrigin),T=typeof g.integrity=="string"?g.integrity:void 0,R=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?u.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:x,integrity:T,fetchPriority:R}):b==="script"&&u.d.X(y,{crossOrigin:x,integrity:T,fetchPriority:R,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},mt.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);u.d.M(y,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(y)},mt.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,x=m(b,g.crossOrigin);u.d.L(y,b,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},mt.preloadModule=function(y,g){if(typeof y=="string")if(g){var b=m(g.as,g.crossOrigin);u.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(y)},mt.requestFormReset=function(y){u.d.r(y)},mt.unstable_batchedUpdates=function(y,g){return y(g)},mt.useFormState=function(y,g,b){return p.H.useFormState(y,g,b)},mt.useFormStatus=function(){return p.H.useHostTransitionStatus()},mt.version="19.2.7",mt}var Zp;function ib(){if(Zp)return ko.exports;Zp=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),ko.exports=lb(),ko.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Vp;function sb(){if(Vp)return gs;Vp=1;var l=nb(),s=yd(),c=ib();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(f(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,n=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(n=r.return,n!==null){a=n;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return y(r),e;if(o===n)return y(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==n.return)a=r,n=o;else{for(var h=!1,v=r.child;v;){if(v===a){h=!0,a=r,n=o;break}if(v===n){h=!0,n=r,a=o;break}v=v.sibling}if(!h){for(v=o.child;v;){if(v===a){h=!0,a=o,n=r;break}if(v===n){h=!0,n=o,a=r;break}v=v.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==n)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,T=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),G=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function Ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case U:return"Profiler";case H:return"StrictMode";case P:return"Suspense";case J:return"SuspenseList";case O:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case G:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Ne(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return Ne(e(t))}catch{}}return null}var pe=Array.isArray,Q=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},ne=[],me=-1;function C(e){return{current:e}}function z(e){0>me||(e.current=ne[me],ne[me]=null,me--)}function F(e,t){me++,ne[me]=e.current,e.current=t}var ee=C(null),he=C(null),ge=C(null),W=C(null);function Ee(e,t){switch(F(ge,t),F(he,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sp(t),e=rp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(ee),F(ee,e)}function _e(){z(ee),z(he),z(ge)}function Wa(e){e.memoizedState!==null&&F(W,e);var t=ee.current,a=rp(t,e.type);t!==a&&(F(he,e),F(ee,a))}function yl(e){he.current===e&&(z(ee),z(he)),W.current===e&&(z(W),hs._currentValue=B)}var vu,qd;function Hn(e){if(vu===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);vu=t&&t[1]||"",qd=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+vu+e+qd}var gu=!1;function xu(e,t){if(!e||gu)return"";gu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(L){var _=L}Reflect.construct(e,[],K)}else{try{K.call()}catch(L){_=L}e.call(K.prototype)}}else{try{throw Error()}catch(L){_=L}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(L){if(L&&_&&typeof L.stack=="string")return[L.stack,_.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),h=o[0],v=o[1];if(h&&v){var S=h.split(`
|
|
44
|
+
`),D=v.split(`
|
|
45
|
+
`);for(r=n=0;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;for(;r<D.length&&!D[r].includes("DetermineComponentFrameRoot");)r++;if(n===S.length||r===D.length)for(n=S.length-1,r=D.length-1;1<=n&&0<=r&&S[n]!==D[r];)r--;for(;1<=n&&0<=r;n--,r--)if(S[n]!==D[r]){if(n!==1||r!==1)do if(n--,r--,0>r||S[n]!==D[r]){var k=`
|
|
46
|
+
`+S[n].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=n&&0<=r);break}}}finally{gu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Hn(a):""}function Av(e,t){switch(e.tag){case 26:case 27:case 5:return Hn(e.type);case 16:return Hn("Lazy");case 13:return e.child!==t&&t!==null?Hn("Suspense Fallback"):Hn("Suspense");case 19:return Hn("SuspenseList");case 0:case 15:return xu(e.type,!1);case 11:return xu(e.type.render,!1);case 1:return xu(e.type,!0);case 31:return Hn("Activity");default:return""}}function Ud(e){try{var t="",a=null;do t+=Av(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var bu=Object.prototype.hasOwnProperty,ju=l.unstable_scheduleCallback,Su=l.unstable_cancelCallback,Ov=l.unstable_shouldYield,zv=l.unstable_requestPaint,wt=l.unstable_now,Mv=l.unstable_getCurrentPriorityLevel,Ld=l.unstable_ImmediatePriority,Bd=l.unstable_UserBlockingPriority,_s=l.unstable_NormalPriority,Dv=l.unstable_LowPriority,Hd=l.unstable_IdlePriority,wv=l.log,_v=l.unstable_setDisableYieldValue,Ci=null,_t=null;function Pa(e){if(typeof wv=="function"&&_v(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ci,e)}catch{}}var qt=Math.clz32?Math.clz32:Lv,qv=Math.log,Uv=Math.LN2;function Lv(e){return e>>>=0,e===0?32:31-(qv(e)/Uv|0)|0}var qs=256,Us=262144,Ls=4194304;function Qn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Bs(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var v=n&134217727;return v!==0?(n=v&~o,n!==0?r=Qn(n):(h&=v,h!==0?r=Qn(h):a||(a=v&~e,a!==0&&(r=Qn(a))))):(v=n&~o,v!==0?r=Qn(v):h!==0?r=Qn(h):a||(a=n&~e,a!==0&&(r=Qn(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function Ti(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Bv(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qd(){var e=Ls;return Ls<<=1,(Ls&62914560)===0&&(Ls=4194304),e}function Nu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ri(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hv(e,t,a,n,r,o){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,S=e.expirationTimes,D=e.hiddenUpdates;for(a=h&~a;0<a;){var k=31-qt(a),K=1<<k;v[k]=0,S[k]=-1;var _=D[k];if(_!==null)for(D[k]=null,k=0;k<_.length;k++){var L=_[k];L!==null&&(L.lane&=-536870913)}a&=~K}n!==0&&Gd(e,n,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function Gd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-qt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function kd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-qt(a),r=1<<n;r&t|e[n]&t&&(e[n]|=t),a&=~r}}function Yd(e,t){var a=t&-t;return a=(a&42)!==0?1:Eu(a),(a&(e.suspendedLanes|t))!==0?0:a}function Eu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Cu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kd(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:zp(e.type))}function Xd(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var en=Math.random().toString(36).slice(2),ut="__reactFiber$"+en,St="__reactProps$"+en,vl="__reactContainer$"+en,Tu="__reactEvents$"+en,Qv="__reactListeners$"+en,Gv="__reactHandles$"+en,Zd="__reactResources$"+en,Ai="__reactMarker$"+en;function Ru(e){delete e[ut],delete e[St],delete e[Tu],delete e[Qv],delete e[Gv]}function gl(e){var t=e[ut];if(t)return t;for(var a=e.parentNode;a;){if(t=a[vl]||a[ut]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=mp(e);e!==null;){if(a=e[ut])return a;e=mp(e)}return t}e=a,a=e.parentNode}return null}function xl(e){if(e=e[ut]||e[vl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function bl(e){var t=e[Zd];return t||(t=e[Zd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[Ai]=!0}var Vd=new Set,$d={};function Gn(e,t){jl(e,t),jl(e+"Capture",t)}function jl(e,t){for($d[e]=t,e=0;e<t.length;e++)Vd.add(t[e])}var kv=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]*$"),Jd={},Fd={};function Yv(e){return bu.call(Fd,e)?!0:bu.call(Jd,e)?!1:kv.test(e)?Fd[e]=!0:(Jd[e]=!0,!1)}function Hs(e,t,a){if(Yv(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Qs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Na(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function $t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Id(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kv(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Au(e){if(!e._valueTracker){var t=Id(e)?"checked":"value";e._valueTracker=Kv(e,t,""+e[t])}}function Wd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Id(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Gs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xv=/[\n"\\]/g;function Jt(e){return e.replace(Xv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ou(e,t,a,n,r,o,h,v){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$t(t)):e.value!==""+$t(t)&&(e.value=""+$t(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?zu(e,h,$t(t)):a!=null?zu(e,h,$t(a)):n!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+$t(v):e.removeAttribute("name")}function Pd(e,t,a,n,r,o,h,v){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Au(e);return}a=a!=null?""+$t(a):"",t=t!=null?""+$t(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=v?e.checked:!!n,e.defaultChecked=!!n,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Au(e)}function zu(e,t,a){t==="number"&&Gs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Sl(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&n&&(e[a].defaultSelected=!0)}else{for(a=""+$t(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function ef(e,t,a){if(t!=null&&(t=""+$t(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+$t(a):""}function tf(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(u(92));if(pe(n)){if(1<n.length)throw Error(u(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=$t(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Au(e)}function Nl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Zv=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 af(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Zv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function nf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&a[r]!==n&&af(e,r,n)}else for(var o in t)t.hasOwnProperty(o)&&af(e,o,t[o])}function Mu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vv=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"]]),$v=/^[\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 ks(e){return $v.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ea(){}var Du=null;function wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,Cl=null;function lf(e){var t=xl(e);if(t&&(e=t.stateNode)){var a=e[St]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ou(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Jt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var r=n[St]||null;if(!r)throw Error(u(90));Ou(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Wd(n)}break e;case"textarea":ef(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Sl(e,!!a.multiple,t,!1)}}}var _u=!1;function sf(e,t,a){if(_u)return e(t,a);_u=!0;try{var n=e(t);return n}finally{if(_u=!1,(El!==null||Cl!==null)&&(Or(),El&&(t=El,e=Cl,Cl=El=null,lf(t),e)))for(t=0;t<e.length;t++)lf(e[t])}}function zi(e,t){var a=e.stateNode;if(a===null)return null;var n=a[St]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(Ca)try{var Mi={};Object.defineProperty(Mi,"passive",{get:function(){qu=!0}}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{qu=!1}var tn=null,Uu=null,Ys=null;function rf(){if(Ys)return Ys;var e,t=Uu,a=t.length,n,r="value"in tn?tn.value:tn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(n=1;n<=h&&t[a-n]===r[o-n];n++);return Ys=r.slice(e,1<n?1-n:void 0)}function Ks(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Xs(){return!0}function uf(){return!1}function Nt(e){function t(a,n,r,o,h){this._reactName=a,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(o):o[v]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Xs:uf,this.isPropagationStopped=uf,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zs=Nt(kn),Di=x({},kn,{view:0,detail:0}),Jv=Nt(Di),Lu,Bu,wi,Vs=x({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==wi&&(wi&&e.type==="mousemove"?(Lu=e.screenX-wi.screenX,Bu=e.screenY-wi.screenY):Bu=Lu=0,wi=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:Bu}}),cf=Nt(Vs),Fv=x({},Vs,{dataTransfer:0}),Iv=Nt(Fv),Wv=x({},Di,{relatedTarget:0}),Hu=Nt(Wv),Pv=x({},kn,{animationName:0,elapsedTime:0,pseudoElement:0}),eg=Nt(Pv),tg=x({},kn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ag=Nt(tg),ng=x({},kn,{data:0}),of=Nt(ng),lg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ig={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"},sg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sg[e])?!!t[e]:!1}function Qu(){return rg}var ug=x({},Di,{key:function(e){if(e.key){var t=lg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ks(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ig[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?Ks(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ks(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cg=Nt(ug),og=x({},Vs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),df=Nt(og),dg=x({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),fg=Nt(dg),hg=x({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0}),mg=Nt(hg),pg=x({},Vs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),yg=Nt(pg),vg=x({},kn,{newState:0,oldState:0}),gg=Nt(vg),xg=[9,13,27,32],Gu=Ca&&"CompositionEvent"in window,_i=null;Ca&&"documentMode"in document&&(_i=document.documentMode);var bg=Ca&&"TextEvent"in window&&!_i,ff=Ca&&(!Gu||_i&&8<_i&&11>=_i),hf=" ",mf=!1;function pf(e,t){switch(e){case"keyup":return xg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tl=!1;function jg(e,t){switch(e){case"compositionend":return yf(t);case"keypress":return t.which!==32?null:(mf=!0,hf);case"textInput":return e=t.data,e===hf&&mf?null:e;default:return null}}function Sg(e,t){if(Tl)return e==="compositionend"||!Gu&&pf(e,t)?(e=rf(),Ys=Uu=tn=null,Tl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ff&&t.locale!=="ko"?null:t.data;default:return null}}var Ng={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 vf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ng[e.type]:t==="textarea"}function gf(e,t,a,n){El?Cl?Cl.push(n):Cl=[n]:El=n,t=Ur(t,"onChange"),0<t.length&&(a=new Zs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var qi=null,Ui=null;function Eg(e){ep(e,0)}function $s(e){var t=Oi(e);if(Wd(t))return e}function xf(e,t){if(e==="change")return t}var bf=!1;if(Ca){var ku;if(Ca){var Yu="oninput"in document;if(!Yu){var jf=document.createElement("div");jf.setAttribute("oninput","return;"),Yu=typeof jf.oninput=="function"}ku=Yu}else ku=!1;bf=ku&&(!document.documentMode||9<document.documentMode)}function Sf(){qi&&(qi.detachEvent("onpropertychange",Nf),Ui=qi=null)}function Nf(e){if(e.propertyName==="value"&&$s(Ui)){var t=[];gf(t,Ui,e,wu(e)),sf(Eg,t)}}function Cg(e,t,a){e==="focusin"?(Sf(),qi=t,Ui=a,qi.attachEvent("onpropertychange",Nf)):e==="focusout"&&Sf()}function Tg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $s(Ui)}function Rg(e,t){if(e==="click")return $s(t)}function Ag(e,t){if(e==="input"||e==="change")return $s(t)}function Og(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Og;function Li(e,t){if(Ut(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var r=a[n];if(!bu.call(t,r)||!Ut(e[r],t[r]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cf(e,t){var a=Ef(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ef(a)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Gs(e.document)}return t}function Ku(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var zg=Ca&&"documentMode"in document&&11>=document.documentMode,Rl=null,Xu=null,Bi=null,Zu=!1;function Af(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zu||Rl==null||Rl!==Gs(n)||(n=Rl,"selectionStart"in n&&Ku(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Bi&&Li(Bi,n)||(Bi=n,n=Ur(Xu,"onSelect"),0<n.length&&(t=new Zs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Rl)))}function Yn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Al={animationend:Yn("Animation","AnimationEnd"),animationiteration:Yn("Animation","AnimationIteration"),animationstart:Yn("Animation","AnimationStart"),transitionrun:Yn("Transition","TransitionRun"),transitionstart:Yn("Transition","TransitionStart"),transitioncancel:Yn("Transition","TransitionCancel"),transitionend:Yn("Transition","TransitionEnd")},Vu={},Of={};Ca&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function Kn(e){if(Vu[e])return Vu[e];if(!Al[e])return e;var t=Al[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Of)return Vu[e]=t[a];return e}var zf=Kn("animationend"),Mf=Kn("animationiteration"),Df=Kn("animationstart"),Mg=Kn("transitionrun"),Dg=Kn("transitionstart"),wg=Kn("transitioncancel"),wf=Kn("transitionend"),_f=new Map,$u="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(" ");$u.push("scrollEnd");function ua(e,t){_f.set(e,t),Gn(t,[e])}var Js=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ft=[],Ol=0,Ju=0;function Fs(){for(var e=Ol,t=Ju=Ol=0;t<e;){var a=Ft[t];Ft[t++]=null;var n=Ft[t];Ft[t++]=null;var r=Ft[t];Ft[t++]=null;var o=Ft[t];if(Ft[t++]=null,n!==null&&r!==null){var h=n.pending;h===null?r.next=r:(r.next=h.next,h.next=r),n.pending=r}o!==0&&qf(a,r,o)}}function Is(e,t,a,n){Ft[Ol++]=e,Ft[Ol++]=t,Ft[Ol++]=a,Ft[Ol++]=n,Ju|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Fu(e,t,a,n){return Is(e,t,a,n),Ws(e)}function Xn(e,t){return Is(e,null,null,t),Ws(e)}function qf(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-qt(a),e=o.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=a|536870912),o):null}function Ws(e){if(50<ss)throw ss=0,io=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function _g(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,a,n){return new _g(e,t,a,n)}function Iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ta(e,t){var a=e.alternate;return a===null?(a=Lt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Uf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ps(e,t,a,n,r,o){var h=0;if(n=e,typeof e=="function")Iu(e)&&(h=1);else if(typeof e=="string")h=Hx(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case O:return e=Lt(31,a,t,r),e.elementType=O,e.lanes=o,e;case q:return Zn(a.children,r,o,t);case H:h=8,r|=24;break;case U:return e=Lt(12,a,t,r|2),e.elementType=U,e.lanes=o,e;case P:return e=Lt(13,a,t,r),e.elementType=P,e.lanes=o,e;case J:return e=Lt(19,a,t,r),e.elementType=J,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:h=10;break e;case X:h=9;break e;case V:h=11;break e;case Z:h=14;break e;case I:h=16,n=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),n=null}return t=Lt(h,a,t,r),t.elementType=e,t.type=n,t.lanes=o,t}function Zn(e,t,a,n){return e=Lt(7,e,n,t),e.lanes=a,e}function Wu(e,t,a){return e=Lt(6,e,null,t),e.lanes=a,e}function Lf(e){var t=Lt(18,null,null,0);return t.stateNode=e,t}function Pu(e,t,a){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bf=new WeakMap;function It(e,t){if(typeof e=="object"&&e!==null){var a=Bf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Ud(t)},Bf.set(e,t),t)}return{value:e,source:t,stack:Ud(t)}}var Ml=[],Dl=0,er=null,Hi=0,Wt=[],Pt=0,an=null,ya=1,va="";function Ra(e,t){Ml[Dl++]=Hi,Ml[Dl++]=er,er=e,Hi=t}function Hf(e,t,a){Wt[Pt++]=ya,Wt[Pt++]=va,Wt[Pt++]=an,an=e;var n=ya;e=va;var r=32-qt(n)-1;n&=~(1<<r),a+=1;var o=32-qt(t)+r;if(30<o){var h=r-r%5;o=(n&(1<<h)-1).toString(32),n>>=h,r-=h,ya=1<<32-qt(t)+r|a<<r|n,va=o+e}else ya=1<<o|a<<r|n,va=e}function ec(e){e.return!==null&&(Ra(e,1),Hf(e,1,0))}function tc(e){for(;e===er;)er=Ml[--Dl],Ml[Dl]=null,Hi=Ml[--Dl],Ml[Dl]=null;for(;e===an;)an=Wt[--Pt],Wt[Pt]=null,va=Wt[--Pt],Wt[Pt]=null,ya=Wt[--Pt],Wt[Pt]=null}function Qf(e,t){Wt[Pt++]=ya,Wt[Pt++]=va,Wt[Pt++]=an,ya=t.id,va=t.overflow,an=e}var ct=null,ke=null,Oe=!1,nn=null,ea=!1,ac=Error(u(519));function ln(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(It(t,e)),ac}function Gf(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[ut]=e,t[St]=n,a){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(a=0;a<us.length;a++)Te(us[a],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Pd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),tf(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||lp(t.textContent,a)?(n.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),n.onScroll!=null&&Te("scroll",t),n.onScrollEnd!=null&&Te("scrollend",t),n.onClick!=null&&(t.onclick=Ea),t=!0):t=!1,t||ln(e,!0)}function kf(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 31:case 13:ea=!1;return;case 27:case 3:ea=!0;return;default:ct=ct.return}}function wl(e){if(e!==ct)return!1;if(!Oe)return kf(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||jo(e.type,e.memoizedProps)),a=!a),a&&ke&&ln(e),kf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ke=hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ke=hp(e)}else t===27?(t=ke,xn(e.type)?(e=To,To=null,ke=e):ke=t):ke=ct?aa(e.stateNode.nextSibling):null;return!0}function Vn(){ke=ct=null,Oe=!1}function nc(){var e=nn;return e!==null&&(Rt===null?Rt=e:Rt.push.apply(Rt,e),nn=null),e}function Qi(e){nn===null?nn=[e]:nn.push(e)}var lc=C(null),$n=null,Aa=null;function sn(e,t,a){F(lc,t._currentValue),t._currentValue=a}function Oa(e){e._currentValue=lc.current,z(lc)}function ic(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function sc(e,t,a,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var v=o;o=r;for(var S=0;S<t.length;S++)if(v.context===t[S]){o.lanes|=a,v=o.alternate,v!==null&&(v.lanes|=a),ic(o.return,a,e),n||(h=null);break e}o=v.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),ic(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function _l(e,t,a,n){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var v=r.type;Ut(r.pendingProps.value,h.value)||(e!==null?e.push(v):e=[v])}}else if(r===W.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(hs):e=[hs])}r=r.return}e!==null&&sc(t,e,a,n),t.flags|=262144}function tr(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Jn(e){$n=e,Aa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ot(e){return Yf($n,e)}function ar(e,t){return $n===null&&Jn(e),Yf(e,t)}function Yf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Aa===null){if(e===null)throw Error(u(308));Aa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Aa=Aa.next=t;return a}var qg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ug=l.unstable_scheduleCallback,Lg=l.unstable_NormalPriority,Pe={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new qg,data:new Map,refCount:0}}function Gi(e){e.refCount--,e.refCount===0&&Ug(Lg,function(){e.controller.abort()})}var ki=null,uc=0,ql=0,Ul=null;function Bg(e,t){if(ki===null){var a=ki=[];uc=0,ql=fo(),Ul={status:"pending",value:void 0,then:function(n){a.push(n)}}}return uc++,t.then(Kf,Kf),t}function Kf(){if(--uc===0&&ki!==null){Ul!==null&&(Ul.status="fulfilled");var e=ki;ki=null,ql=0,Ul=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Hg(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),n}var Xf=Q.S;Q.S=function(e,t){Am=wt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bg(e,t),Xf!==null&&Xf(e,t)};var Fn=C(null);function cc(){var e=Fn.current;return e!==null?e:Ge.pooledCache}function nr(e,t){t===null?F(Fn,Fn.current):F(Fn,t.pool)}function Zf(){var e=cc();return e===null?null:{parent:Pe._currentValue,pool:e}}var Ll=Error(u(460)),oc=Error(u(474)),lr=Error(u(542)),ir={then:function(){}};function Vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $f(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ea,Ea),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e;default:if(typeof t.status=="string")t.then(Ea,Ea);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e}throw Wn=t,Ll}}function In(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wn=a,Ll):a}}var Wn=null;function Jf(){if(Wn===null)throw Error(u(459));var e=Wn;return Wn=null,e}function Ff(e){if(e===Ll||e===lr)throw Error(u(483))}var Bl=null,Yi=0;function sr(e){var t=Yi;return Yi+=1,Bl===null&&(Bl=[]),$f(Bl,e,t)}function Ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rr(e,t){throw t.$$typeof===T?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function If(e){function t(A,E){if(e){var M=A.deletions;M===null?(A.deletions=[E],A.flags|=16):M.push(E)}}function a(A,E){if(!e)return null;for(;E!==null;)t(A,E),E=E.sibling;return null}function n(A){for(var E=new Map;A!==null;)A.key!==null?E.set(A.key,A):E.set(A.index,A),A=A.sibling;return E}function r(A,E){return A=Ta(A,E),A.index=0,A.sibling=null,A}function o(A,E,M){return A.index=M,e?(M=A.alternate,M!==null?(M=M.index,M<E?(A.flags|=67108866,E):M):(A.flags|=67108866,E)):(A.flags|=1048576,E)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function v(A,E,M,Y){return E===null||E.tag!==6?(E=Wu(M,A.mode,Y),E.return=A,E):(E=r(E,M),E.return=A,E)}function S(A,E,M,Y){var oe=M.type;return oe===q?k(A,E,M.props.children,Y,M.key):E!==null&&(E.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===I&&In(oe)===E.type)?(E=r(E,M.props),Ki(E,M),E.return=A,E):(E=Ps(M.type,M.key,M.props,null,A.mode,Y),Ki(E,M),E.return=A,E)}function D(A,E,M,Y){return E===null||E.tag!==4||E.stateNode.containerInfo!==M.containerInfo||E.stateNode.implementation!==M.implementation?(E=Pu(M,A.mode,Y),E.return=A,E):(E=r(E,M.children||[]),E.return=A,E)}function k(A,E,M,Y,oe){return E===null||E.tag!==7?(E=Zn(M,A.mode,Y,oe),E.return=A,E):(E=r(E,M),E.return=A,E)}function K(A,E,M){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Wu(""+E,A.mode,M),E.return=A,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case R:return M=Ps(E.type,E.key,E.props,null,A.mode,M),Ki(M,E),M.return=A,M;case w:return E=Pu(E,A.mode,M),E.return=A,E;case I:return E=In(E),K(A,E,M)}if(pe(E)||de(E))return E=Zn(E,A.mode,M,null),E.return=A,E;if(typeof E.then=="function")return K(A,sr(E),M);if(E.$$typeof===G)return K(A,ar(A,E),M);rr(A,E)}return null}function _(A,E,M,Y){var oe=E!==null?E.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return oe!==null?null:v(A,E,""+M,Y);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case R:return M.key===oe?S(A,E,M,Y):null;case w:return M.key===oe?D(A,E,M,Y):null;case I:return M=In(M),_(A,E,M,Y)}if(pe(M)||de(M))return oe!==null?null:k(A,E,M,Y,null);if(typeof M.then=="function")return _(A,E,sr(M),Y);if(M.$$typeof===G)return _(A,E,ar(A,M),Y);rr(A,M)}return null}function L(A,E,M,Y,oe){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return A=A.get(M)||null,v(E,A,""+Y,oe);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case R:return A=A.get(Y.key===null?M:Y.key)||null,S(E,A,Y,oe);case w:return A=A.get(Y.key===null?M:Y.key)||null,D(E,A,Y,oe);case I:return Y=In(Y),L(A,E,M,Y,oe)}if(pe(Y)||de(Y))return A=A.get(M)||null,k(E,A,Y,oe,null);if(typeof Y.then=="function")return L(A,E,M,sr(Y),oe);if(Y.$$typeof===G)return L(A,E,M,ar(E,Y),oe);rr(E,Y)}return null}function ae(A,E,M,Y){for(var oe=null,Me=null,ie=E,be=E=0,Ae=null;ie!==null&&be<M.length;be++){ie.index>be?(Ae=ie,ie=null):Ae=ie.sibling;var De=_(A,ie,M[be],Y);if(De===null){ie===null&&(ie=Ae);break}e&&ie&&De.alternate===null&&t(A,ie),E=o(De,E,be),Me===null?oe=De:Me.sibling=De,Me=De,ie=Ae}if(be===M.length)return a(A,ie),Oe&&Ra(A,be),oe;if(ie===null){for(;be<M.length;be++)ie=K(A,M[be],Y),ie!==null&&(E=o(ie,E,be),Me===null?oe=ie:Me.sibling=ie,Me=ie);return Oe&&Ra(A,be),oe}for(ie=n(ie);be<M.length;be++)Ae=L(ie,A,be,M[be],Y),Ae!==null&&(e&&Ae.alternate!==null&&ie.delete(Ae.key===null?be:Ae.key),E=o(Ae,E,be),Me===null?oe=Ae:Me.sibling=Ae,Me=Ae);return e&&ie.forEach(function(En){return t(A,En)}),Oe&&Ra(A,be),oe}function fe(A,E,M,Y){if(M==null)throw Error(u(151));for(var oe=null,Me=null,ie=E,be=E=0,Ae=null,De=M.next();ie!==null&&!De.done;be++,De=M.next()){ie.index>be?(Ae=ie,ie=null):Ae=ie.sibling;var En=_(A,ie,De.value,Y);if(En===null){ie===null&&(ie=Ae);break}e&&ie&&En.alternate===null&&t(A,ie),E=o(En,E,be),Me===null?oe=En:Me.sibling=En,Me=En,ie=Ae}if(De.done)return a(A,ie),Oe&&Ra(A,be),oe;if(ie===null){for(;!De.done;be++,De=M.next())De=K(A,De.value,Y),De!==null&&(E=o(De,E,be),Me===null?oe=De:Me.sibling=De,Me=De);return Oe&&Ra(A,be),oe}for(ie=n(ie);!De.done;be++,De=M.next())De=L(ie,A,be,De.value,Y),De!==null&&(e&&De.alternate!==null&&ie.delete(De.key===null?be:De.key),E=o(De,E,be),Me===null?oe=De:Me.sibling=De,Me=De);return e&&ie.forEach(function(Fx){return t(A,Fx)}),Oe&&Ra(A,be),oe}function Qe(A,E,M,Y){if(typeof M=="object"&&M!==null&&M.type===q&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case R:e:{for(var oe=M.key;E!==null;){if(E.key===oe){if(oe=M.type,oe===q){if(E.tag===7){a(A,E.sibling),Y=r(E,M.props.children),Y.return=A,A=Y;break e}}else if(E.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===I&&In(oe)===E.type){a(A,E.sibling),Y=r(E,M.props),Ki(Y,M),Y.return=A,A=Y;break e}a(A,E);break}else t(A,E);E=E.sibling}M.type===q?(Y=Zn(M.props.children,A.mode,Y,M.key),Y.return=A,A=Y):(Y=Ps(M.type,M.key,M.props,null,A.mode,Y),Ki(Y,M),Y.return=A,A=Y)}return h(A);case w:e:{for(oe=M.key;E!==null;){if(E.key===oe)if(E.tag===4&&E.stateNode.containerInfo===M.containerInfo&&E.stateNode.implementation===M.implementation){a(A,E.sibling),Y=r(E,M.children||[]),Y.return=A,A=Y;break e}else{a(A,E);break}else t(A,E);E=E.sibling}Y=Pu(M,A.mode,Y),Y.return=A,A=Y}return h(A);case I:return M=In(M),Qe(A,E,M,Y)}if(pe(M))return ae(A,E,M,Y);if(de(M)){if(oe=de(M),typeof oe!="function")throw Error(u(150));return M=oe.call(M),fe(A,E,M,Y)}if(typeof M.then=="function")return Qe(A,E,sr(M),Y);if(M.$$typeof===G)return Qe(A,E,ar(A,M),Y);rr(A,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,E!==null&&E.tag===6?(a(A,E.sibling),Y=r(E,M),Y.return=A,A=Y):(a(A,E),Y=Wu(M,A.mode,Y),Y.return=A,A=Y),h(A)):a(A,E)}return function(A,E,M,Y){try{Yi=0;var oe=Qe(A,E,M,Y);return Bl=null,oe}catch(ie){if(ie===Ll||ie===lr)throw ie;var Me=Lt(29,ie,null,A.mode);return Me.lanes=Y,Me.return=A,Me}finally{}}}var Pn=If(!0),Wf=If(!1),rn=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function un(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function cn(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(we&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=Ws(e),qf(e,null,a),t}return Is(e,n,t,a),Ws(e)}function Xi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,kd(e,a)}}function hc(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var mc=!1;function Zi(){if(mc){var e=Ul;if(e!==null)throw e}}function Vi(e,t,a,n){mc=!1;var r=e.updateQueue;rn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var S=v,D=S.next;S.next=null,h===null?o=D:h.next=D,h=S;var k=e.alternate;k!==null&&(k=k.updateQueue,v=k.lastBaseUpdate,v!==h&&(v===null?k.firstBaseUpdate=D:v.next=D,k.lastBaseUpdate=S))}if(o!==null){var K=r.baseState;h=0,k=D=S=null,v=o;do{var _=v.lane&-536870913,L=_!==v.lane;if(L?(Re&_)===_:(n&_)===_){_!==0&&_===ql&&(mc=!0),k!==null&&(k=k.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ae=e,fe=v;_=t;var Qe=a;switch(fe.tag){case 1:if(ae=fe.payload,typeof ae=="function"){K=ae.call(Qe,K,_);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=fe.payload,_=typeof ae=="function"?ae.call(Qe,K,_):ae,_==null)break e;K=x({},K,_);break e;case 2:rn=!0}}_=v.callback,_!==null&&(e.flags|=64,L&&(e.flags|=8192),L=r.callbacks,L===null?r.callbacks=[_]:L.push(_))}else L={lane:_,tag:v.tag,payload:v.payload,callback:v.callback,next:null},k===null?(D=k=L,S=K):k=k.next=L,h|=_;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;L=v,v=L.next,L.next=null,r.lastBaseUpdate=L,r.shared.pending=null}}while(!0);k===null&&(S=K),r.baseState=S,r.firstBaseUpdate=D,r.lastBaseUpdate=k,o===null&&(r.shared.lanes=0),mn|=h,e.lanes=h,e.memoizedState=K}}function Pf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function eh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Pf(a[e],t)}var Hl=C(null),ur=C(0);function th(e,t){e=Ba,F(ur,e),F(Hl,t),Ba=e|t.baseLanes}function pc(){F(ur,Ba),F(Hl,Hl.current)}function yc(){Ba=ur.current,z(Hl),z(ur)}var Bt=C(null),ta=null;function on(e){var t=e.alternate;F(Ie,Ie.current&1),F(Bt,e),ta===null&&(t===null||Hl.current!==null||t.memoizedState!==null)&&(ta=e)}function vc(e){F(Ie,Ie.current),F(Bt,e),ta===null&&(ta=e)}function ah(e){e.tag===22?(F(Ie,Ie.current),F(Bt,e),ta===null&&(ta=e)):dn()}function dn(){F(Ie,Ie.current),F(Bt,Bt.current)}function Ht(e){z(Bt),ta===e&&(ta=null),z(Ie)}var Ie=C(0);function cr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Eo(a)||Co(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var za=0,xe=null,Be=null,et=null,or=!1,Ql=!1,el=!1,dr=0,$i=0,Gl=null,Qg=0;function $e(){throw Error(u(321))}function gc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ut(e[a],t[a]))return!1;return!0}function xc(e,t,a,n,r,o){return za=o,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Q.H=e===null||e.memoizedState===null?Hh:_c,el=!1,o=a(n,r),el=!1,Ql&&(o=lh(t,a,n,r)),nh(e),o}function nh(e){Q.H=Ii;var t=Be!==null&&Be.next!==null;if(za=0,et=Be=xe=null,or=!1,$i=0,Gl=null,t)throw Error(u(300));e===null||tt||(e=e.dependencies,e!==null&&tr(e)&&(tt=!0))}function lh(e,t,a,n){xe=e;var r=0;do{if(Ql&&(Gl=null),$i=0,Ql=!1,25<=r)throw Error(u(301));if(r+=1,et=Be=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}Q.H=Qh,o=t(a,n)}while(Ql);return o}function Gg(){var e=Q.H,t=e.useState()[0];return t=typeof t.then=="function"?Ji(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(xe.flags|=1024),t}function bc(){var e=dr!==0;return dr=0,e}function jc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Sc(e){if(or){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}or=!1}za=0,et=Be=xe=null,Ql=!1,$i=dr=0,Gl=null}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?xe.memoizedState=et=e:et=et.next=e,et}function We(){if(Be===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=et===null?xe.memoizedState:et.next;if(t!==null)et=t,Be=e;else{if(e===null)throw xe.alternate===null?Error(u(467)):Error(u(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},et===null?xe.memoizedState=et=e:et=et.next=e}return et}function fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ji(e){var t=$i;return $i+=1,Gl===null&&(Gl=[]),e=$f(Gl,e,t),t=xe,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,Q.H=t===null||t.memoizedState===null?Hh:_c),e}function hr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ji(e);if(e.$$typeof===G)return ot(e)}throw Error(u(438,String(e)))}function Nc(e){var t=null,a=xe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=xe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=fr(),xe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=le;return t.index++,a}function Ma(e,t){return typeof t=="function"?t(e):t}function mr(e){var t=We();return Ec(t,Be,e)}function Ec(e,t,a){var n=e.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=a;var r=e.baseQueue,o=n.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,n.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var v=h=null,S=null,D=t,k=!1;do{var K=D.lane&-536870913;if(K!==D.lane?(Re&K)===K:(za&K)===K){var _=D.revertLane;if(_===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),K===ql&&(k=!0);else if((za&_)===_){D=D.next,_===ql&&(k=!0);continue}else K={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(v=S=K,h=o):S=S.next=K,xe.lanes|=_,mn|=_;K=D.action,el&&a(o,K),o=D.hasEagerState?D.eagerState:a(o,K)}else _={lane:K,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},S===null?(v=S=_,h=o):S=S.next=_,xe.lanes|=K,mn|=K;D=D.next}while(D!==null&&D!==t);if(S===null?h=o:S.next=v,!Ut(o,e.memoizedState)&&(tt=!0,k&&(a=Ul,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=S,n.lastRenderedState=o}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Cc(e){var t=We(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var n=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);Ut(o,t.memoizedState)||(tt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function ih(e,t,a){var n=xe,r=We(),o=Oe;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!Ut((Be||r).memoizedState,a);if(h&&(r.memoizedState=a,tt=!0),r=r.queue,Ac(uh.bind(null,n,r,e),[e]),r.getSnapshot!==t||h||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,kl(9,{destroy:void 0},rh.bind(null,n,r,a,t),null),Ge===null)throw Error(u(349));o||(za&127)!==0||sh(n,t,a)}return a}function sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=xe.updateQueue,t===null?(t=fr(),xe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function rh(e,t,a,n){t.value=a,t.getSnapshot=n,ch(t)&&oh(e)}function uh(e,t,a){return a(function(){ch(t)&&oh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ut(e,a)}catch{return!0}}function oh(e){var t=Xn(e,2);t!==null&&At(t,e,2)}function Tc(e){var t=vt();if(typeof e=="function"){var a=e;if(e=a(),el){Pa(!0);try{a()}finally{Pa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t}function dh(e,t,a,n){return e.baseState=a,Ec(e,Be,typeof n=="function"?n:Ma)}function kg(e,t,a,n,r){if(vr(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};Q.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,fh(t,o)):(o.next=a.next,t.pending=a.next=o)}}function fh(e,t){var a=t.action,n=t.payload,r=e.state;if(t.isTransition){var o=Q.T,h={};Q.T=h;try{var v=a(r,n),S=Q.S;S!==null&&S(h,v),hh(e,t,v)}catch(D){Rc(e,t,D)}finally{o!==null&&h.types!==null&&(o.types=h.types),Q.T=o}}else try{o=a(r,n),hh(e,t,o)}catch(D){Rc(e,t,D)}}function hh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){mh(e,t,n)},function(n){return Rc(e,t,n)}):mh(e,t,a)}function mh(e,t,a){t.status="fulfilled",t.value=a,ph(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,fh(e,a)))}function Rc(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,ph(t),t=t.next;while(t!==n)}e.action=null}function ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function yh(e,t){return t}function vh(e,t){if(Oe){var a=Ge.formState;if(a!==null){e:{var n=xe;if(Oe){if(ke){t:{for(var r=ke,o=ea;r.nodeType!==8;){if(!o){r=null;break t}if(r=aa(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){ke=aa(r.nextSibling),n=r.data==="F!";break e}}ln(n)}n=!1}n&&(t=a[0])}}return a=vt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yh,lastRenderedState:t},a.queue=n,a=Uh.bind(null,xe,n),n.dispatch=a,n=Tc(!1),o=wc.bind(null,xe,!1,n.queue),n=vt(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,a=kg.bind(null,xe,r,o,a),r.dispatch=a,n.memoizedState=e,[t,a,!1]}function gh(e){var t=We();return xh(t,Be,e)}function xh(e,t,a){if(t=Ec(e,t,yh)[0],e=mr(Ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ji(t)}catch(h){throw h===Ll?lr:h}else n=t;t=We();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(xe.flags|=2048,kl(9,{destroy:void 0},Yg.bind(null,r,a),null)),[n,o,e]}function Yg(e,t){e.action=t}function bh(e){var t=We(),a=Be;if(a!==null)return xh(t,a,e);We(),t=t.memoizedState,a=We();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function kl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=xe.updateQueue,t===null&&(t=fr(),xe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function jh(){return We().memoizedState}function pr(e,t,a,n){var r=vt();xe.flags|=e,r.memoizedState=kl(1|t,{destroy:void 0},a,n===void 0?null:n)}function yr(e,t,a,n){var r=We();n=n===void 0?null:n;var o=r.memoizedState.inst;Be!==null&&n!==null&&gc(n,Be.memoizedState.deps)?r.memoizedState=kl(t,o,a,n):(xe.flags|=e,r.memoizedState=kl(1|t,o,a,n))}function Sh(e,t){pr(8390656,8,e,t)}function Ac(e,t){yr(2048,8,e,t)}function Kg(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=fr(),xe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Nh(e){var t=We().memoizedState;return Kg({ref:t,nextImpl:e}),function(){if((we&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return yr(4,2,e,t)}function Ch(e,t){return yr(4,4,e,t)}function Th(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rh(e,t,a){a=a!=null?a.concat([e]):null,yr(4,4,Th.bind(null,t,e),a)}function Oc(){}function Ah(e,t){var a=We();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&gc(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Oh(e,t){var a=We();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&gc(t,n[1]))return n[0];if(n=e(),el){Pa(!0);try{e()}finally{Pa(!1)}}return a.memoizedState=[n,t],n}function zc(e,t,a){return a===void 0||(za&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=zm(),xe.lanes|=e,mn|=e,a)}function zh(e,t,a,n){return Ut(a,t)?a:Hl.current!==null?(e=zc(e,a,n),Ut(e,t)||(tt=!0),e):(za&42)===0||(za&1073741824)!==0&&(Re&261930)===0?(tt=!0,e.memoizedState=a):(e=zm(),xe.lanes|=e,mn|=e,t)}function Mh(e,t,a,n,r){var o=$.p;$.p=o!==0&&8>o?o:8;var h=Q.T,v={};Q.T=v,wc(e,!1,t,a);try{var S=r(),D=Q.S;if(D!==null&&D(v,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var k=Hg(S,n);Fi(e,t,k,kt(e))}else Fi(e,t,n,kt(e))}catch(K){Fi(e,t,{then:function(){},status:"rejected",reason:K},kt())}finally{$.p=o,h!==null&&v.types!==null&&(h.types=v.types),Q.T=h}}function Xg(){}function Mc(e,t,a,n){if(e.tag!==5)throw Error(u(476));var r=Dh(e).queue;Mh(e,r,t,B,a===null?Xg:function(){return wh(e),a(n)})}function Dh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:B},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wh(e){var t=Dh(e);t.next===null&&(t=e.alternate.memoizedState),Fi(e,t.next.queue,{},kt())}function Dc(){return ot(hs)}function _h(){return We().memoizedState}function qh(){return We().memoizedState}function Zg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=kt();e=un(a);var n=cn(t,e,a);n!==null&&(At(n,t,a),Xi(n,t,a)),t={cache:rc()},e.payload=t;return}t=t.return}}function Vg(e,t,a){var n=kt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},vr(e)?Lh(t,a):(a=Fu(e,t,a,n),a!==null&&(At(a,e,n),Bh(a,t,n)))}function Uh(e,t,a){var n=kt();Fi(e,t,a,n)}function Fi(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(vr(e))Lh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,v=o(h,a);if(r.hasEagerState=!0,r.eagerState=v,Ut(v,h))return Is(e,t,r,0),Ge===null&&Fs(),!1}catch{}finally{}if(a=Fu(e,t,r,n),a!==null)return At(a,e,n),Bh(a,t,n),!0}return!1}function wc(e,t,a,n){if(n={lane:2,revertLane:fo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vr(e)){if(t)throw Error(u(479))}else t=Fu(e,a,n,2),t!==null&&At(t,e,2)}function vr(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Lh(e,t){Ql=or=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Bh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,kd(e,a)}}var Ii={readContext:ot,use:hr,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};Ii.useEffectEvent=$e;var Hh={readContext:ot,use:hr,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Sh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,pr(4194308,4,Th.bind(null,t,e),a)},useLayoutEffect:function(e,t){return pr(4194308,4,e,t)},useInsertionEffect:function(e,t){pr(4,2,e,t)},useMemo:function(e,t){var a=vt();t=t===void 0?null:t;var n=e();if(el){Pa(!0);try{e()}finally{Pa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=vt();if(a!==void 0){var r=a(t);if(el){Pa(!0);try{a(t)}finally{Pa(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=Vg.bind(null,xe,e),[n.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,a=Uh.bind(null,xe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Oc,useDeferredValue:function(e,t){var a=vt();return zc(a,e,t)},useTransition:function(){var e=Tc(!1);return e=Mh.bind(null,xe,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=xe,r=vt();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ge===null)throw Error(u(349));(Re&127)!==0||sh(n,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Sh(uh.bind(null,n,o,e),[e]),n.flags|=2048,kl(9,{destroy:void 0},rh.bind(null,n,o,a,t),null),a},useId:function(){var e=vt(),t=Ge.identifierPrefix;if(Oe){var a=va,n=ya;a=(n&~(1<<32-qt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=dr++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Qg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Dc,useFormState:vh,useActionState:vh,useOptimistic:function(e){var t=vt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wc.bind(null,xe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Nc,useCacheRefresh:function(){return vt().memoizedState=Zg.bind(null,xe)},useEffectEvent:function(e){var t=vt(),a={impl:e};return t.memoizedState=a,function(){if((we&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},_c={readContext:ot,use:hr,useCallback:Ah,useContext:ot,useEffect:Ac,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Ch,useMemo:Oh,useReducer:mr,useRef:jh,useState:function(){return mr(Ma)},useDebugValue:Oc,useDeferredValue:function(e,t){var a=We();return zh(a,Be.memoizedState,e,t)},useTransition:function(){var e=mr(Ma)[0],t=We().memoizedState;return[typeof e=="boolean"?e:Ji(e),t]},useSyncExternalStore:ih,useId:_h,useHostTransitionStatus:Dc,useFormState:gh,useActionState:gh,useOptimistic:function(e,t){var a=We();return dh(a,Be,e,t)},useMemoCache:Nc,useCacheRefresh:qh};_c.useEffectEvent=Nh;var Qh={readContext:ot,use:hr,useCallback:Ah,useContext:ot,useEffect:Ac,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Ch,useMemo:Oh,useReducer:Cc,useRef:jh,useState:function(){return Cc(Ma)},useDebugValue:Oc,useDeferredValue:function(e,t){var a=We();return Be===null?zc(a,e,t):zh(a,Be.memoizedState,e,t)},useTransition:function(){var e=Cc(Ma)[0],t=We().memoizedState;return[typeof e=="boolean"?e:Ji(e),t]},useSyncExternalStore:ih,useId:_h,useHostTransitionStatus:Dc,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var a=We();return Be!==null?dh(a,Be,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Nc,useCacheRefresh:qh};Qh.useEffectEvent=Nh;function qc(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Uc={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=kt(),r=un(n);r.payload=t,a!=null&&(r.callback=a),t=cn(e,r,n),t!==null&&(At(t,e,n),Xi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=kt(),r=un(n);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=cn(e,r,n),t!==null&&(At(t,e,n),Xi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=kt(),n=un(a);n.tag=2,t!=null&&(n.callback=t),t=cn(e,n,a),t!==null&&(At(t,e,a),Xi(t,e,a))}};function Gh(e,t,a,n,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,h):t.prototype&&t.prototype.isPureReactComponent?!Li(a,n)||!Li(r,o):!0}function kh(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Uc.enqueueReplaceState(t,t.state,null)}function tl(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Yh(e){Js(e)}function Kh(e){console.error(e)}function Xh(e){Js(e)}function gr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Zh(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Lc(e,t,a){return a=un(a),a.tag=3,a.payload={element:null},a.callback=function(){gr(e,t)},a}function Vh(e){return e=un(e),e.tag=3,e}function $h(e,t,a,n){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=n.value;e.payload=function(){return r(o)},e.callback=function(){Zh(t,a,n)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Zh(t,a,n),typeof r!="function"&&(pn===null?pn=new Set([this]):pn.add(this));var v=n.stack;this.componentDidCatch(n.value,{componentStack:v!==null?v:""})})}function $g(e,t,a,n,r){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&_l(t,a,r,!0),a=Bt.current,a!==null){switch(a.tag){case 31:case 13:return ta===null?zr():a.alternate===null&&Je===0&&(Je=3),a.flags&=-257,a.flags|=65536,a.lanes=r,n===ir?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),uo(e,n,r)),!1;case 22:return a.flags|=65536,n===ir?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),uo(e,n,r)),!1}throw Error(u(435,a.tag))}return uo(e,n,r),zr(),!1}if(Oe)return t=Bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==ac&&(e=Error(u(422),{cause:n}),Qi(It(e,a)))):(n!==ac&&(t=Error(u(423),{cause:n}),Qi(It(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=It(n,a),r=Lc(e.stateNode,n,r),hc(e,r),Je!==4&&(Je=2)),!1;var o=Error(u(520),{cause:n});if(o=It(o,a),is===null?is=[o]:is.push(o),Je!==4&&(Je=2),t===null)return!0;n=It(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Lc(a.stateNode,n,e),hc(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(pn===null||!pn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Vh(r),$h(r,e,a,n),hc(a,r),!1}a=a.return}while(a!==null);return!1}var Bc=Error(u(461)),tt=!1;function dt(e,t,a,n){t.child=e===null?Wf(t,null,a,n):Pn(t,e.child,a,n)}function Jh(e,t,a,n,r){a=a.render;var o=t.ref;if("ref"in n){var h={};for(var v in n)v!=="ref"&&(h[v]=n[v])}else h=n;return Jn(t),n=xc(e,t,a,h,o,r),v=bc(),e!==null&&!tt?(jc(e,t,r),Da(e,t,r)):(Oe&&v&&ec(t),t.flags|=1,dt(e,t,n,r),t.child)}function Fh(e,t,a,n,r){if(e===null){var o=a.type;return typeof o=="function"&&!Iu(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,Ih(e,t,o,n,r)):(e=Ps(a.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Zc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Li,a(h,n)&&e.ref===t.ref)return Da(e,t,r)}return t.flags|=1,e=Ta(o,n),e.ref=t.ref,e.return=t,t.child=e}function Ih(e,t,a,n,r){if(e!==null){var o=e.memoizedProps;if(Li(o,n)&&e.ref===t.ref)if(tt=!1,t.pendingProps=n=o,Zc(e,r))(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,Da(e,t,r)}return Hc(e,t,a,n,r)}function Wh(e,t,a,n){var r=n.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~o}else n=0,t.child=null;return Ph(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&nr(t,o!==null?o.cachePool:null),o!==null?th(t,o):pc(),ah(t);else return n=t.lanes=536870912,Ph(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(nr(t,o.cachePool),th(t,o),dn(),t.memoizedState=null):(e!==null&&nr(t,null),pc(),dn());return dt(e,t,r,a),t.child}function Wi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ph(e,t,a,n,r){var o=cc();return o=o===null?null:{parent:Pe._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&nr(t,null),pc(),ah(t),e!==null&&_l(e,t,n,!0),t.childLanes=r,null}function xr(e,t){return t=jr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function em(e,t,a){return Pn(t,e.child,null,a),e=xr(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function Jg(e,t,a){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Oe){if(n.mode==="hidden")return e=xr(t,n),t.lanes=536870912,Wi(null,e);if(vc(t),(e=ke)?(e=fp(e,ea),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:an!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,ct=t,ke=null)):e=null,e===null)throw ln(t);return t.lanes=536870912,null}return xr(t,n)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(vc(t),r)if(t.flags&256)t.flags&=-257,t=em(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(tt||_l(e,t,a,!1),r=(a&e.childLanes)!==0,tt||r){if(n=Ge,n!==null&&(h=Yd(n,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,Xn(e,h),At(n,e,h),Bc;zr(),t=em(e,t,a)}else e=o.treeContext,ke=aa(h.nextSibling),ct=t,Oe=!0,nn=null,ea=!1,e!==null&&Qf(t,e),t=xr(t,n),t.flags|=4096;return t}return e=Ta(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function br(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Hc(e,t,a,n,r){return Jn(t),a=xc(e,t,a,n,void 0,r),n=bc(),e!==null&&!tt?(jc(e,t,r),Da(e,t,r)):(Oe&&n&&ec(t),t.flags|=1,dt(e,t,a,r),t.child)}function tm(e,t,a,n,r,o){return Jn(t),t.updateQueue=null,a=lh(t,n,a,r),nh(e),n=bc(),e!==null&&!tt?(jc(e,t,o),Da(e,t,o)):(Oe&&n&&ec(t),t.flags|=1,dt(e,t,a,o),t.child)}function am(e,t,a,n,r){if(Jn(t),t.stateNode===null){var o=zl,h=a.contextType;typeof h=="object"&&h!==null&&(o=ot(h)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Uc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},dc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?ot(h):zl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(qc(t,a,h,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&Uc.enqueueReplaceState(o,o.state,null),Vi(t,n,o,r),Zi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var v=t.memoizedProps,S=tl(a,v);o.props=S;var D=o.context,k=a.contextType;h=zl,typeof k=="object"&&k!==null&&(h=ot(k));var K=a.getDerivedStateFromProps;k=typeof K=="function"||typeof o.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,k||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(v||D!==h)&&kh(t,o,n,h),rn=!1;var _=t.memoizedState;o.state=_,Vi(t,n,o,r),Zi(),D=t.memoizedState,v||_!==D||rn?(typeof K=="function"&&(qc(t,a,K,n),D=t.memoizedState),(S=rn||Gh(t,a,S,n,_,D,h))?(k||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=D),o.props=n,o.state=D,o.context=h,n=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,fc(e,t),h=t.memoizedProps,k=tl(a,h),o.props=k,K=t.pendingProps,_=o.context,D=a.contextType,S=zl,typeof D=="object"&&D!==null&&(S=ot(D)),v=a.getDerivedStateFromProps,(D=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==K||_!==S)&&kh(t,o,n,S),rn=!1,_=t.memoizedState,o.state=_,Vi(t,n,o,r),Zi();var L=t.memoizedState;h!==K||_!==L||rn||e!==null&&e.dependencies!==null&&tr(e.dependencies)?(typeof v=="function"&&(qc(t,a,v,n),L=t.memoizedState),(k=rn||Gh(t,a,k,n,_,L,S)||e!==null&&e.dependencies!==null&&tr(e.dependencies))?(D||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,L,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,L,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=L),o.props=n,o.state=L,o.context=S,n=k):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,br(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=Pn(t,e.child,null,r),t.child=Pn(t,null,a,r)):dt(e,t,a,r),t.memoizedState=o.state,e=t.child):e=Da(e,t,r),e}function nm(e,t,a,n){return Vn(),t.flags|=256,dt(e,t,a,n),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:Zf()}}function kc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Gt),e}function lm(e,t,a){var n=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(Ie.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(r?on(t):dn(),(e=ke)?(e=fp(e,ea),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:an!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Lf(e),a.return=t,t.child=a,ct=t,ke=null)):e=null,e===null)throw ln(t);return Co(e)?t.lanes=32:t.lanes=536870912,null}var v=n.children;return n=n.fallback,r?(dn(),r=t.mode,v=jr({mode:"hidden",children:v},r),n=Zn(n,r,a,null),v.return=t,n.return=t,v.sibling=n,t.child=v,n=t.child,n.memoizedState=Gc(a),n.childLanes=kc(e,h,a),t.memoizedState=Qc,Wi(null,n)):(on(t),Yc(t,v))}var S=e.memoizedState;if(S!==null&&(v=S.dehydrated,v!==null)){if(o)t.flags&256?(on(t),t.flags&=-257,t=Kc(e,t,a)):t.memoizedState!==null?(dn(),t.child=e.child,t.flags|=128,t=null):(dn(),v=n.fallback,r=t.mode,n=jr({mode:"visible",children:n.children},r),v=Zn(v,r,a,null),v.flags|=2,n.return=t,v.return=t,n.sibling=v,t.child=n,Pn(t,e.child,null,a),n=t.child,n.memoizedState=Gc(a),n.childLanes=kc(e,h,a),t.memoizedState=Qc,t=Wi(null,n));else if(on(t),Co(v)){if(h=v.nextSibling&&v.nextSibling.dataset,h)var D=h.dgst;h=D,n=Error(u(419)),n.stack="",n.digest=h,Qi({value:n,source:null,stack:null}),t=Kc(e,t,a)}else if(tt||_l(e,t,a,!1),h=(a&e.childLanes)!==0,tt||h){if(h=Ge,h!==null&&(n=Yd(h,a),n!==0&&n!==S.retryLane))throw S.retryLane=n,Xn(e,n),At(h,e,n),Bc;Eo(v)||zr(),t=Kc(e,t,a)}else Eo(v)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,ke=aa(v.nextSibling),ct=t,Oe=!0,nn=null,ea=!1,e!==null&&Qf(t,e),t=Yc(t,n.children),t.flags|=4096);return t}return r?(dn(),v=n.fallback,r=t.mode,S=e.child,D=S.sibling,n=Ta(S,{mode:"hidden",children:n.children}),n.subtreeFlags=S.subtreeFlags&65011712,D!==null?v=Ta(D,v):(v=Zn(v,r,a,null),v.flags|=2),v.return=t,n.return=t,n.sibling=v,t.child=n,Wi(null,n),n=t.child,v=e.child.memoizedState,v===null?v=Gc(a):(r=v.cachePool,r!==null?(S=Pe._currentValue,r=r.parent!==S?{parent:S,pool:S}:r):r=Zf(),v={baseLanes:v.baseLanes|a,cachePool:r}),n.memoizedState=v,n.childLanes=kc(e,h,a),t.memoizedState=Qc,Wi(e.child,n)):(on(t),a=e.child,e=a.sibling,a=Ta(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Yc(e,t){return t=jr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jr(e,t){return e=Lt(22,e,null,t),e.lanes=0,e}function Kc(e,t,a){return Pn(t,e.child,null,a),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function im(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ic(e.return,t,a)}function Xc(e,t,a,n,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function sm(e,t,a){var n=t.pendingProps,r=n.revealOrder,o=n.tail;n=n.children;var h=Ie.current,v=(h&2)!==0;if(v?(h=h&1|2,t.flags|=128):h&=1,F(Ie,h),dt(e,t,n,a),n=Oe?Hi:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&im(e,a,t);else if(e.tag===19)im(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&cr(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Xc(t,!1,r,a,o,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&cr(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Xc(t,!0,a,null,o,n);break;case"together":Xc(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Da(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),mn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(_l(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Ta(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ta(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Zc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&tr(e)))}function Fg(e,t,a){switch(t.tag){case 3:Ee(t,t.stateNode.containerInfo),sn(t,Pe,e.memoizedState.cache),Vn();break;case 27:case 5:Wa(t);break;case 4:Ee(t,t.stateNode.containerInfo);break;case 10:sn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(on(t),t.flags|=128,null):(a&t.child.childLanes)!==0?lm(e,t,a):(on(t),e=Da(e,t,a),e!==null?e.sibling:null);on(t);break;case 19:var r=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(_l(e,t,a,!1),n=(a&t.childLanes)!==0),r){if(n)return sm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),F(Ie,Ie.current),n)break;return null;case 22:return t.lanes=0,Wh(e,t,a,t.pendingProps);case 24:sn(t,Pe,e.memoizedState.cache)}return Da(e,t,a)}function rm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)tt=!0;else{if(!Zc(e,a)&&(t.flags&128)===0)return tt=!1,Fg(e,t,a);tt=(e.flags&131072)!==0}else tt=!1,Oe&&(t.flags&1048576)!==0&&Hf(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=In(t.elementType),t.type=e,typeof e=="function")Iu(e)?(n=tl(e,n),t.tag=1,t=am(null,t,e,n,a)):(t.tag=0,t=Hc(null,t,e,n,a));else{if(e!=null){var r=e.$$typeof;if(r===V){t.tag=11,t=Jh(null,t,e,n,a);break e}else if(r===Z){t.tag=14,t=Fh(null,t,e,n,a);break e}}throw t=Ne(e)||e,Error(u(306,t,""))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,r=tl(n,t.pendingProps),am(e,t,n,r,a);case 3:e:{if(Ee(t,t.stateNode.containerInfo),e===null)throw Error(u(387));n=t.pendingProps;var o=t.memoizedState;r=o.element,fc(e,t),Vi(t,n,null,a);var h=t.memoizedState;if(n=h.cache,sn(t,Pe,n),n!==o.cache&&sc(t,[Pe],a,!0),Zi(),n=h.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=nm(e,t,n,a);break e}else if(n!==r){r=It(Error(u(424)),t),Qi(r),t=nm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ke=aa(e.firstChild),ct=t,Oe=!0,nn=null,ea=!0,a=Wf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vn(),n===r){t=Da(e,t,a);break e}dt(e,t,n,a)}t=t.child}return t;case 26:return br(e,t),e===null?(a=gp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,n=Lr(ge.current).createElement(a),n[ut]=t,n[St]=e,ft(n,a,e),it(n),t.stateNode=n):t.memoizedState=gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wa(t),e===null&&Oe&&(n=t.stateNode=pp(t.type,t.pendingProps,ge.current),ct=t,ea=!0,r=ke,xn(t.type)?(To=r,ke=aa(n.firstChild)):ke=r),dt(e,t,t.pendingProps.children,a),br(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((r=n=ke)&&(n=Tx(n,t.type,t.pendingProps,ea),n!==null?(t.stateNode=n,ct=t,ke=aa(n.firstChild),ea=!1,r=!0):r=!1),r||ln(t)),Wa(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,n=o.children,jo(r,o)?n=null:h!==null&&jo(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=xc(e,t,Gg,null,null,a),hs._currentValue=r),br(e,t),dt(e,t,n,a),t.child;case 6:return e===null&&Oe&&((e=a=ke)&&(a=Rx(a,t.pendingProps,ea),a!==null?(t.stateNode=a,ct=t,ke=null,e=!0):e=!1),e||ln(t)),null;case 13:return lm(e,t,a);case 4:return Ee(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Pn(t,null,n,a):dt(e,t,n,a),t.child;case 11:return Jh(e,t,t.type,t.pendingProps,a);case 7:return dt(e,t,t.pendingProps,a),t.child;case 8:return dt(e,t,t.pendingProps.children,a),t.child;case 12:return dt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,sn(t,t.type,n.value),dt(e,t,n.children,a),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,Jn(t),r=ot(r),n=n(r),t.flags|=1,dt(e,t,n,a),t.child;case 14:return Fh(e,t,t.type,t.pendingProps,a);case 15:return Ih(e,t,t.type,t.pendingProps,a);case 19:return sm(e,t,a);case 31:return Jg(e,t,a);case 22:return Wh(e,t,a,t.pendingProps);case 24:return Jn(t),n=ot(Pe),e===null?(r=cc(),r===null&&(r=Ge,o=rc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:n,cache:r},dc(t),sn(t,Pe,r)):((e.lanes&a)!==0&&(fc(e,t),Vi(t,null,null,a),Zi()),r=e.memoizedState,o=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),sn(t,Pe,n)):(n=o.cache,sn(t,Pe,n),n!==r.cache&&sc(t,[Pe],a,!0))),dt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function wa(e){e.flags|=4}function Vc(e,t,a,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(_m())e.flags|=8192;else throw Wn=ir,oc}else e.flags&=-16777217}function um(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Np(t))if(_m())e.flags|=8192;else throw Wn=ir,oc}function Sr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qd():536870912,e.lanes|=t,Zl|=t)}function Pi(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Ig(e,t,a){var n=t.pendingProps;switch(tc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Oa(Pe),_e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(wl(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,nc())),Ye(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(wa(t),o!==null?(Ye(t),um(t,o)):(Ye(t),Vc(t,r,null,n,a))):o?o!==e.memoizedState?(wa(t),Ye(t),um(t,o)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&wa(t),Ye(t),Vc(t,r,e,n,a)),null;case 27:if(yl(t),a=ge.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&wa(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return Ye(t),null}e=ee.current,wl(t)?Gf(t):(e=pp(r,n,a),t.stateNode=e,wa(t))}return Ye(t),null;case 5:if(yl(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&wa(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return Ye(t),null}if(o=ee.current,wl(t))Gf(t);else{var h=Lr(ge.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?h.createElement("select",{is:n.is}):h.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?h.createElement(r,{is:n.is}):h.createElement(r)}}o[ut]=t,o[St]=n;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(ft(o,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&wa(t)}}return Ye(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&wa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=ge.current,wl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=ct,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[ut]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||lp(e.nodeValue,a)),e||ln(t,!0)}else e=Lr(e).createTextNode(n),e[ut]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=wl(t),a!==null){if(e===null){if(!n)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[ut]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ye(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=wl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[ut]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),r=!1}else r=nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Sr(t,t.updateQueue),Ye(t),null);case 4:return _e(),e===null&&yo(t.stateNode.containerInfo),Ye(t),null;case 10:return Oa(t.type),Ye(t),null;case 19:if(z(Ie),n=t.memoizedState,n===null)return Ye(t),null;if(r=(t.flags&128)!==0,o=n.rendering,o===null)if(r)Pi(n,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=cr(e),o!==null){for(t.flags|=128,Pi(n,!1),e=o.updateQueue,t.updateQueue=e,Sr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Uf(a,e),a=a.sibling;return F(Ie,Ie.current&1|2),Oe&&Ra(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&wt()>Rr&&(t.flags|=128,r=!0,Pi(n,!1),t.lanes=4194304)}else{if(!r)if(e=cr(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Sr(t,e),Pi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!Oe)return Ye(t),null}else 2*wt()-n.renderingStartTime>Rr&&a!==536870912&&(t.flags|=128,r=!0,Pi(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=wt(),e.sibling=null,a=Ie.current,F(Ie,r?a&1|2:a&1),Oe&&Ra(t,n.treeForkCount),e):(Ye(t),null);case 22:case 23:return Ht(t),yc(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&Sr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&z(Fn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Oa(Pe),Ye(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Wg(e,t){switch(tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(Pe),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return yl(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(u(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(Ie),null;case 4:return _e(),null;case 10:return Oa(t.type),null;case 22:case 23:return Ht(t),yc(),e!==null&&z(Fn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Oa(Pe),null;case 25:return null;default:return null}}function cm(e,t){switch(tc(t),t.tag){case 3:Oa(Pe),_e();break;case 26:case 27:case 5:yl(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:z(Ie);break;case 10:Oa(t.type);break;case 22:case 23:Ht(t),yc(),e!==null&&z(Fn);break;case 24:Oa(Pe)}}function es(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var o=a.create,h=a.inst;n=o(),h.destroy=n}a=a.next}while(a!==r)}}catch(v){Le(t,t.return,v)}}function fn(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){var h=n.inst,v=h.destroy;if(v!==void 0){h.destroy=void 0,r=t;var S=a,D=v;try{D()}catch(k){Le(r,S,k)}}}n=n.next}while(n!==o)}}catch(k){Le(t,t.return,k)}}function om(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{eh(t,a)}catch(n){Le(e,e.return,n)}}}function dm(e,t,a){a.props=tl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Le(e,t,n)}}function ts(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){Le(e,t,r)}}function ga(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){Le(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Le(e,t,r)}else a.current=null}function fm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){Le(e,e.return,r)}}function $c(e,t,a){try{var n=e.stateNode;bx(n,e.type,a,t),n[St]=t}catch(r){Le(e,e.return,r)}}function hm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xn(e.type)||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ea));else if(n!==4&&(n===27&&xn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Fc(e,t,a),e=e.sibling;e!==null;)Fc(e,t,a),e=e.sibling}function Nr(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&xn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Nr(e,t,a),e=e.sibling;e!==null;)Nr(e,t,a),e=e.sibling}function mm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);ft(t,n,a),t[ut]=e,t[St]=a}catch(o){Le(e,e.return,o)}}var _a=!1,at=!1,Ic=!1,pm=typeof WeakSet=="function"?WeakSet:Set,st=null;function Pg(e,t){if(e=e.containerInfo,xo=Kr,e=Rf(e),Ku(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,v=-1,S=-1,D=0,k=0,K=e,_=null;t:for(;;){for(var L;K!==a||r!==0&&K.nodeType!==3||(v=h+r),K!==o||n!==0&&K.nodeType!==3||(S=h+n),K.nodeType===3&&(h+=K.nodeValue.length),(L=K.firstChild)!==null;)_=K,K=L;for(;;){if(K===e)break t;if(_===a&&++D===r&&(v=h),_===o&&++k===n&&(S=h),(L=K.nextSibling)!==null)break;K=_,_=K.parentNode}K=L}a=v===-1||S===-1?null:{start:v,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(bo={focusedElem:e,selectionRange:a},Kr=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var ae=tl(a.type,r);e=n.getSnapshotBeforeUpdate(ae,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Le(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)No(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":No(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function ym(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(e,a),n&4&&es(5,a);break;case 1:if(Ua(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Le(a,a.return,h)}else{var r=tl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Le(a,a.return,h)}}n&64&&om(a),n&512&&ts(a,a.return);break;case 3:if(Ua(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{eh(e,t)}catch(h){Le(a,a.return,h)}}break;case 27:t===null&&n&4&&mm(a);case 26:case 5:Ua(e,a),t===null&&n&4&&fm(a),n&512&&ts(a,a.return);break;case 12:Ua(e,a);break;case 31:Ua(e,a),n&4&&xm(e,a);break;case 13:Ua(e,a),n&4&&bm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ux.bind(null,a),Ax(e,a))));break;case 22:if(n=a.memoizedState!==null||_a,!n){t=t!==null&&t.memoizedState!==null||at,r=_a;var o=at;_a=n,(at=t)&&!o?La(e,a,(a.subtreeFlags&8772)!==0):Ua(e,a),_a=r,at=o}break;case 30:break;default:Ua(e,a)}}function vm(e){var t=e.alternate;t!==null&&(e.alternate=null,vm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ru(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,Et=!1;function qa(e,t,a){for(a=a.child;a!==null;)gm(e,t,a),a=a.sibling}function gm(e,t,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ci,a)}catch{}switch(a.tag){case 26:at||ga(a,t),qa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:at||ga(a,t);var n=Xe,r=Et;xn(a.type)&&(Xe=a.stateNode,Et=!1),qa(e,t,a),os(a.stateNode),Xe=n,Et=r;break;case 5:at||ga(a,t);case 6:if(n=Xe,r=Et,Xe=null,qa(e,t,a),Xe=n,Et=r,Xe!==null)if(Et)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(o){Le(a,t,o)}else try{Xe.removeChild(a.stateNode)}catch(o){Le(a,t,o)}break;case 18:Xe!==null&&(Et?(e=Xe,op(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ei(e)):op(Xe,a.stateNode));break;case 4:n=Xe,r=Et,Xe=a.stateNode.containerInfo,Et=!0,qa(e,t,a),Xe=n,Et=r;break;case 0:case 11:case 14:case 15:fn(2,a,t),at||fn(4,a,t),qa(e,t,a);break;case 1:at||(ga(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&dm(a,t,n)),qa(e,t,a);break;case 21:qa(e,t,a);break;case 22:at=(n=at)||a.memoizedState!==null,qa(e,t,a),at=n;break;default:qa(e,t,a)}}function xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ei(e)}catch(a){Le(t,t.return,a)}}}function bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ei(e)}catch(a){Le(t,t.return,a)}}function ex(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pm),t;default:throw Error(u(435,e.tag))}}function Er(e,t){var a=ex(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var r=cx.bind(null,e,n);n.then(r,r)}})}function Ct(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var r=a[n],o=e,h=t,v=h;e:for(;v!==null;){switch(v.tag){case 27:if(xn(v.type)){Xe=v.stateNode,Et=!1;break e}break;case 5:Xe=v.stateNode,Et=!1;break e;case 3:case 4:Xe=v.stateNode.containerInfo,Et=!0;break e}v=v.return}if(Xe===null)throw Error(u(160));gm(o,h,r),Xe=null,Et=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jm(t,e),t=t.sibling}var ca=null;function jm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ct(t,e),Tt(e),n&4&&(fn(3,e,e.return),es(3,e),fn(5,e,e.return));break;case 1:Ct(t,e),Tt(e),n&512&&(at||a===null||ga(a,a.return)),n&64&&_a&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var r=ca;if(Ct(t,e),Tt(e),n&512&&(at||a===null||ga(a,a.return)),n&4){var o=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Ai]||o[ut]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(n),r.head.insertBefore(o,r.querySelector("head > title"))),ft(o,n,a),o[ut]=e,it(o),n=o;break e;case"link":var h=jp("link","href",r).get(n+(a.href||""));if(h){for(var v=0;v<h.length;v++)if(o=h[v],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(v,1);break t}}o=r.createElement(n),ft(o,n,a),r.head.appendChild(o);break;case"meta":if(h=jp("meta","content",r).get(n+(a.content||""))){for(v=0;v<h.length;v++)if(o=h[v],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(v,1);break t}}o=r.createElement(n),ft(o,n,a),r.head.appendChild(o);break;default:throw Error(u(468,n))}o[ut]=e,it(o),n=o}e.stateNode=n}else Sp(r,e.type,e.stateNode);else e.stateNode=bp(r,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?Sp(r,e.type,e.stateNode):bp(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&$c(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ct(t,e),Tt(e),n&512&&(at||a===null||ga(a,a.return)),a!==null&&n&4&&$c(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ct(t,e),Tt(e),n&512&&(at||a===null||ga(a,a.return)),e.flags&32){r=e.stateNode;try{Nl(r,"")}catch(ae){Le(e,e.return,ae)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,$c(e,r,a!==null?a.memoizedProps:r)),n&1024&&(Ic=!0);break;case 6:if(Ct(t,e),Tt(e),n&4){if(e.stateNode===null)throw Error(u(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ae){Le(e,e.return,ae)}}break;case 3:if(Qr=null,r=ca,ca=Br(t.containerInfo),Ct(t,e),ca=r,Tt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{ei(t.containerInfo)}catch(ae){Le(e,e.return,ae)}Ic&&(Ic=!1,Sm(e));break;case 4:n=ca,ca=Br(e.stateNode.containerInfo),Ct(t,e),Tt(e),ca=n;break;case 12:Ct(t,e),Tt(e);break;case 31:Ct(t,e),Tt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Er(e,n)));break;case 13:Ct(t,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Tr=wt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Er(e,n)));break;case 22:r=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,D=_a,k=at;if(_a=D||r,at=k||S,Ct(t,e),at=k,_a=D,Tt(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||S||_a||at||al(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(o=S.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{v=S.stateNode;var K=S.memoizedProps.style,_=K!=null&&K.hasOwnProperty("display")?K.display:null;v.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ae){Le(S,S.return,ae)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=r?"":S.memoizedProps}catch(ae){Le(S,S.return,ae)}}}else if(t.tag===18){if(a===null){S=t;try{var L=S.stateNode;r?dp(L,!0):dp(S.stateNode,!1)}catch(ae){Le(S,S.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Er(e,a))));break;case 19:Ct(t,e),Tt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Er(e,n)));break;case 30:break;case 21:break;default:Ct(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(hm(n)){a=n;break}n=n.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=Jc(e);Nr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Nl(h,""),a.flags&=-33);var v=Jc(e);Nr(e,v,h);break;case 3:case 4:var S=a.stateNode.containerInfo,D=Jc(e);Fc(e,D,S);break;default:throw Error(u(161))}}catch(k){Le(e,e.return,k)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ym(e,t.alternate,t),t=t.sibling}function al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:fn(4,t,t.return),al(t);break;case 1:ga(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&dm(t,t.return,a),al(t);break;case 27:os(t.stateNode);case 26:case 5:ga(t,t.return),al(t);break;case 22:t.memoizedState===null&&al(t);break;case 30:al(t);break;default:al(t)}e=e.sibling}}function La(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:La(r,o,a),es(4,o);break;case 1:if(La(r,o,a),n=o,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(D){Le(n,n.return,D)}if(n=o,r=n.updateQueue,r!==null){var v=n.stateNode;try{var S=r.shared.hiddenCallbacks;if(S!==null)for(r.shared.hiddenCallbacks=null,r=0;r<S.length;r++)Pf(S[r],v)}catch(D){Le(n,n.return,D)}}a&&h&64&&om(o),ts(o,o.return);break;case 27:mm(o);case 26:case 5:La(r,o,a),a&&n===null&&h&4&&fm(o),ts(o,o.return);break;case 12:La(r,o,a);break;case 31:La(r,o,a),a&&h&4&&xm(r,o);break;case 13:La(r,o,a),a&&h&4&&bm(r,o);break;case 22:o.memoizedState===null&&La(r,o,a),ts(o,o.return);break;case 30:break;default:La(r,o,a)}t=t.sibling}}function Wc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Gi(a))}function Pc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e))}function oa(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nm(e,t,a,n),t=t.sibling}function Nm(e,t,a,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:oa(e,t,a,n),r&2048&&es(9,t);break;case 1:oa(e,t,a,n);break;case 3:oa(e,t,a,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e)));break;case 12:if(r&2048){oa(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,v=o.onPostCommit;typeof v=="function"&&v(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Le(t,t.return,S)}}else oa(e,t,a,n);break;case 31:oa(e,t,a,n);break;case 13:oa(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?oa(e,t,a,n):as(e,t):o._visibility&2?oa(e,t,a,n):(o._visibility|=2,Yl(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Wc(h,t);break;case 24:oa(e,t,a,n),r&2048&&Pc(t.alternate,t);break;default:oa(e,t,a,n)}}function Yl(e,t,a,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,v=a,S=n,D=h.flags;switch(h.tag){case 0:case 11:case 15:Yl(o,h,v,S,r),es(8,h);break;case 23:break;case 22:var k=h.stateNode;h.memoizedState!==null?k._visibility&2?Yl(o,h,v,S,r):as(o,h):(k._visibility|=2,Yl(o,h,v,S,r)),r&&D&2048&&Wc(h.alternate,h);break;case 24:Yl(o,h,v,S,r),r&&D&2048&&Pc(h.alternate,h);break;default:Yl(o,h,v,S,r)}t=t.sibling}}function as(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,r=n.flags;switch(n.tag){case 22:as(a,n),r&2048&&Wc(n.alternate,n);break;case 24:as(a,n),r&2048&&Pc(n.alternate,n);break;default:as(a,n)}t=t.sibling}}var ns=8192;function Kl(e,t,a){if(e.subtreeFlags&ns)for(e=e.child;e!==null;)Em(e,t,a),e=e.sibling}function Em(e,t,a){switch(e.tag){case 26:Kl(e,t,a),e.flags&ns&&e.memoizedState!==null&&Qx(a,ca,e.memoizedState,e.memoizedProps);break;case 5:Kl(e,t,a);break;case 3:case 4:var n=ca;ca=Br(e.stateNode.containerInfo),Kl(e,t,a),ca=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=ns,ns=16777216,Kl(e,t,a),ns=n):Kl(e,t,a));break;default:Kl(e,t,a)}}function Cm(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];st=n,Rm(n,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tm(e),e=e.sibling}function Tm(e){switch(e.tag){case 0:case 11:case 15:ls(e),e.flags&2048&&fn(9,e,e.return);break;case 3:ls(e);break;case 12:ls(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Cr(e)):ls(e);break;default:ls(e)}}function Cr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];st=n,Rm(n,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:fn(8,t,t.return),Cr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Cr(t));break;default:Cr(t)}e=e.sibling}}function Rm(e,t){for(;st!==null;){var a=st;switch(a.tag){case 0:case 11:case 15:fn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Gi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,st=n;else e:for(a=e;st!==null;){n=st;var r=n.sibling,o=n.return;if(vm(n),n===a){st=null;break e}if(r!==null){r.return=o,st=r;break e}st=o}}}var tx={getCacheForType:function(e){var t=ot(Pe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ot(Pe).controller.signal}},ax=typeof WeakMap=="function"?WeakMap:Map,we=0,Ge=null,Ce=null,Re=0,Ue=0,Qt=null,hn=!1,Xl=!1,eo=!1,Ba=0,Je=0,mn=0,nl=0,to=0,Gt=0,Zl=0,is=null,Rt=null,ao=!1,Tr=0,Am=0,Rr=1/0,Ar=null,pn=null,nt=0,yn=null,Vl=null,Ha=0,no=0,lo=null,Om=null,ss=0,io=null;function kt(){return(we&2)!==0&&Re!==0?Re&-Re:Q.T!==null?fo():Kd()}function zm(){if(Gt===0)if((Re&536870912)===0||Oe){var e=Us;Us<<=1,(Us&3932160)===0&&(Us=262144),Gt=e}else Gt=536870912;return e=Bt.current,e!==null&&(e.flags|=32),Gt}function At(e,t,a){(e===Ge&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&($l(e,0),vn(e,Re,Gt,!1)),Ri(e,a),((we&2)===0||e!==Ge)&&(e===Ge&&((we&2)===0&&(nl|=a),Je===4&&vn(e,Re,Gt,!1)),xa(e))}function Mm(e,t,a){if((we&6)!==0)throw Error(u(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ti(e,t),r=n?ix(e,t):ro(e,t,!0),o=n;do{if(r===0){Xl&&!n&&vn(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!nx(a)){r=ro(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var v=e;r=is;var S=v.current.memoizedState.isDehydrated;if(S&&($l(v,h).flags|=256),h=ro(v,h,!1),h!==2){if(eo&&!S){v.errorRecoveryDisabledLanes|=o,nl|=o,r=4;break e}o=Rt,Rt=r,o!==null&&(Rt===null?Rt=o:Rt.push.apply(Rt,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){$l(e,0),vn(e,t,0,!0);break}e:{switch(n=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:vn(n,t,Gt,!hn);break e;case 2:Rt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=Tr+300-wt(),10<r)){if(vn(n,t,Gt,!hn),Bs(n,0,!0)!==0)break e;Ha=t,n.timeoutHandle=up(Dm.bind(null,n,a,Rt,Ar,ao,t,Gt,nl,Zl,hn,o,"Throttled",-0,0),r);break e}Dm(n,a,Rt,Ar,ao,t,Gt,nl,Zl,hn,o,null,-0,0)}}break}while(!0);xa(e)}function Dm(e,t,a,n,r,o,h,v,S,D,k,K,_,L){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ea},Em(t,o,K);var ae=(o&62914560)===o?Tr-wt():(o&4194048)===o?Am-wt():0;if(ae=Gx(K,ae),ae!==null){Ha=o,e.cancelPendingCommit=ae(Qm.bind(null,e,t,o,a,n,r,h,v,S,k,K,null,_,L)),vn(e,o,h,!D);return}}Qm(e,t,o,a,n,r,h,v,S)}function nx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var r=a[n],o=r.getSnapshot;r=r.value;try{if(!Ut(o(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vn(e,t,a,n){t&=~to,t&=~nl,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var o=31-qt(r),h=1<<o;n[o]=-1,r&=~h}a!==0&&Gd(e,a,t)}function Or(){return(we&6)===0?(rs(0),!1):!0}function so(){if(Ce!==null){if(Ue===0)var e=Ce.return;else e=Ce,Aa=$n=null,Sc(e),Bl=null,Yi=0,e=Ce;for(;e!==null;)cm(e.alternate,e),e=e.return;Ce=null}}function $l(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Nx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ha=0,so(),Ge=e,Ce=a=Ta(e.current,null),Re=t,Ue=0,Qt=null,hn=!1,Xl=Ti(e,t),eo=!1,Zl=Gt=to=nl=mn=Je=0,Rt=is=null,ao=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-qt(n),o=1<<r;t|=e[r],n&=~o}return Ba=t,Fs(),a}function wm(e,t){xe=null,Q.H=Ii,t===Ll||t===lr?(t=Jf(),Ue=3):t===oc?(t=Jf(),Ue=4):Ue=t===Bc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Qt=t,Ce===null&&(Je=1,gr(e,It(t,e.current)))}function _m(){var e=Bt.current;return e===null?!0:(Re&4194048)===Re?ta===null:(Re&62914560)===Re||(Re&536870912)!==0?e===ta:!1}function qm(){var e=Q.H;return Q.H=Ii,e===null?Ii:e}function Um(){var e=Q.A;return Q.A=tx,e}function zr(){Je=4,hn||(Re&4194048)!==Re&&Bt.current!==null||(Xl=!0),(mn&134217727)===0&&(nl&134217727)===0||Ge===null||vn(Ge,Re,Gt,!1)}function ro(e,t,a){var n=we;we|=2;var r=qm(),o=Um();(Ge!==e||Re!==t)&&(Ar=null,$l(e,t)),t=!1;var h=Je;e:do try{if(Ue!==0&&Ce!==null){var v=Ce,S=Qt;switch(Ue){case 8:so(),h=6;break e;case 3:case 2:case 9:case 6:Bt.current===null&&(t=!0);var D=Ue;if(Ue=0,Qt=null,Jl(e,v,S,D),a&&Xl){h=0;break e}break;default:D=Ue,Ue=0,Qt=null,Jl(e,v,S,D)}}lx(),h=Je;break}catch(k){wm(e,k)}while(!0);return t&&e.shellSuspendCounter++,Aa=$n=null,we=n,Q.H=r,Q.A=o,Ce===null&&(Ge=null,Re=0,Fs()),h}function lx(){for(;Ce!==null;)Lm(Ce)}function ix(e,t){var a=we;we|=2;var n=qm(),r=Um();Ge!==e||Re!==t?(Ar=null,Rr=wt()+500,$l(e,t)):Xl=Ti(e,t);e:do try{if(Ue!==0&&Ce!==null){t=Ce;var o=Qt;t:switch(Ue){case 1:Ue=0,Qt=null,Jl(e,t,o,1);break;case 2:case 9:if(Vf(o)){Ue=0,Qt=null,Bm(t);break}t=function(){Ue!==2&&Ue!==9||Ge!==e||(Ue=7),xa(e)},o.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Vf(o)?(Ue=0,Qt=null,Bm(t)):(Ue=0,Qt=null,Jl(e,t,o,7));break;case 5:var h=null;switch(Ce.tag){case 26:h=Ce.memoizedState;case 5:case 27:var v=Ce;if(h?Np(h):v.stateNode.complete){Ue=0,Qt=null;var S=v.sibling;if(S!==null)Ce=S;else{var D=v.return;D!==null?(Ce=D,Mr(D)):Ce=null}break t}}Ue=0,Qt=null,Jl(e,t,o,5);break;case 6:Ue=0,Qt=null,Jl(e,t,o,6);break;case 8:so(),Je=6;break e;default:throw Error(u(462))}}sx();break}catch(k){wm(e,k)}while(!0);return Aa=$n=null,Q.H=n,Q.A=r,we=a,Ce!==null?0:(Ge=null,Re=0,Fs(),Je)}function sx(){for(;Ce!==null&&!Ov();)Lm(Ce)}function Lm(e){var t=rm(e.alternate,e,Ba);e.memoizedProps=e.pendingProps,t===null?Mr(e):Ce=t}function Bm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=tm(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=tm(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Sc(t);default:cm(a,t),t=Ce=Uf(t,Ba),t=rm(a,t,Ba)}e.memoizedProps=e.pendingProps,t===null?Mr(e):Ce=t}function Jl(e,t,a,n){Aa=$n=null,Sc(t),Bl=null,Yi=0;var r=t.return;try{if($g(e,r,t,a,Re)){Je=1,gr(e,It(a,e.current)),Ce=null;return}}catch(o){if(r!==null)throw Ce=r,o;Je=1,gr(e,It(a,e.current)),Ce=null;return}t.flags&32768?(Oe||n===1?e=!0:Xl||(Re&536870912)!==0?e=!1:(hn=e=!0,(n===2||n===9||n===3||n===6)&&(n=Bt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Hm(t,e)):Mr(t)}function Mr(e){var t=e;do{if((t.flags&32768)!==0){Hm(t,hn);return}e=t.return;var a=Ig(t.alternate,t,Ba);if(a!==null){Ce=a;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Je===0&&(Je=5)}function Hm(e,t){do{var a=Wg(e.alternate,e);if(a!==null){a.flags&=32767,Ce=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=a}while(e!==null);Je=6,Ce=null}function Qm(e,t,a,n,r,o,h,v,S){e.cancelPendingCommit=null;do Dr();while(nt!==0);if((we&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=Ju,Hv(e,a,o,h,v,S),e===Ge&&(Ce=Ge=null,Re=0),Vl=t,yn=e,Ha=a,no=o,lo=r,Om=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ox(_s,function(){return Xm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Q.T,Q.T=null,r=$.p,$.p=2,h=we,we|=4;try{Pg(e,t,a)}finally{we=h,$.p=r,Q.T=n}}nt=1,Gm(),km(),Ym()}}function Gm(){if(nt===1){nt=0;var e=yn,t=Vl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Q.T,Q.T=null;var n=$.p;$.p=2;var r=we;we|=4;try{jm(t,e);var o=bo,h=Rf(e.containerInfo),v=o.focusedElem,S=o.selectionRange;if(h!==v&&v&&v.ownerDocument&&Tf(v.ownerDocument.documentElement,v)){if(S!==null&&Ku(v)){var D=S.start,k=S.end;if(k===void 0&&(k=D),"selectionStart"in v)v.selectionStart=D,v.selectionEnd=Math.min(k,v.value.length);else{var K=v.ownerDocument||document,_=K&&K.defaultView||window;if(_.getSelection){var L=_.getSelection(),ae=v.textContent.length,fe=Math.min(S.start,ae),Qe=S.end===void 0?fe:Math.min(S.end,ae);!L.extend&&fe>Qe&&(h=Qe,Qe=fe,fe=h);var A=Cf(v,fe),E=Cf(v,Qe);if(A&&E&&(L.rangeCount!==1||L.anchorNode!==A.node||L.anchorOffset!==A.offset||L.focusNode!==E.node||L.focusOffset!==E.offset)){var M=K.createRange();M.setStart(A.node,A.offset),L.removeAllRanges(),fe>Qe?(L.addRange(M),L.extend(E.node,E.offset)):(M.setEnd(E.node,E.offset),L.addRange(M))}}}}for(K=[],L=v;L=L.parentNode;)L.nodeType===1&&K.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<K.length;v++){var Y=K[v];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Kr=!!xo,bo=xo=null}finally{we=r,$.p=n,Q.T=a}}e.current=t,nt=2}}function km(){if(nt===2){nt=0;var e=yn,t=Vl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Q.T,Q.T=null;var n=$.p;$.p=2;var r=we;we|=4;try{ym(e,t.alternate,t)}finally{we=r,$.p=n,Q.T=a}}nt=3}}function Ym(){if(nt===4||nt===3){nt=0,zv();var e=yn,t=Vl,a=Ha,n=Om;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nt=5:(nt=0,Vl=yn=null,Km(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(pn=null),Cu(a),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ci,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Q.T,r=$.p,$.p=2,Q.T=null;try{for(var o=e.onRecoverableError,h=0;h<n.length;h++){var v=n[h];o(v.value,{componentStack:v.stack})}}finally{Q.T=t,$.p=r}}(Ha&3)!==0&&Dr(),xa(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===io?ss++:(ss=0,io=e):ss=0,rs(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gi(t)))}function Dr(){return Gm(),km(),Ym(),Xm()}function Xm(){if(nt!==5)return!1;var e=yn,t=no;no=0;var a=Cu(Ha),n=Q.T,r=$.p;try{$.p=32>a?32:a,Q.T=null,a=lo,lo=null;var o=yn,h=Ha;if(nt=0,Vl=yn=null,Ha=0,(we&6)!==0)throw Error(u(331));var v=we;if(we|=4,Tm(o.current),Nm(o,o.current,h,a),we=v,rs(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ci,o)}catch{}return!0}finally{$.p=r,Q.T=n,Km(e,t)}}function Zm(e,t,a){t=It(a,t),t=Lc(e.stateNode,t,2),e=cn(e,t,2),e!==null&&(Ri(e,2),xa(e))}function Le(e,t,a){if(e.tag===3)Zm(e,e,a);else for(;t!==null;){if(t.tag===3){Zm(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(pn===null||!pn.has(n))){e=It(a,e),a=Vh(2),n=cn(t,a,2),n!==null&&($h(a,n,t,e),Ri(n,2),xa(n));break}}t=t.return}}function uo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ax;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||(eo=!0,r.add(a),e=rx.bind(null,e,t,a),t.then(e,e))}function rx(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ge===e&&(Re&a)===a&&(Je===4||Je===3&&(Re&62914560)===Re&&300>wt()-Tr?(we&2)===0&&$l(e,0):to|=a,Zl===Re&&(Zl=0)),xa(e)}function Vm(e,t){t===0&&(t=Qd()),e=Xn(e,t),e!==null&&(Ri(e,t),xa(e))}function ux(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Vm(e,a)}function cx(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),Vm(e,a)}function ox(e,t){return ju(e,t)}var wr=null,Fl=null,co=!1,_r=!1,oo=!1,gn=0;function xa(e){e!==Fl&&e.next===null&&(Fl===null?wr=Fl=e:Fl=Fl.next=e),_r=!0,co||(co=!0,fx())}function rs(e,t){if(!oo&&_r){oo=!0;do for(var a=!1,n=wr;n!==null;){if(e!==0){var r=n.pendingLanes;if(r===0)var o=0;else{var h=n.suspendedLanes,v=n.pingedLanes;o=(1<<31-qt(42|e)+1)-1,o&=r&~(h&~v),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,Im(n,o))}else o=Re,o=Bs(n,n===Ge?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||Ti(n,o)||(a=!0,Im(n,o));n=n.next}while(a);oo=!1}}function dx(){$m()}function $m(){_r=co=!1;var e=0;gn!==0&&Sx()&&(e=gn);for(var t=wt(),a=null,n=wr;n!==null;){var r=n.next,o=Jm(n,t);o===0?(n.next=null,a===null?wr=r:a.next=r,r===null&&(Fl=a)):(a=n,(e!==0||(o&3)!==0)&&(_r=!0)),n=r}nt!==0&&nt!==5||rs(e),gn!==0&&(gn=0)}function Jm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-qt(o),v=1<<h,S=r[h];S===-1?((v&a)===0||(v&n)!==0)&&(r[h]=Bv(v,t)):S<=t&&(e.expiredLanes|=v),o&=~v}if(t=Ge,a=Re,a=Bs(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Su(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ti(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Su(n),Cu(a)){case 2:case 8:a=Bd;break;case 32:a=_s;break;case 268435456:a=Hd;break;default:a=_s}return n=Fm.bind(null,e),a=ju(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Su(n),e.callbackPriority=2,e.callbackNode=null,2}function Fm(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Dr()&&e.callbackNode!==a)return null;var n=Re;return n=Bs(e,e===Ge?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Mm(e,n,t),Jm(e,wt()),e.callbackNode!=null&&e.callbackNode===a?Fm.bind(null,e):null)}function Im(e,t){if(Dr())return null;Mm(e,t,!0)}function fx(){Ex(function(){(we&6)!==0?ju(Ld,dx):$m()})}function fo(){if(gn===0){var e=ql;e===0&&(e=qs,qs<<=1,(qs&261888)===0&&(qs=256)),gn=e}return gn}function Wm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ks(""+e)}function Pm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function hx(e,t,a,n,r){if(t==="submit"&&a&&a.stateNode===r){var o=Wm((r[St]||null).action),h=n.submitter;h&&(t=(t=h[St]||null)?Wm(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var v=new Zs("action","action",null,n,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(gn!==0){var S=h?Pm(r,h):new FormData(r);Mc(a,{pending:!0,data:S,method:r.method,action:o},null,S)}}else typeof o=="function"&&(v.preventDefault(),S=h?Pm(r,h):new FormData(r),Mc(a,{pending:!0,data:S,method:r.method,action:o},o,S))},currentTarget:r}]})}}for(var ho=0;ho<$u.length;ho++){var mo=$u[ho],mx=mo.toLowerCase(),px=mo[0].toUpperCase()+mo.slice(1);ua(mx,"on"+px)}ua(zf,"onAnimationEnd"),ua(Mf,"onAnimationIteration"),ua(Df,"onAnimationStart"),ua("dblclick","onDoubleClick"),ua("focusin","onFocus"),ua("focusout","onBlur"),ua(Mg,"onTransitionRun"),ua(Dg,"onTransitionStart"),ua(wg,"onTransitionCancel"),ua(wf,"onTransitionEnd"),jl("onMouseEnter",["mouseout","mouseover"]),jl("onMouseLeave",["mouseout","mouseover"]),jl("onPointerEnter",["pointerout","pointerover"]),jl("onPointerLeave",["pointerout","pointerover"]),Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),yx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(us));function ep(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],r=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var h=n.length-1;0<=h;h--){var v=n[h],S=v.instance,D=v.currentTarget;if(v=v.listener,S!==o&&r.isPropagationStopped())break e;o=v,r.currentTarget=D;try{o(r)}catch(k){Js(k)}r.currentTarget=null,o=S}else for(h=0;h<n.length;h++){if(v=n[h],S=v.instance,D=v.currentTarget,v=v.listener,S!==o&&r.isPropagationStopped())break e;o=v,r.currentTarget=D;try{o(r)}catch(k){Js(k)}r.currentTarget=null,o=S}}}}function Te(e,t){var a=t[Tu];a===void 0&&(a=t[Tu]=new Set);var n=e+"__bubble";a.has(n)||(tp(t,e,2,!1),a.add(n))}function po(e,t,a){var n=0;t&&(n|=4),tp(a,e,n,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function yo(e){if(!e[qr]){e[qr]=!0,Vd.forEach(function(a){a!=="selectionchange"&&(yx.has(a)||po(a,!1,e),po(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,po("selectionchange",!1,t))}}function tp(e,t,a,n){switch(zp(t)){case 2:var r=Kx;break;case 8:r=Xx;break;default:r=Mo}a=r.bind(null,t,a,e),r=void 0,!qu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function vo(e,t,a,n,r){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var v=n.stateNode.containerInfo;if(v===r)break;if(h===4)for(h=n.return;h!==null;){var S=h.tag;if((S===3||S===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;v!==null;){if(h=gl(v),h===null)return;if(S=h.tag,S===5||S===6||S===26||S===27){n=o=h;continue e}v=v.parentNode}}n=n.return}sf(function(){var D=o,k=wu(a),K=[];e:{var _=_f.get(e);if(_!==void 0){var L=Zs,ae=e;switch(e){case"keypress":if(Ks(a)===0)break e;case"keydown":case"keyup":L=cg;break;case"focusin":ae="focus",L=Hu;break;case"focusout":ae="blur",L=Hu;break;case"beforeblur":case"afterblur":L=Hu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=cf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Iv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=fg;break;case zf:case Mf:case Df:L=eg;break;case wf:L=mg;break;case"scroll":case"scrollend":L=Jv;break;case"wheel":L=yg;break;case"copy":case"cut":case"paste":L=ag;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=df;break;case"toggle":case"beforetoggle":L=gg}var fe=(t&4)!==0,Qe=!fe&&(e==="scroll"||e==="scrollend"),A=fe?_!==null?_+"Capture":null:_;fe=[];for(var E=D,M;E!==null;){var Y=E;if(M=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||M===null||A===null||(Y=zi(E,A),Y!=null&&fe.push(cs(E,Y,M))),Qe)break;E=E.return}0<fe.length&&(_=new L(_,ae,null,a,k),K.push({event:_,listeners:fe}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",_&&a!==Du&&(ae=a.relatedTarget||a.fromElement)&&(gl(ae)||ae[vl]))break e;if((L||_)&&(_=k.window===k?k:(_=k.ownerDocument)?_.defaultView||_.parentWindow:window,L?(ae=a.relatedTarget||a.toElement,L=D,ae=ae?gl(ae):null,ae!==null&&(Qe=f(ae),fe=ae.tag,ae!==Qe||fe!==5&&fe!==27&&fe!==6)&&(ae=null)):(L=null,ae=D),L!==ae)){if(fe=cf,Y="onMouseLeave",A="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(fe=df,Y="onPointerLeave",A="onPointerEnter",E="pointer"),Qe=L==null?_:Oi(L),M=ae==null?_:Oi(ae),_=new fe(Y,E+"leave",L,a,k),_.target=Qe,_.relatedTarget=M,Y=null,gl(k)===D&&(fe=new fe(A,E+"enter",ae,a,k),fe.target=M,fe.relatedTarget=Qe,Y=fe),Qe=Y,L&&ae)t:{for(fe=vx,A=L,E=ae,M=0,Y=A;Y;Y=fe(Y))M++;Y=0;for(var oe=E;oe;oe=fe(oe))Y++;for(;0<M-Y;)A=fe(A),M--;for(;0<Y-M;)E=fe(E),Y--;for(;M--;){if(A===E||E!==null&&A===E.alternate){fe=A;break t}A=fe(A),E=fe(E)}fe=null}else fe=null;L!==null&&ap(K,_,L,fe,!1),ae!==null&&Qe!==null&&ap(K,Qe,ae,fe,!0)}}e:{if(_=D?Oi(D):window,L=_.nodeName&&_.nodeName.toLowerCase(),L==="select"||L==="input"&&_.type==="file")var Me=xf;else if(vf(_))if(bf)Me=Ag;else{Me=Tg;var ie=Cg}else L=_.nodeName,!L||L.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?D&&Mu(D.elementType)&&(Me=xf):Me=Rg;if(Me&&(Me=Me(e,D))){gf(K,Me,a,k);break e}ie&&ie(e,_,D),e==="focusout"&&D&&_.type==="number"&&D.memoizedProps.value!=null&&zu(_,"number",_.value)}switch(ie=D?Oi(D):window,e){case"focusin":(vf(ie)||ie.contentEditable==="true")&&(Rl=ie,Xu=D,Bi=null);break;case"focusout":Bi=Xu=Rl=null;break;case"mousedown":Zu=!0;break;case"contextmenu":case"mouseup":case"dragend":Zu=!1,Af(K,a,k);break;case"selectionchange":if(zg)break;case"keydown":case"keyup":Af(K,a,k)}var be;if(Gu)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Tl?pf(e,a)&&(Ae="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ae="onCompositionStart");Ae&&(ff&&a.locale!=="ko"&&(Tl||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Tl&&(be=rf()):(tn=k,Uu="value"in tn?tn.value:tn.textContent,Tl=!0)),ie=Ur(D,Ae),0<ie.length&&(Ae=new of(Ae,e,null,a,k),K.push({event:Ae,listeners:ie}),be?Ae.data=be:(be=yf(a),be!==null&&(Ae.data=be)))),(be=bg?jg(e,a):Sg(e,a))&&(Ae=Ur(D,"onBeforeInput"),0<Ae.length&&(ie=new of("onBeforeInput","beforeinput",null,a,k),K.push({event:ie,listeners:Ae}),ie.data=be)),hx(K,e,D,a,k)}ep(K,t)})}function cs(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ur(e,t){for(var a=t+"Capture",n=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=zi(e,a),r!=null&&n.unshift(cs(e,r,o)),r=zi(e,t),r!=null&&n.push(cs(e,r,o))),e.tag===3)return n;e=e.return}return[]}function vx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(e,t,a,n,r){for(var o=t._reactName,h=[];a!==null&&a!==n;){var v=a,S=v.alternate,D=v.stateNode;if(v=v.tag,S!==null&&S===n)break;v!==5&&v!==26&&v!==27||D===null||(S=D,r?(D=zi(a,o),D!=null&&h.unshift(cs(a,D,S))):r||(D=zi(a,o),D!=null&&h.push(cs(a,D,S)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var gx=/\r\n?/g,xx=/\u0000|\uFFFD/g;function np(e){return(typeof e=="string"?e:""+e).replace(gx,`
|
|
49
|
+
`).replace(xx,"")}function lp(e,t){return t=np(t),np(e)===t}function He(e,t,a,n,r,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Nl(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Nl(e,""+n);break;case"className":Qs(e,"class",n);break;case"tabIndex":Qs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Qs(e,a,n);break;case"style":nf(e,n,o);break;case"data":if(t!=="object"){Qs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ks(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"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 o=="function"&&(a==="formAction"?(t!=="input"&&He(e,t,"name",r.name,r,null),He(e,t,"formEncType",r.formEncType,r,null),He(e,t,"formMethod",r.formMethod,r,null),He(e,t,"formTarget",r.formTarget,r,null)):(He(e,t,"encType",r.encType,r,null),He(e,t,"method",r.method,r,null),He(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ks(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ea);break;case"onScroll":n!=null&&Te("scroll",e);break;case"onScrollEnd":n!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=ks(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Hs(e,"popover",n);break;case"xlinkActuate":Na(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Na(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Na(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Na(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Na(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Na(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Na(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Hs(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Vv.get(a)||a,Hs(e,a,n))}}function go(e,t,a,n,r,o){switch(a){case"style":nf(e,n,o);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Nl(e,n):(typeof n=="number"||typeof n=="bigint")&&Nl(e,""+n);break;case"onScroll":n!=null&&Te("scroll",e);break;case"onScrollEnd":n!=null&&Te("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$d.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[St]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof n=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,r);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Hs(e,a,n)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var n=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:He(e,t,o,h,a,null)}}r&&He(e,t,"srcSet",a.srcSet,a,null),n&&He(e,t,"src",a.src,a,null);return;case"input":Te("invalid",e);var v=o=h=r=null,S=null,D=null;for(n in a)if(a.hasOwnProperty(n)){var k=a[n];if(k!=null)switch(n){case"name":r=k;break;case"type":h=k;break;case"checked":S=k;break;case"defaultChecked":D=k;break;case"value":o=k;break;case"defaultValue":v=k;break;case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:He(e,t,n,k,a,null)}}Pd(e,o,v,S,D,h,r,!1);return;case"select":Te("invalid",e),n=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(v=a[r],v!=null))switch(r){case"value":o=v;break;case"defaultValue":h=v;break;case"multiple":n=v;default:He(e,t,r,v,a,null)}t=o,a=h,e.multiple=!!n,t!=null?Sl(e,!!n,t,!1):a!=null&&Sl(e,!!n,a,!0);return;case"textarea":Te("invalid",e),o=r=n=null;for(h in a)if(a.hasOwnProperty(h)&&(v=a[h],v!=null))switch(h){case"value":n=v;break;case"defaultValue":r=v;break;case"children":o=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:He(e,t,h,v,a,null)}tf(e,n,r,o);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(n=a[S],n!=null))switch(S){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:He(e,t,S,n,a,null)}return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(n=0;n<us.length;n++)Te(us[n],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(n=a[D],n!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:He(e,t,D,n,a,null)}return;default:if(Mu(t)){for(k in a)a.hasOwnProperty(k)&&(n=a[k],n!==void 0&&go(e,t,k,n,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(n=a[v],n!=null&&He(e,t,v,n,a,null))}function bx(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,v=null,S=null,D=null,k=null;for(L in a){var K=a[L];if(a.hasOwnProperty(L)&&K!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":S=K;default:n.hasOwnProperty(L)||He(e,t,L,null,n,K)}}for(var _ in n){var L=n[_];if(K=a[_],n.hasOwnProperty(_)&&(L!=null||K!=null))switch(_){case"type":o=L;break;case"name":r=L;break;case"checked":D=L;break;case"defaultChecked":k=L;break;case"value":h=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:L!==K&&He(e,t,_,L,n,K)}}Ou(e,h,v,S,D,k,o,r);return;case"select":L=h=v=_=null;for(o in a)if(S=a[o],a.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":L=S;default:n.hasOwnProperty(o)||He(e,t,o,null,n,S)}for(r in n)if(o=n[r],S=a[r],n.hasOwnProperty(r)&&(o!=null||S!=null))switch(r){case"value":_=o;break;case"defaultValue":v=o;break;case"multiple":h=o;default:o!==S&&He(e,t,r,o,n,S)}t=v,a=h,n=L,_!=null?Sl(e,!!a,_,!1):!!n!=!!a&&(t!=null?Sl(e,!!a,t,!0):Sl(e,!!a,a?[]:"",!1));return;case"textarea":L=_=null;for(v in a)if(r=a[v],a.hasOwnProperty(v)&&r!=null&&!n.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:He(e,t,v,null,n,r)}for(h in n)if(r=n[h],o=a[h],n.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":_=r;break;case"defaultValue":L=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&He(e,t,h,r,n,o)}ef(e,_,L);return;case"option":for(var ae in a)if(_=a[ae],a.hasOwnProperty(ae)&&_!=null&&!n.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:He(e,t,ae,null,n,_)}for(S in n)if(_=n[S],L=a[S],n.hasOwnProperty(S)&&_!==L&&(_!=null||L!=null))switch(S){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:He(e,t,S,_,n,L)}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 fe in a)_=a[fe],a.hasOwnProperty(fe)&&_!=null&&!n.hasOwnProperty(fe)&&He(e,t,fe,null,n,_);for(D in n)if(_=n[D],L=a[D],n.hasOwnProperty(D)&&_!==L&&(_!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(u(137,t));break;default:He(e,t,D,_,n,L)}return;default:if(Mu(t)){for(var Qe in a)_=a[Qe],a.hasOwnProperty(Qe)&&_!==void 0&&!n.hasOwnProperty(Qe)&&go(e,t,Qe,void 0,n,_);for(k in n)_=n[k],L=a[k],!n.hasOwnProperty(k)||_===L||_===void 0&&L===void 0||go(e,t,k,_,n,L);return}}for(var A in a)_=a[A],a.hasOwnProperty(A)&&_!=null&&!n.hasOwnProperty(A)&&He(e,t,A,null,n,_);for(K in n)_=n[K],L=a[K],!n.hasOwnProperty(K)||_===L||_==null&&L==null||He(e,t,K,_,n,L)}function ip(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var r=a[n],o=r.transferSize,h=r.initiatorType,v=r.duration;if(o&&v&&ip(h)){for(h=0,v=r.responseEnd,n+=1;n<a.length;n++){var S=a[n],D=S.startTime;if(D>v)break;var k=S.transferSize,K=S.initiatorType;k&&ip(K)&&(S=S.responseEnd,h+=k*(S<v?1:(v-D)/(S-D)))}if(--n,t+=8*(o+h)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var xo=null,bo=null;function Lr(e){return e.nodeType===9?e:e.ownerDocument}function sp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function rp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function jo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var So=null;function Sx(){var e=window.event;return e&&e.type==="popstate"?e===So?!1:(So=e,!0):(So=null,!1)}var up=typeof setTimeout=="function"?setTimeout:void 0,Nx=typeof clearTimeout=="function"?clearTimeout:void 0,cp=typeof Promise=="function"?Promise:void 0,Ex=typeof queueMicrotask=="function"?queueMicrotask:typeof cp<"u"?function(e){return cp.resolve(null).then(e).catch(Cx)}:up;function Cx(e){setTimeout(function(){throw e})}function xn(e){return e==="head"}function op(e,t){var a=t,n=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(r),ei(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")os(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,os(a);for(var o=a.firstChild;o;){var h=o.nextSibling,v=o.nodeName;o[Ai]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&os(e.ownerDocument.body);a=r}while(a);ei(t)}function dp(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function No(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":No(a),Ru(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Tx(e,t,a,n){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=aa(e.nextSibling),e===null)break}return null}function Rx(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=aa(e.nextSibling),e===null))return null;return e}function fp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=aa(e.nextSibling),e===null))return null;return e}function Eo(e){return e.data==="$?"||e.data==="$~"}function Co(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ax(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function aa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var To=null;function hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return aa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function mp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function pp(e,t,a){switch(t=Lr(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function os(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ru(e)}var na=new Map,yp=new Set;function Br(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qa=$.d;$.d={f:Ox,r:zx,D:Mx,C:Dx,L:wx,m:_x,X:Ux,S:qx,M:Lx};function Ox(){var e=Qa.f(),t=Or();return e||t}function zx(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?wh(t):Qa.r(e)}var Il=typeof document>"u"?null:document;function vp(e,t,a){var n=Il;if(n&&typeof t=="string"&&t){var r=Jt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),yp.has(r)||(yp.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),ft(t,"link",e),it(t),n.head.appendChild(t)))}}function Mx(e){Qa.D(e),vp("dns-prefetch",e,null)}function Dx(e,t){Qa.C(e,t),vp("preconnect",e,t)}function wx(e,t,a){Qa.L(e,t,a);var n=Il;if(n&&e&&t){var r='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Jt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Jt(a.imageSizes)+'"]')):r+='[href="'+Jt(e)+'"]';var o=r;switch(t){case"style":o=Wl(e);break;case"script":o=Pl(e)}na.has(o)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),na.set(o,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(ds(o))||t==="script"&&n.querySelector(fs(o))||(t=n.createElement("link"),ft(t,"link",e),it(t),n.head.appendChild(t)))}}function _x(e,t){Qa.m(e,t);var a=Il;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Jt(n)+'"][href="'+Jt(e)+'"]',o=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Pl(e)}if(!na.has(o)&&(e=x({rel:"modulepreload",href:e},t),na.set(o,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(fs(o)))return}n=a.createElement("link"),ft(n,"link",e),it(n),a.head.appendChild(n)}}}function qx(e,t,a){Qa.S(e,t,a);var n=Il;if(n&&e){var r=bl(n).hoistableStyles,o=Wl(e);t=t||"default";var h=r.get(o);if(!h){var v={loading:0,preload:null};if(h=n.querySelector(ds(o)))v.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=na.get(o))&&Ro(e,a);var S=h=n.createElement("link");it(S),ft(S,"link",e),S._p=new Promise(function(D,k){S.onload=D,S.onerror=k}),S.addEventListener("load",function(){v.loading|=1}),S.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Hr(h,t,n)}h={type:"stylesheet",instance:h,count:1,state:v},r.set(o,h)}}}function Ux(e,t){Qa.X(e,t);var a=Il;if(a&&e){var n=bl(a).hoistableScripts,r=Pl(e),o=n.get(r);o||(o=a.querySelector(fs(r)),o||(e=x({src:e,async:!0},t),(t=na.get(r))&&Ao(e,t),o=a.createElement("script"),it(o),ft(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function Lx(e,t){Qa.M(e,t);var a=Il;if(a&&e){var n=bl(a).hoistableScripts,r=Pl(e),o=n.get(r);o||(o=a.querySelector(fs(r)),o||(e=x({src:e,async:!0,type:"module"},t),(t=na.get(r))&&Ao(e,t),o=a.createElement("script"),it(o),ft(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(r,o))}}function gp(e,t,a,n){var r=(r=ge.current)?Br(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Wl(a.href),a=bl(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Wl(a.href);var o=bl(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(ds(e)))&&!o._p&&(h.instance=o,h.state.loading=5),na.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},na.set(e,a),o||Bx(r,e,a,h.state))),t&&n===null)throw Error(u(528,""));return h}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pl(a),a=bl(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Wl(e){return'href="'+Jt(e)+'"'}function ds(e){return'link[rel="stylesheet"]['+e+"]"}function xp(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Bx(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),ft(t,"link",a),it(t),e.head.appendChild(t))}function Pl(e){return'[src="'+Jt(e)+'"]'}function fs(e){return"script[async]"+e}function bp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Jt(a.href)+'"]');if(n)return t.instance=n,it(n),n;var r=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),it(n),ft(n,"style",r),Hr(n,a.precedence,e),t.instance=n;case"stylesheet":r=Wl(a.href);var o=e.querySelector(ds(r));if(o)return t.state.loading|=4,t.instance=o,it(o),o;n=xp(a),(r=na.get(r))&&Ro(n,r),o=(e.ownerDocument||e).createElement("link"),it(o);var h=o;return h._p=new Promise(function(v,S){h.onload=v,h.onerror=S}),ft(o,"link",n),t.state.loading|=4,Hr(o,a.precedence,e),t.instance=o;case"script":return o=Pl(a.src),(r=e.querySelector(fs(o)))?(t.instance=r,it(r),r):(n=a,(r=na.get(o))&&(n=x({},a),Ao(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),it(r),ft(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Hr(n,a.precedence,e));return t.instance}function Hr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,o=r,h=0;h<n.length;h++){var v=n[h];if(v.dataset.precedence===t)o=v;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ro(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ao(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Qr=null;function jp(e,t,a){if(Qr===null){var n=new Map,r=Qr=new Map;r.set(a,n)}else r=Qr,n=r.get(a),n||(n=new Map,r.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Ai]||o[ut]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var v=n.get(h);v?v.push(o):n.set(h,[o])}}return n}function Sp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Hx(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Np(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qx(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Wl(n.href),o=t.querySelector(ds(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Gr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,it(o);return}o=t.ownerDocument||t,n=xp(n),(r=na.get(r))&&Ro(n,r),o=o.createElement("link"),it(o);var h=o;h._p=new Promise(function(v,S){h.onload=v,h.onerror=S}),ft(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Gr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Oo=0;function Gx(e,t){return e.stylesheets&&e.count===0&&Yr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Oo===0&&(Oo=62500*jx());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Oo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function Gr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kr=null;function Yr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kr=new Map,t.forEach(kx,e),kr=null,Gr.call(e))}function kx(e,t){if(!(t.state.loading&4)){var a=kr.get(e);if(a)var n=a.get(null);else{a=new Map,kr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),n=h)}n&&a.set(null,n)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||n,o===n&&a.set(null,r),a.set(h,r),this.count++,n=Gr.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var hs={$$typeof:G,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function Yx(e,t,a,n,r,o,h,v,S){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nu(0),this.hiddenUpdates=Nu(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Ep(e,t,a,n,r,o,h,v,S,D,k,K){return e=new Yx(e,t,a,h,S,D,k,K,v),t=1,o===!0&&(t|=24),o=Lt(3,null,null,t),e.current=o,o.stateNode=e,t=rc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},dc(o),e}function Cp(e){return e?(e=zl,e):zl}function Tp(e,t,a,n,r,o){r=Cp(r),n.context===null?n.context=r:n.pendingContext=r,n=un(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=cn(e,n,t),a!==null&&(At(a,e,t),Xi(a,e,t))}function Rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zo(e,t){Rp(e,t),(e=e.alternate)&&Rp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Xn(e,67108864);t!==null&&At(t,e,67108864),zo(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var t=kt();t=Eu(t);var a=Xn(e,t);a!==null&&At(a,e,t),zo(e,t)}}var Kr=!0;function Kx(e,t,a,n){var r=Q.T;Q.T=null;var o=$.p;try{$.p=2,Mo(e,t,a,n)}finally{$.p=o,Q.T=r}}function Xx(e,t,a,n){var r=Q.T;Q.T=null;var o=$.p;try{$.p=8,Mo(e,t,a,n)}finally{$.p=o,Q.T=r}}function Mo(e,t,a,n){if(Kr){var r=Do(n);if(r===null)vo(e,t,n,Xr,a),Mp(e,n);else if(Vx(r,e,t,a,n))n.stopPropagation();else if(Mp(e,n),t&4&&-1<Zx.indexOf(e)){for(;r!==null;){var o=xl(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=Qn(o.pendingLanes);if(h!==0){var v=o;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var S=1<<31-qt(h);v.entanglements[1]|=S,h&=~S}xa(o),(we&6)===0&&(Rr=wt()+500,rs(0))}}break;case 31:case 13:v=Xn(o,2),v!==null&&At(v,o,2),Or(),zo(o,2)}if(o=Do(n),o===null&&vo(e,t,n,Xr,a),o===r)break;r=o}r!==null&&n.stopPropagation()}else vo(e,t,n,null,a)}}function Do(e){return e=wu(e),wo(e)}var Xr=null;function wo(e){if(Xr=null,e=gl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=p(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Xr=e,null}function zp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mv()){case Ld:return 2;case Bd:return 8;case _s:case Dv:return 32;case Hd:return 268435456;default:return 32}default:return 32}}var _o=!1,bn=null,jn=null,Sn=null,ms=new Map,ps=new Map,Nn=[],Zx="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 Mp(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Sn=null;break;case"pointerover":case"pointerout":ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ps.delete(t.pointerId)}}function ys(e,t,a,n,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[r]},t!==null&&(t=xl(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Vx(e,t,a,n,r){switch(t){case"focusin":return bn=ys(bn,e,t,a,n,r),!0;case"dragenter":return jn=ys(jn,e,t,a,n,r),!0;case"mouseover":return Sn=ys(Sn,e,t,a,n,r),!0;case"pointerover":var o=r.pointerId;return ms.set(o,ys(ms.get(o)||null,e,t,a,n,r)),!0;case"gotpointercapture":return o=r.pointerId,ps.set(o,ys(ps.get(o)||null,e,t,a,n,r)),!0}return!1}function Dp(e){var t=gl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=p(a),t!==null){e.blockedOn=t,Xd(e.priority,function(){Op(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,Xd(e.priority,function(){Op(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Do(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Du=n,a.target.dispatchEvent(n),Du=null}else return t=xl(a),t!==null&&Ap(t),e.blockedOn=a,!1;t.shift()}return!0}function wp(e,t,a){Zr(e)&&a.delete(t)}function $x(){_o=!1,bn!==null&&Zr(bn)&&(bn=null),jn!==null&&Zr(jn)&&(jn=null),Sn!==null&&Zr(Sn)&&(Sn=null),ms.forEach(wp),ps.forEach(wp)}function Vr(e,t){e.blockedOn===t&&(e.blockedOn=null,_o||(_o=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,$x)))}var $r=null;function _p(e){$r!==e&&($r=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){$r===e&&($r=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(wo(n||a)===null)continue;break}var o=xl(a);o!==null&&(e.splice(t,3),t-=3,Mc(o,{pending:!0,data:r,method:a.method,action:n},n,r))}}))}function ei(e){function t(S){return Vr(S,e)}bn!==null&&Vr(bn,e),jn!==null&&Vr(jn,e),Sn!==null&&Vr(Sn,e),ms.forEach(t),ps.forEach(t);for(var a=0;a<Nn.length;a++){var n=Nn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Nn.length&&(a=Nn[0],a.blockedOn===null);)Dp(a),a.blockedOn===null&&Nn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var r=a[n],o=a[n+1],h=r[St]||null;if(typeof o=="function")h||_p(a);else if(h){var v=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[St]||null)v=h.formAction;else if(wo(r)!==null)continue}else v=h.action;typeof v=="function"?a[n+1]=v:(a.splice(n,3),n-=3),_p(a)}}}function qp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function qo(e){this._internalRoot=e}Jr.prototype.render=qo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,n=kt();Tp(a,n,e,t,null,null)},Jr.prototype.unmount=qo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tp(e.current,2,null,e,null,null),Or(),t[vl]=null}};function Jr(e){this._internalRoot=e}Jr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Nn.length&&t!==0&&t<Nn[a].priority;a++);Nn.splice(a,0,e),a===0&&Dp(e)}};var Up=s.version;if(Up!=="19.2.7")throw Error(u(527,Up,"19.2.7"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Jx={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:Q,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fr.isDisabled&&Fr.supportsFiber)try{Ci=Fr.inject(Jx),_t=Fr}catch{}}return gs.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,n="",r=Yh,o=Kh,h=Xh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Ep(e,1,!1,null,null,a,n,null,r,o,h,qp),e[vl]=t.current,yo(e),new qo(t)},gs.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var n=!1,r="",o=Yh,h=Kh,v=Xh,S=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=Ep(e,1,!0,t,a??null,n,r,S,o,h,v,qp),t.context=Cp(null),a=t.current,n=kt(),n=Eu(n),r=un(n),r.callback=null,cn(a,r,n),a=n,t.current.lanes=a,Ri(t,a),xa(t),e[vl]=t.current,yo(e),new Jr(t)},gs.version="19.2.7",gs}var $p;function rb(){if($p)return Ho.exports;$p=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),Ho.exports=sb(),Ho.exports}var ub=rb(),bi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(l){return this.listeners.add(l),this.onSubscribe(),()=>{this.listeners.delete(l),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sl,Rn,ii,Sy,cb=(Sy=class extends bi{constructor(){super();ce(this,sl);ce(this,Rn);ce(this,ii);te(this,ii,s=>{if(typeof window<"u"&&window.addEventListener){const c=()=>s();return window.addEventListener("visibilitychange",c,!1),()=>{window.removeEventListener("visibilitychange",c)}}})}onSubscribe(){N(this,Rn)||this.setEventListener(N(this,ii))}onUnsubscribe(){var s;this.hasListeners()||((s=N(this,Rn))==null||s.call(this),te(this,Rn,void 0))}setEventListener(s){var c;te(this,ii,s),(c=N(this,Rn))==null||c.call(this),te(this,Rn,s(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(s){N(this,sl)!==s&&(te(this,sl,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(c=>{c(s)})}isFocused(){var s;return typeof N(this,sl)=="boolean"?N(this,sl):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},sl=new WeakMap,Rn=new WeakMap,ii=new WeakMap,Sy),vd=new cb,ob={setTimeout:(l,s)=>setTimeout(l,s),clearTimeout:l=>clearTimeout(l),setInterval:(l,s)=>setInterval(l,s),clearInterval:l=>clearInterval(l)},An,pd,Ny,db=(Ny=class{constructor(){ce(this,An,ob);ce(this,pd,!1)}setTimeoutProvider(l){te(this,An,l)}setTimeout(l,s){return N(this,An).setTimeout(l,s)}clearTimeout(l){N(this,An).clearTimeout(l)}setInterval(l,s){return N(this,An).setInterval(l,s)}clearInterval(l){N(this,An).clearInterval(l)}},An=new WeakMap,pd=new WeakMap,Ny),il=new db;function fb(l){setTimeout(l,0)}var hb=typeof window>"u"||"Deno"in globalThis;function bt(){}function mb(l,s){return typeof l=="function"?l(s):l}function $o(l){return typeof l=="number"&&l>=0&&l!==1/0}function wy(l,s){return Math.max(l+(s||0)-Date.now(),0)}function Un(l,s){return typeof l=="function"?l(s):l}function Kt(l,s){return typeof l=="function"?l(s):l}function Jp(l,s){const{type:c="all",exact:u,fetchStatus:d,predicate:f,queryKey:p,stale:m}=l;if(p){if(u){if(s.queryHash!==gd(p,s.options))return!1}else if(!js(s.queryKey,p))return!1}if(c!=="all"){const y=s.isActive();if(c==="active"&&!y||c==="inactive"&&y)return!1}return!(typeof m=="boolean"&&s.isStale()!==m||d&&d!==s.state.fetchStatus||f&&!f(s))}function Fp(l,s){const{exact:c,status:u,predicate:d,mutationKey:f}=l;if(f){if(!s.options.mutationKey)return!1;if(c){if(pl(s.options.mutationKey)!==pl(f))return!1}else if(!js(s.options.mutationKey,f))return!1}return!(u&&s.state.status!==u||d&&!d(s))}function gd(l,s){return((s==null?void 0:s.queryKeyHashFn)||pl)(l)}function pl(l){return JSON.stringify(l,(s,c)=>Jo(c)?Object.keys(c).sort().reduce((u,d)=>(u[d]=c[d],u),{}):c)}function js(l,s){return l===s?!0:typeof l!=typeof s?!1:l&&s&&typeof l=="object"&&typeof s=="object"?Object.keys(s).every(c=>js(l[c],s[c])):!1}var pb=Object.prototype.hasOwnProperty;function _y(l,s,c=0){if(l===s)return l;if(c>500)return s;const u=Ip(l)&&Ip(s);if(!u&&!(Jo(l)&&Jo(s)))return s;const f=(u?l:Object.keys(l)).length,p=u?s:Object.keys(s),m=p.length,y=u?new Array(m):{};let g=0;for(let b=0;b<m;b++){const x=u?b:p[b],T=l[x],R=s[x];if(T===R){y[x]=T,(u?b<f:pb.call(l,x))&&g++;continue}if(T===null||R===null||typeof T!="object"||typeof R!="object"){y[x]=R;continue}const w=_y(T,R,c+1);y[x]=w,w===T&&g++}return f===m&&g===f?l:y}function lu(l,s){if(!s||Object.keys(l).length!==Object.keys(s).length)return!1;for(const c in l)if(l[c]!==s[c])return!1;return!0}function Ip(l){return Array.isArray(l)&&l.length===Object.keys(l).length}function Jo(l){if(!Wp(l))return!1;const s=l.constructor;if(s===void 0)return!0;const c=s.prototype;return!(!Wp(c)||!c.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(l)!==Object.prototype)}function Wp(l){return Object.prototype.toString.call(l)==="[object Object]"}function yb(l){return new Promise(s=>{il.setTimeout(s,l)})}function Fo(l,s,c){return typeof c.structuralSharing=="function"?c.structuralSharing(l,s):c.structuralSharing!==!1?_y(l,s):s}function vb(l,s,c=0){const u=[...l,s];return c&&u.length>c?u.slice(1):u}function gb(l,s,c=0){const u=[s,...l];return c&&u.length>c?u.slice(0,-1):u}var xd=Symbol();function qy(l,s){return!l.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!l.queryFn||l.queryFn===xd?()=>Promise.reject(new Error(`Missing queryFn: '${l.queryHash}'`)):l.queryFn}function bd(l,s){return typeof l=="function"?l(...s):!!l}function xb(l,s,c){let u=!1,d;return Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(d??(d=s()),u||(u=!0,d.aborted?c():d.addEventListener("abort",c,{once:!0})),d)}),l}var Ss=(()=>{let l=()=>hb;return{isServer(){return l()},setIsServer(s){l=s}}})();function Io(){let l,s;const c=new Promise((d,f)=>{l=d,s=f});c.status="pending",c.catch(()=>{});function u(d){Object.assign(c,d),delete c.resolve,delete c.reject}return c.resolve=d=>{u({status:"fulfilled",value:d}),l(d)},c.reject=d=>{u({status:"rejected",reason:d}),s(d)},c}var bb=fb;function jb(){let l=[],s=0,c=m=>{m()},u=m=>{m()},d=bb;const f=m=>{s?l.push(m):d(()=>{c(m)})},p=()=>{const m=l;l=[],m.length&&d(()=>{u(()=>{m.forEach(y=>{c(y)})})})};return{batch:m=>{let y;s++;try{y=m()}finally{s--,s||p()}return y},batchCalls:m=>(...y)=>{f(()=>{m(...y)})},schedule:f,setNotifyFunction:m=>{c=m},setBatchNotifyFunction:m=>{u=m},setScheduler:m=>{d=m}}}var lt=jb(),si,On,ri,Ey,Sb=(Ey=class extends bi{constructor(){super();ce(this,si,!0);ce(this,On);ce(this,ri);te(this,ri,s=>{if(typeof window<"u"&&window.addEventListener){const c=()=>s(!0),u=()=>s(!1);return window.addEventListener("online",c,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",u)}}})}onSubscribe(){N(this,On)||this.setEventListener(N(this,ri))}onUnsubscribe(){var s;this.hasListeners()||((s=N(this,On))==null||s.call(this),te(this,On,void 0))}setEventListener(s){var c;te(this,ri,s),(c=N(this,On))==null||c.call(this),te(this,On,s(this.setOnline.bind(this)))}setOnline(s){N(this,si)!==s&&(te(this,si,s),this.listeners.forEach(u=>{u(s)}))}isOnline(){return N(this,si)}},si=new WeakMap,On=new WeakMap,ri=new WeakMap,Ey),iu=new Sb;function Nb(l){return Math.min(1e3*2**l,3e4)}function Uy(l){return(l??"online")==="online"?iu.isOnline():!0}var Wo=class extends Error{constructor(l){super("CancelledError"),this.revert=l==null?void 0:l.revert,this.silent=l==null?void 0:l.silent}};function Ly(l){let s=!1,c=0,u;const d=Io(),f=()=>d.status!=="pending",p=q=>{var H;if(!f()){const U=new Wo(q);T(U),(H=l.onCancel)==null||H.call(l,U)}},m=()=>{s=!0},y=()=>{s=!1},g=()=>vd.isFocused()&&(l.networkMode==="always"||iu.isOnline())&&l.canRun(),b=()=>Uy(l.networkMode)&&l.canRun(),x=q=>{f()||(u==null||u(),d.resolve(q))},T=q=>{f()||(u==null||u(),d.reject(q))},R=()=>new Promise(q=>{var H;u=U=>{(f()||g())&&q(U)},(H=l.onPause)==null||H.call(l)}).then(()=>{var q;u=void 0,f()||(q=l.onContinue)==null||q.call(l)}),w=()=>{if(f())return;let q;const H=c===0?l.initialPromise:void 0;try{q=H??l.fn()}catch(U){q=Promise.reject(U)}Promise.resolve(q).then(x).catch(U=>{var J;if(f())return;const X=l.retry??(Ss.isServer()?0:3),G=l.retryDelay??Nb,V=typeof G=="function"?G(c,U):G,P=X===!0||typeof X=="number"&&c<X||typeof X=="function"&&X(c,U);if(s||!P){T(U);return}c++,(J=l.onFail)==null||J.call(l,c,U),yb(V).then(()=>g()?void 0:R()).then(()=>{s?T(U):w()})})};return{promise:d,status:()=>d.status,cancel:p,continue:()=>(u==null||u(),d),cancelRetry:m,continueRetry:y,canStart:b,start:()=>(b()?w():R().then(w),d)}}var rl,Cy,By=(Cy=class{constructor(){ce(this,rl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$o(this.gcTime)&&te(this,rl,il.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(l){this.gcTime=Math.max(this.gcTime||0,l??(Ss.isServer()?1/0:300*1e3))}clearGcTimeout(){N(this,rl)!==void 0&&(il.clearTimeout(N(this,rl)),te(this,rl,void 0))}},rl=new WeakMap,Cy);function Eb(l){return{onFetch:(s,c)=>{var b,x,T,R,w;const u=s.options,d=(T=(x=(b=s.fetchOptions)==null?void 0:b.meta)==null?void 0:x.fetchMore)==null?void 0:T.direction,f=((R=s.state.data)==null?void 0:R.pages)||[],p=((w=s.state.data)==null?void 0:w.pageParams)||[];let m={pages:[],pageParams:[]},y=0;const g=async()=>{let q=!1;const H=G=>{xb(G,()=>s.signal,()=>q=!0)},U=qy(s.options,s.fetchOptions),X=async(G,V,P)=>{if(q)return Promise.reject(s.signal.reason);if(V==null&&G.pages.length)return Promise.resolve(G);const Z=(()=>{const ue={client:s.client,queryKey:s.queryKey,pageParam:V,direction:P?"backward":"forward",meta:s.options.meta};return H(ue),ue})(),I=await U(Z),{maxPages:O}=s.options,le=P?gb:vb;return{pages:le(G.pages,I,O),pageParams:le(G.pageParams,V,O)}};if(d&&f.length){const G=d==="backward",V=G?Cb:Pp,P={pages:f,pageParams:p},J=V(u,P);m=await X(P,J,G)}else{const G=l??f.length;do{const V=y===0?p[0]??u.initialPageParam:Pp(u,m);if(y>0&&V==null)break;m=await X(m,V),y++}while(y<G)}return m};s.options.persister?s.fetchFn=()=>{var q,H;return(H=(q=s.options).persister)==null?void 0:H.call(q,g,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},c)}:s.fetchFn=g}}}function Pp(l,{pages:s,pageParams:c}){const u=s.length-1;return s.length>0?l.getNextPageParam(s[u],s,c[u],c):void 0}function Cb(l,{pages:s,pageParams:c}){var u;return s.length>0?(u=l.getPreviousPageParam)==null?void 0:u.call(l,s[0],s,c[0],c):void 0}var ui,ul,ci,la,cl,rt,Ts,ol,Yt,Hy,Ya,Ty,Tb=(Ty=class extends By{constructor(s){super();ce(this,Yt);ce(this,ui);ce(this,ul);ce(this,ci);ce(this,la);ce(this,cl);ce(this,rt);ce(this,Ts);ce(this,ol);te(this,ol,!1),te(this,Ts,s.defaultOptions),this.setOptions(s.options),this.observers=[],te(this,cl,s.client),te(this,la,N(this,cl).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,te(this,ul,ty(this.options)),this.state=s.state??N(this,ul),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,ui)}get promise(){var s;return(s=N(this,rt))==null?void 0:s.promise}setOptions(s){if(this.options={...N(this,Ts),...s},s!=null&&s._type&&te(this,ui,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const c=ty(this.options);c.data!==void 0&&(this.setState(ey(c.data,c.dataUpdatedAt)),te(this,ul,c))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,la).remove(this)}setData(s,c){const u=Fo(this.state.data,s,this.options);return je(this,Yt,Ya).call(this,{data:u,type:"success",dataUpdatedAt:c==null?void 0:c.updatedAt,manual:c==null?void 0:c.manual}),u}setState(s){je(this,Yt,Ya).call(this,{type:"setState",state:s})}cancel(s){var u,d;const c=(u=N(this,rt))==null?void 0:u.promise;return(d=N(this,rt))==null||d.cancel(s),c?c.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,ul)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>Kt(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>Un(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!wy(this.state.dataUpdatedAt,s)}onFocus(){var c;const s=this.observers.find(u=>u.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(c=N(this,rt))==null||c.continue()}onOnline(){var c;const s=this.observers.find(u=>u.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(c=N(this,rt))==null||c.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),N(this,la).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(c=>c!==s),this.observers.length||(N(this,rt)&&(N(this,ol)||je(this,Yt,Hy).call(this)?N(this,rt).cancel({revert:!0}):N(this,rt).cancelRetry()),this.scheduleGc()),N(this,la).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,Yt,Ya).call(this,{type:"invalidate"})}async fetch(s,c){var g,b,x,T,R,w,q,H,U,X,G;if(this.state.fetchStatus!=="idle"&&((g=N(this,rt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(c!=null&&c.cancelRefetch))this.cancel({silent:!0});else if(N(this,rt))return N(this,rt).continueRetry(),N(this,rt).promise}if(s&&this.setOptions(s),!this.options.queryFn){const V=this.observers.find(P=>P.options.queryFn);V&&this.setOptions(V.options)}const u=new AbortController,d=V=>{Object.defineProperty(V,"signal",{enumerable:!0,get:()=>(te(this,ol,!0),u.signal)})},f=()=>{const V=qy(this.options,c),J=(()=>{const Z={client:N(this,cl),queryKey:this.queryKey,meta:this.meta};return d(Z),Z})();return te(this,ol,!1),this.options.persister?this.options.persister(V,J,this):V(J)},m=(()=>{const V={fetchOptions:c,options:this.options,queryKey:this.queryKey,client:N(this,cl),state:this.state,fetchFn:f};return d(V),V})(),y=N(this,ui)==="infinite"?Eb(this.options.pages):this.options.behavior;y==null||y.onFetch(m,this),te(this,ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=m.fetchOptions)==null?void 0:b.meta))&&je(this,Yt,Ya).call(this,{type:"fetch",meta:(x=m.fetchOptions)==null?void 0:x.meta}),te(this,rt,Ly({initialPromise:c==null?void 0:c.initialPromise,fn:m.fetchFn,onCancel:V=>{V instanceof Wo&&V.revert&&this.setState({...N(this,ci),fetchStatus:"idle"}),u.abort()},onFail:(V,P)=>{je(this,Yt,Ya).call(this,{type:"failed",failureCount:V,error:P})},onPause:()=>{je(this,Yt,Ya).call(this,{type:"pause"})},onContinue:()=>{je(this,Yt,Ya).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const V=await N(this,rt).start();if(V===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(V),(R=(T=N(this,la).config).onSuccess)==null||R.call(T,V,this),(q=(w=N(this,la).config).onSettled)==null||q.call(w,V,this.state.error,this),V}catch(V){if(V instanceof Wo){if(V.silent)return N(this,rt).promise;if(V.revert){if(this.state.data===void 0)throw V;return this.state.data}}throw je(this,Yt,Ya).call(this,{type:"error",error:V}),(U=(H=N(this,la).config).onError)==null||U.call(H,V,this),(G=(X=N(this,la).config).onSettled)==null||G.call(X,this.state.data,V,this),V}finally{this.scheduleGc()}}},ui=new WeakMap,ul=new WeakMap,ci=new WeakMap,la=new WeakMap,cl=new WeakMap,rt=new WeakMap,Ts=new WeakMap,ol=new WeakMap,Yt=new WeakSet,Hy=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ya=function(s){const c=u=>{switch(s.type){case"failed":return{...u,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...Qy(u.data,this.options),fetchMeta:s.meta??null};case"success":const d={...u,...ey(s.data,s.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,ci,s.manual?d:void 0),d;case"error":const f=s.error;return{...u,error:f,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...s.state}}};this.state=c(this.state),lt.batch(()=>{this.observers.forEach(u=>{u.onQueryUpdate()}),N(this,la).notify({query:this,type:"updated",action:s})})},Ty);function Qy(l,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Uy(s.networkMode)?"fetching":"paused",...l===void 0&&{error:null,status:"pending"}}}function ey(l,s){return{data:l,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ty(l){const s=typeof l.initialData=="function"?l.initialData():l.initialData,c=s!==void 0,u=c?typeof l.initialDataUpdatedAt=="function"?l.initialDataUpdatedAt():l.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:c?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:c?"success":"pending",fetchStatus:"idle"}}var zt,ze,Rs,xt,dl,oi,Ka,zn,As,di,fi,fl,hl,Mn,hi,qe,bs,Po,ed,td,ad,nd,ld,id,Gy,Ry,Rb=(Ry=class extends bi{constructor(s,c){super();ce(this,qe);ce(this,zt);ce(this,ze);ce(this,Rs);ce(this,xt);ce(this,dl);ce(this,oi);ce(this,Ka);ce(this,zn);ce(this,As);ce(this,di);ce(this,fi);ce(this,fl);ce(this,hl);ce(this,Mn);ce(this,hi,new Set);this.options=c,te(this,zt,s),te(this,zn,null),te(this,Ka,Io()),this.bindMethods(),this.setOptions(c)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,ze).addObserver(this),ay(N(this,ze),this.options)?je(this,qe,bs).call(this):this.updateResult(),je(this,qe,ad).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sd(N(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sd(N(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,qe,nd).call(this),je(this,qe,ld).call(this),N(this,ze).removeObserver(this)}setOptions(s){const c=this.options,u=N(this,ze);if(this.options=N(this,zt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,N(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,qe,id).call(this),N(this,ze).setOptions(this.options),c._defaulted&&!lu(this.options,c)&&N(this,zt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,ze),observer:this});const d=this.hasListeners();d&&ny(N(this,ze),u,this.options,c)&&je(this,qe,bs).call(this),this.updateResult(),d&&(N(this,ze)!==u||Kt(this.options.enabled,N(this,ze))!==Kt(c.enabled,N(this,ze))||Un(this.options.staleTime,N(this,ze))!==Un(c.staleTime,N(this,ze)))&&je(this,qe,Po).call(this);const f=je(this,qe,ed).call(this);d&&(N(this,ze)!==u||Kt(this.options.enabled,N(this,ze))!==Kt(c.enabled,N(this,ze))||f!==N(this,Mn))&&je(this,qe,td).call(this,f)}getOptimisticResult(s){const c=N(this,zt).getQueryCache().build(N(this,zt),s),u=this.createResult(c,s);return Ob(this,u)&&(te(this,xt,u),te(this,oi,this.options),te(this,dl,N(this,ze).state)),u}getCurrentResult(){return N(this,xt)}trackResult(s,c){return new Proxy(s,{get:(u,d)=>(this.trackProp(d),c==null||c(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&N(this,Ka).status==="pending"&&N(this,Ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(u,d))})}trackProp(s){N(this,hi).add(s)}getCurrentQuery(){return N(this,ze)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const c=N(this,zt).defaultQueryOptions(s),u=N(this,zt).getQueryCache().build(N(this,zt),c);return u.fetch().then(()=>this.createResult(u,c))}fetch(s){return je(this,qe,bs).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,xt)))}createResult(s,c){var O;const u=N(this,ze),d=this.options,f=N(this,xt),p=N(this,dl),m=N(this,oi),g=s!==u?s.state:N(this,Rs),{state:b}=s;let x={...b},T=!1,R;if(c._optimisticResults){const le=this.hasListeners(),ue=!le&&ay(s,c),de=le&&ny(s,u,c,d);(ue||de)&&(x={...x,...Qy(b.data,s.options)}),c._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:w,errorUpdatedAt:q,status:H}=x;R=x.data;let U=!1;if(c.placeholderData!==void 0&&R===void 0&&H==="pending"){let le;f!=null&&f.isPlaceholderData&&c.placeholderData===(m==null?void 0:m.placeholderData)?(le=f.data,U=!0):le=typeof c.placeholderData=="function"?c.placeholderData((O=N(this,fi))==null?void 0:O.state.data,N(this,fi)):c.placeholderData,le!==void 0&&(H="success",R=Fo(f==null?void 0:f.data,le,c),T=!0)}if(c.select&&R!==void 0&&!U)if(f&&R===(p==null?void 0:p.data)&&c.select===N(this,As))R=N(this,di);else try{te(this,As,c.select),R=c.select(R),R=Fo(f==null?void 0:f.data,R,c),te(this,di,R),te(this,zn,null)}catch(le){te(this,zn,le)}N(this,zn)&&(w=N(this,zn),R=N(this,di),q=Date.now(),H="error");const X=x.fetchStatus==="fetching",G=H==="pending",V=H==="error",P=G&&X,J=R!==void 0,I={status:H,fetchStatus:x.fetchStatus,isPending:G,isSuccess:H==="success",isError:V,isInitialLoading:P,isLoading:P,data:R,dataUpdatedAt:x.dataUpdatedAt,error:w,errorUpdatedAt:q,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:X,isRefetching:X&&!G,isLoadingError:V&&!J,isPaused:x.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:V&&J,isStale:jd(s,c),refetch:this.refetch,promise:N(this,Ka),isEnabled:Kt(c.enabled,s)!==!1};if(this.options.experimental_prefetchInRender){const le=I.data!==void 0,ue=I.status==="error"&&!le,de=pe=>{ue?pe.reject(I.error):le&&pe.resolve(I.data)},se=()=>{const pe=te(this,Ka,I.promise=Io());de(pe)},Ne=N(this,Ka);switch(Ne.status){case"pending":s.queryHash===u.queryHash&&de(Ne);break;case"fulfilled":(ue||I.data!==Ne.value)&&se();break;case"rejected":(!ue||I.error!==Ne.reason)&&se();break}}return I}updateResult(){const s=N(this,xt),c=this.createResult(N(this,ze),this.options);if(te(this,dl,N(this,ze).state),te(this,oi,this.options),N(this,dl).data!==void 0&&te(this,fi,N(this,ze)),lu(c,s))return;te(this,xt,c);const u=()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,f=typeof d=="function"?d():d;if(f==="all"||!f&&!N(this,hi).size)return!0;const p=new Set(f??N(this,hi));return this.options.throwOnError&&p.add("error"),Object.keys(N(this,xt)).some(m=>{const y=m;return N(this,xt)[y]!==s[y]&&p.has(y)})};je(this,qe,Gy).call(this,{listeners:u()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,qe,ad).call(this)}},zt=new WeakMap,ze=new WeakMap,Rs=new WeakMap,xt=new WeakMap,dl=new WeakMap,oi=new WeakMap,Ka=new WeakMap,zn=new WeakMap,As=new WeakMap,di=new WeakMap,fi=new WeakMap,fl=new WeakMap,hl=new WeakMap,Mn=new WeakMap,hi=new WeakMap,qe=new WeakSet,bs=function(s){je(this,qe,id).call(this);let c=N(this,ze).fetch(this.options,s);return s!=null&&s.throwOnError||(c=c.catch(bt)),c},Po=function(){je(this,qe,nd).call(this);const s=Un(this.options.staleTime,N(this,ze));if(Ss.isServer()||N(this,xt).isStale||!$o(s))return;const u=wy(N(this,xt).dataUpdatedAt,s)+1;te(this,fl,il.setTimeout(()=>{N(this,xt).isStale||this.updateResult()},u))},ed=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,ze)):this.options.refetchInterval)??!1},td=function(s){je(this,qe,ld).call(this),te(this,Mn,s),!(Ss.isServer()||Kt(this.options.enabled,N(this,ze))===!1||!$o(N(this,Mn))||N(this,Mn)===0)&&te(this,hl,il.setInterval(()=>{(this.options.refetchIntervalInBackground||vd.isFocused())&&je(this,qe,bs).call(this)},N(this,Mn)))},ad=function(){je(this,qe,Po).call(this),je(this,qe,td).call(this,je(this,qe,ed).call(this))},nd=function(){N(this,fl)!==void 0&&(il.clearTimeout(N(this,fl)),te(this,fl,void 0))},ld=function(){N(this,hl)!==void 0&&(il.clearInterval(N(this,hl)),te(this,hl,void 0))},id=function(){const s=N(this,zt).getQueryCache().build(N(this,zt),this.options);if(s===N(this,ze))return;const c=N(this,ze);te(this,ze,s),te(this,Rs,s.state),this.hasListeners()&&(c==null||c.removeObserver(this),s.addObserver(this))},Gy=function(s){lt.batch(()=>{s.listeners&&this.listeners.forEach(c=>{c(N(this,xt))}),N(this,zt).getQueryCache().notify({query:N(this,ze),type:"observerResultsUpdated"})})},Ry);function Ab(l,s){return Kt(s.enabled,l)!==!1&&l.state.data===void 0&&!(l.state.status==="error"&&Kt(s.retryOnMount,l)===!1)}function ay(l,s){return Ab(l,s)||l.state.data!==void 0&&sd(l,s,s.refetchOnMount)}function sd(l,s,c){if(Kt(s.enabled,l)!==!1&&Un(s.staleTime,l)!=="static"){const u=typeof c=="function"?c(l):c;return u==="always"||u!==!1&&jd(l,s)}return!1}function ny(l,s,c,u){return(l!==s||Kt(u.enabled,l)===!1)&&(!c.suspense||l.state.status!=="error")&&jd(l,c)}function jd(l,s){return Kt(s.enabled,l)!==!1&&l.isStaleByTime(Un(s.staleTime,l))}function Ob(l,s){return!lu(l.getCurrentResult(),s)}var Os,ba,yt,ml,ja,Tn,Ay,zb=(Ay=class extends By{constructor(s){super();ce(this,ja);ce(this,Os);ce(this,ba);ce(this,yt);ce(this,ml);te(this,Os,s.client),this.mutationId=s.mutationId,te(this,yt,s.mutationCache),te(this,ba,[]),this.state=s.state||ky(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){N(this,ba).includes(s)||(N(this,ba).push(s),this.clearGcTimeout(),N(this,yt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){te(this,ba,N(this,ba).filter(c=>c!==s)),this.scheduleGc(),N(this,yt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){N(this,ba).length||(this.state.status==="pending"?this.scheduleGc():N(this,yt).remove(this))}continue(){var s;return((s=N(this,ml))==null?void 0:s.continue())??this.execute(this.state.variables)}async execute(s){var p,m,y,g,b,x,T,R,w,q,H,U,X,G,V,P,J,Z;const c=()=>{je(this,ja,Tn).call(this,{type:"continue"})},u={client:N(this,Os),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,ml,Ly({fn:()=>this.options.mutationFn?this.options.mutationFn(s,u):Promise.reject(new Error("No mutationFn found")),onFail:(I,O)=>{je(this,ja,Tn).call(this,{type:"failed",failureCount:I,error:O})},onPause:()=>{je(this,ja,Tn).call(this,{type:"pause"})},onContinue:c,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,yt).canRun(this)}));const d=this.state.status==="pending",f=!N(this,ml).canStart();try{if(d)c();else{je(this,ja,Tn).call(this,{type:"pending",variables:s,isPaused:f}),N(this,yt).config.onMutate&&await N(this,yt).config.onMutate(s,this,u);const O=await((m=(p=this.options).onMutate)==null?void 0:m.call(p,s,u));O!==this.state.context&&je(this,ja,Tn).call(this,{type:"pending",context:O,variables:s,isPaused:f})}const I=await N(this,ml).start();return await((g=(y=N(this,yt).config).onSuccess)==null?void 0:g.call(y,I,s,this.state.context,this,u)),await((x=(b=this.options).onSuccess)==null?void 0:x.call(b,I,s,this.state.context,u)),await((R=(T=N(this,yt).config).onSettled)==null?void 0:R.call(T,I,null,this.state.variables,this.state.context,this,u)),await((q=(w=this.options).onSettled)==null?void 0:q.call(w,I,null,s,this.state.context,u)),je(this,ja,Tn).call(this,{type:"success",data:I}),I}catch(I){try{await((U=(H=N(this,yt).config).onError)==null?void 0:U.call(H,I,s,this.state.context,this,u))}catch(O){Promise.reject(O)}try{await((G=(X=this.options).onError)==null?void 0:G.call(X,I,s,this.state.context,u))}catch(O){Promise.reject(O)}try{await((P=(V=N(this,yt).config).onSettled)==null?void 0:P.call(V,void 0,I,this.state.variables,this.state.context,this,u))}catch(O){Promise.reject(O)}try{await((Z=(J=this.options).onSettled)==null?void 0:Z.call(J,void 0,I,s,this.state.context,u))}catch(O){Promise.reject(O)}throw je(this,ja,Tn).call(this,{type:"error",error:I}),I}finally{N(this,yt).runNext(this)}}},Os=new WeakMap,ba=new WeakMap,yt=new WeakMap,ml=new WeakMap,ja=new WeakSet,Tn=function(s){const c=u=>{switch(s.type){case"failed":return{...u,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...u,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:s.error,failureCount:u.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=c(this.state),lt.batch(()=>{N(this,ba).forEach(u=>{u.onMutationUpdate(s)}),N(this,yt).notify({mutation:this,type:"updated",action:s})})},Ay);function ky(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xa,ha,zs,Oy,Mb=(Oy=class extends bi{constructor(s={}){super();ce(this,Xa);ce(this,ha);ce(this,zs);this.config=s,te(this,Xa,new Set),te(this,ha,new Map),te(this,zs,0)}build(s,c,u){const d=new zb({client:s,mutationCache:this,mutationId:++Ir(this,zs)._,options:s.defaultMutationOptions(c),state:u});return this.add(d),d}add(s){N(this,Xa).add(s);const c=Wr(s);if(typeof c=="string"){const u=N(this,ha).get(c);u?u.push(s):N(this,ha).set(c,[s])}this.notify({type:"added",mutation:s})}remove(s){if(N(this,Xa).delete(s)){const c=Wr(s);if(typeof c=="string"){const u=N(this,ha).get(c);if(u)if(u.length>1){const d=u.indexOf(s);d!==-1&&u.splice(d,1)}else u[0]===s&&N(this,ha).delete(c)}}this.notify({type:"removed",mutation:s})}canRun(s){const c=Wr(s);if(typeof c=="string"){const u=N(this,ha).get(c),d=u==null?void 0:u.find(f=>f.state.status==="pending");return!d||d===s}else return!0}runNext(s){var u;const c=Wr(s);if(typeof c=="string"){const d=(u=N(this,ha).get(c))==null?void 0:u.find(f=>f!==s&&f.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lt.batch(()=>{N(this,Xa).forEach(s=>{this.notify({type:"removed",mutation:s})}),N(this,Xa).clear(),N(this,ha).clear()})}getAll(){return Array.from(N(this,Xa))}find(s){const c={exact:!0,...s};return this.getAll().find(u=>Fp(c,u))}findAll(s={}){return this.getAll().filter(c=>Fp(s,c))}notify(s){lt.batch(()=>{this.listeners.forEach(c=>{c(s)})})}resumePausedMutations(){const s=this.getAll().filter(c=>c.state.isPaused);return lt.batch(()=>Promise.all(s.map(c=>c.continue().catch(bt))))}},Xa=new WeakMap,ha=new WeakMap,zs=new WeakMap,Oy);function Wr(l){var s;return(s=l.options.scope)==null?void 0:s.id}var Za,Dn,Mt,Va,Ja,eu,rd,zy,Db=(zy=class extends bi{constructor(c,u){super();ce(this,Ja);ce(this,Za);ce(this,Dn);ce(this,Mt);ce(this,Va);te(this,Za,c),this.setOptions(u),this.bindMethods(),je(this,Ja,eu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(c){var d;const u=this.options;this.options=N(this,Za).defaultMutationOptions(c),lu(this.options,u)||N(this,Za).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,Mt),observer:this}),u!=null&&u.mutationKey&&this.options.mutationKey&&pl(u.mutationKey)!==pl(this.options.mutationKey)?this.reset():((d=N(this,Mt))==null?void 0:d.state.status)==="pending"&&N(this,Mt).setOptions(this.options)}onUnsubscribe(){var c;this.hasListeners()||(c=N(this,Mt))==null||c.removeObserver(this)}onMutationUpdate(c){je(this,Ja,eu).call(this),je(this,Ja,rd).call(this,c)}getCurrentResult(){return N(this,Dn)}reset(){var c;(c=N(this,Mt))==null||c.removeObserver(this),te(this,Mt,void 0),je(this,Ja,eu).call(this),je(this,Ja,rd).call(this)}mutate(c,u){var d;return te(this,Va,u),(d=N(this,Mt))==null||d.removeObserver(this),te(this,Mt,N(this,Za).getMutationCache().build(N(this,Za),this.options)),N(this,Mt).addObserver(this),N(this,Mt).execute(c)}},Za=new WeakMap,Dn=new WeakMap,Mt=new WeakMap,Va=new WeakMap,Ja=new WeakSet,eu=function(){var u;const c=((u=N(this,Mt))==null?void 0:u.state)??ky();te(this,Dn,{...c,isPending:c.status==="pending",isSuccess:c.status==="success",isError:c.status==="error",isIdle:c.status==="idle",mutate:this.mutate,reset:this.reset})},rd=function(c){lt.batch(()=>{var u,d,f,p,m,y,g,b;if(N(this,Va)&&this.hasListeners()){const x=N(this,Dn).variables,T=N(this,Dn).context,R={client:N(this,Za),meta:this.options.meta,mutationKey:this.options.mutationKey};if((c==null?void 0:c.type)==="success"){try{(d=(u=N(this,Va)).onSuccess)==null||d.call(u,c.data,x,T,R)}catch(w){Promise.reject(w)}try{(p=(f=N(this,Va)).onSettled)==null||p.call(f,c.data,null,x,T,R)}catch(w){Promise.reject(w)}}else if((c==null?void 0:c.type)==="error"){try{(y=(m=N(this,Va)).onError)==null||y.call(m,c.error,x,T,R)}catch(w){Promise.reject(w)}try{(b=(g=N(this,Va)).onSettled)==null||b.call(g,void 0,c.error,x,T,R)}catch(w){Promise.reject(w)}}}this.listeners.forEach(x=>{x(N(this,Dn))})})},zy),Sa,My,wb=(My=class extends bi{constructor(s={}){super();ce(this,Sa);this.config=s,te(this,Sa,new Map)}build(s,c,u){const d=c.queryKey,f=c.queryHash??gd(d,c);let p=this.get(f);return p||(p=new Tb({client:s,queryKey:d,queryHash:f,options:s.defaultQueryOptions(c),state:u,defaultOptions:s.getQueryDefaults(d)}),this.add(p)),p}add(s){N(this,Sa).has(s.queryHash)||(N(this,Sa).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const c=N(this,Sa).get(s.queryHash);c&&(s.destroy(),c===s&&N(this,Sa).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){lt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return N(this,Sa).get(s)}getAll(){return[...N(this,Sa).values()]}find(s){const c={exact:!0,...s};return this.getAll().find(u=>Jp(c,u))}findAll(s={}){const c=this.getAll();return Object.keys(s).length>0?c.filter(u=>Jp(s,u)):c}notify(s){lt.batch(()=>{this.listeners.forEach(c=>{c(s)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},Sa=new WeakMap,My),Fe,wn,_n,mi,pi,qn,yi,vi,Dy,_b=(Dy=class{constructor(l={}){ce(this,Fe);ce(this,wn);ce(this,_n);ce(this,mi);ce(this,pi);ce(this,qn);ce(this,yi);ce(this,vi);te(this,Fe,l.queryCache||new wb),te(this,wn,l.mutationCache||new Mb),te(this,_n,l.defaultOptions||{}),te(this,mi,new Map),te(this,pi,new Map),te(this,qn,0)}mount(){Ir(this,qn)._++,N(this,qn)===1&&(te(this,yi,vd.subscribe(async l=>{l&&(await this.resumePausedMutations(),N(this,Fe).onFocus())})),te(this,vi,iu.subscribe(async l=>{l&&(await this.resumePausedMutations(),N(this,Fe).onOnline())})))}unmount(){var l,s;Ir(this,qn)._--,N(this,qn)===0&&((l=N(this,yi))==null||l.call(this),te(this,yi,void 0),(s=N(this,vi))==null||s.call(this),te(this,vi,void 0))}isFetching(l){return N(this,Fe).findAll({...l,fetchStatus:"fetching"}).length}isMutating(l){return N(this,wn).findAll({...l,status:"pending"}).length}getQueryData(l){var c;const s=this.defaultQueryOptions({queryKey:l});return(c=N(this,Fe).get(s.queryHash))==null?void 0:c.state.data}ensureQueryData(l){const s=this.defaultQueryOptions(l),c=N(this,Fe).build(this,s),u=c.state.data;return u===void 0?this.fetchQuery(l):(l.revalidateIfStale&&c.isStaleByTime(Un(s.staleTime,c))&&this.prefetchQuery(s),Promise.resolve(u))}getQueriesData(l){return N(this,Fe).findAll(l).map(({queryKey:s,state:c})=>{const u=c.data;return[s,u]})}setQueryData(l,s,c){const u=this.defaultQueryOptions({queryKey:l}),d=N(this,Fe).get(u.queryHash),f=d==null?void 0:d.state.data,p=mb(s,f);if(p!==void 0)return N(this,Fe).build(this,u).setData(p,{...c,manual:!0})}setQueriesData(l,s,c){return lt.batch(()=>N(this,Fe).findAll(l).map(({queryKey:u})=>[u,this.setQueryData(u,s,c)]))}getQueryState(l){var c;const s=this.defaultQueryOptions({queryKey:l});return(c=N(this,Fe).get(s.queryHash))==null?void 0:c.state}removeQueries(l){const s=N(this,Fe);lt.batch(()=>{s.findAll(l).forEach(c=>{s.remove(c)})})}resetQueries(l,s){const c=N(this,Fe);return lt.batch(()=>(c.findAll(l).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...l},s)))}cancelQueries(l,s={}){const c={revert:!0,...s},u=lt.batch(()=>N(this,Fe).findAll(l).map(d=>d.cancel(c)));return Promise.all(u).then(bt).catch(bt)}invalidateQueries(l,s={}){return lt.batch(()=>(N(this,Fe).findAll(l).forEach(c=>{c.invalidate()}),(l==null?void 0:l.refetchType)==="none"?Promise.resolve():this.refetchQueries({...l,type:(l==null?void 0:l.refetchType)??(l==null?void 0:l.type)??"active"},s)))}refetchQueries(l,s={}){const c={...s,cancelRefetch:s.cancelRefetch??!0},u=lt.batch(()=>N(this,Fe).findAll(l).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,c);return c.throwOnError||(f=f.catch(bt)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(u).then(bt)}fetchQuery(l){const s=this.defaultQueryOptions(l);s.retry===void 0&&(s.retry=!1);const c=N(this,Fe).build(this,s);return c.isStaleByTime(Un(s.staleTime,c))?c.fetch(s):Promise.resolve(c.state.data)}prefetchQuery(l){return this.fetchQuery(l).then(bt).catch(bt)}fetchInfiniteQuery(l){return l._type="infinite",this.fetchQuery(l)}prefetchInfiniteQuery(l){return this.fetchInfiniteQuery(l).then(bt).catch(bt)}ensureInfiniteQueryData(l){return l._type="infinite",this.ensureQueryData(l)}resumePausedMutations(){return iu.isOnline()?N(this,wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Fe)}getMutationCache(){return N(this,wn)}getDefaultOptions(){return N(this,_n)}setDefaultOptions(l){te(this,_n,l)}setQueryDefaults(l,s){N(this,mi).set(pl(l),{queryKey:l,defaultOptions:s})}getQueryDefaults(l){const s=[...N(this,mi).values()],c={};return s.forEach(u=>{js(l,u.queryKey)&&Object.assign(c,u.defaultOptions)}),c}setMutationDefaults(l,s){N(this,pi).set(pl(l),{mutationKey:l,defaultOptions:s})}getMutationDefaults(l){const s=[...N(this,pi).values()],c={};return s.forEach(u=>{js(l,u.mutationKey)&&Object.assign(c,u.defaultOptions)}),c}defaultQueryOptions(l){if(l._defaulted)return l;const s={...N(this,_n).queries,...this.getQueryDefaults(l.queryKey),...l,_defaulted:!0};return s.queryHash||(s.queryHash=gd(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===xd&&(s.enabled=!1),s}defaultMutationOptions(l){return l!=null&&l._defaulted?l:{...N(this,_n).mutations,...(l==null?void 0:l.mutationKey)&&this.getMutationDefaults(l.mutationKey),...l,_defaulted:!0}}clear(){N(this,Fe).clear(),N(this,wn).clear()}},Fe=new WeakMap,wn=new WeakMap,_n=new WeakMap,mi=new WeakMap,pi=new WeakMap,qn=new WeakMap,yi=new WeakMap,vi=new WeakMap,Dy),Yy=j.createContext(void 0),ji=l=>{const s=j.useContext(Yy);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},qb=({client:l,children:s})=>(j.useEffect(()=>(l.mount(),()=>{l.unmount()}),[l]),i.jsx(Yy.Provider,{value:l,children:s})),Ky=j.createContext(!1),Ub=()=>j.useContext(Ky);Ky.Provider;function Lb(){let l=!1;return{clearReset:()=>{l=!1},reset:()=>{l=!0},isReset:()=>l}}var Bb=j.createContext(Lb()),Hb=()=>j.useContext(Bb),Qb=(l,s,c)=>{const u=c!=null&&c.state.error&&typeof l.throwOnError=="function"?bd(l.throwOnError,[c.state.error,c]):l.throwOnError;(l.suspense||l.experimental_prefetchInRender||u)&&(s.isReset()||(l.retryOnMount=!1))},Gb=l=>{j.useEffect(()=>{l.clearReset()},[l])},kb=({result:l,errorResetBoundary:s,throwOnError:c,query:u,suspense:d})=>l.isError&&!s.isReset()&&!l.isFetching&&u&&(d&&l.data===void 0||bd(c,[l.error,u])),Yb=l=>{if(l.suspense){const c=d=>d==="static"?d:Math.max(d??1e3,1e3),u=l.staleTime;l.staleTime=typeof u=="function"?(...d)=>c(u(...d)):c(u),typeof l.gcTime=="number"&&(l.gcTime=Math.max(l.gcTime,1e3))}},Kb=(l,s)=>l.isLoading&&l.isFetching&&!s,Xb=(l,s)=>(l==null?void 0:l.suspense)&&s.isPending,ly=(l,s,c)=>s.fetchOptimistic(l).catch(()=>{c.clearReset()});function Zb(l,s,c){var R,w,q,H;const u=Ub(),d=Hb(),f=ji(),p=f.defaultQueryOptions(l);(w=(R=f.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||w.call(R,p);const m=f.getQueryCache().get(p.queryHash),y=l.subscribed!==!1;p._optimisticResults=u?"isRestoring":y?"optimistic":void 0,Yb(p),Qb(p,d,m),Gb(d);const g=!f.getQueryCache().get(p.queryHash),[b]=j.useState(()=>new s(f,p)),x=b.getOptimisticResult(p),T=!u&&y;if(j.useSyncExternalStore(j.useCallback(U=>{const X=T?b.subscribe(lt.batchCalls(U)):bt;return b.updateResult(),X},[b,T]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),j.useEffect(()=>{b.setOptions(p)},[p,b]),Xb(p,x))throw ly(p,b,d);if(kb({result:x,errorResetBoundary:d,throwOnError:p.throwOnError,query:m,suspense:p.suspense}))throw x.error;if((H=(q=f.getDefaultOptions().queries)==null?void 0:q._experimental_afterQuery)==null||H.call(q,p,x),p.experimental_prefetchInRender&&!Ss.isServer()&&Kb(x,u)){const U=g?ly(p,b,d):m==null?void 0:m.promise;U==null||U.catch(bt).finally(()=>{b.updateResult()})}return p.notifyOnChangeProps?x:b.trackResult(x)}function ve(l,s){return Zb(l,Rb)}function Xt(l,s){const c=ji(),[u]=j.useState(()=>new Db(c,l));j.useEffect(()=>{u.setOptions(l)},[u,l]);const d=j.useSyncExternalStore(j.useCallback(p=>u.subscribe(lt.batchCalls(p)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),f=j.useCallback((p,m)=>{u.mutate(p,m).catch(bt)},[u]);if(d.error&&bd(u.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:f,mutateAsync:d.mutate}}const Vb="exellix-memorix-agents.selected-agent",Xy=j.createContext({agentId:"",setAgentId:()=>{},agentQueryParam:void 0});function $b({children:l,storageKey:s=Vb}){const[c,u]=j.useState(()=>localStorage.getItem(s)??""),d=p=>{u(p),p?localStorage.setItem(s,p):localStorage.removeItem(s)},f=j.useMemo(()=>({agentId:c,setAgentId:d,agentQueryParam:c||void 0}),[c]);return i.jsx(Xy.Provider,{value:f,children:l})}function Ia(){return j.useContext(Xy)}const Jb="/api/memorix-agents";async function Ga(l,s,c){const u=`${l.replace(/\/$/,"")}${s}`,d=await fetch(u,c);if(!d.ok){const f=await d.json().catch(()=>({}));throw new Error(String(f.error??`${d.status} ${d.statusText}`))}return d.json()}function Fb(l){return{listAgents:()=>Ga(l,""),getAgent:s=>Ga(l,`/${encodeURIComponent(s)}`),createAgent:s=>Ga(l,"",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),updateAgent:(s,c)=>Ga(l,`/${encodeURIComponent(s)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}),deleteAgent:s=>Ga(l,`/${encodeURIComponent(s)}`,{method:"DELETE"}),listObjectTypeScopes:()=>Ga(l,"/object-types"),bindObjectTypeToAgent:(s,c)=>Ga(l,`/${encodeURIComponent(s)}/bind/${encodeURIComponent(c)}`,{method:"POST"}),unbindObjectTypeFromAgent:(s,c)=>Ga(l,`/${encodeURIComponent(s)}/bind/${encodeURIComponent(c)}`,{method:"DELETE"}),setObjectTypeScopeAgents:(s,c)=>Ga(l,`/object-types/${encodeURIComponent(s)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({agents:c})})}}const iy=new Map;function Zy(l=Jb){const s=l.replace(/\/$/,""),c=iy.get(s);if(c)return c;const u=Fb(s);return iy.set(s,u),u}Zy();function Ib({client:l,apiBase:s,className:c}){const u=j.useMemo(()=>l??Zy(s),[l,s]),{agentId:d,setAgentId:f}=Ia(),[p,m]=j.useState([]),[y,g]=j.useState(!0),b=j.useCallback(async()=>{g(!0);try{m(await u.listAgents())}catch{m([])}finally{g(!1)}},[u]);j.useEffect(()=>{b()},[b]);const x=p.find(R=>R.id===d),T=d&&(p.length===0||x)?d:"";return i.jsxs("div",{className:`memorix-agents-scope${d?" scoped":""}${c?` ${c}`:""}`,title:"Filter views to one agent, or leave unscoped for all agents",children:[i.jsx("span",{className:"memorix-agents-scope-label",children:"Agent"}),i.jsxs("div",{className:"memorix-agents-scope-control",children:[i.jsxs("select",{className:`memorix-agents-scope-select${d?" scoped":""}`,value:T,onChange:R=>f(R.target.value),"aria-label":"Agent context filter",children:[i.jsx("option",{value:"",children:y?"Loading…":"Any agent"}),p.map(R=>i.jsx("option",{value:R.id,children:R.name===R.id?R.id:`${R.name} (${R.id})`},R.id)),d&&!x&&!y&&i.jsx("option",{value:d,children:d})]}),i.jsx("span",{className:"memorix-agents-scope-chevron","aria-hidden":"true",children:"▾"})]}),d&&i.jsx("button",{type:"button",className:"memorix-agents-scope-clear",onClick:()=>f(""),"aria-label":"Show all agents (clear scope)",title:"Any agent",children:"×"})]})}/**
|
|
50
|
+
* react-router v7.18.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Sd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Vy=/^[\\/]{2}/;function Wb(l,s){return s+l.replace(/\\/g,"/")}var sy="popstate";function ry(l){return typeof l=="object"&&l!=null&&"pathname"in l&&"search"in l&&"hash"in l&&"state"in l&&"key"in l}function Pb(l={}){function s(u,d){var g;let f=(g=d.state)==null?void 0:g.masked,{pathname:p,search:m,hash:y}=f||u.location;return ud("",{pathname:p,search:m,hash:y},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function c(u,d){return typeof d=="string"?d:Ns(d)}return tj(s,c,null,l)}function Ve(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function sa(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function ej(){return Math.random().toString(36).substring(2,10)}function uy(l,s){return{usr:l.state,key:l.key,idx:s,masked:l.mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function ud(l,s,c=null,u,d){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?Si(s):s,state:c,key:s&&s.key||u||ej(),mask:d}}function Ns({pathname:l="/",search:s="",hash:c=""}){return s&&s!=="?"&&(l+=s.charAt(0)==="?"?s:"?"+s),c&&c!=="#"&&(l+=c.charAt(0)==="#"?c:"#"+c),l}function Si(l){let s={};if(l){let c=l.indexOf("#");c>=0&&(s.hash=l.substring(c),l=l.substring(0,c));let u=l.indexOf("?");u>=0&&(s.search=l.substring(u),l=l.substring(0,u)),l&&(s.pathname=l)}return s}function tj(l,s,c,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,p=d.history,m="POP",y=null,g=b();g==null&&(g=0,p.replaceState({...p.state,idx:g},""));function b(){return(p.state||{idx:null}).idx}function x(){m="POP";let H=b(),U=H==null?null:H-g;g=H,y&&y({action:m,location:q.location,delta:U})}function T(H,U){m="PUSH";let X=ry(H)?H:ud(q.location,H,U);g=b()+1;let G=uy(X,g),V=q.createHref(X.mask||X);try{p.pushState(G,"",V)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;d.location.assign(V)}f&&y&&y({action:m,location:q.location,delta:1})}function R(H,U){m="REPLACE";let X=ry(H)?H:ud(q.location,H,U);g=b();let G=uy(X,g),V=q.createHref(X.mask||X);p.replaceState(G,"",V),f&&y&&y({action:m,location:q.location,delta:0})}function w(H){return aj(d,H)}let q={get action(){return m},get location(){return l(d,p)},listen(H){if(y)throw new Error("A history only accepts one active listener");return d.addEventListener(sy,x),y=H,()=>{d.removeEventListener(sy,x),y=null}},createHref(H){return s(d,H)},createURL:w,encodeLocation(H){let U=w(H);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:T,replace:R,go(H){return p.go(H)}};return q}function aj(l,s,c=!1){let u="http://localhost";l&&(u=l.location.origin!=="null"?l.location.origin:l.location.href),Ve(u,"No window.location.(origin|href) available to create URL");let d=typeof s=="string"?s:Ns(s);return d=d.replace(/ $/,"%20"),!c&&Vy.test(d)&&(d=u+d),new URL(d,u)}function $y(l,s,c="/"){return nj(l,s,c,!1)}function nj(l,s,c,u,d){let f=typeof s=="string"?Si(s):s,p=Fa(f.pathname||"/",c);if(p==null)return null;let m=lj(l),y=null,g=pj(p);for(let b=0;y==null&&b<m.length;++b)y=mj(m[b],g,u);return y}function lj(l){let s=Jy(l);return ij(s),s}function Jy(l,s=[],c=[],u="",d=!1){let f=(p,m,y=d,g)=>{let b={relativePath:g===void 0?p.path||"":g,caseSensitive:p.caseSensitive===!0,childrenIndex:m,route:p};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&y)return;Ve(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let x=ma([u,b.relativePath]),T=c.concat(b);p.children&&p.children.length>0&&(Ve(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Jy(p.children,s,T,x,y)),!(p.path==null&&!p.index)&&s.push({path:x,score:fj(x,p.index),routesMeta:T.map((R,w)=>{let[q,H]=Wy(R.relativePath,R.caseSensitive,w===T.length-1);return{...R,matcher:q,compiledParams:H}})})};return l.forEach((p,m)=>{var y;if(p.path===""||!((y=p.path)!=null&&y.includes("?")))f(p,m);else for(let g of Fy(p.path))f(p,m,!0,g)}),s}function Fy(l){let s=l.split("/");if(s.length===0)return[];let[c,...u]=s,d=c.endsWith("?"),f=c.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let p=Fy(u.join("/")),m=[];return m.push(...p.map(y=>y===""?f:[f,y].join("/"))),d&&m.push(...p),m.map(y=>l.startsWith("/")&&y===""?"/":y)}function ij(l){l.sort((s,c)=>s.score!==c.score?c.score-s.score:hj(s.routesMeta.map(u=>u.childrenIndex),c.routesMeta.map(u=>u.childrenIndex)))}var sj=/^:[\w-]+$/,rj=3,uj=2,cj=1,oj=10,dj=-2,cy=l=>l==="*";function fj(l,s){let c=l.split("/"),u=c.length;return c.some(cy)&&(u+=dj),s&&(u+=uj),c.filter(d=>!cy(d)).reduce((d,f)=>d+(sj.test(f)?rj:f===""?cj:oj),u)}function hj(l,s){return l.length===s.length&&l.slice(0,-1).every((u,d)=>u===s[d])?l[l.length-1]-s[s.length-1]:0}function mj(l,s,c=!1){let{routesMeta:u}=l,d={},f="/",p=[];for(let m=0;m<u.length;++m){let y=u[m],g=m===u.length-1,b=f==="/"?s:s.slice(f.length)||"/",x={path:y.relativePath,caseSensitive:y.caseSensitive,end:g},T=y.matcher&&y.compiledParams?Iy(x,b,y.matcher,y.compiledParams):su(x,b),R=y.route;if(!T&&g&&c&&!u[u.length-1].route.index&&(T=su({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!T)return null;Object.assign(d,T.params),p.push({params:d,pathname:ma([f,T.pathname]),pathnameBase:gj(ma([f,T.pathnameBase])),route:R}),T.pathnameBase!=="/"&&(f=ma([f,T.pathnameBase]))}return p}function su(l,s){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[c,u]=Wy(l.path,l.caseSensitive,l.end);return Iy(l,s,c,u)}function Iy(l,s,c,u){let d=s.match(c);if(!d)return null;let f=d[0],p=f.replace(/(.)\/+$/,"$1"),m=d.slice(1);return{params:u.reduce((g,{paramName:b,isOptional:x},T)=>{if(b==="*"){let w=m[T]||"";p=f.slice(0,f.length-w.length).replace(/(.)\/+$/,"$1")}const R=m[T];return x&&!R?g[b]=void 0:g[b]=(R||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:p,pattern:l}}function Wy(l,s=!1,c=!0){sa(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let u=[],d="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,m,y,g,b)=>{if(u.push({paramName:m,isOptional:y!=null}),y){let x=b.charAt(g+p.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(u.push({paramName:"*"}),d+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?d+="\\/*$":l!==""&&l!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),u]}function pj(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return sa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),l}}function Fa(l,s){if(s==="/")return l;if(!l.toLowerCase().startsWith(s.toLowerCase()))return null;let c=s.endsWith("/")?s.length-1:s.length,u=l.charAt(c);return u&&u!=="/"?null:l.slice(c)||"/"}function yj(l,s="/"){let{pathname:c,search:u="",hash:d=""}=typeof l=="string"?Si(l):l,f;return c?(c=Py(c),c.startsWith("/")?f=oy(c.substring(1),"/"):f=oy(c,s)):f=s,{pathname:f,search:xj(u),hash:bj(d)}}function oy(l,s){let c=ru(s).split("/");return l.split("/").forEach(d=>{d===".."?c.length>1&&c.pop():d!=="."&&c.push(d)}),c.length>1?c.join("/"):"/"}function Yo(l,s,c,u){return`Cannot include a '${l}' character in a manually specified \`to.${s}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function vj(l){return l.filter((s,c)=>c===0||s.route.path&&s.route.path.length>0)}function Nd(l){let s=vj(l);return s.map((c,u)=>u===s.length-1?c.pathname:c.pathnameBase)}function cu(l,s,c,u=!1){let d;typeof l=="string"?d=Si(l):(d={...l},Ve(!d.pathname||!d.pathname.includes("?"),Yo("?","pathname","search",d)),Ve(!d.pathname||!d.pathname.includes("#"),Yo("#","pathname","hash",d)),Ve(!d.search||!d.search.includes("#"),Yo("#","search","hash",d)));let f=l===""||d.pathname==="",p=f?"/":d.pathname,m;if(p==null)m=c;else{let x=s.length-1;if(!u&&p.startsWith("..")){let T=p.split("/");for(;T[0]==="..";)T.shift(),x-=1;d.pathname=T.join("/")}m=x>=0?s[x]:"/"}let y=yj(d,m),g=p&&p!=="/"&&p.endsWith("/"),b=(f||p===".")&&c.endsWith("/");return!y.pathname.endsWith("/")&&(g||b)&&(y.pathname+="/"),y}var Py=l=>l.replace(/[\\/]{2,}/g,"/"),ma=l=>Py(l.join("/")),ru=l=>l.replace(/\/+$/,""),gj=l=>ru(l).replace(/^\/*/,"/"),xj=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,bj=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,jj=class{constructor(l,s,c,u=!1){this.status=l,this.statusText=s||"",this.internal=u,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Sj(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Nj(l){let s=l.map(c=>c.route.path).filter(Boolean);return ma(s)||"/"}var ev=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tv(l,s){let c=l;if(typeof c!="string"||!Sd.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let u=c,d=!1;if(ev)try{let f=new URL(window.location.href),p=Vy.test(c)?new URL(Wb(c,f.protocol)):new URL(c),m=Fa(p.pathname,s);p.origin===f.origin&&m!=null?c=m+p.search+p.hash:d=!0}catch{sa(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var av=["POST","PUT","PATCH","DELETE"];new Set(av);var Ej=["GET",...av];new Set(Ej);var Cj=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Tj(l){try{return Cj.includes(new URL(l).protocol)}catch{return!1}}var Ni=j.createContext(null);Ni.displayName="DataRouter";var ou=j.createContext(null);ou.displayName="DataRouterState";var nv=j.createContext(!1);function Rj(){return j.useContext(nv)}var lv=j.createContext({isTransitioning:!1});lv.displayName="ViewTransition";var Aj=j.createContext(new Map);Aj.displayName="Fetchers";var Oj=j.createContext(null);Oj.displayName="Await";var Vt=j.createContext(null);Vt.displayName="Navigation";var Ms=j.createContext(null);Ms.displayName="Location";var pa=j.createContext({outlet:null,matches:[],isDataRoute:!1});pa.displayName="Route";var Ed=j.createContext(null);Ed.displayName="RouteError";var iv="REACT_ROUTER_ERROR",zj="REDIRECT",Mj="ROUTE_ERROR_RESPONSE";function Dj(l){if(l.startsWith(`${iv}:${zj}:{`))try{let s=JSON.parse(l.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function wj(l){if(l.startsWith(`${iv}:${Mj}:{`))try{let s=JSON.parse(l.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new jj(s.status,s.statusText,s.data)}catch{}}function _j(l,{relative:s}={}){Ve(Ei(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:u}=j.useContext(Vt),{hash:d,pathname:f,search:p}=ws(l,{relative:s}),m=f;return c!=="/"&&(m=f==="/"?c:ma([c,f])),u.createHref({pathname:m,search:p,hash:d})}function Ei(){return j.useContext(Ms)!=null}function ra(){return Ve(Ei(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(Ms).location}var sv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rv(l){j.useContext(Vt).static||j.useLayoutEffect(l)}function Bn(){let{isDataRoute:l}=j.useContext(pa);return l?Vj():qj()}function qj(){Ve(Ei(),"useNavigate() may be used only in the context of a <Router> component.");let l=j.useContext(Ni),{basename:s,navigator:c}=j.useContext(Vt),{matches:u}=j.useContext(pa),{pathname:d}=ra(),f=JSON.stringify(Nd(u)),p=j.useRef(!1);return rv(()=>{p.current=!0}),j.useCallback((y,g={})=>{if(sa(p.current,sv),!p.current)return;if(typeof y=="number"){c.go(y);return}let b=cu(y,JSON.parse(f),d,g.relative==="path");l==null&&s!=="/"&&(b.pathname=b.pathname==="/"?s:ma([s,b.pathname])),(g.replace?c.replace:c.push)(b,g.state,g)},[s,c,f,d,l])}j.createContext(null);function Ds(){let{matches:l}=j.useContext(pa),s=l[l.length-1];return(s==null?void 0:s.params)??{}}function ws(l,{relative:s}={}){let{matches:c}=j.useContext(pa),{pathname:u}=ra(),d=JSON.stringify(Nd(c));return j.useMemo(()=>cu(l,JSON.parse(d),u,s==="path"),[l,d,u,s])}function Uj(l,s){return uv(l,s)}function uv(l,s,c){var H;Ve(Ei(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=j.useContext(Vt),{matches:d}=j.useContext(pa),f=d[d.length-1],p=f?f.params:{},m=f?f.pathname:"/",y=f?f.pathnameBase:"/",g=f&&f.route;{let U=g&&g.path||"";ov(m,!g||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${U}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let b=ra(),x;if(s){let U=typeof s=="string"?Si(s):s;Ve(y==="/"||((H=U.pathname)==null?void 0:H.startsWith(y)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${U.pathname}" was given in the \`location\` prop.`),x=U}else x=b;let T=x.pathname||"/",R=T;if(y!=="/"){let U=y.replace(/^\//,"").split("/");R="/"+T.replace(/^\//,"").split("/").slice(U.length).join("/")}let w=c&&c.state.matches.length?c.state.matches.map(U=>Object.assign(U,{route:c.manifest[U.route.id]||U.route})):$y(l,{pathname:R});sa(g||w!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),sa(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let q=Gj(w&&w.map(U=>Object.assign({},U,{params:Object.assign({},p,U.params),pathname:ma([y,u.encodeLocation?u.encodeLocation(U.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?y:ma([y,u.encodeLocation?u.encodeLocation(U.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),d,c);return s&&q?j.createElement(Ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...x},navigationType:"POP"}},q):q}function Lj(){let l=Zj(),s=Sj(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),c=l instanceof Error?l.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},p=null;return console.error("Error handled by React Router default ErrorBoundary:",l),p=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:f},"ErrorBoundary")," or"," ",j.createElement("code",{style:f},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},s),c?j.createElement("pre",{style:d},c):null,p)}var Bj=j.createElement(Lj,null),cv=class extends j.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,s){return s.location!==l.location||s.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:s.error,location:s.location,revalidation:l.revalidation||s.revalidation}}componentDidCatch(l,s){this.props.onError?this.props.onError(l,s):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const c=wj(l.digest);c&&(l=c)}let s=l!==void 0?j.createElement(pa.Provider,{value:this.props.routeContext},j.createElement(Ed.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?j.createElement(Hj,{error:l},s):s}};cv.contextType=nv;var Ko=new WeakMap;function Hj({children:l,error:s}){let{basename:c}=j.useContext(Vt);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let u=Dj(s.digest);if(u){let d=Ko.get(s);if(d)throw d;let f=tv(u.location,c),p=f.absoluteURL||f.to;if(Tj(p))throw new Error("Invalid redirect location");if(ev&&!Ko.get(s))if(f.isExternal||u.reloadDocument)window.location.href=p;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:u.replace}));throw Ko.set(s,m),m}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p}`})}}return l}function Qj({routeContext:l,match:s,children:c}){let u=j.useContext(Ni);return u&&u.static&&u.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=s.route.id),j.createElement(pa.Provider,{value:l},c)}function Gj(l,s=[],c){let u=c==null?void 0:c.state;if(l==null){if(!u)return null;if(u.errors)l=u.matches;else if(s.length===0&&!u.initialized&&u.matches.length>0)l=u.matches;else return null}let d=l,f=u==null?void 0:u.errors;if(f!=null){let b=d.findIndex(x=>x.route.id&&(f==null?void 0:f[x.route.id])!==void 0);Ve(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let p=!1,m=-1;if(c&&u){p=u.renderFallback;for(let b=0;b<d.length;b++){let x=d[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(m=b),x.route.id){let{loaderData:T,errors:R}=u,w=x.route.loader&&!T.hasOwnProperty(x.route.id)&&(!R||R[x.route.id]===void 0);if(x.route.lazy||w){c.isStatic&&(p=!0),m>=0?d=d.slice(0,m+1):d=[d[0]];break}}}}let y=c==null?void 0:c.onError,g=u&&y?(b,x)=>{var T,R;y(b,{location:u.location,params:((R=(T=u.matches)==null?void 0:T[0])==null?void 0:R.params)??{},pattern:Nj(u.matches),errorInfo:x})}:void 0;return d.reduceRight((b,x,T)=>{let R,w=!1,q=null,H=null;u&&(R=f&&x.route.id?f[x.route.id]:void 0,q=x.route.errorElement||Bj,p&&(m<0&&T===0?(ov("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,H=null):m===T&&(w=!0,H=x.route.hydrateFallbackElement||null)));let U=s.concat(d.slice(0,T+1)),X=()=>{let G;return R?G=q:w?G=H:x.route.Component?G=j.createElement(x.route.Component,null):x.route.element?G=x.route.element:G=b,j.createElement(Qj,{match:x,routeContext:{outlet:b,matches:U,isDataRoute:u!=null},children:G})};return u&&(x.route.ErrorBoundary||x.route.errorElement||T===0)?j.createElement(cv,{location:u.location,revalidation:u.revalidation,component:q,error:R,children:X(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:g}):X()},null)}function Cd(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kj(l){let s=j.useContext(Ni);return Ve(s,Cd(l)),s}function Yj(l){let s=j.useContext(ou);return Ve(s,Cd(l)),s}function Kj(l){let s=j.useContext(pa);return Ve(s,Cd(l)),s}function Td(l){let s=Kj(l),c=s.matches[s.matches.length-1];return Ve(c.route.id,`${l} can only be used on routes that contain a unique "id"`),c.route.id}function Xj(){return Td("useRouteId")}function Zj(){var u;let l=j.useContext(Ed),s=Yj("useRouteError"),c=Td("useRouteError");return l!==void 0?l:(u=s.errors)==null?void 0:u[c]}function Vj(){let{router:l}=kj("useNavigate"),s=Td("useNavigate"),c=j.useRef(!1);return rv(()=>{c.current=!0}),j.useCallback(async(d,f={})=>{sa(c.current,sv),c.current&&(typeof d=="number"?await l.navigate(d):await l.navigate(d,{fromRouteId:s,...f}))},[l,s])}var dy={};function ov(l,s,c){!s&&!dy[l]&&(dy[l]=!0,sa(!1,c))}j.memo($j);function $j({routes:l,manifest:s,future:c,state:u,isStatic:d,onError:f}){return uv(l,void 0,{manifest:s,state:u,isStatic:d,onError:f})}function ka({to:l,replace:s,state:c,relative:u}){Ve(Ei(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=j.useContext(Vt);sa(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=j.useContext(pa),{pathname:p}=ra(),m=Bn(),y=cu(l,Nd(f),p,u==="path"),g=JSON.stringify(y);return j.useEffect(()=>{m(JSON.parse(g),{replace:s,state:c,relative:u})},[m,g,u,s,c]),null}function Ze(l){Ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Jj({basename:l="/",children:s=null,location:c,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:p}){Ve(!Ei(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=l.replace(/^\/*/,"/"),y=j.useMemo(()=>({basename:m,navigator:d,static:f,useTransitions:p,future:{}}),[m,d,f,p]);typeof c=="string"&&(c=Si(c));let{pathname:g="/",search:b="",hash:x="",state:T=null,key:R="default",mask:w}=c,q=j.useMemo(()=>{let H=Fa(g,m);return H==null?null:{location:{pathname:H,search:b,hash:x,state:T,key:R,mask:w},navigationType:u}},[m,g,b,x,T,R,u,w]);return sa(q!=null,`<Router basename="${m}"> is not able to match the URL "${g}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),q==null?null:j.createElement(Vt.Provider,{value:y},j.createElement(Ms.Provider,{children:s,value:q}))}function Fj({children:l,location:s}){return Uj(cd(l),s)}function cd(l,s=[]){let c=[];return j.Children.forEach(l,(u,d)=>{if(!j.isValidElement(u))return;let f=[...s,d];if(u.type===j.Fragment){c.push.apply(c,cd(u.props.children,f));return}Ve(u.type===Ze,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ve(!u.props.index||!u.props.children,"An index route cannot have child routes.");let p={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(p.children=cd(u.props.children,f)),c.push(p)}),c}var tu="get",au="application/x-www-form-urlencoded";function du(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Ij(l){return du(l)&&l.tagName.toLowerCase()==="button"}function Wj(l){return du(l)&&l.tagName.toLowerCase()==="form"}function Pj(l){return du(l)&&l.tagName.toLowerCase()==="input"}function e0(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function t0(l,s){return l.button===0&&(!s||s==="_self")&&!e0(l)}function od(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((s,c)=>{let u=l[c];return s.concat(Array.isArray(u)?u.map(d=>[c,d]):[[c,u]])},[]))}function a0(l,s){let c=od(l);return s&&s.forEach((u,d)=>{c.has(d)||s.getAll(d).forEach(f=>{c.append(d,f)})}),c}var Pr=null;function n0(){if(Pr===null)try{new FormData(document.createElement("form"),0),Pr=!1}catch{Pr=!0}return Pr}var l0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xo(l){return l!=null&&!l0.has(l)?(sa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${au}"`),null):l}function i0(l,s){let c,u,d,f,p;if(Wj(l)){let m=l.getAttribute("action");u=m?Fa(m,s):null,c=l.getAttribute("method")||tu,d=Xo(l.getAttribute("enctype"))||au,f=new FormData(l)}else if(Ij(l)||Pj(l)&&(l.type==="submit"||l.type==="image")){let m=l.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=l.getAttribute("formaction")||m.getAttribute("action");if(u=y?Fa(y,s):null,c=l.getAttribute("formmethod")||m.getAttribute("method")||tu,d=Xo(l.getAttribute("formenctype"))||Xo(m.getAttribute("enctype"))||au,f=new FormData(m,l),!n0()){let{name:g,type:b,value:x}=l;if(b==="image"){let T=g?`${g}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else g&&f.append(g,x)}}else{if(du(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=tu,u=null,d=au,p=l}return f&&d==="text/plain"&&(p=f,f=void 0),{action:u,method:c.toLowerCase(),encType:d,formData:f,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rd(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function dv(l,s,c,u){let d=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return c?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:s&&Fa(d.pathname,s)==="/"?d.pathname=`${ru(s)}/_root.${u}`:d.pathname=`${ru(d.pathname)}.${u}`,d}async function s0(l,s){if(l.id in s)return s[l.id];try{let c=await import(l.module);return s[l.id]=c,c}catch(c){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function r0(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function u0(l,s,c){let u=await Promise.all(l.map(async d=>{let f=s.routes[d.route.id];if(f){let p=await s0(f,c);return p.links?p.links():[]}return[]}));return f0(u.flat(1).filter(r0).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function fy(l,s,c,u,d,f){let p=(y,g)=>c[g]?y.route.id!==c[g].route.id:!0,m=(y,g)=>{var b;return c[g].pathname!==y.pathname||((b=c[g].route.path)==null?void 0:b.endsWith("*"))&&c[g].params["*"]!==y.params["*"]};return f==="assets"?s.filter((y,g)=>p(y,g)||m(y,g)):f==="data"?s.filter((y,g)=>{var x;let b=u.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(p(y,g)||m(y,g))return!0;if(y.route.shouldRevalidate){let T=y.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((x=c[0])==null?void 0:x.params)||{},nextUrl:new URL(l,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function c0(l,s,{includeHydrateFallback:c}={}){return o0(l.map(u=>{let d=s.routes[u.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),c&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function o0(l){return[...new Set(l)]}function d0(l){let s={},c=Object.keys(l).sort();for(let u of c)s[u]=l[u];return s}function f0(l,s){let c=new Set;return new Set(s),l.reduce((u,d)=>{let f=JSON.stringify(d0(d));return c.has(f)||(c.add(f),u.push({key:f,link:d})),u},[])}function Ad(){let l=j.useContext(Ni);return Rd(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function h0(){let l=j.useContext(ou);return Rd(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Od=j.createContext(void 0);Od.displayName="FrameworkContext";function fu(){let l=j.useContext(Od);return Rd(l,"You must render this element inside a <HydratedRouter> element"),l}function m0(l,s){let c=j.useContext(Od),[u,d]=j.useState(!1),[f,p]=j.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:g,onMouseLeave:b,onTouchStart:x}=s,T=j.useRef(null);j.useEffect(()=>{if(l==="render"&&p(!0),l==="viewport"){let q=U=>{U.forEach(X=>{p(X.isIntersecting)})},H=new IntersectionObserver(q,{threshold:.5});return T.current&&H.observe(T.current),()=>{H.disconnect()}}},[l]),j.useEffect(()=>{if(u){let q=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(q)}}},[u]);let R=()=>{d(!0)},w=()=>{d(!1),p(!1)};return c?l!=="intent"?[f,T,{}]:[f,T,{onFocus:xs(m,R),onBlur:xs(y,w),onMouseEnter:xs(g,R),onMouseLeave:xs(b,w),onTouchStart:xs(x,R)}]:[!1,T,{}]}function xs(l,s){return c=>{l&&l(c),c.defaultPrevented||s(c)}}function p0({page:l,...s}){let c=Rj(),{nonce:u}=fu(),{router:d}=Ad(),f=j.useMemo(()=>$y(d.routes,l,d.basename),[d.routes,l,d.basename]);return f?(s.nonce==null&&u&&(s={...s,nonce:u}),c?j.createElement(v0,{page:l,matches:f,...s}):j.createElement(g0,{page:l,matches:f,...s})):null}function y0(l){let{manifest:s,routeModules:c}=fu(),[u,d]=j.useState([]);return j.useEffect(()=>{let f=!1;return u0(l,s,c).then(p=>{f||d(p)}),()=>{f=!0}},[l,s,c]),u}function v0({page:l,matches:s,...c}){let u=ra(),{future:d}=fu(),{basename:f}=Ad(),p=j.useMemo(()=>{if(l===u.pathname+u.search+u.hash)return[];let m=dv(l,f,d.v8_trailingSlashAwareDataRequests,"rsc"),y=!1,g=[];for(let b of s)typeof b.route.shouldRevalidate=="function"?y=!0:g.push(b.route.id);return y&&g.length>0&&m.searchParams.set("_routes",g.join(",")),[m.pathname+m.search]},[f,d.v8_trailingSlashAwareDataRequests,l,u,s]);return j.createElement(j.Fragment,null,p.map(m=>j.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...c})))}function g0({page:l,matches:s,...c}){let u=ra(),{future:d,manifest:f,routeModules:p}=fu(),{basename:m}=Ad(),{loaderData:y,matches:g}=h0(),b=j.useMemo(()=>fy(l,s,g,f,u,"data"),[l,s,g,f,u]),x=j.useMemo(()=>fy(l,s,g,f,u,"assets"),[l,s,g,f,u]),T=j.useMemo(()=>{if(l===u.pathname+u.search+u.hash)return[];let q=new Set,H=!1;if(s.forEach(X=>{var V;let G=f.routes[X.route.id];!G||!G.hasLoader||(!b.some(P=>P.route.id===X.route.id)&&X.route.id in y&&((V=p[X.route.id])!=null&&V.shouldRevalidate)||G.hasClientLoader?H=!0:q.add(X.route.id))}),q.size===0)return[];let U=dv(l,m,d.v8_trailingSlashAwareDataRequests,"data");return H&&q.size>0&&U.searchParams.set("_routes",s.filter(X=>q.has(X.route.id)).map(X=>X.route.id).join(",")),[U.pathname+U.search]},[m,d.v8_trailingSlashAwareDataRequests,y,u,f,b,s,l,p]),R=j.useMemo(()=>c0(x,f),[x,f]),w=y0(x);return j.createElement(j.Fragment,null,T.map(q=>j.createElement("link",{key:q,rel:"prefetch",as:"fetch",href:q,...c})),R.map(q=>j.createElement("link",{key:q,rel:"modulepreload",href:q,...c})),w.map(({key:q,link:H})=>j.createElement("link",{key:q,nonce:c.nonce,...H,crossOrigin:H.crossOrigin??c.crossOrigin})))}function x0(...l){return s=>{l.forEach(c=>{typeof c=="function"?c(s):c!=null&&(c.current=s)})}}var b0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{b0&&(window.__reactRouterVersion="7.18.0")}catch{}function j0({basename:l,children:s,useTransitions:c,window:u}){let d=j.useRef();d.current==null&&(d.current=Pb({window:u,v5Compat:!0}));let f=d.current,[p,m]=j.useState({action:f.action,location:f.location}),y=j.useCallback(g=>{c===!1?m(g):j.startTransition(()=>m(g))},[c]);return j.useLayoutEffect(()=>f.listen(y),[f,y]),j.createElement(Jj,{basename:l,children:s,location:p.location,navigationType:p.action,navigator:f,useTransitions:c})}var Ke=j.forwardRef(function({onClick:s,discover:c="render",prefetch:u="none",relative:d,reloadDocument:f,replace:p,mask:m,state:y,target:g,to:b,preventScrollReset:x,viewTransition:T,defaultShouldRevalidate:R,...w},q){let{basename:H,navigator:U,useTransitions:X}=j.useContext(Vt),G=typeof b=="string"&&Sd.test(b),V=tv(b,H);b=V.to;let P=_j(b,{relative:d}),J=ra(),Z=null;if(m){let pe=cu(m,[],J.mask?J.mask.pathname:"/",!0);H!=="/"&&(pe.pathname=pe.pathname==="/"?H:ma([H,pe.pathname])),Z=U.createHref(pe)}let[I,O,le]=m0(u,w),ue=E0(b,{replace:p,mask:m,state:y,target:g,preventScrollReset:x,relative:d,viewTransition:T,defaultShouldRevalidate:R,useTransitions:X});function de(pe){s&&s(pe),pe.defaultPrevented||ue(pe)}let se=!(V.isExternal||f),Ne=j.createElement("a",{...w,...le,href:(se?Z:void 0)||V.absoluteURL||P,onClick:se?de:s,ref:x0(q,O),target:g,"data-discover":!G&&c==="render"?"true":void 0});return I&&!G?j.createElement(j.Fragment,null,Ne,j.createElement(p0,{page:P})):Ne});Ke.displayName="Link";var ll=j.forwardRef(function({"aria-current":s="page",caseSensitive:c=!1,className:u="",end:d=!1,style:f,to:p,viewTransition:m,children:y,...g},b){let x=ws(p,{relative:g.relative}),T=ra(),R=j.useContext(ou),{navigator:w,basename:q}=j.useContext(Vt),H=R!=null&&O0(x)&&m===!0,U=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,X=T.pathname,G=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;c||(X=X.toLowerCase(),G=G?G.toLowerCase():null,U=U.toLowerCase()),G&&q&&(G=Fa(G,q)||G);const V=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let P=X===U||!d&&X.startsWith(U)&&X.charAt(V)==="/",J=G!=null&&(G===U||!d&&G.startsWith(U)&&G.charAt(U.length)==="/"),Z={isActive:P,isPending:J,isTransitioning:H},I=P?s:void 0,O;typeof u=="function"?O=u(Z):O=[u,P?"active":null,J?"pending":null,H?"transitioning":null].filter(Boolean).join(" ");let le=typeof f=="function"?f(Z):f;return j.createElement(Ke,{...g,"aria-current":I,className:O,ref:b,style:le,to:p,viewTransition:m},typeof y=="function"?y(Z):y)});ll.displayName="NavLink";var S0=j.forwardRef(({discover:l="render",fetcherKey:s,navigate:c,reloadDocument:u,replace:d,state:f,method:p=tu,action:m,onSubmit:y,relative:g,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:T,...R},w)=>{let{useTransitions:q}=j.useContext(Vt),H=R0(),U=A0(m,{relative:g}),X=p.toLowerCase()==="get"?"get":"post",G=typeof m=="string"&&Sd.test(m),V=P=>{if(y&&y(P),P.defaultPrevented)return;P.preventDefault();let J=P.nativeEvent.submitter,Z=(J==null?void 0:J.getAttribute("formmethod"))||p,I=()=>H(J||P.currentTarget,{fetcherKey:s,method:Z,navigate:c,replace:d,state:f,relative:g,preventScrollReset:b,viewTransition:x,defaultShouldRevalidate:T});q&&c!==!1?j.startTransition(()=>I()):I()};return j.createElement("form",{ref:w,method:X,action:U,onSubmit:u?y:V,...R,"data-discover":!G&&l==="render"?"true":void 0})});S0.displayName="Form";function N0(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fv(l){let s=j.useContext(Ni);return Ve(s,N0(l)),s}function E0(l,{target:s,replace:c,mask:u,state:d,preventScrollReset:f,relative:p,viewTransition:m,defaultShouldRevalidate:y,useTransitions:g}={}){let b=Bn(),x=ra(),T=ws(l,{relative:p});return j.useCallback(R=>{if(t0(R,s)){R.preventDefault();let w=c!==void 0?c:Ns(x)===Ns(T),q=()=>b(l,{replace:w,mask:u,state:d,preventScrollReset:f,relative:p,viewTransition:m,defaultShouldRevalidate:y});g?j.startTransition(()=>q()):q()}},[x,b,T,c,u,d,s,l,f,p,m,y,g])}function hu(l){sa(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let s=j.useRef(od(l)),c=j.useRef(!1),u=ra(),d=j.useMemo(()=>a0(u.search,c.current?null:s.current),[u.search]),f=Bn(),p=j.useCallback((m,y)=>{const g=od(typeof m=="function"?m(new URLSearchParams(d)):m);c.current=!0,f("?"+g,y)},[f,d]);return[d,p]}var C0=0,T0=()=>`__${String(++C0)}__`;function R0(){let{router:l}=fv("useSubmit"),{basename:s}=j.useContext(Vt),c=Xj(),u=l.fetch,d=l.navigate;return j.useCallback(async(f,p={})=>{let{action:m,method:y,encType:g,formData:b,body:x}=i0(f,s);if(p.navigate===!1){let T=p.fetcherKey||T0();await u(T,c,p.action||m,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:b,body:x,formMethod:p.method||y,formEncType:p.encType||g,flushSync:p.flushSync})}else await d(p.action||m,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:b,body:x,formMethod:p.method||y,formEncType:p.encType||g,replace:p.replace,state:p.state,fromRouteId:c,flushSync:p.flushSync,viewTransition:p.viewTransition})},[u,d,s,c])}function A0(l,{relative:s}={}){let{basename:c}=j.useContext(Vt),u=j.useContext(pa);Ve(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...ws(l||".",{relative:s})},p=ra();if(l==null){f.search=p.search;let m=new URLSearchParams(f.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(x=>x).forEach(x=>m.append("index",x));let b=m.toString();f.search=b?`?${b}`:""}}return(!l||l===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(f.pathname=f.pathname==="/"?c:ma([c,f.pathname])),Ns(f)}function O0(l,{relative:s}={}){let c=j.useContext(lv);Ve(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=fv("useViewTransitionState"),d=ws(l,{relative:s});if(!c.isTransitioning)return!1;let f=Fa(c.currentLocation.pathname,u)||c.currentLocation.pathname,p=Fa(c.nextLocation.pathname,u)||c.nextLocation.pathname;return su(d.pathname,p)!=null||su(d.pathname,f)!=null}const z0="/api";async function gi(l,s,c){var p;const u=typeof window<"u"&&((p=window.location)!=null&&p.origin)&&window.location.origin!=="null"?window.location.origin:"http://localhost",d=new URL(z0+l,u);if(c)for(const[m,y]of Object.entries(c))y!==void 0&&y!==""&&d.searchParams.set(m,String(y));const f=await fetch(d.toString(),s);if(!f.ok){const m=await f.json().catch(()=>({}));throw new Error(String(m.error??`${f.status} ${f.statusText}`))}return f.json()}const Se=(l,s)=>gi(l,void 0,s),gt=(l,s)=>gi(l,{method:"POST",headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0}),hy=(l,s)=>gi(l,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),M0=l=>gi(l,{method:"DELETE"}),D0={health:()=>Se("/health"),ready:()=>Se("/ready"),config:()=>Se("/config"),queueSettings:()=>Se("/settings"),saveQueueSettings:l=>hy("/settings",l),pushQueue:l=>gt("/queue/push",l),executeRun:(l,s)=>gt(`/factory-runs/${encodeURIComponent(l)}/execute`,s===void 0?{}:{force:s}),queueRunNext:l=>gt(`/factory-runs/${encodeURIComponent(l)}/queue-next`),statsByStatus:l=>Se("/stats/by-status",{jobDefId:l}),throughput:l=>Se("/stats/throughput",l),stuck:l=>Se("/stats/stuck",l),runs:l=>Se("/runs",l),recentFailures:l=>Se("/runs/recent-failures",l),run:l=>Se(`/runs/${l}`),runEvents:l=>Se(`/runs/${l}/events`),runActivities:(l,s)=>Se(`/factory-runs/${encodeURIComponent(l)}/activities`,s?{limit:s}:void 0),retryRun:l=>gt(`/factory-runs/${l}/retry`),cancelRun:l=>gt(`/factory-runs/${l}/cancel`),itemRuns:l=>Se(`/items/${l}/runs`),itemGraph:l=>Se(`/items/${l}/graph`),filters:()=>Se("/meta/filters"),compatibleGraphs:l=>Se("/meta/graphs",l),descriptors:()=>Se("/descriptors"),entitySources:l=>Se(`/entities/${encodeURIComponent(l)}/sources`),entityRelations:l=>Se(`/entities/${encodeURIComponent(l)}/relations`),entityRecordSamples:(l,s)=>Se(`/entities/${encodeURIComponent(l)}/record-samples`,{...s,random:s.random?"1":void 0}),jobDefs:()=>Se("/job-defs"),jobDef:l=>Se(`/job-defs/${l}`),saveJobDef:l=>gt("/job-defs",l),updateJobDef:(l,s)=>hy(`/job-defs/${l}`,s),deleteJobDef:l=>M0(`/job-defs/${l}`),enqueue:l=>gt("/jobs/enqueue",l),previewContext:l=>gt("/context/preview",l),executeGraph:l=>gt("/graphs/execute",l),records:l=>Se("/records",l),recordStats:l=>Se("/records/stats",l),recordGraphRuns:(l,s)=>Se(`/records/${encodeURIComponent(l)}/graph-runs`,s),listEntities:l=>Se("/entities/summary",l?{agent:l}:void 0),entitySummary:l=>Se(`/entities/${encodeURIComponent(l)}/summary`),listNarratives:l=>Se("/narratives",l?{entity:l}:void 0),graphsForEntity:l=>Se("/graphs",{entity:l}),coreRecords:l=>{var s;return Se("/core-records",{entity:l.entity,collection:l.collection,narratives:(s=l.narratives)==null?void 0:s.join(","),processingGraphId:l.processingGraphId,processingCondition:l.processingCondition,search:l.search,page:l.page,pageSize:l.pageSize})},coreRecord:(l,s)=>Se(`/core-records/${encodeURIComponent(l)}/${encodeURIComponent(s)}`),previewMatching:l=>gt("/selection/preview",l),listWork:l=>Se("/work",l?{agent:l}:void 0),work:l=>Se(`/work/${l}`),createWork:l=>gt("/work",l),setWorkStatus:(l,s)=>gi(`/work/${l}/status`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:s})}),updateWork:(l,s)=>gi(`/work/${l}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),runEvaluation:l=>gt(`/work/${l}/evaluate`),workEvaluations:l=>Se(`/work/${l}/evaluations`),listBatches:()=>Se("/batches"),batch:l=>Se(`/batches/${l}`),queueBatch:l=>gt("/batches",l),queueSingle:l=>gt("/on-demand/single",l),assemblerProperties:l=>Se("/assembler/properties",l),assemblerPreview:l=>gt("/assembler/preview",l),factoryRuns:l=>Se("/factory-runs",l),factoryRun:l=>Se(`/factory-runs/${l}`),runStatusCounts:(l,s)=>Se("/factory-runs/status-counts",{scope:l,agent:s})},re=D0,hv={configured:{label:"Configured",tone:"pending"},evaluating:{label:"Evaluating",tone:"running"},matched:{label:"Matched",tone:"pending"},queued:{label:"Queued",tone:"pending"},pending:{label:"Pending",tone:"pending"},running:{label:"Running",tone:"running"},succeeded:{label:"Succeeded",tone:"done"},done:{label:"Done",tone:"done"},failed:{label:"Failed",tone:"failed"},cancelled:{label:"Cancelled",tone:"cancelled"},skipped:{label:"Skipped",tone:"cancelled"},excluded:{label:"Excluded",tone:"blocked"},blocked:{label:"Blocked",tone:"blocked"},active:{label:"Active",tone:"running"},inactive:{label:"Inactive",tone:"cancelled"},completed:{label:"Completed",tone:"done"},partial:{label:"Partial",tone:"blocked"},"not-processed":{label:"Not processed",tone:"pending"},in_progress:{label:"In progress",tone:"running"},never:{label:"Never",tone:"pending"},unknown:{label:"Unknown",tone:"cancelled"}};function w0(l){var s;return((s=hv[l])==null?void 0:s.label)??l.replace(/[-_]/g," ")}function _0(l){var s;return((s=hv[l])==null?void 0:s.tone)??"pending"}function jt({status:l}){return i.jsx("span",{className:`badge badge-${_0(l)}`,children:w0(l)})}const q0=[{label:"5s",ms:5e3},{label:"15s",ms:15e3},{label:"30s",ms:3e4},{label:"Off",ms:0}];function mv({onRefresh:l,intervalMs:s=5e3,lastRefreshed:c}){const[u,d]=j.useState(s),[f,p]=j.useState(!1),m=j.useRef(null);return j.useEffect(()=>{if(!(f||u===0))return m.current=setTimeout(()=>l(),u),()=>{m.current&&clearTimeout(m.current)}},[l,u,f,c]),i.jsxs("div",{className:"refresh-control",children:[i.jsx("span",{className:`refresh-dot${f||u===0?" paused":""}`}),c&&i.jsx("span",{children:c.toLocaleTimeString()}),i.jsx("select",{value:u,onChange:y=>{const g=Number(y.target.value);d(g),p(g===0)},style:{minWidth:"unset",width:60},children:q0.map(({label:y,ms:g})=>i.jsx("option",{value:g,children:y},g))}),i.jsx("button",{onClick:()=>{p(y=>!y)},title:f?"Resume auto-refresh":"Pause auto-refresh",style:{padding:"3px 8px"},children:f?"▶":"⏸"}),i.jsx("button",{onClick:l,title:"Refresh now",style:{padding:"3px 8px"},children:"↻"})]})}function U0({buckets:l}){if(!l.length)return i.jsx("div",{className:"text-dim",style:{fontSize:12,padding:"8px 0"},children:"No throughput data"});const s=new Map;for(const d of l)s.set(d.bucket,(s.get(d.bucket)??0)+d.count);const c=[...s.entries()].sort((d,f)=>d[0].localeCompare(f[0])),u=Math.max(...c.map(([,d])=>d),1);return i.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:3,height:48,marginTop:8},children:c.map(([d,f])=>i.jsx("div",{title:`${new Date(d).toLocaleString()}: ${f}`,style:{flex:1,minWidth:4,height:`${Math.max(8,f/u*100)}%`,background:"var(--color-accent)",borderRadius:2,opacity:.85}},d))})}function Ln(l){if(!l)return"—";const s=Date.now()-new Date(l).getTime(),c=Math.abs(s),u=s<0,d=Math.round(c/6e4);if(d<1)return u?"in <1m":"just now";if(d<60)return u?`in ${d}m`:`${d}m ago`;const f=Math.round(d/60);if(f<24)return u?`in ${f}h`:`${f}h ago`;const p=Math.round(f/24);return u?`in ${p}d`:`${p}d ago`}function ia(l){return l?new Date(l).toLocaleString():"—"}function Es(l){return l%1440===0?`every ${l/1440} day${l===1440?"":"s"}`:l%60===0?`every ${l/60} hour${l===60?"":"s"}`:`every ${l} min`}const dd="inferences",Cs={continuous:"Ongoing Work","on-demand-single":"On-Demand Single","on-demand-batch":"On-Demand Batch"},L0={entity:"Entities",event:"Events",knowledge:"Knowledge"},B0={"already-processed":"Already processed by this graph","already-queued":"Already queued for this graph","already-running":"Currently running for this graph","missing-narrative":"Missing a required narrative","incompatible-graph":"Graph not compatible with this item","missing-data":"Item is missing required data","metadata-unavailable":"Metadata unavailable","changed-since-eligible":"Changed or became ineligible since preview","prerequisite-graph-not-met":"Required prior processing not completed","cross-entity-prerequisite-not-met":"Linked entity information not yet processed"},pv={ttl:"Re-run if older than… (default)",skip:"Skip — never re-run already-processed information","failed-only":"Failed only — re-run information where last attempt failed",all:"All — force re-run of every already-processed item","before-date":"Before date — re-run information processed before…","after-date":"After date — re-run information processed after…",condition:"Condition — re-run only if item matches a filter"},H0=["blocked","pending","running","done","failed","cancelled"],my={blocked:"var(--status-blocked)",pending:"var(--status-pending)",running:"var(--status-running)",done:"var(--status-done)",failed:"var(--status-failed)",cancelled:"var(--status-cancelled)"},Q0=["continuous","on-demand-single","on-demand-batch"];function G0(){const l=Bn(),{agentQueryParam:s,agentId:c}=Ia(),[u,d]=j.useState(""),[f,p]=j.useState(""),[m,y]=j.useState(""),[g,b]=j.useState(new Date),x=ve({queryKey:["queue-settings"],queryFn:()=>re.queueSettings()}),T=ve({queryKey:["overview-runs",s??"all",u,f,m],queryFn:()=>re.factoryRuns({agent:s,sourceType:u||void 0,workId:f||void 0,entity:m||void 0,pageSize:1e3})}),R=ve({queryKey:["throughput"],queryFn:()=>re.throughput({hours:24,bucket:"hour"})}),w=ve({queryKey:["entities",s??"all"],queryFn:()=>re.listEntities(s)}),q=ve({queryKey:["work",s??"all"],queryFn:()=>re.listWork(s)}),H=j.useMemo(()=>{var J;return((J=T.data)==null?void 0:J.runs)??[]},[T.data]),U=j.useMemo(()=>{const J={blocked:0,pending:0,running:0,done:0,failed:0,cancelled:0};for(const Z of H)J[Z.status]+=1;return J},[H]),X=H.filter(J=>J.status==="running").slice(0,8),G=[...H.filter(J=>J.status==="pending")].sort((J,Z)=>+new Date(J.availableAt)-+new Date(Z.availableAt)).slice(0,8),V=H.filter(J=>J.status==="failed").slice(0,8),P=j.useCallback(()=>{T.refetch(),b(new Date)},[T]);return i.jsxs("div",{children:[i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Overview"}),i.jsxs("span",{className:"page-subtitle",children:["Factory health and queue monitoring.",c?i.jsxs(i.Fragment,{children:[" Agent scope: ",i.jsx("span",{className:"mono",children:c})," ·"]}):null,x.data&&i.jsxs(i.Fragment,{children:[" Running: ",x.data.admittedCount??"—"," / ",x.data.maxConcurrentJobs," capacity"]})]})]}),i.jsx(mv,{onRefresh:P,lastRefreshed:g??void 0})]}),i.jsxs("div",{className:"filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Source type"}),i.jsxs("select",{value:u,onChange:J=>d(J.target.value),children:[i.jsx("option",{value:"",children:"All"}),Q0.map(J=>i.jsx("option",{value:J,children:Cs[J]},J))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Ongoing work"}),i.jsxs("select",{value:f,onChange:J=>p(J.target.value),children:[i.jsx("option",{value:"",children:"All"}),(q.data??[]).map(J=>i.jsx("option",{value:J.id,children:J.name},J.id))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Entity"}),i.jsxs("select",{value:m,onChange:J=>y(J.target.value),children:[i.jsx("option",{value:"",children:"All"}),(w.data??[]).map(J=>i.jsx("option",{value:J.name,children:J.label},J.name))]})]})]}),i.jsx("div",{className:"status-cards",style:{gridTemplateColumns:"repeat(6, 1fr)"},children:H0.map(J=>i.jsxs("div",{className:"status-card",onClick:()=>l(`/journal?status=${J}`),children:[i.jsx("div",{className:"status-card-label",style:{color:my[J]},children:J}),i.jsx("div",{className:"status-card-count",style:{color:my[J]},children:U[J].toLocaleString()})]},J))}),i.jsxs("div",{className:"card",style:{marginBottom:20},children:[i.jsx("div",{className:"card-title",children:"Throughput (24h)"}),R.isLoading&&i.jsx("span",{className:"spinner"}),R.data&&i.jsx(U0,{buckets:R.data})]}),i.jsxs("div",{className:"overview-cols",children:[i.jsx(Zo,{title:"Recent failed",runs:V,emptyMsg:"No failed runs"}),i.jsx(Zo,{title:"Currently running",runs:X,emptyMsg:"No running runs"}),i.jsx(Zo,{title:"Oldest pending",runs:G,emptyMsg:"No pending runs"})]})]})}function Zo({title:l,runs:s,emptyMsg:c}){return i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:l}),s.length===0&&i.jsx("div",{className:"empty-state",style:{padding:"24px 0"},children:c}),i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:s.map(u=>i.jsx(Ke,{to:`/journal/${u.id}`,style:{display:"block",textDecoration:"none"},children:i.jsxs("div",{style:{padding:"8px 10px",background:"var(--color-surface-raised)",borderRadius:"var(--radius)",border:"1px solid var(--color-border)"},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[i.jsx(jt,{status:u.status}),i.jsx("span",{className:"text-dim mono",style:{fontSize:11},children:Ln(u.updatedAt)})]}),i.jsxs("div",{className:"mono",style:{color:"var(--color-text-muted)",fontSize:11},children:[Cs[u.sourceType]," · ",u.entity,"/",u.recordLabel??u.recordId]}),u.error&&i.jsx("div",{style:{color:"var(--status-failed)",fontSize:11},children:u.error.message})]})},u.id))})]})}function Zt({title:l,message:s,detail:c,onRetry:u,safeActionLabel:d,onSafeAction:f}){const[p,m]=j.useState(!1),y=c===void 0?"":typeof c=="string"?c:String((c==null?void 0:c.message)??JSON.stringify(c,null,2));return i.jsxs("div",{className:"error-state",style:{color:"var(--color-text)"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{color:"var(--status-failed)",fontSize:16},children:"⚠"}),i.jsx("strong",{style:{color:"var(--status-failed)"},children:l})]}),s&&i.jsx("div",{style:{marginTop:6,lineHeight:1.5},children:s}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:12,flexWrap:"wrap"},children:[u&&i.jsx("button",{type:"button",onClick:u,children:"Retry"}),d&&i.jsx("button",{type:"button",onClick:f,children:d}),y&&i.jsx("button",{type:"button",onClick:()=>m(g=>!g),children:p?"Hide technical details":"Show technical details"})]}),p&&y&&i.jsx("pre",{style:{marginTop:10,fontSize:11,whiteSpace:"pre-wrap",opacity:.8,fontFamily:"var(--font-mono)"},children:y})]})}const k0=[{ms:15e3,label:"15 seconds"},{ms:3e4,label:"30 seconds"},{ms:6e4,label:"1 minute"},{ms:12e4,label:"2 minutes"}];function Y0(){const l=ji(),[s,c]=j.useState(""),[u,d]=j.useState(""),[f,p]=j.useState(!1),m=ve({queryKey:["queue-settings"],queryFn:()=>re.queueSettings()});j.useEffect(()=>{m.data&&(c(m.data.maxConcurrentJobs),d(m.data.queueAdmissionIntervalMs),p(!1))},[m.data]);const y=Xt({mutationFn:()=>re.saveQueueSettings({maxConcurrentJobs:Number(s),queueAdmissionIntervalMs:Number(u)}),onSuccess:()=>{p(!0),l.invalidateQueries({queryKey:["queue-settings"]})}});return i.jsxs("div",{children:[i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Settings"}),i.jsx("span",{className:"page-subtitle",children:"App-wide jobs factory configuration."})]})}),i.jsxs("div",{className:"card",style:{maxWidth:640},children:[i.jsx("div",{className:"card-title",children:"Queue execution"}),i.jsx("p",{className:"text-muted",style:{fontSize:13,marginBottom:16},children:"Controls how many jobs run in parallel across all work, batches, and on-demand runs. When capacity frees up, waiting jobs are promoted automatically on the check interval."}),m.isLoading&&i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}),m.isError&&i.jsx(Zt,{title:"Failed to load settings",detail:m.error}),m.data&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Max concurrent jobs"}),i.jsx("input",{type:"number",min:1,value:s,onChange:g=>{c(Number(g.target.value)),p(!1)}})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Admission check interval"}),i.jsx("select",{value:u,onChange:g=>{d(Number(g.target.value)),p(!1)},children:k0.map(g=>i.jsx("option",{value:g.ms,children:g.label},g.ms))}),i.jsx("span",{className:"hint",children:"How often the factory checks for free capacity and promotes waiting jobs."})]})]}),i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginTop:16},children:[i.jsx("button",{type:"button",className:"primary",disabled:y.isPending,onClick:()=>y.mutate(),children:y.isPending?"Saving…":"Save settings"}),f&&!y.isPending&&i.jsx("span",{className:"text-muted",style:{fontSize:13},children:"Saved"})]}),y.isError&&i.jsx("div",{style:{marginTop:12},children:i.jsx(Zt,{title:"Failed to save settings",detail:y.error})})]})]})]})}function yv({page:l,pageSize:s,total:c,onPage:u}){const d=Math.max(1,Math.ceil(c/s)),f=(l-1)*s+1,p=Math.min(l*s,c);return i.jsxs("div",{className:"pagination",children:[i.jsxs("span",{children:[c===0?"0":`${f}–${p}`," of ",c]}),i.jsx("button",{disabled:l<=1,onClick:()=>u(l-1),children:"← Prev"}),i.jsxs("span",{children:[l," / ",d]}),i.jsx("button",{disabled:l>=d,onClick:()=>u(l+1),children:"Next →"})]})}function Dt({title:l,message:s,actionLabel:c,actionTo:u,onAction:d,icon:f="○"}){return i.jsxs("div",{className:"empty-state",style:{padding:"40px 24px"},children:[i.jsx("div",{style:{fontSize:28,opacity:.5,marginBottom:10},children:f}),i.jsx("div",{style:{fontSize:15,fontWeight:600,color:"var(--color-text)",marginBottom:6},children:l}),s&&i.jsx("div",{style:{maxWidth:480,margin:"0 auto",lineHeight:1.55},children:s}),c&&i.jsx("div",{style:{marginTop:16},children:u?i.jsx(Ke,{to:u,children:i.jsx("button",{type:"button",className:"primary",children:c})}):i.jsx("button",{type:"button",className:"primary",onClick:d,children:c})})]})}const py=["blocked","pending","running","done","failed","cancelled"],K0=["continuous","on-demand-single","on-demand-batch"],Vo={blocked:"var(--status-blocked)",pending:"var(--status-pending)",running:"var(--status-running)",done:"var(--status-done)",failed:"var(--status-failed)",cancelled:"var(--status-cancelled)"},X0=[{key:"total",label:"Total"},{key:"today",label:"Today"},{key:"this-week",label:"This week"},{key:"this-month",label:"This month"}];function Z0(){const[l,s]=hu(),c=Bn(),{agentQueryParam:u,agentId:d}=Ia(),[f,p]=j.useState(new Date),[m,y]=j.useState("total"),g=l.get("status")??"",b=l.get("sourceType")??"",x=l.get("workId")??"",T=l.get("batchId")??"",R=l.get("graphId")??"",w=l.get("entity")??"",q=l.get("recordId")??"",H=Number(l.get("page")??1),U=(O,le)=>{s(ue=>{const de=new URLSearchParams(ue);return le?de.set(O,le):de.delete(O),O!=="page"&&de.delete("page"),de})},X=ve({queryKey:["factory-runs",u??"all",g,b,x,T,R,w,q,H],queryFn:()=>re.factoryRuns({agent:u,status:g||void 0,sourceType:b||void 0,workId:x||void 0,batchId:T||void 0,graphId:R||void 0,entity:w||void 0,recordId:q||void 0,page:H,pageSize:25})}),G=ve({queryKey:["run-status-counts",m,u??"all"],queryFn:()=>re.runStatusCounts(m,u)}),V=ve({queryKey:["entities",u??"all"],queryFn:()=>re.listEntities(u)}),P=ve({queryKey:["work",u??"all"],queryFn:()=>re.listWork(u)}),J=j.useCallback(()=>{X.refetch(),p(new Date)},[X]),Z=X.data,I=G.data;return i.jsxs("div",{children:[i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Journal"}),Z&&i.jsxs("span",{className:"page-subtitle",children:[d?i.jsxs(i.Fragment,{children:["Agent scope: ",i.jsx("span",{className:"mono",children:d})," · "]}):null,Z.total.toLocaleString()," total job executions"]})]}),i.jsx(mv,{onRefresh:J,lastRefreshed:f??void 0})]}),i.jsxs("div",{style:{marginBottom:20},children:[i.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:10},children:X0.map(({key:O,label:le})=>i.jsx("button",{className:`btn btn-sm${m===O?" active":""}`,onClick:()=>y(O),children:le},O))}),i.jsx("div",{className:"status-cards",style:{gridTemplateColumns:"repeat(6, 1fr)"},children:py.map(O=>i.jsxs("div",{className:`status-card${g===O?" selected":""}`,style:g===O?{outline:`2px solid ${Vo[O]}`}:void 0,onClick:()=>U("status",g===O?"":O),title:`Filter by ${O}`,children:[i.jsx("div",{className:"status-card-label",style:{color:Vo[O]},children:O}),i.jsx("div",{className:"status-card-count",style:{color:Vo[O]},children:I?I[O].toLocaleString():"—"})]},O))})]}),i.jsxs("div",{className:"filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Status"}),i.jsxs("select",{value:g,onChange:O=>U("status",O.target.value),children:[i.jsx("option",{value:"",children:"All"}),py.map(O=>i.jsx("option",{value:O,children:O},O))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Source type"}),i.jsxs("select",{value:b,onChange:O=>U("sourceType",O.target.value),children:[i.jsx("option",{value:"",children:"All"}),K0.map(O=>i.jsx("option",{value:O,children:Cs[O]},O))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Ongoing work"}),i.jsxs("select",{value:x,onChange:O=>U("workId",O.target.value),children:[i.jsx("option",{value:"",children:"All"}),(P.data??[]).map(O=>i.jsx("option",{value:O.id,children:O.name},O.id))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Entity"}),i.jsxs("select",{value:w,onChange:O=>U("entity",O.target.value),children:[i.jsx("option",{value:"",children:"All"}),(V.data??[]).map(O=>i.jsx("option",{value:O.name,children:O.label},O.name))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Item id"}),i.jsx("input",{type:"text",value:q,placeholder:"item id",onChange:O=>U("recordId",O.target.value),style:{width:160}})]})]}),X.isError&&i.jsx(Zt,{title:"Failed to load journal",detail:X.error,onRetry:J}),X.isLoading&&i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading journal…"]}),Z&&Z.runs.length===0&&i.jsx(Dt,{title:"No journal entries",message:"No executions match the current filters."}),Z&&Z.runs.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Source type"}),i.jsx("th",{children:"Source"}),i.jsx("th",{children:"Entity"}),i.jsx("th",{children:"Item"}),i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Attempts"}),i.jsx("th",{children:"Priority"}),i.jsx("th",{children:"Created"}),i.jsx("th",{children:"Updated"})]})}),i.jsx("tbody",{children:Z.runs.map(O=>i.jsxs("tr",{onClick:()=>c(`/journal/${O.id}`),children:[i.jsx("td",{children:i.jsx(jt,{status:O.status})}),i.jsx("td",{children:i.jsx("span",{className:"chip",children:Cs[O.sourceType]})}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:O.sourceName??"—"}),i.jsx("td",{className:"td-mono",children:O.entity}),i.jsx("td",{className:"td-mono",children:O.recordLabel??O.recordId}),i.jsx("td",{className:"td-mono",children:O.graphName??O.graphId}),i.jsxs("td",{className:"td-mono",children:[O.attempts,"/",O.maxAttempts]}),i.jsx("td",{className:"td-mono",children:O.priority}),i.jsx("td",{className:"td-mono",children:ia(O.createdAt)}),i.jsx("td",{className:"td-mono",children:ia(O.updatedAt)})]},O.id))})]})}),i.jsx(yv,{page:Z.page,pageSize:Z.pageSize,total:Z.total,onPage:O=>U("page",String(O))})]})]})}function fa({label:l,value:s,defaultOpen:c=!1}){const[u,d]=j.useState(c);if(s==null)return null;const f=JSON.stringify(s,null,2);return i.jsxs("div",{className:"json-section",children:[i.jsxs("div",{className:`json-section-header${u?" open":""}`,onClick:()=>d(p=>!p),role:"button",tabIndex:0,onKeyDown:p=>p.key==="Enter"&&d(m=>!m),children:[i.jsx("span",{className:`json-chevron${u?" open":""}`,children:"▶"}),l,i.jsx("span",{className:"text-dim",style:{marginLeft:"auto",fontWeight:400,textTransform:"none",fontSize:"11px"},children:u?"collapse":`${f.split(`
|
|
61
|
+
`).length} lines`})]}),u&&i.jsx("div",{className:"json-body",children:i.jsx("pre",{children:f})})]})}const V0={enqueued:"muted",claimed:"start",done:"done",failed:"fail",retry:"info",lease_expired:"fail",cancelled:"muted"},$0={info:"var(--color-text)",start:"var(--status-running)",done:"var(--status-done)",fail:"var(--status-failed)",muted:"var(--color-text-muted)"};function $a(l){if(typeof l=="number")return l>1e12?l:l*1e3;if(typeof l=="string"){const s=new Date(l).getTime();return Number.isNaN(s)?void 0:s}}function vv(l){return new Date(l).toLocaleTimeString(void 0,{hour12:!1})}function fd(l){return l&&typeof l=="object"&&!Array.isArray(l)?l:void 0}function yy(l){const s=(l??"").toLowerCase();return s.includes("fail")||s.includes("error")?"fail":s.includes("complete")||s.includes("done")||s.includes("success")||s.includes("ended")?"done":s.includes("start")||s.includes("running")||s.includes("progress")?"start":"info"}function J0(l){return l==="fail"?"✕":l==="done"?"✓":l==="start"?"▶":"·"}function F0(l){if(l)return typeof l=="string"?l:typeof l=="object"&&l&&"message"in l?String(l.message):JSON.stringify(l)}function gv(l,s=120){return l.length<=s?l:`${l.slice(0,s-1)}…`}function I0(l){const s=fd(l.runContext);return{...l,nodeId:l.nodeId??(s==null?void 0:s.nodeId),graphId:l.graphId??(s==null?void 0:s.graphId),skillKey:l.skillKey??(s==null?void 0:s.skillKey)}}function W0(l){const s=l.nodeId??l.skillKey??"node",c=l.skillKey&&l.skillKey!==l.nodeId?` · ${l.skillKey}`:"";return`${s}${c}`}function xv(l,s,c){if(typeof l.durationMs=="number")return l.durationMs;if(typeof l.duration=="number")return l.duration;if(s!=null&&c!=null)return Math.max(0,Math.round(c-s))}function P0(l){const s=[],c=fd(l.runContext),u=fd(l.outer),d=$a(l.startTime)??$a(l.createdAt),f=$a(l.endTime)??$a(l.updatedAt),p=xv(l,d,f);s.push({label:"Summary",value:{activityId:l.activityId,status:l.status,phase:l.phase,nodeId:l.nodeId??(c==null?void 0:c.nodeId),graphId:l.graphId??(c==null?void 0:c.graphId),skillKey:l.skillKey??(c==null?void 0:c.skillKey),kind:l.kind,startTime:d!=null?new Date(d).toISOString():l.startTime,endTime:f!=null?new Date(f).toISOString():l.endTime,durationMs:p}}),l.inputVariableKeys&&s.push({label:"Input variable keys",value:l.inputVariableKeys}),l.executionKeys&&s.push({label:"Execution keys",value:l.executionKeys}),(u==null?void 0:u.input)!=null&&s.push({label:"Input",value:u.input}),(u==null?void 0:u.output)!=null&&s.push({label:"Output",value:u.output}),(u==null?void 0:u.metadata)!=null&&s.push({label:"Metadata",value:u.metadata}),(u==null?void 0:u.memory)!=null&&s.push({label:"Memory",value:u.memory}),l.outputSummary!=null&&s.push({label:"Output summary",value:l.outputSummary}),l.narrixSummary!=null&&s.push({label:"Narrix",value:l.narrixSummary}),l.error!=null&&s.push({label:"Error",value:l.error}),Array.isArray(l.inner)&&l.inner.length>0&&s.push({label:"Inner steps",value:l.inner});const m={},y=new Set(["activityId","status","phase","nodeId","graphId","skillKey","kind","startTime","endTime","createdAt","updatedAt","durationMs","duration","runContext","outer","inner","error","inputVariableKeys","executionKeys","outputSummary","narrixSummary"]);for(const[g,b]of Object.entries(l))y.has(g)||b==null||(m[g]=b);return Object.keys(m).length>0&&s.push({label:"Record fields",value:m}),s}function eS(l){return l.map((s,c)=>{const u=$a(s.at)??0,d=s.meta&&Object.keys(s.meta).length?s.meta:void 0;return{id:`event-${c}-${s.kind}-${u}`,ts:u,time:vv(u),level:V0[s.kind]??"info",label:s.kind.replace(/_/g," "),summary:d?gv(JSON.stringify(d)):void 0,sections:d?[{label:"Event meta",value:d}]:void 0}})}function tS(l){return l.map((s,c)=>{const u=I0(s),d=$a(u.startTime)??$a(u.createdAt)??0,f=$a(u.endTime)??(yy(u.status)!=="start"?$a(u.updatedAt):void 0),p=yy(u.status),m=xv(u,d,f),y=F0(u.error),g=P0(u);return{id:`activity-${u.activityId??u.nodeId??c}-${d}`,ts:d,time:vv(d),level:p,label:`${J0(p)} ${W0(u)}`,summary:y?gv(y):m!=null?`${m}ms`:void 0,sections:g.length>0?g:void 0}})}function aS({entry:l}){var d;const[s,c]=j.useState(!1),u=(((d=l.sections)==null?void 0:d.length)??0)>0;return i.jsxs("div",{className:`live-console-entry${s?" open":""}`,children:[i.jsxs("div",{className:`live-console-line${u?" expandable":""}`,onClick:u?()=>c(f=>!f):void 0,role:u?"button":void 0,tabIndex:u?0:void 0,onKeyDown:u?f=>f.key==="Enter"&&c(p=>!p):void 0,children:[u&&i.jsx("span",{className:`live-console-chevron${s?" open":""}`,children:"▶"}),i.jsx("span",{className:"live-console-time",children:l.time}),i.jsx("span",{style:{color:$0[l.level]},children:l.label}),l.summary&&i.jsx("span",{className:"live-console-detail",children:l.summary})]}),s&&l.sections&&i.jsx("div",{className:"live-console-expand",children:l.sections.map(f=>i.jsx(fa,{label:f.label,value:f.value},f.label))})]})}function nS({runId:l,live:s}){var T;const c=s?1200:!1,u=ve({queryKey:["run-events",l],queryFn:()=>re.runEvents(l),refetchInterval:c}),d=ve({queryKey:["run-activities",l],queryFn:()=>re.runActivities(l),refetchInterval:c}),f=j.useMemo(()=>{var w,q;const R=[...eS(((w=u.data)==null?void 0:w.events)??[]),...tS(((q=d.data)==null?void 0:q.activities)??[])];return R.sort((H,U)=>H.ts-U.ts),R},[u.data,d.data]),p=j.useRef(null),m=j.useRef(!0),y=()=>{const R=p.current;R&&(m.current=R.scrollHeight-R.scrollTop-R.clientHeight<40)};j.useEffect(()=>{m.current&&p.current&&(p.current.scrollTop=p.current.scrollHeight)},[f.length]);const g=((T=d.data)==null?void 0:T.available)??!0,b=f.length===0,x=f.filter(R=>{var w;return(((w=R.sections)==null?void 0:w.length)??0)>0}).length;return i.jsxs("div",{className:"live-console",children:[i.jsxs("div",{className:"live-console-head",children:[i.jsxs("span",{className:"live-console-title",children:[i.jsx("span",{className:`live-dot${s?" live":""}`}),"Live Console"]}),i.jsxs("span",{className:"live-console-meta mono",children:[s?"streaming…":"idle"," · ",f.length," entr",f.length===1?"y":"ies",x>0?` · ${x} expandable`:""]})]}),i.jsxs("div",{className:"live-console-body",ref:p,onScroll:y,children:[b&&i.jsx("div",{className:"live-console-line muted",children:s?"Waiting for execution events…":"No execution activity recorded yet."}),f.map(R=>i.jsx(aS,{entry:R},R.id))]}),!g&&i.jsx("div",{className:"live-console-foot",children:"Per-node activity tracking is unavailable — showing run lifecycle events only."})]})}function nu(l){return l&&typeof l=="object"&&!Array.isArray(l)?l:void 0}function vy(l){if(!l)return{payload:void 0,memorixRef:void 0};const{_memorixRef:s,...c}=l;return{payload:Object.keys(c).length>0?c:void 0,memorixRef:s}}function gy(l){try{return JSON.stringify(l)}catch{return""}}function lS(l){const s=nu(l);if(!s)return{};const c=nu(s.outer),u=nu(c==null?void 0:c.output);return{runtimeInput:c==null?void 0:c.input,runtimeOutput:(u==null?void 0:u.response)??(u&&!u.data?u:void 0),runtimeData:u==null?void 0:u.data,status:s.status,nodesExecuted:s.nodesExecuted,completedAt:s.completedAt,error:s.error??(u==null?void 0:u.error)}}function iS({runId:l,status:s,input:c,result:u,assemblySelection:d,live:f}){var X;const p=ve({queryKey:["run-activities",l],queryFn:()=>re.runActivities(l),refetchInterval:f?1200:!1}),m=j.useMemo(()=>{var G;return lS((G=p.data)==null?void 0:G.graphRun)},[(X=p.data)==null?void 0:X.graphRun]),y=vy(c),g=vy(nu(m.runtimeInput)),b=u??m.runtimeOutput,x=g.payload!=null&&gy(g.payload)!==gy(y.payload),T=d!=null,R=b!=null,w=m.runtimeData!=null,q=y.memorixRef!=null||g.memorixRef!=null,H=m.status!=null||m.nodesExecuted!=null||m.error!=null;return!c&&!T&&!x&&!R&&!w&&!q&&!H&&!p.isLoading?i.jsxs("div",{className:"card",style:{marginBottom:16},children:[i.jsx("div",{className:"card-title",children:"Request & response"}),i.jsx("span",{className:"text-muted",style:{fontSize:13},children:"No input or output recorded for this run yet."})]}):i.jsxs("div",{className:"card run-io-panel",style:{marginBottom:16},children:[i.jsx("div",{className:"card-title",children:"Request & response"}),i.jsx("p",{className:"run-io-hint",children:"What was queued for this job, what the graph received at runtime, and the final response."}),y.payload!=null&&i.jsx(fa,{label:"Queued input",value:y.payload,defaultOpen:s==="pending"}),T&&i.jsx(fa,{label:"Assembly selection",value:d}),q&&i.jsx(fa,{label:"Memorix reference",value:g.memorixRef??y.memorixRef}),x&&i.jsx(fa,{label:"Sent to graph (runtime input)",value:g.payload,defaultOpen:!0}),!x&&m.runtimeInput!=null&&s!=="pending"&&i.jsx(fa,{label:"Sent to graph (runtime input)",value:m.runtimeInput}),R?i.jsx(fa,{label:"Response",value:b,defaultOpen:!0}):i.jsx("div",{className:"run-io-pending",children:f||s==="running"?"Response will appear when the graph finishes.":s==="failed"?"No response — run failed before producing output.":"No response recorded yet."}),w&&i.jsx(fa,{label:"Execution diagnostics",value:m.runtimeData}),m.error!=null&&i.jsx(fa,{label:"Graph error",value:m.error,defaultOpen:!0}),H&&i.jsx(fa,{label:"Run telemetry",value:{status:m.status,nodesExecuted:m.nodesExecuted,completedAt:m.completedAt}})]})}function pt({label:l,value:s}){return i.jsxs("div",{className:"detail-row",children:[i.jsx("span",{className:"detail-key",children:l}),i.jsx("span",{className:"detail-val",children:s})]})}function sS(l){if(l.sourceType==="continuous"&&l.sourceRef)return`/work/${l.sourceRef}`;if(l.sourceType==="on-demand-batch"&&l.sourceRef)return`/on-demand/batch/${l.sourceRef}`}function rS(l){const s=l.queueOptions;return l.status!=="pending"?ia(l.availableAt):s!=null&&s.admissionHeld?s.slotsAvailable>0?"Waiting for capacity — a slot is available; you can execute now":`Waiting for capacity (${s.admittedCount}/${s.maxConcurrentJobs} slots in use)`:s&&s.slotsAvailable<=0?`Queued (${s.admittedCount}/${s.maxConcurrentJobs} slots in use) — waiting for worker or execute now`:"Queued — ready to execute"}function uS(){var U;const{id:l}=Ds(),s=ji(),c=ve({queryKey:["factory-run",l],queryFn:()=>re.factoryRun(l),enabled:!!l,refetchInterval:X=>{var G;return((G=X.state.data)==null?void 0:G.status)==="running"?1500:!1}}),u=Xt({mutationFn:()=>re.retryRun(l),onSuccess:()=>s.invalidateQueries({queryKey:["factory-run",l]})}),d=Xt({mutationFn:()=>re.cancelRun(l),onSuccess:()=>s.invalidateQueries({queryKey:["factory-run",l]})}),f=Xt({mutationFn:()=>re.executeRun(l),onSuccess:()=>s.invalidateQueries({queryKey:["factory-run",l]})}),p=Xt({mutationFn:()=>re.queueRunNext(l),onSuccess:()=>s.invalidateQueries({queryKey:["factory-run",l]})}),m=c.data;if(c.isLoading)return i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]});if(c.isError||!m)return i.jsx(Zt,{title:"Journal entry not found",detail:c.error});const y=m.queueOptions,g=m.status==="failed"||m.status==="cancelled",b=m.status==="blocked"||m.status==="pending"||m.status==="running",x=m.status==="pending"&&((y==null?void 0:y.canExecuteNow)??!0),T=m.status==="pending"&&((y==null?void 0:y.admissionHeld)||((y==null?void 0:y.slotsAvailable)??1)<=0),R=sS(m),w=m.processingUpdate,q=f.isPending||m.status==="running",H=m.status!=="pending"||m.attempts>0;return i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx(Ke,{to:"/journal",children:"Journal"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),i.jsx("span",{className:"mono",children:m.id})]}),i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx(jt,{status:m.status}),i.jsxs("span",{className:"page-subtitle mono",children:[m.entity," / ",m.recordLabel??m.recordId," / ",m.graphName??m.graphId]})]}),i.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",justifyContent:"flex-end"},children:[x&&i.jsx("button",{className:"primary",disabled:f.isPending,onClick:()=>f.mutate(),children:f.isPending?"Executing…":"Execute now"}),T&&i.jsx("button",{disabled:p.isPending,onClick:()=>p.mutate(),children:p.isPending?"Updating…":"Run next when slot available"}),g&&i.jsx("button",{className:"primary",disabled:u.isPending,onClick:()=>u.mutate(),children:u.isPending?"Retrying…":"Retry"}),b&&i.jsx("button",{disabled:d.isPending,onClick:()=>d.mutate(),style:{color:"var(--status-cancelled)"},children:d.isPending?"Cancelling…":"Cancel"})]})]}),m.status==="pending"&&y&&i.jsxs("div",{className:"memorix-panel",style:{marginBottom:16,fontSize:13},children:[y.slotsAvailable>0?`${y.slotsAvailable} execution slot${y.slotsAvailable===1?"":"s"} available (${y.admittedCount}/${y.maxConcurrentJobs} in use).`:`All ${y.maxConcurrentJobs} execution slots are in use.`,T&&" Use “Run next when slot available” to move this job to the front of the waiting queue."]}),(q||H)&&i.jsx(nS,{runId:m.id,live:q}),i.jsx(iS,{runId:m.id,status:m.status,input:m.input,result:m.result,assemblySelection:m.assemblySelection,live:q}),i.jsxs("div",{className:"detail-grid",children:[i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Source"}),i.jsx(pt,{label:"Source type",value:Cs[m.sourceType]}),i.jsx(pt,{label:"Source name",value:R?i.jsx(Ke,{to:R,children:m.sourceName}):m.sourceName??"—"}),i.jsx(pt,{label:"Source ref",value:m.sourceRef??"—"})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Target"}),i.jsx(pt,{label:"Entity",value:`${m.entity} · ${m.collection}`}),i.jsx(pt,{label:"Item",value:i.jsx(Ke,{to:`/information/${encodeURIComponent(m.recordId)}?entity=${m.entity}`,children:m.recordLabel??m.recordId})}),i.jsx(pt,{label:"Graph",value:`${m.graphName??m.graphId}`}),i.jsx(pt,{label:"Context",value:(U=m.relatedRecords)!=null&&U.length?m.relatedRecords.join(", "):"—"}),i.jsx(pt,{label:"Output collection",value:m.outputCollection??"—"})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Execution"}),i.jsx(pt,{label:"Attempts",value:`${m.attempts} / ${m.maxAttempts}`}),i.jsx(pt,{label:"Priority",value:m.priority}),i.jsx(pt,{label:"Claimed by",value:m.claimedBy??i.jsx("span",{className:"text-dim",children:"unclaimed"})}),i.jsx(pt,{label:"Queue state",value:rS(m)})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Timestamps"}),i.jsx(pt,{label:"Created",value:ia(m.createdAt)}),i.jsx(pt,{label:"Updated",value:ia(m.updatedAt)})]})]}),i.jsxs("div",{className:"card",style:{marginBottom:16,borderColor:(w==null?void 0:w.status)==="updated"?"var(--status-done)":(w==null?void 0:w.status)==="failed"?"var(--status-failed)":void 0},children:[i.jsx("div",{className:"card-title",children:"Processing result"}),!w&&i.jsx("span",{className:"text-muted",style:{fontSize:13},children:"No processing result recorded."}),w&&i.jsxs(i.Fragment,{children:[i.jsx(pt,{label:"Status",value:i.jsx(jt,{status:w.status==="updated"?"succeeded":w.status==="failed"?"failed":"pending"})}),i.jsx(pt,{label:"Graph",value:w.graphId}),i.jsxs("div",{style:{fontSize:13,marginTop:8,color:w.status==="failed"?"var(--status-failed)":"var(--color-text-muted)"},children:[w.status==="updated"&&`processing.graphs.${w.graphId}.processedAt was updated.`,w.status==="failed"&&(w.detail??"Processing metadata update failed."),w.status==="pending"&&"Processing metadata will be updated when the run succeeds.",w.status==="skipped"&&(w.detail??"Processing metadata update was skipped.")]})]})]}),f.isError&&i.jsxs("div",{className:"error-state",style:{marginBottom:16},children:["Execute failed: ",String(f.error)]}),m.error&&i.jsxs("div",{className:"error-state",style:{marginBottom:16},children:[i.jsxs("div",{style:{color:"var(--status-failed)",fontWeight:600},children:["Error: ",m.error.message]}),m.error.code&&i.jsxs("div",{className:"mono text-muted",style:{fontSize:12,marginTop:4},children:["code: ",m.error.code]})]})]})}function cS(l){const s=new Map,c=new Map(l.nodes.map(d=>[d.id,d]));function u(d,f=new Set){if(s.has(d))return s.get(d);if(f.has(d))return 0;f.add(d);const p=c.get(d);if(!p||!p.dependsOn.length)return s.set(d,0),0;const m=Math.max(...p.dependsOn.map(y=>u(y,f)))+1;return s.set(d,m),m}for(const d of l.nodes)u(d.id);return s}function oS({graph:l}){if(!l.nodes.length)return i.jsx("div",{className:"empty-state",children:"No graph data"});const s=cS(l),c=Math.max(...s.values(),0),u=Array.from({length:c+1},()=>[]);for(const d of l.nodes)u[s.get(d.id)??0].push(d);return i.jsxs("div",{className:"card",style:{marginBottom:20,overflow:"auto"},children:[i.jsx("div",{className:"card-title",children:"Dependency Graph"}),i.jsx("div",{style:{display:"flex",gap:24,padding:"12px 0",minWidth:"max-content"},children:u.map((d,f)=>i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,minWidth:160},children:[i.jsxs("div",{className:"text-dim",style:{fontSize:11,textAlign:"center"},children:["Layer ",f]}),d.map(p=>i.jsxs(Ke,{to:`/journal/${p.id}`,style:{display:"block",padding:"10px 12px",background:"var(--color-surface-raised)",border:"1px solid var(--color-border)",borderLeft:`3px solid var(--status-${p.status})`,borderRadius:"var(--radius)",textDecoration:"none"},children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:8,marginBottom:4},children:[i.jsx("span",{className:"mono",style:{fontSize:12},children:p.graphId}),i.jsx(jt,{status:p.status})]}),i.jsx("div",{className:"mono text-dim",style:{fontSize:10},children:p.id})]},p.id))]},f))}),l.edges.length>0&&i.jsxs("div",{className:"text-dim",style:{fontSize:11,marginTop:8},children:[l.edges.length," dependency edge",l.edges.length===1?"":"s"]})]})}function dS({run:l,allRuns:s}){var d;const c=(d=l.input)==null?void 0:d.upstream;if(!c||typeof c!="object"||Array.isArray(c))return null;const u=Object.entries(c);return u.length?i.jsxs("div",{className:"card",style:{marginBottom:16},children:[i.jsx("div",{className:"card-title",children:"Received from Upstream"}),u.map(([f,p])=>{const m=s==null?void 0:s.find(y=>y.graphId===f&&y.status==="done");return i.jsxs("div",{style:{marginBottom:10},children:[i.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:4},children:[i.jsx("span",{className:"mono",style:{fontSize:12},children:f}),m&&i.jsx(Ke,{to:`/journal/${m.id}`,style:{fontSize:11},children:"view in journal"})]}),i.jsx("pre",{style:{fontSize:11,overflow:"auto",maxHeight:120,padding:8,background:"var(--color-bg)",borderRadius:"var(--radius)"},children:JSON.stringify(p,null,2)})]},f)})]}):null}function fS({run:l,allRuns:s}){var u;if(((u=l.error)==null?void 0:u.code)!=="DEP_FAILED"||!l.dependsOn.length)return null;const c=(s==null?void 0:s.find(d=>l.dependsOn.includes(d.id)&&d.status==="failed"))??(s==null?void 0:s.find(d=>l.dependsOn.includes(d.id)));return i.jsxs("div",{style:{fontSize:12,marginTop:6},children:["Root cause:"," ",c?i.jsxs(Ke,{to:`/journal/${c.id}`,style:{color:"var(--status-failed)"},children:[c.graphId," (",c.id,")"]}):i.jsx("span",{className:"mono",children:l.dependsOn[0]})]})}function hS(l){return new Date(l).toLocaleString()}function mS({run:l,allRuns:s}){if(l.status!=="blocked"||l.dependsOn.length===0)return null;const c=l.dependsOn.map(f=>s.find(p=>p.id===f)).filter(f=>f!=null),u=c.filter(f=>f.status==="failed"||f.status==="cancelled"),d=c.filter(f=>f.status==="pending"||f.status==="running");return u.length===0&&d.length===0?null:i.jsxs("div",{style:{padding:"10px 14px",background:"var(--status-blocked-bg)",border:"1px solid var(--status-blocked)",borderRadius:"var(--radius)",marginBottom:8,fontSize:13},children:[i.jsx("strong",{style:{color:"var(--status-blocked)"},children:"Blocked"}),u.length>0&&i.jsxs("div",{style:{marginTop:6},children:["Upstream failures:"," ",u.map(f=>i.jsx(Ke,{to:`/journal/${f.id}`,style:{marginRight:8,color:"var(--status-failed)"},children:f.graphId},f.id))]}),d.length>0&&i.jsxs("div",{style:{marginTop:6},children:["Waiting on:"," ",d.map(f=>i.jsx(Ke,{to:`/journal/${f.id}`,style:{marginRight:8,color:"var(--status-pending)"},children:f.graphId},f.id))]})]})}function pS(){const{itemId:l}=Ds(),s=ve({queryKey:["item-runs",l],queryFn:()=>re.itemRuns(l),enabled:!!l}),c=ve({queryKey:["item-graph",l],queryFn:()=>re.itemGraph(l),enabled:!!l}),u=s.data??[];if(s.isLoading)return i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading timeline…"]});if(s.isError)return i.jsxs("div",{className:"error-state",children:["Error: ",String(s.error)]});const d=[...new Set(u.map(f=>f.graphId))];return i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx(Ke,{to:"/journal",children:"Journal"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),i.jsx(Ke,{to:`/journal?itemId=${l}`,children:"Item journal"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),i.jsx("span",{className:"mono",children:l})]}),i.jsxs("div",{className:"page-header",children:[i.jsx("h1",{className:"page-title",children:"Run timeline"}),i.jsx("span",{className:"page-subtitle mono",children:l})]}),u.length===0&&i.jsx("div",{className:"empty-state",children:"No job runs found for this item."}),u.length>0&&i.jsxs(i.Fragment,{children:[c.data&&i.jsx(oS,{graph:c.data}),i.jsxs("div",{className:"card",style:{marginBottom:20},children:[i.jsx("div",{className:"card-title",children:"Pipeline status"}),i.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:10,marginTop:8},children:d.map(f=>{const p=u.filter(y=>y.graphId===f),m=p[p.length-1];return i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 12px",background:"var(--color-surface-raised)",borderRadius:"var(--radius)",border:"1px solid var(--color-border)"},children:[i.jsx("span",{className:"mono",style:{fontSize:12},children:f}),m&&i.jsx(jt,{status:m.status}),i.jsxs("span",{className:"text-dim",style:{fontSize:11},children:[p.length,"×"]})]},f)})})]}),i.jsx("div",{className:"timeline",children:u.map(f=>i.jsxs("div",{className:"timeline-item",children:[i.jsx("div",{className:`timeline-dot timeline-dot-${f.status}`}),i.jsxs("div",{className:"card",style:{borderLeft:`3px solid var(--status-${f.status})`},children:[i.jsx(mS,{run:f,allRuns:u}),i.jsx(dS,{run:f,allRuns:u}),i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[i.jsx(jt,{status:f.status}),i.jsx("span",{className:"mono",style:{fontSize:13},children:f.graphId})]}),i.jsx(Ke,{to:`/journal/${f.id}`,className:"mono text-muted",style:{fontSize:11},children:f.id})]}),i.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px 24px",fontSize:12,color:"var(--color-text-muted)"},children:[i.jsxs("span",{children:["Job: ",i.jsx("span",{className:"mono",children:f.jobDefId})]}),i.jsxs("span",{children:["Attempts: ",i.jsxs("span",{className:"mono",children:[f.attempts,"/",f.maxAttempts]})]}),i.jsxs("span",{children:["Created: ",i.jsx("span",{className:"mono",children:hS(f.createdAt)})]})]}),f.error&&i.jsxs("div",{style:{marginTop:10,padding:"8px 10px",background:"var(--status-failed-bg)",borderRadius:"var(--radius)",fontSize:12,color:"var(--status-failed)"},children:[f.error.message,i.jsx(fS,{run:f,allRuns:u})]}),f.dependsOn.length>0&&i.jsx("div",{style:{marginTop:10},children:i.jsx(fa,{label:`Depends On (${f.dependsOn.length})`,value:f.dependsOn})})]})]},f.id))})]})]})}function yS(){const l=Bn(),s=ji(),{agentQueryParam:c,agentId:u}=Ia(),d=ve({queryKey:["work",c??"all"],queryFn:()=>re.listWork(c)}),f=Xt({mutationFn:y=>re.runEvaluation(y),onSuccess:()=>s.invalidateQueries({queryKey:["work"]})}),p=Xt({mutationFn:({id:y,status:g})=>re.setWorkStatus(y,g),onSuccess:()=>s.invalidateQueries({queryKey:["work"]})}),m=d.data??[];return i.jsxs("div",{children:[i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Ongoing Work"}),i.jsx("span",{className:"page-subtitle",children:u?i.jsxs(i.Fragment,{children:["Ongoing work for object types in agent scope ",i.jsx("span",{className:"mono",children:u}),"."]}):"Ongoing work evaluates information on a schedule and queues jobs automatically."})]}),i.jsx(Ke,{to:"/work/new",children:i.jsx("button",{className:"primary",children:"+ New ongoing work"})})]}),d.isLoading&&i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}),d.isError&&i.jsx(Zt,{title:"Failed to load ongoing work",detail:d.error,onRetry:()=>d.refetch()}),m.length===0&&!d.isLoading&&i.jsx(Dt,{title:"No ongoing work yet",message:"Ongoing work evaluates information on a schedule and queues jobs for items that match your narratives and processing rules.",actionLabel:"New ongoing work",actionTo:"/work/new"}),m.length>0&&i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Name"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Entity"}),i.jsx("th",{children:"Narratives"}),i.jsx("th",{children:"Reprocessing"}),i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Re-scan interval"}),i.jsx("th",{children:"Last scanned"}),i.jsx("th",{children:"Jobs created"}),i.jsx("th",{children:"Last result"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:m.map(y=>{var g;return i.jsxs("tr",{onClick:()=>l(`/work/${y.id}`),children:[i.jsx("td",{children:i.jsx("strong",{children:y.name})}),i.jsx("td",{children:i.jsx(jt,{status:y.status})}),i.jsx("td",{className:"mono",children:y.entity}),i.jsx("td",{children:i.jsx("span",{className:"chip-row",children:y.narratives.map(b=>i.jsx("span",{className:"chip narrative",children:b},b))})}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:(g=y.processing)!=null&&g.reprocessingMode&&y.processing.reprocessingMode!=="skip"?y.processing.reprocessingMode:"skip (default)"}),i.jsx("td",{className:"mono",style:{fontSize:12},children:y.graphName??y.graphId}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:Es(y.policy.rescanIntervalMinutes)}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:Ln(y.lastEvaluatedAt)}),i.jsx("td",{className:"mono",children:y.jobsCreated}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:y.lastResult}),i.jsx("td",{onClick:b=>b.stopPropagation(),children:i.jsxs("div",{style:{display:"flex",gap:6},children:[i.jsx("button",{type:"button",style:{fontSize:12},disabled:f.isPending,onClick:()=>f.mutate(y.id),title:"Run evaluation now",children:"Evaluate"}),i.jsx("button",{type:"button",style:{fontSize:12},disabled:p.isPending,onClick:()=>p.mutate({id:y.id,status:y.status==="active"?"inactive":"active"}),children:y.status==="active"?"Deactivate":"Activate"})]})})]},y.id)})})]})})]})}function zd({steps:l,current:s,isComplete:c,canGoTo:u,onGoTo:d,maxWidth:f}){return i.jsx("div",{className:"wizard-steps",style:f?{maxWidth:f}:void 0,children:l.map((p,m)=>{const y=s===m,g=(c==null?void 0:c(m))??m<s,b=(u==null?void 0:u(m))??m<=s;return i.jsxs("button",{type:"button",className:`wizard-step${y?" is-active":""}${g?" is-done":""}${b?" is-clickable":""}`,onClick:()=>b&&d(m),disabled:!b&&!y,children:[i.jsx("span",{className:"wizard-step-num",children:g&&!y?"✓":m+1}),i.jsxs("span",{className:"wizard-step-label",children:[i.jsx("span",{className:"wizard-step-title",children:p.title}),p.summary&&i.jsx("span",{className:"wizard-step-summary",children:p.summary})]})]},p.id)})})}function ht({onBack:l,backLabel:s="Back",onNext:c,nextLabel:u="Next",nextDisabled:d,children:f}){return i.jsxs("div",{className:"wizard-nav",children:[l?i.jsx("button",{type:"button",onClick:l,children:s}):i.jsx("span",{}),i.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[f,c&&i.jsx("button",{type:"button",className:"primary",disabled:d,onClick:c,children:u})]})]})}function mu({entity:l,selected:s,onChange:c,requireSelection:u=!0}){const d=ve({queryKey:["narratives",l],queryFn:()=>re.listNarratives(l),enabled:!!l}),f=d.data??[];function p(x){c(s.includes(x)?s.filter(T=>T!==x):[...s,x])}if(d.isLoading)return i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading narratives…"]});if(f.length===0)return i.jsx(Dt,{title:"No narratives available",message:u?"No narrative filters defined for this object type. You can continue — all information will be included.":"No narrative filters are available for this object type."});const m=s.length===f.length,y=f.map(x=>x.key);function g(){c(y)}function b(){c([])}return i.jsxs("div",{children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10,gap:12,flexWrap:"wrap"},children:[i.jsxs("span",{style:{fontWeight:600,color:"var(--color-text)",fontSize:13},children:[s.length," of ",f.length," selected"]}),i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsx("button",{type:"button",className:"btn-ghost btn-xs",disabled:m,onClick:g,children:"Select all"}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",disabled:s.length===0,onClick:b,children:"Clear"})]})]}),s.length>0&&i.jsxs("div",{className:"selector-summary",children:[s.map(x=>{const T=f.find(R=>R.key===x);return i.jsx("span",{className:"chip narrative",children:(T==null?void 0:T.label)??x},x)}),i.jsx("span",{style:{color:"var(--color-text-dim)"},children:"·"}),i.jsx("span",{style:{color:"var(--color-text-dim)",fontSize:11},children:"information must match ALL (AND)"})]}),i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:f.map(x=>{const T=s.includes(x.key);return i.jsxs("div",{role:"checkbox","aria-checked":T,tabIndex:0,className:`selector-card${T?" selected":""}`,onClick:()=>p(x.key),onKeyDown:R=>(R.key===" "||R.key==="Enter")&&p(x.key),children:[i.jsx("div",{className:"selector-card-check-indicator"}),i.jsxs("div",{className:"selector-card-body",children:[i.jsxs("div",{className:"selector-card-meta",children:[i.jsx("span",{className:"selector-card-title",children:x.label}),i.jsx("span",{className:"selector-card-id",children:x.key})]}),x.description&&i.jsx("div",{className:"selector-card-desc",children:x.description})]}),x.activeRecords!==void 0&&i.jsxs("div",{className:"selector-card-count",children:[i.jsx("div",{className:"selector-card-count-num",children:x.activeRecords.toLocaleString()}),i.jsx("div",{className:"selector-card-count-label",children:"items"})]})]},x.key)})}),u&&s.length===0&&i.jsx("p",{className:"text-dim",style:{fontSize:12,marginTop:12},children:"Select at least one narrative to continue."}),!u&&s.length===0&&i.jsxs("p",{className:"text-dim",style:{fontSize:12,marginTop:12},children:["Information must match ",i.jsx("strong",{style:{color:"var(--color-text-muted)"},children:"all"})," selected narratives (AND). For OR logic, create another ongoing work or batch."]})]})}const vS={core:"Core",snapshot:"Snapshot",scoped:"Scoped",lens:"Lens",enrichment:"Enrichment","processing-output":"Processing",unknown:""};function uu(l){const s=vS[l.role];return s||l.key.charAt(0).toUpperCase()+l.key.slice(1)}function Md({options:l,selected:s,onChange:c}){function u(d){if(s.includes(d)){if(s.length===1)return;c(s.filter(f=>f!==d))}else c([...s,d])}return l.length===0?null:l.length===1?i.jsx("span",{className:"mono",style:{fontSize:13},children:uu(l[0])}):i.jsx("div",{className:"chip-row",children:l.map(d=>i.jsxs("button",{type:"button",className:`chip selectable${s.includes(d.key)?" selected":""}`,onClick:()=>u(d.key),children:[uu(d),d.count>0&&i.jsx("span",{style:{opacity:.65,marginLeft:5,fontSize:11},children:d.count.toLocaleString()})]},d.key))})}const bv="jobs-ui-recent-graphs",gS=20;function jv(){try{const l=localStorage.getItem(bv);if(!l)return[];const s=JSON.parse(l);return Array.isArray(s)?s:[]}catch{return[]}}function xS(l){localStorage.setItem(bv,JSON.stringify(l.slice(0,gS)))}function bS(l){if(!l)return;const s=Date.now(),c=[{graphId:l,usedAt:s},...jv().filter(u=>u.graphId!==l)];xS(c)}function jS(){return jv().sort((l,s)=>s.usedAt-l.usedAt).map(l=>l.graphId)}function hd(l){var s;return(s=l.name)!=null&&s.trim()?l.name.trim():l.graphId.replace(/[-_]+/g," ").replace(/\b\w/g,c=>c.toUpperCase())}function SS(l,s){const c=s.trim().toLowerCase();return c?[l.graphId,l.name,l.description,l.version,...l.entityCompatible].filter(Boolean).join(" ").toLowerCase().includes(c):!0}function xy(l,s){var d,f;if(!s)return 0;const c=s.toLowerCase();let u=0;l.graphId.toLowerCase()===c&&(u+=100),l.graphId.toLowerCase().includes(c)&&(u+=40);for(const p of l.entityCompatible){const m=p.toLowerCase();m===c?u+=80:(m.includes(c)||c.includes(m))&&(u+=30)}return(d=l.name)!=null&&d.toLowerCase().includes(c)&&(u+=20),(f=l.description)!=null&&f.toLowerCase().includes(c)&&(u+=10),u}function NS(l,s,c,u){const d=l.filter(f=>SS(f,u));if(s==="recent"){const f=new Map(d.map(m=>[m.graphId,m])),p=[];for(const m of jS()){const y=f.get(m);y&&p.push(y)}for(const m of d)p.some(y=>y.graphId===m.graphId)||p.push(m);return p}return[...d].sort((f,p)=>{const m=xy(p,c)-xy(f,c);return m!==0?m:hd(f).localeCompare(hd(p))})}const ES=52,CS=5;function pu({entity:l,value:s,onChange:c}){const[u,d]=j.useState("recent"),[f,p]=j.useState(""),m=ve({queryKey:["graphs",l],queryFn:()=>re.graphsForEntity(l),enabled:!!l}),y=m.data??[],g=j.useMemo(()=>NS(y,u,l,f),[y,u,l,f]);function b(x){bS(x.graphId),c(x.graphId,x)}return m.isLoading?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading graphs…"]}):m.isError?i.jsx(Dt,{title:"Could not load graphs",message:m.error instanceof Error?m.error.message:"The graph list failed to load."}):y.length===0?i.jsx(Dt,{title:"No graphs found",message:`No pipelines are available for "${l}". Choose a different object type or add a graph for this type in Graphs Studio.`}):i.jsxs("div",{className:"graph-picker",children:[i.jsxs("div",{className:"graph-picker-toolbar",children:[i.jsxs("div",{className:"chip-row",children:[i.jsx("button",{type:"button",className:`chip selectable${u==="recent"?" selected":""}`,onClick:()=>d("recent"),children:"Recent"}),i.jsx("button",{type:"button",className:`chip selectable${u==="relevant"?" selected":""}`,onClick:()=>d("relevant"),children:"Relevant"})]}),i.jsx("input",{type:"search",className:"graph-picker-search",placeholder:"Search graphs…",value:f,onChange:x=>p(x.target.value)})]}),i.jsx("div",{className:"graph-picker-list",style:{maxHeight:ES*CS},role:"listbox","aria-label":"Graphs",children:g.length===0?i.jsx("div",{className:"graph-picker-empty",children:"No graphs match your search."}):g.map(x=>{const T=s===x.graphId,R=hd(x);return i.jsxs("button",{type:"button",role:"option","aria-selected":T,className:`graph-picker-row${T?" selected":""}`,onClick:()=>b(x),children:[i.jsxs("div",{className:"graph-picker-row-main",children:[i.jsx("span",{className:"graph-picker-row-title",children:R}),x.version&&i.jsx("span",{className:"chip",style:{fontSize:10},children:x.version})]}),i.jsx("span",{className:"graph-picker-row-id mono",children:x.graphId}),x.description&&i.jsx("span",{className:"graph-picker-row-desc",children:x.description})]},x.graphId)})})]})}function Dd({value:l,entities:s,loading:c,error:u,onChange:d,style:f}){if(u){const p=u instanceof Error?u.message:String(u);return i.jsxs("div",{className:"memorix-panel",style:{borderColor:"var(--status-failed)",background:"var(--status-failed-bg)"},children:[i.jsx("div",{className:"memorix-panel-title",style:{color:"var(--status-failed)"},children:"Could not load object types"}),i.jsx("p",{style:{fontSize:13,margin:"4px 0 0"},children:p||"The API is unavailable. Use http://localhost:3099 or start the API before the Vite dev server (5190)."})]})}return i.jsxs("select",{value:l,disabled:c,onChange:p=>d(p.target.value),style:f??{maxWidth:320},children:[i.jsx("option",{value:"",children:c?"Loading object types…":"— select object type —"}),!c&&["entity","event","knowledge"].map(p=>{const m=s.filter(y=>y.target===p);return m.length?i.jsx("optgroup",{label:L0[p],children:m.map(y=>i.jsx("option",{value:y.name,children:y.label},y.name))},p):null})]})}function wd({included:l,excluded:s,includedLabel:c="Matching information"}){const u=s.reduce((d,f)=>d+f.count,0);return i.jsxs("div",{className:"card",style:{padding:14},children:[i.jsxs("div",{style:{display:"flex",gap:24,marginBottom:s.length?12:0},children:[i.jsxs("div",{children:[i.jsx("div",{className:"status-card-count",style:{fontSize:24,color:"var(--status-done)"},children:l.toLocaleString()}),i.jsx("div",{className:"text-muted",style:{fontSize:12},children:c})]}),i.jsxs("div",{children:[i.jsx("div",{className:"status-card-count",style:{fontSize:24,color:u?"var(--status-blocked)":"var(--color-text-dim)"},children:u.toLocaleString()}),i.jsx("div",{className:"text-muted",style:{fontSize:12},children:"Excluded"})]})]}),s.length>0&&i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:s.map(d=>i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,padding:"4px 0",borderTop:"1px solid var(--color-border)"},children:[i.jsx("span",{className:"text-muted",children:B0[d.reason]}),i.jsx("span",{className:"mono",style:{color:"var(--status-blocked)"},children:d.count})]},d.reason))})]})}function xi({entity:l,collection:s,narratives:c,processing:u,graphId:d}){const f=ve({queryKey:["matching",l,s,c,u,d],queryFn:()=>re.previewMatching({entity:l,collection:s,narratives:c,processing:u,graphId:d}),enabled:!!l});if(f.isLoading)return i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Evaluating matching information…"]});if(!f.data)return null;const{matched:p,total:m,excluded:y,sample:g}=f.data;return i.jsxs("div",{children:[i.jsx(wd,{included:p,excluded:y}),i.jsxs("p",{className:"text-dim",style:{fontSize:12,margin:"10px 0"},children:[p.toLocaleString()," of ",m.toLocaleString()," ",l," items match the current selection."]}),g.length>0&&i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Item"}),i.jsx("th",{children:"Label"}),i.jsx("th",{children:"Narratives"}),i.jsx("th",{children:"Updated"})]})}),i.jsx("tbody",{children:g.map(b=>i.jsxs("tr",{style:{cursor:"default"},children:[i.jsx("td",{className:"mono",style:{fontSize:12},children:b.id}),i.jsx("td",{children:b.label}),i.jsx("td",{children:i.jsx("span",{className:"chip-row",children:Object.keys(b.narratives).map(x=>i.jsx("span",{className:"chip narrative",children:x},x))})}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:new Date(b.updatedAt).toLocaleString()})]},b.id))})]})})]})}const TS=["ttl","failed-only","condition","all","skip"],RS=["skip","failed-only","before-date","after-date","condition","all"],by={value:7,unit:"days"};function _d({context:l="recurring",entity:s,targetGraphId:c,value:u,onChange:d}){const{agentQueryParam:f}=Ia(),p=ve({queryKey:["graphs",s],queryFn:()=>re.graphsForEntity(s),enabled:!!s}),m=ve({queryKey:["entities",f??"all"],queryFn:()=>re.listEntities(f)}),y=ve({queryKey:["relationships"],queryFn:()=>"listRelationships"in re?re.listRelationships():Promise.resolve([])}),g=p.data??[],b=g.filter(B=>B.graphId!==c),x=(m.data??[]).filter(B=>B.name!==s),T=y.data??[],R=l==="recurring"?TS:RS,w=l==="recurring"?"ttl":"skip",q=u.reprocessingMode??w,H=u.reprocessingTtl??by,U=u.requiredGraphs??[],X=u.crossEntityPrerequisites??[];function G(B){d({...u,excludeInFlight:!0,...B})}function V(B){G({reprocessingMode:B,reprocessingTtl:B==="ttl"?by:void 0,reprocessingDate:void 0,reprocessingCondition:void 0})}function P(B){const ne=g.find(me=>me.graphId===B);!ne||U.some(me=>me.graphId===B)||G({requiredGraphs:[...U,{graphId:B,graphName:ne.name}]})}function J(B){G({requiredGraphs:U.filter(ne=>ne.graphId!==B)})}const[Z,I]=j.useState(""),[O,le]=j.useState(""),[ue,de]=j.useState(""),Ne=ve({queryKey:["graphs",Z],queryFn:()=>re.graphsForEntity(Z),enabled:!!Z}).data??[],pe=T.filter(B=>B.sourceEntity===s&&B.targetEntity===Z);function Q(){if(!Z||!ue)return;const B=pe.find(me=>me.relationKey===O),ne=Ne.find(me=>me.graphId===ue);X.some(me=>me.entity===Z&&me.relationshipKey===O&&me.graphId===ue)||(G({crossEntityPrerequisites:[...X,{entity:Z,relationshipKey:O,relationshipLabel:B==null?void 0:B.relationKey,graphId:ue,graphName:ne==null?void 0:ne.name}]}),I(""),le(""),de(""))}function $(B){G({crossEntityPrerequisites:X.filter((ne,me)=>me!==B)})}return i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[i.jsxs("div",{className:"prereq-section",children:[i.jsxs("div",{className:"prereq-section-header",children:[i.jsx("span",{style:{fontSize:13,fontWeight:600},children:"Reprocessing"}),q!==w&&i.jsx("span",{className:"chip",style:{background:"var(--color-warning-subtle, #2a2000)",borderColor:"var(--color-warning-border, #5a4000)",color:"var(--color-warning, #e6c200)"},children:"custom"})]}),i.jsxs("div",{className:"prereq-section-body",style:{display:"flex",flexDirection:"column",gap:10},children:[i.jsx("select",{value:q,onChange:B=>V(B.target.value),style:{width:"100%"},children:R.map(B=>i.jsx("option",{value:B,children:pv[B]},B))}),q==="ttl"&&i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{fontSize:12,color:"var(--color-text-muted)",whiteSpace:"nowrap"},children:"Only if older than"}),i.jsx("input",{type:"number",min:1,value:H.value,onChange:B=>G({reprocessingTtl:{...H,value:Math.max(1,Number(B.target.value))}}),style:{width:70}}),i.jsxs("select",{value:H.unit,onChange:B=>G({reprocessingTtl:{...H,unit:B.target.value}}),style:{width:90},children:[i.jsx("option",{value:"hours",children:"hours"}),i.jsx("option",{value:"days",children:"days"}),i.jsx("option",{value:"weeks",children:"weeks"})]})]}),(q==="before-date"||q==="after-date")&&i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{style:{fontSize:12,color:"var(--color-text-muted)",whiteSpace:"nowrap"},children:q==="before-date"?"Before":"After"}),i.jsx("input",{type:"date",value:u.reprocessingDate??"",onChange:B=>G({reprocessingDate:B.target.value||void 0}),style:{flex:1}})]}),q==="condition"&&i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[i.jsx("textarea",{rows:3,value:u.reprocessingCondition??"",onChange:B=>G({reprocessingCondition:B.target.value||void 0}),placeholder:'{ "fields.criticality": "high" }',style:{fontFamily:"var(--font-mono)",fontSize:12}}),i.jsx("span",{style:{fontSize:11,color:"var(--color-text-dim)"},children:"Information matching this JSON condition will be re-run even if already processed."})]}),q!=="skip"&&i.jsx("p",{style:{fontSize:11,color:"var(--color-text-dim)",lineHeight:1.5},children:"Information currently queued or running is always excluded to prevent overlapping work."})]})]}),i.jsxs("div",{className:"prereq-section",children:[i.jsxs("div",{className:"prereq-section-header",children:[i.jsx("span",{style:{fontSize:13,fontWeight:600},children:"Required prior processing"}),i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{className:"text-dim",style:{fontSize:12},children:"same entity"}),U.length>0&&i.jsx("span",{className:"chip",style:{background:"var(--color-accent-subtle)",borderColor:"var(--color-accent-border)",color:"var(--color-accent)"},children:U.length})]})]}),i.jsxs("div",{className:"prereq-section-body",children:[i.jsx("p",{style:{fontSize:12,color:"var(--color-text-muted)",marginBottom:12,lineHeight:1.5},children:"This item must have been successfully processed by these graphs before it becomes eligible."}),b.length>0?i.jsxs("select",{value:"",onChange:B=>{B.target.value&&P(B.target.value)},style:{width:"100%",marginBottom:U.length?10:0},children:[i.jsx("option",{value:"",children:"+ Add required graph…"}),b.filter(B=>!U.some(ne=>ne.graphId===B.graphId)).map(B=>i.jsxs("option",{value:B.graphId,children:[B.name,B.version?` (${B.version})`:""]},B.graphId))]}):i.jsxs("p",{className:"text-dim",style:{fontSize:12,marginBottom:8},children:['No other graphs compatible with "',s,'".']}),U.length>0&&i.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:U.map(B=>i.jsxs("span",{className:"prereq-tag",children:[i.jsx("span",{className:"mono",style:{fontSize:12},children:B.graphName??B.graphId}),i.jsx("button",{className:"prereq-tag-remove",onClick:()=>J(B.graphId),title:"Remove",children:"×"})]},B.graphId))})]})]}),i.jsxs("div",{className:"prereq-section",children:[i.jsxs("div",{className:"prereq-section-header",children:[i.jsx("span",{style:{fontSize:13,fontWeight:600},children:"Cross-entity prerequisites"}),X.length>0&&i.jsx("span",{className:"chip",style:{background:"var(--color-accent-subtle)",borderColor:"var(--color-accent-border)",color:"var(--color-accent)"},children:X.length})]}),i.jsxs("div",{className:"prereq-section-body",children:[i.jsx("p",{style:{fontSize:12,color:"var(--color-text-muted)",marginBottom:12,lineHeight:1.5},children:"Information from a linked entity must have been processed first — e.g. process child records only after their linked parent records have been enriched."}),i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr auto",gap:8,alignItems:"center",marginBottom:10},children:[i.jsxs("select",{value:Z,onChange:B=>{I(B.target.value),le(""),de("")},children:[i.jsx("option",{value:"",children:"Linked entity…"}),x.map(B=>i.jsx("option",{value:B.name,children:B.label},B.name))]}),i.jsxs("select",{value:O,onChange:B=>le(B.target.value),disabled:!Z,children:[i.jsx("option",{value:"",children:"Relationship…"}),pe.map(B=>i.jsx("option",{value:B.relationKey,children:B.relationKey},B.relationKey))]}),i.jsxs("select",{value:ue,onChange:B=>de(B.target.value),disabled:!Z,children:[i.jsx("option",{value:"",children:"Processed by…"}),Ne.map(B=>i.jsx("option",{value:B.graphId,children:B.name},B.graphId))]}),i.jsx("button",{type:"button",className:"btn btn-sm",disabled:!Z||!ue,onClick:Q,children:"Add"})]}),X.length>0&&i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:X.map((B,ne)=>i.jsxs("span",{className:"prereq-tag",style:{justifyContent:"space-between"},children:[i.jsxs("span",{style:{fontSize:12},children:[i.jsx("span",{className:"mono",children:B.entity}),B.relationshipKey&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-dim",children:" via "}),i.jsx("span",{className:"mono",children:B.relationshipKey})]}),i.jsx("span",{className:"text-dim",children:" → processed by "}),i.jsx("span",{className:"mono",children:B.graphName??B.graphId})]}),i.jsx("button",{className:"prereq-tag-remove",onClick:()=>$(ne),title:"Remove",children:"×"})]},ne))})]})]})]})}const AS={success:{icon:"✓",color:"var(--status-done)",bg:"var(--status-done-bg)",label:"Success"},partial:{icon:"◐",color:"var(--status-blocked)",bg:"var(--status-blocked-bg)",label:"Partially completed"},failed:{icon:"✕",color:"var(--status-failed)",bg:"var(--status-failed-bg)",label:"Failed"},"created-inactive":{icon:"◌",color:"var(--status-pending)",bg:"var(--status-pending-bg)",label:"Created (inactive)"}},OS={good:"var(--status-done)",warn:"var(--status-blocked)",bad:"var(--status-failed)",default:"var(--color-text)"};function yu({result:l}){const s=AS[l.status];return i.jsxs("div",{className:"card",style:{maxWidth:640,margin:"0 auto",borderColor:s.color},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:4},children:[i.jsx("span",{style:{width:40,height:40,borderRadius:"50%",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:s.bg,color:s.color,fontSize:20,fontWeight:700},children:s.icon}),i.jsxs("div",{children:[i.jsx("div",{style:{fontSize:17,fontWeight:600},children:l.title}),l.summary&&i.jsx("div",{className:"text-muted",style:{fontSize:13},children:l.summary})]})]}),l.stats&&l.stats.length>0&&i.jsx("div",{className:"review-grid",style:{marginTop:16},children:l.stats.map(c=>i.jsxs("div",{className:"review-row",children:[i.jsx("span",{className:"review-label",children:c.label}),i.jsx("span",{style:{color:OS[c.tone??"default"],fontWeight:c.tone&&c.tone!=="default"?600:400},children:String(c.value)})]},c.label))}),l.errors&&l.errors.length>0&&i.jsxs("div",{className:"error-state",style:{marginTop:16,fontSize:12},children:[i.jsxs("strong",{children:[l.errors.length," issue",l.errors.length===1?"":"s",":"]}),i.jsx("ul",{style:{margin:"6px 0 0 18px"},children:l.errors.map((c,u)=>i.jsx("li",{children:c},u))})]}),l.actions&&l.actions.length>0&&i.jsx("div",{style:{display:"flex",gap:10,flexWrap:"wrap",marginTop:20,paddingTop:16,borderTop:"1px solid var(--color-border)"},children:l.actions.map(c=>c.to?i.jsx(Ke,{to:c.to,children:i.jsx("button",{type:"button",className:c.primary?"primary":"",children:c.label})},c.label):i.jsx("button",{type:"button",className:c.primary?"primary":"",children:c.label},c.label))})]})}const jy={entityId:"same-as-input",contentType:dd,newRecord:!0};function zS(l){if(!l)return"not declared on graph";const s=l.entityId==="same-as-input"?"same as input":l.entityId,c=l.newRecord===!1?"replace existing":"always new record";return`${s} · ${l.contentType} · ${c}`}function Sv({enabled:l,value:s,sourceEntity:c,graphPersistency:u,onEnabledChange:d,onChange:f}){const p=s??jy,m=p.entityId==="same-as-input"?"same-as-input":"custom";function y(g){f({...p,...g})}return i.jsxs("div",{className:"persistency-override",children:[i.jsxs("label",{className:"checkbox-row",style:{display:"flex",gap:8,alignItems:"flex-start",marginBottom:12},children:[i.jsx("input",{type:"checkbox",checked:l,onChange:g=>{const b=g.target.checked;d(b),b&&!s&&f({...jy}),b||f(void 0)}}),i.jsxs("span",{children:[i.jsx("strong",{children:"Override result persistence"}),i.jsxs("span",{className:"hint",style:{display:"block",marginTop:4},children:["Graph default: ",zS(u),l?" — work-level settings below merge over the graph at job completion.":" — enable to specify or override where graph results are written."]})]})]}),l&&i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Target object type"}),i.jsxs("select",{value:m,onChange:g=>{g.target.value==="same-as-input"?y({entityId:"same-as-input"}):y({entityId:c??""})},children:[i.jsxs("option",{value:"same-as-input",children:["Same as input",c?` (${c})`:""]}),i.jsx("option",{value:"custom",children:"Other object type…"})]})]}),m==="custom"&&i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Object type name"}),i.jsx("input",{value:p.entityId==="same-as-input"?"":p.entityId,onChange:g=>y({entityId:g.target.value||"same-as-input"}),placeholder:"e.g. vulnerabilities"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Content type"}),i.jsx("input",{value:p.contentType,onChange:g=>y({contentType:g.target.value||dd}),placeholder:dd})]}),i.jsxs("div",{className:"field",children:[i.jsxs("label",{className:"checkbox-row",style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsx("input",{type:"checkbox",checked:p.newRecord!==!1,onChange:g=>y({newRecord:g.target.checked})}),"Always insert a new result record"]}),i.jsx("span",{className:"hint",children:"When unchecked, results replace the existing record at the target (legacy mode)."})]})]})]})}const MS=[{id:"basic",title:"Basic info",summary:"Name & entity"},{id:"narratives",title:"Narratives",summary:"Select information"},{id:"prereqs",title:"Prerequisites",summary:"Processing rules"},{id:"graph",title:"Graph",summary:"Pipeline to run"},{id:"policy",title:"Execution policy",summary:"Interval & concurrency"},{id:"review",title:"Review",summary:"Create"},{id:"result",title:"Created",summary:"Result"}],DS=[5,15,30,60,240,1440];function wS(){const{agentQueryParam:l}=Ia(),[s,c]=j.useState(0),[u,d]=j.useState(""),[f,p]=j.useState(""),[m,y]=j.useState(""),[g,b]=j.useState(["core"]),[x,T]=j.useState([]),[R,w]=j.useState(""),[q,H]=j.useState(),[U,X]=j.useState(!1),[G,V]=j.useState(),[P,J]=j.useState({reprocessingMode:"ttl",reprocessingTtl:{value:7,unit:"days"},excludeInFlight:!0,requiredGraphs:[],crossEntityPrerequisites:[]}),[Z,I]=j.useState({rescanIntervalMinutes:15,priority:100}),[O,le]=j.useState(null),ue=ve({queryKey:["entities",l??"all"],queryFn:()=>re.listEntities(l),retry:2}),de=ue.data??[];j.useEffect(()=>{if(!m||!ue.isSuccess)return;de.map(F=>F.name).includes(m)||y("")},[ue.isSuccess,de,m]);const se=de.find(z=>z.name===m),Ne=Xt({mutationFn:z=>re.createWork({name:u,description:f,entity:m,collection:g[0]??"core",narratives:x,processing:P,graphId:R,policy:Z,activate:z,...U?{persistency:G}:{}}),onSuccess:({result:z})=>{le(z),c(6)}}),pe=!!(u.trim()&&m),Q=!!R,B=!(((se==null?void 0:se.narratives.length)??0)>0)||x.length>0;function ne(z){if(z<=s)return c(z);z>=1&&!pe||z>=2&&!B||z>=4&&!Q||c(z)}const me=(()=>{var he,ge;const z=P.reprocessingMode??"ttl";let F;if(z==="ttl"){const W=P.reprocessingTtl??{value:7,unit:"days"};F=`re-run if older than ${W.value} ${W.unit}`}else F=pv[z].split(" — ")[0];const ee=[F];return(((he=P.requiredGraphs)==null?void 0:he.length)??0)>0&&ee.push(`${P.requiredGraphs.length} prior graph(s) required`),(((ge=P.crossEntityPrerequisites)==null?void 0:ge.length)??0)>0&&ee.push(`${P.crossEntityPrerequisites.length} cross-entity prerequisite(s)`),ee.join(" · ")})(),C=g.map(z=>{const F=se==null?void 0:se.collections.find(ee=>ee.key===z);return F?uu(F):z}).join(", ");return i.jsxs("div",{children:[i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"New ongoing work"}),i.jsx("span",{className:"page-subtitle",children:"Ongoing work evaluates matching information on a schedule and queues jobs automatically."})]})}),i.jsx(zd,{steps:MS,current:s,canGoTo:z=>z<=s||z<=5&&pe,onGoTo:ne,maxWidth:980}),i.jsxs("div",{style:{maxWidth:720},children:[s===0&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"1. Basic info"}),i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Name *"}),i.jsx("input",{value:u,onChange:z=>d(z.target.value),placeholder:"e.g. Process selected records"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Object type *"}),i.jsx(Dd,{value:m,entities:de,loading:ue.isLoading,error:ue.error,onChange:z=>{var F,ee;y(z),T([]),w(""),H(void 0),b([((ee=(F=de.find(he=>he.name===z))==null?void 0:F.collections[0])==null?void 0:ee.key)??"core"])}})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Data sources"}),i.jsx(Md,{options:(se==null?void 0:se.collections)??[],selected:g,onChange:b}),i.jsx("span",{className:"hint",children:"Select which data sources are passed to the graph as input."})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Description"}),i.jsx("textarea",{value:f,onChange:z=>p(z.target.value),placeholder:"Optional — describe what this ongoing work does",rows:3})]})]}),i.jsx(ht,{onNext:()=>ne(1),nextLabel:"Next: narratives",nextDisabled:!pe})]}),s===1&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"2. Select information by narratives"}),i.jsx(mu,{entity:m,selected:x,onChange:T}),m&&i.jsx("div",{style:{marginTop:16},children:i.jsx(xi,{entity:m,collection:g[0]??"core",narratives:x})}),i.jsx(ht,{onBack:()=>ne(0),onNext:()=>ne(2),nextLabel:"Next: prerequisites",nextDisabled:!B})]}),s===2&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"3. Processing prerequisites"}),i.jsx("p",{className:"wizard-lead",children:"Control which information is eligible. By default, items processed within the last 7 days are skipped — keeping results fresh without re-running everything on every scan."}),i.jsx(_d,{context:"recurring",entity:m,targetGraphId:R||void 0,value:P,onChange:J}),i.jsx(ht,{onBack:()=>ne(1),onNext:()=>ne(3),nextLabel:"Next: graph"})]}),s===3&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"4. Choose graph / pipeline"}),i.jsxs("p",{className:"wizard-lead",children:['Only graphs compatible with "',m,'" are shown. This graph is also used for reprocessing checks.']}),i.jsx(pu,{entity:m,value:R,onChange:(z,F)=>{w(z),H(F)}}),i.jsx("div",{className:"section-title",style:{marginTop:20},children:"Result persistence"}),i.jsx(Sv,{enabled:U,value:G,sourceEntity:m,graphPersistency:q==null?void 0:q.persistency,onEnabledChange:X,onChange:V}),i.jsx(ht,{onBack:()=>ne(2),onNext:()=>ne(4),nextLabel:"Next: execution policy",nextDisabled:!Q})]}),s===4&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"5. Execution policy"}),i.jsx("p",{className:"wizard-lead",children:"Running jobs are never interrupted — this policy controls how often new eligible information is discovered. How many jobs run in parallel is configured app-wide in Settings."}),i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Re-scan for new eligible information"}),i.jsx("select",{value:Z.rescanIntervalMinutes,onChange:z=>I({...Z,rescanIntervalMinutes:Number(z.target.value)}),children:DS.map(z=>i.jsx("option",{value:z,children:Es(z)},z))}),i.jsx("span",{className:"hint",children:"Every X minutes, information that has become newly eligible (new or changed data matching your narratives) is discovered and queued. Running jobs are not affected."})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Priority"}),i.jsx("input",{type:"number",value:Z.priority,onChange:z=>I({...Z,priority:Number(z.target.value)})}),i.jsx("span",{className:"hint",children:"Higher priority jobs are picked up before lower priority ones when the queue is contested."})]})]}),i.jsx(ht,{onBack:()=>ne(3),onNext:()=>ne(5),nextLabel:"Next: review"})]}),s===5&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"6. Review & create"}),i.jsxs("div",{className:"review-grid",style:{marginBottom:20},children:[i.jsx(Cn,{label:"Object type",value:m}),i.jsx(Cn,{label:"Data sources",value:C||"—"}),i.jsx(Cn,{label:"Narratives (AND)",value:x.join(", ")||"none"}),i.jsx(Cn,{label:"Prerequisites",value:me}),i.jsx(Cn,{label:"Graph / pipeline",value:(q==null?void 0:q.name)??R}),U&&i.jsx(Cn,{label:"Result persistence",value:`${(G==null?void 0:G.entityId)??"same-as-input"} · ${(G==null?void 0:G.contentType)??"inferences"}`}),i.jsx(Cn,{label:"Re-scan interval",value:Es(Z.rescanIntervalMinutes)}),i.jsx(Cn,{label:"Priority",value:String(Z.priority)})]}),i.jsx("div",{className:"section-title",children:"Estimated matching information"}),i.jsx(xi,{entity:m,collection:g[0]??"core",narratives:x,processing:P,graphId:R}),Ne.isError&&i.jsx(Zt,{title:"Failed to create ongoing work",detail:Ne.error}),i.jsxs(ht,{onBack:()=>ne(4),children:[i.jsx("button",{type:"button",disabled:Ne.isPending,onClick:()=>Ne.mutate(!1),children:"Create inactive"}),i.jsx("button",{type:"button",className:"primary",disabled:Ne.isPending,onClick:()=>Ne.mutate(!0),children:Ne.isPending?"Creating…":"Create and activate"})]})]}),s===6&&O&&i.jsx(yu,{result:O})]})]})}function Cn({label:l,value:s}){return i.jsxs("div",{className:"review-row",children:[i.jsx("span",{className:"review-label",children:l}),i.jsx("span",{children:s})]})}const _S=[5,15,30,60,240,1440];function qS({work:l,onSaved:s}){var le,ue,de;const[c,u]=j.useState(l.name),[d,f]=j.useState(l.description??""),[p,m]=j.useState(l.narratives),[y,g]=j.useState(l.graphId),[b,x]=j.useState(l.processing??{reprocessingMode:"ttl",reprocessingTtl:{value:7,unit:"days"},excludeInFlight:!0,requiredGraphs:[],crossEntityPrerequisites:[]}),[T,R]=j.useState(l.policy),[w,q]=j.useState(l.persistency!==void 0),[H,U]=j.useState(l.persistency),[X,G]=j.useState(!1);j.useEffect(()=>{u(l.name),f(l.description??""),m(l.narratives),g(l.graphId),x(l.processing??{reprocessingMode:"ttl",reprocessingTtl:{value:7,unit:"days"},excludeInFlight:!0,requiredGraphs:[],crossEntityPrerequisites:[]}),R(l.policy),q(l.persistency!==void 0),U(l.persistency),G(!1)},[l]);const P=(((le=ve({queryKey:["narratives",l.entity],queryFn:()=>re.listNarratives(l.entity)}).data)==null?void 0:le.length)??0)>0,Z=(de=(ue=ve({queryKey:["graphs",l.entity],queryFn:()=>re.graphsForEntity(l.entity)}).data)==null?void 0:ue.find(se=>se.graphId===y))==null?void 0:de.persistency,I=Xt({mutationFn:()=>re.updateWork(l.id,{name:c.trim(),description:d.trim()||void 0,narratives:p,processing:b,graphId:y,policy:T,persistency:w?H:null}),onSuccess:()=>{G(!0),s()}}),O=!!(c.trim()&&y&&(!P||p.length>0));return i.jsxs("div",{className:"card",style:{maxWidth:720},children:[i.jsx("div",{className:"card-title",children:"Configuration"}),i.jsx("p",{className:"text-muted",style:{fontSize:13,marginBottom:16},children:"Edit selection, prerequisites, graph, and schedule for this ongoing work. Parallel execution is configured app-wide in Settings."}),i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Name"}),i.jsx("input",{value:c,onChange:se=>{u(se.target.value),G(!1)}})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Description"}),i.jsx("textarea",{value:d,onChange:se=>{f(se.target.value),G(!1)},rows:2,placeholder:"Optional"})]})]}),i.jsx("div",{className:"section-title",style:{marginTop:20},children:"Information selection"}),i.jsxs("p",{className:"text-dim",style:{fontSize:12,marginBottom:10},children:["Object type: ",i.jsx("strong",{style:{color:"var(--color-text-muted)"},children:l.entity})," · ","Data source: ",i.jsx("strong",{style:{color:"var(--color-text-muted)"},children:l.collection})]}),i.jsx(mu,{entity:l.entity,selected:p,onChange:se=>{m(se),G(!1)}}),i.jsx("div",{className:"section-title",style:{marginTop:24},children:"Processing prerequisites"}),i.jsx(_d,{context:"recurring",entity:l.entity,targetGraphId:y||void 0,value:b,onChange:se=>{x(se),G(!1)}}),i.jsx("div",{className:"section-title",style:{marginTop:24},children:"Graph / pipeline"}),i.jsx(pu,{entity:l.entity,value:y,onChange:se=>{g(se),G(!1)}}),i.jsx("div",{className:"section-title",style:{marginTop:24},children:"Result persistence"}),i.jsx(Sv,{enabled:w,value:H,sourceEntity:l.entity,graphPersistency:Z,onEnabledChange:se=>{q(se),G(!1)},onChange:se=>{U(se),G(!1)}}),i.jsx("div",{className:"section-title",style:{marginTop:24},children:"Execution policy"}),i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Re-scan for new eligible information"}),i.jsx("select",{value:T.rescanIntervalMinutes,onChange:se=>{R({...T,rescanIntervalMinutes:Number(se.target.value)}),G(!1)},children:_S.map(se=>i.jsx("option",{value:se,children:Es(se)},se))})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Priority"}),i.jsx("input",{type:"number",value:T.priority,onChange:se=>{R({...T,priority:Number(se.target.value)}),G(!1)}})]})]}),i.jsx("div",{className:"section-title",style:{marginTop:24},children:"Matching preview"}),i.jsx(xi,{entity:l.entity,collection:l.collection,narratives:p,processing:b,graphId:y}),I.isError&&i.jsx("div",{style:{marginTop:16},children:i.jsx(Zt,{title:"Failed to save",detail:I.error})}),i.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center",marginTop:20},children:[i.jsx("button",{type:"button",className:"primary",disabled:!O||I.isPending,onClick:()=>I.mutate(),children:I.isPending?"Saving…":"Save configuration"}),X&&!I.isPending&&i.jsx("span",{className:"text-muted",style:{fontSize:13},children:"Saved"})]})]})}const US=["Overview","Evaluations","Matching Information","Runs","Settings"];function LS(){var T,R;const{id:l=""}=Ds(),s=ji(),[c,u]=j.useState("Overview"),[d,f]=j.useState(null),p=ve({queryKey:["work",l],queryFn:()=>re.work(l)}),m=p.data,y=ve({queryKey:["work-evals",l],queryFn:()=>re.workEvaluations(l),enabled:!!m}),g=ve({queryKey:["work-runs",l],queryFn:()=>re.factoryRuns({workId:l}),enabled:c==="Runs"}),b=Xt({mutationFn:()=>re.runEvaluation(l),onSuccess:({result:w})=>{f(w),s.invalidateQueries({queryKey:["work",l]}),s.invalidateQueries({queryKey:["work-evals",l]})}}),x=Xt({mutationFn:()=>re.setWorkStatus(l,m.status==="active"?"inactive":"active"),onSuccess:()=>s.invalidateQueries({queryKey:["work",l]})});return p.isLoading?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}):p.isError||!m?i.jsx(Zt,{title:"Ongoing work not found",detail:p.error}):i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx(Ke,{to:"/work",children:"Work"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),m.name]}),i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx("h1",{className:"page-title",children:m.name}),i.jsx(jt,{status:m.status})]}),i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsx("button",{disabled:b.isPending,onClick:()=>b.mutate(),children:"Run evaluation now"}),i.jsx("button",{disabled:x.isPending,onClick:()=>x.mutate(),children:m.status==="active"?"Deactivate":"Activate"})]})]}),d&&i.jsx("div",{style:{marginBottom:16},children:i.jsx(yu,{result:d})}),i.jsx("div",{className:"tabs",children:US.map(w=>i.jsx("button",{className:`tab${c===w?" active":""}`,onClick:()=>u(w),children:w},w))}),c==="Overview"&&i.jsxs("div",{className:"detail-grid",children:[i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Configuration"}),i.jsx(da,{k:"Entity",v:`${m.entity} · ${m.collection}`}),i.jsx(da,{k:"Narratives",v:m.narratives.join(", ")||"none"}),i.jsx(da,{k:"Processing rule",v:(T=m.processing)!=null&&T.overrideDuplicatePrevention?"reprocess (override)":"skip already processed / queued / running"}),i.jsx(da,{k:"Graph",v:m.graphName??m.graphId}),i.jsx(da,{k:"Description",v:m.description??"—"})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Schedule & results"}),i.jsx(da,{k:"Re-scan interval",v:Es(m.policy.rescanIntervalMinutes)}),i.jsx(da,{k:"Last scanned",v:`${Ln(m.lastEvaluatedAt)} (${ia(m.lastEvaluatedAt)})`}),i.jsx(da,{k:"Next scan",v:m.status==="active"?Ln(m.nextEvaluationAt):"paused (inactive)"}),i.jsx(da,{k:"Jobs created",v:String(m.jobsCreated)}),i.jsx(da,{k:"Estimated matching",v:String(m.estimatedMatching??"—")}),i.jsx(da,{k:"Priority",v:String(m.policy.priority)})]})]}),c==="Evaluations"&&i.jsx(BS,{id:l,evalsQuery:y}),c==="Matching Information"&&i.jsx(xi,{entity:m.entity,collection:m.collection,narratives:m.narratives,processing:m.processing,graphId:m.graphId}),c==="Runs"&&i.jsx(HS,{runs:((R=g.data)==null?void 0:R.runs)??[],loading:g.isLoading}),c==="Settings"&&i.jsx(qS,{work:m,onSaved:()=>s.invalidateQueries({queryKey:["work",l]})})]})}function BS({evalsQuery:l}){const s=l.data??[];return l.isLoading?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}):s.length===0?i.jsx(Dt,{title:"No evaluations yet",message:"When this work is active (or you run an evaluation now), each cycle is recorded here with what it matched, created, and excluded."}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:s.map(c=>i.jsxs("div",{className:"card",children:[i.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[i.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[i.jsx(jt,{status:c.status}),i.jsx("span",{className:"text-muted",style:{fontSize:12},children:ia(c.at)})]}),i.jsxs("span",{className:"text-dim",style:{fontSize:12},children:[c.durationMs," ms"]})]}),c.error&&i.jsx("div",{className:"error-state",style:{fontSize:12,marginBottom:8},children:c.error}),c.zeroReason&&i.jsxs("div",{className:"text-muted",style:{fontSize:12,marginBottom:8},children:["Zero jobs: ",c.zeroReason]}),i.jsxs("div",{style:{display:"flex",gap:24,fontSize:13},children:[i.jsxs("span",{children:[i.jsx("strong",{children:c.matched})," ",i.jsx("span",{className:"text-muted",children:"matched"})]}),i.jsxs("span",{children:[i.jsx("strong",{style:{color:"var(--status-done)"},children:c.created})," ",i.jsx("span",{className:"text-muted",children:"created"})]}),i.jsxs("span",{children:[i.jsx("strong",{style:{color:"var(--status-blocked)"},children:c.excluded})," ",i.jsx("span",{className:"text-muted",children:"excluded"})]})]}),c.exclusionReasons.length>0&&i.jsx("div",{style:{marginTop:10},children:i.jsx(wd,{included:c.created,excluded:c.exclusionReasons,includedLabel:"Jobs created"})})]},c.id))})}function HS({runs:l,loading:s}){return s?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}):l.length===0?i.jsx(Dt,{title:"No runs yet",message:"Jobs created by this ongoing work will appear here."}):i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Item"}),i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Updated"})]})}),i.jsx("tbody",{children:l.map(c=>i.jsxs("tr",{onClick:()=>{window.location.href=`/journal/${c.id}`},children:[i.jsx("td",{children:i.jsx(jt,{status:c.status})}),i.jsx("td",{className:"mono",style:{fontSize:12},children:c.recordLabel??c.recordId}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:c.graphName??c.graphId}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:Ln(c.updatedAt)})]},c.id))})]})})}function da({k:l,v:s}){return i.jsxs("div",{className:"detail-row",children:[i.jsx("span",{className:"detail-key",children:l}),i.jsx("span",{className:"detail-val",style:{fontFamily:"inherit"},children:s})]})}function QS(){const l=Bn();return i.jsxs("div",{children:[i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"On-Demand"}),i.jsx("span",{className:"page-subtitle",children:"Run processing now — pick a single item or a batch selected by narratives."})]})}),i.jsxs("div",{className:"mode-cards",children:[i.jsxs("button",{type:"button",className:"mode-card",onClick:()=>l("/on-demand/single"),children:[i.jsx("div",{className:"mode-card-icon",children:"▶"}),i.jsxs("div",{children:[i.jsx("div",{className:"mode-card-title",children:"Single item"}),i.jsx("div",{className:"mode-card-desc",children:"Run a graph on one item you select manually or at random. Optionally include context."})]}),i.jsx("div",{className:"mode-card-arrow",children:"→"})]}),i.jsxs("button",{type:"button",className:"mode-card",onClick:()=>l("/on-demand/batch"),children:[i.jsx("div",{className:"mode-card-icon",children:"⊞"}),i.jsxs("div",{children:[i.jsx("div",{className:"mode-card-title",children:"Batch"}),i.jsx("div",{className:"mode-card-desc",children:"Run a graph on multiple items that match selected narratives. One job per matching item."})]}),i.jsx("div",{className:"mode-card-arrow",children:"→"})]})]})]})}const GS=new Set(["core","snapshots"]);function md(l){return GS.has(l)}function Nv({node:l,prefix:s,selected:c,onToggle:u}){var b,x,T;const d=s?`${s}.${l.path}`:l.path,f=((b=l.children)==null?void 0:b.map(R=>`${d}.${R.path}`))??[],p=f.length===0||f.every(R=>c.has(R)),m=!((x=l.children)!=null&&x.length),y=m?c.has(d):p;function g(R){if(m)u(d,R.target.checked);else{const w=Ev(l,s);for(const q of w)u(q,R.target.checked)}}return i.jsxs("div",{style:{paddingLeft:s?16:0},children:[i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",fontSize:13,paddingBottom:2},children:[i.jsx("input",{type:"checkbox",checked:y,onChange:g}),i.jsx("span",{className:"mono",style:{color:"var(--color-text)"},children:l.path}),l.inferredType&&i.jsx("span",{style:{color:"var(--color-text-dim)",fontSize:11},children:l.inferredType})]}),(T=l.children)==null?void 0:T.map(R=>i.jsx(Nv,{node:R,prefix:d,selected:c,onToggle:u},R.path))]})}function Ev(l,s){var u;const c=s?`${s}.${l.path}`:l.path;return(u=l.children)!=null&&u.length?l.children.flatMap(d=>Ev(d,c)):[c]}function kS({order:l,onChange:s}){function c(u,d){const f=[...l],p=u+d;p<0||p>=f.length||([f[u],f[p]]=[f[p],f[u]],s(f))}return i.jsxs("div",{style:{marginBottom:12},children:[i.jsx("label",{style:{display:"block",marginBottom:4,fontSize:12,color:"var(--color-text-dim)"},children:"Merge priority (top wins on key collision)"}),l.map((u,d)=>i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[i.jsxs("span",{style:{fontSize:11,color:"var(--color-text-dim)",width:16,textAlign:"right"},children:[d+1,"."]}),i.jsx("span",{className:"mono",style:{fontSize:13,flex:1},children:u}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",disabled:d===0,onClick:()=>c(d,-1),children:"↑"}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",disabled:d===l.length-1,onClick:()=>c(d,1),children:"↓"})]},u))]})}function YS({objectType:l,contentTypeKey:s,target:c,selectedPaths:u,onPathsChange:d}){var q,H;const f=ve({queryKey:["assembler-props",l,s,c],queryFn:()=>re.assemblerProperties({objectType:l,contentType:s,target:c}),staleTime:6e4}),p=((q=f.data)==null?void 0:q.flatPaths)??[],m=((H=f.data)==null?void 0:H.properties)??[],y=new Set(u??p);function g(U,X){const G=new Set(y);X?G.add(U):G.delete(U);const V=p.filter(P=>G.has(P));d(V.length===p.length?void 0:V)}function b(){d(void 0)}function x(){d([])}const T=u===void 0?p.length:u.length,R=md(s)?"1:1":"1:n",w={fontSize:10,padding:"1px 5px",borderRadius:3,background:md(s)?"var(--color-accent-dim, #1a3a5c)":"var(--color-bg-3, #2a2a2a)",color:"var(--color-text-dim)",marginLeft:6};return i.jsxs("div",{style:{border:"1px solid var(--color-border)",borderRadius:6,marginBottom:12,overflow:"hidden"},children:[i.jsxs("div",{style:{padding:"8px 12px",background:"var(--color-bg-2)",display:"flex",alignItems:"center",gap:8},children:[i.jsx("span",{className:"mono",style:{fontWeight:600,fontSize:13},children:s}),i.jsx("span",{style:w,children:R}),i.jsx("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--color-text-dim)"},children:f.isLoading?"Loading…":`${T} / ${p.length} properties`}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",onClick:b,children:"All"}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",onClick:x,children:"None"})]}),!f.isLoading&&m.length===0&&i.jsx("div",{style:{padding:"10px 12px",fontSize:12,color:"var(--color-text-dim)"},children:"No properties sampled (collection may be empty)."}),m.length>0&&i.jsx("div",{style:{padding:"10px 12px",maxHeight:240,overflowY:"auto"},children:m.map(U=>i.jsx(Nv,{node:U,prefix:"",selected:y,onToggle:g},U.path))})]})}function KS({objectType:l,target:s,collections:c,value:u,onChange:d}){const f=c.filter(md),p=c.map(b=>{const x=u==null?void 0:u.contentTypes.find(T=>T.key===b);return{key:b,selectedProperties:x==null?void 0:x.selectedProperties}}),m=(()=>{const b=(u==null?void 0:u.priority)??[],x=f,T=x.filter(R=>!b.includes(R));return[...b.filter(R=>x.includes(R)),...T]})();function y(b,x){const T=p.map(R=>R.key===b?{key:b,selectedProperties:x}:R);d({objectType:l,target:s,contentTypes:T,priority:m})}function g(b){d({objectType:l,target:s,contentTypes:p,priority:b})}return i.jsxs("div",{children:[f.length>1&&i.jsx(kS,{order:m,onChange:g}),c.map(b=>{var x;return i.jsx(YS,{objectType:l,contentTypeKey:b,target:s,selectedPaths:(x=p.find(T=>T.key===b))==null?void 0:x.selectedProperties,onPathsChange:T=>y(b,T)},b)})]})}const XS=[{id:"record",title:"Choose item",summary:"What to process"},{id:"related",title:"Context",summary:"Optional linked data"},{id:"graph",title:"Choose graph",summary:"Pipeline to run"},{id:"properties",title:"Properties",summary:"Data to include"},{id:"review",title:"Review & queue",summary:"Confirm"},{id:"result",title:"Queued",summary:"Result"}];function ZS(){var ge;const{agentQueryParam:l}=Ia(),[s,c]=j.useState(0),[u,d]=j.useState(""),[f,p]=j.useState(["core"]),[m,y]=j.useState([]),[g,b]=j.useState(!1),[x,T]=j.useState(""),[R,w]=j.useState(""),[q,H]=j.useState(),[U,X]=j.useState(100),[G,V]=j.useState(),[P,J]=j.useState(null),Z=ve({queryKey:["entities",l??"all"],queryFn:()=>re.listEntities(l),retry:2}),I=Z.data??[];j.useEffect(()=>{if(!u||!Z.isSuccess)return;I.map(Ee=>Ee.name).includes(u)||d("")},[Z.isSuccess,I,u]);const O=I.find(W=>W.name===u),le=(O==null?void 0:O.target)==="event"?"event":"entity",ue=f[0]??"core",de=ve({queryKey:["core-records",u,f,m],queryFn:()=>re.coreRecords({entity:u,collection:ue,narratives:m,pageSize:100}),enabled:!!u}),se=((ge=de.data)==null?void 0:ge.records)??[],Ne=se.find(W=>W.id===x);function pe(W){p(W),T(""),V(void 0)}function Q(W){y(W),T("")}function $(){se.length&&T(se[Math.floor(Math.random()*se.length)].id)}function B(){if(G)return G;const W=f.filter(Ee=>Ee==="core"||Ee==="snapshots");return{objectType:u,target:le,contentTypes:f.map(Ee=>({key:Ee})),priority:W}}const ne=Xt({mutationFn:()=>re.queueSingle({entity:u,collections:f,recordId:x,graphId:R,priority:U,assemblySelection:B()}),onSuccess:({result:W})=>{J(W),c(5)}}),me=!!(u&&x),C=!!R;function z(W){if(W<=s)return c(W);W>=1&&!me||W>=3&&!C||c(W)}const F=(O==null?void 0:O.collections)??[],ee=f.map(W=>{const Ee=F.find(_e=>_e.key===W);return Ee?uu(Ee):W}).join(", "),he=G?(G.contentTypes.reduce((W,Ee)=>{var _e;return W+(((_e=Ee.selectedProperties)==null?void 0:_e.length)??999)},0),`${G.contentTypes.length} content type${G.contentTypes.length!==1?"s":""} selected`):"All properties (default)";return i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx("a",{href:"/on-demand",children:"On-Demand"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),"Single item"]}),i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"On-Demand: single item"}),i.jsx("span",{className:"page-subtitle",children:"Process one item through a graph."})]})}),i.jsx(zd,{steps:XS,current:s,canGoTo:W=>W<=s,onGoTo:z,maxWidth:840}),i.jsxs("div",{style:{maxWidth:720},children:[s===0&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"1. Choose item"}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Object type"}),i.jsx(Dd,{value:u,entities:I,loading:Z.isLoading,error:Z.error,onChange:W=>{var Wa;const Ee=I.find(yl=>yl.name===W),_e=((Wa=Ee==null?void 0:Ee.collections[0])==null?void 0:Wa.key)??"core";d(W),p([_e]),y([]),b(!1),T(""),w(""),H(void 0),V(void 0)}})]}),u&&i.jsxs("div",{className:"field",style:{marginBottom:12},children:[i.jsx("label",{children:"Data sources"}),i.jsx(Md,{options:F,selected:f,onChange:pe}),i.jsx("span",{className:"hint",children:"Select which content types are merged and sent to the graph."})]}),u&&i.jsxs("div",{className:"field",style:{marginBottom:12},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[i.jsxs("label",{style:{marginBottom:0},children:["Narratives",i.jsx("span",{style:{fontWeight:400,color:"var(--color-text-dim)",marginLeft:6},children:"— optional filter"})]}),i.jsx("button",{type:"button",className:"btn-ghost btn-xs",onClick:()=>b(W=>!W),children:g?"Hide":m.length>0?`${m.length} active ▾`:"Filter ▾"})]}),m.length>0&&!g&&i.jsx("div",{className:"chip-row",style:{marginBottom:6},children:m.map(W=>{const Ee=O==null?void 0:O.narratives.find(_e=>_e.key===W);return i.jsx("span",{className:"chip narrative",children:(Ee==null?void 0:Ee.label)??W},W)})}),g&&i.jsx("div",{style:{marginTop:8},children:i.jsx(mu,{entity:u,selected:m,onChange:Q,requireSelection:!1})})]}),u&&i.jsxs("div",{className:"field",style:{marginBottom:12},children:[i.jsx("label",{children:"Item *"}),i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsxs("select",{value:x,onChange:W=>T(W.target.value),style:{flex:1},children:[i.jsx("option",{value:"",children:de.isLoading?"Loading…":se.length?"Select an item…":"No information"}),se.map(W=>i.jsxs("option",{value:W.id,children:[W.label," (",W.id,")"]},W.id))]}),i.jsx("button",{type:"button",onClick:$,disabled:!se.length,children:"Random"})]}),i.jsxs("span",{className:"hint",children:[se.length," items loaded",m.length>0?` (filtered by ${m.length} narrative${m.length>1?"s":""})`:""," · ",i.jsx("a",{href:`/information?entity=${u}`,children:"Browse all information"})]})]}),i.jsx(ht,{onNext:()=>z(1),nextLabel:"Next: context",nextDisabled:!me})]}),s===1&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"2. Context (optional)"}),Ne&&i.jsxs("div",{className:"memorix-panel",children:[i.jsx("div",{className:"memorix-panel-title",children:"Starting item"}),i.jsxs("span",{className:"mono",children:[u," / ",ee," / ",Ne.label]})]}),i.jsx("div",{className:"empty-state",style:{padding:24},children:"Context is not applicable — there are no relations linked to related entities. You can skip this step and continue."}),i.jsx(ht,{onBack:()=>z(0),onNext:()=>z(2),nextLabel:"Skip — no context"})]}),s===2&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"3. Choose graph"}),i.jsx(pu,{entity:u,value:R,onChange:(W,Ee)=>{w(W),H(Ee)}}),i.jsx(ht,{onBack:()=>z(1),onNext:()=>z(3),nextLabel:"Next: properties",nextDisabled:!C})]}),s===3&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"4. Properties to include"}),i.jsxs("div",{style:{marginBottom:12,color:"var(--color-text-dim)",fontSize:13},children:["Choose which properties are sent to the graph as input. Only domain data is sent — system fields are always excluded.",i.jsxs("ul",{style:{margin:"8px 0 0 16px",lineHeight:1.8,fontSize:12},children:[i.jsxs("li",{children:[i.jsx("strong",{children:"1:1 types"})," (core, snapshots): one record per item, merged at the root. Higher priority wins on duplicate keys."]}),i.jsxs("li",{children:[i.jsx("strong",{children:"1:n types"}),": all matching records, placed as an array under the content-type name."]})]})]}),u&&f.length>0&&i.jsx(KS,{objectType:u,target:le,collections:f,value:G,onChange:V}),i.jsx(ht,{onBack:()=>z(2),onNext:()=>z(4),nextLabel:"Next: review"})]}),s===4&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"5. Review & queue"}),i.jsxs("div",{className:"review-grid",style:{marginBottom:16},children:[i.jsx(ti,{label:"Object type",value:u}),i.jsx(ti,{label:"Data sources",value:ee}),i.jsx(ti,{label:"Properties",value:he}),i.jsx(ti,{label:"Item",value:(Ne==null?void 0:Ne.label)??x}),i.jsx(ti,{label:"Graph",value:(q==null?void 0:q.name)??R}),i.jsx(ti,{label:"Expected update",value:`processing.graphs.${R}.processedAt on success`})]}),i.jsx("div",{className:"form-grid",children:i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Priority"}),i.jsx("input",{type:"number",value:U,onChange:W=>X(Number(W.target.value))}),i.jsx("span",{className:"hint",children:"Higher priority is picked up first when the queue is contested."})]})}),ne.isError&&i.jsx(Zt,{title:"Failed to queue job",detail:ne.error}),i.jsx(ht,{onBack:()=>z(3),children:i.jsx("button",{type:"button",className:"primary",disabled:ne.isPending,onClick:()=>ne.mutate(),children:ne.isPending?"Queueing…":"Queue one job"})})]}),s===5&&P&&i.jsx(yu,{result:P})]})]})}function ti({label:l,value:s}){return i.jsxs("div",{className:"review-row",children:[i.jsx("span",{className:"review-label",children:l}),i.jsx("span",{className:"mono",style:{fontSize:12},children:s})]})}const VS=[{id:"entity",title:"Entity",summary:"Choose entity"},{id:"narratives",title:"Narratives",summary:"Select information"},{id:"processing",title:"Processing",summary:"Filters"},{id:"graph",title:"Graph",summary:"Pipeline"},{id:"review",title:"Review",summary:"Matching information"},{id:"queue",title:"Queue policy",summary:"Concurrency"},{id:"result",title:"Queued",summary:"Result"}];function $S(){var Q;const{agentQueryParam:l}=Ia(),[s]=hu(),[c,u]=j.useState(0),[d,f]=j.useState(s.get("entity")??""),[p,m]=j.useState(["core"]),[y,g]=j.useState([]),[b,x]=j.useState(""),[T,R]=j.useState(),[w,q]=j.useState({reprocessingMode:"skip",excludeInFlight:!0}),[H,U]=j.useState(""),[X,G]=j.useState({priority:100}),[V,P]=j.useState(null),J=ve({queryKey:["entities",l??"all"],queryFn:()=>re.listEntities(l),retry:2}),Z=J.data??[];j.useEffect(()=>{if(!d||!J.isSuccess)return;Z.map(B=>B.name).includes(d)||f("")},[J.isSuccess,Z,d]);const I=Z.find($=>$.name===d),le=((Q=ve({queryKey:["matching",d,p,y,w,b,"count"],queryFn:()=>re.previewMatching({entity:d,collection:p[0]??"core",narratives:y,processing:w,graphId:b}),enabled:!!(d&&b)}).data)==null?void 0:Q.matched)??0,ue=Xt({mutationFn:()=>re.queueBatch({name:H||`${d} batch`,entity:d,collections:p,narratives:y,processing:w,graphId:b,policy:X}),onSuccess:({result:$})=>{P($),u(6)}}),de=!!b,Ne=!(((I==null?void 0:I.narratives.length)??0)>0)||y.length>0;function pe($){if($<=c)return u($);$>=1&&!d||$>=2&&!Ne||$>=4&&!de||u($)}return i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx("a",{href:"/on-demand",children:"On-Demand"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),"Batch"]}),i.jsx("div",{className:"page-header",children:i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"On-Demand: batch"}),i.jsx("span",{className:"page-subtitle",children:"Run one graph on many items that match your selected narratives."})]})}),i.jsx(zd,{steps:VS,current:c,canGoTo:$=>$<=c,onGoTo:pe,maxWidth:980}),i.jsxs("div",{style:{maxWidth:720},children:[c===0&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"1. Choose entity"}),i.jsx("div",{className:"form-grid",children:i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Object type"}),i.jsx(Dd,{value:d,entities:Z,loading:J.isLoading,error:J.error,onChange:$=>{var ne;const B=Z.find(me=>me.name===$);f($),m([((ne=B==null?void 0:B.collections[0])==null?void 0:ne.key)??"core"]),g([]),x(""),R(void 0)}})]})}),I&&i.jsxs("div",{className:"field",style:{marginTop:12},children:[i.jsx("label",{children:"Data sources"}),i.jsx(Md,{options:I.collections,selected:p,onChange:m}),i.jsx("span",{className:"hint",children:"Select which data sources are passed to the graph as input."})]}),I&&i.jsxs("p",{className:"text-dim",style:{fontSize:12},children:[I.coreCount," core information · ",I.narratives.length," narratives · ",I.graphs.length," compatible graphs"]}),i.jsx(ht,{onNext:()=>pe(1),nextLabel:"Next: narratives",nextDisabled:!d})]}),c===1&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"2. Select narratives"}),i.jsx(mu,{entity:d,selected:y,onChange:g}),i.jsx("div",{style:{marginTop:16},children:i.jsx(xi,{entity:d,collection:p[0]??"core",narratives:y})}),i.jsx(ht,{onBack:()=>pe(0),onNext:()=>pe(2),nextLabel:"Next: processing",nextDisabled:!Ne})]}),c===2&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"3. Processing prerequisites"}),i.jsx("p",{className:"wizard-lead",children:"Control which information is eligible. Skip already-processed items by default, and optionally require other graphs to have run first."}),i.jsx(_d,{context:"batch",entity:d,targetGraphId:b||void 0,value:w,onChange:q}),i.jsx(ht,{onBack:()=>pe(1),onNext:()=>pe(3),nextLabel:"Next: graph"})]}),c===3&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"4. Choose graph / pipeline"}),i.jsx(pu,{entity:d,value:b,onChange:($,B)=>{x($),R(B)}}),i.jsx(ht,{onBack:()=>pe(2),onNext:()=>pe(4),nextLabel:"Next: review",nextDisabled:!de})]}),c===4&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"5. Review matching information"}),i.jsx(xi,{entity:d,collection:p[0]??"core",narratives:y,processing:w,graphId:b}),i.jsx(ht,{onBack:()=>pe(3),onNext:()=>pe(5),nextLabel:"Next: queue policy"})]}),c===5&&i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"6. Queue policy"}),i.jsxs("div",{className:"form-grid",children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Batch name"}),i.jsx("input",{value:H,onChange:$=>U($.target.value),placeholder:`${d} batch`})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Priority"}),i.jsx("input",{type:"number",value:X.priority,onChange:$=>G({...X,priority:Number($.target.value)})}),i.jsx("span",{className:"hint",children:"Higher priority is picked up first when the queue is contested. Parallel execution is configured app-wide in Settings."})]})]}),i.jsx("div",{className:"memorix-panel",children:i.jsxs("div",{style:{fontSize:13},children:["This will create ",i.jsx("strong",{children:le.toLocaleString()})," jobs — one per matching item. The app queue settings control how many run in parallel."]})}),ue.isError&&i.jsx(Zt,{title:"Failed to queue batch",detail:ue.error}),i.jsx(ht,{onBack:()=>pe(4),children:i.jsx("button",{type:"button",className:"primary",disabled:ue.isPending,onClick:()=>ue.mutate(),children:ue.isPending?"Queueing…":"Queue batch"})})]}),c===6&&V&&i.jsx(yu,{result:V})]})]})}function JS(){var p,m;const{id:l=""}=Ds(),s=ve({queryKey:["batch",l],queryFn:()=>re.batch(l)}),c=ve({queryKey:["batch-runs",l],queryFn:()=>re.factoryRuns({batchId:l})}),u=s.data;if(s.isLoading)return i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]});if(s.isError||!u)return i.jsx(Zt,{title:"Batch not found",detail:s.error});const d=((p=c.data)==null?void 0:p.runs)??[],f=u.counts;return i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx(Ke,{to:"/on-demand/batch",children:"Batch"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),u.name]}),i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[i.jsx("h1",{className:"page-title",children:u.name}),i.jsx(jt,{status:u.status})]}),i.jsxs("span",{className:"text-dim",style:{fontSize:12},children:["created ",Ln(u.createdAt)]})]}),i.jsx("div",{className:"status-cards",style:{gridTemplateColumns:"repeat(6, 1fr)"},children:[["Total",f.total],["Pending",f.pending],["Running",f.running],["Done",f.done],["Failed",f.failed],["Cancelled",f.cancelled]].map(([y,g])=>i.jsxs("div",{className:"status-card",style:{cursor:"default"},children:[i.jsx("div",{className:"status-card-label",children:y}),i.jsx("div",{className:"status-card-count",children:g})]},y))}),i.jsxs("div",{className:"detail-grid",children:[i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Selection summary"}),i.jsx(ai,{k:"Entity",v:`${u.entity} · ${u.collection}`}),i.jsx(ai,{k:"Narratives",v:u.narratives.join(", ")||"none"}),i.jsx(ai,{k:"Reprocessing",v:(m=u.processing)!=null&&m.reprocessingMode&&u.processing.reprocessingMode!=="skip"?u.processing.reprocessingMode:"skip (default)"}),i.jsx(ai,{k:"Graph",v:u.graphName??u.graphId}),i.jsx(ai,{k:"Priority",v:String(u.policy.priority)}),i.jsx(ai,{k:"Created",v:ia(u.createdAt)})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"card-title",children:"Excluded information"}),u.excluded.length?i.jsx(wd,{included:f.total,excluded:u.excluded,includedLabel:"Queued"}):i.jsx("p",{className:"text-muted",style:{fontSize:13},children:"No information was excluded."})]})]}),i.jsxs("div",{className:"section",children:[i.jsxs("div",{className:"section-title",style:{display:"flex",justifyContent:"space-between"},children:[i.jsx("span",{children:"Runs"}),f.failed>0&&i.jsxs("button",{type:"button",disabled:!0,title:"Backend TODO",children:["Retry failed (",f.failed,")"]})]}),c.isLoading&&i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}),!c.isLoading&&d.length===0&&i.jsx(Dt,{title:"No runs for this batch yet"}),d.length>0&&i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Item"}),i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Attempts"}),i.jsx("th",{children:"Updated"})]})}),i.jsx("tbody",{children:d.map(y=>i.jsxs("tr",{onClick:()=>{window.location.href=`/journal/${y.id}`},children:[i.jsx("td",{children:i.jsx(jt,{status:y.status})}),i.jsx("td",{className:"mono",style:{fontSize:12},children:y.recordLabel??y.recordId}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:y.graphName??y.graphId}),i.jsxs("td",{className:"mono",children:[y.attempts,"/",y.maxAttempts]}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:Ln(y.updatedAt)})]},y.id))})]})})]})]})}function ai({k:l,v:s}){return i.jsxs("div",{className:"detail-row",children:[i.jsx("span",{className:"detail-key",children:l}),i.jsx("span",{className:"detail-val",style:{fontFamily:"inherit"},children:s})]})}function FS(l){const s=Object.values(l.processing.graphs);if(s.length===0)return"not processed";const c=s.filter(d=>d.lastStatus==="succeeded").length,u=s.filter(d=>d.lastStatus==="failed").length;return`${c} done${u?`, ${u} failed`:""}`}function IS(){var J,Z,I;const l=Bn(),{agentQueryParam:s,agentId:c}=Ia(),[u,d]=hu(),f=u.get("entity")??"",p=u.get("collection")??"core",m=u.get("graphId")??"",y=u.get("processing")??"",g=(u.get("narratives")??"").split(",").filter(Boolean),[b,x]=j.useState(1);function T(O){const le=new URLSearchParams(u);for(const[ue,de]of Object.entries(O))de?le.set(ue,de):le.delete(ue);d(le),x(1)}const w=ve({queryKey:["entities",s??"all"],queryFn:()=>re.listEntities(s)}).data??[],q=w.find(O=>O.name===f),H=ve({queryKey:["narratives",f],queryFn:()=>re.listNarratives(f),enabled:!!f}),U=ve({queryKey:["graphs",f],queryFn:()=>re.graphsForEntity(f),enabled:!!f}),X=ve({queryKey:["core-records",f,p,g,m,y,b],queryFn:()=>re.coreRecords({entity:f,collection:p,narratives:g.length?g:void 0,processingGraphId:m||void 0,processingCondition:y||void 0,page:b,pageSize:25}),enabled:!!f});function G(O){const le=g.includes(O)?g.filter(ue=>ue!==O):[...g,O];T({narratives:le.join(",")||void 0})}const V=((J=X.data)==null?void 0:J.records)??[],P=j.useMemo(()=>{const O=V[0];if(!O)return[];const le=new Set(["recordId","entityId","eventId","knowledgeId","displayName","data","_memorix"]);return Object.keys(O.fields).filter(ue=>!le.has(ue)&&!ue.startsWith("_")).filter(ue=>{const de=O.fields[ue];return de===null||["string","number","boolean"].includes(typeof de)}).slice(0,3)},[V]);return i.jsxs("div",{children:[i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:"Information"}),i.jsxs("span",{className:"page-subtitle",children:[c?i.jsxs(i.Fragment,{children:["Object types in agent scope ",i.jsx("span",{className:"mono",children:c}),". · "]}):null,"Browse processed items, their narratives, and processing state."]})]}),f&&i.jsxs("div",{style:{display:"flex",gap:8},children:[i.jsx(Ke,{to:`/on-demand/single?entity=${f}`,children:i.jsx("button",{children:"Run on-demand"})}),i.jsx(Ke,{to:`/on-demand/batch?entity=${f}`,children:i.jsx("button",{className:"primary",children:"Create batch from filter"})})]})]}),i.jsxs("div",{className:"filters",children:[i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Entity"}),i.jsxs("select",{value:f,onChange:O=>T({entity:O.target.value||void 0,narratives:void 0,graphId:void 0,processing:void 0}),children:[i.jsx("option",{value:"",children:"— select —"}),w.map(O=>i.jsx("option",{value:O.name,children:O.label},O.name))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Collection type"}),i.jsx("select",{value:p,onChange:O=>T({collection:O.target.value}),disabled:!q,children:((q==null?void 0:q.collections)??[{key:"core"}]).map(O=>i.jsx("option",{value:O.key,children:O.key},O.key))})]}),i.jsx("div",{className:"filter-divider"}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"Processed by"}),i.jsxs("select",{value:m,onChange:O=>T({graphId:O.target.value||void 0,processing:void 0}),disabled:!f,children:[i.jsx("option",{value:"",children:"any graph"}),(U.data??[]).map(O=>i.jsx("option",{value:O.graphId,children:O.name},O.graphId))]})]}),i.jsxs("div",{className:"filter-group",children:[i.jsx("label",{children:"with status"}),i.jsxs("select",{value:y,onChange:O=>T({processing:O.target.value||void 0}),disabled:!m,title:m?void 0:"Select a graph first",children:[i.jsx("option",{value:"",children:"any status"}),i.jsx("option",{value:"succeeded",children:"succeeded"}),i.jsx("option",{value:"failed",children:"failed"}),i.jsx("option",{value:"running",children:"running"}),i.jsx("option",{value:"queued",children:"queued"}),i.jsx("option",{value:"not-processed",children:"not processed"}),i.jsx("option",{value:"unknown",children:"unknown"})]})]})]}),f&&(((Z=H.data)==null?void 0:Z.length)??0)>0&&i.jsx("div",{className:"chip-row",style:{marginBottom:16},children:(H.data??[]).map(O=>i.jsx("span",{className:`chip selectable${g.includes(O.key)?" selected":""}`,onClick:()=>G(O.key),title:O.description,children:O.label},O.key))}),!f&&i.jsx(Dt,{title:"Select an entity",message:"Choose an entity to browse its items, narratives, and processing state.",icon:"◇"}),f&&X.isLoading&&i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}),X.isError&&i.jsx(Zt,{title:"Failed to load information",detail:X.error,onRetry:()=>X.refetch()}),f&&!X.isLoading&&V.length===0&&i.jsx(Dt,{title:"No matching items",message:"No items match the current filters. Try removing a narrative or changing the processing filter."}),V.length>0&&i.jsxs("div",{className:"table-wrap",children:[i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"ID"}),i.jsx("th",{children:"Label"}),P.map(O=>i.jsx("th",{children:O},O)),i.jsx("th",{children:"Narratives"}),i.jsx("th",{children:"Processing"}),i.jsx("th",{children:"Updated"}),i.jsx("th",{})]})}),i.jsx("tbody",{children:V.map(O=>i.jsxs("tr",{onClick:()=>l(`/information/${encodeURIComponent(O.id)}?entity=${f}&collection=${p}`),children:[i.jsx("td",{className:"mono",style:{fontSize:12},children:O.id}),i.jsx("td",{children:O.label}),P.map(le=>i.jsx("td",{className:"text-muted",style:{fontSize:12},children:String(O.fields[le]??"—")},le)),i.jsx("td",{children:i.jsx("span",{className:"chip-row",children:Object.keys(O.narratives).map(le=>i.jsx("span",{className:"chip narrative",children:le},le))})}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:FS(O)}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:new Date(O.updatedAt).toLocaleString()}),i.jsx("td",{onClick:le=>le.stopPropagation(),children:i.jsx(Ke,{to:`/on-demand/single?entity=${f}`,style:{fontSize:12},children:"Run"})})]},O.id))})]}),i.jsx(yv,{page:b,pageSize:25,total:((I=X.data)==null?void 0:I.total)??0,onPage:x})]})]})}const WS=["Core","Narratives","Processing","Snapshots","Journal"];function PS(){var g,b;const{recordId:l}=Ds(),s=decodeURIComponent(l??""),[c]=hu(),u=c.get("entity")??"",[d,f]=j.useState("Core"),p=ve({queryKey:["core-record",u,s],queryFn:()=>re.coreRecord(u,s),enabled:!!(u&&s)}),m=ve({queryKey:["record-runs",u,s],queryFn:()=>re.factoryRuns({entity:u,recordId:s}),enabled:d==="Journal"}),y=p.data;return p.isLoading?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}):p.isError||!y?i.jsx(Zt,{title:"Failed to load",detail:p.error}):i.jsxs("div",{children:[i.jsxs("div",{className:"breadcrumb",children:[i.jsx(Ke,{to:`/information?entity=${u}`,children:"Information"}),i.jsx("span",{className:"breadcrumb-sep",children:"/"}),y.label]}),i.jsxs("div",{className:"page-header",style:{justifyContent:"space-between"},children:[i.jsxs("div",{children:[i.jsx("h1",{className:"page-title",children:y.label}),i.jsxs("span",{className:"page-subtitle mono",children:[u," · ",y.id]})]}),i.jsx(Ke,{to:`/on-demand/single?entity=${u}`,children:i.jsx("button",{className:"primary",children:"Run on-demand"})})]}),i.jsx("div",{className:"tabs",children:WS.map(x=>i.jsx("button",{className:`tab${d===x?" active":""}`,onClick:()=>f(x),children:x},x))}),d==="Core"&&i.jsxs("div",{className:"card",style:{maxWidth:560},children:[i.jsx("div",{className:"card-title",children:"Core fields"}),i.jsx(ni,{k:"Item id",v:y.id}),i.jsx(ni,{k:"Entity",v:y.entity}),i.jsx(ni,{k:"Label",v:y.label}),Object.entries(y.fields).map(([x,T])=>i.jsx(ni,{k:x,v:String(T)},x)),i.jsx(ni,{k:"Created",v:ia(y.createdAt)}),i.jsx(ni,{k:"Updated",v:ia(y.updatedAt)})]}),d==="Narratives"&&(Object.keys(y.narratives).length===0?i.jsx(Dt,{title:"No narratives on this item",message:"This item has no narratives assigned."}):i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Narrative"}),i.jsx("th",{children:"Added"}),i.jsx("th",{children:"Detected by"})]})}),i.jsx("tbody",{children:Object.entries(y.narratives).map(([x,T])=>i.jsxs("tr",{style:{cursor:"default"},children:[i.jsx("td",{children:i.jsx("span",{className:"chip narrative",children:x})}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:ia(T.addedAt)}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:T.detectedBy??"—"})]},x))})]})})),d==="Processing"&&(Object.keys(y.processing.graphs).length===0?i.jsx(Dt,{title:"No processing yet",message:"This item has not been processed by any graph."}):i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Version"}),i.jsx("th",{children:"Run"}),i.jsx("th",{children:"Processed at"})]})}),i.jsx("tbody",{children:Object.values(y.processing.graphs).map(x=>i.jsxs("tr",{style:{cursor:"default"},children:[i.jsx("td",{className:"mono",style:{fontSize:12},children:x.graphName??x.graphId}),i.jsx("td",{children:i.jsx(jt,{status:x.lastStatus})}),i.jsx("td",{className:"text-muted",children:x.graphVersion??"—"}),i.jsx("td",{children:x.lastRunId?i.jsx(Ke,{to:`/journal/${x.lastRunId}`,className:"mono",style:{fontSize:12},children:x.lastRunId}):"—"}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:ia(x.processedAt)})]},x.graphId))})]})})),d==="Snapshots"&&i.jsx(Dt,{title:"Snapshots view",message:"Snapshot perspectives for this item live in the Memorix UI. Core is the operational perspective shown here.",icon:"▤"}),d==="Journal"&&(m.isLoading?i.jsxs("div",{className:"loading-row",children:[i.jsx("span",{className:"spinner"})," Loading…"]}):(((g=m.data)==null?void 0:g.runs.length)??0)===0?i.jsx(Dt,{title:"No journal entries for this item"}):i.jsx("div",{className:"table-wrap",children:i.jsxs("table",{children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Status"}),i.jsx("th",{children:"Source"}),i.jsx("th",{children:"Graph"}),i.jsx("th",{children:"Updated"})]})}),i.jsx("tbody",{children:(((b=m.data)==null?void 0:b.runs)??[]).map(x=>i.jsxs("tr",{onClick:()=>{window.location.href=`/journal/${x.id}`},children:[i.jsx("td",{children:i.jsx(jt,{status:x.status})}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:x.sourceName}),i.jsx("td",{className:"text-muted",style:{fontSize:12},children:x.graphName??x.graphId}),i.jsx("td",{className:"text-dim",style:{fontSize:12},children:Ln(x.updatedAt)})]},x.id))})]})}))]})}function ni({k:l,v:s}){return i.jsxs("div",{className:"detail-row",children:[i.jsx("span",{className:"detail-key",children:l}),i.jsx("span",{className:"detail-val",children:s})]})}const Cv=j.createContext("Exellix"),Tv=j.createContext(null);function e1(){return j.useContext(Cv)}function t1(){return j.useContext(Tv)}function a1({children:l}){const{data:s}=ve({queryKey:["config"],queryFn:re.config,staleTime:1/0}),c=(s==null?void 0:s.name)||"Exellix";return j.useEffect(()=>{document.title=`${c} Jobs`},[c]),i.jsx(Tv.Provider,{value:s??null,children:i.jsx(Cv.Provider,{value:c,children:l})})}const li={overview:"Overview",work:"Work",onDemand:"On-Demand",information:"Information",journal:"Journal",settings:"Settings"},n1="2.0.1",l1="/api/agents";class i1 extends j.Component{constructor(){super(...arguments);Bp(this,"state",{error:null,componentStack:null})}static getDerivedStateFromError(c){return{error:c,componentStack:null}}componentDidCatch(c,u){console.error("UI error:",c,u),this.setState({componentStack:u.componentStack??null})}render(){return this.state.error?i.jsxs("div",{style:{padding:32},children:[i.jsxs("div",{className:"error-state",children:[i.jsx("strong",{children:"Something went wrong on this page."}),i.jsx("pre",{style:{marginTop:8,fontSize:11,whiteSpace:"pre-wrap"},children:this.state.error.message}),this.state.componentStack&&i.jsx("pre",{style:{marginTop:8,fontSize:10,whiteSpace:"pre-wrap",opacity:.75},children:this.state.componentStack})]}),i.jsx("button",{style:{marginTop:12},onClick:()=>this.setState({error:null,componentStack:null}),children:"Try again"})]}):this.props.children}}function s1(){const l=ra(),s=e1(),c=t1(),u=d=>d==="/"?l.pathname==="/":l.pathname.startsWith(d);return i.jsxs("header",{className:"topbar",children:[i.jsxs("div",{className:"topbar-brand",children:[i.jsx("span",{className:"topbar-brand-icon",children:"⚙"}),i.jsxs("span",{children:[i.jsx("span",{style:{color:"var(--color-text)"},children:s})," ",i.jsx("span",{children:"Jobs"})]}),i.jsxs("span",{className:"app-pkg-version",children:["v",n1]})]}),i.jsxs("nav",{className:"topbar-nav",children:[i.jsx(ll,{to:"/",className:u("/")?"active":"",children:li.overview}),i.jsx(ll,{to:"/work",className:u("/work")?"active":"",children:li.work}),i.jsx(ll,{to:"/on-demand",className:u("/on-demand")?"active":"",children:li.onDemand}),i.jsx(ll,{to:"/information",className:u("/information")?"active":"",children:li.information}),i.jsx(ll,{to:"/journal",className:u("/journal")?"active":"",children:li.journal}),i.jsx(ll,{to:"/settings",className:u("/settings")?"active":"",children:li.settings})]}),i.jsxs("div",{className:"topbar-meta",title:c?`${c.mongoHost} / ${c.runtimeDb}`:void 0,children:[i.jsx(Ib,{apiBase:l1}),c?i.jsxs("span",{className:"mono",style:{fontSize:11},children:[c.runtimeDb," @ ",c.mongoHost]}):window.location.host]})]})}const Ot=l=>i.jsx(i1,{children:l});function r1(){return i.jsx(j0,{children:i.jsxs("div",{className:"layout",children:[i.jsx(s1,{}),i.jsx("main",{className:"page",children:i.jsxs(Fj,{children:[i.jsx(Ze,{path:"/",element:Ot(i.jsx(G0,{}))}),i.jsx(Ze,{path:"/settings",element:Ot(i.jsx(Y0,{}))}),i.jsx(Ze,{path:"/work",element:Ot(i.jsx(yS,{}))}),i.jsx(Ze,{path:"/work/new",element:Ot(i.jsx(wS,{}))}),i.jsx(Ze,{path:"/work/:id",element:Ot(i.jsx(LS,{}))}),i.jsx(Ze,{path:"/on-demand",element:Ot(i.jsx(QS,{}))}),i.jsx(Ze,{path:"/on-demand/single",element:Ot(i.jsx(ZS,{}))}),i.jsx(Ze,{path:"/on-demand/batch",element:Ot(i.jsx($S,{}))}),i.jsx(Ze,{path:"/on-demand/batch/:id",element:Ot(i.jsx(JS,{}))}),i.jsx(Ze,{path:"/information",element:Ot(i.jsx(IS,{}))}),i.jsx(Ze,{path:"/information/:recordId",element:Ot(i.jsx(PS,{}))}),i.jsx(Ze,{path:"/journal",element:Ot(i.jsx(Z0,{}))}),i.jsx(Ze,{path:"/journal/:id",element:Ot(i.jsx(uS,{}))}),i.jsx(Ze,{path:"/items/:itemId",element:Ot(i.jsx(pS,{}))}),i.jsx(Ze,{path:"/records",element:i.jsx(ka,{to:"/information",replace:!0})}),i.jsx(Ze,{path:"/records/:recordId",element:i.jsx(ka,{to:"/information",replace:!0})}),i.jsx(Ze,{path:"/runs",element:i.jsx(ka,{to:"/journal",replace:!0})}),i.jsx(Ze,{path:"/runs/:id",element:i.jsx(ka,{to:"/journal",replace:!0})}),i.jsx(Ze,{path:"/sources",element:i.jsx(ka,{to:"/information",replace:!0})}),i.jsx(Ze,{path:"/job-defs",element:i.jsx(ka,{to:"/work",replace:!0})}),i.jsx(Ze,{path:"/job-defs/:id",element:i.jsx(ka,{to:"/work",replace:!0})}),i.jsx(Ze,{path:"/jobs/new",element:i.jsx(ka,{to:"/on-demand",replace:!0})}),i.jsx(Ze,{path:"*",element:i.jsx(ka,{to:"/",replace:!0})})]})})]})})}const u1=new _b({defaultOptions:{queries:{retry:1,staleTime:2e3}}}),Rv=document.getElementById("root");if(!Rv)throw new Error("No #root element");ub.createRoot(Rv).render(i.jsx(j.StrictMode,{children:i.jsx(qb,{client:u1,children:i.jsx(a1,{children:i.jsx($b,{storageKey:"exellix-memorix-ui.selected-agent",children:i.jsx(r1,{})})})})}));
|