@appkit/llamacpp-cli 1.12.0 → 1.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +217 -168
  2. package/package.json +10 -2
  3. package/web/dist/assets/index-Bin89Lwr.css +1 -0
  4. package/web/dist/assets/index-CVmonw3T.js +17 -0
  5. package/web/{index.html → dist/index.html} +2 -1
  6. package/.versionrc.json +0 -16
  7. package/CHANGELOG.md +0 -213
  8. package/docs/images/.gitkeep +0 -1
  9. package/docs/images/web-ui-servers.png +0 -0
  10. package/src/cli.ts +0 -523
  11. package/src/commands/admin/config.ts +0 -121
  12. package/src/commands/admin/logs.ts +0 -91
  13. package/src/commands/admin/restart.ts +0 -26
  14. package/src/commands/admin/start.ts +0 -27
  15. package/src/commands/admin/status.ts +0 -84
  16. package/src/commands/admin/stop.ts +0 -16
  17. package/src/commands/config-global.ts +0 -38
  18. package/src/commands/config.ts +0 -323
  19. package/src/commands/create.ts +0 -183
  20. package/src/commands/delete.ts +0 -74
  21. package/src/commands/list.ts +0 -37
  22. package/src/commands/logs-all.ts +0 -251
  23. package/src/commands/logs.ts +0 -345
  24. package/src/commands/monitor.ts +0 -110
  25. package/src/commands/ps.ts +0 -84
  26. package/src/commands/pull.ts +0 -44
  27. package/src/commands/rm.ts +0 -107
  28. package/src/commands/router/config.ts +0 -116
  29. package/src/commands/router/logs.ts +0 -256
  30. package/src/commands/router/restart.ts +0 -36
  31. package/src/commands/router/start.ts +0 -60
  32. package/src/commands/router/status.ts +0 -119
  33. package/src/commands/router/stop.ts +0 -33
  34. package/src/commands/run.ts +0 -233
  35. package/src/commands/search.ts +0 -107
  36. package/src/commands/server-show.ts +0 -161
  37. package/src/commands/show.ts +0 -207
  38. package/src/commands/start.ts +0 -101
  39. package/src/commands/stop.ts +0 -39
  40. package/src/commands/tui.ts +0 -25
  41. package/src/lib/admin-manager.ts +0 -435
  42. package/src/lib/admin-server.ts +0 -1243
  43. package/src/lib/config-generator.ts +0 -130
  44. package/src/lib/download-job-manager.ts +0 -213
  45. package/src/lib/history-manager.ts +0 -172
  46. package/src/lib/launchctl-manager.ts +0 -225
  47. package/src/lib/metrics-aggregator.ts +0 -257
  48. package/src/lib/model-downloader.ts +0 -328
  49. package/src/lib/model-scanner.ts +0 -157
  50. package/src/lib/model-search.ts +0 -114
  51. package/src/lib/models-dir-setup.ts +0 -46
  52. package/src/lib/port-manager.ts +0 -80
  53. package/src/lib/router-logger.ts +0 -201
  54. package/src/lib/router-manager.ts +0 -414
  55. package/src/lib/router-server.ts +0 -538
  56. package/src/lib/state-manager.ts +0 -206
  57. package/src/lib/status-checker.ts +0 -113
  58. package/src/lib/system-collector.ts +0 -315
  59. package/src/tui/ConfigApp.ts +0 -1085
  60. package/src/tui/HistoricalMonitorApp.ts +0 -587
  61. package/src/tui/ModelsApp.ts +0 -368
  62. package/src/tui/MonitorApp.ts +0 -386
  63. package/src/tui/MultiServerMonitorApp.ts +0 -1833
  64. package/src/tui/RootNavigator.ts +0 -74
  65. package/src/tui/SearchApp.ts +0 -511
  66. package/src/tui/SplashScreen.ts +0 -149
  67. package/src/types/admin-config.ts +0 -25
  68. package/src/types/global-config.ts +0 -26
  69. package/src/types/history-types.ts +0 -39
  70. package/src/types/model-info.ts +0 -8
  71. package/src/types/monitor-types.ts +0 -162
  72. package/src/types/router-config.ts +0 -25
  73. package/src/types/server-config.ts +0 -46
  74. package/src/utils/downsample-utils.ts +0 -128
  75. package/src/utils/file-utils.ts +0 -146
  76. package/src/utils/format-utils.ts +0 -98
  77. package/src/utils/log-parser.ts +0 -284
  78. package/src/utils/log-utils.ts +0 -178
  79. package/src/utils/process-utils.ts +0 -316
  80. package/src/utils/prompt-utils.ts +0 -47
  81. package/test-load.sh +0 -100
  82. package/tsconfig.json +0 -20
  83. package/web/eslint.config.js +0 -23
  84. package/web/llamacpp-web-dist.tar.gz +0 -0
  85. package/web/package-lock.json +0 -4017
  86. package/web/package.json +0 -38
  87. package/web/postcss.config.js +0 -6
  88. package/web/src/App.css +0 -42
  89. package/web/src/App.tsx +0 -86
  90. package/web/src/assets/react.svg +0 -1
  91. package/web/src/components/ApiKeyPrompt.tsx +0 -71
  92. package/web/src/components/CreateServerModal.tsx +0 -372
  93. package/web/src/components/DownloadProgress.tsx +0 -123
  94. package/web/src/components/Nav.tsx +0 -89
  95. package/web/src/components/RouterConfigModal.tsx +0 -240
  96. package/web/src/components/SearchModal.tsx +0 -306
  97. package/web/src/components/ServerConfigModal.tsx +0 -291
  98. package/web/src/hooks/useApi.ts +0 -259
  99. package/web/src/index.css +0 -42
  100. package/web/src/lib/api.ts +0 -226
  101. package/web/src/main.tsx +0 -10
  102. package/web/src/pages/Dashboard.tsx +0 -103
  103. package/web/src/pages/Models.tsx +0 -258
  104. package/web/src/pages/Router.tsx +0 -270
  105. package/web/src/pages/RouterLogs.tsx +0 -201
  106. package/web/src/pages/ServerLogs.tsx +0 -553
  107. package/web/src/pages/Servers.tsx +0 -358
  108. package/web/src/types/api.ts +0 -140
  109. package/web/tailwind.config.js +0 -31
  110. package/web/tsconfig.app.json +0 -28
  111. package/web/tsconfig.json +0 -7
  112. package/web/tsconfig.node.json +0 -26
  113. package/web/vite.config.ts +0 -25
  114. /package/web/{public → dist}/vite.svg +0 -0
