@roackb2/heddle 0.0.29 → 0.0.31

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 (93) hide show
  1. package/README.md +39 -22
  2. package/dist/src/cli/main.js +12 -1
  3. package/dist/src/cli/main.js.map +1 -1
  4. package/dist/src/cli/remote/control-plane-client.d.ts +33 -0
  5. package/dist/src/cli/remote/control-plane-client.d.ts.map +1 -1
  6. package/dist/src/core/agent/run-agent.d.ts +1 -0
  7. package/dist/src/core/agent/run-agent.d.ts.map +1 -1
  8. package/dist/src/core/agent/run-agent.js +4 -0
  9. package/dist/src/core/agent/run-agent.js.map +1 -1
  10. package/dist/src/core/agent/tool-dispatch.d.ts +2 -0
  11. package/dist/src/core/agent/tool-dispatch.d.ts.map +1 -1
  12. package/dist/src/core/agent/tool-dispatch.js +8 -7
  13. package/dist/src/core/agent/tool-dispatch.js.map +1 -1
  14. package/dist/src/core/memory/maintenance-integration.js +1 -1
  15. package/dist/src/core/memory/maintenance-integration.js.map +1 -1
  16. package/dist/src/core/review/diff-domain.d.ts +24 -0
  17. package/dist/src/core/review/diff-domain.d.ts.map +1 -0
  18. package/dist/src/core/review/diff-domain.js +134 -0
  19. package/dist/src/core/review/diff-domain.js.map +1 -0
  20. package/dist/src/core/runtime/agent-loop.d.ts.map +1 -1
  21. package/dist/src/core/runtime/agent-loop.js +1 -0
  22. package/dist/src/core/runtime/agent-loop.js.map +1 -1
  23. package/dist/src/core/runtime/daemon-registry.d.ts +6 -1
  24. package/dist/src/core/runtime/daemon-registry.d.ts.map +1 -1
  25. package/dist/src/core/runtime/daemon-registry.js +32 -5
  26. package/dist/src/core/runtime/daemon-registry.js.map +1 -1
  27. package/dist/src/core/runtime/default-tools.d.ts.map +1 -1
  28. package/dist/src/core/runtime/default-tools.js +11 -9
  29. package/dist/src/core/runtime/default-tools.js.map +1 -1
  30. package/dist/src/core/runtime/runtime-hosts.js +1 -1
  31. package/dist/src/core/runtime/runtime-hosts.js.map +1 -1
  32. package/dist/src/core/runtime/workspaces.d.ts +7 -0
  33. package/dist/src/core/runtime/workspaces.d.ts.map +1 -1
  34. package/dist/src/core/runtime/workspaces.js +31 -2
  35. package/dist/src/core/runtime/workspaces.js.map +1 -1
  36. package/dist/src/core/tools/edit-file.d.ts +4 -0
  37. package/dist/src/core/tools/edit-file.d.ts.map +1 -1
  38. package/dist/src/core/tools/edit-file.js +48 -43
  39. package/dist/src/core/tools/edit-file.js.map +1 -1
  40. package/dist/src/core/tools/list-files.d.ts +4 -0
  41. package/dist/src/core/tools/list-files.d.ts.map +1 -1
  42. package/dist/src/core/tools/list-files.js +34 -29
  43. package/dist/src/core/tools/list-files.js.map +1 -1
  44. package/dist/src/core/tools/read-file.d.ts +4 -0
  45. package/dist/src/core/tools/read-file.d.ts.map +1 -1
  46. package/dist/src/core/tools/read-file.js +50 -45
  47. package/dist/src/core/tools/read-file.js.map +1 -1
  48. package/dist/src/core/tools/run-shell.d.ts +2 -0
  49. package/dist/src/core/tools/run-shell.d.ts.map +1 -1
  50. package/dist/src/core/tools/run-shell.js +3 -0
  51. package/dist/src/core/tools/run-shell.js.map +1 -1
  52. package/dist/src/core/tools/search-files.d.ts +1 -0
  53. package/dist/src/core/tools/search-files.d.ts.map +1 -1
  54. package/dist/src/core/tools/search-files.js +4 -2
  55. package/dist/src/core/tools/search-files.js.map +1 -1
  56. package/dist/src/core/tools/view-image.d.ts +1 -0
  57. package/dist/src/core/tools/view-image.d.ts.map +1 -1
  58. package/dist/src/core/tools/view-image.js +2 -1
  59. package/dist/src/core/tools/view-image.js.map +1 -1
  60. package/dist/src/server/app.d.ts.map +1 -1
  61. package/dist/src/server/app.js +1 -1
  62. package/dist/src/server/app.js.map +1 -1
  63. package/dist/src/server/features/control-plane/router.d.ts +35 -1
  64. package/dist/src/server/features/control-plane/router.d.ts.map +1 -1
  65. package/dist/src/server/features/control-plane/router.js +51 -2
  66. package/dist/src/server/features/control-plane/router.js.map +1 -1
  67. package/dist/src/server/features/control-plane/services/chat-sessions.d.ts.map +1 -1
  68. package/dist/src/server/features/control-plane/services/chat-sessions.js +68 -0
  69. package/dist/src/server/features/control-plane/services/chat-sessions.js.map +1 -1
  70. package/dist/src/server/features/control-plane/services/control-plane-state.d.ts.map +1 -1
  71. package/dist/src/server/features/control-plane/services/control-plane-state.js +22 -0
  72. package/dist/src/server/features/control-plane/services/control-plane-state.js.map +1 -1
  73. package/dist/src/server/features/control-plane/services/workspace-diff.d.ts +4 -0
  74. package/dist/src/server/features/control-plane/services/workspace-diff.d.ts.map +1 -0
  75. package/dist/src/server/features/control-plane/services/workspace-diff.js +258 -0
  76. package/dist/src/server/features/control-plane/services/workspace-diff.js.map +1 -0
  77. package/dist/src/server/features/control-plane/services/workspace-files.d.ts +18 -0
  78. package/dist/src/server/features/control-plane/services/workspace-files.d.ts.map +1 -1
  79. package/dist/src/server/features/control-plane/services/workspace-files.js +68 -2
  80. package/dist/src/server/features/control-plane/services/workspace-files.js.map +1 -1
  81. package/dist/src/server/features/control-plane/types.d.ts +36 -0
  82. package/dist/src/server/features/control-plane/types.d.ts.map +1 -1
  83. package/dist/src/server/index.d.ts.map +1 -1
  84. package/dist/src/server/index.js +1 -0
  85. package/dist/src/server/index.js.map +1 -1
  86. package/dist/src/server/router.d.ts +33 -0
  87. package/dist/src/server/router.d.ts.map +1 -1
  88. package/dist/src/web/assets/index-CAWhKnGd.css +2 -0
  89. package/dist/src/web/assets/index-D35_IzEn.js +55 -0
  90. package/dist/src/web/index.html +2 -2
  91. package/package.json +11 -1
  92. package/dist/src/web/assets/index-BCCIDJRN.js +0 -52
  93. package/dist/src/web/assets/index-DarVaee6.css +0 -2
