@caddis/cli 0.4.112 → 0.4.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/bundles/antigravity-plugin/plugin.json +1 -1
  2. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
  3. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
  4. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
  5. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
  6. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
  7. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
  8. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
  9. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
  10. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
  11. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
  12. package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
  13. package/bundles/antigravity-plugin/scripts/caddis_coordinate.py +107 -1
  14. package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
  15. package/bundles/antigravity-plugin/scripts/oss_review.py +10 -5
  16. package/bundles/antigravity-plugin/skills/coordinate/SKILL.md +6 -2
  17. package/bundles/manifest.json +2 -2
  18. package/dist/cli.js +207 -113
  19. package/dist/ui/assets/{Activity-B816JVqx.js → Activity-CITEjSUJ.js} +1 -1
  20. package/dist/ui/assets/Benchmarks-B2_1oerW.css +1 -0
  21. package/dist/ui/assets/Benchmarks-ChQoYa0P.js +1 -0
  22. package/dist/ui/assets/{Guide-CnL1DiTr.js → Guide-9Ob-m7gx.js} +1 -1
  23. package/dist/ui/assets/{Palette-BKM_A64G.js → Palette-CinCoveU.js} +1 -1
  24. package/dist/ui/assets/{RoadmapTab-DhC4-kqv.js → RoadmapTab-BeD4-8IU.js} +2 -2
  25. package/dist/ui/assets/{external-link-DagTFCsV.js → external-link-D_rks7KV.js} +1 -1
  26. package/dist/ui/assets/index-CFKn_GzG.js +231 -0
  27. package/dist/ui/index.html +1 -1
  28. package/package.json +1 -1
  29. package/dist/ui/assets/index-Bj5qA-fq.js +0 -226