@@ -0,0 +1,17 @@
1
+ (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const y of h.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&c(y)}).observe(document,{childList:!0,subtree:!0});function r(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=r(d);fetch(d.href,h)}})();var kr={exports:{}},Jn={};var Oh;function vg(){if(Oh)return Jn;Oh=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(c,d,h){var y=null;if(h!==void 0&&(y=""+h),d.key!==void 0&&(y=""+d.key),"key"in d){h={};for(var v in d)v!=="key"&&(h[v]=d[v])}else h=d;return d=h.ref,{$$typeof:n,type:c,key:y,ref:d!==void 0?d:null,props:h}}return Jn.Fragment=s,Jn.jsx=r,Jn.jsxs=r,Jn}var zh;function xg(){return zh||(zh=1,kr.exports=vg()),kr.exports}var o=xg(),Jr={exports:{}},ae={};var _h;function bg(){if(_h)return ae;_h=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),T=Symbol.iterator;function Q(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,D={};function K(N,L,k){this.props=N,this.context=L,this.refs=D,this.updater=k||w}K.prototype.isReactComponent={},K.prototype.setState=function(N,L){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,L,"setState")},K.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Y(){}Y.prototype=K.prototype;function Z(N,L,k){this.props=N,this.context=L,this.refs=D,this.updater=k||w}var X=Z.prototype=new Y;X.constructor=Z,O(X,K.prototype),X.isPureReactComponent=!0;var W=Array.isArray;function le(){}var G={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function te(N,L,k){var F=k.ref;return{$$typeof:n,type:N,key:L,ref:F!==void 0?F:null,props:k}}function _e(N,L){return te(N.type,L,N.props)}function se(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function ge(N){var L={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(k){return L[k]})}var Je=/\/+/g;function Et(N,L){return typeof N=="object"&&N!==null&&N.key!=null?ge(""+N.key):L.toString(36)}function Ke(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(le,le):(N.status="pending",N.then(function(L){N.status==="pending"&&(N.status="fulfilled",N.value=L)},function(L){N.status==="pending"&&(N.status="rejected",N.reason=L)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function _(N,L,k,F,ne){var re=typeof N;(re==="undefined"||re==="boolean")&&(N=null);var ve=!1;if(N===null)ve=!0;else switch(re){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(N.$$typeof){case n:case s:ve=!0;break;case E:return ve=N._init,_(ve(N._payload),L,k,F,ne)}}if(ve)return ne=ne(N),ve=F===""?"."+Et(N,0):F,W(ne)?(k="",ve!=null&&(k=ve.replace(Je,"$&/")+"/"),_(ne,L,k,"",function(en){return en})):ne!=null&&(se(ne)&&(ne=_e(ne,k+(ne.key==null||N&&N.key===ne.key?"":(""+ne.key).replace(Je,"$&/")+"/")+ve)),L.push(ne)),1;ve=0;var tt=F===""?".":F+":";if(W(N))for(var qe=0;qe<N.length;qe++)F=N[qe],re=tt+Et(F,qe),ve+=_(F,L,k,re,ne);else if(qe=Q(N),typeof qe=="function")for(N=qe.call(N),qe=0;!(F=N.next()).done;)F=F.value,re=tt+Et(F,qe++),ve+=_(F,L,k,re,ne);else if(re==="object"){if(typeof N.then=="function")return _(Ke(N),L,k,F,ne);throw L=String(N),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ve}function V(N,L,k){if(N==null)return N;var F=[],ne=0;return _(N,F,"","",function(re){return L.call(k,re,ne++)}),F}function ee(N){if(N._status===-1){var L=N._result;L=L(),L.then(function(k){(N._status===0||N._status===-1)&&(N._status=1,N._result=k)},function(k){(N._status===0||N._status===-1)&&(N._status=2,N._result=k)}),N._status===-1&&(N._status=0,N._result=L)}if(N._status===1)return N._result.default;throw N._result}var Se=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Te={map:V,forEach:function(N,L,k){V(N,function(){L.apply(this,arguments)},k)},count:function(N){var L=0;return V(N,function(){L++}),L},toArray:function(N){return V(N,function(L){return L})||[]},only:function(N){if(!se(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ae.Activity=j,ae.Children=Te,ae.Component=K,ae.Fragment=r,ae.Profiler=d,ae.PureComponent=Z,ae.StrictMode=c,ae.Suspense=p,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,ae.__COMPILER_RUNTIME={__proto__:null,c:function(N){return G.H.useMemoCache(N)}},ae.cache=function(N){return function(){return N.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(N,L,k){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var F=O({},N.props),ne=N.key;if(L!=null)for(re in L.key!==void 0&&(ne=""+L.key),L)!B.call(L,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&L.ref===void 0||(F[re]=L[re]);var re=arguments.length-2;if(re===1)F.children=k;else if(1<re){for(var ve=Array(re),tt=0;tt<re;tt++)ve[tt]=arguments[tt+2];F.children=ve}return te(N.type,ne,F)},ae.createContext=function(N){return N={$$typeof:y,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ae.createElement=function(N,L,k){var F,ne={},re=null;if(L!=null)for(F in L.key!==void 0&&(re=""+L.key),L)B.call(L,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ne[F]=L[F]);var ve=arguments.length-2;if(ve===1)ne.children=k;else if(1<ve){for(var tt=Array(ve),qe=0;qe<ve;qe++)tt[qe]=arguments[qe+2];ne.children=tt}if(N&&N.defaultProps)for(F in ve=N.defaultProps,ve)ne[F]===void 0&&(ne[F]=ve[F]);return te(N,re,ne)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(N){return{$$typeof:v,render:N}},ae.isValidElement=se,ae.lazy=function(N){return{$$typeof:E,_payload:{_status:-1,_result:N},_init:ee}},ae.memo=function(N,L){return{$$typeof:g,type:N,compare:L===void 0?null:L}},ae.startTransition=function(N){var L=G.T,k={};G.T=k;try{var F=N(),ne=G.S;ne!==null&&ne(k,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(le,Se)}catch(re){Se(re)}finally{L!==null&&k.types!==null&&(L.types=k.types),G.T=L}},ae.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},ae.use=function(N){return G.H.use(N)},ae.useActionState=function(N,L,k){return G.H.useActionState(N,L,k)},ae.useCallback=function(N,L){return G.H.useCallback(N,L)},ae.useContext=function(N){return G.H.useContext(N)},ae.useDebugValue=function(){},ae.useDeferredValue=function(N,L){return G.H.useDeferredValue(N,L)},ae.useEffect=function(N,L){return G.H.useEffect(N,L)},ae.useEffectEvent=function(N){return G.H.useEffectEvent(N)},ae.useId=function(){return G.H.useId()},ae.useImperativeHandle=function(N,L,k){return G.H.useImperativeHandle(N,L,k)},ae.useInsertionEffect=function(N,L){return G.H.useInsertionEffect(N,L)},ae.useLayoutEffect=function(N,L){return G.H.useLayoutEffect(N,L)},ae.useMemo=function(N,L){return G.H.useMemo(N,L)},ae.useOptimistic=function(N,L){return G.H.useOptimistic(N,L)},ae.useReducer=function(N,L,k){return G.H.useReducer(N,L,k)},ae.useRef=function(N){return G.H.useRef(N)},ae.useState=function(N){return G.H.useState(N)},ae.useSyncExternalStore=function(N,L,k){return G.H.useSyncExternalStore(N,L,k)},ae.useTransition=function(){return G.H.useTransition()},ae.version="19.2.4",ae}var Dh;function hc(){return Dh||(Dh=1,Jr.exports=bg()),Jr.exports}var S=hc(),Fr={exports:{}},Fn={},$r={exports:{}},Wr={};var Uh;function Sg(){return Uh||(Uh=1,(function(n){function s(_,V){var ee=_.length;_.push(V);e:for(;0<ee;){var Se=ee-1>>>1,Te=_[Se];if(0<d(Te,V))_[Se]=V,_[ee]=Te,ee=Se;else break e}}function r(_){return _.length===0?null:_[0]}function c(_){if(_.length===0)return null;var V=_[0],ee=_.pop();if(ee!==V){_[0]=ee;e:for(var Se=0,Te=_.length,N=Te>>>1;Se<N;){var L=2*(Se+1)-1,k=_[L],F=L+1,ne=_[F];if(0>d(k,ee))F<Te&&0>d(ne,k)?(_[Se]=ne,_[F]=ee,Se=F):(_[Se]=k,_[L]=ee,Se=L);else if(F<Te&&0>d(ne,ee))_[Se]=ne,_[F]=ee,Se=F;else break e}}return V}function d(_,V){var ee=_.sortIndex-V.sortIndex;return ee!==0?ee:_.id-V.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var y=Date,v=y.now();n.unstable_now=function(){return y.now()-v}}var p=[],g=[],E=1,j=null,T=3,Q=!1,w=!1,O=!1,D=!1,K=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function X(_){for(var V=r(g);V!==null;){if(V.callback===null)c(g);else if(V.startTime<=_)c(g),V.sortIndex=V.expirationTime,s(p,V);else break;V=r(g)}}function W(_){if(O=!1,X(_),!w)if(r(p)!==null)w=!0,le||(le=!0,ge());else{var V=r(g);V!==null&&Ke(W,V.startTime-_)}}var le=!1,G=-1,B=5,te=-1;function _e(){return D?!0:!(n.unstable_now()-te<B)}function se(){if(D=!1,le){var _=n.unstable_now();te=_;var V=!0;try{e:{w=!1,O&&(O=!1,Y(G),G=-1),Q=!0;var ee=T;try{t:{for(X(_),j=r(p);j!==null&&!(j.expirationTime>_&&_e());){var Se=j.callback;if(typeof Se=="function"){j.callback=null,T=j.priorityLevel;var Te=Se(j.expirationTime<=_);if(_=n.unstable_now(),typeof Te=="function"){j.callback=Te,X(_),V=!0;break t}j===r(p)&&c(p),X(_)}else c(p);j=r(p)}if(j!==null)V=!0;else{var N=r(g);N!==null&&Ke(W,N.startTime-_),V=!1}}break e}finally{j=null,T=ee,Q=!1}V=void 0}}finally{V?ge():le=!1}}}var ge;if(typeof Z=="function")ge=function(){Z(se)};else if(typeof MessageChannel<"u"){var Je=new MessageChannel,Et=Je.port2;Je.port1.onmessage=se,ge=function(){Et.postMessage(null)}}else ge=function(){K(se,0)};function Ke(_,V){G=K(function(){_(n.unstable_now())},V)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(_){_.callback=null},n.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(_){switch(T){case 1:case 2:case 3:var V=3;break;default:V=T}var ee=T;T=V;try{return _()}finally{T=ee}},n.unstable_requestPaint=function(){D=!0},n.unstable_runWithPriority=function(_,V){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var ee=T;T=_;try{return V()}finally{T=ee}},n.unstable_scheduleCallback=function(_,V,ee){var Se=n.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Se+ee:Se):ee=Se,_){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=ee+Te,_={id:E++,callback:V,priorityLevel:_,startTime:ee,expirationTime:Te,sortIndex:-1},ee>Se?(_.sortIndex=ee,s(g,_),r(p)===null&&_===r(g)&&(O?(Y(G),G=-1):O=!0,Ke(W,ee-Se))):(_.sortIndex=Te,s(p,_),w||Q||(w=!0,le||(le=!0,ge()))),_},n.unstable_shouldYield=_e,n.unstable_wrapCallback=function(_){var V=T;return function(){var ee=T;T=V;try{return _.apply(this,arguments)}finally{T=ee}}}})(Wr)),Wr}var qh;function jg(){return qh||(qh=1,$r.exports=Sg()),$r.exports}var Pr={exports:{}},et={};var Hh;function Ng(){if(Hh)return et;Hh=1;var n=hc();function s(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)g+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function h(p,g,E){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:j==null?null:""+j,children:p,containerInfo:g,implementation:E}}var y=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,et.createPortal=function(p,g){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return h(p,g,null,E)},et.flushSync=function(p){var g=y.T,E=c.p;try{if(y.T=null,c.p=2,p)return p()}finally{y.T=g,c.p=E,c.d.f()}},et.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(p,g))},et.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},et.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var E=g.as,j=v(E,g.crossOrigin),T=typeof g.integrity=="string"?g.integrity:void 0,Q=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;E==="style"?c.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:j,integrity:T,fetchPriority:Q}):E==="script"&&c.d.X(p,{crossOrigin:j,integrity:T,fetchPriority:Q,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},et.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var E=v(g.as,g.crossOrigin);c.d.M(p,{crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&c.d.M(p)},et.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var E=g.as,j=v(E,g.crossOrigin);c.d.L(p,E,{crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},et.preloadModule=function(p,g){if(typeof p=="string")if(g){var E=v(g.as,g.crossOrigin);c.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else c.d.m(p)},et.requestFormReset=function(p){c.d.r(p)},et.unstable_batchedUpdates=function(p,g){return p(g)},et.useFormState=function(p,g,E){return y.H.useFormState(p,g,E)},et.useFormStatus=function(){return y.H.useHostTransitionStatus()},et.version="19.2.4",et}var Lh;function Eg(){if(Lh)return Pr.exports;Lh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Pr.exports=Ng(),Pr.exports}var Bh;function Cg(){if(Bh)return Fn;Bh=1;var n=jg(),s=hc(),r=Eg();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function y(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(h(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,l=t;;){var i=a.return;if(i===null)break;var u=i.alternate;if(u===null){if(l=i.return,l!==null){a=l;continue}break}if(i.child===u.child){for(u=i.child;u;){if(u===a)return p(i),e;if(u===l)return p(i),t;u=u.sibling}throw Error(c(188))}if(a.return!==l.return)a=i,l=u;else{for(var f=!1,m=i.child;m;){if(m===a){f=!0,a=i,l=u;break}if(m===l){f=!0,l=i,a=u;break}m=m.sibling}if(!f){for(m=u.child;m;){if(m===a){f=!0,a=u,l=i;break}if(m===l){f=!0,l=u,a=i;break}m=m.sibling}if(!f)throw Error(c(189))}}if(a.alternate!==l)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,T=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),le=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),_e=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var Je=Symbol.for("react.client.reference");function Et(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case K:return"Profiler";case D:return"StrictMode";case W:return"Suspense";case le:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case Z:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:Et(e.type)||"Memo";case B:t=e._payload,e=e._init;try{return Et(e(t))}catch{}}return null}var Ke=Array.isArray,_=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Se=[],Te=-1;function N(e){return{current:e}}function L(e){0>Te||(e.current=Se[Te],Se[Te]=null,Te--)}function k(e,t){Te++,Se[Te]=e.current,e.current=t}var F=N(null),ne=N(null),re=N(null),ve=N(null);function tt(e,t){switch(k(re,t),k(ne,e),k(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?eh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=eh(t),e=th(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(F),k(F,e)}function qe(){L(F),L(ne),L(re)}function en(e){e.memoizedState!==null&&k(ve,e);var t=F.current,a=th(t,e.type);t!==a&&(k(ne,e),k(F,a))}function ai(e){ne.current===e&&(L(F),L(ne)),ve.current===e&&(L(ve),Xn._currentValue=ee)}var Mu,Rc;function Qa(e){if(Mu===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Mu=t&&t[1]||"",Rc=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Mu+e+Rc}var Au=!1;function Ou(e,t){if(!e||Au)return"";Au=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(z){var A=z}Reflect.construct(e,[],H)}else{try{H.call()}catch(z){A=z}e.call(H.prototype)}}else{try{throw Error()}catch(z){A=z}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(z){if(z&&A&&typeof z.stack=="string")return[z.stack,A.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),f=u[0],m=u[1];if(f&&m){var x=f.split(`
4
+ `),M=m.split(`
5
+ `);for(i=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;i<M.length&&!M[i].includes("DetermineComponentFrameRoot");)i++;if(l===x.length||i===M.length)for(l=x.length-1,i=M.length-1;1<=l&&0<=i&&x[l]!==M[i];)i--;for(;1<=l&&0<=i;l--,i--)if(x[l]!==M[i]){if(l!==1||i!==1)do if(l--,i--,0>i||x[l]!==M[i]){var U=`
6
+ `+x[l].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=l&&0<=i);break}}}finally{Au=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Qa(a):""}function Fm(e,t){switch(e.tag){case 26:case 27:case 5:return Qa(e.type);case 16:return Qa("Lazy");case 13:return e.child!==t&&t!==null?Qa("Suspense Fallback"):Qa("Suspense");case 19:return Qa("SuspenseList");case 0:case 15:return Ou(e.type,!1);case 11:return Ou(e.type.render,!1);case 1:return Ou(e.type,!0);case 31:return Qa("Activity");default:return""}}function Mc(e){try{var t="",a=null;do t+=Fm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var zu=Object.prototype.hasOwnProperty,_u=n.unstable_scheduleCallback,Du=n.unstable_cancelCallback,$m=n.unstable_shouldYield,Wm=n.unstable_requestPaint,ht=n.unstable_now,Pm=n.unstable_getCurrentPriorityLevel,Ac=n.unstable_ImmediatePriority,Oc=n.unstable_UserBlockingPriority,li=n.unstable_NormalPriority,Im=n.unstable_LowPriority,zc=n.unstable_IdlePriority,e0=n.log,t0=n.unstable_setDisableYieldValue,tn=null,mt=null;function ma(e){if(typeof e0=="function"&&t0(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(tn,e)}catch{}}var yt=Math.clz32?Math.clz32:n0,a0=Math.log,l0=Math.LN2;function n0(e){return e>>>=0,e===0?32:31-(a0(e)/l0|0)|0}var ni=256,ii=262144,ui=4194304;function Ya(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function si(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var i=0,u=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~u,l!==0?i=Ya(l):(f&=m,f!==0?i=Ya(f):a||(a=m&~e,a!==0&&(i=Ya(a))))):(m=l&~u,m!==0?i=Ya(m):f!==0?i=Ya(f):a||(a=l&~e,a!==0&&(i=Ya(a)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:i}function an(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function i0(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _c(){var e=ui;return ui<<=1,(ui&62914560)===0&&(ui=4194304),e}function Uu(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ln(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function u0(e,t,a,l,i,u){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var m=e.entanglements,x=e.expirationTimes,M=e.hiddenUpdates;for(a=f&~a;0<a;){var U=31-yt(a),H=1<<U;m[U]=0,x[U]=-1;var A=M[U];if(A!==null)for(M[U]=null,U=0;U<A.length;U++){var z=A[U];z!==null&&(z.lane&=-536870913)}a&=~H}l!==0&&Dc(e,l,0),u!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=u&~(f&~t))}function Dc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-yt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Uc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-yt(a),i=1<<l;i&t|e[l]&t&&(e[l]|=t),a&=~i}}function qc(e,t){var a=t&-t;return a=(a&42)!==0?1:qu(a),(a&(e.suspendedLanes|t))!==0?0:a}function qu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hc(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:Eh(e.type))}function Lc(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var ya=Math.random().toString(36).slice(2),Fe="__reactFiber$"+ya,it="__reactProps$"+ya,ol="__reactContainer$"+ya,Lu="__reactEvents$"+ya,s0="__reactListeners$"+ya,r0="__reactHandles$"+ya,Bc="__reactResources$"+ya,nn="__reactMarker$"+ya;function Bu(e){delete e[Fe],delete e[it],delete e[Lu],delete e[s0],delete e[r0]}function fl(e){var t=e[Fe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ol]||a[Fe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=rh(e);e!==null;){if(a=e[Fe])return a;e=rh(e)}return t}e=a,a=e.parentNode}return null}function dl(e){if(e=e[Fe]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function un(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function hl(e){var t=e[Bc];return t||(t=e[Bc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[nn]=!0}var Qc=new Set,Yc={};function Ga(e,t){ml(e,t),ml(e+"Capture",t)}function ml(e,t){for(Yc[e]=t,e=0;e<t.length;e++)Qc.add(t[e])}var c0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Gc={},Kc={};function o0(e){return zu.call(Kc,e)?!0:zu.call(Gc,e)?!1:c0.test(e)?Kc[e]=!0:(Gc[e]=!0,!1)}function ri(e,t,a){if(o0(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ci(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function kt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f0(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){a=""+f,u.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qu(e){if(!e._valueTracker){var t=Xc(e)?"checked":"value";e._valueTracker=f0(e,t,""+e[t])}}function Zc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Xc(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var d0=/[\n"\\]/g;function Tt(e){return e.replace(d0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yu(e,t,a,l,i,u,f,m){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Gu(e,f,Ct(t)):a!=null?Gu(e,f,Ct(a)):l!=null&&e.removeAttribute("value"),i==null&&u!=null&&(e.defaultChecked=!!u),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Ct(m):e.removeAttribute("name")}function Vc(e,t,a,l,i,u,f,m){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Qu(e);return}a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Qu(e)}function Gu(e,t,a){t==="number"&&oi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function yl(e,t,a,l){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function kc(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function Jc(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(Ke(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Qu(e)}function gl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var h0=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Fc(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||h0.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function $c(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&a[i]!==l&&Fc(e,i,l)}else for(var u in t)t.hasOwnProperty(u)&&Fc(e,u,t[u])}function Ku(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var m0=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),y0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fi(e){return y0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}var Xu=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,vl=null;function Wc(e){var t=dl(e);if(t&&(e=t.stateNode)){var a=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Tt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var i=l[it]||null;if(!i)throw Error(c(90));Yu(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Zc(l)}break e;case"textarea":kc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&yl(e,!!a.multiple,t,!1)}}}var Vu=!1;function Pc(e,t,a){if(Vu)return e(t,a);Vu=!0;try{var l=e(t);return l}finally{if(Vu=!1,(pl!==null||vl!==null)&&(Pi(),pl&&(t=pl,e=vl,vl=pl=null,Wc(t),e)))for(t=0;t<e.length;t++)Wc(e[t])}}function sn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[it]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ku=!1;if(Ft)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){ku=!0}}),window.addEventListener("test",rn,rn),window.removeEventListener("test",rn,rn)}catch{ku=!1}var ga=null,Ju=null,di=null;function Ic(){if(di)return di;var e,t=Ju,a=t.length,l,i="value"in ga?ga.value:ga.textContent,u=i.length;for(e=0;e<a&&t[e]===i[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===i[u-l];l++);return di=i.slice(e,1<l?1-l:void 0)}function hi(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 mi(){return!0}function eo(){return!1}function ut(e){function t(a,l,i,u,f){this._reactName=a,this._targetInst=i,this.type=l,this.nativeEvent=u,this.target=f,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?mi:eo,this.isPropagationStopped=eo,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=mi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=mi)},persist:function(){},isPersistent:mi}),t}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yi=ut(Ka),cn=j({},Ka,{view:0,detail:0}),g0=ut(cn),Fu,$u,on,gi=j({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pu,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!==on&&(on&&e.type==="mousemove"?(Fu=e.screenX-on.screenX,$u=e.screenY-on.screenY):$u=Fu=0,on=e),Fu)},movementY:function(e){return"movementY"in e?e.movementY:$u}}),to=ut(gi),p0=j({},gi,{dataTransfer:0}),v0=ut(p0),x0=j({},cn,{relatedTarget:0}),Wu=ut(x0),b0=j({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),S0=ut(b0),j0=j({},Ka,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),N0=ut(j0),E0=j({},Ka,{data:0}),ao=ut(E0),C0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T0={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"},w0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=w0[e])?!!t[e]:!1}function Pu(){return R0}var M0=j({},cn,{key:function(e){if(e.key){var t=C0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?T0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pu,charCode:function(e){return e.type==="keypress"?hi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),A0=ut(M0),O0=j({},gi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lo=ut(O0),z0=j({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pu}),_0=ut(z0),D0=j({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),U0=ut(D0),q0=j({},gi,{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}),H0=ut(q0),L0=j({},Ka,{newState:0,oldState:0}),B0=ut(L0),Q0=[9,13,27,32],Iu=Ft&&"CompositionEvent"in window,fn=null;Ft&&"documentMode"in document&&(fn=document.documentMode);var Y0=Ft&&"TextEvent"in window&&!fn,no=Ft&&(!Iu||fn&&8<fn&&11>=fn),io=" ",uo=!1;function so(e,t){switch(e){case"keyup":return Q0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ro(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function G0(e,t){switch(e){case"compositionend":return ro(t);case"keypress":return t.which!==32?null:(uo=!0,io);case"textInput":return e=t.data,e===io&&uo?null:e;default:return null}}function K0(e,t){if(xl)return e==="compositionend"||!Iu&&so(e,t)?(e=Ic(),di=Ju=ga=null,xl=!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 no&&t.locale!=="ko"?null:t.data;default:return null}}var X0={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 co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!X0[e.type]:t==="textarea"}function oo(e,t,a,l){pl?vl?vl.push(l):vl=[l]:pl=l,t=iu(t,"onChange"),0<t.length&&(a=new yi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var dn=null,hn=null;function Z0(e){Jd(e,0)}function pi(e){var t=un(e);if(Zc(t))return e}function fo(e,t){if(e==="change")return t}var ho=!1;if(Ft){var es;if(Ft){var ts="oninput"in document;if(!ts){var mo=document.createElement("div");mo.setAttribute("oninput","return;"),ts=typeof mo.oninput=="function"}es=ts}else es=!1;ho=es&&(!document.documentMode||9<document.documentMode)}function yo(){dn&&(dn.detachEvent("onpropertychange",go),hn=dn=null)}function go(e){if(e.propertyName==="value"&&pi(hn)){var t=[];oo(t,hn,e,Zu(e)),Pc(Z0,t)}}function V0(e,t,a){e==="focusin"?(yo(),dn=t,hn=a,dn.attachEvent("onpropertychange",go)):e==="focusout"&&yo()}function k0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pi(hn)}function J0(e,t){if(e==="click")return pi(t)}function F0(e,t){if(e==="input"||e==="change")return pi(t)}function $0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:$0;function mn(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var i=a[l];if(!zu.call(t,i)||!gt(e[i],t[i]))return!1}return!0}function po(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vo(e,t){var a=po(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=po(a)}}function xo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=oi(e.document)}return t}function as(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var W0=Ft&&"documentMode"in document&&11>=document.documentMode,bl=null,ls=null,yn=null,ns=!1;function So(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ns||bl==null||bl!==oi(l)||(l=bl,"selectionStart"in l&&as(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),yn&&mn(yn,l)||(yn=l,l=iu(ls,"onSelect"),0<l.length&&(t=new yi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=bl)))}function Xa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionrun:Xa("Transition","TransitionRun"),transitionstart:Xa("Transition","TransitionStart"),transitioncancel:Xa("Transition","TransitionCancel"),transitionend:Xa("Transition","TransitionEnd")},is={},jo={};Ft&&(jo=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Za(e){if(is[e])return is[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in jo)return is[e]=t[a];return e}var No=Za("animationend"),Eo=Za("animationiteration"),Co=Za("animationstart"),P0=Za("transitionrun"),I0=Za("transitionstart"),ey=Za("transitioncancel"),To=Za("transitionend"),wo=new Map,us="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");us.push("scrollEnd");function Ht(e,t){wo.set(e,t),Ga(t,[e])}var vi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wt=[],jl=0,ss=0;function xi(){for(var e=jl,t=ss=jl=0;t<e;){var a=wt[t];wt[t++]=null;var l=wt[t];wt[t++]=null;var i=wt[t];wt[t++]=null;var u=wt[t];if(wt[t++]=null,l!==null&&i!==null){var f=l.pending;f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i}u!==0&&Ro(a,i,u)}}function bi(e,t,a,l){wt[jl++]=e,wt[jl++]=t,wt[jl++]=a,wt[jl++]=l,ss|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function rs(e,t,a,l){return bi(e,t,a,l),Si(e)}function Va(e,t){return bi(e,null,null,t),Si(e)}function Ro(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var i=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(i=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,i&&t!==null&&(i=31-yt(a),e=u.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=a|536870912),u):null}function Si(e){if(50<Hn)throw Hn=0,pr=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Nl={};function ty(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pt(e,t,a,l){return new ty(e,t,a,l)}function cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var a=e.alternate;return a===null?(a=pt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Mo(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ji(e,t,a,l,i,u){var f=0;if(l=e,typeof e=="function")cs(e)&&(f=1);else if(typeof e=="string")f=ug(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=pt(31,a,t,i),e.elementType=te,e.lanes=u,e;case O:return ka(a.children,i,u,t);case D:f=8,i|=24;break;case K:return e=pt(12,a,t,i|2),e.elementType=K,e.lanes=u,e;case W:return e=pt(13,a,t,i),e.elementType=W,e.lanes=u,e;case le:return e=pt(19,a,t,i),e.elementType=le,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:f=10;break e;case Y:f=9;break e;case X:f=11;break e;case G:f=14;break e;case B:f=16,l=null;break e}f=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=pt(f,a,t,i),t.elementType=e,t.type=l,t.lanes=u,t}function ka(e,t,a,l){return e=pt(7,e,l,t),e.lanes=a,e}function os(e,t,a){return e=pt(6,e,null,t),e.lanes=a,e}function Ao(e){var t=pt(18,null,null,0);return t.stateNode=e,t}function fs(e,t,a){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Oo=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var a=Oo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Mc(t)},Oo.set(e,t),t)}return{value:e,source:t,stack:Mc(t)}}var El=[],Cl=0,Ni=null,gn=0,Mt=[],At=0,pa=null,Gt=1,Kt="";function Wt(e,t){El[Cl++]=gn,El[Cl++]=Ni,Ni=e,gn=t}function zo(e,t,a){Mt[At++]=Gt,Mt[At++]=Kt,Mt[At++]=pa,pa=e;var l=Gt;e=Kt;var i=32-yt(l)-1;l&=~(1<<i),a+=1;var u=32-yt(t)+i;if(30<u){var f=i-i%5;u=(l&(1<<f)-1).toString(32),l>>=f,i-=f,Gt=1<<32-yt(t)+i|a<<i|l,Kt=u+e}else Gt=1<<u|a<<i|l,Kt=e}function ds(e){e.return!==null&&(Wt(e,1),zo(e,1,0))}function hs(e){for(;e===Ni;)Ni=El[--Cl],El[Cl]=null,gn=El[--Cl],El[Cl]=null;for(;e===pa;)pa=Mt[--At],Mt[At]=null,Kt=Mt[--At],Mt[At]=null,Gt=Mt[--At],Mt[At]=null}function _o(e,t){Mt[At++]=Gt,Mt[At++]=Kt,Mt[At++]=pa,Gt=t.id,Kt=t.overflow,pa=e}var $e=null,Me=null,he=!1,va=null,Ot=!1,ms=Error(c(519));function xa(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pn(Rt(t,e)),ms}function Do(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Fe]=e,t[it]=l,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<Bn.length;a++)oe(Bn[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),Vc(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),Jc(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Pd(t.textContent,a)?(l.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),l.onScroll!=null&&oe("scroll",t),l.onScrollEnd!=null&&oe("scrollend",t),l.onClick!=null&&(t.onclick=Jt),t=!0):t=!1,t||xa(e,!0)}function Uo(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:$e=$e.return}}function Tl(e){if(e!==$e)return!1;if(!he)return Uo(e),he=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||zr(e.type,e.memoizedProps)),a=!a),a&&Me&&xa(e),Uo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Me=sh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Me=sh(e)}else t===27?(t=Me,_a(e.type)?(e=Hr,Hr=null,Me=e):Me=t):Me=$e?_t(e.stateNode.nextSibling):null;return!0}function Ja(){Me=$e=null,he=!1}function ys(){var e=va;return e!==null&&(ot===null?ot=e:ot.push.apply(ot,e),va=null),e}function pn(e){va===null?va=[e]:va.push(e)}var gs=N(null),Fa=null,Pt=null;function ba(e,t,a){k(gs,t._currentValue),t._currentValue=a}function It(e){e._currentValue=gs.current,L(gs)}function ps(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function vs(e,t,a,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var u=i.dependencies;if(u!==null){var f=i.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=i;for(var x=0;x<t.length;x++)if(m.context===t[x]){u.lanes|=a,m=u.alternate,m!==null&&(m.lanes|=a),ps(u.return,a,e),l||(f=null);break e}u=m.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(c(341));f.lanes|=a,u=f.alternate,u!==null&&(u.lanes|=a),ps(f,a,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function wl(e,t,a,l){e=null;for(var i=t,u=!1;i!==null;){if(!u){if((i.flags&524288)!==0)u=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var m=i.type;gt(i.pendingProps.value,f.value)||(e!==null?e.push(m):e=[m])}}else if(i===ve.current){if(f=i.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Xn):e=[Xn])}i=i.return}e!==null&&vs(t,e,a,l),t.flags|=262144}function Ei(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Fa=e,Pt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return qo(Fa,e)}function Ci(e,t){return Fa===null&&$a(e),qo(e,t)}function qo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pt===null){if(e===null)throw Error(c(308));Pt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pt=Pt.next=t;return a}var ay=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},ly=n.unstable_scheduleCallback,ny=n.unstable_NormalPriority,Be={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new ay,data:new Map,refCount:0}}function vn(e){e.refCount--,e.refCount===0&&ly(ny,function(){e.controller.abort()})}var xn=null,bs=0,Rl=0,Ml=null;function iy(e,t){if(xn===null){var a=xn=[];bs=0,Rl=Nr(),Ml={status:"pending",value:void 0,then:function(l){a.push(l)}}}return bs++,t.then(Ho,Ho),t}function Ho(){if(--bs===0&&xn!==null){Ml!==null&&(Ml.status="fulfilled");var e=xn;xn=null,Rl=0,Ml=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function uy(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),l}var Lo=_.S;_.S=function(e,t){jd=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iy(e,t),Lo!==null&&Lo(e,t)};var Wa=N(null);function Ss(){var e=Wa.current;return e!==null?e:we.pooledCache}function Ti(e,t){t===null?k(Wa,Wa.current):k(Wa,t.pool)}function Bo(){var e=Ss();return e===null?null:{parent:Be._currentValue,pool:e}}var Al=Error(c(460)),js=Error(c(474)),wi=Error(c(542)),Ri={then:function(){}};function Qo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Jt,Jt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ko(e),e;default:if(typeof t.status=="string")t.then(Jt,Jt);else{if(e=we,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ko(e),e}throw Ia=t,Al}}function Pa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ia=a,Al):a}}var Ia=null;function Go(){if(Ia===null)throw Error(c(459));var e=Ia;return Ia=null,e}function Ko(e){if(e===Al||e===wi)throw Error(c(483))}var Ol=null,bn=0;function Mi(e){var t=bn;return bn+=1,Ol===null&&(Ol=[]),Yo(Ol,e,t)}function Sn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ai(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xo(e){function t(C,b){if(e){var R=C.deletions;R===null?(C.deletions=[b],C.flags|=16):R.push(b)}}function a(C,b){if(!e)return null;for(;b!==null;)t(C,b),b=b.sibling;return null}function l(C){for(var b=new Map;C!==null;)C.key!==null?b.set(C.key,C):b.set(C.index,C),C=C.sibling;return b}function i(C,b){return C=$t(C,b),C.index=0,C.sibling=null,C}function u(C,b,R){return C.index=R,e?(R=C.alternate,R!==null?(R=R.index,R<b?(C.flags|=67108866,b):R):(C.flags|=67108866,b)):(C.flags|=1048576,b)}function f(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function m(C,b,R,q){return b===null||b.tag!==6?(b=os(R,C.mode,q),b.return=C,b):(b=i(b,R),b.return=C,b)}function x(C,b,R,q){var P=R.type;return P===O?U(C,b,R.props.children,q,R.key):b!==null&&(b.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===B&&Pa(P)===b.type)?(b=i(b,R.props),Sn(b,R),b.return=C,b):(b=ji(R.type,R.key,R.props,null,C.mode,q),Sn(b,R),b.return=C,b)}function M(C,b,R,q){return b===null||b.tag!==4||b.stateNode.containerInfo!==R.containerInfo||b.stateNode.implementation!==R.implementation?(b=fs(R,C.mode,q),b.return=C,b):(b=i(b,R.children||[]),b.return=C,b)}function U(C,b,R,q,P){return b===null||b.tag!==7?(b=ka(R,C.mode,q,P),b.return=C,b):(b=i(b,R),b.return=C,b)}function H(C,b,R){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=os(""+b,C.mode,R),b.return=C,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Q:return R=ji(b.type,b.key,b.props,null,C.mode,R),Sn(R,b),R.return=C,R;case w:return b=fs(b,C.mode,R),b.return=C,b;case B:return b=Pa(b),H(C,b,R)}if(Ke(b)||ge(b))return b=ka(b,C.mode,R,null),b.return=C,b;if(typeof b.then=="function")return H(C,Mi(b),R);if(b.$$typeof===Z)return H(C,Ci(C,b),R);Ai(C,b)}return null}function A(C,b,R,q){var P=b!==null?b.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return P!==null?null:m(C,b,""+R,q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Q:return R.key===P?x(C,b,R,q):null;case w:return R.key===P?M(C,b,R,q):null;case B:return R=Pa(R),A(C,b,R,q)}if(Ke(R)||ge(R))return P!==null?null:U(C,b,R,q,null);if(typeof R.then=="function")return A(C,b,Mi(R),q);if(R.$$typeof===Z)return A(C,b,Ci(C,R),q);Ai(C,R)}return null}function z(C,b,R,q,P){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return C=C.get(R)||null,m(b,C,""+q,P);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case Q:return C=C.get(q.key===null?R:q.key)||null,x(b,C,q,P);case w:return C=C.get(q.key===null?R:q.key)||null,M(b,C,q,P);case B:return q=Pa(q),z(C,b,R,q,P)}if(Ke(q)||ge(q))return C=C.get(R)||null,U(b,C,q,P,null);if(typeof q.then=="function")return z(C,b,R,Mi(q),P);if(q.$$typeof===Z)return z(C,b,R,Ci(b,q),P);Ai(b,q)}return null}function J(C,b,R,q){for(var P=null,me=null,$=b,ue=b=0,de=null;$!==null&&ue<R.length;ue++){$.index>ue?(de=$,$=null):de=$.sibling;var ye=A(C,$,R[ue],q);if(ye===null){$===null&&($=de);break}e&&$&&ye.alternate===null&&t(C,$),b=u(ye,b,ue),me===null?P=ye:me.sibling=ye,me=ye,$=de}if(ue===R.length)return a(C,$),he&&Wt(C,ue),P;if($===null){for(;ue<R.length;ue++)$=H(C,R[ue],q),$!==null&&(b=u($,b,ue),me===null?P=$:me.sibling=$,me=$);return he&&Wt(C,ue),P}for($=l($);ue<R.length;ue++)de=z($,C,ue,R[ue],q),de!==null&&(e&&de.alternate!==null&&$.delete(de.key===null?ue:de.key),b=u(de,b,ue),me===null?P=de:me.sibling=de,me=de);return e&&$.forEach(function(La){return t(C,La)}),he&&Wt(C,ue),P}function I(C,b,R,q){if(R==null)throw Error(c(151));for(var P=null,me=null,$=b,ue=b=0,de=null,ye=R.next();$!==null&&!ye.done;ue++,ye=R.next()){$.index>ue?(de=$,$=null):de=$.sibling;var La=A(C,$,ye.value,q);if(La===null){$===null&&($=de);break}e&&$&&La.alternate===null&&t(C,$),b=u(La,b,ue),me===null?P=La:me.sibling=La,me=La,$=de}if(ye.done)return a(C,$),he&&Wt(C,ue),P;if($===null){for(;!ye.done;ue++,ye=R.next())ye=H(C,ye.value,q),ye!==null&&(b=u(ye,b,ue),me===null?P=ye:me.sibling=ye,me=ye);return he&&Wt(C,ue),P}for($=l($);!ye.done;ue++,ye=R.next())ye=z($,C,ue,ye.value,q),ye!==null&&(e&&ye.alternate!==null&&$.delete(ye.key===null?ue:ye.key),b=u(ye,b,ue),me===null?P=ye:me.sibling=ye,me=ye);return e&&$.forEach(function(pg){return t(C,pg)}),he&&Wt(C,ue),P}function Ee(C,b,R,q){if(typeof R=="object"&&R!==null&&R.type===O&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case Q:e:{for(var P=R.key;b!==null;){if(b.key===P){if(P=R.type,P===O){if(b.tag===7){a(C,b.sibling),q=i(b,R.props.children),q.return=C,C=q;break e}}else if(b.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===B&&Pa(P)===b.type){a(C,b.sibling),q=i(b,R.props),Sn(q,R),q.return=C,C=q;break e}a(C,b);break}else t(C,b);b=b.sibling}R.type===O?(q=ka(R.props.children,C.mode,q,R.key),q.return=C,C=q):(q=ji(R.type,R.key,R.props,null,C.mode,q),Sn(q,R),q.return=C,C=q)}return f(C);case w:e:{for(P=R.key;b!==null;){if(b.key===P)if(b.tag===4&&b.stateNode.containerInfo===R.containerInfo&&b.stateNode.implementation===R.implementation){a(C,b.sibling),q=i(b,R.children||[]),q.return=C,C=q;break e}else{a(C,b);break}else t(C,b);b=b.sibling}q=fs(R,C.mode,q),q.return=C,C=q}return f(C);case B:return R=Pa(R),Ee(C,b,R,q)}if(Ke(R))return J(C,b,R,q);if(ge(R)){if(P=ge(R),typeof P!="function")throw Error(c(150));return R=P.call(R),I(C,b,R,q)}if(typeof R.then=="function")return Ee(C,b,Mi(R),q);if(R.$$typeof===Z)return Ee(C,b,Ci(C,R),q);Ai(C,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,b!==null&&b.tag===6?(a(C,b.sibling),q=i(b,R),q.return=C,C=q):(a(C,b),q=os(R,C.mode,q),q.return=C,C=q),f(C)):a(C,b)}return function(C,b,R,q){try{bn=0;var P=Ee(C,b,R,q);return Ol=null,P}catch($){if($===Al||$===wi)throw $;var me=pt(29,$,null,C.mode);return me.lanes=q,me.return=C,me}}}var el=Xo(!0),Zo=Xo(!1),Sa=!1;function Ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Es(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(pe&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=Si(e),Ro(e,null,a),t}return bi(e,l,t,a),Si(e)}function jn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Uc(e,a)}}function Cs(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var i=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?i=u=f:u=u.next=f,a=a.next}while(a!==null);u===null?i=u=t:u=u.next=t}else i=u=t;a={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ts=!1;function Nn(){if(Ts){var e=Ml;if(e!==null)throw e}}function En(e,t,a,l){Ts=!1;var i=e.updateQueue;Sa=!1;var u=i.firstBaseUpdate,f=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var x=m,M=x.next;x.next=null,f===null?u=M:f.next=M,f=x;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==f&&(m===null?U.firstBaseUpdate=M:m.next=M,U.lastBaseUpdate=x))}if(u!==null){var H=i.baseState;f=0,U=M=x=null,m=u;do{var A=m.lane&-536870913,z=A!==m.lane;if(z?(fe&A)===A:(l&A)===A){A!==0&&A===Rl&&(Ts=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var J=e,I=m;A=t;var Ee=a;switch(I.tag){case 1:if(J=I.payload,typeof J=="function"){H=J.call(Ee,H,A);break e}H=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=I.payload,A=typeof J=="function"?J.call(Ee,H,A):J,A==null)break e;H=j({},H,A);break e;case 2:Sa=!0}}A=m.callback,A!==null&&(e.flags|=64,z&&(e.flags|=8192),z=i.callbacks,z===null?i.callbacks=[A]:z.push(A))}else z={lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(M=U=z,x=H):U=U.next=z,f|=A;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;z=m,m=z.next,z.next=null,i.lastBaseUpdate=z,i.shared.pending=null}}while(!0);U===null&&(x=H),i.baseState=x,i.firstBaseUpdate=M,i.lastBaseUpdate=U,u===null&&(i.shared.lanes=0),Ra|=f,e.lanes=f,e.memoizedState=H}}function Vo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function ko(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Vo(a[e],t)}var zl=N(null),Oi=N(0);function Jo(e,t){e=ra,k(Oi,e),k(zl,t),ra=e|t.baseLanes}function ws(){k(Oi,ra),k(zl,zl.current)}function Rs(){ra=Oi.current,L(zl),L(Oi)}var vt=N(null),zt=null;function Ea(e){var t=e.alternate;k(He,He.current&1),k(vt,e),zt===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(zt=e)}function Ms(e){k(He,He.current),k(vt,e),zt===null&&(zt=e)}function Fo(e){e.tag===22?(k(He,He.current),k(vt,e),zt===null&&(zt=e)):Ca()}function Ca(){k(He,He.current),k(vt,vt.current)}function xt(e){L(vt),zt===e&&(zt=null),L(He)}var He=N(0);function zi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ur(a)||qr(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ea=0,ie=null,je=null,Qe=null,_i=!1,_l=!1,tl=!1,Di=0,Cn=0,Dl=null,sy=0;function De(){throw Error(c(321))}function As(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!gt(e[a],t[a]))return!1;return!0}function Os(e,t,a,l,i,u){return ea=u,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?_f:Vs,tl=!1,u=a(l,i),tl=!1,_l&&(u=Wo(t,a,l,i)),$o(e),u}function $o(e){_.H=Rn;var t=je!==null&&je.next!==null;if(ea=0,Qe=je=ie=null,_i=!1,Cn=0,Dl=null,t)throw Error(c(300));e===null||Ye||(e=e.dependencies,e!==null&&Ei(e)&&(Ye=!0))}function Wo(e,t,a,l){ie=e;var i=0;do{if(_l&&(Dl=null),Cn=0,_l=!1,25<=i)throw Error(c(301));if(i+=1,Qe=je=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}_.H=Df,u=t(a,l)}while(_l);return u}function ry(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?Tn(t):t,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(ie.flags|=1024),t}function zs(){var e=Di!==0;return Di=0,e}function _s(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ds(e){if(_i){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_i=!1}ea=0,Qe=je=ie=null,_l=!1,Cn=Di=0,Dl=null}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?ie.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Le(){if(je===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Qe===null?ie.memoizedState:Qe.next;if(t!==null)Qe=t,je=e;else{if(e===null)throw ie.alternate===null?Error(c(467)):Error(c(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Qe===null?ie.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function Ui(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tn(e){var t=Cn;return Cn+=1,Dl===null&&(Dl=[]),e=Yo(Dl,e,t),t=ie,(Qe===null?t.memoizedState:Qe.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?_f:Vs),e}function qi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tn(e);if(e.$$typeof===Z)return We(e)}throw Error(c(438,String(e)))}function Us(e){var t=null,a=ie.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ie.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ui(),ie.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=_e;return t.index++,a}function ta(e,t){return typeof t=="function"?t(e):t}function Hi(e){var t=Le();return qs(t,je,e)}function qs(e,t,a){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=a;var i=e.baseQueue,u=l.pending;if(u!==null){if(i!==null){var f=i.next;i.next=u.next,u.next=f}t.baseQueue=i=u,l.pending=null}if(u=e.baseState,i===null)e.memoizedState=u;else{t=i.next;var m=f=null,x=null,M=t,U=!1;do{var H=M.lane&-536870913;if(H!==M.lane?(fe&H)===H:(ea&H)===H){var A=M.revertLane;if(A===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),H===Rl&&(U=!0);else if((ea&A)===A){M=M.next,A===Rl&&(U=!0);continue}else H={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},x===null?(m=x=H,f=u):x=x.next=H,ie.lanes|=A,Ra|=A;H=M.action,tl&&a(u,H),u=M.hasEagerState?M.eagerState:a(u,H)}else A={lane:H,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},x===null?(m=x=A,f=u):x=x.next=A,ie.lanes|=H,Ra|=H;M=M.next}while(M!==null&&M!==t);if(x===null?f=u:x.next=m,!gt(u,e.memoizedState)&&(Ye=!0,U&&(a=Ml,a!==null)))throw a;e.memoizedState=u,e.baseState=f,e.baseQueue=x,l.lastRenderedState=u}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Hs(e){var t=Le(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var l=a.dispatch,i=a.pending,u=t.memoizedState;if(i!==null){a.pending=null;var f=i=i.next;do u=e(u,f.action),f=f.next;while(f!==i);gt(u,t.memoizedState)||(Ye=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Po(e,t,a){var l=ie,i=Le(),u=he;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=t();var f=!gt((je||i).memoizedState,a);if(f&&(i.memoizedState=a,Ye=!0),i=i.queue,Qs(tf.bind(null,l,i,e),[e]),i.getSnapshot!==t||f||Qe!==null&&Qe.memoizedState.tag&1){if(l.flags|=2048,Ul(9,{destroy:void 0},ef.bind(null,l,i,a,t),null),we===null)throw Error(c(349));u||(ea&127)!==0||Io(l,t,a)}return a}function Io(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ie.updateQueue,t===null?(t=Ui(),ie.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function ef(e,t,a,l){t.value=a,t.getSnapshot=l,af(t)&&lf(e)}function tf(e,t,a){return a(function(){af(t)&&lf(e)})}function af(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!gt(e,a)}catch{return!0}}function lf(e){var t=Va(e,2);t!==null&&ft(t,e,2)}function Ls(e){var t=at();if(typeof e=="function"){var a=e;if(e=a(),tl){ma(!0);try{a()}finally{ma(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t}function nf(e,t,a,l){return e.baseState=a,qs(e,je,typeof l=="function"?l:ta)}function cy(e,t,a,l,i){if(Qi(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){u.listeners.push(f)}};_.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,uf(t,u)):(u.next=a.next,t.pending=a.next=u)}}function uf(e,t){var a=t.action,l=t.payload,i=e.state;if(t.isTransition){var u=_.T,f={};_.T=f;try{var m=a(i,l),x=_.S;x!==null&&x(f,m),sf(e,t,m)}catch(M){Bs(e,t,M)}finally{u!==null&&f.types!==null&&(u.types=f.types),_.T=u}}else try{u=a(i,l),sf(e,t,u)}catch(M){Bs(e,t,M)}}function sf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){rf(e,t,l)},function(l){return Bs(e,t,l)}):rf(e,t,a)}function rf(e,t,a){t.status="fulfilled",t.value=a,cf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,uf(e,a)))}function Bs(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,cf(t),t=t.next;while(t!==l)}e.action=null}function cf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function of(e,t){return t}function ff(e,t){if(he){var a=we.formState;if(a!==null){e:{var l=ie;if(he){if(Me){t:{for(var i=Me,u=Ot;i.nodeType!==8;){if(!u){i=null;break t}if(i=_t(i.nextSibling),i===null){i=null;break t}}u=i.data,i=u==="F!"||u==="F"?i:null}if(i){Me=_t(i.nextSibling),l=i.data==="F!";break e}}xa(l)}l=!1}l&&(t=a[0])}}return a=at(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:of,lastRenderedState:t},a.queue=l,a=Af.bind(null,ie,l),l.dispatch=a,l=Ls(!1),u=Zs.bind(null,ie,!1,l.queue),l=at(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,a=cy.bind(null,ie,i,u,a),i.dispatch=a,l.memoizedState=e,[t,a,!1]}function df(e){var t=Le();return hf(t,je,e)}function hf(e,t,a){if(t=qs(e,t,of)[0],e=Hi(ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Tn(t)}catch(f){throw f===Al?wi:f}else l=t;t=Le();var i=t.queue,u=i.dispatch;return a!==t.memoizedState&&(ie.flags|=2048,Ul(9,{destroy:void 0},oy.bind(null,i,a),null)),[l,u,e]}function oy(e,t){e.action=t}function mf(e){var t=Le(),a=je;if(a!==null)return hf(t,a,e);Le(),t=t.memoizedState,a=Le();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Ul(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ie.updateQueue,t===null&&(t=Ui(),ie.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function yf(){return Le().memoizedState}function Li(e,t,a,l){var i=at();ie.flags|=e,i.memoizedState=Ul(1|t,{destroy:void 0},a,l===void 0?null:l)}function Bi(e,t,a,l){var i=Le();l=l===void 0?null:l;var u=i.memoizedState.inst;je!==null&&l!==null&&As(l,je.memoizedState.deps)?i.memoizedState=Ul(t,u,a,l):(ie.flags|=e,i.memoizedState=Ul(1|t,u,a,l))}function gf(e,t){Li(8390656,8,e,t)}function Qs(e,t){Bi(2048,8,e,t)}function fy(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=Ui(),ie.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function pf(e){var t=Le().memoizedState;return fy({ref:t,nextImpl:e}),function(){if((pe&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function vf(e,t){return Bi(4,2,e,t)}function xf(e,t){return Bi(4,4,e,t)}function bf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sf(e,t,a){a=a!=null?a.concat([e]):null,Bi(4,4,bf.bind(null,t,e),a)}function Ys(){}function jf(e,t){var a=Le();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&As(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Nf(e,t){var a=Le();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&As(t,l[1]))return l[0];if(l=e(),tl){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[l,t],l}function Gs(e,t,a){return a===void 0||(ea&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ed(),ie.lanes|=e,Ra|=e,a)}function Ef(e,t,a,l){return gt(a,t)?a:zl.current!==null?(e=Gs(e,a,l),gt(e,t)||(Ye=!0),e):(ea&42)===0||(ea&1073741824)!==0&&(fe&261930)===0?(Ye=!0,e.memoizedState=a):(e=Ed(),ie.lanes|=e,Ra|=e,t)}function Cf(e,t,a,l,i){var u=V.p;V.p=u!==0&&8>u?u:8;var f=_.T,m={};_.T=m,Zs(e,!1,t,a);try{var x=i(),M=_.S;if(M!==null&&M(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var U=uy(x,l);wn(e,t,U,jt(e))}else wn(e,t,l,jt(e))}catch(H){wn(e,t,{then:function(){},status:"rejected",reason:H},jt())}finally{V.p=u,f!==null&&m.types!==null&&(f.types=m.types),_.T=f}}function dy(){}function Ks(e,t,a,l){if(e.tag!==5)throw Error(c(476));var i=Tf(e).queue;Cf(e,i,t,ee,a===null?dy:function(){return wf(e),a(l)})}function Tf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:ee},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function wf(e){var t=Tf(e);t.next===null&&(t=e.alternate.memoizedState),wn(e,t.next.queue,{},jt())}function Xs(){return We(Xn)}function Rf(){return Le().memoizedState}function Mf(){return Le().memoizedState}function hy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=ja(a);var l=Na(t,e,a);l!==null&&(ft(l,t,a),jn(l,t,a)),t={cache:xs()},e.payload=t;return}t=t.return}}function my(e,t,a){var l=jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Qi(e)?Of(t,a):(a=rs(e,t,a,l),a!==null&&(ft(a,e,l),zf(a,t,l)))}function Af(e,t,a){var l=jt();wn(e,t,a,l)}function wn(e,t,a,l){var i={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Qi(e))Of(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var f=t.lastRenderedState,m=u(f,a);if(i.hasEagerState=!0,i.eagerState=m,gt(m,f))return bi(e,t,i,0),we===null&&xi(),!1}catch{}if(a=rs(e,t,i,l),a!==null)return ft(a,e,l),zf(a,t,l),!0}return!1}function Zs(e,t,a,l){if(l={lane:2,revertLane:Nr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Qi(e)){if(t)throw Error(c(479))}else t=rs(e,a,l,2),t!==null&&ft(t,e,2)}function Qi(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function Of(e,t){_l=_i=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Uc(e,a)}}var Rn={readContext:We,use:qi,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};Rn.useEffectEvent=De;var _f={readContext:We,use:qi,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:gf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Li(4194308,4,bf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){Li(4,2,e,t)},useMemo:function(e,t){var a=at();t=t===void 0?null:t;var l=e();if(tl){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=at();if(a!==void 0){var i=a(t);if(tl){ma(!0);try{a(t)}finally{ma(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=my.bind(null,ie,e),[l.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:function(e){e=Ls(e);var t=e.queue,a=Af.bind(null,ie,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ys,useDeferredValue:function(e,t){var a=at();return Gs(a,e,t)},useTransition:function(){var e=Ls(!1);return e=Cf.bind(null,ie,e.queue,!0,!1),at().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ie,i=at();if(he){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),we===null)throw Error(c(349));(fe&127)!==0||Io(l,t,a)}i.memoizedState=a;var u={value:a,getSnapshot:t};return i.queue=u,gf(tf.bind(null,l,u,e),[e]),l.flags|=2048,Ul(9,{destroy:void 0},ef.bind(null,l,u,a,t),null),a},useId:function(){var e=at(),t=we.identifierPrefix;if(he){var a=Kt,l=Gt;a=(l&~(1<<32-yt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Di++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=sy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:ff,useActionState:ff,useOptimistic:function(e){var t=at();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Zs.bind(null,ie,!0,a),a.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return at().memoizedState=hy.bind(null,ie)},useEffectEvent:function(e){var t=at(),a={impl:e};return t.memoizedState=a,function(){if((pe&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Vs={readContext:We,use:qi,useCallback:jf,useContext:We,useEffect:Qs,useImperativeHandle:Sf,useInsertionEffect:vf,useLayoutEffect:xf,useMemo:Nf,useReducer:Hi,useRef:yf,useState:function(){return Hi(ta)},useDebugValue:Ys,useDeferredValue:function(e,t){var a=Le();return Ef(a,je.memoizedState,e,t)},useTransition:function(){var e=Hi(ta)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:Tn(e),t]},useSyncExternalStore:Po,useId:Rf,useHostTransitionStatus:Xs,useFormState:df,useActionState:df,useOptimistic:function(e,t){var a=Le();return nf(a,je,e,t)},useMemoCache:Us,useCacheRefresh:Mf};Vs.useEffectEvent=pf;var Df={readContext:We,use:qi,useCallback:jf,useContext:We,useEffect:Qs,useImperativeHandle:Sf,useInsertionEffect:vf,useLayoutEffect:xf,useMemo:Nf,useReducer:Hs,useRef:yf,useState:function(){return Hs(ta)},useDebugValue:Ys,useDeferredValue:function(e,t){var a=Le();return je===null?Gs(a,e,t):Ef(a,je.memoizedState,e,t)},useTransition:function(){var e=Hs(ta)[0],t=Le().memoizedState;return[typeof e=="boolean"?e:Tn(e),t]},useSyncExternalStore:Po,useId:Rf,useHostTransitionStatus:Xs,useFormState:mf,useActionState:mf,useOptimistic:function(e,t){var a=Le();return je!==null?nf(a,je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Mf};Df.useEffectEvent=pf;function ks(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Js={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=jt(),i=ja(l);i.payload=t,a!=null&&(i.callback=a),t=Na(e,i,l),t!==null&&(ft(t,e,l),jn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=jt(),i=ja(l);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Na(e,i,l),t!==null&&(ft(t,e,l),jn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=jt(),l=ja(a);l.tag=2,t!=null&&(l.callback=t),t=Na(e,l,a),t!==null&&(ft(t,e,a),jn(t,e,a))}};function Uf(e,t,a,l,i,u,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,f):t.prototype&&t.prototype.isPureReactComponent?!mn(a,l)||!mn(i,u):!0}function qf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function al(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=j({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Hf(e){vi(e)}function Lf(e){console.error(e)}function Bf(e){vi(e)}function Yi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Qf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Fs(e,t,a){return a=ja(a),a.tag=3,a.payload={element:null},a.callback=function(){Yi(e,t)},a}function Yf(e){return e=ja(e),e.tag=3,e}function Gf(e,t,a,l){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var u=l.value;e.payload=function(){return i(u)},e.callback=function(){Qf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Qf(t,a,l),typeof i!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function yy(e,t,a,l,i){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&wl(t,a,i,!0),a=vt.current,a!==null){switch(a.tag){case 31:case 13:return zt===null?Ii():a.alternate===null&&Ue===0&&(Ue=3),a.flags&=-257,a.flags|=65536,a.lanes=i,l===Ri?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),br(e,l,i)),!1;case 22:return a.flags|=65536,l===Ri?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),br(e,l,i)),!1}throw Error(c(435,a.tag))}return br(e,l,i),Ii(),!1}if(he)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==ms&&(e=Error(c(422),{cause:l}),pn(Rt(e,a)))):(l!==ms&&(t=Error(c(423),{cause:l}),pn(Rt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=Rt(l,a),i=Fs(e.stateNode,l,i),Cs(e,i),Ue!==4&&(Ue=2)),!1;var u=Error(c(520),{cause:l});if(u=Rt(u,a),qn===null?qn=[u]:qn.push(u),Ue!==4&&(Ue=2),t===null)return!0;l=Rt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=Fs(a.stateNode,l,e),Cs(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ma===null||!Ma.has(u))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Yf(i),Gf(i,e,a,l),Cs(a,i),!1}a=a.return}while(a!==null);return!1}var $s=Error(c(461)),Ye=!1;function Pe(e,t,a,l){t.child=e===null?Zo(t,null,a,l):el(t,e.child,a,l)}function Kf(e,t,a,l,i){a=a.render;var u=t.ref;if("ref"in l){var f={};for(var m in l)m!=="ref"&&(f[m]=l[m])}else f=l;return $a(t),l=Os(e,t,a,f,u,i),m=zs(),e!==null&&!Ye?(_s(e,t,i),aa(e,t,i)):(he&&m&&ds(t),t.flags|=1,Pe(e,t,l,i),t.child)}function Xf(e,t,a,l,i){if(e===null){var u=a.type;return typeof u=="function"&&!cs(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Zf(e,t,u,l,i)):(e=ji(a.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!nr(e,i)){var f=u.memoizedProps;if(a=a.compare,a=a!==null?a:mn,a(f,l)&&e.ref===t.ref)return aa(e,t,i)}return t.flags|=1,e=$t(u,l),e.ref=t.ref,e.return=t,t.child=e}function Zf(e,t,a,l,i){if(e!==null){var u=e.memoizedProps;if(mn(u,l)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=l=u,nr(e,i))(e.flags&131072)!==0&&(Ye=!0);else return t.lanes=e.lanes,aa(e,t,i)}return Ws(e,t,a,l,i)}function Vf(e,t,a,l){var i=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~u}else l=0,t.child=null;return kf(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ti(t,u!==null?u.cachePool:null),u!==null?Jo(t,u):ws(),Fo(t);else return l=t.lanes=536870912,kf(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(Ti(t,u.cachePool),Jo(t,u),Ca(),t.memoizedState=null):(e!==null&&Ti(t,null),ws(),Ca());return Pe(e,t,i,a),t.child}function Mn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function kf(e,t,a,l,i){var u=Ss();return u=u===null?null:{parent:Be._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Ti(t,null),ws(),Fo(t),e!==null&&wl(e,t,l,!0),t.childLanes=i,null}function Gi(e,t){return t=Xi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jf(e,t,a){return el(t,e.child,null,a),e=Gi(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function gy(e,t,a){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(he){if(l.mode==="hidden")return e=Gi(t,l),t.lanes=536870912,Mn(null,e);if(Ms(t),(e=Me)?(e=uh(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Kt}:null,retryLane:536870912,hydrationErrors:null},a=Ao(e),a.return=t,t.child=a,$e=t,Me=null)):e=null,e===null)throw xa(t);return t.lanes=536870912,null}return Gi(t,l)}var u=e.memoizedState;if(u!==null){var f=u.dehydrated;if(Ms(t),i)if(t.flags&256)t.flags&=-257,t=Jf(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Ye||wl(e,t,a,!1),i=(a&e.childLanes)!==0,Ye||i){if(l=we,l!==null&&(f=qc(l,a),f!==0&&f!==u.retryLane))throw u.retryLane=f,Va(e,f),ft(l,e,f),$s;Ii(),t=Jf(e,t,a)}else e=u.treeContext,Me=_t(f.nextSibling),$e=t,he=!0,va=null,Ot=!1,e!==null&&_o(t,e),t=Gi(t,l),t.flags|=4096;return t}return e=$t(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ki(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ws(e,t,a,l,i){return $a(t),a=Os(e,t,a,l,void 0,i),l=zs(),e!==null&&!Ye?(_s(e,t,i),aa(e,t,i)):(he&&l&&ds(t),t.flags|=1,Pe(e,t,a,i),t.child)}function Ff(e,t,a,l,i,u){return $a(t),t.updateQueue=null,a=Wo(t,l,a,i),$o(e),l=zs(),e!==null&&!Ye?(_s(e,t,u),aa(e,t,u)):(he&&l&&ds(t),t.flags|=1,Pe(e,t,a,u),t.child)}function $f(e,t,a,l,i){if($a(t),t.stateNode===null){var u=Nl,f=a.contextType;typeof f=="object"&&f!==null&&(u=We(f)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Js,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Ns(t),f=a.contextType,u.context=typeof f=="object"&&f!==null?We(f):Nl,u.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(ks(t,a,f,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(f=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),f!==u.state&&Js.enqueueReplaceState(u,u.state,null),En(t,l,u,i),Nn(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,x=al(a,m);u.props=x;var M=u.context,U=a.contextType;f=Nl,typeof U=="object"&&U!==null&&(f=We(U));var H=a.getDerivedStateFromProps;U=typeof H=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||M!==f)&&qf(t,u,l,f),Sa=!1;var A=t.memoizedState;u.state=A,En(t,l,u,i),Nn(),M=t.memoizedState,m||A!==M||Sa?(typeof H=="function"&&(ks(t,a,H,l),M=t.memoizedState),(x=Sa||Uf(t,a,x,l,A,M,f))?(U||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),u.props=l,u.state=M,u.context=f,l=x):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Es(e,t),f=t.memoizedProps,U=al(a,f),u.props=U,H=t.pendingProps,A=u.context,M=a.contextType,x=Nl,typeof M=="object"&&M!==null&&(x=We(M)),m=a.getDerivedStateFromProps,(M=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f!==H||A!==x)&&qf(t,u,l,x),Sa=!1,A=t.memoizedState,u.state=A,En(t,l,u,i),Nn();var z=t.memoizedState;f!==H||A!==z||Sa||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof m=="function"&&(ks(t,a,m,l),z=t.memoizedState),(U=Sa||Uf(t,a,U,l,A,z,x)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(M||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,z,x),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,z,x)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),u.props=l,u.state=z,u.context=x,l=U):(typeof u.componentDidUpdate!="function"||f===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Ki(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=el(t,e.child,null,i),t.child=el(t,null,a,i)):Pe(e,t,a,i),t.memoizedState=u.state,e=t.child):e=aa(e,t,i),e}function Wf(e,t,a,l){return Ja(),t.flags|=256,Pe(e,t,a,l),t.child}var Ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Is(e){return{baseLanes:e,cachePool:Bo()}}function er(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=St),e}function Pf(e,t,a){var l=t.pendingProps,i=!1,u=(t.flags&128)!==0,f;if((f=u)||(f=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(he){if(i?Ea(t):Ca(),(e=Me)?(e=uh(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pa!==null?{id:Gt,overflow:Kt}:null,retryLane:536870912,hydrationErrors:null},a=Ao(e),a.return=t,t.child=a,$e=t,Me=null)):e=null,e===null)throw xa(t);return qr(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,i?(Ca(),i=t.mode,m=Xi({mode:"hidden",children:m},i),l=ka(l,i,a,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=Is(a),l.childLanes=er(e,f,a),t.memoizedState=Ps,Mn(null,l)):(Ea(t),tr(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(u)t.flags&256?(Ea(t),t.flags&=-257,t=ar(e,t,a)):t.memoizedState!==null?(Ca(),t.child=e.child,t.flags|=128,t=null):(Ca(),m=l.fallback,i=t.mode,l=Xi({mode:"visible",children:l.children},i),m=ka(m,i,a,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,el(t,e.child,null,a),l=t.child,l.memoizedState=Is(a),l.childLanes=er(e,f,a),t.memoizedState=Ps,t=Mn(null,l));else if(Ea(t),qr(m)){if(f=m.nextSibling&&m.nextSibling.dataset,f)var M=f.dgst;f=M,l=Error(c(419)),l.stack="",l.digest=f,pn({value:l,source:null,stack:null}),t=ar(e,t,a)}else if(Ye||wl(e,t,a,!1),f=(a&e.childLanes)!==0,Ye||f){if(f=we,f!==null&&(l=qc(f,a),l!==0&&l!==x.retryLane))throw x.retryLane=l,Va(e,l),ft(f,e,l),$s;Ur(m)||Ii(),t=ar(e,t,a)}else Ur(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Me=_t(m.nextSibling),$e=t,he=!0,va=null,Ot=!1,e!==null&&_o(t,e),t=tr(t,l.children),t.flags|=4096);return t}return i?(Ca(),m=l.fallback,i=t.mode,x=e.child,M=x.sibling,l=$t(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,M!==null?m=$t(M,m):(m=ka(m,i,a,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,Mn(null,l),l=t.child,m=e.child.memoizedState,m===null?m=Is(a):(i=m.cachePool,i!==null?(x=Be._currentValue,i=i.parent!==x?{parent:x,pool:x}:i):i=Bo(),m={baseLanes:m.baseLanes|a,cachePool:i}),l.memoizedState=m,l.childLanes=er(e,f,a),t.memoizedState=Ps,Mn(e.child,l)):(Ea(t),a=e.child,e=a.sibling,a=$t(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function tr(e,t){return t=Xi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xi(e,t){return e=pt(22,e,null,t),e.lanes=0,e}function ar(e,t,a){return el(t,e.child,null,a),e=tr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function If(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ps(e.return,t,a)}function lr(e,t,a,l,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:i,treeForkCount:u}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=i,f.treeForkCount=u)}function ed(e,t,a){var l=t.pendingProps,i=l.revealOrder,u=l.tail;l=l.children;var f=He.current,m=(f&2)!==0;if(m?(f=f&1|2,t.flags|=128):f&=1,k(He,f),Pe(e,t,l,a),l=he?gn:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&If(e,a,t);else if(e.tag===19)If(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&zi(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),lr(t,!1,i,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&zi(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}lr(t,!0,a,null,u,l);break;case"together":lr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(wl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=$t(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$t(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function nr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function py(e,t,a){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),ba(t,Be,e.memoizedState.cache),Ja();break;case 27:case 5:en(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ms(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ea(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Pf(e,t,a):(Ea(t),e=aa(e,t,a),e!==null?e.sibling:null);Ea(t);break;case 19:var i=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(wl(e,t,a,!1),l=(a&t.childLanes)!==0),i){if(l)return ed(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(He,He.current),l)break;return null;case 22:return t.lanes=0,Vf(e,t,a,t.pendingProps);case 24:ba(t,Be,e.memoizedState.cache)}return aa(e,t,a)}function td(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!nr(e,a)&&(t.flags&128)===0)return Ye=!1,py(e,t,a);Ye=(e.flags&131072)!==0}else Ye=!1,he&&(t.flags&1048576)!==0&&zo(t,gn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Pa(t.elementType),t.type=e,typeof e=="function")cs(e)?(l=al(e,l),t.tag=1,t=$f(null,t,e,l,a)):(t.tag=0,t=Ws(null,t,e,l,a));else{if(e!=null){var i=e.$$typeof;if(i===X){t.tag=11,t=Kf(null,t,e,l,a);break e}else if(i===G){t.tag=14,t=Xf(null,t,e,l,a);break e}}throw t=Et(e)||e,Error(c(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,i=al(l,t.pendingProps),$f(e,t,l,i,a);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var u=t.memoizedState;i=u.element,Es(e,t),En(t,l,null,a);var f=t.memoizedState;if(l=f.cache,ba(t,Be,l),l!==u.cache&&vs(t,[Be],a,!0),Nn(),l=f.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Wf(e,t,l,a);break e}else if(l!==i){i=Rt(Error(c(424)),t),pn(i),t=Wf(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Me=_t(e.firstChild),$e=t,he=!0,va=null,Ot=!0,a=Zo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ja(),l===i){t=aa(e,t,a);break e}Pe(e,t,l,a)}t=t.child}return t;case 26:return Ki(e,t),e===null?(a=dh(t.type,null,t.pendingProps,null))?t.memoizedState=a:he||(a=t.type,e=t.pendingProps,l=uu(re.current).createElement(a),l[Fe]=t,l[it]=e,Ie(l,a,e),Ve(l),t.stateNode=l):t.memoizedState=dh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return en(t),e===null&&he&&(l=t.stateNode=ch(t.type,t.pendingProps,re.current),$e=t,Ot=!0,i=Me,_a(t.type)?(Hr=i,Me=_t(l.firstChild)):Me=i),Pe(e,t,t.pendingProps.children,a),Ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&he&&((i=l=Me)&&(l=ky(l,t.type,t.pendingProps,Ot),l!==null?(t.stateNode=l,$e=t,Me=_t(l.firstChild),Ot=!1,i=!0):i=!1),i||xa(t)),en(t),i=t.type,u=t.pendingProps,f=e!==null?e.memoizedProps:null,l=u.children,zr(i,u)?l=null:f!==null&&zr(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Os(e,t,ry,null,null,a),Xn._currentValue=i),Ki(e,t),Pe(e,t,l,a),t.child;case 6:return e===null&&he&&((e=a=Me)&&(a=Jy(a,t.pendingProps,Ot),a!==null?(t.stateNode=a,$e=t,Me=null,e=!0):e=!1),e||xa(t)),null;case 13:return Pf(e,t,a);case 4:return tt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=el(t,null,l,a):Pe(e,t,l,a),t.child;case 11:return Kf(e,t,t.type,t.pendingProps,a);case 7:return Pe(e,t,t.pendingProps,a),t.child;case 8:return Pe(e,t,t.pendingProps.children,a),t.child;case 12:return Pe(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ba(t,t.type,l.value),Pe(e,t,l.children,a),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,$a(t),i=We(i),l=l(i),t.flags|=1,Pe(e,t,l,a),t.child;case 14:return Xf(e,t,t.type,t.pendingProps,a);case 15:return Zf(e,t,t.type,t.pendingProps,a);case 19:return ed(e,t,a);case 31:return gy(e,t,a);case 22:return Vf(e,t,a,t.pendingProps);case 24:return $a(t),l=We(Be),e===null?(i=Ss(),i===null&&(i=we,u=xs(),i.pooledCache=u,u.refCount++,u!==null&&(i.pooledCacheLanes|=a),i=u),t.memoizedState={parent:l,cache:i},Ns(t),ba(t,Be,i)):((e.lanes&a)!==0&&(Es(e,t),En(t,null,null,a),Nn()),i=e.memoizedState,u=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ba(t,Be,l)):(l=u.cache,ba(t,Be,l),l!==i.cache&&vs(t,[Be],a,!0))),Pe(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function la(e){e.flags|=4}function ir(e,t,a,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Rd())e.flags|=8192;else throw Ia=Ri,js}else e.flags&=-16777217}function ad(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ph(t))if(Rd())e.flags|=8192;else throw Ia=Ri,js}function Zi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_c():536870912,e.lanes|=t,Bl|=t)}function An(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function vy(e,t,a){var l=t.pendingProps;switch(hs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return Ae(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),It(Be),qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?la(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ys())),Ae(t),null;case 26:var i=t.type,u=t.memoizedState;return e===null?(la(t),u!==null?(Ae(t),ad(t,u)):(Ae(t),ir(t,i,null,l,a))):u?u!==e.memoizedState?(la(t),Ae(t),ad(t,u)):(Ae(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&la(t),Ae(t),ir(t,i,e,l,a)),null;case 27:if(ai(t),a=re.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&la(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ae(t),null}e=F.current,Tl(t)?Do(t):(e=ch(i,l,a),t.stateNode=e,la(t))}return Ae(t),null;case 5:if(ai(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&la(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ae(t),null}if(u=F.current,Tl(t))Do(t);else{var f=uu(re.current);switch(u){case 1:u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":u=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":u=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":u=f.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?f.createElement(i,{is:l.is}):f.createElement(i)}}u[Fe]=t,u[it]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)u.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=u;e:switch(Ie(u,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&la(t)}}return Ae(t),ir(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&la(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=re.current,Tl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,i=$e,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Pd(e.nodeValue,a)),e||xa(t,!0)}else e=uu(e).createTextNode(l),e[Fe]=t,t.stateNode=e}return Ae(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Tl(t),a!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Fe]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ae(t),e=!1}else a=ys(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ae(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Tl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[Fe]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ae(t),i=!1}else i=ys(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==i&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Zi(t,t.updateQueue),Ae(t),null);case 4:return qe(),e===null&&wr(t.stateNode.containerInfo),Ae(t),null;case 10:return It(t.type),Ae(t),null;case 19:if(L(He),l=t.memoizedState,l===null)return Ae(t),null;if(i=(t.flags&128)!==0,u=l.rendering,u===null)if(i)An(l,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=zi(e),u!==null){for(t.flags|=128,An(l,!1),e=u.updateQueue,t.updateQueue=e,Zi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Mo(a,e),a=a.sibling;return k(He,He.current&1|2),he&&Wt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ht()>$i&&(t.flags|=128,i=!0,An(l,!1),t.lanes=4194304)}else{if(!i)if(e=zi(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Zi(t,e),An(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!he)return Ae(t),null}else 2*ht()-l.renderingStartTime>$i&&a!==536870912&&(t.flags|=128,i=!0,An(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ht(),e.sibling=null,a=He.current,k(He,i?a&1|2:a&1),he&&Wt(t,l.treeForkCount),e):(Ae(t),null);case 22:case 23:return xt(t),Rs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),a=t.updateQueue,a!==null&&Zi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&L(Wa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),It(Be),Ae(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function xy(e,t){switch(hs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(Be),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ai(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(c(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(He),null;case 4:return qe(),null;case 10:return It(t.type),null;case 22:case 23:return xt(t),Rs(),e!==null&&L(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(Be),null;case 25:return null;default:return null}}function ld(e,t){switch(hs(t),t.tag){case 3:It(Be),qe();break;case 26:case 27:case 5:ai(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:L(He);break;case 10:It(t.type);break;case 22:case 23:xt(t),Rs(),e!==null&&L(Wa);break;case 24:It(Be)}}function On(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){l=void 0;var u=a.create,f=a.inst;l=u(),f.destroy=l}a=a.next}while(a!==i)}}catch(m){be(t,t.return,m)}}function Ta(e,t,a){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var u=i.next;l=u;do{if((l.tag&e)===e){var f=l.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,i=t;var x=a,M=m;try{M()}catch(U){be(i,x,U)}}}l=l.next}while(l!==u)}}catch(U){be(t,t.return,U)}}function nd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ko(t,a)}catch(l){be(e,e.return,l)}}}function id(e,t,a){a.props=al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){be(e,t,l)}}function zn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(i){be(e,t,i)}}function Xt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(i){be(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){be(e,t,i)}else a.current=null}function ud(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(i){be(e,e.return,i)}}function ur(e,t,a){try{var l=e.stateNode;Yy(l,e.type,a,t),l[it]=t}catch(i){be(e,e.return,i)}}function sd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_a(e.type)||e.tag===4}function sr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&_a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Jt));else if(l!==4&&(l===27&&_a(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(rr(e,t,a),e=e.sibling;e!==null;)rr(e,t,a),e=e.sibling}function Vi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&_a(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Vi(e,t,a),e=e.sibling;e!==null;)Vi(e,t,a),e=e.sibling}function rd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ie(t,l,a),t[Fe]=e,t[it]=a}catch(u){be(e,e.return,u)}}var na=!1,Ge=!1,cr=!1,cd=typeof WeakSet=="function"?WeakSet:Set,ke=null;function by(e,t){if(e=e.containerInfo,Ar=hu,e=bo(e),as(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var i=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var f=0,m=-1,x=-1,M=0,U=0,H=e,A=null;t:for(;;){for(var z;H!==a||i!==0&&H.nodeType!==3||(m=f+i),H!==u||l!==0&&H.nodeType!==3||(x=f+l),H.nodeType===3&&(f+=H.nodeValue.length),(z=H.firstChild)!==null;)A=H,H=z;for(;;){if(H===e)break t;if(A===a&&++M===i&&(m=f),A===u&&++U===l&&(x=f),(z=H.nextSibling)!==null)break;H=A,A=H.parentNode}H=z}a=m===-1||x===-1?null:{start:m,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Or={focusedElem:e,selectionRange:a},hu=!1,ke=t;ke!==null;)if(t=ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ke=e;else for(;ke!==null;){switch(t=ke,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,i=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var J=al(a.type,i);e=l.getSnapshotBeforeUpdate(J,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(I){be(a,a.return,I)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Dr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ke=e;break}ke=t.return}}function od(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ua(e,a),l&4&&On(5,a);break;case 1:if(ua(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){be(a,a.return,f)}else{var i=al(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){be(a,a.return,f)}}l&64&&nd(a),l&512&&zn(a,a.return);break;case 3:if(ua(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{ko(e,t)}catch(f){be(a,a.return,f)}}break;case 27:t===null&&l&4&&rd(a);case 26:case 5:ua(e,a),t===null&&l&4&&ud(a),l&512&&zn(a,a.return);break;case 12:ua(e,a);break;case 31:ua(e,a),l&4&&hd(e,a);break;case 13:ua(e,a),l&4&&md(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=My.bind(null,a),Fy(e,a))));break;case 22:if(l=a.memoizedState!==null||na,!l){t=t!==null&&t.memoizedState!==null||Ge,i=na;var u=Ge;na=l,(Ge=t)&&!u?sa(e,a,(a.subtreeFlags&8772)!==0):ua(e,a),na=i,Ge=u}break;case 30:break;default:ua(e,a)}}function fd(e){var t=e.alternate;t!==null&&(e.alternate=null,fd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Bu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Oe=null,st=!1;function ia(e,t,a){for(a=a.child;a!==null;)dd(e,t,a),a=a.sibling}function dd(e,t,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(tn,a)}catch{}switch(a.tag){case 26:Ge||Xt(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ge||Xt(a,t);var l=Oe,i=st;_a(a.type)&&(Oe=a.stateNode,st=!1),ia(e,t,a),Yn(a.stateNode),Oe=l,st=i;break;case 5:Ge||Xt(a,t);case 6:if(l=Oe,i=st,Oe=null,ia(e,t,a),Oe=l,st=i,Oe!==null)if(st)try{(Oe.nodeType===9?Oe.body:Oe.nodeName==="HTML"?Oe.ownerDocument.body:Oe).removeChild(a.stateNode)}catch(u){be(a,t,u)}else try{Oe.removeChild(a.stateNode)}catch(u){be(a,t,u)}break;case 18:Oe!==null&&(st?(e=Oe,nh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),kl(e)):nh(Oe,a.stateNode));break;case 4:l=Oe,i=st,Oe=a.stateNode.containerInfo,st=!0,ia(e,t,a),Oe=l,st=i;break;case 0:case 11:case 14:case 15:Ta(2,a,t),Ge||Ta(4,a,t),ia(e,t,a);break;case 1:Ge||(Xt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&id(a,t,l)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:Ge=(l=Ge)||a.memoizedState!==null,ia(e,t,a),Ge=l;break;default:ia(e,t,a)}}function hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{kl(e)}catch(a){be(t,t.return,a)}}}function md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{kl(e)}catch(a){be(t,t.return,a)}}function Sy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cd),t;default:throw Error(c(435,e.tag))}}function ki(e,t){var a=Sy(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var i=Ay.bind(null,e,l);l.then(i,i)}})}function rt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var i=a[l],u=e,f=t,m=f;e:for(;m!==null;){switch(m.tag){case 27:if(_a(m.type)){Oe=m.stateNode,st=!1;break e}break;case 5:Oe=m.stateNode,st=!1;break e;case 3:case 4:Oe=m.stateNode.containerInfo,st=!0;break e}m=m.return}if(Oe===null)throw Error(c(160));dd(u,f,i),Oe=null,st=!1,u=i.alternate,u!==null&&(u.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yd(t,e),t=t.sibling}var Lt=null;function yd(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ct(e),l&4&&(Ta(3,e,e.return),On(3,e),Ta(5,e,e.return));break;case 1:rt(t,e),ct(e),l&512&&(Ge||a===null||Xt(a,a.return)),l&64&&na&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var i=Lt;if(rt(t,e),ct(e),l&512&&(Ge||a===null||Xt(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":u=i.getElementsByTagName("title")[0],(!u||u[nn]||u[Fe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=i.createElement(l),i.head.insertBefore(u,i.querySelector("head > title"))),Ie(u,l,a),u[Fe]=e,Ve(u),l=u;break e;case"link":var f=yh("link","href",i).get(l+(a.href||""));if(f){for(var m=0;m<f.length;m++)if(u=f[m],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(m,1);break t}}u=i.createElement(l),Ie(u,l,a),i.head.appendChild(u);break;case"meta":if(f=yh("meta","content",i).get(l+(a.content||""))){for(m=0;m<f.length;m++)if(u=f[m],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(m,1);break t}}u=i.createElement(l),Ie(u,l,a),i.head.appendChild(u);break;default:throw Error(c(468,l))}u[Fe]=e,Ve(u),l=u}e.stateNode=l}else gh(i,e.type,e.stateNode);else e.stateNode=mh(i,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?gh(i,e.type,e.stateNode):mh(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ur(e,e.memoizedProps,a.memoizedProps)}break;case 27:rt(t,e),ct(e),l&512&&(Ge||a===null||Xt(a,a.return)),a!==null&&l&4&&ur(e,e.memoizedProps,a.memoizedProps);break;case 5:if(rt(t,e),ct(e),l&512&&(Ge||a===null||Xt(a,a.return)),e.flags&32){i=e.stateNode;try{gl(i,"")}catch(J){be(e,e.return,J)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,ur(e,i,a!==null?a.memoizedProps:i)),l&1024&&(cr=!0);break;case 6:if(rt(t,e),ct(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(J){be(e,e.return,J)}}break;case 3:if(cu=null,i=Lt,Lt=su(t.containerInfo),rt(t,e),Lt=i,ct(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{kl(t.containerInfo)}catch(J){be(e,e.return,J)}cr&&(cr=!1,gd(e));break;case 4:l=Lt,Lt=su(e.stateNode.containerInfo),rt(t,e),ct(e),Lt=l;break;case 12:rt(t,e),ct(e);break;case 31:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ki(e,l)));break;case 13:rt(t,e),ct(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Fi=ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ki(e,l)));break;case 22:i=e.memoizedState!==null;var x=a!==null&&a.memoizedState!==null,M=na,U=Ge;if(na=M||i,Ge=U||x,rt(t,e),Ge=U,na=M,ct(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||x||na||Ge||ll(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){x=a=t;try{if(u=x.stateNode,i)f=u.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{m=x.stateNode;var H=x.memoizedProps.style,A=H!=null&&H.hasOwnProperty("display")?H.display:null;m.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(J){be(x,x.return,J)}}}else if(t.tag===6){if(a===null){x=t;try{x.stateNode.nodeValue=i?"":x.memoizedProps}catch(J){be(x,x.return,J)}}}else if(t.tag===18){if(a===null){x=t;try{var z=x.stateNode;i?ih(z,!0):ih(x.stateNode,!1)}catch(J){be(x,x.return,J)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ki(e,a))));break;case 19:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ki(e,l)));break;case 30:break;case 21:break;default:rt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(sd(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var i=a.stateNode,u=sr(e);Vi(e,u,i);break;case 5:var f=a.stateNode;a.flags&32&&(gl(f,""),a.flags&=-33);var m=sr(e);Vi(e,m,f);break;case 3:case 4:var x=a.stateNode.containerInfo,M=sr(e);rr(e,M,x);break;default:throw Error(c(161))}}catch(U){be(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)od(e,t.alternate,t),t=t.sibling}function ll(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),ll(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&id(t,t.return,a),ll(t);break;case 27:Yn(t.stateNode);case 26:case 5:Xt(t,t.return),ll(t);break;case 22:t.memoizedState===null&&ll(t);break;case 30:ll(t);break;default:ll(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,u=t,f=u.flags;switch(u.tag){case 0:case 11:case 15:sa(i,u,a),On(4,u);break;case 1:if(sa(i,u,a),l=u,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(M){be(l,l.return,M)}if(l=u,i=l.updateQueue,i!==null){var m=l.stateNode;try{var x=i.shared.hiddenCallbacks;if(x!==null)for(i.shared.hiddenCallbacks=null,i=0;i<x.length;i++)Vo(x[i],m)}catch(M){be(l,l.return,M)}}a&&f&64&&nd(u),zn(u,u.return);break;case 27:rd(u);case 26:case 5:sa(i,u,a),a&&l===null&&f&4&&ud(u),zn(u,u.return);break;case 12:sa(i,u,a);break;case 31:sa(i,u,a),a&&f&4&&hd(i,u);break;case 13:sa(i,u,a),a&&f&4&&md(i,u);break;case 22:u.memoizedState===null&&sa(i,u,a),zn(u,u.return);break;case 30:break;default:sa(i,u,a)}t=t.sibling}}function or(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&vn(a))}function fr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vn(e))}function Bt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pd(e,t,a,l),t=t.sibling}function pd(e,t,a,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,a,l),i&2048&&On(9,t);break;case 1:Bt(e,t,a,l);break;case 3:Bt(e,t,a,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vn(e)));break;case 12:if(i&2048){Bt(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,f=u.id,m=u.onPostCommit;typeof m=="function"&&m(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){be(t,t.return,x)}}else Bt(e,t,a,l);break;case 31:Bt(e,t,a,l);break;case 13:Bt(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,f=t.alternate,t.memoizedState!==null?u._visibility&2?Bt(e,t,a,l):_n(e,t):u._visibility&2?Bt(e,t,a,l):(u._visibility|=2,ql(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&or(f,t);break;case 24:Bt(e,t,a,l),i&2048&&fr(t.alternate,t);break;default:Bt(e,t,a,l)}}function ql(e,t,a,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,f=t,m=a,x=l,M=f.flags;switch(f.tag){case 0:case 11:case 15:ql(u,f,m,x,i),On(8,f);break;case 23:break;case 22:var U=f.stateNode;f.memoizedState!==null?U._visibility&2?ql(u,f,m,x,i):_n(u,f):(U._visibility|=2,ql(u,f,m,x,i)),i&&M&2048&&or(f.alternate,f);break;case 24:ql(u,f,m,x,i),i&&M&2048&&fr(f.alternate,f);break;default:ql(u,f,m,x,i)}t=t.sibling}}function _n(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,i=l.flags;switch(l.tag){case 22:_n(a,l),i&2048&&or(l.alternate,l);break;case 24:_n(a,l),i&2048&&fr(l.alternate,l);break;default:_n(a,l)}t=t.sibling}}var Dn=8192;function Hl(e,t,a){if(e.subtreeFlags&Dn)for(e=e.child;e!==null;)vd(e,t,a),e=e.sibling}function vd(e,t,a){switch(e.tag){case 26:Hl(e,t,a),e.flags&Dn&&e.memoizedState!==null&&sg(a,Lt,e.memoizedState,e.memoizedProps);break;case 5:Hl(e,t,a);break;case 3:case 4:var l=Lt;Lt=su(e.stateNode.containerInfo),Hl(e,t,a),Lt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Dn,Dn=16777216,Hl(e,t,a),Dn=l):Hl(e,t,a));break;default:Hl(e,t,a)}}function xd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Un(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ke=l,Sd(l,e)}xd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bd(e),e=e.sibling}function bd(e){switch(e.tag){case 0:case 11:case 15:Un(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Un(e);break;case 12:Un(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ji(e)):Un(e);break;default:Un(e)}}function Ji(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ke=l,Sd(l,e)}xd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),Ji(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ji(t));break;default:Ji(t)}e=e.sibling}}function Sd(e,t){for(;ke!==null;){var a=ke;switch(a.tag){case 0:case 11:case 15:Ta(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:vn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ke=l;else e:for(a=e;ke!==null;){l=ke;var i=l.sibling,u=l.return;if(fd(l),l===a){ke=null;break e}if(i!==null){i.return=u,ke=i;break e}ke=u}}}var jy={getCacheForType:function(e){var t=We(Be),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return We(Be).controller.signal}},Ny=typeof WeakMap=="function"?WeakMap:Map,pe=0,we=null,ce=null,fe=0,xe=0,bt=null,wa=!1,Ll=!1,dr=!1,ra=0,Ue=0,Ra=0,nl=0,hr=0,St=0,Bl=0,qn=null,ot=null,mr=!1,Fi=0,jd=0,$i=1/0,Wi=null,Ma=null,Xe=0,Aa=null,Ql=null,ca=0,yr=0,gr=null,Nd=null,Hn=0,pr=null;function jt(){return(pe&2)!==0&&fe!==0?fe&-fe:_.T!==null?Nr():Hc()}function Ed(){if(St===0)if((fe&536870912)===0||he){var e=ii;ii<<=1,(ii&3932160)===0&&(ii=262144),St=e}else St=536870912;return e=vt.current,e!==null&&(e.flags|=32),St}function ft(e,t,a){(e===we&&(xe===2||xe===9)||e.cancelPendingCommit!==null)&&(Yl(e,0),Oa(e,fe,St,!1)),ln(e,a),((pe&2)===0||e!==we)&&(e===we&&((pe&2)===0&&(nl|=a),Ue===4&&Oa(e,fe,St,!1)),Zt(e))}function Cd(e,t,a){if((pe&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||an(e,t),i=l?Ty(e,t):xr(e,t,!0),u=l;do{if(i===0){Ll&&!l&&Oa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Ey(a)){i=xr(e,t,!1),u=!1;continue}if(i===2){if(u=t,e.errorRecoveryDisabledLanes&u)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var m=e;i=qn;var x=m.current.memoizedState.isDehydrated;if(x&&(Yl(m,f).flags|=256),f=xr(m,f,!1),f!==2){if(dr&&!x){m.errorRecoveryDisabledLanes|=u,nl|=u,i=4;break e}u=ot,ot=i,u!==null&&(ot===null?ot=u:ot.push.apply(ot,u))}i=f}if(u=!1,i!==2)continue}}if(i===1){Yl(e,0),Oa(e,t,0,!0);break}e:{switch(l=e,u=i,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Oa(l,t,St,!wa);break e;case 2:ot=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(i=Fi+300-ht(),10<i)){if(Oa(l,t,St,!wa),si(l,0,!0)!==0)break e;ca=t,l.timeoutHandle=ah(Td.bind(null,l,a,ot,Wi,mr,t,St,nl,Bl,wa,u,"Throttled",-0,0),i);break e}Td(l,a,ot,Wi,mr,t,St,nl,Bl,wa,u,null,-0,0)}}break}while(!0);Zt(e)}function Td(e,t,a,l,i,u,f,m,x,M,U,H,A,z){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},vd(t,u,H);var J=(u&62914560)===u?Fi-ht():(u&4194048)===u?jd-ht():0;if(J=rg(H,J),J!==null){ca=u,e.cancelPendingCommit=J(Dd.bind(null,e,t,u,a,l,i,f,m,x,U,H,null,A,z)),Oa(e,u,f,!M);return}}Dd(e,t,u,a,l,i,f,m,x)}function Ey(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var i=a[l],u=i.getSnapshot;i=i.value;try{if(!gt(u(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oa(e,t,a,l){t&=~hr,t&=~nl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var u=31-yt(i),f=1<<u;l[u]=-1,i&=~f}a!==0&&Dc(e,a,t)}function Pi(){return(pe&6)===0?(Ln(0),!1):!0}function vr(){if(ce!==null){if(xe===0)var e=ce.return;else e=ce,Pt=Fa=null,Ds(e),Ol=null,bn=0,e=ce;for(;e!==null;)ld(e.alternate,e),e=e.return;ce=null}}function Yl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Xy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,vr(),we=e,ce=a=$t(e.current,null),fe=t,xe=0,bt=null,wa=!1,Ll=an(e,t),dr=!1,Bl=St=hr=nl=Ra=Ue=0,ot=qn=null,mr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-yt(l),u=1<<i;t|=e[i],l&=~u}return ra=t,xi(),a}function wd(e,t){ie=null,_.H=Rn,t===Al||t===wi?(t=Go(),xe=3):t===js?(t=Go(),xe=4):xe=t===$s?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,ce===null&&(Ue=1,Yi(e,Rt(t,e.current)))}function Rd(){var e=vt.current;return e===null?!0:(fe&4194048)===fe?zt===null:(fe&62914560)===fe||(fe&536870912)!==0?e===zt:!1}function Md(){var e=_.H;return _.H=Rn,e===null?Rn:e}function Ad(){var e=_.A;return _.A=jy,e}function Ii(){Ue=4,wa||(fe&4194048)!==fe&&vt.current!==null||(Ll=!0),(Ra&134217727)===0&&(nl&134217727)===0||we===null||Oa(we,fe,St,!1)}function xr(e,t,a){var l=pe;pe|=2;var i=Md(),u=Ad();(we!==e||fe!==t)&&(Wi=null,Yl(e,t)),t=!1;var f=Ue;e:do try{if(xe!==0&&ce!==null){var m=ce,x=bt;switch(xe){case 8:vr(),f=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var M=xe;if(xe=0,bt=null,Gl(e,m,x,M),a&&Ll){f=0;break e}break;default:M=xe,xe=0,bt=null,Gl(e,m,x,M)}}Cy(),f=Ue;break}catch(U){wd(e,U)}while(!0);return t&&e.shellSuspendCounter++,Pt=Fa=null,pe=l,_.H=i,_.A=u,ce===null&&(we=null,fe=0,xi()),f}function Cy(){for(;ce!==null;)Od(ce)}function Ty(e,t){var a=pe;pe|=2;var l=Md(),i=Ad();we!==e||fe!==t?(Wi=null,$i=ht()+500,Yl(e,t)):Ll=an(e,t);e:do try{if(xe!==0&&ce!==null){t=ce;var u=bt;t:switch(xe){case 1:xe=0,bt=null,Gl(e,t,u,1);break;case 2:case 9:if(Qo(u)){xe=0,bt=null,zd(t);break}t=function(){xe!==2&&xe!==9||we!==e||(xe=7),Zt(e)},u.then(t,t);break e;case 3:xe=7;break e;case 4:xe=5;break e;case 7:Qo(u)?(xe=0,bt=null,zd(t)):(xe=0,bt=null,Gl(e,t,u,7));break;case 5:var f=null;switch(ce.tag){case 26:f=ce.memoizedState;case 5:case 27:var m=ce;if(f?ph(f):m.stateNode.complete){xe=0,bt=null;var x=m.sibling;if(x!==null)ce=x;else{var M=m.return;M!==null?(ce=M,eu(M)):ce=null}break t}}xe=0,bt=null,Gl(e,t,u,5);break;case 6:xe=0,bt=null,Gl(e,t,u,6);break;case 8:vr(),Ue=6;break e;default:throw Error(c(462))}}wy();break}catch(U){wd(e,U)}while(!0);return Pt=Fa=null,_.H=l,_.A=i,pe=a,ce!==null?0:(we=null,fe=0,xi(),Ue)}function wy(){for(;ce!==null&&!$m();)Od(ce)}function Od(e){var t=td(e.alternate,e,ra);e.memoizedProps=e.pendingProps,t===null?eu(e):ce=t}function zd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Ff(a,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=Ff(a,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:Ds(t);default:ld(a,t),t=ce=Mo(t,ra),t=td(a,t,ra)}e.memoizedProps=e.pendingProps,t===null?eu(e):ce=t}function Gl(e,t,a,l){Pt=Fa=null,Ds(t),Ol=null,bn=0;var i=t.return;try{if(yy(e,i,t,a,fe)){Ue=1,Yi(e,Rt(a,e.current)),ce=null;return}}catch(u){if(i!==null)throw ce=i,u;Ue=1,Yi(e,Rt(a,e.current)),ce=null;return}t.flags&32768?(he||l===1?e=!0:Ll||(fe&536870912)!==0?e=!1:(wa=e=!0,(l===2||l===9||l===3||l===6)&&(l=vt.current,l!==null&&l.tag===13&&(l.flags|=16384))),_d(t,e)):eu(t)}function eu(e){var t=e;do{if((t.flags&32768)!==0){_d(t,wa);return}e=t.return;var a=vy(t.alternate,t,ra);if(a!==null){ce=a;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);Ue===0&&(Ue=5)}function _d(e,t){do{var a=xy(e.alternate,e);if(a!==null){a.flags&=32767,ce=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=a}while(e!==null);Ue=6,ce=null}function Dd(e,t,a,l,i,u,f,m,x){e.cancelPendingCommit=null;do tu();while(Xe!==0);if((pe&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=ss,u0(e,a,u,f,m,x),e===we&&(ce=we=null,fe=0),Ql=t,Aa=e,ca=a,yr=u,gr=i,Nd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Oy(li,function(){return Bd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=_.T,_.T=null,i=V.p,V.p=2,f=pe,pe|=4;try{by(e,t,a)}finally{pe=f,V.p=i,_.T=l}}Xe=1,Ud(),qd(),Hd()}}function Ud(){if(Xe===1){Xe=0;var e=Aa,t=Ql,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=_.T,_.T=null;var l=V.p;V.p=2;var i=pe;pe|=4;try{yd(t,e);var u=Or,f=bo(e.containerInfo),m=u.focusedElem,x=u.selectionRange;if(f!==m&&m&&m.ownerDocument&&xo(m.ownerDocument.documentElement,m)){if(x!==null&&as(m)){var M=x.start,U=x.end;if(U===void 0&&(U=M),"selectionStart"in m)m.selectionStart=M,m.selectionEnd=Math.min(U,m.value.length);else{var H=m.ownerDocument||document,A=H&&H.defaultView||window;if(A.getSelection){var z=A.getSelection(),J=m.textContent.length,I=Math.min(x.start,J),Ee=x.end===void 0?I:Math.min(x.end,J);!z.extend&&I>Ee&&(f=Ee,Ee=I,I=f);var C=vo(m,I),b=vo(m,Ee);if(C&&b&&(z.rangeCount!==1||z.anchorNode!==C.node||z.anchorOffset!==C.offset||z.focusNode!==b.node||z.focusOffset!==b.offset)){var R=H.createRange();R.setStart(C.node,C.offset),z.removeAllRanges(),I>Ee?(z.addRange(R),z.extend(b.node,b.offset)):(R.setEnd(b.node,b.offset),z.addRange(R))}}}}for(H=[],z=m;z=z.parentNode;)z.nodeType===1&&H.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<H.length;m++){var q=H[m];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}hu=!!Ar,Or=Ar=null}finally{pe=i,V.p=l,_.T=a}}e.current=t,Xe=2}}function qd(){if(Xe===2){Xe=0;var e=Aa,t=Ql,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=_.T,_.T=null;var l=V.p;V.p=2;var i=pe;pe|=4;try{od(e,t.alternate,t)}finally{pe=i,V.p=l,_.T=a}}Xe=3}}function Hd(){if(Xe===4||Xe===3){Xe=0,Wm();var e=Aa,t=Ql,a=ca,l=Nd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Xe=5:(Xe=0,Ql=Aa=null,Ld(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ma=null),Hu(a),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(tn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=_.T,i=V.p,V.p=2,_.T=null;try{for(var u=e.onRecoverableError,f=0;f<l.length;f++){var m=l[f];u(m.value,{componentStack:m.stack})}}finally{_.T=t,V.p=i}}(ca&3)!==0&&tu(),Zt(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===pr?Hn++:(Hn=0,pr=e):Hn=0,Ln(0)}}function Ld(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vn(t)))}function tu(){return Ud(),qd(),Hd(),Bd()}function Bd(){if(Xe!==5)return!1;var e=Aa,t=yr;yr=0;var a=Hu(ca),l=_.T,i=V.p;try{V.p=32>a?32:a,_.T=null,a=gr,gr=null;var u=Aa,f=ca;if(Xe=0,Ql=Aa=null,ca=0,(pe&6)!==0)throw Error(c(331));var m=pe;if(pe|=4,bd(u.current),pd(u,u.current,f,a),pe=m,Ln(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(tn,u)}catch{}return!0}finally{V.p=i,_.T=l,Ld(e,t)}}function Qd(e,t,a){t=Rt(a,t),t=Fs(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(ln(e,2),Zt(e))}function be(e,t,a){if(e.tag===3)Qd(e,e,a);else for(;t!==null;){if(t.tag===3){Qd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ma===null||!Ma.has(l))){e=Rt(a,e),a=Yf(2),l=Na(t,a,2),l!==null&&(Gf(a,l,t,e),ln(l,2),Zt(l));break}}t=t.return}}function br(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ny;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(a)||(dr=!0,i.add(a),e=Ry.bind(null,e,t,a),t.then(e,e))}function Ry(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,we===e&&(fe&a)===a&&(Ue===4||Ue===3&&(fe&62914560)===fe&&300>ht()-Fi?(pe&2)===0&&Yl(e,0):hr|=a,Bl===fe&&(Bl=0)),Zt(e)}function Yd(e,t){t===0&&(t=_c()),e=Va(e,t),e!==null&&(ln(e,t),Zt(e))}function My(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Yd(e,a)}function Ay(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),Yd(e,a)}function Oy(e,t){return _u(e,t)}var au=null,Kl=null,Sr=!1,lu=!1,jr=!1,za=0;function Zt(e){e!==Kl&&e.next===null&&(Kl===null?au=Kl=e:Kl=Kl.next=e),lu=!0,Sr||(Sr=!0,_y())}function Ln(e,t){if(!jr&&lu){jr=!0;do for(var a=!1,l=au;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var u=0;else{var f=l.suspendedLanes,m=l.pingedLanes;u=(1<<31-yt(42|e)+1)-1,u&=i&~(f&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Zd(l,u))}else u=fe,u=si(l,l===we?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||an(l,u)||(a=!0,Zd(l,u));l=l.next}while(a);jr=!1}}function zy(){Gd()}function Gd(){lu=Sr=!1;var e=0;za!==0&&Ky()&&(e=za);for(var t=ht(),a=null,l=au;l!==null;){var i=l.next,u=Kd(l,t);u===0?(l.next=null,a===null?au=i:a.next=i,i===null&&(Kl=a)):(a=l,(e!==0||(u&3)!==0)&&(lu=!0)),l=i}Xe!==0&&Xe!==5||Ln(e),za!==0&&(za=0)}function Kd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var f=31-yt(u),m=1<<f,x=i[f];x===-1?((m&a)===0||(m&l)!==0)&&(i[f]=i0(m,t)):x<=t&&(e.expiredLanes|=m),u&=~m}if(t=we,a=fe,a=si(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(xe===2||xe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Du(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||an(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Du(l),Hu(a)){case 2:case 8:a=Oc;break;case 32:a=li;break;case 268435456:a=zc;break;default:a=li}return l=Xd.bind(null,e),a=_u(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Du(l),e.callbackPriority=2,e.callbackNode=null,2}function Xd(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(tu()&&e.callbackNode!==a)return null;var l=fe;return l=si(e,e===we?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Cd(e,l,t),Kd(e,ht()),e.callbackNode!=null&&e.callbackNode===a?Xd.bind(null,e):null)}function Zd(e,t){if(tu())return null;Cd(e,t,!0)}function _y(){Zy(function(){(pe&6)!==0?_u(Ac,zy):Gd()})}function Nr(){if(za===0){var e=Rl;e===0&&(e=ni,ni<<=1,(ni&261888)===0&&(ni=256)),za=e}return za}function Vd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fi(""+e)}function kd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Dy(e,t,a,l,i){if(t==="submit"&&a&&a.stateNode===i){var u=Vd((i[it]||null).action),f=l.submitter;f&&(t=(t=f[it]||null)?Vd(t.formAction):f.getAttribute("formAction"),t!==null&&(u=t,f=null));var m=new yi("action","action",null,l,i);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(za!==0){var x=f?kd(i,f):new FormData(i);Ks(a,{pending:!0,data:x,method:i.method,action:u},null,x)}}else typeof u=="function"&&(m.preventDefault(),x=f?kd(i,f):new FormData(i),Ks(a,{pending:!0,data:x,method:i.method,action:u},u,x))},currentTarget:i}]})}}for(var Er=0;Er<us.length;Er++){var Cr=us[Er],Uy=Cr.toLowerCase(),qy=Cr[0].toUpperCase()+Cr.slice(1);Ht(Uy,"on"+qy)}Ht(No,"onAnimationEnd"),Ht(Eo,"onAnimationIteration"),Ht(Co,"onAnimationStart"),Ht("dblclick","onDoubleClick"),Ht("focusin","onFocus"),Ht("focusout","onBlur"),Ht(P0,"onTransitionRun"),Ht(I0,"onTransitionStart"),Ht(ey,"onTransitionCancel"),Ht(To,"onTransitionEnd"),ml("onMouseEnter",["mouseout","mouseover"]),ml("onMouseLeave",["mouseout","mouseover"]),ml("onPointerEnter",["pointerout","pointerover"]),ml("onPointerLeave",["pointerout","pointerover"]),Ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bn="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(" "),Hy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bn));function Jd(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],i=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var f=l.length-1;0<=f;f--){var m=l[f],x=m.instance,M=m.currentTarget;if(m=m.listener,x!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=M;try{u(i)}catch(U){vi(U)}i.currentTarget=null,u=x}else for(f=0;f<l.length;f++){if(m=l[f],x=m.instance,M=m.currentTarget,m=m.listener,x!==u&&i.isPropagationStopped())break e;u=m,i.currentTarget=M;try{u(i)}catch(U){vi(U)}i.currentTarget=null,u=x}}}}function oe(e,t){var a=t[Lu];a===void 0&&(a=t[Lu]=new Set);var l=e+"__bubble";a.has(l)||(Fd(t,e,2,!1),a.add(l))}function Tr(e,t,a){var l=0;t&&(l|=4),Fd(a,e,l,t)}var nu="_reactListening"+Math.random().toString(36).slice(2);function wr(e){if(!e[nu]){e[nu]=!0,Qc.forEach(function(a){a!=="selectionchange"&&(Hy.has(a)||Tr(a,!1,e),Tr(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[nu]||(t[nu]=!0,Tr("selectionchange",!1,t))}}function Fd(e,t,a,l){switch(Eh(t)){case 2:var i=fg;break;case 8:i=dg;break;default:i=Gr}a=i.bind(null,t,a,e),i=void 0,!ku||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Rr(e,t,a,l,i){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var m=l.stateNode.containerInfo;if(m===i)break;if(f===4)for(f=l.return;f!==null;){var x=f.tag;if((x===3||x===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;m!==null;){if(f=fl(m),f===null)return;if(x=f.tag,x===5||x===6||x===26||x===27){l=u=f;continue e}m=m.parentNode}}l=l.return}Pc(function(){var M=u,U=Zu(a),H=[];e:{var A=wo.get(e);if(A!==void 0){var z=yi,J=e;switch(e){case"keypress":if(hi(a)===0)break e;case"keydown":case"keyup":z=A0;break;case"focusin":J="focus",z=Wu;break;case"focusout":J="blur",z=Wu;break;case"beforeblur":case"afterblur":z=Wu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=to;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=v0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=_0;break;case No:case Eo:case Co:z=S0;break;case To:z=U0;break;case"scroll":case"scrollend":z=g0;break;case"wheel":z=H0;break;case"copy":case"cut":case"paste":z=N0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=lo;break;case"toggle":case"beforetoggle":z=B0}var I=(t&4)!==0,Ee=!I&&(e==="scroll"||e==="scrollend"),C=I?A!==null?A+"Capture":null:A;I=[];for(var b=M,R;b!==null;){var q=b;if(R=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||R===null||C===null||(q=sn(b,C),q!=null&&I.push(Qn(b,q,R))),Ee)break;b=b.return}0<I.length&&(A=new z(A,J,null,a,U),H.push({event:A,listeners:I}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",A&&a!==Xu&&(J=a.relatedTarget||a.fromElement)&&(fl(J)||J[ol]))break e;if((z||A)&&(A=U.window===U?U:(A=U.ownerDocument)?A.defaultView||A.parentWindow:window,z?(J=a.relatedTarget||a.toElement,z=M,J=J?fl(J):null,J!==null&&(Ee=h(J),I=J.tag,J!==Ee||I!==5&&I!==27&&I!==6)&&(J=null)):(z=null,J=M),z!==J)){if(I=to,q="onMouseLeave",C="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(I=lo,q="onPointerLeave",C="onPointerEnter",b="pointer"),Ee=z==null?A:un(z),R=J==null?A:un(J),A=new I(q,b+"leave",z,a,U),A.target=Ee,A.relatedTarget=R,q=null,fl(U)===M&&(I=new I(C,b+"enter",J,a,U),I.target=R,I.relatedTarget=Ee,q=I),Ee=q,z&&J)t:{for(I=Ly,C=z,b=J,R=0,q=C;q;q=I(q))R++;q=0;for(var P=b;P;P=I(P))q++;for(;0<R-q;)C=I(C),R--;for(;0<q-R;)b=I(b),q--;for(;R--;){if(C===b||b!==null&&C===b.alternate){I=C;break t}C=I(C),b=I(b)}I=null}else I=null;z!==null&&$d(H,A,z,I,!1),J!==null&&Ee!==null&&$d(H,Ee,J,I,!0)}}e:{if(A=M?un(M):window,z=A.nodeName&&A.nodeName.toLowerCase(),z==="select"||z==="input"&&A.type==="file")var me=fo;else if(co(A))if(ho)me=F0;else{me=k0;var $=V0}else z=A.nodeName,!z||z.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?M&&Ku(M.elementType)&&(me=fo):me=J0;if(me&&(me=me(e,M))){oo(H,me,a,U);break e}$&&$(e,A,M),e==="focusout"&&M&&A.type==="number"&&M.memoizedProps.value!=null&&Gu(A,"number",A.value)}switch($=M?un(M):window,e){case"focusin":(co($)||$.contentEditable==="true")&&(bl=$,ls=M,yn=null);break;case"focusout":yn=ls=bl=null;break;case"mousedown":ns=!0;break;case"contextmenu":case"mouseup":case"dragend":ns=!1,So(H,a,U);break;case"selectionchange":if(W0)break;case"keydown":case"keyup":So(H,a,U)}var ue;if(Iu)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else xl?so(e,a)&&(de="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(de="onCompositionStart");de&&(no&&a.locale!=="ko"&&(xl||de!=="onCompositionStart"?de==="onCompositionEnd"&&xl&&(ue=Ic()):(ga=U,Ju="value"in ga?ga.value:ga.textContent,xl=!0)),$=iu(M,de),0<$.length&&(de=new ao(de,e,null,a,U),H.push({event:de,listeners:$}),ue?de.data=ue:(ue=ro(a),ue!==null&&(de.data=ue)))),(ue=Y0?G0(e,a):K0(e,a))&&(de=iu(M,"onBeforeInput"),0<de.length&&($=new ao("onBeforeInput","beforeinput",null,a,U),H.push({event:$,listeners:de}),$.data=ue)),Dy(H,e,M,a,U)}Jd(H,t)})}function Qn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function iu(e,t){for(var a=t+"Capture",l=[];e!==null;){var i=e,u=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||u===null||(i=sn(e,a),i!=null&&l.unshift(Qn(e,i,u)),i=sn(e,t),i!=null&&l.push(Qn(e,i,u))),e.tag===3)return l;e=e.return}return[]}function Ly(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $d(e,t,a,l,i){for(var u=t._reactName,f=[];a!==null&&a!==l;){var m=a,x=m.alternate,M=m.stateNode;if(m=m.tag,x!==null&&x===l)break;m!==5&&m!==26&&m!==27||M===null||(x=M,i?(M=sn(a,u),M!=null&&f.unshift(Qn(a,M,x))):i||(M=sn(a,u),M!=null&&f.push(Qn(a,M,x)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var By=/\r\n?/g,Qy=/\u0000|\uFFFD/g;function Wd(e){return(typeof e=="string"?e:""+e).replace(By,`
9
+ `).replace(Qy,"")}function Pd(e,t){return t=Wd(t),Wd(e)===t}function Ne(e,t,a,l,i,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||gl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&gl(e,""+l);break;case"className":ci(e,"class",l);break;case"tabIndex":ci(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(e,a,l);break;case"style":$c(e,l,u);break;case"data":if(t!=="object"){ci(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=fi(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Ne(e,t,"name",i.name,i,null),Ne(e,t,"formEncType",i.formEncType,i,null),Ne(e,t,"formMethod",i.formMethod,i,null),Ne(e,t,"formTarget",i.formTarget,i,null)):(Ne(e,t,"encType",i.encType,i,null),Ne(e,t,"method",i.method,i,null),Ne(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=fi(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Jt);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=fi(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":oe("beforetoggle",e),oe("toggle",e),ri(e,"popover",l);break;case"xlinkActuate":kt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":kt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":kt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":kt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":kt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":kt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":kt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":kt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":kt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ri(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=m0.get(a)||a,ri(e,a,l))}}function Mr(e,t,a,l,i,u){switch(a){case"style":$c(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(i.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof l=="string"?gl(e,l):(typeof l=="number"||typeof l=="bigint")&&gl(e,""+l);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),u=e[it]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,i),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,i);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ri(e,a,l)}}}function Ie(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var l=!1,i=!1,u;for(u in a)if(a.hasOwnProperty(u)){var f=a[u];if(f!=null)switch(u){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ne(e,t,u,f,a,null)}}i&&Ne(e,t,"srcSet",a.srcSet,a,null),l&&Ne(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var m=u=f=i=null,x=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var U=a[l];if(U!=null)switch(l){case"name":i=U;break;case"type":f=U;break;case"checked":x=U;break;case"defaultChecked":M=U;break;case"value":u=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(c(137,t));break;default:Ne(e,t,l,U,a,null)}}Vc(e,u,m,x,M,f,i,!1);return;case"select":oe("invalid",e),l=f=u=null;for(i in a)if(a.hasOwnProperty(i)&&(m=a[i],m!=null))switch(i){case"value":u=m;break;case"defaultValue":f=m;break;case"multiple":l=m;default:Ne(e,t,i,m,a,null)}t=u,a=f,e.multiple=!!l,t!=null?yl(e,!!l,t,!1):a!=null&&yl(e,!!l,a,!0);return;case"textarea":oe("invalid",e),u=i=l=null;for(f in a)if(a.hasOwnProperty(f)&&(m=a[f],m!=null))switch(f){case"value":l=m;break;case"defaultValue":i=m;break;case"children":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:Ne(e,t,f,m,a,null)}Jc(e,l,i,u);return;case"option":for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null)&&(x==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ne(e,t,x,l,a,null));return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(l=0;l<Bn.length;l++)oe(Bn[l],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ne(e,t,M,l,a,null)}return;default:if(Ku(t)){for(U in a)a.hasOwnProperty(U)&&(l=a[U],l!==void 0&&Mr(e,t,U,l,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(l=a[m],l!=null&&Ne(e,t,m,l,a,null))}function Yy(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,u=null,f=null,m=null,x=null,M=null,U=null;for(z in a){var H=a[z];if(a.hasOwnProperty(z)&&H!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":x=H;default:l.hasOwnProperty(z)||Ne(e,t,z,null,l,H)}}for(var A in l){var z=l[A];if(H=a[A],l.hasOwnProperty(A)&&(z!=null||H!=null))switch(A){case"type":u=z;break;case"name":i=z;break;case"checked":M=z;break;case"defaultChecked":U=z;break;case"value":f=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:z!==H&&Ne(e,t,A,z,l,H)}}Yu(e,f,m,x,M,U,u,i);return;case"select":z=f=m=A=null;for(u in a)if(x=a[u],a.hasOwnProperty(u)&&x!=null)switch(u){case"value":break;case"multiple":z=x;default:l.hasOwnProperty(u)||Ne(e,t,u,null,l,x)}for(i in l)if(u=l[i],x=a[i],l.hasOwnProperty(i)&&(u!=null||x!=null))switch(i){case"value":A=u;break;case"defaultValue":m=u;break;case"multiple":f=u;default:u!==x&&Ne(e,t,i,u,l,x)}t=m,a=f,l=z,A!=null?yl(e,!!a,A,!1):!!l!=!!a&&(t!=null?yl(e,!!a,t,!0):yl(e,!!a,a?[]:"",!1));return;case"textarea":z=A=null;for(m in a)if(i=a[m],a.hasOwnProperty(m)&&i!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ne(e,t,m,null,l,i)}for(f in l)if(i=l[f],u=a[f],l.hasOwnProperty(f)&&(i!=null||u!=null))switch(f){case"value":A=i;break;case"defaultValue":z=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(c(91));break;default:i!==u&&Ne(e,t,f,i,l,u)}kc(e,A,z);return;case"option":for(var J in a)A=a[J],a.hasOwnProperty(J)&&A!=null&&!l.hasOwnProperty(J)&&(J==="selected"?e.selected=!1:Ne(e,t,J,null,l,A));for(x in l)A=l[x],z=a[x],l.hasOwnProperty(x)&&A!==z&&(A!=null||z!=null)&&(x==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":Ne(e,t,x,A,l,z));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var I in a)A=a[I],a.hasOwnProperty(I)&&A!=null&&!l.hasOwnProperty(I)&&Ne(e,t,I,null,l,A);for(M in l)if(A=l[M],z=a[M],l.hasOwnProperty(M)&&A!==z&&(A!=null||z!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(c(137,t));break;default:Ne(e,t,M,A,l,z)}return;default:if(Ku(t)){for(var Ee in a)A=a[Ee],a.hasOwnProperty(Ee)&&A!==void 0&&!l.hasOwnProperty(Ee)&&Mr(e,t,Ee,void 0,l,A);for(U in l)A=l[U],z=a[U],!l.hasOwnProperty(U)||A===z||A===void 0&&z===void 0||Mr(e,t,U,A,l,z);return}}for(var C in a)A=a[C],a.hasOwnProperty(C)&&A!=null&&!l.hasOwnProperty(C)&&Ne(e,t,C,null,l,A);for(H in l)A=l[H],z=a[H],!l.hasOwnProperty(H)||A===z||A==null&&z==null||Ne(e,t,H,A,l,z)}function Id(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var i=a[l],u=i.transferSize,f=i.initiatorType,m=i.duration;if(u&&m&&Id(f)){for(f=0,m=i.responseEnd,l+=1;l<a.length;l++){var x=a[l],M=x.startTime;if(M>m)break;var U=x.transferSize,H=x.initiatorType;U&&Id(H)&&(x=x.responseEnd,f+=U*(x<m?1:(m-M)/(x-M)))}if(--l,t+=8*(u+f)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ar=null,Or=null;function uu(e){return e.nodeType===9?e:e.ownerDocument}function eh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function th(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function zr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _r=null;function Ky(){var e=window.event;return e&&e.type==="popstate"?e===_r?!1:(_r=e,!0):(_r=null,!1)}var ah=typeof setTimeout=="function"?setTimeout:void 0,Xy=typeof clearTimeout=="function"?clearTimeout:void 0,lh=typeof Promise=="function"?Promise:void 0,Zy=typeof queueMicrotask=="function"?queueMicrotask:typeof lh<"u"?function(e){return lh.resolve(null).then(e).catch(Vy)}:ah;function Vy(e){setTimeout(function(){throw e})}function _a(e){return e==="head"}function nh(e,t){var a=t,l=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(i),kl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Yn(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Yn(a);for(var u=a.firstChild;u;){var f=u.nextSibling,m=u.nodeName;u[nn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=f}}else a==="body"&&Yn(e.ownerDocument.body);a=i}while(a);kl(t)}function ih(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Dr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Dr(a),Bu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ky(e,t,a,l){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[nn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=_t(e.nextSibling),e===null)break}return null}function Jy(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_t(e.nextSibling),e===null))return null;return e}function uh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function Ur(e){return e.data==="$?"||e.data==="$~"}function qr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Fy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function _t(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hr=null;function sh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _t(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function rh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function ch(e,t,a){switch(t=uu(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Yn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bu(e)}var Dt=new Map,oh=new Set;function su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var oa=V.d;V.d={f:$y,r:Wy,D:Py,C:Iy,L:eg,m:tg,X:lg,S:ag,M:ng};function $y(){var e=oa.f(),t=Pi();return e||t}function Wy(e){var t=dl(e);t!==null&&t.tag===5&&t.type==="form"?wf(t):oa.r(e)}var Xl=typeof document>"u"?null:document;function fh(e,t,a){var l=Xl;if(l&&typeof t=="string"&&t){var i=Tt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),oh.has(i)||(oh.add(i),e={rel:e,crossOrigin:a,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Ie(t,"link",e),Ve(t),l.head.appendChild(t)))}}function Py(e){oa.D(e),fh("dns-prefetch",e,null)}function Iy(e,t){oa.C(e,t),fh("preconnect",e,t)}function eg(e,t,a){oa.L(e,t,a);var l=Xl;if(l&&e&&t){var i='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Tt(a.imageSizes)+'"]')):i+='[href="'+Tt(e)+'"]';var u=i;switch(t){case"style":u=Zl(e);break;case"script":u=Vl(e)}Dt.has(u)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dt.set(u,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Gn(u))||t==="script"&&l.querySelector(Kn(u))||(t=l.createElement("link"),Ie(t,"link",e),Ve(t),l.head.appendChild(t)))}}function tg(e,t){oa.m(e,t);var a=Xl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Tt(l)+'"][href="'+Tt(e)+'"]',u=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Vl(e)}if(!Dt.has(u)&&(e=j({rel:"modulepreload",href:e},t),Dt.set(u,e),a.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Kn(u)))return}l=a.createElement("link"),Ie(l,"link",e),Ve(l),a.head.appendChild(l)}}}function ag(e,t,a){oa.S(e,t,a);var l=Xl;if(l&&e){var i=hl(l).hoistableStyles,u=Zl(e);t=t||"default";var f=i.get(u);if(!f){var m={loading:0,preload:null};if(f=l.querySelector(Gn(u)))m.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dt.get(u))&&Lr(e,a);var x=f=l.createElement("link");Ve(x),Ie(x,"link",e),x._p=new Promise(function(M,U){x.onload=M,x.onerror=U}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,ru(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:m},i.set(u,f)}}}function lg(e,t){oa.X(e,t);var a=Xl;if(a&&e){var l=hl(a).hoistableScripts,i=Vl(e),u=l.get(i);u||(u=a.querySelector(Kn(i)),u||(e=j({src:e,async:!0},t),(t=Dt.get(i))&&Br(e,t),u=a.createElement("script"),Ve(u),Ie(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function ng(e,t){oa.M(e,t);var a=Xl;if(a&&e){var l=hl(a).hoistableScripts,i=Vl(e),u=l.get(i);u||(u=a.querySelector(Kn(i)),u||(e=j({src:e,async:!0,type:"module"},t),(t=Dt.get(i))&&Br(e,t),u=a.createElement("script"),Ve(u),Ie(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(i,u))}}function dh(e,t,a,l){var i=(i=re.current)?su(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Zl(a.href),a=hl(i).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Zl(a.href);var u=hl(i).hoistableStyles,f=u.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,f),(u=i.querySelector(Gn(e)))&&!u._p&&(f.instance=u,f.state.loading=5),Dt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Dt.set(e,a),u||ig(i,e,a,f.state))),t&&l===null)throw Error(c(528,""));return f}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vl(a),a=hl(i).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Zl(e){return'href="'+Tt(e)+'"'}function Gn(e){return'link[rel="stylesheet"]['+e+"]"}function hh(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function ig(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ie(t,"link",a),Ve(t),e.head.appendChild(t))}function Vl(e){return'[src="'+Tt(e)+'"]'}function Kn(e){return"script[async]"+e}function mh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(l)return t.instance=l,Ve(l),l;var i=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ve(l),Ie(l,"style",i),ru(l,a.precedence,e),t.instance=l;case"stylesheet":i=Zl(a.href);var u=e.querySelector(Gn(i));if(u)return t.state.loading|=4,t.instance=u,Ve(u),u;l=hh(a),(i=Dt.get(i))&&Lr(l,i),u=(e.ownerDocument||e).createElement("link"),Ve(u);var f=u;return f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),Ie(u,"link",l),t.state.loading|=4,ru(u,a.precedence,e),t.instance=u;case"script":return u=Vl(a.src),(i=e.querySelector(Kn(u)))?(t.instance=i,Ve(i),i):(l=a,(i=Dt.get(u))&&(l=j({},a),Br(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ve(i),Ie(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ru(l,a.precedence,e));return t.instance}function ru(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,u=i,f=0;f<l.length;f++){var m=l[f];if(m.dataset.precedence===t)u=m;else if(u!==i)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Lr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Br(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cu=null;function yh(e,t,a){if(cu===null){var l=new Map,i=cu=new Map;i.set(a,l)}else i=cu,l=i.get(a),l||(l=new Map,i.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var u=a[i];if(!(u[nn]||u[Fe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var f=u.getAttribute(t)||"";f=e+f;var m=l.get(f);m?m.push(u):l.set(f,[u])}}return l}function gh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ug(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ph(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function sg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=Zl(l.href),u=t.querySelector(Gn(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ou.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,Ve(u);return}u=t.ownerDocument||t,l=hh(l),(i=Dt.get(i))&&Lr(l,i),u=u.createElement("link"),Ve(u);var f=u;f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),Ie(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ou.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Qr=0;function rg(e,t){return e.stylesheets&&e.count===0&&du(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&du(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Qr===0&&(Qr=62500*Gy());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&du(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Qr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function ou(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fu=null;function du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fu=new Map,t.forEach(cg,e),fu=null,ou.call(e))}function cg(e,t){if(!(t.state.loading&4)){var a=fu.get(e);if(a)var l=a.get(null);else{a=new Map,fu.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<i.length;u++){var f=i[u];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}i=t.instance,f=i.getAttribute("data-precedence"),u=a.get(f)||l,u===l&&a.set(null,i),a.set(f,i),this.count++,l=ou.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),u?u.parentNode.insertBefore(i,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Xn={$$typeof:Z,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function og(e,t,a,l,i,u,f,m,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Uu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Uu(0),this.hiddenUpdates=Uu(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=u,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function vh(e,t,a,l,i,u,f,m,x,M,U,H){return e=new og(e,t,a,f,x,M,U,H,m),t=1,u===!0&&(t|=24),u=pt(3,null,null,t),e.current=u,u.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Ns(u),e}function xh(e){return e?(e=Nl,e):Nl}function bh(e,t,a,l,i,u){i=xh(i),l.context===null?l.context=i:l.pendingContext=i,l=ja(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Na(e,l,t),a!==null&&(ft(a,e,t),jn(a,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Yr(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function jh(e){if(e.tag===13||e.tag===31){var t=Va(e,67108864);t!==null&&ft(t,e,67108864),Yr(e,67108864)}}function Nh(e){if(e.tag===13||e.tag===31){var t=jt();t=qu(t);var a=Va(e,t);a!==null&&ft(a,e,t),Yr(e,t)}}var hu=!0;function fg(e,t,a,l){var i=_.T;_.T=null;var u=V.p;try{V.p=2,Gr(e,t,a,l)}finally{V.p=u,_.T=i}}function dg(e,t,a,l){var i=_.T;_.T=null;var u=V.p;try{V.p=8,Gr(e,t,a,l)}finally{V.p=u,_.T=i}}function Gr(e,t,a,l){if(hu){var i=Kr(l);if(i===null)Rr(e,t,l,mu,a),Ch(e,l);else if(mg(i,e,t,a,l))l.stopPropagation();else if(Ch(e,l),t&4&&-1<hg.indexOf(e)){for(;i!==null;){var u=dl(i);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var f=Ya(u.pendingLanes);if(f!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var x=1<<31-yt(f);m.entanglements[1]|=x,f&=~x}Zt(u),(pe&6)===0&&($i=ht()+500,Ln(0))}}break;case 31:case 13:m=Va(u,2),m!==null&&ft(m,u,2),Pi(),Yr(u,2)}if(u=Kr(l),u===null&&Rr(e,t,l,mu,a),u===i)break;i=u}i!==null&&l.stopPropagation()}else Rr(e,t,l,null,a)}}function Kr(e){return e=Zu(e),Xr(e)}var mu=null;function Xr(e){if(mu=null,e=fl(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=y(t),e!==null)return e;e=null}else if(a===31){if(e=v(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mu=e,null}function Eh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Pm()){case Ac:return 2;case Oc:return 8;case li:case Im:return 32;case zc:return 268435456;default:return 32}default:return 32}}var Zr=!1,Da=null,Ua=null,qa=null,Zn=new Map,Vn=new Map,Ha=[],hg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ch(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":Zn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vn.delete(t.pointerId)}}function kn(e,t,a,l,i,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[i]},t!==null&&(t=dl(t),t!==null&&jh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function mg(e,t,a,l,i){switch(t){case"focusin":return Da=kn(Da,e,t,a,l,i),!0;case"dragenter":return Ua=kn(Ua,e,t,a,l,i),!0;case"mouseover":return qa=kn(qa,e,t,a,l,i),!0;case"pointerover":var u=i.pointerId;return Zn.set(u,kn(Zn.get(u)||null,e,t,a,l,i)),!0;case"gotpointercapture":return u=i.pointerId,Vn.set(u,kn(Vn.get(u)||null,e,t,a,l,i)),!0}return!1}function Th(e){var t=fl(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=y(a),t!==null){e.blockedOn=t,Lc(e.priority,function(){Nh(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,Lc(e.priority,function(){Nh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Kr(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Xu=l,a.target.dispatchEvent(l),Xu=null}else return t=dl(a),t!==null&&jh(t),e.blockedOn=a,!1;t.shift()}return!0}function wh(e,t,a){yu(e)&&a.delete(t)}function yg(){Zr=!1,Da!==null&&yu(Da)&&(Da=null),Ua!==null&&yu(Ua)&&(Ua=null),qa!==null&&yu(qa)&&(qa=null),Zn.forEach(wh),Vn.forEach(wh)}function gu(e,t){e.blockedOn===t&&(e.blockedOn=null,Zr||(Zr=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,yg)))}var pu=null;function Rh(e){pu!==e&&(pu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){pu===e&&(pu=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(Xr(l||a)===null)continue;break}var u=dl(a);u!==null&&(e.splice(t,3),t-=3,Ks(u,{pending:!0,data:i,method:a.method,action:l},l,i))}}))}function kl(e){function t(x){return gu(x,e)}Da!==null&&gu(Da,e),Ua!==null&&gu(Ua,e),qa!==null&&gu(qa,e),Zn.forEach(t),Vn.forEach(t);for(var a=0;a<Ha.length;a++){var l=Ha[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ha.length&&(a=Ha[0],a.blockedOn===null);)Th(a),a.blockedOn===null&&Ha.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var i=a[l],u=a[l+1],f=i[it]||null;if(typeof u=="function")f||Rh(a);else if(f){var m=null;if(u&&u.hasAttribute("formAction")){if(i=u,f=u[it]||null)m=f.formAction;else if(Xr(i)!==null)continue}else m=f.action;typeof m=="function"?a[l+1]=m:(a.splice(l,3),l-=3),Rh(a)}}}function Mh(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Vr(e){this._internalRoot=e}vu.prototype.render=Vr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=jt();bh(a,l,e,t,null,null)},vu.prototype.unmount=Vr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bh(e.current,2,null,e,null,null),Pi(),t[ol]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ha.length&&t!==0&&t<Ha[a].priority;a++);Ha.splice(a,0,e),a===0&&Th(e)}};var Ah=s.version;if(Ah!=="19.2.4")throw Error(c(527,Ah,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var gg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xu.isDisabled&&xu.supportsFiber)try{tn=xu.inject(gg),mt=xu}catch{}}return Fn.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,l="",i=Hf,u=Lf,f=Bf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=vh(e,1,!1,null,null,a,l,null,i,u,f,Mh),e[ol]=t.current,wr(e),new Vr(t)},Fn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var l=!1,i="",u=Hf,f=Lf,m=Bf,x=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(x=a.formState)),t=vh(e,1,!0,t,a??null,l,i,x,u,f,m,Mh),t.context=xh(null),a=t.current,l=jt(),l=qu(l),i=ja(l),i.callback=null,Na(a,i,l),a=l,t.current.lanes=a,ln(t,a),Zt(t),e[ol]=t.current,wr(e),new vu(t)},Fn.version="19.2.4",Fn}var Qh;function Tg(){if(Qh)return Fr.exports;Qh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),Fr.exports=Cg(),Fr.exports}var wg=Tg(),Fl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rg={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},Mg=class{#e=Rg;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,s){return this.#e.setTimeout(n,s)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,s){return this.#e.setInterval(n,s)}clearInterval(n){this.#e.clearInterval(n)}},ul=new Mg;function Ag(n){setTimeout(n,0)}var rl=typeof window>"u"||"Deno"in globalThis;function lt(){}function Og(n,s){return typeof n=="function"?n(s):n}function ac(n){return typeof n=="number"&&n>=0&&n!==1/0}function fm(n,s){return Math.max(n+(s||0)-Date.now(),0)}function Ba(n,s){return typeof n=="function"?n(s):n}function Ut(n,s){return typeof n=="function"?n(s):n}function Yh(n,s){const{type:r="all",exact:c,fetchStatus:d,predicate:h,queryKey:y,stale:v}=n;if(y){if(c){if(s.queryHash!==mc(y,s.options))return!1}else if(!Wn(s.queryKey,y))return!1}if(r!=="all"){const p=s.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof v=="boolean"&&s.isStale()!==v||d&&d!==s.state.fetchStatus||h&&!h(s))}function Gh(n,s){const{exact:r,status:c,predicate:d,mutationKey:h}=n;if(h){if(!s.options.mutationKey)return!1;if(r){if(cl(s.options.mutationKey)!==cl(h))return!1}else if(!Wn(s.options.mutationKey,h))return!1}return!(c&&s.state.status!==c||d&&!d(s))}function mc(n,s){return(s?.queryKeyHashFn||cl)(n)}function cl(n){return JSON.stringify(n,(s,r)=>lc(r)?Object.keys(r).sort().reduce((c,d)=>(c[d]=r[d],c),{}):r)}function Wn(n,s){return n===s?!0:typeof n!=typeof s?!1:n&&s&&typeof n=="object"&&typeof s=="object"?Object.keys(s).every(r=>Wn(n[r],s[r])):!1}var zg=Object.prototype.hasOwnProperty;function dm(n,s,r=0){if(n===s)return n;if(r>500)return s;const c=Kh(n)&&Kh(s);if(!c&&!(lc(n)&&lc(s)))return s;const h=(c?n:Object.keys(n)).length,y=c?s:Object.keys(s),v=y.length,p=c?new Array(v):{};let g=0;for(let E=0;E<v;E++){const j=c?E:y[E],T=n[j],Q=s[j];if(T===Q){p[j]=T,(c?E<h:zg.call(n,j))&&g++;continue}if(T===null||Q===null||typeof T!="object"||typeof Q!="object"){p[j]=Q;continue}const w=dm(T,Q,r+1);p[j]=w,w===T&&g++}return h===v&&g===h?n:p}function Eu(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const r in n)if(n[r]!==s[r])return!1;return!0}function Kh(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function lc(n){if(!Xh(n))return!1;const s=n.constructor;if(s===void 0)return!0;const r=s.prototype;return!(!Xh(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Xh(n){return Object.prototype.toString.call(n)==="[object Object]"}function _g(n){return new Promise(s=>{ul.setTimeout(s,n)})}function nc(n,s,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,s):r.structuralSharing!==!1?dm(n,s):s}function hm(n){return n}function Dg(n,s,r=0){const c=[...n,s];return r&&c.length>r?c.slice(1):c}function Ug(n,s,r=0){const c=[s,...n];return r&&c.length>r?c.slice(0,-1):c}var yc=Symbol();function mm(n,s){return!n.queryFn&&s?.initialPromise?()=>s.initialPromise:!n.queryFn||n.queryFn===yc?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function gc(n,s){return typeof n=="function"?n(...s):!!n}function qg(n,s,r){let c=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??=s(),c||(c=!0,d.aborted?r():d.addEventListener("abort",r,{once:!0})),d)}),n}var Hg=class extends Fl{#e;#t;#a;constructor(){super(),this.#a=n=>{if(!rl&&window.addEventListener){const s=()=>n();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(s=>{s(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},pc=new Hg;function ic(){let n,s;const r=new Promise((d,h)=>{n=d,s=h});r.status="pending",r.catch(()=>{});function c(d){Object.assign(r,d),delete r.resolve,delete r.reject}return r.resolve=d=>{c({status:"fulfilled",value:d}),n(d)},r.reject=d=>{c({status:"rejected",reason:d}),s(d)},r}var Lg=Ag;function Bg(){let n=[],s=0,r=v=>{v()},c=v=>{v()},d=Lg;const h=v=>{s?n.push(v):d(()=>{r(v)})},y=()=>{const v=n;n=[],v.length&&d(()=>{c(()=>{v.forEach(p=>{r(p)})})})};return{batch:v=>{let p;s++;try{p=v()}finally{s--,s||y()}return p},batchCalls:v=>(...p)=>{h(()=>{v(...p)})},schedule:h,setNotifyFunction:v=>{r=v},setBatchNotifyFunction:v=>{c=v},setScheduler:v=>{d=v}}}var Ze=Bg(),Qg=class extends Fl{#e=!0;#t;#a;constructor(){super(),this.#a=n=>{if(!rl&&window.addEventListener){const s=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(r=>{r(n)}))}isOnline(){return this.#e}},Cu=new Qg;function Yg(n){return Math.min(1e3*2**n,3e4)}function ym(n){return(n??"online")==="online"?Cu.isOnline():!0}var uc=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function gm(n){let s=!1,r=0,c;const d=ic(),h=()=>d.status!=="pending",y=O=>{if(!h()){const D=new uc(O);T(D),n.onCancel?.(D)}},v=()=>{s=!0},p=()=>{s=!1},g=()=>pc.isFocused()&&(n.networkMode==="always"||Cu.isOnline())&&n.canRun(),E=()=>ym(n.networkMode)&&n.canRun(),j=O=>{h()||(c?.(),d.resolve(O))},T=O=>{h()||(c?.(),d.reject(O))},Q=()=>new Promise(O=>{c=D=>{(h()||g())&&O(D)},n.onPause?.()}).then(()=>{c=void 0,h()||n.onContinue?.()}),w=()=>{if(h())return;let O;const D=r===0?n.initialPromise:void 0;try{O=D??n.fn()}catch(K){O=Promise.reject(K)}Promise.resolve(O).then(j).catch(K=>{if(h())return;const Y=n.retry??(rl?0:3),Z=n.retryDelay??Yg,X=typeof Z=="function"?Z(r,K):Z,W=Y===!0||typeof Y=="number"&&r<Y||typeof Y=="function"&&Y(r,K);if(s||!W){T(K);return}r++,n.onFail?.(r,K),_g(X).then(()=>g()?void 0:Q()).then(()=>{s?T(K):w()})})};return{promise:d,status:()=>d.status,cancel:y,continue:()=>(c?.(),d),cancelRetry:v,continueRetry:p,canStart:E,start:()=>(E()?w():Q().then(w),d)}}var pm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ac(this.gcTime)&&(this.#e=ul.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(rl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ul.clearTimeout(this.#e),this.#e=void 0)}},Gg=class extends pm{#e;#t;#a;#n;#l;#u;#s;constructor(n){super(),this.#s=!1,this.#u=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#n=n.client,this.#a=this.#n.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Vh(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#l?.promise}setOptions(n){if(this.options={...this.#u,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Vh(this.options);s.data!==void 0&&(this.setState(Zh(s.data,s.dataUpdatedAt)),this.#e=s)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(n,s){const r=nc(this.state.data,n,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),r}setState(n,s){this.#i({type:"setState",state:n,setStateOptions:s})}cancel(n){const s=this.#l?.promise;return this.#l?.cancel(n),s?s.then(lt).catch(lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Ut(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===yc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Ba(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!fm(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(s=>s.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#l?.continue()}onOnline(){this.observers.find(s=>s.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#l?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(s=>s!==n),this.observers.length||(this.#l&&(this.#s?this.#l.cancel({revert:!0}):this.#l.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(n,s){if(this.state.fetchStatus!=="idle"&&this.#l?.status()!=="rejected"){if(this.state.data!==void 0&&s?.cancelRefetch)this.cancel({silent:!0});else if(this.#l)return this.#l.continueRetry(),this.#l.promise}if(n&&this.setOptions(n),!this.options.queryFn){const v=this.observers.find(p=>p.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,c=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},d=()=>{const v=mm(this.options,s),g=(()=>{const E={client:this.#n,queryKey:this.queryKey,meta:this.meta};return c(E),E})();return this.#s=!1,this.options.persister?this.options.persister(v,g,this):v(g)},y=(()=>{const v={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:d};return c(v),v})();this.options.behavior?.onFetch(y,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==y.fetchOptions?.meta)&&this.#i({type:"fetch",meta:y.fetchOptions?.meta}),this.#l=gm({initialPromise:s?.initialPromise,fn:y.fetchFn,onCancel:v=>{v instanceof uc&&v.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(v,p)=>{this.#i({type:"failed",failureCount:v,error:p})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0});try{const v=await this.#l.start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),this.#a.config.onSuccess?.(v,this),this.#a.config.onSettled?.(v,this.state.error,this),v}catch(v){if(v instanceof uc){if(v.silent)return this.#l.promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw this.#i({type:"error",error:v}),this.#a.config.onError?.(v,this),this.#a.config.onSettled?.(this.state.data,v,this),v}finally{this.scheduleGc()}}#i(n){const s=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vm(r.data,this.options),fetchMeta:n.meta??null};case"success":const c={...r,...Zh(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?c:void 0,c;case"error":const d=n.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=s(this.state),Ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:n})})}};function vm(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ym(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Zh(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vh(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,r=s!==void 0,c=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:r?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Kg=class extends Fl{constructor(n,s){super(),this.options=s,this.#e=n,this.#i=null,this.#s=ic(),this.bindMethods(),this.setOptions(s)}#e;#t=void 0;#a=void 0;#n=void 0;#l;#u;#s;#i;#y;#d;#h;#c;#o;#r;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),kh(this.#t,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sc(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sc(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const s=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#j(),this.#t.setOptions(this.options),s._defaulted&&!Eu(this.options,s)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const c=this.hasListeners();c&&Jh(this.#t,r,this.options,s)&&this.#f(),this.updateResult(),c&&(this.#t!==r||Ut(this.options.enabled,this.#t)!==Ut(s.enabled,this.#t)||Ba(this.options.staleTime,this.#t)!==Ba(s.staleTime,this.#t))&&this.#g();const d=this.#p();c&&(this.#t!==r||Ut(this.options.enabled,this.#t)!==Ut(s.enabled,this.#t)||d!==this.#r)&&this.#v(d)}getOptimisticResult(n){const s=this.#e.getQueryCache().build(this.#e,n),r=this.createResult(s,n);return Zg(this,r)&&(this.#n=r,this.#u=this.options,this.#l=this.#t.state),r}getCurrentResult(){return this.#n}trackResult(n,s){return new Proxy(n,{get:(r,c)=>(this.trackProp(c),s?.(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,c))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const s=this.#e.defaultQueryOptions(n),r=this.#e.getQueryCache().build(this.#e,s);return r.fetch().then(()=>this.createResult(r,s))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(n){this.#j();let s=this.#t.fetch(this.options,n);return n?.throwOnError||(s=s.catch(lt)),s}#g(){this.#b();const n=Ba(this.options.staleTime,this.#t);if(rl||this.#n.isStale||!ac(n))return;const r=fm(this.#n.dataUpdatedAt,n)+1;this.#c=ul.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#p(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#r=n,!(rl||Ut(this.options.enabled,this.#t)===!1||!ac(this.#r)||this.#r===0)&&(this.#o=ul.setInterval(()=>{(this.options.refetchIntervalInBackground||pc.isFocused())&&this.#f()},this.#r))}#x(){this.#g(),this.#v(this.#p())}#b(){this.#c&&(ul.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#o&&(ul.clearInterval(this.#o),this.#o=void 0)}createResult(n,s){const r=this.#t,c=this.options,d=this.#n,h=this.#l,y=this.#u,p=n!==r?n.state:this.#a,{state:g}=n;let E={...g},j=!1,T;if(s._optimisticResults){const B=this.hasListeners(),te=!B&&kh(n,s),_e=B&&Jh(n,r,s,c);(te||_e)&&(E={...E,...vm(g.data,n.options)}),s._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:Q,errorUpdatedAt:w,status:O}=E;T=E.data;let D=!1;if(s.placeholderData!==void 0&&T===void 0&&O==="pending"){let B;d?.isPlaceholderData&&s.placeholderData===y?.placeholderData?(B=d.data,D=!0):B=typeof s.placeholderData=="function"?s.placeholderData(this.#h?.state.data,this.#h):s.placeholderData,B!==void 0&&(O="success",T=nc(d?.data,B,s),j=!0)}if(s.select&&T!==void 0&&!D)if(d&&T===h?.data&&s.select===this.#y)T=this.#d;else try{this.#y=s.select,T=s.select(T),T=nc(d?.data,T,s),this.#d=T,this.#i=null}catch(B){this.#i=B}this.#i&&(Q=this.#i,T=this.#d,w=Date.now(),O="error");const K=E.fetchStatus==="fetching",Y=O==="pending",Z=O==="error",X=Y&&K,W=T!==void 0,G={status:O,fetchStatus:E.fetchStatus,isPending:Y,isSuccess:O==="success",isError:Z,isInitialLoading:X,isLoading:X,data:T,dataUpdatedAt:E.dataUpdatedAt,error:Q,errorUpdatedAt:w,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>p.dataUpdateCount||E.errorUpdateCount>p.errorUpdateCount,isFetching:K,isRefetching:K&&!Y,isLoadingError:Z&&!W,isPaused:E.fetchStatus==="paused",isPlaceholderData:j,isRefetchError:Z&&W,isStale:vc(n,s),refetch:this.refetch,promise:this.#s,isEnabled:Ut(s.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const B=G.data!==void 0,te=G.status==="error"&&!B,_e=Je=>{te?Je.reject(G.error):B&&Je.resolve(G.data)},se=()=>{const Je=this.#s=G.promise=ic();_e(Je)},ge=this.#s;switch(ge.status){case"pending":n.queryHash===r.queryHash&&_e(ge);break;case"fulfilled":(te||G.data!==ge.value)&&se();break;case"rejected":(!te||G.error!==ge.reason)&&se();break}}return G}updateResult(){const n=this.#n,s=this.createResult(this.#t,this.options);if(this.#l=this.#t.state,this.#u=this.options,this.#l.data!==void 0&&(this.#h=this.#t),Eu(s,n))return;this.#n=s;const r=()=>{if(!n)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!this.#m.size)return!0;const h=new Set(d??this.#m);return this.options.throwOnError&&h.add("error"),Object.keys(this.#n).some(y=>{const v=y;return this.#n[v]!==n[v]&&h.has(v)})};this.#N({listeners:r()})}#j(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const s=this.#t;this.#t=n,this.#a=n.state,this.hasListeners()&&(s?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#N(n){Ze.batch(()=>{n.listeners&&this.listeners.forEach(s=>{s(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Xg(n,s){return Ut(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&s.retryOnMount===!1)}function kh(n,s){return Xg(n,s)||n.state.data!==void 0&&sc(n,s,s.refetchOnMount)}function sc(n,s,r){if(Ut(s.enabled,n)!==!1&&Ba(s.staleTime,n)!=="static"){const c=typeof r=="function"?r(n):r;return c==="always"||c!==!1&&vc(n,s)}return!1}function Jh(n,s,r,c){return(n!==s||Ut(c.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&vc(n,r)}function vc(n,s){return Ut(s.enabled,n)!==!1&&n.isStaleByTime(Ba(s.staleTime,n))}function Zg(n,s){return!Eu(n.getCurrentResult(),s)}function Fh(n){return{onFetch:(s,r)=>{const c=s.options,d=s.fetchOptions?.meta?.fetchMore?.direction,h=s.state.data?.pages||[],y=s.state.data?.pageParams||[];let v={pages:[],pageParams:[]},p=0;const g=async()=>{let E=!1;const j=w=>{qg(w,()=>s.signal,()=>E=!0)},T=mm(s.options,s.fetchOptions),Q=async(w,O,D)=>{if(E)return Promise.reject();if(O==null&&w.pages.length)return Promise.resolve(w);const Y=(()=>{const le={client:s.client,queryKey:s.queryKey,pageParam:O,direction:D?"backward":"forward",meta:s.options.meta};return j(le),le})(),Z=await T(Y),{maxPages:X}=s.options,W=D?Ug:Dg;return{pages:W(w.pages,Z,X),pageParams:W(w.pageParams,O,X)}};if(d&&h.length){const w=d==="backward",O=w?Vg:$h,D={pages:h,pageParams:y},K=O(c,D);v=await Q(D,K,w)}else{const w=n??h.length;do{const O=p===0?y[0]??c.initialPageParam:$h(c,v);if(p>0&&O==null)break;v=await Q(v,O),p++}while(p<w)}return v};s.options.persister?s.fetchFn=()=>s.options.persister?.(g,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},r):s.fetchFn=g}}}function $h(n,{pages:s,pageParams:r}){const c=s.length-1;return s.length>0?n.getNextPageParam(s[c],s,r[c],r):void 0}function Vg(n,{pages:s,pageParams:r}){return s.length>0?n.getPreviousPageParam?.(s[0],s,r[0],r):void 0}var kg=class extends pm{#e;#t;#a;#n;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#a=n.mutationCache,this.#t=[],this.state=n.state||xm(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(s=>s!==n),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(n){const s=()=>{this.#l({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=gm({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(h,y)=>{this.#l({type:"failed",failureCount:h,error:y})},onPause:()=>{this.#l({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const c=this.state.status==="pending",d=!this.#n.canStart();try{if(c)s();else{this.#l({type:"pending",variables:n,isPaused:d}),this.#a.config.onMutate&&await this.#a.config.onMutate(n,this,r);const y=await this.options.onMutate?.(n,r);y!==this.state.context&&this.#l({type:"pending",context:y,variables:n,isPaused:d})}const h=await this.#n.start();return await this.#a.config.onSuccess?.(h,n,this.state.context,this,r),await this.options.onSuccess?.(h,n,this.state.context,r),await this.#a.config.onSettled?.(h,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(h,null,n,this.state.context,r),this.#l({type:"success",data:h}),h}catch(h){try{await this.#a.config.onError?.(h,n,this.state.context,this,r)}catch(y){Promise.reject(y)}try{await this.options.onError?.(h,n,this.state.context,r)}catch(y){Promise.reject(y)}try{await this.#a.config.onSettled?.(void 0,h,this.state.variables,this.state.context,this,r)}catch(y){Promise.reject(y)}try{await this.options.onSettled?.(void 0,h,n,this.state.context,r)}catch(y){Promise.reject(y)}throw this.#l({type:"error",error:h}),h}finally{this.#a.runNext(this)}}#l(n){const s=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=s(this.state),Ze.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(n)}),this.#a.notify({mutation:this,type:"updated",action:n})})}};function xm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jg=class extends Fl{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(n,s,r){const c=new kg({client:n,mutationCache:this,mutationId:++this.#a,options:n.defaultMutationOptions(s),state:r});return this.add(c),c}add(n){this.#e.add(n);const s=bu(n);if(typeof s=="string"){const r=this.#t.get(s);r?r.push(n):this.#t.set(s,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const s=bu(n);if(typeof s=="string"){const r=this.#t.get(s);if(r)if(r.length>1){const c=r.indexOf(n);c!==-1&&r.splice(c,1)}else r[0]===n&&this.#t.delete(s)}}this.notify({type:"removed",mutation:n})}canRun(n){const s=bu(n);if(typeof s=="string"){const c=this.#t.get(s)?.find(d=>d.state.status==="pending");return!c||c===n}else return!0}runNext(n){const s=bu(n);return typeof s=="string"?this.#t.get(s)?.find(c=>c!==n&&c.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ze.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const s={exact:!0,...n};return this.getAll().find(r=>Gh(s,r))}findAll(n={}){return this.getAll().filter(s=>Gh(n,s))}notify(n){Ze.batch(()=>{this.listeners.forEach(s=>{s(n)})})}resumePausedMutations(){const n=this.getAll().filter(s=>s.state.isPaused);return Ze.batch(()=>Promise.all(n.map(s=>s.continue().catch(lt))))}};function bu(n){return n.options.scope?.id}var Fg=class extends Fl{#e;#t=void 0;#a;#n;constructor(s,r){super(),this.#e=s,this.setOptions(r),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const r=this.options;this.options=this.#e.defaultMutationOptions(s),Eu(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),r?.mutationKey&&this.options.mutationKey&&cl(r.mutationKey)!==cl(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(s){this.#l(),this.#u(s)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#u()}mutate(s,r){return this.#n=r,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(s)}#l(){const s=this.#a?.state??xm();this.#t={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#u(s){Ze.batch(()=>{if(this.#n&&this.hasListeners()){const r=this.#t.variables,c=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(s?.type==="success"){try{this.#n.onSuccess?.(s.data,r,c,d)}catch(h){Promise.reject(h)}try{this.#n.onSettled?.(s.data,null,r,c,d)}catch(h){Promise.reject(h)}}else if(s?.type==="error"){try{this.#n.onError?.(s.error,r,c,d)}catch(h){Promise.reject(h)}try{this.#n.onSettled?.(void 0,s.error,r,c,d)}catch(h){Promise.reject(h)}}}this.listeners.forEach(r=>{r(this.#t)})})}},$g=class extends Fl{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,s,r){const c=s.queryKey,d=s.queryHash??mc(c,s);let h=this.get(d);return h||(h=new Gg({client:n,queryKey:c,queryHash:d,options:n.defaultQueryOptions(s),state:r,defaultOptions:n.getQueryDefaults(c)}),this.add(h)),h}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const s=this.#e.get(n.queryHash);s&&(n.destroy(),s===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ze.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const s={exact:!0,...n};return this.getAll().find(r=>Yh(s,r))}findAll(n={}){const s=this.getAll();return Object.keys(n).length>0?s.filter(r=>Yh(n,r)):s}notify(n){Ze.batch(()=>{this.listeners.forEach(s=>{s(n)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Wg=class{#e;#t;#a;#n;#l;#u;#s;#i;constructor(n={}){this.#e=n.queryCache||new $g,this.#t=n.mutationCache||new Jg,this.#a=n.defaultOptions||{},this.#n=new Map,this.#l=new Map,this.#u=0}mount(){this.#u++,this.#u===1&&(this.#s=pc.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Cu.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#u--,this.#u===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const s=this.defaultQueryOptions({queryKey:n});return this.#e.get(s.queryHash)?.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),r=this.#e.build(this,s),c=r.state.data;return c===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(Ba(s.staleTime,r))&&this.prefetchQuery(s),Promise.resolve(c))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:s,state:r})=>{const c=r.data;return[s,c]})}setQueryData(n,s,r){const c=this.defaultQueryOptions({queryKey:n}),h=this.#e.get(c.queryHash)?.state.data,y=Og(s,h);if(y!==void 0)return this.#e.build(this,c).setData(y,{...r,manual:!0})}setQueriesData(n,s,r){return Ze.batch(()=>this.#e.findAll(n).map(({queryKey:c})=>[c,this.setQueryData(c,s,r)]))}getQueryState(n){const s=this.defaultQueryOptions({queryKey:n});return this.#e.get(s.queryHash)?.state}removeQueries(n){const s=this.#e;Ze.batch(()=>{s.findAll(n).forEach(r=>{s.remove(r)})})}resetQueries(n,s){const r=this.#e;return Ze.batch(()=>(r.findAll(n).forEach(c=>{c.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const r={revert:!0,...s},c=Ze.batch(()=>this.#e.findAll(n).map(d=>d.cancel(r)));return Promise.all(c).then(lt).catch(lt)}invalidateQueries(n,s={}){return Ze.batch(()=>(this.#e.findAll(n).forEach(r=>{r.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},s)))}refetchQueries(n,s={}){const r={...s,cancelRefetch:s.cancelRefetch??!0},c=Ze.batch(()=>this.#e.findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let h=d.fetch(void 0,r);return r.throwOnError||(h=h.catch(lt)),d.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(c).then(lt)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const r=this.#e.build(this,s);return r.isStaleByTime(Ba(s.staleTime,r))?r.fetch(s):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(lt).catch(lt)}fetchInfiniteQuery(n){return n.behavior=Fh(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(lt).catch(lt)}ensureInfiniteQueryData(n){return n.behavior=Fh(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Cu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(n){this.#a=n}setQueryDefaults(n,s){this.#n.set(cl(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...this.#n.values()],r={};return s.forEach(c=>{Wn(n,c.queryKey)&&Object.assign(r,c.defaultOptions)}),r}setMutationDefaults(n,s){this.#l.set(cl(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...this.#l.values()],r={};return s.forEach(c=>{Wn(n,c.mutationKey)&&Object.assign(r,c.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const s={...this.#a.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=mc(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===yc&&(s.enabled=!1),s}defaultMutationOptions(n){return n?._defaulted?n:{...this.#a.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},bm=S.createContext(void 0),nt=n=>{const s=S.useContext(bm);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},Pg=({client:n,children:s})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),o.jsx(bm.Provider,{value:n,children:s})),Sm=S.createContext(!1),Ig=()=>S.useContext(Sm);Sm.Provider;function ep(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var tp=S.createContext(ep()),ap=()=>S.useContext(tp),lp=(n,s,r)=>{const c=r?.state.error&&typeof n.throwOnError=="function"?gc(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||c)&&(s.isReset()||(n.retryOnMount=!1))},np=n=>{S.useEffect(()=>{n.clearReset()},[n])},ip=({result:n,errorResetBoundary:s,throwOnError:r,query:c,suspense:d})=>n.isError&&!s.isReset()&&!n.isFetching&&c&&(d&&n.data===void 0||gc(r,[n.error,c])),up=n=>{if(n.suspense){const r=d=>d==="static"?d:Math.max(d??1e3,1e3),c=n.staleTime;n.staleTime=typeof c=="function"?(...d)=>r(c(...d)):r(c),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},sp=(n,s)=>n.isLoading&&n.isFetching&&!s,rp=(n,s)=>n?.suspense&&s.isPending,Wh=(n,s,r)=>s.fetchOptimistic(n).catch(()=>{r.clearReset()});function cp(n,s,r){const c=Ig(),d=ap(),h=nt(),y=h.defaultQueryOptions(n);h.getDefaultOptions().queries?._experimental_beforeQuery?.(y);const v=h.getQueryCache().get(y.queryHash);y._optimisticResults=c?"isRestoring":"optimistic",up(y),lp(y,d,v),np(d);const p=!h.getQueryCache().get(y.queryHash),[g]=S.useState(()=>new s(h,y)),E=g.getOptimisticResult(y),j=!c&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(T=>{const Q=j?g.subscribe(Ze.batchCalls(T)):lt;return g.updateResult(),Q},[g,j]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(y)},[y,g]),rp(y,E))throw Wh(y,g,d);if(ip({result:E,errorResetBoundary:d,throwOnError:y.throwOnError,query:v,suspense:y.suspense}))throw E.error;return h.getDefaultOptions().queries?._experimental_afterQuery?.(y,E),y.experimental_prefetchInRender&&!rl&&sp(E,c)&&(p?Wh(y,g,d):v?.promise)?.catch(lt).finally(()=>{g.updateResult()}),y.notifyOnChangeProps?E:g.trackResult(E)}function ha(n,s){return cp(n,Kg)}function qt(n,s){const r=nt(),[c]=S.useState(()=>new Fg(r,n));S.useEffect(()=>{c.setOptions(n)},[c,n]);const d=S.useSyncExternalStore(S.useCallback(y=>c.subscribe(Ze.batchCalls(y)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),h=S.useCallback((y,v)=>{c.mutate(y,v).catch(lt)},[c]);if(d.error&&gc(c.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:h,mutateAsync:d.mutate}}var Ph="popstate";function op(n={}){function s(c,d){let{pathname:h,search:y,hash:v}=c.location;return rc("",{pathname:h,search:y,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(c,d){return typeof d=="string"?d:Pn(d)}return dp(s,r,null,n)}function ze(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function Qt(n,s){if(!n){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function fp(){return Math.random().toString(36).substring(2,10)}function Ih(n,s){return{usr:n.state,key:n.key,idx:s}}function rc(n,s,r=null,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof s=="string"?$l(s):s,state:r,key:s&&s.key||c||fp()}}function Pn({pathname:n="/",search:s="",hash:r=""}){return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function $l(n){let s={};if(n){let r=n.indexOf("#");r>=0&&(s.hash=n.substring(r),n=n.substring(0,r));let c=n.indexOf("?");c>=0&&(s.search=n.substring(c),n=n.substring(0,c)),n&&(s.pathname=n)}return s}function dp(n,s,r,c={}){let{window:d=document.defaultView,v5Compat:h=!1}=c,y=d.history,v="POP",p=null,g=E();g==null&&(g=0,y.replaceState({...y.state,idx:g},""));function E(){return(y.state||{idx:null}).idx}function j(){v="POP";let D=E(),K=D==null?null:D-g;g=D,p&&p({action:v,location:O.location,delta:K})}function T(D,K){v="PUSH";let Y=rc(O.location,D,K);g=E()+1;let Z=Ih(Y,g),X=O.createHref(Y);try{y.pushState(Z,"",X)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;d.location.assign(X)}h&&p&&p({action:v,location:O.location,delta:1})}function Q(D,K){v="REPLACE";let Y=rc(O.location,D,K);g=E();let Z=Ih(Y,g),X=O.createHref(Y);y.replaceState(Z,"",X),h&&p&&p({action:v,location:O.location,delta:0})}function w(D){return hp(D)}let O={get action(){return v},get location(){return n(d,y)},listen(D){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(Ph,j),p=D,()=>{d.removeEventListener(Ph,j),p=null}},createHref(D){return s(d,D)},createURL:w,encodeLocation(D){let K=w(D);return{pathname:K.pathname,search:K.search,hash:K.hash}},push:T,replace:Q,go(D){return y.go(D)}};return O}function hp(n,s=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ze(r,"No window.location.(origin|href) available to create URL");let c=typeof n=="string"?n:Pn(n);return c=c.replace(/ $/,"%20"),!s&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function jm(n,s,r="/"){return mp(n,s,r,!1)}function mp(n,s,r,c){let d=typeof s=="string"?$l(s):s,h=da(d.pathname||"/",r);if(h==null)return null;let y=Nm(n);yp(y);let v=null;for(let p=0;v==null&&p<y.length;++p){let g=Tp(h);v=Ep(y[p],g,c)}return v}function Nm(n,s=[],r=[],c="",d=!1){let h=(y,v,p=d,g)=>{let E={relativePath:g===void 0?y.path||"":g,caseSensitive:y.caseSensitive===!0,childrenIndex:v,route:y};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(c)&&p)return;ze(E.relativePath.startsWith(c),`Absolute route path "${E.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(c.length)}let j=fa([c,E.relativePath]),T=r.concat(E);y.children&&y.children.length>0&&(ze(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${j}".`),Nm(y.children,s,T,j,p)),!(y.path==null&&!y.index)&&s.push({path:j,score:jp(j,y.index),routesMeta:T})};return n.forEach((y,v)=>{if(y.path===""||!y.path?.includes("?"))h(y,v);else for(let p of Em(y.path))h(y,v,!0,p)}),s}function Em(n){let s=n.split("/");if(s.length===0)return[];let[r,...c]=s,d=r.endsWith("?"),h=r.replace(/\?$/,"");if(c.length===0)return d?[h,""]:[h];let y=Em(c.join("/")),v=[];return v.push(...y.map(p=>p===""?h:[h,p].join("/"))),d&&v.push(...y),v.map(p=>n.startsWith("/")&&p===""?"/":p)}function yp(n){n.sort((s,r)=>s.score!==r.score?r.score-s.score:Np(s.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var gp=/^:[\w-]+$/,pp=3,vp=2,xp=1,bp=10,Sp=-2,em=n=>n==="*";function jp(n,s){let r=n.split("/"),c=r.length;return r.some(em)&&(c+=Sp),s&&(c+=vp),r.filter(d=>!em(d)).reduce((d,h)=>d+(gp.test(h)?pp:h===""?xp:bp),c)}function Np(n,s){return n.length===s.length&&n.slice(0,-1).every((c,d)=>c===s[d])?n[n.length-1]-s[s.length-1]:0}function Ep(n,s,r=!1){let{routesMeta:c}=n,d={},h="/",y=[];for(let v=0;v<c.length;++v){let p=c[v],g=v===c.length-1,E=h==="/"?s:s.slice(h.length)||"/",j=Tu({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},E),T=p.route;if(!j&&g&&r&&!c[c.length-1].route.index&&(j=Tu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},E)),!j)return null;Object.assign(d,j.params),y.push({params:d,pathname:fa([h,j.pathname]),pathnameBase:Ap(fa([h,j.pathnameBase])),route:T}),j.pathnameBase!=="/"&&(h=fa([h,j.pathnameBase]))}return y}function Tu(n,s){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,c]=Cp(n.path,n.caseSensitive,n.end),d=s.match(r);if(!d)return null;let h=d[0],y=h.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:c.reduce((g,{paramName:E,isOptional:j},T)=>{if(E==="*"){let w=v[T]||"";y=h.slice(0,h.length-w.length).replace(/(.)\/+$/,"$1")}const Q=v[T];return j&&!Q?g[E]=void 0:g[E]=(Q||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:y,pattern:n}}function Cp(n,s=!1,r=!0){Qt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,v,p)=>(c.push({paramName:v,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),c]}function Tp(n){try{return n.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Qt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),n}}function da(n,s){if(s==="/")return n;if(!n.toLowerCase().startsWith(s.toLowerCase()))return null;let r=s.endsWith("/")?s.length-1:s.length,c=n.charAt(r);return c&&c!=="/"?null:n.slice(r)||"/"}var wp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Rp(n,s="/"){let{pathname:r,search:c="",hash:d=""}=typeof n=="string"?$l(n):n,h;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?h=tm(r.substring(1),"/"):h=tm(r,s)):h=s,{pathname:h,search:Op(c),hash:zp(d)}}function tm(n,s){let r=s.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function Ir(n,s,r,c){return`Cannot include a '${n}' character in a manually specified \`to.${s}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mp(n){return n.filter((s,r)=>r===0||s.route.path&&s.route.path.length>0)}function xc(n){let s=Mp(n);return s.map((r,c)=>c===s.length-1?r.pathname:r.pathnameBase)}function bc(n,s,r,c=!1){let d;typeof n=="string"?d=$l(n):(d={...n},ze(!d.pathname||!d.pathname.includes("?"),Ir("?","pathname","search",d)),ze(!d.pathname||!d.pathname.includes("#"),Ir("#","pathname","hash",d)),ze(!d.search||!d.search.includes("#"),Ir("#","search","hash",d)));let h=n===""||d.pathname==="",y=h?"/":d.pathname,v;if(y==null)v=r;else{let j=s.length-1;if(!c&&y.startsWith("..")){let T=y.split("/");for(;T[0]==="..";)T.shift(),j-=1;d.pathname=T.join("/")}v=j>=0?s[j]:"/"}let p=Rp(d,v),g=y&&y!=="/"&&y.endsWith("/"),E=(h||y===".")&&r.endsWith("/");return!p.pathname.endsWith("/")&&(g||E)&&(p.pathname+="/"),p}var fa=n=>n.join("/").replace(/\/\/+/g,"/"),Ap=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Op=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,zp=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,_p=class{constructor(n,s,r,c=!1){this.status=n,this.statusText=s||"",this.internal=c,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Dp(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Up(n){return n.map(s=>s.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Cm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Tm(n,s){let r=n;if(typeof r!="string"||!wp.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let c=r,d=!1;if(Cm)try{let h=new URL(window.location.href),y=r.startsWith("//")?new URL(h.protocol+r):new URL(r),v=da(y.pathname,s);y.origin===h.origin&&v!=null?r=v+y.search+y.hash:d=!0}catch{Qt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wm=["POST","PUT","PATCH","DELETE"];new Set(wm);var qp=["GET",...wm];new Set(qp);var Wl=S.createContext(null);Wl.displayName="DataRouter";var wu=S.createContext(null);wu.displayName="DataRouterState";var Hp=S.createContext(!1),Rm=S.createContext({isTransitioning:!1});Rm.displayName="ViewTransition";var Lp=S.createContext(new Map);Lp.displayName="Fetchers";var Bp=S.createContext(null);Bp.displayName="Await";var Nt=S.createContext(null);Nt.displayName="Navigation";var ei=S.createContext(null);ei.displayName="Location";var Yt=S.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var Sc=S.createContext(null);Sc.displayName="RouteError";var Mm="REACT_ROUTER_ERROR",Qp="REDIRECT",Yp="ROUTE_ERROR_RESPONSE";function Gp(n){if(n.startsWith(`${Mm}:${Qp}:{`))try{let s=JSON.parse(n.slice(28));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.location=="string"&&typeof s.reloadDocument=="boolean"&&typeof s.replace=="boolean")return s}catch{}}function Kp(n){if(n.startsWith(`${Mm}:${Yp}:{`))try{let s=JSON.parse(n.slice(40));if(typeof s=="object"&&s&&typeof s.status=="number"&&typeof s.statusText=="string")return new _p(s.status,s.statusText,s.data)}catch{}}function Xp(n,{relative:s}={}){ze(Pl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=S.useContext(Nt),{hash:d,pathname:h,search:y}=ti(n,{relative:s}),v=h;return r!=="/"&&(v=h==="/"?r:fa([r,h])),c.createHref({pathname:v,search:y,hash:d})}function Pl(){return S.useContext(ei)!=null}function Vt(){return ze(Pl(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ei).location}var Am="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Om(n){S.useContext(Nt).static||S.useLayoutEffect(n)}function Il(){let{isDataRoute:n}=S.useContext(Yt);return n?nv():Zp()}function Zp(){ze(Pl(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Wl),{basename:s,navigator:r}=S.useContext(Nt),{matches:c}=S.useContext(Yt),{pathname:d}=Vt(),h=JSON.stringify(xc(c)),y=S.useRef(!1);return Om(()=>{y.current=!0}),S.useCallback((p,g={})=>{if(Qt(y.current,Am),!y.current)return;if(typeof p=="number"){r.go(p);return}let E=bc(p,JSON.parse(h),d,g.relative==="path");n==null&&s!=="/"&&(E.pathname=E.pathname==="/"?s:fa([s,E.pathname])),(g.replace?r.replace:r.push)(E,g.state,g)},[s,r,h,d,n])}S.createContext(null);function Vp(){let{matches:n}=S.useContext(Yt),s=n[n.length-1];return s?s.params:{}}function ti(n,{relative:s}={}){let{matches:r}=S.useContext(Yt),{pathname:c}=Vt(),d=JSON.stringify(xc(r));return S.useMemo(()=>bc(n,JSON.parse(d),c,s==="path"),[n,d,c,s])}function kp(n,s){return zm(n,s)}function zm(n,s,r,c,d){ze(Pl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=S.useContext(Nt),{matches:y}=S.useContext(Yt),v=y[y.length-1],p=v?v.params:{},g=v?v.pathname:"/",E=v?v.pathnameBase:"/",j=v&&v.route;{let Y=j&&j.path||"";Dm(g,!j||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=Vt(),Q;if(s){let Y=typeof s=="string"?$l(s):s;ze(E==="/"||Y.pathname?.startsWith(E),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),Q=Y}else Q=T;let w=Q.pathname||"/",O=w;if(E!=="/"){let Y=E.replace(/^\//,"").split("/");O="/"+w.replace(/^\//,"").split("/").slice(Y.length).join("/")}let D=jm(n,{pathname:O});Qt(j||D!=null,`No routes matched location "${Q.pathname}${Q.search}${Q.hash}" `),Qt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.length-1].route.lazy!==void 0,`Matched leaf route at location "${Q.pathname}${Q.search}${Q.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let K=Pp(D&&D.map(Y=>Object.assign({},Y,{params:Object.assign({},p,Y.params),pathname:fa([E,h.encodeLocation?h.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?E:fa([E,h.encodeLocation?h.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),y,r,c,d);return s&&K?S.createElement(ei.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...Q},navigationType:"POP"}},K):K}function Jp(){let n=lv(),s=Dp(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},y=null;return console.error("Error handled by React Router default ErrorBoundary:",n),y=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:h},"ErrorBoundary")," or"," ",S.createElement("code",{style:h},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},s),r?S.createElement("pre",{style:d},r):null,y)}var Fp=S.createElement(Jp,null),_m=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){this.props.onError?this.props.onError(n,s):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=Kp(n.digest);r&&(n=r)}let s=n!==void 0?S.createElement(Yt.Provider,{value:this.props.routeContext},S.createElement(Sc.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement($p,{error:n},s):s}};_m.contextType=Hp;var ec=new WeakMap;function $p({children:n,error:s}){let{basename:r}=S.useContext(Nt);if(typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){let c=Gp(s.digest);if(c){let d=ec.get(s);if(d)throw d;let h=Tm(c.location,r);if(Cm&&!ec.get(s))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw ec.set(s,y),y}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return n}function Wp({routeContext:n,match:s,children:r}){let c=S.useContext(Wl);return c&&c.static&&c.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Yt.Provider,{value:n},r)}function Pp(n,s=[],r=null,c=null,d=null){if(n==null){if(!r)return null;if(r.errors)n=r.matches;else if(s.length===0&&!r.initialized&&r.matches.length>0)n=r.matches;else return null}let h=n,y=r?.errors;if(y!=null){let E=h.findIndex(j=>j.route.id&&y?.[j.route.id]!==void 0);ze(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),h=h.slice(0,Math.min(h.length,E+1))}let v=!1,p=-1;if(r)for(let E=0;E<h.length;E++){let j=h[E];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&&(p=E),j.route.id){let{loaderData:T,errors:Q}=r,w=j.route.loader&&!T.hasOwnProperty(j.route.id)&&(!Q||Q[j.route.id]===void 0);if(j.route.lazy||w){v=!0,p>=0?h=h.slice(0,p+1):h=[h[0]];break}}}let g=r&&c?(E,j)=>{c(E,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Up(r.matches),errorInfo:j})}:void 0;return h.reduceRight((E,j,T)=>{let Q,w=!1,O=null,D=null;r&&(Q=y&&j.route.id?y[j.route.id]:void 0,O=j.route.errorElement||Fp,v&&(p<0&&T===0?(Dm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,D=null):p===T&&(w=!0,D=j.route.hydrateFallbackElement||null)));let K=s.concat(h.slice(0,T+1)),Y=()=>{let Z;return Q?Z=O:w?Z=D:j.route.Component?Z=S.createElement(j.route.Component,null):j.route.element?Z=j.route.element:Z=E,S.createElement(Wp,{match:j,routeContext:{outlet:E,matches:K,isDataRoute:r!=null},children:Z})};return r&&(j.route.ErrorBoundary||j.route.errorElement||T===0)?S.createElement(_m,{location:r.location,revalidation:r.revalidation,component:O,error:Q,children:Y(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:g}):Y()},null)}function jc(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ip(n){let s=S.useContext(Wl);return ze(s,jc(n)),s}function ev(n){let s=S.useContext(wu);return ze(s,jc(n)),s}function tv(n){let s=S.useContext(Yt);return ze(s,jc(n)),s}function Nc(n){let s=tv(n),r=s.matches[s.matches.length-1];return ze(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function av(){return Nc("useRouteId")}function lv(){let n=S.useContext(Sc),s=ev("useRouteError"),r=Nc("useRouteError");return n!==void 0?n:s.errors?.[r]}function nv(){let{router:n}=Ip("useNavigate"),s=Nc("useNavigate"),r=S.useRef(!1);return Om(()=>{r.current=!0}),S.useCallback(async(d,h={})=>{Qt(r.current,Am),r.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:s,...h}))},[n,s])}var am={};function Dm(n,s,r){!s&&!am[n]&&(am[n]=!0,Qt(!1,r))}S.memo(iv);function iv({routes:n,future:s,state:r,onError:c}){return zm(n,void 0,r,c,s)}function uv({to:n,replace:s,state:r,relative:c}){ze(Pl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(Nt);Qt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:h}=S.useContext(Yt),{pathname:y}=Vt(),v=Il(),p=bc(n,xc(h),y,c==="path"),g=JSON.stringify(p);return S.useEffect(()=>{v(JSON.parse(g),{replace:s,state:r,relative:c})},[v,g,c,s,r]),null}function il(n){ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sv({basename:n="/",children:s=null,location:r,navigationType:c="POP",navigator:d,static:h=!1,unstable_useTransitions:y}){ze(!Pl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=n.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:v,navigator:d,static:h,unstable_useTransitions:y,future:{}}),[v,d,h,y]);typeof r=="string"&&(r=$l(r));let{pathname:g="/",search:E="",hash:j="",state:T=null,key:Q="default"}=r,w=S.useMemo(()=>{let O=da(g,v);return O==null?null:{location:{pathname:O,search:E,hash:j,state:T,key:Q},navigationType:c}},[v,g,E,j,T,Q,c]);return Qt(w!=null,`<Router basename="${v}"> is not able to match the URL "${g}${E}${j}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:S.createElement(Nt.Provider,{value:p},S.createElement(ei.Provider,{children:s,value:w}))}function rv({children:n,location:s}){return kp(cc(n),s)}function cc(n,s=[]){let r=[];return S.Children.forEach(n,(c,d)=>{if(!S.isValidElement(c))return;let h=[...s,d];if(c.type===S.Fragment){r.push.apply(r,cc(c.props.children,h));return}ze(c.type===il,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ze(!c.props.index||!c.props.children,"An index route cannot have child routes.");let y={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(y.children=cc(c.props.children,h)),r.push(y)}),r}var ju="get",Nu="application/x-www-form-urlencoded";function Ru(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function cv(n){return Ru(n)&&n.tagName.toLowerCase()==="button"}function ov(n){return Ru(n)&&n.tagName.toLowerCase()==="form"}function fv(n){return Ru(n)&&n.tagName.toLowerCase()==="input"}function dv(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function hv(n,s){return n.button===0&&(!s||s==="_self")&&!dv(n)}var Su=null;function mv(){if(Su===null)try{new FormData(document.createElement("form"),0),Su=!1}catch{Su=!0}return Su}var yv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tc(n){return n!=null&&!yv.has(n)?(Qt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nu}"`),null):n}function gv(n,s){let r,c,d,h,y;if(ov(n)){let v=n.getAttribute("action");c=v?da(v,s):null,r=n.getAttribute("method")||ju,d=tc(n.getAttribute("enctype"))||Nu,h=new FormData(n)}else if(cv(n)||fv(n)&&(n.type==="submit"||n.type==="image")){let v=n.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=n.getAttribute("formaction")||v.getAttribute("action");if(c=p?da(p,s):null,r=n.getAttribute("formmethod")||v.getAttribute("method")||ju,d=tc(n.getAttribute("formenctype"))||tc(v.getAttribute("enctype"))||Nu,h=new FormData(v,n),!mv()){let{name:g,type:E,value:j}=n;if(E==="image"){let T=g?`${g}.`:"";h.append(`${T}x`,"0"),h.append(`${T}y`,"0")}else g&&h.append(g,j)}}else{if(Ru(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ju,c=null,d=Nu,y=n}return h&&d==="text/plain"&&(y=h,h=void 0),{action:c,method:r.toLowerCase(),encType:d,formData:h,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ec(n,s){if(n===!1||n===null||typeof n>"u")throw new Error(s)}function pv(n,s,r,c){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:s&&da(d.pathname,s)==="/"?d.pathname=`${s.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function vv(n,s){if(n.id in s)return s[n.id];try{let r=await import(n.module);return s[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xv(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function bv(n,s,r){let c=await Promise.all(n.map(async d=>{let h=s.routes[d.route.id];if(h){let y=await vv(h,r);return y.links?y.links():[]}return[]}));return Ev(c.flat(1).filter(xv).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function lm(n,s,r,c,d,h){let y=(p,g)=>r[g]?p.route.id!==r[g].route.id:!0,v=(p,g)=>r[g].pathname!==p.pathname||r[g].route.path?.endsWith("*")&&r[g].params["*"]!==p.params["*"];return h==="assets"?s.filter((p,g)=>y(p,g)||v(p,g)):h==="data"?s.filter((p,g)=>{let E=c.routes[p.route.id];if(!E||!E.hasLoader)return!1;if(y(p,g)||v(p,g))return!0;if(p.route.shouldRevalidate){let j=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function Sv(n,s,{includeHydrateFallback:r}={}){return jv(n.map(c=>{let d=s.routes[c.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),r&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function jv(n){return[...new Set(n)]}function Nv(n){let s={},r=Object.keys(n).sort();for(let c of r)s[c]=n[c];return s}function Ev(n,s){let r=new Set;return new Set(s),n.reduce((c,d)=>{let h=JSON.stringify(Nv(d));return r.has(h)||(r.add(h),c.push({key:h,link:d})),c},[])}function Um(){let n=S.useContext(Wl);return Ec(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Cv(){let n=S.useContext(wu);return Ec(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Cc=S.createContext(void 0);Cc.displayName="FrameworkContext";function qm(){let n=S.useContext(Cc);return Ec(n,"You must render this element inside a <HydratedRouter> element"),n}function Tv(n,s){let r=S.useContext(Cc),[c,d]=S.useState(!1),[h,y]=S.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:g,onMouseLeave:E,onTouchStart:j}=s,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&y(!0),n==="viewport"){let O=K=>{K.forEach(Y=>{y(Y.isIntersecting)})},D=new IntersectionObserver(O,{threshold:.5});return T.current&&D.observe(T.current),()=>{D.disconnect()}}},[n]),S.useEffect(()=>{if(c){let O=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(O)}}},[c]);let Q=()=>{d(!0)},w=()=>{d(!1),y(!1)};return r?n!=="intent"?[h,T,{}]:[h,T,{onFocus:$n(v,Q),onBlur:$n(p,w),onMouseEnter:$n(g,Q),onMouseLeave:$n(E,w),onTouchStart:$n(j,Q)}]:[!1,T,{}]}function $n(n,s){return r=>{n&&n(r),r.defaultPrevented||s(r)}}function wv({page:n,...s}){let{router:r}=Um(),c=S.useMemo(()=>jm(r.routes,n,r.basename),[r.routes,n,r.basename]);return c?S.createElement(Mv,{page:n,matches:c,...s}):null}function Rv(n){let{manifest:s,routeModules:r}=qm(),[c,d]=S.useState([]);return S.useEffect(()=>{let h=!1;return bv(n,s,r).then(y=>{h||d(y)}),()=>{h=!0}},[n,s,r]),c}function Mv({page:n,matches:s,...r}){let c=Vt(),{future:d,manifest:h,routeModules:y}=qm(),{basename:v}=Um(),{loaderData:p,matches:g}=Cv(),E=S.useMemo(()=>lm(n,s,g,h,c,"data"),[n,s,g,h,c]),j=S.useMemo(()=>lm(n,s,g,h,c,"assets"),[n,s,g,h,c]),T=S.useMemo(()=>{if(n===c.pathname+c.search+c.hash)return[];let O=new Set,D=!1;if(s.forEach(Y=>{let Z=h.routes[Y.route.id];!Z||!Z.hasLoader||(!E.some(X=>X.route.id===Y.route.id)&&Y.route.id in p&&y[Y.route.id]?.shouldRevalidate||Z.hasClientLoader?D=!0:O.add(Y.route.id))}),O.size===0)return[];let K=pv(n,v,d.unstable_trailingSlashAwareDataRequests,"data");return D&&O.size>0&&K.searchParams.set("_routes",s.filter(Y=>O.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[K.pathname+K.search]},[v,d.unstable_trailingSlashAwareDataRequests,p,c,h,E,s,n,y]),Q=S.useMemo(()=>Sv(j,h),[j,h]),w=Rv(j);return S.createElement(S.Fragment,null,T.map(O=>S.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...r})),Q.map(O=>S.createElement("link",{key:O,rel:"modulepreload",href:O,...r})),w.map(({key:O,link:D})=>S.createElement("link",{key:O,nonce:r.nonce,...D,crossOrigin:D.crossOrigin??r.crossOrigin})))}function Av(...n){return s=>{n.forEach(r=>{typeof r=="function"?r(s):r!=null&&(r.current=s)})}}var Ov=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ov&&(window.__reactRouterVersion="7.13.0")}catch{}function zv({basename:n,children:s,unstable_useTransitions:r,window:c}){let d=S.useRef();d.current==null&&(d.current=op({window:c,v5Compat:!0}));let h=d.current,[y,v]=S.useState({action:h.action,location:h.location}),p=S.useCallback(g=>{r===!1?v(g):S.startTransition(()=>v(g))},[r]);return S.useLayoutEffect(()=>h.listen(p),[h,p]),S.createElement(sv,{basename:n,children:s,location:y.location,navigationType:y.action,navigator:h,unstable_useTransitions:r})}var Hm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sl=S.forwardRef(function({onClick:s,discover:r="render",prefetch:c="none",relative:d,reloadDocument:h,replace:y,state:v,target:p,to:g,preventScrollReset:E,viewTransition:j,unstable_defaultShouldRevalidate:T,...Q},w){let{basename:O,unstable_useTransitions:D}=S.useContext(Nt),K=typeof g=="string"&&Hm.test(g),Y=Tm(g,O);g=Y.to;let Z=Xp(g,{relative:d}),[X,W,le]=Tv(c,Q),G=qv(g,{replace:y,state:v,target:p,preventScrollReset:E,relative:d,viewTransition:j,unstable_defaultShouldRevalidate:T,unstable_useTransitions:D});function B(_e){s&&s(_e),_e.defaultPrevented||G(_e)}let te=S.createElement("a",{...Q,...le,href:Y.absoluteURL||Z,onClick:Y.isExternal||h?s:B,ref:Av(w,W),target:p,"data-discover":!K&&r==="render"?"true":void 0});return X&&!K?S.createElement(S.Fragment,null,te,S.createElement(wv,{page:Z})):te});sl.displayName="Link";var _v=S.forwardRef(function({"aria-current":s="page",caseSensitive:r=!1,className:c="",end:d=!1,style:h,to:y,viewTransition:v,children:p,...g},E){let j=ti(y,{relative:g.relative}),T=Vt(),Q=S.useContext(wu),{navigator:w,basename:O}=S.useContext(Nt),D=Q!=null&&Yv(j)&&v===!0,K=w.encodeLocation?w.encodeLocation(j).pathname:j.pathname,Y=T.pathname,Z=Q&&Q.navigation&&Q.navigation.location?Q.navigation.location.pathname:null;r||(Y=Y.toLowerCase(),Z=Z?Z.toLowerCase():null,K=K.toLowerCase()),Z&&O&&(Z=da(Z,O)||Z);const X=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let W=Y===K||!d&&Y.startsWith(K)&&Y.charAt(X)==="/",le=Z!=null&&(Z===K||!d&&Z.startsWith(K)&&Z.charAt(K.length)==="/"),G={isActive:W,isPending:le,isTransitioning:D},B=W?s:void 0,te;typeof c=="function"?te=c(G):te=[c,W?"active":null,le?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let _e=typeof h=="function"?h(G):h;return S.createElement(sl,{...g,"aria-current":B,className:te,ref:E,style:_e,to:y,viewTransition:v},typeof p=="function"?p(G):p)});_v.displayName="NavLink";var Dv=S.forwardRef(({discover:n="render",fetcherKey:s,navigate:r,reloadDocument:c,replace:d,state:h,method:y=ju,action:v,onSubmit:p,relative:g,preventScrollReset:E,viewTransition:j,unstable_defaultShouldRevalidate:T,...Q},w)=>{let{unstable_useTransitions:O}=S.useContext(Nt),D=Bv(),K=Qv(v,{relative:g}),Y=y.toLowerCase()==="get"?"get":"post",Z=typeof v=="string"&&Hm.test(v),X=W=>{if(p&&p(W),W.defaultPrevented)return;W.preventDefault();let le=W.nativeEvent.submitter,G=le?.getAttribute("formmethod")||y,B=()=>D(le||W.currentTarget,{fetcherKey:s,method:G,navigate:r,replace:d,state:h,relative:g,preventScrollReset:E,viewTransition:j,unstable_defaultShouldRevalidate:T});O&&r!==!1?S.startTransition(()=>B()):B()};return S.createElement("form",{ref:w,method:Y,action:K,onSubmit:c?p:X,...Q,"data-discover":!Z&&n==="render"?"true":void 0})});Dv.displayName="Form";function Uv(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lm(n){let s=S.useContext(Wl);return ze(s,Uv(n)),s}function qv(n,{target:s,replace:r,state:c,preventScrollReset:d,relative:h,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let g=Il(),E=Vt(),j=ti(n,{relative:h});return S.useCallback(T=>{if(hv(T,s)){T.preventDefault();let Q=r!==void 0?r:Pn(E)===Pn(j),w=()=>g(n,{replace:Q,state:c,preventScrollReset:d,relative:h,viewTransition:y,unstable_defaultShouldRevalidate:v});p?S.startTransition(()=>w()):w()}},[E,g,j,r,c,s,n,d,h,y,v,p])}var Hv=0,Lv=()=>`__${String(++Hv)}__`;function Bv(){let{router:n}=Lm("useSubmit"),{basename:s}=S.useContext(Nt),r=av(),c=n.fetch,d=n.navigate;return S.useCallback(async(h,y={})=>{let{action:v,method:p,encType:g,formData:E,body:j}=gv(h,s);if(y.navigate===!1){let T=y.fetcherKey||Lv();await c(T,r,y.action||v,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:E,body:j,formMethod:y.method||p,formEncType:y.encType||g,flushSync:y.flushSync})}else await d(y.action||v,{unstable_defaultShouldRevalidate:y.unstable_defaultShouldRevalidate,preventScrollReset:y.preventScrollReset,formData:E,body:j,formMethod:y.method||p,formEncType:y.encType||g,replace:y.replace,state:y.state,fromRouteId:r,flushSync:y.flushSync,viewTransition:y.viewTransition})},[c,d,s,r])}function Qv(n,{relative:s}={}){let{basename:r}=S.useContext(Nt),c=S.useContext(Yt);ze(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),h={...ti(n||".",{relative:s})},y=Vt();if(n==null){h.search=y.search;let v=new URLSearchParams(h.search),p=v.getAll("index");if(p.some(E=>E==="")){v.delete("index"),p.filter(j=>j).forEach(j=>v.append("index",j));let E=v.toString();h.search=E?`?${E}`:""}}return(!n||n===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(h.pathname=h.pathname==="/"?r:fa([r,h.pathname])),Pn(h)}function Yv(n,{relative:s}={}){let r=S.useContext(Rm);ze(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=Lm("useViewTransitionState"),d=ti(n,{relative:s});if(!r.isTransitioning)return!1;let h=da(r.currentLocation.pathname,c)||r.currentLocation.pathname,y=da(r.nextLocation.pathname,c)||r.nextLocation.pathname;return Tu(d.pathname,y)!=null||Tu(d.pathname,h)!=null}const Bm=(...n)=>n.filter((s,r,c)=>!!s&&s.trim()!==""&&c.indexOf(s)===r).join(" ").trim();const Gv=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Kv=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,c)=>c?c.toUpperCase():r.toLowerCase());const nm=n=>{const s=Kv(n);return s.charAt(0).toUpperCase()+s.slice(1)};var Xv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Zv=n=>{for(const s in n)if(s.startsWith("aria-")||s==="role"||s==="title")return!0;return!1};const Vv=S.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:c,className:d="",children:h,iconNode:y,...v},p)=>S.createElement("svg",{ref:p,...Xv,width:s,height:s,stroke:n,strokeWidth:c?Number(r)*24/Number(s):r,className:Bm("lucide",d),...!h&&!Zv(v)&&{"aria-hidden":"true"},...v},[...y.map(([g,E])=>S.createElement(g,E)),...Array.isArray(h)?h:[h]]));const Re=(n,s)=>{const r=S.forwardRef(({className:c,...d},h)=>S.createElement(Vv,{ref:h,iconNode:s,className:Bm(`lucide-${Gv(nm(n))}`,`lucide-${n}`,c),...d}));return r.displayName=nm(n),r};const kv=[["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"}]],Jv=Re("activity",kv);const Fv=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Tc=Re("arrow-left",Fv);const $v=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qm=Re("chevron-down",$v);const Wv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pv=Re("chevron-right",Wv);const Iv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ym=Re("circle-alert",Iv);const ex=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],tx=Re("circle-check-big",ex);const ax=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lx=Re("clock",ax);const nx=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],im=Re("cpu",nx);const ix=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],um=Re("database",ix);const ux=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],In=Re("download",ux);const sx=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],oc=Re("file-text",sx);const rx=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],wc=Re("hard-drive",rx);const cx=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],ox=Re("heart",cx);const fx=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],dt=Re("loader-circle",fx);const dx=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],hx=Re("log-out",dx);const mx=[["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"}]],Gm=Re("play",mx);const yx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],fc=Re("plus",yx);const gx=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],px=Re("rotate-ccw",gx);const vx=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],xx=Re("rotate-cw",vx);const bx=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Km=Re("save",bx);const Sx=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xm=Re("search",Sx);const jx=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Nx=Re("server",jx);const Ex=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],dc=Re("settings",Ex);const Cx=[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]],Tx=Re("shuffle",Cx);const wx=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Zm=Re("square",wx);const Rx=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Vm=Re("trash-2",Rx);const Mx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jl=Re("x",Mx),Ax="";class Ox{apiKey=null;setApiKey(s){this.apiKey=s,localStorage.setItem("llamacpp_api_key",s)}getApiKey(){return this.apiKey||(this.apiKey=localStorage.getItem("llamacpp_api_key")),this.apiKey}clearApiKey(){this.apiKey=null,localStorage.removeItem("llamacpp_api_key")}async request(s,r={}){const c=this.getApiKey(),d={"Content-Type":"application/json",...r.headers};c&&s!=="/health"&&(d.Authorization=`Bearer ${c}`);const h=await fetch(`${Ax}${s}`,{...r,headers:d});if(!h.ok){const y=await h.json();throw new Error(y.details||y.error)}return h.json()}async getHealth(){return this.request("/health")}async getSystemStatus(){return this.request("/api/status")}async listServers(){return this.request("/api/servers")}async getServer(s){return this.request(`/api/servers/${s}`)}async createServer(s){return this.request("/api/servers",{method:"POST",body:JSON.stringify(s)})}async updateServer(s,r){return this.request(`/api/servers/${s}`,{method:"PATCH",body:JSON.stringify(r)})}async deleteServer(s){return this.request(`/api/servers/${s}`,{method:"DELETE"})}async startServer(s){return this.request(`/api/servers/${s}/start`,{method:"POST"})}async stopServer(s){return this.request(`/api/servers/${s}/stop`,{method:"POST"})}async restartServer(s){return this.request(`/api/servers/${s}/restart`,{method:"POST"})}async getServerLogs(s,r="both",c=100){return this.request(`/api/servers/${s}/logs?type=${r}&lines=${c}`)}async listModels(){return this.request("/api/models")}async getModel(s){return this.request(`/api/models/${encodeURIComponent(s)}`)}async searchModels(s,r=20){return this.request(`/api/models/search?q=${encodeURIComponent(s)}&limit=${r}`)}async getModelFiles(s){return this.request(`/api/models/${encodeURIComponent(s)}/files`)}async downloadModel(s,r){return this.request("/api/models/download",{method:"POST",body:JSON.stringify({repo:s,filename:r})})}async deleteModel(s,r=!1){return this.request(`/api/models/${encodeURIComponent(s)}?cascade=${r}`,{method:"DELETE"})}async listDownloadJobs(){return this.request("/api/jobs")}async getDownloadJob(s){return this.request(`/api/jobs/${s}`)}async cancelDownloadJob(s){return this.request(`/api/jobs/${s}`,{method:"DELETE"})}async getRouter(){return this.request("/api/router")}async startRouter(){return this.request("/api/router/start",{method:"POST"})}async stopRouter(){return this.request("/api/router/stop",{method:"POST"})}async restartRouter(){return this.request("/api/router/restart",{method:"POST"})}async getRouterLogs(s="both",r=100){return this.request(`/api/router/logs?type=${s}&lines=${r}`)}async updateRouter(s){return this.request("/api/router",{method:"PATCH",body:JSON.stringify(s)})}}const Ce=new Ox;function zx({onLogout:n,searchQuery:s="",onSearchChange:r}){const c=Vt(),d=()=>{Ce.clearApiKey(),n?.()};return o.jsx("nav",{className:"border-b border-neutral-200 bg-white",children:o.jsx("div",{className:"max-w-7xl mx-auto px-6",children:o.jsxs("div",{className:"flex items-center justify-between h-16",children:[o.jsxs("div",{className:"flex items-center space-x-10",children:[o.jsx(sl,{to:"/",className:"flex items-center",children:o.jsx("span",{className:"text-xl font-bold text-neutral-900 tracking-tight",children:"LLAMA CPP"})}),o.jsxs("div",{className:"flex items-center space-x-1",children:[o.jsx(sl,{to:"/servers",className:`px-3 py-2 text-sm font-medium transition-colors rounded-md ${c.pathname==="/servers"||c.pathname==="/"?"text-neutral-900 bg-neutral-100":"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50"}`,children:"Servers"}),o.jsx(sl,{to:"/models",className:`px-3 py-2 text-sm font-medium transition-colors rounded-md ${c.pathname==="/models"?"text-neutral-900 bg-neutral-100":"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50"}`,children:"Models"}),o.jsx(sl,{to:"/router",className:`px-3 py-2 text-sm font-medium transition-colors rounded-md ${c.pathname==="/router"?"text-neutral-900 bg-neutral-100":"text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50"}`,children:"Router"})]})]}),o.jsxs("div",{className:"flex items-center space-x-3",children:[r&&o.jsxs("div",{className:"relative",children:[o.jsx(Xm,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-neutral-400 pointer-events-none"}),o.jsx("input",{type:"search",placeholder:"Search models...",value:s,onChange:h=>r(h.target.value),className:"w-72 pl-9 pr-4 py-2 text-sm text-neutral-900 placeholder:text-neutral-400 border border-neutral-200 rounded-md bg-white hover:border-neutral-300 focus:outline-none focus:border-neutral-400 transition-colors"})]}),o.jsx("button",{onClick:d,className:"p-2 text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 rounded-md transition-colors cursor-pointer",title:"Logout",children:o.jsx(hx,{className:"w-4 h-4"})})]})]})})})}function _x({onAuthenticated:n}){const[s,r]=S.useState(""),[c,d]=S.useState(""),[h,y]=S.useState(!1),v=async p=>{p.preventDefault(),d(""),y(!0);try{Ce.setApiKey(s),await Ce.getSystemStatus(),n()}catch{d("Invalid API key"),Ce.clearApiKey()}finally{y(!1)}};return o.jsx("div",{className:"min-h-screen bg-white flex items-center justify-center p-4",children:o.jsxs("div",{className:"w-full max-w-sm",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("svg",{className:"w-12 h-12 mx-auto mb-4",viewBox:"0 0 24 24",fill:"none",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z",fill:"currentColor"})}),o.jsx("h1",{className:"text-xl font-medium text-gray-900",children:"llama.cpp Admin"})]}),o.jsxs("form",{onSubmit:v,className:"space-y-4",children:[o.jsx("div",{children:o.jsx("input",{type:"password",value:s,onChange:p=>r(p.target.value),placeholder:"Enter API key",className:"w-full px-4 py-2.5 text-sm border border-gray-200 rounded-lg bg-gray-50 focus:bg-white focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent",autoFocus:!0})}),c&&o.jsx("p",{className:"text-sm text-red-600",children:c}),o.jsx("button",{type:"submit",disabled:h||!s,className:"w-full py-2.5 px-4 bg-gray-900 hover:bg-gray-800 disabled:bg-gray-300 text-white text-sm font-medium rounded-lg transition-colors cursor-pointer disabled:cursor-not-allowed",children:h?"Connecting...":"Connect"})]}),o.jsxs("p",{className:"mt-6 text-center text-xs text-gray-500",children:["Run ",o.jsx("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-gray-600",children:"llamacpp admin status"})," to get your API key"]})]})})}function Dx(){return ha({queryKey:["servers"],queryFn:()=>Ce.listServers(),refetchInterval:5e3})}function Ux(n){return ha({queryKey:["servers",n],queryFn:()=>Ce.getServer(n),enabled:!!n})}function qx(){const n=nt();return qt({mutationFn:s=>Ce.createServer(s),onSuccess:()=>{n.invalidateQueries({queryKey:["servers"]}),n.invalidateQueries({queryKey:["system"]})}})}function Hx(){const n=nt();return qt({mutationFn:({id:s,data:r})=>Ce.updateServer(s,r),onSuccess:(s,r)=>{n.invalidateQueries({queryKey:["servers"]}),n.invalidateQueries({queryKey:["servers",r.id]})}})}function Lx(){const n=nt();return qt({mutationFn:s=>Ce.startServer(s),onSuccess:(s,r)=>{n.invalidateQueries({queryKey:["servers"]}),n.invalidateQueries({queryKey:["servers",r]})}})}function Bx(){const n=nt();return qt({mutationFn:s=>Ce.stopServer(s),onSuccess:(s,r)=>{n.invalidateQueries({queryKey:["servers"]}),n.invalidateQueries({queryKey:["servers",r]})}})}function Qx(n,s=500){return ha({queryKey:["serverLogs",n,s],queryFn:()=>Ce.getServerLogs(n,"both",s),enabled:!!n,refetchInterval:2e3})}function km(){return ha({queryKey:["models"],queryFn:()=>Ce.listModels(),refetchInterval:1e4})}function Yx(){const n=nt();return qt({mutationFn:({name:s,cascade:r})=>Ce.deleteModel(s,r),onSuccess:()=>{n.invalidateQueries({queryKey:["models"]}),n.invalidateQueries({queryKey:["servers"]}),n.invalidateQueries({queryKey:["system"]})}})}function Gx(){return qt({mutationFn:({repo:n,filename:s})=>Ce.downloadModel(n,s)})}function Kx(){return qt({mutationFn:({query:n,limit:s=20})=>Ce.searchModels(n,s)})}function Xx(n){return ha({queryKey:["modelFiles",n],queryFn:()=>Ce.getModelFiles(n),enabled:!!n})}function Jm(n=!0){return ha({queryKey:["downloadJobs"],queryFn:()=>Ce.listDownloadJobs(),refetchInterval:n?1e3:!1,enabled:n})}function Zx(n){return ha({queryKey:["downloadJobs",n],queryFn:()=>Ce.getDownloadJob(n),enabled:!!n,refetchInterval:500})}function Vx(){const n=nt();return qt({mutationFn:s=>Ce.cancelDownloadJob(s),onSuccess:()=>{n.invalidateQueries({queryKey:["downloadJobs"]})}})}function kx(){return ha({queryKey:["router"],queryFn:()=>Ce.getRouter(),refetchInterval:5e3,placeholderData:hm})}function Jx(){const n=nt();return qt({mutationFn:()=>Ce.startRouter(),onSuccess:()=>{n.invalidateQueries({queryKey:["router"]})}})}function Fx(){const n=nt();return qt({mutationFn:()=>Ce.stopRouter(),onSuccess:()=>{n.invalidateQueries({queryKey:["router"]})}})}function $x(){const n=nt();return qt({mutationFn:()=>Ce.restartRouter(),onSuccess:()=>{n.invalidateQueries({queryKey:["router"]})}})}function Wx(n=500){return ha({queryKey:["routerLogs",n],queryFn:()=>Ce.getRouterLogs("both",n),refetchInterval:2e3,placeholderData:hm})}function Px(){const n=nt();return qt({mutationFn:s=>Ce.updateRouter(s),onSuccess:()=>{n.invalidateQueries({queryKey:["router"]})}})}function Ix({server:n,isOpen:s,onClose:r}){const c=Hx(),[d,h]=S.useState({port:9e3,host:"127.0.0.1",threads:4,ctxSize:4096,gpuLayers:60,verbose:!1,customFlags:""}),[y,v]=S.useState(!0),[p,g]=S.useState(null);S.useEffect(()=>{n&&(h({port:n.port,host:n.host,threads:n.threads,ctxSize:n.ctxSize,gpuLayers:n.gpuLayers,verbose:n.verbose,customFlags:n.customFlags?.join(", ")||""}),g(null))},[n]);const E=async T=>{if(T.preventDefault(),!!n){g(null);try{const Q=d.customFlags.split(",").map(w=>w.trim()).filter(w=>w.length>0);await c.mutateAsync({id:n.id,data:{port:d.port,host:d.host,threads:d.threads,ctxSize:d.ctxSize,gpuLayers:d.gpuLayers,verbose:d.verbose,customFlags:Q.length>0?Q:void 0,restart:n.status==="running"&&y}}),r()}catch(Q){g(Q.message)}}},j=T=>T>=1048576?`${(T/1048576).toFixed(1)}M tokens`:T>=1024?`${(T/1024).toFixed(0)}K tokens`:`${T} tokens`;return!s||!n?null:o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-md mx-4 max-h-[90vh] flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Configure Server"}),o.jsx("p",{className:"text-sm text-gray-500",children:n.modelName.replace(".gguf","")})]}),o.jsx("button",{onClick:r,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Jl,{className:"w-5 h-5"})})]}),o.jsxs("form",{onSubmit:E,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:d.port,onChange:T=>h({...d,port:parseInt(T.target.value)||9e3}),min:1024,max:65535,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Host"}),o.jsxs("select",{value:d.host,onChange:T=>h({...d,host:T.target.value}),className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent bg-white",children:[o.jsx("option",{value:"127.0.0.1",children:"127.0.0.1 (localhost only)"}),o.jsx("option",{value:"0.0.0.0",children:"0.0.0.0 (all interfaces)"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Threads"}),o.jsx("input",{type:"number",value:d.threads,onChange:T=>h({...d,threads:parseInt(T.target.value)||1}),min:1,max:256,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Number of CPU threads for inference"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Context Size"}),o.jsx("input",{type:"number",value:d.ctxSize,onChange:T=>h({...d,ctxSize:parseInt(T.target.value)||2048}),min:512,max:2097152,step:512,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:j(d.ctxSize)})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"GPU Layers"}),o.jsx("input",{type:"number",value:d.gpuLayers,onChange:T=>h({...d,gpuLayers:parseInt(T.target.value)||0}),min:0,max:999,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Layers to offload to GPU (0 = CPU only)"})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Verbose Logging"}),o.jsx("p",{className:"text-xs text-gray-500",children:"Log HTTP requests and responses"})]}),o.jsx("button",{type:"button",onClick:()=>h({...d,verbose:!d.verbose}),className:`relative w-11 h-6 rounded-full transition-colors cursor-pointer ${d.verbose?"bg-gray-900":"bg-gray-200"}`,children:o.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${d.verbose?"translate-x-5":""}`})})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Custom Flags"}),o.jsx("input",{type:"text",value:d.customFlags,onChange:T=>h({...d,customFlags:T.target.value}),placeholder:"--flash-attn, --cont-batching",className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated additional flags"})]}),n.status==="running"&&o.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-gray-100",children:[o.jsx("input",{type:"checkbox",id:"restartAfterSave",checked:y,onChange:T=>v(T.target.checked),className:"w-4 h-4 text-gray-900 border-gray-300 rounded focus:ring-gray-200"}),o.jsx("label",{htmlFor:"restartAfterSave",className:"text-sm text-gray-700",children:"Restart server to apply changes"})]}),p&&o.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:o.jsx("p",{className:"text-sm text-red-700",children:p})})]}),o.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-200 bg-gray-50 rounded-b-xl",children:[o.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:"Cancel"}),o.jsx("button",{onClick:E,disabled:c.isPending,className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-gray-900 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",children:c.isPending?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),"Saving..."]}):o.jsx(o.Fragment,{children:n.status==="running"&&y?o.jsxs(o.Fragment,{children:[o.jsx(px,{className:"w-4 h-4"}),"Save & Restart"]}):o.jsxs(o.Fragment,{children:[o.jsx(Km,{className:"w-4 h-4"}),"Save"]})})})]})]})})}function e1(n){const s=navigator.hardwareConcurrency||8,r=Math.max(1,Math.floor(s/2));let c;return n<1e9?c=2048:n<3e9?c=4096:n<6e9?c=8192:c=16384,{threads:r,ctxSize:c,gpuLayers:60}}function t1({isOpen:n,onClose:s}){const r=qx(),{data:c,isLoading:d}=km(),[h,y]=S.useState({model:"",port:"",host:"127.0.0.1",threads:4,ctxSize:4096,gpuLayers:60,verbose:!1,customFlags:""}),[v,p]=S.useState(null),g=c?.models||[];S.useEffect(()=>{n&&(y({model:"",port:"",host:"127.0.0.1",threads:4,ctxSize:4096,gpuLayers:60,verbose:!1,customFlags:""}),p(null))},[n]),S.useEffect(()=>{if(h.model){const w=g.find(O=>O.filename===h.model);if(w){const O=e1(w.size);y(D=>({...D,threads:O.threads,ctxSize:O.ctxSize,gpuLayers:O.gpuLayers}))}}},[h.model,g]);const E=async w=>{if(w.preventDefault(),!h.model){p("Please select a model");return}p(null);try{const O=h.customFlags.split(",").map(D=>D.trim()).filter(D=>D.length>0);await r.mutateAsync({model:h.model,port:h.port?parseInt(h.port):void 0,host:h.host,threads:h.threads,ctxSize:h.ctxSize,gpuLayers:h.gpuLayers,verbose:h.verbose,customFlags:O.length>0?O:void 0}),s()}catch(O){p(O.message)}},j=w=>w>=1e9?`${(w/1e9).toFixed(1)} GB`:w>=1e6?`${(w/1e6).toFixed(1)} MB`:`${(w/1e3).toFixed(1)} KB`,T=w=>w>=1048576?`${(w/1048576).toFixed(1)}M tokens`:w>=1024?`${(w/1024).toFixed(0)}K tokens`:`${w} tokens`,Q=g.find(w=>w.filename===h.model);return n?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-lg mx-4 max-h-[90vh] flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Create Server"}),o.jsx("button",{onClick:s,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Jl,{className:"w-5 h-5"})})]}),o.jsxs("form",{onSubmit:E,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Model"}),d?o.jsx("div",{className:"flex items-center justify-center py-4",children:o.jsx(dt,{className:"w-5 h-5 animate-spin text-gray-400"})}):g.length===0?o.jsx("div",{className:"text-center py-4 text-sm text-gray-500",children:"No models available. Download a model first."}):o.jsx("div",{className:"space-y-1 max-h-48 overflow-y-auto border border-gray-200 rounded-lg",children:g.map(w=>{const O=w.serversUsing>0;return o.jsx("button",{type:"button",onClick:()=>!O&&y({...h,model:w.filename}),disabled:O,className:`w-full text-left px-3 py-2 transition-colors ${h.model===w.filename?"bg-gray-100 cursor-pointer":O?"bg-gray-50 opacity-50 cursor-not-allowed":"hover:bg-gray-50 cursor-pointer"}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[o.jsx(wc,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),o.jsx("span",{className:"text-sm text-gray-900 truncate",children:w.filename.replace(".gguf","")})]}),o.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[o.jsx("span",{className:"text-xs text-gray-500",children:j(w.size)}),O&&o.jsx("span",{className:"text-xs text-orange-600",children:"in use"})]})]})},w.filename)})}),Q&&o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[j(Q.size)," · Smart defaults applied"]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:h.port,onChange:w=>y({...h,port:w.target.value}),placeholder:"Auto-assign (9000-9999)",min:1024,max:65535,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Leave empty to auto-assign"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Host"}),o.jsxs("select",{value:h.host,onChange:w=>y({...h,host:w.target.value}),className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent bg-white",children:[o.jsx("option",{value:"127.0.0.1",children:"127.0.0.1 (localhost only)"}),o.jsx("option",{value:"0.0.0.0",children:"0.0.0.0 (all interfaces)"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Threads"}),o.jsx("input",{type:"number",value:h.threads,onChange:w=>y({...h,threads:parseInt(w.target.value)||1}),min:1,max:256,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Context Size"}),o.jsx("input",{type:"number",value:h.ctxSize,onChange:w=>y({...h,ctxSize:parseInt(w.target.value)||2048}),min:512,max:2097152,step:512,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:T(h.ctxSize)})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"GPU Layers"}),o.jsx("input",{type:"number",value:h.gpuLayers,onChange:w=>y({...h,gpuLayers:parseInt(w.target.value)||0}),min:0,max:999,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Layers to offload to GPU (0 = CPU only)"})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Verbose Logging"}),o.jsx("p",{className:"text-xs text-gray-500",children:"Log HTTP requests and responses"})]}),o.jsx("button",{type:"button",onClick:()=>y({...h,verbose:!h.verbose}),className:`relative w-11 h-6 rounded-full transition-colors cursor-pointer ${h.verbose?"bg-gray-900":"bg-gray-200"}`,children:o.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${h.verbose?"translate-x-5":""}`})})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Custom Flags"}),o.jsx("input",{type:"text",value:h.customFlags,onChange:w=>y({...h,customFlags:w.target.value}),placeholder:"--flash-attn, --cont-batching",className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Comma-separated additional flags"})]}),v&&o.jsxs("div",{className:"flex items-start gap-2 p-3 bg-red-50 border border-red-200 rounded-lg",children:[o.jsx(Ym,{className:"w-4 h-4 text-red-500 flex-shrink-0 mt-0.5"}),o.jsx("p",{className:"text-sm text-red-700",children:v})]})]}),o.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-200 bg-gray-50 rounded-b-xl",children:[o.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:"Cancel"}),o.jsx("button",{onClick:E,disabled:r.isPending||!h.model,className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-gray-900 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",children:r.isPending?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),"Creating..."]}):o.jsxs(o.Fragment,{children:[o.jsx(fc,{className:"w-4 h-4"}),"Create Server"]})})]})]})}):null}function a1(){const n=Il(),s=nt(),{data:r,isLoading:c}=Dx(),d=Lx(),h=Bx(),[y,v]=S.useState(null),[p,g]=S.useState(null),[E,j]=S.useState(!1),[T,Q]=S.useState("all"),w=S.useRef(null),O=r?.servers||[];S.useEffect(()=>{if(w.current&&y){const{id:B,expectedStatus:te}=w.current,_e=O.find(se=>se.id===B);_e&&_e.status===te&&(w.current=null,v(null))}},[O,y]);const D=async B=>{v({id:B,action:"start"}),w.current={id:B,expectedStatus:"running"};try{await d.mutateAsync(B),await s.refetchQueries({queryKey:["servers"]})}catch{w.current=null,v(null)}},K=async B=>{v({id:B,action:"stop"}),w.current={id:B,expectedStatus:"stopped"};try{await h.mutateAsync(B),await s.refetchQueries({queryKey:["servers"]})}catch{w.current=null,v(null)}},Y=B=>{const te=B.id;if(y?.id===te){if(y.action==="stop")return o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-700",children:[o.jsx(dt,{className:"w-3 h-3 animate-spin"}),"Stopping"]});if(y.action==="start")return o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-700",children:[o.jsx(dt,{className:"w-3 h-3 animate-spin"}),"Starting"]})}return B.status==="running"?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-green-50 text-green-700 border border-green-200/50",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"Running"]}):B.status==="crashed"?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-red-50 text-red-700 border border-red-200/50",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),"Crashed"]}):o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-600",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-neutral-400"}),"Stopped"]})},Z=B=>B>=1024?`${(B/1024).toFixed(0)}K`:B.toString();if(c)return o.jsx("div",{className:"max-w-7xl mx-auto px-6 py-12",children:o.jsx("p",{className:"text-neutral-500 text-center",children:"Loading..."})});const X=O.filter(B=>B.status==="running"),W=O.filter(B=>T==="all"?!0:T==="running"?B.status==="running":T==="stopped"?B.status!=="running":!0),le=W.filter(B=>B.status==="running"),G=W.filter(B=>B.status!=="running");return o.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold text-neutral-900 tracking-tight",children:"Servers"}),o.jsxs("p",{className:"text-sm text-neutral-600 mt-1",children:[O.length," server",O.length!==1?"s":"",X.length>0&&` • ${X.length} running`]})]}),o.jsxs("button",{onClick:()=>j(!0),className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-neutral-900 hover:bg-neutral-800 rounded-md transition-colors cursor-pointer",children:[o.jsx(fc,{className:"w-4 h-4"}),"Create Server"]})]}),o.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[o.jsx("button",{onClick:()=>Q("all"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${T==="all"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"All"}),o.jsx("button",{onClick:()=>Q("running"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${T==="running"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"Running"}),o.jsx("button",{onClick:()=>Q("stopped"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${T==="stopped"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"Stopped"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[le.map(B=>o.jsxs("div",{className:"group bg-white border border-neutral-200 rounded-lg p-5 hover:border-neutral-300 hover:shadow-sm transition-all",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-base font-semibold text-neutral-900 truncate mb-1",children:B.modelName.replace(".gguf","")}),o.jsxs("p",{className:"text-sm text-neutral-500",children:["localhost:",B.port]})]}),Y(B)]}),o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(im,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsxs("span",{children:[B.threads," threads"]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(um,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsxs("span",{children:[Z(B.ctxSize)," context • ",B.gpuLayers," GPU layers"]})]})]}),o.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[o.jsxs("button",{onClick:()=>n(`/servers/${B.id}/logs`),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Logs",children:[o.jsx(oc,{className:"w-3.5 h-3.5"}),"Logs"]}),o.jsxs("button",{onClick:()=>g(B),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Config",children:[o.jsx(dc,{className:"w-3.5 h-3.5"}),"Config"]}),o.jsxs("button",{onClick:()=>K(B.id),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-red-600 hover:bg-red-50 rounded-md transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",title:"Stop",children:[o.jsx(Zm,{className:"w-3.5 h-3.5"}),"Stop"]})]})]},B.id)),G.map(B=>o.jsxs("div",{className:"group bg-white border border-neutral-200 rounded-lg p-5 hover:border-neutral-300 hover:shadow-sm transition-all opacity-60 hover:opacity-100",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-base font-semibold text-neutral-900 truncate mb-1",children:B.modelName.replace(".gguf","")}),o.jsxs("p",{className:"text-sm text-neutral-500",children:["localhost:",B.port]})]}),Y(B)]}),o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(im,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsxs("span",{children:[B.threads," threads"]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(um,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsxs("span",{children:[Z(B.ctxSize)," context"]})]})]}),o.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[o.jsxs("button",{onClick:()=>n(`/servers/${B.id}/logs`),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Logs",children:[o.jsx(oc,{className:"w-3.5 h-3.5"}),"Logs"]}),o.jsxs("button",{onClick:()=>g(B),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Config",children:[o.jsx(dc,{className:"w-3.5 h-3.5"}),"Config"]}),o.jsxs("button",{onClick:()=>D(B.id),disabled:y?.id===B.id,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-green-600 hover:bg-green-50 rounded-md transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",title:"Start",children:[o.jsx(Gm,{className:"w-3.5 h-3.5"}),"Start"]})]})]},B.id))]}),W.length===0&&O.length>0&&o.jsxs("div",{className:"text-center py-16 bg-white border border-neutral-200 rounded-lg",children:[o.jsxs("p",{className:"text-neutral-600 text-base mb-2",children:["No ",T," servers"]}),o.jsx("p",{className:"text-sm text-neutral-500",children:"Try a different filter or create a new server"})]}),O.length===0&&o.jsxs("div",{className:"text-center py-16 bg-white border border-neutral-200 rounded-lg",children:[o.jsx("p",{className:"text-neutral-600 text-base mb-2",children:"No servers configured"}),o.jsx("p",{className:"text-sm text-neutral-500 mb-6",children:"Create your first server to get started"}),o.jsxs("button",{onClick:()=>j(!0),className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-neutral-900 hover:bg-neutral-800 rounded-md transition-colors cursor-pointer",children:[o.jsx(fc,{className:"w-4 h-4"}),"Create Server"]})]}),o.jsx(Ix,{server:p,isOpen:p!==null,onClose:()=>g(null)}),o.jsx(t1,{isOpen:E,onClose:()=>j(!1)})]})}const sm=["/health","/slots","/props"],rm=new Map;function l1(){return new Date().toISOString().substring(0,19).replace("T"," ")}function cm(n,s){const r=n.match(/\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\]/);if(r)return r[1];const c=n.match(/^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/);if(c)return c[1];const d=rm.get(s);if(d)return d;const h=l1();return rm.set(s,h),h}function om(n){const s=n.indexOf("{");if(s===-1)return null;try{return JSON.parse(n.substring(s))}catch{return null}}function n1(n){const r=(n.messages||[]).find(d=>d.role==="user");if(!r||!r.content)return"";let c;return Array.isArray(r.content)?c=r.content.find(h=>h.type==="text")?.text||"":c=r.content,c=c.replace(/\n/g," ").replace(/\s+/g," ").trim(),c.length>50?c.substring(0,47)+"...":c}function i1(n){const s=n.__verbose?.timings;if(s)return Math.round((s.prompt_ms||0)+(s.predicted_ms||0));const r=n.timings;return r?Math.round((r.prompt_ms||0)+(r.predicted_ms||0)):0}function u1(n){const s=[];let r=[],c=!1;const d=p=>(p.includes("log_server_r: request:")||p.includes("log_server_r: done request:"))&&!p.includes("{")&&/(?:done )?request: (POST|GET|PUT|DELETE)/.test(p),h=p=>{try{const g=p[0],E=p.join(`
12
+ `),j=cm(g,E),T=g.match(/(?:done )?request: (POST|GET|PUT|DELETE) (\/[^\s]+) ([^\s]+) (\d+)/);if(!T)return null;const[,Q,w,O,D]=T,K=p.find(te=>te.includes("log_server_r: request:")&&te.includes("{"));let Y="";if(K){const te=om(K);te&&(Y=n1(te))}const Z=p.find(te=>te.includes("log_server_r: response:"));let X=0,W=0,le=0;if(Z){const te=om(Z);te&&(X=te.usage?.prompt_tokens||0,W=te.usage?.completion_tokens||0,le=i1(te))}const G=`${j} ${Q} ${w} ${O} ${D} "${Y}" ${X} ${W} ${le}`,B=sm.some(te=>w===te);return{raw:p.join(`
13
+ `),formatted:G,timestamp:j,type:"request",isHealthCheck:B}}catch{return null}},y=p=>{try{const g=cm(p,p),E=p.match(/(?:done )?request: (POST|GET|PUT|DELETE) ([^\s]+) ([^\s]+) (\d+)/);if(!E)return null;const[,j,T,Q,w]=E,O=`${g} ${j} ${T} ${Q} ${w} "" 0 0 0`,D=sm.some(K=>T===K);return{raw:p,formatted:O,timestamp:g,type:"request",isHealthCheck:D}}catch{return null}},v=p=>{const g=p.trim();return g.toLowerCase().includes("error")||g.toLowerCase().includes("failed")||g.toLowerCase().includes("exception")||g.includes("ERR")||g.includes("FATAL")?{raw:p,type:"error"}:g.toLowerCase().includes("warn")||g.toLowerCase().includes("warning")||g.includes("WARN")?{raw:p,type:"warning"}:{raw:p,type:"system"}};for(const p of n)if(d(p)){if(c){const g=h(r);g&&s.push(g),r=[],c=!1}c=!0,r=[p]}else if(c){if(r.push(p),p.includes("log_server_r: response:")){const g=h(r);g&&s.push(g),r=[],c=!1}}else{const g=p.trim();g&&!g.includes("log_server_r")&&s.push(v(p))}if(c&&r.length===1){const p=y(r[0]);p&&s.push(p)}return s}function s1(){const{id:n}=Vp(),s=Il(),[r,c]=S.useState("all"),[d,h]=S.useState("newest"),[y,v]=S.useState(()=>{const se=localStorage.getItem("serverLogs.viewMode");return se==="raw"||se==="formatted"?se:"formatted"}),[p,g]=S.useState(!1),[E,j]=S.useState(!0),[T,Q]=S.useState(!1);S.useEffect(()=>{localStorage.setItem("serverLogs.viewMode",y)},[y]);const w=S.useRef(null),O=S.useRef(null),{data:D,isLoading:K}=Ux(n||""),{data:Y,isLoading:Z}=Qx(n||null,5e4),X=D?.server;S.useEffect(()=>{E&&w.current&&(w.current.scrollTop=w.current.scrollHeight)},[Y,E,d]),S.useEffect(()=>{const se=ge=>{O.current&&!O.current.contains(ge.target)&&g(!1)};return document.addEventListener("mousedown",se),()=>document.removeEventListener("mousedown",se)},[]);const W=()=>{if(!Y)return{logs:[],hasRawLogs:!1,formattedCount:0};const se=[...(Y.stderr||"").split(`
14
+ `),...(Y.stdout||"").split(`
15
+ `)].filter(_=>_.trim()),ge=u1(se),Je=se.length>0,Et=ge.filter(_=>_.formatted&&!_.isHealthCheck).length;let Ke=ge;return y==="formatted"&&(Ke=ge.filter(_=>_.formatted)),T||(Ke=Ke.filter(_=>!_.isHealthCheck)),r!=="all"&&(Ke=Ke.filter(_=>{switch(r){case"requests":return _.type==="request";case"errors":return _.type==="error";case"warnings":return _.type==="warning";case"system":return _.type==="system";default:return!0}})),d==="oldest"?{logs:Ke,hasRawLogs:Je,formattedCount:Et}:{logs:[...Ke].reverse(),hasRawLogs:Je,formattedCount:Et}},{logs:le,hasRawLogs:G,formattedCount:B}=W(),te=[{id:"all",label:"All"},{id:"requests",label:"Requests"},{id:"errors",label:"Errors"},{id:"warnings",label:"Warnings"},{id:"system",label:"System"}],_e=se=>{switch(se){case"request":return"text-blue-400";case"error":return"text-red-400";case"warning":return"text-yellow-400";default:return"text-gray-400"}};return K?o.jsx("div",{className:"max-w-6xl mx-auto px-4 py-12",children:o.jsx("p",{className:"text-gray-500 text-center",children:"Loading..."})}):X?o.jsxs("div",{className:"h-[calc(100vh-56px)] flex flex-col",children:[o.jsx("div",{className:"flex items-center px-4 py-3 border-b border-gray-200 bg-white",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:()=>s("/servers"),className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Tc,{className:"w-5 h-5"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:"Server Logs"}),o.jsxs("p",{className:"text-sm text-gray-500",children:[X.modelName.replace(".gguf","")," · Port ",X.port]})]})]})}),o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 bg-gray-50",children:[o.jsx("div",{className:"flex items-center gap-2",children:te.map(se=>o.jsx("button",{onClick:()=>c(se.id),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-colors cursor-pointer ${r===se.id?"bg-gray-900 text-white border-gray-900":"bg-white text-gray-600 border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,children:se.label},se.id))}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>Q(!T),className:`px-3 py-1.5 text-sm font-medium rounded-lg border transition-colors cursor-pointer ${T?"bg-blue-50 text-blue-700 border-blue-200":"bg-white text-gray-500 border-gray-200 hover:border-gray-300 hover:bg-gray-50"}`,title:"Show /health, /slots, /props requests (filtered by default)",children:"Health Checks"}),o.jsxs("div",{className:"flex items-center bg-white border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("button",{onClick:()=>v("formatted"),className:`px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${y==="formatted"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Formatted"}),o.jsx("button",{onClick:()=>v("raw"),className:`px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${y==="raw"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Raw"})]}),o.jsxs("div",{className:"relative",ref:O,children:[o.jsxs("button",{onClick:()=>g(!p),className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-gray-600 bg-white border border-gray-200 rounded-lg hover:border-gray-300 transition-colors cursor-pointer",children:[d==="newest"?"Newest":"Oldest",o.jsx(Qm,{className:"w-4 h-4"})]}),p&&o.jsxs("div",{className:"absolute right-0 top-full mt-1 w-32 bg-white border border-gray-200 rounded-lg shadow-lg z-10",children:[o.jsx("button",{onClick:()=>{h("newest"),g(!1)},className:`w-full text-left px-3 py-2 text-sm transition-colors cursor-pointer ${d==="newest"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Newest"}),o.jsx("button",{onClick:()=>{h("oldest"),g(!1)},className:`w-full text-left px-3 py-2 text-sm transition-colors cursor-pointer ${d==="oldest"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Oldest"})]})]})]})]}),o.jsx("div",{ref:w,className:"flex-1 overflow-y-auto bg-gray-900 p-4 font-mono text-sm",onScroll:se=>{const ge=se.target,Je=ge.scrollHeight-ge.scrollTop<=ge.clientHeight+50;j(Je)},children:Z?o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx(dt,{className:"w-6 h-6 animate-spin text-gray-400"})}):le.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500",children:[o.jsx(Vm,{className:"w-8 h-8 mb-2 opacity-50"}),o.jsxs("p",{children:["No ",y==="formatted"?"formatted ":"","logs found"]}),y==="formatted"&&G&&B===0?o.jsxs("p",{className:"text-sm mt-1",children:["No HTTP requests yet."," ",o.jsx("button",{onClick:()=>v("raw"),className:"text-blue-400 hover:text-blue-300 underline cursor-pointer",children:"View raw logs"})]}):r!=="all"?o.jsx("p",{className:"text-sm mt-1",children:"Try selecting a different filter"}):null]}):o.jsx("div",{className:"space-y-0.5",children:le.map((se,ge)=>o.jsx("div",{className:`${_e(se.type)} break-all whitespace-pre-wrap leading-relaxed`,children:y==="formatted"&&se.formatted?se.formatted:se.raw},ge))})}),o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-200 bg-gray-50 text-sm text-gray-500",children:[o.jsxs("span",{children:[le.length," ",le.length===1?"line":"lines",r!=="all"&&" (filtered)"]}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`w-2 h-2 rounded-full ${E?"bg-green-500":"bg-gray-300"}`}),E?"Auto-scroll on":"Auto-scroll off"]})]})]}):o.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[o.jsx("p",{className:"text-gray-500 text-center",children:"Server not found"}),o.jsx("div",{className:"text-center mt-4",children:o.jsx(sl,{to:"/servers",className:"text-sm text-blue-600 hover:text-blue-800",children:"Back to Servers"})})]})}function r1({isOpen:n,onClose:s,onDownloadComplete:r}){const[c,d]=S.useState("search"),[h,y]=S.useState(""),[v,p]=S.useState(null),[g,E]=S.useState(null),j=S.useRef(null),T=Kx(),Q=Gx(),{data:w,isLoading:O}=Xx(c==="files"&&v?v.modelId:null),{data:D}=Zx(g);S.useEffect(()=>{n&&c==="search"&&setTimeout(()=>j.current?.focus(),100)},[n,c]),S.useEffect(()=>{n||(d("search"),y(""),p(null),E(null),T.reset())},[n]),S.useEffect(()=>{D?.job?.status==="completed"?(r(),s()):D?.job?.status},[D?.job?.status,r,s]);const K=G=>{G.preventDefault(),h.trim()&&T.mutate({query:h.trim()})},Y=G=>{p(G),d("files")},Z=async G=>{if(v)try{const B=await Q.mutateAsync({repo:v.modelId,filename:G});E(B.jobId),d("downloading")}catch{}},X=()=>{c==="files"&&(d("search"),p(null))},W=G=>G>=1e6?`${(G/1e6).toFixed(1)}M`:G>=1e3?`${(G/1e3).toFixed(1)}K`:G.toString(),le=G=>G>=1e9?`${(G/1e9).toFixed(1)} GB`:G>=1e6?`${(G/1e6).toFixed(1)} MB`:`${(G/1e3).toFixed(1)} KB`;return n?o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-lg mx-4 max-h-[80vh] flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[c==="files"&&o.jsx("button",{onClick:X,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Tc,{className:"w-5 h-5"})}),o.jsxs("h2",{className:"text-lg font-semibold text-gray-900",children:[c==="search"&&"Pull Model",c==="files"&&v?.modelName,c==="downloading"&&"Downloading"]})]}),o.jsx("button",{onClick:s,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Jl,{className:"w-5 h-5"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[c==="search"&&o.jsxs("div",{className:"p-4",children:[o.jsx("form",{onSubmit:K,children:o.jsxs("div",{className:"relative",children:[o.jsx(Xm,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),o.jsx("input",{ref:j,type:"text",value:h,onChange:G=>y(G.target.value),placeholder:"Search Hugging Face models...",className:"w-full pl-10 pr-4 py-2.5 text-sm border border-gray-200 rounded-lg bg-gray-50 focus:bg-white focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"})]})}),o.jsxs("div",{className:"mt-4",children:[T.isPending&&o.jsx("div",{className:"flex items-center justify-center py-8",children:o.jsx(dt,{className:"w-6 h-6 animate-spin text-gray-400"})}),T.isError&&o.jsx("p",{className:"text-center py-8 text-red-600 text-sm",children:"Search failed. Please try again."}),T.isSuccess&&T.data.results.length===0&&o.jsxs("p",{className:"text-center py-8 text-gray-500 text-sm",children:['No GGUF models found for "',h,'"']}),T.isSuccess&&T.data.results.length>0&&o.jsx("div",{className:"space-y-1",children:T.data.results.map(G=>o.jsx("button",{onClick:()=>Y(G),className:"w-full text-left px-3 py-3 hover:bg-gray-50 rounded-lg transition-colors group cursor-pointer",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:G.modelName}),o.jsx("div",{className:"text-sm text-gray-500 truncate",children:G.author})]}),o.jsxs("div",{className:"flex items-center gap-3 ml-4",children:[o.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500",children:[o.jsx(In,{className:"w-3.5 h-3.5"}),W(G.downloads)]}),o.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500",children:[o.jsx(ox,{className:"w-3.5 h-3.5"}),W(G.likes)]}),o.jsx(Pv,{className:"w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})},G.modelId))}),!T.isPending&&!T.isSuccess&&o.jsx("p",{className:"text-center py-8 text-gray-500 text-sm",children:"Search for GGUF models on Hugging Face"})]})]}),c==="files"&&o.jsxs("div",{className:"p-4",children:[O&&o.jsx("div",{className:"flex items-center justify-center py-8",children:o.jsx(dt,{className:"w-6 h-6 animate-spin text-gray-400"})}),w&&w.files.length===0&&o.jsx("p",{className:"text-center py-8 text-gray-500 text-sm",children:"No GGUF files found in this repository"}),w&&w.files.length>0&&o.jsx("div",{className:"space-y-1",children:w.files.map(G=>o.jsx("button",{onClick:()=>Z(G),disabled:Q.isPending,className:"w-full text-left px-3 py-3 hover:bg-gray-50 rounded-lg transition-colors group disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[o.jsx(wc,{className:"w-4 h-4 text-gray-400 flex-shrink-0"}),o.jsx("span",{className:"text-sm text-gray-900 truncate",children:G})]}),o.jsx(In,{className:"w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0 ml-2"})]})},G))})]}),c==="downloading"&&o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"text-center",children:D?.job?.status==="failed"?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-red-100 flex items-center justify-center",children:o.jsx(Jl,{className:"w-6 h-6 text-red-600"})}),o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Download Failed"}),o.jsx("p",{className:"text-sm text-gray-500 mb-4",children:D.job.error}),o.jsx("button",{onClick:X,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg transition-colors cursor-pointer",children:"Try Again"})]}):o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-12 h-12 mx-auto mb-4 animate-spin text-gray-400"}),o.jsx("h3",{className:"font-medium text-gray-900 mb-1",children:D?.job?.filename||"Starting download..."}),D?.job?.progress&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 mb-2",children:o.jsx("div",{className:"bg-gray-900 h-2 rounded-full transition-all duration-300",style:{width:`${D.job.progress.percentage}%`}})}),o.jsxs("p",{className:"text-sm text-gray-500",children:[le(D.job.progress.downloaded)," / ",le(D.job.progress.total)," · ",D.job.progress.speed]})]}),!D?.job?.progress&&o.jsx("p",{className:"text-sm text-gray-500",children:"Connecting..."})]})})})]})]})}):null}function c1(){const{data:n}=Jm(!0),s=Vx(),c=(n?.jobs||[]).filter(h=>h.status==="pending"||h.status==="downloading");if(c.length===0)return null;const d=h=>{s.mutate(h)};return o.jsx("div",{className:"fixed bottom-4 right-4 z-40 w-80",children:o.jsxs("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200 overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-2.5 bg-gray-50 border-b border-gray-200 flex items-center gap-2",children:[o.jsx(In,{className:"w-4 h-4 text-gray-600"}),o.jsxs("span",{className:"text-sm font-medium text-gray-700",children:[c.length," download",c.length!==1?"s":""," in progress"]})]}),o.jsx("div",{className:"max-h-60 overflow-y-auto divide-y divide-gray-100",children:c.map(h=>o.jsx(o1,{job:h,onCancel:()=>d(h.id)},h.id))})]})})}function o1({job:n,onCancel:s}){const r=d=>d>=1e9?`${(d/1e9).toFixed(1)} GB`:d>=1e6?`${(d/1e6).toFixed(1)} MB`:`${(d/1e3).toFixed(1)} KB`,c=()=>{switch(n.status){case"completed":return o.jsx(tx,{className:"w-4 h-4 text-green-500"});case"failed":case"cancelled":return o.jsx(Ym,{className:"w-4 h-4 text-red-500"});default:return o.jsx(dt,{className:"w-4 h-4 text-gray-400 animate-spin"})}};return o.jsxs("div",{className:"px-4 py-3",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1",children:[o.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[c(),o.jsx("span",{className:"text-sm font-medium text-gray-900 truncate",children:n.filename})]}),(n.status==="pending"||n.status==="downloading")&&o.jsx("button",{onClick:s,className:"p-1 hover:bg-gray-100 rounded transition-colors cursor-pointer",title:"Cancel download",children:o.jsx(Jl,{className:"w-4 h-4 text-gray-400"})})]}),n.progress&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1.5 mb-1",children:o.jsx("div",{className:"bg-gray-700 h-1.5 rounded-full transition-all duration-300",style:{width:`${n.progress.percentage}%`}})}),o.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[o.jsxs("span",{children:[r(n.progress.downloaded)," / ",r(n.progress.total)]}),o.jsx("span",{children:n.progress.speed})]})]}),n.status==="pending"&&!n.progress&&o.jsx("p",{className:"text-xs text-gray-500",children:"Starting..."}),n.status==="failed"&&n.error&&o.jsx("p",{className:"text-xs text-red-500 truncate",children:n.error}),n.status==="cancelled"&&o.jsx("p",{className:"text-xs text-gray-500",children:"Cancelled"})]})}function f1({searchQuery:n=""}){const s=nt(),{data:r,isLoading:c}=km(),d=Yx(),{data:h}=Jm(!0),[y,v]=S.useState(null),[p,g]=S.useState(!1),[E,j]=S.useState("all"),T=(h?.jobs||[]).some(X=>X.status==="pending"||X.status==="downloading"),Q=()=>{s.invalidateQueries({queryKey:["models"]})},w=r?.models||[],O=S.useMemo(()=>{let X=w;if(n){const W=n.toLowerCase();X=X.filter(le=>le.filename.toLowerCase().includes(W))}return E==="active"?X=X.filter(W=>W.serversUsing>0):E==="inactive"&&(X=X.filter(W=>W.serversUsing===0)),X},[w,n,E]),D=async(X,W)=>{if(W>0){if(!confirm(`Model "${X}" is used by ${W} server(s). Delete the model AND all associated servers?`))return}else if(!confirm(`Delete model "${X}"? This cannot be undone.`))return;v(X);try{await d.mutateAsync({name:X,cascade:W>0})}finally{v(null)}},K=X=>X>=1e9?`${(X/1e9).toFixed(1)} GB`:X>=1e6?`${(X/1e6).toFixed(1)} MB`:`${(X/1e3).toFixed(1)} KB`,Y=X=>{const W=typeof X=="string"?new Date(X):X,G=new Date().getTime()-W.getTime(),B=Math.floor(G/(1e3*60*60*24));return B===0?"Today":B===1?"Yesterday":B<7?`${B}d ago`:B<30?`${Math.floor(B/7)}w ago`:W.toLocaleDateString("en-US",{month:"short",day:"numeric"})};if(c)return o.jsx("div",{className:"max-w-7xl mx-auto px-6 py-12",children:o.jsx("p",{className:"text-neutral-500 text-center",children:"Loading..."})});const Z=w.filter(X=>X.serversUsing>0);return o.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[o.jsxs("div",{className:"flex items-center justify-between mb-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold text-neutral-900 tracking-tight",children:"Models"}),o.jsxs("p",{className:"text-sm text-neutral-600 mt-1",children:[w.length," model",w.length!==1?"s":""," available",Z.length>0&&` • ${Z.length} active`]})]}),o.jsxs("button",{onClick:()=>g(!0),className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-neutral-900 hover:bg-neutral-800 rounded-md transition-colors cursor-pointer",children:[o.jsx(In,{className:"w-4 h-4"}),"Pull Model"]})]}),o.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[o.jsx("button",{onClick:()=>j("all"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${E==="all"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"All"}),o.jsx("button",{onClick:()=>j("active"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${E==="active"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"Active"}),o.jsx("button",{onClick:()=>j("inactive"),className:`px-3 py-1.5 text-sm font-medium rounded-full border transition-all cursor-pointer ${E==="inactive"?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-300"}`,children:"Inactive"})]}),O.length===0?o.jsx("div",{className:"text-center py-16 bg-white border border-neutral-200 rounded-lg",children:n?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-neutral-600 text-base mb-2",children:['No models matching "',n,'"']}),o.jsx("p",{className:"text-sm text-neutral-500",children:"Try a different search term"})]}):E!=="all"&&w.length>0?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-neutral-600 text-base mb-2",children:["No ",E," models"]}),o.jsx("p",{className:"text-sm text-neutral-500",children:"Try a different filter"})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-neutral-600 text-base mb-2",children:"No models found"}),o.jsx("p",{className:"text-sm text-neutral-500 mb-6",children:"Download models from Hugging Face to get started"}),o.jsxs("button",{onClick:()=>g(!0),className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-neutral-900 hover:bg-neutral-800 rounded-md transition-colors cursor-pointer",children:[o.jsx(In,{className:"w-4 h-4"}),"Pull Model"]})]})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:O.map(X=>o.jsxs("div",{className:"group bg-white border border-neutral-200 rounded-lg p-5 hover:border-neutral-300 hover:shadow-sm transition-all",children:[o.jsx("div",{className:"flex items-start justify-between mb-4",children:o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-base font-semibold text-neutral-900 truncate mb-2",children:X.filename.replace(".gguf","")}),o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[X.serversUsing>0&&o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-md border border-green-200/50 bg-green-50 text-xs font-medium text-green-700",children:"active"}),o.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-md border border-neutral-200 bg-neutral-50 text-xs font-medium text-neutral-600",children:"gguf"})]})]})}),o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(wc,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsx("span",{children:K(X.size)})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(Nx,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsxs("span",{children:[X.serversUsing," server",X.serversUsing!==1?"s":""]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx(lx,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsx("span",{children:Y(X.modified)})]})]}),o.jsx("button",{onClick:()=>D(X.filename,X.serversUsing),disabled:y===X.filename,className:"w-full flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-red-600 hover:bg-red-50 rounded-md transition-colors opacity-0 group-hover:opacity-100 disabled:opacity-100 cursor-pointer disabled:cursor-wait",children:y===X.filename?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-3.5 h-3.5 animate-spin"}),"Deleting"]}):o.jsxs(o.Fragment,{children:[o.jsx(Vm,{className:"w-3.5 h-3.5"}),"Delete"]})})]},X.filename))}),o.jsx(r1,{isOpen:p,onClose:()=>g(!1),onDownloadComplete:Q}),T&&o.jsx(c1,{})]})}function d1({router:n,isOpen:s,onClose:r}){const c=Px(),[d,h]=S.useState({port:9100,host:"127.0.0.1",verbose:!1,requestTimeout:12e4,healthCheckInterval:5e3}),[y,v]=S.useState(!0),[p,g]=S.useState(null);S.useEffect(()=>{n?.config&&(h({port:n.config.port,host:n.config.host,verbose:n.config.verbose,requestTimeout:n.config.requestTimeout,healthCheckInterval:n.config.healthCheckInterval}),g(null))},[n]);const E=async j=>{if(j.preventDefault(),!!n){g(null);try{if((await c.mutateAsync({port:d.port,host:d.host,verbose:d.verbose,requestTimeout:d.requestTimeout,healthCheckInterval:d.healthCheckInterval})).needsRestart&&n.isRunning&&!y){g("Changes saved. Restart the router to apply them.");return}r()}catch(T){g(T.message)}}};return!s||!n?null:o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-md mx-4 max-h-[90vh] flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-200",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Configure Router"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Unified model routing service"})]}),o.jsx("button",{onClick:r,className:"p-1 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Jl,{className:"w-5 h-5"})})]}),o.jsxs("form",{onSubmit:E,className:"flex-1 overflow-y-auto p-4 space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:d.port,onChange:j=>h({...d,port:parseInt(j.target.value)||9100}),min:1024,max:65535,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Router service port (requires restart)"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Host"}),o.jsxs("select",{value:d.host,onChange:j=>h({...d,host:j.target.value}),className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent bg-white",children:[o.jsx("option",{value:"127.0.0.1",children:"127.0.0.1 (localhost only)"}),o.jsx("option",{value:"0.0.0.0",children:"0.0.0.0 (all interfaces)"})]}),o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Network interface (requires restart)"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Request Timeout"}),o.jsx("input",{type:"number",value:d.requestTimeout/1e3,onChange:j=>h({...d,requestTimeout:(parseInt(j.target.value)||120)*1e3}),min:10,max:600,step:10,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[d.requestTimeout/1e3,"s - Maximum time to wait for backend responses"]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Health Check Interval"}),o.jsx("input",{type:"number",value:d.healthCheckInterval/1e3,onChange:j=>h({...d,healthCheckInterval:(parseInt(j.target.value)||5)*1e3}),min:1,max:60,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-gray-200 focus:border-transparent"}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[d.healthCheckInterval/1e3,"s - How often to check backend server health"]})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Verbose Logging"}),o.jsx("p",{className:"text-xs text-gray-500",children:"Log detailed request information"})]}),o.jsx("button",{type:"button",onClick:()=>h({...d,verbose:!d.verbose}),className:`relative w-11 h-6 rounded-full transition-colors cursor-pointer ${d.verbose?"bg-gray-900":"bg-gray-200"}`,children:o.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${d.verbose?"translate-x-5":""}`})})]}),n.isRunning&&o.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-gray-100",children:[o.jsx("input",{type:"checkbox",id:"restartAfterSave",checked:y,onChange:j=>v(j.target.checked),className:"w-4 h-4 text-gray-900 border-gray-300 rounded focus:ring-gray-200"}),o.jsx("label",{htmlFor:"restartAfterSave",className:"text-sm text-gray-700",children:"Restart router to apply changes"})]}),p&&o.jsx("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:o.jsx("p",{className:"text-sm text-red-700",children:p})})]}),o.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-200",children:[o.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:"Cancel"}),o.jsx("button",{onClick:E,disabled:c.isPending,className:"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-gray-900 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-wait cursor-pointer",children:c.isPending?o.jsxs(o.Fragment,{children:[o.jsx(dt,{className:"w-4 h-4 animate-spin"}),"Saving..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Km,{className:"w-4 h-4"}),"Save Changes"]})})]})]})})}function h1(){const n=Il(),s=nt(),{data:r,isLoading:c}=kx(),d=Jx(),h=Fx(),y=$x(),[v,p]=S.useState(null),[g,E]=S.useState(!1),j=async()=>{p("start");try{await d.mutateAsync(),await s.refetchQueries({queryKey:["router"]})}finally{p(null)}},T=async()=>{p("stop");try{await h.mutateAsync(),await s.refetchQueries({queryKey:["router"]})}finally{p(null)}},Q=async()=>{p("restart");try{await y.mutateAsync(),await s.refetchQueries({queryKey:["router"]})}finally{p(null)}};if(c&&!r)return o.jsx("div",{className:"max-w-7xl mx-auto px-6 py-12",children:o.jsx("p",{className:"text-neutral-500 text-center",children:"Loading..."})});const w=r,O=w?.isRunning||!1,D=w?.status==="not_configured",K=()=>v?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-700",children:[o.jsx(dt,{className:"w-3 h-3 animate-spin"}),v==="start"&&"Starting",v==="stop"&&"Stopping",v==="restart"&&"Restarting"]}):D?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-600",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-neutral-400"}),"Not Configured"]}):O?o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-green-50 text-green-700 border border-green-200/50",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),"Running"]}):o.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-neutral-100 text-neutral-600",children:[o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-neutral-400"}),"Stopped"]});return o.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[o.jsx("div",{className:"flex items-center justify-between mb-8",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold text-neutral-900 tracking-tight",children:"Router"}),o.jsx("p",{className:"text-sm text-neutral-600 mt-1",children:"Unified API endpoint for model routing"})]})}),o.jsxs("div",{className:"bg-white border border-neutral-200 rounded-lg p-5 hover:border-neutral-300 hover:shadow-sm transition-all",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-50 flex items-center justify-center",children:o.jsx(Tx,{className:"w-5 h-5 text-blue-600"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h3",{className:"text-base font-semibold text-neutral-900 mb-1",children:"Router Service"}),o.jsx("p",{className:"text-sm text-neutral-500",children:D?"Not yet configured":`localhost:${w?.config?.port||"N/A"}`})]})]}),K()]}),!D&&w?.config&&o.jsxs("div",{className:"space-y-2 mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx("span",{className:"text-neutral-400",children:"Host:"}),o.jsx("span",{children:w.config.host})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx("span",{className:"text-neutral-400",children:"Request Timeout:"}),o.jsxs("span",{children:[(w.config.requestTimeout/1e3).toFixed(0),"s"]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-xs text-neutral-600",children:[o.jsx("span",{className:"text-neutral-400",children:"Verbose Logs:"}),o.jsx("span",{children:w.config.verbose?"Enabled":"Disabled"})]})]}),!D&&w&&o.jsxs("div",{className:"mb-4 pt-4 border-t border-neutral-200",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Jv,{className:"w-3.5 h-3.5 text-neutral-400"}),o.jsx("h4",{className:"text-xs font-semibold text-neutral-900",children:"Available Models"})]}),w.availableModels.length>0?o.jsx("div",{className:"flex flex-wrap gap-2",children:w.availableModels.map(Y=>o.jsx("span",{className:"inline-flex items-center px-2 py-1 text-xs font-medium text-neutral-700 bg-neutral-100 rounded-md",children:Y.replace(".gguf","")},Y))}):o.jsx("p",{className:"text-xs text-neutral-500",children:"No models available. Start some servers to enable routing."})]}),D&&o.jsx("div",{className:"mb-4 pt-4 border-t border-neutral-200",children:o.jsx("p",{className:"text-sm text-neutral-600 mb-3",children:'Click "Start" to configure and launch the router service. The router will automatically discover and route requests to running servers.'})}),o.jsxs("div",{className:"flex items-center gap-1 opacity-100 transition-opacity pt-4 border-t border-neutral-200",children:[!D&&O&&o.jsxs("button",{onClick:()=>n("/router/logs"),disabled:v!==null,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"View Logs",children:[o.jsx(oc,{className:"w-3.5 h-3.5"}),"Logs"]}),!D&&o.jsxs("button",{onClick:()=>E(!0),disabled:v!==null,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-wait",title:"Config",children:[o.jsx(dc,{className:"w-3.5 h-3.5"}),"Config"]}),!D&&O&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:Q,disabled:v!==null,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-neutral-900 hover:bg-neutral-50 rounded-md transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",title:"Restart",children:[o.jsx(xx,{className:"w-3.5 h-3.5"}),"Restart"]}),o.jsxs("button",{onClick:T,disabled:v!==null,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-red-600 hover:bg-red-50 rounded-md transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",title:"Stop",children:[o.jsx(Zm,{className:"w-3.5 h-3.5"}),"Stop"]})]}),(D||!O)&&o.jsxs("button",{onClick:j,disabled:v!==null,className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-xs font-medium text-neutral-600 hover:text-green-600 hover:bg-green-50 rounded-md transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-wait",title:"Start",children:[o.jsx(Gm,{className:"w-3.5 h-3.5"}),"Start"]})]})]}),o.jsx(d1,{router:w||null,isOpen:g,onClose:()=>E(!1)})]})}function m1(){const n=Il(),[s,r]=S.useState("stdout"),[c,d]=S.useState("newest"),[h,y]=S.useState(!1),[v,p]=S.useState(!0),g=S.useRef(null),E=S.useRef(null),{data:j,isLoading:T}=Wx(5e4);S.useEffect(()=>{v&&g.current&&(g.current.scrollTop=g.current.scrollHeight)},[j,v,c]),S.useEffect(()=>{const O=D=>{E.current&&!E.current.contains(D.target)&&y(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const w=(()=>{if(!j)return[];let O;if(s==="stdout")O=j.stdout||"";else if(s==="stderr")O=j.stderr||"";else{const K=j.stdout||"";O=[j.stderr||"",K].filter(Z=>Z.trim()).join(`
16
+ `)}const D=O.split(`
17
+ `).filter(K=>K.trim());return c==="oldest"?D:[...D].reverse()})();return o.jsxs("div",{className:"h-[calc(100vh-56px)] flex flex-col",children:[o.jsx("div",{className:"flex items-center px-4 py-3 border-b border-gray-200 bg-white",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:()=>n("/router"),className:"p-1.5 text-gray-500 hover:text-gray-700 hover:bg-gray-100 rounded-lg transition-colors cursor-pointer",children:o.jsx(Tc,{className:"w-5 h-5"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:"Router Logs"}),o.jsx("p",{className:"text-sm text-gray-500",children:"Unified model routing service"})]})]})}),o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-100 bg-gray-50",children:[o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"flex items-center bg-white border border-gray-200 rounded-lg overflow-hidden",children:[o.jsx("button",{onClick:()=>r("stdout"),className:`px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${s==="stdout"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Activity"}),o.jsx("button",{onClick:()=>r("stderr"),className:`px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${s==="stderr"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"System"}),o.jsx("button",{onClick:()=>r("both"),className:`px-3 py-1.5 text-sm font-medium transition-colors cursor-pointer ${s==="both"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Both"})]})}),o.jsxs("div",{className:"relative",ref:E,children:[o.jsxs("button",{onClick:()=>y(!h),className:"flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-gray-600 bg-white border border-gray-200 rounded-lg hover:border-gray-300 transition-colors cursor-pointer",children:[c==="newest"?"Newest":"Oldest",o.jsx(Qm,{className:"w-4 h-4"})]}),h&&o.jsxs("div",{className:"absolute right-0 top-full mt-1 w-32 bg-white border border-gray-200 rounded-lg shadow-lg z-10",children:[o.jsx("button",{onClick:()=>{d("newest"),y(!1)},className:`w-full text-left px-3 py-2 text-sm transition-colors cursor-pointer ${c==="newest"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Newest"}),o.jsx("button",{onClick:()=>{d("oldest"),y(!1)},className:`w-full text-left px-3 py-2 text-sm transition-colors cursor-pointer ${c==="oldest"?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-50"}`,children:"Oldest"})]})]})]}),o.jsx("div",{ref:g,className:"flex-1 overflow-y-auto bg-gray-900 p-4 font-mono text-sm",onScroll:O=>{const D=O.target,K=D.scrollHeight-D.scrollTop<=D.clientHeight+50;p(K)},children:T?o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx(dt,{className:"w-6 h-6 animate-spin text-gray-400"})}):w.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500",children:[o.jsx("p",{children:"No logs found"}),o.jsx("p",{className:"text-sm mt-1",children:"Router may not be running or has no activity yet"})]}):o.jsx("div",{className:"space-y-0.5",children:w.map((O,D)=>o.jsx("div",{className:"text-gray-300 break-all whitespace-pre-wrap leading-relaxed",children:O},D))})}),o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-t border-gray-200 bg-gray-50 text-sm text-gray-500",children:[o.jsxs("span",{children:[w.length," ",w.length===1?"line":"lines"]}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`w-2 h-2 rounded-full ${v?"bg-green-500":"bg-gray-300"}`}),v?"Auto-scroll on":"Auto-scroll off"]})]})]})}const y1=new Wg({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function g1({onLogout:n}){const[s,r]=S.useState(""),d=Vt().pathname==="/models";return o.jsxs("div",{className:"min-h-screen bg-neutral-50",children:[o.jsx(zx,{onLogout:n,searchQuery:d?s:void 0,onSearchChange:d?r:void 0}),o.jsxs(rv,{children:[o.jsx(il,{path:"/",element:o.jsx(uv,{to:"/servers",replace:!0})}),o.jsx(il,{path:"/servers",element:o.jsx(a1,{})}),o.jsx(il,{path:"/servers/:id/logs",element:o.jsx(s1,{})}),o.jsx(il,{path:"/models",element:o.jsx(f1,{searchQuery:s})}),o.jsx(il,{path:"/router",element:o.jsx(h1,{})}),o.jsx(il,{path:"/router/logs",element:o.jsx(m1,{})})]})]})}function p1(){const[n,s]=S.useState(null);return S.useEffect(()=>{!!Ce.getApiKey()?Ce.getSystemStatus().then(()=>s(!0)).catch(()=>{Ce.clearApiKey(),s(!1)}):s(!1)},[]),n===null?o.jsx("div",{className:"min-h-screen bg-neutral-50 flex items-center justify-center",children:o.jsx("div",{className:"text-neutral-400",children:"Loading..."})}):n?o.jsx(Pg,{client:y1,children:o.jsx(zv,{children:o.jsx(g1,{onLogout:()=>s(!1)})})}):o.jsx(_x,{onAuthenticated:()=>s(!0)})}wg.createRoot(document.getElementById("root")).render(o.jsx(S.StrictMode,{children:o.jsx(p1,{})}));