@ai-studio-3d/vyasa 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -0
- package/data/common-kit.json +34 -0
- package/data/pricing.json +119 -0
- package/data/schema/AnalyticsData.json +214 -0
- package/data/schema/FoundationData.json +42 -0
- package/data/schema/KitData.json +321 -0
- package/data/schema/SearchData.json +173 -0
- package/data/schema/SessionDetailData.json +231 -0
- package/data/schema/SessionsListData.json +115 -0
- package/data/schema/WasteData.json +95 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +343 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/billing/index.d.ts +4 -0
- package/dist/core/billing/index.d.ts.map +1 -0
- package/dist/core/billing/index.js +43 -0
- package/dist/core/billing/index.js.map +1 -0
- package/dist/core/budget/index.d.ts +30 -0
- package/dist/core/budget/index.d.ts.map +1 -0
- package/dist/core/budget/index.js +61 -0
- package/dist/core/budget/index.js.map +1 -0
- package/dist/core/codex/index.d.ts +3 -0
- package/dist/core/codex/index.d.ts.map +1 -0
- package/dist/core/codex/index.js +212 -0
- package/dist/core/codex/index.js.map +1 -0
- package/dist/core/cursor/index.d.ts +3 -0
- package/dist/core/cursor/index.d.ts.map +1 -0
- package/dist/core/cursor/index.js +304 -0
- package/dist/core/cursor/index.js.map +1 -0
- package/dist/core/cursor/scan.d.ts +28 -0
- package/dist/core/cursor/scan.d.ts.map +1 -0
- package/dist/core/cursor/scan.js +79 -0
- package/dist/core/cursor/scan.js.map +1 -0
- package/dist/core/decisions/index.d.ts +21 -0
- package/dist/core/decisions/index.d.ts.map +1 -0
- package/dist/core/decisions/index.js +133 -0
- package/dist/core/decisions/index.js.map +1 -0
- package/dist/core/dlp/index.d.ts +7 -0
- package/dist/core/dlp/index.d.ts.map +1 -0
- package/dist/core/dlp/index.js +115 -0
- package/dist/core/dlp/index.js.map +1 -0
- package/dist/core/health/index.d.ts +10 -0
- package/dist/core/health/index.d.ts.map +1 -0
- package/dist/core/health/index.js +21 -0
- package/dist/core/health/index.js.map +1 -0
- package/dist/core/index/index.d.ts +9 -0
- package/dist/core/index/index.d.ts.map +1 -0
- package/dist/core/index/index.js +103 -0
- package/dist/core/index/index.js.map +1 -0
- package/dist/core/index/ingest.d.ts +16 -0
- package/dist/core/index/ingest.d.ts.map +1 -0
- package/dist/core/index/ingest.js +184 -0
- package/dist/core/index/ingest.js.map +1 -0
- package/dist/core/index/platforms.d.ts +21 -0
- package/dist/core/index/platforms.d.ts.map +1 -0
- package/dist/core/index/platforms.js +44 -0
- package/dist/core/index/platforms.js.map +1 -0
- package/dist/core/index/pricing-map.d.ts +10 -0
- package/dist/core/index/pricing-map.d.ts.map +1 -0
- package/dist/core/index/pricing-map.js +16 -0
- package/dist/core/index/pricing-map.js.map +1 -0
- package/dist/core/index/progress.d.ts +26 -0
- package/dist/core/index/progress.d.ts.map +1 -0
- package/dist/core/index/progress.js +59 -0
- package/dist/core/index/progress.js.map +1 -0
- package/dist/core/index/scan.d.ts +9 -0
- package/dist/core/index/scan.d.ts.map +1 -0
- package/dist/core/index/scan.js +42 -0
- package/dist/core/index/scan.js.map +1 -0
- package/dist/core/index/statements.d.ts +18 -0
- package/dist/core/index/statements.d.ts.map +1 -0
- package/dist/core/index/statements.js +82 -0
- package/dist/core/index/statements.js.map +1 -0
- package/dist/core/index/tail.d.ts +42 -0
- package/dist/core/index/tail.d.ts.map +1 -0
- package/dist/core/index/tail.js +123 -0
- package/dist/core/index/tail.js.map +1 -0
- package/dist/core/jsonl/index.d.ts +3 -0
- package/dist/core/jsonl/index.d.ts.map +1 -0
- package/dist/core/jsonl/index.js +106 -0
- package/dist/core/jsonl/index.js.map +1 -0
- package/dist/core/jsonl-validate/index.d.ts +10 -0
- package/dist/core/jsonl-validate/index.d.ts.map +1 -0
- package/dist/core/jsonl-validate/index.js +40 -0
- package/dist/core/jsonl-validate/index.js.map +1 -0
- package/dist/core/kit/detection.d.ts +94 -0
- package/dist/core/kit/detection.d.ts.map +1 -0
- package/dist/core/kit/detection.js +312 -0
- package/dist/core/kit/detection.js.map +1 -0
- package/dist/core/kit/index.d.ts +12 -0
- package/dist/core/kit/index.d.ts.map +1 -0
- package/dist/core/kit/index.js +131 -0
- package/dist/core/kit/index.js.map +1 -0
- package/dist/core/kit/scan.d.ts +28 -0
- package/dist/core/kit/scan.d.ts.map +1 -0
- package/dist/core/kit/scan.js +432 -0
- package/dist/core/kit/scan.js.map +1 -0
- package/dist/core/recap/index.d.ts +18 -0
- package/dist/core/recap/index.d.ts.map +1 -0
- package/dist/core/recap/index.js +88 -0
- package/dist/core/recap/index.js.map +1 -0
- package/dist/core/repetition/index.d.ts +5 -0
- package/dist/core/repetition/index.d.ts.map +1 -0
- package/dist/core/repetition/index.js +0 -0
- package/dist/core/repetition/index.js.map +1 -0
- package/dist/core/schema/index.d.ts +514 -0
- package/dist/core/schema/index.d.ts.map +1 -0
- package/dist/core/schema/index.js +2 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/schema-watch/index.d.ts +34 -0
- package/dist/core/schema-watch/index.d.ts.map +1 -0
- package/dist/core/schema-watch/index.js +87 -0
- package/dist/core/schema-watch/index.js.map +1 -0
- package/dist/core/search/index.d.ts +44 -0
- package/dist/core/search/index.d.ts.map +1 -0
- package/dist/core/search/index.js +641 -0
- package/dist/core/search/index.js.map +1 -0
- package/dist/core/settings/index.d.ts +24 -0
- package/dist/core/settings/index.d.ts.map +1 -0
- package/dist/core/settings/index.js +76 -0
- package/dist/core/settings/index.js.map +1 -0
- package/dist/core/share/bundle.d.ts +40 -0
- package/dist/core/share/bundle.d.ts.map +1 -0
- package/dist/core/share/bundle.js +158 -0
- package/dist/core/share/bundle.js.map +1 -0
- package/dist/core/share/canonical/from-claude.d.ts +13 -0
- package/dist/core/share/canonical/from-claude.d.ts.map +1 -0
- package/dist/core/share/canonical/from-claude.js +129 -0
- package/dist/core/share/canonical/from-claude.js.map +1 -0
- package/dist/core/share/canonical/from-codex.d.ts +18 -0
- package/dist/core/share/canonical/from-codex.d.ts.map +1 -0
- package/dist/core/share/canonical/from-codex.js +183 -0
- package/dist/core/share/canonical/from-codex.js.map +1 -0
- package/dist/core/share/canonical/to-claude.d.ts +15 -0
- package/dist/core/share/canonical/to-claude.d.ts.map +1 -0
- package/dist/core/share/canonical/to-claude.js +146 -0
- package/dist/core/share/canonical/to-claude.js.map +1 -0
- package/dist/core/share/canonical/to-codex.d.ts +21 -0
- package/dist/core/share/canonical/to-codex.d.ts.map +1 -0
- package/dist/core/share/canonical/to-codex.js +124 -0
- package/dist/core/share/canonical/to-codex.js.map +1 -0
- package/dist/core/share/canonical/tool-map.d.ts +61 -0
- package/dist/core/share/canonical/tool-map.d.ts.map +1 -0
- package/dist/core/share/canonical/tool-map.js +299 -0
- package/dist/core/share/canonical/tool-map.js.map +1 -0
- package/dist/core/share/canonical/types.d.ts +57 -0
- package/dist/core/share/canonical/types.d.ts.map +1 -0
- package/dist/core/share/canonical/types.js +9 -0
- package/dist/core/share/canonical/types.js.map +1 -0
- package/dist/core/share/import.d.ts +28 -0
- package/dist/core/share/import.d.ts.map +1 -0
- package/dist/core/share/import.js +174 -0
- package/dist/core/share/import.js.map +1 -0
- package/dist/core/share/manifest.d.ts +37 -0
- package/dist/core/share/manifest.d.ts.map +1 -0
- package/dist/core/share/manifest.js +31 -0
- package/dist/core/share/manifest.js.map +1 -0
- package/dist/core/share/preview.d.ts +4 -0
- package/dist/core/share/preview.d.ts.map +1 -0
- package/dist/core/share/preview.js +153 -0
- package/dist/core/share/preview.js.map +1 -0
- package/dist/core/share/primer.d.ts +19 -0
- package/dist/core/share/primer.d.ts.map +1 -0
- package/dist/core/share/primer.js +196 -0
- package/dist/core/share/primer.js.map +1 -0
- package/dist/core/share/resume.d.ts +10 -0
- package/dist/core/share/resume.d.ts.map +1 -0
- package/dist/core/share/resume.js +58 -0
- package/dist/core/share/resume.js.map +1 -0
- package/dist/core/share/scrub.d.ts +10 -0
- package/dist/core/share/scrub.d.ts.map +1 -0
- package/dist/core/share/scrub.js +198 -0
- package/dist/core/share/scrub.js.map +1 -0
- package/dist/core/share/tar.d.ts +12 -0
- package/dist/core/share/tar.d.ts.map +1 -0
- package/dist/core/share/tar.js +78 -0
- package/dist/core/share/tar.js.map +1 -0
- package/dist/core/tags/index.d.ts +48 -0
- package/dist/core/tags/index.d.ts.map +1 -0
- package/dist/core/tags/index.js +113 -0
- package/dist/core/tags/index.js.map +1 -0
- package/dist/core/today/index.d.ts +25 -0
- package/dist/core/today/index.d.ts.map +1 -0
- package/dist/core/today/index.js +42 -0
- package/dist/core/today/index.js.map +1 -0
- package/dist/core/waste/abandoned.d.ts +12 -0
- package/dist/core/waste/abandoned.d.ts.map +1 -0
- package/dist/core/waste/abandoned.js +127 -0
- package/dist/core/waste/abandoned.js.map +1 -0
- package/dist/core/waste/cache-miss.d.ts +9 -0
- package/dist/core/waste/cache-miss.d.ts.map +1 -0
- package/dist/core/waste/cache-miss.js +84 -0
- package/dist/core/waste/cache-miss.js.map +1 -0
- package/dist/core/waste/index.d.ts +12 -0
- package/dist/core/waste/index.d.ts.map +1 -0
- package/dist/core/waste/index.js +45 -0
- package/dist/core/waste/index.js.map +1 -0
- package/dist/core/waste/wrong-model.d.ts +11 -0
- package/dist/core/waste/wrong-model.d.ts.map +1 -0
- package/dist/core/waste/wrong-model.js +104 -0
- package/dist/core/waste/wrong-model.js.map +1 -0
- package/dist/db/index.d.ts +10 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +29 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrate.d.ts +8 -0
- package/dist/db/migrate.d.ts.map +1 -0
- package/dist/db/migrate.js +282 -0
- package/dist/db/migrate.js.map +1 -0
- package/dist/server/events.d.ts +4 -0
- package/dist/server/events.d.ts.map +1 -0
- package/dist/server/events.js +54 -0
- package/dist/server/events.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +238 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/foundation.d.ts +2 -0
- package/dist/server/routes/foundation.d.ts.map +1 -0
- package/dist/server/routes/foundation.js +2 -0
- package/dist/server/routes/foundation.js.map +1 -0
- package/dist/server/routes/search.d.ts +2 -0
- package/dist/server/routes/search.d.ts.map +1 -0
- package/dist/server/routes/search.js +2 -0
- package/dist/server/routes/search.js.map +1 -0
- package/dist/server/routes/sessions.d.ts +2 -0
- package/dist/server/routes/sessions.d.ts.map +1 -0
- package/dist/server/routes/sessions.js +2 -0
- package/dist/server/routes/sessions.js.map +1 -0
- package/dist/server/routes/waste.d.ts +2 -0
- package/dist/server/routes/waste.d.ts.map +1 -0
- package/dist/server/routes/waste.js +2 -0
- package/dist/server/routes/waste.js.map +1 -0
- package/dist/web/assets/index-Ba1VvTj0.js +37 -0
- package/dist/web/index.html +12 -0
- package/package.json +76 -0
|
@@ -0,0 +1,37 @@
|
|
|
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),e=null),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},ee=Object.prototype.hasOwnProperty;function te(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return te(e.type,t,e.props)}function T(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function E(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?E(``+e.key):t.toString(36)}function ae(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 oe(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,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(T(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+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+ie(a,u),c+=oe(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+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(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 se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(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 D=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)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!T(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,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)!ee.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 te(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)ee.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 te(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=T,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},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,D)}catch(e){D(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,T());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function te(){return g?!0:!(e.unstable_now()-ee<w)}function ne(){if(g=!1,S){var t=e.unstable_now();ee=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&&te());){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&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?T():S=!1}}}var T;if(typeof y==`function`)T=function(){y(ne)};else if(typeof MessageChannel<`u`){var E=new MessageChannel,re=E.port2;E.port1.onmessage=ne,T=function(){re.postMessage(null)}}else T=function(){_(ne,0)};function ie(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,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,T()))),r},e.unstable_shouldYield=te,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`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?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 ee:return`Suspense`;case te:return`SuspenseList`;case E: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 ne:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function k(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),A=fe(null);function _e(e,t){switch(k(ge,t),k(he,e),k(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),k(me,e)}function ve(){pe(me),pe(he),pe(ge)}function ye(e){e.memoizedState!==null&&k(A,e);var t=me.current,n=Hd(t,e.type);t!==n&&(k(he,e),k(me,n))}function be(e){he.current===e&&(pe(me),pe(he)),A.current===e&&(pe(A),Qf._currentValue=le)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!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{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function De(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,je=t.unstable_shouldYield,Me=t.unstable_requestPaint,Ne=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(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 $e(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=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(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 et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(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 nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function at(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-Ge(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&&ot(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function st(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ct(e,t){var n=t&-t;return n=n&42?1:lt(n),(n&(e.suspendedLanes|t))===0?n:0}function lt(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 ut(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function dt(){var e=O.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ft(e,t){var n=O.p;try{return O.p=e,t()}finally{O.p=n}}var pt=Math.random().toString(36).slice(2),mt=`__reactFiber$`+pt,ht=`__reactProps$`+pt,gt=`__reactContainer$`+pt,_t=`__reactEvents$`+pt,vt=`__reactListeners$`+pt,yt=`__reactHandles$`+pt,bt=`__reactResources$`+pt,xt=`__reactMarker$`+pt;function St(e){delete e[mt],delete e[ht],delete e[_t],delete e[vt],delete e[yt]}function Ct(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gt]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[mt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function wt(e){if(e=e[mt]||e[gt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Et(e){var t=e[bt];return t||=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Dt(e){e[xt]=!0}var Ot=new Set,kt={};function At(e,t){jt(e,t),jt(e+`Capture`,t)}function jt(e,t){for(kt[e]=t,e=0;e<t.length;e++)Ot.add(t[e])}var Mt=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]*$`),Nt={},Pt={};function Ft(e){return Oe.call(Pt,e)?!0:Oe.call(Nt,e)?!1:Mt.test(e)?Pt[e]=!0:(Nt[e]=!0,!1)}function It(e,t,n){if(Ft(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 Lt(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 Rt(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 zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Bt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Vt(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 Ht(e){if(!e._valueTracker){var t=Bt(e)?`checked`:`value`;e._valueTracker=Vt(e,t,``+e[t])}}function Ut(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Bt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Wt(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 Gt=/[\n"\\]/g;function Kt(e){return e.replace(Gt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function qt(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=``+zt(t)):e.value!==``+zt(t)&&(e.value=``+zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Yt(e,o,zt(n)):Yt(e,o,zt(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=``+zt(s):e.removeAttribute(`name`)}function Jt(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)){Ht(e);return}n=n==null?``:``+zt(n),t=t==null?n:``+zt(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),Ht(e)}function Yt(e,t,n){t===`number`&&Wt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Xt(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=``+zt(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 Zt(e,t,n){if(t!=null&&(t=``+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+zt(n)}function Qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ht(e)}function $t(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var en=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 tn(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||en.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function nn(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&&tn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&tn(e,o,t[o])}function rn(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 an=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`]]),on=/^[\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 sn(e){return on.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function cn(){}var ln=null;function un(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function pn(e){var t=wt(e);if(t&&(e=t.stateNode)){var n=e[ht]||null;a:switch(e=t.stateNode,t.type){case`input`:if(qt(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="`+Kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ht]||null;if(!a)throw Error(i(90));qt(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&&Ut(r)}break a;case`textarea`:Zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Xt(e,!!n.multiple,t,!1)}}}var mn=!1;function hn(e,t,n){if(mn)return e(t,n);mn=!0;try{return e(t)}finally{if(mn=!1,(dn!==null||fn!==null)&&(bu(),dn&&(t=dn,e=fn,fn=dn=null,pn(t),e)))for(t=0;t<e.length;t++)pn(e[t])}}function gn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ht]||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 _n=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),vn=!1;if(_n)try{var yn={};Object.defineProperty(yn,`passive`,{get:function(){vn=!0}}),window.addEventListener(`test`,yn,yn),window.removeEventListener(`test`,yn,yn)}catch{vn=!1}var j=null,bn=null,xn=null;function Sn(){if(xn)return xn;var e,t=bn,n=t.length,r,i=`value`in j?j.value:j.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 xn=i.slice(e,1<r?1-r:void 0)}function Cn(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 wn(){return!0}function Tn(){return!1}function En(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)?wn:Tn,this.isPropagationStopped=Tn,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=wn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=wn)},persist:function(){},isPersistent:wn}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=En(Dn),kn=h({},Dn,{view:0,detail:0}),M=En(kn),An,jn,Mn,Nn=h({},kn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wn,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!==Mn&&(Mn&&e.type===`mousemove`?(An=e.screenX-Mn.screenX,jn=e.screenY-Mn.screenY):jn=An=0,Mn=e),An)},movementY:function(e){return`movementY`in e?e.movementY:jn}}),Pn=En(Nn),Fn=En(h({},Nn,{dataTransfer:0})),In=En(h({},kn,{relatedTarget:0})),Ln=En(h({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0})),Rn=En(h({},Dn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),zn=En(h({},Dn,{data:0})),Bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Vn={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`},Hn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Un(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hn[e])?!!t[e]:!1}function Wn(){return Un}var Gn=En(h({},kn,{key:function(e){if(e.key){var t=Bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Vn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wn,charCode:function(e){return e.type===`keypress`?Cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Kn=En(h({},Nn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),qn=En(h({},kn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wn})),Jn=En(h({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Yn=En(h({},Nn,{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})),Xn=En(h({},Dn,{newState:0,oldState:0})),Zn=[9,13,27,32],Qn=_n&&`CompositionEvent`in window,$n=null;_n&&`documentMode`in document&&($n=document.documentMode);var er=_n&&`TextEvent`in window&&!$n,tr=_n&&(!Qn||$n&&8<$n&&11>=$n),nr=` `,rr=!1;function ir(e,t){switch(e){case`keyup`:return Zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ar(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var or=!1;function sr(e,t){switch(e){case`compositionend`:return ar(t);case`keypress`:return t.which===32?(rr=!0,nr):null;case`textInput`:return e=t.data,e===nr&&rr?null:e;default:return null}}function cr(e,t){if(or)return e===`compositionend`||!Qn&&ir(e,t)?(e=Sn(),xn=bn=j=null,or=!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 tr&&t.locale!==`ko`?null:t.data;default:return null}}var lr={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 ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!lr[e.type]:t===`textarea`}function dr(e,t,n,r){dn?fn?fn.push(r):fn=[r]:dn=r,t=Ed(t,`onChange`),0<t.length&&(n=new On(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function mr(e){yd(e,0)}function hr(e){if(Ut(Tt(e)))return e}function gr(e,t){if(e===`change`)return t}var _r=!1;if(_n){var vr;if(_n){var yr=`oninput`in document;if(!yr){var br=document.createElement(`div`);br.setAttribute(`oninput`,`return;`),yr=typeof br.oninput==`function`}vr=yr}else vr=!1;_r=vr&&(!document.documentMode||9<document.documentMode)}function xr(){fr&&(fr.detachEvent(`onpropertychange`,Sr),pr=fr=null)}function Sr(e){if(e.propertyName===`value`&&hr(pr)){var t=[];dr(t,pr,e,un(e)),hn(mr,t)}}function Cr(e,t,n){e===`focusin`?(xr(),fr=t,pr=n,fr.attachEvent(`onpropertychange`,Sr)):e===`focusout`&&xr()}function wr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return hr(pr)}function Tr(e,t){if(e===`click`)return hr(t)}function Er(e,t){if(e===`input`||e===`change`)return hr(t)}function Dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Or=typeof Object.is==`function`?Object.is:Dr;function kr(e,t){if(Or(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(!Oe.call(t,i)||!Or(e[i],t[i]))return!1}return!0}function Ar(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jr(e,t){var n=Ar(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=Ar(n)}}function Mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wt(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=Wt(e.document)}return t}function Pr(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 Fr=_n&&`documentMode`in document&&11>=document.documentMode,Ir=null,Lr=null,Rr=null,zr=!1;function Br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zr||Ir==null||Ir!==Wt(r)||(r=Ir,`selectionStart`in r&&Pr(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}),Rr&&kr(Rr,r)||(Rr=r,r=Ed(Lr,`onSelect`),0<r.length&&(t=new On(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Hr={animationend:Vr(`Animation`,`AnimationEnd`),animationiteration:Vr(`Animation`,`AnimationIteration`),animationstart:Vr(`Animation`,`AnimationStart`),transitionrun:Vr(`Transition`,`TransitionRun`),transitionstart:Vr(`Transition`,`TransitionStart`),transitioncancel:Vr(`Transition`,`TransitionCancel`),transitionend:Vr(`Transition`,`TransitionEnd`)},Ur={},Wr={};_n&&(Wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),`TransitionEvent`in window||delete Hr.transitionend.transition);function Gr(e){if(Ur[e])return Ur[e];if(!Hr[e])return e;var t=Hr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wr)return Ur[e]=t[n];return e}var Kr=Gr(`animationend`),qr=Gr(`animationiteration`),Jr=Gr(`animationstart`),Yr=Gr(`transitionrun`),Xr=Gr(`transitionstart`),Zr=Gr(`transitioncancel`),Qr=Gr(`transitionend`),$r=new Map,ei=`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(` `);ei.push(`scrollEnd`);function ti(e,t){$r.set(e,t),At(t,[e])}var ni=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)},ri=[],ii=0,ai=0;function oi(){for(var e=ii,t=ai=ii=0;t<e;){var n=ri[t];ri[t++]=null;var r=ri[t];ri[t++]=null;var i=ri[t];ri[t++]=null;var a=ri[t];if(ri[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&&ui(n,i,a)}}function si(e,t,n,r){ri[ii++]=e,ri[ii++]=t,ri[ii++]=n,ri[ii++]=r,ai|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ci(e,t,n,r){return si(e,t,n,r),di(e)}function li(e,t){return si(e,null,null,t),di(e)}function ui(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function di(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fi={};function pi(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 mi(e,t,n,r){return new pi(e,t,n,r)}function hi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var n=e.alternate;return n===null?(n=mi(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 _i(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 vi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)hi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=mi(31,n,t,a),e.elementType=E,e.lanes=o,e;case y:return yi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=mi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case ee:return e=mi(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=mi(19,n,t,a),e.elementType=te,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 ne:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function yi(e,t,n,r){return e=mi(7,e,r,t),e.lanes=n,e}function bi(e,t,n){return e=mi(6,e,null,t),e.lanes=n,e}function xi(e){var t=mi(18,null,null,0);return t.stateNode=e,t}function Si(e,t,n){return t=mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ci=new WeakMap;function N(e,t){if(typeof e==`object`&&e){var n=Ci.get(e);return n===void 0?(t={value:e,source:t,stack:De(t)},Ci.set(e,t),t):n}return{value:e,source:t,stack:De(t)}}var wi=[],Ti=0,Ei=null,Di=0,Oi=[],ki=0,Ai=null,ji=1,Mi=``;function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Ei,Ei=e,Di=t}function Pi(e,t,n){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,Ai=e;var r=ji;e=Mi;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ji=1<<32-Ge(t)+i|n<<i|r,Mi=a+e}else ji=1<<a|n<<i|r,Mi=e}function Fi(e){e.return!==null&&(Ni(e,1),Pi(e,1,0))}function Ii(e){for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null;for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,Mi=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null}function Li(e,t){Oi[ki++]=ji,Oi[ki++]=Mi,Oi[ki++]=Ai,ji=t.id,Mi=t.overflow,Ai=e}var Ri=null,P=null,F=!1,zi=null,Bi=!1,Vi=Error(i(519));function Hi(e){throw Ji(N(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Vi}function Ui(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[mt]=e,t[ht]=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),Jt(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),Qt(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=cn),t=!0):t=!1,t||Hi(e,!0)}function Wi(e){for(Ri=e.return;Ri;)switch(Ri.tag){case 5:case 31:case 13:Bi=!1;return;case 27:case 3:Bi=!0;return;default:Ri=Ri.return}}function Gi(e){if(e!==Ri)return!1;if(!F)return Wi(e),F=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&P&&Hi(e),Wi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));P=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));P=uf(e)}else t===27?(t=P,Zd(e.type)?(e=lf,lf=null,P=e):P=t):P=Ri?cf(e.stateNode.nextSibling):null;return!0}function Ki(){P=Ri=null,F=!1}function qi(){var e=zi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),zi=null),e}function Ji(e){zi===null?zi=[e]:zi.push(e)}var Yi=fe(null),Xi=null,Zi=null;function Qi(e,t,n){k(Yi,t._currentValue),t._currentValue=n}function $i(e){e._currentValue=Yi.current,pe(Yi)}function ea(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 ta(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),ea(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),ea(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 na(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;Or(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===A.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&ta(t,e,n,r),t.flags|=262144}function ra(e){for(e=e.firstContext;e!==null;){if(!Or(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ia(e){Xi=e,Zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return sa(Xi,e)}function oa(e,t){return Xi===null&&ia(e),sa(e,t)}function sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zi===null){if(e===null)throw Error(i(308));Zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zi=Zi.next=t;return n}var ca=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()})}},la=t.unstable_scheduleCallback,ua=t.unstable_NormalPriority,I={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new ca,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&la(ua,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,L=null;function ga(e,t){if(pa===null){var n=pa=[];ma=0,ha=dd(),L={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(_a,_a),t}function _a(){if(--ma===0&&pa!==null){L!==null&&(L.status=`fulfilled`);var e=pa;pa=null,ha=0,L=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(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 R=D.S;D.S=function(e,t){eu=Ne(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),R!==null&&R(e,t)};var z=fe(null);function ya(){var e=z.current;return e===null?q.pooledCache:e}function ba(e,t){t===null?k(z,z.current):k(z,t.pool)}function xa(){var e=ya();return e===null?null:{parent:I._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(cn,cn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(cn,cn);else{if(e=q,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,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(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 La(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=gi(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=bi(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===T&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=vi(n.type,n.key,n.props,null,e.mode,r),Fa(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=Si(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=yi(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=bi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=vi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case v:return t=Si(t,e.mode,n),t.return=e,t;case T:return t=Oa(t),f(e,t,n)}if(ce(t)||ae(t))return t=yi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===C)return f(e,oa(e,t),n);Ia(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 T:return n=Oa(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===C)return p(e,t,oa(e,n),r);Ia(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 T:return r=Oa(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===C)return m(e,t,n,oa(t,r),i);Ia(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),F&&Ni(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 F&&Ni(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)}),F&&Ni(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),F&&Ni(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 F&&Ni(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)}),F&&Ni(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===T&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=yi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=vi(o.type,o.key,o.props,null,e.mode,c),Fa(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=Si(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Oa(o),b(e,r,o,c)}if(ce(o))return h(e,r,o,c);if(ae(o)){if(l=ae(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,Pa(o),c);if(o.$$typeof===C)return b(e,r,oa(e,o),c);Ia(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=bi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=di(e),ui(e,null,n),t}return si(e,r,t,n),di(e)}function Ga(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,st(e,n)}}function Ka(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 qa=!1;function Ja(){if(qa){var e=L;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!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?(Y&f)===f:(r&f)===f){f!==0&&f===ha&&(qa=!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:Ba=!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),Gl|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=fe(null),$a=fe(0);function eo(e,t){e=Ul,k($a,e),k(Qa,t),Ul=e|t.baseLanes}function to(){k($a,Ul),k(Qa,Qa.current)}function no(){Ul=$a.current,pe(Qa),pe($a)}var ro=fe(null),io=null;function ao(e){var t=e.alternate;k(uo,uo.current&1),k(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){k(uo,uo.current),k(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(k(uo,uo.current),k(ro,e),io===null&&(io=e)):co(e)}function co(){k(uo,uo.current),k(ro,ro.current)}function lo(e){pe(ro),io===e&&(io=null),pe(uo)}var uo=fe(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(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 po=0,B=null,V=null,H=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Or(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return po=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Bs:Vs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){D.H=zs;var t=V!==null&&V.next!==null;if(po=0,H=V=B=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||ic||(e=e.dependencies,e!==null&&ra(e)&&(ic=!0))}function To(e,t,n,r){B=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,H=V=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}D.H=Hs,o=t(n,r)}while(ho);return o}function Eo(){var e=D.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(V===null?null:V.memoizedState)!==e&&(B.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}po=0,H=V=B=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return H===null?B.memoizedState=H=e:H=H.next=e,H}function jo(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=H===null?B.memoizedState:H.next;if(t!==null)H=t,V=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},H===null?B.memoizedState=H=e:H=H.next=e}return H}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=Da(yo,e,t),t=B,(H===null?t.memoizedState:H.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return aa(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.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=Mo(),B.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]=re;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),V,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?(po&f)===f:(Y&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===ha&&(d=!0);else if((po&p)===p){u=u.next,p===ha&&(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,B.lanes|=p,Gl|=p;f=u.action,go&&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,B.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Or(o,e.memoizedState)&&(ic=!0,d&&(n=L,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=jo(),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);Or(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=B,a=jo(),o=F;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Or((V||a).memoizedState,n);if(s&&(a.memoizedState=n,ic=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||H!==null&&H.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||po&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=Mo(),B.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!Or(e,n)}catch{return!0}}function Go(e){var t=li(e,2);t!==null&&hu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,V,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(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)}};D.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=D.T,o={};D.T=o;try{var s=n(i,r),c=D.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),D.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(F){var n=q.formState;if(n!==null){a:{var r=B;if(F){if(P){b:{for(var i=P,a=Bi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){P=cf(i.nextSibling),r=i.data===`F!`;break a}}Hi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,B,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,B,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),V,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===Sa?wa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=V;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=Mo(),B.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 ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();B.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;V!==null&&r!==null&&So(r,V.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(B.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=Mo(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(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 _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||po&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),B.lanes|=e,Gl|=e,n)}function Ss(e,t,n,r){return Or(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(Y&261930)?(ic=!0,e.memoizedState=n):(e=mu(),B.lanes|=e,Gl|=e,t):(e=xs(e,n,r),Or(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=O.p;O.p=a!==0&&8>a?a:8;var o=D.T,s={};D.T=s,Fs(e,!1,t,n);try{var c=i(),l=D.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,va(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{O.p=a,o!==null&&s.types!==null&&(o.types=s.types),D.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,le,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return aa(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(hu(r,t,n),Ga(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ci(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(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,Or(s,o))return si(e,t,i,0),q===null&&oi(),!1}catch{}if(n=ci(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=ci(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,st(e,n)}}var zs={readContext:aa,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};zs.useEffectEvent=xo;var Bs={readContext:aa,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){We(!0);try{n(t)}finally{We(!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=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=Ao();if(F){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=q.identifierPrefix;if(F){var n=Mi,r=ji;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,B)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:aa,use:Po,useCallback:ys,useContext:aa,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),V.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),V,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:aa,use:Po,useCallback:ys,useContext:aa,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return V===null?xs(n,e,t):Ss(n,V.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return V===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,V,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(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 Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(hu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(hu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(hu(t,e,n),Ga(t,e,n))}};function Gs(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?!kr(n,r)||!kr(i,a):!0}function Ks(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&&Ws.enqueueReplaceState(t,t.state,null)}function qs(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 Js(e){ni(e)}function Ys(e){console.error(e)}function Xs(e){ni(e)}function Zs(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 $s(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ua(e),e.tag=3,e}function tc(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`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&na(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?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===Ta?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),Du(),!1}if(F)return t=ro.current,t===null?(r!==Vi&&(t=Error(i(423),{cause:r}),Ji(N(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=N(r,n),a=$s(e.stateNode,r,a),Ka(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Vi&&(e=Error(i(422),{cause:r}),Ji(N(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=N(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=N(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=$s(n.stateNode,r,e),Ka(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ec(a),tc(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var rc=Error(i(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function oc(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 ia(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(F&&s&&Fi(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!hi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=vi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?kr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=gi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(kr(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(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 dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:I._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&na(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Ra(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(F){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(oo(t),(e=P)?(e=rf(e,Bi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,Ri=t,P=null)):e=null,e===null)throw Hi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(ic||na(e,t,n,!1),a=(n&e.childLanes)!==0,ic||a){if(r=q,r!==null&&(s=ct(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,li(e,s),hu(r,e,s),rc;Du(),t=pc(e,t,n)}else e=o.treeContext,P=cf(s.nextSibling),Ri=t,F=!0,zi=null,Bi=!1,e!==null&&Li(t,e),t=fc(t,r),t.flags|=4096;return t}return e=gi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(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 gc(e,t,n,r,i){return ia(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(F&&r&&Fi(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return ia(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(F&&r&&Fi(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(ia(t),t.stateNode===null){var a=fi,o=n.contextType;typeof o==`object`&&o&&(a=aa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?aa(o):fi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(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&&Ws.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),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=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=fi,typeof u==`object`&&u&&(o=aa(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)&&Ks(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ba||Gs(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,Ha(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=fi,typeof l==`object`&&l&&(c=aa(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)&&Ks(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&ra(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ba||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ra(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,hc(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=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return Ki(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:xa()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Cc(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:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(F){if(a?ao(t):co(t),(e=P)?(e=rf(e,Bi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ai===null?null:{id:ji,overflow:Mi},retryLane:536870912,hydrationErrors:null},n=xi(e),n.return=t,t.child=n,Ri=t,P=null)):e=null,e===null)throw Hi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Tc({mode:`hidden`,children:c},a),r=yi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(ao(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Tc({mode:`visible`,children:r.children},a),c=yi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ji({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||na(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=q,s!==null&&(r=ct(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,li(e,r),hu(s,e,r),rc;af(c)||Du(),t=Ec(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,P=cf(c.nextSibling),Ri=t,F=!0,zi=null,Bi=!1,e!==null&&Li(t,e),t=wc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=gi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=yi(c,a,n,null),c.flags|=2):c=gi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(a=c.cachePool,a===null?a=xa():(l=I._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=gi(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 wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=mi(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Ra(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ea(e.return,t,n)}function Oc(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 kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,k(uo,o),ac(e,t,r,n),r=F?Di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(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&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(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&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(na(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=gi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=gi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ra(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),Qi(t,I,e.memoizedState.cache),Ki();break;case 27:case 5:ye(t);break;case 4:_e(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,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(na(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),k(uo,uo.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Qi(t,I,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,F&&t.flags&1048576&&Pi(t,Di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)hi(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=oc(null,t,e,r,n);break a}else if(a===ne){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=qs(r,t.pendingProps),vc(e,t,r,a,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Qi(t,I,r),r!==o.cache&&ta(t,[I],n,!0),Ja(),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=yc(e,t,r,n);break a}else if(r!==a){a=N(Error(i(424)),t),Ji(a),t=yc(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(P=cf(e.firstChild),Ri=t,F=!0,zi=null,Bi=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ki(),r===a){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:F||(n=t.type,e=t.pendingProps,r=Bd(ge.current).createElement(n),r[mt]=t,r[ht]=e,Pd(r,n,e),Dt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&F&&(r=t.stateNode=ff(t.type,t.pendingProps,ge.current),Ri=t,Bi=!0,a=P,Zd(t.type)?(lf=a,P=cf(r.firstChild)):P=a),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((a=r=P)&&(r=tf(r,t.type,t.pendingProps,Bi),r===null?a=!1:(t.stateNode=r,Ri=t,P=cf(r.firstChild),Bi=!1,a=!0)),a||Hi(t)),ye(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),Qf._currentValue=a),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&F&&((e=n=P)&&(n=nf(n,t.pendingProps,Bi),n===null?e=!1:(t.stateNode=n,Ri=t,P=null,e=!0)),e||Hi(t)),null;case 13:return Cc(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Qi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ia(t),a=aa(a),r=r(a),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return ia(t),r=aa(I),e===null?(a=ya(),a===null&&(a=q,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Qi(t,I,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Qi(t,I,r),r!==a.cache&&ta(t,[I],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Qi(t,I,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Pc(e){e.flags|=4}function Fc(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(wu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ka=Ta,Ca}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,Yl|=t)}function Rc(e,t){if(!F)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 U(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 zc(e,t,n){var r=t.pendingProps;switch(Ii(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return U(t),null;case 1:return U(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),$i(I),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gi(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qi())),U(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(U(t),Fc(t,a,null,r,n)):(U(t),Ic(t,o))):o?o===e.memoizedState?(U(t),t.flags&=-16777217):(Pc(t),U(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),U(t),Fc(t,a,e,r,n)),null;case 27:if(be(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return U(t),null}e=me.current,Gi(t)?Ui(t,e):(e=ff(a,r,n),t.stateNode=e,Pc(t))}return U(t),null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return U(t),null}if(o=me.current,Gi(t))Ui(t,o);else{var s=Bd(ge.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[mt]=t,o[ht]=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(Pd(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&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ri,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Hi(t,!0)}else e=Bd(e).createTextNode(r),e[mt]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(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[mt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(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[mt]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(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),Lc(t,t.updateQueue),U(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return $i(t.type),U(t),null;case 19:if(pe(uo),r=t.memoizedState,r===null)return U(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Rc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_i(n,e),n=n.sibling;return k(uo,uo.current&1|2),F&&Ni(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ne()>tu&&(t.flags|=128,a=!0,Rc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!F)return U(t),null}else 2*Ne()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Rc(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?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ne(),e.sibling=null,n=uo.current,k(uo,a?n&1|2:n&1),F&&Ni(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(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&&pe(z),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(I),U(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ii(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(I),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(uo),null;case 4:return ve(),null;case 10:return $i(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&pe(z),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(I),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ii(t),t.tag){case 3:$i(I),ve();break;case 26:case 27:case 5:be(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:pe(uo);break;case 10:$i(t.type);break;case 22:case 23:lo(t),no(),e!==null&&pe(z);break;case 24:$i(I)}}function Hc(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){Z(t,t.return,e)}}function Uc(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){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(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){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(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){Z(e,t,n)}else n.current=null}function Jc(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){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ht]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(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&&Zd(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 Qc(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=cn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(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&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[mt]=e,t[ht]=n}catch(t){Z(e,e.return,t)}}var tl=!1,W=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,Rd=sp,e=Nr(e),Pr(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(zd={focusedElem:e,selectionRange:n},sp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,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=qs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(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,il=e;break}il=t.return}}function ol(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Hc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(bl(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{Za(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:bl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||W,i=tl;var a=W;tl=r,(W=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),tl=i,W=a}break;case 30:break;default:bl(e,n)}}function sl(e){var t=e.alternate;t!==null&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&St(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 G=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:W||qc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:W||qc(n,t);var r=G,i=cl;Zd(n.type)&&(G=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),G=r,cl=i;break;case 5:W||qc(n,t);case 6:if(r=G,i=cl,G=null,ll(e,t,n),G=r,cl=i,G!==null)if(cl)try{(G.nodeType===9?G.body:G.nodeName===`HTML`?G.ownerDocument.body:G).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{G.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:G!==null&&(cl?(e=G,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(G,n.stateNode));break;case 4:r=G,i=cl,G=n.stateNode.containerInfo,cl=!0,ll(e,t,n),G=r,cl=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),W||Uc(4,n,t),ll(e,t,n);break;case 1:W||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:W=(r=W)||n.memoizedState!==null,ll(e,t,n),W=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(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(Zd(c.type)){G=c.stateNode,cl=!1;break a}break;case 5:G=c.stateNode,cl=!1;break a;case 3:case 4:G=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(G===null)throw Error(i(160));ul(o,s,a),G=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(W||n===null||qc(n,n.return)),r&64&&tl&&(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=gl;if(hl(t,e),vl(e),r&512&&(W||n===null||qc(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[xt]||o[mt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[mt]=e,Dt(o),r=o;break a;case`link`:var s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`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),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[mt]=e,Dt(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(W||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(W||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{$t(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(nl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}nl&&(nl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ne()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=W;if(tl=u||a,W=d||l,hl(t,e),W=d,tl=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||W||xl(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){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(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,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&($t(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ol(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),xl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:qc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(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:Sl(i,a,n),Hc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(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++)Xa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Kc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(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&&fa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(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&&fa(e)));break;case 12:if(i&2048){Tl(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){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(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:Dl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(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:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 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];il=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];il=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;il!==null;){var n=il;switch(n.tag){case 0:case 11:case 15:Uc(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:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,il=r;else a:for(n=e;il!==null;){r=il;var i=r.sibling,a=r.return;if(sl(r),r===n){il=null;break a}if(i!==null){i.return=a,il=i;break a}il=a}}}var Ll={getCacheForType:function(e){var t=aa(I),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return aa(I).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:D.T===null?dt():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||F){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Jl=e}else Jl=536870912;return e=ro.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),it(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(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=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(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:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ne(),10<a)){if(yu(r,t,Jl,!Bl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(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:cn},jl(t,a,d);var m=(a&62914560)===a?$l-Ne():(a&4194048)===a?eu-Ne():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!Or(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ot(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Zi=Xi=null,ko(e),Ma=null,Na=0,e=J;for(;e!==null;)Vc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=gi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=et(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,oi(),n}function Cu(e,t){B=null,D.H=zs,t===Sa||t===wa?(t=Aa(),X=3):t===Ca?(t=Aa(),X=4):X=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Zs(e,N(t,e.current)))}function wu(){var e=ro.current;return e===null?!0:(Y&4194048)===Y?io===null:(Y&62914560)===Y||Y&536870912?e===io:!1}function Tu(){var e=D.H;return D.H=zs,e===null?zs:e}function Eu(){var e=D.A;return D.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&ro.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Zi=Xi=null,K=r,D.H=i,D.A=a,J===null&&(q=null,Y=0,oi()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ne()+500,Su(e,t)):Vl=et(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Ea(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Ea(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Zi=Xi=null,D.H=r,D.A=a,K=n,J===null?(q=null,Y=0,oi(),Wl):0}function ju(){for(;J!==null&&!je();)Mu(J)}function Mu(e){var t=Nc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:ko(t);default:Vc(n,t),t=J=_i(t,Ul),t=Nc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Zi=Xi=null,ko(t),Ma=null,Na=0;var i=t.return;try{if(nc(e,i,t,n,Y)){Wl=1,Zs(e,N(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Zs(e,N(n,e.current)),J=null;return}t.flags&32768?(F||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=zc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ai,at(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Le,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=D.T,D.T=null,a=O.p,O.p=2,s=K,K|=4;try{al(e,t,n)}finally{K=s,O.p=a,D.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Nr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Mr(s.ownerDocument.documentElement,s)){if(c!==null&&Pr(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 _=jr(s,h),v=jr(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}}sp=!!Rd,zd=Rd=null}finally{K=i,O.p=r,D.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=D.T,D.T=null;var r=O.p;O.p=2;var i=K;K|=4;try{ol(e,t.alternate,t)}finally{K=i,O.p=r,D.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Me();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ut(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=D.T,i=O.p,O.p=2,D.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{D.T=t,O.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ut(su),r=D.T,a=O.p;try{O.p=32>n?32:n,D.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{O.p=a,D.T=r,Vu(e,t)}}function Wu(e,t,n){t=N(n,t),t=$s(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(it(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=N(n,e),n=ec(2),r=Wa(t,n,2),r!==null&&(tc(n,r,t,e),it(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;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)||(Hl=!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,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ne()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=nt()),e=li(e,t),e!==null&&(it(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 ke(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-Ge(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=Y,a=$e(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(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&&Gd()&&(e=nd);for(var t=Ne(),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}iu!==0&&iu!==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-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),ut(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=cd.bind(null,e),n=ke(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=$e(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ne()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?ke(Fe,ad):od()})}function dd(){if(nd===0){var e=ha;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:sn(``+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[ht]||null).action),o=r.submitter;o&&(t=(t=o[ht]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new On(`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);Ts(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),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ei.length;hd++){var gd=ei[hd];ti(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ti(Kr,`onAnimationEnd`),ti(qr,`onAnimationIteration`),ti(Jr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Yr,`onTransitionRun`),ti(Xr,`onTransitionStart`),ti(Zr,`onTransitionCancel`),ti(Qr,`onTransitionEnd`),jt(`onMouseEnter`,[`mouseout`,`mouseover`]),jt(`onMouseLeave`,[`mouseout`,`mouseover`]),jt(`onPointerEnter`,[`pointerout`,`pointerover`]),jt(`onPointerLeave`,[`pointerout`,`pointerover`]),At(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),At(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),At(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),At(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),At(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),At(`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){ni(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){ni(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[_t];n===void 0&&(n=t[_t]=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,Ot.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(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!vn||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=Ct(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}hn(function(){var r=a,i=un(n),s=[];a:{var c=$r.get(e);if(c!==void 0){var l=On,u=e;switch(e){case`keypress`:if(Cn(n)===0)break a;case`keydown`:case`keyup`:l=Gn;break;case`focusin`:u=`focus`,l=In;break;case`focusout`:u=`blur`,l=In;break;case`beforeblur`:case`afterblur`:l=In;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=Pn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Fn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=qn;break;case Kr:case qr:case Jr:l=Ln;break;case Qr:l=Jn;break;case`scroll`:case`scrollend`:l=M;break;case`wheel`:l=Yn;break;case`copy`:case`cut`:case`paste`:l=Rn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Kn;break;case`toggle`:case`beforetoggle`:l=Xn}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=gn(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!==ln&&(u=n.relatedTarget||n.fromElement)&&(Ct(u)||u[gt]))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?Ct(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=Pn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Tt(l),h=u==null?c:Tt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ct(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?Tt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=gr;else if(ur(c))if(_r)v=Er;else{v=wr;var y=Cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&rn(r.elementType)&&(v=gr):v=Tr;if(v&&=v(e,r)){dr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Yt(c,`number`,c.value)}switch(y=r?Tt(r):window,e){case`focusin`:(ur(y)||y.contentEditable===`true`)&&(Ir=y,Lr=r,Rr=null);break;case`focusout`:Rr=Lr=Ir=null;break;case`mousedown`:zr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:zr=!1,Br(s,n,i);break;case`selectionchange`:if(Fr)break;case`keydown`:case`keyup`:Br(s,n,i)}var b;if(Qn)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 or?ir(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(tr&&n.locale!==`ko`&&(or||x!==`onCompositionStart`?x===`onCompositionEnd`&&or&&(b=Sn()):(j=i,bn=`value`in j?j.value:j.textContent,or=!0)),y=Ed(r,x),0<y.length&&(x=new zn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=ar(n),b!==null&&(x.data=b)))),(b=er?sr(e,n):cr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new zn(`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=gn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=gn(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=gn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=gn(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 $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&$t(e,``+r);break;case`className`:Lt(e,`class`,r);break;case`tabIndex`:Lt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Lt(e,n,r);break;case`style`:nn(e,r,o);break;case`data`:if(t!==`object`){Lt(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=sn(``+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`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=sn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=cn);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=sn(``+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),It(e,`popover`,r);break;case`xlinkActuate`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Rt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Rt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:It(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=an.get(n)||n,It(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:nn(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`?$t(e,r):(typeof r==`number`||typeof r==`bigint`)&&$t(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=cn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!kt.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[ht]||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,``):It(e,n,r)}}}function Pd(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:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(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:$(e,t,r,d,n,null)}}Jt(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:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Xt(e,!!r,n,!0):Xt(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:$(e,t,s,c,n,null)}Qt(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:$(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:$(e,t,u,r,n,null)}return;default:if(rn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(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)||$(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&&$(e,t,p,m,r,f)}}qt(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)||$(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&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Xt(e,!!n,n?[]:``,!1):Xt(e,!!n,t,!0)):Xt(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:$(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&&$(e,t,s,a,r,o)}Zt(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:$(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:$(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)&&$(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:$(e,t,u,p,r,m)}return;default:if(rn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(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||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(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||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){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&&Id(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&&Id(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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(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),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[xt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),St(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[xt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(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 pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);St(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=O.d;O.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=wt(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Kt(n.imageSizes)+`"]`)):i+=`[href="`+Kt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Dt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Kt(r)+`"][href="`+Kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Dt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Et(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Dt(c),Pd(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Et(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Dt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ge.current)?gf(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=Af(n.href),n=Et(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=Af(n.href);var o=Et(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(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(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=Pf(n),n=Et(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 Af(e){return`href="`+Kt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(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}),Pd(t,`link`,n),Dt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Kt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Kt(n.href)+`"]`);if(r)return t.instance=r,Dt(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`),Dt(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Dt(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Dt(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Dt(a),Pd(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,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[xt]||a[mt]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Dt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(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=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.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=Jf.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 Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(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 ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=mi(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function tp(e){return e?(e=fi,e):fi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(hu(n,e,t),Ga(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=li(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=lt(t);var n=li(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=2,up(e,t,n,r)}finally{O.p=a,D.T=i}}function lp(e,t,n,r){var i=D.T;D.T=null;var a=O.p;try{O.p=8,up(e,t,n,r)}finally{O.p=a,D.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=wt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ne()+500,id(0,!1))}}break;case 31:case 13:s=li(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=un(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Ct(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 fp=e,null}function mp(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(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(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=wt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Ct(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,ft(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ft(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ln=r,n.target.dispatchEvent(r),ln=null}else return t=wt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=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(pp(r||n)===null)continue;break}var a=wt(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.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[ht]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ht]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){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 Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[gt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=dt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));O.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 Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:D,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{He=zp.inject(Rp),Ue=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Js,s=Ys,c=Xs;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=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[gt]=t.current,Sd(e),new Fp(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()})),_=c(u(),1),v=typeof window<`u`?_.useLayoutEffect:_.useEffect;function y(e){let t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function b(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function x(e){let t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}function S(e){return e[e.length-1]}function C(e){return typeof e==`function`}function w(e,t){return C(e)?e(t):e}var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;function ne(e){for(let t in e)if(ee.call(e,t))return!0;return!1}var T=()=>Object.create(null),E=(e,t)=>re(e,t,T);function re(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=se(e)&&se(i);if(!a&&!(ae(e)&&ae(i)))return i;let o=a?e:ie(e);if(!o)return i;let s=a?i:ie(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:ee.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=re(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ie(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!te.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!te.call(e,t))return!1;r.push(t)}return r}function ae(e){if(!oe(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!oe(n)||!n.hasOwnProperty(`isPrototypeOf`))}function oe(e){return Object.prototype.toString.call(e)===`[object Object]`}function se(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ce(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ce(e[r],t[r],n))return!1;return!0}if(ae(e)&&ae(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ce(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ce(e[o],t[o],n)))return!1;return i===a}return!1}function D(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function O(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function le(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function ue(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return le(t)}var de=[`http:`,`https:`,`mailto:`,`tel:`];function fe(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function pe(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ue(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ue(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function k(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function me(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function he(){throw Error(`Invariant failed`)}function ge(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,_e=5;function ve(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function ye(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ve(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function be(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=ye(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=Ce(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=Ce(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=we(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=we(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=we(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Ce(n.fullPath??n.from);e.kind=_e,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=Ce(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)be(e,t,r,s,i,a,o)}function xe(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Se(e){if(e.pathless)for(let t of e.pathless)Se(t);if(e.static)for(let t of e.static.values())Se(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())Se(t);if(e.dynamic?.length){e.dynamic.sort(xe);for(let t of e.dynamic)Se(t)}if(e.optional?.length){e.optional.sort(xe);for(let t of e.optional)Se(t)}if(e.wildcard?.length){e.wildcard.sort(xe);for(let t of e.wildcard)Se(t)}}function Ce(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function we(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:n,prefix:r,suffix:i}}function Te(e,t){let n=Ce(`/`),r=new Uint16Array(6);for(let t of e)be(!1,r,t,1,n,0);Se(n),t.masksTree=n,t.flatCache=ge(1e3)}function Ee(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=je(e,t.masksTree);return t.flatCache.set(e,r),r}function De(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Ce(`/`),be(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),je(r,o,n)}function Oe(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=je(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Ne(a.route)),t.matchCache.set(r,a),a}function ke(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Ae(e,t=!1,n){let r=Ce(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return be(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&he(),a[e.id]=e,s!==0&&e.path){let t=ke(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),Se(r),{processedTree:{segmentTree:r,singleCache:ge(1e3),matchCache:ge(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function je(e,t,n=!1){let r=e.split(`/`),i=Fe(e,r,t,n);if(!i)return null;let[a]=Me(e,r,i);return{route:i.node.route,rawParams:a}}function Me(e,t,n){let r=Pe(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===_e){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Ne(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Pe(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Fe(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!S(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!ze(l,n))continue;if(i.parse){if(!Re(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&ze(c,n)&&(c=n);let v=u===o;if(v&&(i.route&&(!a||i.kind===A||i.kind===2)&&ze(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[u],b;if(v&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(Re(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&Le(p,o))return n;ze(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(a){if(v)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+Ie(o,u),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+Ie(o,u),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+Ie(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+Ie(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Ie(e,t){return 2**(e-t-1)}function Le(e,t){return e===2**(t-1)-1}function Re(e,t,n){let r,i;try{[r,i]=Me(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function ze(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function Be(e){return Ve(e.filter(e=>e!==void 0).join(`/`))}function Ve(e){return e.replace(/\/{2,}/g,`/`)}function He(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Ue(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function We(e){return Ue(He(e))}function Ge(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ke(e,t,n){return Ge(e,n)===Ge(t,n)}function qe({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&S(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(S(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=Ve(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function Je(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ye(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ze(e,n)).join(`/`):Ze(r,n):r}function Xe({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=ye(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ye(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ye(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ye(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ze(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function Qe(e){return e?.isNotFound===!0}function $e(){try{return typeof window<`u`&&typeof window.sessionStorage==`object`?window.sessionStorage:void 0}catch{return}}var et=`tsr-scroll-restoration-v1_3`;function tt(){let e=$e();if(!e)return null;let t={};try{let n=JSON.parse(e.getItem(`tsr-scroll-restoration-v1_3`)||`{}`);ae(n)&&(t=n)}catch{}return{get state(){return t},set:e=>{t=w(e,t)||t},persist:()=>{try{e.setItem(et,JSON.stringify(t))}catch{}}}}var nt=tt(),rt=e=>e.state.__TSR_key||e.href;function it(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var at=!1,ot=`window`,st=`data-scroll-restoration-id`;function ct(e,t){if(!nt)return;let n=nt;if((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,at=!1;let r=e.options.getScrollRestorationKey||rt,i=new Map;window.history.scrollRestoration=`manual`;let a=t=>{if(!(at||!e.isScrollRestoring))if(t.target===document||t.target===window)i.set(ot,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{let e=t.target;i.set(e,{scrollX:e.scrollLeft||0,scrollY:e.scrollTop||0})}},o=t=>{if(!e.isScrollRestoring||!t||i.size===0||!n)return;let r=n.state[t]||={};for(let[e,t]of i){let n;if(e===ot)n=ot;else if(e.isConnected){let t=e.getAttribute(st);n=t?`[${st}="${t}"]`:it(e)}n&&(r[n]=t)}};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{o(e.fromLocation?r(e.fromLocation):void 0),i.clear()}),window.addEventListener(`pagehide`,()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe(`onRendered`,t=>{let a=r(t.toLocation),o=e.options.scrollRestorationBehavior,s=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))){at=!0;try{let t=e.isScrollRestoring?n.state[a]:void 0,r=!1;if(t)for(let e in t){let n=t[e];if(!ae(n))continue;let{scrollX:i,scrollY:a}=n;if(!(!Number.isFinite(i)||!Number.isFinite(a))){if(e===ot)window.scrollTo({top:a,left:i,behavior:o}),r=!0;else if(e){let t;try{t=document.querySelector(e)}catch{continue}t&&(t.scrollLeft=i,t.scrollTop=a,r=!0)}}}if(!r){let t=e.history.location.hash.slice(1);if(t){let e=window.history.state?.__hashScrollIntoViewOptions??!0;if(e){let n=document.getElementById(t);n&&n.scrollIntoView(e)}}else{let e={top:0,left:0,behavior:o};if(window.scrollTo(e),s)for(let t of s){if(t===ot)continue;let n=typeof t==`function`?t():document.querySelector(t);n&&n.scrollTo(e)}}}}finally{at=!1}e.isScrollRestoring&&n.set(e=>(e[a]||={},e))}})}function lt(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function ut(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function dt(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=ut(r):Array.isArray(t)?t.push(ut(r)):n[e]=[t,ut(r)]}return n}var ft=mt(JSON.parse),pt=ht(JSON.stringify,JSON.parse);function mt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=dt(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ht(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=lt(e,r);return t?`?${t}`:``}}var gt=`__root__`;function _t(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vt(e){return e instanceof Response&&!!e.options}function yt(e){return{input:({url:t})=>{for(let n of e)t=xt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=St(e[n],t);return t}}}function bt(e){let t=We(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Be([`/`,t,e.pathname]),e)}}function xt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function St(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ct(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>wt(o,_.get())),x=r(()=>wt(s,v.get())),S=r(()=>wt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),ee=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),te=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),ne=ge(64);function T(e){let t=ne.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),ne.set(e,t)),t}let E={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:ee,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:te,getRouteMatchStore:T,setMatches:re,setPending:ie,setCached:ae};re(e.matches),a?.(E);function re(e){Tt(e,o,_,n,i)}function ie(e){Tt(e,s,v,n,i)}function ae(e){Tt(e,c,y,n,i)}return E}function wt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Tt(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}me(n.get(),a)||n.set(a)})}var Et=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Dt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ot=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),kt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},At=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},jt=(e,t,n)=>{if(!(!vt(n)&&!Qe(n)))throw vt(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:vt(n)?`redirected`:Qe(n)?`notFound`:r.status===`pending`?`success`:r.status,context:kt(e,t.index),isFetching:!1,error:n})),Qe(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),vt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Mt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Nt=(e,t,n)=>{let r=kt(e,n);e.updateMatch(t,e=>({...e,context:r}))},Pt=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,jt(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,jt(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!vt(n)&&!Qe(n)&&(e.serialError??=n)},Ft=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ot(e,t)&&(n.options.loader||n.options.beforeLoad||Kt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Et(e)},i);r._nonReactive.pendingTimeout=t}},It=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ft(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&jt(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Lt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=D(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Pt(e,n,o,`PARSE_PARAMS`),s&&Pt(e,n,s,`VALIDATE_SEARCH`),Ft(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=D();let f={...kt(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=Ot(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(vt(r)||Qe(r))&&(u(),Pt(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),O(y))return u(),y.catch(t=>{Pt(e,n,t,`BEFORE_LOAD`)}).then(v)}catch(t){u(),Pt(e,n,t,`BEFORE_LOAD`)}v(y)},Rt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Lt(e,n,t,i),s=()=>{if(Mt(e,n))return;let t=It(e,n,i);return O(t)?t.then(o):o()};return a()},zt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Bt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=kt(e,r),d=Ot(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Vt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{Gt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Bt(e,t,n,r,i)),l=!!s&&O(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;jt(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:kt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:kt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,Qe(t)&&await i.options.notFoundComponent?.preload?.(),jt(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,jt(e,e.router.getMatch(n),t)}!vt(o)&&!Qe(o)&&await Gt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:kt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),jt(e,r,t)}},Ht=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Bt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Vt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){vt(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Vt(e,t,i,n,d):Nt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Mt(e,i)){if(!e.router.getMatch(i))return e.matches[n];Nt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=Ot(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&jt(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=D(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ut(e){let t=e,n=[];Dt(t.router)&&Et(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Rt(t,e);O(n)&&await n}catch(e){if(vt(e))throw e;if(Qe(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?At(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Ht(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(vt(e))throw e;Qe(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=At(t,l);e===void 0&&he();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await Gt(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Gt(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=zt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Et(t);if(O(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Wt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Gt(e,t=qt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===qt?(()=>{if(e._componentsPromise===void 0){let t=Wt(e,qt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Wt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Kt(e){for(let t of qt)if(e.options[t]?.preload)return!0;return!1}var qt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],Jt=`__TSR_index`,Yt=`popstate`,Xt=`beforeunload`;function Zt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=tn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Jt];i=Qt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Jt];i=Qt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Jt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Qt(e,t){t||={};let n=nn();return{...t,key:n,__TSR_key:n,[Jt]:e}}function $t(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>tn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=nn();t.history.replaceState({[Jt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=tn(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Jt]-l.state[Jt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Zt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Xt,S,{capture:!0}),t.removeEventListener(Yt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Xt,S,{capture:!0}),t.addEventListener(Yt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function en(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function tn(e,t){let n=en(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=nn();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[Jt]:0,key:a,__TSR_key:a}}}function nn(){return(Math.random()+1).toString(36).substring(7)}function rn(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var an=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Je(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=$t()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ge(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Ct(cn(this.latestLocation),e),ct(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=We(o);t&&t!==`/`&&e.push(bt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:yt(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ae(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Te(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:pe(e).path,external:!1,searchStr:o,search:E(t?.search,i),hash:pe(r.slice(1)).path,state:re(t?.state,a)}}let o=new URL(i,this.origin),s=xt(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:pe(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:E(t?.search,c),hash:pe(s.hash.slice(1)).path,state:re(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>qe({base:e,to:t.includes(`//`)?Ve(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>un({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,w(t.params,s)),d=this.routesByPath[Ue(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&ne(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:pe(Xe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,ln(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=dn({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=E(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?w(t.hash,n.hash):void 0,_=g?`#${g}`:``,v=t.state===!0?n.state:t.state?w(t.state,n.state):{};v=re(n.state,v);let y=`${p}${h}${_}`,b,x,S=!1;if(this.rewrite){let e=new URL(y,this.origin),t=St(this.rewrite,e);b=e.href.replace(e.origin,``),t.origin===this.origin?x=t.pathname+t.search+t.hash:(x=t.href,S=!0)}else b=k(y),x=b;return{publicHref:x,href:b,pathname:p,search:m,searchStr:h,state:v,hash:g??``,external:S,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=Ee(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,w(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=ce(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=Ue(this.latestLocation.href)===Ue(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=D(()=>{a?.resolve(),a=void 0}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=tn(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=xt(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(fe(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t,n,r,i=this.stores.resolvedLocation.get()??this.stores.location.get();for(r=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=rn(t,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...n}),this.emit({type:`onBeforeLoad`,...n}),await Ut({router:this,sync:e?.sync,forceStaleReload:i.href===t.href,matches:this.stores.pendingMatches.get(),location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){vt(e)?(t=e,this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):Qe(e)&&(n=e);let r=t?t.status:n?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(r),this.stores.redirect.set(t)})}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.matches.get().some(e=>e.status===`error`)&&(a=500),a!==void 0&&this.stores.statusCode.set(a)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(rn(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&fe(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=Gt,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ut({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(vt(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Qe(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=De(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!ce(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?ce(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??pt,parseSearch:e.parseSearch??ft,protocolAllowlist:e.protocolAllowlist??de}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=Ne(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:Ue(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?pn(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=ln(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof on||(r=new on(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:g}=Xe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),_=r.id+h+m,v=this.getMatch(_),y=l.get(r.id),b=v?._strictParams??g,x;if(!v)try{mn(r,b)}catch(e){if(x=Qe(e)||vt(e)?e:new sn(e.message,{cause:e}),t?.throwOnError)throw x}Object.assign(i,b);let S=y?`stay`:`enter`,C;if(v)C={...v,cause:S,params:y?.params??i,_strictParams:b,search:E(y?y.search:v.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Kt(r)?`pending`:`success`;C={id:_,ssr:r.options.ssr,index:n,routeId:r.id,params:y?.params??i,_strictParams:b,pathname:h,updatedAt:Date.now(),search:y?E(y.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:x,__routeContext:void 0,_nonReactive:{loadPromise:D()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:S,loaderDeps:y?re(y.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(C.globalNotFound=s===r.id),C.searchError=f;let w=this.getParentContext(o);C.context={...w,...C.__routeContext,...C.__beforeLoadContext},c[n]=C}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?E(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=S(t),i={...e.search};for(let e of t)try{Object.assign(i,ln(e.options.validateSearch,i))}catch{}let a=S(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{mn(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},on=class extends Error{},sn=class extends Error{};function cn(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function ln(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new on(`Async validation not supported`);if(n.issues)throw new on(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function un({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=Ue(e),a,o=Oe(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function dn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return fn(n)(e,t,r??!1)}function fn(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...ln(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:w(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function pn(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return gt}function mn(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var hn=`Error preloading route! ☝️`,gn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=gt:this.parentRoute||he();let r=n?gt:t?.path;r&&r!==`/`&&(r=He(r));let i=t?.id||r,a=n?gt:Be([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Be([`/`,a]));let o=a===`__root__`?`/`:Be([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=Ue(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>_t({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},_n=class extends gn{constructor(e){super(e)}};function vn(e){if(typeof document<`u`&&document.querySelector){let t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==``){let e=document.getElementById(t.hash);e&&e.scrollIntoView(n)}}}var yn=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})),j=o(((e,t)=>{t.exports=yn()}))();function bn(e){let t=e.errorComponent??Sn;return(0,j.jsx)(xn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var xn=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Sn({error:e}){let[t,n]=_.useState(!1);return(0,j.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,j.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,j.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,j.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,j.jsx)(`div`,{children:(0,j.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,j.jsx)(`code`,{children:e.message}):null})}):null]})}function Cn({children:e,fallback:t=null}){return wn()?(0,j.jsx)(_.Fragment,{children:e}):(0,j.jsx)(_.Fragment,{children:t})}function wn(){return _.useSyncExternalStore(Tn,()=>!0,()=>!1)}function Tn(){return()=>{}}var En=_.createContext(null);function Dn(e){return _.useContext(En)}var On=_.createContext(void 0),kn=_.createContext(void 0),M=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(M||{});function An({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function jn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Mn=[],Nn=0,{link:Pn,unlink:Fn,propagate:In,checkDirty:Ln,shallowPropagate:Rn}=An({update(e){return e._update()},notify(e){Mn[Bn++]=e,e.flags&=~M.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=M.Mutable|M.Dirty,Wn(e))}}),zn=0,Bn=0,Vn,Hn=0;function Un(e){try{++Hn,e()}finally{--Hn||Gn()}}function Wn(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Fn(n,e)}function Gn(){if(!(Hn>0)){for(;zn<Bn;){let e=Mn[zn];Mn[zn++]=void 0,e.notify()}zn=0,Bn=0}}function Kn(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?M.None:M.Mutable,get(){return Vn!==void 0&&Pn(i,Vn,Nn),i._snapshot},subscribe(e){let t=jn(e),n={current:!1},r=qn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Vn,o=t?.compare??Object.is;if(n)Vn=i,++Nn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=M.Mutable|M.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Vn=a,n&&(i.flags&=~M.RecursedCheck),Wn(i)}}};return n?(i.flags=M.Mutable|M.Dirty,i.get=function(){let e=i.flags;if(e&M.Dirty||e&M.Pending&&Ln(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Rn(e)}}else e&M.Pending&&(i.flags=e&~M.Pending);return Vn!==void 0&&Pn(i,Vn,Nn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(In(e),Rn(e),Gn())}},i}function qn(e){let t=()=>{let t=Vn;Vn=n,++Nn,n.depsTail=void 0,n.flags=M.Watching|M.RecursedCheck;try{return e()}finally{Vn=t,n.flags&=~M.RecursedCheck,Wn(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:M.Watching|M.RecursedCheck,notify(){let e=this.flags;e&M.Dirty||e&M.Pending&&Ln(this.deps,this)?t():this.flags=M.Watching},stop(){this.flags=M.None,this.depsTail=void 0,Wn(this)}};return t(),n}var Jn=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Yn=o(((e,t)=>{t.exports=Jn()})),Xn=o((e=>{var t=u(),n=Yn();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Zn=o(((e,t)=>{t.exports=Xn()}))();function Qn(e,t){return e===t}function $n(e,t,n=Qn){let r=(0,_.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,_.useCallback)(()=>e?.get(),[e]);return(0,Zn.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var er={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function tr(e){let t=Dn(),n=_.useContext(e.from?kn:On),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=_.useRef(void 0);return $n(i??er,n=>{if((e.shouldThrow??!0)&&!n&&he(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=re(a.current,r);return a.current=e,e}return r})}function nr(e){return tr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function rr(e){let{select:t,...n}=e;return tr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ir(e){return tr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ar(e){return tr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function or(e){let t=Dn();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function sr(e){return tr({...e,select:t=>e.select?e.select(t.context):t.context})}var cr=m();function lr(e,t){let n=Dn(),r=x(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:v,disabled:y,style:S,className:C,onClick:ee,onBlur:te,onFocus:ne,onMouseEnter:T,onMouseLeave:E,onTouchStart:re,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:D,mask:O,reloadDocument:le,unsafeRelative:ue,from:de,_fromLocation:pe,...k}=e,me=wn(),he=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ge=$n(n.stores.location,e=>e,(e,t)=>e.href===t.href),A=_.useMemo(()=>{let e={_fromLocation:ge,...he};return n.buildLocation(e)},[n,ge,he]),_e=A.maskedLocation?A.maskedLocation.publicHref:A.publicHref,ve=A.maskedLocation?A.maskedLocation.external:A.external,ye=_.useMemo(()=>vr(_e,ve,n.history,y),[y,ve,_e,n.history]),be=_.useMemo(()=>{if(ye?.external)return fe(ye.href,n.protocolAllowlist)?void 0:ye.href;if(!yr(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),fe(s,n.protocolAllowlist)?void 0:s}catch{}},[s,ye,n.protocolAllowlist]),xe=_.useMemo(()=>{if(be)return!1;if(o?.exact){if(!Ke(ge.pathname,A.pathname,n.basepath))return!1}else{let e=Ge(ge.pathname,n.basepath),t=Ge(A.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!ce(ge.search,A.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?me&&ge.hash===A.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,ge,be,me,A.hash,A.pathname,A.search,n.basepath]),Se=xe?w(i,{})??dr:ur,Ce=xe?ur:w(a,{})??ur,we=[C,Se.className,Ce.className].filter(Boolean).join(` `),Te=(S||Se.style||Ce.style)&&{...S,...Se.style,...Ce.style},[Ee,De]=_.useState(!1),Oe=_.useRef(!1),ke=e.reloadDocument||be?!1:c??n.options.defaultPreload,Ae=l??n.options.defaultPreloadDelay??0,je=_.useCallback(()=>{n.preloadRoute({...he,_builtLocation:A}).catch(e=>{console.warn(e),console.warn(hn)})},[n,he,A]);b(r,_.useCallback(e=>{e?.isIntersecting&&je()},[je]),gr,{disabled:!!y||ke!==`viewport`}),_.useEffect(()=>{Oe.current||!y&&ke===`render`&&(je(),Oe.current=!0)},[y,je,ke]);let Me=e=>{let t=e.currentTarget.getAttribute(`target`),r=v===void 0?t:v;if(!y&&!xr(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,cr.flushSync)(()=>{De(!0)});let t=n.subscribe(`onResolved`,()=>{t(),De(!1)});n.navigate({...he,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:ie})}};if(be)return{...k,ref:r,href:be,...g&&{children:g},...v&&{target:v},...y&&{disabled:y},...S&&{style:S},...C&&{className:C},...ee&&{onClick:ee},...te&&{onBlur:te},...ne&&{onFocus:ne},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...re&&{onTouchStart:re}};let Ne=e=>{if(y||ke!==`intent`)return;if(!Ae){je();return}let t=e.currentTarget;if(hr.has(t))return;let n=setTimeout(()=>{hr.delete(t),je()},Ae);hr.set(t,n)},Pe=e=>{y||ke!==`intent`||je()},Fe=e=>{if(y||!ke||!Ae)return;let t=e.currentTarget,n=hr.get(t);n&&(clearTimeout(n),hr.delete(t))};return{...k,...Se,...Ce,href:ye?.href,ref:r,onClick:_r([ee,Me]),onBlur:_r([te,Fe]),onFocus:_r([ne,Ne]),onMouseEnter:_r([T,Ne]),onMouseLeave:_r([E,Fe]),onTouchStart:_r([re,Pe]),disabled:!!y,target:v,...Te&&{style:Te},...we&&{className:we},...y&&fr,...xe&&pr,...me&&Ee&&mr}}var ur={},dr={className:`active`},fr={role:`link`,"aria-disabled":!0},pr={"data-status":`active`,"aria-current":`page`},mr={"data-transitioning":`transitioning`},hr=new WeakMap,gr={rootMargin:`100px`},_r=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function vr(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function yr(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var br=_.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=lr(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return _.createElement(`a`,t,o)}return _.createElement(n,a,o)});function xr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Sr=class extends gn{constructor(e){super(e),this.useMatch=e=>tr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>sr({...e,from:this.id}),this.useSearch=e=>ar({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ir({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>rr({...e,from:this.id}),this.useLoaderData=e=>nr({...e,from:this.id}),this.useNavigate=()=>or({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,j.jsx)(br,{ref:t,from:this.fullPath,...e}))}};function Cr(e){return new Sr(e)}var wr=class extends _n{constructor(e){super(e),this.useMatch=e=>tr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>sr({...e,from:this.id}),this.useSearch=e=>ar({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ir({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>rr({...e,from:this.id}),this.useLoaderData=e=>nr({...e,from:this.id}),this.useNavigate=()=>or({from:this.fullPath}),this.Link=_.forwardRef((e,t)=>(0,j.jsx)(br,{ref:t,from:this.fullPath,...e}))}};function Tr(e){return new wr(e)}function Er(e){let t=Dn(),n=`not-found-${$n(t.stores.location,e=>e.pathname)}-${$n(t.stores.status,e=>e)}`;return(0,j.jsx)(bn,{getResetKey:()=>n,onCatch:(t,n)=>{if(Qe(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Qe(t))return e.fallback?.(t);throw t},children:e.children})}function Dr(){return(0,j.jsx)(`p`,{children:`Not Found`})}function Or(e){return(0,j.jsx)(j.Fragment,{children:e.children})}function kr(e,t,n){return t.options.notFoundComponent?(0,j.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,j.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,j.jsx)(Dr,{})}var Ar=_.memo(function({matchId:e}){let t=Dn(),n=t.stores.matchStores.get(e);n||he();let r=$n(t.stores.loadedAt,e=>e),i=$n(n,e=>e);return(0,j.jsx)(jr,{router:t,matchId:e,resetKey:r,matchState:_.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function jr({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,j.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?_.Suspense:Or,f=s?bn:Or,p=l?Er:Or;return(0,j.jsxs)(i.isRoot?i.options.shellComponent??Or:Or,{children:[(0,j.jsx)(On.Provider,{value:t,children:(0,j.jsx)(d,{fallback:o,children:(0,j.jsx)(f,{getResetKey:()=>n,errorComponent:s||Sn,onCatch:(e,t)=>{if(Qe(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,j.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return _.createElement(l,e)},children:u||r._displayPending?(0,j.jsx)(Cn,{fallback:o,children:(0,j.jsx)(Nr,{matchId:t})}):(0,j.jsx)(Nr,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Mr,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function Mr({resetKey:e}){let t=Dn(),n=_.useRef(void 0);return v(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...rn(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var Nr=_.memo(function({matchId:e}){let t=Dn(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||he();let i=$n(r,e=>e),a=i.routeId,o=t.routesById[a],s=_.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=_.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,j.jsx)(e,{},s):(0,j.jsx)(Pr,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=D();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return Qe(i.error)||he(),kr(t,o,i.error);if(i.status===`redirected`)throw vt(i.error)||he(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Pr=_.memo(function(){let e=Dn(),t=_.useContext(On),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=$n(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=$n(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,j.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||he(),kr(e,a,void 0);if(!i)return null;let s=(0,j.jsx)(Ar,{matchId:i});return n===`__root__`?(0,j.jsx)(_.Suspense,{fallback:o,children:s}):s});function Fr(){let e=Dn(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),i=$n(e.stores.isLoading,e=>e),a=$n(e.stores.hasPending,e=>e),o=y(i),s=i||n||a,c=y(s),l=i||a,u=y(l);return e.startTransition=e=>{r(!0),_.startTransition(()=>{e(),r(!1)})},_.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ue(e.latestLocation.publicHref)!==Ue(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),v(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),v(()=>{o&&!i&&e.emit({type:`onLoad`,...rn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),v(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...rn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),v(()=>{if(c&&!s){let t=rn(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Un(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())}),t.hrefChanged&&vn(e)}},[s,c,e]),null}function Ir(){let e=Dn(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,j.jsx)(t,{}):null,r=(0,j.jsxs)(typeof document<`u`&&e.ssr?Or:_.Suspense,{fallback:n,children:[(0,j.jsx)(Fr,{}),(0,j.jsx)(Lr,{})]});return e.options.InnerWrap?(0,j.jsx)(e.options.InnerWrap,{children:r}):r}function Lr(){let e=Dn(),t=$n(e.stores.firstId,e=>e),n=$n(e.stores.loadedAt,e=>e),r=t?(0,j.jsx)(Ar,{matchId:t}):null;return(0,j.jsx)(On.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,j.jsx)(bn,{getResetKey:()=>n,errorComponent:Sn,onCatch:void 0,children:r})})}var Rr=e=>({createMutableStore:Kn,createReadonlyStore:Kn,batch:Un}),zr=e=>new Br(e),Br=class extends an{constructor(e){super(e,Rr)}};function Vr({router:e,children:t,...n}){ne(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,j.jsx)(En.Provider,{value:e,children:t});return e.options.Wrap?(0,j.jsx)(e.options.Wrap,{children:r}):r}function Hr({router:e,...t}){return(0,j.jsx)(Vr,{router:e,...t,children:(0,j.jsx)(Ir,{})})}var Ur=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wr=new class extends Ur{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Gr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Kr=new class{#e=Gr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function qr(e){setTimeout(e,0)}var Jr=typeof window>`u`||`Deno`in globalThis;function Yr(){}function Xr(e,t){return typeof e==`function`?e(t):e}function Zr(e){return typeof e==`number`&&e>=0&&e!==1/0}function Qr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $r(e,t){return typeof e==`function`?e(t):e}function ei(e,t){return typeof e==`function`?e(t):e}function ti(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ri(o,t.options))return!1}else if(!ai(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ni(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(ii(t.options.mutationKey)!==ii(a))return!1}else if(!ai(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ri(e,t){return(t?.queryKeyHashFn||ii)(e)}function ii(e){return JSON.stringify(e,(e,t)=>ui(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ai(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>ai(e[n],t[n])):!1}var oi=Object.prototype.hasOwnProperty;function si(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=li(e)&&li(t);if(!r&&!(ui(e)&&ui(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:oi.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=si(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ci(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function li(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ui(e){if(!di(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!di(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function di(e){return Object.prototype.toString.call(e)===`[object Object]`}function fi(e){return new Promise(t=>{Kr.setTimeout(t,e)})}function pi(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:si(e,t)}function mi(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function hi(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var gi=Symbol();function _i(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===gi?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vi(e,t){return typeof e==`function`?e(...t):!!e}function yi(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var bi=(()=>{let e=()=>Jr;return{isServer(){return e()},setIsServer(t){e=t}}})();function xi(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Si=qr;function Ci(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Si,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var N=Ci(),wi=new class extends Ur{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ti(e){return Math.min(1e3*2**e,3e4)}function Ei(e){return(e??`online`)===`online`?wi.isOnline():!0}var Di=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Oi(e){let t=!1,n=0,r,i=xi(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Di(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Wr.isFocused()&&(e.networkMode===`always`||wi.isOnline())&&e.canRun(),u=()=>Ei(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(bi.isServer()?0:3),o=e.retryDelay??Ti,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),fi(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ki=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zr(this.gcTime)&&(this.#e=Kr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bi.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Kr.clearTimeout(this.#e),this.#e=void 0)}};function Ai(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{yi(e,()=>t.signal,()=>n=!0)},u=_i(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?hi:mi;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Mi:ji,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ji(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ji(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Mi(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ni=class extends ki{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ii(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ii(this.options);e.data!==void 0&&(this.setState(Fi(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=pi(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Yr).catch(Yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>ei(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===gi||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$r(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Qr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=_i(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Ai(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Oi({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Di&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Di){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Pi(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Fi(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),N.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Pi(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ei(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Fi(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ii(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Li=class extends Ur{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=xi(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),P(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return F(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return F(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ei(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ci(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&zi(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ei(this.options.enabled,this.#t)!==ei(t.enabled,this.#t)||$r(this.options.staleTime,this.#t)!==$r(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ei(this.options.enabled,this.#t)!==ei(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Vi(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Yr)),t}#g(){this.#b();let e=$r(this.options.staleTime,this.#t);if(bi.isServer()||this.#r.isStale||!Zr(e))return;let t=Qr(this.#r.dataUpdatedAt,e)+1;this.#d=Kr.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(bi.isServer()||ei(this.options.enabled,this.#t)===!1||!Zr(this.#p)||this.#p===0)&&(this.#f=Kr.setInterval(()=>{(this.options.refetchIntervalInBackground||Wr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Kr.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Kr.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&P(e,t),o=i&&zi(e,n,t,r);(a||o)&&(l={...l,...Pi(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=pi(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=pi(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Bi(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ei(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=xi())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ci(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){N.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ri(e,t){return ei(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&ei(t.retryOnMount,e)===!1)}function P(e,t){return Ri(e,t)||e.state.data!==void 0&&F(e,t,t.refetchOnMount)}function F(e,t,n){if(ei(t.enabled,e)!==!1&&$r(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Bi(e,t)}return!1}function zi(e,t,n,r){return(e!==t||ei(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Bi(e,n)}function Bi(e,t){return ei(t.enabled,e)!==!1&&e.isStaleByTime($r(t.staleTime,e))}function Vi(e,t){return!ci(e.getCurrentResult(),t)}var Hi=class extends ki{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ui(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Oi({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),N.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ui(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Wi=class extends Ur{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Hi({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Gi(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Gi(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Gi(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Gi(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){N.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ni(t,e))}findAll(e={}){return this.getAll().filter(t=>ni(e,t))}notify(e){N.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return N.batch(()=>Promise.all(e.map(e=>e.continue().catch(Yr))))}};function Gi(e){return e.options.scope?.id}var Ki=class extends Ur{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ci(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&ii(t.mutationKey)!==ii(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ui();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){N.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},qi=class extends Ur{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ri(r,t),a=this.get(i);return a||(a=new Ni({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){N.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ti(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ti(e,t)):t}notify(e){N.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){N.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){N.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ji=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new qi,this.#t=e.mutationCache||new Wi,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Wr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=wi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime($r(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Xr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return N.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;N.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return N.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=N.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Yr).catch(Yr)}invalidateQueries(e,t={}){return N.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=N.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Yr)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Yr)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime($r(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yr).catch(Yr)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yr).catch(Yr)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return wi.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(ii(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ai(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(ii(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ai(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ri(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===gi&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Yi=_.createContext(void 0),Xi=e=>{let t=_.useContext(Yi);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Zi=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,j.jsx)(Yi.Provider,{value:e,children:t})),Qi=_.createContext(!1),$i=()=>_.useContext(Qi);Qi.Provider;function ea(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ta=_.createContext(ea()),na=()=>_.useContext(ta),ra=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?vi(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ia=e=>{_.useEffect(()=>{e.clearReset()},[e])},aa=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||vi(n,[e.error,r])),oa=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},sa=(e,t)=>e.isLoading&&e.isFetching&&!t,ca=(e,t)=>e?.suspense&&t.isPending,la=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ua(e,t,n){let r=$i(),i=na(),a=Xi(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,oa(o),ra(o,i,s),ia(i);let c=!a.getQueryCache().get(o.queryHash),[l]=_.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(e=>{let t=d?l.subscribe(N.batchCalls(e)):Yr;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),_.useEffect(()=>{l.setOptions(o)},[o,l]),ca(o,u))throw la(o,l,i);if(aa({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!bi.isServer()&&sa(u,r)&&(c?la(o,l,i):s?.promise)?.catch(Yr).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function I(e,t){return ua(e,Li,t)}function da(e,t){let n=Xi(t),[r]=_.useState(()=>new Ki(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);let i=_.useSyncExternalStore(_.useCallback(e=>r.subscribe(N.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=_.useCallback((e,t)=>{r.mutate(e,t).catch(Yr)},[r]);if(i.error&&vi(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var fa=c(g(),1),pa={bg:`#0c0b0a`,surface:`#16140f`,surfaceRaised:`#201c15`,surfaceInset:`#100e0a`,border:`#2c2820`,borderSubtle:`#211e18`,borderStrong:`#3b362b`,text:`#ece8e1`,textMuted:`#a59e90`,textFaint:`#6b6457`,accent:`#f0913a`,accentHover:`#ffae5e`,accentSoft:`#2e1f0f`,onAccent:`#0c0b0a`,positive:`#3ddc91`,positiveSoft:`#0f2a20`,warning:`#f5c544`,warningSoft:`#2a2410`,danger:`#ff6b6b`,dangerSoft:`#2a1414`,platformClaude:`#f0913a`,platformCodex:`#3ddc91`,platformCursor:`#c4a3ff`},ma={bg:`#faf8f4`,surface:`#ffffff`,surfaceRaised:`#f3efe8`,surfaceInset:`#f0ece4`,border:`#e2dcd0`,borderSubtle:`#ece7dd`,borderStrong:`#cfc7b8`,text:`#23201a`,textMuted:`#6e6657`,textFaint:`#9b9384`,accent:`#c4640f`,accentHover:`#a8540a`,accentSoft:`#fbeedd`,onAccent:`#ffffff`,positive:`#0a7d44`,positiveSoft:`#e3f5ea`,warning:`#8a5a00`,warningSoft:`#fbf0d8`,danger:`#d12c2c`,dangerSoft:`#fce8e8`,platformClaude:`#c4640f`,platformCodex:`#0a7d44`,platformCursor:`#7c3aed`};function ha(e){return`--vy-`+e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())}var L=Object.keys(pa).reduce((e,t)=>(e[t]=`var(${ha(t)})`,e),{}),ga={0:0,1:4,2:8,3:12,4:16,5:24,6:32,7:48,8:64},_a={sm:4,md:8,lg:12,pill:999},va={sm:`0 1px 2px var(--vy-shadow)`,md:`0 4px 16px var(--vy-shadow)`,lg:`0 12px 40px var(--vy-shadow)`},R={sans:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,mono:`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`},z={xs:11,sm:12,base:13,md:14,lg:16,xl:20,"2xl":28,"3xl":40,hero:56},ya={normal:400,medium:500,semibold:600,bold:700},ba=`vyasa-theme`;function xa(e){return Object.keys(e).map(t=>`${ha(t)}: ${e[t]};`).join(` `)}function Sa(){if(typeof window>`u`)return`dark`;let e=window.localStorage.getItem(ba);return e===`light`||e===`dark`?e:window.matchMedia&&window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function Ca(){return typeof document>`u`?`dark`:document.documentElement.getAttribute(`data-theme`)===`light`?`light`:`dark`}function wa(e){if(!(typeof document>`u`)){document.documentElement.setAttribute(`data-theme`,e);try{window.localStorage.setItem(ba,e)}catch{}}}function Ta(){let e=Ca()===`light`?`dark`:`light`;return wa(e),e}function Ea(){if(!(typeof document>`u`)){if(!document.getElementById(`vyasa-base-styles`)){let e=document.createElement(`style`);e.id=`vyasa-base-styles`,e.textContent=`
|
|
10
|
+
:root { ${xa(pa)} --vy-shadow: rgba(0,0,0,0.45); --vy-font-sans: ${R.sans}; --vy-font-mono: ${R.mono}; color-scheme: dark; }
|
|
11
|
+
:root[data-theme="light"] { ${xa(ma)} --vy-shadow: rgba(20,30,50,0.10); color-scheme: light; }
|
|
12
|
+
* { box-sizing: border-box; }
|
|
13
|
+
html, body, #root { margin: 0; height: 100%; }
|
|
14
|
+
body {
|
|
15
|
+
background: var(--vy-bg);
|
|
16
|
+
color: var(--vy-text);
|
|
17
|
+
font-family: var(--vy-font-sans);
|
|
18
|
+
font-size: ${z.base}px;
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
text-rendering: optimizeLegibility;
|
|
21
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
22
|
+
}
|
|
23
|
+
.vy-mono { font-family: var(--vy-font-mono); font-variant-numeric: tabular-nums; }
|
|
24
|
+
a { color: var(--vy-accent); text-decoration: none; }
|
|
25
|
+
a:hover { text-decoration: underline; }
|
|
26
|
+
::selection { background: var(--vy-accent-soft); }
|
|
27
|
+
/* Search snippet highlights (<mark> from FTS5) — brand accent, not browser yellow. */
|
|
28
|
+
mark { background: var(--vy-accent-soft); color: var(--vy-accent); border-radius: 2px; padding: 0 2px; font-weight: 600; }
|
|
29
|
+
input, button, textarea, select { font-family: inherit; }
|
|
30
|
+
`,document.head.appendChild(e)}wa(Sa())}}async function Da(e){if(!e.ok){let t=await e.text().catch(()=>e.statusText);throw Error(`HTTP ${e.status}: ${t}`)}return e}async function Oa(){return(await Da(await fetch(`/api/foundation`))).json()}async function ka(e){return(await Da(await fetch(`/api/waste?range=${e}`))).json()}async function Aa(e){let t=new URLSearchParams;return e.q&&t.set(`q`,e.q),e.project&&t.set(`project`,e.project),e.model&&t.set(`model`,e.model),e.platform&&t.set(`platform`,e.platform),e.dateFrom&&t.set(`dateFrom`,e.dateFrom),e.dateTo&&t.set(`dateTo`,e.dateTo),e.outcome&&t.set(`outcome`,e.outcome),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset)),(await Da(await fetch(`/api/search?${t}`))).json()}async function ja(e={}){let t=new URLSearchParams;return e.project&&t.set(`project`,e.project),e.model&&t.set(`model`,e.model),e.platform&&t.set(`platform`,e.platform),e.dateFrom&&t.set(`dateFrom`,e.dateFrom),e.dateTo&&t.set(`dateTo`,e.dateTo),e.outcome&&t.set(`outcome`,e.outcome),e.sort&&t.set(`sort`,e.sort),e.tag&&t.set(`tag`,e.tag),e.includeEmpty&&t.set(`includeEmpty`,`true`),e.limit!=null&&t.set(`limit`,String(e.limit)),e.offset!=null&&t.set(`offset`,String(e.offset)),(await Da(await fetch(`/api/sessions?${t}`))).json()}async function Ma(){return(await Da(await fetch(`/api/live`))).json()}async function Na(e){return(await Da(await fetch(`/api/sessions/${encodeURIComponent(e)}`))).json()}async function Pa(e){return(await Da(await fetch(`/api/analytics?range=${e}`))).json()}async function Fa(e={}){let t=new URLSearchParams;e.platform&&t.set(`platform`,e.platform),e.days!=null&&t.set(`days`,String(e.days));let n=t.toString();return(await Da(await fetch(`/api/kit${n?`?${n}`:``}`))).json()}async function Ia(e){return(await Da(await fetch(`/api/billing?range=${e}`))).json()}async function La(e){return(await fetch(`/api/import`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e})})).json()}async function Ra(){return(await Da(await fetch(`/api/index-status`))).json()}function za(e,t={}){let n=new URLSearchParams;t.redact&&t.redact.length&&n.set(`redact`,t.redact.join(`,`)),t.scrub===!1&&n.set(`scrub`,`false`),t.includePlan===!1&&n.set(`includePlan`,`false`);let r=n.toString();return`/api/sessions/${encodeURIComponent(e)}/export${r?`?${r}`:``}`}async function Ba(e){return(await Da(await fetch(`/api/sessions/${encodeURIComponent(e)}/share-preview`))).json()}async function Va(){return(await Da(await fetch(`/api/tags`))).json()}async function Ha(e,t){return(await Da(await fetch(`/api/sessions/${encodeURIComponent(e)}/name`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:t})}))).json()}async function Ua(e,t){return(await Da(await fetch(`/api/sessions/${encodeURIComponent(e)}/tags`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({tags:t})}))).json()}async function Wa(){return(await Da(await fetch(`/api/settings`))).json()}async function Ga(e){return(await Da(await fetch(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}))).json()}async function Ka(){return(await Da(await fetch(`/api/recap`))).json()}async function qa(e,t={}){let n=new URLSearchParams;t.recentTurns!=null&&n.set(`recentTurns`,String(t.recentTurns)),t.maxChars!=null&&n.set(`maxChars`,String(t.maxChars));let r=n.toString(),i=`/api/sessions/${encodeURIComponent(e)}/primer${r?`?${r}`:``}`;return(await Da(await fetch(i))).text()}function Ja(){let{data:e}=I({queryKey:[`index-status`],queryFn:Ra,refetchInterval:e=>e.state.data?.phase===`idle`?!1:2500});return{phase:e?.phase??`idle`,data:e}}function Ya(){let[e,t]=(0,_.useState)(Ca());return(0,j.jsx)(`button`,{onClick:()=>t(Ta()),title:`Switch to ${e===`dark`?`light`:`dark`} mode`,"aria-label":`Toggle color theme`,style:{background:`transparent`,border:`1px solid ${L.border}`,color:L.textMuted,width:26,height:22,borderRadius:6,cursor:`pointer`,fontSize:12,lineHeight:1,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e===`dark`?`☾`:`☀`})}function Xa(e){return e.replace(`claude-opus-`,`Opus `).replace(`claude-sonnet-`,`Sonnet `).replace(`claude-haiku-`,`Haiku `).replace(/^claude-/,``)}function Za(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,``)+`M`:e>=1e3?Math.round(e/1e3)+`k`:String(e)}var Qa=[{to:`/sessions`,label:`Sessions`,search:{project:``,model:``,platform:``,dateFrom:``,dateTo:``,tag:``}},{to:`/live`,label:`Live`},{to:`/analytics`,label:`Analytics`},{to:`/waste`,label:`Waste`},{to:`/search`,label:`Search`},{to:`/kit`,label:`Kit`},{to:`/this-week`,label:`This Week`}];function $a(e){let{phase:t}=Ja(),n=t===`idle`?3e4:3e3,{data:r}=I({queryKey:[`foundation`],queryFn:Oa,refetchInterval:n}),{data:i}=I({queryKey:[`settings`],queryFn:Wa,refetchInterval:n}),a=r?.modelMix.slice().sort((e,t)=>t.pct-e.pct).slice(0,2)??[],o=a.length>0?a.map(e=>`${Xa(e.model)} ${e.pct.toFixed(0)}%`).join(` / `):`—`,s=i?.budget.tokensLast7d??null,c=i?.cap,l=c&&c.capSet?c.pct:null,u=l==null?L.textFaint:l>=100?L.danger:l>=75?L.warning:L.positive,d=(e,t=L.textMuted)=>(0,j.jsx)(`span`,{style:{fontFamily:R.mono,fontVariantNumeric:`tabular-nums`,fontSize:z.sm,color:t},children:e});function f(){if(!c||!c.capSet||i==null)return null;let e=i.budget.dailyRate*7,t=Math.min(100,Math.max(0,c.used/c.cap*100)),n=c.cap>0?Math.min(100,Math.max(0,e/c.cap*100)):0,r=c.pct>=100,a=e>c.cap,o=c.daysToExhaust,s=r?`over cap`:o==null?`on track`:`~${o<1?`<1`:Math.floor(o)}d left`;return(0,j.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:6},title:`${Za(c.used)} of ${Za(c.cap)} tok used this week (${c.pct.toFixed(0)}%) · projected full-week burn ${Za(Math.round(e))} (${n.toFixed(0)}% of cap)`+(r?` · over cap`:o==null?``:` · ~${o<1?`<1`:Math.floor(o)} days to cap`),children:[d(`${Za(c.used)}`,L.text),d(`/`,L.textFaint),d(`${Za(c.cap)}`,L.textFaint),(0,j.jsxs)(`span`,{"aria-hidden":!0,style:{position:`relative`,width:72,height:6,borderRadius:999,background:L.surfaceInset,border:`1px solid ${L.border}`,overflow:`hidden`},children:[(0,j.jsx)(`span`,{style:{position:`absolute`,left:0,top:0,bottom:0,width:`${t}%`,background:u,borderRadius:999,transition:`width 0.3s ease`}}),!r&&n>t&&(0,j.jsx)(`span`,{style:{position:`absolute`,top:-1,bottom:-1,width:2,left:`calc(${n}% - 1px)`,background:a?L.danger:L.textFaint}})]}),d(s,a&&!r?L.warning:u)]})}return(0,j.jsxs)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,height:44,background:L.surface,borderBottom:`1px solid ${L.border}`,display:`flex`,alignItems:`center`,gap:ga[4],padding:`0 ${ga[4]}px`,fontFamily:R.sans,zIndex:100},children:[(0,j.jsx)(`span`,{style:{fontFamily:R.sans,fontWeight:ya.bold,fontSize:z.md,color:L.text,letterSpacing:.2},children:`vyasa`}),c&&c.capSet?(0,j.jsx)(f,{}):s!=null&&(0,j.jsxs)(`span`,{style:{display:`flex`,alignItems:`baseline`,gap:6},children:[d(`${Za(s)} tok`,L.text),d(`/ 7d`,L.textFaint)]}),r&&d(`cache ${(r.cacheHitRateLast30Days*100).toFixed(0)}%`),r&&d(o,L.textFaint),(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,display:`flex`,gap:ga[4]},children:[Qa.map(e=>(0,j.jsx)(br,{to:e.to,...`search`in e?{search:e.search}:{},style:{fontFamily:R.sans,fontSize:z.sm,fontWeight:ya.medium,color:L.textMuted,textDecoration:`none`},activeProps:{style:{color:L.accent,fontWeight:ya.semibold}},children:e.label},e.to)),(0,j.jsx)(Ya,{})]})]})}function eo(e){return e.toLocaleString()}function to(){let{phase:e,data:t}=Ja();if(!t||e===`idle`)return null;let n=t.filesTotal>0?Math.round(t.filesIngested/t.filesTotal*100):0,r=e===`scanning`?`Scanning sessions…`:`Indexing ${eo(t.filesIngested)} / ${eo(t.filesTotal)} sessions (${n}%)`;return(0,j.jsxs)(`div`,{role:`status`,style:{position:`fixed`,top:44,left:0,right:0,height:28,background:L.accentSoft,color:L.accent,display:`flex`,alignItems:`center`,padding:`0 16px`,fontSize:12,fontFamily:`ui-monospace, monospace`,zIndex:99,borderBottom:`1px solid ${L.accentSoft}`},children:[(0,j.jsx)(`span`,{style:{marginRight:8},children:`⟳`}),r,t.errorCount>0&&(0,j.jsxs)(`span`,{style:{marginLeft:12,color:L.danger},children:[t.errorCount,` error`,t.errorCount===1?``:`s`]})]})}function no(){let e=Xi();(0,_.useEffect)(()=>{let t=new EventSource(`/api/events`),n=new Set,r=null,i=()=>{r=null;let t=Array.from(n);n.clear(),e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`live`]}),e.invalidateQueries({queryKey:[`analytics`]}),e.invalidateQueries({queryKey:[`waste`]}),e.invalidateQueries({queryKey:[`foundation`]}),e.invalidateQueries({queryKey:[`kit`]});for(let n of t)e.invalidateQueries({queryKey:[`session`,n]})};return t.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}t.sessionId&&n.add(t.sessionId),r??=setTimeout(i,250)},()=>{r!=null&&clearTimeout(r),t.close()}},[e])}function ro(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`?`}function io(e){return typeof e==`number`?`${Math.round(e/1e3)}s`:`?`}function ao(e){return typeof e==`string`?e.replace(/^claude-/,``):`?`}function oo(e,t){let n;try{let e=JSON.parse(t);if(!e||typeof e!=`object`)throw Error(`not an object`);n=e}catch{return t.slice(0,80)}if(e===`cache-miss`)return`only ${ro(n.cacheHitRate)} cache reuse — below the ${ro(n.target)} target (context re-sent instead of cached)`;if(e===`wrong-model`){let e=typeof n.toolCallCount==`number`?n.toolCallCount:`?`;return`${ao(n.opusModel)} on a ${e}-call, ${io(n.sessionDurationMs)} task — Sonnet would do`}return e===`abandoned`?n.reason===`mid-tool-call-exit`?`exited mid tool-call`:n.reason===`short-no-resumption`?`abandoned after ${io(n.durationMs)}, no resumption`:`abandoned`:Object.entries(n).slice(0,3).map(([e,t])=>`${e}: ${String(t)}`).join(`, `)}function so({options:e,value:t,onChange:n,render:r}){let[i,a]=(0,_.useState)(null);return(0,j.jsx)(`div`,{style:{display:`inline-flex`,gap:2,padding:2,background:L.surfaceInset,border:`1px solid ${L.border}`,borderRadius:_a.md},children:e.map(e=>{let o=e===t;return(0,j.jsx)(`button`,{onClick:()=>n(e),onMouseEnter:()=>a(e),onMouseLeave:()=>a(t=>t===e?null:t),style:{fontFamily:R.mono,fontSize:z.xs,fontWeight:o?ya.semibold:ya.medium,padding:`4px ${ga[3]}px`,border:`none`,borderRadius:_a.sm,cursor:`pointer`,whiteSpace:`nowrap`,transition:`background 0.12s ease, color 0.12s ease`,...o?{background:L.accent,color:L.onAccent,boxShadow:va.sm}:i===e?{background:L.surfaceRaised,color:L.text}:{background:`transparent`,color:L.textMuted}},children:r?r(e):e},e)})})}var co=[`7d`,`30d`,`90d`,`all`],lo={"cache-miss":`Cache Miss`,"wrong-model":`Wrong Model`,abandoned:`Abandoned`};function uo(e){return(e/100).toLocaleString(`en-US`,{style:`currency`,currency:`USD`})}function fo({category:e,evidenceJson:t}){return(0,j.jsx)(`span`,{style:{color:L.textMuted},children:oo(e,t)})}function po({session:e,category:t}){return(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:10,padding:`6px 0`,borderBottom:`1px solid ${L.border}`,fontSize:13},children:[(0,j.jsx)(`span`,{style:{color:L.danger,minWidth:60,fontFamily:`monospace`},children:uo(e.amountCents)}),(0,j.jsx)(`span`,{style:{color:L.text,minWidth:160,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.project||e.sessionId.slice(0,12)}),(0,j.jsx)(`span`,{style:{flex:1},children:(0,j.jsx)(fo,{category:t,evidenceJson:e.evidenceJson})}),(0,j.jsx)(br,{to:`/session/$id`,params:{id:e.sessionId},hash:e.anchorMsgIdx==null?void 0:`msg-${e.anchorMsgIdx}`,style:{color:L.accent,textDecoration:`none`,whiteSpace:`nowrap`,fontSize:12},children:`Replay →`})]})}function B({cat:e}){let[t,n]=(0,_.useState)(!0);return(0,j.jsxs)(`div`,{style:{marginBottom:24},children:[(0,j.jsxs)(`div`,{onClick:()=>n(e=>!e),style:{cursor:`pointer`,display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`,borderBottom:`2px solid ${L.border}`,marginBottom:8},children:[(0,j.jsx)(`span`,{style:{fontSize:15,fontWeight:600,color:L.warning},children:lo[e.category]??e.category}),(0,j.jsx)(`span`,{style:{color:L.danger,fontFamily:`monospace`},children:uo(e.totalCents)}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:12},children:[e.sessionCount,` session`,e.sessionCount===1?``:`s`]}),(0,j.jsx)(`span`,{style:{marginLeft:`auto`,color:L.textFaint,fontSize:12},children:t?`▲`:`▼`})]}),t&&e.sessions.map(t=>(0,j.jsx)(po,{session:t,category:e.category},t.sessionId))]})}function V(){let[e,t]=(0,_.useState)(`7d`),{data:n,isLoading:r,error:i}=I({queryKey:[`waste`,e],queryFn:()=>ka(e)});return(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:900,margin:`0 auto`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:20},children:[(0,j.jsx)(so,{options:co,value:e,onChange:t}),n&&(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,color:L.danger,fontFamily:`monospace`,fontWeight:600},children:[`Total: `,uo(n.totalCents)]})]}),r&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Loading…`}),i&&(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,String(i)]}),n&&n.categories.length===0&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`No waste detected for this period.`}),n?.categories.map(e=>(0,j.jsx)(B,{cat:e},e.category))]})}var H=20,mo=[`any`,`completed`,`abandoned`],ho={text:{label:`prompt/reply`,bg:L.surfaceRaised,fg:L.textMuted},tool_input:{label:`tool input`,bg:L.accentSoft,fg:L.accent},tool_output:{label:`tool output`,bg:L.positiveSoft,fg:L.positive}};function go(e){return e?new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}):`—`}function _o({kind:e}){let t=ho[e];return(0,j.jsx)(`span`,{style:{fontSize:z.xs,padding:`1px 6px`,borderRadius:_a.sm,background:t.bg,color:t.fg,fontFamily:R.mono,whiteSpace:`nowrap`,flexShrink:0},children:t.label})}function vo({sessionId:e,hit:t}){return(0,j.jsxs)(br,{to:`/session/$id`,params:{id:e},hash:`msg-${t.msgIdx}`,style:{display:`flex`,alignItems:`flex-start`,gap:10,padding:`7px 10px`,textDecoration:`none`,borderRadius:_a.sm,color:L.textMuted},onMouseEnter:e=>e.currentTarget.style.background=L.surfaceRaised,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,j.jsx)(_o,{kind:t.kind}),(0,j.jsx)(`span`,{style:{fontSize:z.base,lineHeight:1.5,color:L.textMuted,minWidth:0,flex:1},dangerouslySetInnerHTML:{__html:t.snippet}}),(0,j.jsxs)(`span`,{style:{color:L.textFaint,fontSize:z.xs,flexShrink:0,fontFamily:R.mono},children:[`#`,t.msgIdx]})]})}var yo={"claude-code":L.accent,codex:L.positive,cursor:L.platformCursor};function bo({group:e}){let t=yo[e.platform]??L.textMuted,n=e.hitCount-e.hits.length;return(0,j.jsxs)(`div`,{style:{border:`1px solid ${L.border}`,borderRadius:_a.md,background:L.surface,marginBottom:12,overflow:`hidden`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:10,padding:`10px 12px`,borderBottom:`1px solid ${L.borderSubtle}`,background:L.surfaceInset,flexWrap:`wrap`},children:[(0,j.jsx)(`span`,{style:{color:L.text,fontWeight:600,fontSize:z.md},children:e.name}),(0,j.jsx)(`span`,{style:{color:t,fontSize:z.xs,fontFamily:R.mono},children:e.platform}),e.project&&e.project!==e.name&&(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.sm},children:e.project}),(0,j.jsx)(`span`,{style:{color:L.textMuted,fontSize:z.sm},children:go(e.startedAt)}),e.lastOutcome&&(0,j.jsx)(`span`,{style:{color:e.lastOutcome===`completed`?L.positive:L.danger,fontSize:z.sm},children:e.lastOutcome}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:z.sm,marginLeft:`auto`},children:[e.hitCount,` hit`,e.hitCount===1?``:`s`]}),(0,j.jsx)(br,{to:`/session/$id`,params:{id:e.sessionId},style:{color:L.accent,textDecoration:`none`,fontSize:z.sm},children:`Replay →`})]}),(0,j.jsxs)(`div`,{style:{padding:`4px 2px`},children:[e.hits.map(t=>(0,j.jsx)(vo,{sessionId:e.sessionId,hit:t},`${e.sessionId}-${t.msgIdx}-${t.kind}`)),n>0&&(0,j.jsxs)(br,{to:`/session/$id`,params:{id:e.sessionId},style:{display:`block`,padding:`6px 10px`,color:L.textFaint,fontSize:z.sm,textDecoration:`none`},children:[`+`,n,` more match`,n===1?``:`es`,` in this session →`]})]})]})}var xo={background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`4px 8px`,borderRadius:_a.sm,fontSize:z.sm,fontFamily:R.mono,cursor:`pointer`};function So(){let[e,t]=(0,_.useState)(``),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(`any`),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(0),m=(0,_.useRef)(null),h=n.trim().length>0,{data:g,isLoading:v,error:y}=I({queryKey:[`search`,n,i,o,u,f],queryFn:()=>Aa({q:n,outcome:i,platform:o||void 0,project:u||void 0,limit:H,offset:f}),enabled:h});function b(e){p(0),r(e)}function x(t){t.preventDefault();let n=e.trim();n&&b(n)}function S(){p(e=>Math.max(0,e-H))}function C(){p(e=>e+H)}let w=g?f+H<g.total:!1,ee=f>0;return _.useEffect(()=>{g&&f>=g.total&&g.total>0&&p(0)},[g,f]),(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:900,margin:`0 auto`},children:[(0,j.jsxs)(`form`,{onSubmit:x,style:{display:`flex`,gap:8,marginBottom:14},children:[(0,j.jsx)(`input`,{ref:m,value:e,onChange:e=>t(e.target.value),placeholder:`Search prompts, replies, tool inputs & outputs…`,style:{flex:1,padding:`8px 12px`,fontSize:z.md,background:L.surface,color:L.text,border:`1px solid ${L.border}`,borderRadius:_a.sm,outline:`none`}}),(0,j.jsx)(`button`,{type:`submit`,style:{padding:`8px 18px`,fontSize:z.md,background:L.accent,color:L.onAccent,border:`none`,borderRadius:_a.sm,cursor:`pointer`},children:`Search`})]}),h&&(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:16,flexWrap:`wrap`},children:[(0,j.jsx)(so,{options:mo,value:i,onChange:e=>{a(e),p(0)}}),(0,j.jsxs)(`select`,{value:o,onChange:e=>{s(e.target.value),p(0)},style:{...xo,color:o?L.text:L.textMuted},children:[(0,j.jsx)(`option`,{value:``,children:`all platforms`}),(0,j.jsx)(`option`,{value:`claude-code`,children:`claude-code`}),(0,j.jsx)(`option`,{value:`codex`,children:`codex`}),(0,j.jsx)(`option`,{value:`cursor`,children:`cursor`})]}),(0,j.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),d(c),p(0)},style:{display:`flex`,gap:6,alignItems:`center`},children:[(0,j.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`filter by project…`,style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`4px 8px`,borderRadius:_a.sm,fontSize:z.sm,fontFamily:R.mono,width:180}}),u&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>{d(``),l(``),p(0)},style:{background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:z.sm},children:`✕ clear`})]})]}),!h&&!v&&(0,j.jsxs)(`div`,{style:{color:L.textMuted,fontSize:z.base,lineHeight:1.7,marginTop:8},children:[(0,j.jsx)(`div`,{style:{marginBottom:12},children:`Full-text search across every prompt, reply, tool input, and tool output in your indexed sessions — your agent's memory. Jump straight to the exact moment a thing was said or run.`}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexWrap:`wrap`},children:[(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.sm},children:`Try:`}),[`database migration`,`rm -rf`,`TODO`,`env var`,`rate limit`].map(e=>(0,j.jsx)(`button`,{onClick:()=>{t(e),b(e)},style:{padding:`3px 10px`,fontSize:z.sm,background:L.surfaceRaised,color:L.accent,border:`1px solid ${L.border}`,borderRadius:_a.pill,cursor:`pointer`},children:e},e))]})]}),v&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Searching…`}),y&&(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,String(y)]}),g&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{style:{color:L.textMuted,fontSize:z.base,marginBottom:12},children:[g.total.toLocaleString(),` hit`,g.total===1?``:`s`,` across`,` `,g.sessionTotal.toLocaleString(),` session`,g.sessionTotal===1?``:`s`,g.total>0&&` · showing ${f+1}–${Math.min(f+H,g.total)}`]}),g.groups.map(e=>(0,j.jsx)(bo,{group:e},e.sessionId)),g.total===0&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`No results found.`}),(ee||w)&&(0,j.jsxs)(`div`,{style:{display:`flex`,gap:12,marginTop:16},children:[ee&&(0,j.jsx)(`button`,{onClick:S,style:{padding:`6px 16px`,fontSize:z.base,background:L.surface,color:L.textMuted,border:`1px solid ${L.border}`,borderRadius:_a.sm,cursor:`pointer`},children:`← Prev`}),w&&(0,j.jsx)(`button`,{onClick:C,style:{padding:`6px 16px`,fontSize:z.base,background:L.surface,color:L.textMuted,border:`1px solid ${L.border}`,borderRadius:_a.sm,cursor:`pointer`},children:`Next →`})]})]})]})}function Co(e){return function(){return e}}var wo=Math.PI,To=2*wo,Eo=1e-6,Do=To-Eo;function Oo(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ko(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Oo;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Ao=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Oo:ko(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Eo)if(!(Math.abs(u*s-c*l)>Eo)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((wo-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Eo&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Eo||Math.abs(this._y1-l)>Eo)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%To+To),d>Do?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Eo&&this._append`A${n},${n},0,${+(d>=wo)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function jo(){return new Ao}jo.prototype=Ao.prototype;function Mo(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Ao(t)}Array.prototype.slice;function No(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Po(e){this._context=e}Po.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Fo(e){return new Po(e)}function Io(e){return e[0]}function Lo(e){return e[1]}function Ro(e,t){var n=Co(!0),r=null,i=Fo,a=null,o=Mo(s);e=typeof e==`function`?e:e===void 0?Io:Co(e),t=typeof t==`function`?t:t===void 0?Lo:Co(t);function s(s){var c,l=(s=No(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Co(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Co(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Co(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}var zo=80,Bo={top:10,bottom:15,left:8,right:8},Vo=65;function Ho(e,t,n){if(n<=1)return 0;let r=Math.round(e/t*(n-1));return Math.max(0,Math.min(n-1,r))}function Uo({timeline:e,onSeek:t,currentIdx:n}){let r=(0,_.useRef)(null),[i,a]=(0,_.useState)(600),o=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0]?.contentRect.width;t&&a(t)});return t.observe(e),a(e.getBoundingClientRect().width||600),()=>t.disconnect()},[]);let s=i-Bo.left-Bo.right,c=``;if(e.length>1){let t=e.reduce((e,t)=>Math.max(e,t.cumulativeCostCents),1),n=e.map(n=>[Bo.left+n.msgIdx/(e.length-1)*s,Bo.top+(1-n.cumulativeCostCents/t)*(Vo-Bo.top-10)]);c=Ro().x(e=>e[0]).y(e=>e[1])(n)??``}let l=e.length>1?Bo.left+n/(e.length-1)*s:Bo.left,u=Math.max(2,Math.floor(s/100)),d=[];for(let e=0;e<=u;e++)d.push(Bo.left+e/u*s);let f=(0,_.useCallback)(e=>{let t=r.current?.getBoundingClientRect();return t?e.clientX-t.left-Bo.left:0},[]);function p(n){o.current=!0,t(Ho(f(n),s,e.length))}function m(n){o.current&&t(Ho(f(n),s,e.length))}function h(){o.current=!1}return(0,j.jsxs)(`svg`,{ref:r,width:`100%`,height:zo,style:{display:`block`,background:L.surface,cursor:`pointer`,userSelect:`none`},onMouseDown:p,onMouseMove:m,onMouseUp:h,onMouseLeave:h,children:[(0,j.jsx)(`line`,{x1:Bo.left,x2:i-Bo.right,y1:Vo,y2:Vo,stroke:L.border,strokeWidth:1}),d.map((e,t)=>(0,j.jsx)(`line`,{x1:e,x2:e,y1:Vo,y2:Vo+4,stroke:L.borderStrong,strokeWidth:1},t)),c&&(0,j.jsx)(`path`,{d:c,fill:`none`,stroke:L.positive,strokeWidth:1.5}),(0,j.jsx)(`line`,{x1:l,x2:l,y1:0,y2:Vo+4,stroke:L.text,strokeWidth:2}),(0,j.jsx)(`circle`,{cx:l,cy:Vo,r:4,fill:L.text}),(0,j.jsxs)(`text`,{x:Math.min(l+4,i-50),y:zo-2,fill:L.textMuted,fontSize:10,fontFamily:`monospace`,children:[`msg `,n]})]})}function Wo({sessionId:e,onClose:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let t=!1;return qa(e).then(e=>{t||r(e)}).catch(e=>{t||a(e.message)}),()=>{t=!0}},[e]),(0,_.useEffect)(()=>{function e(e){e.key===`Escape`&&t()}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);async function c(){if(n)try{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),2e3)}catch{let e=document.createElement(`textarea`);e.value=n,document.body.appendChild(e),e.select();try{document.execCommand(`copy`)}catch{}document.body.removeChild(e),s(!0),setTimeout(()=>s(!1),2e3)}}return(0,j.jsx)(`div`,{onClick:t,style:{position:`fixed`,inset:0,background:`rgba(0, 0, 0, 0.6)`,zIndex:200,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,j.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:{background:L.surface,border:`1px solid ${L.border}`,borderRadius:6,width:`min(800px, 90vw)`,maxHeight:`80vh`,display:`flex`,flexDirection:`column`,color:L.text,fontFamily:`ui-monospace, monospace`},children:[(0,j.jsxs)(`div`,{style:{padding:`12px 16px`,borderBottom:`1px solid ${L.border}`,display:`flex`,alignItems:`center`,gap:12},children:[(0,j.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Continue elsewhere`}),(0,j.jsx)(`span`,{style:{fontSize:11,color:L.textMuted},children:`Paste this into any other agent (Codex, Cursor, ChatGPT…) to warm-start with prior context.`}),(0,j.jsx)(`span`,{style:{marginLeft:`auto`,fontSize:11,color:L.textMuted},children:n?`${n.length.toLocaleString()} chars`:``}),(0,j.jsx)(`button`,{onClick:t,style:{background:`transparent`,border:`1px solid ${L.textFaint}`,color:L.textMuted,padding:`2px 8px`,fontSize:12,cursor:`pointer`,borderRadius:3},children:`✕`})]}),(0,j.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:16},children:i?(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,i]}):n==null?(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Loading primer…`}):(0,j.jsx)(`pre`,{style:{margin:0,whiteSpace:`pre-wrap`,fontSize:12,color:L.text,lineHeight:1.5},children:n})}),(0,j.jsxs)(`div`,{style:{padding:`10px 16px`,borderTop:`1px solid ${L.border}`,display:`flex`,alignItems:`center`,gap:12},children:[(0,j.jsx)(`span`,{style:{fontSize:11,color:L.textMuted},children:`Warm-start, not exact resume — receiving agent does not have prior tool-call output detail.`}),(0,j.jsx)(`button`,{onClick:c,disabled:!n,style:{marginLeft:`auto`,background:o?L.positiveSoft:L.accentSoft,border:`1px solid ${L.borderStrong}`,color:o?L.positive:L.accent,padding:`6px 14px`,fontSize:12,cursor:n?`pointer`:`not-allowed`,borderRadius:3,fontFamily:`inherit`},children:o?`✓ Copied`:`Copy to clipboard`})]})]})})}var Go={tool_dump:`file dump`,secret:`secret`,pii:`PII`,plan_file:`plan file`},Ko={tool_dump:L.warning,secret:L.danger,pii:L.warning,plan_file:L.platformCursor};function qo(e,t){return e.kind===`plan_file`?`plan-file`:`${e.uuid}:${e.kind}:${t}`}function Jo({sessionId:e,onClose:t}){let[n,r]=(0,_.useState)(null),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(new Set);(0,_.useEffect)(()=>{let t=!1;return Ba(e).then(e=>{if(t)return;r(e);let n=new Set;e.residualFlags.forEach((e,t)=>{e.defaultExclude&&n.add(qo(e,t))}),s(n)}).catch(e=>{t||a(e.message)}),()=>{t=!0}},[e]),(0,_.useEffect)(()=>{function e(e){e.key===`Escape`&&t()}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);function c(e){s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function l(){if(!n)return za(e);let t=[],r=!0;return n.residualFlags.forEach((e,n)=>{let i=qo(e,n);o.has(i)&&(e.kind===`plan_file`?r=!1:e.uuid&&t.push(e.uuid))}),za(e,{redact:t,includePlan:r})}let u=n?.scrubReport,d=u?Object.values(u.metaRecordsDropped).reduce((e,t)=>e+t,0):0;return(0,j.jsx)(`div`,{onClick:t,style:Yo,children:(0,j.jsxs)(`div`,{onClick:e=>e.stopPropagation(),style:Xo,children:[(0,j.jsxs)(`div`,{style:Zo,children:[(0,j.jsx)(`span`,{style:{fontSize:13,fontWeight:600},children:`Review before sharing`}),(0,j.jsx)(`span`,{style:{fontSize:11,color:L.textMuted},children:`Claude Code machine-state (file backups, titles, prompts) is stripped automatically. Review anything left below.`}),(0,j.jsx)(`button`,{onClick:t,style:$o,children:`✕`})]}),(0,j.jsx)(`div`,{style:{flex:1,overflow:`auto`,padding:16},children:i?(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,i]}):n?(0,j.jsxs)(j.Fragment,{children:[n.canScrub?(0,j.jsxs)(`div`,{style:es,children:[(0,j.jsx)(`span`,{style:{color:L.positive},children:`✓ Scrubbed`}),` `,`removed `,(0,j.jsx)(`b`,{children:u?.systemReminderSpansStripped??0}),` injected context span(s)`,` `,`and `,(0,j.jsx)(`b`,{children:d}),` meta record(s).`]}):(0,j.jsxs)(`div`,{style:{...es,borderColor:L.borderStrong,color:L.warning},children:[`⚠ Scrubbing isn't supported for `,n.platform,` yet — review this session manually before sharing.`]}),n.residualFlags.length===0?(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:12,marginTop:12},children:`No residual concerns detected.`}):(0,j.jsxs)(`div`,{style:{marginTop:14},children:[(0,j.jsxs)(`div`,{style:{fontSize:11,color:L.textMuted,marginBottom:8},children:[n.residualFlags.length,` item(s) to review — checked items are excluded from the bundle:`]}),n.residualFlags.map((e,t)=>{let n=qo(e,t);return(0,j.jsxs)(`label`,{style:ts,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:o.has(n),onChange:()=>c(n),style:{marginTop:3}}),(0,j.jsxs)(`span`,{style:{flex:1},children:[(0,j.jsx)(`span`,{style:{...ns,color:Ko[e.kind],borderColor:Ko[e.kind]},children:Go[e.kind]}),(0,j.jsx)(`span`,{style:{color:L.text,fontSize:12},children:e.reason}),(0,j.jsxs)(`span`,{style:{color:L.textFaint,fontSize:11,marginLeft:6},children:[`(`,e.sizeBytes.toLocaleString(),` B)`]}),e.snippet&&(0,j.jsxs)(`div`,{style:rs,children:[e.snippet,e.snippet.length>=200?`…`:``]})]})]},n)})]})]}):(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Scanning session…`})}),(0,j.jsxs)(`div`,{style:Qo,children:[(0,j.jsx)(`span`,{style:{fontSize:11,color:L.textMuted},children:`Excluded items are redacted/omitted; the rest is bundled for native resume.`}),(0,j.jsx)(`a`,{href:n?l():`#`,onClick:()=>{n&&setTimeout(t,100)},style:{marginLeft:`auto`,background:n?L.accentSoft:L.surfaceRaised,border:`1px solid ${L.border}`,color:L.accent,padding:`6px 14px`,fontSize:12,borderRadius:3,textDecoration:`none`,pointerEvents:n?`auto`:`none`},children:`Download bundle ↓`})]})]})})}var Yo={position:`fixed`,inset:0,background:`rgba(0,0,0,0.6)`,zIndex:200,display:`flex`,alignItems:`center`,justifyContent:`center`},Xo={background:L.surface,border:`1px solid ${L.border}`,borderRadius:6,width:`min(720px, 90vw)`,maxHeight:`80vh`,display:`flex`,flexDirection:`column`,color:L.text,fontFamily:`ui-monospace, monospace`},Zo={padding:`12px 16px`,borderBottom:`1px solid ${L.border}`,display:`flex`,alignItems:`center`,gap:12},Qo={padding:`10px 16px`,borderTop:`1px solid ${L.border}`,display:`flex`,alignItems:`center`,gap:12},$o={marginLeft:`auto`,background:`transparent`,border:`1px solid ${L.textFaint}`,color:L.textMuted,padding:`2px 8px`,fontSize:12,cursor:`pointer`,borderRadius:3},es={border:`1px solid ${L.border}`,background:L.positiveSoft,borderRadius:4,padding:`8px 12px`,fontSize:12,color:L.textMuted},ts={display:`flex`,gap:8,alignItems:`flex-start`,padding:`8px 0`,borderBottom:`1px solid ${L.border}`,cursor:`pointer`},ns={fontSize:10,fontWeight:600,border:`1px solid`,borderRadius:3,padding:`1px 5px`,marginRight:8,textTransform:`uppercase`},rs={marginTop:4,fontSize:11,color:L.textMuted,background:L.surfaceInset,borderRadius:3,padding:`4px 6px`,whiteSpace:`pre-wrap`,wordBreak:`break-all`,maxHeight:60,overflow:`hidden`};function is({tags:e,suggestions:t,onChange:n,disabled:r}){let[i,a]=(0,_.useState)(``),o=`tag-suggestions`;function s(t){let r=t.trim().toLowerCase().replace(/\s+/g,` `);if(!r||e.includes(r)){a(``);return}n([...e,r]),a(``)}function c(t){n(e.filter(e=>e!==t))}return(0,j.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,flexWrap:`wrap`},children:[e.map(e=>(0,j.jsxs)(`span`,{style:as,children:[e,!r&&(0,j.jsx)(`button`,{onClick:()=>c(e),title:`remove tag`,style:os,children:`✕`})]},e)),!r&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),s(i)):t.key===`Backspace`&&i===``&&e.length&&c(e[e.length-1])},list:o,placeholder:`+ tag`,style:ss}),(0,j.jsx)(`datalist`,{id:o,children:t.filter(t=>!e.includes(t.tag)).map(e=>(0,j.jsx)(`option`,{value:e.tag,children:`${e.tag} (${e.count})`},e.tag))})]})]})}var as={display:`inline-flex`,alignItems:`center`,gap:4,background:L.accentSoft,color:L.accent,border:`1px solid ${L.borderSubtle}`,borderRadius:10,padding:`1px 8px`,fontSize:11,whiteSpace:`nowrap`},os={background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:10,padding:0,lineHeight:1},ss={background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`2px 6px`,borderRadius:10,fontSize:11,width:70,fontFamily:`ui-monospace, monospace`};function cs({sessionId:e,name:t,customName:n,tags:r}){let i=Xi(),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(n??t),l=I({queryKey:[`tags`],queryFn:Va});function u(){i.invalidateQueries({queryKey:[`session`,e]}),i.invalidateQueries({queryKey:[`sessions`]}),i.invalidateQueries({queryKey:[`tags`]})}let d=da({mutationFn:t=>Ha(e,t),onSuccess:u}),f=da({mutationFn:t=>Ua(e,t),onSuccess:u});function p(){o(!1);let e=s.trim();d.mutate(e.length?e:null)}return(0,j.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[a?(0,j.jsx)(`input`,{autoFocus:!0,value:s,onChange:e=>c(e.target.value),onBlur:p,onKeyDown:e=>{e.key===`Enter`?p():e.key===`Escape`&&(c(n??t),o(!1))},placeholder:t,style:ls}):(0,j.jsxs)(`span`,{onClick:()=>{c(n??t),o(!0)},title:`Click to rename (empty reverts to Claude's name)`,style:{color:L.text,fontWeight:600,fontSize:14,cursor:`text`},children:[t,n==null&&(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:11,marginLeft:6},children:`✎`})]}),(0,j.jsx)(is,{tags:r,suggestions:l.data??[],onChange:e=>f.mutate(e),disabled:f.isPending})]})}var ls={background:L.border,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`3px 8px`,borderRadius:4,fontSize:14,fontWeight:600,fontFamily:`ui-monospace, monospace`,minWidth:220};function us(e){let t=e.trim();return t?/^(#|\/|\.\/|\.\.\/)/.test(t)||/^https?:\/\//i.test(t)||/^mailto:/i.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?null:t:null}var ds={fontFamily:R.mono,fontSize:`0.9em`,background:L.surfaceInset,padding:`0.5px 4px`,borderRadius:_a.sm,border:`1px solid ${L.borderSubtle}`};function fs(e,t){let n=[],r=e,i=0,a=/(`+)([\s\S]*?)\1|\[([^\]]*)\]\(([^)\s]*(?:\s+"[^"]*")?)\)|(\*\*\*|___)([\s\S]+?)\5|(\*\*|__)([\s\S]+?)\7|(\*|_)([\s\S]+?)\9/;for(;r.length>0;){let e=a.exec(r);if(!e){n.push(r);break}e.index>0&&n.push(r.slice(0,e.index));let o=`${t}-i${i++}`;if(e[1]!=null)n.push((0,j.jsx)(`code`,{style:ds,children:e[2]},o));else if(e[3]!=null){let t=us((e[4]||``).replace(/\s+"[^"]*"$/,``)),r=fs(e[3],o);t?n.push((0,j.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,style:{color:L.accent,textDecoration:`underline`},children:r},o)):n.push((0,j.jsx)(_.Fragment,{children:r},o))}else e[5]==null?e[7]==null?e[9]!=null&&n.push((0,j.jsx)(`em`,{style:{fontStyle:`italic`},children:fs(e[10],o)},o)):n.push((0,j.jsx)(`strong`,{style:{fontWeight:ya.bold},children:fs(e[8],o)},o)):n.push((0,j.jsx)(`strong`,{style:{fontWeight:ya.bold,fontStyle:`italic`},children:fs(e[6],o)},o));r=r.slice(e.index+e[0].length)}return n}var ps=/^\s*([-*_])(\s*\1){2,}\s*$/,ms=/^(#{1,6})\s+(.*)$/,hs=/^(\s*)([-*+])\s+(.*)$/,gs=/^(\s*)(\d+)[.)]\s+(.*)$/,_s=/^\s*>\s?(.*)$/;function vs(e){let t=e.replace(/\r\n?/g,`
|
|
31
|
+
`).split(`
|
|
32
|
+
`),n=[],r=0;for(;r<t.length;){let e=t[r],i=/^\s*(`{3,}|~{3,})\s*([^\s`~]*)/.exec(e);if(i){let e=i[1][0],a=i[1].length,o=i[2]||``,s=[];for(r++;r<t.length;){if(RegExp(`^\\s*${e==="`"?"`":`~`}{${a},}\\s*$`).test(t[r])){r++;break}s.push(t[r]),r++}n.push({kind:`code`,lang:o,content:s.join(`
|
|
33
|
+
`)});continue}if(!e.trim()){r++;continue}if(ps.test(e)){n.push({kind:`rule`}),r++;continue}let a=ms.exec(e);if(a){n.push({kind:`heading`,level:a[1].length,text:a[2].trim()}),r++;continue}if(_s.test(e)){let e=[];for(;r<t.length&&_s.test(t[r]);)e.push(_s.exec(t[r])[1]),r++;n.push({kind:`quote`,lines:e});continue}if(hs.test(e)||gs.test(e)){let e=[],i=!1;for(;r<t.length;){let n=hs.exec(t[r]),a=gs.exec(t[r]);if(n)e.push({text:n[3],indent:n[1].length,ordered:!1}),r++;else if(a)i=!0,e.push({text:a[3],indent:a[1].length,ordered:!0}),r++;else if(t[r].trim()&&/^\s{2,}/.test(t[r])&&e.length>0)e[e.length-1].text+=`
|
|
34
|
+
`+t[r].trim(),r++;else break}n.push({kind:`list`,ordered:i,items:e});continue}let o=[];for(;r<t.length;){let e=t[r];if(!e.trim()||ps.test(e)||ms.test(e)||_s.test(e)||hs.test(e)||gs.test(e)||/^\s*(`{3,}|~{3,})/.test(e))break;o.push(e),r++}n.push({kind:`para`,text:o.join(`
|
|
35
|
+
`)})}return n}var ys={1:z.lg,2:z.md,3:z.base};function bs(e,t,n){let r=t?`ol`:`ul`,i=Math.min(...e.map(e=>e.indent)),a=[],o=0;for(;o<e.length;){let t=e[o];if(t.indent>i){let t=[];for(;o<e.length&&e[o].indent>i;)t.push(e[o]),o++;let r=bs(t,t[0].ordered,`${n}-n${o}`),s=a[a.length-1];_.isValidElement(s)?a[a.length-1]=_.cloneElement(s,{},s.props.children,r):a.push(r);continue}a.push((0,j.jsx)(`li`,{style:{margin:`2px 0`},children:fs(t.text,`${n}-li${o}`)},`${n}-li${o}`)),o++}return(0,j.jsx)(r,{style:{margin:`4px 0`,paddingLeft:ga[5],color:L.text,lineHeight:1.5},children:a},n)}function xs(e,t){switch(e.kind){case`code`:return(0,j.jsxs)(`pre`,{style:{background:L.surfaceInset,border:`1px solid ${L.borderSubtle}`,borderRadius:_a.sm,padding:ga[3],margin:`6px 0`,overflowX:`auto`,fontFamily:R.mono,fontSize:z.sm,lineHeight:1.5,color:L.text,whiteSpace:`pre`},children:[e.lang?(0,j.jsx)(`div`,{style:{fontFamily:R.mono,fontSize:z.xs,color:L.textFaint,marginBottom:ga[1],userSelect:`none`},children:e.lang}):null,(0,j.jsx)(`code`,{style:{fontFamily:R.mono},children:e.content})]},t);case`heading`:{let n=Math.min(e.level,3);return(0,j.jsx)(`div`,{style:{fontSize:ys[n]??z.base,fontWeight:n===1?ya.bold:ya.semibold,color:L.text,margin:n===1?`10px 0 4px`:`8px 0 3px`,lineHeight:1.3},children:fs(e.text,t)},t)}case`quote`:return(0,j.jsx)(`blockquote`,{style:{borderLeft:`3px solid ${L.borderStrong}`,margin:`6px 0`,padding:`2px 0 2px ${ga[3]}px`,color:L.textMuted},children:vs(e.lines.join(`
|
|
36
|
+
`)).map((e,n)=>xs(e,`${t}-q${n}`))},t);case`rule`:return(0,j.jsx)(`hr`,{style:{border:`none`,borderTop:`1px solid ${L.border}`,margin:`10px 0`}},t);case`list`:return bs(e.items,e.ordered,t);case`para`:return(0,j.jsx)(`p`,{style:{color:L.text,margin:`4px 0`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,lineHeight:1.5},children:fs(e.text,t)},t)}}function Ss({text:e}){let t;try{t=vs(e??``)}catch{return(0,j.jsx)(`div`,{style:{color:L.text,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:e})}return(0,j.jsx)(`div`,{style:{color:L.text,fontSize:z.base},children:t.map((e,t)=>xs(e,`b${t}`))})}function Cs(e){return(e/100).toLocaleString(`en-US`,{style:`currency`,currency:`USD`})}function ws(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var Ts={plan_finalized:{icon:`◆`,label:`plan`,accent:L.accent},plan_reopened:{icon:`◇`,label:`plan revised`,accent:L.accent},model_change:{icon:`⇄`,label:`model`,accent:L.platformCursor},permission_change:{icon:`⚿`,label:`permission`,accent:L.warning}};function Es({decisions:e,onSeek:t}){return!e||e.length===0?null:(0,j.jsxs)(`div`,{style:{flexShrink:0,display:`flex`,alignItems:`center`,gap:8,padding:`8px 16px`,borderBottom:`1px solid ${L.border}`,background:L.surface,overflowX:`auto`},children:[(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.xs,fontFamily:R.sans,textTransform:`uppercase`,letterSpacing:`0.06em`,flexShrink:0},children:`decisions`}),e.map((e,n)=>{let r=Ts[e.kind];return(0,j.jsxs)(`button`,{onClick:()=>t(e.msgIdx),className:`vy-int`,title:`Jump to message ${e.msgIdx}`,style:{display:`flex`,alignItems:`baseline`,gap:6,flexShrink:0,background:L.surfaceInset,border:`1px solid ${L.border}`,borderLeft:`2px solid ${r.accent}`,borderRadius:4,padding:`3px 8px`,cursor:`pointer`,fontFamily:R.mono,fontSize:z.xs,color:L.text},children:[(0,j.jsx)(`span`,{style:{color:r.accent,fontWeight:ya.bold},children:r.icon}),e.kind===`permission_change`&&(0,j.jsx)(`span`,{style:{color:r.accent,fontWeight:ya.semibold,textTransform:`uppercase`,letterSpacing:`0.04em`,fontSize:z.xs},children:r.label}),(0,j.jsx)(`span`,{style:{color:L.textMuted},children:e.detail}),e.tokensInSpan!=null&&e.tokensInSpan>0&&(0,j.jsxs)(`span`,{style:{color:L.textFaint},children:[`· `,ws(e.tokensInSpan),` tok`]})]},`${e.msgIdx}-${e.kind}-${n}`)})]})}function Ds(e){return e?new Date(e).toLocaleString():`—`}function Os(e){if(!e||typeof e!=`object`)return``;let t=e;for(let e of[`command`,`file_path`,`path`,`pattern`,`query`,`url`,`description`])if(typeof t[e]==`string`)return t[e];let n=Object.keys(t);return n.length?`${n.length} param${n.length===1?``:`s`}`:``}function ks({accent:e,label:t,summary:n,detail:r,defaultOpen:i=!1,danger:a=!1}){let[o,s]=(0,_.useState)(i);return(0,j.jsxs)(`div`,{style:{display:`block`,margin:`3px 0`,borderLeft:`2px solid ${a?L.danger:e}`,paddingLeft:8},children:[(0,j.jsxs)(`button`,{onClick:()=>s(e=>!e),className:`vy-int`,style:{background:`transparent`,border:`none`,padding:0,cursor:`pointer`,textAlign:`left`,display:`flex`,alignItems:`baseline`,gap:6,width:`100%`,fontFamily:R.mono,fontSize:z.sm,color:a?L.danger:e},children:[(0,j.jsx)(`span`,{style:{color:L.textFaint},children:o?`▾`:`▸`}),(0,j.jsx)(`span`,{style:{fontWeight:ya.semibold},children:t}),a&&(0,j.jsx)(`span`,{style:{background:L.danger,color:L.bg,fontWeight:ya.bold,textTransform:`uppercase`,letterSpacing:`0.04em`,fontSize:z.xs,padding:`0 5px`,borderRadius:3},children:`error`}),n&&(0,j.jsx)(`span`,{style:{color:L.textMuted,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:n})]}),o&&r&&(0,j.jsx)(`pre`,{style:{margin:`4px 0 0`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontFamily:R.mono,fontSize:z.xs,color:L.textMuted,background:L.surfaceInset,padding:8,borderRadius:4,maxHeight:360,overflow:`auto`},children:r})]})}function As(e,t=90){return e.replace(/\s+/g,` `).trim().slice(0,t)}function js(e){let t;try{t=JSON.parse(e)}catch{return e.trim().length>0}let n=t;return t&&typeof t==`object`&&!Array.isArray(t)&&`content`in t&&(n=t.content),typeof n==`string`?n.trim().length>0:Array.isArray(n)?n.some(e=>e.type===`text`?!!e.text?.trim():e.type===`thinking`?!!e.thinking?.trim():e.type===`tool_use`||e.type===`tool_result`):!0}function Ms(e,t){if(e.type===`text`)return e.text?.trim()?(0,j.jsx)(`div`,{style:{margin:`2px 0`},children:(0,j.jsx)(Ss,{text:e.text})},t):null;if(e.type===`thinking`)return e.thinking?.trim()?(0,j.jsx)(ks,{accent:L.textFaint,label:`thinking`,summary:As(e.thinking),detail:e.thinking},t):null;if(e.type===`tool_use`)return(0,j.jsx)(ks,{accent:L.platformCursor,label:e.name,summary:Os(e.input),detail:JSON.stringify(e.input,null,2)},t);if(e.type===`tool_result`){let n=typeof e.content==`string`?e.content:JSON.stringify(e.content,null,2);return(0,j.jsx)(ks,{accent:e.is_error?L.danger:L.positive,label:`result`,summary:As(n),detail:n,danger:!!e.is_error},t)}return null}function Ns(e){let t;try{t=JSON.parse(e)}catch{return e.trim().length>0}let n=t;return t&&typeof t==`object`&&!Array.isArray(t)&&`content`in t&&(n=t.content),typeof n==`string`?n.trim().length>0:Array.isArray(n)?n.some(e=>e.type===`text`&&!!e.text?.trim()):!1}function Ps(e){let t;try{t=JSON.parse(e)}catch{return!1}let n=t;return t&&typeof t==`object`&&!Array.isArray(t)&&`content`in t&&(n=t.content),Array.isArray(n)?n.some(e=>e.type===`tool_use`||e.type===`tool_result`):!1}function Fs({contentJson:e}){let t;try{t=JSON.parse(e)}catch{return(0,j.jsx)(`span`,{style:{color:L.text,whiteSpace:`pre-wrap`},children:e})}let n=t;if(t&&typeof t==`object`&&!Array.isArray(t)&&`content`in t&&(n=t.content),typeof n==`string`)return n.trim()?(0,j.jsx)(Ss,{text:n}):(0,j.jsx)(`span`,{style:{color:L.textFaint,fontStyle:`italic`},children:`(empty)`});if(Array.isArray(n)){let e=n.map((e,t)=>Ms(e,t)).filter(Boolean);return e.length===0?(0,j.jsx)(`span`,{style:{color:L.textFaint,fontStyle:`italic`},children:`(no displayable content)`}):(0,j.jsx)(j.Fragment,{children:e})}let r=JSON.stringify(n,null,2);return(0,j.jsx)(ks,{accent:L.textFaint,label:`record`,summary:As(r),detail:r})}var Is={user:L.accent,assistant:L.platformCursor,system:L.textMuted};function Ls({msg:e,highlight:t}){let n=Is[e.role]??L.text,r=e.role===`user`,i=e.inputTokens!=null||e.outputTokens!=null;return(0,j.jsxs)(`div`,{id:`msg-${e.idx}`,style:{padding:`12px 16px`,borderBottom:`1px solid ${L.border}`,borderLeft:r?`2px solid ${L.accent}`:`2px solid transparent`,background:t?L.accentSoft:r?L.surface:`transparent`,transition:`background 0.3s`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:6},children:[(0,j.jsx)(`span`,{style:{fontSize:z.xs,fontWeight:ya.bold,color:n,textTransform:`uppercase`,letterSpacing:`0.06em`,fontFamily:R.sans},children:e.role}),(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.xs,fontFamily:R.mono},children:Ds(e.ts)}),e.model&&(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.xs,fontFamily:R.mono},children:e.model}),i&&(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,color:L.textFaint,fontSize:z.xs,fontFamily:R.mono},children:[e.inputTokens!=null&&`in:${e.inputTokens} `,e.outputTokens!=null&&`out:${e.outputTokens} `,e.cacheReadTokens!=null&&e.cacheReadTokens>0&&`hit:${e.cacheReadTokens}`]})]}),(0,j.jsx)(`div`,{style:{fontSize:z.base,lineHeight:1.6,paddingLeft:2},children:(0,j.jsx)(Fs,{contentJson:e.contentJson})})]})}var Rs=[`all`,`prompts`,`tools`];function zs(){let{id:e}=ir({from:`/session/$id`}),[t,n]=(0,_.useState)(0),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(`all`),{data:l,isLoading:u,error:d}=I({queryKey:[`session`,e],queryFn:()=>Na(e)}),f=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(!l||f.current)return;f.current=!0;let e=window.location.hash.match(/^#msg-(\d+)$/);if(e){let t=Math.max(0,Math.min(parseInt(e[1],10),l.messages.length-1));n(t);let r=setTimeout(()=>{document.getElementById(`msg-${t}`)?.scrollIntoView({behavior:`smooth`,block:`center`})},100);return()=>clearTimeout(r)}},[l]);function p(e){n(e),document.getElementById(`msg-${e}`)?.scrollIntoView({behavior:`smooth`,block:`center`})}if(u)return(0,j.jsx)(`div`,{style:{padding:24,color:L.textMuted},children:`Loading session…`});if(d)return(0,j.jsxs)(`div`,{style:{padding:24,color:L.danger},children:[`Error: `,String(d)]});if(!l)return null;let{session:m,messages:h,timeline:g,decisions:v}=l,y=h.filter(e=>js(e.contentJson)),b=s===`prompts`?y.filter(e=>e.role===`user`&&Ns(e.contentJson)):s===`tools`?y.filter(e=>Ps(e.contentJson)):y;return(0,j.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,height:`calc(100vh - 44px)`},children:[(0,j.jsxs)(`div`,{style:{padding:`10px 16px`,background:L.surface,borderBottom:`1px solid ${L.border}`,display:`flex`,gap:20,alignItems:`center`,flexShrink:0,fontSize:12,fontFamily:`monospace`,flexWrap:`wrap`},children:[(0,j.jsx)(cs,{sessionId:m.id,name:m.name,customName:m.customName,tags:m.tags},m.id),(0,j.jsx)(`span`,{style:{color:L.textMuted},children:Ds(m.startedAt)}),m.endedAt&&(0,j.jsxs)(`span`,{style:{color:L.textMuted},children:[`→ `,Ds(m.endedAt)]}),(0,j.jsx)(`span`,{style:{color:L.danger},children:Cs(m.totalCostCents)}),(0,j.jsxs)(`span`,{style:{color:L.textFaint},children:[m.messageCount,` messages`]}),m.lastOutcome&&(0,j.jsxs)(`span`,{style:{color:L.textMuted},children:[`outcome: `,m.lastOutcome]}),(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,display:`flex`,gap:8},children:[m.platform!==`cursor`&&(0,j.jsx)(`button`,{onClick:()=>o(!0),title:`Review & download a .vyasa bundle (Claude Code machine-state stripped; you confirm what's left)`,style:{background:L.accentSoft,border:`1px solid ${L.borderStrong}`,color:L.accent,padding:`4px 10px`,fontSize:11,borderRadius:3,cursor:`pointer`,fontFamily:`inherit`},children:`Hand off ↗`}),(0,j.jsx)(`button`,{onClick:()=>i(!0),title:`Copy a primer prompt to paste into any other agent (warm-start, not exact resume)`,style:{background:`transparent`,border:`1px solid ${L.border}`,color:L.textMuted,padding:`4px 10px`,fontSize:11,cursor:`pointer`,borderRadius:3,fontFamily:`inherit`},children:`Continue elsewhere ⎘`})]})]}),r&&(0,j.jsx)(Wo,{sessionId:m.id,onClose:()=>i(!1)}),a&&(0,j.jsx)(Jo,{sessionId:m.id,onClose:()=>o(!1)}),g.length>0&&(0,j.jsx)(`div`,{style:{flexShrink:0},children:(0,j.jsx)(Uo,{timeline:g,onSeek:p,currentIdx:t})}),(0,j.jsx)(Es,{decisions:v,onSeek:p}),(0,j.jsxs)(`div`,{style:{flexShrink:0,display:`flex`,alignItems:`center`,gap:10,padding:`8px 16px`,borderBottom:`1px solid ${L.border}`,background:L.bg},children:[(0,j.jsx)(so,{options:Rs,value:s,onChange:c,render:e=>e===`all`?`All`:e===`prompts`?`My prompts`:`Tools`}),(0,j.jsxs)(`span`,{style:{color:L.textFaint,fontSize:z.xs,fontFamily:R.mono},children:[b.length,` of `,h.length,` shown`]})]}),(0,j.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:b.length===0?(0,j.jsx)(`div`,{style:{padding:24,color:L.textMuted},children:`No messages match this filter.`}):b.map(e=>(0,j.jsx)(Ls,{msg:e,highlight:e.idx===t},e.id))})]})}function Bs(e){let t=e.errorCount??0,n=[];return t>0?(n.push(t===1?`1 tool error`:`${t} tool errors`),{status:`error`,errorCount:t,reasons:n}):e.lastOutcome===`abandoned`?(n.push(`abandoned`),{status:`warn`,errorCount:t,reasons:n}):{status:`clean`,errorCount:t,reasons:n}}var Vs=50;function Hs(e){return(e/100).toLocaleString(`en-US`,{style:`currency`,currency:`USD`})}function Us(e){if(e==null)return`—`;let t=Math.floor(e/6e4);return t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function Ws(e){return e?new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}):`—`}function Gs(e){let t=e.totalInputTokens+e.totalCacheRead,n=t===0?0:Math.round(e.totalCacheRead/t*100);return`in:${(e.totalInputTokens/1e3).toFixed(1)}k out:${(e.totalOutputTokens/1e3).toFixed(1)}k cache:${n}%`}function Ks(){return(0,j.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 16 16`,"aria-hidden":`true`,style:{display:`block`},children:(0,j.jsx)(`path`,{d:`M8 1 L9 6 L14 4 L10 8 L14 12 L9 10 L8 15 L7 10 L2 12 L6 8 L2 4 L7 6 Z`,fill:`currentColor`})})}function qs(){return(0,j.jsxs)(`svg`,{width:12,height:12,viewBox:`0 0 16 16`,"aria-hidden":`true`,style:{display:`block`},children:[(0,j.jsx)(`path`,{d:`M8 1.5 L13.5 4.75 L13.5 11.25 L8 14.5 L2.5 11.25 L2.5 4.75 Z`,fill:`none`,stroke:`currentColor`,strokeWidth:1.4,strokeLinejoin:`round`}),(0,j.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.9`,fill:`currentColor`})]})}function Js(){return(0,j.jsx)(`svg`,{width:12,height:12,viewBox:`0 0 16 16`,"aria-hidden":`true`,style:{display:`block`},children:(0,j.jsx)(`path`,{d:`M3 1.5 L13 8 L8.4 8.6 L11.2 13 L9 14.2 L6.2 9.8 L3 13 Z`,fill:`currentColor`})})}var Ys={"claude-code":{bg:L.accentSoft,fg:L.platformClaude,label:`Claude`,Glyph:Ks},codex:{bg:L.positiveSoft,fg:L.platformCodex,label:`Codex`,Glyph:qs},cursor:{bg:L.surfaceRaised,fg:L.platformCursor,label:`Cursor`,Glyph:Js}};function Xs({platform:e}){let t=Ys[e]??Ys[`claude-code`],{Glyph:n}=t;return(0,j.jsxs)(`span`,{title:e,style:{display:`inline-flex`,alignItems:`center`,gap:4,padding:`2px 7px 2px 6px`,borderRadius:_a.pill,background:t.bg,color:t.fg,border:`1px solid ${L.border}`,fontFamily:R.sans,fontSize:11,fontWeight:600,lineHeight:1,letterSpacing:`0.01em`,whiteSpace:`nowrap`,flexShrink:0,verticalAlign:`middle`},children:[(0,j.jsx)(n,{}),t.label]})}var Zs={error:{dot:L.danger,bg:L.dangerSoft},warn:{dot:L.warning,bg:L.warningSoft},clean:{dot:L.positive,bg:L.positiveSoft}};function Qs({row:e}){let t=Bs(e),n=Zs[t.status],r=t.reasons.length>0?t.reasons.join(`, `):`clean`;return(0,j.jsxs)(`span`,{title:`health: ${r}`,"aria-label":`health: ${r}`,style:{display:`inline-flex`,alignItems:`center`,gap:4,padding:`1px 6px`,borderRadius:9,background:n.bg,flexShrink:0,verticalAlign:`middle`},children:[(0,j.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:n.dot,flexShrink:0}}),t.status!==`clean`&&(0,j.jsx)(`span`,{style:{fontSize:9,color:n.dot,whiteSpace:`nowrap`,fontFamily:`ui-monospace, monospace`},children:r})]})}function $s({outcome:e}){return e?(0,j.jsx)(`span`,{style:{color:e===`completed`?L.positive:L.danger,fontSize:12},children:e}):(0,j.jsx)(`span`,{style:{color:L.textFaint},children:`—`})}function ec({row:e,onTagClick:t}){return(0,j.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`130px 90px 1fr 70px 200px 50px 70px 80px 60px`,alignItems:`center`,gap:8,padding:`8px 0`,borderBottom:`1px solid ${L.border}`,fontSize:12,color:L.text},children:[(0,j.jsx)(`span`,{style:{color:L.textMuted},children:Ws(e.startedAt)}),(0,j.jsx)(Xs,{platform:e.platform}),(0,j.jsxs)(`span`,{style:{overflow:`hidden`,minWidth:0},children:[(0,j.jsx)(`span`,{style:{display:`block`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:L.text},children:e.name}),(0,j.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:5,flexWrap:`wrap`,marginTop:2},children:[(0,j.jsx)(Qs,{row:e}),e.tags.map(e=>(0,j.jsx)(`button`,{onClick:()=>t(e),title:`filter by tag: ${e}`,style:{background:L.accentSoft,color:L.accent,border:`1px solid ${L.border}`,borderRadius:9,padding:`0 6px`,fontSize:10,cursor:`pointer`,fontFamily:`inherit`},children:e},e)),e.project&&e.project!==e.name&&(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:10,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.project})]})]}),(0,j.jsx)(`span`,{style:{color:e.totalCostCents>0?L.text:L.textFaint,textAlign:`right`,fontVariantNumeric:`tabular-nums`},children:Hs(e.totalCostCents)}),(0,j.jsx)(`span`,{style:{color:L.textMuted},children:Gs(e)}),(0,j.jsx)(`span`,{style:{color:L.textMuted,textAlign:`right`},children:e.messageCount}),(0,j.jsx)(`span`,{style:{color:L.textMuted,textAlign:`right`},children:Us(e.durationMs)}),(0,j.jsx)($s,{outcome:e.lastOutcome}),(0,j.jsx)(br,{to:`/session/$id`,params:{id:e.id},style:{color:L.accent,textDecoration:`none`,textAlign:`right`},children:`Replay →`})]})}function tc({sort:e,onSort:t}){function n(n,r){let i=r&&e===r;return(0,j.jsxs)(`span`,{onClick:r?()=>t(r):void 0,style:{color:i?L.text:L.textFaint,cursor:r?`pointer`:`default`,fontSize:11,userSelect:`none`},children:[n,i?` ↓`:``]})}return(0,j.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`130px 90px 1fr 70px 200px 50px 70px 80px 60px`,gap:8,padding:`6px 0`,borderBottom:`1px solid ${L.border}`},children:[n(`Started`,`date`),n(`Platform`),n(`Name / Tags`),n(`Cost`,`cost`),n(`Tokens`),n(`Msgs`),n(`Duration`,`duration`),n(`Outcome`),n(``)]})}function nc(){let{phase:e}=Ja(),[t,n]=(0,_.useState)(`date`),[r,i]=(0,_.useState)(`any`),{project:a,model:o,platform:s,dateFrom:c,dateTo:l,tag:u}=ar({from:`/sessions`}),[d,f]=(0,_.useState)(a),[p,m]=(0,_.useState)(a),[h,g]=(0,_.useState)(o),[v,y]=(0,_.useState)(s),[b,x]=(0,_.useState)(c),[S,C]=(0,_.useState)(l),[w,ee]=(0,_.useState)(u),[te,ne]=(0,_.useState)(!1),[T,E]=(0,_.useState)(0),re=or(),ie=(e={})=>({project:d,model:h,platform:v,dateFrom:b,dateTo:S,tag:w,...e}),{data:ae,isLoading:oe,error:se}=I({queryKey:[`sessions`,t,r,d,h,v,b,S,w,te,T],queryFn:()=>ja({sort:t,outcome:r,project:d||void 0,model:h||void 0,platform:v||void 0,dateFrom:b||void 0,dateTo:S||void 0,tag:w||void 0,includeEmpty:te,limit:Vs,offset:T}),refetchInterval:e===`idle`?!1:3e3});function ce(e){ee(e),E(0),re({to:`/sessions`,search:ie({tag:e})})}let D=ae?.total??0,O=Math.max(1,Math.ceil(D/Vs)),le=Math.floor(T/Vs);function ue(e){e.preventDefault(),f(p),E(0),re({to:`/sessions`,search:ie({project:p})})}return(0,j.jsxs)(`div`,{style:{maxWidth:1100,margin:`0 auto`,padding:`24px 16px`,fontFamily:`ui-monospace, monospace`,color:L.text},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,marginBottom:20,flexWrap:`wrap`},children:[(0,j.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:600},children:`Sessions`}),ae&&(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:13},children:[D.toLocaleString(),` total`]}),(0,j.jsxs)(`form`,{onSubmit:ue,style:{display:`flex`,gap:6},children:[(0,j.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`filter by project…`,style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`4px 8px`,borderRadius:4,fontSize:12,fontFamily:`ui-monospace, monospace`,width:200}}),(0,j.jsx)(`button`,{type:`submit`,style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.textMuted,padding:`4px 10px`,borderRadius:4,cursor:`pointer`,fontSize:12},children:`Filter`}),d&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>{f(``),m(``),E(0),re({to:`/sessions`,search:ie({project:``})})},style:{background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:12},children:`✕ clear`})]}),h&&(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,background:L.surface,border:`1px solid ${L.borderStrong}`,borderRadius:4,padding:`3px 8px`,fontSize:12},children:[(0,j.jsx)(`span`,{style:{color:L.textMuted},children:`model:`}),(0,j.jsx)(`span`,{style:{color:L.text},children:h}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>{g(``),E(0),re({to:`/sessions`,search:ie({project:p,model:``})})},style:{background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:12,padding:0,lineHeight:1},children:`✕`})]}),w&&(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,background:L.accentSoft,border:`1px solid ${L.border}`,borderRadius:4,padding:`3px 8px`,fontSize:12},children:[(0,j.jsx)(`span`,{style:{color:L.textMuted},children:`tag:`}),(0,j.jsx)(`span`,{style:{color:L.accent},children:w}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>ce(``),style:{background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:12,padding:0,lineHeight:1},children:`✕`})]}),(0,j.jsxs)(`select`,{value:v,onChange:e=>{y(e.target.value),E(0),re({to:`/sessions`,search:ie({platform:e.target.value})})},style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:v?L.text:L.textMuted,padding:`3px 8px`,borderRadius:4,fontSize:11,fontFamily:`ui-monospace, monospace`,cursor:`pointer`},children:[(0,j.jsx)(`option`,{value:``,children:`all platforms`}),(0,j.jsx)(`option`,{value:`claude-code`,children:`claude-code`}),(0,j.jsx)(`option`,{value:`codex`,children:`codex`}),(0,j.jsx)(`option`,{value:`cursor`,children:`cursor`})]}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,j.jsx)(`input`,{type:`date`,value:b,onChange:e=>{x(e.target.value),E(0),re({to:`/sessions`,search:ie({dateFrom:e.target.value})})},style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`3px 6px`,borderRadius:4,fontSize:11,fontFamily:`ui-monospace, monospace`,colorScheme:`dark`}}),(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:11},children:`–`}),(0,j.jsx)(`input`,{type:`date`,value:S,onChange:e=>{C(e.target.value),E(0),re({to:`/sessions`,search:ie({dateTo:e.target.value})})},style:{background:L.surface,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`3px 6px`,borderRadius:4,fontSize:11,fontFamily:`ui-monospace, monospace`,colorScheme:`dark`}}),(b||S)&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>{x(``),C(``),E(0),re({to:`/sessions`,search:ie({dateFrom:``,dateTo:``})})},style:{background:`transparent`,border:`none`,color:L.textMuted,cursor:`pointer`,fontSize:12,padding:`0 2px`},children:`✕`})]}),(0,j.jsx)(so,{options:[`any`,`completed`,`abandoned`],value:r,onChange:e=>{i(e),E(0)}}),ae&&(ae.hiddenEmptyCount>0||te)&&(0,j.jsx)(`button`,{onClick:()=>{ne(e=>!e),E(0)},title:`Empty sessions: 0 tokens and $0 — no measurable work. Hidden by default.`,style:{background:`transparent`,border:`none`,color:L.textFaint,cursor:`pointer`,fontSize:11,fontFamily:`ui-monospace, monospace`,textDecoration:`underline`,textUnderlineOffset:2},children:te?`hide empty sessions`:`${ae.hiddenEmptyCount.toLocaleString()} empty hidden · show`})]}),oe&&(0,j.jsx)(`div`,{style:{color:L.textMuted,padding:`40px 0`,textAlign:`center`},children:`Loading…`}),se&&(0,j.jsx)(`div`,{style:{color:L.danger,padding:`16px 0`},children:String(se)}),ae&&ae.sessions.length===0&&(0,j.jsx)(`div`,{style:{color:L.textMuted,padding:`40px 0`,textAlign:`center`},children:`No sessions found.`}),ae&&ae.sessions.length>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(tc,{sort:t,onSort:e=>{n(e),E(0)}}),ae.sessions.map(e=>(0,j.jsx)(ec,{row:e,onTagClick:ce},e.id)),O>1&&(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginTop:20,color:L.textMuted,fontSize:12},children:[(0,j.jsx)(`button`,{onClick:()=>E(Math.max(0,T-Vs)),disabled:T===0,style:{background:`transparent`,border:`1px solid ${L.borderStrong}`,color:T===0?L.textFaint:L.textMuted,padding:`4px 12px`,borderRadius:4,cursor:T===0?`default`:`pointer`,fontSize:12},children:`← Prev`}),(0,j.jsxs)(`span`,{children:[`Page `,le+1,` of `,O]}),(0,j.jsx)(`button`,{onClick:()=>E(T+Vs),disabled:T+Vs>=D,style:{background:`transparent`,border:`1px solid ${L.borderStrong}`,color:T+Vs>=D?L.textFaint:L.textMuted,padding:`4px 12px`,borderRadius:4,cursor:T+Vs>=D?`default`:`pointer`,fontSize:12},children:`Next →`})]})]})]})}var rc=[`7d`,`30d`,`90d`,`all`];function ic(e){return(e/100).toLocaleString(`en-US`,{style:`currency`,currency:`USD`})}function ac(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}function oc(e){let t=e<12?`am`:`pm`;return`${e%12==0?12:e%12}${t}`}var sc=100,cc={top:8,bottom:24,left:64,right:8};function lc({data:e,metric:t}){let n=(0,_.useRef)(null),[r,i]=(0,_.useState)(700),[a,o]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=n.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0]?.contentRect.width;t&&i(t)});return t.observe(e),i(e.getBoundingClientRect().width||700),()=>t.disconnect()},[]);let s=e=>t===`cost`?ic(e):`${ac(e)} tok`;if(e.length===0)return(0,j.jsx)(`div`,{style:{color:L.textFaint,padding:`24px 0`,textAlign:`center`},children:`No data for this range.`});let c=r-cc.left-cc.right,l=sc-cc.top-cc.bottom,u=e.reduce((e,t)=>Math.max(e,t.value),1),d=e.map((t,n)=>[cc.left+(e.length===1?c/2:n/(e.length-1)*c),cc.top+(1-t.value/u)*l]),f=Ro().x(e=>e[0]).y(e=>e[1])(d)??``,p=cc.top,m=cc.top+l,h=e[0].date,g=e[e.length-1].date;function v(t){let r=n.current?.getBoundingClientRect();if(!r)return;if(e.length===1){o(0);return}let i=t.clientX-r.left-cc.left;o(Math.max(0,Math.min(e.length-1,Math.round(i/c*(e.length-1)))))}let y=a??(e.length===1?0:null);return(0,j.jsxs)(`svg`,{ref:n,style:{width:`100%`,height:sc,display:`block`,cursor:`crosshair`},onMouseMove:v,onMouseLeave:()=>o(null),children:[(0,j.jsx)(`line`,{x1:cc.left,y1:m,x2:r-cc.right,y2:m,stroke:L.border,strokeWidth:1}),(0,j.jsx)(`text`,{x:cc.left-4,y:p+4,textAnchor:`end`,fill:L.textFaint,fontSize:10,children:s(u)}),(0,j.jsx)(`text`,{x:cc.left-4,y:m,textAnchor:`end`,fill:L.textFaint,fontSize:10,children:t===`cost`?`$0`:`0`}),(0,j.jsx)(`text`,{x:cc.left,y:sc-4,textAnchor:`start`,fill:L.textFaint,fontSize:10,children:h}),e.length>1&&(0,j.jsx)(`text`,{x:r-cc.right,y:sc-4,textAnchor:`end`,fill:L.textFaint,fontSize:10,children:g}),f&&(0,j.jsx)(`path`,{d:f,fill:`none`,stroke:L.accent,strokeWidth:1.5}),e.map((e,t)=>(0,j.jsx)(`circle`,{cx:d[t][0],cy:d[t][1],r:y===t?4:2,fill:y===t?L.text:L.accent},e.date)),y!=null&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`line`,{x1:d[y][0],y1:p,x2:d[y][0],y2:m,stroke:L.borderStrong,strokeWidth:1,strokeDasharray:`3,3`}),(0,j.jsxs)(`text`,{x:Math.max(cc.left,Math.min(d[y][0]+6,r-cc.right-120)),y:p+14,fill:L.text,fontSize:11,children:[e[y].date,` · `,s(e[y].value)]})]})]})}var uc=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],dc=[0,6,12,18,23];function fc({clock:e}){let[t,n]=(0,_.useState)(null);if(e.maxSessions===0)return(0,j.jsx)(`div`,{style:{color:L.textFaint,padding:`24px 0`,textAlign:`center`},children:`No sessions in this range.`});let r=new Map;for(let t of e.cells)r.set(t.dayOfWeek*24+t.hour,{sessions:t.sessionCount,tokens:t.tokens,errors:t.errorCount});function i(t,n){if(t===0)return{background:L.surfaceInset};let r=.18+Math.min(1,Math.log1p(t)/Math.log1p(e.maxSessions))*.82,i={background:L.accent,opacity:r};return n>0&&(i.boxShadow=`inset 0 0 0 1.5px ${L.danger}`),i}return(0,j.jsxs)(`div`,{style:{position:`relative`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,gap:6},children:[(0,j.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:3,paddingTop:0},children:uc.map(e=>(0,j.jsx)(`div`,{style:{height:16,fontSize:10,color:L.textFaint,lineHeight:`16px`,textAlign:`right`,width:28},children:e},e))}),(0,j.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,j.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(24, 1fr)`,gridTemplateRows:`repeat(7, 16px)`,gap:3},children:uc.map((e,t)=>Array.from({length:24},(e,a)=>{let o=r.get(t*24+a),s=o?.sessions??0,c=o?.errors??0;return(0,j.jsx)(`div`,{onMouseEnter:()=>n({dow:t,hour:a,sessions:s,tokens:o?.tokens??0,errors:c}),onMouseLeave:()=>n(null),style:{borderRadius:2,cursor:s>0?`pointer`:`default`,...i(s,c)}},`${t}-${a}`)}))}),(0,j.jsx)(`div`,{style:{position:`relative`,height:14,marginTop:4},children:dc.map(e=>(0,j.jsx)(`div`,{style:{position:`absolute`,left:`${e/23*100}%`,transform:e===0?`none`:e===23?`translateX(-100%)`:`translateX(-50%)`,fontSize:10,color:L.textFaint},children:oc(e)},e))})]})]}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginTop:12,fontSize:10,color:L.textFaint},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,j.jsx)(`span`,{children:`less`}),[.18,.4,.6,.8,1].map(e=>(0,j.jsx)(`span`,{style:{width:12,height:12,borderRadius:2,background:L.accent,opacity:e}},e)),(0,j.jsx)(`span`,{children:`more`})]}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,j.jsx)(`span`,{style:{width:12,height:12,borderRadius:2,background:L.surfaceInset,boxShadow:`inset 0 0 0 1.5px ${L.danger}`}}),(0,j.jsx)(`span`,{children:`has tool errors`})]})]}),t&&t.sessions>0&&(0,j.jsxs)(`div`,{style:{marginTop:10,fontSize:11,color:L.textMuted,fontFamily:R.mono},children:[(0,j.jsxs)(`span`,{style:{color:L.text},children:[uc[t.dow],` `,oc(t.hour)]}),` · `,t.sessions,` session`,t.sessions===1?``:`s`,` · `,ac(t.tokens),` tok`,t.errors>0&&(0,j.jsxs)(`span`,{style:{color:L.danger},children:[` · `,t.errors,` tool error`,t.errors===1?``:`s`]})]})]})}function pc({rows:e,labelKey:t,valueKey:n,onClickLabel:r}){if(e.length===0)return(0,j.jsx)(`div`,{style:{color:L.textFaint,padding:`16px 0`},children:`No data.`});let i=e.reduce((e,t)=>Math.max(e,t[n]),1);return(0,j.jsx)(`div`,{children:e.map(e=>{let a=String(e[t]),o=e[n],s=o/i*100;return(0,j.jsxs)(`div`,{style:{marginBottom:8},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,marginBottom:3},children:[(0,j.jsx)(`span`,{onClick:r?()=>r(a):void 0,style:{fontSize:12,color:r?L.accent:L.text,cursor:r?`pointer`:`default`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:300,flexShrink:0},children:a}),(0,j.jsx)(`span`,{style:{fontSize:12,color:L.textMuted,marginLeft:`auto`,whiteSpace:`nowrap`},children:ic(o)})]}),(0,j.jsx)(`div`,{style:{height:4,background:L.border,borderRadius:2},children:(0,j.jsx)(`div`,{style:{height:4,width:`${s}%`,background:L.accent,borderRadius:2}})})]},a)})})}function mc({title:e,hint:t,children:n}){return(0,j.jsxs)(`div`,{style:{marginBottom:36},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,margin:`0 0 14px`},children:[(0,j.jsx)(`h3`,{style:{margin:0,fontSize:13,fontWeight:600,color:L.textMuted,textTransform:`uppercase`,letterSpacing:`0.05em`},children:e}),t&&(0,j.jsx)(`span`,{style:{fontSize:11,color:L.textFaint},children:t})]}),n]})}function hc(e){let t=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e,n=[`tag,sessions,tokens,cost_usd`];for(let r of e)n.push([t(r.tag),r.sessionCount,r.tokens,(r.costCents/100).toFixed(2)].join(`,`));return n.join(`
|
|
37
|
+
`)}function gc(e,t){let n=new Blob([hc(e)],{type:`text/csv;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`billing-${t}.csv`,i.click(),URL.revokeObjectURL(r)}function _c({rows:e}){let t={padding:`6px 8px`,fontSize:12},n={...t,textAlign:`right`,fontFamily:R.mono,fontVariantNumeric:`tabular-nums`,color:L.textMuted};return(0,j.jsxs)(`table`,{style:{width:`100%`,borderCollapse:`collapse`},children:[(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{style:{borderBottom:`1px solid ${L.border}`},children:[(0,j.jsx)(`th`,{style:{...t,textAlign:`left`,color:L.textFaint,fontWeight:500},children:`Tag`}),(0,j.jsx)(`th`,{style:{...n,color:L.textFaint,fontWeight:500},children:`Sessions`}),(0,j.jsx)(`th`,{style:{...n,color:L.textFaint,fontWeight:500},children:`Tokens`}),(0,j.jsx)(`th`,{style:{...n,color:L.textFaint,fontWeight:500},children:`Cost`})]})}),(0,j.jsx)(`tbody`,{children:e.map(e=>(0,j.jsxs)(`tr`,{style:{borderBottom:`1px solid ${L.border}`},children:[(0,j.jsx)(`td`,{style:{...t,color:L.text},children:e.tag}),(0,j.jsx)(`td`,{style:n,children:e.sessionCount.toLocaleString(`en-US`)}),(0,j.jsx)(`td`,{style:n,children:ac(e.tokens)}),(0,j.jsx)(`td`,{style:{...n,color:L.text},children:ic(e.costCents)})]},e.tag))})]})}function vc({label:e,value:t}){return(0,j.jsxs)(`div`,{style:{flex:1,minWidth:0,border:`1px solid ${L.border}`,borderRadius:8,background:L.surface,padding:`12px 14px`},children:[(0,j.jsx)(`div`,{style:{fontSize:20,fontWeight:600,color:L.text,fontFamily:R.mono,fontVariantNumeric:`tabular-nums`},children:t}),(0,j.jsx)(`div`,{style:{fontSize:11,color:L.textFaint,marginTop:2,textTransform:`uppercase`,letterSpacing:`0.04em`},children:e})]})}function yc({data:e}){let t=e.summary;return(0,j.jsxs)(`div`,{style:{display:`flex`,gap:10,marginBottom:32,flexWrap:`wrap`},children:[(0,j.jsx)(vc,{label:`Sessions`,value:t.totalSessions.toLocaleString(`en-US`)}),(0,j.jsx)(vc,{label:`Tokens`,value:ac(t.totalTokens)}),(0,j.jsx)(vc,{label:`Active days`,value:String(t.activeDays)}),(0,j.jsx)(vc,{label:`Busiest hour`,value:t.busiestHour==null?`—`:oc(t.busiestHour)})]})}function bc(){let[e,t]=(0,_.useState)(`30d`),[n,r]=(0,_.useState)(`tokens`),i=or(),{data:a,isLoading:o,error:s}=I({queryKey:[`analytics`,e],queryFn:()=>Pa(e)}),{data:c}=I({queryKey:[`billing`,e],queryFn:()=>Ia(e)});function l(e){i({to:`/sessions`,search:{project:e,model:``,platform:``,dateFrom:``,dateTo:``,tag:``}})}function u(e){i({to:`/sessions`,search:{project:``,model:e,platform:``,dateFrom:``,dateTo:``,tag:``}})}let d=a==null?[]:n===`cost`?a.dailyCost.map(e=>({date:e.date,value:e.costCents})):a.dailyTokens.map(e=>({date:e.date,value:e.tokens}));return(0,j.jsxs)(`div`,{style:{maxWidth:900,margin:`0 auto`,padding:`24px 16px`,fontFamily:`ui-monospace, monospace`,color:L.text},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16,marginBottom:28},children:[(0,j.jsx)(`h2`,{style:{margin:0,fontSize:18,fontWeight:600,fontFamily:R.sans},children:`Analytics`}),(0,j.jsx)(so,{options:rc,value:e,onChange:t})]}),o&&(0,j.jsx)(`div`,{style:{color:L.textMuted,padding:`40px 0`,textAlign:`center`},children:`Loading…`}),s&&(0,j.jsx)(`div`,{style:{color:L.danger,padding:`16px 0`},children:String(s)}),a&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(yc,{data:a}),(0,j.jsx)(mc,{title:`When you work`,hint:`day × hour · local time · darker = busier · red ring = tool errors`,children:(0,j.jsx)(fc,{clock:a.activityClock})}),(0,j.jsxs)(mc,{title:n===`cost`?`Cost over time`:`Tokens over time`,children:[(0,j.jsx)(`div`,{style:{marginBottom:12},children:(0,j.jsx)(so,{options:[`tokens`,`cost`],value:n,onChange:r})}),(0,j.jsx)(lc,{data:d,metric:n})]}),(0,j.jsx)(mc,{title:`Cost by project`,children:(0,j.jsx)(pc,{rows:a.projectCost,labelKey:`project`,valueKey:`costCents`,onClickLabel:l})}),(0,j.jsx)(mc,{title:`Cost by model`,children:(0,j.jsx)(pc,{rows:a.modelCost,labelKey:`model`,valueKey:`costCents`,onClickLabel:u})}),c&&(0,j.jsx)(mc,{title:`Billing by tag`,hint:`a tag = a client label · cost is $0 on most sessions, so tokens carry the signal`,children:c.rows.length===0?(0,j.jsx)(`div`,{style:{color:L.textFaint,padding:`8px 0`,fontSize:12},children:`Tag sessions to bill by client.`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(_c,{rows:c.rows}),c.untaggedSessions>0&&(0,j.jsxs)(`div`,{style:{color:L.textFaint,fontSize:11,marginTop:8},children:[c.untaggedSessions.toLocaleString(`en-US`),` untagged session`,c.untaggedSessions===1?``:`s`,` in this range.`]}),(0,j.jsx)(`button`,{onClick:()=>gc(c.rows,e),style:{marginTop:12,padding:`5px 12px`,fontSize:12,fontFamily:R.sans,color:L.text,background:L.surface,border:`1px solid ${L.border}`,borderRadius:6,cursor:`pointer`},children:`Download CSV`})]})})]})]})}function xc(e){let t=Date.now()-e,n=Math.floor(t/(1440*60*1e3));if(n<=0)return`today`;if(n===1)return`1 day ago`;if(n<30)return`${n} days ago`;let r=Math.floor(n/30);if(r===1)return`1 month ago`;if(r<12)return`${r} months ago`;let i=Math.floor(n/365);return i===1?`1 year ago`:`${i} years ago`}function Sc(e){return e===`claude-code`?L.accent:e===`codex`?L.positive:L.platformCursor}function Cc(e){if(e.startsWith(`/Users/`)){let t=e.split(`/`).filter(Boolean);return t.length>3?`~/.../`+t.slice(-2).join(`/`):`~/`+t.slice(2).join(`/`)}return e}function wc({cmd:e}){let[t,n]=(0,_.useState)(!1);return(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,background:L.surfaceInset,border:`1px solid ${L.border}`,borderRadius:4,padding:`6px 8px`,marginTop:6},children:[(0,j.jsx)(`code`,{style:{flex:1,color:L.text,fontSize:12,fontFamily:`ui-monospace, monospace`,overflow:`auto`,whiteSpace:`nowrap`},children:e}),(0,j.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{let t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select();try{document.execCommand(`copy`)}catch{}document.body.removeChild(t),n(!0),setTimeout(()=>n(!1),1500)}},style:{fontSize:11,padding:`2px 8px`,cursor:`pointer`,background:t?L.positive:L.surfaceRaised,color:t?L.bg:L.textMuted,border:`1px solid ${L.border}`,borderRadius:3,whiteSpace:`nowrap`},children:t?`✓ Copied`:`Copy`})]})}function Tc({platform:e}){let t=Sc(e);return(0,j.jsx)(`span`,{style:{fontSize:10,padding:`1px 5px`,borderRadius:3,background:L.surface,color:t,border:`1px solid ${t}33`,fontFamily:`ui-monospace, monospace`},children:e})}function Ec({scope:e}){return(0,j.jsx)(`span`,{style:{fontSize:10,padding:`1px 5px`,borderRadius:3,background:L.surface,color:L.textMuted,border:`1px solid ${L.border}`,fontFamily:`ui-monospace, monospace`},children:e})}function Dc({gap:e}){return(0,j.jsxs)(`div`,{style:{padding:`10px 0`,borderBottom:`1px solid ${L.border}`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8},children:[(0,j.jsx)(`span`,{style:{fontSize:14,color:L.text,fontWeight:600},children:e.id}),(0,j.jsx)(`span`,{style:{fontSize:10,padding:`1px 5px`,borderRadius:3,background:L.accentSoft,color:e.kind===`mcp`?L.accent:L.platformCursor,fontFamily:`ui-monospace, monospace`},children:e.kind}),e.matchingCallCount>0&&(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,color:L.warning,fontSize:12,fontFamily:`ui-monospace, monospace`},children:[e.matchingCallCount,` call`,e.matchingCallCount===1?``:`s`,` would be replaced`]})]}),(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:12,marginTop:4},children:e.purpose}),(0,j.jsx)(wc,{cmd:e.installCommand})]})}function Oc({zombie:e}){return(0,j.jsxs)(`div`,{style:{padding:`10px 0`,borderBottom:`1px solid ${L.border}`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8},children:[(0,j.jsx)(`span`,{style:{fontSize:14,color:L.text,fontWeight:600},children:e.displayName}),(0,j.jsx)(Tc,{platform:e.platform}),(0,j.jsx)(Ec,{scope:e.scope}),(0,j.jsx)(`span`,{style:{fontSize:10,padding:`1px 5px`,borderRadius:3,background:L.accentSoft,color:e.kind===`mcp`?L.accent:L.platformCursor,fontFamily:`ui-monospace, monospace`},children:e.kind}),(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,color:L.textMuted,fontSize:12},children:[`installed `,xc(e.installedAtMs),` · `,e.lastUsedMs?`last used ${xc(e.lastUsedMs)}`:`never used`]})]}),e.projectPath&&(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:11,marginTop:2},children:Cc(e.projectPath)}),(0,j.jsx)(wc,{cmd:e.removeCommand})]})}function kc(e){let t=new Map;for(let n of e){let e=t.get(n.removeCommand)??[];e.push(n),t.set(n.removeCommand,e)}return Array.from(t.entries()).map(([e,t])=>({removeCommand:e,items:t})).sort((e,t)=>t.items.length===e.items.length?Math.min(...e.items.map(e=>e.installedAtMs))-Math.min(...t.items.map(e=>e.installedAtMs)):t.items.length-e.items.length)}function Ac({group:e}){let[t,n]=(0,_.useState)(!1);if(e.items.length===1)return(0,j.jsx)(Oc,{zombie:e.items[0]});let r=e.items[0],i=r.id.indexOf(`:`),a=i>0?r.id.slice(0,i):null,o=Math.min(...e.items.map(e=>e.installedAtMs)),s=a?`${e.items.length} unused ${r.kind===`skill`?`skills`:`items`} from \`${a}\` plugin`:`${e.items.length} unused ${r.kind===`skill`?`skills`:`items`}`;return(0,j.jsxs)(`div`,{style:{padding:`10px 0`,borderBottom:`1px solid ${L.border}`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8},children:[(0,j.jsxs)(`span`,{onClick:()=>n(e=>!e),style:{cursor:`pointer`,fontSize:14,color:L.text,fontWeight:600},children:[(0,j.jsx)(`span`,{style:{color:L.textMuted,marginRight:6},children:t?`▼`:`▶`}),s]}),(0,j.jsx)(Tc,{platform:r.platform}),(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,color:L.textMuted,fontSize:12},children:[`oldest installed `,xc(o)]})]}),t&&(0,j.jsx)(`div`,{style:{marginTop:6,paddingLeft:20},children:e.items.map(e=>(0,j.jsxs)(`div`,{style:{padding:`3px 0`,fontSize:12,color:L.text,display:`flex`,gap:8},children:[(0,j.jsx)(`span`,{style:{fontFamily:`ui-monospace, monospace`,flex:1},children:e.displayName}),(0,j.jsx)(`span`,{style:{color:L.textMuted},children:e.lastUsedMs?`last used ${xc(e.lastUsedMs)}`:`never used`})]},e.id+`:`+(e.projectPath??``)))}),a&&(0,j.jsxs)(`div`,{style:{color:L.textMuted,fontSize:11,marginTop:8,fontStyle:`italic`},children:[`Uninstalling removes all `,e.items.length,` bundled items.`]}),(0,j.jsx)(wc,{cmd:e.removeCommand})]})}function jc({name:e,used:t,lastUsed:n,platform:r,scope:i}){return(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:12,padding:`4px 0`,color:L.text},children:[(0,j.jsx)(`span`,{style:{width:16},children:t?`✅`:`💤`}),(0,j.jsx)(`span`,{style:{flex:1,fontFamily:`ui-monospace, monospace`},children:e}),(0,j.jsx)(Tc,{platform:r}),(0,j.jsx)(Ec,{scope:i}),(0,j.jsx)(`span`,{style:{color:L.textMuted,fontSize:11,minWidth:110,textAlign:`right`},children:n?`used ${xc(n)}`:`never used`})]})}function Mc({title:e,skills:t,mcp:n,defaultExpanded:r=!1}){let[i,a]=(0,_.useState)(r),o=t.length+n.length,s=t.filter(e=>e.usageCount>0).length+n.filter(e=>e.usageCount>0).length;return(0,j.jsxs)(`div`,{style:{marginBottom:16},children:[(0,j.jsxs)(`div`,{onClick:()=>a(e=>!e),style:{cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,padding:`6px 0`,borderBottom:`1px solid ${L.border}`},children:[(0,j.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:L.text},children:e}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:12},children:[s,`/`,o,` used`]}),(0,j.jsx)(`span`,{style:{marginLeft:`auto`,color:L.textFaint,fontSize:12},children:i?`▲`:`▼`})]}),i&&o===0&&(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:12,padding:`8px 0`},children:`(nothing installed)`}),i&&t.length>0&&(0,j.jsxs)(`div`,{style:{marginTop:6},children:[(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:11,marginBottom:4},children:`Skills`}),t.map(e=>(0,j.jsx)(jc,{name:e.id,used:e.usageCount>0,lastUsed:e.lastUsedMs,platform:e.platform,scope:e.scope},e.platform+`:`+e.id+`:`+e.sourcePath))]}),i&&n.length>0&&(0,j.jsxs)(`div`,{style:{marginTop:8},children:[(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:11,marginBottom:4},children:`MCP servers`}),n.map(e=>(0,j.jsx)(jc,{name:e.id,used:e.usageCount>0,lastUsed:e.lastUsedMs,platform:e.platform,scope:e.scope},e.platform+`:`+e.id+`:`+e.sourcePath))]})]})}function Nc({inv:e}){return(0,j.jsx)(Mc,{title:Cc(e.project),skills:e.skills,mcp:e.mcp})}function Pc(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,``)+`M`:e>=1e3?Math.round(e/1e3)+`k`:String(e)}function Fc(){let{data:e,refetch:t}=I({queryKey:[`settings`],queryFn:Wa}),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(!1);(0,_.useEffect)(()=>{e?.settings.weeklyTokenCap!=null&&r(String(e.settings.weeklyTokenCap))},[e?.settings.weeklyTokenCap]);async function o(e){a(!0);try{await Ga({weeklyTokenCap:e}),await t()}finally{a(!1)}}let s=e?.cap,c=e?e.budget.tokensLast7d:0,l=s&&s.capSet?Math.min(100,s.pct):0,u=l>=100?L.danger:l>=75?L.warning:L.positive;return(0,j.jsxs)(`div`,{style:{marginBottom:24,padding:`12px 14px`,background:L.surface,border:`1px solid ${L.border}`,borderRadius:8},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,flexWrap:`wrap`},children:[(0,j.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:L.text},children:`Weekly token cap`}),(0,j.jsxs)(`span`,{style:{fontSize:12,color:L.textMuted},children:[Pc(c),` used in the last 7 days`,s&&s.capSet?` · ${s.pct.toFixed(0)}% of cap`:` · no cap set`]}),(0,j.jsxs)(`span`,{style:{marginLeft:`auto`,display:`flex`,gap:6,alignItems:`center`},children:[(0,j.jsx)(`input`,{value:n,onChange:e=>r(e.target.value.replace(/[^0-9]/g,``)),placeholder:`e.g. 50000000`,inputMode:`numeric`,style:{width:130,background:L.surfaceInset,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`4px 8px`,borderRadius:4,fontSize:12,fontFamily:`ui-monospace, monospace`}}),(0,j.jsx)(`button`,{onClick:()=>o(n?Number(n):null),disabled:i,style:{background:L.accentSoft,border:`1px solid ${L.borderStrong}`,color:L.accent,padding:`4px 10px`,borderRadius:4,fontSize:12,cursor:`pointer`},children:i?`…`:`Save`}),e?.settings.weeklyTokenCap!=null&&(0,j.jsx)(`button`,{onClick:()=>{r(``),o(null)},disabled:i,style:{background:`transparent`,border:`1px solid ${L.borderStrong}`,color:L.textMuted,padding:`4px 10px`,borderRadius:4,fontSize:12,cursor:`pointer`},children:`Clear`})]})]}),s&&s.capSet&&(0,j.jsxs)(`div`,{style:{marginTop:8},children:[(0,j.jsx)(`div`,{style:{height:6,background:L.surfaceInset,borderRadius:999,overflow:`hidden`},children:(0,j.jsx)(`div`,{style:{width:`${l}%`,height:`100%`,background:u,borderRadius:999}})}),s.daysToExhaust!=null&&(0,j.jsxs)(`div`,{style:{fontSize:11,color:L.textMuted,marginTop:4},children:[`~`,s.daysToExhaust.toFixed(1),` days to cap at the current rate`]})]}),(0,j.jsx)(`div`,{style:{fontSize:11,color:L.textFaint,marginTop:8},children:`Claude doesn't expose your weekly limit, so set it here — vyasa nudges you in the terminal at 75% and 100%.`})]})}function Ic(){let e=Xi(),[t,n]=(0,_.useState)(``),r=da({mutationFn:e=>La(e),onSuccess:t=>{t.ok&&(e.invalidateQueries({queryKey:[`sessions`]}),e.invalidateQueries({queryKey:[`live`]}))}}),i=t.trim(),a=r.data,o=a&&!a.ok?a.error:r.error?String(r.error):null;return(0,j.jsxs)(`div`,{style:{marginBottom:24,padding:`12px 14px`,background:L.surface,border:`1px solid ${L.border}`,borderRadius:8},children:[(0,j.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:L.text},children:`Import a hand-off`}),(0,j.jsxs)(`div`,{style:{fontSize:11,color:L.textFaint,marginTop:2},children:[`Receive a shared `,(0,j.jsx)(`code`,{style:{fontFamily:`ui-monospace, monospace`},children:`.vyasa`}),` bundle from a teammate by its file path.`]}),(0,j.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginTop:8},children:[(0,j.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&i&&r.mutate(i)},placeholder:`/path/to/handoff.vyasa`,style:{flex:1,background:L.surfaceInset,border:`1px solid ${L.borderStrong}`,color:L.text,padding:`4px 8px`,borderRadius:4,fontSize:12,fontFamily:`ui-monospace, monospace`}}),(0,j.jsx)(`button`,{onClick:()=>r.mutate(i),disabled:!i||r.isPending,style:{background:L.accentSoft,border:`1px solid ${L.borderStrong}`,color:L.accent,padding:`4px 12px`,borderRadius:4,fontSize:12,cursor:!i||r.isPending?`default`:`pointer`,opacity:i?1:.5},children:r.isPending?`Importing…`:`Import`})]}),a&&a.ok&&a.sessionId&&(0,j.jsxs)(`div`,{style:{fontSize:12,color:L.positive,marginTop:8},children:[`✓ Imported —`,` `,(0,j.jsx)(br,{to:`/session/$id`,params:{id:a.sessionId},style:{color:L.accent,textDecoration:`none`},children:`open in Replay →`})]}),o&&(0,j.jsx)(`div`,{style:{fontSize:12,color:L.danger,marginTop:8},children:o})]})}function Lc(){let{data:e,isLoading:t,error:n}=I({queryKey:[`kit`],queryFn:()=>Fa()});return(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:960,margin:`0 auto`},children:[(0,j.jsxs)(`div`,{style:{marginBottom:24},children:[(0,j.jsx)(`h2`,{style:{color:L.text,fontSize:18,fontWeight:600,margin:0},children:`Kit`}),(0,j.jsxs)(`div`,{style:{color:L.textMuted,fontSize:12,marginTop:4},children:[`Skills + MCP servers across Claude Code, Codex, and Cursor.`,e&&` Lookback ${e.lookbackDays}d.`]})]}),(0,j.jsx)(Fc,{}),(0,j.jsx)(Ic,{}),t&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Loading…`}),n&&(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,String(n)]}),e&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`section`,{style:{marginBottom:32},children:[(0,j.jsx)(`h3`,{style:{fontSize:14,fontWeight:600,color:L.warning,margin:0,marginBottom:8,padding:`6px 0`,borderBottom:`2px solid ${L.border}`},children:`Gaps — what you might be missing`}),e.gaps.length===0?(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:13,padding:`8px 0`},children:`No gaps detected from your current kit — nice.`}):e.gaps.map(e=>(0,j.jsx)(Dc,{gap:e},e.kind+`:`+e.id))]}),(0,j.jsxs)(`section`,{style:{marginBottom:32},children:[(0,j.jsxs)(`h3`,{style:{fontSize:14,fontWeight:600,color:L.platformCursor,margin:0,marginBottom:8,padding:`6px 0`,borderBottom:`2px solid ${L.border}`},children:[`Zombies — installed, never invoked in last `,e.lookbackDays,`d`]}),e.zombies.length===0?(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:13,padding:`8px 0`},children:e.globalInstalled.skills.length===0&&e.globalInstalled.mcp.length===0&&e.projectInstalled.length===0?`Nothing installed yet — see the Gaps section for recommendations.`:`No zombies — everything you have, you use.`}):kc(e.zombies).map(e=>(0,j.jsx)(Ac,{group:e},e.removeCommand))]}),(0,j.jsxs)(`section`,{children:[(0,j.jsx)(`h3`,{style:{fontSize:14,fontWeight:600,color:L.textMuted,margin:0,marginBottom:12,padding:`6px 0`,borderBottom:`2px solid ${L.border}`},children:`Inventory`}),(0,j.jsx)(Mc,{title:`Global`,skills:e.globalInstalled.skills,mcp:e.globalInstalled.mcp,defaultExpanded:!0}),e.projectInstalled.length===0?(0,j.jsx)(`div`,{style:{color:L.textMuted,fontSize:12,marginTop:8},children:`No project-scoped installs detected.`}):e.projectInstalled.map(e=>(0,j.jsx)(Nc,{inv:e},e.project))]})]})]})}function Rc(e){return(e/100).toLocaleString(`en-US`,{style:`currency`,currency:`USD`})}function U(e){return e>=1e6?(e/1e6).toFixed(1).replace(/\.0$/,``)+`M`:e>=1e3?Math.round(e/1e3)+`k`:String(e)}function zc(e){let t=new Date(e+`T00:00:00.000Z`),n=new Date(t.getTime()+8640*60*1e3),r={month:`short`,day:`numeric`,timeZone:`UTC`};return`${t.toLocaleDateString(`en-US`,r)} – ${n.toLocaleDateString(`en-US`,r)}`}function Bc({title:e,count:t,children:n}){return(0,j.jsxs)(`div`,{style:{marginBottom:28},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,padding:`8px 0`,borderBottom:`2px solid ${L.border}`,marginBottom:10},children:[(0,j.jsx)(`span`,{style:{fontSize:z.lg,fontWeight:ya.semibold,color:L.text},children:e}),t!=null&&(0,j.jsx)(`span`,{style:{color:L.textMuted,fontSize:z.sm},children:t})]}),n]})}function Vc({id:e,hash:t}){return(0,j.jsx)(br,{to:`/session/$id`,params:{id:e},hash:t,style:{color:L.accent,textDecoration:`none`,whiteSpace:`nowrap`,fontSize:z.sm},children:`Replay →`})}function Hc({name:e,id:t}){return(0,j.jsx)(`span`,{style:{color:L.text,flex:1,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},title:e||t,children:e||t.slice(0,12)})}var Uc={display:`flex`,alignItems:`baseline`,gap:12,padding:`7px 0`,borderBottom:`1px solid ${L.border}`,fontSize:z.base};function Wc({burn:e,weekStart:t}){let n=e.cap!=null&&e.pct!=null,r=e.pct??0,i=r>=100,a=r>=75,o=i?L.danger:a?L.warning:L.accent;return(0,j.jsxs)(`div`,{style:{background:L.surface,border:`1px solid ${L.border}`,borderRadius:_a.lg,padding:20,marginBottom:28},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:12,marginBottom:4},children:[(0,j.jsx)(`span`,{style:{fontSize:z.xl,fontWeight:ya.semibold,color:L.text},children:`This Week`}),(0,j.jsx)(`span`,{style:{color:L.textMuted,fontSize:z.sm},children:zc(t)})]}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:8,marginBottom:n?12:0},children:[(0,j.jsx)(`span`,{className:`vy-mono`,style:{fontSize:z[`2xl`],fontWeight:ya.bold,color:L.text},children:U(e.used)}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:z.sm},children:[`tokens (rolling 7-day)`,n?` of ${U(e.cap)} cap`:``]})]}),n&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`div`,{style:{height:8,background:L.surfaceInset,borderRadius:_a.pill,overflow:`hidden`,marginBottom:8},children:(0,j.jsx)(`div`,{style:{width:`${Math.min(100,r)}%`,height:`100%`,background:o,borderRadius:_a.pill,transition:`width 0.2s ease`}})}),(0,j.jsxs)(`div`,{style:{display:`flex`,gap:16,color:L.textMuted,fontSize:z.sm},children:[(0,j.jsxs)(`span`,{style:{color:i?L.danger:a?L.warning:L.textMuted},children:[r.toFixed(0),`% of cap`]}),e.daysToExhaust!=null&&(0,j.jsxs)(`span`,{children:[`~`,e.daysToExhaust.toFixed(1),`d to cap at current rate`]}),(0,j.jsxs)(`span`,{children:[`proj. full-week `,U(e.projectedWeekEnd)]})]})]}),!n&&(0,j.jsx)(`div`,{style:{color:L.textFaint,fontSize:z.sm,marginTop:6},children:`No weekly cap set — set one in Settings to track burn against a limit.`})]})}function Gc({cluster:e}){let[t,n]=(0,_.useState)(!1);return(0,j.jsxs)(`div`,{style:{padding:`10px 0`,borderBottom:`1px solid ${L.border}`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:10,marginBottom:6},children:[(0,j.jsxs)(`span`,{style:{color:L.text,flex:1,fontSize:z.base},children:[`“`,e.representative,`”`]}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:z.sm,whiteSpace:`nowrap`},children:[e.count,`× · `,e.sessionCount,` sessions`]})]}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,background:L.surfaceInset,border:`1px solid ${L.borderSubtle}`,borderRadius:_a.md,padding:`8px 10px`},children:[(0,j.jsx)(`code`,{style:{flex:1,fontFamily:R.mono,fontSize:z.sm,color:L.textMuted,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.suggestion}),(0,j.jsx)(`button`,{onClick:()=>{try{navigator.clipboard.writeText(e.suggestion),n(!0),setTimeout(()=>n(!1),1500)}catch{}},style:{cursor:`pointer`,background:`transparent`,border:`1px solid ${L.border}`,borderRadius:_a.sm,color:t?L.positive:L.accent,fontSize:z.sm,padding:`3px 8px`,whiteSpace:`nowrap`},children:t?`Copied`:`Copy`})]})]})}function Kc({finding:e}){return(0,j.jsxs)(`div`,{style:Uc,children:[(0,j.jsx)(`span`,{style:{color:L.danger,fontSize:z.sm,whiteSpace:`nowrap`},children:`⚠`}),(0,j.jsx)(`span`,{style:{color:L.text,minWidth:160,whiteSpace:`nowrap`},children:e.reason}),(0,j.jsx)(`code`,{style:{flex:1,fontFamily:R.mono,fontSize:z.sm,color:L.textMuted,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.preview}),(0,j.jsx)(Vc,{id:e.sessionId,hash:`msg-${e.msgIdx}`})]})}function qc(){let{data:e,isLoading:t,error:n}=I({queryKey:[`recap`],queryFn:Ka});if(t)return(0,j.jsx)(`div`,{style:{padding:`20px 24px`,maxWidth:900,margin:`0 auto`,color:L.textMuted},children:`Loading…`});if(n)return(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:900,margin:`0 auto`,color:L.danger},children:[`Error: `,String(n)]});if(!e)return null;let r=e.thrash.length>0,i=e.drift.length>0,a=e.repetition.length>0,o=e.secrets.length>0,s=e.sessionCount===0&&!r&&!i&&!a&&!o;return(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:900,margin:`0 auto`},children:[(0,j.jsx)(Wc,{burn:e.burn,weekStart:e.weekStart}),(0,j.jsxs)(`div`,{style:{display:`flex`,gap:24,marginBottom:28,color:L.textMuted,fontSize:z.base},children:[(0,j.jsxs)(`span`,{children:[(0,j.jsx)(`span`,{className:`vy-mono`,style:{color:L.text,fontWeight:ya.semibold},children:e.sessionCount}),` `,`session`,e.sessionCount===1?``:`s`,` active`]}),(0,j.jsxs)(`span`,{children:[(0,j.jsx)(`span`,{className:`vy-mono`,style:{color:e.wasteCents>0?L.danger:L.text,fontWeight:ya.semibold},children:Rc(e.wasteCents)}),` `,`attributed waste`]})]}),s&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`No activity recorded this week.`}),r&&(0,j.jsx)(Bc,{title:`Thrash`,count:e.thrash.length,children:e.thrash.map(e=>(0,j.jsxs)(`div`,{style:Uc,children:[(0,j.jsxs)(`span`,{style:{color:L.danger,minWidth:56,fontFamily:R.mono},children:[e.errorCount,` err`]}),(0,j.jsx)(Hc,{name:e.name,id:e.sessionId}),(0,j.jsx)(Vc,{id:e.sessionId})]},e.sessionId))}),i&&(0,j.jsx)(Bc,{title:`Plan drift`,count:e.drift.length,children:e.drift.map(e=>(0,j.jsxs)(`div`,{style:Uc,children:[(0,j.jsxs)(`span`,{style:{color:L.warning,minWidth:80,fontFamily:R.mono},children:[e.reopens,` reopen`,e.reopens===1?``:`s`]}),(0,j.jsx)(Hc,{name:e.name,id:e.sessionId}),e.tokensInReopens>0&&(0,j.jsxs)(`span`,{className:`vy-mono`,style:{color:L.textMuted,fontSize:z.sm,whiteSpace:`nowrap`},children:[U(e.tokensInReopens),` tok`]}),(0,j.jsx)(Vc,{id:e.sessionId})]},e.sessionId))}),a&&(0,j.jsx)(Bc,{title:`Repeated instructions`,count:e.repetition.length,children:e.repetition.map((e,t)=>(0,j.jsx)(Gc,{cluster:e},t))}),o&&(0,j.jsx)(Bc,{title:`Secrets (redacted)`,count:e.secrets.length,children:e.secrets.map((e,t)=>(0,j.jsx)(Kc,{finding:e},`${e.sessionId}-${e.msgIdx}-${t}`))})]})}var Jc={"claude-code":L.platformClaude,codex:L.platformCodex,cursor:L.platformCursor};function Yc(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s ago`:`${Math.floor(n/60)}h ${n%60}m ago`}function Xc(e){let t=e.totalInputTokens+e.totalOutputTokens;return t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,``)+`M`:t>=1e3?Math.round(t/1e3)+`k`:String(t)}function Zc({fresh:e}){return(0,j.jsxs)(`span`,{style:{position:`relative`,display:`inline-flex`,width:9,height:9,flexShrink:0},children:[e&&(0,j.jsx)(`span`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:L.positive,animation:`vy-ping 1.4s cubic-bezier(0,0,0.2,1) infinite`}}),(0,j.jsx)(`span`,{style:{position:`relative`,width:9,height:9,borderRadius:`50%`,background:e?L.positive:L.textFaint}})]})}function Qc({row:e,now:t}){let n=e.endedAt?t-new Date(e.endedAt).getTime():1/0,r=n<9e4,i=Jc[e.platform]??L.platformClaude;return(0,j.jsxs)(br,{to:`/session/$id`,params:{id:e.id},style:{display:`grid`,gridTemplateColumns:`14px 1fr 90px 80px 110px`,alignItems:`center`,gap:12,padding:`12px 14px`,textDecoration:`none`,borderBottom:`1px solid ${L.border}`,background:r?L.surface:`transparent`},onMouseEnter:e=>e.currentTarget.style.background=L.surfaceRaised,onMouseLeave:e=>e.currentTarget.style.background=r?L.surface:`transparent`,children:[(0,j.jsx)(Zc,{fresh:r}),(0,j.jsxs)(`span`,{style:{minWidth:0},children:[(0,j.jsx)(`span`,{style:{display:`block`,color:L.text,fontWeight:ya.medium,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.name}),e.project&&e.project!==e.name&&(0,j.jsx)(`span`,{style:{display:`block`,color:L.textFaint,fontSize:z.xs,fontFamily:R.mono,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.project})]}),(0,j.jsx)(`span`,{style:{color:i,fontSize:z.xs,fontFamily:R.mono},children:e.platform}),(0,j.jsxs)(`span`,{style:{color:L.textMuted,fontSize:z.sm,fontFamily:R.mono,textAlign:`right`},children:[e.messageCount,` msg · `,Xc(e)]}),(0,j.jsx)(`span`,{style:{color:r?L.positive:L.textFaint,fontSize:z.sm,fontFamily:R.mono,textAlign:`right`},children:Yc(n)})]})}function $c(){let{data:e,isLoading:t,error:n}=I({queryKey:[`live`],queryFn:Ma,refetchInterval:5e3}),[,r]=(0,_.useState)(0);(0,_.useEffect)(()=>{let e=setInterval(()=>r(e=>e+1),1e3);return()=>clearInterval(e)},[]);let i=Date.now(),a=e?.sessions??[],o=a.filter(e=>e.endedAt&&i-new Date(e.endedAt).getTime()<9e4).length;return(0,j.jsxs)(`div`,{style:{padding:`20px 24px`,maxWidth:860,margin:`0 auto`},children:[(0,j.jsx)(`style`,{children:`@keyframes vy-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }`}),(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:12,marginBottom:6},children:[(0,j.jsx)(`h2`,{style:{margin:0,fontSize:z.xl,fontWeight:ya.semibold,color:L.text,fontFamily:R.sans},children:`Live`}),o>0?(0,j.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,color:L.positive,fontSize:z.sm,fontFamily:R.mono},children:[(0,j.jsx)(Zc,{fresh:!0}),` `,o,` active now`]}):(0,j.jsx)(`span`,{style:{color:L.textFaint,fontSize:z.sm,fontFamily:R.mono},children:`idle`})]}),(0,j.jsxs)(`p`,{style:{margin:`0 0 18px`,color:L.textMuted,fontSize:z.sm},children:[`Sessions written in the last `,e?.windowMinutes??15,` minutes, updating as your agents work. Jump in to watch.`]}),t&&(0,j.jsx)(`div`,{style:{color:L.textMuted},children:`Loading…`}),n&&(0,j.jsxs)(`div`,{style:{color:L.danger},children:[`Error: `,String(n)]}),e&&a.length===0&&(0,j.jsxs)(`div`,{style:{border:`1px dashed ${L.border}`,borderRadius:_a.md,padding:ga[7],textAlign:`center`,color:L.textMuted,fontSize:z.sm},children:[(0,j.jsx)(`div`,{style:{marginBottom:6,color:L.textFaint},children:`Nothing running right now.`}),`Start a Claude Code or Codex session and it’ll appear here live — no refresh needed.`]}),a.length>0&&(0,j.jsx)(`div`,{style:{border:`1px solid ${L.border}`,borderRadius:_a.md,overflow:`hidden`,background:L.surface},children:a.map(e=>(0,j.jsx)(Qc,{row:e,now:i},e.id))})]})}var el=new Ji({defaultOptions:{queries:{staleTime:3e4}}});function tl(){let{phase:e}=Ja();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)($a,{queryClient:el}),(0,j.jsx)(to,{}),(0,j.jsx)(`div`,{style:{paddingTop:e===`idle`?44:72},children:(0,j.jsx)(Pr,{})})]})}var W=Tr({component:tl}),nl=Cr({getParentRoute:()=>W,path:`/`,beforeLoad:()=>{throw _t({to:`/sessions`,search:{project:``,model:``,platform:``,dateFrom:``,dateTo:``,tag:``}})}}),rl=Cr({getParentRoute:()=>W,path:`/sessions`,validateSearch:e=>({project:e.project??``,model:e.model??``,platform:e.platform??``,dateFrom:e.dateFrom??``,dateTo:e.dateTo??``,tag:e.tag??``}),component:nc}),il=Cr({getParentRoute:()=>W,path:`/analytics`,component:bc}),al=Cr({getParentRoute:()=>W,path:`/waste`,component:V}),ol=Cr({getParentRoute:()=>W,path:`/search`,component:So}),sl=Cr({getParentRoute:()=>W,path:`/kit`,component:Lc}),G=Cr({getParentRoute:()=>W,path:`/this-week`,component:qc}),cl=Cr({getParentRoute:()=>W,path:`/live`,component:$c}),ll=Cr({getParentRoute:()=>W,path:`/session/$id`,component:zs}),ul=zr({routeTree:W.addChildren([nl,rl,cl,il,al,ol,sl,G,ll])});function dl(){return no(),null}Ea();var fl=document.getElementById(`root`);fa.createRoot(fl).render((0,j.jsx)(_.StrictMode,{children:(0,j.jsxs)(Zi,{client:el,children:[(0,j.jsx)(dl,{}),(0,j.jsx)(Hr,{router:ul})]})}));
|