@@ -1,226 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Palette-BKM_A64G.js","assets/external-link-DagTFCsV.js","assets/Palette-BIlBqNvr.css","assets/Guide-CnL1DiTr.js","assets/Guide-Bict51LS.css","assets/Activity-B816JVqx.js"])))=>i.map(i=>d[i]);
2
- var oi={exports:{}},Mr={},si={exports:{}},le={};/**
3
- * @license React
4
- * react.production.min.js
5
- *
6
- * Copyright (c) Facebook, Inc. and its affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */var Ec;function _h(){if(Ec)return le;Ec=1;var o=Symbol.for("react.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),$=Symbol.iterator;function C(k){return k===null||typeof k!="object"?null:(k=$&&k[$]||k["@@iterator"],typeof k=="function"?k:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,F={};function M(k,T,ne){this.props=k,this.context=T,this.refs=F,this.updater=ne||L}M.prototype.isReactComponent={},M.prototype.setState=function(k,T){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,T,"setState")},M.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function te(){}te.prototype=M.prototype;function X(k,T,ne){this.props=k,this.context=T,this.refs=F,this.updater=ne||L}var ke=X.prototype=new te;ke.constructor=X,_(ke,M.prototype),ke.isPureReactComponent=!0;var J=Array.isArray,se=Object.prototype.hasOwnProperty,ue={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function Y(k,T,ne){var oe,ce={},de=null,ve=null;if(T!=null)for(oe in T.ref!==void 0&&(ve=T.ref),T.key!==void 0&&(de=""+T.key),T)se.call(T,oe)&&!q.hasOwnProperty(oe)&&(ce[oe]=T[oe]);var pe=arguments.length-2;if(pe===1)ce.children=ne;else if(1<pe){for(var _e=Array(pe),nt=0;nt<pe;nt++)_e[nt]=arguments[nt+2];ce.children=_e}if(k&&k.defaultProps)for(oe in pe=k.defaultProps,pe)ce[oe]===void 0&&(ce[oe]=pe[oe]);return{$$typeof:o,type:k,key:de,ref:ve,props:ce,_owner:ue.current}}function ie(k,T){return{$$typeof:o,type:k.type,key:T,ref:k.ref,props:k.props,_owner:k._owner}}function Ne(k){return typeof k=="object"&&k!==null&&k.$$typeof===o}function tt(k){var T={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ne){return T[ne]})}var I=/\/+/g;function re(k,T){return typeof k=="object"&&k!==null&&k.key!=null?tt(""+k.key):T.toString(36)}function me(k,T,ne,oe,ce){var de=typeof k;(de==="undefined"||de==="boolean")&&(k=null);var ve=!1;if(k===null)ve=!0;else switch(de){case"string":case"number":ve=!0;break;case"object":switch(k.$$typeof){case o:case l:ve=!0}}if(ve)return ve=k,ce=ce(ve),k=oe===""?"."+re(ve,0):oe,J(ce)?(ne="",k!=null&&(ne=k.replace(I,"$&/")+"/"),me(ce,T,ne,"",function(nt){return nt})):ce!=null&&(Ne(ce)&&(ce=ie(ce,ne+(!ce.key||ve&&ve.key===ce.key?"":(""+ce.key).replace(I,"$&/")+"/")+k)),T.push(ce)),1;if(ve=0,oe=oe===""?".":oe+":",J(k))for(var pe=0;pe<k.length;pe++){de=k[pe];var _e=oe+re(de,pe);ve+=me(de,T,ne,_e,ce)}else if(_e=C(k),typeof _e=="function")for(k=_e.call(k),pe=0;!(de=k.next()).done;)de=de.value,_e=oe+re(de,pe++),ve+=me(de,T,ne,_e,ce);else if(de==="object")throw T=String(k),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return ve}function Fe(k,T,ne){if(k==null)return k;var oe=[],ce=0;return me(k,oe,"","",function(de){return T.call(ne,de,ce++)}),oe}function Le(k){if(k._status===-1){var T=k._result;T=T(),T.then(function(ne){(k._status===0||k._status===-1)&&(k._status=1,k._result=ne)},function(ne){(k._status===0||k._status===-1)&&(k._status=2,k._result=ne)}),k._status===-1&&(k._status=0,k._result=T)}if(k._status===1)return k._result.default;throw k._result}var ye={current:null},A={transition:null},G={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:A,ReactCurrentOwner:ue};function H(){throw Error("act(...) is not supported in production builds of React.")}return le.Children={map:Fe,forEach:function(k,T,ne){Fe(k,function(){T.apply(this,arguments)},ne)},count:function(k){var T=0;return Fe(k,function(){T++}),T},toArray:function(k){return Fe(k,function(T){return T})||[]},only:function(k){if(!Ne(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},le.Component=M,le.Fragment=a,le.Profiler=f,le.PureComponent=X,le.StrictMode=u,le.Suspense=v,le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,le.act=H,le.cloneElement=function(k,T,ne){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var oe=_({},k.props),ce=k.key,de=k.ref,ve=k._owner;if(T!=null){if(T.ref!==void 0&&(de=T.ref,ve=ue.current),T.key!==void 0&&(ce=""+T.key),k.type&&k.type.defaultProps)var pe=k.type.defaultProps;for(_e in T)se.call(T,_e)&&!q.hasOwnProperty(_e)&&(oe[_e]=T[_e]===void 0&&pe!==void 0?pe[_e]:T[_e])}var _e=arguments.length-2;if(_e===1)oe.children=ne;else if(1<_e){pe=Array(_e);for(var nt=0;nt<_e;nt++)pe[nt]=arguments[nt+2];oe.children=pe}return{$$typeof:o,type:k.type,key:ce,ref:de,props:oe,_owner:ve}},le.createContext=function(k){return k={$$typeof:h,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:p,_context:k},k.Consumer=k},le.createElement=Y,le.createFactory=function(k){var T=Y.bind(null,k);return T.type=k,T},le.createRef=function(){return{current:null}},le.forwardRef=function(k){return{$$typeof:g,render:k}},le.isValidElement=Ne,le.lazy=function(k){return{$$typeof:E,_payload:{_status:-1,_result:k},_init:Le}},le.memo=function(k,T){return{$$typeof:j,type:k,compare:T===void 0?null:T}},le.startTransition=function(k){var T=A.transition;A.transition={};try{k()}finally{A.transition=T}},le.unstable_act=H,le.useCallback=function(k,T){return ye.current.useCallback(k,T)},le.useContext=function(k){return ye.current.useContext(k)},le.useDebugValue=function(){},le.useDeferredValue=function(k){return ye.current.useDeferredValue(k)},le.useEffect=function(k,T){return ye.current.useEffect(k,T)},le.useId=function(){return ye.current.useId()},le.useImperativeHandle=function(k,T,ne){return ye.current.useImperativeHandle(k,T,ne)},le.useInsertionEffect=function(k,T){return ye.current.useInsertionEffect(k,T)},le.useLayoutEffect=function(k,T){return ye.current.useLayoutEffect(k,T)},le.useMemo=function(k,T){return ye.current.useMemo(k,T)},le.useReducer=function(k,T,ne){return ye.current.useReducer(k,T,ne)},le.useRef=function(k){return ye.current.useRef(k)},le.useState=function(k){return ye.current.useState(k)},le.useSyncExternalStore=function(k,T,ne){return ye.current.useSyncExternalStore(k,T,ne)},le.useTransition=function(){return ye.current.useTransition()},le.version="18.3.1",le}var Cc;function Si(){return Cc||(Cc=1,si.exports=_h()),si.exports}/**
11
- * @license React
12
- * react-jsx-runtime.production.min.js
13
- *
14
- * Copyright (c) Facebook, Inc. and its affiliates.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */var $c;function jh(){if($c)return Mr;$c=1;var o=Si(),l=Symbol.for("react.element"),a=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,f=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function h(g,v,j){var E,$={},C=null,L=null;j!==void 0&&(C=""+j),v.key!==void 0&&(C=""+v.key),v.ref!==void 0&&(L=v.ref);for(E in v)u.call(v,E)&&!p.hasOwnProperty(E)&&($[E]=v[E]);if(g&&g.defaultProps)for(E in v=g.defaultProps,v)$[E]===void 0&&($[E]=v[E]);return{$$typeof:l,type:g,key:C,ref:L,props:$,_owner:f.current}}return Mr.Fragment=a,Mr.jsx=h,Mr.jsxs=h,Mr}var Tc;function Eh(){return Tc||(Tc=1,oi.exports=jh()),oi.exports}var d=Eh(),D=Si(),es={},li={exports:{}},Je={},ii={exports:{}},ai={};/**
19
- * @license React
20
- * scheduler.production.min.js
21
- *
22
- * Copyright (c) Facebook, Inc. and its affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */var Pc;function Ch(){return Pc||(Pc=1,(function(o){function l(A,G){var H=A.length;A.push(G);e:for(;0<H;){var k=H-1>>>1,T=A[k];if(0<f(T,G))A[k]=G,A[H]=T,H=k;else break e}}function a(A){return A.length===0?null:A[0]}function u(A){if(A.length===0)return null;var G=A[0],H=A.pop();if(H!==G){A[0]=H;e:for(var k=0,T=A.length,ne=T>>>1;k<ne;){var oe=2*(k+1)-1,ce=A[oe],de=oe+1,ve=A[de];if(0>f(ce,H))de<T&&0>f(ve,ce)?(A[k]=ve,A[de]=H,k=de):(A[k]=ce,A[oe]=H,k=oe);else if(de<T&&0>f(ve,H))A[k]=ve,A[de]=H,k=de;else break e}}return G}function f(A,G){var H=A.sortIndex-G.sortIndex;return H!==0?H:A.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var h=Date,g=h.now();o.unstable_now=function(){return h.now()-g}}var v=[],j=[],E=1,$=null,C=3,L=!1,_=!1,F=!1,M=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ke(A){for(var G=a(j);G!==null;){if(G.callback===null)u(j);else if(G.startTime<=A)u(j),G.sortIndex=G.expirationTime,l(v,G);else break;G=a(j)}}function J(A){if(F=!1,ke(A),!_)if(a(v)!==null)_=!0,Le(se);else{var G=a(j);G!==null&&ye(J,G.startTime-A)}}function se(A,G){_=!1,F&&(F=!1,te(Y),Y=-1),L=!0;var H=C;try{for(ke(G),$=a(v);$!==null&&(!($.expirationTime>G)||A&&!tt());){var k=$.callback;if(typeof k=="function"){$.callback=null,C=$.priorityLevel;var T=k($.expirationTime<=G);G=o.unstable_now(),typeof T=="function"?$.callback=T:$===a(v)&&u(v),ke(G)}else u(v);$=a(v)}if($!==null)var ne=!0;else{var oe=a(j);oe!==null&&ye(J,oe.startTime-G),ne=!1}return ne}finally{$=null,C=H,L=!1}}var ue=!1,q=null,Y=-1,ie=5,Ne=-1;function tt(){return!(o.unstable_now()-Ne<ie)}function I(){if(q!==null){var A=o.unstable_now();Ne=A;var G=!0;try{G=q(!0,A)}finally{G?re():(ue=!1,q=null)}}else ue=!1}var re;if(typeof X=="function")re=function(){X(I)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Fe=me.port2;me.port1.onmessage=I,re=function(){Fe.postMessage(null)}}else re=function(){M(I,0)};function Le(A){q=A,ue||(ue=!0,re())}function ye(A,G){Y=M(function(){A(o.unstable_now())},G)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(A){A.callback=null},o.unstable_continueExecution=function(){_||L||(_=!0,Le(se))},o.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<A?Math.floor(1e3/A):5},o.unstable_getCurrentPriorityLevel=function(){return C},o.unstable_getFirstCallbackNode=function(){return a(v)},o.unstable_next=function(A){switch(C){case 1:case 2:case 3:var G=3;break;default:G=C}var H=C;C=G;try{return A()}finally{C=H}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(A,G){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var H=C;C=A;try{return G()}finally{C=H}},o.unstable_scheduleCallback=function(A,G,H){var k=o.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?k+H:k):H=k,A){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=H+T,A={id:E++,callback:G,priorityLevel:A,startTime:H,expirationTime:T,sortIndex:-1},H>k?(A.sortIndex=H,l(j,A),a(v)===null&&A===a(j)&&(F?(te(Y),Y=-1):F=!0,ye(J,H-k))):(A.sortIndex=T,l(v,A),_||L||(_=!0,Le(se))),A},o.unstable_shouldYield=tt,o.unstable_wrapCallback=function(A){var G=C;return function(){var H=C;C=G;try{return A.apply(this,arguments)}finally{C=H}}}})(ai)),ai}var Rc;function $h(){return Rc||(Rc=1,ii.exports=Ch()),ii.exports}/**
27
- * @license React
28
- * react-dom.production.min.js
29
- *
30
- * Copyright (c) Facebook, Inc. and its affiliates.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE file in the root directory of this source tree.
34
- */var Lc;function Th(){if(Lc)return Je;Lc=1;var o=Si(),l=$h();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u=new Set,f={};function p(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(f[e]=t,e=0;e<t.length;e++)u.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,j=/^[: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]*$/,E={},$={};function C(e){return v.call($,e)?!0:v.call(E,e)?!1:j.test(e)?$[e]=!0:(E[e]=!0,!1)}function L(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,t,n,r){if(t===null||typeof t>"u"||L(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function F(e,t,n,r,s,i,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=c}var M={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){M[e]=new F(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];M[t]=new F(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){M[e]=new F(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){M[e]=new F(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){M[e]=new F(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){M[e]=new F(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){M[e]=new F(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){M[e]=new F(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){M[e]=new F(e,5,!1,e.toLowerCase(),null,!1,!1)});var te=/[\-:]([a-z])/g;function X(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(te,X);M[t]=new F(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(te,X);M[t]=new F(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(te,X);M[t]=new F(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){M[e]=new F(e,1,!1,e.toLowerCase(),null,!1,!1)}),M.xlinkHref=new F("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){M[e]=new F(e,1,!1,e.toLowerCase(),null,!0,!0)});function ke(e,t,n,r){var s=M.hasOwnProperty(t)?M[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_(t,n,s,r)&&(n=null),r||s===null?C(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var J=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,se=Symbol.for("react.element"),ue=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),ie=Symbol.for("react.profiler"),Ne=Symbol.for("react.provider"),tt=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),Fe=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),A=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,k;function T(e){if(k===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
35
- `+k+e}var ne=!1;function oe(e,t){if(!e||ne)return"";ne=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(N){var r=N}Reflect.construct(e,[],t)}else{try{t.call()}catch(N){r=N}e.call(t.prototype)}else{try{throw Error()}catch(N){r=N}e()}}catch(N){if(N&&r&&typeof N.stack=="string"){for(var s=N.stack.split(`
36
- `),i=r.stack.split(`
37
- `),c=s.length-1,m=i.length-1;1<=c&&0<=m&&s[c]!==i[m];)m--;for(;1<=c&&0<=m;c--,m--)if(s[c]!==i[m]){if(c!==1||m!==1)do if(c--,m--,0>m||s[c]!==i[m]){var y=`
38
- `+s[c].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=c&&0<=m);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function ce(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function de(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case ue:return"Portal";case ie:return"Profiler";case Y:return"StrictMode";case re:return"Suspense";case me:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case tt:return(e.displayName||"Context")+".Consumer";case Ne:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fe:return t=e.displayName||null,t!==null?t:de(e.type)||"Memo";case Le:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function ve(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(t);case 8:return t===Y?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nt(e){var t=_e(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){r=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wr(e){e._valueTracker||(e._valueTracker=nt(e))}function Li(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_e(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vr(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}}function ds(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Di(e,t){t=t.checked,t!=null&&ke(e,"checked",t,!1)}function fs(e,t){Di(e,t);var n=pe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ps(e,t.type,n):t.hasOwnProperty("defaultValue")&&ps(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ps(e,t,n){(t!=="number"||Vr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zn=Array.isArray;function xn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+pe(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function hs(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(a(91));return H({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ii(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(a(92));if(Zn(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pe(n)}}function Mi(e,t){var n=pe(t.value),r=pe(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ai(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fi(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ms(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fi(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var br,Ui=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(br=br||document.createElement("div"),br.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=br.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var er={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$f=["Webkit","ms","Moz","O"];Object.keys(er).forEach(function(e){$f.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),er[t]=er[e]})});function Hi(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||er.hasOwnProperty(e)&&er[e]?(""+t).trim():t+"px"}function Bi(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Hi(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Tf=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gs(e,t){if(t){if(Tf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(a(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(a(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(t.style!=null&&typeof t.style!="object")throw Error(a(62))}}function ys(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 vs=null;function ws(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ks=null,Sn=null,Nn=null;function Wi(e){if(e=Sr(e)){if(typeof ks!="function")throw Error(a(280));var t=e.stateNode;t&&(t=mo(t),ks(e.stateNode,e.type,t))}}function Vi(e){Sn?Nn?Nn.push(e):Nn=[e]:Sn=e}function bi(){if(Sn){var e=Sn,t=Nn;if(Nn=Sn=null,Wi(e),t)for(e=0;e<t.length;e++)Wi(t[e])}}function qi(e,t){return e(t)}function Qi(){}var xs=!1;function Ki(e,t,n){if(xs)return e(t,n);xs=!0;try{return qi(e,t,n)}finally{xs=!1,(Sn!==null||Nn!==null)&&(Qi(),bi())}}function tr(e,t){var n=e.stateNode;if(n===null)return null;var r=mo(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(a(231,t,typeof n));return n}var Ss=!1;if(g)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){Ss=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Ss=!1}function Pf(e,t,n,r,s,i,c,m,y){var N=Array.prototype.slice.call(arguments,3);try{t.apply(n,N)}catch(R){this.onError(R)}}var rr=!1,qr=null,Qr=!1,Ns=null,Rf={onError:function(e){rr=!0,qr=e}};function Lf(e,t,n,r,s,i,c,m,y){rr=!1,qr=null,Pf.apply(Rf,arguments)}function zf(e,t,n,r,s,i,c,m,y){if(Lf.apply(this,arguments),rr){if(rr){var N=qr;rr=!1,qr=null}else throw Error(a(198));Qr||(Qr=!0,Ns=N)}}function on(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Yi(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 Gi(e){if(on(e)!==e)throw Error(a(188))}function Df(e){var t=e.alternate;if(!t){if(t=on(e),t===null)throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Gi(s),e;if(i===r)return Gi(s),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=s,r=i;else{for(var c=!1,m=s.child;m;){if(m===n){c=!0,n=s,r=i;break}if(m===r){c=!0,r=s,n=i;break}m=m.sibling}if(!c){for(m=i.child;m;){if(m===n){c=!0,n=i,r=s;break}if(m===r){c=!0,r=i,n=s;break}m=m.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function Xi(e){return e=Df(e),e!==null?Zi(e):null}function Zi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Zi(e);if(t!==null)return t;e=e.sibling}return null}var Ji=l.unstable_scheduleCallback,ea=l.unstable_cancelCallback,Of=l.unstable_shouldYield,If=l.unstable_requestPaint,Pe=l.unstable_now,Mf=l.unstable_getCurrentPriorityLevel,_s=l.unstable_ImmediatePriority,ta=l.unstable_UserBlockingPriority,Kr=l.unstable_NormalPriority,Af=l.unstable_LowPriority,na=l.unstable_IdlePriority,Yr=null,Nt=null;function Ff(e){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Yr,e,void 0,(e.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:Bf,Uf=Math.log,Hf=Math.LN2;function Bf(e){return e>>>=0,e===0?32:31-(Uf(e)/Hf|0)|0}var Gr=64,Xr=4194304;function or(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Zr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,c=n&268435455;if(c!==0){var m=c&~s;m!==0?r=or(m):(i&=c,i!==0&&(r=or(i)))}else c=n&~s,c!==0?r=or(c):i!==0&&(r=or(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&s)===0&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ht(t),s=1<<n,r|=e[n],t&=~s;return r}function Wf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var c=31-ht(i),m=1<<c,y=s[c];y===-1?((m&n)===0||(m&r)!==0)&&(s[c]=Wf(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}}function js(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ra(){var e=Gr;return Gr<<=1,(Gr&4194240)===0&&(Gr=64),e}function Es(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function sr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function bf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ht(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Cs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ht(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var he=0;function oa(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var sa,$s,la,ia,aa,Ts=!1,Jr=[],At=null,Ft=null,Ut=null,lr=new Map,ir=new Map,Ht=[],qf="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 submit".split(" ");function ua(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Ft=null;break;case"mouseover":case"mouseout":Ut=null;break;case"pointerover":case"pointerout":lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(t.pointerId)}}function ar(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Sr(t),t!==null&&$s(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Qf(e,t,n,r,s){switch(t){case"focusin":return At=ar(At,e,t,n,r,s),!0;case"dragenter":return Ft=ar(Ft,e,t,n,r,s),!0;case"mouseover":return Ut=ar(Ut,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return lr.set(i,ar(lr.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ir.set(i,ar(ir.get(i)||null,e,t,n,r,s)),!0}return!1}function ca(e){var t=sn(e.target);if(t!==null){var n=on(t);if(n!==null){if(t=n.tag,t===13){if(t=Yi(n),t!==null){e.blockedOn=t,aa(e.priority,function(){la(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vs=r,n.target.dispatchEvent(r),vs=null}else return t=Sr(n),t!==null&&$s(t),e.blockedOn=n,!1;t.shift()}return!0}function da(e,t,n){eo(e)&&n.delete(t)}function Kf(){Ts=!1,At!==null&&eo(At)&&(At=null),Ft!==null&&eo(Ft)&&(Ft=null),Ut!==null&&eo(Ut)&&(Ut=null),lr.forEach(da),ir.forEach(da)}function ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Ts||(Ts=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Kf)))}function cr(e){function t(s){return ur(s,e)}if(0<Jr.length){ur(Jr[0],e);for(var n=1;n<Jr.length;n++){var r=Jr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(At!==null&&ur(At,e),Ft!==null&&ur(Ft,e),Ut!==null&&ur(Ut,e),lr.forEach(t),ir.forEach(t),n=0;n<Ht.length;n++)r=Ht[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ht.length&&(n=Ht[0],n.blockedOn===null);)ca(n),n.blockedOn===null&&Ht.shift()}var _n=J.ReactCurrentBatchConfig,to=!0;function Yf(e,t,n,r){var s=he,i=_n.transition;_n.transition=null;try{he=1,Ps(e,t,n,r)}finally{he=s,_n.transition=i}}function Gf(e,t,n,r){var s=he,i=_n.transition;_n.transition=null;try{he=4,Ps(e,t,n,r)}finally{he=s,_n.transition=i}}function Ps(e,t,n,r){if(to){var s=Rs(e,t,n,r);if(s===null)Ks(e,t,r,no,n),ua(e,r);else if(Qf(s,e,t,n,r))r.stopPropagation();else if(ua(e,r),t&4&&-1<qf.indexOf(e)){for(;s!==null;){var i=Sr(s);if(i!==null&&sa(i),i=Rs(e,t,n,r),i===null&&Ks(e,t,r,no,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ks(e,t,r,null,n)}}var no=null;function Rs(e,t,n,r){if(no=null,e=ws(r),e=sn(e),e!==null)if(t=on(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Yi(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return no=e,null}function fa(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mf()){case _s:return 1;case ta:return 4;case Kr:case Af:return 16;case na:return 536870912;default:return 16}default:return 16}}var Bt=null,Ls=null,ro=null;function pa(){if(ro)return ro;var e,t=Ls,n=t.length,r,s="value"in Bt?Bt.value:Bt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var c=n-e;for(r=1;r<=c&&t[n-r]===s[i-r];r++);return ro=s.slice(e,1<r?1-r:void 0)}function oo(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 so(){return!0}function ha(){return!1}function rt(e){function t(n,r,s,i,c){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?so:ha,this.isPropagationStopped=ha,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=so)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zs=rt(jn),dr=H({},jn,{view:0,detail:0}),Xf=rt(dr),Ds,Os,fr,lo=H({},dr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ms,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!==fr&&(fr&&e.type==="mousemove"?(Ds=e.screenX-fr.screenX,Os=e.screenY-fr.screenY):Os=Ds=0,fr=e),Ds)},movementY:function(e){return"movementY"in e?e.movementY:Os}}),ma=rt(lo),Zf=H({},lo,{dataTransfer:0}),Jf=rt(Zf),ep=H({},dr,{relatedTarget:0}),Is=rt(ep),tp=H({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),np=rt(tp),rp=H({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),op=rt(rp),sp=H({},jn,{data:0}),ga=rt(sp),lp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ip={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"},ap={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function up(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ap[e])?!!t[e]:!1}function Ms(){return up}var cp=H({},dr,{key:function(e){if(e.key){var t=lp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ms,charCode:function(e){return e.type==="keypress"?oo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dp=rt(cp),fp=H({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ya=rt(fp),pp=H({},dr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ms}),hp=rt(pp),mp=H({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),gp=rt(mp),yp=H({},lo,{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}),vp=rt(yp),wp=[9,13,27,32],As=g&&"CompositionEvent"in window,pr=null;g&&"documentMode"in document&&(pr=document.documentMode);var kp=g&&"TextEvent"in window&&!pr,va=g&&(!As||pr&&8<pr&&11>=pr),wa=" ",ka=!1;function xa(e,t){switch(e){case"keyup":return wp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var En=!1;function xp(e,t){switch(e){case"compositionend":return Sa(t);case"keypress":return t.which!==32?null:(ka=!0,wa);case"textInput":return e=t.data,e===wa&&ka?null:e;default:return null}}function Sp(e,t){if(En)return e==="compositionend"||!As&&xa(e,t)?(e=pa(),ro=Ls=Bt=null,En=!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 va&&t.locale!=="ko"?null:t.data;default:return null}}var Np={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 Na(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Np[e.type]:t==="textarea"}function _a(e,t,n,r){Vi(r),t=fo(t,"onChange"),0<t.length&&(n=new zs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hr=null,mr=null;function _p(e){Ba(e,0)}function io(e){var t=Rn(e);if(Li(t))return e}function jp(e,t){if(e==="change")return t}var ja=!1;if(g){var Fs;if(g){var Us="oninput"in document;if(!Us){var Ea=document.createElement("div");Ea.setAttribute("oninput","return;"),Us=typeof Ea.oninput=="function"}Fs=Us}else Fs=!1;ja=Fs&&(!document.documentMode||9<document.documentMode)}function Ca(){hr&&(hr.detachEvent("onpropertychange",$a),mr=hr=null)}function $a(e){if(e.propertyName==="value"&&io(mr)){var t=[];_a(t,mr,e,ws(e)),Ki(_p,t)}}function Ep(e,t,n){e==="focusin"?(Ca(),hr=t,mr=n,hr.attachEvent("onpropertychange",$a)):e==="focusout"&&Ca()}function Cp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return io(mr)}function $p(e,t){if(e==="click")return io(t)}function Tp(e,t){if(e==="input"||e==="change")return io(t)}function Pp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:Pp;function gr(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!v.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function Ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pa(e,t){var n=Ta(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ta(n)}}function Ra(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ra(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function La(){for(var e=window,t=Vr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Hs(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")}function Rp(e){var t=La(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ra(n.ownerDocument.documentElement,n)){if(r!==null&&Hs(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Pa(n,i);var c=Pa(n,r);s&&c&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Lp=g&&"documentMode"in document&&11>=document.documentMode,Cn=null,Bs=null,yr=null,Ws=!1;function za(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ws||Cn==null||Cn!==Vr(r)||(r=Cn,"selectionStart"in r&&Hs(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),yr&&gr(yr,r)||(yr=r,r=fo(Bs,"onSelect"),0<r.length&&(t=new zs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cn)))}function ao(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $n={animationend:ao("Animation","AnimationEnd"),animationiteration:ao("Animation","AnimationIteration"),animationstart:ao("Animation","AnimationStart"),transitionend:ao("Transition","TransitionEnd")},Vs={},Da={};g&&(Da=document.createElement("div").style,"AnimationEvent"in window||(delete $n.animationend.animation,delete $n.animationiteration.animation,delete $n.animationstart.animation),"TransitionEvent"in window||delete $n.transitionend.transition);function uo(e){if(Vs[e])return Vs[e];if(!$n[e])return e;var t=$n[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Da)return Vs[e]=t[n];return e}var Oa=uo("animationend"),Ia=uo("animationiteration"),Ma=uo("animationstart"),Aa=uo("transitionend"),Fa=new Map,Ua="abort auxClick 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(" ");function Wt(e,t){Fa.set(e,t),p(t,[e])}for(var bs=0;bs<Ua.length;bs++){var qs=Ua[bs],zp=qs.toLowerCase(),Dp=qs[0].toUpperCase()+qs.slice(1);Wt(zp,"on"+Dp)}Wt(Oa,"onAnimationEnd"),Wt(Ia,"onAnimationIteration"),Wt(Ma,"onAnimationStart"),Wt("dblclick","onDoubleClick"),Wt("focusin","onFocus"),Wt("focusout","onBlur"),Wt(Aa,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vr="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(" "),Op=new Set("cancel close invalid load scroll toggle".split(" ").concat(vr));function Ha(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,zf(r,t,void 0,e),e.currentTarget=null}function Ba(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var c=r.length-1;0<=c;c--){var m=r[c],y=m.instance,N=m.currentTarget;if(m=m.listener,y!==i&&s.isPropagationStopped())break e;Ha(s,m,N),i=y}else for(c=0;c<r.length;c++){if(m=r[c],y=m.instance,N=m.currentTarget,m=m.listener,y!==i&&s.isPropagationStopped())break e;Ha(s,m,N),i=y}}}if(Qr)throw e=Ns,Qr=!1,Ns=null,e}function xe(e,t){var n=t[el];n===void 0&&(n=t[el]=new Set);var r=e+"__bubble";n.has(r)||(Wa(t,e,2,!1),n.add(r))}function Qs(e,t,n){var r=0;t&&(r|=4),Wa(n,e,r,t)}var co="_reactListening"+Math.random().toString(36).slice(2);function wr(e){if(!e[co]){e[co]=!0,u.forEach(function(n){n!=="selectionchange"&&(Op.has(n)||Qs(n,!1,e),Qs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[co]||(t[co]=!0,Qs("selectionchange",!1,t))}}function Wa(e,t,n,r){switch(fa(t)){case 1:var s=Yf;break;case 4:s=Gf;break;default:s=Ps}n=s.bind(null,t,n,e),s=void 0,!Ss||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Ks(e,t,n,r,s){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var c=r.tag;if(c===3||c===4){var m=r.stateNode.containerInfo;if(m===s||m.nodeType===8&&m.parentNode===s)break;if(c===4)for(c=r.return;c!==null;){var y=c.tag;if((y===3||y===4)&&(y=c.stateNode.containerInfo,y===s||y.nodeType===8&&y.parentNode===s))return;c=c.return}for(;m!==null;){if(c=sn(m),c===null)return;if(y=c.tag,y===5||y===6){r=i=c;continue e}m=m.parentNode}}r=r.return}Ki(function(){var N=i,R=ws(n),z=[];e:{var P=Fa.get(e);if(P!==void 0){var U=zs,W=e;switch(e){case"keypress":if(oo(n)===0)break e;case"keydown":case"keyup":U=dp;break;case"focusin":W="focus",U=Is;break;case"focusout":W="blur",U=Is;break;case"beforeblur":case"afterblur":U=Is;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=ma;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=Jf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=hp;break;case Oa:case Ia:case Ma:U=np;break;case Aa:U=gp;break;case"scroll":U=Xf;break;case"wheel":U=vp;break;case"copy":case"cut":case"paste":U=op;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=ya}var V=(t&4)!==0,Re=!V&&e==="scroll",x=V?P!==null?P+"Capture":null:P;V=[];for(var w=N,S;w!==null;){S=w;var O=S.stateNode;if(S.tag===5&&O!==null&&(S=O,x!==null&&(O=tr(w,x),O!=null&&V.push(kr(w,O,S)))),Re)break;w=w.return}0<V.length&&(P=new U(P,W,null,n,R),z.push({event:P,listeners:V}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",P&&n!==vs&&(W=n.relatedTarget||n.fromElement)&&(sn(W)||W[Tt]))break e;if((U||P)&&(P=R.window===R?R:(P=R.ownerDocument)?P.defaultView||P.parentWindow:window,U?(W=n.relatedTarget||n.toElement,U=N,W=W?sn(W):null,W!==null&&(Re=on(W),W!==Re||W.tag!==5&&W.tag!==6)&&(W=null)):(U=null,W=N),U!==W)){if(V=ma,O="onMouseLeave",x="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(V=ya,O="onPointerLeave",x="onPointerEnter",w="pointer"),Re=U==null?P:Rn(U),S=W==null?P:Rn(W),P=new V(O,w+"leave",U,n,R),P.target=Re,P.relatedTarget=S,O=null,sn(R)===N&&(V=new V(x,w+"enter",W,n,R),V.target=S,V.relatedTarget=Re,O=V),Re=O,U&&W)t:{for(V=U,x=W,w=0,S=V;S;S=Tn(S))w++;for(S=0,O=x;O;O=Tn(O))S++;for(;0<w-S;)V=Tn(V),w--;for(;0<S-w;)x=Tn(x),S--;for(;w--;){if(V===x||x!==null&&V===x.alternate)break t;V=Tn(V),x=Tn(x)}V=null}else V=null;U!==null&&Va(z,P,U,V,!1),W!==null&&Re!==null&&Va(z,Re,W,V,!0)}}e:{if(P=N?Rn(N):window,U=P.nodeName&&P.nodeName.toLowerCase(),U==="select"||U==="input"&&P.type==="file")var b=jp;else if(Na(P))if(ja)b=Tp;else{b=Cp;var Q=Ep}else(U=P.nodeName)&&U.toLowerCase()==="input"&&(P.type==="checkbox"||P.type==="radio")&&(b=$p);if(b&&(b=b(e,N))){_a(z,b,n,R);break e}Q&&Q(e,P,N),e==="focusout"&&(Q=P._wrapperState)&&Q.controlled&&P.type==="number"&&ps(P,"number",P.value)}switch(Q=N?Rn(N):window,e){case"focusin":(Na(Q)||Q.contentEditable==="true")&&(Cn=Q,Bs=N,yr=null);break;case"focusout":yr=Bs=Cn=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,za(z,n,R);break;case"selectionchange":if(Lp)break;case"keydown":case"keyup":za(z,n,R)}var K;if(As)e:{switch(e){case"compositionstart":var Z="onCompositionStart";break e;case"compositionend":Z="onCompositionEnd";break e;case"compositionupdate":Z="onCompositionUpdate";break e}Z=void 0}else En?xa(e,n)&&(Z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Z="onCompositionStart");Z&&(va&&n.locale!=="ko"&&(En||Z!=="onCompositionStart"?Z==="onCompositionEnd"&&En&&(K=pa()):(Bt=R,Ls="value"in Bt?Bt.value:Bt.textContent,En=!0)),Q=fo(N,Z),0<Q.length&&(Z=new ga(Z,e,null,n,R),z.push({event:Z,listeners:Q}),K?Z.data=K:(K=Sa(n),K!==null&&(Z.data=K)))),(K=kp?xp(e,n):Sp(e,n))&&(N=fo(N,"onBeforeInput"),0<N.length&&(R=new ga("onBeforeInput","beforeinput",null,n,R),z.push({event:R,listeners:N}),R.data=K))}Ba(z,t)})}function kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fo(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=tr(e,n),i!=null&&r.unshift(kr(e,i,s)),i=tr(e,t),i!=null&&r.push(kr(e,i,s))),e=e.return}return r}function Tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Va(e,t,n,r,s){for(var i=t._reactName,c=[];n!==null&&n!==r;){var m=n,y=m.alternate,N=m.stateNode;if(y!==null&&y===r)break;m.tag===5&&N!==null&&(m=N,s?(y=tr(n,i),y!=null&&c.unshift(kr(n,y,m))):s||(y=tr(n,i),y!=null&&c.push(kr(n,y,m)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var Ip=/\r\n?/g,Mp=/\u0000|\uFFFD/g;function ba(e){return(typeof e=="string"?e:""+e).replace(Ip,`
39
- `).replace(Mp,"")}function po(e,t,n){if(t=ba(t),ba(e)!==t&&n)throw Error(a(425))}function ho(){}var Ys=null,Gs=null;function Xs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zs=typeof setTimeout=="function"?setTimeout:void 0,Ap=typeof clearTimeout=="function"?clearTimeout:void 0,qa=typeof Promise=="function"?Promise:void 0,Fp=typeof queueMicrotask=="function"?queueMicrotask:typeof qa<"u"?function(e){return qa.resolve(null).then(e).catch(Up)}:Zs;function Up(e){setTimeout(function(){throw e})}function Js(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),cr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cr(t)}function Vt(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==="$?")break;if(t==="/$")return null}}return e}function Qa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Pn=Math.random().toString(36).slice(2),_t="__reactFiber$"+Pn,xr="__reactProps$"+Pn,Tt="__reactContainer$"+Pn,el="__reactEvents$"+Pn,Hp="__reactListeners$"+Pn,Bp="__reactHandles$"+Pn;function sn(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qa(e);e!==null;){if(n=e[_t])return n;e=Qa(e)}return t}e=n,n=e.parentNode}return null}function Sr(e){return e=e[_t]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Rn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function mo(e){return e[xr]||null}var tl=[],Ln=-1;function bt(e){return{current:e}}function Se(e){0>Ln||(e.current=tl[Ln],tl[Ln]=null,Ln--)}function we(e,t){Ln++,tl[Ln]=e.current,e.current=t}var qt={},Be=bt(qt),Ke=bt(!1),ln=qt;function zn(e,t){var n=e.type.contextTypes;if(!n)return qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ye(e){return e=e.childContextTypes,e!=null}function go(){Se(Ke),Se(Be)}function Ka(e,t,n){if(Be.current!==qt)throw Error(a(168));we(Be,t),we(Ke,n)}function Ya(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(a(108,ve(e)||"Unknown",s));return H({},n,r)}function yo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,ln=Be.current,we(Be,e),we(Ke,Ke.current),!0}function Ga(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Ya(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,Se(Ke),Se(Be),we(Be,e)):Se(Ke),we(Ke,n)}var Pt=null,vo=!1,nl=!1;function Xa(e){Pt===null?Pt=[e]:Pt.push(e)}function Wp(e){vo=!0,Xa(e)}function Qt(){if(!nl&&Pt!==null){nl=!0;var e=0,t=he;try{var n=Pt;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pt=null,vo=!1}catch(s){throw Pt!==null&&(Pt=Pt.slice(e+1)),Ji(_s,Qt),s}finally{he=t,nl=!1}}return null}var Dn=[],On=0,wo=null,ko=0,at=[],ut=0,an=null,Rt=1,Lt="";function un(e,t){Dn[On++]=ko,Dn[On++]=wo,wo=e,ko=t}function Za(e,t,n){at[ut++]=Rt,at[ut++]=Lt,at[ut++]=an,an=e;var r=Rt;e=Lt;var s=32-ht(r)-1;r&=~(1<<s),n+=1;var i=32-ht(t)+s;if(30<i){var c=s-s%5;i=(r&(1<<c)-1).toString(32),r>>=c,s-=c,Rt=1<<32-ht(t)+s|n<<s|r,Lt=i+e}else Rt=1<<i|n<<s|r,Lt=e}function rl(e){e.return!==null&&(un(e,1),Za(e,1,0))}function ol(e){for(;e===wo;)wo=Dn[--On],Dn[On]=null,ko=Dn[--On],Dn[On]=null;for(;e===an;)an=at[--ut],at[ut]=null,Lt=at[--ut],at[ut]=null,Rt=at[--ut],at[ut]=null}var ot=null,st=null,je=!1,gt=null;function Ja(e,t){var n=pt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function eu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ot=e,st=Vt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ot=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=an!==null?{id:Rt,overflow:Lt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=pt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ot=e,st=null,!0):!1;default:return!1}}function sl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ll(e){if(je){var t=st;if(t){var n=t;if(!eu(e,t)){if(sl(e))throw Error(a(418));t=Vt(n.nextSibling);var r=ot;t&&eu(e,t)?Ja(r,n):(e.flags=e.flags&-4097|2,je=!1,ot=e)}}else{if(sl(e))throw Error(a(418));e.flags=e.flags&-4097|2,je=!1,ot=e}}}function tu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ot=e}function xo(e){if(e!==ot)return!1;if(!je)return tu(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xs(e.type,e.memoizedProps)),t&&(t=st)){if(sl(e))throw nu(),Error(a(418));for(;t;)Ja(e,t),t=Vt(t.nextSibling)}if(tu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){st=Vt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}st=null}}else st=ot?Vt(e.stateNode.nextSibling):null;return!0}function nu(){for(var e=st;e;)e=Vt(e.nextSibling)}function In(){st=ot=null,je=!1}function il(e){gt===null?gt=[e]:gt.push(e)}var Vp=J.ReactCurrentBatchConfig;function Nr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(c){var m=s.refs;c===null?delete m[i]:m[i]=c},t._stringRef=i,t)}if(typeof e!="string")throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function So(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ru(e){var t=e._init;return t(e._payload)}function ou(e){function t(x,w){if(e){var S=x.deletions;S===null?(x.deletions=[w],x.flags|=16):S.push(w)}}function n(x,w){if(!e)return null;for(;w!==null;)t(x,w),w=w.sibling;return null}function r(x,w){for(x=new Map;w!==null;)w.key!==null?x.set(w.key,w):x.set(w.index,w),w=w.sibling;return x}function s(x,w){return x=tn(x,w),x.index=0,x.sibling=null,x}function i(x,w,S){return x.index=S,e?(S=x.alternate,S!==null?(S=S.index,S<w?(x.flags|=2,w):S):(x.flags|=2,w)):(x.flags|=1048576,w)}function c(x){return e&&x.alternate===null&&(x.flags|=2),x}function m(x,w,S,O){return w===null||w.tag!==6?(w=Zl(S,x.mode,O),w.return=x,w):(w=s(w,S),w.return=x,w)}function y(x,w,S,O){var b=S.type;return b===q?R(x,w,S.props.children,O,S.key):w!==null&&(w.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Le&&ru(b)===w.type)?(O=s(w,S.props),O.ref=Nr(x,w,S),O.return=x,O):(O=qo(S.type,S.key,S.props,null,x.mode,O),O.ref=Nr(x,w,S),O.return=x,O)}function N(x,w,S,O){return w===null||w.tag!==4||w.stateNode.containerInfo!==S.containerInfo||w.stateNode.implementation!==S.implementation?(w=Jl(S,x.mode,O),w.return=x,w):(w=s(w,S.children||[]),w.return=x,w)}function R(x,w,S,O,b){return w===null||w.tag!==7?(w=yn(S,x.mode,O,b),w.return=x,w):(w=s(w,S),w.return=x,w)}function z(x,w,S){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Zl(""+w,x.mode,S),w.return=x,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case se:return S=qo(w.type,w.key,w.props,null,x.mode,S),S.ref=Nr(x,null,w),S.return=x,S;case ue:return w=Jl(w,x.mode,S),w.return=x,w;case Le:var O=w._init;return z(x,O(w._payload),S)}if(Zn(w)||G(w))return w=yn(w,x.mode,S,null),w.return=x,w;So(x,w)}return null}function P(x,w,S,O){var b=w!==null?w.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return b!==null?null:m(x,w,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case se:return S.key===b?y(x,w,S,O):null;case ue:return S.key===b?N(x,w,S,O):null;case Le:return b=S._init,P(x,w,b(S._payload),O)}if(Zn(S)||G(S))return b!==null?null:R(x,w,S,O,null);So(x,S)}return null}function U(x,w,S,O,b){if(typeof O=="string"&&O!==""||typeof O=="number")return x=x.get(S)||null,m(w,x,""+O,b);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case se:return x=x.get(O.key===null?S:O.key)||null,y(w,x,O,b);case ue:return x=x.get(O.key===null?S:O.key)||null,N(w,x,O,b);case Le:var Q=O._init;return U(x,w,S,Q(O._payload),b)}if(Zn(O)||G(O))return x=x.get(S)||null,R(w,x,O,b,null);So(w,O)}return null}function W(x,w,S,O){for(var b=null,Q=null,K=w,Z=w=0,Ae=null;K!==null&&Z<S.length;Z++){K.index>Z?(Ae=K,K=null):Ae=K.sibling;var fe=P(x,K,S[Z],O);if(fe===null){K===null&&(K=Ae);break}e&&K&&fe.alternate===null&&t(x,K),w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe,K=Ae}if(Z===S.length)return n(x,K),je&&un(x,Z),b;if(K===null){for(;Z<S.length;Z++)K=z(x,S[Z],O),K!==null&&(w=i(K,w,Z),Q===null?b=K:Q.sibling=K,Q=K);return je&&un(x,Z),b}for(K=r(x,K);Z<S.length;Z++)Ae=U(K,x,Z,S[Z],O),Ae!==null&&(e&&Ae.alternate!==null&&K.delete(Ae.key===null?Z:Ae.key),w=i(Ae,w,Z),Q===null?b=Ae:Q.sibling=Ae,Q=Ae);return e&&K.forEach(function(nn){return t(x,nn)}),je&&un(x,Z),b}function V(x,w,S,O){var b=G(S);if(typeof b!="function")throw Error(a(150));if(S=b.call(S),S==null)throw Error(a(151));for(var Q=b=null,K=w,Z=w=0,Ae=null,fe=S.next();K!==null&&!fe.done;Z++,fe=S.next()){K.index>Z?(Ae=K,K=null):Ae=K.sibling;var nn=P(x,K,fe.value,O);if(nn===null){K===null&&(K=Ae);break}e&&K&&nn.alternate===null&&t(x,K),w=i(nn,w,Z),Q===null?b=nn:Q.sibling=nn,Q=nn,K=Ae}if(fe.done)return n(x,K),je&&un(x,Z),b;if(K===null){for(;!fe.done;Z++,fe=S.next())fe=z(x,fe.value,O),fe!==null&&(w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe);return je&&un(x,Z),b}for(K=r(x,K);!fe.done;Z++,fe=S.next())fe=U(K,x,Z,fe.value,O),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?Z:fe.key),w=i(fe,w,Z),Q===null?b=fe:Q.sibling=fe,Q=fe);return e&&K.forEach(function(Nh){return t(x,Nh)}),je&&un(x,Z),b}function Re(x,w,S,O){if(typeof S=="object"&&S!==null&&S.type===q&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case se:e:{for(var b=S.key,Q=w;Q!==null;){if(Q.key===b){if(b=S.type,b===q){if(Q.tag===7){n(x,Q.sibling),w=s(Q,S.props.children),w.return=x,x=w;break e}}else if(Q.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Le&&ru(b)===Q.type){n(x,Q.sibling),w=s(Q,S.props),w.ref=Nr(x,Q,S),w.return=x,x=w;break e}n(x,Q);break}else t(x,Q);Q=Q.sibling}S.type===q?(w=yn(S.props.children,x.mode,O,S.key),w.return=x,x=w):(O=qo(S.type,S.key,S.props,null,x.mode,O),O.ref=Nr(x,w,S),O.return=x,x=O)}return c(x);case ue:e:{for(Q=S.key;w!==null;){if(w.key===Q)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(x,w.sibling),w=s(w,S.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=Jl(S,x.mode,O),w.return=x,x=w}return c(x);case Le:return Q=S._init,Re(x,w,Q(S._payload),O)}if(Zn(S))return W(x,w,S,O);if(G(S))return V(x,w,S,O);So(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(x,w.sibling),w=s(w,S),w.return=x,x=w):(n(x,w),w=Zl(S,x.mode,O),w.return=x,x=w),c(x)):n(x,w)}return Re}var Mn=ou(!0),su=ou(!1),No=bt(null),_o=null,An=null,al=null;function ul(){al=An=_o=null}function cl(e){var t=No.current;Se(No),e._currentValue=t}function dl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fn(e,t){_o=e,al=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ge=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(al!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(_o===null)throw Error(a(308));An=e,_o.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var cn=null;function fl(e){cn===null?cn=[e]:cn.push(e)}function lu(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,fl(t)):(n.next=s.next,s.next=n),t.interleaved=n,zt(e,r)}function zt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kt=!1;function pl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Dt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zt(e,n)}return s=r.interleaved,s===null?(t.next=t,fl(r)):(t.next=s.next,s.next=t),r.interleaved=t,zt(e,n)}function jo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cs(e,n)}}function au(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Eo(e,t,n,r){var s=e.updateQueue;Kt=!1;var i=s.firstBaseUpdate,c=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var y=m,N=y.next;y.next=null,c===null?i=N:c.next=N,c=y;var R=e.alternate;R!==null&&(R=R.updateQueue,m=R.lastBaseUpdate,m!==c&&(m===null?R.firstBaseUpdate=N:m.next=N,R.lastBaseUpdate=y))}if(i!==null){var z=s.baseState;c=0,R=N=y=null,m=i;do{var P=m.lane,U=m.eventTime;if((r&P)===P){R!==null&&(R=R.next={eventTime:U,lane:0,tag:m.tag,payload:m.payload,callback:m.callback,next:null});e:{var W=e,V=m;switch(P=t,U=n,V.tag){case 1:if(W=V.payload,typeof W=="function"){z=W.call(U,z,P);break e}z=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=V.payload,P=typeof W=="function"?W.call(U,z,P):W,P==null)break e;z=H({},z,P);break e;case 2:Kt=!0}}m.callback!==null&&m.lane!==0&&(e.flags|=64,P=s.effects,P===null?s.effects=[m]:P.push(m))}else U={eventTime:U,lane:P,tag:m.tag,payload:m.payload,callback:m.callback,next:null},R===null?(N=R=U,y=z):R=R.next=U,c|=P;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;P=m,m=P.next,P.next=null,s.lastBaseUpdate=P,s.shared.pending=null}}while(!0);if(R===null&&(y=z),s.baseState=y,s.firstBaseUpdate=N,s.lastBaseUpdate=R,t=s.shared.interleaved,t!==null){s=t;do c|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);pn|=c,e.lanes=c,e.memoizedState=z}}function uu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(a(191,s));s.call(r)}}}var _r={},jt=bt(_r),jr=bt(_r),Er=bt(_r);function dn(e){if(e===_r)throw Error(a(174));return e}function hl(e,t){switch(we(Er,t),we(jr,e),we(jt,_r),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ms(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ms(t,e)}Se(jt),we(jt,t)}function Un(){Se(jt),Se(jr),Se(Er)}function cu(e){dn(Er.current);var t=dn(jt.current),n=ms(t,e.type);t!==n&&(we(jr,e),we(jt,n))}function ml(e){jr.current===e&&(Se(jt),Se(jr))}var Ce=bt(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 gl=[];function yl(){for(var e=0;e<gl.length;e++)gl[e]._workInProgressVersionPrimary=null;gl.length=0}var $o=J.ReactCurrentDispatcher,vl=J.ReactCurrentBatchConfig,fn=0,$e=null,De=null,Ie=null,To=!1,Cr=!1,$r=0,bp=0;function We(){throw Error(a(321))}function wl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function kl(e,t,n,r,s,i){if(fn=i,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$o.current=e===null||e.memoizedState===null?Yp:Gp,e=n(r,s),Cr){i=0;do{if(Cr=!1,$r=0,25<=i)throw Error(a(301));i+=1,Ie=De=null,t.updateQueue=null,$o.current=Xp,e=n(r,s)}while(Cr)}if($o.current=Lo,t=De!==null&&De.next!==null,fn=0,Ie=De=$e=null,To=!1,t)throw Error(a(300));return e}function xl(){var e=$r!==0;return $r=0,e}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?$e.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function dt(){if(De===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Ie===null?$e.memoizedState:Ie.next;if(t!==null)Ie=t,De=e;else{if(e===null)throw Error(a(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Ie===null?$e.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function Tr(e,t){return typeof t=="function"?t(e):t}function Sl(e){var t=dt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=De,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var c=s.next;s.next=i.next,i.next=c}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var m=c=null,y=null,N=i;do{var R=N.lane;if((fn&R)===R)y!==null&&(y=y.next={lane:0,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),r=N.hasEagerState?N.eagerState:e(r,N.action);else{var z={lane:R,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null};y===null?(m=y=z,c=r):y=y.next=z,$e.lanes|=R,pn|=R}N=N.next}while(N!==null&&N!==i);y===null?c=r:y.next=m,mt(r,t.memoizedState)||(Ge=!0),t.memoizedState=r,t.baseState=c,t.baseQueue=y,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,$e.lanes|=i,pn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nl(e){var t=dt(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var c=s=s.next;do i=e(i,c.action),c=c.next;while(c!==s);mt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function du(){}function fu(e,t){var n=$e,r=dt(),s=t(),i=!mt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ge=!0),r=r.queue,_l(mu.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,Pr(9,hu.bind(null,n,r,s,t),void 0,null),Me===null)throw Error(a(349));(fn&30)!==0||pu(n,t,s)}return s}function pu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hu(e,t,n,r){t.value=n,t.getSnapshot=r,gu(t)&&yu(e)}function mu(e,t,n){return n(function(){gu(t)&&yu(e)})}function gu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function yu(e){var t=zt(e,1);t!==null&&kt(t,e,1,-1)}function vu(e){var t=Et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Tr,lastRenderedState:e},t.queue=e,e=e.dispatch=Kp.bind(null,$e,e),[t.memoizedState,e]}function Pr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wu(){return dt().memoizedState}function Po(e,t,n,r){var s=Et();$e.flags|=e,s.memoizedState=Pr(1|t,n,void 0,r===void 0?null:r)}function Ro(e,t,n,r){var s=dt();r=r===void 0?null:r;var i=void 0;if(De!==null){var c=De.memoizedState;if(i=c.destroy,r!==null&&wl(r,c.deps)){s.memoizedState=Pr(t,n,i,r);return}}$e.flags|=e,s.memoizedState=Pr(1|t,n,i,r)}function ku(e,t){return Po(8390656,8,e,t)}function _l(e,t){return Ro(2048,8,e,t)}function xu(e,t){return Ro(4,2,e,t)}function Su(e,t){return Ro(4,4,e,t)}function Nu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _u(e,t,n){return n=n!=null?n.concat([e]):null,Ro(4,4,Nu.bind(null,t,e),n)}function jl(){}function ju(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&wl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Eu(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&wl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cu(e,t,n){return(fn&21)===0?(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n):(mt(n,t)||(n=ra(),$e.lanes|=n,pn|=n,e.baseState=!0),t)}function qp(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=vl.transition;vl.transition={};try{e(!1),t()}finally{he=n,vl.transition=r}}function $u(){return dt().memoizedState}function Qp(e,t,n){var r=Jt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tu(e))Pu(t,n);else if(n=lu(e,t,n,r),n!==null){var s=Qe();kt(n,e,r,s),Ru(n,t,r)}}function Kp(e,t,n){var r=Jt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tu(e))Pu(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,m=i(c,n);if(s.hasEagerState=!0,s.eagerState=m,mt(m,c)){var y=t.interleaved;y===null?(s.next=s,fl(t)):(s.next=y.next,y.next=s),t.interleaved=s;return}}catch{}finally{}n=lu(e,t,s,r),n!==null&&(s=Qe(),kt(n,e,r,s),Ru(n,t,r))}}function Tu(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Pu(e,t){Cr=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ru(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cs(e,n)}}var Lo={readContext:ct,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},Yp={readContext:ct,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:ku,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Po(4194308,4,Nu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Po(4194308,4,e,t)},useInsertionEffect:function(e,t){return Po(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qp.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:vu,useDebugValue:jl,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=vu(!1),t=e[0];return e=qp.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,s=Et();if(je){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Me===null)throw Error(a(349));(fn&30)!==0||pu(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,ku(mu.bind(null,r,i,e),[e]),r.flags|=2048,Pr(9,hu.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Et(),t=Me.identifierPrefix;if(je){var n=Lt,r=Rt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$r++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=bp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gp={readContext:ct,useCallback:ju,useContext:ct,useEffect:_l,useImperativeHandle:_u,useInsertionEffect:xu,useLayoutEffect:Su,useMemo:Eu,useReducer:Sl,useRef:wu,useState:function(){return Sl(Tr)},useDebugValue:jl,useDeferredValue:function(e){var t=dt();return Cu(t,De.memoizedState,e)},useTransition:function(){var e=Sl(Tr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:du,useSyncExternalStore:fu,useId:$u,unstable_isNewReconciler:!1},Xp={readContext:ct,useCallback:ju,useContext:ct,useEffect:_l,useImperativeHandle:_u,useInsertionEffect:xu,useLayoutEffect:Su,useMemo:Eu,useReducer:Nl,useRef:wu,useState:function(){return Nl(Tr)},useDebugValue:jl,useDeferredValue:function(e){var t=dt();return De===null?t.memoizedState=e:Cu(t,De.memoizedState,e)},useTransition:function(){var e=Nl(Tr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:du,useSyncExternalStore:fu,useId:$u,unstable_isNewReconciler:!1};function yt(e,t){if(e&&e.defaultProps){t=H({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function El(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zo={isMounted:function(e){return(e=e._reactInternals)?on(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=Jt(e),i=Dt(r,s);i.payload=t,n!=null&&(i.callback=n),t=Yt(e,i,s),t!==null&&(kt(t,e,s,r),jo(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=Jt(e),i=Dt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Yt(e,i,s),t!==null&&(kt(t,e,s,r),jo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qe(),r=Jt(e),s=Dt(n,r);s.tag=2,t!=null&&(s.callback=t),t=Yt(e,s,r),t!==null&&(kt(t,e,r,n),jo(t,e,r))}};function Lu(e,t,n,r,s,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,c):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(s,i):!0}function zu(e,t,n){var r=!1,s=qt,i=t.contextType;return typeof i=="object"&&i!==null?i=ct(i):(s=Ye(t)?ln:Be.current,r=t.contextTypes,i=(r=r!=null)?zn(e,s):qt),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=zo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Du(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zo.enqueueReplaceState(t,t.state,null)}function Cl(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},pl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ct(i):(i=Ye(t)?ln:Be.current,s.context=zn(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(El(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&zo.enqueueReplaceState(s,s.state,null),Eo(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Hn(e,t){try{var n="",r=t;do n+=ce(r),r=r.return;while(r);var s=n}catch(i){s=`
40
- Error generating stack: `+i.message+`
41
- `+i.stack}return{value:e,source:t,stack:s,digest:null}}function $l(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zp=typeof WeakMap=="function"?WeakMap:Map;function Ou(e,t,n){n=Dt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Uo||(Uo=!0,Vl=r),Tl(e,t)},n}function Iu(e,t,n){n=Dt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Tl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Tl(e,t),typeof r!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),n}function Mu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zp;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=fh.bind(null,e,t,n),t.then(e,e))}function Au(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fu(e,t,n,r,s){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Dt(-1,1),t.tag=2,Yt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var Jp=J.ReactCurrentOwner,Ge=!1;function qe(e,t,n,r){t.child=e===null?su(t,null,n,r):Mn(t,e.child,n,r)}function Uu(e,t,n,r,s){n=n.render;var i=t.ref;return Fn(t,s),r=kl(e,t,n,r,i,s),n=xl(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ot(e,t,s)):(je&&n&&rl(t),t.flags|=1,qe(e,t,r,s),t.child)}function Hu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Xl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Bu(e,t,i,r,s)):(e=qo(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&s)===0){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:gr,n(c,r)&&e.ref===t.ref)return Ot(e,t,s)}return t.flags|=1,e=tn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Bu(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(gr(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&s)!==0)(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,Ot(e,t,s)}return Pl(e,t,n,r,s)}function Wu(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Wn,lt),lt|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Wn,lt),lt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,we(Wn,lt),lt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,we(Wn,lt),lt|=r;return qe(e,t,s,n),t.child}function Vu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Pl(e,t,n,r,s){var i=Ye(n)?ln:Be.current;return i=zn(t,i),Fn(t,s),n=kl(e,t,n,r,i,s),r=xl(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ot(e,t,s)):(je&&r&&rl(t),t.flags|=1,qe(e,t,n,s),t.child)}function bu(e,t,n,r,s){if(Ye(n)){var i=!0;yo(t)}else i=!1;if(Fn(t,s),t.stateNode===null)Oo(e,t),zu(t,n,r),Cl(t,n,r,s),r=!0;else if(e===null){var c=t.stateNode,m=t.memoizedProps;c.props=m;var y=c.context,N=n.contextType;typeof N=="object"&&N!==null?N=ct(N):(N=Ye(n)?ln:Be.current,N=zn(t,N));var R=n.getDerivedStateFromProps,z=typeof R=="function"||typeof c.getSnapshotBeforeUpdate=="function";z||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==r||y!==N)&&Du(t,c,r,N),Kt=!1;var P=t.memoizedState;c.state=P,Eo(t,r,c,s),y=t.memoizedState,m!==r||P!==y||Ke.current||Kt?(typeof R=="function"&&(El(t,n,R,r),y=t.memoizedState),(m=Kt||Lu(t,n,m,r,P,y,N))?(z||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=y),c.props=r,c.state=y,c.context=N,r=m):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{c=t.stateNode,iu(e,t),m=t.memoizedProps,N=t.type===t.elementType?m:yt(t.type,m),c.props=N,z=t.pendingProps,P=c.context,y=n.contextType,typeof y=="object"&&y!==null?y=ct(y):(y=Ye(n)?ln:Be.current,y=zn(t,y));var U=n.getDerivedStateFromProps;(R=typeof U=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==z||P!==y)&&Du(t,c,r,y),Kt=!1,P=t.memoizedState,c.state=P,Eo(t,r,c,s);var W=t.memoizedState;m!==z||P!==W||Ke.current||Kt?(typeof U=="function"&&(El(t,n,U,r),W=t.memoizedState),(N=Kt||Lu(t,n,N,r,P,W,y)||!1)?(R||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,W,y),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,W,y)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=W),c.props=r,c.state=W,c.context=y,r=N):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),r=!1)}return Rl(e,t,n,r,i,s)}function Rl(e,t,n,r,s,i){Vu(e,t);var c=(t.flags&128)!==0;if(!r&&!c)return s&&Ga(t,n,!1),Ot(e,t,i);r=t.stateNode,Jp.current=t;var m=c&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&c?(t.child=Mn(t,e.child,null,i),t.child=Mn(t,null,m,i)):qe(e,t,m,i),t.memoizedState=r.state,s&&Ga(t,n,!0),t.child}function qu(e){var t=e.stateNode;t.pendingContext?Ka(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ka(e,t.context,!1),hl(e,t.containerInfo)}function Qu(e,t,n,r,s){return In(),il(s),t.flags|=256,qe(e,t,n,r),t.child}var Ll={dehydrated:null,treeContext:null,retryLane:0};function zl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ku(e,t,n){var r=t.pendingProps,s=Ce.current,i=!1,c=(t.flags&128)!==0,m;if((m=c)||(m=e!==null&&e.memoizedState===null?!1:(s&2)!==0),m?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),we(Ce,s&1),e===null)return ll(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(c=r.children,e=r.fallback,i?(r=t.mode,i=t.child,c={mode:"hidden",children:c},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=c):i=Qo(c,r,0,null),e=yn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=zl(n),t.memoizedState=Ll,e):Dl(t,c));if(s=e.memoizedState,s!==null&&(m=s.dehydrated,m!==null))return eh(e,t,c,r,m,s,n);if(i){i=r.fallback,c=t.mode,s=e.child,m=s.sibling;var y={mode:"hidden",children:r.children};return(c&1)===0&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=y,t.deletions=null):(r=tn(s,y),r.subtreeFlags=s.subtreeFlags&14680064),m!==null?i=tn(m,i):(i=yn(i,c,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,c=e.child.memoizedState,c=c===null?zl(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},i.memoizedState=c,i.childLanes=e.childLanes&~n,t.memoizedState=Ll,r}return i=e.child,e=i.sibling,r=tn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Dl(e,t){return t=Qo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Do(e,t,n,r){return r!==null&&il(r),Mn(t,e.child,null,n),e=Dl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function eh(e,t,n,r,s,i,c){if(n)return t.flags&256?(t.flags&=-257,r=$l(Error(a(422))),Do(e,t,c,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Qo({mode:"visible",children:r.children},s,0,null),i=yn(i,s,c,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Mn(t,e.child,null,c),t.child.memoizedState=zl(c),t.memoizedState=Ll,i);if((t.mode&1)===0)return Do(e,t,c,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var m=r.dgst;return r=m,i=Error(a(419)),r=$l(i,r,void 0),Do(e,t,c,r)}if(m=(c&e.childLanes)!==0,Ge||m){if(r=Me,r!==null){switch(c&-c){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(r.suspendedLanes|c))!==0?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,zt(e,s),kt(r,e,s,-1))}return Gl(),r=$l(Error(a(421))),Do(e,t,c,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ph.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,st=Vt(s.nextSibling),ot=t,je=!0,gt=null,e!==null&&(at[ut++]=Rt,at[ut++]=Lt,at[ut++]=an,Rt=e.id,Lt=e.overflow,an=t),t=Dl(t,r.children),t.flags|=4096,t)}function Yu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dl(e.return,t,n)}function Ol(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Gu(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(qe(e,t,r.children,n),r=Ce.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yu(e,n,t);else if(e.tag===19)Yu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(Ce,r),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Co(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ol(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Co(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ol(t,!0,n,null,i);break;case"together":Ol(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Oo(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ot(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=tn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function th(e,t,n){switch(t.tag){case 3:qu(t),In();break;case 5:cu(t);break;case 1:Ye(t.type)&&yo(t);break;case 4:hl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;we(No,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(Ce,Ce.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Ku(e,t,n):(we(Ce,Ce.current&1),e=Ot(e,t,n),e!==null?e.sibling:null);we(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Gu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),we(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,Wu(e,t,n)}return Ot(e,t,n)}var Xu,Il,Zu,Ju;Xu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Il=function(){},Zu=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,dn(jt.current);var i=null;switch(n){case"input":s=ds(e,s),r=ds(e,r),i=[];break;case"select":s=H({},s,{value:void 0}),r=H({},r,{value:void 0}),i=[];break;case"textarea":s=hs(e,s),r=hs(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ho)}gs(n,r);var c;n=null;for(N in s)if(!r.hasOwnProperty(N)&&s.hasOwnProperty(N)&&s[N]!=null)if(N==="style"){var m=s[N];for(c in m)m.hasOwnProperty(c)&&(n||(n={}),n[c]="")}else N!=="dangerouslySetInnerHTML"&&N!=="children"&&N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&N!=="autoFocus"&&(f.hasOwnProperty(N)?i||(i=[]):(i=i||[]).push(N,null));for(N in r){var y=r[N];if(m=s!=null?s[N]:void 0,r.hasOwnProperty(N)&&y!==m&&(y!=null||m!=null))if(N==="style")if(m){for(c in m)!m.hasOwnProperty(c)||y&&y.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in y)y.hasOwnProperty(c)&&m[c]!==y[c]&&(n||(n={}),n[c]=y[c])}else n||(i||(i=[]),i.push(N,n)),n=y;else N==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,m=m?m.__html:void 0,y!=null&&m!==y&&(i=i||[]).push(N,y)):N==="children"?typeof y!="string"&&typeof y!="number"||(i=i||[]).push(N,""+y):N!=="suppressContentEditableWarning"&&N!=="suppressHydrationWarning"&&(f.hasOwnProperty(N)?(y!=null&&N==="onScroll"&&xe("scroll",e),i||m===y||(i=[])):(i=i||[]).push(N,y))}n&&(i=i||[]).push("style",n);var N=i;(t.updateQueue=N)&&(t.flags|=4)}},Ju=function(e,t,n,r){n!==r&&(t.flags|=4)};function Rr(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function nh(e,t,n){var r=t.pendingProps;switch(ol(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return Ye(t.type)&&go(),Ve(t),null;case 3:return r=t.stateNode,Un(),Se(Ke),Se(Be),yl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gt!==null&&(Ql(gt),gt=null))),Il(e,t),Ve(t),null;case 5:ml(t);var s=dn(Er.current);if(n=t.type,e!==null&&t.stateNode!=null)Zu(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ve(t),null}if(e=dn(jt.current),xo(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[_t]=t,r[xr]=i,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<vr.length;s++)xe(vr[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":zi(r,i),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xe("invalid",r);break;case"textarea":Ii(r,i),xe("invalid",r)}gs(n,i),s=null;for(var c in i)if(i.hasOwnProperty(c)){var m=i[c];c==="children"?typeof m=="string"?r.textContent!==m&&(i.suppressHydrationWarning!==!0&&po(r.textContent,m,e),s=["children",m]):typeof m=="number"&&r.textContent!==""+m&&(i.suppressHydrationWarning!==!0&&po(r.textContent,m,e),s=["children",""+m]):f.hasOwnProperty(c)&&m!=null&&c==="onScroll"&&xe("scroll",r)}switch(n){case"input":Wr(r),Oi(r,i,!0);break;case"textarea":Wr(r),Ai(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ho)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{c=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fi(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[_t]=t,e[xr]=r,Xu(e,t,!1,!1),t.stateNode=e;e:{switch(c=ys(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<vr.length;s++)xe(vr[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":zi(e,r),s=ds(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=H({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Ii(e,r),s=hs(e,r),xe("invalid",e);break;default:s=r}gs(n,s),m=s;for(i in m)if(m.hasOwnProperty(i)){var y=m[i];i==="style"?Bi(e,y):i==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&Ui(e,y)):i==="children"?typeof y=="string"?(n!=="textarea"||y!=="")&&Jn(e,y):typeof y=="number"&&Jn(e,""+y):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(f.hasOwnProperty(i)?y!=null&&i==="onScroll"&&xe("scroll",e):y!=null&&ke(e,i,y,c))}switch(n){case"input":Wr(e),Oi(e,r,!1);break;case"textarea":Wr(e),Ai(e);break;case"option":r.value!=null&&e.setAttribute("value",""+pe(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?xn(e,!!r.multiple,i,!1):r.defaultValue!=null&&xn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ho)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ve(t),null;case 6:if(e&&t.stateNode!=null)Ju(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(a(166));if(n=dn(Er.current),dn(jt.current),xo(t)){if(r=t.stateNode,n=t.memoizedProps,r[_t]=t,(i=r.nodeValue!==n)&&(e=ot,e!==null))switch(e.tag){case 3:po(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&po(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_t]=t,t.stateNode=r}return Ve(t),null;case 13:if(Se(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&st!==null&&(t.mode&1)!==0&&(t.flags&128)===0)nu(),In(),t.flags|=98560,i=!1;else if(i=xo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));i[_t]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ve(t),i=!1}else gt!==null&&(Ql(gt),gt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ce.current&1)!==0?Oe===0&&(Oe=3):Gl())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return Un(),Il(e,t),e===null&&wr(t.stateNode.containerInfo),Ve(t),null;case 10:return cl(t.type._context),Ve(t),null;case 17:return Ye(t.type)&&go(),Ve(t),null;case 19:if(Se(Ce),i=t.memoizedState,i===null)return Ve(t),null;if(r=(t.flags&128)!==0,c=i.rendering,c===null)if(r)Rr(i,!1);else{if(Oe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Co(e),c!==null){for(t.flags|=128,Rr(i,!1),r=c.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,c=i.alternate,c===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,e=c.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(Ce,Ce.current&1|2),t.child}e=e.sibling}i.tail!==null&&Pe()>Vn&&(t.flags|=128,r=!0,Rr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Co(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!je)return Ve(t),null}else 2*Pe()-i.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,Rr(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(n=i.last,n!==null?n.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Pe(),t.sibling=null,n=Ce.current,we(Ce,r?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return Yl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(lt&1073741824)!==0&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(a(156,t.tag))}function rh(e,t){switch(ol(t),t.tag){case 1:return Ye(t.type)&&go(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),Se(Ke),Se(Be),yl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ml(t),null;case 13:if(Se(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Se(Ce),null;case 4:return Un(),null;case 10:return cl(t.type._context),null;case 22:case 23:return Yl(),null;case 24:return null;default:return null}}var Io=!1,be=!1,oh=typeof WeakSet=="function"?WeakSet:Set,B=null;function Bn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function Ml(e,t,n){try{n()}catch(r){Te(e,t,r)}}var ec=!1;function sh(e,t){if(Ys=to,e=La(),Hs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,m=-1,y=-1,N=0,R=0,z=e,P=null;t:for(;;){for(var U;z!==n||s!==0&&z.nodeType!==3||(m=c+s),z!==i||r!==0&&z.nodeType!==3||(y=c+r),z.nodeType===3&&(c+=z.nodeValue.length),(U=z.firstChild)!==null;)P=z,z=U;for(;;){if(z===e)break t;if(P===n&&++N===s&&(m=c),P===i&&++R===r&&(y=c),(U=z.nextSibling)!==null)break;z=P,P=z.parentNode}z=U}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gs={focusedElem:e,selectionRange:n},to=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var W=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(W!==null){var V=W.memoizedProps,Re=W.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?V:yt(t.type,V),Re);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(O){Te(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return W=ec,ec=!1,W}function Lr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ml(t,n,i)}s=s.next}while(s!==r)}}function Mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Al(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function tc(e){var t=e.alternate;t!==null&&(e.alternate=null,tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[xr],delete t[el],delete t[Hp],delete t[Bp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nc(e){return e.tag===5||e.tag===3||e.tag===4}function rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nc(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.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 Fl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ho));else if(r!==4&&(e=e.child,e!==null))for(Fl(e,t,n),e=e.sibling;e!==null;)Fl(e,t,n),e=e.sibling}function Ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ul(e,t,n),e=e.sibling;e!==null;)Ul(e,t,n),e=e.sibling}var Ue=null,vt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)oc(e,t,n),n=n.sibling}function oc(e,t,n){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Yr,n)}catch{}switch(n.tag){case 5:be||Bn(n,t);case 6:var r=Ue,s=vt;Ue=null,Gt(e,t,n),Ue=r,vt=s,Ue!==null&&(vt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(vt?(e=Ue,n=n.stateNode,e.nodeType===8?Js(e.parentNode,n):e.nodeType===1&&Js(e,n),cr(e)):Js(Ue,n.stateNode));break;case 4:r=Ue,s=vt,Ue=n.stateNode.containerInfo,vt=!0,Gt(e,t,n),Ue=r,vt=s;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,c=i.destroy;i=i.tag,c!==void 0&&((i&2)!==0||(i&4)!==0)&&Ml(n,t,c),s=s.next}while(s!==r)}Gt(e,t,n);break;case 1:if(!be&&(Bn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(m){Te(n,t,m)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,Gt(e,t,n),be=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function sc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new oh),t.forEach(function(r){var s=hh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function wt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,c=t,m=c;e:for(;m!==null;){switch(m.tag){case 5:Ue=m.stateNode,vt=!1;break e;case 3:Ue=m.stateNode.containerInfo,vt=!0;break e;case 4:Ue=m.stateNode.containerInfo,vt=!0;break e}m=m.return}if(Ue===null)throw Error(a(160));oc(i,c,s),Ue=null,vt=!1;var y=s.alternate;y!==null&&(y.return=null),s.return=null}catch(N){Te(s,t,N)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lc(t,e),t=t.sibling}function lc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(wt(t,e),Ct(e),r&4){try{Lr(3,e,e.return),Mo(3,e)}catch(V){Te(e,e.return,V)}try{Lr(5,e,e.return)}catch(V){Te(e,e.return,V)}}break;case 1:wt(t,e),Ct(e),r&512&&n!==null&&Bn(n,n.return);break;case 5:if(wt(t,e),Ct(e),r&512&&n!==null&&Bn(n,n.return),e.flags&32){var s=e.stateNode;try{Jn(s,"")}catch(V){Te(e,e.return,V)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,c=n!==null?n.memoizedProps:i,m=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{m==="input"&&i.type==="radio"&&i.name!=null&&Di(s,i),ys(m,c);var N=ys(m,i);for(c=0;c<y.length;c+=2){var R=y[c],z=y[c+1];R==="style"?Bi(s,z):R==="dangerouslySetInnerHTML"?Ui(s,z):R==="children"?Jn(s,z):ke(s,R,z,N)}switch(m){case"input":fs(s,i);break;case"textarea":Mi(s,i);break;case"select":var P=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var U=i.value;U!=null?xn(s,!!i.multiple,U,!1):P!==!!i.multiple&&(i.defaultValue!=null?xn(s,!!i.multiple,i.defaultValue,!0):xn(s,!!i.multiple,i.multiple?[]:"",!1))}s[xr]=i}catch(V){Te(e,e.return,V)}}break;case 6:if(wt(t,e),Ct(e),r&4){if(e.stateNode===null)throw Error(a(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(V){Te(e,e.return,V)}}break;case 3:if(wt(t,e),Ct(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cr(t.containerInfo)}catch(V){Te(e,e.return,V)}break;case 4:wt(t,e),Ct(e);break;case 13:wt(t,e),Ct(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Wl=Pe())),r&4&&sc(e);break;case 22:if(R=n!==null&&n.memoizedState!==null,e.mode&1?(be=(N=be)||R,wt(t,e),be=N):wt(t,e),Ct(e),r&8192){if(N=e.memoizedState!==null,(e.stateNode.isHidden=N)&&!R&&(e.mode&1)!==0)for(B=e,R=e.child;R!==null;){for(z=B=R;B!==null;){switch(P=B,U=P.child,P.tag){case 0:case 11:case 14:case 15:Lr(4,P,P.return);break;case 1:Bn(P,P.return);var W=P.stateNode;if(typeof W.componentWillUnmount=="function"){r=P,n=P.return;try{t=r,W.props=t.memoizedProps,W.state=t.memoizedState,W.componentWillUnmount()}catch(V){Te(r,n,V)}}break;case 5:Bn(P,P.return);break;case 22:if(P.memoizedState!==null){uc(z);continue}}U!==null?(U.return=P,B=U):uc(z)}R=R.sibling}e:for(R=null,z=e;;){if(z.tag===5){if(R===null){R=z;try{s=z.stateNode,N?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(m=z.stateNode,y=z.memoizedProps.style,c=y!=null&&y.hasOwnProperty("display")?y.display:null,m.style.display=Hi("display",c))}catch(V){Te(e,e.return,V)}}}else if(z.tag===6){if(R===null)try{z.stateNode.nodeValue=N?"":z.memoizedProps}catch(V){Te(e,e.return,V)}}else if((z.tag!==22&&z.tag!==23||z.memoizedState===null||z===e)&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===e)break e;for(;z.sibling===null;){if(z.return===null||z.return===e)break e;R===z&&(R=null),z=z.return}R===z&&(R=null),z.sibling.return=z.return,z=z.sibling}}break;case 19:wt(t,e),Ct(e),r&4&&sc(e);break;case 21:break;default:wt(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(nc(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Jn(s,""),r.flags&=-33);var i=rc(e);Ul(e,i,s);break;case 3:case 4:var c=r.stateNode.containerInfo,m=rc(e);Fl(e,m,c);break;default:throw Error(a(161))}}catch(y){Te(e,e.return,y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lh(e,t,n){B=e,ic(e)}function ic(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var s=B,i=s.child;if(s.tag===22&&r){var c=s.memoizedState!==null||Io;if(!c){var m=s.alternate,y=m!==null&&m.memoizedState!==null||be;m=Io;var N=be;if(Io=c,(be=y)&&!N)for(B=s;B!==null;)c=B,y=c.child,c.tag===22&&c.memoizedState!==null?cc(s):y!==null?(y.return=c,B=y):cc(s);for(;i!==null;)B=i,ic(i),i=i.sibling;B=s,Io=m,be=N}ac(e)}else(s.subtreeFlags&8772)!==0&&i!==null?(i.return=s,B=i):ac(e)}}function ac(e){for(;B!==null;){var t=B;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:be||Mo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!be)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:yt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&uu(t,i,r);break;case 3:var c=t.updateQueue;if(c!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}uu(t,c,n)}break;case 5:var m=t.stateNode;if(n===null&&t.flags&4){n=m;var y=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&n.focus();break;case"img":y.src&&(n.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var N=t.alternate;if(N!==null){var R=N.memoizedState;if(R!==null){var z=R.dehydrated;z!==null&&cr(z)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}be||t.flags&512&&Al(t)}catch(P){Te(t,t.return,P)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function uc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function cc(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Mo(4,t)}catch(y){Te(t,n,y)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(y){Te(t,s,y)}}var i=t.return;try{Al(t)}catch(y){Te(t,i,y)}break;case 5:var c=t.return;try{Al(t)}catch(y){Te(t,c,y)}}}catch(y){Te(t,t.return,y)}if(t===e){B=null;break}var m=t.sibling;if(m!==null){m.return=t.return,B=m;break}B=t.return}}var ih=Math.ceil,Ao=J.ReactCurrentDispatcher,Hl=J.ReactCurrentOwner,ft=J.ReactCurrentBatchConfig,ae=0,Me=null,ze=null,He=0,lt=0,Wn=bt(0),Oe=0,zr=null,pn=0,Fo=0,Bl=0,Dr=null,Xe=null,Wl=0,Vn=1/0,It=null,Uo=!1,Vl=null,Xt=null,Ho=!1,Zt=null,Bo=0,Or=0,bl=null,Wo=-1,Vo=0;function Qe(){return(ae&6)!==0?Pe():Wo!==-1?Wo:Wo=Pe()}function Jt(e){return(e.mode&1)===0?1:(ae&2)!==0&&He!==0?He&-He:Vp.transition!==null?(Vo===0&&(Vo=ra()),Vo):(e=he,e!==0||(e=window.event,e=e===void 0?16:fa(e.type)),e)}function kt(e,t,n,r){if(50<Or)throw Or=0,bl=null,Error(a(185));sr(e,n,r),((ae&2)===0||e!==Me)&&(e===Me&&((ae&2)===0&&(Fo|=n),Oe===4&&en(e,He)),Ze(e,r),n===1&&ae===0&&(t.mode&1)===0&&(Vn=Pe()+500,vo&&Qt()))}function Ze(e,t){var n=e.callbackNode;Vf(e,t);var r=Zr(e,e===Me?He:0);if(r===0)n!==null&&ea(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ea(n),t===1)e.tag===0?Wp(fc.bind(null,e)):Xa(fc.bind(null,e)),Fp(function(){(ae&6)===0&&Qt()}),n=null;else{switch(oa(r)){case 1:n=_s;break;case 4:n=ta;break;case 16:n=Kr;break;case 536870912:n=na;break;default:n=Kr}n=kc(n,dc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function dc(e,t){if(Wo=-1,Vo=0,(ae&6)!==0)throw Error(a(327));var n=e.callbackNode;if(bn()&&e.callbackNode!==n)return null;var r=Zr(e,e===Me?He:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=bo(e,r);else{t=r;var s=ae;ae|=2;var i=hc();(Me!==e||He!==t)&&(It=null,Vn=Pe()+500,mn(e,t));do try{ch();break}catch(m){pc(e,m)}while(!0);ul(),Ao.current=i,ae=s,ze!==null?t=0:(Me=null,He=0,t=Oe)}if(t!==0){if(t===2&&(s=js(e),s!==0&&(r=s,t=ql(e,s))),t===1)throw n=zr,mn(e,0),en(e,r),Ze(e,Pe()),n;if(t===6)en(e,r);else{if(s=e.current.alternate,(r&30)===0&&!ah(s)&&(t=bo(e,r),t===2&&(i=js(e),i!==0&&(r=i,t=ql(e,i))),t===1))throw n=zr,mn(e,0),en(e,r),Ze(e,Pe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:gn(e,Xe,It);break;case 3:if(en(e,r),(r&130023424)===r&&(t=Wl+500-Pe(),10<t)){if(Zr(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Qe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Zs(gn.bind(null,e,Xe,It),t);break}gn(e,Xe,It);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var c=31-ht(r);i=1<<c,c=t[c],c>s&&(s=c),r&=~i}if(r=s,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ih(r/1960))-r,10<r){e.timeoutHandle=Zs(gn.bind(null,e,Xe,It),r);break}gn(e,Xe,It);break;case 5:gn(e,Xe,It);break;default:throw Error(a(329))}}}return Ze(e,Pe()),e.callbackNode===n?dc.bind(null,e):null}function ql(e,t){var n=Dr;return e.current.memoizedState.isDehydrated&&(mn(e,t).flags|=256),e=bo(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&Ql(t)),e}function Ql(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function ah(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!mt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function en(e,t){for(t&=~Bl,t&=~Fo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ht(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if((ae&6)!==0)throw Error(a(327));bn();var t=Zr(e,0);if((t&1)===0)return Ze(e,Pe()),null;var n=bo(e,t);if(e.tag!==0&&n===2){var r=js(e);r!==0&&(t=r,n=ql(e,r))}if(n===1)throw n=zr,mn(e,0),en(e,t),Ze(e,Pe()),n;if(n===6)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gn(e,Xe,It),Ze(e,Pe()),null}function Kl(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Vn=Pe()+500,vo&&Qt())}}function hn(e){Zt!==null&&Zt.tag===0&&(ae&6)===0&&bn();var t=ae;ae|=1;var n=ft.transition,r=he;try{if(ft.transition=null,he=1,e)return e()}finally{he=r,ft.transition=n,ae=t,(ae&6)===0&&Qt()}}function Yl(){lt=Wn.current,Se(Wn)}function mn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ap(n)),ze!==null)for(n=ze.return;n!==null;){var r=n;switch(ol(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&go();break;case 3:Un(),Se(Ke),Se(Be),yl();break;case 5:ml(r);break;case 4:Un();break;case 13:Se(Ce);break;case 19:Se(Ce);break;case 10:cl(r.type._context);break;case 22:case 23:Yl()}n=n.return}if(Me=e,ze=e=tn(e.current,null),He=lt=t,Oe=0,zr=null,Bl=Fo=pn=0,Xe=Dr=null,cn!==null){for(t=0;t<cn.length;t++)if(n=cn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var c=i.next;i.next=s,r.next=c}n.pending=r}cn=null}return e}function pc(e,t){do{var n=ze;try{if(ul(),$o.current=Lo,To){for(var r=$e.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}To=!1}if(fn=0,Ie=De=$e=null,Cr=!1,$r=0,Hl.current=null,n===null||n.return===null){Oe=1,zr=t,ze=null;break}e:{var i=e,c=n.return,m=n,y=t;if(t=He,m.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var N=y,R=m,z=R.tag;if((R.mode&1)===0&&(z===0||z===11||z===15)){var P=R.alternate;P?(R.updateQueue=P.updateQueue,R.memoizedState=P.memoizedState,R.lanes=P.lanes):(R.updateQueue=null,R.memoizedState=null)}var U=Au(c);if(U!==null){U.flags&=-257,Fu(U,c,m,i,t),U.mode&1&&Mu(i,N,t),t=U,y=N;var W=t.updateQueue;if(W===null){var V=new Set;V.add(y),t.updateQueue=V}else W.add(y);break e}else{if((t&1)===0){Mu(i,N,t),Gl();break e}y=Error(a(426))}}else if(je&&m.mode&1){var Re=Au(c);if(Re!==null){(Re.flags&65536)===0&&(Re.flags|=256),Fu(Re,c,m,i,t),il(Hn(y,m));break e}}i=y=Hn(y,m),Oe!==4&&(Oe=2),Dr===null?Dr=[i]:Dr.push(i),i=c;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=Ou(i,y,t);au(i,x);break e;case 1:m=y;var w=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Xt===null||!Xt.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var O=Iu(i,m,t);au(i,O);break e}}i=i.return}while(i!==null)}gc(n)}catch(b){t=b,ze===n&&n!==null&&(ze=n=n.return);continue}break}while(!0)}function hc(){var e=Ao.current;return Ao.current=Lo,e===null?Lo:e}function Gl(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Me===null||(pn&268435455)===0&&(Fo&268435455)===0||en(Me,He)}function bo(e,t){var n=ae;ae|=2;var r=hc();(Me!==e||He!==t)&&(It=null,mn(e,t));do try{uh();break}catch(s){pc(e,s)}while(!0);if(ul(),ae=n,Ao.current=r,ze!==null)throw Error(a(261));return Me=null,He=0,Oe}function uh(){for(;ze!==null;)mc(ze)}function ch(){for(;ze!==null&&!Of();)mc(ze)}function mc(e){var t=wc(e.alternate,e,lt);e.memoizedProps=e.pendingProps,t===null?gc(e):ze=t,Hl.current=null}function gc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=nh(n,t,lt),n!==null){ze=n;return}}else{if(n=rh(n,t),n!==null){n.flags&=32767,ze=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,ze=null;return}}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);Oe===0&&(Oe=5)}function gn(e,t,n){var r=he,s=ft.transition;try{ft.transition=null,he=1,dh(e,t,n,r)}finally{ft.transition=s,he=r}return null}function dh(e,t,n,r){do bn();while(Zt!==null);if((ae&6)!==0)throw Error(a(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(bf(e,i),e===Me&&(ze=Me=null,He=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ho||(Ho=!0,kc(Kr,function(){return bn(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=ft.transition,ft.transition=null;var c=he;he=1;var m=ae;ae|=4,Hl.current=null,sh(e,n),lc(n,e),Rp(Gs),to=!!Ys,Gs=Ys=null,e.current=n,lh(n),If(),ae=m,he=c,ft.transition=i}else e.current=n;if(Ho&&(Ho=!1,Zt=e,Bo=s),i=e.pendingLanes,i===0&&(Xt=null),Ff(n.stateNode),Ze(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Uo)throw Uo=!1,e=Vl,Vl=null,e;return(Bo&1)!==0&&e.tag!==0&&bn(),i=e.pendingLanes,(i&1)!==0?e===bl?Or++:(Or=0,bl=e):Or=0,Qt(),null}function bn(){if(Zt!==null){var e=oa(Bo),t=ft.transition,n=he;try{if(ft.transition=null,he=16>e?16:e,Zt===null)var r=!1;else{if(e=Zt,Zt=null,Bo=0,(ae&6)!==0)throw Error(a(331));var s=ae;for(ae|=4,B=e.current;B!==null;){var i=B,c=i.child;if((B.flags&16)!==0){var m=i.deletions;if(m!==null){for(var y=0;y<m.length;y++){var N=m[y];for(B=N;B!==null;){var R=B;switch(R.tag){case 0:case 11:case 15:Lr(8,R,i)}var z=R.child;if(z!==null)z.return=R,B=z;else for(;B!==null;){R=B;var P=R.sibling,U=R.return;if(tc(R),R===N){B=null;break}if(P!==null){P.return=U,B=P;break}B=U}}}var W=i.alternate;if(W!==null){var V=W.child;if(V!==null){W.child=null;do{var Re=V.sibling;V.sibling=null,V=Re}while(V!==null)}}B=i}}if((i.subtreeFlags&2064)!==0&&c!==null)c.return=i,B=c;else e:for(;B!==null;){if(i=B,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Lr(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,B=x;break e}B=i.return}}var w=e.current;for(B=w;B!==null;){c=B;var S=c.child;if((c.subtreeFlags&2064)!==0&&S!==null)S.return=c,B=S;else e:for(c=w;B!==null;){if(m=B,(m.flags&2048)!==0)try{switch(m.tag){case 0:case 11:case 15:Mo(9,m)}}catch(b){Te(m,m.return,b)}if(m===c){B=null;break e}var O=m.sibling;if(O!==null){O.return=m.return,B=O;break e}B=m.return}}if(ae=s,Qt(),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Yr,e)}catch{}r=!0}return r}finally{he=n,ft.transition=t}}return!1}function yc(e,t,n){t=Hn(n,t),t=Ou(e,t,1),e=Yt(e,t,1),t=Qe(),e!==null&&(sr(e,1,t),Ze(e,t))}function Te(e,t,n){if(e.tag===3)yc(e,e,n);else for(;t!==null;){if(t.tag===3){yc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xt===null||!Xt.has(r))){e=Hn(n,e),e=Iu(t,e,1),t=Yt(t,e,1),e=Qe(),t!==null&&(sr(t,1,e),Ze(t,e));break}}t=t.return}}function fh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qe(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(He&n)===n&&(Oe===4||Oe===3&&(He&130023424)===He&&500>Pe()-Wl?mn(e,0):Bl|=n),Ze(e,t)}function vc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xr,Xr<<=1,(Xr&130023424)===0&&(Xr=4194304)));var n=Qe();e=zt(e,t),e!==null&&(sr(e,t,n),Ze(e,n))}function ph(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vc(e,n)}function hh(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}r!==null&&r.delete(t),vc(e,n)}var wc;wc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ge=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ge=!1,th(e,t,n);Ge=(e.flags&131072)!==0}else Ge=!1,je&&(t.flags&1048576)!==0&&Za(t,ko,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Oo(e,t),e=t.pendingProps;var s=zn(t,Be.current);Fn(t,n),s=kl(null,t,r,e,s,n);var i=xl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(i=!0,yo(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,pl(t),s.updater=zo,t.stateNode=s,s._reactInternals=t,Cl(t,r,e,n),t=Rl(null,t,r,!0,i,n)):(t.tag=0,je&&i&&rl(t),qe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Oo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=gh(r),e=yt(r,e),s){case 0:t=Pl(null,t,r,e,n);break e;case 1:t=bu(null,t,r,e,n);break e;case 11:t=Uu(null,t,r,e,n);break e;case 14:t=Hu(null,t,r,yt(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Pl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),bu(e,t,r,s,n);case 3:e:{if(qu(t),e===null)throw Error(a(387));r=t.pendingProps,i=t.memoizedState,s=i.element,iu(e,t),Eo(t,r,null,n);var c=t.memoizedState;if(r=c.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Hn(Error(a(423)),t),t=Qu(e,t,r,n,s);break e}else if(r!==s){s=Hn(Error(a(424)),t),t=Qu(e,t,r,n,s);break e}else for(st=Vt(t.stateNode.containerInfo.firstChild),ot=t,je=!0,gt=null,n=su(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(In(),r===s){t=Ot(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return cu(t),e===null&&ll(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,c=s.children,Xs(r,s)?c=null:i!==null&&Xs(r,i)&&(t.flags|=32),Vu(e,t),qe(e,t,c,n),t.child;case 6:return e===null&&ll(t),null;case 13:return Ku(e,t,n);case 4:return hl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Mn(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Uu(e,t,r,s,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,c=s.value,we(No,r._currentValue),r._currentValue=c,i!==null)if(mt(i.value,c)){if(i.children===s.children&&!Ke.current){t=Ot(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var m=i.dependencies;if(m!==null){c=i.child;for(var y=m.firstContext;y!==null;){if(y.context===r){if(i.tag===1){y=Dt(-1,n&-n),y.tag=2;var N=i.updateQueue;if(N!==null){N=N.shared;var R=N.pending;R===null?y.next=y:(y.next=R.next,R.next=y),N.pending=y}}i.lanes|=n,y=i.alternate,y!==null&&(y.lanes|=n),dl(i.return,n,t),m.lanes|=n;break}y=y.next}}else if(i.tag===10)c=i.type===t.type?null:i.child;else if(i.tag===18){if(c=i.return,c===null)throw Error(a(341));c.lanes|=n,m=c.alternate,m!==null&&(m.lanes|=n),dl(c,n,t),c=i.sibling}else c=i.child;if(c!==null)c.return=i;else for(c=i;c!==null;){if(c===t){c=null;break}if(i=c.sibling,i!==null){i.return=c.return,c=i;break}c=c.return}i=c}qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Fn(t,n),s=ct(s),r=r(s),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,s=yt(r,t.pendingProps),s=yt(r.type,s),Hu(e,t,r,s,n);case 15:return Bu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:yt(r,s),Oo(e,t),t.tag=1,Ye(r)?(e=!0,yo(t)):e=!1,Fn(t,n),zu(t,r,s),Cl(t,r,s,n),Rl(null,t,r,!0,e,n);case 19:return Gu(e,t,n);case 22:return Wu(e,t,n)}throw Error(a(156,t.tag))};function kc(e,t){return Ji(e,t)}function mh(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,n,r){return new mh(e,t,n,r)}function Xl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gh(e){if(typeof e=="function")return Xl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===I)return 11;if(e===Fe)return 14}return 2}function tn(e,t){var n=e.alternate;return n===null?(n=pt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qo(e,t,n,r,s,i){var c=2;if(r=e,typeof e=="function")Xl(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case q:return yn(n.children,s,i,t);case Y:c=8,s|=8;break;case ie:return e=pt(12,n,t,s|2),e.elementType=ie,e.lanes=i,e;case re:return e=pt(13,n,t,s),e.elementType=re,e.lanes=i,e;case me:return e=pt(19,n,t,s),e.elementType=me,e.lanes=i,e;case ye:return Qo(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ne:c=10;break e;case tt:c=9;break e;case I:c=11;break e;case Fe:c=14;break e;case Le:c=16,r=null;break e}throw Error(a(130,e==null?e:typeof e,""))}return t=pt(c,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function yn(e,t,n,r){return e=pt(7,e,r,t),e.lanes=n,e}function Qo(e,t,n,r){return e=pt(22,e,r,t),e.elementType=ye,e.lanes=n,e.stateNode={isHidden:!1},e}function Zl(e,t,n){return e=pt(6,e,null,t),e.lanes=n,e}function Jl(e,t,n){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yh(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Es(0),this.expirationTimes=Es(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Es(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ei(e,t,n,r,s,i,c,m,y){return e=new yh(e,t,n,m,y),t===1?(t=1,i===!0&&(t|=8)):t=0,i=pt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pl(i),e}function vh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ue,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function xc(e){if(!e)return qt;e=e._reactInternals;e:{if(on(e)!==e||e.tag!==1)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(a(171))}if(e.tag===1){var n=e.type;if(Ye(n))return Ya(e,n,t)}return t}function Sc(e,t,n,r,s,i,c,m,y){return e=ei(n,r,!0,e,s,i,c,m,y),e.context=xc(null),n=e.current,r=Qe(),s=Jt(n),i=Dt(r,s),i.callback=t??null,Yt(n,i,s),e.current.lanes=s,sr(e,s,r),Ze(e,r),e}function Ko(e,t,n,r){var s=t.current,i=Qe(),c=Jt(s);return n=xc(n),t.context===null?t.context=n:t.pendingContext=n,t=Dt(i,c),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Yt(s,t,c),e!==null&&(kt(e,s,c,i),jo(e,s,c)),c}function Yo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ti(e,t){Nc(e,t),(e=e.alternate)&&Nc(e,t)}function wh(){return null}var _c=typeof reportError=="function"?reportError:function(e){console.error(e)};function ni(e){this._internalRoot=e}Go.prototype.render=ni.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));Ko(e,t,null,null)},Go.prototype.unmount=ni.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hn(function(){Ko(null,e,null,null)}),t[Tt]=null}};function Go(e){this._internalRoot=e}Go.prototype.unstable_scheduleHydration=function(e){if(e){var t=ia();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ht.length&&t!==0&&t<Ht[n].priority;n++);Ht.splice(n,0,e),n===0&&ca(e)}};function ri(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jc(){}function kh(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var N=Yo(c);i.call(N)}}var c=Sc(t,r,e,0,null,!1,!1,"",jc);return e._reactRootContainer=c,e[Tt]=c.current,wr(e.nodeType===8?e.parentNode:e),hn(),c}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var m=r;r=function(){var N=Yo(y);m.call(N)}}var y=ei(e,0,!1,null,null,!1,!1,"",jc);return e._reactRootContainer=y,e[Tt]=y.current,wr(e.nodeType===8?e.parentNode:e),hn(function(){Ko(t,y,n,r)}),y}function Zo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var c=i;if(typeof s=="function"){var m=s;s=function(){var y=Yo(c);m.call(y)}}Ko(t,c,e,s)}else c=kh(n,t,e,s,r);return Yo(c)}sa=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=or(t.pendingLanes);n!==0&&(Cs(t,n|1),Ze(t,Pe()),(ae&6)===0&&(Vn=Pe()+500,Qt()))}break;case 13:hn(function(){var r=zt(e,1);if(r!==null){var s=Qe();kt(r,e,1,s)}}),ti(e,1)}},$s=function(e){if(e.tag===13){var t=zt(e,134217728);if(t!==null){var n=Qe();kt(t,e,134217728,n)}ti(e,134217728)}},la=function(e){if(e.tag===13){var t=Jt(e),n=zt(e,t);if(n!==null){var r=Qe();kt(n,e,t,r)}ti(e,t)}},ia=function(){return he},aa=function(e,t){var n=he;try{return he=e,t()}finally{he=n}},ks=function(e,t,n){switch(t){case"input":if(fs(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=mo(r);if(!s)throw Error(a(90));Li(r),fs(r,s)}}}break;case"textarea":Mi(e,n);break;case"select":t=n.value,t!=null&&xn(e,!!n.multiple,t,!1)}},qi=Kl,Qi=hn;var xh={usingClientEntryPoint:!1,Events:[Sr,Rn,mo,Vi,bi,Kl]},Ir={findFiberByHostInstance:sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sh={bundleType:Ir.bundleType,version:Ir.version,rendererPackageName:Ir.rendererPackageName,rendererConfig:Ir.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Xi(e),e===null?null:e.stateNode},findFiberByHostInstance:Ir.findFiberByHostInstance||wh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jo.isDisabled&&Jo.supportsFiber)try{Yr=Jo.inject(Sh),Nt=Jo}catch{}}return Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xh,Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ri(t))throw Error(a(200));return vh(e,t,null,n)},Je.createRoot=function(e,t){if(!ri(e))throw Error(a(299));var n=!1,r="",s=_c;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ei(e,1,!1,null,null,n,!1,r,s),e[Tt]=t.current,wr(e.nodeType===8?e.parentNode:e),new ni(t)},Je.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=Xi(t),e=e===null?null:e.stateNode,e},Je.flushSync=function(e){return hn(e)},Je.hydrate=function(e,t,n){if(!Xo(t))throw Error(a(200));return Zo(null,e,t,!0,n)},Je.hydrateRoot=function(e,t,n){if(!ri(e))throw Error(a(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",c=_c;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),t=Sc(t,null,e,1,n??null,s,!1,i,c),e[Tt]=t.current,wr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Go(t)},Je.render=function(e,t,n){if(!Xo(t))throw Error(a(200));return Zo(null,e,t,!1,n)},Je.unmountComponentAtNode=function(e){if(!Xo(e))throw Error(a(40));return e._reactRootContainer?(hn(function(){Zo(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},Je.unstable_batchedUpdates=Kl,Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xo(n))throw Error(a(200));if(e==null||e._reactInternals===void 0)throw Error(a(38));return Zo(e,t,n,!1,r)},Je.version="18.3.1-next-f1338f8080-20240426",Je}var zc;function sd(){if(zc)return li.exports;zc=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(l){console.error(l)}}return o(),li.exports=Th(),li.exports}var Dc;function Ph(){if(Dc)return es;Dc=1;var o=sd();return es.createRoot=o.createRoot,es.hydrateRoot=o.hydrateRoot,es}var Rh=Ph();const Lh=(function(){const l=typeof document<"u"&&document.createElement("link").relList;return l&&l.supports&&l.supports("modulepreload")?"modulepreload":"preload"})(),zh=function(o){return"/"+o},Oc={},as=function(l,a,u){let f=Promise.resolve();if(a&&a.length>0){let h=function(j){return Promise.all(j.map(E=>Promise.resolve(E).then($=>({status:"fulfilled",value:$}),$=>({status:"rejected",reason:$}))))};document.getElementsByTagName("link");const g=document.querySelector("meta[property=csp-nonce]"),v=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));f=h(a.map(j=>{if(j=zh(j),j in Oc)return;Oc[j]=!0;const E=j.endsWith(".css"),$=E?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${$}`))return;const C=document.createElement("link");if(C.rel=E?"stylesheet":Lh,E||(C.as="script"),C.crossOrigin="",C.href=j,v&&C.setAttribute("nonce",v),document.head.appendChild(C),E)return new Promise((L,_)=>{C.addEventListener("load",L),C.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${j}`)))})}))}function p(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return f.then(h=>{for(const g of h||[])g.status==="rejected"&&p(g.reason);return l().catch(p)})},ld="caddis-hub-tab",Dh="X-Caddis-Hub-Tab",Oh="X-CSRF-Token";class mi extends Error{constructor(l,a){super(a),this.status=l}}function id(){try{return window.localStorage}catch{return null}}let gi=null;function Ih(o=window.location,l=window.history,a=id()){const u=/(?:^#|&)tab=([^&]+)/.exec(o.hash);if(!(u!=null&&u[1]))return;let f;try{f=decodeURIComponent(u[1])}catch{return}gi=f;try{a==null||a.setItem(ld,f)}catch{}l.replaceState(null,"",o.pathname+o.search)}function ad(o=id()){try{return(o==null?void 0:o.getItem(ld))||gi}catch{return gi}}function ud(o,l){const a={Accept:"application/json"};return o&&(a[Dh]=o),l&&(a[Oh]=l),a}async function Ni(o){const l=ad();if(!l)throw new mi(401,"no tab token");const a=await fetch(o,{headers:ud(l),credentials:"same-origin",cache:"no-store"});if(!a.ok)throw new mi(a.status,`${o} answered ${a.status}`);return await a.json()}const Mh=()=>Ni("/api/session"),Ah=()=>Ni("/api/state"),Fh=(o,l,a)=>Ni("/api/plan-phase?repo="+encodeURIComponent(o)+"&plan="+encodeURIComponent(l)+"&key="+encodeURIComponent(a));let os=null;async function Uh(){return os||(os=(await Mh()).csrf_token),os}async function Hh(o){const l=ad();if(!l)return{ok:!1,status:401,error:"unauthorized",reason:"Signed out. Run caddis hub open."};const a=async()=>fetch("/api/actions",{method:"POST",headers:{...ud(l,await Uh()),"Content-Type":"application/json"},body:JSON.stringify(o),credentials:"same-origin",cache:"no-store"});try{let u=await a();u.status===403&&(os=null,u=await a());const f=await u.json().catch(()=>({}));return u.status===202&&f.request&&typeof f.request=="object"?{ok:!0,request:f.request}:{ok:!1,status:u.status,error:typeof f.error=="string"?f.error:"failed",reason:typeof f.reason=="string"?f.reason:`The hub answered ${u.status}.`}}catch{return{ok:!1,status:0,error:"network",reason:"The hub did not answer."}}}function Bh(o){const[l,a]=D.useState({}),u=(p,h)=>a(g=>({...g,[p]:h})),f=D.useCallback(p=>{u(p.key,{status:"sending",reason:null,requestId:null,at:Date.now()}),Hh(p.body).then(h=>{h.ok?u(p.key,{status:"sent",reason:null,requestId:h.request.id,at:Date.now()}):u(p.key,{status:"refused",reason:h.reason,requestId:null,at:Date.now()}),o()})},[o]);return{local:l,run:f}}/**
42
- * @license lucide-react v1.61.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const Wh=o=>o==null?void 0:o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
47
- * @license lucide-react v1.61.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */function Vh(o,l,a=[]){if(l==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Wh(o),size:24,node:l,...a.length>0?{aliases:a}:{}}}/**
52
- * @license lucide-react v1.61.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const bh=o=>{let l="",a=!1;for(const u of o){if(u==="-"||u==="_"||u<=" "){a=l.length>0;continue}l.length===0?l+=u.toLowerCase():l+=a?u.toUpperCase():u,a=!1}return l};/**
57
- * @license lucide-react v1.61.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const qh=o=>{const l=bh(o);return l.charAt(0).toUpperCase()+l.slice(1)};/**
62
- * @license lucide-react v1.61.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const yi=(...o)=>o.filter((l,a,u)=>!!l&&l.trim()!==""&&u.indexOf(l)===a).join(" ").trim();/**
67
- * @license lucide-react v1.61.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const vn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
72
- * @license lucide-react v1.61.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */function ui(o){return o!=null}function Qh(o,l={}){var C,L;const a=l.attributeNames??{},u=_=>a[_]??_,f=o.size??o.width??vn.width,p=o.size??o.height??vn.height,h=((C=o.aliases)==null?void 0:C.filter(_=>typeof _=="string"&&_.trim()!=="").map(_=>`lucide-${_}`))??[],g=[...o.name?[`lucide-${o.name}`]:[],...h],v=((L=l.className)==null?void 0:L.split(" ").filter(Boolean))??[],j=l.includeDefaultClasses===!1?yi(...v):yi("lucide",...g,...v),E=l.absoluteStrokeWidth?Number(l.strokeWidth??vn["stroke-width"])*Number(o.size??o.width??vn.width)/Number(l.size??l.width??vn.width):l.strokeWidth??vn["stroke-width"];return["svg",{...Object.entries(vn).reduce((_,[F,M])=>(_[u(F)]=M,_),{}),..."color"in l&&l.color&&{[u("stroke")]:l.color},..."size"in l&&ui(l.size)&&{[u("width")]:l.size,[u("height")]:l.size},..."width"in l&&ui(l.width)&&{[u("width")]:l.width},..."height"in l&&ui(l.height)&&{[u("height")]:l.height},[u("stroke-width")]:E,...j&&{[u("class")]:j},[u("viewBox")]:`0 0 ${f} ${p}`,...l.hasA11yProp===!1?{[u("aria-hidden")]:"true"}:{},..."attributes"in l&&l.attributes},o.node.map(_=>{const[F,M,te]=_,X=l.nonScalingStroke?{[u("vector-effect")]:"non-scaling-stroke",...M}:M;return te?[F,X,te]:[F,X]})]}/**
77
- * @license lucide-react v1.61.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */function Kh(o,l={}){return Qh(o,{...l,attributeNames:{...l.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
82
- * @license lucide-react v1.61.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const Yh=o=>{for(const l in o)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},Gh=D.createContext({}),Xh=()=>D.useContext(Gh),Zh=D.forwardRef(({color:o,size:l,width:a,height:u,strokeWidth:f,absoluteStrokeWidth:p,nonScalingStroke:h,className:g="",children:v,iconNode:j=[],icon:E={node:j,aliases:[],size:24},...$},C)=>{const{size:L=24,strokeWidth:_=2,absoluteStrokeWidth:F=!1,nonScalingStroke:M=!1,color:te="currentColor",className:X=""}=Xh()??{},ke=!!v||Yh($),[J,se,ue=[]]=Kh(E,{color:o??te,width:a??l??L,height:u??l??L,strokeWidth:f??_,absoluteStrokeWidth:p??F,nonScalingStroke:h??M,className:yi(X,g),hasA11yProp:ke,attributes:$});return D.createElement(J,{ref:C,...se},[...ue.map(([q,Y])=>D.createElement(q,Y)),...Array.isArray(v)?v:[v]])});/**
87
- * @license lucide-react v1.61.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */function ge(o,l=[],a=[]){const u=typeof o=="string"?Vh(o,l,a):o,f=D.forwardRef(({className:p,...h},g)=>D.createElement(Zh,{ref:g,icon:u,className:p,...h}));return u.name&&(f.displayName=qh(u.name)),f}/**
92
- * @license lucide-react v1.61.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const cd={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};cd.node;const Jh=ge(cd);/**
97
- * @license lucide-react v1.61.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const dd={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};dd.node;const em=ge(dd);/**
102
- * @license lucide-react v1.61.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const fd={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};fd.node;const tm=ge(fd);/**
107
- * @license lucide-react v1.61.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const pd={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};pd.node;const nm=ge(pd);/**
112
- * @license lucide-react v1.61.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const hd={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};hd.node;const rm=ge(hd);/**
117
- * @license lucide-react v1.61.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const md={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};md.node;const us=ge(md);/**
122
- * @license lucide-react v1.61.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const gd={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};gd.node;const om=ge(gd);/**
127
- * @license lucide-react v1.61.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const yd={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};yd.node;const _i=ge(yd);/**
132
- * @license lucide-react v1.61.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const vd={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};vd.node;const sm=ge(vd);/**
137
- * @license lucide-react v1.61.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const wd={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};wd.node;const lm=ge(wd);/**
142
- * @license lucide-react v1.61.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const kd={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};kd.node;const im=ge(kd);/**
147
- * @license lucide-react v1.61.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const xd={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};xd.node;const am=ge(xd);/**
152
- * @license lucide-react v1.61.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const Sd={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Sd.node;const um=ge(Sd);/**
157
- * @license lucide-react v1.61.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const Nd={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};Nd.node;const cm=ge(Nd);/**
162
- * @license lucide-react v1.61.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const _d={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};_d.node;const dm=ge(_d);/**
167
- * @license lucide-react v1.61.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */const jd={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};jd.node;const fm=ge(jd);/**
172
- * @license lucide-react v1.61.0 - ISC
173
- *
174
- * This source code is licensed under the ISC license.
175
- * See the LICENSE file in the root directory of this source tree.
176
- */const Ed={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};Ed.node;const pm=ge(Ed);/**
177
- * @license lucide-react v1.61.0 - ISC
178
- *
179
- * This source code is licensed under the ISC license.
180
- * See the LICENSE file in the root directory of this source tree.
181
- */const Cd={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};Cd.node;const hm=ge(Cd);/**
182
- * @license lucide-react v1.61.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */const $d={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};$d.node;const mm=ge($d);/**
187
- * @license lucide-react v1.61.0 - ISC
188
- *
189
- * This source code is licensed under the ISC license.
190
- * See the LICENSE file in the root directory of this source tree.
191
- */const Td={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};Td.node;const gm=ge(Td);/**
192
- * @license lucide-react v1.61.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */const Pd={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Pd.node;const ym=ge(Pd);/**
197
- * @license lucide-react v1.61.0 - ISC
198
- *
199
- * This source code is licensed under the ISC license.
200
- * See the LICENSE file in the root directory of this source tree.
201
- */const Rd={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};Rd.node;const vm=ge(Rd);/**
202
- * @license lucide-react v1.61.0 - ISC
203
- *
204
- * This source code is licensed under the ISC license.
205
- * See the LICENSE file in the root directory of this source tree.
206
- */const Ld={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};Ld.node;const wm=ge(Ld);/**
207
- * @license lucide-react v1.61.0 - ISC
208
- *
209
- * This source code is licensed under the ISC license.
210
- * See the LICENSE file in the root directory of this source tree.
211
- */const zd={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};zd.node;const Dd=ge(zd);/**
212
- * @license lucide-react v1.61.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */const Od={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};Od.node;const Id=ge(Od);/**
217
- * @license lucide-react v1.61.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- */const Md={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};Md.node;const km=ge(Md);/**
222
- * @license lucide-react v1.61.0 - ISC
223
- *
224
- * This source code is licensed under the ISC license.
225
- * See the LICENSE file in the root directory of this source tree.
226
- */const Ad={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Ad.node;const xm=ge(Ad),ji={hotfix:"Mark hotfix",unhotfix:"Unmark hotfix",hold:"Hold",release:"Release",approve:"Approve",decline:"Decline"},ss={hotfix:"hotfix",unhotfix:"hotfix",hold:"hold",release:"hold",approve:"approve",decline:"approve"},Fd=o=>o.repo_id??null,Ud=(o,l,a)=>`${o}:${ss[l]}:${a}`;function Hd(o,l){const a=Fd(o),u=Wd(o,l.pr)??l.headSha;if(!a||!u)return[];const f=p=>({key:Ud(a,p,l.pr),label:ji[p],body:{repo_id:a,action:p,pr:l.pr,head_sha:u}});return[f(l.hotfix?"unhotfix":"hotfix"),f(l.held?"release":"hold")]}function Bd(o,l){const a=Fd(o);if(!a)return[];const u=l.pr!==null?Wd(o,l.pr)??l.head_sha:null;return["approve","decline"].map(f=>({key:Ud(a,f,l.what),label:ji[f],body:{repo_id:a,action:f,pr:l.pr,head_sha:u,what:l.what}}))}function Wd(o,l){var a,u,f;return((f=(u=(a=o.github)==null?void 0:a.prs)==null?void 0:u.find(p=>p.number===l))==null?void 0:f.head_sha)??null}function Vd(o){return o.actions?o.actions.enabled?null:o.actions.reason??"Actions need a live coordinator.":"Actions need a live coordinator."}function bd(o,l){var f;const a=Vd(o);return a||l.pr===null?a:(((f=o.coordinator)==null?void 0:f.queue)??[]).some(p=>(p==null?void 0:p.pr)===l.pr)?null:`PR #${l.pr} is not in the coordinator queue.`}function Sm(o,l){var f;const a=((f=o.coordinator)==null?void 0:f.requests)??[],u=ss[l.body.action];for(let p=a.length-1;p>=0;p--){const h=a[p],g=h.action;if(!(!(g in ss)||ss[g]!==u)&&(l.body.what!==void 0?h.what===l.body.what&&h.pr===l.body.pr:h.pr===l.body.pr))return h}return null}function qd(o){const l=ji[o.action]??o.action;switch(o.status){case"requested":return`${l}: requested. Waiting for the coordinator.`;case"done":return`${l}: done.`;case"rejected":return`${l}: rejected${o.reason?`: ${o.reason}`:""}.`;case"expired":return`${l}: expired before the coordinator read it.`;case"not_picked_up":return`${l}: not picked up. The coordinator has not read requests for 2 min.`}}const Qd=o=>o==="done"?"good":o==="requested"?"muted":o==="not_picked_up"?"warn":"bad";function Nm(o,l,a){const u=Sm(o,l);return(a==null?void 0:a.status)==="sending"?{text:`${l.label}: sending...`,tone:"muted"}:(a==null?void 0:a.status)==="refused"?{text:`${l.label}: refused. ${a.reason??""}`.trim(),tone:"bad"}:(a==null?void 0:a.status)==="sent"&&(!u||u.id!==a.requestId)?{text:`${l.label}: requested. Waiting for the coordinator.`,tone:"muted"}:u?{text:qd(u),tone:Qd(u.status)}:null}function Ei({repo:o,specs:l,act:a,compact:u=!1,reason:f}){if(l.length===0)return null;const p=f!==void 0?f:Vd(o),h=new Set,g=[];for(const v of l){if(h.has(v.key))continue;h.add(v.key);const j=Nm(o,v,a.local[v.key]);j&&g.push({key:v.key,...j})}return d.jsxs("div",{className:`action-row${u?" compact":""}`,"data-testid":"actions",children:[d.jsx("div",{className:"action-buttons",children:l.map(v=>{var j;return d.jsx("button",{type:"button",className:"btn btn-act",disabled:p!==null||((j=a.local[v.key])==null?void 0:j.status)==="sending",title:p??void 0,onClick:()=>a.run(v),"data-testid":`act-${v.body.action}`,children:v.label},`${v.key}:${v.body.action}`)})}),p&&!u&&d.jsx("span",{className:"action-reason","data-testid":"action-reason",children:p}),g.map(v=>d.jsx("span",{className:`request-status tone-${v.tone}`,"data-testid":"request-status",role:"status",children:v.text},v.key))]})}function Kd({item:o}){const l=o.recommendation,a=o.from?`from ${o.from}`:o.source==="coordinator"?"from the coordinator":"from the asking session";return d.jsxs("div",{className:"detail-block recommendation","data-testid":"recommendation",children:[d.jsxs("span",{className:"detail-label",children:["Recommendation, ",a]}),l?d.jsxs(d.Fragment,{children:[d.jsxs("span",{children:[d.jsx("strong",{className:`rec-${l.decision}`,children:l.decision==="approve"?"Approve":"Hold"}),l.reason?`: ${l.reason}`:""]}),l.evidence&&d.jsxs("span",{className:"rec-evidence",children:["Evidence: ",l.evidence]})]}):d.jsx("span",{children:"No recommendation was recorded. Read the source before you decide."}),d.jsx("span",{className:"rec-note",children:"A recommendation is not an approval. Only your click approves."})]})}function Yd(o){var l,a;try{(a=(l=navigator.clipboard)==null?void 0:l.writeText(o))==null||a.catch(()=>{})}catch{}}async function Jy(o){var l;try{return(l=navigator.clipboard)!=null&&l.writeText?(await navigator.clipboard.writeText(o),!0):!1}catch{return!1}}const Ic="caddis hub";function _m(o){return o>0?`(${o}) ${Ic}`:Ic}function xt(o,l){if(!o)return"unknown";const a=Date.parse(o);if(Number.isNaN(a))return"unknown";const u=Math.max(0,Math.round((l-a)/1e3));if(u<5)return"just now";if(u<60)return`${u} s ago`;const f=Math.floor(u/60);if(f<60)return`${f} min ago`;const p=Math.floor(f/60);return p<24?`${p} h ago`:`${Math.floor(p/24)} d ago`}const jm=(o,l)=>`Updated ${xt(o,l)}`;function Fr(o){if(!o)return"unknown";const l=new Date(o);return Number.isNaN(l.getTime())?"unknown":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Em=300;function Cm(o){const l=Number(o==null?void 0:o.advise_eur),a=Number(o==null?void 0:o.committed_eur),u=Number.isFinite(l)&&l>0?l:Em,f=Number.isFinite(a)?a:0;return{committedEur:f,adviseEur:u,advisory:(o==null?void 0:o.advisory)===!0||f>=u,pct:Math.min(100,Math.max(0,f/u*100))}}const $m=o=>Number.isInteger(o)?String(o):o.toFixed(2),Gd=o=>Object.values(o.sources??{}).some(l=>!l.ok||l.stale),Tm=500;function Xd(o){const l=o==null?void 0:o.github_rate;if(!l||typeof l!="object")return null;let a=null;for(const[u,f]of Object.entries(l)){const p=f,h=typeof(p==null?void 0:p.remaining)=="number"&&Number.isFinite(p.remaining)?p.remaining:NaN;Number.isNaN(h)||(!a||h<a.remaining)&&(a={account:u,remaining:h,resetAt:typeof(p==null?void 0:p.reset_at)=="string"?p.reset_at:null})}return a}function Pm(o){const l=Xd(o);return l&&l.remaining<Tm?l:null}const Rm=o=>o instanceof HTMLElement&&/^(INPUT|TEXTAREA|SELECT)$/.test(o.tagName),Mc={j:"next",J:"next",ArrowDown:"next",k:"prev",K:"prev",ArrowUp:"prev",Enter:"open",c:"copy",C:"copy"};function Lm(o,l,a,u){if(a||l.ctrl||l.meta||l.alt)return null;const f=Object.hasOwn(Mc,o)?Mc[o]:null;return f==="open"&&u?null:f}function zm(o,l,a){if(a<=0)return-1;const u=o==="next"?l+1:l-1;return Math.min(a-1,Math.max(0,u))}function Zd({page:o,head:l,stale:a,children:u}){return d.jsxs("header",{className:`page-head${a?" stale":""}`,"data-testid":"page-head","data-stale":a?"true":void 0,children:[d.jsxs("div",{className:"page-head-text",children:[d.jsx("h1",{className:"page-title page-eyebrow",children:o}),d.jsx("p",{className:"headline","data-testid":"headline",children:l.title}),d.jsx("p",{className:"headline-sub","data-testid":"headline-sub",children:l.sub})]}),u]})}var Dm=sd();const Om=150,Im=100,ts=8,ns=8;function Mm(o,l,a){const u=o.bottom+ts+l.height<=a.height-ns,f=o.top-ts-l.height>=ns,p=u||!f?"below":"above",h=p==="below"?o.bottom+ts:o.top-ts-l.height,g=Math.max(0,Math.min(h,a.height-l.height)),v=Math.max(0,a.width-l.width-ns),j=Math.max(ns,Math.min(o.left,v));return{top:g,left:Math.min(j,v),placement:p}}let qn=null;const Am=o=>o==null||o===!1||o==="";function vi({content:o,children:l}){const a=D.useId(),u=Am(o),[f,p]=D.useState(!1),[h,g]=D.useState(null),v=D.useRef(null),j=D.useRef(null),E=D.useRef(void 0),$=D.useCallback(()=>{window.clearTimeout(E.current),E.current=void 0},[]),C=D.useCallback(J=>{J&&(v.current=J),$(),E.current=window.setTimeout(()=>p(!0),Om)},[$]),L=D.useCallback(()=>{$(),E.current=window.setTimeout(()=>p(!1),Im)},[$]),_=D.useCallback(()=>{$(),p(!0)},[$]),F=f&&!u,M=D.useCallback(()=>{$(),p(!1)},[$]);D.useEffect(()=>{if(F)return qn&&qn!==M&&qn(),qn=M,()=>{qn===M&&(qn=null)}},[F,M]),D.useEffect(()=>$,[$]),D.useEffect(()=>{u&&($(),p(!1))},[u,$]),D.useEffect(()=>{if(!F)return;const J=se=>{se.key==="Escape"&&($(),p(!1))};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[F,$]);const te=D.useCallback(()=>{const J=v.current,se=j.current;if(!J||!se)return;const ue=se.getBoundingClientRect();g(Mm(J.getBoundingClientRect(),{width:ue.width,height:ue.height},{width:window.innerWidth,height:window.innerHeight}))},[]);if(D.useLayoutEffect(()=>{if(!F){g(null);return}return te(),window.addEventListener("resize",te),window.addEventListener("scroll",te,!0),()=>{window.removeEventListener("resize",te),window.removeEventListener("scroll",te,!0)}},[F,o,te]),u)return l;const X=l.props,ke=D.cloneElement(l,{onPointerEnter:J=>{var se;(se=X.onPointerEnter)==null||se.call(X,J),f?_():C(J.currentTarget)},onPointerLeave:J=>{var se;(se=X.onPointerLeave)==null||se.call(X,J),L()},onFocus:J=>{var se;(se=X.onFocus)==null||se.call(X,J),f?_():C(J.currentTarget)},onBlur:J=>{var se;(se=X.onBlur)==null||se.call(X,J),L()},"aria-describedby":F?a:X["aria-describedby"]});return d.jsxs(d.Fragment,{children:[ke,F&&Dm.createPortal(d.jsx("div",{ref:j,id:a,role:"tooltip",className:"tip","data-testid":"tip","data-placement":h==null?void 0:h.placement,style:{position:"fixed",top:(h==null?void 0:h.top)??0,left:(h==null?void 0:h.left)??0,visibility:h?"visible":"hidden"},onPointerEnter:_,onPointerLeave:L,children:o}),document.body)]})}function Jd(o,l,a){if(!o)return"unknown";const u=new Date(o);if(Number.isNaN(u.getTime()))return"unknown";try{return new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hourCycle:"h23",timeZone:a,timeZoneName:"short"}).format(u)}catch{return u.toISOString()}}const et=o=>Array.isArray(o)?o:[],Fm={todo:"to do","in-progress":"in progress",done:"done",moved:"moved",blocked:"blocked"},rn=new Set(["done","not-needed"]),ev="No roadmap or plan",tv="/caddis:roadmap";function nv(o){const l=o.also.length>0?`; also ${o.also.map(a=>`#${a}`).join(", ")}`:"";return`on branch (${o.draft?"draft ":""}PR #${o.pr}${l})`}const Ac=o=>typeof o=="number"&&Number.isInteger(o)&&o>0;function Um(o){const l=Ee(o);return Ac(l.pr)?{pr:l.pr,draft:l.draft===!0,also:et(l.also).filter(Ac)}:null}const rv=[{key:"todo",label:"To do"},{key:"in-progress",label:"In progress"},{key:"blocked",label:"Blocked"},{key:"done",label:"Done"}];function Hm(o){const l={todo:[],"in-progress":[],blocked:[],done:[]};for(const a of o.rows)l[a.state==="moved"?"done":a.state].push(a);return l}function ov(o){const l=Hm(o),a=o.rows.length,u=l.done.length;return{total:a,done:u,inProgress:l["in-progress"].length,blocked:l.blocked.length,todo:l.todo.length,pct:a===0?0:Math.round(u/a*100)}}function sv(o){let l=null;for(const a of o)a.open===0||a.rows.length===0||(!l||(a.changedAt??-1)>(l.changedAt??-1))&&(l=a);return l?l.path:null}const lv=10,Ee=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{},ee=o=>typeof o=="string"?o:"",Mt=o=>typeof o=="string"&&o?o:null,Ur=o=>typeof o=="number"&&Number.isInteger(o)?o:0,ef=new Set(["todo","in-progress","done","moved","blocked"]);function Ci(o,l){const a=o.github;return[...new Set(et(l).filter(u=>typeof u=="number"&&Number.isInteger(u)))].map(u=>{var h,g;const f=(h=a==null?void 0:a.prs)==null?void 0:h.find(v=>v.number===u),p=((g=a==null?void 0:a.merges)==null?void 0:g.some(v=>v.number===u))??!1;return{number:u,url:a!=null&&a.repo?`https://github.com/${a.repo}/pull/${u}`:null,stage:f?"in review":p?"merged":null,detail:f?`required checks ${f.required_state}`:null}})}function tf(o,l){const a=o.filter(u=>u.stage).map(u=>`#${u.number} ${u.stage}${u.detail?` (${u.detail})`:""}`);return a.length?a.join(", "):Fm[l]}function iv(o){return[o.model&&`model ${o.model}`,o.lane&&`lane ${o.lane.split(" ")[0]}`,o.risk&&`risk ${o.risk}`].filter(Boolean).join(" · ")}function Bm(o,l){const a=Ee(l),u=ee(a.ref),f=u.lastIndexOf("#"),p=ee(a.state),h=ef.has(ee(a.tile))?ee(a.tile):p==="done"?"done":"todo",g=ee(a.risk),v=Ci(o,a.prs);return{ref:u,plan:ee(a.plan)||(f>0?u.slice(0,f):""),num:Ur(a.num)||f>0&&Number(u.slice(f+1))||0,name:ee(a.name)||u,model:ee(a.model),lane:ee(a.lane),risk:g,highRisk:g.toLowerCase().includes("high"),tracker:ee(a.tracker),tile:h,prs:v,stage:tf(v,h)}}const Fc=(o,l)=>{const a=Ee(l);return{milestone:o,type:ee(a.type),reason:ee(a.reason),check:ee(a.check)}};function nf(o,l){return rn.has(o)?"done":l.some(a=>a.type==="owner-gate")?"wait":l.length||o==="blocked"?"block":o==="in-progress"?"prog":"todo"}const wn=o=>o==="done"||o==="moved";function Wm(o,l){const a=Ee(o),u=Ee(a.lock),f=Ee(a.stale_lock),p=Ee(a.last_stop);let h=null;return ee(p.reason)==="running"?h="running now":ee(p.reason)&&(h=`${ee(p.reason)}${p.exit!==void 0&&p.exit!==null?` (exit ${String(p.exit)})`:""}`),{running:Object.keys(u).length?{batch:String(u.batch??""),since:Mt(u.started_utc),host:Mt(u.host),pid:u.pid===void 0?null:String(u.pid)}:null,staleBatch:Object.keys(f).length?String(f.batch??""):null,lastStop:h,lastStopAt:Mt(p.utc),stopReason:ee(p.reason)||null,errors:et(a.errors).map(String),next:l}}function rf(o){const l=new Map(o.map(u=>[u.id,u.status])),a={now:[],next:[],later:[]};for(const u of o){if(rn.has(u.status))continue;const f=u.depends.every(p=>rn.has(l.get(p)??""));u.status==="in-progress"||f&&u.blockers.length===0?a.now.push(u):u.depends.some(p=>a.now.some(h=>h.id===p))?a.next.push(u):a.later.push(u)}return a}function Vm(o,l){const a=Ee(l),u=et(a.milestones).map(E=>{const $=Ee(E),C=ee($.id),L=et($.blockers).map(M=>Fc(C,M)),_=et($.phases).map(M=>Bm(o,M)),F=ee($.status);return{id:C,status:F,owner:ee($.owner)||"runner",target:Mt($.target),depends:et($.depends).map(String),phases:_,blockers:L,done:_.filter(M=>wn(M.tile)).length,total:_.length,tone:nf(F,L)}}),f=u.flatMap(E=>E.phases),p=Ee(a.next),h=Object.keys(p).length?`${ee(p.milestone)} ${ee(p.plan)}#${String(p.phase)}`:null,g=(et(a.lanes).length?et(a.lanes).map(String):[...new Set(f.map(E=>E.plan))]).map(E=>({plan:E,done:f.filter($=>$.plan===E&&wn($.tile)).length,total:f.filter($=>$.plan===E).length})),v=u.flatMap(E=>E.blockers),j=Array.isArray(a.waiting)?et(a.waiting).map(E=>Fc(ee(Ee(E).milestone),{...Ee(E),type:"owner-gate"})):u.filter(E=>!rn.has(E.status)).flatMap(E=>E.blockers.filter($=>$.type==="owner-gate"));return{slug:ee(a.roadmap),kind:"roadmap",branch:Mt(a.branch),originCommit:Mt(a.origin_commit),milestones:u,lanes:g,gates:j,blockers:v,kpis:{phasesDone:f.filter(E=>wn(E.tile)).length,phasesTotal:f.length,milestonesDone:Ur(a.done)||u.filter(E=>rn.has(E.status)).length,milestonesTotal:Ur(a.total)||u.length,inProgress:f.filter(E=>E.tile==="in-progress").map(E=>E.ref),highRisk:f.filter(E=>E.highRisk).length,next:h??"none ready"},board:rf(u),runner:Wm(a.runner,h),detailError:Mt(a.detail_error)}}const bm=o=>typeof o=="string"&&ef.has(o)?o:"todo",of=o=>{var l;return((l=o.trim().split(/\s+/)[0])==null?void 0:l.toLowerCase())??""};function $i(o){return(o.split("/").pop()??"").replace(/\.md$/,"")}function av(o,l){var E,$;const a=$i(l.path),u=[];let f=!1;for(const C of l.rows){const L=((E=C.milestone)==null?void 0:E.trim())||null;L?u.includes(L)||u.push(L):f=!0}(f||u.length===0)&&(u.includes("Phases")||u.push("Phases"));const p=new Map(u.map(C=>[C,[]])),h=l.rows.map((C,L)=>{var J,se;const _=C.key||of(C.phase),F=Array.from(C.status.matchAll(/#(\d+)/g),ue=>Number(ue[1])),M=Ci(o,F),te=C.state,X={ref:`${a}#${_}`,plan:a,num:L+1,name:C.phase,model:"",lane:"",risk:"",highRisk:!1,tracker:C.status,tile:te,prs:M,stage:tf(M,te)},ke=((J=C.milestone)==null?void 0:J.trim())||"Phases";return(se=p.get(ke))==null||se.push(X),X}),g=u.map((C,L)=>{const _=p.get(C)??[],F=_.filter(X=>wn(X.tile)).length,M=_.length,te=M>0&&F===M?"done":_.some(X=>X.tile==="in-progress"||wn(X.tile))?"in-progress":"todo";return{id:C,status:te,owner:"",target:null,depends:L>0?[u[L-1]]:[],phases:_,blockers:[],done:F,total:M,tone:nf(te,[])}}),v=h.filter(C=>wn(C.tile)).length,j=h.length;return{slug:a,kind:"plan",branch:null,originCommit:null,milestones:g,lanes:[{plan:a,done:v,total:j}],gates:[],blockers:[],kpis:{phasesDone:v,phasesTotal:j,milestonesDone:g.filter(C=>rn.has(C.status)).length,milestonesTotal:g.length,inProgress:h.filter(C=>C.tile==="in-progress").map(C=>C.ref),highRisk:0,next:(($=h.find(C=>!wn(C.tile)))==null?void 0:$.name)??""},board:rf(g),runner:{running:null,staleBatch:null,lastStop:null,lastStopAt:null,stopReason:null,errors:[],next:null},detailError:null}}function uv(o,l,a){const u=o.milestones.flatMap(j=>j.phases).find(j=>j.ref===a);if(!u)return null;const f=l.find(j=>$i(j.path)===u.plan),p=a.lastIndexOf("#"),h=(p>=0?a.slice(p+1):a).toLowerCase(),g=!!(f!=null&&f.phases&&Object.prototype.hasOwnProperty.call(f.phases,h)),v=g?f==null?void 0:f.phases[h]:void 0;return{title:v!=null&&v.title?v.title:u.name,text:typeof(v==null?void 0:v.text)=="string"&&v.text.length>0?v.text:null,hasSection:g,planPath:(f==null?void 0:f.path)??null,key:h,phase:u}}function qm(o){return et(Ee(o).plans).map(l=>Ee(l)).filter(l=>!l.error&&!["done","closed","archived"].includes(ee(l.status).toLowerCase())).map(l=>{const a={};for(const[u,f]of Object.entries(Ee(l.phases))){const p=Ee(f);a[u]=typeof p.text=="string"?{title:ee(p.title),text:p.text}:{title:ee(p.title)}}return{path:ee(l.path),title:ee(l.title)||ee(l.path),rows:et(l.tracker).map(u=>{const f=Ee(u),p=ee(f.phase);return{phase:p,status:ee(f.status),state:bm(f.state),key:ee(f.key)||of(p),milestone:ee(f.milestone).trim()||null}}),phases:a,open:Ur(l.open_rows),changedAt:typeof l.changed_at=="number"&&Number.isFinite(l.changed_at)?l.changed_at:null,overlay:Um(l.overlay)}})}function Qm(o){return et(Ee(Ee(o.plans).done).plans).map(l=>Ee(l)).filter(l=>!l.error&&ee(l.path)).map(l=>({path:ee(l.path),title:ee(l.title)||ee(l.path),closedAt:typeof l.closed_at=="number"&&Number.isFinite(l.closed_at)?l.closed_at:null,phases:Ur(l.phases),pr:typeof l.pr=="number"&&Number.isInteger(l.pr)&&l.pr>0?Ci(o,[l.pr])[0]??null:null}))}function Xn(o){const l=Ee(o.roadmaps),a=Mt(o.error)??Mt(l.error),u=[],f=[];for(const j of et(l.roadmaps)){const E=Ee(j);ee(E.error)?f.push({slug:ee(E.roadmap),error:ee(E.error)}):ee(E.roadmap)&&u.push(Vm(o,E))}const p=qm(o.plans),h=new Set(u.flatMap(j=>j.lanes.map(E=>E.plan))),g=p.filter(j=>j.rows.length>0&&j.open>0&&!h.has($i(j.path))),v={roadmaps:u,errors:f,plans:p,otherPlans:g,repoError:a,done:Qm(o)};return u.length||f.length?{mode:"roadmaps",...v}:a&&!o.roadmaps&&!o.plans?{mode:"error",...v}:p.length?{mode:"plans",...v}:{mode:a?"error":"none",...v}}const cv=o=>o.mode==="roadmaps"&&o.roadmaps.length===1&&o.errors.length===0;function sf(o){const l=o.milestones.flatMap(h=>h.phases).filter(h=>h.tile==="blocked").length,{phasesDone:a,phasesTotal:u}=o.kpis,f=o.gates.length?"wait":l?"block":u&&a>=u?"done":o.kpis.inProgress.length||a?"prog":"todo",p=o.runner;return{slug:o.slug,branch:o.branch,milestonesDone:o.kpis.milestonesDone,milestonesTotal:o.kpis.milestonesTotal,phasesDone:a,phasesTotal:u,pct:u?Math.round(100*a/u):0,next:o.runner.next??"none ready",runner:p.running||p.stopReason==="running"?"running":p.stopReason?`stopped: ${p.stopReason}`:"idle",gates:o.gates.length,dots:o.milestones.map(h=>({id:h.id,status:h.status})),tone:f}}function Km(o){const l=[];for(const a of Xn(o).roadmaps){const u=new Map(a.milestones.map(f=>[f.id,f.status]));for(const f of a.milestones)rn.has(f.status)||!f.depends.every(p=>rn.has(u.get(p)??""))||f.blockers.filter(p=>p.type==="owner-gate").forEach((p,h)=>l.push({roadmap:a.slug,milestone:f.id,reason:p.reason,check:p.check,id:`${a.slug}:${f.id}:${h}`}))}return l}const Ti=o=>o.roadmaps.reduce((l,a)=>l+a.gates.length,0),Uc=(o,l)=>o.toLowerCase().includes(l);function dv(o,l){const a=l.trim().toLowerCase();if(!a)return null;const u={milestones:new Set,phases:new Set,count:0};for(const f of o.milestones){const p=Uc([f.id,f.status,f.owner,f.target??""].join(" "),a);let h=!1;for(const g of f.phases){const v=Uc([g.ref,g.name,g.model,g.lane,g.risk,g.tracker,g.prs.map(j=>`#${j.number}`).join(" ")].join(" "),a);(v||p)&&(u.phases.add(g.ref),h=!0),v&&(u.count+=1)}p&&(u.count+=1),(p||h)&&u.milestones.add(f.id)}return u}function Ym(o){const l=Ti(Xn(o));return l>0?`Roadmap · ${l} gate${l===1?"":"s"}`:"Roadmap"}const Gm=o=>!o.sources.collector.ok||o.sources.collector.stale,Xm=24*3600;function Zm(o){if(!o)return"";const l=Ee(o),a=typeof l.count=="number"?l.count:0;return l.state==="on"?a===1?" · 1 plan from a PR branch":a>1?` · ${a} plans from PR branches`:"":l.state==="off"?` · branch progress off (${ee(l.reason)||"unknown"})`:""}function fv(o,l){const a=Ee(o),u=ee(a.source);if(!u)return null;if(u==="working-tree")return{text:"Plans from the working tree (no origin branch found)",old:!1};const f=ee(a.commit).slice(0,7),p=typeof a.commit_at=="number"?a.commit_at:null,h=typeof a.fetched_at=="number"?a.fetched_at:null;return{text:`Plans from ${u}`+(f?` @ ${f}`:"")+(p!==null?` · commit ${xt(new Date(p*1e3).toISOString(),l)}`:"")+(h===null?" · fetch time unknown":` · last fetch ${xt(new Date(h*1e3).toISOString(),l)}`)+Zm(a.overlay),old:h!==null&&l/1e3-h>Xm}}const lf="caddis.hub.roadmapView";function pv(o){if(!o)return"timeline";try{return o.getItem(lf)==="board"?"board":"timeline"}catch{return"timeline"}}function hv(o,l){if(o)try{o.setItem(lf,l)}catch{}}const wi={waiting:"Waiting","owner-gate":"Owner gate",blocked:"Blocked","blocked-merge":"Blocked merge",coordinator:"Coordinator",hub:"Hub"},Jm={collector:"Roadmap and relay data",agents:"Session list",github:"GitHub data",coordinator:"Coordinator data"},Kn=o=>Array.isArray(o)?o:[],$t=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{},it=o=>typeof o=="string"&&o?o:null,Yn=o=>typeof o=="number"&&Number.isFinite(o)?o:null,kn=o=>{var l;return((l=o.github)==null?void 0:l.repo)??o.name},Hc=o=>o.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase(),cs=o=>o.agent&&o.agent!=="claude"?o.agent:null,St=(o,l)=>!!o&&!!l&&Hc(o)===Hc(l);function af(o){var a;const l=[];for(const u of Kn((a=o.relays)==null?void 0:a.relays)){const f=$t(u),p=it(f.name),h=it(f.status);!p||!h||l.push({name:p,status:h,statusArg:it(f.status_arg)??"",updatedAt:it(f.updated_at),nextStep:it(f.next_step)})}return l}function uf(o){return Array.isArray(o.owner_items)?o.owner_items:af(o).filter(l=>l.status==="OWNER-GATE"&&l.statusArg).map(l=>({id:`gate:${l.name}:${l.statusArg}`,what:`owner gate ${l.statusArg} (${l.name})`,pr:null,head_sha:null,source:"relay",recommendation:null,from:l.name,since:l.updatedAt,relay:l.name}))}function Hr(o){var a;const l=[];for(const u of Kn((a=o.coordinator)==null?void 0:a.queue)){const f=$t(u),p=Yn(f.pr);if(p===null)continue;const h=[];for(const g of Kn(f.waits_on)){const v=$t(g),j=Yn(v.pr);j!==null&&h.push({repo:it(v.repo)??"",pr:j})}l.push({pr:p,headSha:it(f.head_sha)??"",title:it(f.title)??"",state:it(f.state)??"waiting",whyWaiting:it(f.why_waiting)??"",waitsOn:h,hotfix:f.hotfix===!0,held:f.held===!0,since:it(f.entered_ready_at)})}return l}function cf(o){var a;const l=(a=o.coordinator)==null?void 0:a.merging_now;return Yn(l)??Yn($t(l).pr)}function eg(o){const l=new Set,a=[];for(const u of o)u.waiting_class!=="owner"||l.has(u.session_id)||(l.add(u.session_id),a.push(u));return a}function tg(o,l){var p,h;let a=null;for(const g of o.repos){const v=kn(g);for(const j of Kn((p=g.coordinator)==null?void 0:p.deploy_checks)){const E=$t(j),$=Date.parse(it(E.at)??""),C=Yn(E.pr);if(Number.isNaN($)||C===null)continue;const L=it(E.health);(!a||$>a.at)&&(a={at:$,label:`${v} #${C}`,ok:L==="ok"?!0:L==="failed"?!1:null,how:`health ${L??"unknown"}`})}for(const j of((h=g.github)==null?void 0:h.merges)??[]){const E=Date.parse(j.merged_at);if(Number.isNaN(E)||a&&a.at>=E)continue;const $=j.runs??[],C=$.some(_=>_.conclusion==="failure"),L=$.length>0&&$.every(_=>_.conclusion==="success");a={at:E,label:`${v} #${j.number}`,ok:C?!1:L?!0:null,how:C?"deploy failed":L?"deploy pass":"merged"}}}if(!a)return null;const u=Math.max(0,Math.round((l-a.at)/6e4)),f=u<60?`${u} min ago`:u<1440?`${Math.floor(u/60)} h ago`:`${Math.floor(u/1440)} d ago`;return{label:a.label,sub:`${f} · ${a.how}`,ok:a.ok}}function ng(o,l,a){var p;let u=0;for(const h of o.repos)(p=h.coordinator)!=null&&p.responding&&(u+=Hr(h).filter(g=>g.state!=="blocked").length);const f=o.sessions.filter(h=>!["idle","done","unknown"].includes(h.status)).length;return{waitingOnYou:a.filter(h=>h.folder==="needs").length,blockedMerges:a.filter(h=>h.kind==="blocked-merge").length,inQueue:u,workingSessions:f,lastDeploy:tg(o,l)}}function rg(o){const l=new Date(o);return Number.isNaN(l.getTime())?"unknown":l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}const Bc=(o,l)=>{var a;return(a=o.github)!=null&&a.repo?`gh pr checks ${l} -R ${o.github.repo}`:`gh pr checks ${l}`};function og(o,l){var h,g;const a=[],u=new Set,f=v=>{u.has(v.id)||(u.add(v.id),a.push(v))},p=v=>o.repos.find(j=>St(j.path,v));for(const v of eg(o.sessions)){const j=p(v.repo_path),E=v.name??v.session_id.slice(0,8),$=cs(v);f({id:`waiting:${v.session_id}`,kind:"waiting",folder:"needs",repo:j?kn(j):"no repo",title:`${E}${$?` (${$})`:""} waits on ${v.waiting_for??"you"}`,why:"The session cannot continue until you answer.",next:"Open the session and answer.",cmd:E,since:v.waiting_since,source:"agents"})}for(const v of o.repos){const j=kn(v),E=af(v);for(const _ of uf(v)){const F=_.relay?E.find(te=>te.name===_.relay):void 0,M=_.source==="relay"?(h=/^owner gate (\S+) /.exec(_.what))==null?void 0:h[1]:void 0;f({id:`owner:${v.path}:${_.id}`,kind:"owner-gate",folder:"approvals",repo:j,repoPath:v.path,title:M?`Gate ${M}: owner approval needed`:`${_.pr!==null?`PR #${_.pr}: `:""}${_.what}`,why:_.source==="relay"?"The plan stops at this owner gate. The next phase cannot start without you.":"This is on the owner-only list. Only your click approves it.",next:(F==null?void 0:F.nextStep)??(_.source==="relay"?"Read the relay, then decide.":"Read the recommendation, then decide."),cmd:_.relay?`.caddis/relay/${_.relay}.md`:_.what,since:_.since,owner:_,source:_.source==="relay"?"collector":"coordinator"})}for(const _ of Km(v))f({id:`rmgate:${v.path}:${_.id}`,kind:"owner-gate",folder:"approvals",repo:j,repoPath:v.path,title:`Roadmap ${_.roadmap}, gate ${_.milestone}: ${_.reason}`,why:`Milestone ${_.milestone} of roadmap ${_.roadmap} waits for you. Everything before it is done.`,next:"Decide, then record the gate in the roadmap with /caddis:roadmap (a docs PR).",cmd:_.check||"/caddis:roadmap",since:null,source:"collector"});for(const _ of E)_.status==="BLOCKED"&&_.statusArg.toLowerCase().startsWith("owner")&&f({id:`blocked:${v.path}:${_.name}`,kind:"blocked",folder:"needs",repo:j,repoPath:v.path,title:`Relay ${_.name}: STATUS: BLOCKED owner`,why:"The relay says the owner must decide before the next step.",next:_.nextStep??"Read the relay and decide.",cmd:`.caddis/relay/${_.name}.md`,since:_.updatedAt,source:"collector"});const $=!!v.coordinator&&v.coordinator.responding;for(const _ of Hr(v))_.state==="blocked"&&f({id:`merge:${v.path}:${_.pr}`,kind:"blocked-merge",folder:"blocked",repo:j,repoPath:v.path,title:`PR #${_.pr}${_.title?` ${_.title}`:""}: blocked`,why:_.whyWaiting||"The coordinator skips it until it is unblocked.",next:"Ask the PR session to fix it, or hold the PR.",cmd:Bc(v,_.pr),since:_.since,queue:{pr:_.pr,headSha:_.headSha,hotfix:_.hotfix,held:_.held},source:"coordinator"});const C=new Map(Hr(v).map(_=>[_.pr,_]));for(const _ of((g=v.github)==null?void 0:g.prs)??[]){if(_.draft||_.required_state!=="fail")continue;const F=_.checks.filter(te=>te.required&&te.conclusion==="failure").map(te=>te.name),M=C.get(_.number);f({id:`merge:${v.path}:${_.number}`,kind:"blocked-merge",folder:"blocked",repo:j,repoPath:v.path,title:`PR #${_.number}: required check ${F.length>0?`${F.join(", ")} `:""}failed`,why:$?"The coordinator skips it until the check passes at the head.":"This repo has no live coordinator, so its session merges its own PRs.",next:"Fix the check in the PR session.",cmd:Bc(v,_.number),since:_.updated_at,...M?{queue:{pr:M.pr,headSha:M.headSha,hotfix:M.hotfix,held:M.held}}:{},source:"github"})}const L=v.coordinator;L&&!L.responding&&L.heartbeat_at&&L.status!=="stopped"&&f({id:`coordinator:${v.path}`,kind:"coordinator",folder:"needs",repo:j,repoPath:v.path,title:`Coordinator not responding since ${rg(L.heartbeat_at)}`,why:"No heartbeat for 3 min. Its queue is frozen; the lane shows GitHub data.",next:"Check the coordinator session, then restart it.",cmd:"/caddis:coordinate",since:L.heartbeat_at,source:"coordinator"})}for(const v of["collector","agents","github","coordinator"]){const j=o.sources[v];j.ok||!j.stale||f({id:`hub:${v}`,kind:"hub",folder:"needs",repo:"hub",title:`${Jm[v]} has failed for over 3 min`,why:j.last_error??"The source has not answered.",next:"Read the error. The hub keeps the last good data.",cmd:"caddis hub status",since:j.last_ok_at})}return{items:a,tiles:ng(o,l,a)}}const sg=24*36e5,lg=()=>({open:{},resolved:[]}),ig=(o,l)=>{var u;const a=(u=o.sources)==null?void 0:u[l];return!!a&&(!a.ok||a.stale)};function ag(o,l){var u;if(!l.repoPath)return!1;const a=(u=o.repos)==null?void 0:u.find(f=>St(f.path,l.repoPath));if(!a)return!1;if(l.source==="github"){const f=a.github;return!!f&&typeof f.error=="string"&&!Array.isArray(f.prs)}if(l.source==="collector"){const f=$t(a.relays);return(typeof a.error=="string"||typeof f.error=="string")&&!Array.isArray(f.relays)}return!1}function Wc(o,l,a){const u=new Set(l.map(p=>p.id)),f=l.map(p=>p.stale?{...p,stale:!1}:p);for(const[p,h]of Object.entries(o))u.has(p)||!h.source||!ig(a,h.source)&&!ag(a,h)||f.push({...h,stale:!0});return f}function ug(o,l,a){const u=new Map(l.map(p=>[p.id,p])),f=o.resolved.filter(p=>a-p.resolvedAt<sg&&!u.has(p.item.id));for(const[p,h]of Object.entries(o.open))!u.has(p)&&!f.some(g=>g.item.id===p)&&f.push({item:h,resolvedAt:a});return f.sort((p,h)=>h.resolvedAt-p.resolvedAt),{open:Object.fromEntries(u),resolved:f}}function Vc(o){const l=$t(o);return typeof l.id=="string"&&typeof l.title=="string"&&typeof l.kind=="string"&&typeof l.folder=="string"}function cg(o){const l=$t(o),a={};for(const[f,p]of Object.entries($t(l.open)))Vc(p)&&(a[f]=p);const u=[];for(const f of Kn(l.resolved)){const p=$t(f),h=Yn(p.resolvedAt);Vc(p.item)&&h!==null&&u.push({item:p.item,resolvedAt:h})}return{open:a,resolved:u}}const bc="Start a session in the folder: the hub adds it.";function df(){return d.jsxs("section",{className:"first-run","data-testid":"first-run","aria-label":"Get started",children:[d.jsx("h2",{children:"No repos yet"}),d.jsxs("p",{children:[d.jsx(Dd,{size:16,"aria-hidden":"true"})," Start a Claude Code session in a repo. The hub finds it by itself."]}),d.jsx("p",{children:"Or add a folder. The hub checks that it is a git repo."}),d.jsxs("button",{type:"button",className:"btn",disabled:!0,title:bc,"data-testid":"add-folder",children:[d.jsx(sm,{size:16,"aria-hidden":"true"}),"Add a folder"]}),d.jsxs("span",{className:"first-run-reason",children:[" ",bc]})]})}function dg(o){const l=o.replace(/^#\/?/,"").split("/"),a=l[0];if(a==="inbox")try{return{page:"inbox",item:l[1]?decodeURIComponent(l[1]):null}}catch{return{page:"inbox",item:null}}if(a==="overview")return{page:"overview"};if(a==="activity")return{page:"activity"};if(a==="guide")try{const u=l[1]==="details"||l[1]==="wall"||l[1]==="map"?l[1]:"poster",f=l[2]?decodeURIComponent(l[2]):null;return{page:"guide",tab:u,item:f}}catch{return{page:"inbox",item:null}}if(a==="repo"&&l[1])try{const u=l[2]==="roadmap"||l[2]==="sessions"?l[2]:"flow",f=u==="roadmap"&&l[3]?decodeURIComponent(l[3]):null;return{page:"repo",id:decodeURIComponent(l[1]),tab:u,roadmap:f}}catch{return{page:"inbox",item:null}}return{page:"inbox",item:null}}const Br=o=>o.repo_id??o.path,mv=o=>`#/inbox/${encodeURIComponent(o)}`,ls=o=>`#/repo/${encodeURIComponent(o)}`;function ff(o,l,a){return l==="flow"?ls(o):`${ls(o)}/${l}${l==="roadmap"&&a?`/${encodeURIComponent(a)}`:""}`}function fg(o,l){return o==="poster"?"#/guide":o==="wall"?"#/guide/wall":o==="map"?"#/guide/map":`#/guide/details${l?`/${encodeURIComponent(l)}`:""}`}function pf(o,l,a=5){const u=[];for(const p of o.repos){const h=p.github;for(const g of(h==null?void 0:h.merges)??[])u.push({key:`${p.path}:${g.number}`,repo:kn(p),pr:g.number,title:`#${g.number} ${g.title}`,url:h!=null&&h.repo?`https://github.com/${h.repo}/pull/${g.number}`:null,at:g.merged_at,age:xt(g.merged_at,l)})}const f=p=>{const h=Date.parse(p);return Number.isNaN(h)?0:h};return u.sort((p,h)=>f(h.at)-f(p.at)).slice(0,a)}function pg(o,l=6){const a=[];for(const u of o.repos)for(const f of Xn(u).roadmaps){const p=sf(f),h=p.phasesTotal>0?` · ${p.phasesDone}/${p.phasesTotal} phases`:"";a.push({key:`${u.path}:${f.slug}`,slug:f.slug,repo:kn(u),href:ff(Br(u),"roadmap",f.slug),label:`${p.milestonesDone} of ${p.milestonesTotal} milestones${h}`,segs:f.milestones.map(g=>({id:g.id,tone:g.tone}))})}return a.slice(0,l)}const hg=["busy","running","working"],Pi=o=>hg.includes(o),qc=(o,l,a)=>`${o} ${o===1?l:a}`;function hf(o,l,a){const u=l===0?"Nothing needs you.":l===1?"1 thing needs you.":`${l} things need you.`,f=o.sessions.filter(g=>Pi(g.status)).length,p=[qc(f,"agent working","agents working")],h=pf(o,a,1)[0];return h&&p.push(`last ship ${h.age} (${h.repo} #${h.pr})`),p.push(qc(o.repos.length,"repo watched","repos watched")),{title:u,sub:p.join(" · ")}}const mg={waiting:{Icon:km,tone:"cyan"},"owner-gate":{Icon:vm,tone:"amber"},blocked:{Icon:tm,tone:"violet"},"blocked-merge":{Icon:lm,tone:"pink"},coordinator:{Icon:fm,tone:"red"},hub:{Icon:Id,tone:"grey"},resolved:{Icon:us,tone:"grey"}};function mf({kind:o}){const{Icon:l,tone:a}=mg[o];return d.jsx("span",{className:`kind-tile tile-${a}`,"aria-hidden":"true",children:d.jsx(l,{size:17,strokeWidth:2.2})})}function gg({state:o,nowMs:l}){const a=pg(o),u=pf(o,l);return a.length===0&&u.length===0?null:d.jsxs("section",{className:"inbox-strips","aria-label":"Roadmaps and recent ships",children:[a.length>0&&d.jsxs("div",{className:"strip-card","data-testid":"strip-roadmaps",children:[d.jsx("h2",{className:"strip-title",children:"Roadmaps"}),a.map(f=>d.jsxs("div",{className:"strip-rm",children:[d.jsxs("div",{className:"strip-rm-head",children:[d.jsxs("span",{className:"strip-rm-name",children:[d.jsx("a",{href:f.href,children:f.slug})," ",d.jsx("span",{className:"mono strip-repo",children:f.repo})]}),d.jsx("span",{className:"strip-rm-label",children:f.label})]}),d.jsx("div",{className:"seg-bar",children:f.segs.map(p=>d.jsx("span",{className:`seg seg-${p.tone}`,title:`${p.id}: ${p.tone}`},p.id))})]},f.key))]}),u.length>0&&d.jsxs("div",{className:"strip-card strip-ships","data-testid":"strip-shipped",children:[d.jsx("h2",{className:"strip-title",children:"Shipped"}),u.map(f=>d.jsxs("div",{className:"ship-row",children:[d.jsx(us,{size:14,strokeWidth:2.6,"aria-hidden":"true",className:"ship-check"}),d.jsx("span",{className:"mono ship-repo",children:f.repo}),d.jsx("span",{className:"ship-title",children:f.url?d.jsx("a",{href:f.url,target:"_blank",rel:"noreferrer noopener",children:f.title}):f.title}),d.jsx("span",{className:"ship-age",children:f.age.replace(/ ago$/,"")})]},f.key))]})]})}const yg=[{id:"needs",label:"Needs you"},{id:"approvals",label:"Approvals"},{id:"blocked",label:"Blocked"},{id:"resolved",label:"Resolved"}];function Qc({iso:o,nowMs:l,focusable:a=!1}){const u=vg(o,l);return o?d.jsx(vi,{content:Jd(o),children:d.jsx("time",{dateTime:o,tabIndex:a?0:void 0,children:u})}):d.jsx(d.Fragment,{children:u})}const vg=(o,l)=>o?xt(o,l).replace(/ ago$/,""):"unknown";function wg(o,l){return o?l.owner?Bd(o,l.owner):l.queue?Hd(o,l.queue):[]:[]}function kg({state:o,nowMs:l,api:a,act:u,item:f=null}){const[p,h]=D.useState("needs"),[g,v]=D.useState(null),[j,E]=D.useState(!1),[$,C]=D.useState(!1),[L,_]=D.useState(!1),F=D.useRef(null),M=D.useRef(null),te=D.useRef(new Map),{model:X,resolved:ke,read:J}=a,se={needs:X.items.filter(I=>I.folder==="needs").length,approvals:X.items.filter(I=>I.folder==="approvals").length,blocked:X.items.filter(I=>I.folder==="blocked").length,resolved:ke.length},ue=p==="resolved"?ke.map(I=>({item:I.item,resolved:!0,since:new Date(I.resolvedAt).toISOString()})):X.items.filter(I=>I.folder===p).map(I=>({item:I,resolved:!1,since:I.since})),q=ue.find(I=>I.item.id===g)??ue[0]??null,Y=I=>{h(I),v(null),E(!1),_(!1)},ie=I=>{_(!1),v(I.item.id),E(!0),I.resolved||a.markRead(I.item.id)},Ne=I=>{Yd(I.item.cmd),C(!0),window.setTimeout(()=>C(!1),1500)};D.useEffect(()=>{if(!f){F.current=null,_(!1);return}if(F.current===f)return;F.current=f;const I=X.items.find(me=>me.id===f),re=I?void 0:ke.find(me=>me.item.id===f);if(!I&&!re){_(!0);return}_(!1),h(I?I.folder:"resolved"),v(f),E(!0),I&&a.markRead(f),M.current=f},[f,X.items,ke,a.markRead]),D.useEffect(()=>{var me;const I=M.current,re=I?te.current.get(I):void 0;!I||!re||(M.current=null,(me=re.scrollIntoView)==null||me.call(re,{block:"nearest"}))});const tt=D.useRef({rows:ue,sel:q,pickItem:ie,copySel:Ne});return tt.current={rows:ue,sel:q,pickItem:ie,copySel:Ne},D.useEffect(()=>{const I=re=>{var k;const me=re.target,Fe=me instanceof HTMLButtonElement||me instanceof HTMLAnchorElement,Le=Lm(re.key,{ctrl:re.ctrlKey,meta:re.metaKey,alt:re.altKey},Rm(me),Fe),{rows:ye,sel:A,pickItem:G,copySel:H}=tt.current;if(!(!Le||!A)){if(Le==="next"||Le==="prev"){const T=zm(Le,ye.findIndex(oe=>oe.item.id===A.item.id),ye.length),ne=ye[T];if(!ne)return;v(ne.item.id),(k=te.current.get(ne.item.id))==null||k.scrollIntoView({block:"nearest"})}else Le==="open"?G(A):H(A);re.preventDefault()}};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[]),d.jsxs(d.Fragment,{children:[d.jsx(Zd,{page:"Inbox",head:hf(o,X.items.length,l),stale:Gd(o),children:d.jsx("div",{className:"pill-group",role:"tablist","aria-label":"Folders",children:yg.map(({id:I,label:re})=>d.jsxs("button",{type:"button",role:"tab","aria-selected":p===I,className:`folder-btn pill${p===I?" sel":""}`,onClick:()=>Y(I),"data-testid":`folder-${I}`,children:[re,d.jsx("strong",{className:"pill-count",children:se[I]})]},I))})}),o.repos.length===0&&d.jsx(df,{}),a.notify.supported&&d.jsxs("div",{className:"notify-row",children:[d.jsxs("button",{type:"button",className:"btn",onClick:a.notify.enable,disabled:a.notify.enabled,children:[d.jsx(nm,{size:16,"aria-hidden":"true"}),a.notify.enabled?"Notifications on":"Notify me"]}),d.jsx("span",{children:a.notify.enabled?"One browser notification per new item.":"Opt in to a browser notification for each new item."})]}),d.jsxs("div",{className:`mailbox${j&&q?" show-detail":""}`,children:[d.jsxs("div",{className:"mailbox-list","data-testid":"inbox-list",children:[L&&d.jsx("div",{className:"list-notice",role:"status","data-testid":"inbox-notice",children:"That item is no longer in the Inbox."}),ue.map(I=>{const re=!I.resolved&&!J.has(I.item.id),me=(q==null?void 0:q.item.id)===I.item.id;return d.jsxs("button",{ref:Fe=>{Fe?te.current.set(I.item.id,Fe):te.current.delete(I.item.id)},type:"button",className:`item-btn${me?" sel":""}`,"aria-current":me?"true":void 0,onClick:()=>ie(I),"data-testid":"inbox-item",children:[d.jsx("span",{className:`unread-dot${re?" on":""}`,role:"img","aria-label":re?"Unread":"Read"}),d.jsx(mf,{kind:I.resolved?"resolved":I.item.kind}),d.jsxs("span",{className:"item-main",children:[d.jsx("span",{className:"item-title",children:I.item.title}),d.jsxs("span",{className:"item-meta",children:[d.jsx("span",{children:I.resolved?"Resolved":wi[I.item.kind]}),d.jsx("span",{"aria-hidden":"true",children:"·"}),d.jsx("span",{className:"mono",children:I.item.repo}),!I.resolved&&I.item.stale&&d.jsx("span",{className:"chip chip-stale","data-testid":"stale-chip",title:"Its source is failing. Last good data is shown.",children:"stale"})]})]}),d.jsx("span",{className:"item-age",children:d.jsx(Qc,{iso:I.since,nowMs:l})})]},I.item.id)}),ue.length===0&&d.jsxs("div",{className:"list-empty","data-testid":"inbox-empty",children:[d.jsx("strong",{children:p==="resolved"?"Nothing resolved in the last 24 h":"Nothing needs you"}),d.jsxs("div",{children:["Last check ",xt(o.generated_at,l),"."]})]})]}),q&&d.jsxs("article",{className:"mailbox-detail","data-testid":"inbox-detail","aria-label":"Item detail",children:[d.jsxs("button",{type:"button",className:"btn back-btn",onClick:()=>E(!1),children:[d.jsx(em,{size:16,"aria-hidden":"true"}),"Back"]}),d.jsxs("span",{className:"item-meta detail-meta",children:[d.jsx("span",{className:`chip chip-${q.resolved?"resolved":q.item.kind}`,children:q.resolved?"Resolved":wi[q.item.kind]}),d.jsx("span",{className:"mono",children:q.item.repo}),d.jsxs("span",{children:["· ",q.resolved?"resolved":"since"," ",d.jsx(Qc,{iso:q.since,nowMs:l,focusable:!0})]}),!q.resolved&&q.item.stale&&d.jsx("span",{className:"chip chip-stale",children:"stale"})]}),d.jsx("h2",{children:q.item.title}),d.jsxs("div",{className:"detail-block",children:[d.jsx("span",{className:"detail-label",children:"Why it matters"}),d.jsx("span",{children:q.resolved?"The source cleared. No action is needed.":q.item.why})]}),!q.resolved&&q.item.owner&&d.jsx(Kd,{item:q.item.owner}),d.jsxs("div",{className:"detail-block",children:[d.jsx("span",{className:"detail-label",children:"Next step"}),d.jsx("span",{children:q.resolved?"Nothing.":q.item.next}),d.jsx("code",{className:"cmd",children:q.item.cmd})]}),d.jsxs("div",{className:"detail-actions",children:[d.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>Ne(q),children:[$?d.jsx(us,{size:16,"aria-hidden":"true"}):d.jsx(_i,{size:16,"aria-hidden":"true"}),q.item.kind==="waiting"?"Copy session name":"Copy command"]}),!q.resolved&&(()=>{const I=o.repos.find(Fe=>St(Fe.path,q.item.repoPath)),re=wg(I,q.item);if(!I||re.length===0)return null;const me=q.item.owner?bd(I,q.item.owner):void 0;return d.jsx(Ei,{repo:I,specs:re,act:u,reason:me})})()]}),d.jsxs("p",{className:"key-hints",children:[d.jsx("kbd",{children:"J"})," ",d.jsx("kbd",{children:"K"})," move · ",d.jsx("kbd",{children:"Enter"})," open · ",d.jsx("kbd",{children:"C"})," copy"]})]},q.item.id)]}),d.jsx(gg,{state:o,nowMs:l})]})}const gf="caddis-hub-inbox-history",Kc="caddis-hub-inbox-read",rs="caddis-hub-inbox-notified",Yc="caddis-hub-inbox-notify";function Gn(){try{return window.localStorage}catch{return null}}function yf(o,l){try{const a=l==null?void 0:l.getItem(o);return a?JSON.parse(a):null}catch{return null}}function vf(o,l,a){try{a==null||a.setItem(o,JSON.stringify(l))}catch{}}const xg=(o=Gn())=>{const l=yf(gf,o);return l?cg(l):lg()},Sg=(o,l=Gn())=>vf(gf,o,l);function ci(o,l=Gn()){const a=yf(o,l);return new Set(Array.isArray(a)?a.filter(u=>typeof u=="string"):[])}function di(o,l,a=Gn()){vf(o,[...l].slice(-500),a)}const Ng={items:[],tiles:{waitingOnYou:0,blockedMerges:0,inQueue:0,workingSessions:0,lastDeploy:null}},fi=()=>typeof window<"u"&&"Notification"in window;function _g(o,l){const a=D.useMemo(()=>o?og(o,l):Ng,[o,l]),[u,f]=D.useState(()=>xg()),p=D.useMemo(()=>{if(!o)return a;const C=Wc(u.open,a.items,o),L=_=>C.filter(_).length;return{items:C,tiles:{...a.tiles,waitingOnYou:L(_=>_.folder==="needs"),blockedMerges:L(_=>_.kind==="blocked-merge")}}},[o,a,u.open]),[h,g]=D.useState(()=>ci(Kc)),[v,j]=D.useState(()=>{var C;try{return fi()&&((C=Gn())==null?void 0:C.getItem(Yc))==="1"&&Notification.permission==="granted"}catch{return!1}});D.useEffect(()=>{o&&f(C=>{const L=ug(C,Wc(C.open,a.items,o),Date.now());return Sg(L),L})},[o,a]),D.useEffect(()=>{if(!v||!o)return;const C=ci(rs);let L=!1;for(const _ of p.items)if(!C.has(_.id)){C.add(_.id),L=!0;try{new Notification(`caddis hub: ${_.repo}`,{body:_.title,tag:_.id})}catch{}}L&&di(rs,C)},[v,o,p]);const E=D.useCallback(C=>{g(L=>{if(L.has(C))return L;const _=new Set(L).add(C);return di(Kc,_),_})},[]),$=D.useCallback(()=>{fi()&&Notification.requestPermission().then(C=>{var _;if(C!=="granted")return;try{(_=Gn())==null||_.setItem(Yc,"1")}catch{}const L=ci(rs);for(const F of p.items)L.add(F.id);di(rs,L),j(!0)})},[p]);return{model:p,resolved:u.resolved,read:h,markRead:E,notify:{supported:fi(),enabled:v,enable:$}}}function jg(o,l){const a=Number.isNaN(o)?0:Math.min(1,Math.max(0,o)),u=2*Math.PI*l;return`${(u*a).toFixed(1)} ${u.toFixed(1)}`}function wf({fraction:o,size:l,stroke:a=5,tone:u,label:f,text:p}){const h=l/2,g=h-a/2-1.5;return d.jsxs("svg",{className:`ring ring-${u}`,width:l,height:l,viewBox:`0 0 ${l} ${l}`,role:"img","aria-label":f,children:[d.jsx("circle",{className:"ring-track",cx:h,cy:h,r:g,fill:"none",strokeWidth:a}),d.jsx("circle",{className:"ring-fill",cx:h,cy:h,r:g,fill:"none",strokeWidth:a,strokeLinecap:"round",strokeDasharray:jg(o,g),transform:`rotate(-90 ${h} ${h})`}),p!==void 0&&d.jsx("text",{className:"ring-text",x:h,y:h,textAnchor:"middle",dominantBaseline:"central",children:p})]})}function kf({slot:o,size:l}){const a=Cm(o),u=$m(a.adviseEur);return d.jsxs("div",{className:"spend-block",children:[d.jsx(wf,{fraction:a.pct/100,size:l,tone:a.advisory?"warn":"good",label:`agy spend in the last 24 h: EUR ${a.committedEur.toFixed(2)}. Note level EUR ${u}.`}),d.jsxs("span",{className:"spend-text",children:[d.jsxs("span",{className:"spend-line",children:[d.jsxs("span",{className:"spend-amount",children:["€",a.committedEur.toFixed(2)]})," ",d.jsx("span",{className:"spend-label",children:"agy, 24 h"})]}),d.jsxs("span",{className:`spend-note${a.advisory?" hot":""}`,children:["Note at €",u]})]})]})}const Eg=["busy","running","working"],Gc=(o,l,a)=>`${o} ${o===1?l:a}`;function Ri(o,l){return o.sessions.some(a=>St(a.repo_path,l.path)&&Eg.includes(a.status))}function Cg(o,l){var f,p;const a=Ti(Xn(l));if(a>0)return Gc(a,"gate","gates");if(o.sessions.some(h=>St(h.repo_path,l.path)&&h.waiting_class==="owner"))return"waiting on you";if(Ri(o,l))return"working";const u=((p=(f=l.github)==null?void 0:f.prs)==null?void 0:p.length)??0;return u>0?Gc(u,"PR","PRs"):""}const Xc="No coordinator: each session merges its own PRs.",$g="/caddis:coordinate",Tg="gh auth login -h github.com",xf=o=>{const l=o?new Date(o):null;return l&&!Number.isNaN(l.getTime())?l.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"unknown"},Zc=o=>`Coordinator not responding since ${xf(o)}`,Jc=o=>`Coordinator stopped at ${xf(o)}`;function Pg(o,l){const a=o?Date.parse(o):NaN;if(Number.isNaN(a))return"unknown";const u=Math.max(0,Math.round((l-a)/6e4));return u<60?`${u} min ago`:u<1440?`${Math.floor(u/60)} h ago`:`${Math.floor(u/1440)} d ago`}const Rg=(o,l,a)=>o==="waiting"?{sub:`waiting: ${l??"unknown"}`,tone:a==="peer"?"muted":"warn"}:o==="busy"||o==="running"||o==="working"?{sub:"busy",tone:"good"}:{sub:o,tone:"muted"},pi=(o,l)=>{const a=o.whyWaiting||o.state,u=[o.hotfix?"hotfix":"",o.held&&!a.includes("held")?"held":"",a].filter(Boolean);return{key:`q${o.pr}`,title:`#${o.pr} ${o.title}`.trim(),sub:l?"last known queue":u.join(" · "),tone:o.hotfix||o.held?"warn":"muted",grey:l,queue:{pr:o.pr,headSha:o.headSha,hotfix:o.hotfix,held:o.held}}};function Lg(o,l,a){var ke,J,se,ue,q;const u=l.coordinator,f=u?u.status==="stopped"?"stopped":u.responding?"coordinator":"down":"none",p=kn(l),h=o.sessions.filter(Y=>St(Y.repo_path,l.path)).map(Y=>{const ie=Rg(Y.status,Y.waiting_for,Y.waiting_class),Ne=cs(Y);return{key:`s${Y.session_id}`,title:Y.name??Y.session_id.slice(0,8),sub:Ne?`${Ne} · ${ie.sub}`:ie.sub,tone:ie.tone}}),g=[],v=new Set;for(const Y of((ke=l.github)==null?void 0:ke.prs)??[]){if(Y.draft||Y.required_state!=="fail")continue;const ie=Y.checks.filter(Ne=>Ne.required&&Ne.conclusion==="failure").map(Ne=>Ne.name);v.add(Y.number),g.push({key:`b${Y.number}`,title:`#${Y.number} ${Y.title}`,sub:ie.length>0?`${ie.join(", ")} failed`:"required check failed",tone:"bad"})}const j=Hr(l),E=[],$=[];if(f==="coordinator"){const Y=cf(l);for(const ie of j)ie.state==="blocked"?v.has(ie.pr)||(v.add(ie.pr),g.push({key:`b${ie.pr}`,title:`#${ie.pr} ${ie.title}`.trim(),sub:ie.whyWaiting||"blocked",tone:"bad"})):ie.state==="merging"||ie.pr===Y?$.push(pi(ie,!1)):E.push(pi(ie,!1))}else if(f==="down"||f==="stopped")for(const Y of j)Y.state!=="blocked"&&E.push(pi(Y,!0));const C=(((J=l.github)==null?void 0:J.merges)??[]).slice().sort((Y,ie)=>Date.parse(ie.merged_at)-Date.parse(Y.merged_at)).slice(0,3).map(Y=>{const ie=Y.runs??[],Ne=ie.some(re=>re.conclusion==="failure"),tt=ie.length>0&&ie.every(re=>re.conclusion==="success"),I=Pg(Y.merged_at,a);return{key:`d${Y.number}`,title:`#${Y.number} ${Y.title}`,sub:Ne?`deploy failed · ${I}`:tt?`deployed ${I}`:`merged ${I}`,tone:Ne?"bad":tt?"good":"muted"}});let L=null;f==="none"?L=`${Xc} Start one with ${$g}.`:f==="down"?L=`${Zc((u==null?void 0:u.heartbeat_at)??null)}. The lane shows GitHub data; the last known queue is greyed.`:f==="stopped"&&(L=`${Jc((u==null?void 0:u.stopped_at)??null)}. Each session merges its own PRs until one starts again (/caddis:coordinate). The last known queue is greyed.`);const _=(se=o.sources)!=null&&se.agents?!o.sources.agents.ok:!1,F=(ue=l.github)!=null&&ue.error?{account:l.github.account??null,error:l.github.error,command:Tg}:null;let M;f==="down"?M=Zc((u==null?void 0:u.heartbeat_at)??null):f==="stopped"?M=Jc((u==null?void 0:u.stopped_at)??null):M=[f==="none"?"No coordinator":"",_?"sessions unknown":h.length>0?`${h.length} session${h.length===1?"":"s"}`:"no sessions running",g.length>0?`${g.length} blocked`:"",E.length>0?`${E.length} waiting`:"",$.length>0?`${$.length} merging`:"",C.length>0?`${C.length} deployed`:""].filter(Boolean).join(" · ");const te=o.sessions.some(Y=>St(Y.repo_path,l.path)&&Y.waiting_class==="owner"),X=f==="down"||l.error||(q=l.github)!=null&&q.error?"blocked":te?"attention":f==="none"||f==="stopped"?"idle":"ok";return{id:l.path,name:p,mode:f,tone:X,note:L,github:F,summary:M,columns:[{id:"sessions",title:"Sessions",cards:h,emptyText:_?'Sessions unknown: "claude agents" failed':"No sessions running"},{id:"blocked",title:"Blocked",cards:g,emptyText:"None"},{id:"waiting",title:"Waiting for its turn",cards:E,emptyText:f==="none"?Xc:"None"},{id:"merging",title:"Merging now",cards:$,emptyText:"None"},{id:"done",title:"Done and deployed",cards:C,emptyText:"None"}]}}const Qn=(o,l,a)=>`${o} ${o===1?l:a}`;function zg(o,l,a){var g;if(a.mode==="down")return{status:"Coordinator down",statusTone:"bad"};if(a.mode==="stopped")return{status:"Coordinator stopped",statusTone:"bad"};const u=Ti(Xn(l));if(u>0)return{status:Qn(u,"gate","gates"),statusTone:"warn"};const f=o.sessions.filter(v=>St(v.repo_path,l.path)&&v.waiting_class==="owner").length;if(f>0)return{status:`${f} waiting on you`,statusTone:"warn"};const p=((g=l.github)==null?void 0:g.prs)??[],h=p.filter(v=>v.required_state==="fail").length;return h>0?{status:Qn(h,"PR failing","PRs failing"),statusTone:"bad"}:Ri(o,l)?{status:"Agent working",statusTone:"good"}:p.length>0?{status:Qn(p.length,"PR waiting","PRs waiting"),statusTone:"muted"}:{status:"Quiet",statusTone:"muted"}}function Dg(o){const l=Xn(o),a=l.roadmaps[0];if(a){const f=sf(a);return`Roadmap ${f.slug}: ${f.milestonesDone} of ${f.milestonesTotal} milestones`}const u=l.plans.filter(f=>f.open>0).length;return u>0?Qn(u,"open plan","open plans"):"No roadmap"}function Og(o){var a;let l=null;for(const u of((a=o.github)==null?void 0:a.merges)??[])!Number.isNaN(Date.parse(u.merged_at))&&(!l||Date.parse(u.merged_at)>Date.parse(l))&&(l=u.merged_at);return l}function Ig(o,l){return o.repos.map(a=>{var C;const u=Lg(o,a,l),f=u.columns.find(L=>L.id==="sessions"),p=o.sessions.filter(L=>St(L.repo_path,a.path)&&Pi(L.status)).length,h=f&&f.cards.length>0?`${Qn(f.cards.length,"session","sessions")} · ${p} busy`:(f==null?void 0:f.emptyText)??"",g=((C=a.github)==null?void 0:C.prs)??[],v=g.length,j=g.filter(L=>L.required_state==="pass").length,E=Og(a),$=Br(a);return{id:$,name:a.name,href:ls($),tone:u.tone,mode:u.mode,...zg(o,a,u),line:Dg(a),sessions:h,note:u.note,github:u.github,prsOpen:v,prsPassing:j,ringLabel:v>0?`${j}/${v}`:"0",foot:`${v>0?Qn(v,"open PR","open PRs"):"No open PRs"} · ${E?`shipped ${xt(E,l)}`:"never shipped"}`}})}function Mg(o){const l=[],a=[];for(const u of o.sessions){const f=o.repos.find(g=>St(g.path,u.repo_path)),p=(u.repo_path??"").replace(/[\\/]+$/,"").split(/[\\/]/).pop()??"",h={key:u.key,name:u.name??u.session_id.slice(0,8),repo:(f==null?void 0:f.name)??p,status:u.status};(Pi(u.status)?l:a).push(h)}return{busy:l,other:a}}const Ag=3,hi=5,Fg=(o,l)=>o?xt(o,l).replace(/ ago$/,""):null;function Ug(o){return o.prsOpen===0?"muted":o.prsPassing===o.prsOpen?"good":"prog"}function Hg({item:o,primary:l,nowMs:a}){const[u,f]=D.useState(!1),p=Fg(o.since,a),h=o.kind==="waiting"?"Copy session name":"Copy command";return d.jsxs("li",{className:"ov-need","data-testid":"ov-need",children:[d.jsx(mf,{kind:o.kind}),d.jsxs("span",{className:"ov-need-main",children:[d.jsx("span",{className:"ov-need-title",children:o.title}),d.jsxs("span",{className:"ov-need-meta",children:[wi[o.kind]," · ",d.jsx("span",{className:"mono",children:o.repo}),p?` · ${p}`:""]})]}),d.jsxs("button",{type:"button",className:`btn ${l?"btn-primary":"btn-ghost"}`,onClick:()=>{Yd(o.cmd),f(!0),window.setTimeout(()=>f(!1),1500)},children:[u?d.jsx(us,{size:15,"aria-hidden":"true"}):d.jsx(_i,{size:15,"aria-hidden":"true"}),u?"Copied":h]})]})}function Bg({c:o}){return d.jsxs("article",{className:`repo-card ${o.mode}`,"data-testid":"repo-card",children:[d.jsxs("div",{className:"repo-card-head",children:[d.jsxs("span",{className:"repo-card-id",children:[d.jsx("a",{className:"repo-card-link",href:o.href,children:o.name}),d.jsx("span",{className:`repo-card-status tone-${o.statusTone}`,"data-testid":"repo-card-status",children:o.status})]}),d.jsx(wf,{fraction:o.prsOpen>0?o.prsPassing/o.prsOpen:0,size:48,text:o.ringLabel,tone:Ug(o),label:o.prsOpen>0?`${o.prsPassing} of ${o.prsOpen} open PRs pass required checks`:"No open PRs"})]}),d.jsx("p",{className:"repo-card-line","data-testid":"repo-card-line",children:o.line}),d.jsx("p",{className:"repo-card-sessions","data-testid":"repo-card-sessions",children:o.sessions}),o.note&&d.jsx("p",{className:"lane-note repo-card-note","data-testid":"repo-card-note",children:o.note}),o.github&&d.jsxs("div",{className:"lane-note gh-fail","data-testid":"gh-fail",role:"status",children:["GitHub access failed for ",o.github.account?`account ${o.github.account}`:"this repo",o.github.error?` (${o.github.error})`:"",". Sign in again with ",d.jsx("code",{className:"cmd",children:o.github.command})]}),d.jsx("p",{className:"repo-card-foot",children:o.foot})]})}function Wg({state:o,nowMs:l,api:a}){const u=a.model.items,f=Mg(o),p=Ig(o,l),h=f.other.slice(0,hi);return d.jsxs(d.Fragment,{children:[d.jsx(Zd,{page:"Overview",head:hf(o,u.length,l),stale:Gd(o)}),o.repos.length===0&&d.jsx(df,{}),d.jsxs("div",{className:"ov-top",children:[d.jsxs("section",{className:"ov-needs glass-panel","aria-label":"Needs you","data-testid":"ov-needs",children:[d.jsxs("div",{className:"ov-panel-head",children:[d.jsx("h2",{children:"Needs you"}),d.jsxs("a",{className:"ov-all",href:"#/inbox",children:["All ",u.length," items"]})]}),u.length===0?d.jsx("p",{className:"ov-empty",children:"Nothing needs you."}):d.jsx("ul",{className:"ov-need-list",children:u.slice(0,Ag).map((g,v)=>d.jsx(Hg,{item:g,primary:v===0,nowMs:l},g.id))})]}),d.jsxs("section",{className:"ov-live glass-panel","aria-label":"Live now","data-testid":"ov-live",children:[d.jsx("div",{className:"ov-panel-head",children:d.jsx("h2",{children:"Live now"})}),f.busy.length===0?d.jsx("p",{className:"ov-empty",children:"No agent is working."}):f.busy.map(g=>d.jsxs("div",{className:"live-row","data-testid":"live-session",children:[d.jsxs("span",{className:"live-mark","aria-hidden":"true",children:[d.jsx("span",{className:"live-orb"}),d.jsx("span",{className:"live-core",children:d.jsx(Dd,{size:20})})]}),d.jsxs("span",{className:"live-text",children:[d.jsx("span",{className:"live-name",children:g.name}),d.jsxs("span",{className:"live-where",children:["Working in ",g.repo]})]})]},g.key)),h.length>0&&d.jsxs("ul",{className:"live-idle",children:[h.map(g=>d.jsxs("li",{"data-testid":"idle-session",children:[d.jsx("span",{className:"live-idle-dot","aria-hidden":"true"}),d.jsx("span",{className:"live-idle-name",children:g.name}),d.jsx("span",{className:"mono live-idle-repo",children:g.repo})]},g.key)),f.other.length>hi&&d.jsxs("li",{className:"live-more",children:["+",f.other.length-hi," more"]})]}),d.jsx("div",{className:"ov-spend",children:d.jsx(kf,{slot:o.spend,size:44})})]})]}),d.jsxs("section",{className:"ov-repos","aria-label":"Repos",children:[d.jsxs("div",{className:"ov-repos-head",children:[d.jsx("h2",{children:"Repos"}),d.jsxs("span",{children:[p.length," watched"]})]}),d.jsx("div",{className:"repo-cards","data-testid":"repo-cards",children:p.map(g=>d.jsx(Bg,{c:g},g.id))})]})]})}const Vg=D.lazy(()=>as(()=>import("./Palette-BKM_A64G.js"),__vite__mapDeps([0,1,2]))),bg=o=>(o.ctrlKey||o.metaKey)&&!o.altKey&&(o.key==="k"||o.key==="K");function qg(){const[o,l]=D.useState(!1),a=D.useRef(!1),u=D.useRef(null),f=D.useCallback(h=>{if(a.current)return;const g=document.activeElement;u.current=h??(g instanceof HTMLElement?g:null),a.current=!0,l(!0)},[]),p=D.useCallback(()=>{if(!a.current)return;a.current=!1,l(!1);const h=u.current;u.current=null,h!=null&&h.isConnected&&h.focus()},[]);return D.useEffect(()=>{const h=g=>{bg(g)&&(g.preventDefault(),f())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f]),{open:o,show:f,hide:p}}function Qg({pal:o,state:l,inbox:a,nowMs:u}){return!o.open||!l?null:d.jsx(D.Suspense,{fallback:null,children:d.jsx(Vg,{state:l,inbox:a,nowMs:u,onClose:o.hide})})}const Kg=["D1","D2","D3","D4","D5"],is=o=>o&&typeof o=="object"&&!Array.isArray(o)?o:{};function Yg(o){const l=(a,u)=>{if(a.state==="merging")return[0,0,0,"",u];const f=a.hotfix?1:2;return a.state==="ready"&&!a.held?[f,0,a.since?0:1,a.since??"",u]:[f,1,0,"",u]};return o.map((a,u)=>({q:a,r:l(a,u)})).sort((a,u)=>{for(let f=0;f<a.r.length;f++){const p=a.r[f],h=u.r[f];if(p<h)return-1;if(p>h)return 1}return 0}).map(a=>a.q)}function Sf(o){const l=o.coordinator;return l?l.status==="stopped"?"stopped":l.responding?"live":"down":"none"}function Gg(o){const l=o.coordinator,a=typeof is(l==null?void 0:l.coordinator_session).name=="string"?String(is(l==null?void 0:l.coordinator_session).name):null;switch(Sf(o)){case"none":return"No coordinator: each session merges its own PRs. Start one with /caddis:coordinate.";case"stopped":return`Coordinator stopped at ${Fr(l==null?void 0:l.stopped_at)}. The last known queue is greyed.`;case"down":return`Coordinator not responding since ${Fr(l==null?void 0:l.heartbeat_at)}. The last known queue is greyed.`;case"live":return`Coordinator ${a??""} live, heartbeat ${Fr(l==null?void 0:l.heartbeat_at)}.`.replace(" "," ")}}function Xg(o){var a;const l=[];for(const u of Kn((a=o.coordinator)==null?void 0:a.deploy_checks)){const f=is(u);if(typeof f.pr!="number")continue;const p=is(f.checks),h=Object.keys(p).length?Kg.map(g=>({name:g,mark:typeof p[g]=="string"?String(p[g]):"skip"})):null;l.push({pr:f.pr,mergeSha:typeof f.merge_sha=="string"?f.merge_sha.slice(0,10):"",run:typeof f.deploy_run=="number"?f.deploy_run:null,health:typeof f.health=="string"?f.health:"unknown",at:typeof f.at=="string"?f.at:null,checks:h,reason:typeof f.reason=="string"&&f.reason?f.reason:null})}return l.reverse()}function Zg(o,l){var h,g;const a=Sf(l),u=cf(l),f=Yg(Hr(l)),p=new Set(f.map(v=>v.pr));return{mode:a,statusText:Gg(l),grey:a==="stopped"||a==="down",merging:a==="live"?u:null,queue:f.map((v,j)=>({...v,position:j+1,merging:v.state==="merging"||v.pr===u})),deploys:Xg(l),owner:uf(l),unqueued:(((h=l.github)==null?void 0:h.prs)??[]).filter(v=>!v.draft&&!p.has(v.number)).map(v=>({number:v.number,title:v.title,requiredState:v.required_state,headSha:v.head_sha})),requests:[...((g=l.coordinator)==null?void 0:g.requests)??[]].reverse()}}const Jg=D.createContext(null),ed={waiting:0,busy:1,working:1,idle:2},ey=o=>({key:o.key,name:o.name??o.session_id,kind:o.kind,agent:cs(o),status:o.status,waitingFor:o.waiting_for,waitingClass:o.waiting_class,since:o.waiting_since,copies:o.copies,copyWarning:o.copies>1?`${o.copies} copies`:null});function Nf(o,l){const a=o.sources.agents,u=!a.ok&&a.last_ok_at===null,f=o.sessions.filter(h=>St(h.repo_path,l.path)&&(!u||cs(h)!==null)).map(ey).sort((h,g)=>+(g.waitingClass==="owner")-+(h.waitingClass==="owner")||(ed[h.status]??3)-(ed[g.status]??3)||h.name.localeCompare(g.name));return{unknown:u&&f.length===0,error:a.ok?null:a.last_error,rows:f}}function ty(o,l){const a=Nf(o,l).rows.length;return a>0?`Sessions · ${a}`:"Sessions"}async function ny(o){try{return await navigator.clipboard.writeText(o),!0}catch{return!1}}const td={owner:"you",peer:"a peer session"};function ry({state:o,repo:l,nowMs:a}){const u=Nf(o,l),[f,p]=D.useState(null),h=async(g,v)=>{await ny(v)&&(p(g),window.setTimeout(()=>p(j=>j===g?null:j),2e3))};return d.jsxs("div",{className:"flow","data-testid":"sessions",children:[u.error&&d.jsxs("div",{className:"lane-note","data-testid":"sessions-error",children:[u.unknown?"Sessions unknown: ":"The last sessions read failed: ",u.error]}),u.unknown?d.jsx("p",{className:"col-empty",children:"The hub could not read the session list. PRs and deploys are on the Flow tab."}):u.rows.length===0?d.jsx("p",{className:"col-empty","data-testid":"sessions-empty",children:"No sessions running. PRs and deploys are on the Flow tab."}):d.jsx("ul",{className:"flow-list","data-testid":"sessions-table","aria-label":"Sessions of this repo",children:u.rows.map(g=>d.jsxs("li",{className:"flow-row","data-testid":"session-row",children:[d.jsxs("div",{className:"flow-row-head",children:[d.jsx("span",{className:"flow-title mono",children:g.name}),g.agent&&d.jsx("span",{className:"chip tone-muted","data-testid":"session-agent",children:g.agent}),d.jsx(vi,{content:g.waitingFor?`${g.status}: waiting for ${g.waitingClass?td[g.waitingClass]:"an answer"}: ${g.waitingFor}`:g.status,children:d.jsx("span",{className:`chip tone-${g.status==="waiting"?"warn":g.status==="busy"||g.status==="working"?"good":"muted"}`,tabIndex:0,children:g.status})}),g.copyWarning&&d.jsx("span",{className:"chip tone-bad","data-testid":"session-copies",children:g.copyWarning}),d.jsxs("button",{type:"button",className:"btn btn-act",onClick:()=>void h(g.key,g.name),"aria-label":`Copy session name ${g.name}`,children:[d.jsx(_i,{size:14,"aria-hidden":"true"}),f===g.key?"Copied":"Copy name"]})]}),d.jsxs("span",{className:"flow-why",children:[g.kind,g.waitingFor?` · waiting for ${g.waitingClass?td[g.waitingClass]:"an answer"}: ${g.waitingFor}`:"",g.since&&d.jsxs(d.Fragment,{children:[" · since ",d.jsx(vi,{content:Jd(g.since),children:d.jsx("time",{dateTime:g.since,tabIndex:0,children:xt(g.since,a)})})]})]}),g.copyWarning&&d.jsxs("span",{className:"flow-why tone-bad",children:["The same session runs in ",g.copies," windows. Close the extra copy."]})]},g.key))})]})}const oy=D.lazy(()=>as(()=>import("./RoadmapTab-DhC4-kqv.js"),[])),sy=[{id:"flow",label:"Flow"},{id:"roadmap",label:"Roadmap"},{id:"sessions",label:"Sessions"}],ly={ready:"good",merging:"good",blocked:"bad",held:"warn",ci:"muted",waiting:"muted"};function iy({repo:o,item:l,grey:a,act:u}){return d.jsxs("li",{className:`flow-row${a?" grey":""}`,"data-testid":"queue-item",children:[d.jsxs("div",{className:"flow-row-head",children:[d.jsx("span",{className:"flow-pos mono",children:l.position}),d.jsxs("span",{className:"flow-title",children:["#",l.pr," ",l.title]})]}),d.jsxs("div",{className:"flow-flags",children:[d.jsx("span",{className:`chip tone-${ly[l.state]??"muted"}`,children:l.state}),l.merging&&d.jsx("span",{className:"chip tone-good",children:"merging now"}),l.hotfix&&d.jsx("span",{className:"chip tone-warn","data-testid":"flag-hotfix",children:"hotfix"}),l.held&&d.jsx("span",{className:"chip tone-warn","data-testid":"flag-held",children:"held"})]}),l.whyWaiting&&d.jsx("span",{className:"flow-why",children:l.whyWaiting}),l.waitsOn.length>0&&d.jsxs("span",{className:"flow-why",children:["Waits on ",l.waitsOn.map(f=>`${f.repo.replace("__","/")}#${f.pr}`).join(", ")]}),d.jsx(Ei,{repo:o,specs:Hd(o,{pr:l.pr,headSha:l.headSha,hotfix:l.hotfix,held:l.held}),act:u})]})}function ay({state:o,repo:l,nowMs:a,act:u}){const f=Zg(o,l);return d.jsxs("div",{className:"flow","data-testid":"flow",children:[d.jsx("div",{className:`lane-note flow-status ${f.mode}`,"data-testid":"flow-status",children:f.statusText}),f.owner.length>0&&d.jsxs("section",{className:"flow-section","aria-label":"Owner approvals",children:[d.jsxs("h2",{className:"flow-h",children:["Needs your approval · ",f.owner.length]}),d.jsx("ul",{className:"flow-list",children:f.owner.map(p=>d.jsxs("li",{className:"flow-row","data-testid":"owner-item",children:[d.jsxs("span",{className:"flow-title",children:[p.pr!==null?`#${p.pr} `:"",p.what]}),d.jsx(Kd,{item:p}),d.jsx(Ei,{repo:l,specs:Bd(l,p),act:u,reason:bd(l,p)})]},p.id))})]}),d.jsxs("section",{className:"flow-section","aria-label":"Merge queue",children:[d.jsxs("h2",{className:"flow-h",children:["Merge queue · ",f.queue.length,f.grey?" · last known":""]}),f.mode==="none"?d.jsx("p",{className:"col-empty",children:"No queue: this repo has no coordinator."}):f.queue.length===0?d.jsx("p",{className:"col-empty",children:"The queue is empty."}):d.jsx("ol",{className:"flow-list",children:f.queue.map(p=>d.jsx(iy,{repo:l,item:p,grey:f.grey,act:u},p.pr))})]}),d.jsxs("section",{className:"flow-section","aria-label":"Deploy checks",children:[d.jsx("h2",{className:"flow-h",children:"Deploy checks"}),f.deploys.length===0?d.jsx("p",{className:"col-empty",children:"No deploy check recorded."}):d.jsx("ul",{className:"flow-list",children:f.deploys.map(p=>d.jsxs("li",{className:"flow-row","data-testid":"deploy-check",children:[d.jsxs("div",{className:"flow-row-head",children:[d.jsxs("span",{className:"flow-title",children:["#",p.pr," ",d.jsx("span",{className:"mono",children:p.mergeSha})]}),d.jsxs("span",{className:`chip tone-${p.health==="ok"?"good":p.health==="failed"?"bad":"muted"}`,children:["health ",p.health]})]}),p.checks&&d.jsx("div",{className:"flow-flags","data-testid":"deploy-marks",children:p.checks.map(h=>d.jsxs("span",{className:`chip tone-${h.mark==="pass"?"good":h.mark==="fail"?"bad":"muted"}`,children:[h.name," ",h.mark]},h.name))}),d.jsxs("span",{className:"flow-why",children:[p.run!==null?`run ${p.run} · `:"",xt(p.at,a),p.reason?` · ${p.reason}`:""]})]},`${p.pr}-${p.mergeSha}`))})]}),f.unqueued.length>0&&d.jsxs("section",{className:"flow-section","aria-label":"Open PRs not in the queue",children:[d.jsxs("h2",{className:"flow-h",children:["Open PRs not in the queue · ",f.unqueued.length]}),d.jsx("ul",{className:"flow-list",children:f.unqueued.map(p=>d.jsxs("li",{className:"flow-row","data-testid":"unqueued-pr",children:[d.jsxs("span",{className:"flow-title",children:["#",p.number," ",p.title]}),d.jsxs("span",{className:`flow-why tone-${p.requiredState==="fail"?"bad":p.requiredState==="pass"?"good":"muted"}`,children:["required checks ",p.requiredState]})]},p.number))})]}),f.requests.length>0&&d.jsxs("section",{className:"flow-section","aria-label":"Your requests",children:[d.jsx("h2",{className:"flow-h",children:"Your requests"}),d.jsx("ul",{className:"flow-list",children:f.requests.slice(0,10).map(p=>d.jsxs("li",{className:"flow-row","data-testid":"request-log",children:[d.jsx("span",{className:`tone-${Qd(p.status)}`,children:qd(p)}),d.jsxs("span",{className:"flow-why",children:[p.pr!==null?`PR #${p.pr}`:p.what," · ",xt(p.created_at,a)]})]},p.id))})]})]})}function uy({state:o,repo:l,nowMs:a,act:u,tab:f,roadmap:p}){const h=Br(l);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"page-header",children:[d.jsx("h1",{className:"page-title",children:kn(l)}),d.jsx("span",{className:"page-subtitle",children:l.name})]}),d.jsx("nav",{className:"repo-tabs",role:"tablist","aria-label":"Repo views",children:sy.map(g=>d.jsx("a",{role:"tab","aria-selected":f===g.id,"aria-current":f===g.id?"page":void 0,className:`folder-btn${f===g.id?" sel":""}`,href:ff(h,g.id),"data-testid":`tab-${g.id}`,children:g.id==="roadmap"?Ym(l):g.id==="sessions"?ty(o,l):g.label},g.id))}),f==="flow"&&d.jsx(ay,{state:o,repo:l,nowMs:a,act:u}),f==="roadmap"&&d.jsx(D.Suspense,{fallback:d.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:d.jsx(Jg.Provider,{value:Fh,children:d.jsx(oy,{repo:l,slug:p,stale:Gm(o),lastOkAt:o.sources.collector.last_ok_at},p??"")})}),f==="sessions"&&d.jsx(ry,{state:o,repo:l,nowMs:a})]})}const cy=1e4,dy=2e3;function fy(o,l){return o&&l&&l!==o?l:null}let ki=null;const xi=new Set,py=o=>(xi.add(o),()=>xi.delete(o));function hy(){return D.useSyncExternalStore(py,()=>ki)}function my(){const[o,l]=D.useState(null),[a,u]=D.useState(null),[f,p]=D.useState(!0),h=D.useRef(void 0),g=D.useRef(!0),v=D.useRef(null),j=D.useCallback(async()=>{var $,C;try{const L=await Ah();if(!g.current)return;l(L),u(null),v.current??(v.current=(($=L.versions)==null?void 0:$.hub)||null);const _=fy(v.current,(C=L.versions)==null?void 0:C.hub);_&&ki===null&&(ki=_,xi.forEach(F=>F()),window.setTimeout(()=>window.location.reload(),dy))}catch(L){if(!g.current)return;u(L instanceof mi&&L.status===401?"unauthorized":"network")}finally{g.current&&p(!1)}},[]);D.useEffect(()=>{g.current=!0;const $=()=>window.clearInterval(h.current),C=()=>{$(),h.current=window.setInterval(()=>void j(),cy)},L=()=>{document.hidden?$():(j(),C())};return j(),document.hidden||C(),document.addEventListener("visibilitychange",L),()=>{g.current=!1,$(),document.removeEventListener("visibilitychange",L)}},[j]);const E=D.useCallback(()=>void j(),[j]);return{state:o,error:a,loading:f,refresh:E}}const gy=1,nd={collector:"Plans and roadmaps",agents:"Claude sessions",github:"GitHub",coordinator:"Coordinator"};function yy(o){var u,f;const l=[];(o.schema>gy||o.update_needed)&&l.push({id:"schema",tone:"bad",text:"This hub is older than its data. Update the hub:",command:"npm i -g @caddis/cli@latest"});const a=(u=o.sources)==null?void 0:u.agents;a&&!a.ok&&l.push({id:"agents-failed",tone:"bad",text:`Session list unavailable: "claude agents" failed${a.last_error?` (${a.last_error})`:""}.`});for(const p of Object.keys(nd)){const h=(f=o.sources)==null?void 0:f[p];h!=null&&h.stale&&(p==="agents"&&!h.ok||l.push({id:`stale-${p}`,tone:"warn",text:`${nd[p]} data is stale. Last good read: ${h.last_ok_at?Fr(h.last_ok_at):"never"}.`}))}return l}function vy({state:o}){const l=yy(o),a=hy();return l.length===0&&!a?null:d.jsxs("div",{className:"banners",role:"region","aria-label":"Warnings",children:[a&&d.jsxs("div",{className:"banner warn",role:"status","data-testid":"banner-hub-updated",children:[d.jsx(gm,{size:16,"aria-hidden":"true"}),d.jsxs("span",{children:["caddis hub updated to ",a,", reloading"]})]}),l.map(u=>d.jsxs("div",{className:`banner ${u.tone}`,role:"status","data-testid":`banner-${u.id}`,children:[u.tone==="bad"?d.jsx(pm,{size:16,"aria-hidden":"true"}):d.jsx(Id,{size:16,"aria-hidden":"true"}),d.jsxs("span",{children:[u.text,u.command&&d.jsxs(d.Fragment,{children:[" ",d.jsx("code",{className:"cmd",children:u.command})]})]})]},u.id))]})}const _f="caddis-hub-motion",wy=["on","off"];function jf(){try{return window.localStorage}catch{return null}}function ky(o=jf()){try{return(o==null?void 0:o.getItem(_f))==="off"?"off":"on"}catch{return"on"}}function xy(o,l=jf()){try{l==null||l.setItem(_f,o)}catch{}}const Ef="caddis-hub-theme",Sy=["dark","light","system"];function Cf(){try{return window.localStorage}catch{return null}}function Ny(o=Cf()){try{const l=o==null?void 0:o.getItem(Ef);return l==="dark"||l==="light"||l==="system"?l:"system"}catch{return"system"}}function _y(o,l=Cf()){try{l==null||l.setItem(Ef,o)}catch{}}function jy(o,l){return o==="system"?l?"dark":"light":o}const Ey={dark:dm,light:wm,system:cm},Cy={on:mm,off:hm},$y={on:"motion",off:"still"};function Ty({state:o,nowMs:l,theme:a,onTheme:u,motion:f,onMotion:p}){const h=o==null?void 0:o.versions,g=Pm(o),v=Xd(o);return d.jsx("footer",{className:"sidebar-footer",children:d.jsxs("div",{className:"footer-card",children:[d.jsx(kf,{slot:o==null?void 0:o.spend,size:36}),d.jsxs("div",{className:"updated-line",children:[d.jsx(om,{size:13,"aria-hidden":"true"}),d.jsx("span",{"data-testid":"data-age",children:o?jm(o.generated_at,l):"Waiting for data"})]}),v&&!g&&d.jsxs("div",{className:"quota-line mono","data-testid":"quota",children:["GitHub quota ",v.remaining," left (",v.account,")"]}),g&&d.jsxs("div",{className:"quota-low","data-testid":"quota-low",role:"status",children:["GitHub quota low: ",g.remaining," left (",g.account,")",g.resetAt?`, resets ${Fr(g.resetAt)}`:"",". Polling slows."]}),h&&d.jsxs("div",{className:"versions mono",children:[d.jsxs("span",{className:"versions-item",children:["hub ",h.hub]}),d.jsxs("span",{className:"versions-item",children:["pool ",h.pool??"-"]}),d.jsxs("span",{className:"versions-item",children:["plugin ",h.plugin??"-"]})]}),d.jsxs("div",{className:"footer-toggles",children:[d.jsx("div",{className:"theme-switch",role:"group","aria-label":"Theme",children:Sy.map(j=>{const E=Ey[j];return d.jsxs("button",{type:"button",className:`theme-btn${a===j?" active":""}`,"aria-pressed":a===j,title:j,onClick:()=>u(j),children:[d.jsx(E,{size:14,"aria-hidden":"true"}),d.jsx("span",{children:j})]},j)})}),d.jsx("div",{className:"theme-switch",role:"group","aria-label":"Motion",children:wy.map(j=>{const E=Cy[j];return d.jsxs("button",{type:"button",className:`theme-btn${f===j?" active":""}`,"aria-pressed":f===j,title:j==="on"?"Animations on":"Animations off",onClick:()=>p(j),children:[d.jsx(E,{size:14,"aria-hidden":"true"}),d.jsx("span",{children:$y[j]})]},j)})})]})]})})}function Py(){return d.jsxs("div",{className:"skeleton","data-testid":"loading","aria-busy":"true","aria-label":"Loading",children:[d.jsx("div",{className:"sk-line sk-title"}),d.jsx("div",{className:"sk-block"}),d.jsx("div",{className:"sk-block"})]})}function Ry({onRetry:o}){return d.jsxs("div",{className:"notice","data-testid":"load-error",role:"status",children:[d.jsx("p",{children:"The hub did not answer. Retrying."}),d.jsx("button",{type:"button",className:"btn",onClick:o,children:"Retry now"})]})}const Ly="/assets/mark-anim-DZa95SHo.webp",zy="/assets/mark-still-CcPgBc_-.png",Dy="/assets/wordmark-CD0s2ofS.svg";function rd(){return d.jsxs("span",{className:"brand-logo",children:[d.jsx("img",{src:Ly,alt:"",width:36,height:36,className:"brand-mark brand-mark-anim"}),d.jsx("img",{src:zy,alt:"",width:36,height:36,className:"brand-mark brand-mark-still"}),d.jsxs("span",{className:"brand-stack",children:[d.jsx("img",{src:Dy,alt:"CADDIS",width:100,height:20,className:"brand-wordmark"}),d.jsx("span",{className:"brand-sub",children:"hub"})]})]})}const Oy="a[href], button";function Iy(o,l,a){return a?l<=0?o-1:l-1:l>=o-1?0:l+1}function My(o,l,a,u){const f=D.useRef(!1),p=D.useRef(l);p.current=l,D.useEffect(()=>{var v,j;if(!o){f.current&&((v=u.current)==null||v.focus()),f.current=!1;return}f.current=!0;const h=()=>{var E;return[...((E=a.current)==null?void 0:E.querySelectorAll(Oy))??[]]};(j=h()[0])==null||j.focus();const g=E=>{var L;if(E.key==="Escape"){p.current();return}if(E.key!=="Tab")return;const $=h();if($.length===0)return;E.preventDefault();const C=$.indexOf(document.activeElement);(L=$[Iy($.length,C,E.shiftKey)])==null||L.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o,a,u])}const Ay=[["poster","Poster"],["details","Details"],["wall","Wall poster"],["map","Map"]];function Fy(o,l){var f;return o.error||(f=o.github)!=null&&f.error?"blocked":l.sessions.some(p=>p.repo_path===o.path&&p.waiting_class==="owner")||o.coordinator&&l.sources.coordinator.stale?"attention":!o.coordinator&&!l.sessions.some(p=>p.repo_path===o.path)?"idle":"ok"}function Ar({href:o,active:l,icon:a,label:u,badge:f,hint:p,onGo:h}){return d.jsx("li",{children:d.jsxs("a",{className:`nav-link${l?" active":""}`,href:o,"aria-current":l?"page":void 0,onClick:h,children:[d.jsxs("span",{className:"nav-link-left",children:[a,d.jsx("span",{className:"nav-text",children:u})]}),p&&d.jsx("span",{className:"nav-hint",children:p}),f]})})}function Uy({route:o,state:l,inbox:a,open:u,onToggle:f,onJump:p,children:h}){const g=()=>f(!1),v=D.useRef(null),j=D.useRef(null);return My(u,g,v,j),d.jsxs(d.Fragment,{children:[d.jsxs("header",{className:"mobile-topbar",children:[d.jsxs("button",{ref:j,type:"button",className:"menu-btn","aria-label":u?"Close navigation menu":"Open navigation menu","aria-expanded":u,"aria-controls":"app-sidebar",onClick:()=>f(!u),children:[u?d.jsx(xm,{size:18}):d.jsx(um,{size:18}),d.jsx("span",{children:"Menu"})]}),d.jsx(rd,{})]}),d.jsx("div",{className:`drawer-backdrop${u?" open":""}`,onClick:g,"aria-hidden":"true"}),d.jsxs("aside",{ref:v,className:`sidebar${u?" drawer-open":""}`,id:"app-sidebar",role:u?"dialog":void 0,"aria-modal":u?!0:void 0,"aria-label":u?"Navigation":void 0,children:[d.jsxs("nav",{className:"sidebar-top","aria-label":"Main",children:[d.jsx("div",{className:"brand-row",children:d.jsx(rd,{})}),p&&d.jsxs("button",{type:"button",className:"jump-btn","aria-keyshortcuts":"Control+K Meta+K",onClick:E=>{const $=u?j.current:E.currentTarget;u&&g(),p($)},children:[d.jsx(ym,{size:15,"aria-hidden":"true"}),d.jsx("span",{className:"jump-text",children:"Jump to anything"}),d.jsx("kbd",{children:"Ctrl K"})]}),d.jsxs("ul",{className:"nav-list",children:[d.jsx(Ar,{href:"#/inbox",active:o.page==="inbox",icon:d.jsx(im,{size:18}),label:"Inbox",badge:a>0?d.jsx("span",{className:"inbox-badge",children:a}):void 0,onGo:g}),d.jsx(Ar,{href:"#/overview",active:o.page==="overview",icon:d.jsx(am,{size:18}),label:"Overview",onGo:g}),d.jsx(Ar,{href:"#/activity",active:o.page==="activity",icon:d.jsx(Jh,{size:18}),label:"Activity",onGo:g}),d.jsx(Ar,{href:"#/guide",active:o.page==="guide",icon:d.jsx(rm,{size:18}),label:"caddis guide",onGo:g}),o.page==="guide"&&d.jsx("li",{children:d.jsx("ul",{className:"nav-sublist","aria-label":"caddis guide pages",children:Ay.map(([E,$])=>{const C=o.tab===E;return d.jsx("li",{children:d.jsx("a",{className:`nav-link nav-sublink${C?" active":""}`,href:fg(E),"aria-current":C?"true":void 0,onClick:g,children:d.jsx("span",{className:"nav-text",children:$})})},E)})})})]}),d.jsx("div",{className:"nav-section-label",children:"Repos"}),d.jsxs("ul",{className:"nav-list",children:[(l==null?void 0:l.repos.length)===0&&d.jsx("li",{className:"nav-empty",children:"No repos yet"}),l==null?void 0:l.repos.map(E=>{const $=Br(E),C=o.page==="repo"&&o.id===$;return d.jsx(Ar,{href:ls($),active:C,icon:d.jsx("span",{className:`repo-dot ${Fy(E,l)}${Ri(l,E)?" working":""}`,"aria-hidden":"true"}),label:E.name,hint:Cg(l,E),onGo:g},E.path)})]})]}),h]})]})}const Hy="/assets/favicon-DtHQyAC1.svg",By="/assets/favicon-dot-DHAVYP15.svg",Wy=o=>o?By:Hy;function Vy(o){let l=document.querySelector('link[rel="icon"]');l||(l=document.createElement("link"),l.rel="icon",document.head.appendChild(l)),l.type="image/svg+xml",l.href=Wy(o)}const by=()=>{var o;return((o=window.matchMedia)==null?void 0:o.call(window,"(prefers-color-scheme: dark)").matches)??!0};function qy(){const[o,l]=D.useState(()=>Ny());return D.useEffect(()=>{const a=()=>{document.documentElement.dataset.theme=jy(o,by())};if(a(),o!=="system"||!window.matchMedia)return;const u=window.matchMedia("(prefers-color-scheme: dark)");return u.addEventListener("change",a),()=>u.removeEventListener("change",a)},[o]),[o,a=>{_y(a),l(a)}]}function Qy(){const[o,l]=D.useState(()=>ky());return D.useEffect(()=>{document.documentElement.dataset.motion=o},[o]),[o,a=>{xy(a),l(a)}]}const Ky=D.lazy(()=>as(()=>import("./Guide-CnL1DiTr.js"),__vite__mapDeps([3,4])).then(o=>({default:o.Guide}))),Yy=D.lazy(()=>as(()=>import("./Activity-B816JVqx.js"),__vite__mapDeps([5,1])));function Gy(o){const[l,a]=D.useState(()=>Date.now());return D.useEffect(()=>{const u=window.setInterval(()=>a(Date.now()),o);return()=>window.clearInterval(u)},[o]),l}function Xy(){const[o,l]=D.useState(()=>window.location.hash);return D.useEffect(()=>{const a=()=>l(window.location.hash);return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]),dg(o)}function Zy(){const{state:o,error:l,loading:a,refresh:u}=my(),f=Bh(u),p=Gy(5e3),h=Xy(),[g,v]=qy(),[j,E]=Qy(),[$,C]=D.useState(!1),L=qg(),_=_g(o,p),F=_.model.items.length;D.useEffect(()=>{document.title=_m(F),Vy(F>0)},[F]);let M;if(l==="unauthorized")M=d.jsxs("div",{className:"notice","data-testid":"signin",children:[d.jsx("h1",{className:"page-title",children:"Signed out"}),d.jsxs("p",{children:["Run ",d.jsx("code",{className:"cmd",children:"caddis hub open"})," to sign in."]})]});else if(!o)M=a?d.jsx(Py,{}):d.jsx(Ry,{onRetry:u});else if(h.page==="inbox")M=d.jsx(kg,{state:o,nowMs:p,api:_,act:f,item:h.item});else if(h.page==="overview")M=d.jsx(Wg,{state:o,nowMs:p,api:_});else if(h.page==="repo"){const te=o.repos.find(X=>Br(X)===h.id);M=te?d.jsx(uy,{state:o,repo:te,nowMs:p,act:f,tab:h.tab,roadmap:h.roadmap},h.id):d.jsxs("div",{className:"notice",children:[d.jsx("h1",{className:"page-title",children:h.id}),d.jsx("p",{children:"This repo is not in the hub registry."})]})}else h.page==="guide"?M=d.jsx(D.Suspense,{fallback:d.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:d.jsx(Ky,{guide:o.guide,versions:o.versions,tab:h.tab,item:h.item})}):M=d.jsx(D.Suspense,{fallback:d.jsx("p",{className:"page-subtitle",children:"Loading..."}),children:d.jsx(Yy,{state:o})});return d.jsxs("div",{className:"app-shell",children:[d.jsx(Uy,{route:h,state:o,inbox:F,open:$,onToggle:C,onJump:L.show,children:d.jsx(Ty,{state:o,nowMs:p,theme:g,onTheme:v,motion:j,onMotion:E})}),d.jsx("main",{className:"main-area",id:"main-content",children:d.jsxs("div",{className:"page-wrap",children:[o&&d.jsx(vy,{state:o}),l==="network"&&o&&d.jsx("div",{className:"banner warn",role:"status",children:"The hub did not answer. Showing the last data."}),M]})}),d.jsx(Qg,{pal:L,state:o,inbox:_.model.items,nowMs:p})]})}Ih();const od=document.getElementById("root");od&&Rh.createRoot(od).render(d.jsx(D.StrictMode,{children:d.jsx(Zy,{})}));export{nv as A,av as B,_i as C,Kg as D,Xn as E,Fr as F,lm as G,fv as H,im as I,cv as J,wi as K,am as L,dv as M,ev as N,fm as O,Jg as P,tv as Q,Gm as R,ym as S,Dd as T,Kn as a,Br as b,kn as c,ff as d,ge as e,xt as f,fg as g,pv as h,mv as i,d as j,uv as k,Jd as l,Rm as m,vi as n,Fm as o,iv as p,sf as q,D as r,St as s,Jy as t,lv as u,ov as v,hv as w,Hm as x,rv as y,sv as z};