@@ -0,0 +1,55 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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&&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)},F={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function I(e){return{current:e}}function L(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function R(e,t){ie++,re[ie]=e.current,e.current=t}var ae=I(null),oe=I(null),se=I(null),ce=I(null);function le(e,t){switch(R(se,t),R(oe,e),R(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}L(ae),R(ae,e)}function ue(){L(ae),L(oe),L(se)}function de(e){e.memoizedState!==null&&R(ce,e);var t=ae.current,n=Ud(t,e.type);t!==n&&(R(oe,e),R(ae,n))}function fe(e){oe.current===e&&(L(ae),L(oe)),ce.current===e&&(L(ce),$f._currentValue=ne)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+pe+e+me}var ge=!1;function _e(e,t){if(!e||ge)return``;ge=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(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 Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(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 Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Le(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Qe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Qe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Le(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function $e(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Le(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function et(e,t){var n=t&-t;return n=n&42?1:tt(n),(n&(e.suspendedLanes|t))===0?n:0}function tt(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 nt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function it(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var at=Math.random().toString(36).slice(2),ot=`__reactFiber$`+at,st=`__reactProps$`+at,ct=`__reactContainer$`+at,lt=`__reactEvents$`+at,ut=`__reactListeners$`+at,dt=`__reactHandles$`+at,ft=`__reactResources$`+at,pt=`__reactMarker$`+at;function mt(e){delete e[ot],delete e[st],delete e[lt],delete e[ut],delete e[dt]}function ht(e){var t=e[ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ct]||n[ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[ot])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function gt(e){if(e=e[ot]||e[ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _t(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function vt(e){var t=e[ft];return t||=e[ft]={hoistableStyles:new Map,hoistableScripts:new Map},t}function yt(e){e[pt]=!0}var bt=new Set,xt={};function St(e,t){Ct(e,t),Ct(e+`Capture`,t)}function Ct(e,t){for(xt[e]=t,e=0;e<t.length;e++)bt.add(t[e])}var wt=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]*$`),Tt={},Et={};function Dt(e){return be.call(Et,e)?!0:be.call(Tt,e)?!1:wt.test(e)?Et[e]=!0:(Tt[e]=!0,!1)}function Ot(e,t,n){if(Dt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function At(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function Rt(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Vt(e,o,jt(n)):Vt(e,o,jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+jt(s):e.removeAttribute(`name`)}function Bt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Pt(e)}function Vt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ht(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ut(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=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 qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(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 Xt=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`]]),Zt=/^[\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 Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=gt(e);if(t&&(e=t.stateNode)){var n=e[st]||null;a:switch(e=t.stateNode,t.type){case`input`:if(zt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Rt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[st]||null;if(!a)throw Error(i(90));zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ft(r)}break a;case`textarea`:Ut(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ht(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(yu(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[st]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=h({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(h({},Dn,{dataTransfer:0})),An=yn(h({},Sn,{relatedTarget:0})),jn=yn(h({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(h({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(h({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(h({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(h({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(h({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(h({},Dn,{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})),Wn=yn(h({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Ed(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){yd(e,0)}function lr(e){if(Ft(_t(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!be.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=It(e.document)}return t}function Or(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 kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==It(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Ed(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`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(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),St(t,[e])}var Xr=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&&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)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ii(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Le(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ai(e){if(50<uu)throw uu=0,du=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function si(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(e,t,n,r){return new si(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ui(e,t){var n=e.alternate;return n===null?(n=ci(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function di(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)li(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=ci(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return pi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ci(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ci(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ci(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ci(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=ci(7,e,r,t),e.lanes=n,e}function mi(e,t,n){return e=ci(6,e,null,t),e.lanes=n,e}function hi(e){var t=ci(18,null,null,0);return t.stateNode=e,t}function gi(e,t,n){return t=ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _i=new WeakMap;function vi(e,t){if(typeof e==`object`&&e){var n=_i.get(e);return n===void 0?(t={value:e,source:t,stack:ye(t)},_i.set(e,t),t):n}return{value:e,source:t,stack:ye(t)}}var yi=[],bi=0,xi=null,Si=0,Ci=[],z=0,wi=null,Ti=1,Ei=``;function Di(e,t){yi[bi++]=Si,yi[bi++]=xi,xi=e,Si=t}function Oi(e,t,n){Ci[z++]=Ti,Ci[z++]=Ei,Ci[z++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Le(r)-1;r&=~(1<<i),n+=1;var a=32-Le(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Le(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===xi;)xi=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null;for(;e===wi;)wi=Ci[--z],Ci[z]=null,Ei=Ci[--z],Ci[z]=null,Ti=Ci[--z],Ci[z]=null}function ji(e,t){Ci[z++]=Ti,Ci[z++]=Ei,Ci[z++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,B=!1,Pi=null,Fi=!1,Ii=Error(i(519));function Li(e){throw Ui(vi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ii}function Ri(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ot]=e,t[st]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Wt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Li(e,!0)}function zi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Fi=!1;return;case 27:case 3:Fi=!0;return;default:Mi=Mi.return}}function Bi(e){if(e!==Mi)return!1;if(!B)return zi(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&Ni&&Li(e),zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=df(e)}else t===27?(t=Ni,Qd(e.type)?(e=uf,uf=null,Ni=e):Ni=t):Ni=Mi?lf(e.stateNode.nextSibling):null;return!0}function Vi(){Ni=Mi=null,B=!1}function Hi(){var e=Pi;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Pi=null),e}function Ui(e){Pi===null?Pi=[e]:Pi.push(e)}var Wi=I(null),Gi=null,Ki=null;function qi(e,t,n){R(Wi,t._currentValue),t._currentValue=n}function Ji(e){e._currentValue=Wi.current,L(Wi)}function Yi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Xi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Yi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Yi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Zi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ce.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&Xi(t,e,n,r),t.flags|=262144}function Qi(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Gi=e,Ki=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ea(e){return na(Gi,e)}function ta(e,t){return Gi===null&&$i(e),na(e,t)}function na(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ki===null){if(e===null)throw Error(i(308));Ki=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ki=Ki.next=t;return n}var ra=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ia=t.unstable_scheduleCallback,aa=t.unstable_NormalPriority,oa={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new ra,data:new Map,refCount:0}}function ca(e){e.refCount--,e.refCount===0&&ia(aa,function(){e.controller.abort()})}var la=null,ua=0,da=0,fa=null;function pa(e,t){if(la===null){var n=la=[];ua=0,da=dd(),fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ua++,t.then(ma,ma),t}function ma(){if(--ua===0&&la!==null){fa!==null&&(fa.status=`fulfilled`);var e=la;la=null,da=0,fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ga=P.S;P.S=function(e,t){$l=Te(),typeof t==`object`&&t&&typeof t.then==`function`&&pa(e,t),ga!==null&&ga(e,t)};var _a=I(null);function va(){var e=_a.current;return e===null?Ll.pooledCache:e}function ya(e,t){t===null?R(_a,_a.current):R(_a,t.pool)}function ba(){var e=va();return e===null?null:{parent:oa._currentValue,pool:e}}var xa=Error(i(460)),Sa=Error(i(474)),Ca=Error(i(542)),wa={then:function(){}};function Ta(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ea(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Aa(e),e}throw Oa=t,xa}}function Da(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Oa=e,xa):e}}var Oa=null;function ka(){if(Oa===null)throw Error(i(459));var e=Oa;return Oa=null,e}function Aa(e){if(e===xa||e===Ca)throw Error(i(483))}var ja=null,Ma=0;function Na(e){var t=Ma;return Ma+=1,ja===null&&(ja=[]),Ea(ja,e,t)}function Pa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Fa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ia(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ui(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Da(i)===t.type)?(t=a(t,n.props),Pa(t,n),t.return=e,t):(t=fi(n.type,n.key,n.props,null,e.mode,r),Pa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=fi(t.type,t.key,t.props,null,e.mode,n),Pa(n,t),n.return=e,n;case v:return t=gi(t,e.mode,n),t.return=e,t;case O:return t=Da(t),f(e,t,n)}if(N(t)||A(t))return t=pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Na(t),n);if(t.$$typeof===C)return f(e,ta(e,t),n);Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Da(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Na(n),r);if(n.$$typeof===C)return p(e,t,ta(e,n),r);Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Da(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Na(r),i);if(r.$$typeof===C)return m(e,t,n,ta(t,r),i);Fa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&Di(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return B&&Di(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),B&&Di(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),B&&Di(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&Di(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),B&&Di(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Da(l)===r.type){n(e,r.sibling),c=a(r,o.props),Pa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=pi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=fi(o.type,o.key,o.props,null,e.mode,c),Pa(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=gi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Da(o),b(e,r,o,c)}if(N(o))return h(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Na(o),c);if(o.$$typeof===C)return b(e,r,ta(e,o),c);Fa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ma=0;var i=b(e,t,n,r);return ja=null,i}catch(t){if(t===xa||t===Ca)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var La=Ia(!0),Ra=Ia(!1),za=!1;function Ba(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Va(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 Ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Wa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}function Ga(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ka=!1;function qa(){if(Ka){var e=fa;if(e!==null)throw e}}function Ja(e,t,n,r){Ka=!1;var i=e.updateQueue;za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(X&f)===f:(r&f)===f){f!==0&&f===da&&(Ka=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:za=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ya(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Xa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ya(n[e],t)}var Za=I(null),Qa=I(0);function $a(e,t){e=Hl,R(Qa,e),R(Za,t),Hl=e|t.baseLanes}function eo(){R(Qa,Hl),R(Za,Za.current)}function to(){Hl=Qa.current,L(Za),L(Qa)}var no=I(null),ro=null;function io(e){var t=e.alternate;R(lo,lo.current&1),R(no,e),ro===null&&(t===null||Za.current!==null||t.memoizedState!==null)&&(ro=e)}function ao(e){R(lo,lo.current),R(no,e),ro===null&&(ro=e)}function oo(e){e.tag===22?(R(lo,lo.current),R(no,e),ro===null&&(ro=e)):so(e)}function so(){R(lo,lo.current),R(no,no.current)}function co(e){L(no),ro===e&&(ro=null),L(lo)}var lo=I(0);function uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 fo=0,V=null,po=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function So(){throw Error(i(321))}function Co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function wo(e,t,n,r,i,a){return fo=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?q:Is,_o=!1,a=n(r,i),_o=!1,go&&(a=Eo(t,n,r,i)),To(e),a}function To(e){P.H=Fs;var t=po!==null&&po.next!==null;if(fo=0,mo=po=V=null,ho=!1,yo=0,bo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Qi(e)&&($s=!0))}function Eo(e,t,n,r){V=e;var a=0;do{if(go&&(bo=null),yo=0,go=!1,25<=a)throw Error(i(301));if(a+=1,mo=po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ls,o=t(n,r)}while(go);return o}function Do(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Po(t):t,e=e.useState()[0],(po===null?null:po.memoizedState)!==e&&(V.flags|=1024),t}function Oo(){var e=vo!==0;return vo=0,e}function ko(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ao(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}fo=0,mo=po=V=null,go=!1,yo=vo=0,bo=null}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?V.memoizedState=mo=e:mo=mo.next=e,mo}function Mo(){if(po===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=po.next;var t=mo===null?V.memoizedState:mo.next;if(t!==null)mo=t,po=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));po=e,e={memoizedState:po.memoizedState,baseState:po.baseState,baseQueue:po.baseQueue,queue:po.queue,next:null},mo===null?V.memoizedState=mo=e:mo=mo.next=e}return mo}function No(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Po(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Ea(bo,e,t),t=V,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?q:Is),e}function Fo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Po(e);if(e.$$typeof===C)return ea(e)}throw Error(i(438,String(e)))}function Io(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=No(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function H(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(Mo(),po,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(fo&f)===f:(X&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===da&&(d=!0);else if((fo&p)===p){u=u.next,p===da&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,Wl|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&($s=!0,d&&(n=fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=V,a=Mo(),o=B;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((po||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,ls(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||fo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=No(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Go(e){var t=ri(e,2);t!==null&&mu(t,e,2)}function Ko(e){var t=jo();if(typeof e==`function`){var n=e;if(e=n(),_o){Ie(!0);try{n()}finally{Ie(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:H,lastRenderedState:e},t}function U(e,t,n,r){return e.baseState=n,Ro(e,po,typeof r==`function`?r:H)}function qo(e,t,n,r,a){if(Ms(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function W(e,t){if(B){var n=Ll.formState;if(n!==null){a:{var r=V;if(B){if(Ni){b:{for(var i=Ni,a=Fi;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=lf(i.nextSibling),r=i.data===`F!`;break a}}Li(r)}r=!1}r&&(t=n[0])}}return n=jo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=ks.bind(null,V,r),r.dispatch=n,r=Ko(!1),a=js.bind(null,V,!1,r.queue),r=jo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function es(e){return ts(Mo(),po,e)}function ts(e,t,n){if(t=Ro(e,t,$o)[0],e=Lo(H)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Po(t)}catch(e){throw e===xa?Ca:e}else r=t;t=Mo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,is(9,{destroy:void 0},ns.bind(null,i,n),null)),[r,a,e]}function ns(e,t){e.action=t}function rs(e){var t=Mo(),n=po;if(n!==null)return ts(t,n,e);Mo(),t=t.memoizedState,n=Mo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=No(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function as(){return Mo().memoizedState}function os(e,t,n,r){var i=jo();V.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,r===void 0?null:r)}function ss(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=i.memoizedState.inst;po!==null&&r!==null&&Co(r,po.memoizedState.deps)?i.memoizedState=is(t,a,n,r):(V.flags|=e,i.memoizedState=is(1|t,a,n,r))}function cs(e,t){os(8390656,8,e,t)}function ls(e,t){ss(2048,8,e,t)}function us(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=No(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ds(e){var t=Mo().memoizedState;return us({ref:t,nextImpl:e}),function(){if(J&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function fs(e,t){return ss(4,2,e,t)}function ps(e,t){return ss(4,4,e,t)}function ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hs(e,t,n){n=n==null?null:n.concat([e]),ss(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Co(t,r[1]))return r[0];if(r=e(),_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r}function ys(e,t,n){return n===void 0||fo&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),V.lanes|=e,Wl|=e,n)}function G(e,t,n,r){return Sr(n,t)?n:Za.current===null?!(fo&42)||fo&1073741824&&!(X&261930)?($s=!0,e.memoizedState=n):(e=pu(),V.lanes|=e,Wl|=e,t):(e=ys(e,n,r),Sr(e,t)||($s=!0),e)}function bs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,js(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?As(e,t,ha(c,r),fu(e)):As(e,t,r,fu(e))}catch(n){As(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function K(){}function xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ss(e).queue;bs(e,a,t,ne,n===null?K:function(){return Cs(e),n(r)})}function Ss(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:H,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:H,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cs(e){var t=Ss(e);t.next===null&&(t=e.alternate.memoizedState),As(e,t.next.queue,{},fu())}function ws(){return ea($f)}function Ts(){return Mo().memoizedState}function Es(){return Mo().memoizedState}function Ds(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=Ha(n);var r=Ua(t,e,n);r!==null&&(mu(r,t,n),Wa(r,t,n)),t={cache:sa()},e.payload=t;return}t=t.return}}function Os(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ms(e)?Ns(t,n):(n=ni(e,t,n,r),n!==null&&(mu(n,e,r),Ps(n,t,r)))}function ks(e,t,n){As(e,t,n,fu())}function As(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ms(e))Ns(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ti(e,t,i,0),Ll===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return mu(n,e,r),Ps(n,t,r),!0}return!1}function js(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ms(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&mu(t,e,2)}function Ms(e){var t=e.alternate;return e===V||t!==null&&t===V}function Ns(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ps(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Fs={readContext:ea,use:Fo,useCallback:So,useContext:So,useEffect:So,useImperativeHandle:So,useLayoutEffect:So,useInsertionEffect:So,useMemo:So,useReducer:So,useRef:So,useState:So,useDebugValue:So,useDeferredValue:So,useTransition:So,useSyncExternalStore:So,useId:So,useHostTransitionStatus:So,useFormState:So,useActionState:So,useOptimistic:So,useMemoCache:So,useCacheRefresh:So};Fs.useEffectEvent=So;var q={readContext:ea,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:ea,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(_o){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(_o){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Os.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=ks.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(jo(),e,t)},useTransition:function(){var e=Ko(!1);return e=bs.bind(null,V,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=jo();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));X&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Uo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=Ll.identifierPrefix;if(B){var n=Ei,r=Ti;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ws,useFormState:W,useActionState:W,useOptimistic:function(e){var t=jo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=js.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Io,useCacheRefresh:function(){return jo().memoizedState=Ds.bind(null,V)},useEffectEvent:function(e){var t=jo(),n={impl:e};return t.memoizedState=n,function(){if(J&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:ea,use:Fo,useCallback:_s,useContext:ea,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Lo,useRef:as,useState:function(){return Lo(H)},useDebugValue:gs,useDeferredValue:function(e,t){return G(Mo(),po.memoizedState,e,t)},useTransition:function(){var e=Lo(H)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Bo,useId:Ts,useHostTransitionStatus:ws,useFormState:es,useActionState:es,useOptimistic:function(e,t){return U(Mo(),po,e,t)},useMemoCache:Io,useCacheRefresh:Es};Is.useEffectEvent=ds;var Ls={readContext:ea,use:Fo,useCallback:_s,useContext:ea,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:zo,useRef:as,useState:function(){return zo(H)},useDebugValue:gs,useDeferredValue:function(e,t){var n=Mo();return po===null?ys(n,e,t):G(n,po.memoizedState,e,t)},useTransition:function(){var e=zo(H)[0],t=Mo().memoizedState;return[typeof e==`boolean`?e:Po(e),t]},useSyncExternalStore:Bo,useId:Ts,useHostTransitionStatus:ws,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){var n=Mo();return po===null?(n.baseState=e,[e,n.queue.dispatch]):U(n,po,e,t)},useMemoCache:Io,useCacheRefresh:Es};Ls.useEffectEvent=ds;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ha(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(mu(t,e,r),Wa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=Ha(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(mu(t,e,r),Wa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=Ha(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(mu(t,e,n),Wa(t,e,n))}};function Bs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zs.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Xr(e)}function Ws(e){console.error(e)}function Gs(e){Xr(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=Ha(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Ha(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Zi(t,n,a,!0),n=no.current,n!==null){switch(n.tag){case 31:case 13:return ro===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===wa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Eu(),!1}if(B)return t=no.current,t===null?(r!==Ii&&(t=Error(i(423),{cause:r}),Ui(vi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=vi(r,n),a=Js(e.stateNode,r,a),Ga(e,a),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ii&&(e=Error(i(422),{cause:r}),Ui(vi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=vi(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=vi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ga(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ga(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?Ra(t,null,n,r):La(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return $i(t),r=wo(e,t,n,o,a,i),s=Oo(),e!==null&&!$s?(ko(e,t,i),Tc(e,t,i)):(B&&s&&ki(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!li(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ui(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ya(t,a===null?null:a.cachePool),a===null?eo():$a(t,a),oo(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ya(t,null),eo(),so(t)):(ya(t,a.cachePool),$a(t,a),so(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=va();return a=a===null?null:{parent:oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ya(t,null),eo(),oo(t),e!==null&&Zi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return La(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,co(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(ao(t),(e=Ni)?(e=af(e,Fi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ao(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Zi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Ll,r!==null&&(s=et(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ri(e,s),mu(r,e,s),Qs;Eu(),t=cc(e,t,n)}else e=o.treeContext,Ni=lf(s.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ui(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return $i(t),n=wo(e,t,n,r,void 0,i),r=Oo(),e!==null&&!$s?(ko(e,t,i),Tc(e,t,i)):(B&&r&&ki(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return $i(t),t.updateQueue=null,n=Eo(t,r,n,i),To(e),r=Oo(),e!==null&&!$s?(ko(e,t,a),Tc(e,t,a)):(B&&r&&ki(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if($i(t),t.stateNode===null){var a=oi,o=n.contextType;typeof o==`object`&&o&&(a=ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ba(t),o=n.contextType,a.context=typeof o==`object`&&o?ea(o):oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&zs.enqueueReplaceState(a,a.state,null),Ja(t,r,a,i),qa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=oi,typeof u==`object`&&u&&(o=ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),za=!1;var f=t.memoizedState;a.state=f,Ja(t,r,a,i),qa(),l=t.memoizedState,s||f!==l||za?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=za||Bs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Va(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=oi,typeof l==`object`&&l&&(c=ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),za=!1,f=t.memoizedState,a.state=f,Ja(t,r,a,i),qa();var p=t.memoizedState;o!==d||f!==p||za||e!==null&&e.dependencies!==null&&Qi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=za||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=La(t,e.child,null,i),t.child=La(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Vi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:ba()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(lo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(B){if(a?io(t):so(t),(e=Ni)?(e=af(e,Fi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Li(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(so(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=pi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(io(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(io(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(so(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=pi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,La(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(so(t),t.child=e.child,t.flags|=128,t=null);else if(io(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ui({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Zi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Ll,s!==null&&(r=et(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ri(e,r),mu(s,e,r),Qs;of(c)||Eu(),t=xc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=lf(c.nextSibling),Mi=t,B=!0,Pi=null,Fi=!1,e!==null&&ji(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(so(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ui(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=pi(c,a,n,null),c.flags|=2):c=ui(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=ba():(l=oa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(io(t),n=e.child,e=n.sibling,n=ui(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ci(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return La(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Yi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=lo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,R(lo,o),ec(e,t,r,n),r=B?Si:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&uo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&uo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Qi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),qi(t,oa,e.memoizedState.cache),Vi();break;case 27:case 5:de(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:qi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(io(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(io(t),t.flags|=128,null);io(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Zi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),R(lo,lo.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:qi(t,oa,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,B&&t.flags&1048576&&Oi(t,Si,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Da(t.elementType),t.type=e,typeof e==`function`)li(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Va(e,t),Ja(t,r,null,n);var s=t.memoizedState;if(r=s.cache,qi(t,oa,r),r!==o.cache&&Xi(t,[oa],n,!0),qa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=vi(Error(i(424)),t),Ui(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=lf(e.firstChild),Mi=t,B=!0,Pi=null,Fi=!0,n=Ra(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Vi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(n=t.type,e=t.pendingProps,r=Vd(se.current).createElement(n),r[ot]=t,r[st]=e,Fd(r,n,e),yt(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&B&&(r=t.stateNode=pf(t.type,t.pendingProps,se.current),Mi=t,Fi=!0,a=Ni,Qd(t.type)?(uf=a,Ni=lf(r.firstChild)):Ni=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((a=r=Ni)&&(r=nf(r,t.type,t.pendingProps,Fi),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=lf(r.firstChild),Fi=!1,a=!0)),a||Li(t)),de(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=wo(e,t,Do,null,null,n),$f._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=Ni)&&(n=rf(n,t.pendingProps,Fi),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Li(t)),null;case 13:return vc(e,t,n);case 4:return le(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=La(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,qi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,$i(t),a=ea(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return $i(t),r=ea(oa),e===null?(a=va(),a===null&&(a=Ll,o=sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ba(t),qi(t,oa,a)):((e.lanes&n)!==0&&(Va(e,t),Ja(t,null,null,n),qa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,qi(t,oa,r),r!==a.cache&&Xi(t,[oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qi(t,oa,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,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(Cu())e.flags|=8192;else throw Oa=wa,Sa}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Cu())e.flags|=8192;else throw Oa=wa,Sa}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Je(),e.lanes|=t,Jl|=t)}function Nc(e,t){if(!B)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ji(oa),ue(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(fe(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ae.current,Bi(t)?Ri(t,e):(e=pf(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(fe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ae.current,Bi(t))Ri(t,o);else{var s=Vd(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ot]=t,o[st]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Bi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Li(t,!0)}else e=Vd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Bi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ot]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(co(t),t):(co(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ot]=t}else Vi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Hi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(co(t),t):(co(t),null)}return co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return ue(),e===null&&Sd(t.stateNode.containerInfo),Pc(t),null;case 10:return Ji(t.type),Pc(t),null;case 19:if(L(lo),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=uo(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return R(lo,lo.current&1|2),B&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>eu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!B)return Pc(t),null}else 2*Te()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=lo.current,R(lo,a?n&1|2:n&1),B&&Di(t,r.treeForkCount),e);case 22:case 23:return co(t),to(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&L(_a),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ji(oa),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(oa),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(co(t),t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Vi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(lo),null;case 4:return ue(),null;case 10:return Ji(t.type),null;case 22:case 23:return co(t),to(),e!==null&&L(_a),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ji(oa),null;case 25:return null;default:return null}}function Lc(e,t){switch(Ai(t),t.tag){case 3:Ji(oa),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&co(t);break;case 13:co(t);break;case 19:L(lo);break;case 10:Ji(t.type);break;case 22:case 23:co(t),to(),e!==null&&L(_a);break;case 24:Ji(oa)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Wu(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Wu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Wu(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Xa(t,n)}catch(t){Wu(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Wu(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Wu(e,t,n)}}function Uc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Wu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Wu(e,t,n)}else n.current=null}function Wc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Wu(e,e.return,t)}}function Gc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[st]=t}catch(t){Wu(e,e.return,t)}}function Kc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function qc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Kc(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&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Yc(e,t,n),e=e.sibling;e!==null;)Yc(e,t,n),e=e.sibling}function Xc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[ot]=e,t[st]=n}catch(t){Wu(e,e.return,t)}}var Zc=!1,Qc=!1,$c=!1,el=typeof WeakSet==`function`?WeakSet:Set,tl=null;function nl(e,t){if(e=e.containerInfo,zd=cp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,tl=t;tl!==null;)if(t=tl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,tl=e;else for(;tl!==null;){switch(t=tl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Wu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,tl=e;break}tl=t.return}}function rl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:vl(e,n),r&4&&Rc(5,n);break;case 1:if(vl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Wu(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Wu(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(vl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Xa(e,t)}catch(e){Wu(n,n.return,e)}}break;case 27:t===null&&r&4&&Xc(n);case 26:case 5:vl(e,n),t===null&&r&4&&Wc(n),r&512&&Hc(n,n.return);break;case 12:vl(e,n);break;case 31:vl(e,n),r&4&&ll(e,n);break;case 13:vl(e,n),r&4&&ul(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||Zc,!r){t=t!==null&&t.memoizedState!==null||Qc,i=Zc;var a=Qc;Zc=r,(Qc=t)&&!a?bl(e,n,(n.subtreeFlags&8772)!=0):vl(e,n),Zc=i,Qc=a}break;case 30:break;default:vl(e,n)}}function il(e){var t=e.alternate;t!==null&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mt(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 al=null,ol=!1;function sl(e,t,n){for(n=n.child;n!==null;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount==`function`)try{Fe.onCommitFiberUnmount(Pe,n)}catch{}switch(n.tag){case 26:Qc||Uc(n,t),sl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qc||Uc(n,t);var r=al,i=ol;Qd(n.type)&&(al=n.stateNode,ol=!1),sl(e,t,n),mf(n.stateNode),al=r,ol=i;break;case 5:Qc||Uc(n,t);case 6:if(r=al,i=ol,al=null,sl(e,t,n),al=r,ol=i,al!==null)if(ol)try{(al.nodeType===9?al.body:al.nodeName===`HTML`?al.ownerDocument.body:al).removeChild(n.stateNode)}catch(e){Wu(n,t,e)}else try{al.removeChild(n.stateNode)}catch(e){Wu(n,t,e)}break;case 18:al!==null&&(ol?(e=al,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(al,n.stateNode));break;case 4:r=al,i=ol,al=n.stateNode.containerInfo,ol=!0,sl(e,t,n),al=r,ol=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Qc||zc(4,n,t),sl(e,t,n);break;case 1:Qc||(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),sl(e,t,n);break;case 21:sl(e,t,n);break;case 22:Qc=(r=Qc)||n.memoizedState!==null,sl(e,t,n),Qc=r;break;default:sl(e,t,n)}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){Wu(t,t.return,e)}}}function ul(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){Wu(t,t.return,e)}}function dl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new el),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new el),t;default:throw Error(i(435,e.tag))}}function fl(e,t){var n=dl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function pl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){al=c.stateNode,ol=!1;break a}break;case 5:al=c.stateNode,ol=!1;break a;case 3:case 4:al=c.stateNode.containerInfo,ol=!0;break a}c=c.return}if(al===null)throw Error(i(160));cl(o,s,a),al=null,ol=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)hl(t,e),t=t.sibling}var ml=null;function hl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pl(t,e),gl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&64&&Zc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ml;if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[pt]||o[ot]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ot]=e,yt(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),n!==null&&r&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pl(t,e),gl(e),r&512&&(Qc||n===null||Uc(n,n.return)),e.flags&32){a=e.stateNode;try{Gt(a,``)}catch(t){Wu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Gc(e,a,n===null?a:n.memoizedProps)),r&1024&&($c=!0);break;case 6:if(pl(t,e),gl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Wu(e,e.return,t)}}break;case 3:if(Vf=null,a=ml,ml=_f(t.containerInfo),pl(t,e),ml=a,gl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){Wu(e,e.return,t)}$c&&($c=!1,_l(e));break;case 4:r=ml,ml=_f(e.stateNode.containerInfo),pl(t,e),gl(e),ml=r;break;case 12:pl(t,e),gl(e);break;case 31:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 13:pl(t,e),gl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=Te()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Zc,d=Qc;if(Zc=u||a,Qc=d||l,pl(t,e),Qc=d,Zc=u,gl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Zc||Qc||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Wu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Wu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Wu(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,fl(e,n))));break;case 19:pl(t,e),gl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,fl(e,r)));break;case 30:break;case 21:break;default:pl(t,e),gl(e)}}function gl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Kc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Yc(e,qc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Gt(o,``),n.flags&=-33),Yc(e,qc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Jc(e,qc(e),s);break;default:throw Error(i(161))}}catch(t){Wu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _l(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_l(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rl(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),yl(t);break;case 1:Uc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),yl(t);break;case 27:mf(t.stateNode);case 26:case 5:Uc(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function bl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:bl(i,a,n),Rc(4,a);break;case 1:if(bl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Wu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ya(c[i],s)}catch(e){Wu(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Xc(a);case 26:case 5:bl(i,a,n),n&&r===null&&o&4&&Wc(a),Hc(a,a.return);break;case 12:bl(i,a,n);break;case 31:bl(i,a,n),n&&o&4&&ll(i,a);break;case 13:bl(i,a,n),n&&o&4&&ul(i,a);break;case 22:a.memoizedState===null&&bl(i,a,n),Hc(a,a.return);break;case 30:break;default:bl(i,a,n)}t=t.sibling}}function xl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ca(n))}function Sl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e))}function Cl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wl(e,t,n,r),t=t.sibling}function wl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Cl(e,t,n,r);break;case 3:Cl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ca(e)));break;case 12:if(i&2048){Cl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Wu(t,t.return,e)}}else Cl(e,t,n,r);break;case 31:Cl(e,t,n,r);break;case 13:Cl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Cl(e,t,n,r):(a._visibility|=2,Tl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Cl(e,t,n,r):El(e,t),i&2048&&xl(o,t);break;case 24:Cl(e,t,n,r),i&2048&&Sl(t.alternate,t);break;default:Cl(e,t,n,r)}}function Tl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Tl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Tl(a,o,s,c,i)):u._visibility&2?Tl(a,o,s,c,i):El(a,o),i&&l&2048&&xl(o.alternate,o);break;case 24:Tl(a,o,s,c,i),i&&l&2048&&Sl(o.alternate,o);break;default:Tl(a,o,s,c,i)}t=t.sibling}}function El(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:El(n,r),i&2048&&xl(r.alternate,r);break;case 24:El(n,r),i&2048&&Sl(r.alternate,r);break;default:El(n,r)}t=t.sibling}}var Dl=8192;function Ol(e,t,n){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)kl(e,t,n),e=e.sibling}function kl(e,t,n){switch(e.tag){case 26:Ol(e,t,n),e.flags&Dl&&e.memoizedState!==null&&Kf(n,ml,e.memoizedState,e.memoizedProps);break;case 5:Ol(e,t,n);break;case 3:case 4:var r=ml;ml=_f(e.stateNode.containerInfo),Ol(e,t,n),ml=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Dl,Dl=16777216,Ol(e,t,n),Dl=r):Ol(e,t,n));break;default:Ol(e,t,n)}}function Al(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 jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ml(e),e=e.sibling}function Ml(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&zc(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nl(e)):jl(e);break;default:jl(e)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];tl=r,Pl(r,e)}Al(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Nl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Nl(t));break;default:Nl(t)}e=e.sibling}}function Pl(e,t){for(;tl!==null;){var n=tl;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,tl=r;else a:for(n=e;tl!==null;){r=tl;var i=r.sibling,a=r.return;if(il(r),r===n){tl=null;break a}if(i!==null){i.return=a,tl=i;break a}tl=a}}}var Fl={getCacheForType:function(e){var t=ea(oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ea(oa).controller.signal}},Il=typeof WeakMap==`function`?WeakMap:Map,J=0,Ll=null,Y=null,X=0,Z=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return J&2&&X!==0?X&-X:P.T===null?rt():dd()}function pu(){if(ql===0)if(!(X&536870912)||B){var e=He;He<<=1,!(He&3932160)&&(He=262144),ql=e}else ql=536870912;return e=no.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Ll&&(Z===2||Z===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,X,ql,!1)),Xe(e,n),(!(J&2)||e!==Ll)&&(e===Ll&&(!(J&2)&&(Gl|=n),Ul===4&&vu(e,X,ql,!1)),rd(e))}function hu(e,t,n){if(J&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ke(e,t),a=r?ku(e,t):Du(e,t,!0),o=r;do{if(a===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){a=Du(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,a=4;break a}o=Xl,Xl=a,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Ql+300-Te(),10<a)){if(vu(r,t,ql,!zl),Ge(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=qd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),a);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);rd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},kl(t,a,d);var m=(a&62914560)===a?Ql-Te():(a&4194048)===a?$l-Te():0;if(m=Jf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Le(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Qe(e,n,t)}function yu(){return J&6?!0:(id(0,!1),!1)}function bu(){if(Y!==null){if(Z===0)var e=Y.return;else e=Y,Ki=Gi=null,Ao(e),ja=null,Ma=0,e=Y;for(;e!==null;)Lc(e.alternate,e),e=e.return;Y=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Ll=e,Y=n=ui(e.current,null),X=t,Z=0,Rl=null,zl=!1,Bl=Ke(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Le(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,ei(),n}function Su(e,t){V=null,P.H=Fs,t===xa||t===Ca?(t=ka(),Z=3):t===Sa?(t=ka(),Z=4):Z=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Y===null&&(Ul=1,Ks(e,vi(t,e.current)))}function Cu(){var e=no.current;return e===null?!0:(X&4194048)===X?ro===null:(X&62914560)===X||X&536870912?e===ro:!1}function wu(){var e=P.H;return P.H=Fs,e===null?Fs:e}function Tu(){var e=P.A;return P.A=Fl,e}function Eu(){Ul=4,zl||(X&4194048)!==X&&no.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Ll===null||vu(Ll,X,ql,!1)}function Du(e,t,n){var r=J;J|=2;var i=wu(),a=Tu();(Ll!==e||X!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Z!==0&&Y!==null){var s=Y,c=Rl;switch(Z){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:no.current===null&&(t=!0);var l=Z;if(Z=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Z,Z=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Ki=Gi=null,J=r,P.H=i,P.A=a,Y===null&&(Ll=null,X=0,ei()),o}function Ou(){for(;Y!==null;)ju(Y)}function ku(e,t){var n=J;J|=2;var r=wu(),a=Tu();Ll!==e||X!==t?(tu=null,eu=Te()+500,xu(e,t)):Bl=Ke(e,t);a:do try{if(Z!==0&&Y!==null){t=Y;var o=Rl;b:switch(Z){case 1:Z=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(Ta(o)){Z=0,Rl=null,Mu(t);break}t=function(){Z!==2&&Z!==9||Ll!==e||(Z=7),rd(e)},o.then(t,t);break a;case 3:Z=7;break a;case 4:Z=5;break a;case 7:Ta(o)?(Z=0,Rl=null,Mu(t)):(Z=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Gf(s):c.stateNode.complete){Z=0,Rl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Pu(u))}break b}}Z=0,Rl=null,Nu(e,t,o,5);break;case 6:Z=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(i(462))}}Au();break}catch(t){Su(e,t)}while(1);return Ki=Gi=null,P.H=r,P.A=a,J=n,Y===null?(Ll=null,X=0,ei(),Ul):0}function Au(){for(;Y!==null&&!Ce();)ju(Y)}function ju(e){var t=Oc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:Ao(t);default:Lc(n,t),t=Y=di(t,Hl),t=Oc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Y=t}function Nu(e,t,n,r){Ki=Gi=null,Ao(t),ja=null,Ma=0;var i=t.return;try{if(Zs(e,i,t,n,X)){Ul=1,Ks(e,vi(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Ul=1,Ks(e,vi(n,e.current)),Y=null;return}t.flags&32768?(B||r===1?e=!0:Bl||X&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=no.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=Fc(t.alternate,t,Hl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Ul=6,Y=null}function Iu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(J&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=$r,Ze(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,X=0),au=t,iu=e,ou=n,su=o,cu=a,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(ke,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=J,J|=4;try{nl(e,t,n)}finally{J=s,F.p=a,P.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=J;J|=4;try{hl(t,e);var a=Bd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!zd,Bd=zd=null}finally{J=i,F.p=r,P.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=J;J|=4;try{rl(e,t.alternate,t)}finally{J=i,F.p=r,P.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,we();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),nt(n),t=t.stateNode,Fe&&typeof Fe.onCommitFiberRoot==`function`)try{Fe.onCommitFiberRoot(Pe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}ou&3&&Vu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,id(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ca(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=nt(ou),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,J&6)throw Error(i(331));var c=J;if(J|=4,Ml(o.current),wl(o,o.current,s,n),J=c,id(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{F.p=a,P.T=r,Bu(e,t)}}function Uu(e,t,n){t=vi(n,t),t=Js(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(Xe(e,2),rd(e))}function Wu(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=vi(n,e),n=Ys(2),r=Ua(t,n,2),r!==null&&(Xs(n,r,t,e),Xe(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Il;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Vl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(X&n)===n&&(Ul===4||Ul===3&&(X&62914560)===X&&300>Te()-Ql?!(J&2)&&xu(e,0):Kl|=n,Jl===X&&(Jl=0)),rd(e)}function qu(e,t){t===0&&(t=Je()),e=ri(e,t),e!==null&&(Xe(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return xe(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=X,a=Ge(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Kd()&&(e=nd);for(var t=Te(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}ru!==0&&ru!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Le(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=X,n=Ge(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Z===2||Z===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Se(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ke(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Se(r),nt(n)){case 2:case 8:n=Oe;break;case 32:n=ke;break;case 268435456:n=je;break;default:n=ke}return r=cd.bind(null,e),n=xe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Se(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=X;return r=Ge(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),sd(e,Te()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Vu())return null;hu(e,t,!0)}function ud(){Xd(function(){J&6?xe(De,ad):od()})}function dd(){if(nd===0){var e=da;e===0&&(e=Ve,Ve<<=1,!(Ve&261888)&&(Ve=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[st]||null).action),o=r.submitter;o&&(t=(t=o[st]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Jr.length;hd++){var gd=Jr[hd];Yr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),Ct(`onMouseEnter`,[`mouseout`,`mouseover`]),Ct(`onMouseLeave`,[`mouseout`,`mouseover`]),Ct(`onPointerEnter`,[`pointerout`,`pointerover`]),Ct(`onPointerLeave`,[`pointerout`,`pointerover`]),St(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),St(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),St(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),St(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),St(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[lt];n===void 0&&(n=t[lt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,bt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ht(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=tn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(ht(u)||u[ct]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ht(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:_t(l),h=u==null?c:_t(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ht(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?_t(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Vt(c,`number`,c.value)}switch(y=r?_t(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Ed(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=cn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Gt(e,``+r);break;case`className`:kt(e,`class`,r);break;case`tabIndex`:kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:kt(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Ot(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ot(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,Ot(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Gt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Gt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!xt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[st]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ot(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Nd(e,t,r,d,n,null)}}Bt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ht(e,!!r,n,!0):Ht(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Nd(e,t,s,c,n,null)}Wt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ht(e,!!n,n?[]:``,!1):Ht(e,!!n,t,!0)):Ht(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}Ut(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(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 zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Ud(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 Wd(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 Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[pt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Pp(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[pt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(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 uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=F.d;F.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=yu();return e||t}function bf(e){var t=gt(e);t!==null&&t.tag===5&&t.type===`form`?Cs(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Rt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Rt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Rt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Rt(n.imageSizes)+`"]`)):i+=`[href="`+Rt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Rt(r)+`"][href="`+Rt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=vt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);yt(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=vt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=h({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),yt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=vt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),yt(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=se.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=vt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=vt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=vt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+Rt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),yt(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Rt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Rt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,yt(a),a):(r=n,(a=hf.get(o))&&(r=h({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),yt(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[pt]||a[ot]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){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=Ye(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ye(0),this.hiddenUpdates=Ye(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ci(3,null,null,t),e.current=a,a.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ba(a),e}function np(e){return e?(e=oi,e):oi}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Ha(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ua(e,r,t),n!==null&&(mu(n,e,t),Wa(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&mu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=fu();t=tt(t);var n=ri(e,t);n!==null&&mu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,dp(e,t,n,r)}finally{F.p=a,P.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)wd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=gt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=We(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Le(o);s.entanglements[1]|=c,o&=~c}rd(a),!(J&6)&&(eu=Te()+500,id(0,!1))}}break;case 31:case 13:s=ri(a,2),s!==null&&mu(s,a,2),yu(),ap(a,2)}if(a=fp(r),a===null&&wd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function fp(e){return e=tn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=ht(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(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(Ee()){case De:return 2;case Oe:return 8;case ke:case Ae:return 32;case je:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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 wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=gt(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=ht(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,it(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,it(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=gt(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=gt(n);a!==null&&(e.splice(t,3),t-=3,xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[st]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[st]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,fu(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),yu(),t[ct]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=rt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.5`)throw Error(i(527,Rp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Pe=Bp.inject(zp),Fe=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[ct]=t.current,Sd(e),new Ip(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=`modulepreload`,v=function(e){return`/`+e},y={},b=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=v(t,n),t in y)return;y[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:_,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},x=c(u(),1),S=`popstate`;function C(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function w(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ee(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return A(t,n,null,e)}function T(e,t){if(e===!1||e==null)throw Error(t)}function E(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function D(){return Math.random().toString(36).substring(2,10)}function O(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ee(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?te(t):t,state:n,key:t&&t.key||r||D(),unstable_mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function te(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function A(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u()+1;let d=O(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=C(e)?e:ee(h.location,e,t);n&&n(r,e),l=u();let i=O(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return j(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(S,d),c=e,()=>{i.removeEventListener(S,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function j(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),T(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:k(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function M(e,t,n=`/`){return N(e,t,n,!1)}function N(e,t,n,r){let i=me((typeof t==`string`?te(t):t).pathname||`/`,n);if(i==null)return null;let a=F(e);re(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=pe(i);o=ue(a[e],t,r)}return o}function P(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function F(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;T(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Ce([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(T(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),F(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:ce(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ne(e.path))a(e,t,!0,n)}),t}function ne(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ne(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function re(e){e.sort((e,t)=>e.score===t.score?le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ie=/^:[\w-]+$/,I=3,L=2,R=1,ae=10,oe=-2,se=e=>e===`*`;function ce(e,t){let n=e.split(`/`),r=n.length;return n.some(se)&&(r+=oe),t&&(r+=L),n.filter(e=>!se(e)).reduce((e,t)=>e+(ie.test(t)?I:t===``?R:ae),r)}function le(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ue(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=de({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=de({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:Ce([a,u.pathname]),pathnameBase:Te(Ce([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=Ce([a,u.pathnameBase]))}return o}function de(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fe(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function fe(e,t=!1,n=!0){E(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function pe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return E(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function me(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var he=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ge(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?te(e):e,a;return n?(n=Se(n),a=n.startsWith(`/`)?_e(n.substring(1),`/`):_e(n,t)):a=t,{pathname:a,search:Ee(r),hash:De(i)}}function _e(e,t){let n=we(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ve(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ye(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function be(e){let t=ye(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function xe(e,t,n,r=!1){let i;typeof e==`string`?i=te(e):(i={...e},T(!i.pathname||!i.pathname.includes(`?`),ve(`?`,`pathname`,`search`,i)),T(!i.pathname||!i.pathname.includes(`#`),ve(`#`,`pathname`,`hash`,i)),T(!i.search||!i.search.includes(`#`),ve(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ge(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Se=e=>e.replace(/\/\/+/g,`/`),Ce=e=>Se(e.join(`/`)),we=e=>e.replace(/\/+$/,``),Te=e=>we(e).replace(/^\/*/,`/`),Ee=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,De=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Oe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ae(e){return Ce(e.map(e=>e.route.path).filter(Boolean))||`/`}var je=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Me(e,t){let n=e;if(typeof n!=`string`||!he.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(je)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=me(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{E(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ne=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ne);var Pe=[`GET`,...Ne];new Set(Pe);var Fe=x.createContext(null);Fe.displayName=`DataRouter`;var Ie=x.createContext(null);Ie.displayName=`DataRouterState`;var Le=x.createContext(!1);function Re(){return x.useContext(Le)}var ze=x.createContext({isTransitioning:!1});ze.displayName=`ViewTransition`;var Be=x.createContext(new Map);Be.displayName=`Fetchers`;var Ve=x.createContext(null);Ve.displayName=`Await`;var He=x.createContext(null);He.displayName=`Navigation`;var Ue=x.createContext(null);Ue.displayName=`Location`;var We=x.createContext({outlet:null,matches:[],isDataRoute:!1});We.displayName=`Route`;var Ge=x.createContext(null);Ge.displayName=`RouteError`;var Ke=`REACT_ROUTER_ERROR`,qe=`REDIRECT`,Je=`ROUTE_ERROR_RESPONSE`;function Ye(e){if(e.startsWith(`${Ke}:${qe}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Xe(e){if(e.startsWith(`${Ke}:${Je}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Oe(t.status,t.statusText,t.data)}catch{}}function Ze(e,{relative:t}={}){T(Qe(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=x.useContext(He),{hash:i,pathname:a,search:o}=it(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Ce([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Qe(){return x.useContext(Ue)!=null}function $e(){return T(Qe(),`useLocation() may be used only in the context of a <Router> component.`),x.useContext(Ue).location}var et=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function tt(e){x.useContext(He).static||x.useLayoutEffect(e)}function nt(){let{isDataRoute:e}=x.useContext(We);return e?Ct():rt()}function rt(){T(Qe(),`useNavigate() may be used only in the context of a <Router> component.`);let e=x.useContext(Fe),{basename:t,navigator:n}=x.useContext(He),{matches:r}=x.useContext(We),{pathname:i}=$e(),a=JSON.stringify(be(r)),o=x.useRef(!1);return tt(()=>{o.current=!0}),x.useCallback((r,s={})=>{if(E(o.current,et),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=xe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Ce([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}x.createContext(null);function it(e,{relative:t}={}){let{matches:n}=x.useContext(We),{pathname:r}=$e(),i=JSON.stringify(be(n));return x.useMemo(()=>xe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function at(e,t){return ot(e,t)}function ot(e,t,n){T(Qe(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=x.useContext(He),{matches:i}=x.useContext(We),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Tt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=$e(),d;if(t){let e=typeof t==`string`?te(t):t;T(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=M(e,{pathname:p});E(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),E(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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 h=pt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ce([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ce([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?x.createElement(Ue.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},h):h}function st(){let e=St(),t=ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=x.createElement(x.Fragment,null,x.createElement(`p`,null,`💿 Hey developer 👋`),x.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,x.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,x.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),x.createElement(x.Fragment,null,x.createElement(`h2`,null,`Unexpected Application Error!`),x.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?x.createElement(`pre`,{style:i},n):null,o)}var ct=x.createElement(st,null),lt=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Xe(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:x.createElement(We.Provider,{value:this.props.routeContext},x.createElement(Ge.Provider,{value:e,children:this.props.component}));return this.context?x.createElement(dt,{error:e},t):t}};lt.contextType=Le;var ut=new WeakMap;function dt({children:e,error:t}){let{basename:n}=x.useContext(He);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ye(t.digest);if(e){let r=ut.get(t);if(r)throw r;let i=Me(e.location,n);if(je&&!ut.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ut.set(t,n),n}return x.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function ft({routeContext:e,match:t,children:n}){let r=x.useContext(Fe);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(We.Provider,{value:e},n)}function pt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);T(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ae(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||ct,o&&(s<0&&c===0?(Tt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?x.createElement(n.route.Component,null):n.route.element?n.route.element:e,x.createElement(ft,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?x.createElement(lt,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function mt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ht(e){let t=x.useContext(Fe);return T(t,mt(e)),t}function gt(e){let t=x.useContext(Ie);return T(t,mt(e)),t}function _t(e){let t=x.useContext(We);return T(t,mt(e)),t}function vt(e){let t=_t(e),n=t.matches[t.matches.length-1];return T(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function yt(){return vt(`useRouteId`)}function bt(){return gt(`useNavigation`).navigation}function xt(){let{matches:e,loaderData:t}=gt(`useMatches`);return x.useMemo(()=>e.map(e=>P(e,t)),[e,t])}function St(){let e=x.useContext(Ge),t=gt(`useRouteError`),n=vt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ct(){let{router:e}=ht(`useNavigate`),t=vt(`useNavigate`),n=x.useRef(!1);return tt(()=>{n.current=!0}),x.useCallback(async(r,i={})=>{E(n.current,et),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var wt={};function Tt(e,t,n){!t&&!wt[e]&&(wt[e]=!0,E(!1,n))}x.useOptimistic,x.memo(Et);function Et({routes:e,future:t,state:n,isStatic:r,onError:i}){return ot(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Dt({to:e,replace:t,state:n,relative:r}){T(Qe(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=x.useContext(He);E(!i,`<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:a}=x.useContext(We),{pathname:o}=$e(),s=nt(),c=xe(e,be(a),o,r===`path`),l=JSON.stringify(c);return x.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Ot(e){T(!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 kt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){T(!Qe(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=x.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=te(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,h=x.useMemo(()=>{let e=me(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return E(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:x.createElement(He.Provider,{value:c},x.createElement(Ue.Provider,{children:t,value:h}))}function At({children:e,location:t}){return at(jt(e),t)}x.Component;function jt(e,t=[]){let n=[];return x.Children.forEach(e,(e,r)=>{if(!x.isValidElement(e))return;let i=[...t,r];if(e.type===x.Fragment){n.push.apply(n,jt(e.props.children,i));return}T(e.type===Ot,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),T(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=jt(e.props.children,i)),n.push(a)}),n}var Mt=`get`,Nt=`application/x-www-form-urlencoded`;function Pt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ft(e){return Pt(e)&&e.tagName.toLowerCase()===`button`}function It(e){return Pt(e)&&e.tagName.toLowerCase()===`form`}function Lt(e){return Pt(e)&&e.tagName.toLowerCase()===`input`}function Rt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zt(e,t){return e.button===0&&(!t||t===`_self`)&&!Rt(e)}var Bt=null;function Vt(){if(Bt===null)try{new FormData(document.createElement(`form`),0),Bt=!1}catch{Bt=!0}return Bt}var Ht=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ut(e){return e!=null&&!Ht.has(e)?(E(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nt}"`),null):e}function Wt(e,t){let n,r,i,a,o;if(It(e)){let o=e.getAttribute(`action`);r=o?me(o,t):null,n=e.getAttribute(`method`)||Mt,i=Ut(e.getAttribute(`enctype`))||Nt,a=new FormData(e)}else if(Ft(e)||Lt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?me(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Mt,i=Ut(e.getAttribute(`formenctype`))||Ut(o.getAttribute(`enctype`))||Nt,a=new FormData(o,e),!Vt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Pt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Mt,r=null,i=Nt,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Gt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Kt=/[&><\u2028\u2029]/g;function qt(e){return e.replace(Kt,e=>Gt[e])}function Jt(e,t){if(e===!1||e==null)throw Error(t)}function Yt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&me(i.pathname,t)===`/`?i.pathname=`${we(t)}/_root.${r}`:i.pathname=`${we(i.pathname)}.${r}`,i}async function Xt(e,t){if(e.id in t)return t[e.id];try{let n=await b(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zt(e){return e!=null&&typeof e.page==`string`}function Qt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function $t(e,t,n){return an((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Xt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Qt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function en(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function tn(e,t,{includeHydrateFallback:n}={}){return nn(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function nn(e){return[...new Set(e)]}function rn(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function an(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Zt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(rn(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function on(){let e=x.useContext(Fe);return Jt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function sn(){let e=x.useContext(Ie);return Jt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var cn=x.createContext(void 0);cn.displayName=`FrameworkContext`;function ln(){let e=x.useContext(cn);return Jt(e,`You must render this element inside a <HydratedRouter> element`),e}function un(e,t){let n=x.useContext(cn),[r,i]=x.useState(!1),[a,o]=x.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=x.useRef(null);x.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),x.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:dn(s,p),onBlur:dn(c,m),onMouseEnter:dn(l,p),onMouseLeave:dn(u,m),onTouchStart:dn(d,p)}]:[a,f,{}]:[!1,f,{}]}function dn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function fn({page:e,...t}){let n=Re(),{router:r}=on(),i=x.useMemo(()=>M(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?x.createElement(mn,{page:e,matches:i,...t}):x.createElement(hn,{page:e,matches:i,...t}):null}function pn(e){let{manifest:t,routeModules:n}=ln(),[r,i]=x.useState([]);return x.useEffect(()=>{let r=!1;return $t(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function mn({page:e,matches:t,...n}){let r=$e(),{future:i}=ln(),{basename:a}=on(),o=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Yt(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return x.createElement(x.Fragment,null,o.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function hn({page:e,matches:t,...n}){let r=$e(),{future:i,manifest:a,routeModules:o}=ln(),{basename:s}=on(),{loaderData:c,matches:l}=sn(),u=x.useMemo(()=>en(e,t,l,a,r,`data`),[e,t,l,a,r]),d=x.useMemo(()=>en(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Yt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=x.useMemo(()=>tn(d,a),[d,a]),m=pn(d);return x.createElement(x.Fragment,null,f.map(e=>x.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>x.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>x.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function gn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}x.Component;var _n=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{_n&&(window.__reactRouterVersion=`7.14.2`)}catch{}function vn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=x.useRef();i.current??=w({window:r,v5Compat:!0});let a=i.current,[o,s]=x.useState({action:a.action,location:a.location}),c=x.useCallback(e=>{n===!1?s(e):x.startTransition(()=>s(e))},[n]);return x.useLayoutEffect(()=>a.listen(c),[a,c]),x.createElement(kt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function yn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=x.useState({action:n.action,location:n.location}),o=x.useCallback(e=>{r===!1?a(e):x.startTransition(()=>a(e))},[r]);return x.useLayoutEffect(()=>n.listen(o),[n,o]),x.createElement(kt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}yn.displayName=`unstable_HistoryRouter`;var bn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=x.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,unstable_useTransitions:_}=x.useContext(He),v=typeof l==`string`&&bn.test(l),y=Me(l,h);l=y.to;let b=Ze(l,{relative:r}),S=$e(),C=null;if(o){let e=xe(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Ce([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=un(n,p),D=On(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let ee=!(y.isExternal||i),k=x.createElement(`a`,{...p,...E,href:(ee?C:void 0)||y.absoluteURL||b,onClick:ee?O:e,ref:gn(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return w&&!v?x.createElement(x.Fragment,null,k,x.createElement(fn,{page:b})):k});xn.displayName=`Link`;var Sn=x.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=it(a,{relative:c.relative}),d=$e(),f=x.useContext(Ie),{navigator:p,basename:m}=x.useContext(He),h=f!=null&&Rn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=me(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:b,isPending:S,isTransitioning:h},w=b?e:void 0,T;T=typeof n==`function`?n(C):[n,b?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return x.createElement(xn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Sn.displayName=`NavLink`;var Cn=x.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Mt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:h}=x.useContext(He),g=jn(),_=Mn(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&bn.test(s);return x.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h&&n!==!1?x.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Cn.displayName=`Form`;function wn({getKey:e,storageKey:t,...n}){let r=x.useContext(cn),{basename:i}=x.useContext(He),a=$e(),o=xt();In({getKey:e,storageKey:t});let s=x.useMemo(()=>{if(!r||!e)return null;let t=Fn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return x.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${qt(JSON.stringify(t||Nn))}, ${qt(JSON.stringify(s))})`}})}wn.displayName=`ScrollRestoration`;function Tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function En(e){let t=x.useContext(Fe);return T(t,Tn(e)),t}function Dn(e){let t=x.useContext(Ie);return T(t,Tn(e)),t}function On(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=nt(),d=$e(),f=it(e,{relative:o});return x.useCallback(p=>{if(zt(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?x.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var kn=0,An=()=>`__${String(++kn)}__`;function jn(){let{router:e}=En(`useSubmit`),{basename:t}=x.useContext(He),n=yt(),r=e.fetch,i=e.navigate;return x.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Wt(e,t);a.navigate===!1?await r(a.fetcherKey||An(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Mn(e,{relative:t}={}){let{basename:n}=x.useContext(He),r=x.useContext(We);T(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...it(e||`.`,{relative:t})},o=$e();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Ce([n,a.pathname])),k(a)}var Nn=`react-router-scroll-positions`,Pn={};function Fn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:me(e.pathname,n)||e.pathname},t)),i??=e.key,i}function In({getKey:e,storageKey:t}={}){let{router:n}=En(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Dn(`useScrollRestoration`),{basename:a}=x.useContext(He),o=$e(),s=xt(),c=bt();x.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Ln(x.useCallback(()=>{if(c.state===`idle`){let t=Fn(o,s,a,e);Pn[t]=window.scrollY}try{sessionStorage.setItem(t||Nn,JSON.stringify(Pn))}catch(e){E(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(x.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Nn);e&&(Pn=JSON.parse(e))}catch{}},[t]),x.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Pn,()=>window.scrollY,e?(t,n)=>Fn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),x.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{E(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Ln(e,t){let{capture:n}=t||{};x.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Rn(e,{relative:t}={}){let n=x.useContext(ze);T(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=En(`useViewTransitionState`),i=it(e,{relative:t});if(!n.isTransitioning)return!1;let a=me(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=me(n.nextLocation.pathname,r)||n.nextLocation.pathname;return de(i.pathname,o)!=null||de(i.pathname,a)!=null}var zn=g(),Bn=Object.create,Vn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Un=Object.getOwnPropertyNames,Wn=Object.getPrototypeOf,Gn=Object.prototype.hasOwnProperty,Kn=(e,t)=>function(){return t||(0,e[Un(e)[0]])((t={exports:{}}).exports,t),t.exports},qn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Un(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Gn.call(e,s)&&s!==n&&Vn(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Hn(t,s))||r.enumerable});return e},Jn=(e,t,n)=>(n=e==null?{}:Bn(Wn(e)),qn(t||!e||!e.__esModule?Vn(n,`default`,{value:e,enumerable:!0}):n,e)),Yn=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Xn=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Yn().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Zn=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Yn().default,r=Xn();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Qn=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Zn();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),$n=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Qn();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function er(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(tr,t)}};return t}function tr(e,t){return t(e)}function nr(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function rr(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return er(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function ir(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=er(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function ar(e){return er(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function or(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function sr(){return Object.create(null)}var cr={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};cr.BAD_GATEWAY,cr.SERVICE_UNAVAILABLE,cr.GATEWAY_TIMEOUT,cr.INTERNAL_SERVER_ERROR;var lr=Object.create,ur=Object.defineProperty,dr=Object.getOwnPropertyDescriptor,fr=Object.getOwnPropertyNames,pr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty,hr=(e,t)=>function(){return t||(0,e[fr(e)[0]])((t={exports:{}}).exports,t),t.exports},gr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=fr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!mr.call(e,s)&&s!==n&&ur(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=dr(t,s))||r.enumerable});return e},_r=(e,t,n)=>(n=e==null?{}:lr(pr(e)),gr(t||!e||!e.__esModule?ur(n,`default`,{value:e,enumerable:!0}):n,e)),vr=()=>{},yr=e=>{Object.freeze&&Object.freeze(e)};function br(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(vr,{get(r,i){if(!(typeof i!=`string`||i===`then`))return br(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1],o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),yr(o.args),yr(o.path),e(o)}})),n[r]}var xr=e=>br(e,[],sr()),Sr=e=>new Proxy(vr,{get(t,n){if(n!==`then`)return e(n)}}),Cr=hr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),wr=hr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Cr().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Tr=hr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Cr().default,r=wr();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Er=hr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Tr();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Dr=hr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Er();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});_r(Dr(),1),_r(Er(),1);var Or=_r(Dr(),1);function kr(e,t){if(`error`in e){let n=t.deserialize(e.error);return{ok:!1,error:(0,Or.default)((0,Or.default)({},e),{},{error:n})}}return{ok:!0,result:(0,Or.default)((0,Or.default)({},e.result),(!e.result.type||e.result.type===`data`)&&{type:`data`,data:t.deserialize(e.result.data)})}}var Ar=class extends Error{constructor(){super(`Unable to transform response from server`)}};function jr(e,t){let n;try{n=kr(e,t)}catch{throw new Ar}if(!n.ok&&(!or(n.error.error)||typeof n.error.error.code!=`number`)||n.ok&&!or(n.result))throw new Ar;return n}_r(Dr(),1);var Mr=Jn(Qn(),1),Nr=Jn($n(),1);function Pr(e){return e instanceof Lr}function Fr(e){return or(e)&&or(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function Ir(e,t){return typeof e==`string`?e:or(e)&&typeof e.message==`string`?e.message:t}var Lr=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,Mr.default)(this,`cause`,void 0),(0,Mr.default)(this,`shape`,void 0),(0,Mr.default)(this,`data`,void 0),(0,Mr.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return Pr(r)?(n.meta&&(r.meta=(0,Nr.default)((0,Nr.default)({},r.meta),n.meta)),r):Fr(r)?new e(r.error.message,(0,Nr.default)((0,Nr.default)({},n),{},{result:r,cause:n.cause})):new e(Ir(r,`Unknown error`),(0,Nr.default)((0,Nr.default)({},n),{},{cause:r}))}};function Rr(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var zr=e=>typeof e==`function`;function Br(e){if(e)return e;if(typeof window<`u`&&zr(window.fetch))return window.fetch;if(typeof globalThis<`u`&&zr(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var Vr=Jn($n());function Hr(e){return{url:e.url.toString(),fetch:e.fetch,transformer:Rr(e.transformer),methodOverride:e.methodOverride}}function Ur(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var Wr={query:`GET`,mutation:`POST`,subscription:`PATCH`};function Gr(e){return`input`in e?e.transformer.input.serialize(e.input):Ur(e.inputs.map(t=>e.transformer.input.serialize(t)))}var Kr=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=Gr(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},qr=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=Gr(e);return t===void 0?void 0:JSON.stringify(t)},Jr=e=>Qr((0,Vr.default)((0,Vr.default)({},e),{},{contentTypeHeader:`application/json`,getUrl:Kr,getBody:qr})),Yr=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},Xr=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new Yr};async function Zr(e){Xr(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??Wr[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,Vr.default)((0,Vr.default)((0,Vr.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[e.trpcAcceptHeaderKey??`trpc-accept`]:e.trpcAcceptHeader}:void 0),i);return Br(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}async function Qr(e){let t={},n=await Zr(e);t.response=n;let r=await n.json();return t.responseJSON=r,{json:r,meta:t}}Jn($n(),1);var $r=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function ei(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:$r,reject:$r},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function ti(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}var ni=Jn($n(),1);function ri(e){let t=Hr(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return Kr((0,ni.default)((0,ni.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=ti(...n.map(e=>e.signal)),s=await Jr((0,ni.default)((0,ni.default)({},t),{},{path:r,inputs:a,type:i,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}},signal:o}));return(Array.isArray(s.json)?s.json:n.map(()=>s.json)).map(e=>({meta:s.meta,json:e}))}}),a={query:ei(i(`query`)),mutation:ei(i(`mutation`))};return({op:e})=>er(n=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let r=a[e.type].load(e),i;return r.then(e=>{i=e;let r=jr(e.json,t.transformer.output);if(!r.ok){n.error(Lr.from(r.error,{meta:e.meta}));return}n.next({context:e.meta,result:r.result}),n.complete()}).catch(e=>{n.error(Lr.from(e,{meta:i?.meta}))}),()=>{}})}}Jn($n(),1);var ii=(e,...t)=>typeof e==`function`?e(...t):e;Jn(Qn(),1);function ai(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function oi(e){let t=await ii(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function si(e,t){let n={method:`connectionParams`,data:await ii(e)};return t.encode(n)}Jn(Qn(),1);var ci=Jn(Qn(),1);function li(e){let{promise:t,resolve:n,reject:r}=ai();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function ui(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var di=class e{constructor(t){if((0,ci.default)(this,`id`,++e.connectCount),(0,ci.default)(this,`WebSocketPonyfill`,void 0),(0,ci.default)(this,`urlOptions`,void 0),(0,ci.default)(this,`keepAliveOpts`,void 0),(0,ci.default)(this,`encoder`,void 0),(0,ci.default)(this,`wsObservable`,ir(null)),(0,ci.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=oi(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&ui(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await li(e),t.urlOptions.connectionParams&&e.send(await si(t.urlOptions.connectionParams,t.encoder))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,ci.default)(di,`connectCount`,0),Jn(Qn(),1),Jn($n(),1);var fi=Jn(Qn(),1),pi=Jn($n(),1),mi=class{constructor(e){(0,fi.default)(this,`links`,void 0),(0,fi.default)(this,`runtime`,void 0),(0,fi.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return ar({links:this.links,op:(0,pi.default)((0,pi.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(rr())}async requestAsPromise(e){var t=this;try{return(await nr(t.$request(e))).result.data}catch(e){throw Lr.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},hi=Symbol.for(`trpc_untypedClient`),gi={query:`query`,mutate:`mutation`,subscribe:`subscription`},_i=e=>gi[e];function vi(e){let t=xr(({path:t,args:n})=>{let r=[...t],i=_i(r.pop()),a=r.join(`.`);return e[i](a,...n)});return Sr(n=>n===hi?e:t[n])}function yi(e){return vi(new mi(e))}Jn($n(),1),Jn($n(),1),Jn(Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),Jn($n(),1);var bi=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),xi=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Si=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=xi();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ci=Kn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=xi();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Jn(bi(),1),Jn(Si(),1),Jn(Ci(),1),Jn($n(),1);var z=yi({links:[ri({url:`/trpc`})]});async function wi(){return await z.controlPlane.state.query()}async function Ti(e){return await z.controlPlane.session.query({id:e})}async function Ei(){return await z.controlPlane.modelOptions.query()}async function Di(e,t){return await z.controlPlane.sessionSettingsUpdate.mutate({id:e,...t})}async function Oi(e){return await z.controlPlane.sessionCreate.mutate(e?{name:e}:void 0)}async function ki(e,t){return await z.controlPlane.sessionTurnReview.query({sessionId:e,turnId:t})}async function Ai(e,t){return await z.controlPlane.sessionSendPrompt.mutate({sessionId:e,prompt:t})}async function ji(e){return await z.controlPlane.sessionContinue.mutate({id:e})}async function Mi(e){return await z.controlPlane.sessionPendingApproval.query({id:e})}async function Ni(e){return await z.controlPlane.sessionRunning.query({id:e})}async function B(e){return await z.controlPlane.sessionCancel.mutate({id:e})}async function Pi(e,t,n){return await z.controlPlane.sessionResolveApproval.mutate({sessionId:e,approved:t,reason:n})}async function Fi(e){return(await z.controlPlane.workspaceFileSearch.query({query:e,limit:20})).files}async function Ii(e,t=!1){return await z.controlPlane.workspaceBrowse.query(e?{path:e,limit:100,includeHidden:t}:{limit:100,includeHidden:t})}async function Li(){return await z.controlPlane.workspaceChanges.query()}async function Ri(e){return await z.controlPlane.workspaceFileDiff.query({path:e})}async function zi(e){return await z.controlPlane.layoutSnapshotSave.mutate({snapshot:e})}async function Bi(e){return await z.controlPlane.heartbeatTaskEnable.mutate({taskId:e})}async function Vi(e){return await z.controlPlane.heartbeatTaskDisable.mutate({taskId:e})}async function Hi(e){return await z.controlPlane.heartbeatTaskTrigger.mutate({taskId:e})}async function Ui(e){return await z.controlPlane.workspaceSetActive.mutate({workspaceId:e})}async function Wi(e){return await z.controlPlane.workspaceCreate.mutate(e)}async function Gi(e,t){return await z.controlPlane.workspaceRename.mutate({workspaceId:e,name:t})}function Ki(e,t){let n=new EventSource(`/control-plane/sessions/${encodeURIComponent(e)}/events`),r=n=>r=>{try{let i=JSON.parse(r.data);t({type:n,sessionId:i.sessionId??e,timestamp:i.timestamp,event:i.event})}catch{t({type:n,sessionId:e})}};return n.addEventListener(`ready`,r(`ready`)),n.addEventListener(`waiting`,r(`waiting`)),n.addEventListener(`heartbeat`,r(`heartbeat`)),n.addEventListener(`session.updated`,r(`session.updated`)),n.addEventListener(`session.event`,r(`session.event`)),()=>{n.close()}}function qi(){let[e,t]=(0,x.useState)(),[n,r]=(0,x.useState)(),i=(0,x.useRef)(void 0),a=(0,x.useCallback)(async()=>{try{let e=await wi(),n=JSON.stringify(e);i.current!==n&&(i.current=n,t(e)),r(void 0)}catch(e){r(e instanceof Error?e.message:String(e))}},[]),o=(0,x.useCallback)(async e=>{await Ui(e),await a()},[a]),s=(0,x.useCallback)(async e=>{await Wi(e),await a()},[a]),c=(0,x.useCallback)(async(e,t)=>{await Gi(e,t),await a()},[a]);return(0,x.useEffect)(()=>{let e=!0;async function t(){if(e)try{await a()}catch{if(!e)return}}t();let n=window.setInterval(()=>{t()},1e4);return()=>{e=!1,window.clearInterval(n)}},[a]),{state:e,error:n,refresh:a,setActiveWorkspace:o,createWorkspace:s,renameWorkspace:c}}function Ji(e){return Qi(e,`/overview`)?`overview`:Qi(e,`/tasks`)?`tasks`:Qi(e,`/workspaces`)?`workspaces`:`sessions`}function Yi(e){return e===`overview`?`/overview`:e===`tasks`?`/tasks`:e===`workspaces`?`/workspaces`:`/sessions`}function Xi(e){return de(`/sessions/:sessionId/*`,e)?.params.sessionId}function Zi(e){return e===`/`||Qi(e,`/overview`)||Qi(e,`/sessions`)||Qi(e,`/tasks`)||Qi(e,`/workspaces`)}function Qi(e,t){return e===t||e.startsWith(`${t}/`)}function $i(){let e=$e(),t=nt(),n=Ji(e.pathname),r=(0,x.useMemo)(()=>{if(n===`sessions`)return Xi(e.pathname)},[e.pathname,n]),i=(0,x.useCallback)(e=>{t(Yi(e))},[t]),a=(0,x.useCallback)(e=>{if(!e){n===`sessions`&&t(`/sessions`,{replace:!0});return}t(`/sessions/${encodeURIComponent(e)}`)},[t,n]),o=(0,x.useCallback)(()=>{(e.pathname===`/`||!Zi(e.pathname))&&t(`/overview`,{replace:!0})},[e.pathname,t]);return(0,x.useMemo)(()=>({section:n,routeSessionId:r,setSection:i,setRouteSessionId:a,normalizeRoute:o}),[o,r,n,a,i])}var ea=[`.workspace-shell`,`.mobile-session-screen`,`.mobile-chat-pane`,`.conversation-scroll`,`.composer-shell`,`.approval-card`,`.approval-card .code-block`,`.approval-actions`,`.approval-actions button`,`.mention-menu`,`.toast-viewport`,`[role="dialog"]`,`[aria-modal="true"]`],ta=[`button`,`a[href]`,`input`,`textarea`,`select`,`[tabindex]:not([tabindex="-1"])`].join(`,`);async function na(e){let t=ia(),n=aa(),r=Array.from(document.querySelectorAll(ta)).slice(0,80).map((e,t)=>oa(e,pa(e,t))).filter(e=>!!e),i=e.screenshot===`auto`?await ca():{status:`unavailable`,reason:`Screenshot capture was not requested.`};return{version:1,capturedAt:new Date().toISOString(),url:window.location.href,title:document.title,viewport:ra(),appState:la(e.context),dom:{html:va(ya(document.documentElement.outerHTML),24e4),activeElement:document.activeElement?oa(document.activeElement,`document.activeElement`):void 0,landmarks:t,scrollContainers:n,focusableElements:r,problemChecks:sa(t,n,r)},screenshot:i}}function ra(){let e=window.visualViewport?{width:window.visualViewport.width,height:window.visualViewport.height,offsetTop:window.visualViewport.offsetTop,offsetLeft:window.visualViewport.offsetLeft,scale:window.visualViewport.scale}:void 0;return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,visualViewport:e,devicePixelRatio:window.devicePixelRatio,userAgent:window.navigator.userAgent,orientation:screen.orientation?.type}}function ia(){return ea.flatMap(e=>Array.from(document.querySelectorAll(e)).slice(0,12).map((t,n)=>oa(t,n===0?e:`${e}:nth-match(${n+1})`)).filter(e=>!!e))}function aa(){return Array.from(document.querySelectorAll(`body, body *`)).filter(e=>{let t=window.getComputedStyle(e),n=e.scrollHeight>e.clientHeight+1,r=e.scrollWidth>e.clientWidth+1;return n||r||/(auto|scroll|hidden|clip)/.test(`${t.overflowX} ${t.overflowY}`)}).slice(0,120).map((e,t)=>{let n=window.getComputedStyle(e);return{selector:pa(e,t),rect:ga(e.getBoundingClientRect()),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth,overflowX:n.overflowX,overflowY:n.overflowY,canScrollY:e.scrollHeight>e.clientHeight+1,atTop:e.scrollTop<=1,atBottom:e.scrollTop+e.clientHeight>=e.scrollHeight-1}})}function oa(e,t){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return;let n=window.getComputedStyle(e),r=e.getBoundingClientRect();return{selector:t,tagName:e.tagName.toLowerCase(),textPreview:da(e),role:e.getAttribute(`role`)??void 0,ariaLabel:e.getAttribute(`aria-label`)??void 0,className:typeof e.className==`string`?e.className:void 0,rect:ga(r),computed:{display:n.display,visibility:n.visibility,position:n.position,overflow:n.overflow,overflowX:n.overflowX,overflowY:n.overflowY,zIndex:n.zIndex,pointerEvents:n.pointerEvents},visibleInViewport:ha(r),clippedByAncestors:fa(e)}}function sa(e,t,n){let r=[],i=window.visualViewport?.height??window.innerHeight,a=n.filter(e=>e.selector.includes(`button`)&&/approve|deny/i.test(e.textPreview??``));for(let e of a)e.rect.bottom>i&&!ma(t)&&r.push({id:`approval-action-unreachable`,severity:`high`,selector:e.selector,message:`Approval action is below the visual viewport and no captured scroll container appears able to scroll further.`}),e.clippedByAncestors.length>0&&r.push({id:`interactive-control-clipped`,severity:`high`,selector:e.selector,message:`Interactive control may be clipped by ${e.clippedByAncestors.join(`, `)}.`});let o=e.find(e=>e.selector===`.composer-shell`);o&&window.innerWidth<=760&&o.rect.height>i*.62&&r.push({id:`composer-exceeds-mobile-viewport`,severity:`medium`,selector:`.composer-shell`,message:`Composer consumes more than 62% of the visual viewport on mobile.`});for(let e of n)/approve|deny|send|continue|cancel|submit|save/i.test(`${e.textPreview??``} ${e.ariaLabel??``} ${e.selector}`)&&(e.rect.width<=0||e.rect.height<=0||e.computed.display===`none`||e.computed.visibility===`hidden`)&&r.push({id:`hidden-or-zero-size-control`,severity:`medium`,selector:e.selector,message:`Focusable control is hidden or has zero rendered size.`});return r}async function ca(){if(!navigator.mediaDevices?.getDisplayMedia)return{status:`unavailable`,reason:`Browser does not support getDisplayMedia screenshot capture.`};let e;try{e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:`browser`},audio:!1});let t=document.createElement(`video`);t.srcObject=e,t.muted=!0,await t.play(),await new Promise(e=>{if(t.videoWidth>0&&t.videoHeight>0){e();return}t.onloadedmetadata=()=>e()});let n=document.createElement(`canvas`);n.width=t.videoWidth,n.height=t.videoHeight;let r=n.getContext(`2d`);return r?(r.drawImage(t,0,0,n.width,n.height),{status:`captured`,kind:`screen-capture-frame`,dataUrl:n.toDataURL(`image/png`),width:n.width,height:n.height}):{status:`failed`,reason:`Could not create a canvas context for screenshot capture.`}}catch(e){return{status:`failed`,reason:e instanceof Error?e.message:String(e)}}finally{e?.getTracks().forEach(e=>e.stop())}}function la(e){let t=e.pendingApproval?{tool:e.pendingApproval.tool,callId:e.pendingApproval.callId,inputSummary:ua(e.pendingApproval.input)}:null;return{...e,pendingApproval:t,latestToasts:e.latestToasts?.slice(-5),errors:e.errors?.filter(Boolean).slice(-8)}}function ua(e){let t=_a(e),n=e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e).slice(0,20):void 0;return{type:Array.isArray(e)?`array`:typeof e,approxBytes:new Blob([t]).size,keys:n,preview:va(ya(t),900)}}function da(e){let t=e.textContent?.replace(/\s+/g,` `).trim();return t?va(ya(t),240):void 0}function fa(e){let t=[],n=e.parentElement;for(;n&&n!==document.body&&t.length<8;){let e=window.getComputedStyle(n);/(hidden|clip)/.test(`${e.overflowX} ${e.overflowY}`)&&t.push(pa(n,t.length)),n=n.parentElement}return t}function pa(e,t){if(e.id)return`#${CSS.escape(e.id)}`;let n=typeof e.className==`string`?e.className.trim().split(/\s+/).filter(Boolean).slice(0,3):[];return n.length>0?`${e.tagName.toLowerCase()}.${n.map(e=>CSS.escape(e)).join(`.`)}`:`${e.tagName.toLowerCase()}:nth-of-type(${t+1})`}function ma(e){return e.some(e=>e.canScrollY&&!e.atBottom)}function ha(e){let t=window.visualViewport?.width??window.innerWidth,n=window.visualViewport?.height??window.innerHeight;return e.width>0&&e.height>0&&e.bottom>0&&e.right>0&&e.top<n&&e.left<t}function ga(e){return{x:ba(e.x),y:ba(e.y),width:ba(e.width),height:ba(e.height),top:ba(e.top),right:ba(e.right),bottom:ba(e.bottom),left:ba(e.left)}}function _a(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function va(e,t){return e.length>t?`${e.slice(0,t)}\n...[truncated ${e.length-t} chars]`:e}function ya(e){return e.replace(/(sk-[A-Za-z0-9_-]{12,})/g,`[redacted-openai-key]`).replace(/(gh[pousr]_[A-Za-z0-9_]{20,})/g,`[redacted-github-token]`).replace(/(AKIA[0-9A-Z]{16})/g,`[redacted-aws-key]`).replace(/("?(?:api[_-]?key|token|secret|password)"?\s*[:=]\s*)"[^"]+"/gi,`$1"[redacted]"`)}function ba(e){return Math.round(e*100)/100}function xa({section:e,sessionsState:t,error:n,toasts:r,notify:i}){return(0,x.useCallback)(async a=>{let o;try{o=await na({screenshot:a,context:{activeTab:e,selectedSessionId:t.selectedSessionId,selectedTurnId:t.selectedTurnId,runActive:t.sendingPrompt||t.runInFlight,pendingApproval:t.pendingApproval,selectedModel:t.sessionDetail?.model??t.activeSession?.model,driftEnabled:t.sessionDetail?.driftEnabled??t.activeSession?.driftEnabled,driftLevel:t.sessionDetail?.driftLevel??t.activeSession?.driftLevel,toastCount:r.length,latestToasts:r.map(e=>({title:e.title,tone:e.tone})),errors:[n,t.sessionDetailError,t.sendPromptError,t.turnReviewError].filter(e=>!!e)}});let s=await zi(o);i({title:`Layout snapshot saved`,body:s.screenshotPath?`${s.jsonPath}\n${s.screenshotPath}`:s.jsonPath,tone:`success`})}catch(e){let t=e instanceof Error?e.message:String(e);o&&Sa(o),i({title:o?`Layout snapshot downloaded`:`Layout snapshot failed`,body:o?`Server save failed, downloaded locally. ${t}`:t,tone:o?`info`:`error`})}},[n,i,e,t,r])}function Sa(e){let t=`${e.capturedAt.replaceAll(`:`,`-`)}-${e.appState.activeTab}`;Ca(`${t}.json`,`${JSON.stringify(e,null,2)}\n`,`application/json`),e.screenshot.status===`captured`&&wa(`${t}.png`,e.screenshot.dataUrl)}function Ca(e,t,n){let r=new Blob([t],{type:n}),i=URL.createObjectURL(r);try{Ta(e,i)}finally{URL.revokeObjectURL(i)}}function wa(e,t){Ta(e,t)}function Ta(e,t){let n=document.createElement(`a`);n.href=t,n.download=e,document.body.append(n),n.click(),n.remove()}var Ea=`(max-width: 760px)`;function Da(){let[e,t]=(0,x.useState)(()=>Oa(Ea));return(0,x.useEffect)(()=>{let e=window.matchMedia(Ea),n=()=>t(e.matches);return n(),e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e}function Oa(e){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(e).matches}function ka(e,t,n,r){let[i,a]=(0,x.useState)(),[o,s]=(0,x.useState)(),[c,l]=(0,x.useState)(null),[u,d]=(0,x.useState)(!1),[f,p]=(0,x.useState)(),[m,h]=(0,x.useState)(!1),[g,_]=(0,x.useState)(),[v,y]=(0,x.useState)(null),[b,S]=(0,x.useState)(!1),[C,w]=(0,x.useState)(),[T,E]=(0,x.useState)(null),[D,O]=(0,x.useState)(!1),[ee,k]=(0,x.useState)(!1),[te,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(),N=r?.selectedSessionId??i,P=r?.onSelectedSessionIdChange??a,F=r?.autoSelectSession??!0,ne=(0,x.useRef)(n);(0,x.useEffect)(()=>{ne.current=n},[n]);let re=(0,x.useCallback)(e=>{l(t=>{if(!t)return t;let n=t.messages.filter(e=>e.id!==`live-user`&&e.id!==`live-assistant`&&e.id!==`live-run-status`);return{...t,messages:[...n,{id:`live-user`,role:`user`,text:e},{id:`live-run-status`,role:`assistant`,text:`Heddle is working…`,isStreaming:!0,isPending:!0}]}})},[]),ie=(0,x.useCallback)((e,t,n)=>{l(r=>{if(!r)return r;let i=[...r.messages],a=i.findIndex(t=>t.id===e),o={id:e,role:`assistant`,text:t,isPending:n?.pending,isStreaming:n?.streaming};return a>=0?i[a]=o:i.push(o),{...r,messages:i}})},[]),I=(0,x.useCallback)(e=>{l(t=>t&&{...t,messages:t.messages.filter(t=>t.id!==e)})},[]),L=(0,x.useCallback)((e,t)=>{l(n=>{if(!n)return n;let r=n.messages.filter(e=>e.id!==`live-run-status`),i=r.at(-1);return i?.id===`live-assistant`&&i.role===`assistant`?r[r.length-1]={...i,text:e,isStreaming:!t,isPending:!t}:r.push({id:`live-assistant`,role:`assistant`,text:e,isStreaming:!t,isPending:!t}),{...n,messages:r}})},[]);(0,x.useEffect)(()=>{if(F){if(!e?.length){if(N&&c?.id===N)return;P(void 0);return}N&&c?.id===N||(!N||!e.some(e=>e.id===N))&&P(e[0].id)}},[F,N,c?.id,e,P]);let R=(0,x.useCallback)(e=>{P(e),s(void 0),M(void 0),_(void 0)},[P]);(0,x.useEffect)(()=>{if(!N){l(null),p(void 0);return}let e=N,t=!1,n;async function r(n={}){n.silent||d(!0);try{let r=await Ti(e);t||(l(e=>n.silent?Aa(e,r):r),p(void 0))}catch(e){t||p(e instanceof Error?e.message:String(e))}finally{!t&&!n.silent&&d(!1)}}r(),Ni(e).then(e=>O(e.running));let i=Ki(e,i=>{if(i.type===`session.updated`){n!==void 0&&window.clearTimeout(n),n=window.setTimeout(()=>{Ni(e).then(e=>{t||O(e.running)}),r({silent:!0}),ne.current?.()},300);return}if(i.type!==`session.event`||!i.event||typeof i.event!=`object`)return;let a=i.event;if(a.status===`running`){ie(`live-run-status`,a.archivePath?`Compacting earlier history… ${a.archivePath}`:`Compacting earlier history…`,{pending:!0,streaming:!1});return}if(a.status===`failed`){ie(`live-run-status`,a.error?`Compaction failed: ${a.error}`:`Compaction failed.`,{pending:!1,streaming:!1});return}if(a.status===`finished`){ie(`live-run-status`,a.summaryPath?`Compaction finished. Summary: ${a.summaryPath}`:`Compaction finished.`,{pending:!1,streaming:!1});return}if(a.type===`loop.started`){O(!0),ie(`live-run-status`,`Run started…`,{pending:!0,streaming:!0});return}if(a.type===`tool.calling`&&typeof a.tool==`string`){ie(`live-run-status`,`Working… running ${a.tool}${typeof a.step==`number`?` (step ${a.step})`:``}`,{pending:!0,streaming:!0});return}if(a.type===`tool.completed`&&typeof a.tool==`string`){ie(`live-run-status`,`${a.tool} finished${typeof a.durationMs==`number`?` in ${Math.round(a.durationMs)}ms`:``}`,{pending:!1,streaming:!1});return}if(a.type===`trace`&&a.event){let t=a.event;if(t.type===`memory.maintenance_started`){k(!0),ie(`live-run-status`,`Memory updating… ${t.candidateIds.length} candidate${t.candidateIds.length===1?``:`s`}`,{pending:!0,streaming:!1});return}if(t.type===`memory.maintenance_finished`){k(!1),ie(`live-run-status`,t.summary?`Memory updated. ${t.summary}`:`Memory updated.`,{pending:!1,streaming:!1}),r({silent:!0});return}if(t.type===`memory.maintenance_failed`){k(!1),ie(`live-run-status`,t.error?`Memory update failed: ${t.error}`:`Memory update failed.`,{pending:!1,streaming:!1});return}if(t.type===`tool.approval_requested`){Mi(e).then(e=>E(e)),ie(`live-run-status`,`Approval requested for ${t.call.tool}${typeof t.step==`number`?` (step ${t.step})`:``}`,{pending:!0,streaming:!1});return}if(t.type===`tool.approval_resolved`){E(null),ie(`live-run-status`,`Approval ${t.approved?`granted`:`denied`} for ${t.call.tool}${t.reason?` — ${t.reason}`:``}`,{pending:!1,streaming:!1});return}if(t.type===`tool.fallback`){ie(`live-run-status`,`Fallback: ${t.fromCall.tool} → ${t.toCall.tool}`,{pending:!0,streaming:!1});return}}if(a.type===`assistant.stream`&&typeof a.text==`string`){L(a.text,!!a.done),a.done&&I(`live-run-status`);return}a.type===`loop.finished`&&(O(!1),I(`live-run-status`),r())});return()=>{t=!0,n!==void 0&&window.clearTimeout(n),i()}},[I,N,L,ie]),(0,x.useEffect)(()=>{let e=c?.turns.at(-1)?.id;if(!c){s(void 0);return}if(!e){s(void 0);return}(!o||!c.turns.some(e=>e.id===o))&&s(e)},[o,c]);let ae=(0,x.useMemo)(()=>e?.find(e=>e.id===N),[N,e]),oe=(0,x.useMemo)(()=>c?.turns.find(e=>e.id===o)??c?.turns.at(-1),[o,c]);(0,x.useEffect)(()=>{if(!c?.id||!o){y(null),w(void 0);return}let e=c.id,t=o,n=!1;S(!0);async function r(){try{let r=await ki(e,t);n||(y(r),w(void 0))}catch(e){n||w(e instanceof Error?e.message:String(e))}finally{n||S(!1)}}return r(),()=>{n=!0}},[o,c?.id,oe?.traceFile]);let se=(0,x.useCallback)(async e=>{if(!(!N||!T))try{await Pi(N,e,e?`Approved in web control plane`:`Denied in web control plane`),E(null),t?.({title:e?`Approval granted`:`Approval denied`,body:T.tool,tone:e?`success`:`info`})}catch(e){t?.({title:`Approval failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[t,T,N]),ce=(0,x.useCallback)(async()=>{A(!0),M(`Creating a new session…`);try{let e=await Oi();P(e.id),l(e),s(void 0),y(null),E(null),O(!1),_(void 0),p(void 0),M(`Created ${e.name}. Ready for a fresh prompt.`),t?.({title:`Session created`,body:`${e.name} is ready for a fresh prompt.`,tone:`success`})}catch(e){let n=e instanceof Error?e.message:String(e);M(n),t?.({title:`Session creation failed`,body:n,tone:`error`})}finally{A(!1)}},[t,P]);return{activeSession:ae,selectedSessionId:N,setSelectedSessionId:R,sessionDetail:c,sessionDetailLoading:u,sessionDetailError:f,sendingPrompt:m,runInFlight:D,memoryUpdating:ee,sendPromptError:g,sendPrompt:(0,x.useCallback)(async e=>{let n=e.trim();if(!(!N||!n||m)){h(!0),O(!0),_(void 0),re(n);try{let e=await Ai(N,n);l(e.session);let t=e.session?.turns.at(-1)?.id;t&&s(t),O(!1)}catch(e){let n=e instanceof Error?e.message:String(e);_(n),O(!1),t?.({title:`Send failed`,body:n,tone:`error`})}finally{h(!1)}}},[re,t,N,m]),creatingSession:te,sessionNotice:j,createSession:ce,continueSession:(0,x.useCallback)(async()=>{if(!(!N||m||D)){h(!0),O(!0),_(void 0),ie(`live-run-status`,`Continuing from the current transcript…`,{pending:!0,streaming:!0});try{let e=await ji(N);l(e.session);let t=e.session?.turns.at(-1)?.id;t&&s(t),E(await Mi(N)),O(!1)}catch(e){let n=e instanceof Error?e.message:String(e);_(n),O(!1),t?.({title:`Continue failed`,body:n,tone:`error`}),I(`live-run-status`),l(e=>e&&{...e,messages:e.messages.filter(e=>e.id!==`live-assistant`)})}finally{h(!1)}}},[t,I,D,N,m,ie]),cancelSessionRun:(0,x.useCallback)(async()=>{if(!(!N||!D))try{let e=await B(N);O(!1),E(null),I(`live-run-status`),_(void 0),l(e=>e&&{...e,messages:e.messages.filter(e=>e.id!==`live-user`&&e.id!==`live-assistant`)}),t?.({title:e.cancelled?`Run cancelled`:`No active run to cancel`,body:e.cancelled?`The active session run was interrupted.`:void 0,tone:e.cancelled?`success`:`info`})}catch(e){t?.({title:`Cancel failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[t,I,D,N]),updateSessionSettings:(0,x.useCallback)(async e=>{if(!(!N||D||m))try{l(await Di(N,e)),t?.({title:`Session settings updated`,body:[e.model?`model ${e.model}`:void 0,typeof e.driftEnabled==`boolean`?`drift ${e.driftEnabled?`on`:`off`}`:void 0].filter(Boolean).join(`, `),tone:`success`})}catch(e){t?.({title:`Settings update failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[t,D,N,m]),pendingApproval:T,resolveApproval:se,selectedTurnId:o,setSelectedTurnId:s,selectedTurn:oe,turnReview:v,turnReviewLoading:b,turnReviewError:C}}function Aa(e,t){if(!e||!t||e.id!==t.id)return t;let n=e.messages.filter(e=>e.id.startsWith(`live-`));if(!n.length)return t;let r=new Set(t.messages.map(e=>e.id));return{...t,messages:[...t.messages,...n.filter(e=>!r.has(e.id))]}}function ja(e,t,n,r){let[i,a]=(0,x.useState)(),[o,s]=(0,x.useState)(),[c,l]=(0,x.useState)();(0,x.useEffect)(()=>{if(!e?.length){a(void 0);return}(!i||!e.some(e=>e.taskId===i))&&a(e[0].taskId)},[i,e]);let u=(0,x.useMemo)(()=>!t||!i?[]:t.filter(e=>e.taskId===i),[t,i]);(0,x.useEffect)(()=>{if(!u.length){s(void 0);return}(!o||!u.some(e=>e.id===o))&&s(u[0].id)},[o,u]);let d=(0,x.useMemo)(()=>e?.find(e=>e.taskId===i),[i,e]),f=(0,x.useMemo)(()=>u.find(e=>e.id===o)??u[0],[o,u]),p=(0,x.useCallback)(async(e,t,i)=>{if(!(!e||c)){l({taskId:e,action:t});try{let a=await i(e);r?.(),n?.({title:t===`enable`?`Task resumed`:t===`disable`?`Task paused`:`Task triggered`,body:t===`trigger`?`${a.task.taskId} was queued for the next worker poll.`:`${a.task.taskId} is now ${a.task.enabled?`enabled`:`disabled`}.`,tone:`success`})}catch(e){n?.({title:`Task action failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{l(void 0)}}},[n,r,c]);return{selectedTaskId:i,setSelectedTaskId:a,selectedTask:d,selectedTaskRuns:u,selectedRunId:o,setSelectedRunId:s,selectedRun:f,pendingTaskAction:c,enableTask:(0,x.useCallback)(async e=>{await p(e,`enable`,Bi)},[p]),disableTask:(0,x.useCallback)(async e=>{await p(e,`disable`,Vi)},[p]),triggerTask:(0,x.useCallback)(async e=>{await p(e,`trigger`,Hi)},[p])}}function Ma({state:e,setActiveWorkspace:t,createWorkspace:n,renameWorkspace:r,notify:i}){let[a,o]=(0,x.useState)(!1),[s,c]=(0,x.useState)();return{creatingWorkspace:a,renamingWorkspaceId:s,switchWorkspace:(0,x.useCallback)(async n=>{try{await t(n),i({title:`Workspace switched`,body:e?.workspaces.find(e=>e.id===n)?.name??n,tone:`success`})}catch(e){i({title:`Workspace switch failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[i,t,e?.workspaces]),createWorkspace:(0,x.useCallback)(async e=>{o(!0);try{await n(e),i({title:`Workspace created`,body:e.name,tone:`success`})}catch(e){i({title:`Workspace creation failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{o(!1)}},[n,i]),renameWorkspace:(0,x.useCallback)(async(e,t)=>{c(e);try{await r(e,t),i({title:`Workspace renamed`,body:t,tone:`success`})}catch(e){i({title:`Workspace rename failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{c(void 0)}},[i,r])}}function Na(...e){return e.filter(Boolean).join(` `)}function Pa(e){if(e){if(e===`complete`||e===`continue`||e===`done`||e===`idle`||e===`enabled`)return`good`;if(e===`blocked`||e===`escalate`||e===`waiting`||e===`paused`)return`warn`;if(e===`failed`||e===`error`)return`bad`}}function Fa(e){return e?new Date(e).toLocaleString():`none`}function Ia(e){return e?new Date(e).toLocaleDateString():`—`}function La(e,t=220){return e.length>t?`${e.slice(0,t-1)}…`:e}function Ra(e){return e.split(`/`).filter(Boolean).slice(-3).join(`/`)}function za(e){return typeof e==`number`?e.toLocaleString():`—`}function Ba(e){let t=Math.max(1,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function Va(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=Ua(t,[`inputTokens`,`input_tokens`,`promptTokens`,`prompt_tokens`]),r=Ua(t,[`outputTokens`,`output_tokens`,`completionTokens`,`completion_tokens`]),i=Ua(t,[`totalTokens`,`total_tokens`]),a=[n===void 0?void 0:`in ${n.toLocaleString()}`,r===void 0?void 0:`out ${r.toLocaleString()}`,i===void 0?void 0:`total ${i.toLocaleString()}`].filter(e=>!!e);return a.length?a.join(` • `):void 0}function Ha(e){if(e.status===`running`)return{label:`running now`,tone:`good`,detail:`The task is actively executing a heartbeat wake cycle.`};if(!e.enabled)return{label:`paused`,tone:`warn`,detail:`The task is disabled and will not run until resumed.`};if(e.status===`complete`)return{label:`finished`,tone:`good`,detail:`The task reached a terminal complete decision and stopped scheduling.`};if(e.status===`blocked`)return{label:`blocked`,tone:`warn`,detail:`The task escalated and is waiting for human follow-up.`};if(e.status===`failed`)return{label:`failed`,tone:`bad`,detail:`The last wake failed. It will retry according to the next run schedule.`};if(e.status===`waiting`){let t=e.nextRunAt?Date.parse(e.nextRunAt):NaN;return Number.isFinite(t)&&t<=Date.now()+1e3?{label:`queued`,tone:`warn`,detail:`The task is queued and will start on the next worker poll.`}:{label:`scheduled`,tone:`good`,detail:`The task is waiting for its next scheduled wake time.`}}return{label:e.status??`idle`,tone:Pa(e.status),detail:`The task is currently idle.`}}function Ua(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}}function Wa(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wa(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ga(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wa(e))&&(r&&(r+=` `),r+=t);return r}var Ka=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qa=Ga,Ja=(e,t)=>n=>{if(t?.variants==null)return qa(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ka(t)||Ka(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qa(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ya=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Xa=(e,t)=>({classGroupId:e,validator:t}),Za=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa=`-`,$a=[],eo=`arbitrary..`,to=e=>{let t=io(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ro(e);let n=e.split(Qa);return no(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ya(i,t):t:i||$a}return n[e]||$a}}},no=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=no(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Qa):e.slice(t).join(Qa),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ro=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?eo+r:void 0})(),io=e=>{let{theme:t,classGroups:n}=e;return ao(n,t)},ao=(e,t)=>{let n=Za();for(let r in e){let i=e[r];oo(i,n,r,t)}return n},oo=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];so(i,t,n,r)}},so=(e,t,n,r)=>{if(typeof e==`string`){co(e,t,n);return}if(typeof e==`function`){lo(e,t,n,r);return}uo(e,t,n,r)},co=(e,t,n)=>{let r=e===``?t:fo(t,e);r.classGroupId=n},lo=(e,t,n,r)=>{if(V(e)){oo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Xa(n,e))},uo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];oo(o,fo(t,a),n,r)}},fo=(e,t)=>{let n=e,r=t.split(Qa),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Za(),n.nextPart.set(t,i)),n=i}return n},V=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,po=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},mo=`!`,ho=`:`,go=[],_o=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),vo=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ho){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(mo)?(c=s.slice(0,-1),l=!0):s.startsWith(mo)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return _o(t,l,c,u)};if(t){let e=t+ho,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):_o(go,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},yo=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},bo=e=>({cache:po(e.cacheSize),parseClassName:vo(e),sortModifiers:yo(e),...to(e)}),xo=/\s+/,So=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(xo),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+mo:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Co=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=wo(n))&&(i&&(i+=` `),i+=r);return i},wo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=wo(e[r]))&&(n&&(n+=` `),n+=t);return n},To=(e,...t)=>{let n,r,i,a,o=o=>(n=bo(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=So(e,n);return i(e,a),a};return a=o,(...e)=>a(Co(...e))},Eo=[],Do=e=>{let t=t=>t[e]||Eo;return t.isThemeGetter=!0,t},Oo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ko=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ao=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,No=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Io=e=>Ao.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),Lo=e=>!!e&&Number.isInteger(Number(e)),Ro=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),zo=e=>jo.test(e),Bo=()=>!0,Vo=e=>Mo.test(e)&&!No.test(e),Ho=()=>!1,Uo=e=>Po.test(e),Wo=e=>Fo.test(e),Go=e=>!U(e)&&!W(e),Ko=e=>ss(e,ds,Ho),U=e=>Oo.test(e),qo=e=>ss(e,fs,Vo),Jo=e=>ss(e,ps,H),Yo=e=>ss(e,hs,Bo),Xo=e=>ss(e,ms,Ho),Zo=e=>ss(e,ls,Ho),Qo=e=>ss(e,us,Wo),$o=e=>ss(e,gs,Uo),W=e=>ko.test(e),es=e=>cs(e,fs),ts=e=>cs(e,ms),ns=e=>cs(e,ls),rs=e=>cs(e,ds),is=e=>cs(e,us),as=e=>cs(e,gs,!0),os=e=>cs(e,hs,!0),ss=(e,t,n)=>{let r=Oo.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cs=(e,t,n=!1)=>{let r=ko.exec(e);return r?r[1]?t(r[1]):n:!1},ls=e=>e===`position`||e===`percentage`,us=e=>e===`image`||e===`url`,ds=e=>e===`length`||e===`size`||e===`bg-size`,fs=e=>e===`length`,ps=e=>e===`number`,ms=e=>e===`family-name`,hs=e=>e===`number`||e===`weight`,gs=e=>e===`shadow`,_s=To(()=>{let e=Do(`color`),t=Do(`font`),n=Do(`text`),r=Do(`font-weight`),i=Do(`tracking`),a=Do(`leading`),o=Do(`breakpoint`),s=Do(`container`),c=Do(`spacing`),l=Do(`radius`),u=Do(`shadow`),d=Do(`inset-shadow`),f=Do(`text-shadow`),p=Do(`drop-shadow`),m=Do(`blur`),h=Do(`perspective`),g=Do(`aspect`),_=Do(`ease`),v=Do(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),W,U],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[W,U,c],T=()=>[Io,`full`,`auto`,...w()],E=()=>[Lo,`none`,`subgrid`,W,U],D=()=>[`auto`,{span:[`full`,Lo,W,U]},Lo,W,U],O=()=>[Lo,`auto`,W,U],ee=()=>[`auto`,`min`,`max`,`fr`,W,U],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],te=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[Io,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[Io,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[Io,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,W,U],F=()=>[...b(),ns,Zo,{position:[W,U]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,rs,Ko,{size:[W,U]}],ie=()=>[Ro,es,qo],I=()=>[``,`none`,`full`,l,W,U],L=()=>[``,H,es,qo],R=()=>[`solid`,`dashed`,`dotted`,`double`],ae=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],oe=()=>[H,Ro,ns,Zo],se=()=>[``,`none`,m,W,U],ce=()=>[`none`,H,W,U],le=()=>[`none`,H,W,U],ue=()=>[H,W,U],de=()=>[Io,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[zo],breakpoint:[zo],color:[Bo],container:[zo],"drop-shadow":[zo],ease:[`in`,`out`,`in-out`],font:[Go],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[zo],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[zo],shadow:[zo],spacing:[`px`,H],text:[zo],"text-shadow":[zo],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Io,U,W,g]}],container:[`container`],columns:[{columns:[H,U,W,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Lo,`auto`,W,U]}],basis:[{basis:[Io,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,Io,`auto`,`initial`,`none`,U]}],grow:[{grow:[``,H,W,U]}],shrink:[{shrink:[``,H,W,U]}],order:[{order:[Lo,`first`,`last`,`none`,W,U]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...te(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...te()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...te(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...te(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...te(),`baseline`]}],"place-self":[{"place-self":[`auto`,...te()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,es,qo]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,os,Yo]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ro,U]}],"font-family":[{font:[ts,Xo,t]}],"font-features":[{"font-features":[U]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,W,U]}],"line-clamp":[{"line-clamp":[H,`none`,W,Jo]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,W,U]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,W,U]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...R(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,W,qo]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[H,`auto`,W,U]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,W,U]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,W,U]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Lo,W,U],radial:[``,W,U],conic:[Lo,W,U]},is,Qo]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:L()}],"border-w-x":[{"border-x":L()}],"border-w-y":[{"border-y":L()}],"border-w-s":[{"border-s":L()}],"border-w-e":[{"border-e":L()}],"border-w-bs":[{"border-bs":L()}],"border-w-be":[{"border-be":L()}],"border-w-t":[{"border-t":L()}],"border-w-r":[{"border-r":L()}],"border-w-b":[{"border-b":L()}],"border-w-l":[{"border-l":L()}],"divide-x":[{"divide-x":L()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":L()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...R(),`hidden`,`none`]}],"divide-style":[{divide:[...R(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...R(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,W,U]}],"outline-w":[{outline:[``,H,es,qo]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,as,$o]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,as,$o]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:L()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[H,qo]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":L()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,as,$o]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[H,W,U]}],"mix-blend":[{"mix-blend":[...ae(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ae()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[W,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,W,U]}],filter:[{filter:[``,`none`,W,U]}],blur:[{blur:se()}],brightness:[{brightness:[H,W,U]}],contrast:[{contrast:[H,W,U]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,as,$o]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,H,W,U]}],"hue-rotate":[{"hue-rotate":[H,W,U]}],invert:[{invert:[``,H,W,U]}],saturate:[{saturate:[H,W,U]}],sepia:[{sepia:[``,H,W,U]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,W,U]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[H,W,U]}],"backdrop-contrast":[{"backdrop-contrast":[H,W,U]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,W,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,W,U]}],"backdrop-invert":[{"backdrop-invert":[``,H,W,U]}],"backdrop-opacity":[{"backdrop-opacity":[H,W,U]}],"backdrop-saturate":[{"backdrop-saturate":[H,W,U]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,W,U]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,W,U]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,W,U]}],ease:[{ease:[`linear`,`initial`,_,W,U]}],delay:[{delay:[H,W,U]}],animate:[{animate:[`none`,v,W,U]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,W,U]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":[`scale-3d`],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[W,U,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,W,U]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,W,U]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[H,es,qo,Jo]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function vs(...e){return _s(Ga(e))}var ys=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),G=o(((e,t)=>{t.exports=ys()}))(),bs=Ja(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function K({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{className:vs(bs({variant:t}),e),...n})}function xs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ss(...e){return t=>{let n=!1,r=e.map(e=>{let r=xs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():xs(e[t],null)}}}}function Cs(...e){return x.useCallback(Ss(...e),e)}var ws=Symbol.for(`react.lazy`),Ts=x.use;function Es(e){return typeof e==`object`&&!!e&&`then`in e}function Ds(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ws&&`_payload`in e&&Es(e._payload)}function Os(e){let t=As(e),n=x.forwardRef((e,n)=>{let{children:r,...i}=e;Ds(r)&&typeof Ts==`function`&&(r=Ts(r._payload));let a=x.Children.toArray(r),o=a.find(Ms);if(o){let e=o.props.children,r=a.map(t=>t===o?x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var ks=Os(`Slot`);function As(e){let t=x.forwardRef((e,t)=>{let{children:n,...r}=e;if(Ds(n)&&typeof Ts==`function`&&(n=Ts(n._payload)),x.isValidElement(n)){let e=Ps(n),i=Ns(r,n.props);return n.type!==x.Fragment&&(i.ref=t?Ss(t,e):e),x.cloneElement(n,i)}return x.Children.count(n)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var js=Symbol(`radix.slottable`);function Ms(e){return x.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===js}function Ns(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Ps(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fs=Ja(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),q=x.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,G.jsx)(r?ks:`button`,{className:vs(Fs({variant:t,size:n,className:e})),ref:a,...i}));q.displayName=`Button`,typeof window<`u`&&window.document&&window.document.createElement;function Is(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ls(e,t=[]){let n=[];function r(t,r){let i=x.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=x.useMemo(()=>o,Object.values(o));return(0,G.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=x.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>x.createContext(e));return function(n){let r=n?.[e]||t;return x.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Rs(i,...t)]}function Rs(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var zs=c(m(),1);function Bs(e){let t=Vs(e),n=x.forwardRef((e,n)=>{let{children:r,...i}=e,a=x.Children.toArray(r),o=a.find(Us);if(o){let e=o.props.children,r=a.map(t=>t===o?x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Vs(e){let t=x.forwardRef((e,t)=>{let{children:n,...r}=e;if(x.isValidElement(n)){let e=Gs(n),i=Ws(r,n.props);return n.type!==x.Fragment&&(i.ref=t?Ss(t,e):e),x.cloneElement(n,i)}return x.Children.count(n)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hs=Symbol(`radix.slottable`);function Us(e){return x.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Hs}function Ws(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Gs(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ks=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Bs(`Primitive.${t}`),r=x.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qs(e,t){e&&zs.flushSync(()=>e.dispatchEvent(t))}function Js(e){let t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ys(e,t=globalThis?.document){let n=Js(e);x.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Xs=`DismissableLayer`,Zs=`dismissableLayer.update`,Qs=`dismissableLayer.pointerDownOutside`,$s=`dismissableLayer.focusOutside`,ec,tc=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nc=x.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=x.useContext(tc),[u,d]=x.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=x.useState({}),m=Cs(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,S=ac(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=oc(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ys(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),x.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ec=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),sc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ec)}},[u,f,n,l]),x.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),sc())},[u,l]),x.useEffect(()=>{let e=()=>p({});return document.addEventListener(Zs,e),()=>document.removeEventListener(Zs,e)},[]),(0,G.jsx)(Ks.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:Is(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Is(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Is(e.onPointerDownCapture,S.onPointerDownCapture)})});nc.displayName=Xs;var rc=`DismissableLayerBranch`,ic=x.forwardRef((e,t)=>{let n=x.useContext(tc),r=x.useRef(null),i=Cs(t,r);return x.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,G.jsx)(Ks.div,{...e,ref:i})});ic.displayName=rc;function ac(e,t=globalThis?.document){let n=Js(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){cc(Qs,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function oc(e,t=globalThis?.document){let n=Js(e),r=x.useRef(!1);return x.useEffect(()=>{let e=e=>{e.target&&!r.current&&cc($s,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sc(){let e=new CustomEvent(Zs);document.dispatchEvent(e)}function cc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qs(i,a):i.dispatchEvent(a)}var lc=nc,uc=ic,dc=globalThis?.document?x.useLayoutEffect:()=>{},fc=x.useId||(()=>void 0),pc=0;function mc(e){let[t,n]=x.useState(fc());return dc(()=>{e||n(e=>e??String(pc++))},[e]),e||(t?`radix-${t}`:``)}var hc=[`top`,`right`,`bottom`,`left`],gc=Math.min,_c=Math.max,vc=Math.round,yc=Math.floor,bc=e=>({x:e,y:e}),xc={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Sc(e,t,n){return _c(e,gc(t,n))}function Cc(e,t){return typeof e==`function`?e(t):e}function wc(e){return e.split(`-`)[0]}function Tc(e){return e.split(`-`)[1]}function Ec(e){return e===`x`?`y`:`x`}function Dc(e){return e===`y`?`height`:`width`}function Oc(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function kc(e){return Ec(Oc(e))}function Ac(e,t,n){n===void 0&&(n=!1);let r=Tc(e),i=kc(e),a=Dc(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=zc(o)),[o,zc(o)]}function jc(e){let t=zc(e);return[Mc(e),t,Mc(t)]}function Mc(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Nc=[`left`,`right`],Pc=[`right`,`left`],Fc=[`top`,`bottom`],Ic=[`bottom`,`top`];function Lc(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Pc:Nc:t?Nc:Pc;case`left`:case`right`:return t?Fc:Ic;default:return[]}}function Rc(e,t,n,r){let i=Tc(e),a=Lc(wc(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Mc)))),a}function zc(e){let t=wc(e);return xc[t]+e.slice(t.length)}function Bc(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vc(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Bc(e)}function Hc(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Uc(e,t,n){let{reference:r,floating:i}=e,a=Oc(t),o=kc(t),s=Dc(o),c=wc(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Tc(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Wc(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Cc(t,e),p=Vc(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Hc(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Hc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Gc=50,Kc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Wc},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Uc(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Gc&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Uc(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},qc=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Cc(e,t)||{};if(l==null)return{};let d=Vc(u),f={x:n,y:r},p=kc(i),m=Dc(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=gc(d[_],T),D=gc(d[v],T),O=E,ee=C-h[m]-D,k=C/2-h[m]/2+w,te=Sc(O,k,ee),A=!c.arrow&&Tc(i)!=null&&k!==te&&a.reference[m]/2-(k<O?E:D)-h[m]/2<0,j=A?k<O?k-O:k-ee:0;return{[p]:f[p]+j,data:{[p]:te,centerOffset:k-te-j,...A&&{alignmentOffset:j}},reset:A}}}),Jc=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Cc(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wc(r),_=Oc(o),v=wc(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[zc(o)]:jc(o)),x=p!==`none`;!d&&x&&b.push(...Rc(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ac(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Oc(t))||T.every(e=>Oc(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Oc(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Yc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xc(e){return hc.some(t=>e[t]>=0)}var Zc=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Cc(e,t);switch(i){case`referenceHidden`:{let e=Yc(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Xc(e)}}}case`escaped`:{let e=Yc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Xc(e)}}}default:return{}}}}},Qc=new Set([`left`,`top`]);async function $c(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wc(n),s=Tc(n),c=Oc(n)===`y`,l=Qc.has(o)?-1:1,u=a&&c?-1:1,d=Cc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var el=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await $c(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},tl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Cc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Oc(wc(i)),p=Ec(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Sc(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Sc(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},nl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Cc(e,t),u={x:n,y:r},d=Oc(i),f=Ec(d),p=u[f],m=u[d],h=Cc(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Qc.has(wc(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},rl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Cc(e,t),u=await o.detectOverflow(t,l),d=wc(i),f=Tc(i),p=Oc(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=gc(h-u[g],v),x=gc(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=_c(u.left,0),t=_c(u.right,0),n=_c(u.top,0),r=_c(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:_c(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:_c(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function il(){return typeof window<`u`}function al(e){return cl(e)?(e.nodeName||``).toLowerCase():`#document`}function ol(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sl(e){return((cl(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cl(e){return il()?e instanceof Node||e instanceof ol(e).Node:!1}function ll(e){return il()?e instanceof Element||e instanceof ol(e).Element:!1}function ul(e){return il()?e instanceof HTMLElement||e instanceof ol(e).HTMLElement:!1}function dl(e){return!il()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ol(e).ShadowRoot}function fl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Cl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function pl(e){return/^(table|td|th)$/.test(al(e))}function ml(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var hl=/transform|translate|scale|rotate|perspective|filter/,gl=/paint|layout|strict|content/,_l=e=>!!e&&e!==`none`,vl;function yl(e){let t=ll(e)?Cl(e):e;return _l(t.transform)||_l(t.translate)||_l(t.scale)||_l(t.rotate)||_l(t.perspective)||!xl()&&(_l(t.backdropFilter)||_l(t.filter))||hl.test(t.willChange||``)||gl.test(t.contain||``)}function bl(e){let t=Tl(e);for(;ul(t)&&!Sl(t);){if(yl(t))return t;if(ml(t))return null;t=Tl(t)}return null}function xl(){return vl??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),vl}function Sl(e){return/^(html|body|#document)$/.test(al(e))}function Cl(e){return ol(e).getComputedStyle(e)}function wl(e){return ll(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tl(e){if(al(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dl(e)&&e.host||sl(e);return dl(t)?t.host:t}function El(e){let t=Tl(e);return Sl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ul(t)&&fl(t)?t:El(t)}function Dl(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=El(e),i=r===e.ownerDocument?.body,a=ol(r);if(i){let e=Ol(a);return t.concat(a,a.visualViewport||[],fl(r)?r:[],e&&n?Dl(e):[])}else return t.concat(r,Dl(r,[],n))}function Ol(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kl(e){let t=Cl(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ul(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vc(n)!==a||vc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Al(e){return ll(e)?e:e.contextElement}function jl(e){let t=Al(e);if(!ul(t))return bc(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=kl(t),o=(a?vc(n.width):n.width)/r,s=(a?vc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ml=bc(0);function Nl(e){let t=ol(e);return!xl()||!t.visualViewport?Ml:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ol(e)?!1:t}function Fl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Al(e),o=bc(1);t&&(r?ll(r)&&(o=jl(r)):o=jl(e));let s=Pl(a,n,r)?Nl(a):bc(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ol(a),t=r&&ll(r)?ol(r):r,n=e,i=Ol(n);for(;i&&r&&t!==n;){let e=jl(i),t=i.getBoundingClientRect(),r=Cl(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ol(i),i=Ol(n)}}return Hc({width:u,height:d,x:c,y:l})}function Il(e,t){let n=wl(e).scrollLeft;return t?t.left+n:Fl(sl(e)).left+n}function J(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Il(e,n),y:n.top+t.scrollTop}}function Ll(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=sl(r),s=t?ml(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bc(1),u=bc(0),d=ul(r);if((d||!d&&!a)&&((al(r)!==`body`||fl(o))&&(c=wl(r)),d)){let e=Fl(r);l=jl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?J(o,c):bc(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Y(e){return Array.from(e.getClientRects())}function X(e){let t=sl(e),n=wl(e),r=e.ownerDocument.body,i=_c(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_c(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Il(e),s=-n.scrollTop;return Cl(r).direction===`rtl`&&(o+=_c(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Z=25;function Rl(e,t){let n=ol(e),r=sl(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=xl();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Il(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Z&&(a-=o)}else l<=Z&&(a+=l);return{width:a,height:o,x:s,y:c}}function zl(e,t){let n=Fl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ul(e)?jl(e):bc(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Bl(e,t,n){let r;if(t===`viewport`)r=Rl(e,n);else if(t===`document`)r=X(sl(e));else if(ll(t))r=zl(t,n);else{let n=Nl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hc(r)}function Vl(e,t){let n=Tl(e);return n===t||!ll(n)||Sl(n)?!1:Cl(n).position===`fixed`||Vl(n,t)}function Hl(e,t){let n=t.get(e);if(n)return n;let r=Dl(e,[],!1).filter(e=>ll(e)&&al(e)!==`body`),i=null,a=Cl(e).position===`fixed`,o=a?Tl(e):e;for(;ll(o)&&!Sl(o);){let t=Cl(o),n=yl(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||fl(o)&&!n&&Vl(e,o))?r=r.filter(e=>e!==o):i=t,o=Tl(o)}return t.set(e,r),r}function Ul(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ml(t)?[]:Hl(t,this._c):[].concat(n),r],o=Bl(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Bl(t,a[e],i);s=_c(n.top,s),c=gc(n.right,c),l=gc(n.bottom,l),u=_c(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Wl(e){let{width:t,height:n}=kl(e);return{width:t,height:n}}function Gl(e,t,n){let r=ul(t),i=sl(t),a=n===`fixed`,o=Fl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bc(0);function l(){c.x=Il(i)}if(r||!r&&!a)if((al(t)!==`body`||fl(i))&&(s=wl(t)),r){let e=Fl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?J(i,s):bc(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Kl(e){return Cl(e).position===`static`}function ql(e,t){if(!ul(e)||Cl(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return sl(e)===n&&(n=n.ownerDocument.body),n}function Jl(e,t){let n=ol(e);if(ml(e))return n;if(!ul(e)){let t=Tl(e);for(;t&&!Sl(t);){if(ll(t)&&!Kl(t))return t;t=Tl(t)}return n}let r=ql(e,t);for(;r&&pl(r)&&Kl(r);)r=ql(r,t);return r&&Sl(r)&&Kl(r)&&!yl(r)?n:r||bl(e)||n}var Yl=async function(e){let t=this.getOffsetParent||Jl,n=this.getDimensions,r=await n(e.floating);return{reference:Gl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xl(e){return Cl(e).direction===`rtl`}var Zl={convertOffsetParentRelativeRectToViewportRelativeRect:Ll,getDocumentElement:sl,getClippingRect:Ul,getOffsetParent:Jl,getElementRects:Yl,getClientRects:Y,getDimensions:Wl,getScale:jl,isElement:ll,isRTL:Xl};function Ql(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $l(e,t){let n=null,r,i=sl(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=yc(d),h=yc(i.clientWidth-(u+f)),g=yc(i.clientHeight-(d+p)),_=yc(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_c(0,gc(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ql(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function eu(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Al(e),u=i||a?[...l?Dl(l):[],...t?Dl(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?$l(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Fl(e):null;c&&g();function g(){let t=Fl(e);h&&!Ql(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var tu=el,nu=tl,ru=Jc,iu=rl,au=Zc,ou=qc,su=nl,cu=(e,t,n)=>{let r=new Map,i={platform:Zl,...n},a={...i.platform,_c:r};return Kc(e,t,{...i,platform:a})},lu=typeof document<`u`?x.useLayoutEffect:function(){};function uu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!uu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!uu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function du(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fu(e,t){let n=du(e);return Math.round(t*n)/n}function pu(e){let t=x.useRef(e);return lu(()=>{t.current=e}),t}function mu(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=x.useState(r);uu(f,r)||p(r);let[m,h]=x.useState(null),[g,_]=x.useState(null),v=x.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=x.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,S=o||g,C=x.useRef(null),w=x.useRef(null),T=x.useRef(u),E=c!=null,D=pu(c),O=pu(i),ee=pu(l),k=x.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),cu(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};te.current&&!uu(T.current,t)&&(T.current=t,zs.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);lu(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=x.useRef(!1);lu(()=>(te.current=!0,()=>{te.current=!1}),[]),lu(()=>{if(b&&(C.current=b),S&&(w.current=S),b&&S){if(D.current)return D.current(b,S,k);k()}},[b,S,k,D,E]);let A=x.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),j=x.useMemo(()=>({reference:b,floating:S}),[b,S]),M=x.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=fu(j.floating,u.x),r=fu(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...du(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:k,refs:A,elements:j,floatingStyles:M}),[u,k,A,j,M])}var hu=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ou({element:r.current,padding:i}).fn(n):r?ou({element:r,padding:i}).fn(n):{}}}},gu=(e,t)=>{let n=tu(e);return{name:n.name,fn:n.fn,options:[e,t]}},_u=(e,t)=>{let n=nu(e);return{name:n.name,fn:n.fn,options:[e,t]}},vu=(e,t)=>({fn:su(e).fn,options:[e,t]}),yu=(e,t)=>{let n=ru(e);return{name:n.name,fn:n.fn,options:[e,t]}},bu=(e,t)=>{let n=iu(e);return{name:n.name,fn:n.fn,options:[e,t]}},xu=(e,t)=>{let n=au(e);return{name:n.name,fn:n.fn,options:[e,t]}},Su=(e,t)=>{let n=hu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cu=`Arrow`,wu=x.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,G.jsx)(Ks.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,G.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});wu.displayName=Cu;var Tu=wu;function Eu(e){let[t,n]=x.useState(void 0);return dc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Du=`Popper`,[Ou,ku]=Ls(Du),[Au,ju]=Ou(Du),Mu=e=>{let{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return(0,G.jsx)(Au,{scope:t,anchor:r,onAnchorChange:i,children:n})};Mu.displayName=Du;var Nu=`PopperAnchor`,Pu=x.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=ju(Nu,n),o=x.useRef(null),s=Cs(t,o),c=x.useRef(null);return x.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,G.jsx)(Ks.div,{...i,ref:s})});Pu.displayName=Nu;var Fu=`PopperContent`,[Iu,Lu]=Ou(Fu),Ru=x.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=ju(Fu,n),[_,v]=x.useState(null),y=Cs(t,e=>v(e)),[b,S]=x.useState(null),C=Eu(b),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(Hu),altBoundary:ee},{refs:te,floatingStyles:A,placement:j,isPositioned:M,middlewareData:N}=mu({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>eu(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[gu({mainAxis:i+T,alignmentAxis:o}),c&&_u({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?vu():void 0,...k}),c&&yu({...k}),bu({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Su({element:b,padding:s}),Uu({arrowWidth:w,arrowHeight:T}),f&&xu({strategy:`referenceHidden`,...k})]}),[P,F]=Wu(j),ne=Js(m);dc(()=>{M&&ne?.()},[M,ne]);let re=N.arrow?.x,ie=N.arrow?.y,I=N.arrow?.centerOffset!==0,[L,R]=x.useState();return dc(()=>{_&&R(window.getComputedStyle(_).zIndex)},[_]),(0,G.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...A,transform:M?A.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:L,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,G.jsx)(Iu,{scope:n,placedSide:P,onArrowChange:S,arrowX:re,arrowY:ie,shouldHideArrow:I,children:(0,G.jsx)(Ks.div,{"data-side":P,"data-align":F,...h,ref:y,style:{...h.style,animation:M?void 0:`none`}})})})});Ru.displayName=Fu;var zu=`PopperArrow`,Bu={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Vu=x.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Lu(zu,n),a=Bu[i.placedSide];return(0,G.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,G.jsx)(Tu,{...r,ref:t,style:{...r.style,display:`block`}})})});Vu.displayName=zu;function Hu(e){return e!==null}var Uu=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Wu(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Wu(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Gu=Mu,Ku=Pu,qu=Ru,Ju=Vu,Yu=`Portal`,Xu=x.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=x.useState(!1);dc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?zs.createPortal((0,G.jsx)(Ks.div,{...r,ref:t}),o):null});Xu.displayName=Yu;function Zu(e,t){return x.useReducer((e,n)=>t[e][n]??e,e)}var Qu=e=>{let{present:t,children:n}=e,r=$u(t),i=typeof n==`function`?n({present:r.isPresent}):x.Children.only(n),a=Cs(r.ref,td(i));return typeof n==`function`||r.isPresent?x.cloneElement(i,{ref:a}):null};Qu.displayName=`Presence`;function $u(e){let[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),a=x.useRef(`none`),[o,s]=Zu(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return x.useEffect(()=>{let e=ed(r.current);a.current=o===`mounted`?e:`none`},[o]),dc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=ed(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),dc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=ed(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=ed(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:x.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function ed(e){return e?.animationName||`none`}function td(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nd=Symbol(`radix.slottable`);function rd(e){let t=({children:e})=>(0,G.jsx)(G.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=nd,t}var id=x.useInsertionEffect||dc;function ad({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=od({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=x.useRef(e!==void 0);x.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,x.useCallback(t=>{if(s){let n=sd(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function od({defaultProp:e,onChange:t}){let[n,r]=x.useState(e),i=x.useRef(n),a=x.useRef(t);return id(()=>{a.current=t},[t]),x.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function sd(e){return typeof e==`function`}var cd=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ld=`VisuallyHidden`,ud=x.forwardRef((e,t)=>(0,G.jsx)(Ks.span,{...e,ref:t,style:{...cd,...e.style}}));ud.displayName=ld;var dd=ud,[fd,pd]=Ls(`Tooltip`,[ku]),md=ku(),hd=`TooltipProvider`,gd=700,_d=`tooltip.open`,[vd,yd]=fd(hd),Q=e=>{let{__scopeTooltip:t,delayDuration:n=gd,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=x.useRef(!0),s=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,G.jsx)(vd,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Q.displayName=hd;var bd=`Tooltip`,[xd,Sd]=fd(bd),Cd=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=yd(bd,e.__scopeTooltip),l=md(t),[u,d]=x.useState(null),f=mc(),p=x.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=x.useRef(!1),[_,v]=ad({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(_d))):c.onClose(),a?.(e)},caller:bd}),y=x.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),S=x.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),C=x.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return x.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,G.jsx)(Gu,{...l,children:(0,G.jsx)(xd,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?C():b()},[c.isOpenDelayedRef,C,b]),onTriggerLeave:x.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:b,onClose:S,disableHoverableContent:m,children:n})})};Cd.displayName=bd;var wd=`TooltipTrigger`,Td=x.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Sd(wd,n),a=yd(wd,n),o=md(n),s=Cs(t,x.useRef(null),i.onTriggerChange),c=x.useRef(!1),l=x.useRef(!1),u=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,G.jsx)(Ku,{asChild:!0,...o,children:(0,G.jsx)(Ks.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Is(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:Is(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:Is(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:Is(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Is(e.onBlur,i.onClose),onClick:Is(e.onClick,i.onClose)})})});Td.displayName=wd;var Ed=`TooltipPortal`,[Dd,Od]=fd(Ed,{forceMount:void 0}),kd=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Sd(Ed,t);return(0,G.jsx)(Dd,{scope:t,forceMount:n,children:(0,G.jsx)(Qu,{present:n||a.open,children:(0,G.jsx)(Xu,{asChild:!0,container:i,children:r})})})};kd.displayName=Ed;var Ad=`TooltipContent`,jd=x.forwardRef((e,t)=>{let n=Od(Ad,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Sd(Ad,e.__scopeTooltip);return(0,G.jsx)(Qu,{present:r||o.open,children:o.disableHoverableContent?(0,G.jsx)(Id,{side:i,...a,ref:t}):(0,G.jsx)(Md,{side:i,...a,ref:t})})}),Md=x.forwardRef((e,t)=>{let n=Sd(Ad,e.__scopeTooltip),r=yd(Ad,e.__scopeTooltip),i=x.useRef(null),a=Cs(t,i),[o,s]=x.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=x.useCallback(()=>{s(null),d(!1)},[d]),p=x.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Bd(r,zd(r,n.getBoundingClientRect())),a=Vd(t.getBoundingClientRect());s(Ud([...i,...a])),d(!0)},[d]);return x.useEffect(()=>()=>f(),[f]),x.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),x.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Hd(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,G.jsx)(Id,{...e,ref:a})}),[Nd,Pd]=fd(bd,{isInside:!1}),Fd=rd(`TooltipContent`),Id=x.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Sd(Ad,n),l=md(n),{onClose:u}=c;return x.useEffect(()=>(document.addEventListener(_d,u),()=>document.removeEventListener(_d,u)),[u]),x.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,G.jsx)(nc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,G.jsxs)(qu,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,G.jsx)(Fd,{children:r}),(0,G.jsx)(Nd,{scope:n,isInside:!0,children:(0,G.jsx)(dd,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});jd.displayName=Ad;var Ld=`TooltipArrow`,Rd=x.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=md(n);return Pd(Ld,n).isInside?null:(0,G.jsx)(Ju,{...i,...r,ref:t})});Rd.displayName=Ld;function zd(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Bd(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Vd(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Hd(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ud(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),Wd(t)}function Wd(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Gd=Q,Kd=Cd,qd=Td,Jd=kd,Yd=jd,Xd=Gd,Zd=Kd,Qd=qd,$d=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,G.jsx)(Jd,{children:(0,G.jsx)(Yd,{ref:r,sideOffset:t,className:vs(`z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]`,e),...n})}));$d.displayName=Yd.displayName;var ef=0;function tf(){x.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??nf()),document.body.insertAdjacentElement(`beforeend`,e[1]??nf()),ef++,()=>{ef===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),ef--}},[])}function nf(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var rf=`focusScope.autoFocusOnMount`,af=`focusScope.autoFocusOnUnmount`,of={bubbles:!1,cancelable:!0},sf=`FocusScope`,cf=x.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=x.useState(null),l=Js(i),u=Js(a),d=x.useRef(null),f=Cs(t,e=>c(e)),p=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:hf(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||hf(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&hf(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),x.useEffect(()=>{if(s){gf.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(rf,of);s.addEventListener(rf,l),s.dispatchEvent(t),t.defaultPrevented||(lf(yf(df(s)),{select:!0}),document.activeElement===e&&hf(s))}return()=>{s.removeEventListener(rf,l),setTimeout(()=>{let t=new CustomEvent(af,of);s.addEventListener(af,u),s.dispatchEvent(t),t.defaultPrevented||hf(e??document.body,{select:!0}),s.removeEventListener(af,u),gf.remove(p)},0)}}},[s,l,u,p]);let m=x.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=uf(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&hf(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&hf(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,G.jsx)(Ks.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});cf.displayName=sf;function lf(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(hf(r,{select:t}),document.activeElement!==n)return}function uf(e){let t=df(e);return[ff(t,e),ff(t.reverse(),e)]}function df(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ff(e,t){for(let n of e)if(!pf(n,{upTo:t}))return n}function pf(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function mf(e){return e instanceof HTMLInputElement&&`select`in e}function hf(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mf(e)&&t&&e.select()}}var gf=_f();function _f(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=vf(e,t),e.unshift(t)},remove(t){e=vf(e,t),e[0]?.resume()}}}function vf(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yf(e){return e.filter(e=>e.tagName!==`A`)}function bf(e){let t=xf(e),n=x.forwardRef((e,n)=>{let{children:r,...i}=e,a=x.Children.toArray(r),o=a.find(Cf);if(o){let e=o.props.children,r=a.map(t=>t===o?x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function xf(e){let t=x.forwardRef((e,t)=>{let{children:n,...r}=e;if(x.isValidElement(n)){let e=Tf(n),i=wf(r,n.props);return n.type!==x.Fragment&&(i.ref=t?Ss(t,e):e),x.cloneElement(n,i)}return x.Children.count(n)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sf=Symbol(`radix.slottable`);function Cf(e){return x.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Sf}function wf(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Tf(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ef=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Df=new WeakMap,Of=new WeakMap,kf={},Af=0,jf=function(e){return e&&(e.host||jf(e.parentNode))},Mf=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=jf(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Nf=function(e,t,n,r){var i=Mf(t,Array.isArray(e)?e:[e]);kf[n]||(kf[n]=new WeakMap);var a=kf[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Df.get(e)||0)+1,l=(a.get(e)||0)+1;Df.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Of.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Af++,function(){o.forEach(function(e){var t=Df.get(e)-1,i=a.get(e)-1;Df.set(e,t),a.set(e,i),t||(Of.has(e)||e.removeAttribute(r),Of.delete(e)),i||e.removeAttribute(n)}),Af--,Af||(Df=new WeakMap,Df=new WeakMap,Of=new WeakMap,kf={})}},Pf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ef(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Nf(r,i,n,`aria-hidden`)):function(){return null}},Ff=function(){return Ff=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ff.apply(this,arguments)};function If(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Lf(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rf=`right-scroll-bar-position`,zf=`width-before-scroll-bar`,Bf=`with-scroll-bars-hidden`,Vf=`--removed-body-scroll-bar-size`;function Hf(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Uf(e,t){var n=(0,x.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Wf=typeof window<`u`?x.useLayoutEffect:x.useEffect,Gf=new WeakMap;function Kf(e,t){var n=Uf(t||null,function(t){return e.forEach(function(e){return Hf(e,t)})});return Wf(function(){var t=Gf.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Hf(e,null)}),i.forEach(function(e){r.has(e)||Hf(e,a)})}Gf.set(n,e)},[e]),n}function qf(e){return e}function Jf(e,t){t===void 0&&(t=qf);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Yf(e){e===void 0&&(e={});var t=Jf(null);return t.options=Ff({async:!0,ssr:!1},e),t}var Xf=function(e){var t=e.sideCar,n=If(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return x.createElement(r,Ff({},n))};Xf.isSideCarExport=!0;function Zf(e,t){return e.useMedium(t),Xf}var Qf=Yf(),$f=function(){},ep=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:$f,onWheelCapture:$f,onTouchMoveCapture:$f}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=If(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Kf([n,t]),w=Ff(Ff({},b),i);return x.createElement(x.Fragment,null,u&&x.createElement(S,{sideCar:Qf,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?x.cloneElement(x.Children.only(s),Ff(Ff({},w),{ref:C})):x.createElement(v,Ff({},w,{className:c,ref:C}),s))});ep.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ep.classNames={fullWidth:zf,zeroRight:Rf};var tp,np=function(){if(tp)return tp;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rp(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=np();return t&&e.setAttribute(`nonce`,t),e}function ip(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ap(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var op=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rp())&&(ip(t,n),ap(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sp=function(){var e=op();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cp=function(){var e=sp();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},lp={left:0,top:0,right:0,gap:0},up=function(e){return parseInt(e||``,10)||0},dp=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[up(n),up(r),up(i)]},fp=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return lp;var t=dp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},pp=cp(),mp=`data-scroll-locked`,hp=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
12
+ .${Bf} {
13
+ overflow: hidden ${r};
14
+ padding-right: ${s}px ${r};
15
+ }
16
+ body[${mp}] {
17
+ overflow: hidden ${r};
18
+ overscroll-behavior: contain;
19
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
20
+ padding-left: ${i}px;
21
+ padding-top: ${a}px;
22
+ padding-right: ${o}px;
23
+ margin-left:0;
24
+ margin-top:0;
25
+ margin-right: ${s}px ${r};
26
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
27
+ }
28
+
29
+ .${Rf} {
30
+ right: ${s}px ${r};
31
+ }
32
+
33
+ .${zf} {
34
+ margin-right: ${s}px ${r};
35
+ }
36
+
37
+ .${Rf} .${Rf} {
38
+ right: 0 ${r};
39
+ }
40
+
41
+ .${zf} .${zf} {
42
+ margin-right: 0 ${r};
43
+ }
44
+
45
+ body[${mp}] {
46
+ ${Vf}: ${s}px;
47
+ }
48
+ `},gp=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},_p=function(){x.useEffect(function(){return document.body.setAttribute(mp,(gp()+1).toString()),function(){var e=gp()-1;e<=0?document.body.removeAttribute(mp):document.body.setAttribute(mp,e.toString())}},[])},vp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;_p();var a=x.useMemo(function(){return fp(i)},[i]);return x.createElement(pp,{styles:hp(a,!t,i,n?``:`!important`)})},yp=!1;if(typeof window<`u`)try{var bp=Object.defineProperty({},`passive`,{get:function(){return yp=!0,!0}});window.addEventListener(`test`,bp,bp),window.removeEventListener(`test`,bp,bp)}catch{yp=!1}var xp=yp?{passive:!1}:!1,Sp=function(e){return e.tagName===`TEXTAREA`},Cp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Sp(e)&&n[t]===`visible`)},wp=function(e){return Cp(e,`overflowY`)},Tp=function(e){return Cp(e,`overflowX`)},Ep=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),kp(e,r)){var i=Ap(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dp=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Op=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},kp=function(e,t){return e===`v`?wp(t):Tp(t)},Ap=function(e,t){return e===`v`?Dp(t):Op(t)},jp=function(e,t){return e===`h`&&t===`rtl`?-1:1},Mp=function(e,t,n,r,i){var a=jp(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ap(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&kp(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Np=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pp=function(e){return[e.deltaX,e.deltaY]},Fp=function(e){return e&&`current`in e?e.current:e},Ip=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lp=function(e){return`
49
+ .block-interactivity-${e} {pointer-events: none;}
50
+ .allow-interactivity-${e} {pointer-events: all;}
51
+ `},Rp=0,zp=[];function Bp(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Rp++)[0],a=x.useState(cp)[0],o=x.useRef(e);x.useEffect(function(){o.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Lf([e.lockRef.current],(e.shards||[]).map(Fp),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=x.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Np(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ep(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ep(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Mp(h,t,e,h===`h`?s:c,!0)},[]),c=x.useCallback(function(e){var n=e;if(!(!zp.length||zp[zp.length-1]!==a)){var r=`deltaY`in n?Pp(n):Np(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ip(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Fp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=x.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Vp(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=x.useCallback(function(e){n.current=Np(e),r.current=void 0},[]),d=x.useCallback(function(t){l(t.type,Pp(t),t.target,s(t,e.lockRef.current))},[]),f=x.useCallback(function(t){l(t.type,Np(t),t.target,s(t,e.lockRef.current))},[]);x.useEffect(function(){return zp.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,xp),document.addEventListener(`touchmove`,c,xp),document.addEventListener(`touchstart`,u,xp),function(){zp=zp.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,xp),document.removeEventListener(`touchmove`,c,xp),document.removeEventListener(`touchstart`,u,xp)}},[]);var p=e.removeScrollBar,m=e.inert;return x.createElement(x.Fragment,null,m?x.createElement(a,{styles:Lp(i)}):null,p?x.createElement(vp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hp=Zf(Qf,Bp),Up=x.forwardRef(function(e,t){return x.createElement(ep,Ff({},e,{ref:t,sideCar:Hp}))});Up.classNames=ep.classNames;var Wp=`Popover`,[Gp,Kp]=Ls(Wp,[ku]),qp=ku(),[Jp,Yp]=Gp(Wp),Xp=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=qp(t),c=x.useRef(null),[l,u]=x.useState(!1),[d,f]=ad({prop:r,defaultProp:i??!1,onChange:a,caller:Wp});return(0,G.jsx)(Gu,{...s,children:(0,G.jsx)(Jp,{scope:t,contentId:mc(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:x.useCallback(()=>u(!0),[]),onCustomAnchorRemove:x.useCallback(()=>u(!1),[]),modal:o,children:n})})};Xp.displayName=Wp;var Zp=`PopoverAnchor`,Qp=x.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yp(Zp,n),a=qp(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return x.useEffect(()=>(o(),()=>s()),[o,s]),(0,G.jsx)(Ku,{...a,...r,ref:t})});Qp.displayName=Zp;var $p=`PopoverTrigger`,em=x.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yp($p,n),a=qp(n),o=Cs(t,i.triggerRef),s=(0,G.jsx)(Ks.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hm(i.open),...r,ref:o,onClick:Is(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,G.jsx)(Ku,{asChild:!0,...a,children:s})});em.displayName=$p;var tm=`PopoverPortal`,[nm,rm]=Gp(tm,{forceMount:void 0}),im=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Yp(tm,t);return(0,G.jsx)(nm,{scope:t,forceMount:n,children:(0,G.jsx)(Qu,{present:n||a.open,children:(0,G.jsx)(Xu,{asChild:!0,container:i,children:r})})})};im.displayName=tm;var am=`PopoverContent`,om=x.forwardRef((e,t)=>{let n=rm(am,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Yp(am,e.__scopePopover);return(0,G.jsx)(Qu,{present:r||a.open,children:a.modal?(0,G.jsx)(cm,{...i,ref:t}):(0,G.jsx)(lm,{...i,ref:t})})});om.displayName=am;var sm=bf(`PopoverContent.RemoveScroll`),cm=x.forwardRef((e,t)=>{let n=Yp(am,e.__scopePopover),r=x.useRef(null),i=Cs(t,r),a=x.useRef(!1);return x.useEffect(()=>{let e=r.current;if(e)return Pf(e)},[]),(0,G.jsx)(Up,{as:sm,allowPinchZoom:!0,children:(0,G.jsx)(um,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Is(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Is(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:Is(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),lm=x.forwardRef((e,t)=>{let n=Yp(am,e.__scopePopover),r=x.useRef(!1),i=x.useRef(!1);return(0,G.jsx)(um,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),um=x.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Yp(am,n),p=qp(n);return tf(),(0,G.jsx)(cf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,G.jsx)(nc,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,G.jsx)(qu,{"data-state":hm(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),dm=`PopoverClose`,fm=x.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Yp(dm,n);return(0,G.jsx)(Ks.button,{type:`button`,...r,ref:t,onClick:Is(e.onClick,()=>i.onOpenChange(!1))})});fm.displayName=dm;var pm=`PopoverArrow`,mm=x.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=qp(n);return(0,G.jsx)(Ju,{...i,...r,ref:t})});mm.displayName=pm;function hm(e){return e?`open`:`closed`}var gm=im,_m=om,vm=x.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,G.jsx)(gm,{children:(0,G.jsx)(_m,{ref:i,align:t,sideOffset:n,className:vs(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]`,e),...r})}));vm.displayName=_m.displayName;var ym=45e3;function bm(e){if(!e?.runtimeHost)return{state:`local`,label:`Local control plane`,badgeLabel:`Local`,detail:`No daemon ownership metadata is loaded in this control-plane session.`,tone:`outline`};let t=e.runtimeHost.workspaceOwner?.lastSeenAt,n=xm(t),r=`${e.runtimeHost.endpoint.host}:${e.runtimeHost.endpoint.port}`;return n?{state:`stale`,label:`Daemon unreachable`,badgeLabel:`Stale daemon`,detail:t?`The last daemon heartbeat is stale for ${e.workspace.name}. Refresh state or restart the daemon before trusting live runtime status.`:`The daemon owner for ${e.workspace.name} is not reporting a recent heartbeat.`,tone:`destructive`,endpoint:r,ownerId:e.runtimeHost.ownerId,lastSeenAt:t}:{state:`attached`,label:`Attached to daemon`,badgeLabel:`Daemon`,detail:`Sessions and tasks are reading daemon-owned runtime state for ${e.workspace.name}.`,tone:`secondary`,endpoint:r,ownerId:e.runtimeHost.ownerId,lastSeenAt:t}}function xm(e){if(!e)return!1;let t=Date.parse(e);return Number.isFinite(t)?Date.now()-t>ym:!1}function Sm({title:e,children:t,wide:n=!1,panelClassName:r}){return(0,G.jsxs)(`section`,{className:Na(`panel`,n&&`wide`,r),children:[(0,G.jsx)(`h2`,{children:e}),t]})}function Cm({title:e,body:t}){return(0,G.jsxs)(`div`,{className:`empty-state`,children:[(0,G.jsx)(`strong`,{children:e}),(0,G.jsx)(`p`,{className:`muted`,children:t})]})}function wm({error:e,state:t}){return e?(0,G.jsxs)(`aside`,{className:`status-badge bad`,children:[`Error: `,e]}):t?(0,G.jsxs)(`aside`,{className:`status-badge`,children:[t.sessions.length,` sessions · `,t.heartbeat.tasks.length,` tasks`]}):(0,G.jsx)(`aside`,{className:`status-badge`,children:`Connecting...`})}function Tm({state:e,onRefresh:t}){let n=bm(e);return(0,G.jsxs)(`section`,{className:`mx-4 mt-4 flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card/95 px-4 py-3 shadow-sm sm:mx-5`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`p`,{className:`truncate text-sm font-semibold text-foreground`,children:n.label}),(0,G.jsx)(K,{variant:n.tone,className:`w-fit shrink-0`,children:e?.workspace.name??`workspace`})]}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.detail})]}),t?(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:`Refresh state`}):null]}),n.endpoint||n.ownerId||n.lastSeenAt?(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[n.endpoint?(0,G.jsxs)(`span`,{children:[`endpoint=`,n.endpoint]}):null,n.ownerId?(0,G.jsxs)(`span`,{children:[`owner=`,n.ownerId]}):null,n.lastSeenAt?(0,G.jsxs)(`span`,{children:[`last seen=`,new Date(n.lastSeenAt).toLocaleTimeString()]}):null]}):null]})}function Em({state:e}){return e?(0,G.jsxs)(`span`,{className:`workspace-path-label`,children:[e.workspace.name,(0,G.jsxs)(`span`,{className:`muted`,children:[` · `,Ra(e.workspace.anchorRoot)]})]}):null}function Dm({state:e,disabled:t,onSelect:n}){return!e||e.workspaces.length<=1?null:(0,G.jsxs)(`label`,{className:`workspace-switcher`,children:[(0,G.jsx)(`span`,{className:`muted`,children:`Workspace`}),(0,G.jsx)(`select`,{value:e.activeWorkspaceId,disabled:t,onChange:e=>n(e.target.value),"data-testid":`workspace-switcher`,children:e.workspaces.map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))})]})}function $({children:e,tone:t}){return(0,G.jsx)(`span`,{className:Na(`pill`,t),children:e})}function Om({children:e}){return(0,G.jsx)(`pre`,{className:`code-block`,children:e})}function km({title:e,subtitle:t,actions:n}){return(0,G.jsxs)(`header`,{className:`workspace-header`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{children:e}),(0,G.jsx)(`p`,{className:`muted`,children:t})]}),n]})}function Am({title:e,actions:t,children:n,testId:r}){return(0,G.jsxs)(`section`,{className:`side-section`,"data-testid":r,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`h3`,{children:e}),t]}),n]})}function jm({state:e,error:t,activeSection:n,sessionPath:r,children:i,onRefresh:a,onSetActiveWorkspace:o,onCaptureDebugSnapshot:s}){let c=bm(e);return(0,G.jsxs)(`main`,{className:`app-shell`,children:[(0,G.jsxs)(`header`,{className:`toolbar`,children:[(0,G.jsxs)(`nav`,{className:`tabs toolbar-tabs`,"aria-label":`Control plane sections`,children:[(0,G.jsx)(Mm,{active:n===`overview`,to:`/overview`,children:`Overview`}),(0,G.jsx)(Mm,{active:n===`sessions`,to:r,children:`Sessions`}),(0,G.jsx)(Mm,{active:n===`tasks`,to:`/tasks`,children:`Tasks`}),(0,G.jsx)(Mm,{active:n===`workspaces`,to:`/workspaces`,children:`Workspaces`})]}),(0,G.jsxs)(`div`,{className:`toolbar-status`,children:[(0,G.jsx)(`div`,{className:`toolbar-actions`,children:(0,G.jsx)(Nm,{onCapture:s})}),(0,G.jsxs)(`div`,{className:`topbar-title-row`,children:[(0,G.jsx)(`p`,{className:`topbar-eyebrow`,children:`Heddle Control Plane`}),(0,G.jsx)(Dm,{state:e,onSelect:o}),(0,G.jsx)(Em,{state:e})]}),(0,G.jsx)(wm,{error:t,state:e})]})]}),t||c.state===`stale`?(0,G.jsx)(Tm,{state:e,onRefresh:a}):null,i]})}function Mm({active:e,to:t,children:n}){return(0,G.jsx)(Sn,{className:`tab-button ${e?`active`:``}`,to:t,"aria-current":e?`page`:void 0,"data-testid":`nav-${n.toLowerCase()}`,children:n})}function Nm({onCapture:e}){return(0,G.jsxs)(`details`,{className:`debug-snapshot-menu`,children:[(0,G.jsx)(`summary`,{className:`debug-button`,children:`Snapshot`}),(0,G.jsxs)(`div`,{className:`debug-snapshot-options`,role:`menu`,"aria-label":`Debug layout snapshot options`,children:[(0,G.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>e(`none`),children:`DOM + layout only`}),(0,G.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>e(`auto`),children:`Include screenshot`})]})]})}var Pm=[{value:`overview`,label:`Overview`},{value:`sessions`,label:`Sessions`},{value:`tasks`,label:`Tasks`},{value:`workspaces`,label:`Workspaces`}];function Fm({section:e,onSectionChange:t,state:n,error:r,children:i,onCaptureDebugSnapshot:a,onSetActiveWorkspace:o,onRefresh:s}){let c=r?{state:`stale`,label:`Error`,badgeLabel:`Error`,detail:r,tone:`destructive`,endpoint:void 0}:bm(n);return(0,G.jsxs)(`main`,{className:`flex h-dvh flex-col overflow-hidden bg-background pt-[env(safe-area-inset-top)] text-foreground`,children:[(0,G.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card/95 px-4 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,G.jsx)(`span`,{className:`text-xs font-semibold tracking-normal text-foreground`,children:`Heddle`})}),(0,G.jsx)(`p`,{className:`m-0 truncate text-xs leading-5 text-muted-foreground`,children:n?`${n.workspace.name} · ${Ra(n.workspace.anchorRoot)}`:`Reading workspace state`}),n&&n.workspaces.length>1&&o?(0,G.jsxs)(`label`,{className:`mt-1 flex items-center gap-2 text-[11px] text-muted-foreground`,children:[(0,G.jsx)(`span`,{children:`Workspace`}),(0,G.jsx)(`select`,{className:`h-7 min-w-0 rounded-md border border-border bg-background px-2 text-[11px] text-foreground`,value:n.activeWorkspaceId,onChange:e=>o(e.target.value),children:n.workspaces.map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}):null]}),(0,G.jsx)(`div`,{className:`flex items-center gap-2`,children:a?(0,G.jsx)(Im,{onCapture:a}):null})]}),r||c.state===`stale`?(0,G.jsxs)(`div`,{className:`mt-2 flex min-w-0 flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground`,children:[(0,G.jsx)(`span`,{className:`truncate`,children:c.detail}),c.endpoint?(0,G.jsxs)(`span`,{className:`shrink-0`,children:[`endpoint=`,c.endpoint]}):null,s?(0,G.jsx)(`button`,{type:`button`,className:`text-[11px] text-accent`,onClick:s,children:`Refresh`}):null]}):null]}),(0,G.jsx)(`section`,{className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto bg-background`,children:i}),(0,G.jsx)(`nav`,{className:`grid shrink-0 grid-cols-4 gap-1 border-t border-border bg-card/95 px-3 py-2 pb-[calc(env(safe-area-inset-bottom)+0.5rem)]`,"aria-label":`Control plane sections`,children:Pm.map(n=>(0,G.jsx)(q,{type:`button`,variant:e===n.value?`secondary`:`ghost`,size:`sm`,className:`h-9 rounded-md px-2 text-xs`,onClick:()=>t(n.value),"aria-current":e===n.value?`page`:void 0,"data-testid":`mobile-nav-${n.value}`,children:n.label},n.value))})]})}function Im({onCapture:e}){return(0,G.jsxs)(`details`,{className:`relative`,children:[(0,G.jsx)(`summary`,{className:`flex h-10 cursor-pointer list-none items-center rounded-md border border-border bg-secondary px-3 text-xs font-medium text-secondary-foreground marker:hidden`,children:`Snapshot`}),(0,G.jsxs)(`div`,{className:`absolute right-0 top-11 z-50 grid min-w-44 gap-1 rounded-md border border-border bg-popover p-1 shadow-lg`,children:[(0,G.jsx)(`button`,{type:`button`,className:`rounded-md px-3 py-2 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground`,onClick:()=>e(`none`),children:`DOM only`}),(0,G.jsx)(`button`,{type:`button`,className:`rounded-md px-3 py-2 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground`,onClick:()=>e(`auto`),children:`With screenshot`})]})]})}function Lm({state:e}){let t=(0,x.useMemo)(()=>e.sessions.slice(0,3),[e.sessions]),n=(0,x.useMemo)(()=>e.heartbeat.runs.slice(0,3),[e.heartbeat.runs]),r=(0,x.useMemo)(()=>e.memory.runs.latest.slice(0,3),[e.memory.runs.latest]),i=bm(e);return(0,G.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-x-hidden overflow-y-auto px-3 pt-3 pb-[calc(env(safe-area-inset-bottom)+5.5rem)] sm:px-4 sm:pt-4 sm:pb-4`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 grid gap-4 lg:grid-cols-2`,children:[(0,G.jsxs)(Rm,{className:`lg:col-span-1`,"data-testid":`overview-active-workspace`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Active workspace`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:e.workspace.name}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Ra(e.workspace.anchorRoot)})]}),(0,G.jsx)(K,{variant:`secondary`,className:`w-fit max-w-full truncate`,children:e.workspace.id})]}),(0,G.jsxs)(`div`,{className:`mt-4 grid grid-cols-3 gap-3`,children:[(0,G.jsx)(zm,{label:`Repos`,value:za(e.workspace.repoRoots.length)}),(0,G.jsx)(zm,{label:`Sessions`,value:za(e.sessions.length)}),(0,G.jsx)(zm,{label:`Tasks`,value:za(e.heartbeat.tasks.length)})]}),(0,G.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm`,children:[(0,G.jsx)(Bm,{label:`Workspace path`,children:e.workspace.anchorRoot}),(0,G.jsx)(Bm,{label:`State path`,children:e.workspace.stateRoot})]})]}),(0,G.jsxs)(Rm,{className:`lg:col-span-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Runtime host`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:i.label}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i.detail})]}),(0,G.jsx)(K,{variant:i.tone,className:`w-fit max-w-full truncate`,children:i.state})]}),e.runtimeHost?(0,G.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm`,children:[(0,G.jsxs)(Bm,{label:`Endpoint`,children:[e.runtimeHost.endpoint.host,`:`,e.runtimeHost.endpoint.port]}),(0,G.jsx)(Bm,{label:`Owner`,children:e.runtimeHost.ownerId}),(0,G.jsx)(Bm,{label:`Last seen`,children:e.runtimeHost.workspaceOwner?.lastSeenAt??`unknown`}),(0,G.jsx)(Bm,{label:`Registry`,children:e.runtimeHost.registryPath})]}):(0,G.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Daemon metadata is not loaded in this control-plane session.`})]})]}),(0,G.jsxs)(`div`,{className:`min-w-0 grid gap-4 xl:grid-cols-3`,children:[(0,G.jsxs)(Rm,{className:`min-h-0`,"data-testid":`overview-memory-health`,children:[(0,G.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent sessions`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Latest conversations`})]}),(0,G.jsxs)(K,{variant:`outline`,children:[za(e.sessions.length),` total`]})]}),t.length?(0,G.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,G.jsx)(Vm,{session:e},e.id))}):(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No saved sessions yet.`}),e.sessions.length>t.length?(0,G.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Open Sessions to browse the full conversation catalog.`}):null]}),(0,G.jsxs)(Rm,{className:`min-h-0`,children:[(0,G.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent task runs`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Heartbeat activity`})]}),(0,G.jsxs)(K,{variant:`outline`,children:[za(e.heartbeat.tasks.length),` tasks`]})]}),n.length?(0,G.jsx)(`div`,{className:`space-y-3`,children:n.map(e=>(0,G.jsx)(Hm,{run:e},e.id))}):(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No heartbeat runs recorded yet.`}),e.heartbeat.runs.length>n.length?(0,G.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Open Tasks to inspect the full run history.`}):null]}),(0,G.jsxs)(Rm,{className:`min-h-0`,children:[(0,G.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace memory`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Catalog health`})]}),(0,G.jsx)(K,{variant:e.memory.catalog.ok?`secondary`:`destructive`,children:e.memory.catalog.ok?`ok`:`attention`})]}),(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,G.jsx)(zm,{label:`Notes`,value:za(e.memory.notes.count)}),(0,G.jsx)(zm,{label:`Pending`,value:za(e.memory.candidates.pending)})]}),e.memory.catalog.missing.length?(0,G.jsxs)(`div`,{className:`mt-4 rounded-xl border border-border bg-background/60 p-3`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Missing catalogs`}),(0,G.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e.memory.catalog.missing.slice(0,4).join(`, `)})]}):null,r.length?(0,G.jsx)(`div`,{className:`mt-4 space-y-3`,children:r.map(e=>(0,G.jsx)(Um,{run:e},e.id))}):(0,G.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`No memory maintenance runs recorded yet.`})]})]})]})}function Rm({children:e,className:t=``,...n}){return(0,G.jsx)(`section`,{className:`min-w-0 rounded-2xl border border-border bg-card/95 p-4 shadow-sm sm:p-5 ${t}`,...n,children:e})}function zm({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-background/60 p-3`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,G.jsx)(`p`,{className:`mt-2 text-3xl font-semibold leading-none text-foreground sm:text-4xl`,children:t})]})}function Bm({label:e,children:t}){return(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`dt`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,G.jsx)(`dd`,{className:`break-all text-sm text-foreground`,children:t})]})}function Vm({session:e}){return(0,G.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.name}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Ia(e.updatedAt)})]}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:max-w-[48%] sm:justify-end`,children:[(0,G.jsx)(K,{variant:`outline`,className:`max-w-full truncate`,children:e.model??`unset model`}),(0,G.jsxs)(K,{variant:`secondary`,className:`w-fit`,children:[e.turnCount,` turns`]})]})]}),e.lastSummary?(0,G.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:La(e.lastSummary,120)}):null]})}function Hm({run:e}){return(0,G.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.id}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Ia(e.createdAt)})]}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:max-w-[48%] sm:justify-end`,children:[(0,G.jsx)(Wm,{value:e.status}),(0,G.jsx)(Wm,{value:e.decision})]})]}),(0,G.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:La(e.summary,132)})]})}function Um({run:e}){return(0,G.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.id}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:Ia(e.finishedAt)})]}),(0,G.jsx)(Wm,{value:e.outcome})]}),(0,G.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:La(e.summary,132)})]})}function Wm({value:e}){let t=Pa(e);return t===`good`?(0,G.jsx)(K,{className:`max-w-full truncate border-emerald-400/45 bg-emerald-950/90 text-emerald-50`,children:e}):t===`warn`?(0,G.jsx)(K,{className:`max-w-full truncate border-cyan-400/40 bg-primary/5 text-foreground`,children:e}):t===`bad`?(0,G.jsx)(K,{className:`max-w-full truncate border-red-300/45 bg-red-950/92 text-red-50`,children:e}):(0,G.jsx)(K,{variant:`outline`,className:`max-w-full truncate`,children:e})}var Gm=(0,x.memo)(function({session:e,active:t,onClick:n}){return(0,G.jsxs)(`button`,{className:Na(`list-button`,t&&`active`),type:`button`,onClick:n,children:[(0,G.jsxs)(`div`,{className:`list-button-header`,children:[(0,G.jsx)(`strong`,{children:e.name}),(0,G.jsx)(`span`,{children:Ia(e.updatedAt)})]}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,G.jsx)($,{children:e.model??`unset model`}),(0,G.jsxs)($,{children:[`turns `,e.turnCount]})]}),e.lastPrompt?(0,G.jsxs)(`p`,{className:`button-copy`,children:[(0,G.jsx)(`strong`,{children:`Prompt:`}),` `,La(e.lastPrompt,88)]}):null,e.lastSummary?(0,G.jsx)(`p`,{className:`button-copy muted-copy`,children:La(e.lastSummary,120)}):null]})}),Km=(0,x.memo)(function({task:e,active:t,onClick:n}){let r=Ha(e);return(0,G.jsxs)(`button`,{className:Na(`list-button`,t&&`active`),type:`button`,onClick:n,children:[(0,G.jsxs)(`div`,{className:`list-button-header`,children:[(0,G.jsx)(`strong`,{children:e.name||e.taskId}),(0,G.jsx)(`span`,{children:Ia(e.nextRunAt)})]}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,G.jsx)($,{tone:e.enabled?`good`:void 0,children:e.enabled?`enabled`:`disabled`}),(0,G.jsx)($,{tone:r.tone,children:r.label})]}),(0,G.jsx)(`p`,{className:`button-copy`,children:La(e.task,112)})]})}),qm=(0,x.memo)(function({run:e,active:t,onClick:n}){return(0,G.jsxs)(`button`,{className:Na(`list-button compact-button`,t&&`active`),type:`button`,onClick:n,children:[(0,G.jsxs)(`div`,{className:`list-button-header`,children:[(0,G.jsx)(`strong`,{children:e.id}),(0,G.jsx)(`span`,{children:Ia(e.createdAt)})]}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,G.jsx)($,{tone:Pa(e.status),children:e.status}),(0,G.jsx)($,{tone:Pa(e.decision),children:e.decision})]}),(0,G.jsx)(`p`,{className:`button-copy muted-copy`,children:La(e.summary,96)})]})}),Jm=(0,x.memo)(function({turn:e,active:t,onClick:n}){return(0,G.jsxs)(`button`,{className:Na(`list-button compact-button`,t&&`active`),type:`button`,onClick:n,children:[(0,G.jsxs)(`div`,{className:`list-button-header`,children:[(0,G.jsx)(`strong`,{children:e.prompt}),(0,G.jsxs)(`span`,{children:[e.steps,` steps`]})]}),(0,G.jsx)(`div`,{className:`pills compact-pills`,children:(0,G.jsx)($,{tone:Pa(e.outcome),children:e.outcome})}),(0,G.jsx)(`p`,{className:`button-copy muted-copy`,children:La(e.summary,110)})]})}),Ym=(0,x.memo)(function({commands:e,empty:t}){return e.length?(0,G.jsx)(`div`,{className:`stack-list compact`,children:e.map(e=>(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`card-title`,children:e.command}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,G.jsx)($,{children:e.tool}),(0,G.jsxs)($,{tone:e.exitCode===0?`good`:e.exitCode===void 0?void 0:`bad`,children:[`exit `,e.exitCode??`n/a`]})]}),e.stdout?(0,G.jsx)(Om,{children:e.stdout}):null,e.stderr?(0,G.jsx)(Om,{children:e.stderr}):null]},`${e.tool}-${e.command}`))}):(0,G.jsx)(Cm,{title:`No evidence`,body:t})}),Xm=(0,x.memo)(function({message:e}){let t=e.role===`assistant`&&(e.isPending||e.isStreaming),n=e.role===`assistant`?Qm(e.text):void 0;return(0,G.jsxs)(`article`,{className:Na(`message`,e.role===`user`?`user`:`assistant`,n&&`tool-result`,t&&`working`),children:[(0,G.jsxs)(`div`,{className:`message-header`,children:[(0,G.jsx)(`span`,{children:e.role===`user`?`You`:n?`Tool result`:`Heddle`}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[n?(0,G.jsx)($,{tone:n.ok===!1?`bad`:`good`,children:n.tool}):null,e.isPending?(0,G.jsx)($,{tone:`warn`,children:`working`}):null,e.isStreaming?(0,G.jsx)($,{children:`live`}):null]})]}),(0,G.jsx)(`div`,{className:Na(`message-body`,e.role===`assistant`&&`markdown-body`),children:n?(0,G.jsx)(Zm,{result:n}):e.role===`assistant`?nh(e.text):e.text})]})});function Zm({result:e}){let t=eh(e.output);return(0,G.jsxs)(`div`,{className:`tool-result-body`,children:[(0,G.jsxs)(`div`,{className:`tool-result-meta`,children:[(0,G.jsx)($,{tone:e.ok===!1?`bad`:`good`,children:e.ok===!1?`failed`:`completed`}),e.command?(0,G.jsx)(`span`,{className:`tool-command`,children:e.command}):null]}),e.error?(0,G.jsx)(`p`,{className:`tool-error`,children:e.error}):null,t?(0,G.jsx)(`pre`,{className:`tool-output`,children:t}):(0,G.jsx)(`p`,{className:`muted`,children:`No visible output.`})]})}function Qm(e){let t=e.match(/^([a-z][a-z0-9_]*):\s*([\s\S]*)$/);if(!t)return;let[,n,r]=t;if(!th(n))return;let i=$m(r.trim());if(!i||typeof i!=`object`||Array.isArray(i))return{tool:n,output:r.trim()};let a=i,o=a.output,s=o&&typeof o==`object`&&!Array.isArray(o)?o:void 0;return{tool:n,ok:typeof a.ok==`boolean`?a.ok:void 0,command:typeof s?.command==`string`?s.command:void 0,output:s?.stdout??s?.output??o,error:typeof a.error==`string`?a.error:typeof s?.stderr==`string`&&!s.stdout?s.stderr:void 0}}function $m(e){try{return JSON.parse(e)}catch{return}}function eh(e){if(e!=null)return typeof e==`string`?e.trim()||void 0:JSON.stringify(e,null,2)}function th(e){return[`edit_file`,`edit_memory_note`,`list_files`,`read_file`,`report_state`,`run_shell_inspect`,`run_shell_mutate`,`search_files`,`search_memory_notes`,`update_plan`,`view_image`,`web_search`].includes(e)}function nh(e){let t=e.replace(/\r\n/g,`
52
+ `).split(`
53
+ `),n=[],r=[],i=[],a=[],o=null,s=()=>{r.length&&(n.push((0,G.jsx)(`p`,{children:rh(r.join(` `))},`p-${n.length}`)),r=[])},c=()=>{i.length&&(n.push((0,G.jsx)(`ul`,{children:i.map((e,t)=>(0,G.jsxs)(`li`,{children:[typeof e.checked==`boolean`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:e.checked,readOnly:!0,disabled:!0}),` `]}):null,rh(e.content)]},t))},`ul-${n.length}`)),i=[])},l=()=>{a.length&&(n.push((0,G.jsx)(`ol`,{children:a.map((e,t)=>(0,G.jsx)(`li`,{children:rh(e)},t))},`ol-${n.length}`)),a=[])},u=()=>{o&&=(n.push((0,G.jsx)(`pre`,{className:`code-block`,children:(0,G.jsx)(`code`,{children:o.join(`
54
+ `)})},`code-${n.length}`)),null)};for(let e of t){if(e.trim().startsWith("```")){s(),c(),l(),o?u():o=[];continue}if(o){o.push(e);continue}let t=e.match(/^(#{1,4})\s+(.*)$/);if(t){s(),c(),l();let e=t[1].length,r=rh(t[2]??``);e===1?n.push((0,G.jsx)(`h1`,{children:r},`h1-${n.length}`)):e===2?n.push((0,G.jsx)(`h2`,{children:r},`h2-${n.length}`)):e===3?n.push((0,G.jsx)(`h3`,{children:r},`h3-${n.length}`)):n.push((0,G.jsx)(`h4`,{children:r},`h4-${n.length}`));continue}let d=e.match(/^[-*]\s+\[( |x|X)\]\s+(.*)$/);if(d){s(),l(),i.push({checked:d[1].toLowerCase()===`x`,content:d[2]??``});continue}let f=e.match(/^[-*]\s+(.*)$/);if(f){s(),l(),i.push({content:f[1]??``});continue}let p=e.match(/^\d+\.\s+(.*)$/);if(p){s(),c(),a.push(p[1]??``);continue}if(!e.trim()){s(),c(),l();continue}r.push(e.trim())}return s(),c(),l(),u(),n.length?n:e}function rh(e){let t=[],n=/`([^`]+)`/g,r=0,i;for(;(i=n.exec(e))!==null;)i.index>r&&t.push(e.slice(r,i.index)),t.push((0,G.jsx)(`code`,{className:`inline-code`,children:i[1]},`code-${i.index}`)),r=i.index+i[0].length;return r<e.length&&t.push(e.slice(r)),t.map((e,t)=>(0,G.jsx)(x.Fragment,{children:e},t))}var ih=x.forwardRef(({className:e,...t},n)=>(0,G.jsx)(`textarea`,{className:vs(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:n,...t}));ih.displayName=`Textarea`;function ah({activeView:e,title:t,subtitle:n,onBackToSessions:r,onOpenChat:i,onOpenReview:a}){return(0,G.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:[(0,G.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2`,children:[(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:r,children:`‹ Sessions`}),(0,G.jsxs)(`div`,{className:`min-w-0 text-center`,children:[(0,G.jsx)(`h2`,{className:`m-0 truncate text-sm font-semibold leading-5 tracking-normal`,children:t}),n?(0,G.jsx)(`p`,{className:`m-0 truncate text-xs leading-4 text-muted-foreground`,children:n}):null]}),(0,G.jsx)(`div`,{className:`w-[76px]`,"aria-hidden":`true`})]}),(0,G.jsxs)(`nav`,{className:`mt-2 grid grid-cols-2 rounded-md bg-muted p-1`,"aria-label":`Session views`,children:[(0,G.jsx)(oh,{active:e===`chat`,onClick:i,children:`Chat`}),(0,G.jsx)(oh,{active:e===`review`,onClick:a,children:`Review`})]})]})}function oh({active:e,onClick:t,children:n}){return(0,G.jsx)(`button`,{type:`button`,className:vs(`h-8 rounded-md text-xs font-medium text-muted-foreground transition-colors`,e&&`bg-background text-foreground shadow-sm`),"aria-current":e?`page`:void 0,onClick:t,children:n})}var sh=new Set([`run_shell_mutate`,`edit_file`,`write_to_file`,`delete_file`,`apply_patch`]);function ch({approval:e,open:t,onOpenChange:n,onResolve:r}){if(!e||!t)return null;let i=sh.has(e.tool)?`high`:`medium`,a=lh(e.input),o=uh(e.input),s=fh(e.input);return(0,G.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-end`,role:`dialog`,"aria-modal":`true`,"aria-label":`Pending approval details`,children:[(0,G.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/45`,"aria-label":`Close approval details`,onClick:()=>n(!1)}),(0,G.jsxs)(`section`,{className:`relative z-10 flex max-h-[82dvh] w-full flex-col rounded-t-2xl border border-border bg-card`,children:[(0,G.jsx)(`header`,{className:`shrink-0 border-b border-border px-3 py-3`,children:(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`p`,{className:`m-0 text-sm font-semibold`,children:[`Approval required: `,e.tool]}),(0,G.jsxs)(`p`,{className:`m-0 mt-1 truncate text-xs text-muted-foreground`,children:[`Call ID: `,e.callId]}),(0,G.jsxs)(`p`,{className:`m-0 mt-1 truncate text-xs text-muted-foreground`,children:[`Requested: `,new Date(e.requestedAt).toLocaleString()]})]}),(0,G.jsxs)(K,{variant:i===`high`?`destructive`:`secondary`,children:[i,` risk`]})]})}),(0,G.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:[(0,G.jsxs)(`dl`,{className:`grid gap-2 text-xs`,children:[(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,G.jsx)(`dt`,{className:`font-medium text-foreground`,children:`Path target`}),(0,G.jsx)(`dd`,{className:`m-0 mt-1 break-all text-muted-foreground`,children:a??`No explicit path in payload`})]}),(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,G.jsx)(`dt`,{className:`font-medium text-foreground`,children:`Command target`}),(0,G.jsx)(`dd`,{className:`m-0 mt-1 break-all text-muted-foreground`,children:o??`No explicit command in payload`})]})]}),(0,G.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-background`,children:[(0,G.jsx)(`div`,{className:`border-b border-border px-2 py-2 text-xs font-medium`,children:`Raw payload`}),(0,G.jsx)(`pre`,{className:`m-0 max-h-[34dvh] overflow-auto whitespace-pre-wrap break-words px-2 py-2 text-[11px] leading-4 text-muted-foreground`,children:s})]})]}),(0,G.jsx)(`footer`,{className:`sticky bottom-0 z-10 shrink-0 border-t border-border bg-card px-3 py-3 pb-[calc(env(safe-area-inset-bottom)+0.75rem)]`,children:(0,G.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,G.jsx)(q,{type:`button`,className:`h-11`,onClick:()=>r(!0),children:`Approve`}),(0,G.jsx)(q,{type:`button`,variant:`outline`,className:`h-11`,onClick:()=>r(!1),children:`Deny`})]})})]})]})}function lh(e){let t=dh(e,[`targetFile`,`file_path`,`filePath`,`path`,`paths`,`absolute_path`]);if(t)return t}function uh(e){return dh(e,[`command`,`CommandLine`,`cmd`])}function dh(e,t){if(!(!e||typeof e!=`object`))for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t;if(Array.isArray(t)){let e=t.filter(e=>typeof e==`string`&&!!e.trim());if(e.length>0)return e.slice(0,3).join(`, `)}}}function fh(e){if(e===void 0)return`No payload provided.`;try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function ph({activeSession:e,sessionDetail:t,sessionDetailLoading:n,sessionDetailError:r,selectedSessionId:i,runActive:a,runInFlight:o,memoryUpdating:s,sendPromptError:c,sessionNotice:l,draft:u,pendingApproval:d,conversationScrollRef:f,textareaRef:p,mentionMenu:m,renderMessage:h,onDraftChange:g,onComposerKeyDown:_,onBackToSessions:v,onOpenReview:y,onSubmitPrompt:b,onContinueSession:S,onCancelSessionRun:C,onResolveApproval:w}){let T=!!(i&&!a&&u.trim()),E=!!(i&&!a&&t?.lastContinuePrompt),D=t?.name??e?.name??`Chat session`,O=(t?.context?.compactionStatus??e?.context?.compactionStatus)===`running`,[ee,k]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{d||k(!1)},[d]),(0,G.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,G.jsx)(ah,{activeView:`chat`,title:D,subtitle:e?`updated ${Fa(e.updatedAt)}`:`Pick a session`,onBackToSessions:v,onOpenChat:()=>void 0,onOpenReview:y}),(0,G.jsx)(`div`,{ref:f,className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,G.jsx)(`div`,{className:`flex min-h-full flex-col justify-end gap-3`,children:n?(0,G.jsx)(_h,{title:`Loading session`,body:`Fetching conversation state.`}):r?(0,G.jsx)(_h,{title:`Session load failed`,body:r}):t&&t.messages.length?t.messages.map(e=>h(e)):(0,G.jsx)(_h,{title:`No conversation`,body:`Start with a prompt from the composer.`})})}),(0,G.jsx)(mh,{draft:u,disabled:!i||a,runActive:a,runInFlight:o,memoryUpdating:s,canSend:T,canContinue:E,pendingApproval:d,compacting:O,onOpenApprovalSheet:()=>k(!0),sendPromptError:c,sessionNotice:l,textareaRef:p,mentionMenu:m,onDraftChange:g,onComposerKeyDown:_,onSubmitPrompt:b,onContinueSession:S,onCancelSessionRun:C}),(0,G.jsx)(ch,{approval:d,open:ee,onOpenChange:k,onResolve:e=>{w(e),k(!1)}})]})}function mh({draft:e,disabled:t,runActive:n,runInFlight:r,memoryUpdating:i,canSend:a,canContinue:o,pendingApproval:s,compacting:c,onOpenApprovalSheet:l,sendPromptError:u,sessionNotice:d,textareaRef:f,mentionMenu:p,onDraftChange:m,onComposerKeyDown:h,onSubmitPrompt:g,onContinueSession:_,onCancelSessionRun:v}){let y=c?`Compacting earlier conversation history into an archive summary.`:u??d??(i?`Memory updating in the background.`:void 0);return(0,G.jsxs)(`footer`,{className:`relative shrink-0 border-t border-border bg-card px-2 py-2`,children:[s?(0,G.jsx)(hh,{approval:s,onOpen:l}):null,p,(0,G.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,G.jsx)(ih,{ref:f,rows:1,value:e,className:`max-h-24 min-h-10 resize-none rounded-md bg-background px-3 py-2 text-base leading-6 md:text-sm md:leading-5`,disabled:t,placeholder:n?`Heddle is working...`:`Message Heddle`,onChange:e=>m(e.target.value,e.target.selectionStart),onClick:t=>m(e,t.currentTarget.selectionStart),onSelect:t=>m(e,t.currentTarget.selectionStart),onKeyDown:h}),(0,G.jsx)(q,{type:`button`,size:`sm`,className:`h-10 shrink-0 px-3`,disabled:!a,onClick:g,children:`Send`})]}),(0,G.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-2`,children:[(0,G.jsx)(`div`,{className:`min-w-0`,children:y?(0,G.jsx)(`p`,{className:`m-0 truncate text-xs text-muted-foreground`,children:y}):(0,G.jsx)(gh,{runActive:n})}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,disabled:!o,onClick:_,children:`Continue`}),(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,disabled:!r,onClick:v,children:`Cancel`})]})]})]})}function hh({approval:e,onOpen:t}){return(0,G.jsxs)(`button`,{type:`button`,className:`mb-2 flex w-full items-center justify-between gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-left`,onClick:t,"aria-label":`Open pending approval for ${e.tool}`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`p`,{className:`m-0 truncate text-xs font-semibold text-foreground`,children:[`Approval required: `,e.tool]}),(0,G.jsx)(`p`,{className:`m-0 truncate text-[11px] text-muted-foreground`,children:`Tap for details and actions`})]}),(0,G.jsx)(K,{variant:`destructive`,className:`shrink-0`,children:`Pending`})]})}function gh({runActive:e}){return(0,G.jsx)(K,{variant:e?`outline`:`secondary`,children:e?`working`:`idle`})}function _h({title:e,body:t}){return(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,G.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function vh({diff:e,patch:t,fallbackTitle:n=`Raw patch`}){return e?.binary?(0,G.jsx)(Cm,{title:`Binary file`,body:`Git reports this as a binary diff, so Heddle cannot render line-level changes.`}):e?.hunks.length?(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-background font-mono text-xs`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-b border-border bg-muted/30 px-3 py-2 font-sans`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`p`,{className:`truncate text-sm font-semibold text-foreground`,children:e.path}),e.oldPath?(0,G.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[`from `,e.oldPath]}):null]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[(0,G.jsx)($,{children:e.status}),(0,G.jsxs)($,{tone:`good`,children:[`+`,e.additions,` / -`,e.deletions]})]})]}),(0,G.jsx)(`div`,{className:`max-h-[44rem] overflow-auto`,children:e.hunks.map((e,t)=>(0,G.jsx)(`table`,{className:`w-full border-collapse`,children:(0,G.jsxs)(`tbody`,{children:[(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:2,className:`border-y border-border bg-muted/40 px-3 py-1 font-mono text-[11px] text-muted-foreground`,children:e.header})}),e.lines.map((t,n)=>(0,G.jsxs)(`tr`,{className:Na(t.type===`added`&&`bg-emerald-500/10`,t.type===`deleted`&&`bg-rose-500/10`),children:[(0,G.jsx)(`td`,{className:`w-14 select-none border-r border-border px-2 py-0.5 text-right text-muted-foreground/70`,children:t.type===`added`?t.newLineNumber:t.oldLineNumber??t.newLineNumber??``}),(0,G.jsx)(`td`,{className:`whitespace-pre px-3 py-0.5 text-foreground`,children:t.content})]},`${e.header}-${t.oldLineNumber??``}-${t.newLineNumber??``}-${n}`))]})},`${e.header}-${t}`))})]}):t?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,G.jsx)($,{tone:`warn`,children:n}),(0,G.jsx)(`span`,{className:`min-w-0 text-xs text-muted-foreground`,children:`Structured hunks are unavailable for this patch.`})]}),(0,G.jsx)(Om,{children:t})]}):(0,G.jsx)(Cm,{title:`No patch available`,body:`Git reports this file as changed, but no patch text is available for it.`})}function yh({activeSession:e,sessionDetail:t,selectedTurnId:n,selectedTurn:r,turnReview:i,turnReviewLoading:a,turnReviewError:o,workspaceChanges:s,workspaceChangesLoading:c,workspaceChangesError:l,selectedWorkspaceFile:u,workspaceFileDiff:d,workspaceFileDiffLoading:f,workspaceFileDiffError:p,onSelectWorkspaceFile:m,onRefreshWorkspaceReview:h,selectedTurnPatchIsStale:g,onOpenDiff:_,onBackToSessions:v,onOpenChat:y,onSelectTurn:b}){let[S,C]=(0,x.useState)(`current`),[w,T]=(0,x.useState)(),E=t?.name??e?.name??`Session`,D=`Review evidence`,O=i?.files.find(e=>e.path===w)??i?.files[0],ee=i?.files[0]?.path;(0,x.useEffect)(()=>{T(ee)},[ee,n,i?.traceFile]);let k=(0,x.useMemo)(()=>i?[{label:`Review`,commands:i.reviewCommands},{label:`Verification`,commands:i.verificationCommands},{label:`Mutation`,commands:i.mutationCommands}]:[],[i]);return(0,G.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,G.jsx)(ah,{activeView:`review`,title:E,subtitle:e?`${D} · updated ${Fa(e.updatedAt)}`:D,onBackToSessions:v,onOpenChat:y,onOpenReview:()=>void 0}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsxs)(`nav`,{className:`grid grid-cols-3 rounded-md bg-muted p-1`,"aria-label":`Review evidence tabs`,children:[(0,G.jsx)(Ch,{active:S===`current`,onClick:()=>C(`current`),children:`Current`}),(0,G.jsx)(Ch,{active:S===`turn`,onClick:()=>C(`turn`),children:`Turn`}),(0,G.jsx)(Ch,{active:S===`evidence`,onClick:()=>C(`evidence`),children:`Evidence`})]}),S===`current`?(0,G.jsx)(bh,{title:`Current workspace changes`,actions:(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[g?(0,G.jsx)(K,{variant:`outline`,children:`live diff differs`}):null,(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:h,disabled:c||f,children:`Refresh`})]}),children:c?(0,G.jsx)(wh,{title:`Loading workspace diff`,body:`Reading current Git changes from the active workspace.`}):l?(0,G.jsx)(wh,{title:`Workspace diff failed`,body:l}):s?.vcs===`none`?(0,G.jsx)(wh,{title:`Not a git workspace`,body:s.error??`Current workspace changes require a Git-backed project.`}):s?.files.length?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:s.files.map(e=>(0,G.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${u?.path===e.path?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>m(e.path),children:[(0,G.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.path}),(0,G.jsxs)(`span`,{className:`block`,children:[e.status,e.additions!==void 0||e.deletions!==void 0?` · +${e.additions??0} / -${e.deletions??0}`:``]})]},`workspace-${e.path}`))}),f?(0,G.jsx)(wh,{title:`Loading file diff`,body:`Reading the selected file patch.`}):p?(0,G.jsx)(wh,{title:`File diff failed`,body:p}):d?.error?(0,G.jsx)(wh,{title:`File diff unavailable`,body:d.error}):d?.patch?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>_({title:u?.path??d.path,subtitle:`Current workspace diff`,diff:d.diff,patch:d.patch,fallbackTitle:`Raw workspace patch`}),children:`Open full diff`}),(0,G.jsx)(vh,{diff:d.diff,patch:d.patch,fallbackTitle:`Raw workspace patch`})]}):(0,G.jsx)(wh,{title:`No patch available`,body:`Git reports this file as changed, but no patch text is available for it.`})]}):(0,G.jsx)(wh,{title:`Clean workspace`,body:`Git does not report current project file changes.`})}):S===`evidence`?(0,G.jsx)(`div`,{className:`space-y-3`,children:a?(0,G.jsx)(wh,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):o?(0,G.jsx)(wh,{title:`Review load failed`,body:o}):(0,G.jsxs)(G.Fragment,{children:[k.map(e=>(0,G.jsx)(xh,{label:e.label,commands:e.commands},e.label)),(0,G.jsx)(Sh,{turnReview:i,selectedTurn:r})]})}):(0,G.jsxs)(bh,{title:`Captured turn diff`,children:[t?.turns.length?(0,G.jsx)(`div`,{className:`mb-2 flex gap-2 overflow-x-auto pb-1`,children:[...t.turns].reverse().map(e=>(0,G.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${e.id===n?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>b(e.id),children:[(0,G.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.prompt}),(0,G.jsxs)(`span`,{className:`block`,children:[e.outcome,` · `,e.steps,` steps`]})]},e.id))}):null,a?(0,G.jsx)(wh,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):o?(0,G.jsx)(wh,{title:`Review load failed`,body:o}):i?.files.length?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:i.files.map(e=>(0,G.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${O?.path===e.path?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>T(e.path),children:[(0,G.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.path}),(0,G.jsxs)(`span`,{className:`block`,children:[e.status,` · `,e.source,e.truncated?` · truncated`:``]})]},`${e.source}-${e.path}`))}),O?.patch?(0,G.jsxs)(`div`,{className:`space-y-2`,children:[(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>_({title:O.path,subtitle:`Captured turn diff`,diff:O.diff,patch:O.patch,fallbackTitle:`Raw turn patch`}),children:`Open full diff`}),(0,G.jsx)(vh,{diff:O.diff,patch:O.patch,fallbackTitle:`Raw turn patch`})]}):(0,G.jsx)(wh,{title:`No patch captured`,body:`This file was changed, but the turn did not capture patch text for it.`})]}):i?.diffExcerpt?(0,G.jsx)(`pre`,{className:`max-h-[52dvh] overflow-auto rounded-md border border-border bg-background p-2 text-[11px] leading-4 text-muted-foreground`,children:i.diffExcerpt}):(0,G.jsx)(wh,{title:`No changed files`,body:`This turn did not capture structured file review data.`})]})]})})]})}function bh({title:e,actions:t,children:n}){return(0,G.jsxs)(`section`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),t]}),(0,G.jsx)(`div`,{className:`mt-2`,children:n})]})}function xh({label:e,commands:t}){return(0,G.jsx)(bh,{title:`${e} commands`,children:t.length?(0,G.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,G.jsx)(`p`,{className:`m-0 break-words text-xs font-medium text-foreground`,children:t.command}),(0,G.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:[(0,G.jsx)(K,{variant:`outline`,children:t.tool}),(0,G.jsxs)(K,{variant:t.exitCode===0?`secondary`:`outline`,children:[`exit `,t.exitCode??`n/a`]})]}),t.stdout?(0,G.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto rounded border border-border bg-card p-2 text-[11px] leading-4 text-muted-foreground`,children:t.stdout}):null,t.stderr?(0,G.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto rounded border border-border bg-card p-2 text-[11px] leading-4 text-destructive`,children:t.stderr}):null]},`${e}-${t.tool}-${t.command}`))}):(0,G.jsx)(wh,{title:`No commands`,body:`No ${e.toLowerCase()} commands captured for this turn.`})})}function Sh({turnReview:e,selectedTurn:t}){return(0,G.jsx)(bh,{title:`Approvals and events`,children:e?.approvals.length?(0,G.jsx)(`div`,{className:`space-y-2`,children:e.approvals.map((e,t)=>(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,G.jsx)(`p`,{className:`m-0 text-xs font-medium text-foreground`,children:e.tool}),(0,G.jsx)(`p`,{className:`m-0 mt-1 break-words text-[11px] text-muted-foreground`,children:e.command??`no command details`}),(0,G.jsx)(`div`,{className:`mt-1`,children:(0,G.jsx)(K,{variant:e.approved?`secondary`:`destructive`,children:e.approved?`approved`:`rejected`})}),e.reason?(0,G.jsx)(`p`,{className:`m-0 mt-1 text-[11px] text-muted-foreground`,children:e.reason}):null]},`${e.tool}-${e.timestamp??t}`))}):t?.events.length?(0,G.jsx)(`div`,{className:`space-y-1`,children:t.events.map((e,n)=>(0,G.jsx)(`p`,{className:`m-0 rounded-md border border-border bg-background px-2 py-2 text-[11px] text-muted-foreground`,children:e},`${t.id}-${n}`))}):(0,G.jsx)(wh,{title:`No approvals or events`,body:`Turn-level approvals and events will appear here.`})})}function Ch({active:e,onClick:t,children:n}){return(0,G.jsx)(`button`,{type:`button`,className:`h-8 rounded-md text-[11px] font-medium ${e?`bg-background text-foreground shadow-sm`:`text-muted-foreground`}`,"aria-current":e?`page`:void 0,onClick:t,children:n})}function wh({title:e,body:t}){return(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-3 py-3`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,G.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function Th({reviewMode:e,onReviewModeChange:t,onShowChatView:n,workspaceChanges:r,workspaceChangesLoading:i,workspaceChangesError:a,workspaceFileDiffsByPath:o,workspaceFileDiffLoading:s,workspaceFileDiffError:c,selectedTurnPatchIsStale:l,onSelectWorkspaceFile:u,onRefreshWorkspaceReview:d,sessionDetail:f,selectedTurnId:p,onSelectTurn:m,turnReview:h,turnReviewLoading:g,turnReviewError:_,onSelectReviewFile:v,selectedTurn:y,onOpenDiff:b}){return(0,G.jsxs)(`aside`,{className:`workspace-side`,children:[(0,G.jsx)(`div`,{className:`mobile-side-header`,children:(0,G.jsx)(`button`,{className:`mobile-nav-button`,type:`button`,onClick:n,children:`← Chat`})}),(0,G.jsxs)(`div`,{className:`side-scroll`,children:[(0,G.jsxs)(`nav`,{className:`side-tabs review-mode-tabs`,role:`tablist`,"aria-label":`Review mode`,children:[(0,G.jsx)(`button`,{className:Na(e===`current`&&`active`),type:`button`,onClick:()=>t(`current`),children:`Current`}),(0,G.jsx)(`button`,{className:Na(e===`turn`&&`active`),type:`button`,onClick:()=>t(`turn`),children:`Turn history`}),(0,G.jsx)(`button`,{className:Na(e===`evidence`&&`active`),type:`button`,onClick:()=>t(`evidence`),children:`Evidence`})]}),e===`current`?(0,G.jsx)(Eh,{workspaceChanges:r,workspaceChangesLoading:i,workspaceChangesError:a,workspaceFileDiffsByPath:o,workspaceFileDiffLoading:s,workspaceFileDiffError:c,selectedTurnPatchIsStale:l,onSelectWorkspaceFile:u,onRefresh:d,onOpenDiff:b}):e===`turn`?(0,G.jsx)(Dh,{sessionDetail:f,selectedTurnId:p,onSelectTurn:m,turnReview:h,turnReviewLoading:g,turnReviewError:_,onSelectReviewFile:v,onOpenDiff:b}):(0,G.jsx)(Ah,{turnReview:h,selectedTurn:y})]})]})}function Eh({workspaceChanges:e,workspaceChangesLoading:t,workspaceChangesError:n,workspaceFileDiffsByPath:r,workspaceFileDiffLoading:i,workspaceFileDiffError:a,selectedTurnPatchIsStale:o,onSelectWorkspaceFile:s,onRefresh:c,onOpenDiff:l}){let u=Nh(e?.files??[],r);return(0,G.jsx)(Am,{title:`Current workspace changes`,testId:`review-current-workspace`,actions:(0,G.jsxs)(`div`,{className:`review-section-actions`,children:[o?(0,G.jsx)(Oh,{}):null,u.files?.length?(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:()=>l(u),children:`Open full diff`}):null,(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:c,disabled:t||i,children:`Refresh`})]}),children:t?(0,G.jsx)(Cm,{title:`Loading workspace diff`,body:`Reading current Git changes from the active workspace.`}):n?(0,G.jsx)(Cm,{title:`Workspace diff failed`,body:n}):e?.vcs===`none`?(0,G.jsx)(Cm,{title:`Not a git workspace`,body:e.error??`Current workspace changes require a Git-backed project.`}):e?.files.length?(0,G.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,G.jsx)(jh,{files:e.files,sourceLabel:`current git`,testId:`review-current-file-list`,onSelect:s,renderContent:e=>{let t=r[e.path];return(0,G.jsx)(Mh,{loading:i,error:a,diffError:t?.error,patch:t?.patch,diff:t?.diff,unavailableTitle:`No patch available`,unavailableBody:`Git reports this file as changed, but no patch text is available for it.`,loadingTitle:`Loading file diff`,loadingBody:`Reading the selected file patch.`,fallbackTitle:`Raw workspace patch`})}})}):(0,G.jsx)(Cm,{title:`Clean workspace`,body:`Git does not report current project file changes.`})})}function Dh({sessionDetail:e,selectedTurnId:t,onSelectTurn:n,turnReview:r,turnReviewLoading:i,turnReviewError:a,onSelectReviewFile:o,onOpenDiff:s}){let c=Ph(r?.files??[]);return(0,G.jsxs)(Am,{title:`Captured turn diff`,actions:c.files?.length?(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>s(c),children:`Open full diff`}):void 0,children:[e?.turns.length?(0,G.jsx)(`div`,{className:`stack-list compact review-turn-picker`,children:[...e.turns].reverse().map(e=>(0,G.jsx)(Jm,{turn:e,active:e.id===t,onClick:()=>n(e.id)},e.id))}):null,i?(0,G.jsx)(Cm,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):a?(0,G.jsx)(Cm,{title:`Review load failed`,body:a}):r?.files.length?(0,G.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,G.jsx)(jh,{files:r.files,testId:`review-turn-file-list`,onSelect:o,renderContent:e=>(0,G.jsx)(Mh,{patch:`patch`in e?e.patch:void 0,diff:`diff`in e?e.diff:void 0,unavailableTitle:`No patch captured`,unavailableBody:`This file was changed, but the turn did not capture patch text for it.`,fallbackTitle:`Raw turn patch`})})}):r?.diffExcerpt?(0,G.jsx)(Om,{children:r.diffExcerpt}):(0,G.jsx)(Cm,{title:`No captured diff`,body:`This selected turn did not save file-level diff evidence. Check Evidence for commands and approvals.`})]})}function Oh(){return(0,G.jsx)(Xd,{delayDuration:120,children:(0,G.jsxs)(Zd,{children:[(0,G.jsx)(Qd,{asChild:!0,children:(0,G.jsx)(`button`,{className:`stale-diff-button`,type:`button`,"aria-label":`Current workspace differs from captured turn`,children:`i`})}),(0,G.jsx)($d,{side:`left`,className:`max-w-64`,children:`The selected file also has trace-backed turn evidence, but the current Git patch is different. Treat Current as live workspace state.`})]})})}function kh({diff:e,onClose:t}){return e?(0,G.jsx)(`div`,{className:`diff-dialog-backdrop`,role:`presentation`,onMouseDown:t,children:(0,G.jsxs)(`section`,{className:`diff-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`${e.subtitle}: ${e.title}`,onMouseDown:e=>e.stopPropagation(),children:[(0,G.jsxs)(`header`,{className:`diff-dialog-header`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsx)(`p`,{className:`topbar-eyebrow`,children:`Diff review`}),(0,G.jsx)(`h2`,{children:e.title}),(0,G.jsx)(`p`,{className:`muted`,children:e.subtitle})]}),(0,G.jsx)(q,{type:`button`,variant:`outline`,onClick:t,children:`Close`})]}),(0,G.jsx)(`div`,{className:`diff-dialog-body`,children:e.files?.length?(0,G.jsx)(`div`,{className:`detail-stack`,children:e.files.map(e=>(0,G.jsx)(vh,{diff:e.diff,patch:e.patch,fallbackTitle:e.fallbackTitle},e.title))}):(0,G.jsx)(vh,{diff:e.diff,patch:e.patch,fallbackTitle:e.fallbackTitle})})]})}):null}function Ah({turnReview:e,selectedTurn:t}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Am,{title:`Review commands`,children:(0,G.jsx)(Ym,{commands:e?.reviewCommands??[],empty:`No git review commands captured for this turn.`})}),(0,G.jsx)(Am,{title:`Verification commands`,children:(0,G.jsx)(Ym,{commands:e?.verificationCommands??[],empty:`No verification commands captured for this turn.`})}),(0,G.jsx)(Am,{title:`Approvals and events`,children:e?.approvals.length?(0,G.jsx)(`div`,{className:`stack-list compact`,children:e.approvals.map((e,t)=>(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`card-title`,children:e.tool}),(0,G.jsx)(`p`,{className:`muted`,children:e.command??`no command details`}),(0,G.jsx)(`div`,{className:`pills`,children:(0,G.jsx)($,{tone:e.approved?`good`:`warn`,children:e.approved?`approved`:`rejected`})}),e.reason?(0,G.jsx)(`p`,{className:`summary`,children:e.reason}):null]},`${e.tool}-${e.timestamp??t}`))}):t?.events.length?(0,G.jsx)(`div`,{className:`event-list`,children:t.events.map((e,n)=>(0,G.jsx)(`p`,{className:`event-line`,children:e},`${t.id}-${n}`))}):(0,G.jsx)(Cm,{title:`No approvals or events`,body:`Turn-level approvals, tool review, or summarized events will appear here.`})})]})}function jh({files:e,sourceLabel:t,testId:n,onSelect:r,renderContent:i}){let[a,o]=(0,x.useState)([]);return(0,x.useEffect)(()=>{let t=new Set(e.map(e=>e.path));o(e=>e.filter(e=>t.has(e)))},[e]),(0,G.jsx)(`div`,{className:`stack-list compact`,"data-testid":n,children:e.map(e=>{let n=!a.includes(e.path);return(0,G.jsxs)(`article`,{className:Na(`changed-file-review-card`,n&&`active`),children:[(0,G.jsxs)(`button`,{"data-testid":`changed-file-${e.path}`,type:`button`,className:`changed-file-review-header`,"aria-expanded":n,onClick:()=>{r(e.path),o(t=>t.includes(e.path)?t.filter(t=>t!==e.path):[...t,e.path])},children:[(0,G.jsxs)(`span`,{className:`list-button-header`,children:[(0,G.jsx)(`strong`,{children:e.path}),(0,G.jsx)(`span`,{children:e.status})]}),(0,G.jsxs)(`span`,{className:`pills compact-pills`,children:[`source`in e?(0,G.jsx)($,{children:e.source}):(0,G.jsx)($,{children:t??`current git`}),`additions`in e&&(e.additions!==void 0||e.deletions!==void 0)?(0,G.jsxs)($,{tone:`good`,children:[`+`,e.additions??0,` / -`,e.deletions??0]}):null,`binary`in e&&e.binary?(0,G.jsx)($,{tone:`warn`,children:`binary`}):null,`truncated`in e&&e.truncated?(0,G.jsx)($,{tone:`warn`,children:`truncated`}):null]})]}),n&&i?(0,G.jsx)(`div`,{className:`changed-file-review-body`,children:i(e)}):null]},`${`source`in e?e.source:`workspace`}-${e.path}`)})})}function Mh({loading:e,error:t,diffError:n,patch:r,diff:i,unavailableTitle:a,unavailableBody:o,loadingTitle:s=`Loading diff`,loadingBody:c=`Reading the selected file patch.`,fallbackTitle:l}){return e?(0,G.jsx)(Cm,{title:s,body:c}):t?(0,G.jsx)(Cm,{title:`File diff failed`,body:t}):n?(0,G.jsx)(Cm,{title:`File diff unavailable`,body:n}):r?(0,G.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,G.jsx)(vh,{diff:i,patch:r,fallbackTitle:l})}):(0,G.jsx)(Cm,{title:a,body:o})}function Nh(e,t){return{title:`Current workspace changes`,subtitle:`Current workspace diff`,fallbackTitle:`Raw workspace patch`,files:e.flatMap(e=>{let n=t[e.path];return n?.patch?[{title:e.path,diff:n.diff,patch:n.patch,fallbackTitle:`Raw workspace patch`}]:[]})}}function Ph(e){return{title:`Captured turn changes`,subtitle:`Captured turn diff`,fallbackTitle:`Raw turn patch`,files:e.flatMap(e=>e.patch?[{title:e.path,diff:e.diff,patch:e.patch,fallbackTitle:`Raw turn patch`}]:[])}}var Fh=`heddle.controlPlane.sessionPanelWidths`,Ih=12,Lh=420,Rh=220,zh=520,Bh=280,Vh=620;function Hh({sessions:e,activeSession:t,sessionDetail:n,sessionDetailLoading:r,sessionDetailError:i,selectedSessionId:a,onSelectSession:o,selectedTurnId:s,onSelectTurn:c,selectedTurn:l,turnReview:u,turnReviewLoading:d,turnReviewError:f,sendingPrompt:p,runInFlight:m,memoryUpdating:h,sendPromptError:g,onSendPrompt:_,creatingSession:v,sessionNotice:y,onCreateSession:b,onContinueSession:S,onCancelSessionRun:C,onUpdateSessionSettings:w,pendingApproval:T,onResolveApproval:E}){let D=(0,x.useRef)(null),O=(0,x.useRef)(null),ee=(0,x.useRef)(null),[k,te]=(0,x.useState)(()=>Wh()),[A,j]=(0,x.useState)(``),[M,N]=(0,x.useState)(null),[P,F]=(0,x.useState)([]),[ne,re]=(0,x.useState)(!1),[ie,I]=(0,x.useState)(),[L,R]=(0,x.useState)(null),[ae,oe]=(0,x.useState)(),[se,ce]=(0,x.useState)(0),[le,ue]=(0,x.useState)(`list`),[de,fe]=(0,x.useState)(),[pe,me]=(0,x.useState)(null),[he,ge]=(0,x.useState)(!1),[_e,ve]=(0,x.useState)(),[ye,be]=(0,x.useState)(),[xe,Se]=(0,x.useState)({}),[Ce,we]=(0,x.useState)(!1),[Te,Ee]=(0,x.useState)(),[De,Oe]=(0,x.useState)(0),[ke,Ae]=(0,x.useState)(`current`),[je,Me]=(0,x.useState)(null),Ne=p||m,Pe=n?.context?.compactionStatus??t?.context?.compactionStatus,Fe=u?.files.find(e=>e.path===de)??u?.files[0],Ie=pe?.files.find(e=>e.path===ye)??pe?.files[0],Le=Ie?xe[Ie.path]??null:null,Re=!!(Fe?.path&&Ie?.path===Fe.path&&Fe.patch&&Le?.patch&&Uh(Fe.patch)!==Uh(Le.patch)),ze={"--session-sidebar-width":`${k.left}px`,"--session-side-width":`${k.right}px`},Be=u?.files[0]?.path;(0,x.useEffect)(()=>{window.localStorage.setItem(Fh,JSON.stringify(k))},[k]),(0,x.useEffect)(()=>{let e=O.current;if(!e)return;let t,n=window.requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight,t=window.setTimeout(()=>{e.scrollTop=e.scrollHeight},0)});return()=>{window.cancelAnimationFrame(n),t!==void 0&&window.clearTimeout(t)}},[le,a,n?.messages.length,r,i]),(0,x.useEffect)(()=>{let e=!1;return Ei().then(t=>{e||(R(t),oe(void 0))}).catch(t=>{e||(R(null),oe(t instanceof Error?t.message:String(t)))}),()=>{e=!0}},[]),(0,x.useEffect)(()=>{fe(Be)},[Be,s,u?.traceFile]),(0,x.useEffect)(()=>{let e=!1;ge(!0);async function t(){try{let t=await Li();e||(me(t),ve(void 0),be(e=>e&&t.files.some(t=>t.path===e)?e:t.files[0]?.path))}catch(t){e||ve(t instanceof Error?t.message:String(t))}finally{e||ge(!1)}}return t(),()=>{e=!0}},[Ne,n?.updatedAt,De]),(0,x.useEffect)(()=>{let e=pe?.files.map(e=>e.path)??[];if(!e.length){Se({}),Ee(void 0),we(!1);return}let t=!1;we(!0);async function n(){try{let n=await Promise.all(e.map(async e=>[e,await Ri(e)]));t||(Se(Object.fromEntries(n)),Ee(void 0))}catch(e){t||(Se({}),Ee(e instanceof Error?e.message:String(e)))}finally{t||we(!1)}}return n(),()=>{t=!0}},[pe,De]),(0,x.useEffect)(()=>{if(!M){F([]),re(!1),I(void 0),ce(0);return}let e=!1;re(!0);let t=window.setTimeout(()=>{Fi(M.query).then(t=>{e||(F(t),I(void 0),ce(0))}).catch(t=>{e||(F([]),I(t instanceof Error?t.message:String(t)))}).finally(()=>{e||re(!1)})},220);return()=>{e=!0,window.clearTimeout(t)}},[M]);let Ve=(e,t)=>{j(e),N(Jh(e,t??e.length))},He=e=>{if(!M)return;let t=`${A.slice(0,M.start)}@${e.path} ${A.slice(M.end)}`,n=M.start+e.path.length+2;j(t),N(null),F([]),window.requestAnimationFrame(()=>{ee.current?.focus(),ee.current?.setSelectionRange(n,n)})},Ue=(e,t)=>{t.preventDefault();let n=D.current?.getBoundingClientRect().width;if(!n)return;let r=t.clientX,i=k,a=Math.min(zh,n-i.right-Lh-Ih),o=Math.min(Vh,n-i.left-Lh-Ih),s=t=>{let n=t.clientX-r;te({left:e===`left`?Gh(i.left+n,Rh,a):i.left,right:e===`right`?Gh(i.right-n,Bh,o):i.right})},c=()=>{window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,c)};window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,c,{once:!0})};(0,x.useEffect)(()=>{if(!a){ue(`list`);return}ue(e=>e===`list`?`chat`:e)},[a]);let We=(0,x.useMemo)(()=>Na(`workspace-shell`,`mobile-view-${le}`),[le]),Ge=e=>{o(e),ue(`chat`)},Ke=e=>{c(e),ue(`review`)},qe=()=>{ue(`list`)},Je=()=>{ue(`chat`)},Ye=()=>{ue(`review`)},Xe=()=>{let e=A.trim();e&&(j(``),_(e))},Ze=e=>{if(M&&(P.length||ne)){if(e.key===`ArrowDown`){e.preventDefault(),ce(e=>Math.min(e+1,Math.max(P.length-1,0)));return}if(e.key===`ArrowUp`){e.preventDefault(),ce(e=>Math.max(e-1,0));return}if(e.key===`Escape`){e.preventDefault(),N(null),F([]);return}if((e.key===`Enter`||e.key===`Tab`)&&P[se]){e.preventDefault(),He(P[se]);return}}if(!(e.key!==`Enter`||e.nativeEvent.isComposing)){if(typeof window<`u`&&window.innerWidth<=760){(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&(e.preventDefault(),Xe());return}!e.shiftKey&&!e.altKey&&(e.preventDefault(),Xe())}},Qe=M?(0,G.jsx)(qh,{loading:ne,suggestions:P,activeIndex:se,error:ie,query:M.query,onPick:He}):null,$e=typeof window<`u`&&window.innerWidth<=760;return $e&&le===`list`?(0,G.jsx)(`section`,{className:`mobile-session-screen mobile-session-list`,children:(0,G.jsxs)(`aside`,{className:`workspace-sidebar mobile-pane`,children:[(0,G.jsx)(km,{title:`Sessions`,subtitle:`${e.length} saved conversation${e.length===1?``:`s`}`,actions:(0,G.jsx)(`button`,{className:`sidebar-action-button`,type:`button`,"data-testid":`new-session-button`,disabled:v,onClick:()=>void b(),children:v?`Creating…`:`+ New session`})}),(0,G.jsx)(`div`,{className:`sidebar-scroll`,children:e.length?(0,G.jsx)(`div`,{className:`stack-list compact`,children:e.map(e=>(0,G.jsx)(Gm,{session:e,active:e.id===a,onClick:()=>Ge(e.id)},e.id))}):(0,G.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,G.jsx)(Cm,{title:`No sessions`,body:`Create a new web session to start a fresh conversation in the browser.`})})})]})}):$e&&le===`chat`?(0,G.jsx)(ph,{activeSession:t,sessionDetail:n,sessionDetailLoading:r,sessionDetailError:i,selectedSessionId:a,runActive:Ne,runInFlight:m,memoryUpdating:h,sendPromptError:g,sessionNotice:y,draft:A,pendingApproval:T,conversationScrollRef:O,textareaRef:ee,mentionMenu:Qe,renderMessage:e=>(0,G.jsx)(Xm,{message:e},e.id),onDraftChange:Ve,onComposerKeyDown:Ze,onBackToSessions:qe,onOpenReview:Ye,onSubmitPrompt:Xe,onContinueSession:()=>void S(),onCancelSessionRun:()=>void C(),onResolveApproval:e=>void E(e)}):$e&&le===`review`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(yh,{activeSession:t,sessionDetail:n,selectedTurnId:s,selectedTurn:l,turnReview:u,turnReviewLoading:d,turnReviewError:f,workspaceChanges:pe,workspaceChangesLoading:he,workspaceChangesError:_e,workspaceFileDiff:Le,workspaceFileDiffsByPath:xe,workspaceFileDiffLoading:Ce,workspaceFileDiffError:Te,onSelectWorkspaceFile:be,onRefreshWorkspaceReview:()=>Oe(e=>e+1),selectedTurnPatchIsStale:Re,onOpenDiff:Me,onBackToSessions:qe,onOpenChat:Je,onSelectTurn:Ke}),(0,G.jsx)(kh,{diff:je,onClose:()=>Me(null)})]}):(0,G.jsxs)(`section`,{className:We,ref:D,style:ze,"data-mobile-view":le,children:[(0,G.jsxs)(`aside`,{className:`workspace-sidebar`,children:[(0,G.jsx)(km,{title:`Sessions`,subtitle:`${e.length} saved conversation${e.length===1?``:`s`}`,actions:(0,G.jsx)(`button`,{className:`sidebar-action-button`,type:`button`,"data-testid":`new-session-button`,disabled:v,onClick:()=>void b(),children:v?`Creating…`:`+ New session`})}),(0,G.jsx)(`div`,{className:`sidebar-scroll`,children:e.length?(0,G.jsx)(`div`,{className:`stack-list compact`,children:e.map(e=>(0,G.jsx)(Gm,{session:e,active:e.id===a,onClick:()=>Ge(e.id)},e.id))}):(0,G.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,G.jsx)(Cm,{title:`No sessions`,body:`Create a new web session to start a fresh conversation in the browser.`})})})]}),(0,G.jsx)(`button`,{className:`workspace-resizer`,type:`button`,"aria-label":`Resize sessions sidebar`,onPointerDown:e=>Ue(`left`,e)}),(0,G.jsxs)(`section`,{className:`workspace-main`,children:[(0,G.jsx)(km,{title:n?.name??t?.name??`Chat session`,subtitle:t?`${t.id} · updated ${Fa(t.updatedAt)}`:`Pick a session to inspect its conversation.`,actions:t?(0,G.jsxs)(`div`,{className:`session-controls`,children:[(0,G.jsx)(`button`,{className:`mobile-nav-button`,type:`button`,onClick:qe,children:`← Sessions`}),(0,G.jsx)(`button`,{className:`mobile-nav-button mobile-inspector-button`,type:`button`,onClick:Ye,children:`Review`}),(0,G.jsxs)(`label`,{className:`select-control`,children:[(0,G.jsx)(`span`,{children:`model`}),(0,G.jsxs)(`select`,{value:n?.model??t.model??``,disabled:Ne||!L,onChange:e=>void w({model:e.target.value}),title:ae?`Model options unavailable. Restart the Heddle daemon if this route was just added.`:void 0,children:[L?.groups.map(e=>(0,G.jsx)(`optgroup`,{label:e.label,children:e.models.map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))},e.label)),L?null:(0,G.jsx)(`option`,{value:n?.model??t.model??``,children:ae?`models unavailable`:n?.model??t.model??`loading models`})]})]}),(0,G.jsxs)($,{children:[`turns `,t.turnCount]}),Pe===`running`?(0,G.jsx)($,{tone:`warn`,children:`compacting`}):null,(0,G.jsx)(`button`,{className:Na(`drift-button`,(n?.driftEnabled??t.driftEnabled)&&`active`),type:`button`,disabled:Ne,onClick:()=>void w({driftEnabled:!(n?.driftEnabled??t.driftEnabled??!0)}),children:Kh(n?.driftEnabled??t.driftEnabled,n?.driftLevel??t.driftLevel)}),Ne?(0,G.jsx)($,{tone:`warn`,children:`working`}):null]}):void 0}),(0,G.jsx)(`div`,{className:`conversation-scroll`,ref:O,children:(0,G.jsxs)(`div`,{className:`conversation-stack`,children:[(0,G.jsx)(`div`,{className:`conversation-spacer`}),r?(0,G.jsx)(Cm,{title:`Loading session`,body:`Fetching full conversation state from saved Heddle session storage.`}):i?(0,G.jsx)(Cm,{title:`Session load failed`,body:i}):n&&n.messages.length?n.messages.map(e=>(0,G.jsx)(Xm,{message:e},e.id)):(0,G.jsx)(Cm,{title:`No conversation available`,body:`This session does not have any saved chat messages yet.`})]})}),(0,G.jsxs)(`div`,{className:`composer-shell`,children:[T?(0,G.jsxs)(`div`,{className:`detail-card error-card approval-card`,children:[(0,G.jsxs)(`p`,{className:`card-title`,children:[`Approval required: `,T.tool]}),(0,G.jsxs)(`p`,{className:`muted`,children:[`Call ID: `,T.callId]}),(0,G.jsx)(Om,{children:JSON.stringify(T.input,null,2)}),(0,G.jsxs)(`div`,{className:`pills approval-actions`,children:[(0,G.jsx)(`button`,{className:`primary-button`,type:`button`,onClick:()=>void E(!0),children:`Approve`}),(0,G.jsx)(`button`,{className:`tab-button`,type:`button`,onClick:()=>void E(!1),children:`Deny`})]})]}):null,(0,G.jsx)(`textarea`,{ref:ee,value:A,onChange:e=>Ve(e.target.value,e.target.selectionStart),onClick:e=>Ve(A,e.currentTarget.selectionStart),onSelect:e=>Ve(A,e.currentTarget.selectionStart),disabled:!a||Ne,placeholder:Ne?`Heddle is working…`:`Ask Heddle about this workspace`,onKeyDown:e=>{if(M&&(P.length||ne)){if(e.key===`ArrowDown`){e.preventDefault(),ce(e=>Math.min(e+1,Math.max(P.length-1,0)));return}if(e.key===`ArrowUp`){e.preventDefault(),ce(e=>Math.max(e-1,0));return}if(e.key===`Escape`){e.preventDefault(),N(null),F([]);return}if((e.key===`Enter`||e.key===`Tab`)&&P[se]){e.preventDefault(),He(P[se]);return}}if(e.key===`Enter`&&!e.shiftKey&&!e.altKey&&!e.nativeEvent.isComposing){e.preventDefault();let t=A.trim();if(!t)return;j(``),_(t)}}}),M?(0,G.jsx)(qh,{loading:ne,suggestions:P,activeIndex:se,error:ie,query:M.query,onPick:He}):null,(0,G.jsxs)(`div`,{className:`composer-footer`,children:[(0,G.jsxs)(`div`,{className:`composer-status`,children:[(0,G.jsx)(`p`,{className:`muted`,children:Pe===`running`?`Compacting earlier conversation history into an archive summary.`:g||y||(Ne?`Run in progress. Continue is disabled until this run settles; Cancel interrupts the active run.`:h?`Memory maintenance is updating the workspace catalog in the background.`:(n?.lastContinuePrompt,`Enter sends. Option+Enter or Shift+Enter adds a new line.`))}),(0,G.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,G.jsx)($,{tone:v||Ne?`warn`:`good`,children:v?`creating session`:Ne?`run active`:`idle`}),h?(0,G.jsx)($,{tone:`warn`,children:`memory updating`}):null,n?.lastContinuePrompt?(0,G.jsx)($,{children:`continue available`}):(0,G.jsx)($,{children:`no continue state yet`})]})]}),(0,G.jsxs)(`div`,{className:`pills composer-actions`,children:[(0,G.jsx)(`button`,{className:`tab-button`,type:`button`,disabled:!a||Ne||!n?.lastContinuePrompt,onClick:()=>void S(),title:n?.lastContinuePrompt?`Resume the current transcript from the last saved continue point`:`Continue is available after a prior runnable turn exists`,children:`Continue`}),(0,G.jsx)(`button`,{className:`tab-button`,type:`button`,disabled:!m,onClick:()=>void C(),title:`Interrupt the currently running session`,children:`Cancel`}),(0,G.jsx)(`button`,{className:`primary-button`,type:`button`,disabled:!a||Ne||!A.trim(),onClick:()=>{let e=A.trim();e&&(j(``),_(e))},children:`Send`})]})]})]})]}),(0,G.jsx)(`button`,{className:`workspace-resizer`,type:`button`,"aria-label":`Resize session inspector`,onPointerDown:e=>Ue(`right`,e)}),(0,G.jsx)(Th,{reviewMode:ke,onReviewModeChange:Ae,onShowChatView:Je,workspaceChanges:pe,workspaceChangesLoading:he,workspaceChangesError:_e,workspaceFileDiffsByPath:xe,workspaceFileDiffLoading:Ce,workspaceFileDiffError:Te,selectedTurnPatchIsStale:Re,onSelectWorkspaceFile:be,onRefreshWorkspaceReview:()=>Oe(e=>e+1),sessionDetail:n,selectedTurnId:s,onSelectTurn:Ke,turnReview:u,turnReviewLoading:d,turnReviewError:f,onSelectReviewFile:fe,selectedTurn:l,onOpenDiff:Me}),(0,G.jsx)(kh,{diff:je,onClose:()=>Me(null)})]})}function Uh(e){return e.trim().replace(/\r\n/g,`
55
+ `)}function Wh(){try{let e=window.localStorage.getItem(Fh);if(!e)return{left:288,right:344};let t=JSON.parse(e);return{left:Gh(typeof t.left==`number`?t.left:288,Rh,zh),right:Gh(typeof t.right==`number`?t.right:344,Bh,Vh)}}catch{return{left:288,right:344}}}function Gh(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function Kh(e,t){return e?`drift ${t??`unknown`}`:`drift off`}function qh({loading:e,suggestions:t,activeIndex:n,error:r,query:i,onPick:a}){return(0,G.jsxs)(`div`,{className:`mention-menu`,role:`listbox`,"aria-label":`File suggestions`,children:[(0,G.jsxs)(`div`,{className:`mention-menu-header`,children:[(0,G.jsx)(`span`,{children:`@ file`}),(0,G.jsx)(`span`,{children:e?`Searching...`:`${t.length} match${t.length===1?``:`es`}`})]}),r?(0,G.jsx)(`p`,{className:`mention-empty`,children:`File search unavailable. Restart the Heddle daemon if this route was just added.`}):t.length?t.map((e,t)=>(0,G.jsx)(`button`,{className:Na(`mention-option`,t===n&&`active`),type:`button`,role:`option`,"aria-selected":t===n,onMouseDown:t=>{t.preventDefault(),a(e)},children:(0,G.jsxs)(`span`,{children:[`@`,e.path]})},e.path)):(0,G.jsx)(`p`,{className:`mention-empty`,children:e?`Searching workspace files...`:`No files found for "${i}".`})]})}function Jh(e,t){let n=e.slice(0,t).match(/(^|\s)@([^\s@]*)$/);if(!n||n.index===void 0)return null;let r=n[1]??``;return{query:n[2]??``,start:n.index+r.length,end:t}}function Yh({tasks:e,selectedTask:t,selectedTaskId:n,onSelectTask:r,selectedRun:i,selectedRunId:a,onSelectRun:o,selectedTaskRuns:s,pendingTaskAction:c,onEnableTask:l,onDisableTask:u,onTriggerTask:d}){let[f,p]=(0,x.useState)(n?`detail`:`list`),m=!!(t&&c&&c.taskId===t.taskId),h=t?Ha(t):void 0;return(0,x.useEffect)(()=>{if(!n){p(`list`);return}p(e=>e===`list`?`detail`:e)},[n]),f===`list`?(0,G.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,G.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:`Tasks`}),(0,G.jsxs)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:[e.length,` durable task`,e.length===1?``:`s`]})]}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:e.length?(0,G.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>{let t=Ha(e);return(0,G.jsxs)(`button`,{type:`button`,className:`w-full rounded-md border px-3 py-3 text-left ${e.taskId===n?`border-primary bg-primary/5`:`border-border bg-card`}`,onClick:()=>{r(e.taskId),p(`detail`)},children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,G.jsx)(`p`,{className:`m-0 line-clamp-2 text-sm font-semibold text-foreground`,children:e.name||e.taskId}),(0,G.jsx)(`p`,{className:`m-0 shrink-0 text-[11px] text-muted-foreground`,children:Fa(e.nextRunAt)})]}),(0,G.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:[(0,G.jsx)(K,{variant:e.enabled?`secondary`:`outline`,children:e.enabled?`enabled`:`disabled`}),(0,G.jsx)(K,{variant:`outline`,children:t.label}),e.decision?(0,G.jsx)(K,{variant:`outline`,children:e.decision}):null]}),(0,G.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:e.task})]},e.taskId)})}):(0,G.jsx)($h,{title:`No tasks`,body:`Add a heartbeat task in the CLI, then manage it from here.`})})]}):f===`runs`?(0,G.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,G.jsx)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>p(`detail`),children:`← Task`}),(0,G.jsx)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:`Runs`})]})}),(0,G.jsx)(`nav`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,G.jsxs)(`div`,{className:`grid grid-cols-2 rounded-md bg-muted p-1`,children:[(0,G.jsx)(Qh,{active:!1,onClick:()=>p(`detail`),children:`Summary`}),(0,G.jsx)(Qh,{active:!0,children:`Runs`})]})}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsx)(Xh,{title:`History`,children:s.length?(0,G.jsx)(`div`,{className:`space-y-2`,children:s.map(e=>(0,G.jsxs)(`button`,{type:`button`,className:`w-full rounded-md border px-2 py-2 text-left ${e.id===a?`border-primary bg-primary/5`:`border-border bg-background`}`,onClick:()=>o(e.id),children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,G.jsx)(`p`,{className:`m-0 truncate text-xs font-medium text-foreground`,children:e.id}),(0,G.jsx)(`p`,{className:`m-0 shrink-0 text-[11px] text-muted-foreground`,children:Fa(e.createdAt)})]}),(0,G.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:[(0,G.jsx)(K,{variant:`outline`,children:e.status}),(0,G.jsx)(K,{variant:`outline`,children:e.decision}),(0,G.jsx)(K,{variant:`outline`,children:e.outcome})]})]},e.id))}):(0,G.jsx)($h,{title:`No runs`,body:`Run-once and scheduled executions appear here.`})}),(0,G.jsx)(Xh,{title:`Run detail`,children:i?(0,G.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:i.id}),(0,G.jsx)(`p`,{className:`m-0 text-muted-foreground`,children:i.summary}),(0,G.jsx)(Zh,{label:`created`,value:Fa(i.createdAt)}),(0,G.jsx)(Zh,{label:`task`,value:i.taskId}),(0,G.jsx)(Zh,{label:`usage`,value:Va(i.usage)??`none`}),(0,G.jsx)(Zh,{label:`checkpoint`,value:i.loadedCheckpoint?`loaded`:`fresh`}),i.progress?(0,G.jsx)(Zh,{label:`progress`,value:i.progress}):null]}):(0,G.jsx)($h,{title:`No run selected`,body:`Select a run to inspect the latest heartbeat result.`})})]})})]}):(0,G.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,G.jsx)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>p(`list`),children:`← Tasks`}),(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>p(`runs`),disabled:!s.length,children:`Runs`})]})}),(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:t?(0,G.jsxs)(`div`,{className:`space-y-3`,children:[(0,G.jsxs)(Xh,{title:t.name||t.taskId,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,G.jsx)(K,{variant:t.enabled?`secondary`:`outline`,children:t.enabled?`enabled`:`disabled`}),(0,G.jsx)(K,{variant:h?.tone===`good`?`secondary`:`outline`,children:h?.label??t.status}),t.decision?(0,G.jsx)(K,{variant:`outline`,children:t.decision}):null]}),(0,G.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:t.taskId}),(0,G.jsx)(`p`,{className:`m-0 mt-2 text-sm text-foreground`,children:t.task}),(0,G.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:h?.detail}),(0,G.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,G.jsx)(q,{type:`button`,size:`sm`,variant:`outline`,disabled:m||!t.enabled,onClick:()=>{d(t.taskId)},children:m&&c?.action===`trigger`?`Triggering…`:`Run now`}),t.enabled?(0,G.jsx)(q,{type:`button`,size:`sm`,variant:`outline`,disabled:m,onClick:()=>{u(t.taskId)},children:m&&c?.action===`disable`?`Pausing…`:`Pause task`}):(0,G.jsx)(q,{type:`button`,size:`sm`,variant:`outline`,disabled:m,onClick:()=>{l(t.taskId)},children:m&&c?.action===`enable`?`Resuming…`:`Resume task`})]})]}),(0,G.jsxs)(Xh,{title:`Runtime status`,children:[(0,G.jsx)(Zh,{label:`execution`,value:h?.label??t.status}),(0,G.jsx)(Zh,{label:`model`,value:t.model??`unset`}),(0,G.jsx)(Zh,{label:`interval`,value:Ba(t.intervalMs)}),(0,G.jsx)(Zh,{label:`last run`,value:Fa(t.lastRunAt)}),(0,G.jsx)(Zh,{label:`next run`,value:Fa(t.nextRunAt)}),(0,G.jsx)(Zh,{label:`checkpoint`,value:t.loadedCheckpoint?`loaded`:t.resumable?`resumable`:`none`}),(0,G.jsx)(Zh,{label:`usage`,value:Va(t.usage)??`none`})]}),t.summary?(0,G.jsx)(Xh,{title:`Latest summary`,children:(0,G.jsx)(`p`,{className:`m-0 text-sm text-foreground`,children:t.summary})}):null,t.progress?(0,G.jsx)(Xh,{title:`Progress`,children:(0,G.jsx)(`p`,{className:`m-0 text-sm text-foreground`,children:t.progress})}):null,t.error?(0,G.jsx)(Xh,{title:`Error`,children:(0,G.jsx)(`p`,{className:`m-0 text-sm text-destructive`,children:t.error})}):null]}):(0,G.jsx)($h,{title:`No task selected`,body:`Choose a task to inspect its durable prompt and latest run state.`})})]})}function Xh({title:e,children:t}){return(0,G.jsxs)(`section`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,G.jsx)(`div`,{className:`mt-2`,children:t})]})}function Zh({label:e,value:t}){return(0,G.jsxs)(`div`,{className:`grid grid-cols-[92px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,G.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,G.jsx)(`span`,{className:`break-words text-foreground`,children:t})]})}function Qh({active:e,onClick:t,children:n}){return(0,G.jsx)(`button`,{type:`button`,className:`h-8 rounded-md text-xs font-medium ${e?`bg-background text-foreground shadow-sm`:`text-muted-foreground`}`,onClick:t,"aria-current":e?`page`:void 0,children:n})}function $h({title:e,body:t}){return(0,G.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,G.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,G.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function eg({tasks:e,runs:t,selectedTask:n,selectedTaskId:r,onSelectTask:i,selectedRun:a,selectedRunId:o,onSelectRun:s,selectedTaskRuns:c,pendingTaskAction:l,onEnableTask:u,onDisableTask:d,onTriggerTask:f}){if(Da())return(0,G.jsx)(Yh,{tasks:e,selectedTask:n,selectedTaskId:r,onSelectTask:i,selectedRun:a,selectedRunId:o,onSelectRun:s,selectedTaskRuns:c,pendingTaskAction:l,onEnableTask:u,onDisableTask:d,onTriggerTask:f});let p=!!(n&&l&&l.taskId===n.taskId),m=n?Ha(n):void 0;return(0,G.jsxs)(`section`,{className:`workspace-shell tasks-shell`,children:[(0,G.jsxs)(`aside`,{className:`workspace-sidebar`,children:[(0,G.jsx)(km,{title:`Tasks`,subtitle:`${e.length} durable task${e.length===1?``:`s`}`}),(0,G.jsx)(`div`,{className:`sidebar-scroll`,children:e.length?e.map(e=>(0,G.jsx)(Km,{task:e,active:e.taskId===r,onClick:()=>i(e.taskId)},e.taskId)):(0,G.jsx)(Cm,{title:`No tasks`,body:`Add a heartbeat task in the CLI, then manage it from this view.`})})]}),(0,G.jsxs)(`section`,{className:`workspace-main`,children:[(0,G.jsx)(km,{title:n?.name||n?.taskId||`Task detail`,subtitle:n?`${n.taskId} · next ${Fa(n.nextRunAt)}`:`Pick a task to inspect prompt, schedule, and recent outcome.`,actions:n?(0,G.jsxs)(`div`,{className:`pills`,children:[(0,G.jsx)($,{tone:n.enabled?`good`:void 0,children:n.enabled?`enabled`:`disabled`}),(0,G.jsx)($,{tone:m?.tone,children:m?.label??n.status}),n.decision?(0,G.jsx)($,{tone:Pa(n.decision),children:n.decision}):null]}):void 0}),(0,G.jsx)(`div`,{className:`task-detail-scroll`,children:n?(0,G.jsxs)(`div`,{className:`detail-stack`,children:[(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Task prompt`}),(0,G.jsx)(`p`,{className:`summary`,children:n.task}),(0,G.jsxs)(`div`,{className:`pills approval-actions`,children:[(0,G.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:p||!n.enabled,onClick:()=>{f(n.taskId)},children:p&&l?.action===`trigger`?`Triggering…`:`Run now`}),n.enabled?(0,G.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:p,onClick:()=>{d(n.taskId)},children:p&&l?.action===`disable`?`Pausing…`:`Pause task`}):(0,G.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:p,onClick:()=>{u(n.taskId)},children:p&&l?.action===`enable`?`Resuming…`:`Resume task`})]}),(0,G.jsx)(`p`,{className:`summary`,children:m?.detail})]}),(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Runtime status`}),(0,G.jsxs)(`div`,{className:`kv-list`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`execution`}),(0,G.jsx)(`span`,{className:`kv-value`,children:m?.label??n.status})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`model`}),(0,G.jsx)(`span`,{className:`kv-value`,children:n.model??`unset`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`interval`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Ba(n.intervalMs)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`last run`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Fa(n.lastRunAt)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`next run`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Fa(n.nextRunAt)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`checkpoint`}),(0,G.jsx)(`span`,{className:`kv-value`,children:n.loadedCheckpoint?`loaded`:n.resumable?`resumable`:`none`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`usage`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Va(n.usage)??`none`})]})]})]}),n.summary?(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Latest summary`}),(0,G.jsx)(`p`,{className:`summary`,children:n.summary})]}):null,n.progress?(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Progress`}),(0,G.jsx)(`p`,{className:`summary`,children:n.progress})]}):null,n.error?(0,G.jsxs)(`div`,{className:`detail-card error-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Error`}),(0,G.jsx)(`p`,{className:`summary`,children:n.error})]}):null]}):(0,G.jsx)(Cm,{title:`No task selected`,body:`Choose a task from the left to inspect its durable prompt and latest run state.`})})]}),(0,G.jsxs)(`aside`,{className:`workspace-side`,children:[(0,G.jsx)(km,{title:`Runs`,subtitle:n?`${c.length} run${c.length===1?``:`s`} for this task`:`${t.length} recent run${t.length===1?``:`s`}`}),(0,G.jsxs)(`div`,{className:`side-scroll split-scroll`,children:[(0,G.jsx)(Am,{title:`History`,children:c.length?(0,G.jsx)(`div`,{className:`stack-list compact`,children:c.map(e=>(0,G.jsx)(qm,{run:e,active:e.id===o,onClick:()=>s(e.id)},e.id))}):(0,G.jsx)(Cm,{title:`No runs for this task`,body:`Run-once and scheduled executions will appear here.`})}),(0,G.jsx)(Am,{title:`Run detail`,children:a?(0,G.jsxs)(`div`,{className:`detail-stack compact-stack`,children:[(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`card-title`,children:a.id}),(0,G.jsxs)(`div`,{className:`pills`,children:[(0,G.jsx)($,{tone:Pa(a.status),children:a.status}),(0,G.jsx)($,{tone:Pa(a.decision),children:a.decision}),(0,G.jsx)($,{tone:Pa(a.outcome),children:a.outcome})]}),(0,G.jsx)(`p`,{className:`summary`,children:a.summary})]}),(0,G.jsx)(`div`,{className:`detail-card`,children:(0,G.jsxs)(`div`,{className:`kv-list`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`created`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Fa(a.createdAt)})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`task`}),(0,G.jsx)(`span`,{className:`kv-value`,children:a.taskId})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`usage`}),(0,G.jsx)(`span`,{className:`kv-value`,children:Va(a.usage)??`none`})]}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`kv-key`,children:`checkpoint`}),(0,G.jsx)(`span`,{className:`kv-value`,children:a.loadedCheckpoint?`loaded`:`fresh`})]})]})}),a.progress?(0,G.jsxs)(`div`,{className:`detail-card`,children:[(0,G.jsx)(`p`,{className:`section-label`,children:`Progress`}),(0,G.jsx)(`p`,{className:`summary`,children:a.progress})]}):null]}):(0,G.jsx)(Cm,{title:`No run selected`,body:`Select a run to inspect the latest durable heartbeat result.`})})]})]})]})}function tg({state:e,creatingWorkspace:t=!1,renamingWorkspaceId:n,onCreateWorkspace:r,onRenameWorkspace:i,onSetActiveWorkspace:a}){let o=lg(e);return(0,G.jsx)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-x-hidden overflow-y-auto px-3 pt-3 pb-[calc(env(safe-area-inset-bottom)+5.5rem)] sm:px-4 sm:pt-4 sm:pb-4`,children:(0,G.jsxs)(`div`,{className:`grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1.4fr)_minmax(320px,0.8fr)]`,children:[(0,G.jsxs)(cg,{children:[(0,G.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace management`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Attached workspaces`}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Switch, rename, and inspect workspaces attached to this control-plane catalog.`})]}),(0,G.jsxs)(K,{variant:`outline`,children:[za(e.workspaces.length),` local`]})]}),(0,G.jsx)(`div`,{className:`space-y-3`,"data-testid":`workspace-list`,children:e.workspaces.map(t=>(0,G.jsx)(`article`,{"data-testid":`workspace-card-${t.id}`,className:`rounded-xl border border-border bg-background/60 p-4`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`,children:[(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:t.name}),t.id===e.activeWorkspaceId?(0,G.jsx)(K,{variant:`secondary`,children:`active`}):null,(0,G.jsx)(K,{variant:`outline`,children:t.id})]}),(0,G.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-sm`,children:[(0,G.jsx)(sg,{label:`Workspace path`,children:t.anchorRoot}),(0,G.jsx)(sg,{label:`State path`,children:t.stateRoot}),(0,G.jsx)(sg,{label:`Repo roots`,children:t.repoRoots.join(`, `)})]})]}),(0,G.jsxs)(`div`,{className:`flex min-w-[min(100%,260px)] flex-col gap-3`,children:[(0,G.jsx)(ng,{workspaceId:t.id,initialName:t.name,disabled:!i||n===t.id,pending:n===t.id,onRename:i}),(0,G.jsx)(q,{type:`button`,variant:t.id===e.activeWorkspaceId?`secondary`:`outline`,disabled:t.id===e.activeWorkspaceId||!a,onClick:()=>a?.(t.id),children:t.id===e.activeWorkspaceId?`Current workspace`:`Switch to workspace`})]})]})},t.id))})]}),(0,G.jsxs)(`div`,{className:`grid min-w-0 gap-4`,children:[(0,G.jsx)(rg,{creatingWorkspace:t,recentWorkspaces:o,onCreateWorkspace:r}),(0,G.jsx)(ig,{state:e,recentWorkspaces:o,creatingWorkspace:t,onCreateWorkspace:r,onSetActiveWorkspace:a})]})]})})}function ng({workspaceId:e,initialName:t,disabled:n,pending:r,onRename:i}){let[a,o]=(0,x.useState)(t);(0,x.useEffect)(()=>{o(t)},[t]);let s=a.trim()&&a.trim()!==t;return(0,G.jsxs)(`form`,{className:`flex gap-2`,onSubmit:t=>{t.preventDefault(),!(!i||!s)&&i(e,a.trim())},children:[(0,G.jsx)(`input`,{className:`h-10 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:a,onChange:e=>o(e.target.value),disabled:n,"aria-label":`Workspace name`}),(0,G.jsx)(q,{type:`submit`,variant:`outline`,size:`sm`,disabled:n||!s,children:r?`Saving…`:`Rename`})]})}function rg({creatingWorkspace:e,onCreateWorkspace:t,recentWorkspaces:n=[]}){let[r,i]=(0,x.useState)(``),[a,o]=(0,x.useState)(``),[s,c]=(0,x.useState)(!0),[l,u]=(0,x.useState)(!1);return(0,G.jsxs)(cg,{children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Add workspace`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Choose a project`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Register another workspace path and optionally switch the control plane to it.`})]}),(0,G.jsxs)(`form`,{"data-testid":`workspace-create-form`,className:`mt-4 space-y-4`,onSubmit:e=>{e.preventDefault(),!(!t||!r.trim()||!a.trim())&&t({name:r.trim(),anchorRoot:a.trim(),setActive:s}).then(()=>{i(``),o(``),c(!0)})},children:[(0,G.jsxs)(`label`,{className:`block space-y-2`,children:[(0,G.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Name`}),(0,G.jsx)(`input`,{className:`h-11 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:r,onChange:e=>i(e.target.value),placeholder:`Workspace name`,disabled:e,"data-testid":`workspace-create-name`})]}),(0,G.jsxs)(`label`,{className:`block space-y-2`,children:[(0,G.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace path`}),(0,G.jsxs)(`div`,{className:`flex gap-2`,children:[(0,G.jsx)(`input`,{className:`h-11 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:a,onChange:e=>o(e.target.value),placeholder:`/absolute/path/to/workspace`,disabled:e,"data-testid":`workspace-create-path`}),(0,G.jsx)(q,{type:`button`,variant:`outline`,className:`h-11 shrink-0`,disabled:e,onClick:()=>u(!0),children:`Choose…`})]})]}),(0,G.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked),disabled:e}),(0,G.jsx)(`span`,{children:`Switch to this workspace after creating it`})]}),(0,G.jsx)(q,{type:`submit`,variant:`secondary`,className:`w-full`,disabled:e||!r.trim()||!a.trim(),"data-testid":`workspace-create-submit`,children:e?`Creating…`:`Create workspace`})]}),(0,G.jsx)(ag,{open:l,selectedPath:a,recentWorkspaces:n,onOpenChange:u,onSelectPath:e=>{o(e),r.trim()||i(ug(e))}})]})}function ig({state:e,recentWorkspaces:t,creatingWorkspace:n,onCreateWorkspace:r,onSetActiveWorkspace:i}){return(0,G.jsxs)(cg,{children:[(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent workspaces`}),(0,G.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Open workspace`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Workspaces Heddle has seen on this machine, including the current catalog.`})]}),t.length?(0,G.jsx)(`div`,{className:`mt-4 space-y-2`,"data-testid":`recent-workspace-list`,children:t.slice(0,8).map(t=>{let a=t.id===e.activeWorkspaceId,o=t.relation===`attached`;return(0,G.jsxs)(`button`,{type:`button`,className:`w-full rounded-xl border border-border bg-background/60 p-3 text-left hover:border-primary disabled:cursor-not-allowed disabled:opacity-50`,disabled:n||a||(o?!i:!r),onClick:()=>{o?i?.(t.id):r?.({name:t.name,anchorRoot:t.anchorRoot,setActive:!0})},children:[(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:t.name}),a?(0,G.jsx)(K,{variant:`secondary`,children:`active`}):null,(0,G.jsx)(K,{variant:`outline`,children:o?`attached`:`known`})]}),(0,G.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:t.anchorRoot}),(0,G.jsx)(`span`,{className:`mt-2 block text-[11px] text-muted-foreground`,children:Ra(t.stateRoot)})]},t.stateRoot)})}):(0,G.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`No Heddle workspaces are known yet. Run Heddle in a project once, then refresh.`})]})}function ag({open:e,selectedPath:t,recentWorkspaces:n,onOpenChange:r,onSelectPath:i}){let[a,o]=(0,x.useState)(t.trim()||void 0),[s,c]=(0,x.useState)(t.trim()),[l,u]=(0,x.useState)(),[d,f]=(0,x.useState)(),[p,m]=(0,x.useState)(!1),[h,g]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{if(!e)return;let n=t.trim()||void 0;o(n),c(n??``)},[e,t]),(0,x.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r(!1)};return window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`keydown`,t)}},[e,r]),(0,x.useEffect)(()=>{if(!e)return;let t=!1;return m(!0),Ii(a,h).then(e=>{t||(u(e),o(e.path),c(e.path),f(void 0))}).catch(e=>{t||f(e instanceof Error?e.message:String(e))}).finally(()=>{t||m(!1)}),()=>{t=!0}},[e,a,h]),!e)return null;let _=l?.path??a??t.trim(),v=()=>{_&&(i(_),r(!1))};return(0,G.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-3 backdrop-blur-sm sm:p-6`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r(!1)},children:(0,G.jsxs)(`div`,{className:`flex max-h-[min(820px,92vh)] w-full max-w-4xl flex-col overflow-hidden rounded-2xl border border-border bg-card shadow-2xl`,role:`dialog`,"aria-modal":`true`,"aria-label":`Choose workspace folder`,children:[(0,G.jsxs)(`div`,{className:`border-b border-border px-4 py-4 sm:px-6`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace folder`}),(0,G.jsx)(`h2`,{className:`mt-1 text-xl font-semibold text-foreground`,children:`Choose a project root`}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Navigate folders, pick a repo or existing Heddle workspace, then switch the control plane to it.`})]}),(0,G.jsx)(q,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`})]}),(0,G.jsxs)(`form`,{className:`mt-4 flex flex-col gap-2 sm:flex-row`,onSubmit:e=>{e.preventDefault(),o(s.trim()||void 0)},children:[(0,G.jsx)(`input`,{className:`h-11 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:s,onChange:e=>c(e.target.value),placeholder:`/absolute/path/to/workspace`}),(0,G.jsx)(q,{type:`submit`,variant:`outline`,className:`h-11`,children:`Go`}),(0,G.jsx)(q,{type:`button`,variant:`secondary`,className:`h-11`,disabled:!_,onClick:v,children:`Use this folder`})]})]}),(0,G.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:[n.length?(0,G.jsxs)(`div`,{className:`mb-4 rounded-xl border border-border bg-background/50 p-3`,children:[(0,G.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent workspaces`}),(0,G.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Choose from Heddle workspaces seen on this machine.`})]}),(0,G.jsx)(K,{variant:`outline`,children:n.length})]}),(0,G.jsx)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:n.slice(0,6).map(e=>(0,G.jsxs)(`button`,{type:`button`,className:`rounded-lg border border-border bg-card px-3 py-2 text-left hover:border-primary`,onClick:()=>{i(e.anchorRoot),r(!1)},children:[(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:e.name}),(0,G.jsx)(K,{variant:`outline`,children:e.relation})]}),(0,G.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:e.anchorRoot})]},e.stateRoot))})]}):null,(0,G.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(K,{variant:`outline`,className:`max-w-full truncate`,children:_||`Home`}),l?.parentPath?(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>o(l.parentPath),children:`Up one level`}):null,(0,G.jsxs)(`label`,{className:`ml-auto flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)}),(0,G.jsx)(`span`,{children:`Show hidden folders`})]}),p?(0,G.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):null]}),d?(0,G.jsx)(`div`,{className:`mb-3 rounded-xl border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive`,children:d}):null,(0,G.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-background/40`,children:[l?.parentPath?(0,G.jsx)(og,{label:`..`,detail:l.parentPath,onOpen:()=>o(l.parentPath)}):null,l?.entries.map(e=>(0,G.jsx)(og,{label:e.name,detail:e.path,entry:e,onOpen:()=>o(e.path),onSelect:()=>{i(e.path),r(!1)}},e.path)),l&&!p&&l.entries.length===0?(0,G.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground`,children:`No readable child folders found here. You can still use the current folder.`}):null]})]})]})})}function og({label:e,detail:t,entry:n,onOpen:r,onSelect:i}){return(0,G.jsxs)(`div`,{className:`grid gap-3 border-b border-border p-3 last:border-b-0 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`min-w-0 text-left`,onClick:r,children:[(0,G.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:e}),(0,G.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:t}),n?(0,G.jsxs)(`span`,{className:`mt-2 flex flex-wrap gap-1`,children:[n.hasHeddleState?(0,G.jsx)(K,{variant:`secondary`,children:`Heddle workspace`}):null,n.hasGit?(0,G.jsx)(K,{variant:`outline`,children:`git repo`}):null,n.hasPackageJson?(0,G.jsx)(K,{variant:`outline`,children:`package.json`}):null]}):null]}),(0,G.jsxs)(`div`,{className:`flex gap-2 sm:justify-end`,children:[(0,G.jsx)(q,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:`Open`}),i?(0,G.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:`Select`}):null]})]})}function sg({label:e,children:t}){return(0,G.jsxs)(`div`,{className:`space-y-1`,children:[(0,G.jsx)(`dt`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,G.jsx)(`dd`,{className:`break-all text-sm text-foreground`,children:t})]})}function cg({children:e}){return(0,G.jsx)(`section`,{className:`min-w-0 rounded-2xl border border-border bg-card/95 p-4 shadow-sm sm:p-5`,children:e})}function lg(e){let t=new Map;for(let n of e.workspaces)t.set(n.stateRoot,{...n,relation:`attached`});for(let n of e.knownWorkspaces??[])t.has(n.stateRoot)||t.set(n.stateRoot,{...n,relation:`known`});return Array.from(t.values()).sort((t,n)=>{let r=Number(n.id===e.activeWorkspaceId)-Number(t.id===e.activeWorkspaceId);return r===0?(n.updatedAt??``).localeCompare(t.updatedAt??``):r})}function ug(e){let t=e.trim().replace(/\/+$/,``);return t.split(`/`).filter(Boolean).at(-1)??t}function dg(e){let t=fg(e),n=x.forwardRef((e,n)=>{let{children:r,...i}=e,a=x.Children.toArray(r),o=a.find(mg);if(o){let e=o.props.children,r=a.map(t=>t===o?x.Children.count(e)>1?x.Children.only(null):x.isValidElement(e)?e.props.children:null:t);return(0,G.jsx)(t,{...i,ref:n,children:x.isValidElement(e)?x.cloneElement(e,void 0,r):null})}return(0,G.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function fg(e){let t=x.forwardRef((e,t)=>{let{children:n,...r}=e;if(x.isValidElement(n)){let e=gg(n),i=hg(r,n.props);return n.type!==x.Fragment&&(i.ref=t?Ss(t,e):e),x.cloneElement(n,i)}return x.Children.count(n)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pg=Symbol(`radix.slottable`);function mg(e){return x.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===pg}function hg(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function gg(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function _g(e){let t=e+`CollectionProvider`,[n,r]=Ls(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=x.useRef(null),a=x.useRef(new Map).current;return(0,G.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=dg(s),l=x.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,G.jsx)(c,{ref:Cs(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=dg(u),p=x.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=x.useRef(null),s=Cs(t,o),c=a(u,n);return x.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,G.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return x.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var vg=`ToastProvider`,[yg,bg,xg]=_g(`Toast`),[Sg,Cg]=Ls(`Toast`,[xg]),[wg,Tg]=Sg(vg),Eg=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=x.useState(null),[l,u]=x.useState(0),d=x.useRef(!1),f=x.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${vg}\`. Expected non-empty \`string\`.`),(0,G.jsx)(yg.Provider,{scope:t,children:(0,G.jsx)(wg,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:x.useCallback(()=>u(e=>e+1),[]),onToastRemove:x.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};Eg.displayName=vg;var Dg=`ToastViewport`,Og=[`F8`],kg=`toast.viewportPause`,Ag=`toast.viewportResume`,jg=x.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=Og,label:i=`Notifications ({hotkey})`,...a}=e,o=Tg(Dg,n),s=bg(n),c=x.useRef(null),l=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=Cs(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;x.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),x.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(kg);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(Ag);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=x.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...i_(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return x.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);a_(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,G.jsxs)(uc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,G.jsx)(Ng,{ref:l,onFocusFromOutsideViewport:()=>{a_(h({tabbingDirection:`forwards`}))}}),(0,G.jsx)(yg.Slot,{scope:n,children:(0,G.jsx)(Ks.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,G.jsx)(Ng,{ref:u,onFocusFromOutsideViewport:()=>{a_(h({tabbingDirection:`backwards`}))}})]})});jg.displayName=Dg;var Mg=`ToastFocusProxy`,Ng=x.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Tg(Mg,n);return(0,G.jsx)(ud,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});Ng.displayName=Mg;var Pg=`Toast`,Fg=`toast.swipeStart`,Ig=`toast.swipeMove`,Lg=`toast.swipeCancel`,Rg=`toast.swipeEnd`,zg=x.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=ad({prop:r,defaultProp:i??!0,onChange:a,caller:Pg});return(0,G.jsx)(Qu,{present:n||s,children:(0,G.jsx)(Hg,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:Js(e.onPause),onResume:Js(e.onResume),onSwipeStart:Is(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:Is(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:Is(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:Is(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});zg.displayName=Pg;var[Bg,Vg]=Sg(Pg,{onClose(){}}),Hg=x.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=Tg(Pg,n),[g,_]=x.useState(null),v=Cs(t,e=>_(e)),y=x.useRef(null),b=x.useRef(null),S=i||h.duration,C=x.useRef(0),w=x.useRef(S),T=x.useRef(0),{onToastAdd:E,onToastRemove:D}=h,O=Js(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),ee=x.useCallback(e=>{!e||e===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(O,e))},[O]);x.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{ee(w.current),l?.()},n=()=>{let e=new Date().getTime()-C.current;w.current-=e,window.clearTimeout(T.current),c?.()};return e.addEventListener(kg,n),e.addEventListener(Ag,t),()=>{e.removeEventListener(kg,n),e.removeEventListener(Ag,t)}}},[h.viewport,S,c,l,ee]),x.useEffect(()=>{a&&!h.isClosePausedRef.current&&ee(S)},[a,S,h.isClosePausedRef,ee]),x.useEffect(()=>(E(),()=>D()),[E,D]);let k=x.useMemo(()=>g?$g(g):null,[g]);return h.viewport?(0,G.jsxs)(G.Fragment,{children:[k&&(0,G.jsx)(Ug,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:k}),(0,G.jsx)(Bg,{scope:n,onClose:O,children:zs.createPortal((0,G.jsx)(yg.ItemSlot,{scope:n,children:(0,G.jsx)(lc,{asChild:!0,onEscapeKeyDown:Is(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||O(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,G.jsx)(Ks.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:Is(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:Is(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:Is(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!b.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(b.current=l,e_(Ig,d,f,{discrete:!1})):t_(l,h.swipeDirection,c)?(b.current=l,e_(Fg,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:Is(e.onPointerUp,e=>{let t=b.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),b.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};t_(t,h.swipeDirection,h.swipeThreshold)?e_(Rg,p,r,{discrete:!0}):e_(Lg,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Ug=e=>{let{__scopeToast:t,children:n,...r}=e,i=Tg(Pg,t),[a,o]=x.useState(!1),[s,c]=x.useState(!1);return n_(()=>o(!0)),x.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,G.jsx)(Xu,{asChild:!0,children:(0,G.jsx)(ud,{...r,children:a&&(0,G.jsxs)(G.Fragment,{children:[i.label,` `,n]})})})},Wg=`ToastTitle`,Gg=x.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,G.jsx)(Ks.div,{...r,ref:t})});Gg.displayName=Wg;var Kg=`ToastDescription`,qg=x.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,G.jsx)(Ks.div,{...r,ref:t})});qg.displayName=Kg;var Jg=`ToastAction`,Yg=x.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,G.jsx)(Qg,{altText:n,asChild:!0,children:(0,G.jsx)(Zg,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jg}\`. Expected non-empty \`string\`.`),null)});Yg.displayName=Jg;var Xg=`ToastClose`,Zg=x.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=Vg(Xg,n);return(0,G.jsx)(Qg,{asChild:!0,children:(0,G.jsx)(Ks.button,{type:`button`,...r,ref:t,onClick:Is(e.onClick,i.onClose)})})});Zg.displayName=Xg;var Qg=x.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,G.jsx)(Ks.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function $g(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),r_(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...$g(e))}}),t}function e_(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?qs(i,a):i.dispatchEvent(a)}var t_=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function n_(e=()=>{}){let t=Js(e);dc(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function r_(e){return e.nodeType===e.ELEMENT_NODE}function i_(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function a_(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var o_=Eg,s_=jg,c_=zg,l_=Gg,u_=qg,d_=Zg,f_=o_,p_=x.forwardRef(({className:e,...t},n)=>(0,G.jsx)(s_,{ref:n,className:vs(`fixed top-[max(0.75rem,env(safe-area-inset-top))] z-50 flex max-h-screen w-full flex-col-reverse gap-2 p-3 sm:top-[max(1rem,env(safe-area-inset-top))] md:right-4 md:top-4 md:w-[420px] md:max-w-[420px] md:flex-col`,e),...t}));p_.displayName=s_.displayName;var m_=Ja(`group pointer-events-auto relative flex w-full items-start justify-between gap-3 overflow-hidden rounded-md border p-3 pr-6 shadow-2xl ring-1 ring-black/20 transition-all`,{variants:{variant:{info:`border-cyan-400/40 bg-slate-950/96 text-slate-100`,success:`border-emerald-400/45 bg-emerald-950/90 text-emerald-50`,error:`border-red-300/45 bg-red-950/92 text-red-50`}},defaultVariants:{variant:`info`}}),h_=x.forwardRef(({className:e,variant:t,...n},r)=>(0,G.jsx)(c_,{ref:r,className:vs(m_({variant:t}),e),...n}));h_.displayName=c_.displayName;var g_=x.forwardRef(({className:e,...t},n)=>(0,G.jsx)(l_,{ref:n,className:vs(`text-sm font-semibold`,e),...t}));g_.displayName=l_.displayName;var __=x.forwardRef(({className:e,...t},n)=>(0,G.jsx)(u_,{ref:n,className:vs(`mt-1 text-xs text-slate-200/90`,e),...t}));__.displayName=u_.displayName;var v_=x.forwardRef(({className:e,...t},n)=>(0,G.jsx)(d_,{ref:n,className:vs(`absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-md border border-white/20 bg-black/25 text-slate-200 transition-colors hover:bg-black/45 hover:text-white`,e),"toast-close":``,...t,children:`×`}));v_.displayName=d_.displayName;var y_=3,b_=7e3,x_=new Map,S_=e=>{if(x_.has(e))return;let t=setTimeout(()=>{x_.delete(e),E_({type:`REMOVE_TOAST`,toastId:e})},b_);x_.set(e,t)};function C_(e,t){switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,y_)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?S_(n):e.toasts.forEach(e=>S_(e.id)),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}}var w_=[],T_={toasts:[]};function E_(e){T_=C_(T_,e),w_.forEach(e=>{e(T_)})}function D_(){return`${Date.now()}-${Math.floor(Math.random()*1e3)}`}function O_(e){let t=D_(),n=()=>E_({type:`DISMISS_TOAST`,toastId:t}),r=e=>E_({type:`UPDATE_TOAST`,toast:{...e,id:t}});E_({type:`ADD_TOAST`,toast:{id:t,title:e.title,body:e.body,tone:e.tone,open:!0}});let i=e.tone===`error`?b_:4200;return setTimeout(n,i),{id:t,dismiss:n,update:r}}function k_(){let[e,t]=x.useState(T_);return x.useEffect(()=>(w_.push(t),()=>{let e=w_.indexOf(t);e>-1&&w_.splice(e,1)}),[]),{...e,toast:O_,dismiss:e=>E_({type:`DISMISS_TOAST`,toastId:e})}}function A_(){let{toasts:e,dismiss:t}=k_();return(0,G.jsxs)(f_,{children:[e.map(e=>(0,G.jsxs)(h_,{open:e.open,onOpenChange:n=>{n||t(e.id)},variant:e.tone??`info`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(g_,{children:e.title}),e.body?(0,G.jsx)(__,{children:e.body}):null]}),(0,G.jsx)(v_,{"aria-label":`Dismiss notification`})]},e.id)),(0,G.jsx)(p_,{})]})}function j_(){let e=$i(),{state:t,error:n,refresh:r,setActiveWorkspace:i,createWorkspace:a,renameWorkspace:o}=qi(),{toasts:s,toast:c}=k_(),l=Da(),u=(0,x.useCallback)(()=>{r()},[r]),d=ka(t?.sessions,c,u,{selectedSessionId:e.routeSessionId,onSelectedSessionIdChange:e.setRouteSessionId,autoSelectSession:e.section===`sessions`}),f=ja(t?.heartbeat.tasks,t?.heartbeat.runs,c,u),p=Ma({state:t,setActiveWorkspace:i,createWorkspace:a,renameWorkspace:o,notify:c}),m=xa({section:e.section,sessionsState:d,error:n,toasts:s,notify:c});(0,x.useEffect)(()=>{e.normalizeRoute()},[e]),(0,x.useEffect)(()=>{window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT=async e=>{await m(e?.screenshot??`none`)};let e=e=>{if(!(e.metaKey||e.ctrlKey)||!e.shiftKey||e.key.toLowerCase()!==`d`)return;let t=e.target;t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||(e.preventDefault(),m(`none`))};return window.addEventListener(`keydown`,e),()=>{window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT&&delete window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT,window.removeEventListener(`keydown`,e)}},[m]);let h=t?M_(t,d,f,p):(0,G.jsx)(Sm,{title:`Loading state`,children:(0,G.jsx)(`p`,{className:`muted`,children:n??`Reading local Heddle state...`})});return l?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Fm,{section:e.section,onSectionChange:e.setSection,state:t,error:n,onSetActiveWorkspace:e=>void p.switchWorkspace(e),onCaptureDebugSnapshot:e=>void m(e),onRefresh:()=>void r(),children:h}),(0,G.jsx)(A_,{})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(jm,{activeSection:e.section,sessionPath:e.routeSessionId?`/sessions/${encodeURIComponent(e.routeSessionId)}`:`/sessions`,state:t,error:n,onSetActiveWorkspace:e=>void p.switchWorkspace(e),onCaptureDebugSnapshot:e=>void m(e),onRefresh:()=>void r(),children:h}),(0,G.jsx)(A_,{})]})}function M_(e,t,n,r){return(0,G.jsxs)(At,{children:[(0,G.jsx)(Ot,{path:`/overview`,element:(0,G.jsx)(Lm,{state:e})}),(0,G.jsx)(Ot,{path:`/sessions`,element:(0,G.jsx)(N_,{state:e,sessionsState:t})}),(0,G.jsx)(Ot,{path:`/sessions/:sessionId/*`,element:(0,G.jsx)(N_,{state:e,sessionsState:t})}),(0,G.jsx)(Ot,{path:`/tasks`,element:(0,G.jsx)(eg,{tasks:e.heartbeat.tasks,runs:e.heartbeat.runs,selectedTask:n.selectedTask,selectedTaskId:n.selectedTaskId,onSelectTask:n.setSelectedTaskId,selectedRun:n.selectedRun,selectedRunId:n.selectedRunId,onSelectRun:n.setSelectedRunId,selectedTaskRuns:n.selectedTaskRuns,pendingTaskAction:n.pendingTaskAction,onEnableTask:n.enableTask,onDisableTask:n.disableTask,onTriggerTask:n.triggerTask})}),(0,G.jsx)(Ot,{path:`/workspaces`,element:(0,G.jsx)(tg,{state:e,creatingWorkspace:r.creatingWorkspace,renamingWorkspaceId:r.renamingWorkspaceId,onCreateWorkspace:r.createWorkspace,onRenameWorkspace:r.renameWorkspace,onSetActiveWorkspace:e=>void r.switchWorkspace(e)})}),(0,G.jsx)(Ot,{path:`*`,element:(0,G.jsx)(Dt,{to:`/overview`,replace:!0})})]})}function N_({state:e,sessionsState:t}){return(0,G.jsx)(Hh,{sessions:e.sessions,activeSession:t.activeSession,sessionDetail:t.sessionDetail,sessionDetailLoading:t.sessionDetailLoading,sessionDetailError:t.sessionDetailError,selectedSessionId:t.selectedSessionId,onSelectSession:t.setSelectedSessionId,selectedTurnId:t.selectedTurnId,onSelectTurn:t.setSelectedTurnId,selectedTurn:t.selectedTurn,turnReview:t.turnReview,turnReviewLoading:t.turnReviewLoading,turnReviewError:t.turnReviewError,sendingPrompt:t.sendingPrompt,runInFlight:t.runInFlight,memoryUpdating:t.memoryUpdating,sendPromptError:t.sendPromptError,onSendPrompt:t.sendPrompt,creatingSession:t.creatingSession,sessionNotice:t.sessionNotice,onCreateSession:t.createSession,onContinueSession:t.continueSession,onCancelSessionRun:t.cancelSessionRun,onUpdateSessionSettings:t.updateSessionSettings,pendingApproval:t.pendingApproval,onResolveApproval:t.resolveApproval})}(0,zn.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(x.StrictMode,{children:(0,G.jsx)(vn,{children:(0,G.jsx)(j_,{})})}));