@a-t-h-i/bot-lobby 0.6.45 → 0.6.47

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.
@@ -1,110 +0,0 @@
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,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(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},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=document.querySelector(`meta[property="csp-nonce"]`),d=u?.nonce||u?.content;d&&(window.__webpack_nonce__=d);var f=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 ee(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,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(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 te(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ne=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)};function re(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ne)}catch(e){ne(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ie(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else re(ie.bind(null,e))}var ae={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ae,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ie,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=re,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),p=o(((e,t)=>{t.exports=f()})),m=l(p(),1),h,g=new Set;function _(){for(let e of[...g])e()}typeof window<`u`&&(window.addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),h=e,_()}),window.addEventListener(`appinstalled`,()=>{h=void 0,_()}));function v(e){return g.add(e),()=>{g.delete(e)}}function y(){return{available:(0,m.useSyncExternalStore)(v,()=>h!==void 0,()=>!1),install:async()=>{let e=h;e&&(await e.prompt().catch(()=>void 0),await e.userChoice?.catch(()=>void 0),h=void 0,_())}}}function b(){let e=`(display-mode: fullscreen), (display-mode: standalone), (display-mode: minimal-ui)`,[t,n]=(0,m.useState)(()=>typeof window<`u`&&window.matchMedia(e).matches);return(0,m.useEffect)(()=>{let t=window.matchMedia(e),r=()=>n(t.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]),t}function x(){let e=typeof document<`u`&&typeof document.documentElement.requestFullscreen==`function`,[t,n]=(0,m.useState)(()=>typeof document<`u`&&document.fullscreenElement!==null);return(0,m.useEffect)(()=>{let e=()=>n(document.fullscreenElement!==null);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),{supported:e,on:t,toggle:async()=>{document.fullscreenElement?await document.exitFullscreen().catch(()=>void 0):await document.documentElement.requestFullscreen().catch(()=>void 0)}}}var S=[`background`,`foreground`,`card`,`card-foreground`,`popover`,`popover-foreground`,`primary`,`primary-foreground`,`secondary`,`secondary-foreground`,`muted`,`muted-foreground`,`accent`,`accent-foreground`,`destructive`,`border`,`input`,`ring`,`chart-1`,`chart-2`,`chart-3`,`chart-4`,`chart-5`],C=[`font-sans`,`font-mono`],w=new Set([...S,...C]),T=/^[\w\s#%.,()/+*'"-]{1,300}$/,E=/url\s*\(|expression|import|javascript|\\|<|>/i;function D(e){let t=e.replace(/!important/gi,``).trim();if(t&&T.test(t)&&!E.test(t))return t}function O(e,t,n){let r=e.replace(/^--/,``).toLowerCase();if(!w.has(r))return;let i=D(t);i&&(n[r]=i)}function k(e){let t={};for(let n of e.matchAll(/--([a-z0-9-]+)\s*:\s*([^;}]+)/gi))O(n[1],n[2],t);return t}function A(e){if(!e||typeof e!=`object`)return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&O(n,r,t);return Object.keys(t).length>0?t:void 0}function j(e){let t=e.trim();if(!t)return{error:`Paste a theme first.`};if(t.length>2e5)return{error:`That file is too large to be a theme.`};let n={},r={},i;if(t.startsWith(`{`)){let e;try{e=JSON.parse(t)}catch{return{error:`That is not valid JSON or CSS.`}}let a=e,o=a.cssVars;if(!o||typeof o!=`object`)return{error:`That JSON has no cssVars. Copy the theme's CSS from tweakcn instead.`};let s=e=>{let t={};for(let[n,r]of Object.entries(e??{}))typeof r==`string`&&O(n,r,t);return t};n={...s(o.theme),...s(o.light)},r={...s(o.theme),...s(o.dark)},i=typeof a.title==`string`?a.title:typeof a.name==`string`?a.name:void 0}else for(let e of t.matchAll(/(?<=^|[}\s])((?::root|html|\.dark|:root\.dark|html\.dark)(?:\s*,\s*[^{]+)?)\s*\{([^}]*)\}/g)){let t=e[1].trim(),i=k(e[2]);/\.dark/.test(t)?r={...r,...i}:n={...n,...i}}let a=e=>Object.keys(e).filter(e=>S.includes(e)).length;return a(n)<5&&a(r)<5?{error:`No theme colours found. Copy the code from tweakcn's Code panel (the :root and .dark blocks).`}:{...a(n)>=5?{light:n}:{},...a(r)>=5?{dark:r}:{},...i?{name:i}:{}}}var M={"glass-border":`var(--border)`,typing:`var(--ring)`,"tab-active":`color-mix(in oklab, var(--primary) 14%, var(--background))`,you:`color-mix(in oklab, var(--primary) 9%, var(--card))`,heading:`var(--foreground)`,link:`var(--primary)`,bullet:`var(--primary)`},N=`"Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,ee=`ui-monospace, "JetBrains Mono", "Cascadia Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`;function te(e,t){let n=[];for(let[e,r]of Object.entries(t))e===`font-sans`?n.push(`--app-font-sans:${r},${N};`):e===`font-mono`?n.push(`--app-font-mono:${r},${ee};`):n.push(`--${e}:${r};`);for(let[e,r]of Object.entries(M))e in t||n.push(`--${e}:${r};`);return`${e}{${n.join(``)}}`}function P(e){let t=[];return e.light&&t.push(te(`:root`,e.light)),e.dark&&t.push(te(`.dark`,e.dark)),t.join(`
2
- `)}var ne=`mist`,re=[{id:ne,name:`Default`},{id:`blossom`,name:`Blossom`,light:{background:`oklch(0.982446 0.010114 325.653)`,foreground:`oklch(0.325698 0.116116 325.037)`,card:`oklch(0.971835 0.012884 321.894)`,"card-foreground":`oklch(0.325698 0.116116 325.037)`,popover:`oklch(1 0 0)`,"popover-foreground":`oklch(0.325698 0.116116 325.037)`,primary:`oklch(0.591646 0.217985 0.584)`,"primary-foreground":`oklch(1 0 0)`,secondary:`oklch(0.869588 0.06751 334.899)`,"secondary-foreground":`oklch(0.444777 0.134061 324.799)`,muted:`oklch(0.802407 0.090963 345.892)`,"muted-foreground":`oklch(0.428932 0.163929 354.332)`,accent:`oklch(0.939552 0.024286 321.664)`,"accent-foreground":`oklch(0.396296 0.025134 285.196)`,destructive:`oklch(0.627117 0.248974 7.734)`,border:`oklch(0.923531 0.021247 328.096)`,input:`oklch(0.851713 0.055822 336.6)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.591646 0.217985 0.584)`},dark:{background:`oklch(0.22813 0.020366 307.469)`,foreground:`oklch(0.980735 0.004092 301.426)`,card:`oklch(0.267101 0.02016 311.799)`,"card-foreground":`oklch(0.980735 0.004092 301.426)`,popover:`oklch(0.154761 0.01316 338.901)`,"popover-foreground":`oklch(0.980735 0.004092 301.426)`,primary:`oklch(0.460685 0.185347 4.099)`,"primary-foreground":`oklch(0.901233 0.057189 343.694)`,secondary:`oklch(0.313674 0.030572 310.061)`,"secondary-foreground":`oklch(0.848252 0.038248 307.961)`,muted:`oklch(0.360924 0.021469 316.83)`,"muted-foreground":`oklch(0.880303 0.03077 342.696)`,accent:`oklch(0.364912 0.050794 308.491)`,"accent-foreground":`oklch(0.964695 0.009139 341.803)`,destructive:`oklch(0.458704 0.169677 3.815)`,border:`oklch(0.266943 0.015262 302.425)`,input:`oklch(0.266817 0.02897 344.461)`,ring:`oklch(0.591646 0.217985 0.584)`,"chart-1":`oklch(0.460685 0.185347 4.099)`}},{id:`grove`,name:`Grove`,light:{background:`oklch(0.972369 0.005497 157.15)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.972369 0.005497 157.15)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.932695 0.003778 160.944)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.523295 0.112292 158.089)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.936464 0.014601 163.554)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.945455 0.012308 162.879)`,"muted-foreground":`oklch(0.527266 0.012309 320.683)`,accent:`oklch(0.909438 0.021521 164.612)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.864831 0.01312 167.255)`,input:`oklch(0.829746 0.016084 168.234)`,ring:`oklch(0.523295 0.112292 158.089)`,"chart-1":`oklch(0.523295 0.112292 158.089)`},dark:{background:`oklch(0.260865 0.02152 162.75)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.260865 0.02152 162.75)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.411828 0.014378 166.627)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.796228 0.133058 157.319)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.380487 0.048313 159.608)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.339728 0.039456 160.274)`,"muted-foreground":`oklch(0.715427 0.010896 171.428)`,accent:`oklch(0.437021 0.060312 158.962)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.457475 0.044046 160.971)`,input:`oklch(0.519849 0.049896 160.863)`,ring:`oklch(0.796228 0.133058 157.319)`,"chart-1":`oklch(0.796228 0.133058 157.319)`}},{id:`ocean`,name:`Ocean`,light:{background:`oklch(0.974199 0.002856 241.597)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.974199 0.002856 241.597)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.934442 0.003181 269.1)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.536684 0.120219 247.01)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.939254 0.01193 241.729)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.948004 0.009649 241.695)`,"muted-foreground":`oklch(0.528741 0.01828 313.823)`,accent:`oklch(0.91295 0.018827 241.836)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.867646 0.013482 252.362)`,input:`oklch(0.832939 0.017389 252.598)`,ring:`oklch(0.536684 0.120219 247.01)`,"chart-1":`oklch(0.536684 0.120219 247.01)`},dark:{background:`oklch(0.242641 0.024125 250.573)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.242641 0.024125 250.573)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.398517 0.018232 255.72)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.758933 0.105833 241.548)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.358725 0.043145 244.911)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.319287 0.036766 246.065)`,"muted-foreground":`oklch(0.691936 0.016294 261.588)`,accent:`oklch(0.413315 0.051874 243.855)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.438653 0.039496 245.44)`,input:`oklch(0.500905 0.043574 244.781)`,ring:`oklch(0.758933 0.105833 241.548)`,"chart-1":`oklch(0.758933 0.105833 241.548)`}},{id:`ember`,name:`Ember`,light:{background:`oklch(0.976527 0.002685 60.725)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976527 0.002685 60.725)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936659 0.002879 29.96)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.552831 0.129438 44.656)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.942267 0.01151 50.785)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950842 0.009273 51.528)`,"muted-foreground":`oklch(0.530413 0.018453 341.181)`,accent:`oklch(0.916502 0.01832 49.597)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.870631 0.013204 39.431)`,input:`oklch(0.836213 0.017153 38.661)`,ring:`oklch(0.552831 0.129438 44.656)`,"chart-1":`oklch(0.552831 0.129438 44.656)`},dark:{background:`oklch(0.245899 0.019144 42.044)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.245899 0.019144 42.044)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.401111 0.014308 34.896)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.762174 0.124117 52.082)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.361499 0.044052 49.515)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.322144 0.03574 48.309)`,"muted-foreground":`oklch(0.692479 0.015227 30.963)`,accent:`oklch(0.416048 0.055354 50.484)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.44099 0.040202 48.807)`,input:`oklch(0.503003 0.045721 49.44)`,ring:`oklch(0.762174 0.124117 52.082)`,"chart-1":`oklch(0.762174 0.124117 52.082)`}},{id:`iris`,name:`Iris`,light:{background:`oklch(0.976531 0.003855 303.226)`,foreground:`oklch(0.222003 0.03479 328.979)`,card:`oklch(0.976531 0.003855 303.226)`,"card-foreground":`oklch(0.222003 0.03479 328.979)`,popover:`oklch(0.936665 0.005041 310.132)`,"popover-foreground":`oklch(0.222003 0.03479 328.979)`,primary:`oklch(0.525348 0.15373 294.176)`,"primary-foreground":`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.941387 0.014687 300.474)`,"secondary-foreground":`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950194 0.011956 300.733)`,"muted-foreground":`oklch(0.529955 0.022319 321.556)`,accent:`oklch(0.914882 0.022965 299.986)`,"accent-foreground":`oklch(0.222003 0.03479 328.979)`,destructive:`oklch(0.637823 0.237287 25.436)`,border:`oklch(0.869608 0.018226 303.859)`,input:`oklch(0.834773 0.023405 303.676)`,ring:`oklch(0.525348 0.15373 294.176)`,"chart-1":`oklch(0.525348 0.15373 294.176)`},dark:{background:`oklch(0.225975 0.031062 293.741)`,foreground:`oklch(0.990339 0.008411 325.64)`,card:`oklch(0.225975 0.031062 293.741)`,"card-foreground":`oklch(0.990339 0.008411 325.64)`,popover:`oklch(0.386739 0.024023 297.509)`,"popover-foreground":`oklch(0.990339 0.008411 325.64)`,primary:`oklch(0.671712 0.169136 293.929)`,"primary-foreground":`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.325405 0.063614 294.23)`,"secondary-foreground":`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.291515 0.05276 294.209)`,"muted-foreground":`oklch(0.663321 0.025932 301.862)`,accent:`oklch(0.372436 0.07841 294.204)`,"accent-foreground":`oklch(0.990339 0.008411 325.64)`,destructive:`oklch(0.655108 0.221148 23.473)`,border:`oklch(0.40874 0.058536 295.893)`,input:`oklch(0.46756 0.065775 296.265)`,ring:`oklch(0.671712 0.169136 293.929)`,"chart-1":`oklch(0.671712 0.169136 293.929)`}}],ie={light:{background:`#fcfcfc`,card:`#ffffff`,primary:`#1b4ed8`,accent:`#f4f4f5`},dark:{background:`#0a0a0a`,card:`#111111`,primary:`#346bf1`,accent:`#141414`}};function ae(e,t){let n=t?e.dark:e.light,r=ie[t?`dark`:`light`];return n?{background:n.background??r.background,card:n.card??r.card,primary:n.primary??r.primary,accent:n.primary?`color-mix(in oklab, ${n.primary} 18%, ${n.background??r.background})`:r.accent}:{...r}}var oe={activity:400,thoughts:40,chat:100};function se(e,t,n){let r=e??[],i=new Set(r.map(e=>e.id)),a=t.filter(e=>typeof e?.id==`number`&&!i.has(e.id));return[...r,...a].slice(-n)}var ce=class{records=new Map;listeners=new Set;reads=new Map;used=new Set;reader;currentStatus={connection:`connecting`,signedOut:!1};get(e){let t=this.records.get(e);if(t)return t;let n={version:0,data:void 0,loading:!1,error:void 0,stale:!1};return this.records.set(e,n),n}status(){return{...this.currentStatus}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}markUsed(e,t){this.reader=t;let n=e.filter(e=>!this.used.has(e));this.used=new Set(e);for(let e of n)this.read(e)}onHello(e){for(let t of this.used){let n=e[t];n!==void 0&&(this.get(t).version=n),this.read(t)}}onChanged(e,t){let n=this.get(e);n.version=t,this.used.has(e)?this.read(e):n.stale=!0,this.notify()}onFeedDelta(e){let t=this.get(`lobby`).data;t&&(this.get(`lobby`).data={...t,activity:se(t.activity,e.activity??[],oe.activity),thoughts:se(t.thoughts,e.thoughts??[],oe.thoughts),chat:se(t.chat,e.chat??[],oe.chat)},this.notify())}onReplyDelta(e){let t=this.get(`lobby`),n=t.data;n&&(t.data={...n,reply:e},this.notify())}onStatus(e){this.currentStatus={...this.currentStatus,...e},this.notify()}async read(e){let t=this.reader;if(!t)return;let n=(this.reads.get(e)??0)+1;this.reads.set(e,n);let r=this.get(e);r.loading=!0,r.error=void 0,this.notify();try{let i=await t(e);if(this.reads.get(e)!==n)return;this.apply(r,i)}catch(t){if(this.reads.get(e)!==n)return;r.loading=!1,r.error=t instanceof Error?t.message:String(t)}this.notify()}apply(e,t){e.data=t,e.loading=!1,e.stale=!1,e.error=void 0}notify(){for(let e of[...this.listeners])e()}};function le(){return new ce}var F=le(),ue=/^[a-f0-9]{32}$/;function de(){return globalThis.location}function fe(){let e=de()?.search??``,t=new URLSearchParams(e).getAll(`project`);if(t.length){if(t.length!==1||!ue.test(t[0]))throw Error(`Invalid project ID. Choose a running project below.`);return t[0]}}function I(e){if(!e.startsWith(`/api/`)&&!e.startsWith(`/files/preview/`))return e;let t=fe();return t?`/projects/${t}${e}`:e}function L(e,t){if(!ue.test(e))throw Error(`Invalid project ID.`);let n=de();if(!n)throw Error(`Project switching requires a browser.`);let r=new URL(n.origin);r.pathname=n.pathname,r.searchParams.set(`project`,e),r.hash=`/${t}`,n.assign(r.href)}var pe=`bot-lobby.projectFolders`,me=new Map;function he(){try{return globalThis.sessionStorage}catch{return}}function ge(){try{let e=JSON.parse(he()?.getItem(pe)??`{}`);for(let[t,n]of Object.entries(e))ue.test(t)&&typeof n==`string`&&me.set(t,n)}catch{}}function _e(e){ge();for(let t of e)ue.test(t.id)&&me.set(t.id,t.cwd);try{he()?.setItem(pe,JSON.stringify(Object.fromEntries([...me].slice(-64))))}catch{}}function ve(e){return me.has(e)||ge(),me.get(e)}async function ye(e){let t;try{t=fe()}catch{return!1}if(!t)return!1;let n=ve(t);if(!n)return!1;let{projects:r}=await e();if(_e(r),r.some(e=>e.id===t))return!1;let i=r.find(e=>e.cwd===n),a=de(),o=globalThis.history;if(!i||!a||!o)return!1;let s=new URL(a.origin);return s.pathname=a.pathname,s.search=a.search,s.searchParams.set(`project`,i.id),s.hash=globalThis.location?.hash??``,o.replaceState(null,``,s.href),!0}var be=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},xe={"Content-Type":`application/json`};async function Se(e,t={}){let n=await fetch(e===`auth.login`||e.startsWith(`projects.`)?`/api/${e}`:I(`/api/${e}`),{method:`POST`,headers:xe,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new be(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&F.onStatus({signedOut:!0}),new be(r.error,r.code,n.status);return r.result}function Ce(){return globalThis.location}async function we(){let e=Ce(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:xe,body:JSON.stringify({token:t}),credentials:`same-origin`}).catch(()=>void 0))?.ok)return!1;let n=globalThis.history;return n&&n.replaceState(null,``,e.pathname+e.search),F.onStatus({signedOut:!1}),!0}var Te=`bot-lobby.palette`,Ee=`bot-lobby-palette`,De=`custom`,Oe=new Set,ke=je();function Ae(e){let t=e;if(!t||typeof t.id!=`string`||typeof t.name!=`string`)return;let n=A(t.light),r=A(t.dark);if(n||r)return{id:t.id,name:t.name.slice(0,40),...n?{light:n}:{},...r?{dark:r}:{}}}function je(){try{let e=localStorage.getItem(Te);if(!e)return{id:ne,saved:[]};let t=JSON.parse(e),n=(t.saved??[]).map(Ae).filter(e=>!!e),r=Ae(t.legacy??(t.custom?{...t.custom,id:De}:void 0)),i=new Set([...re.map(e=>e.id),...n.map(e=>e.id),...r?[De]:[]]);return{id:t.id&&i.has(t.id)?t.id:ne,saved:n,...r?{legacy:r}:{}}}catch{return{id:ne,saved:[]}}}function Me(e){return[...re,...e.saved,...e.legacy?[e.legacy]:[]]}function Ne(e){return Me(e).find(t=>t.id===e.id)??re[0]}function Pe(){if(typeof document>`u`)return;let e=P(Ne(ke)),t=document.getElementById(Ee);if(!e){t?.remove();return}t||(t=document.createElement(`style`),t.id=Ee,document.head.appendChild(t)),t.textContent=e}function Fe(e){ke=e;try{localStorage.setItem(Te,JSON.stringify(e))}catch{}Pe();for(let e of[...Oe])e()}function Ie(e){let t=e.themes.map(e=>Ae(e)).filter(e=>!!e),{legacy:n}=ke;Fe({id:e.active??(ke.id===De&&n?De:`mist`),saved:t,...n?{legacy:n}:{}})}var Le;function Re(e=!1){return Le&&!e||(Le=(async()=>{let e=await Se(`themes.get`,{}),t=ke.legacy;if(t){let n=e.active??(ke.id===De?void 0:ke.id);e=await Se(`themes.save`,{name:t.name,...t.light?{light:t.light}:{},...t.dark?{dark:t.dark}:{}}),n&&(e=await Se(`themes.choose`,{id:n}));let{legacy:r,...i}=ke;ke=i}Ie(e)})().catch(()=>{Le=void 0})),Le}typeof window<`u`&&(Pe(),window.addEventListener(`storage`,e=>{if(e.key===Te){ke=je(),Pe();for(let e of[...Oe])e()}}),window.addEventListener(`focus`,()=>void Re(!0)));function ze(e){return Oe.add(e),()=>{Oe.delete(e)}}function Be(){let e=(0,m.useSyncExternalStore)(ze,()=>ke,()=>ke),t=(0,m.useCallback)(e=>{Fe({...ke,id:e}),e!==De&&Se(`themes.choose`,{id:e}).then(Ie,()=>{})},[]),n=(0,m.useCallback)(async(e,t)=>(Ie(await Se(`themes.save`,{name:t,...e.light?{light:e.light}:{},...e.dark?{dark:e.dark}:{}})),Ne(ke)),[]),r=(0,m.useCallback)(async(e,t)=>Ie(await Se(`themes.rename`,{id:e,name:t})),[]),i=(0,m.useCallback)(async e=>Ie(await Se(`themes.remove`,{id:e})),[]),a=e.legacy?[...e.saved,e.legacy]:e.saved;return{active:Ne(e),saved:a,all:Me(e),isSaved:e=>a.some(t=>t.id===e),choose:t,adopt:n,rename:r,remove:i}}var Ve=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})),He=o(((e,t)=>{t.exports=Ve()})),Ue=(0,m.createContext)({});function We(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Ge=typeof window<`u`?m.useLayoutEffect:m.useEffect,Ke=(0,m.createContext)(null);function qe(e,t){e.indexOf(t)===-1&&e.push(t)}function Je(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ye=(e,t,n)=>n>t?t:n<e?e:n,Xe={},Ze=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Qe=e=>typeof e==`object`&&!!e,$e=e=>/^0[^.\s]+$/u.test(e);function et(e){let t;return()=>(t===void 0&&(t=e()),t)}var tt=e=>e,nt=(...e)=>e.reduce((e,t)=>n=>t(e(n))),rt=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},it=class{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>this.remove(e)}remove(e){Je(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},at=e=>e*1e3,ot=e=>e/1e3,st=(e,t)=>t?1e3/t*e:0,ct=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},lt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ut=1e-7,dt=12;function ft(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=lt(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ut&&++s<dt);return o}function pt(e,t,n,r){if(e===t&&n===r)return tt;let i=t=>ft(t,0,1,e,n);return e=>e===0||e===1?e:lt(i(e),t,r)}var mt=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ht=e=>t=>1-e(1-t),gt=pt(.33,1.53,.69,.99),_t=ht(gt),vt=mt(_t),yt=e=>e>=1?1:(e*=2)<1?.5*_t(e):.5*(2-2**(-10*(e-1))),bt=e=>1-Math.sin(Math.acos(e)),xt=ht(bt),St=mt(bt),Ct=pt(.42,0,1,1),wt=pt(0,0,.58,1),Tt=pt(.42,0,.58,1),Et=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Dt(e,t){return Et(e)?e[ct(0,e.length,t)]:e}var Ot=e=>Array.isArray(e)&&typeof e[0]==`number`,kt={linear:tt,easeIn:Ct,easeInOut:Tt,easeOut:wt,circIn:bt,circInOut:St,circOut:xt,backIn:_t,backInOut:vt,backOut:gt,anticipate:yt},At=e=>typeof e==`string`,jt=e=>{if(Ot(e)){e.length;let[t,n,r,i]=e;return pt(t,n,r,i)}return At(e)?(kt[e],`${e}`,kt[e]):e},Mt={delta:0,timestamp:0,isProcessing:!1},Nt;function Pt(){Nt=void 0}var Ft={now:()=>(Nt===void 0&&Ft.set(Mt.isProcessing||Xe.useManualTiming?Mt.timestamp:performance.now()),Nt),set:e=>{Nt=e,queueMicrotask(Pt)}},It=e=>Math.round(e*1e5)/1e5,Lt=e=>t=>typeof t==`string`&&t.startsWith(e),Rt=Lt(`--`),zt=Lt(`var(--`),Bt=e=>zt(e)?Vt.test(e.split(`/*`)[0].trim()):!1,Vt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ht(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Ut={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Wt={...Ut,transform:e=>Ye(0,1,e)},Gt={...Ut,default:1},Kt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qt(e){return e==null}var Jt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yt=(e,t)=>n=>!!(typeof n==`string`&&Jt.test(n)&&n.startsWith(e)||t&&!qt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Kt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Zt=e=>Ye(0,255,e),Qt={...Ut,transform:e=>Math.round(Zt(e))},$t={test:Yt(`rgb`,`red`),parse:Xt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Qt.transform(e)+`, `+Qt.transform(t)+`, `+Qt.transform(n)+`, `+It(Wt.transform(r))+`)`};function en(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var tn={test:Yt(`#`),parse:en,transform:$t.transform},nn=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rn=nn(`deg`),an=nn(`%`),R=nn(`px`),on=nn(`vh`),sn=nn(`vw`),cn={...an,parse:e=>an.parse(e)/100,transform:e=>an.transform(e*100)},ln={test:Yt(`hsl`,`hue`),parse:Xt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+an.transform(It(t))+`, `+an.transform(It(n))+`, `+It(Wt.transform(r))+`)`},un={test:e=>$t.test(e)||tn.test(e)||ln.test(e),parse:e=>$t.test(e)?$t.parse(e):ln.test(e)?ln.parse(e):tn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?$t.transform(e):ln.transform(e),getAnimatableNone:e=>{let t=un.parse(e);return t.alpha=0,un.transform(t)}},dn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,fn=new RegExp(Kt.source),pn=new RegExp(dn.source,`i`);function mn(e){return isNaN(e)&&typeof e==`string`&&(fn.test(e)||pn.test(e))}var hn=`number`,gn=`color`,_n=`var`,vn=`var(`,yn="${}",bn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xn(e){let t=e.toString();return fn.test(t)||pn.test(t)}function Sn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(bn,e=>(un.test(e)?(r.color.push(a),i.push(gn),n.push(un.parse(e))):e.startsWith(vn)?(r.var.push(a),i.push(_n),n.push(e)):(r.number.push(a),i.push(hn),n.push(parseFloat(e))),++a,yn)).split(yn),indexes:r,types:i}}function Cn(e){return Sn(e).values}function wn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===hn?It(r[a]):e===gn?un.transform(r[a]):r[a]}return i}}function Tn(e){return wn(Sn(e))}var En=e=>typeof e==`number`?0:un.test(e)?un.getAnimatableNone(e):e,Dn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:En(e);function On(e){let t=Sn(e);return wn(t)(t.values.map((e,n)=>Dn(e,t.split[n])))}var kn={test:mn,parse:Cn,createTransformer:Tn,getAnimatableNone:On};function An(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jn({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=An(s,r,e+1/3),a=An(s,r,e),o=An(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Mn(e,t){return n=>n>0?t:e}var Nn=(e,t,n)=>e+(t-e)*n,Pn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Fn=[tn,$t,ln],In=e=>Fn.find(t=>t.test(e));function Ln(e){let t=In(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===ln&&(n=jn(n)),n}var Rn=(e,t)=>{let n=Ln(e),r=Ln(t);if(!n||!r)return Mn(e,t);let i={...n};return e=>(i.red=Pn(n.red,r.red,e),i.green=Pn(n.green,r.green,e),i.blue=Pn(n.blue,r.blue,e),i.alpha=Nn(n.alpha,r.alpha,e),$t.transform(i))},zn=new Set([`none`,`hidden`]);function Bn(e,t){return zn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vn(e,t){return n=>Nn(e,t,n)}function Hn(e){return typeof e==`number`?Vn:typeof e==`string`?Bt(e)?Mn:un.test(e)?Rn:Kn:Array.isArray(e)?Un:typeof e==`object`?un.test(e)?Rn:Wn:Mn}function Un(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Hn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Wn(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Hn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Gn(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Kn=(e,t)=>{let n=kn.createTransformer(t),r=Sn(e),i=Sn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?zn.has(e)&&!i.values.length||zn.has(t)&&!r.values.length?Bn(e,t):nt(Un(Gn(r,i),i.values),n):(`${e}${t}`,Mn(e,t))},qn=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Jn(e,t){let n=qn.exec(e);if(!n)return;let r=qn.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>It(Nn(a,o,e))+i}function Yn(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Nn(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Jn(e,t);if(n)return n}return Hn(e)(e,t)}var Xn=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Zn(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Qn=40;function $n(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Xn.reduce((e,t)=>(e[t]=Zn(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Xe.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,Qn),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:Xn.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Xn.length;t++)o[Xn[t]].cancel(e)},state:n,steps:o}}var{schedule:er,cancel:tr,steps:nr}=$n(typeof requestAnimationFrame<`u`?requestAnimationFrame:tt,!0,Mt),rr=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>er.update(t,e),stop:()=>tr(t),now:()=>Mt.isProcessing?Mt.timestamp:Ft.now()}},ir=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},ar=2e4;function or(e,t=50,n=ar,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function sr(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(or(r),ar);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ot(i)}}var cr={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},lr=e=>e<0?1/Math.max(1+e,cr.minDamping):Math.max(1-e,cr.minDamping);function ur(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return pr(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function dr(e,t){return e*Math.sqrt(1-t*t)}var fr=12;function pr(e,t,n){let r=n;for(let n=1;n<fr;n++)r-=e(r)/t(r);return r}var mr=.001;function hr({duration:e=cr.duration,bounce:t=cr.bounce}){let n,r;cr.maxDuration;let i=lr(t);e=Ye(cr.minDuration,cr.maxDuration,ot(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=dr(t,i),o=Math.exp(-r);return mr-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=dr(t*t,i);return(-n(t)+mr>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=pr(n,r,a),s=o*ur(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:at(e)}}var gr=(e,t)=>(t?e>=0:e>0)&&e<1/0;function _r(e,t){if(gr(e,t))return e}function vr(e){let t=_r(e.stiffness),n=_r(e.damping,!0),r=_r(e.mass),i={...e,stiffness:t??cr.stiffness,damping:n??cr.damping,mass:r??cr.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=lr(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*ur(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,hr(i)),i.isResolvedFromDuration=!0;(!gr(i.stiffness)||!gr(i.damping,!0))&&(i.stiffness=cr.stiffness,i.damping=cr.damping)}return i}function yr(e=cr.visualDuration,t=cr.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=vr({...n}),f=e=>d?0:-ot(e),p=s/(2*Math.sqrt(o*c)),m=ot(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?cr.restSpeed.granular:cr.restSpeed.default),g.restDelta=n.restDelta||(e?cr.restDelta.granular:cr.restDelta.default)};_();let v,y,b;if(p<1){let e=dr(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>at(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=at(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(or(S),ar),t=ir(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}yr.applyToOptions=e=>{let t=sr(e,100,yr);return e.ease=t.ease,e.duration=at(t.duration),e.type=`keyframes`,e};function br({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=yr({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function xr(e,t,n){let r=[],i=n||Xe.mix||Yn,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=nt(Array.isArray(t)?t[n]||tt:t,a)),r.push(a)}return r}function Sr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=xr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=rt(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Ye(e[0],e[a-1],t)):l}function Cr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=rt(0,t,r);e.push(Nn(n,1,i))}}function wr(e){let t=[0];return Cr(t,e.length-1),t}function Tr(e,t){return e.map(e=>e*t)}function Er(e,t){return e.map(()=>t||Tt).splice(0,e.length-1)}function Dr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Et(r)?r.map(jt):jt(r)||Tt,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(Xe.mix||Yn)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?Ye(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Sr(Tr(n&&n.length===t.length?n:wr(t),e),t,{ease:Array.isArray(i)?i:Er(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Or=5;function kr(e,t,n){let r=Math.max(t-Or,0);return st(n-e(r),t-r)}function Ar(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):kr(t=>e.next(t).value,t,e.next(t).value)}var jr=e=>e!==null;function Mr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(jr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Nr={decay:br,inertia:br,tween:Dr,keyframes:Dr,spring:yr};function Pr(e){typeof e.type==`string`&&(e.type=Nr[e.type])}function Fr(e,t){return{kind:e,animation:t,timestamp:Ft.now(),frameTimestamp:Mt.timestamp,frameIsProcessing:Mt.isProcessing}}function Ir(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...Fr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function Lr(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...Fr(`layout-animation-start`,e),node:t})}catch{}}var Rr=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},zr=e=>e/100,Br=class extends Rr{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Ft.now()&&this.tick(Ft.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),Ir(this,this.options)}initAnimation(){let{options:e}=this;Pr(e);let{type:t=Dr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Dr;s!==Dr&&typeof o[0]!=`number`&&(this.mixKeyframes=nt(zr,Yn(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=or(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=Ye(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==br&&(b.value=Mr(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return ot(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(this.currentTime)}set time(e){e=at(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Ar(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ft.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ot(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=rr,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Ft.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},Vr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Hr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Kt)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Vr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ur=/\b([a-z-]*)\(.*?\)/gu,Wr={...kn,getAnimatableNone:e=>{let t=e.match(Ur);return t?t.map(Hr).join(` `):e}},Gr={...kn,getAnimatableNone:e=>{let t=kn.parse(e);return kn.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Kr={...Ut,transform:Math.round},qr={rotate:rn,pathRotation:rn,rotateX:rn,rotateY:rn,rotateZ:rn,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:rn,skewX:rn,skewY:rn,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:Wt,originX:cn,originY:cn,originZ:R},Jr={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,inset:R,insetBlock:R,insetBlockStart:R,insetBlockEnd:R,insetInline:R,insetInlineStart:R,insetInlineEnd:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,paddingBlock:R,paddingBlockStart:R,paddingBlockEnd:R,paddingInline:R,paddingInlineStart:R,paddingInlineEnd:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,marginBlock:R,marginBlockStart:R,marginBlockEnd:R,marginInline:R,marginInlineStart:R,marginInlineEnd:R,fontSize:R,backgroundPositionX:R,backgroundPositionY:R,...qr,zIndex:Kr,fillOpacity:Wt,strokeOpacity:Wt,numOctaves:Kr},Yr={...Jr,color:un,backgroundColor:un,outlineColor:un,fill:un,stroke:un,borderColor:un,borderTopColor:un,borderRightColor:un,borderBottomColor:un,borderLeftColor:un,filter:Wr,WebkitFilter:Wr,mask:Gr,WebkitMask:Gr},Xr=e=>Yr[e],Zr=new Set([Wr,Gr]);function Qr(e,t){let n=Xr(e);return Zr.has(n)||(n=kn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function $r(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ei=e=>e*180/Math.PI,ti=e=>ri(ei(Math.atan2(e[1],e[0]))),ni={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ti,rotateZ:ti,skewX:e=>ei(Math.atan(e[1])),skewY:e=>ei(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ri=e=>(e%=360,e<0&&(e+=360),e),ii=ti,ai=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),si={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:oi,scale:e=>(ai(e)+oi(e))/2,rotateX:e=>ri(ei(Math.atan2(e[6],e[5]))),rotateY:e=>ri(ei(Math.atan2(-e[2],e[0]))),rotateZ:ii,rotate:ii,skewX:e=>ei(Math.atan(e[4])),skewY:e=>ei(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ci(e){return+!!e.includes(`scale`)}function li(e,t){if(!e||e===`none`)return ci(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=si,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ni,i=t}if(!i)return ci(t);let a=r[t],o=i[1].split(`,`).map(di);return typeof a==`function`?a(o):o[a]}var ui=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return li(n,t)};function di(e){return parseFloat(e.trim())}var fi=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],pi=new Set([...fi,`pathRotation`]),mi=e=>e===Ut||e===R,hi=new Set([`x`,`y`,`z`]),gi=fi.filter(e=>!hi.has(e));function _i(e){let t=[];return gi.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var vi=new Set([`bottom`,`right`]);function yi(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var bi={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>yi(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>yi(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>li(e,`x`),y:({transform:e})=>li(e,`y`)};bi.translateX=bi.x,bi.translateY=bi.y;var xi=new Set,Si=!1,Ci=!1,wi=!1;function Ti(){if(Ci){let e=[],t=new Set,n=new Set;xi.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),vi.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=_i(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ci=!1,Si=!1,xi.forEach(e=>e.complete(wi)),xi.clear()}function Ei(){xi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ci=!0)})}function Di(){wi=!0,Ei(),Ti(),wi=!1}function Oi(e,t,n){if(typeof e==`string`){if(Ze(e)||$e(e))return parseFloat(e);if(!kn.test(e)&&kn.test(n))return Qr(t,n)}return e??void 0}var ki=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(xi.add(this),Si||(Si=!0,er.read(Ei),er.resolveKeyframes(Ti))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Oi(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}$r(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),xi.delete(this)}cancel(){this.state===`scheduled`&&(xi.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Ai=e=>e.startsWith(`--`);function ji(e,t,n){Ai(t)?e.style.setProperty(t,n):e.style[t]=n}var Mi={};function Ni(e,t){let n=et(e);return()=>Mi[t]??n()}var Pi=Ni(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Fi=Ni(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Ii=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Li={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function Ri(e,t){if(e)return typeof e==`function`?Fi()?ir(e,t):`ease-out`:Ot(e)?Ii(e):Array.isArray(e)?e.map(e=>Ri(e,t)||Li.easeOut):Li[e]}function zi(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Ri(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Bi(e){return typeof e==`function`&&`applyToOptions`in e}function Vi({type:e,...t}){return Bi(e)&&Fi()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Hi=class extends Rr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Vi(e);this.animation=zi(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Mr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ji(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},Ir(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ot(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=at(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Pi()?(this.animation.timeline=e,t?.(this.animation),tt):n(this)}},Ui={anticipate:yt,backInOut:vt,circInOut:St};function Wi(e){return e in Ui}function Gi(e){typeof e.ease==`string`&&Wi(e.ease)&&(e.ease=Ui[e.ease])}var Ki=10,qi=class extends Hi{constructor(e){Gi(e),Pr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Br({...a,autoplay:!1}),s=Math.max(Ki,Ft.now()-this.startTime),c=Ye(0,Ki,s-Ki),l=o.sample(s).value,{name:u}=this.options;i&&u&&ji(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Ji=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(kn.test(e)||e===`0`)&&!e.startsWith(`url(`));function Yi(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Xi(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Ji(i,t),s=Ji(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Yi(e)||(n===`spring`||Bi(n))&&r}function Zi(e){e.duration=0,e.type=`keyframes`}var Qi=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),$i=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ea(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&$i.test(e[t]))return!0;return!1}var ta=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),na=et(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function ra(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Qi.has(n)||ta.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return na()&&(Qi.has(n)||ta.has(n)&&ea(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var z=40,ia=class extends Rr{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ft.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||ki;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Ft.now();let u=!0;Xi(e,i,a,o)||(u=!1,(Xe.instantAnimations||!s)&&l?.(Mr(e,n,t)),e[0]=e[e.length-1],Zi(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>z?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&ra(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new qi(n)}catch{m=new Br(n)}}else m=new Br(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Di()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},aa=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return oa(this.animations,`duration`)}get iterationDuration(){return oa(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function oa(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var sa=class extends aa{then(e,t){return this.finished.finally(e).then(()=>{})}};function ca(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var la=30,ua=e=>!isNaN(parseFloat(e)),da={current:void 0},fa=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Ft.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ft.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ua(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new it)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new it,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){er.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return da.current&&da.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>la)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,la);return st(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function pa(e,t){return new fa(e,t)}function ma(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function ha(e,t){let n=e?.[t]??e?.default??e;return n===e?n:ma(n,e)}var ga={type:`spring`,stiffness:500,damping:25,restSpeed:10},_a=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),va={type:`keyframes`,duration:.8},ya={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ba=(e,{keyframes:t})=>t.length>2?va:pi.has(e)?e.startsWith(`scale`)?_a(t[1]):ga:ya,xa=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Sa(e){for(let t in e)if(!xa.has(t))return!0;return!1}var Ca=(e,t,n,r={},i,a)=>o=>{let s=ha(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=at(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Sa(s)||Object.assign(u,ba(e,u)),u.duration&&=at(u.duration),u.repeatDelay&&=at(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Zi(u),u.delay===0&&(d=!0)),(Xe.instantAnimations||Xe.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Zi(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Mr(u.keyframes,s);if(e!==void 0){er.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Br(u):new ia(u)},wa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ta(e){let t=wa.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Ea(e,t,n=1){`${e}`;let[r,i]=Ta(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Ze(e)?parseFloat(e):e}return Bt(i)?Ea(i,t,n+1):i}function Da(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Oa(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Da(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function ka(e,t,n){return Oa(e.getProps(),t,n,e)}var Aa=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,ja=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...fi]),Ma=e=>Array.isArray(e);function Na(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,pa(n))}function Pa(e){return Ma(e)?e[e.length-1]||0:e}function Fa(e,t){let{transitionEnd:n={},transition:r={},...i}=ka(e,t)||{};i={...i,...n};for(let t in i)Na(e,t,Pa(i[t]))}var Ia=e=>!!(e&&e.getVelocity);function La(e){return!!(Ia(e)&&e.add)}function Ra(e,t){let n=e.getValue(`willChange`);if(La(n))return n.add(t);if(!n&&Xe.WillChange){let n=new Xe.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function za(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ba=`data-`+za(`framerAppearId`);function Va(e){return e.props[Ba]}var Ha=typeof window<`u`;function Ua({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Wa(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?ma(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ua(f,t))continue;let o={delay:n,...ha(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){er.update(()=>r.set(i));continue}let p=!1;if(Ha&&window.MotionHandoffAnimation){let n=Va(e);if(n){let e=window.MotionHandoffAnimation(n,t,er);e!==null&&(o.startTime=e,p=!0)}}Ra(e,t);let m=l??e.shouldReduceMotion;r.start(Ca(t,r,i,m&&ja.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>er.update(()=>{o&&Fa(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Ga(e,t,n={}){let r=ka(e,t,Aa(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Wa(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Ga(e,t,{...n,delay:r+(typeof o==`function`?0:o)+ca(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Ka(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Ga(e,t,n))):typeof t==`string`?Ga(e,t,n):Promise.all(Wa(e,ka(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var qa={test:e=>e===`auto`,parse:e=>e},Ja=e=>t=>t.test(e),Ya=[Ut,R,an,rn,sn,on,qa],Xa=e=>Ya.find(Ja(e));function Za(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||$e(e)}var Qa=new Set([`auto`,`none`,`0`]);function $a(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Qa.has(t)&&xn(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Qr(n,i))}var eo=class extends ki{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Bt(r))){let i=Ea(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ja.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Xa(r),o=Xa(i);if(Ht(r)!==Ht(i)&&bi[n]){this.needsMeasurement=!0;return}if(a!==o){if(mi(a)&&mi(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else bi[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Za(e[t]))&&n.push(t);n.length&&$a(e,n,t)}measure(){let{element:e,name:t}=this;return bi[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},to=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],no=[];function ro(e){typeof e.test==`function`&&e.read,io(e),no.unshift(e)}function io(e){Je(no,e)}function ao(e){return no.find(t=>t.test(e))}function oo(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();if(u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a){er.update(()=>l.set(c));continue}l.start(Ca(s,l,c,o&&ja.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation)}let{transitionEnd:s}=t;if(s){let t=()=>er.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function so(e,t,n,r,i){return oo(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=co(i)??e.read(t,r,i),`${r}`}a=pa(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function co(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function lo(e){return Qe(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function uo(e){return Qe(e)&&`ownerSVGElement`in e}var fo=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function po(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var mo=class{constructor(e=er.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function ho(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new mo(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var go={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},_o={};function vo(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(_o[i]||(_o[i]=(go[i]||i)+`(`))+fo(a,qr[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+fo(i,qr.pathRotation)+`)`),t||`none`}var yo=new Set([`originX`,`originY`,`originZ`]),bo=(e,t)=>fo(e.get(t)?.get(),Jr[t]),xo=(e,t,n,r)=>{let i,a;if(pi.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>fi.indexOf(e)-fi.indexOf(t)))}t.get(`transform`)||(!lo(e)&&!t.get(`transformBox`)&&xo(e,t,`transformBox`,new fa(`fill-box`)),t.set(`transform`,new fa(`none`),()=>{e.style.transform=vo(t)})),a=t.get(`transform`)}else yo.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new fa(``),()=>{let n=bo(t,`originX`)??`50%`,r=bo(t,`originY`)??`50%`,i=bo(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=Ai(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=fo(r.get(),Jr[n])};return t.set(n,r,i,a)},So=e=>lo(e)||uo(e),Co=(e,t)=>{if(pi.has(t))return ui(e,t);let n=getComputedStyle(e),r=Ai(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},wo=ho(xo,{test:So,read:Co}),To={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Eo=fi.length;function Do(e,t,n){let r=``,i=!0;for(let a=0;a<Eo;a++){let o=fi[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=fo(s,Jr[o]);if(!c){i=!1;let t=To[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${fo(a,Jr.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Oo(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(pi.has(e)){o=!0;continue}if(Rt(e)){i[e]=n;continue}{let t=fo(n,Jr[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Do(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var ko={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ao={offset:`strokeDashoffset`,array:`strokeDasharray`};function jo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ko:Ao;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Mo=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function No(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Oo(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Mo)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&jo(d,i,a,o,!1)}function Po(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Fo=(e,t,n,r,i=n)=>{let a=Po(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=za(i));let o=Jr[n]||Jr[i],s=a?()=>{e[i]=fo(r.get(),Jr[n])}:()=>{let t=fo(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Io(e,t,n,r){return er.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new fa(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var Lo=ho((e,t,n,r)=>n.startsWith(`path`)?Io(e,t,n,r):n.startsWith(`attr`)?Fo(e,t,n,r,Ro(n)):(pi.has(n)||yo.has(n)||Ai(n)||n in e.style?xo:Fo)(e,t,n,r),{test:uo,read:(e,t)=>pi.has(t)?Jr[t]?.default||0:Ai(t)||Mo.includes(t)?Co(e,t)||e.getAttribute(za(t))||0:(t=Ro(t),e.getAttribute(za(t))??e.getAttribute(t)??void 0)});function Ro(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function zo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Bo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Vo(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function B(e){return e===void 0||e===1}function Ho({scale:e,scaleX:t,scaleY:n}){return!B(e)||!B(t)||!B(n)}function Uo(e){return Ho(e)||Wo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wo(e){return Go(e.x)||Go(e.y)}function Go(e){return e&&e!==`0%`}function Ko(e,t,n){return n+t*(e-n)}function qo(e,t,n,r,i){return i!==void 0&&(e=Ko(e,i,r)),Ko(e,n,r)+t}function Jo(e,t=0,n=1,r,i){e.min=qo(e.min,t,n,r,i),e.max=qo(e.max,t,n,r,i)}function Yo(e,{x:t,y:n}){Jo(e.x,t.translate,t.scale,t.originPoint),Jo(e.y,n.translate,n.scale,n.originPoint)}var Xo=.999999999999,Zo=1.0000000000001;function Qo(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&($o(e.x,-a.scroll.offset.x),$o(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Yo(e,o)),r&&Uo(a.latestValues)&&ns(e,a.latestValues,a.layout?.layoutBox))}t.x<Zo&&t.x>Xo&&(t.x=1),t.y<Zo&&t.y>Xo&&(t.y=1)}function $o(e,t){e.min+=t,e.max+=t}function es(e,t,n,r,i=.5){Jo(e,t,n,Nn(e.min,e.max,i),r)}function ts(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function ns(e,t,n){let r=n??e;es(e.x,ts(t.x,r.x),t.scaleX,t.scale,t.originX),es(e.y,ts(t.y,r.y),t.scaleY,t.scale,t.originY)}function rs(e,t){return zo(Vo(e.getBoundingClientRect(),t))}function is(e,t,n){let r=rs(e,n),{scroll:i}=t;return i&&($o(r.x,i.offset.x),$o(r.y,i.offset.y)),r}var as={},os=e=>uo(e)?Lo:wo,ss=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=eo}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return rs(this.current)}getProps(){return as}};function cs(e,t,n,r){if(r)return oo(e=>r.getValue(e,null),t,n,r);let i=os(e);return so(i,e,t,n,new ss(i,e))}var ls=ho((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>Qe(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:us,cancel:ds}=$n(queueMicrotask,!1),fs={x:!1,y:!1};function ps(){return fs.x||fs.y}function ms(e){return e===`x`||e===`y`?fs[e]?null:(fs[e]=!0,()=>{fs[e]=!1}):fs.x||fs.y?null:(fs.x=fs.y=!0,()=>{fs.x=fs.y=!1})}function hs(e,t){let n=po(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function gs(e){return!(e.pointerType===`touch`||ps())}function _s(e,t,n={}){let[r,i,a]=hs(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!gs(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var vs=(e,t)=>t?e===t||vs(e,t.parentElement):!1,ys=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,bs=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function xs(e){return bs.has(e.tagName)||e.isContentEditable===!0}var Ss=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Cs(e){return Ss.has(e.tagName)||e.isContentEditable===!0}var ws=new WeakSet;function Ts(e){return t=>{t.key===`Enter`&&e(t)}}function Es(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ds=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ts(()=>{if(ws.has(n))return;Es(n,`down`);let e=Ts(()=>{Es(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Es(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Os(e){return ys(e)&&!ps()}var ks=new WeakSet;function As(e,t,n={}){let[r,i,a]=hs(e,n),o=e=>{let r=e.currentTarget;if(!Os(e)||ks.has(e))return;ws.add(r),n.stopPropagation&&ks.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),ws.has(r)&&ws.delete(r),Os(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||vs(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),lo(e)&&(e.addEventListener(`focus`,e=>Ds(e,i)),!xs(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var js=new WeakMap,Ms,Ns=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:uo(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ps=Ns(`inline`,`width`,`offsetWidth`),Fs=Ns(`block`,`height`,`offsetHeight`);function Is({target:e,borderBoxSize:t}){js.get(e)?.forEach(n=>{n(e,{get width(){return Ps(e,t)},get height(){return Fs(e,t)}})})}function Ls(e){e.forEach(Is)}function Rs(){typeof ResizeObserver<`u`&&(Ms=new ResizeObserver(Ls))}function zs(e,t){Ms||Rs();let n=po(e);return n.forEach(e=>{let n=js.get(e);n||(n=new Set,js.set(e,n)),n.add(t),Ms?.observe(e)}),()=>{n.forEach(e=>{let n=js.get(e);n?.delete(t),n?.size||Ms?.unobserve(e)})}}var Bs=new Set,Vs;function Hs(){Vs=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Bs.forEach(t=>t(e))},window.addEventListener(`resize`,Vs)}function Us(e){return Bs.add(e),Vs||Hs(),()=>{Bs.delete(e),!Bs.size&&typeof Vs==`function`&&(window.removeEventListener(`resize`,Vs),Vs=void 0)}}function Ws(e,t){return typeof e==`function`?Us(e):zs(e,t)}var Gs={value:null,addProjectionMetrics:null};function Ks(e){return uo(e)&&e.tagName===`svg`}var qs=e=>typeof e==`number`?e:parseFloat(e),Js=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ys=()=>({x:Js(),y:Js()}),Xs=()=>({min:0,max:0}),Zs=()=>({x:Xs(),y:Xs()}),Qs=new WeakMap;function $s(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ec(e){return typeof e==`string`||Array.isArray(e)}var tc=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],nc=[`initial`,...tc];function rc(e){if($s(e.animate))return!0;for(let t=0;t<nc.length;t++)if(ec(e[nc[t]]))return!0;return!1}function ic(e){return!!(rc(e)||e.variants)}function ac(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Ia(i))e.addValue(r,i);else if(Ia(a))e.addValue(r,pa(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,pa(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var oc={current:null},sc={current:!1},cc=typeof window<`u`;function lc(){if(sc.current=!0,cc){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>oc.current=e.matches;e.addEventListener(`change`,t),t()}else oc.current=!1}}var uc=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],dc={};function fc(e){dc=e}function pc(){return dc}var mc=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ki,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Ft.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,er.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=rc(t),this.isVariantNode=ic(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Ia(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,Qs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(sc.current||lc(),this.shouldReduceMotion=oc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),tr(this.notifyUpdate),tr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Qi.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Hi({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:at(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=pi.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&er.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in dc){let t=dc[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zs()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<uc.length;t++){let n=uc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ac(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=pa(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Ze(n)||$e(n))?n=parseFloat(n):typeof n!=`number`&&!kn.test(n)&&kn.test(t)&&(n=Qr(e,t)),this.setBaseTarget(e,Ia(n)?n.get():n)),Ia(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new it),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){us.render(this.render)}},hc=class extends mc{constructor(){super(...arguments),this.KeyframeResolver=eo}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Ia(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},gc=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function _c(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var vc={};function yc(e,{layout:t,layoutId:n}){return pi.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!vc[e]||e===`opacity`)}function bc(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Ia(r[t])||i&&Ia(i[t])||yc(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function xc(e){return window.getComputedStyle(e)}var Sc=class extends hc{constructor(){super(...arguments),this.type=`html`,this.renderInstance=_c}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(pi.has(t))return this.projection?.isProjecting?ci(t):ui(e,t);{let n=xc(e),r=(Rt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return rs(e,t)}build(e,t,n){Oo(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bc(e,t,n)}},Cc=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),wc=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Tc(e,t,n,r){_c(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Cc.has(n)?n:za(n),t.attrs[n])}function Ec(e,t,n){let r=bc(e,t,n);for(let n in e)if(Ia(e[n])||Ia(t[n])){let t=fi.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Dc=class extends hc{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Zs}getBaseTargetFromProps(e,t){return pi.has(t)?super.getBaseTargetFromProps(e,t)??ci(t):e[t]}getDefaultValue(e){return pi.has(e)?this.latestValues[e]??ci(e):void 0}readValueFromInstance(e,t){if(pi.has(t)){let e=Xr(t);return e&&e.default||0}if(Mo.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Cc.has(t)?t:za(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ec(e,t,n)}build(e,t,n){No(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Tc(e,t,n,r)}mount(e){this.isSVGTag=wc(e.tagName),super.mount(e)}};function Oc(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var kc=[...tc].reverse();function Ac(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Ka(e,t,n))),n=Mc(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(kc.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?ec(g)||g===!1?g:void 0:h,v=ec(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||$s(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=jc(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=ka(e,n,Aa(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!Oc(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=ka(s,n)?.transition?.delayChildren;r.delay=ca(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&ka(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!Ia(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=Mc(),i=!0}}}function jc(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Oc(t,e):!1}function Mc(){let e={};for(let t of tc)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Nc(e,t){e.min=t.min,e.max=t.max}function Pc(e,t){Nc(e.x,t.x),Nc(e.y,t.y)}function Fc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ic=.9999,Lc=1.0001,Rc=-.01,zc=.01;function Bc(e){return e.max-e.min}function Vc(e,t,n){return Math.abs(e-t)<=n}function Hc(e,t,n,r=.5){e.origin=r,e.originPoint=Nn(t.min,t.max,e.origin),e.scale=Bc(n)/Bc(t),e.translate=Nn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ic&&e.scale<=Lc||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rc&&e.translate<=zc||isNaN(e.translate))&&(e.translate=0)}function Uc(e,t,n,r){Hc(e.x,t.x,n.x,r?r.originX:void 0),Hc(e.y,t.y,n.y,r?r.originY:void 0)}function Wc(e,t,n,r=0){e.min=(r?Nn(n.min,n.max,r):n.min)+t.min,e.max=e.min+Bc(t)}function Gc(e,t,n,r){Wc(e.x,t.x,n.x,r?.x),Wc(e.y,t.y,n.y,r?.y)}function Kc(e,t,n,r=0){let i=r?Nn(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Bc(t)}function qc(e,t,n,r){Kc(e.x,t.x,n.x,r?.x),Kc(e.y,t.y,n.y,r?.y)}function Jc(e,t,n,r,i){return e-=t,e=Ko(e,1/n,r),i!==void 0&&(e=Ko(e,1/i,r)),e}function Yc(e,t=0,n=1,r=.5,i,a=e,o=e){if(an.test(t)&&(t=parseFloat(t),t=Nn(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Nn(a.min,a.max,r);e===a&&(s-=t),e.min=Jc(e.min,t,n,s,i),e.max=Jc(e.max,t,n,s,i)}function Xc(e,t,[n,r,i],a,o){Yc(e,t[n],t[r],t[i],t.scale,a,o)}var Zc=[`x`,`scaleX`,`originX`],Qc=[`y`,`scaleY`,`originY`];function $c(e,t,n,r){Xc(e.x,t,Zc,n?n.x:void 0,r?r.x:void 0),Xc(e.y,t,Qc,n?n.y:void 0,r?r.y:void 0)}function el(e){return e.translate===0&&e.scale===1}function tl(e){return el(e.x)&&el(e.y)}function nl(e,t){return e.min===t.min&&e.max===t.max}function rl(e,t){return nl(e.x,t.x)&&nl(e.y,t.y)}function il(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function al(e,t){return il(e.x,t.x)&&il(e.y,t.y)}function ol(e){return Bc(e.x)/Bc(e.y)}function sl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function cl(e){return[e(`x`),e(`y`)]}function ll(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ul={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(R.test(e))e=parseFloat(e);else return e}return`${ll(e,t.target.x)}% ${ll(e,t.target.y)}%`}},dl={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=kn.parse(e);if(i.length>5)return r;let a=kn.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Nn(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function fl(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var pl=to.length,ml=e=>typeof e==`number`||R.test(e);function hl(e,t,n,r,i,a){i?(e.opacity=Nn(0,n.opacity??1,_l(r)),e.opacityExit=Nn(t.opacity??1,0,vl(r))):a&&(e.opacity=Nn(t.opacity??1,n.opacity??1,r));for(let i=0;i<pl;i++){let a=to[i],o=gl(t,a),s=gl(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||ml(o)===ml(s)?(e[a]=Math.max(Nn(qs(o),qs(s),r),0),(an.test(s)||an.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Nn(t.rotate||0,n.rotate||0,r))}function gl(e,t){return e[t]===void 0?e.borderRadius:e[t]}var _l=yl(0,.5,xt),vl=yl(.5,.95,tt);function yl(e,t,n){return r=>r<e?0:r>t?1:n(rt(e,t,r))}function bl(e,t,n){let r=Ia(e)?e:pa(e);return r.start(Ca(``,r,t,n)),r.animation}function xl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Sl=(e,t)=>e.depth-t.depth,Cl=class{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sl),this.isDirty=!1,this.children.forEach(e)}};function wl(e,t){let n=Ft.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(tr(r),e(a-t))};return er.setup(r,!0),()=>tr(r)}function Tl(e){return Ia(e)?e.get():e}var El=class{constructor(){this.members=[]}add(e){qe(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Je(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Dl={borderRadius:{...ul,applyTo:[...to]},borderTopLeftRadius:ul,borderTopRightRadius:ul,borderBottomLeftRadius:ul,borderBottomRightRadius:ul,boxShadow:dl},Ol={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(vc,{...Dl,...vc});var kl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Al=[``,`X`,`Y`,`Z`],jl=1e3,Ml=0;function Nl(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Va(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,er,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pl(r)}function Fl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ml++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Gs.value&&(kl.nodes=kl.calculatedTargetDeltas=kl.calculatedProjections=0),this.nodes.forEach(Rl),this.nodes.forEach(Jl),this.nodes.forEach(Yl),this.nodes.forEach(zl),Gs.addProjectionMetrics&&Gs.addProjectionMetrics(kl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Cl)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new it),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=uo(t)&&!Ks(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;er.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=wl(i,250),Ol.hasAnimatedSinceResize&&(Ol.hasAnimatedSinceResize=!1,this.nodes.forEach(ql)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||nu,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!al(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...ha(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||ql(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Xl),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Hl),this.nodes.forEach(Vl);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ul);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wl),this.nodes.forEach(Gl),this.nodes.forEach(Kl),this.nodes.forEach(Il),this.nodes.forEach(Ll)):this.nodes.forEach(Ul),this.clearAllSnapshots();let e=Ft.now();Mt.delta=Ye(0,1e3/60,e-Mt.timestamp),Mt.timestamp=e,Mt.isProcessing=!0,nr.update.process(Mt),nr.preRender.process(Mt),nr.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,us.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bl),this.sharedNodes.forEach(Zl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,er.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){er.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Bc(this.snapshot.measuredBox.x)&&!Bc(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=Zs(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!tl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Uo(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ou(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Zs();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(cu))){let{scroll:e}=this.root;e&&($o(t.x,e.offset.x),$o(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Zs();if(Pc(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Pc(t,e),$o(t.x,i.offset.x),$o(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Zs();Pc(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&($o(r.x,-n.scroll.offset.x),$o(r.y,-n.scroll.offset.y)),Uo(n.latestValues)&&ns(r,n.latestValues,n.layout?.layoutBox)}return Uo(this.latestValues)&&ns(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Zs();Pc(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Uo(n.latestValues))continue;let r;n.instance&&(Ho(n.latestValues)&&n.updateSnapshot(),r=Zs(),Pc(r,n.measurePageBox())),$c(t,n.latestValues,n.snapshot?.layoutBox,r)}return Uo(this.latestValues)&&$c(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Mt.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=Zs(),this.targetWithTransforms=Zs()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Gc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Pc(this.target,this.layout.layoutBox),Yo(this.target,this.targetDelta)):Pc(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Gs.value&&kl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ho(this.parent.latestValues)||Wo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Zs(),this.relativeTargetOrigin=Zs(),qc(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Pc(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Pc(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Qo(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Zs());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fc(this.prevProjectionDelta.x,this.projectionDelta.x),Fc(this.prevProjectionDelta.y,this.projectionDelta.y)),Uc(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!sl(this.projectionDelta.x,this.prevProjectionDelta.x)||!sl(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Gs.value&&kl.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ys(),this.projectionDelta=Ys(),this.projectionDeltaWithTransform=Ys()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Ys();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Zs(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(tu));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Nn(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Nn(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Ql(o.x,e.x,n),Ql(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eu(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&rl(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Zs(),Pc(f,this.relativeTarget)),c&&(this.animationValues=a,hl(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(tr(this.pendingAnimation),void 0),this.pendingAnimation=er.update(()=>{Ol.hasAnimatedSinceResize=!0,this.motionValue||=pa(0),this.motionValue.jump(0,!1),this.currentAnimation=bl(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),Lr(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&su(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Zs();let t=Bc(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Bc(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Pc(t,i),ns(t,r),Uc(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new El),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Nl(`z`,e,r,this.animationValues);for(let t=0;t<Al.length;t++)Nl(`rotate${Al[t]}`,e,r,this.animationValues),Nl(`skew${Al[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Tl(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Tl(t?.pointerEvents)||``),this.hasProjected&&!Uo(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=fl(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in vc){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=vc[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Tl(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Vl),this.root.sharedNodes.clear()}}}function Il(e){e.updateLayout()}function Ll(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)cl(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Bc(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Nc(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else su(i,t.layoutBox,n)&&cl(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Bc(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ys();Uc(o,n,t.layoutBox);let s=Ys();a?Uc(s,e.applyTransform(r,!0),t.measuredBox):Uc(s,n,t.layoutBox);let c=!tl(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Zs();qc(s,t.layoutBox,i.layoutBox,o);let c=Zs();qc(c,n,a.layoutBox,o),al(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Rl(e){Gs.value&&kl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function zl(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Bl(e){e.clearSnapshot()}function Vl(e){e.clearMeasurements()}function Hl(e){e.isLayoutDirty=!0,e.updateLayout()}function Ul(e){e.isLayoutDirty=!1}function Wl(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Gl(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Kl(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ql(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jl(e){e.resolveTargetDelta()}function Yl(e){e.calcProjection()}function Xl(e){e.resetSkewAndRotation()}function Zl(e){e.removeLeadSnapshot()}function Ql(e,t,n){e.translate=Nn(t.translate,0,n),e.scale=Nn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function $l(e,t,n,r){e.min=Nn(t.min,n.min,r),e.max=Nn(t.max,n.max,r)}function eu(e,t,n,r){$l(e.x,t.x,n.x,r),$l(e.y,t.y,n.y,r)}function tu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var nu={duration:.45,ease:[.4,0,.1,1]},ru=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),iu=ru(`applewebkit/`)&&!ru(`chrome/`)?Math.round:tt;function au(e){e.min=iu(e.min),e.max=iu(e.max)}function ou(e){au(e.x),au(e.y)}function su(e,t,n){return e===`position`||e===`preserve-aspect`&&!Vc(ol(t),ol(n),.2)}function cu(e){return e!==e.root&&e.scroll?.wasRoot}var lu=Fl({attachResizeListener:(e,t)=>xl(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),uu={current:void 0},du=Fl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!uu.current){let e=new lu({});e.mount(window),e.setOptions({layoutScroll:!0}),uu.current=e}return uu.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),fu=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function pu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function mu(...e){return t=>{let n=!1,r=e.map(e=>{let r=pu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pu(e[t],null)}}}}function hu(...e){return m.useCallback(mu(...e),e)}var V=He(),gu=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(lo(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=lo(e)&&e.offsetWidth||0,r=lo(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function _u({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,m.useId)(),s=(0,m.useRef)(null),c=(0,m.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,m.useContext)(fu),u=hu(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,m.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
3
- [data-motion-pop-id="${o}"] {
4
- position: absolute !important;
5
- width: ${e}px !important;
6
- height: ${u}px !important;
7
- ${_}px !important;
8
- ${v}px !important;
9
- }
10
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,V.jsx)(gu,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var vu=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=We(yu),d=(0,m.useId)(),f=(0,m.useRef)(n),p=(0,m.useRef)(r);Ge(()=>{f.current=n,p.current=r});let h=!0,g=(0,m.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,m.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),m.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,V.jsx)(_u,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,V.jsx)(Ke.Provider,{value:g,children:e})};function yu(){return new Map}function bu(e=!0){let t=(0,m.useContext)(Ke);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,m.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var xu=e=>e.key||``;function Su(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var Cu=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=bu(o),f=(0,m.useMemo)(()=>Su(e),[e]),p=o&&!u?[]:f.map(xu),h=(0,m.useRef)(!0),g=We(()=>new Map),_=(0,m.useRef)(new Set),[v,y]=(0,m.useState)(f),[b,x]=(0,m.useState)(f);Ge(()=>{o&&!u&&!b.length&&d?.()},[u,o,b.length,d]),Ge(()=>{h.current=!1;for(let e=0;e<b.length;e++){let t=xu(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f],t=0;for(let n of b){let r=p.indexOf(xu(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>g.get(xu(e)))?e=f:a===`wait`&&(e=S),x(Su(e)),y(f),null}let{forceRender:C}=(0,m.useContext)(Ue);return(0,V.jsx)(V.Fragment,{children:b.map(e=>{let m=xu(e),v=o&&!u?!1:f===b||p.includes(m);return(0,V.jsx)(vu,{isPresent:v,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:v?void 0:()=>{if(_.current.has(m))return;if(g.has(m))_.current.add(m),g.set(m,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),y([]),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},m)})})},wu=(0,m.createContext)({strict:!1}),Tu={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Eu=!1;function Du(){if(Eu)return;let e={};for(let t in Tu)e[t]={isEnabled:e=>Tu[t].some(t=>!!e[t])};fc(e),Eu=!0}function Ou(){return Du(),pc()}function ku(e){let t=Ou();for(let n in e)t[n]={...t[n],...e[n]};fc(t)}function Au({children:e,...t}){let n=(0,m.useContext)(fu);t={...n,...t},t.transition=ma(t.transition,n.transition),t.isStatic=We(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,V.jsx)(fu.Provider,{value:r,children:e})}var ju=(0,m.createContext)({});function Mu(e,t){if(rc(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ec(t)?t:void 0,animate:ec(n)?n:void 0}}return e.inherit===!1?{}:t}function Nu(e){let{initial:t,animate:n}=Mu(e,(0,m.useContext)(ju));return(0,m.useMemo)(()=>({initial:t,animate:n}),[Pu(t),Pu(n)])}function Pu(e){return Array.isArray(e)?e.join(` `):e}var Fu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Iu(e,t,n){for(let r in t)!Ia(t[r])&&!yc(r,n)&&(e[r]=t[r])}function Lu({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=Fu();return Oo(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ru(e,t){let n=e.style||{},r={};return Iu(r,n,e),Object.assign(r,Lu(e,t)),r}function zu(e,t){let n={},r=Ru(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Bu=()=>({...Fu(),attrs:{}});function Vu(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=Bu();return No(n,t,wc(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Iu(t,e.style,e),i.style={...t,...i.style}}return i}var Hu=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Uu(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Hu.has(e)}function Wu(e,t){return e.startsWith(`on`)?!Uu(e):t?.(e)??!Uu(e)}function Gu(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(Ia(e[a])||(Wu(a,r)||n===!0&&Uu(a)||!t&&!Uu(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Ku=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function qu(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ku.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ju(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??qu(e)?Vu:zu)(t,r,i,e),l=Gu(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>Ia(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function Yu({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Xu(n,r,i,e),renderState:t()}}function Xu(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Tl(a[e]);let{initial:o,animate:s}=e,c=rc(e),l=ic(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!$s(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Oa(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Zu=e=>(t,n)=>{let r=(0,m.useContext)(ju),i=(0,m.useContext)(Ke),a=()=>Yu(e,t,r,i);return n?a():We(a)},Qu=Zu({scrapeMotionValuesFromProps:bc,createRenderState:Fu}),$u=Zu({scrapeMotionValuesFromProps:Ec,createRenderState:Bu}),ed=Symbol.for(`motionComponentSymbol`);function td(e,t,n){let r=(0,m.useRef)(n);(0,m.useInsertionEffect)(()=>{r.current=n});let i=(0,m.useRef)(null);return(0,m.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var nd=(0,m.createContext)({});function rd(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function id(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(ju),s=(0,m.useContext)(wu),c=(0,m.useContext)(Ke),l=(0,m.useContext)(fu),u=l.reducedMotion,d=l.skipAnimations,f=(0,m.useRef)(null),p=(0,m.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,m.useContext)(nd);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&ad(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[Ba],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return Ge(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),Ge(()=>{p.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,m.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function ad(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:od(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&rd(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function od(e){if(e)return e.options.allowProjection===!1?od(e.parent):e.projection}function sd(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&ku(r);let a=n?n===`svg`:qu(e),o=a?$u:Qu;function s(n,s){let c,l={...(0,m.useContext)(fu),...n,layoutId:cd(n)},{isStatic:u,isValidProp:d}=l,f=Nu(n),p=o(n,u);if(!u&&typeof window<`u`){ld(l,r);let t=ud(l);c=t.MeasureLayout,f.visualElement=id(e,p,l,i,t.ProjectionNode,a)}return(0,V.jsxs)(ju.Provider,{value:f,children:[c&&f.visualElement?(0,V.jsx)(c,{visualElement:f.visualElement,...l}):null,Ju(e,n,td(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,m.forwardRef)(s);return c[ed]=e,c}function cd({layoutId:e}){let t=(0,m.useContext)(Ue).id;return t&&e!==void 0?t+`-`+e:e}function ld(e,t){(0,m.useContext)(wu).strict}function ud(e){let{drag:t,layout:n}=Ou();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function dd(e,t){if(typeof Proxy>`u`)return sd;let n=new Map,r=(n,r)=>sd(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,sd(a,void 0,e,t)),n.get(a))})}var fd=(e,t)=>t.isSVG??qu(e)?new Dc(t):new Sc(t,{allowProjection:e!==m.Fragment}),pd=class extends gc{constructor(e){super(e),e.animationState||=Ac(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();$s(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},md=0,hd={animation:{Feature:pd},exit:{Feature:class extends gc{constructor(){super(...arguments),this.id=md++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=ka(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function gd(e){return{point:{x:e.pageX,y:e.pageY}}}var _d=e=>t=>ys(t)&&e(t,gd(t));function vd(e,t,n,r){return xl(e,t,_d(n),r)}var yd=({current:e})=>e?e.ownerDocument.defaultView:null,bd=(e,t)=>Math.abs(e-t);function xd(e,t){let n=bd(e.x,t.x),r=bd(e.y,t.y);return Math.sqrt(n**2+r**2)}var Sd=new Set([`auto`,`scroll`]),Cd=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=wd(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Ed(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=xd(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Ft.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=wd(t,this.transformPagePoint),this.hasPendingMove=!0,er.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Ed(e.type===`pointercancel`?this.lastMoveEventInfo:wd(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ys(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=wd(gd(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Mt;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Ed(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=nt(vd(this.contextWindow,`pointermove`,this.handlePointerMove,d),vd(this.contextWindow,`pointerup`,this.handlePointerUp,d),vd(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Sd.has(e.overflowX)||Sd.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),er.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),tr(this.updatePoint)}};function wd(e,t){return t?{point:t(e.point)}:e}function Td(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ed({point:e},t){return{point:e,delta:Td(e,Od(t)),offset:Td(e,Dd(t)),velocity:kd(t,.1)}}function Dd(e){return e[0]}function Od(e){return e[e.length-1]}function kd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Od(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>at(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>at(t)*2&&(r=e[1]);let a=ot(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ad(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Nn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Nn(n,e,r.max):Math.min(e,n)),e}function jd(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Md(e,{top:t,left:n,bottom:r,right:i}){return{x:jd(e.x,n,i),y:jd(e.y,t,r)}}function Nd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Pd(e,t){return{x:Nd(e.x,t.x),y:Nd(e.y,t.y)}}function Fd(e,t){let n=.5,r=Bc(e),i=Bc(t);return i>r?n=rt(t.min,t.max-r,e.min):r>i&&(n=rt(e.min,e.max-i,t.min)),Ye(0,1,n)}function Id(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Ld=.35;function Rd(e=Ld){return e===!1?e=0:e===!0&&(e=Ld),{x:zd(e,`left`,`right`),y:zd(e,`top`,`bottom`)}}function zd(e,t,n){return{min:Bd(e,t),max:Bd(e,n)}}function Bd(e,t){return typeof e==`number`?e:e[t]||0}var Vd=new WeakMap,Hd=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Zs(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ms(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),cl(e=>{let t=this.getAxisMotionValue(e).get()||0;if(an.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Bc(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&er.update(()=>i(e,t),!1,!0),Ra(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Kd(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&er.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Cd(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:yd(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&er.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Gd(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ad(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&rd(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Md(n.layoutBox,e):!1,this.elastic=Rd(t),r!==this.constraints&&!rd(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&cl(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Id(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!rd(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=is(n,r.root,this.visualElement.getTransformPagePoint()),a=Pd(r.layout.layoutBox,i);if(t){let e=t(Bo(a));this.hasMutatedConstraints=!!e,e&&(a=zo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=cl(o=>{if(!Gd(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Ra(this.visualElement,e),n.start(Ca(e,n,0,t,this.visualElement,!1))}stopAnimation(){cl(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();cl(e=>{if(!Gd(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Nn(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!rd(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};cl(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Fd({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),cl(t=>{let n=this.getAxisMotionValue(t);if(!Gd(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Nn(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Vd.set(this.visualElement,this);let e=this.visualElement.current,t=vd(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Cs(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();rd(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Wd(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),er.read(r);let o=xl(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(cl(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ld,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Ud(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Wd(e,t,n){let r=Ws(e,Ud(n)),i=Ws(t,Ud(n));return()=>{r(),i()}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kd(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var qd=class extends gc{constructor(e){super(e),this.removeGroupControls=tt,this.removeListeners=tt,this.controls=new Hd(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||tt}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Jd=e=>(t,n)=>{e&&er.update(()=>e(t,n),!1,!0)},Yd=class extends gc{constructor(){super(...arguments),this.removePointerDownListener=tt}onPointerDown(e){this.session=new Cd(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yd(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Jd(e),onStart:Jd(t),onMove:Jd(n),onEnd:(e,t)=>{delete this.session,r&&er.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=vd(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Xd=!1,Zd=class extends m.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Xd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ol.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Xd=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||er.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),us.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Xd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Qd(e){let[t,n]=bu(),r=(0,m.useContext)(Ue);return(0,V.jsx)(Zd,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(nd),isPresent:t,safeToRemove:n})}var $d={pan:{Feature:Yd},drag:{Feature:qd,ProjectionNode:du,MeasureLayout:Qd}};function ef(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&er.postRender(()=>i(t,gd(t)))}var tf=class extends gc{mount(){let{current:e}=this.node;e&&(this.unmount=_s(e,(e,t)=>(ef(this.node,t,`Start`),e=>ef(this.node,e,`End`))))}unmount(){}},nf=class extends gc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=nt(xl(this.node.current,`focus`,()=>this.onFocus()),xl(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function rf(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&er.postRender(()=>i(t,gd(t)))}var af=class extends gc{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=As(e,(e,t)=>(rf(this.node,t,`Start`),(e,{success:t})=>rf(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},of=new WeakMap,sf=new WeakMap,cf=e=>{let t=of.get(e.target);t&&t(e)},lf=e=>{e.forEach(cf)};function uf({root:e,...t}){let n=e||document;sf.has(n)||sf.set(n,{});let r=sf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(lf,{root:e,...t})),r[i]}function df(e,t,n){let r=uf(t);return of.set(e,n),r.observe(e),()=>{of.delete(e),r.unobserve(e)}}var ff={some:0,all:1},pf=class extends gc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:ff[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=df(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(mf(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function mf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var hf={inView:{Feature:pf},tap:{Feature:af},focus:{Feature:nf},hover:{Feature:tf}},gf={layout:{ProjectionNode:du,MeasureLayout:Qd}},_f=dd({...hd,...hf,...$d,...gf},fd);function vf(){!sc.current&&lc();let[e]=(0,m.useState)(oc.current);return e}function yf(e){return typeof e==`object`&&!Array.isArray(e)}function bf(e,t,n,r){return e==null?[]:typeof e==`string`&&yf(t)?po(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function xf(e,t,n){return e*(t+1)+n*t}function Sf(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Cf(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(Je(e,i),r--)}}function wf(e,t,n,r,i,a){Cf(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Nn(i,a,r[o]),easing:Dt(n,o)})}function Tf(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Ef(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Df=`easeInOut`,Of=20;function kf(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}if(!Array.isArray(o)){l.set(o.name,Sf(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Sf(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Mf(e),{delay:l=0,times:u=wr(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=Bi(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Ff(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=at(b));let r=sr(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Cr(u,T),c.length===1&&c.unshift(null),m&&`${m}${Of}`,m&&m<Of){let e=b>0?_/b:0;b=xf(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?ht(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Dt(f,e-1))}Tf(u,m,e)}let E=w+b;wf(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Ia(p)){let e=Af(p,s);_(m,h,jf(`default`,e))}else{let e=bf(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Af(r,s);for(let e in m)_(m[e],Nf(h,e),jf(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Ef);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(rt(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Df)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Af(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function jf(e,t){return t[e]||(t[e]=[]),t[e]}function Mf(e){return Array.isArray(e)?e:[e]}function Nf(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Pf=e=>typeof e==`number`,Ff=e=>e.every(Pf);function If(e,t){return Ia(e)||typeof e==`number`||typeof e==`string`&&!yf(t)}function Lf(e,t,n,r){let i=[];if(If(e,t))i.push(bl(e,yf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=bf(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...cs(r,t,s,Qs.get(r))):i.push(...so(ao(r)??ls,r,t,s))}}return i}function Rf(e,t,n){let r=[];return kf(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=pa(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:yr}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Lf(n,e,t))}),r}function zf(e){return Array.isArray(e)&&e.some(Array.isArray)}function Bf(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),zf(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Rf(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Lf(e,i,{...c,...r},t)}let l=new sa(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{Je(t.animations,l)})),l}return i}var Vf=Object.assign(Bf(),{addEffect:ro,removeEffect:io}),H=_f,Hf=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(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,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Uf=o(((e,t)=>{t.exports=Hf()})),Wf=o((e=>{var t=p();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=u(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=u(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=u(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=u(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),Gf=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=Wf()})),Kf=o((e=>{var t=Uf(),n=p(),r=Gf();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e: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 u(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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),P=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.legacy_hidden`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.for(`react.view_transition`),ce=Symbol.for(`react.recoverable`),le=Symbol.iterator;function F(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case te:return`Suspense`;case P:return`SuspenseList`;case ie:return`Activity`;case se:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case ee: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?de(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=yp(t),e=bp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(gh._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=bp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),gh._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
11
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
12
- `+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}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(`
13
- `),l=s.split(`
14
- `);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=`
15
- `+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{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
16
- Error generating stack: `+e.message+`
17
- `+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(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&-e;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 at(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=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(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 ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ze(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(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 lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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-Ze(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&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(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 _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Mh(e.type)):e}function yt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xm(e);e!==null;){if(n=e[xt])return n;e=xm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Pe.call(Ut,e)?!0:Pe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function rn(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):R(e,Xt(n)):o===`number`&&e.value==t?R(e,Xt(e.value)):R(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function an(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function R(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(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=``+Xt(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 sn(e,t,n){if(t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Xt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=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 dn(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||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(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]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(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 mn=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`],[`maskType`,`mask-type`],[`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`]]),hn=/^[\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 gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(rn(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));rn(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&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(Kd(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,this}return T(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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=T({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=T({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(T({},Wn,{dataTransfer:0})),qn=In(T({},zn,{relatedTarget:0})),Jn=In(T({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(T({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(T({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(T({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(T({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(T({},Ln,{submitter:0})),ar=In(T({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(T({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(T({},Wn,{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})),cr=In(T({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=En&&`CompositionEvent`in window,dr=null;En&&`documentMode`in document&&(dr=document.documentMode);var fr=En&&`TextEvent`in window&&!dr,pr=En&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=kn=null,vr=!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 pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={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 Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=ip(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Xf(e,0)}function Dr(e){if(en(Nt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(En){var Ar;if(En){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,yn(e)),wn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(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(!Pe.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(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=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(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=Hr(e.document)}return t}function qr(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 Jr=En&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=ip(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};En&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),zt(t,[e])}var hi=0;function gi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Dd.identifierPrefix;var n=hi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function _i(e){if(e==null||typeof e==`string`)return e;var t=null,n=Fd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function vi(e,t){return e=_i(e),t=_i(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var yi=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)},bi=[],xi=0,Si=0;function Ci(){for(var e=xi,t=Si=xi=0;t<e;){var n=bi[t];bi[t++]=null;var r=bi[t];bi[t++]=null;var i=bi[t];bi[t++]=null;var a=bi[t];if(bi[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&&Di(n,i,a)}}function wi(e,t,n,r){bi[xi++]=e,bi[xi++]=t,bi[xi++]=n,bi[xi++]=r,Si|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ti(e,t,n,r){return wi(e,t,n,r),Oi(e)}function Ei(e,t){return wi(e,null,null,t),Oi(e)}function Di(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-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Oi(e){if(50<Id)throw Id=0,Ld=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ki={};function Ai(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 ji(e,t,n,r){return new Ai(e,t,n,r)}function Mi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ni(e,t){var n=e.alternate;return n===null?(n=ji(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&1206910976,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 Pi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Fi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Mi(r)&&(s=1);else if(typeof r==`string`)s=nh(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ie:return e=ji(31,n,t,a),e.elementType=ie,e.lanes=o,e;case k:return Ii(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=ji(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case te:return e=ji(13,n,t,a),e.elementType=te,e.lanes=o,e;case P:return e=ji(19,n,t,a),e.elementType=P,e.lanes=o,e;case ae:case se:return e=a|32,e=ji(30,n,t,e),e.elementType=se,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case ee:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ji(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ii(e,t,n,r){return e=ji(7,e,r,t),e.lanes=n,e}function Li(e,t,n){return e=ji(6,e,null,t),e.lanes=n,e}function Ri(e){var t=ji(18,null,null,0);return t.stateNode=e,t}function zi(e,t,n){return t=ji(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bi=new WeakMap;function Vi(e,t){if(typeof e==`object`&&e){var n=Bi.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},Bi.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Hi=[],Ui=0,Wi=null,Gi=0,Ki=[],qi=0,Ji=null,Yi=1,Xi=``;function Zi(e,t){Hi[Ui++]=Gi,Hi[Ui++]=Wi,Wi=e,Gi=t}function Qi(e,t,n){Ki[qi++]=Yi,Ki[qi++]=Xi,Ki[qi++]=Ji,Ji=e;var r=Yi;e=Xi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Yi=1<<32-Ze(t)+i|n<<i|r,Xi=a+e}else Yi=1<<a|n<<i|r,Xi=e}function $i(e){e.return!==null&&(Zi(e,1),Qi(e,1,0))}function ea(e){for(;e===Wi;)Wi=Hi[--Ui],Hi[Ui]=null,Gi=Hi[--Ui],Hi[Ui]=null;for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Xi=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null}function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Xi,Ki[qi++]=Ji,Yi=t.id,Xi=t.overflow,Ji=e}var na=null,ra=null,z=!1,ia=null,aa=!1,oa=Error(i(519));function sa(e){throw pa(Vi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),oa}function ca(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Zf(`cancel`,t),Zf(`close`,t);break;case`iframe`:case`object`:case`embed`:Zf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Jf.length;n++)Zf(Jf[n],t);break;case`source`:Zf(`error`,t);break;case`img`:case`image`:case`link`:Zf(`error`,t),Zf(`load`,t);break;case`details`:Zf(`toggle`,t);break;case`input`:Zf(`invalid`,t),an(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Zf(`invalid`,t);break;case`textarea`:Zf(`invalid`,t),cn(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||lp(t.textContent,n)?(r.popover!=null&&(Zf(`beforetoggle`,t),Zf(`toggle`,t)),r.onScroll!=null&&Zf(`scroll`,t),r.onScrollEnd!=null&&Zf(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||sa(e,!0)}function la(e){for(na=e.return;na;)switch(na.tag){case 5:case 31:case 13:aa=!1;return;case 27:case 3:aa=!0;return;default:na=na.return}}function ua(e){if(e!==na)return!1;if(!z)return la(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Sp(e.type,e.memoizedProps)),n=!n),n&&ra&&sa(e),la(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=bm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ra=bm(e)}else t===27?(t=ra,jp(e.type)?(e=ym,ym=null,ra=e):ra=t):ra=na?vm(e.stateNode.nextSibling):null;return!0}function da(){ra=na=null,z=!1}function fa(){var e=ia;return e!==null&&(yd===null?yd=e:yd.push.apply(yd,e),ia=null),e}function pa(e){ia===null?ia=[e]:ia.push(e)}var ma=ge(null),ha=null,ga=null;function _a(e,t,n){ve(ma,t._currentValue),t._currentValue=n}function va(e){e._currentValue=ma.current,_e(ma)}function ya(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 ba(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),ya(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),ya(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ya(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 xa(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;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[gh]:e.push(gh))}a=a.return}return e!==null&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){ha=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(ha,e)}function Ta(e,t){return ha===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ga===null){if(e===null)throw Error(i(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return n}var Da=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()})}},Oa=t.unstable_scheduleCallback,ka=t.unstable_NormalPriority,Aa={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=H(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ua=I.S;I.S=function(e,t){if(Sd=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=Of;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=Of;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=ge(null);function Ga(){var e=Wa.current;return e===null?rd.pooledCache:e}function Ka(e,t){t===null?ve(Wa,Wa.current):ve(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(i(460)),Ya=Error(i(474)),Xa=Error(i(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=rd,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,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(i(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(i(483))}var io=null,ao=0;function oo(e){var t=ao;return ao+=1,io===null&&(io=[]),$a(io,e,t)}function so(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function co(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function lo(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=Ni(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Li(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===k?(e=d(e,t,n.props.children,r,n.key),so(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===re&&eo(i)===t.type)?(t=a(t,n.props),so(t,n),t.return=e,t):(t=Fi(n.type,n.key,n.props,null,e.mode,r),so(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=zi(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=Ii(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=Li(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Fi(t.type,t.key,t.props,null,e.mode,n),so(n,t),n.return=e,n;case O:return t=zi(t,e.mode,n),t.return=e,t;case re:return t=eo(t),f(e,t,n)}if(fe(t)||F(t))return t=Ii(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,oo(t),n);if(t.$$typeof===N)return f(e,Ta(e,t),n);co(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 D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case re:return n=eo(n),p(e,t,n,r)}if(fe(n)||F(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,oo(n),r);if(n.$$typeof===N)return p(e,t,Ta(e,n),r);co(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 D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:return r=eo(r),m(e,t,n,r,i)}if(fe(r)||F(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,oo(r),i);if(r.$$typeof===N)return m(e,t,n,Ta(t,r),i);co(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),z&&Zi(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 z&&Zi(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(_.key===null?h:_.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)}),z&&Zi(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),z&&Zi(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 z&&Zi(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(_.key===null?g:_.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)}),z&&Zi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),so(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&eo(l)===r.type){n(e,r.sibling),c=a(r,o.props),so(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ii(o.props.children,e.mode,c,o.key),so(c,o),c.return=e,e=c):(c=Fi(o.type,o.key,o.props,null,e.mode,c),so(c,o),c.return=e,e=c)}return s(e);case O: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}n(e,r);break}t(e,r),r=r.sibling}c=zi(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=eo(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(F(o)){if(l=F(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,oo(o),c);if(o.$$typeof===N)return _(e,r,Ta(e,o),c);co(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=Li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=ji(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(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 go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,nd&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Oi(e),Di(e,null,n),t}return wi(e,r,t,n),Oi(e)}function vo(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,mt(e,n)}}function yo(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 bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!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?(ad&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:po=!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),pd|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=ge(null),Eo=ge(0);function Do(e,t){e=dd,ve(Eo,e),ve(To,t),dd=e|t.baseLanes}function Oo(){ve(Eo,dd),ve(To,To.current)}function ko(){dd=Eo.current,_e(To),_e(Eo)}var Ao=ge(null),jo=null;function Mo(e){var t=e.alternate;ve(Lo,Lo.current&1),ve(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){ve(Lo,Lo.current),ve(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(ve(Lo,Lo.current),ve(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){ve(Lo,Lo.current),ve(Ao,Ao.current)}function Io(e){_e(Ao),jo===e&&(jo=null),_e(Lo)}var Lo=ge(0);function Ro(e,t){ve(Ao,Ao.current),ve(Lo,t)}function zo(e){_e(Lo),_e(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hm(n)||gm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Vo=0,B=null,Ho=null,Uo=null,Wo=!1,Go=!1,Ko=!1,qo=0,Jo=0,Yo=null,Xo=0;function Zo(){throw Error(i(321))}function Qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function $o(e,t,n,r,i,a){return Vo=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?gc:_c,Ko=!1,a=n(r,i),Ko=!1,Go&&(a=ts(t,n,r,i)),es(e),a}function es(e){I.H=hc;var t=Ho!==null&&Ho.next!==null;if(Vo=0,Uo=Ho=B=null,Wo=!1,Jo=0,Yo=null,t)throw Error(i(300));e===null||Pc||(e=e.dependencies,e!==null&&Sa(e)&&(Pc=!0))}function ts(e,t,n,r){B=e;var a=0;do{if(Go&&(Yo=null),Jo=0,Go=!1,25<=a)throw Error(i(301));if(a+=1,Uo=Ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=vc,o=t(n,r)}while(Go);return o}function ns(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?ls(t):t,e=e.useState()[0],(Ho===null?null:Ho.memoizedState)!==e&&(B.flags|=1024),t}function rs(){var e=qo!==0;return qo=0,e}function is(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function as(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Vo=0,Uo=Ho=B=null,Go=!1,Jo=qo=0,Yo=null}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?B.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function ss(){if(Ho===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?B.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw B.alternate===null?Error(i(467)):Error(i(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?B.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ls(e){var t=Jo;return Jo+=1,Yo===null&&(Yo=[]),e=$a(Yo,e,t),t=B,(Uo===null?t.memoizedState:Uo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?gc:_c),e}function us(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ls(e);if(e.$$typeof===ce)return;if(e.$$typeof===N)return wa(e)}throw Error(i(438,String(e)))}function ds(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=cs(),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]=oe;return t.index++,n}function fs(e,t){return typeof t==`function`?t(e):t}function ps(e){return ms(ss(),Ho,e)}function ms(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?(Vo&f)===f:(ad&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===Ra&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ra&&(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,pd|=p;f=u.action,Ko&&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,pd|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(Pc=!0,d&&(n=za,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 hs(e){var t=ss(),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);Br(o,t.memoizedState)||(Pc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function gs(e,t,n){var r=B,a=ss(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((Ho||a).memoizedState,n);if(s&&(a.memoizedState=n,Pc=!0),a=a.queue,Vs(ys.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Uo!==null&&!!(Uo.memoizedState.tag&1),Is(e?9:8,{destroy:void 0},vs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,rd===null)throw Error(i(349));o||Vo&127||_s(r,t,n)}return n}function _s(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=cs(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vs(e,t,n,r){t.value=n,t.getSnapshot=r,bs(t)&&xs(e)}function ys(e,t,n){return n(function(){bs(t)&&xs(e)})}function bs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function xs(e){var t=Ei(e,2);t!==null&&Vd(t,e,2)}function Ss(e){var t=os();if(typeof e==`function`){var n=e;if(e=n(),Ko){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:e},t}function Cs(e,t,n,r){return e.baseState=n,ms(e,Ho,typeof r==`function`?r:fs)}function ws(e,t,n,r,a){if(fc(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)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ts(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ts(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Es(e,t,s)}catch(n){Os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Es(e,t,a)}catch(n){Os(e,t,n)}}function Es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ds(e,t,n)},function(n){return Os(e,t,n)}):Ds(e,t,n)}function Ds(e,t,n){t.status=`fulfilled`,t.value=n,ks(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ts(e,n)))}function Os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ks(t),t=t.next;while(t!==r)}e.action=null}function ks(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function As(e,t){return t}function js(e,t){if(z){var n=rd.formState;if(n!==null){a:{var r=B;if(z){if(ra){b:{for(var i=ra,a=aa;i.nodeType!==8;){if(!a){i=null;break b}if(i=vm(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ra=vm(i.nextSibling),r=i.data===`F!`;break a}}sa(r)}r=!1}r&&(t=n[0])}}return n=os(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:t},n.queue=r,n=lc.bind(null,B,r),r.dispatch=n,r=Ss(!1),a=dc.bind(null,B,!1,r.queue),r=os(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ws.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ms(e){return Ns(ss(),Ho,e)}function Ns(e,t,n){if(t=ms(e,t,As)[0],e=ps(fs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ls(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=ss();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,Is(9,{destroy:void 0},Ps.bind(null,i,n),null)),[r,a,e]}function Ps(e,t){e.action=t}function Fs(e){var t=ss(),n=Ho;if(n!==null)return Ns(t,n,e);ss(),t=t.memoizedState,n=ss();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=cs(),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 Ls(){return ss().memoizedState}function Rs(e,t,n,r){var i=os();B.flags|=e,i.memoizedState=Is(1|t,{destroy:void 0},n,r===void 0?null:r)}function zs(e,t,n,r){var i=ss();r=r===void 0?null:r;var a=i.memoizedState.inst;Ho!==null&&r!==null&&Qo(r,Ho.memoizedState.deps)?i.memoizedState=Is(t,a,n,r):(B.flags|=e,i.memoizedState=Is(1|t,a,n,r))}function Bs(e,t){Rs(8390656,8,e,t)}function Vs(e,t){zs(2048,8,e,t)}function Hs(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=cs(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Us(e){var t=ss().memoizedState;return Hs({ref:t,nextImpl:e}),function(){if(nd&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Ws(e,t){return zs(4,2,e,t)}function Gs(e,t){return zs(4,4,e,t)}function Ks(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 qs(e,t,n){n=n==null?null:n.concat([e]),zs(4,4,Ks.bind(null,t,e),n)}function Js(){}function Ys(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Qo(t,r[1]))return r[0];if(r=e(),Ko){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Zs(e,t,n){return n===void 0||Vo&1073741824&&!(ad&261930)?e.memoizedState=t:(e.memoizedState=n,e=zd(),B.lanes|=e,pd|=e,n)}function Qs(e,t,n,r){return Br(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(ad&261930)?(Pc=!0,e.memoizedState=n):(e=zd(),B.lanes|=e,pd|=e,t):(e=Zs(e,n,r),Br(e,t)||(Pc=!0),e)}function $s(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,dc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?uc(e,t,Ha(c,r),Rd(e)):uc(e,t,r,Rd(e))}catch(n){uc(e,t,{then:function(){},status:`rejected`,reason:n},Rd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ec(){}function tc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=nc(e).queue;$s(e,a,t,pe,n===null?ec:function(){return rc(e),n(r)})}function nc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function rc(e){var t=nc(e);t.next===null&&(t=e.alternate.memoizedState),uc(e,t.next.queue,{},Rd())}function ic(){return wa(gh)}function ac(){return ss().memoizedState}function oc(){return ss().memoizedState}function sc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Rd();e=go(n);var r=_o(t,e,n);r!==null&&(Vd(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function cc(e,t,n){var r=Rd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?pc(t,n):(n=Ti(e,t,n,r),n!==null&&(Vd(n,e,r),mc(n,t,r)))}function lc(e,t,n){uc(e,t,n,Rd())}function uc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))pc(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,Br(s,o))return wi(e,t,i,0),rd===null&&Ci(),!1}catch{}if(n=Ti(e,t,i,r),n!==null)return Vd(n,e,r),mc(n,t,r),!0}return!1}function dc(e,t,n,r){if(r={lane:2,revertLane:H(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(i(479))}else t=Ti(e,n,r,2),t!==null&&Vd(t,e,2)}function fc(e){var t=e.alternate;return e===B||t!==null&&t===B}function pc(e,t){Go=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var hc={readContext:wa,use:us,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo,useEffectEvent:Zo},gc={readContext:wa,use:us,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:Bs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Rs(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=os();t=t===void 0?null:t;var r=e();if(Ko){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=os();if(n!==void 0){var i=n(t);if(Ko){Xe(!0);try{n(t)}finally{Xe(!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=cc.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:function(e){e=Ss(e);var t=e.queue,n=lc.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Js,useDeferredValue:function(e,t){return Zs(os(),e,t)},useTransition:function(){var e=Ss(!1);return e=$s.bind(null,B,e.queue,!0,!1),os().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,a=os();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),rd===null)throw Error(i(349));ad&127||_s(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Bs(ys.bind(null,r,o,e),[e]),r.flags|=2048,Is(9,{destroy:void 0},vs.bind(null,r,o,n,t),null),n},useId:function(){var e=os(),t=rd.identifierPrefix;if(z){var n=Xi,r=Yi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=qo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ic,useFormState:js,useActionState:js,useOptimistic:function(e){var t=os();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=dc.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:ds,useCacheRefresh:function(){return os().memoizedState=sc.bind(null,B)},useEffectEvent:function(e){var t=os(),n={impl:e};return t.memoizedState=n,function(){if(nd&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},_c={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:ps,useRef:Ls,useState:function(){return ps(fs)},useDebugValue:Js,useDeferredValue:function(e,t){return Qs(ss(),Ho.memoizedState,e,t)},useTransition:function(){var e=ps(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){return Cs(ss(),Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us},vc={readContext:wa,use:us,useCallback:Ys,useContext:wa,useEffect:Vs,useImperativeHandle:qs,useInsertionEffect:Ws,useLayoutEffect:Gs,useMemo:Xs,useReducer:hs,useRef:Ls,useState:function(){return hs(fs)},useDebugValue:Js,useDeferredValue:function(e,t){var n=ss();return Ho===null?Zs(n,e,t):Qs(n,Ho.memoizedState,e,t)},useTransition:function(){var e=hs(fs)[0],t=ss().memoizedState;return[typeof e==`boolean`?e:ls(e),t]},useSyncExternalStore:gs,useId:ac,useHostTransitionStatus:ic,useFormState:Fs,useActionState:Fs,useOptimistic:function(e,t){var n=ss();return Ho===null?(n.baseState=e,[e,n.queue.dispatch]):Cs(n,Ho,e,t)},useMemoCache:ds,useCacheRefresh:oc,useEffectEvent:Us};function yc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rd(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Vd(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rd(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Vd(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rd(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(Vd(t,e,n),vo(t,e,n))}};function xc(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?!Vr(n,r)||!Vr(i,a):!0}function Sc(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&&bc.enqueueReplaceState(t,t.state,null)}function Cc(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=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function wc(e){yi(e)}function Tc(e){console.error(e)}function Ec(e){yi(e)}function Dc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Oc(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 kc(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){Dc(e,t)},n}function Ac(e){return e=go(e),e.tag=3,e}function jc(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(){Oc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Oc(t,n,r),typeof i!=`function`&&(Td===null?Td=new Set([this]):Td.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Mc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,a,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?$d():n.alternate===null&&fd===0&&(fd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Sf(e,r,a)),!1;case 22:return n.flags|=65536,r===Za?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)),Sf(e,r,a)),!1}throw Error(i(435,n.tag))}return Sf(e,r,a),$d(),!1}if(z)return t=Ao.current,t===null?(r!==oa&&(t=Error(i(423),{cause:r}),pa(Vi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Vi(r,n),a=kc(e.stateNode,r,a),yo(e,a),fd!==4&&(fd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==oa&&(e=Error(i(422),{cause:r}),pa(Vi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Vi(o,n),vd===null?vd=[o]:vd.push(o),fd!==4&&(fd=2),t===null)return!0;r=Vi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=kc(n.stateNode,r,e),yo(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`&&(Td===null||!Td.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ac(a),jc(a,e,n,r),yo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Nc=Error(i(461)),Pc=!1;function Fc(e,t,n,r){t.child=e===null?fo(t,null,n,r):uo(t,e.child,n,r)}function Ic(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 Ca(t),r=$o(e,t,n,o,a,i),s=rs(),e!==null&&!Pc?(is(e,t,i),ul(e,t,i)):(z&&s&&$i(t),t.flags|=1,Fc(e,t,r,i),t.child)}function Lc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Mi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Rc(e,t,a,r,i)):(e=Fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!dl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return ul(e,t,i)}return t.flags|=1,e=Ni(a,r),e.ref=t.ref,e.return=t,t.child=e}function Rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(Pc=!1,t.pendingProps=r=a,dl(e,i))e.flags&131072&&(Pc=!0);else return t.lanes=e.lanes,ul(e,t,i)}}return Kc(e,t,n,r,i)}function zc(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 Vc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Vc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Oo(),Fo()):(Ka(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Fc(e,t,i,n),t.child}function Bc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Oo(),Po(t),e!==null&&xa(e,t,r,!0),t.childLanes=i,null}function Hc(e,t){return t=tl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Uc(e,t,n){return uo(t,e.child,null,n),e=Hc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Wc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=Hc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Bc(null,e);if(No(t),(e=ra)?(e=mm(e,aa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ji===null?null:{id:Yi,overflow:Xi},retryLane:536870912,hydrationErrors:null},n=Ri(e),n.return=t,t.child=n,na=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=536870912,null}return Hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),a){if(t.flags&256)t.flags&=-257,t=Uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Pc||xa(e,t,n,!1),a=(n&e.childLanes)!==0,Pc||a){if(To.current===null){if(r=rd,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ei(e,s),Vd(r,e,s),Nc;$d()}t=Uc(e,t,n)}else e=o.treeContext,ra=vm(s.nextSibling),na=t,z=!0,ia=null,aa=!1,e!==null&&ta(t,e),t=Hc(t,r),t.flags|=134221824;return t}return e=Ni(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gc(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 Kc(e,t,n,r,i){return Ca(t),n=$o(e,t,n,r,void 0,i),r=rs(),e!==null&&!Pc?(is(e,t,i),ul(e,t,i)):(z&&r&&$i(t),t.flags|=1,Fc(e,t,n,i),t.child)}function qc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=ts(t,r,n,i),es(e),r=rs(),e!==null&&!Pc?(is(e,t,a),ul(e,t,a)):(z&&r&&$i(t),t.flags|=1,Fc(e,t,n,a),t.child)}function Jc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ki,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},mo(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):ki,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(yc(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&&bc.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),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=Cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ki,typeof u==`object`&&u&&(o=wa(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)&&Sc(t,a,r,o),po=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||po?(typeof d==`function`&&(yc(t,n,d,r),l=t.memoizedState),(c=po||xc(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,ho(e,t),o=t.memoizedProps,u=Cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ki,typeof l==`object`&&l&&(c=wa(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)&&Sc(t,a,r,c),po=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||po||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(yc(t,n,s,r),p=t.memoizedState),(u=po||xc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(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,Gc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=uo(t,e.child,null,i),t.child=uo(t,null,n,i)):Fc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ul(e,t,i),e}function Yc(e,t,n,r){return da(),t.flags|=256,Fc(e,t,n,r),t.child}var Xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zc(e){return{baseLanes:e,cachePool:qa()}}function Qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=gd),e}function $c(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?Mo(t):Fo(),(e=ra)?(e=mm(e,aa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ji===null?null:{id:Yi,overflow:Xi},retryLane:536870912,hydrationErrors:null},n=Ri(e),n.return=t,t.child=n,na=t,ra=null)):e=null,e===null)throw sa(t);return t.lanes=gm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=tl({mode:`hidden`,children:a},i),r=Ii(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Zc(n),r.childLanes=Qc(e,o,n),t.memoizedState=Xc,Bc(null,r)):(Mo(t),el(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return rl(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ni(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ii(i,a,n,null),i.flags|=2):i=Ni(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Bc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Zc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Qc(e,o,n),t.memoizedState=Xc,Bc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Ni(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function el(e,t){return t=tl({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function tl(e,t){return e=ji(22,e,null,t),e.lanes=0,e}function nl(e,t,n){return uo(t,e.child,null,n),e=el(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,nl(e,t,c)):t.memoizedState===null?(Fo(),o=a.fallback,s=t.mode,a=tl({mode:`visible`,children:a.children},s),o=Ii(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,uo(t,e.child,null,c),a=t.child,a.memoizedState=Zc(c),a.childLanes=Qc(e,r,c),t.memoizedState=Xc,Bc(null,a)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),gm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,pa({value:a,source:null,stack:null})),nl(e,t,c)}if(Pc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Pc||r){if(To.current!==null)return nl(e,t,c);if(r=rd,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ei(e,a),Vd(r,e,a),Nc;return hm(o)||$d(),nl(e,t,c)}return hm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ra=vm(o.nextSibling),na=t,z=!0,ia=null,aa=!1,e!==null&&ta(t,e),t=el(t,a.children),t.flags|=134221824,t)}function il(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ya(e.return,t,n)}function al(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function ol(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 sl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function cl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(sl(e),Fc(e,t,r,n),sl(e)):Fc(e,t,r,n),r=z?Gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&il(e,n,t);else if(e.tag===19)il(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`backwards`:n=al(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,sl(t)),ol(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ol(t,!0,n,null,a,r);break;case`together`:ol(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=al(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ol(t,!1,i,n,a,r)}return t.child}function ll(e,t,n){var r=t.pendingProps;return _a(t,t.type,r.value),Fc(e,t,r.children,n),t.child}function ul(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pd|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(xa(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=Ni(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ni(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function fl(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),_a(t,Aa,e.memoizedState.cache),da();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?$c(e,t,n):(Mo(t),e=ul(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return cl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return cl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,zc(e,t,n,t.pendingProps);case 24:_a(t,Aa,e.memoizedState.cache)}return ul(e,t,n)}function pl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Pc=!0;else{if(!dl(e,n)&&!(t.flags&128))return Pc=!1,fl(e,t,n);Pc=!!(e.flags&131072)}}else Pc=!1,z&&t.flags&1048576&&Qi(t,Gi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Mi(e)?(r=Cc(e,r),t.tag=1,t=Jc(null,t,e,r,n)):(t.tag=0,t=Kc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Ic(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Lc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=ll(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return Kc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Cc(r,t.pendingProps),Jc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ho(e,t),So(t,r,null,n);var s=t.memoizedState;if(r=s.cache,_a(t,Aa,r),r!==o.cache&&ba(t,[Aa],n,!0),xo(),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}if(r!==a){a=Vi(Error(i(424)),t),pa(a),t=Yc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ra=vm(e.firstChild),na=t,z=!0,ia=null,aa=!0,n=fo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(da(),r===a){t=ul(e,t,n);break a}Fc(e,t,r,n)}t=t.child}return t;case 26:return Gc(e,t),e===null?(n=Hm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=xp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Hm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&z&&(r=t.stateNode=wm(t.type,t.pendingProps,xe.current),na=t,aa=!0,a=ra,jp(t.type)?(ym=a,ra=vm(r.firstChild)):ra=a),Fc(e,t,t.pendingProps.children,n),Gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=ra)&&(r=fm(r,t.type,t.pendingProps,aa),r===null?a=!1:(t.stateNode=r,na=t,ra=vm(r.firstChild),aa=!1,a=!0)),a||sa(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Sp(a,o)?r=null:s!==null&&Sp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=$o(e,t,ns,null,null,n),gh._currentValue=a),Gc(e,t),Fc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=ra)&&(n=pm(n,t.pendingProps,aa),n===null?e=!1:(t.stateNode=n,na=t,ra=null,e=!0)),e||sa(t)),null;case 13:return $c(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):Fc(e,t,r,n),t.child;case 11:return Ic(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Gc(e,t),Fc(e,t,r,n),t.child;case 8:return Fc(e,t,t.pendingProps.children,n),t.child;case 12:return Fc(e,t,t.pendingProps.children,n),t.child;case 10:return ll(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ca(t),a=wa(a),r=r(a),t.flags|=1,Fc(e,t,r,n),t.child;case 14:return Lc(e,t,t.type,t.pendingProps,n);case 15:return Rc(e,t,t.type,t.pendingProps,n);case 19:return cl(e,t,n);case 31:return Wc(e,t,n);case 22:return zc(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(a=Ga(),a===null&&(a=rd,o=ja(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},mo(t),_a(t,Aa,a)):((e.lanes&n)!==0&&(ho(e,t),So(t,null,null,n),xo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,_a(t,Aa,r),r!==a.cache&&ba(t,[Aa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),_a(t,Aa,r))),Fc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&$i(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Gc(e,t),Fc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ml(e){e.flags|=4}function hl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?rh(t,r):rh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Xd())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function gl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ih(t)){if(Xd())e.flags|=8192;else throw to=Za,Ya}}function _l(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,_d|=t)}function vl(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function yl(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&1206910976,r|=i.flags&1206910976,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 bl(e,t,n){var r=t.pendingProps;switch(ea(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yl(t),null;case 1:return yl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),va(Aa),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ua(t)?ml(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fa())),yl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ml(t),o===null?(yl(t),hl(t,a,null,r,n)):(yl(t),gl(t,o))):o?o===e.memoizedState?(yl(t),t.flags&=-16777217):(ml(t),yl(t),gl(t,o)):(e=e.memoizedProps,e!==r&&ml(t),yl(t),hl(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return yl(t),t.subtreeFlags&=-33554433,null}e=ye.current,ua(t)?ca(t,e):(e=wm(a,r,n),t.stateNode=e,ml(t))}return yl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return yl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,ua(t))ca(t,o);else{var s=W(xe.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[xt]=t,o[St]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(fp(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&&ml(t)}}return yl(t),t.subtreeFlags&=-33554433,hl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ml(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,ua(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=na,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||sa(t,!0)}else e=W(e).createTextNode(r),e[xt]=t,t.stateNode=e}return yl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ua(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[xt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yl(t),e=!1}else n=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(i(558))}return yl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ua(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[xt]=t}else da(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yl(t),a=!1}else a=fa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(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),_l(t,t.updateQueue),yl(t),null);case 4:return we(),e===null&&ep(t.stateNode.containerInfo),t.flags|=67108864,yl(t),null;case 10:return va(t.type),yl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return yl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)vl(r,!1);else{if(fd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,vl(r,!1),e=o.updateQueue,t.updateQueue=e,_l(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),z&&Zi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>Cd&&(t.flags|=128,a=!0,vl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,_l(t,e),vl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return yl(t),null}else 2*ze()-r.renderingStartTime>Cd&&n!==536870912&&(t.flags|=128,a=!0,vl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Lo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?Ro(t,o):(n=o,ve(Ao,t),ve(Lo,n),jo===null&&(jo=t)),z&&Zi(t,r.treeForkCount),e}return yl(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(yl(t),t.subtreeFlags&6&&(t.flags|=8192)):yl(t),n=t.updateQueue,n!==null&&_l(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&&_e(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),yl(t),null;case 25:return null;case 30:return t.flags|=33554432,yl(t),null}throw Error(i(156,t.tag))}function xl(e,t){switch(ea(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&_e(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function Sl(e,t){switch(ea(t),t.tag){case 3:va(Aa),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&_e(Wa);break;case 24:va(Aa)}}function Cl(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){xf(t,t.return,e)}}function wl(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){xf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){xf(t,t.return,e)}}function Tl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){xf(e,e.return,t)}}}function El(e,t,n){n.props=Cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){xf(e,t,n)}}function Dl(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:var i=e.stateNode,a=gi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Up(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Wp(e);f(e.child,!1,sm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){xf(e,t,n)}}function Ol(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){xf(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){xf(e,t,n)}else n.current=null}}function kl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)lm(e.stateNode,t[n])}function Al(e){for(var t=e.return;t!==null&&(Nl(t)&&lm(e.stateNode,t.stateNode),!Ml(t));)t=t.return}function jl(e){for(var t=e.return;t!==null&&(Nl(t)&&um(e.stateNode,t.stateNode),!Ml(t));)t=t.return}function Ml(e){return e.tag===5||e.tag===3||e.tag===27}function Nl(e){return e&&e.tag===7&&e.stateNode!==null}function Pl(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){xf(e,e.return,t)}}function Fl(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[St]=t}catch(t){xf(e,e.return,t)}}function Il(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&jp(e.type)||e.tag===4}function Ll(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Il(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&&jp(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 Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n)),kl(e,r),Gt=!0;else if(i!==4&&(i===27&&(kl(e,r),r=null,jp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),kl(e,r),Gt=!0;else if(i!==4&&(i===27&&(kl(e,r),r=null,jp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(zl(e,t,n,r),e=e.sibling;e!==null;)zl(e,t,n,r),e=e.sibling}function Bl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);fp(t,r,n),t[xt]=e,t[St]=n}catch(t){xf(e,e.return,t)}}var Vl=!1,Hl=null;function Ul(e){(e.tag===30||e.subtreeFlags&33554432)&&(Vl=!0)}var Wl=null;function Gl(){var e=Wl;return Wl=null,e}var Kl=0;function ql(e,t,n,r,i){return Kl=0,Jl(e.child,t,n,r,i)}function Jl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Lp(o);r.push(s),s.view&&(a=!0)}else a||Lp(o).view&&(a=!0);Vl=!0,Pp(o,Kl===0?t:t+`_`+Kl,n),Kl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Jl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Yl(e,t){for(;e!==null;)e.tag===5?Fp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Yl(e.child,t)),e=e.sibling}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=vi(t.default,t.share),t!==`none`&&(ql(e,n,t,null,!1)||Yl(e.child,!1))}e=e.sibling}}function Zl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=gi(r,n),a=vi(r.default,n.paired?r.share:r.enter);a===`none`?Xl(e):ql(e,i,a,null,!1)?(Xl(e),n.paired||t||Bd(e,r.onEnter)):Yl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e,t),e=e.sibling;else Xl(e)}function Ql(e){if(Hl!==null&&Hl.size!==0){var t=Hl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=vi(n.default,n.share);if(a!==`none`&&(ql(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Bd(e,n.onShare)):Yl(e.child,!1)),t.delete(r),t.size===0)break}}}Ql(e)}e=e.sibling}}}function $l(e){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode),r=Hl===null?void 0:Hl.get(n),i=vi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(ql(e,n,i,null,!1)?r===void 0?Bd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Hl.delete(n),Bd(e,t.onShare)):Yl(e.child,!1)),Hl!==null&&Ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Hl!==null&&Ql(e)}function eu(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=gi(t,e.stateNode);t=vi(t.default,t.update),e.flags&=-5,t!==`none`&&ql(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&eu(e);e=e.sibling}}function tu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Yl(e.child,!1))}tu(e)}e=e.sibling}}function nu(e){if(e.tag===30)e.stateNode.paired=null,Yl(e.child,!1),tu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)nu(e),e=e.sibling;else tu(e)}function ru(e){for(e=e.child;e!==null;)e.tag===30?Yl(e.child,!1):e.subtreeFlags&33554432&&ru(e),e=e.sibling}function iu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Kl<a.length){var l=a[Kl],u=Lp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Pp(c,Kl===0?n:n+`_`+Kl,i),s&&e.flags&4||(Wl===null&&(Wl=[]),Wl.push(c,Kl===0?r:r+`_`+Kl,t.memoizedProps)),Kl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:iu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function au(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=gi(n,r),a=vi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Rp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Kl=0,i=iu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Bd(e,n.onUpdate))}else e.subtreeFlags&33554432&&au(e,t);e=e.sibling}}var ou=!1,su=!1,cu=!1,lu=!1,uu=typeof WeakSet==`function`?WeakSet:Set,du=null,fu=!1,pu=!1,mu=!1,hu=!1;function V(e,t,n){if(e=e.containerInfo,_p=Th,e=Kr(e),qr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(vp={focusedElem:e,selectionRange:r},Th=!1,n=(n&335544064)===n,du=t,t=n?9270:1024;du!==null;){if(e=du,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&$l(r[a]);if(e.alternate===null&&e.flags&2)n&&Ul(e),gu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&$l(r),gu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Ul(e),gu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,du=r):(n&&eu(e),gu(n))}}Hl=null}function gu(e){for(;du!==null;){var t=du,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Cc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){xf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)dm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:dm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=gi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=vi(a.default,a.update),a!==`none`&&ql(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,du=r;break}du=t.return}}function _u(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Lu(e,n),r&4&&Cl(5,n);break;case 1:if(Lu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){xf(n,n.return,e)}else{var i=Cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){xf(n,n.return,e)}}}r&64&&Tl(n),r&512&&Dl(n,n.return);break;case 3:if(Lu(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{wo(e,t)}catch(e){xf(n,n.return,e)}}break;case 27:t===null&&r&4&&Bl(n);case 26:case 5:Lu(e,n),t===null&&r&4&&Pl(n),r&512&&Dl(n,n.return);break;case 12:Lu(e,n);break;case 31:Lu(e,n),r&4&&Eu(e,n);break;case 13:Lu(e,n),r&4&&Du(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Tf.bind(null,n),_m(e,n))));break;case 22:if(r=n.memoizedState!==null||ou,!r){var a=t!==null&&t.memoizedState!==null||su;t=ou,i=su,ou=r,(su=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),zu(e,n,r)):Lu(e,n),ou=t,su=i}break;case 30:Lu(e,n),r&512&&Dl(n,n.return);break;case 7:r&512&&Dl(n,n.return);default:Lu(e,n)}}function vu(e,t){for(e=e.child;e!==null;)yu(e,t),e=e.sibling}function yu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){xf(e,e.return,t)}bu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){xf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Np(s,!0):Np(e.stateNode,!1)}catch(t){xf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&vu(e,t);break;default:vu(e,t)}}function bu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:yu(n,r);break a;case 22:n.memoizedState===null&&bu(n,r);break a;default:bu(n,r)}}e=e.sibling}}function xu(e){var t=e.alternate;t!==null&&(e.alternate=null,xu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(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 Su=null,Cu=!1;function wu(e,t,n){for(n=n.child;n!==null;)Tu(e,t,n),n=n.sibling}function Tu(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:su||Ol(n,t),wu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!su&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:su||Ol(n,t),jl(n);var r=Su,i=Cu;jp(n.type)&&(Su=n.stateNode,Cu=!1),wu(e,t,n),Tm(n.stateNode,n.type,n.memoizedProps),Su=r,Cu=i;break;case 5:su||Ol(n,t),jl(n);case 6:if(n.tag===6&&jl(n),r=Su,i=Cu,Su=null,wu(e,t,n),Su=r,Cu=i,Su!==null){if(Cu)try{(Su.nodeType===9?Su.body:Su.nodeName===`HTML`?Su.ownerDocument.body:Su).removeChild(n.stateNode),Gt=!0}catch(e){xf(n,t,e)}else try{Su.removeChild(n.stateNode),Gt=!0}catch(e){xf(n,t,e)}}break;case 18:Su!==null&&(Cu?(e=Su,Mp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Zh(e)):Mp(Su,n.stateNode));break;case 4:r=Su,i=Cu,Su=n.stateNode.containerInfo,Cu=!0,wu(e,t,n),Su=r,Cu=i;break;case 0:case 11:case 14:case 15:wl(2,n,t),su||wl(4,n,t),wu(e,t,n);break;case 1:su||(Ol(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&El(n,t,r)),wu(e,t,n);break;case 21:wu(e,t,n);break;case 22:su=(r=su)||n.memoizedState!==null,wu(e,t,n),su=r;break;case 30:Ol(n,t),wu(e,t,n);break;case 7:su||Ol(n,t),wu(e,t,n);break;default:wu(e,t,n)}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zh(e)}catch(e){xf(t,t.return,e)}}}function Du(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zh(e)}catch(e){xf(t,t.return,e)}}function Ou(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uu),t;default:throw Error(i(435,e.tag))}}function ku(e,t){var n=Ou(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ef.bind(null,e,t);t.then(r,r)}})}function Au(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(jp(l.type)){Su=l.stateNode,Cu=!1;break a}break;case 5:Su=l.stateNode,Cu=!1;break a;case 3:case 4:Su=l.stateNode.containerInfo,Cu=!0;break a}l=l.return}if(Su===null)throw Error(i(160));Tu(s,c,o),Su=null,Cu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mu(t,e,n),t=t.sibling}var ju=null;function Mu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Au(t,e,n),Nu(e),a&4&&(wl(3,e,e.return),Cl(3,e),wl(5,e,e.return));break;case 1:Au(t,e,n),Nu(e),a&512&&(su||r===null||Ol(r,r.return)),a&64&&ou&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ju,Au(t,e,n),Nu(e),a&512&&(su||r===null||Ol(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ou)e.stateNode=xp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),fp(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=eh(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=eh(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),fp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else ou||th(o,e.type,e.stateNode)}else e.stateNode=Ym(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Fl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||su||t.parentNode.removeChild(t)):a.count--,n===null?ou||th(o,e.type,e.stateNode):Ym(o,n,e.memoizedProps))}break;case 27:Au(t,e,n),Nu(e),a&512&&(su||r===null||Ol(r,r.return)),r!==null&&a&4&&Fl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=cu,cu=!1,Au(t,e,n),cu=o,Nu(e),a&512&&(su||r===null||Ol(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){xf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Fl(e,t,r===null?t:r.memoizedProps)),a&1024&&(lu=!0);break;case 6:if(Au(t,e,n),Nu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){xf(e,e.return,t)}}break;case 3:if(Gt=!1,$m=null,o=ju,ju=km(t.containerInfo),Au(t,e,n),ju=o,Nu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Zh(t.containerInfo)}catch(t){xf(e,e.return,t)}lu&&(lu=!1,Pu(e)),Gt=!1;break;case 4:a=cu,cu=ou,r=Kt(),o=ju,ju=km(e.stateNode.containerInfo),Au(t,e,n),Nu(e),ju=o,Gt&&pu&&(mu=!0),Gt=r,cu=a;break;case 12:Au(t,e,n),Nu(e);break;case 31:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 13:Au(t,e,n),Nu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(xd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ou,l=su,u=cu;ou=c||o,cu=u||o,su=l||s,Au(t,e,n),su=l,cu=u,ou=c,Nu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ou||su||(t=s||su,n=ou,r=su,ou=o||ou,su=t,Ru(e,2),ou=n,su=r),!o&&cu||vu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,ku(e,n))));break;case 19:Au(t,e,n),Nu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,ku(e,t)));break;case 30:a&512&&(su||r===null||Ol(r,r.return)),a=Kt(),o=pu,s=(n&335544064)===n,c=e.memoizedProps,pu=s&&vi(c.default,c.update)!==`none`,Au(t,e,n),Nu(e),s&&r!==null&&Gt&&(e.flags|=4),pu=o,Gt=a;break;case 21:break;case 7:a&512&&(su||r===null||Ol(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Au(t,e,n),Nu(e)}}function Nu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Il(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Nl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ml(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;zl(e,Ll(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),zl(e,Ll(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Rl(e,Ll(e),u,s);break;default:throw Error(i(161))}}catch(t){xf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Th=!0,t.reset(),Th=!1),e=e.sibling}}function Fu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Iu(t,e),t=t.sibling;else au(t,!1)}function Iu(e,t){var n=e.alternate;if(n===null)Zl(e,!1);else switch(e.tag){case 3:if(hu=fu=!1,Gl(),Fu(t,e),!fu&&!mu){if(e=Wl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Fp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),hu=!0}Wl=null;break;case 5:Fu(t,e);break;case 4:r=fu,fu=!1,Fu(t,e),fu&&(mu=!0),fu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Fu(t,e):Zl(e,!1));break;case 30:r=fu,i=Gl(),fu=!1,Fu(t,e),fu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=gi(a,o),o=gi(n.memoizedProps,o);var s=vi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Kl=0,t=iu(e,n,t,o,s,a,!0),Kl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Bd(e,e.memoizedProps.onUpdate),Wl=i):i!==null&&(i.push.apply(i,Wl),Wl=i),fu=e.flags&32?!0:r;break;default:Fu(t,e)}}function Lu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_u(e,t.alternate,t),t=t.sibling}function Ru(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:wl(4,n,n.return),Ru(n,r);break;case 1:Ol(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&El(n,n.return,i),Ru(n,r);break;case 27:r&2&&Tm(n.stateNode,n.type,n.memoizedProps);case 5:Ol(n,n.return),n.tag!==5&&n.tag!==27||jl(n),Ru(n,r);break;case 6:jl(n);break;case 26:Ol(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||su||i.parentNode.removeChild(i),Ru(n,r);break;case 22:n.memoizedState===null&&Ru(n,r);break;case 30:Ol(n,n.return),Ru(n,r);break;case 7:Ol(n,n.return);default:Ru(n,r)}e=e.sibling}}function zu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:zu(i,a,n),Cl(4,a);break;case 1:if(zu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){xf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],c)}catch(e){xf(r,r.return,e)}}s&&o&64&&Tl(a),Dl(a,a.return);break;case 27:n&2&&Bl(a);case 5:a.tag!==5&&a.tag!==27||Al(a),zu(i,a,n),s&&r===null&&o&4&&Pl(a),Dl(a,a.return);break;case 6:Al(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ou||th(km(c.ownerDocument),a.type,c),zu(i,a,n),s&&r===null&&o&4&&Pl(a),Dl(a,a.return);break;case 12:zu(i,a,n);break;case 31:zu(i,a,n),s&&o&4&&Eu(i,a);break;case 13:zu(i,a,n),s&&o&4&&Du(i,a);break;case 22:a.memoizedState===null&&zu(i,a,n),Dl(a,a.return);break;case 30:zu(i,a,n),Dl(a,a.return);break;case 7:Dl(a,a.return);default:zu(i,a,n)}t=t.sibling}}function Bu(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&&Ma(n))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Hu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Uu(e,t,n,r),t=t.sibling;else i&&ru(t)}function Uu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&nu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Hu(e,t,n,r),a&2048&&Cl(9,t);break;case 1:Hu(e,t,n,r);break;case 3:Hu(e,t,n,r),i&&hu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Hu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){xf(t,t.return,e)}}else Hu(e,t,n,r);break;case 31:Hu(e,t,n,r);break;case 13:Hu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&nu(t),o._visibility&2?Hu(e,t,n,r):(o._visibility|=2,Wu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&nu(s),o._visibility&2?Hu(e,t,n,r):Gu(e,t)),a&2048&&Bu(s,t);break;case 24:Hu(e,t,n,r),a&2048&&Vu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Yl(a.child,!0),Yl(t.child,!0))),Hu(e,t,n,r);break;default:Hu(e,t,n,r)}}function Wu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Wu(a,o,s,c,i),Cl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Wu(a,o,s,c,i)):u._visibility&2?Wu(a,o,s,c,i):Gu(a,o),i&&l&2048&&Bu(o.alternate,o);break;case 24:Wu(a,o,s,c,i),i&&l&2048&&Vu(o.alternate,o);break;default:Wu(a,o,s,c,i)}t=t.sibling}}function Gu(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:Gu(n,r),i&2048&&Bu(r.alternate,r);break;case 24:Gu(n,r),i&2048&&Vu(r.alternate,r);break;default:Gu(n,r)}t=t.sibling}}var Ku=8192;function qu(e,t,n){if(e.subtreeFlags&Ku)for(e=e.child;e!==null;)Ju(e,t,n),e=e.sibling}function Ju(e,t,n){switch(e.tag){case 26:qu(e,t,n),e.flags&Ku&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&oh(n,e)):sh(n,ju,e.memoizedState,e.memoizedProps));break;case 5:qu(e,t,n),e.flags&Ku&&(e=e.stateNode,(t&335544128)===t&&oh(n,e));break;case 3:case 4:var r=ju;ju=km(e.stateNode.containerInfo),qu(e,t,n),ju=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ku,Ku=16777216,qu(e,t,n),Ku=r):qu(e,t,n));break;case 30:if((e.flags&Ku)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Hl===null&&(Hl=new Map),Hl.set(r,i)}qu(e,t,n);break;default:qu(e,t,n)}}function Yu(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 Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,$u(r,e)}Yu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zu(e),e=e.sibling}function Zu(e){switch(e.tag){case 0:case 11:case 15:Xu(e),e.flags&2048&&wl(9,e,e.return);break;case 3:Xu(e);break;case 12:Xu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qu(e)):Xu(e);break;default:Xu(e)}}function Qu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];du=r,$u(r,e)}Yu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wl(8,t,t.return),Qu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Qu(t));break;default:Qu(t)}e=e.sibling}}function $u(e,t){for(;du!==null;){var n=du;switch(n.tag){case 0:case 11:case 15:wl(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:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,du=r;else a:for(n=e;du!==null;){r=du;var i=r.sibling,a=r.return;if(xu(r),r===n){du=null;break a}if(i!==null){i.return=a,du=i;break a}du=a}}}var ed={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},td=typeof WeakMap==`function`?WeakMap:Map,nd=0,rd=null,id=null,ad=0,od=0,sd=null,cd=!1,ld=!1,ud=!1,dd=0,fd=0,pd=0,md=0,hd=0,gd=0,_d=0,vd=null,yd=null,bd=!1,xd=0,Sd=0,Cd=1/0,wd=null,Td=null,Ed=0,Dd=null,Od=null,kd=0,Ad=0,jd=null,Md=null,Nd=null,Pd=null,Fd=null,Id=0,Ld=null;function Rd(){return nd&2&&ad!==0?ad&-ad:I.T===null?vt():H()}function zd(){if(gd===0){if(!(ad&536870912)||z){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),gd=e}else gd=536870912}return e=Ao.current,e!==null&&(e.flags|=32),gd}function Bd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Up(gi(e.memoizedProps,n))),Pd===null&&(Pd=[]),Pd.push(t.bind(null,r))}}function Vd(e,t,n){(e===rd&&(od===2||od===9)||e.cancelPendingCommit!==null)&&(Jd(e,0),Gd(e,ad,gd,!1)),dt(e,n),(!(nd&2)||e!==rd)&&(e===rd&&(!(nd&2)&&(md|=n),fd===4&&Gd(e,ad,gd,!1)),Pf(e))}function Hd(e,t,n){if(nd&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?nf(e,t):ef(e,t,!0),o=r;do{if(a===0){ld&&!r&&Gd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Wd(n)){a=ef(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=vd;var l=c.current.memoizedState.isDehydrated;if(l&&(Jd(c,s).flags|=256),s=ef(c,s,!1),s!==2&&s!==6){if(ud&&!l){c.errorRecoveryDisabledLanes|=o,md|=o,a=4;break a}o=yd,yd=a,o!==null&&(yd===null?yd=o:yd.push.apply(yd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Jd(e,0),Gd(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&&(t&62914560)!==t)break;case 6:Gd(r,t,gd,!cd);break a;case 2:yd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=xd+300-ze(),10<a)){if(Gd(r,t,gd,!cd),at(r,0,!0)!==0)break a;kd=t,r.timeoutHandle=Tp(Ud.bind(null,r,n,yd,wd,bd,t,gd,md,_d,cd,o,`Throttled`,-0,0),a);break a}Ud(r,n,yd,wd,bd,t,gd,md,_d,cd,o,null,-0,0)}break}while(1);Pf(e)}function Ud(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Hl=null,Ju(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=dh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?xd-ze():(a&4194048)===a?Sd-ze():0,m=lh(d,m),m!==null)){kd=a,e.cancelPendingCommit=m(uf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Gd(e,a,o,!l);return}uf(e,t,a,n,r,i,o,s,c,l,u,d)}function Wd(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(!Br(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 Gd(e,t,n,r){t=st(e,t),t&=~hd,t&=~md,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function Kd(){return nd&6?!0:(Ff(0,!1),!1)}function qd(){if(id!==null){if(od===0)var e=id.return;else e=id,ga=ha=null,as(e),io=null,ao=0,e=id;for(;e!==null;)Sl(e.alternate,e),e=e.return;id=null}}function Jd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Ep(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),kd=0,qd(),rd=e,id=n=Ni(e.current,null),ad=t,od=0,sd=null,cd=!1,ld=ot(e,t),ud=!1,_d=gd=hd=md=pd=fd=0,yd=vd=null,bd=!1,dd=st(e,t),Ci(),n}function Yd(e,t){B=null,I.H=hc,t===Ja||t===Xa?(t=no(),od=3):t===Ya?(t=no(),od=4):od=t===Nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,sd=t,id===null&&(fd=1,Dc(e,Vi(t,e.current)))}function Xd(){var e=Ao.current;return e===null?!0:(ad&4194048)===ad?jo===null:(ad&62914560)===ad||ad&536870912?e===jo:!1}function Zd(){var e=I.H;return I.H=hc,e===null?hc:e}function Qd(){var e=I.A;return I.A=ed,e}function $d(){fd=4,cd||(ad&4194048)!==ad&&Ao.current!==null||(ld=!0),!(pd&134217727)&&!(md&134217727)||rd===null||Gd(rd,ad,gd,!1)}function ef(e,t,n){var r=nd;nd|=2;var i=Zd(),a=Qd();(rd!==e||ad!==t)&&(wd=null,Jd(e,t)),t=!1;var o=fd;a:do try{if(od!==0&&id!==null){var s=id,c=sd;switch(od){case 8:qd(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=od;if(od=0,sd=null,sf(e,s,c,l),n&&ld){o=0;break a}break;default:l=od,od=0,sd=null,sf(e,s,c,l)}}tf(),o=fd;break}catch(t){Yd(e,t)}while(1);return t&&e.shellSuspendCounter++,ga=ha=null,nd=r,I.H=i,I.A=a,id===null&&(rd=null,ad=0,Ci()),o}function tf(){for(;id!==null;)af(id)}function nf(e,t){var n=nd;nd|=2;var r=Zd(),a=Qd();rd!==e||ad!==t?(wd=null,Cd=ze()+500,Jd(e,t)):ld=ot(e,t);a:do try{if(od!==0&&id!==null){t=id;var o=sd;b:switch(od){case 1:od=0,sd=null,sf(e,t,o,1);break;case 2:case 9:if(Qa(o)){od=0,sd=null,of(t);break}t=function(){od!==2&&od!==9||rd!==e||(od=7),Pf(e)},o.then(t,t);break a;case 3:od=7;break a;case 4:od=5;break a;case 7:Qa(o)?(od=0,sd=null,of(t)):(od=0,sd=null,sf(e,t,o,7));break;case 5:var s=null;switch(id.tag){case 26:s=id.memoizedState;case 5:case 27:var c=id;if(s?ih(s):c.stateNode.complete){od=0,sd=null;var l=c.sibling;if(l!==null)id=l;else{var u=c.return;u===null?id=null:(id=u,cf(u))}break b}}od=0,sd=null,sf(e,t,o,5);break;case 6:od=0,sd=null,sf(e,t,o,6);break;case 8:qd(),fd=6;break a;default:throw Error(i(462))}}rf();break}catch(t){Yd(e,t)}while(1);return ga=ha=null,I.H=r,I.A=a,nd=n,id===null?(rd=null,ad=0,Ci(),fd):0}function rf(){for(;id!==null&&!Le();)af(id)}function af(e){var t=pl(e.alternate,e,dd);e.memoizedProps=e.pendingProps,t===null?cf(e):id=t}function of(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qc(n,t,t.pendingProps,t.type,void 0,ad);break;case 11:t=qc(n,t,t.pendingProps,t.type.render,t.ref,ad);break;case 5:as(t);var r=t;r===na&&(z?(la(r),r.tag===5&&r.stateNode!=null&&(ra=r.stateNode)):(la(r),z=!0));default:Sl(n,t),t=id=Pi(t,dd),t=pl(n,t,dd)}e.memoizedProps=e.pendingProps,t===null?cf(e):id=t}function sf(e,t,n,r){ga=ha=null,as(t),io=null,ao=0;var i=t.return;try{if(Mc(e,i,t,n,ad)){fd=1,Dc(e,Vi(n,e.current)),id=null;return}}catch(t){if(i!==null)throw id=i,t;fd=1,Dc(e,Vi(n,e.current)),id=null;return}t.flags&32768?(z||r===1?e=!0:ld||ad&536870912?e=!1:(cd=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),lf(t,e)):cf(t)}function cf(e){var t=e;do{if(t.flags&32768){lf(t,cd);return}e=t.return;var n=bl(t.alternate,t,dd);if(n!==null){id=n;return}if(t=t.sibling,t!==null){id=t;return}id=t=e}while(t!==null);fd===0&&(fd=5)}function lf(e,t){do{var n=xl(e.alternate,e);if(n!==null){n.flags&=32767,id=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){id=e;return}id=e=n}while(e!==null);fd=6,id=null}function uf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do vf();while(Ed!==0);if(nd&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===rd&&(id=rd=null,ad=0),Od=t,Dd=e,kd=n,jd=a,Md=r,df(e,t,n,s,c,l,f)}}function df(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ad=s,s|=Si,ft(e,n,s,r,i,a),Pd=null,(n&335544064)===n?(Fd=Fa(e),r=10262):(Fd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Df(Ue,function(){return yf(),null})):(e.callbackNode=null,e.callbackPriority=0),Vl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=nd,nd|=4;try{V(e,t,n)}finally{nd=a,L.p=i,I.T=r}}Ed=1,Vl?Nd=Vp(o,e.containerInfo,Fd,mf,hf,pf,gf,yf,ff,null,null):(mf(),hf(),gf())}function ff(e){if(Ed!==0){var t=Dd.onRecoverableError;t(e,{componentStack:null})}}function pf(){Ed===3&&(Ed=0,Iu(Od,Dd),Ed=4)}function mf(){if(Ed===1){Ed=0;var e=Dd,t=Od,n=kd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=nd;nd|=4;try{pu=mu=!1,Mu(t,e,n),n=vp;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(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 _=Wr(s,h),v=Wr(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}}Th=!!_p,vp=_p=null}finally{nd=a,L.p=i,I.T=r}}e.current=t,Ed=2}}function hf(){if(Ed===2){Ed=0;var e=Dd,t=Od,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=nd;nd|=4;try{_u(e,t.alternate,t)}finally{nd=i,L.p=r,I.T=n}}Ed=3}}function gf(){if(Ed===4||Ed===3){Ed=0;var e=Nd;Nd=null,Re();var t=Dd,n=Od,r=kd,i=Md,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Ed=5:(Ed=0,Od=Dd=null,_f(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Td=null),_t(r),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,L.p=a}}if(i=Pd,o=Fd,Fd=null,i!==null&&(Pd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);kd&3&&vf(),Pf(t),a=t.pendingLanes,r&261930&&a&42?t===Ld?Id++:(Id=0,Ld=t):(Id=0,Ld=null),Ff(0,!1)}}function _f(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function vf(){return Nd!==null&&(Nd.skipTransition(),Nd=null),mf(),hf(),gf(),yf()}function yf(){if(Ed!==5)return!1;var e=Dd,t=Ad;Ad=0;var n=_t(kd),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=jd,jd=null;var o=Dd,s=kd;if(Ed=0,Od=Dd=null,kd=0,nd&6)throw Error(i(331));var c=nd;if(nd|=4,Zu(o.current),Uu(o,o.current,s,n),nd=c,Ff(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{L.p=a,I.T=r,_f(e,t)}}function bf(e,t,n){t=Vi(n,t),t=kc(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(dt(e,2),Pf(e))}function xf(e,t,n){if(e.tag===3)bf(e,e,n);else for(;t!==null;){if(t.tag===3){bf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Td===null||!Td.has(r))){e=Vi(n,e),n=Ac(2),r=_o(t,n,2),r!==null&&(jc(n,r,t,e),dt(r,2),Pf(r));break}}t=t.return}}function Sf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new td;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)||(ud=!0,i.add(n),e=Cf.bind(null,e,t,n),t.then(e,e))}function Cf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rd===e&&(ad&n)===n&&(fd===4||fd===3&&(ad&62914560)===ad&&300>ze()-xd?nd&2?hd|=n:Jd(e,0):hd|=n,_d===ad&&(_d=0)),Pf(e)}function wf(e,t){t===0&&(t=lt()),e=Ei(e,t),e!==null&&(dt(e,t),Pf(e))}function Tf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wf(e,n)}function Ef(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),wf(e,n)}function Df(e,t){return Fe(e,t)}var Of=null,kf=null,Af=!1,jf=!1,Mf=!1,Nf=0;function Pf(e){e!==kf&&e.next===null&&(kf===null?Of=kf=e:kf=kf.next=e),jf=!0,Af||(Af=!0,Vf())}function Ff(e,t){if(!Mf&&jf){Mf=!0;do for(var n=!1,r=Of;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-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Bf(r,a))}else a=ad,a=at(r,r===rd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Bf(r,a))}r=r.next}while(n);Mf=!1}}function If(){Lf()}function Lf(){jf=Af=!1;var e=0;Nf!==0&&wp()&&(e=Nf);for(var t=ze(),n=null,r=Of;r!==null;){var i=r.next,a=Rf(r,t);a===0?(r.next=null,n===null?Of=i:n.next=i,i===null&&(kf=n)):(n=r,(e!==0||a&3)&&(jf=!0)),r=i}Ed!==0&&Ed!==5||Ff(e,!1),Nf!==0&&(Nf=0)}function Rf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=rd,n=ad,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(od===2||od===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),_t(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=zf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function zf(e,t){if(Ed!==0&&Ed!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(vf()&&e.callbackNode!==n)return null;var r=ad;return r=at(e,e===rd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Hd(e,r,t),Rf(e,ze()),e.callbackNode!=null&&e.callbackNode===n?zf.bind(null,e):null)}function Bf(e,t){if(vf())return null;Hd(e,t,!0)}function Vf(){kp(function(){nd&6?Fe(Ve,If):Lf()})}function H(){if(Nf===0){var e=Ra;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),Nf=e}return Nf}function Hf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function Wf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Hf((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Hf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Nf!==0){var e=new FormData(i,o);tc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),tc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Kf=0;Kf<pi.length;Kf++){var qf=pi[Kf];mi(qf.toLowerCase(),`on`+(qf[0].toUpperCase()+qf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Jf=`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(` `),Yf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Jf));function Xf(e,t){t=!!(t&4);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){yi(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){yi(e)}i.currentTarget=null,a=c}}}}function Zf(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(tp(t,e,2,!1),n.add(r))}function Qf(e,t,n){var r=0;t&&(r|=4),tp(n,e,r,t)}var $f=`_reactListening`+Math.random().toString(36).slice(2);function ep(e){if(!e[$f]){e[$f]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Yf.has(t)||Qf(t,!1,e),Qf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$f]||(t[$f]=!0,Qf(`selectionchange`,!1,t))}}function tp(e,t,n,r){switch(Mh(t)){case 2:var i=Eh;break;case 8:i=Dh;break;default:i=Oh}n=i.bind(null,t,n,e),i=void 0,!Dn||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 np(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=jt(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}wn(function(){var r=a,i=yn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;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=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),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=Tn(m,p),g!=null&&d.push(rp(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,ap):null,c!==null&&U(s,u,c,d,!1),l!==null&&f!==null&&U(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,vr=!0)),v=ip(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=ip(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Wf(s,e,r,n,i)}Xf(s,t)})}function rp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ip(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=Tn(e,n),i!=null&&r.unshift(rp(e,i,a)),i=Tn(e,t),i!=null&&r.push(rp(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ap(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function U(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=Tn(n,a),l!=null&&o.unshift(rp(n,l,c))):i||(l=Tn(n,a),l!=null&&o.push(rp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var op=/\r\n?/g,sp=/\u0000|\uFFFD/g;function cp(e){return(typeof e==`string`?e:``+e).replace(op,`
18
- `).replace(sp,``)}function lp(e,t){return t=cp(t),cp(e)===t}function up(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=gn(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&up(e,t,`name`,a.name,a,null),up(e,t,`formEncType`,a.formEncType,a,null),up(e,t,`formMethod`,a.formMethod,a,null),up(e,t,`formTarget`,a.formTarget,a,null)):(up(e,t,`encType`,a.encType,a,null),up(e,t,`method`,a.method,a,null),up(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Zf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Zf(`scrollend`,e);return;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));o?.__html!==n&&(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=gn(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`credentialless`: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`:Zf(`beforetoggle`,e),Zf(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Zf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Zf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function fp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Zf(`error`,e),Zf(`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:up(e,t,o,s,n,null)}}a&&up(e,t,`srcSet`,n.srcSet,n,null),r&&up(e,t,`src`,n.src,n,null);return;case`input`:Zf(`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:up(e,t,r,d,n,null)}}an(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Zf(`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:up(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Zf(`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:up(e,t,s,c,n,null)}cn(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:up(e,t,l,r,n,null)}return;case`dialog`:Zf(`beforetoggle`,e),Zf(`toggle`,e),Zf(`cancel`,e),Zf(`close`,e);break;case`iframe`:case`object`:Zf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Jf.length;r++)Zf(Jf[r],e);break;case`image`:Zf(`error`,e),Zf(`load`,e);break;case`details`:Zf(`toggle`,e);break;case`embed`:case`source`:case`link`:Zf(`error`,e),Zf(`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:up(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&dp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&up(e,t,c,r,n,null))}var pp={};function mp(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)||up(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`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&up(e,t,p,m,r,f)}}rn(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)||up(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`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&up(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(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:up(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`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&up(e,t,s,a,r,o)}sn(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:up(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`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:up(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)&&up(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:up(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&dp(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||dp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&up(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||up(e,t,f,p,r,m)}function hp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function gp(){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&&hp(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&&hp(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 _p=null,vp=null;function W(e){return e.nodeType===9?e:e.ownerDocument}function yp(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 bp(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 xp(e,t,n,r){return n=W(n).createElement(e),n[xt]=r,n[St]=t,fp(n,e,t),Ft(n),n}function Sp(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 Cp=null;function wp(){var e=window.event;return e&&e.type===`popstate`?e!==Cp&&(Cp=e,!0):(Cp=null,!1)}var Tp=typeof setTimeout==`function`?setTimeout:void 0,Ep=typeof clearTimeout==`function`?clearTimeout:void 0,Dp=typeof Promise==`function`?Promise:void 0,Op=typeof requestAnimationFrame==`function`?requestAnimationFrame:Tp,kp=typeof queueMicrotask==`function`?queueMicrotask:Dp===void 0?Tp:function(e){return Dp.resolve(null).then(e).catch(Ap)};function Ap(e){setTimeout(function(){throw e})}function jp(e){return e===`head`}function Mp(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),Zh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Em(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Em(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Em(e.ownerDocument.body)}n=i}while(n);Zh(t)}function Np(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 Pp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Fp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ip(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Lp(e){return Ip(e.getBoundingClientRect(),getComputedStyle(e),e)}function Rp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ip(t,n,e)}function zp(e){return e.documentElement.clientHeight}function Bp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Vp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(zp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=ah(f),u>ch){s.length=o;break}f=new Promise(Bp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Hp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Hp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Hp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Hp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Up(e){return{name:e,group:new Hp(`group`,e),imagePair:new Hp(`image-pair`,e),old:new Hp(`old`,e),new:new Hp(`new`,e)}}function Wp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Wp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Yp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=qp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Gp,e,s,r)}this._eventListeners=a}};function Gp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Wp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Yp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=qp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,Kp,e,n,i),r.splice(t,1),a!==null&&a()}};function Kp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function qp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Jp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Yp(e,t,n,r){if(e.length===0)return-1;r=Jp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Jp(a.optionsOrUseCapture)===r)return i}return-1}Wp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,qp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,qp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Wp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Xp,e,void 0,void 0)};function Xp(e,t){return e.tag!==6&&(e=v(e),Sm(e,t))}Wp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Zp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Xp(t[n],e);n--);};function Zp(e,t){return t.push(e),!1}Wp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=W(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,Qp,e,void 0,void 0))};function Qp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Wp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,$p,e,void 0,void 0)};function $p(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Wp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,em,e,void 0,void 0);for(var n=t=0;n<tm.length;n++){var r=tm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):tm[t++]=r}tm.length=t}};function em(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var tm=[],nm=!1;function rm(e,t,n){tm.push({fragmentInstance:e,observer:t,instance:n}),nm||(nm=!0,Cm(function(){nm=!1;var e=tm;tm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Wp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,im,e,void 0,void 0),e};function im(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Wp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Wp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Zp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||am(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function am(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(f(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(f(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function om(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Wp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Zp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),om(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),om(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function sm(e,t){return e=v(e),cm(e,t),!1}function cm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function lm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,qp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<tm.length;i++){var a=tm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(tm[r++]=a)}tm.length=r,n.observe(e)}),cm(e,t))}function um(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,qp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?rm(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function dm(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`:dm(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function fm(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[Ot])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=vm(e.nextSibling),e===null)break}return null}function pm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vm(e.nextSibling),e===null))return null;return e}function mm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vm(e.nextSibling),e===null))return null;return e}function hm(e){return e.data===`$?`||e.data===`$~`}function gm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _m(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 vm(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 ym=null;function bm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xm(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 Sm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function Cm(e){Op(function(){Op(function(t){return e(t)})})}function wm(e,t,n){switch(t=W(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 Tm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&up(e,t,r,null,pp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),At(e)}function Em(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var Dm=new Map,Om=new Set;function km(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Am=L.d;L.d={f:jm,r:Mm,D:Fm,C:Im,L:Lm,m:Rm,X:Bm,S:zm,M:Vm};function jm(){var e=Am.f(),t=Kd();return e||t}function Mm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?rc(t):Am.r(e)}var Nm=typeof document>`u`?null:document;function Pm(e,t,n){var r=Nm;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Om.has(i)||(Om.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Fm(e){Am.D(e),Pm(`dns-prefetch`,e,null)}function Im(e,t){Am.C(e,t),Pm(`preconnect`,e,t)}function Lm(e,t,n){Am.L(e,t,n);var r=Nm;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Um(e);break;case`script`:a=qm(e)}if(!(Dm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Dm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wm(a))||t===`script`&&r.querySelector(Jm(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Rm(e,t){Am.m(e,t);var n=Nm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qm(e)}if(!Dm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Dm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jm(a)))return}r=n.createElement(`link`),fp(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function zm(e,t,n){Am.S(e,t,n);var r=Nm;if(r&&e){var i=Pt(r).hoistableStyles,a=Um(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Dm.get(a))&&Zm(e,n);var c=o=r.createElement(`link`);Ft(c),fp(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,Xm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bm(e,t){Am.X(e,t);var n=Nm;if(n&&e){var r=Pt(n).hoistableScripts,i=qm(e),a=r.get(i);a||(a=n.querySelector(Jm(i)),a||(e=T({src:e,async:!0},t),(t=Dm.get(i))&&Qm(e,t),a=n.createElement(`script`),Ft(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vm(e,t){Am.M(e,t);var n=Nm;if(n&&e){var r=Pt(n).hoistableScripts,i=qm(e),a=r.get(i);a||(a=n.querySelector(Jm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Dm.get(i))&&Qm(e,t),a=n.createElement(`script`),Ft(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hm(e,t,n,r){var a=(a=xe.current)?km(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`?(n=Um(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Um(n.href);var o=Pt(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(Wm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Dm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dm.set(e,o)),Km(a,e,o,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`?(n=qm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Um(e){return`href="`+nn(e)+`"`}function Wm(e){return`link[rel="stylesheet"][`+e+`]`}function Gm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Km(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),fp(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function qm(e){return`[src="`+nn(e)+`"]`}function Jm(e){return`script[async]`+e}function Ym(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),fp(r,`style`,a),Xm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Um(n.href);var o=e.querySelector(Wm(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Gm(n),(a=Dm.get(a))&&Zm(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),fp(o,`link`,r),t.state.loading|=4,Xm(o,n.precedence,e),t.instance=o;case`script`:return o=qm(n.src),(a=e.querySelector(Jm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=Dm.get(o))&&(r=T({},n),Qm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),fp(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,Xm(r,n.precedence,e));return t.instance}function Xm(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 Zm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $m=null;function eh(e,t,n){if($m===null){var r=new Map,i=$m=new Map;i.set(n,r)}else i=$m,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[Ot]||a[xt]||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 th(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function nh(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 rh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ih(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ah(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function oh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=ah(t),e.suspenseyImages.push(t)),e=fh.bind(e),t.decode().then(e,e))}function sh(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=Um(r.href),a=t.querySelector(Wm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=dh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Gm(r),(i=Dm.get(i))&&Zm(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),fp(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=dh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ch=0;function lh(e,t){return e.stylesheets&&e.count===0&&mh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ch===0&&(ch=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ch?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function uh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)mh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function dh(){this.count--,uh(this)}function fh(){this.imgCount--,uh(this)}var ph=null;function mh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ph=new Map,t.forEach(hh,e),ph=null,dh.call(e))}function hh(e,t){if(!(t.state.loading&4)){var n=ph.get(e);if(n)var r=n.get(null);else{n=new Map,ph.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=dh.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 gh={$$typeof:N,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function _h(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=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function vh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new _h(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ji(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},mo(a),e}function yh(e){return e?(e=ki,e):ki}function bh(e,t,n,r,i,a){i=yh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(Vd(n,e,t),vo(n,e,t))}function xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sh(e,t){xh(e,t),(e=e.alternate)&&xh(e,t)}function Ch(e){if(e.tag===13||e.tag===31){var t=Ei(e,67108864);t!==null&&Vd(t,e,67108864),Sh(e,67108864)}}function wh(e){if(e.tag===13||e.tag===31){var t=Rd();t=gt(t);var n=Ei(e,t);n!==null&&Vd(n,e,t),Sh(e,t)}}var Th=!0;function Eh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,Oh(e,t,n,r)}finally{L.p=a,I.T=i}}function Dh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,Oh(e,t,n,r)}finally{L.p=a,I.T=i}}function Oh(e,t,n,r){if(Th){var i=kh(r);if(i===null)np(e,t,r,Ah,n),Vh(e,r);else if(Uh(i,e,t,n,r))r.stopPropagation();else if(Vh(e,r),t&4&&-1<Bh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}Pf(a),!(nd&6)&&(Cd=ze()+500,Ff(0,!1))}}break;case 31:case 13:s=Ei(a,2),s!==null&&Vd(s,a,2),Kd(),Sh(a,2)}if(a=kh(r),a===null&&np(e,t,r,Ah,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else np(e,t,r,null,n)}}function kh(e){return e=yn(e),jh(e)}var Ah=null;function jh(e){if(Ah=null,e=jt(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 Ah=e,null}function Mh(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Nh=!1,Ph=null,Fh=null,Ih=null,Lh=new Map,Rh=new Map,zh=[],Bh=`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 Vh(e,t){switch(e){case`focusin`:case`focusout`:Ph=null;break;case`dragenter`:case`dragleave`:Fh=null;break;case`mouseover`:case`mouseout`:Ih=null;break;case`pointerover`:case`pointerout`:Lh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Rh.delete(t.pointerId)}}function Hh(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=Mt(t),t!==null&&Ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Uh(e,t,n,r,i){switch(t){case`focusin`:return Ph=Hh(Ph,e,t,n,r,i),!0;case`dragenter`:return Fh=Hh(Fh,e,t,n,r,i),!0;case`mouseover`:return Ih=Hh(Ih,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Lh.set(a,Hh(Lh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Rh.set(a,Hh(Rh.get(a)||null,e,t,n,r,i)),!0}return!1}function Wh(e){var t=jt(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,yt(e.priority,function(){wh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){wh(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 Gh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&Ch(t),e.blockedOn=n,!1;t.shift()}return!0}function Kh(e,t,n){Gh(e)&&n.delete(t)}function qh(){Nh=!1,Ph!==null&&Gh(Ph)&&(Ph=null),Fh!==null&&Gh(Fh)&&(Fh=null),Ih!==null&&Gh(Ih)&&(Ih=null),Lh.forEach(Kh),Rh.forEach(Kh)}function Jh(e,n){e.blockedOn===n&&(e.blockedOn=null,Nh||(Nh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qh)))}var Yh=null;function Xh(e){Yh!==e&&(Yh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Yh===e&&(Yh=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(jh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,tc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Zh(e){function t(t){return Jh(t,e)}Ph!==null&&Jh(Ph,e),Fh!==null&&Jh(Fh,e),Ih!==null&&Jh(Ih,e),Lh.forEach(t),Rh.forEach(t);for(var n=0;n<zh.length;n++){var r=zh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zh.length&&(n=zh[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&zh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[St]||null;if(typeof a==`function`)o||Xh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(jh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Xh(n)}}}function Qh(){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 $h(e){this._internalRoot=e}eg.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;bh(n,Rd(),e,t,null,null)},eg.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bh(e.current,2,null,e,null,null),Kd(),t[Ct]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zh.length&&t!==0&&t<zh[n].priority;n++);zh.splice(n,0,e),n===0&&Wh(e)}};var tg=n.version;if(tg!==`19.3.0`)throw Error(i(527,tg,`19.3.0`));L.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=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var ng={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var rg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rg.isDisabled&&rg.supportsFiber)try{Je=rg.inject(ng),Ye=rg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=wc,s=Tc,c=Ec;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=vh(e,1,!1,null,null,n,r,null,o,s,c,Qh),e[Ct]=t.current,ep(e),new $h(t)}})),qf=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=Kf()}))(),Jf={info:3600,success:3e3,warning:5e3,error:6e3},Yf,Xf=[],Zf=0,Qf=new Set;function $f(){for(let e of[...Qf])e()}function ep(e,t,n){let r=t.trim();if(!r)return;let i=Yf?.message===r?Yf:Xf.find(e=>e.message===r);if(i){if(n?.action&&!i.action){let e={...i,action:n.action};i===Yf?Yf=e:Xf=Xf.map(t=>t===i?e:t),$f()}return}let a={id:++Zf,kind:e,message:r,duration:n?.duration??Jf[e],...n?.action?{action:n.action}:{}};Yf?Xf=[...Xf,a].slice(-3):Yf=a,$f()}function tp(e){Yf?.id===e&&(Yf=Xf[0],Xf=Xf.slice(1),$f())}var np=Object.assign((e,t)=>ep(`info`,e,t),{success:(e,t)=>ep(`success`,e,t),error:(e,t)=>ep(`error`,e,t),warning:(e,t)=>ep(`warning`,e,t),info:(e,t)=>ep(`info`,e,t)});function rp(e){return Qf.add(e),()=>{Qf.delete(e)}}function ip(){return{item:(0,m.useSyncExternalStore)(rp,()=>Yf,()=>void 0),waiting:(0,m.useSyncExternalStore)(rp,()=>Xf.length,()=>0)}}function ap(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function U(e,t,n={}){try{let r=await Se(e,t),i=r.notice;return i&&np(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){np.error(ap(e));return}}var op=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function sp(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:op(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var cp=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},lp=e=>{let t=cp(e);return t.charAt(0).toUpperCase()+t.slice(1)},up=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),dp={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function fp(e){return e!=null}function pp(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??dp.width,a=e.size??e.height??dp.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?up(...c):up(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??dp[`stroke-width`])*Number(e.size??e.width??dp.width)/Number(t.size??t.width??dp.width):t.strokeWidth??dp[`stroke-width`];return[`svg`,{...Object.entries(dp).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&fp(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&fp(t.width)&&{[r(`width`)]:t.width},...`height`in t&&fp(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function mp(e,t={}){return pp(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var hp=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},gp=(0,m.createContext)({}),_p=()=>(0,m.useContext)(gp),vp=(0,m.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=_p()??{},b=!!c||hp(d),[x,S,C=[]]=mp(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:up(y,s),hasA11yProp:b,attributes:d});return(0,m.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,m.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function W(e,t=[],n=[]){let r=typeof e==`string`?sp(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(vp,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=lp(r.name)),i}var yp={name:`archive-restore`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]};yp.node;var bp=W(yp),xp={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};xp.node;var Sp=W(xp),Cp={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};Cp.node;var wp=W(Cp),Tp={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Tp.node;var Ep=W(Tp),Dp={name:`arrow-right-to-line`,size:24,node:[[`path`,{d:`M17 12H3`,key:`8awo09`}],[`path`,{d:`m11 18 6-6-6-6`,key:`8c2y43`}],[`path`,{d:`M21 5v14`,key:`nzette`}]]};Dp.node;var Op=W(Dp),kp={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};kp.node;var Ap=W(kp),jp={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};jp.node;var Mp=W(jp),Np={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Np.node;var Pp=W(Np),Fp={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]};Fp.node;var Ip=W(Fp),Lp={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Lp.node;var Rp=W(Lp),zp={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};zp.node;var Bp=W(zp),Vp={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};Vp.node;var Hp=W(Vp),Up={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Up.node;var Wp=W(Up),Gp={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Gp.node;var Kp=W(Gp),qp={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};qp.node;var Jp=W(qp),Yp={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};Yp.node;var Xp=W(Yp),Zp={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};Zp.node;var Qp=W(Zp),$p={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};$p.node;var em=W($p),tm={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};tm.node;var nm=W(tm),rm={name:`circle-stop`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]],aliases:[`stop-circle`]};rm.node;var im=W(rm),am={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};am.node;var om=W(am),sm={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};sm.node;var cm=W(sm),lm={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};lm.node;var um=W(lm),dm={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};dm.node;var fm=W(dm),pm={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};pm.node;var mm=W(pm),hm={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};hm.node;var gm=W(hm),_m={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};_m.node;var vm=W(_m),ym={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};ym.node;var bm=W(ym),xm={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};xm.node;var Sm=W(xm),Cm={name:`file-pen`,size:24,node:[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]],aliases:[`file-edit`]};Cm.node;var wm=W(Cm),Tm={name:`file-plus`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]};Tm.node;var Em=W(Tm),Dm={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};Dm.node;var Om=W(Dm),km={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};km.node;var Am=W(km),jm={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};jm.node;var Mm=W(jm),Nm={name:`git-pull-request`,size:24,node:[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]};Nm.node;var Pm=W(Nm),Fm={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Fm.node;var Im=W(Fm),Lm={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Lm.node;var Rm=W(Lm),zm={name:`keyboard`,size:24,node:[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]};zm.node;var Bm=W(zm),Vm={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};Vm.node;var Hm=W(Vm),Um={name:`list-plus`,size:24,node:[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]};Um.node;var Wm=W(Um),Gm={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};Gm.node;var Km=W(Gm),qm={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};qm.node;var Jm=W(qm),Ym={name:`maximize`,size:24,node:[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]};Ym.node;var Xm=W(Ym),Zm={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};Zm.node;var Qm=W(Zm),$m={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};$m.node;var eh=W($m),th={name:`message-square-plus`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]};th.node;var nh=W(th),rh={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};rh.node;var ih=W(rh),ah={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};ah.node;var oh=W(ah),sh={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};sh.node;var ch=W(sh),lh={name:`minimize`,size:24,node:[[`path`,{d:`M8 3v3a2 2 0 0 1-2 2H3`,key:`hohbtr`}],[`path`,{d:`M21 8h-3a2 2 0 0 1-2-2V3`,key:`5jw1f3`}],[`path`,{d:`M3 16h3a2 2 0 0 1 2 2v3`,key:`198tvr`}],[`path`,{d:`M16 21v-3a2 2 0 0 1 2-2h3`,key:`ph8mxp`}]]};lh.node;var uh=W(lh),dh={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};dh.node;var fh=W(dh),ph={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};ph.node;var mh=W(ph),hh={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};hh.node;var gh=W(hh),_h={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};_h.node;var vh=W(_h),yh={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};yh.node;var bh=W(yh),xh={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};xh.node;var Sh=W(xh),Ch={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};Ch.node;var wh=W(Ch),Th={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Th.node;var Eh=W(Th),Dh={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Dh.node;var Oh=W(Dh),kh={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};kh.node;var Ah=W(kh),jh={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};jh.node;var Mh=W(jh),Nh={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Nh.node;var Ph=W(Nh),Fh={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};Fh.node;var Ih=W(Fh),Lh={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Lh.node;var Rh=W(Lh),zh={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};zh.node;var Bh=W(zh),Vh={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Vh.node;var Hh=W(Vh),Uh={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Uh.node;var Wh=W(Uh),Gh={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Gh.node;var Kh=W(Gh),qh={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};qh.node;var Jh=W(qh),Yh={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};Yh.node;var Xh=W(Yh),Zh={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};Zh.node;var Qh=W(Zh),$h={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};$h.node;var eg=W($h),tg={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};tg.node;var ng=W(tg),rg={name:`tags`,size:24,node:[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]};rg.node;var ig=W(rg),ag={name:`telescope`,size:24,node:[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]};ag.node;var og=W(ag),sg={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};sg.node;var cg=W(sg),lg={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};lg.node;var ug=W(lg),dg={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};dg.node;var fg=W(dg),pg={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};pg.node;var mg=W(pg),hg={name:`volume-2`,size:24,node:[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]};hg.node;var gg=W(hg),_g={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};_g.node;var vg=W(_g),yg={name:`wifi-off`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};yg.node;var bg=W(yg),xg={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};xg.node;var Sg=W(xg),Cg={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Cg.node;var wg=W(Cg),Tg={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};Tg.node;var Eg=W(Tg);function Dg(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Dg(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Og(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Dg(e))&&(r&&(r+=` `),r+=t);return r}var kg=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ag=Og,jg=(e,t)=>n=>{if(t?.variants==null)return Ag(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=kg(t)||kg(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ag(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Mg=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ng=(e,t)=>({classGroupId:e,validator:t}),Pg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fg=`-`,Ig=[],Lg=`arbitrary..`,Rg=e=>{let t=Vg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Bg(e);let n=e.split(Fg);return zg(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Mg(i,t):t:i||Ig}return n[e]||Ig}}},zg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=zg(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Fg):e.slice(t).join(Fg),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Bg=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Lg+r:void 0})(),Vg=e=>{let{theme:t,classGroups:n}=e;return Hg(n,t)},Hg=(e,t)=>{let n=Pg();for(let r in e){let i=e[r];Ug(i,n,r,t)}return n},Ug=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Wg(i,t,n,r)}},Wg=(e,t,n,r)=>{if(typeof e==`string`){Gg(e,t,n);return}if(typeof e==`function`){Kg(e,t,n,r);return}qg(e,t,n,r)},Gg=(e,t,n)=>{let r=e===``?t:Jg(t,e);r.classGroupId=n},Kg=(e,t,n,r)=>{if(Yg(e)){Ug(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ng(n,e))},qg=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Ug(o,Jg(t,a),n,r)}},Jg=(e,t)=>{let n=e,r=t.split(Fg),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Pg(),n.nextPart.set(t,i)),n=i}return n},Yg=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Xg=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Zg=`!`,Qg=`:`,$g=[],e_=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),t_=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Qg){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Zg)?(c=s.slice(0,-1),l=!0):s.startsWith(Zg)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return e_(t,l,c,u)};if(t){let e=t+Qg,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):e_($g,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},n_=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},r_=e=>({cache:Xg(e.cacheSize),parseClassName:t_(e),sortModifiers:n_(e),postfixLookupClassGroupIds:i_(e),...Rg(e)}),i_=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},a_=/\s+/,o_=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(a_),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Zg:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},s_=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=c_(n))&&(i&&(i+=` `),i+=r);return i},c_=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=c_(e[r]))&&(n&&(n+=` `),n+=t);return n},l_=(e,...t)=>{let n,r,i,a,o=o=>(n=r_(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=o_(e,n);return i(e,a),a};return a=o,(...e)=>a(s_(...e))},u_=[],d_=e=>{let t=t=>t[e]||u_;return t.isThemeGetter=!0,t.themeKey=e,t},f_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,p_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,m_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,h_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,__=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,v_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,b_=e=>m_.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),x_=e=>!!e&&Number.isInteger(Number(e)),S_=e=>e.endsWith(`%`)&&G(e.slice(0,-1)),C_=e=>h_.test(e),w_=()=>!0,T_=e=>g_.test(e)&&!__.test(e),E_=()=>!1,D_=e=>v_.test(e),O_=e=>y_.test(e),k_=e=>!K(e)&&!q(e),A_=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),j_=e=>K_(e,X_,E_),K=e=>f_.test(e),M_=e=>K_(e,Z_,T_),N_=e=>K_(e,Q_,G),P_=e=>K_(e,ev,w_),F_=e=>K_(e,$_,E_),I_=e=>K_(e,J_,E_),L_=e=>K_(e,Y_,O_),R_=e=>K_(e,tv,D_),q=e=>p_.test(e),z_=e=>q_(e,Z_),B_=e=>q_(e,$_),V_=e=>q_(e,J_),H_=e=>q_(e,X_),U_=e=>q_(e,Y_),W_=e=>q_(e,tv,!0),G_=e=>q_(e,ev,!0),K_=(e,t,n)=>{let r=f_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},q_=(e,t,n=!1)=>{let r=p_.exec(e);return r?r[1]?t(r[1]):n:!1},J_=e=>e===`position`||e===`percentage`,Y_=e=>e===`image`||e===`url`,X_=e=>e===`length`||e===`size`||e===`bg-size`,Z_=e=>e===`length`,Q_=e=>e===`number`,$_=e=>e===`family-name`,ev=e=>e===`number`||e===`weight`,tv=e=>e===`shadow`,nv=l_(()=>{let e=d_(`color`),t=d_(`font`),n=d_(`text`),r=d_(`font-weight`),i=d_(`tracking`),a=d_(`leading`),o=d_(`breakpoint`),s=d_(`container`),c=d_(`spacing`),l=d_(`radius`),u=d_(`shadow`),d=d_(`inset-shadow`),f=d_(`text-shadow`),p=d_(`drop-shadow`),m=d_(`blur`),h=d_(`perspective`),g=d_(`aspect`),_=d_(`ease`),v=d_(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),q,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[q,K,c],T=()=>[b_,`full`,`auto`,...w()],E=()=>[x_,`none`,`subgrid`,q,K],D=()=>[`auto`,{span:[`full`,x_,q,K]},x_,q,K],O=()=>[x_,`auto`,q,K],k=()=>[`auto`,`min`,`max`,`fr`,q,K],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[b_,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,b_,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[b_,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,q,K],ne=()=>[...b(),V_,I_,{position:[q,K]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,H_,j_,{size:[q,K]}],ae=()=>[S_,z_,M_],oe=()=>[``,`none`,`full`,l,q,K],se=()=>[``,G,z_,M_],ce=()=>[`solid`,`dashed`,`dotted`,`double`],le=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],F=()=>[G,S_,V_,I_],ue=()=>[``,`none`,m,q,K],de=()=>[`none`,G,q,K],fe=()=>[`none`,G,q,K],I=()=>[G,q,K],L=()=>[b_,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[C_],breakpoint:[C_],color:[w_],container:[C_],"drop-shadow":[C_],ease:[`in`,`out`,`in-out`],font:[k_],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[C_],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[C_],shadow:[C_],spacing:[`px`,G],text:[C_],"text-shadow":[C_],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,b_,K,q,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,q,K]}],"container-named":[A_],columns:[{columns:[G,`auto`,K,q,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[x_,`auto`,q,K]}],basis:[{basis:[b_,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[G,b_,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,G,q,K]}],shrink:[{shrink:[``,G,q,K]}],order:[{order:[x_,`first`,`last`,`none`,q,K]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,z_,M_]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,G_,P_]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,S_,K]}],"font-family":[{font:[B_,F_,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,q,K]}],"line-clamp":[{"line-clamp":[G,`none`,q,N_]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,q,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,q,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ce(),`wavy`]}],"text-decoration-thickness":[{decoration:[G,`from-font`,`auto`,q,M_]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[G,`auto`,q,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[x_,q,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,q,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,q,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},x_,q,K],radial:[``,q,K],conic:[``,x_,q,K]},U_,L_]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":se()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ce(),`hidden`,`none`]}],"divide-style":[{divide:[...ce(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...ce(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[G,q,K]}],"outline-w":[{outline:[``,G,z_,M_]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,W_,R_]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,W_,R_]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:se()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[G,M_]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,W_,R_]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[G,q,K]}],"mix-blend":[{"mix-blend":[...le(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[q,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,q,K]}],filter:[{filter:[``,`none`,q,K]}],blur:[{blur:ue()}],brightness:[{brightness:[G,q,K]}],contrast:[{contrast:[G,q,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,W_,R_]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,G,q,K]}],"hue-rotate":[{"hue-rotate":[G,q,K]}],invert:[{invert:[``,G,q,K]}],saturate:[{saturate:[G,q,K]}],sepia:[{sepia:[``,G,q,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,q,K]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[G,q,K]}],"backdrop-contrast":[{"backdrop-contrast":[G,q,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,G,q,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,q,K]}],"backdrop-invert":[{"backdrop-invert":[``,G,q,K]}],"backdrop-opacity":[{"backdrop-opacity":[G,q,K]}],"backdrop-saturate":[{"backdrop-saturate":[G,q,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,G,q,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,q,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[G,`initial`,q,K]}],ease:[{ease:[`linear`,`initial`,_,q,K]}],delay:[{delay:[G,q,K]}],animate:[{animate:[`none`,v,q,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,q,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":[`scale-3d`],skew:[{skew:I()}],"skew-x":[{"skew-x":I()}],"skew-y":[{"skew-y":I()}],transform:[{transform:[q,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":[`translate-none`],zoom:[{zoom:[x_,q,K]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,q,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,q,K]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[G,z_,M_,N_]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function J(...e){return nv(Og(e))}var rv=Object.defineProperty,iv=(e,t)=>rv(e,`name`,{value:t,configurable:!0});function av(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}iv(av,`setRef`);function ov(...e){return t=>{let n=!1,r=e.map(e=>{let r=av(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():av(e[t],null)}}}}iv(ov,`composeRefs`);function sv(...e){return m.useCallback(ov(...e),e)}iv(sv,`useComposedRefs`);var cv=Object.defineProperty,lv=(e,t)=>cv(e,`name`,{value:t,configurable:!0});function uv(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];yv(r)&&typeof Cv==`function`&&(r=Cv(r._payload)),m.Children.forEach(r,e=>{if(_v(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;yv(n)&&typeof Cv==`function`&&(n=Cv(n._payload)),a=mv(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=m.cloneElement(a,void 0,s):!o&&m.Children.count(r)===1&&m.isValidElement(r)&&(a=r);let c=a?gv(a):void 0,l=sv(n,c);if(!a){if(r||r===0)throw Error(o?Sv(e):xv(e));return r}let u=hv(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}lv(uv,`createSlot`);var dv=uv(`Slot`),fv=Symbol.for(`radix.slottable`);function pv(e){let t=lv(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=fv,t}lv(pv,`createSlottable`);var mv=lv((e,t)=>{if(`child`in e.props){let t=e.props.child;return m.isValidElement(t)?m.cloneElement(t,void 0,e.props.children(t.props.children)):null}return m.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function hv(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}lv(hv,`mergeProps`);function gv(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}lv(gv,`getElementRef`);function _v(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===fv}lv(_v,`isSlottable`);var vv=Symbol.for(`react.lazy`);function yv(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===vv&&`_payload`in e&&bv(e._payload)}lv(yv,`isLazyComponent`);function bv(e){return typeof e==`object`&&!!e&&`then`in e}lv(bv,`isPromiseLike`);var xv=lv(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Sv=lv(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Cv=m.use,wv=l(Gf(),1),Tv=Object.defineProperty,Ev=(e,t)=>Tv(e,`name`,{value:t,configurable:!0}),Dv=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=uv(`Primitive.${t}`),r=m.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,V.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ov(e,t){e&&wv.flushSync(()=>e.dispatchEvent(t))}Ev(Ov,`dispatchDiscreteCustomEvent`);var kv=Object.defineProperty,Av=(e,t)=>kv(e,`name`,{value:t,configurable:!0}),jv=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Mv=m.forwardRef(Av(function(e,t){return(0,V.jsx)(Dv.span,{...e,ref:t,style:{...jv,...e.style}})},`VisuallyHidden`)),Nv=Object.defineProperty,Pv=(e,t)=>Nv(e,`name`,{value:t,configurable:!0});function Fv(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=Pv(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,V.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=m.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return Pv(i,`useContext`),[r,i]}Pv(Fv,`createContext`);function Iv(e,t=[]){let n=[];function r(t,r){let i=m.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=Pv(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,V.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=m.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return Pv(s,`useContext`),[o,s]}Pv(r,`createContext`);let i=Pv(()=>{let t=n.map(e=>m.createContext(e));return Pv(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Lv(i,...t)]}Pv(Iv,`createContextScope`);function Lv(...e){let t=e[0];if(e.length===1)return t;let n=Pv(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return Pv(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}Pv(Lv,`composeContextScopes`);var Rv=Object.defineProperty,zv=(e,t)=>Rv(e,`name`,{value:t,configurable:!0});function Bv(e){let t=e+`CollectionProvider`,[n,r]=Iv(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=zv(e=>{let{scope:t,children:n}=e,r=m.useRef(null),a=m.useRef(new Map).current;return(0,V.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=uv(s),l=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=sv(t,a(s,n).collectionRef);return(0,V.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=uv(u),p=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),s=sv(t,o),c=a(u,n);return m.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,V.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function h(t){let n=a(e+`CollectionConsumer`,t);return m.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return zv(h,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},h,r]}zv(Bv,`createCollection`);var Vv=new WeakMap,Hv=class e extends Map{static{zv(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Vv.set(this,!0)}set(e,t){return Vv.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Gv(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Uv(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Uv(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Uv(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Uv(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=Wv(e,t);return n===-1?void 0:e[n]}zv(Uv,`at`);function Wv(e,t){let n=e.length,r=Gv(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}zv(Wv,`toSafeIndex`);function Gv(e){return e!==e||e===0?0:Math.trunc(e)}zv(Gv,`toSafeInteger`);function Kv(e){let t=e+`CollectionProvider`,[n,r]=Iv(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Hv,setItemMap:zv(()=>void 0,`setItemMap`)}),o=zv(({state:e,...t})=>e?(0,V.jsx)(c,{...t,state:e}):(0,V.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=zv(e=>{let t=g();return(0,V.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=zv(e=>{let{scope:t,children:n,state:r}=e,a=m.useRef(null),[o,s]=m.useState(null),c=sv(a,s),[l,u]=r;return m.useEffect(()=>{if(!o)return;let e=Xv(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,V.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=uv(l),d=m.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=sv(t,a(l,n).collectionRef);return(0,V.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=uv(f),h=m.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=m.useRef(null),[s,c]=m.useState(null),l=sv(t,o,c),{setItemMap:u}=a(f,n),d=m.useRef(i);qv(d.current,i)||(d.current=i);let h=d.current;return m.useEffect(()=>{let e=h;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Yv):(t.set(s,{...e,element:s}),t.toSorted(Yv)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Hv(e)))}},[s,h,u]),(0,V.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});h.displayName=f;function g(){return m.useState(new Hv)}zv(g,`useInitCollection`);function _(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return zv(_,`useCollection`),[{Provider:o,Slot:d,ItemSlot:h},{createCollectionScope:r,useCollection:_,useInitCollection:g}]}zv(Kv,`createCollection`);function qv(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}zv(qv,`shallowEqual`);function Jv(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}zv(Jv,`isElementPreceding`);function Yv(e,t){return!e[1].element||!t[1].element?0:Jv(e[1].element,t[1].element)?-1:1}zv(Yv,`sortByDocumentPosition`);function Xv(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}zv(Xv,`getChildListObserver`);var Zv=Object.defineProperty,Qv=(e,t)=>Zv(e,`name`,{value:t,configurable:!0}),$v=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return Qv(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}Qv(Y,`composeEventHandlers`);function ey(e){if(!$v)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}Qv(ey,`getOwnerWindow`);function ty(e){if(!$v)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}Qv(ty,`getOwnerDocument`);function ny(e,t=!1){let{activeElement:n}=ty(e);if(!n?.nodeName)return null;if(ry(n)&&n.contentDocument)return ny(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ty(n).getElementById(e);if(t)return t}}return n}Qv(ny,`getActiveElement`);function ry(e){return e.tagName===`IFRAME`}Qv(ry,`isFrame`);var iy=globalThis?.document?m.useLayoutEffect:()=>{},ay=Object.defineProperty,oy=(e,t)=>ay(e,`name`,{value:t,configurable:!0}),sy=m.useEffectEvent,cy=m.useInsertionEffect;function ly(e){if(typeof sy==`function`)return sy(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof cy==`function`?cy(()=>{t.current=e}):iy(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}oy(ly,`useEffectEvent`);var uy=Object.defineProperty,dy=(e,t)=>uy(e,`name`,{value:t,configurable:!0}),fy=m.useInsertionEffect||iy;function py({prop:e,defaultProp:t,onChange:n=dy(()=>{},`onChange`),caller:r}){let[i,a,o]=my({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=hy(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}dy(py,`useControllableState`);function my({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return fy(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}dy(my,`useUncontrolledState`);function hy(e){return typeof e==`function`}dy(hy,`isFunction`);var gy=Symbol(`RADIX:SYNC_STATE`);function _y(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=ly(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===gy)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,h=m.useRef(p);m.useEffect(()=>{h.current!==p&&(h.current=p,c||l(p))},[p,h,c]);let g=m.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return m.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:gy,state:i})},[i,d.state,c]),[g,f]}dy(_y,`useControllableStateReducer`);var vy=Object.defineProperty,yy=(e,t)=>vy(e,`name`,{value:t,configurable:!0});function by(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}yy(by,`useStateMachine`);var xy=yy(e=>{let{present:t,children:n}=e,r=Sy(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=wy(r.ref,Ey(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function Sy(e){let[t,n]=m.useState(),r=m.useRef(null),i=m.useRef(e),a=m.useRef(`none`),o=m.useRef(void 0),[s,c]=by(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return m.useEffect(()=>{s===`mounted`?(a.current=o.current??Ty(r.current),o.current=void 0):a.current=`none`},[s]),iy(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ty(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),iy(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=yy(a=>{let o=Ty(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=yy(e=>{e.target===t&&(a.current=Ty(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:m.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ty(t)}else r.current=null;n(e)},[])}}yy(Sy,`usePresence`);function Cy(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}yy(Cy,`setRef`);function wy(...e){let t=m.useRef(e);return t.current=e,m.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Cy(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Cy(n[e],null)}}},[])}yy(wy,`useStableComposedRefs`);function Ty(e){return e?.animationName||`none`}yy(Ty,`getAnimationName`);function Ey(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}yy(Ey,`getElementRef`);var Dy=Object.defineProperty,Oy=(e,t)=>Dy(e,`name`,{value:t,configurable:!0}),ky=m.useId||(()=>void 0),Ay=0;function jy(e){let[t,n]=m.useState(ky());return iy(()=>{e||n(e=>e??String(Ay++))},[e]),e||(t?`radix-${t}`:``)}Oy(jy,`useId`);var My=Object.defineProperty,Ny=(e,t)=>My(e,`name`,{value:t,configurable:!0}),Py=m.createContext(void 0);function Fy(e){let t=m.useContext(Py);return e||t||`ltr`}Ny(Fy,`useDirection`);var Iy=Object.defineProperty,Ly=(e,t)=>Iy(e,`name`,{value:t,configurable:!0});function Ry(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}Ly(Ry,`useCallbackRef`);var zy=Object.defineProperty,By=(e,t)=>zy(e,`name`,{value:t,configurable:!0}),Vy=`dismissableLayer.update`,Hy=`dismissableLayer.pointerDownOutside`,Uy=`dismissableLayer.focusOutside`,Wy,Gy=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ky=m.forwardRef(By(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=m.useContext(Gy),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=sv(t,f),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=m.useRef(!1),w=Yy(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=Xy(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===_.length-1:!1,D=Ry(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Wy=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Zy(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Wy))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Zy())},[d,u]),m.useEffect(()=>{let e=By(()=>h({}),`handleUpdate`);return document.addEventListener(Vy,e),()=>document.removeEventListener(Vy,e)},[]),(0,V.jsx)(Dv.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function qy(){let e=m.useContext(Gy),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}By(qy,`useDismissableLayerSurface`);var Jy=By(()=>!0,`IS_TRUE`);function Yy(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Jy}=t,s=Ry(e),c=m.useRef(!1),l=m.useRef(!1),u=m.useRef(new Map),d=m.useRef(()=>{});return m.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}By(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}By(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}By(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}By(p,`handleInteractionBubble`);let m=By(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Qy(Hy,s,p,{discrete:!0})};if(By(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:By(()=>c.current=!0,`onPointerDownCapture`)}}By(Yy,`usePointerDownOutside`);function Xy(e,t=globalThis?.document){let n=Ry(e),r=m.useRef(!1);return m.useEffect(()=>{let e=By(e=>{e.target&&!r.current&&Qy(Uy,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:By(()=>r.current=!0,`onFocusCapture`),onBlurCapture:By(()=>r.current=!1,`onBlurCapture`)}}By(Xy,`useFocusOutside`);function Zy(){let e=new CustomEvent(Vy);document.dispatchEvent(e)}By(Zy,`dispatchUpdate`);function Qy(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ov(i,a):i.dispatchEvent(a)}By(Qy,`handleAndDispatchCustomEvent`);var $y=Object.defineProperty,eb=(e,t)=>$y(e,`name`,{value:t,configurable:!0}),tb=`focusScope.autoFocusOnMount`,nb=`focusScope.autoFocusOnUnmount`,rb={bubbles:!1,cancelable:!0},ib=m.forwardRef(eb(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Ry(i),u=Ry(a),d=m.useRef(null),f=sv(t,c),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:db(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||db(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&db(s)};eb(e,`handleFocusIn`),eb(t,`handleFocusOut`),eb(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){fb.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(tb,rb);s.addEventListener(tb,l),s.dispatchEvent(t),t.defaultPrevented||(ab(hb(sb(s)),{select:!0}),document.activeElement===e&&db(s))}return()=>{s.removeEventListener(tb,l),setTimeout(()=>{let t=new CustomEvent(nb,rb);s.addEventListener(nb,u),s.dispatchEvent(t),t.defaultPrevented||db(e??document.body,{select:!0}),s.removeEventListener(nb,u),fb.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ob(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&db(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&db(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,V.jsx)(Dv.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function ab(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(db(r,{select:t}),document.activeElement!==n)return}eb(ab,`focusFirst`);function ob(e){let t=sb(e);return[cb(t,e),cb(t.reverse(),e)]}eb(ob,`getTabbableEdges`);function sb(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:eb(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}eb(sb,`getTabbableCandidates`);function cb(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):lb(r,{upTo:t})))return r}eb(cb,`findVisible`);function lb(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}eb(lb,`isHidden`);function ub(e){return e instanceof HTMLInputElement&&`select`in e}eb(ub,`isSelectableInput`);function db(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ub(e)&&t&&e.select()}}eb(db,`focus`);var fb=pb();function pb(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=mb(e,t),e.unshift(t)},remove(t){e=mb(e,t),e[0]?.resume()}}}eb(pb,`createFocusScopesStack`);function mb(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}eb(mb,`arrayRemove`);function hb(e){return e.filter(e=>e.tagName!==`A`)}eb(hb,`removeLinks`);var gb=Object.defineProperty,_b=m.forwardRef(((e,t)=>gb(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);iy(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?wv.createPortal((0,V.jsx)(Dv.div,{...r,ref:t}),o):null},`Portal`)),vb=Object.defineProperty,yb=(e,t)=>vb(e,`name`,{value:t,configurable:!0}),bb=0,xb=null;function Sb(e){return Cb(),e.children}yb(Sb,`FocusGuards`);function Cb(){m.useEffect(()=>{xb||={start:wb(),end:wb()};let{start:e,end:t}=xb;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),bb++,()=>{bb===1&&(xb?.start.remove(),xb?.end.remove(),xb=null),bb=Math.max(0,bb-1)}},[])}yb(Cb,`useFocusGuards`);function wb(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}yb(wb,`createFocusGuard`);var Tb=function(){return Tb=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Tb.apply(this,arguments)};function Eb(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Db(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ob=`right-scroll-bar-position`,kb=`width-before-scroll-bar`,Ab=`with-scroll-bars-hidden`,jb=`--removed-body-scroll-bar-size`;function Mb(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Nb(e,t){var n=(0,m.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Pb=typeof window<`u`?m.useLayoutEffect:m.useEffect,Fb=new WeakMap;function Ib(e,t){var n=Nb(t||null,function(t){return e.forEach(function(e){return Mb(e,t)})});return Pb(function(){var t=Fb.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Mb(e,null)}),i.forEach(function(e){r.has(e)||Mb(e,a)})}Fb.set(n,e)},[e]),n}function Lb(e){return e}function Rb(e,t){t===void 0&&(t=Lb);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function zb(e){e===void 0&&(e={});var t=Rb(null);return t.options=Tb({async:!0,ssr:!1},e),t}var Bb=function(e){var t=e.sideCar,n=Eb(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return m.createElement(r,Tb({},n))};Bb.isSideCarExport=!0;function Vb(e,t){return e.useMedium(t),Bb}var Hb=zb(),Ub=function(){},Wb=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Ub,onWheelCapture:Ub,onTouchMoveCapture:Ub}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Eb(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Ib([n,t]),w=Tb(Tb({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:Hb,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Tb(Tb({},w),{ref:C})):m.createElement(y,Tb({},w,{className:c,ref:C}),s))});Wb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Wb.classNames={fullWidth:kb,zeroRight:Ob};var Gb=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Kb(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Gb();return t&&e.setAttribute(`nonce`,t),e}function qb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jb(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Yb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Kb())&&(qb(t,n),Jb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xb=function(){var e=Yb();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zb=function(){var e=Xb();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Qb={left:0,top:0,right:0,gap:0},$b=function(e){return parseInt(e||``,10)||0},ex=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[$b(n),$b(r),$b(i)]},tx=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Qb;var t=ex(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nx=Zb(),rx=`data-scroll-locked`,ix=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
19
- .${Ab} {
20
- overflow: hidden ${r};
21
- padding-right: ${s}px ${r};
22
- }
23
- body[${rx}] {
24
- overflow: hidden ${r};
25
- overscroll-behavior: contain;
26
- ${[t&&`position: relative ${r};`,n===`margin`&&`
27
- padding-left: ${i}px;
28
- padding-top: ${a}px;
29
- padding-right: ${o}px;
30
- margin-left:0;
31
- margin-top:0;
32
- margin-right: ${s}px ${r};
33
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
34
- }
35
-
36
- .${Ob} {
37
- right: ${s}px ${r};
38
- }
39
-
40
- .${kb} {
41
- margin-right: ${s}px ${r};
42
- }
43
-
44
- .${Ob} .${Ob} {
45
- right: 0 ${r};
46
- }
47
-
48
- .${kb} .${kb} {
49
- margin-right: 0 ${r};
50
- }
51
-
52
- body[${rx}] {
53
- ${jb}: ${s}px;
54
- }
55
- `},ax=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},ox=function(){m.useEffect(function(){return document.body.setAttribute(rx,(ax()+1).toString()),function(){var e=ax()-1;e<=0?document.body.removeAttribute(rx):document.body.setAttribute(rx,e.toString())}},[])},sx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;ox();var a=m.useMemo(function(){return tx(i)},[i]);return m.createElement(nx,{styles:ix(a,!t,i,n?``:`!important`)})},cx=!1;if(typeof window<`u`)try{var lx=Object.defineProperty({},"passive",{get:function(){return cx=!0,!0}});window.addEventListener(`test`,lx,lx),window.removeEventListener(`test`,lx,lx)}catch{cx=!1}var ux=cx?{passive:!1}:!1,dx=function(e){return e.tagName===`TEXTAREA`},fx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!dx(e)&&n[t]===`visible`)},px=function(e){return fx(e,`overflowY`)},mx=function(e){return fx(e,`overflowX`)},hx=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),vx(e,r)){var i=yx(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gx=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},_x=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},vx=function(e,t){return e===`v`?px(t):mx(t)},yx=function(e,t){return e===`v`?gx(t):_x(t)},bx=function(e,t){return e===`h`&&t===`rtl`?-1:1},xx=function(e,t,n,r,i){var a=bx(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=yx(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&vx(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Sx=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cx=function(e){return[e.deltaX,e.deltaY]},wx=function(e){return e&&`current`in e?e.current:e},Tx=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ex=function(e){return`
56
- .block-interactivity-${e} {pointer-events: none;}
57
- .allow-interactivity-${e} {pointer-events: all;}
58
- `},Dx=0,Ox=[];function kx(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Dx++)[0],a=m.useState(Zb)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Db([e.lockRef.current],(e.shards||[]).map(wx),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=m.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Sx(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=hx(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=hx(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return xx(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(Ox.length&&Ox[Ox.length-1]===a){var r=`deltaY`in n?Cx(n):Sx(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Tx(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(wx).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=m.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ax(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=m.useCallback(function(e){n.current=Sx(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Cx(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Sx(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return Ox.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ux),document.addEventListener(`touchmove`,c,ux),document.addEventListener(`touchstart`,u,ux),function(){Ox=Ox.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ux),document.removeEventListener(`touchmove`,c,ux),document.removeEventListener(`touchstart`,u,ux)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Ex(i)}):null,p?m.createElement(sx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ax(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var jx=Vb(Hb,kx),Mx=m.forwardRef(function(e,t){return m.createElement(Wb,Tb({},e,{ref:t,sideCar:jx}))});Mx.classNames=Wb.classNames;var Nx=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Px=new WeakMap,Fx=new WeakMap,Ix={},Lx=0,Rx=function(e){return e&&(e.host||Rx(e.parentNode))},zx=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Rx(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Bx=function(e,t,n,r){var i=zx(t,Array.isArray(e)?e:[e]);Ix[n]||(Ix[n]=new WeakMap);var a=Ix[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Px.get(e)||0)+1,l=(a.get(e)||0)+1;Px.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Fx.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Lx++,function(){o.forEach(function(e){var t=Px.get(e)-1,i=a.get(e)-1;Px.set(e,t),a.set(e,i),t||(Fx.has(e)||e.removeAttribute(r),Fx.delete(e)),i||e.removeAttribute(n)}),Lx--,Lx||(Px=new WeakMap,Px=new WeakMap,Fx=new WeakMap,Ix={})}},Vx=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Nx(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Bx(r,i,n,`aria-hidden`)):function(){return null}},Hx=Object.defineProperty,Ux=(e,t)=>Hx(e,`name`,{value:t,configurable:!0}),Wx=`Dialog`,[Gx,Kx]=Iv(Wx),[qx,Jx]=Gx(Wx),Yx=Ux(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=m.useRef(null),c=m.useRef(null),[l,u]=py({prop:r,defaultProp:i??!1,onChange:a,caller:Wx}),[d,f]=m.useState(0),[p,h]=m.useState(0);return(0,V.jsx)(qx,{scope:t,triggerRef:s,contentRef:c,contentId:jy(),titleId:jy(),descriptionId:jy(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:h,open:l,onOpenChange:u,onOpenToggle:m.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Xx=`DialogTrigger`,Zx=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,...r}=e,i=Jx(Xx,n),a=sv(t,i.triggerRef);return(0,V.jsx)(Dv.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":_S(i.open),...r,ref:a,onClick:Y(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Qx=`DialogPortal`,[$x,eS]=Gx(Qx,{forceMount:void 0}),tS=Ux(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Jx(Qx,t);return(0,V.jsx)($x,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,V.jsx)(xy,{present:n||a.open,children:(0,V.jsx)(_b,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),nS=`DialogOverlay`,rS=m.forwardRef(Ux(function(e,t){let n=eS(nS,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Jx(nS,e.__scopeDialog);return a.modal?(0,V.jsx)(xy,{present:r||a.open,children:(0,V.jsx)(aS,{...i,ref:t})}):null},`DialogOverlay`)),iS=uv(`DialogOverlay.RemoveScroll`),aS=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,...r}=e,i=Jx(nS,n),a=sv(t,qy());return(0,V.jsx)(Mx,{as:iS,allowPinchZoom:!0,shards:[i.contentRef],children:(0,V.jsx)(Dv.div,{"data-state":_S(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),oS=`DialogContent`,sS=m.forwardRef(Ux(function(e,t){let n=eS(oS,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Jx(oS,e.__scopeDialog);return(0,V.jsx)(xy,{present:r||a.open,children:a.modal?(0,V.jsx)(cS,{...i,ref:t}):(0,V.jsx)(lS,{...i,ref:t})})},`DialogContent`)),cS=m.forwardRef(Ux(function(e,t){let n=Jx(oS,e.__scopeDialog),r=m.useRef(null),i=sv(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return Vx(e)},[]),(0,V.jsx)(uS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),lS=m.forwardRef(Ux(function(e,t){let n=Jx(oS,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,V.jsx)(uS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),uS=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Jx(oS,n);return Cb(),(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(ib,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,V.jsx)(Ky,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":_S(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),dS=`DialogTitle`,fS=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,...r}=e,i=Jx(dS,n),{setTitleCount:a}=i;return iy(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,V.jsx)(Dv.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),pS=`DialogDescription`,mS=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,...r}=e,i=Jx(pS,n),{setDescriptionCount:a}=i;return iy(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,V.jsx)(Dv.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),hS=`DialogClose`,gS=m.forwardRef(Ux(function(e,t){let{__scopeDialog:n,...r}=e,i=Jx(hS,n);return(0,V.jsx)(Dv.button,{type:`button`,...r,ref:t,onClick:Y(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function _S(e){return e?`open`:`closed`}Ux(_S,`getState`);var vS=Object.defineProperty,yS=(e,t)=>vS(e,`name`,{value:t,configurable:!0}),[bS,xS]=Iv(`AlertDialog`,[Kx]),SS=Kx(),CS=yS(e=>{let{__scopeAlertDialog:t,...n}=e,r=SS(t);return(0,V.jsx)(Yx,{...r,...n,modal:!0})},`AlertDialog`);m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=SS(n);return(0,V.jsx)(Zx,{...i,...r,ref:t})},`AlertDialogTrigger`));var wS=yS(e=>{let{__scopeAlertDialog:t,...n}=e,r=SS(t);return(0,V.jsx)(tS,{...r,...n})},`AlertDialogPortal`),TS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=SS(n);return(0,V.jsx)(rS,{...i,...r,ref:t})},`AlertDialogOverlay`)),[ES,DS]=bS(`AlertDialogContent`),OS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=SS(n),o=sv(t,m.useRef(null)),s=m.useRef(null);return(0,V.jsx)(ES,{scope:n,cancelRef:s,children:(0,V.jsx)(sS,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:Y(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),kS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=SS(n);return(0,V.jsx)(fS,{...i,...r,ref:t})},`AlertDialogTitle`)),AS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=SS(n);return(0,V.jsx)(mS,{...i,...r,ref:t})},`AlertDialogDescription`)),jS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=SS(n);return(0,V.jsx)(gS,{...i,...r,ref:t})},`AlertDialogAction`)),MS=`AlertDialogCancel`,NS=m.forwardRef(yS(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=DS(MS,n),a=SS(n),o=sv(t,i);return(0,V.jsx)(gS,{...a,...r,ref:o})},`AlertDialogCancel`)),PS=CS,FS=wS,IS=TS,LS=OS,RS=jS,zS=NS,BS=kS,VS=AS,HS=Object.defineProperty,US=(e,t)=>HS(e,`name`,{value:t,configurable:!0});function WS(e){let[t,n]=m.useState(void 0);return iy(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}US(WS,`useSize`);var GS=Object.defineProperty,KS=(e,t)=>GS(e,`name`,{value:t,configurable:!0}),qS=`Checkbox`,[JS,YS]=Iv(qS),[XS,ZS]=JS(qS);function QS(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=py({prop:n,defaultProp:i??!1,onChange:c,caller:qS}),[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useRef(!1),[b,x]=m.useReducer(e=>e+1,0),S=!h||!!o||!!h.closest(`form`),C={checked:f,disabled:a,setChecked:p,control:h,setControl:g,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:l,defaultChecked:!sC(i)&&i,isFormControl:S,bubbleInput:_,setBubbleInput:v};return(0,V.jsx)(XS,{scope:t,...C,children:oC(d)?d(C):r})}KS(QS,`CheckboxProvider`);var $S=`CheckboxTrigger`,eC=m.forwardRef(KS(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:g}=ZS($S,e),_=sv(i,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?.form;if(e){let t=KS(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,V.jsx)(Dv.button,{type:`button`,role:`checkbox`,"aria-checked":sC(c)?`mixed`:c,"aria-required":l,"data-state":cC(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:_,onKeyDown:Y(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Y(n,e=>{p(),d(e=>sC(e)?!0:!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),tC=m.forwardRef(KS(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,V.jsx)(QS,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(eC,{...d,ref:t,__scopeCheckbox:n}),e&&(0,V.jsx)(aC,{__scopeCheckbox:n})]})})},`Checkbox`)),nC=`CheckboxIndicator`,rC=m.forwardRef(KS(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=ZS(nC,n);return(0,V.jsx)(xy,{present:r||sC(a.checked)||a.checked===!0,children:(0,V.jsx)(Dv.span,{"data-state":cC(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),iC=`CheckboxBubbleInput`,aC=m.forwardRef(KS(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=ZS(iC,e),_=sv(r,g),v=WS(i),y=m.useRef(!1),b=m.useRef(s),x=m.useRef(o);m.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=b.current!==s;b.current=s;let c=!(r&&a.current);if(i&&n){y.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=sC(s),n.call(e,!sC(s)&&s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=m.useRef(!sC(s)&&s);return(0,V.jsx)(Dv.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:_,onClick:Y(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function oC(e){return typeof e==`function`}KS(oC,`isFunction`);function sC(e){return e===`indeterminate`}KS(sC,`isIndeterminate`);function cC(e){return sC(e)?`indeterminate`:e?`checked`:`unchecked`}KS(cC,`getState`);var lC=[`top`,`right`,`bottom`,`left`],uC=Math.min,dC=Math.max,fC=Math.round,pC=Math.floor,mC=e=>({x:e,y:e}),hC={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function gC(e,t,n){return dC(e,uC(t,n))}function _C(e,t){return typeof e==`function`?e(t):e}function vC(e){return e.split(`-`)[0]}function yC(e){return e.split(`-`)[1]}function bC(e){return e===`x`?`y`:`x`}function xC(e){return e===`y`?`height`:`width`}function SC(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function CC(e){return bC(SC(e))}function wC(e,t,n){n===void 0&&(n=!1);let r=yC(e),i=CC(e),a=xC(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=NC(o)),[o,NC(o)]}function TC(e){let t=NC(e);return[EC(e),t,EC(t)]}function EC(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var DC=[`left`,`right`],OC=[`right`,`left`],kC=[`top`,`bottom`],AC=[`bottom`,`top`];function jC(e,t,n){switch(e){case`top`:case`bottom`:return n?t?OC:DC:t?DC:OC;case`left`:case`right`:return t?kC:AC;default:return[]}}function MC(e,t,n,r){let i=yC(e),a=jC(vC(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(EC)))),a}function NC(e){let t=vC(e);return hC[t]+e.slice(t.length)}function PC(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function FC(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:PC(e)}function IC(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function LC(e,t,n){let{reference:r,floating:i}=e,a=SC(t),o=CC(t),s=xC(o),c=vC(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=yC(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function RC(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=_C(t,e),p=FC(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=IC(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=IC(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var zC=50,BC=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:RC},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=LC(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<zC&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=LC(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},VC=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=_C(e,t)||{};if(l==null)return{};let d=FC(u),f={x:n,y:r},p=CC(i),m=xC(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=uC(d[_],T),D=uC(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=gC(E,k,O),j=!c.arrow&&yC(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),HC=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=_C(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=vC(r),_=SC(o),v=vC(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[NC(o)]:TC(o)),x=p!==`none`;!d&&x&&b.push(...MC(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=wC(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===SC(t)||T.every(e=>SC(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=SC(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function UC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WC(e){return lC.some(t=>e[t]>=0)}var GC=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=_C(e,t);switch(i){case`referenceHidden`:{let e=UC(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:WC(e)}}}case`escaped`:{let e=UC(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:WC(e)}}}default:return{}}}}},KC=new Set([`left`,`top`]);async function qC(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=vC(n),s=yC(n),c=SC(n)===`y`,l=KC.has(o)?-1:1,u=a&&c?-1:1,d=_C(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var JC=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await qC(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},YC=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=_C(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=SC(i),p=bC(f),m=u[p],h=u[f],g=(e,t)=>gC(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},XC=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=_C(e,t),u={x:n,y:r},d=SC(i),f=bC(d),p=u[f],m=u[d],h=_C(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=KC.has(vC(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ZC=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=_C(e,t),c=await i.detectOverflow(t,s),l=vC(n),u=yC(n),d=SC(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=uC(p-c[m],g),y=uC(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*dC(c.left,c.right):S=p-2*dC(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function QC(){return typeof window<`u`}function $C(e){return nw(e)?(e.nodeName||``).toLowerCase():`#document`}function ew(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tw(e){return((nw(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function nw(e){return QC()?e instanceof Node||e instanceof ew(e).Node:!1}function rw(e){return QC()?e instanceof Element||e instanceof ew(e).Element:!1}function iw(e){return QC()?e instanceof HTMLElement||e instanceof ew(e).HTMLElement:!1}function aw(e){return!QC()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ew(e).ShadowRoot}function ow(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=_w(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function sw(e){return/^(table|td|th)$/.test($C(e))}function cw(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var lw=/transform|translate|scale|rotate|perspective|filter/,uw=/paint|layout|strict|content/,dw=e=>!!e&&e!==`none`,fw;function pw(e){let t=rw(e)?_w(e):e;return dw(t.transform)||dw(t.translate)||dw(t.scale)||dw(t.rotate)||dw(t.perspective)||!hw()&&(dw(t.backdropFilter)||dw(t.filter))||lw.test(t.willChange||``)||uw.test(t.contain||``)}function mw(e){let t=yw(e);for(;iw(t)&&!gw(t);){if(pw(t))return t;if(cw(t))return null;t=yw(t)}return null}function hw(){return fw??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),fw}function gw(e){return/^(html|body|#document)$/.test($C(e))}function _w(e){return ew(e).getComputedStyle(e)}function vw(e){return rw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yw(e){if($C(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||aw(e)&&e.host||tw(e);return aw(t)?t.host:t}function bw(e){let t=yw(e);return gw(t)?(e.ownerDocument||e).body:iw(t)&&ow(t)?t:bw(t)}function xw(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=bw(e),i=r===e.ownerDocument?.body,a=ew(r);if(i){let e=Sw(a);return t.concat(a,a.visualViewport||[],ow(r)?r:[],e&&n?xw(e):[])}return t.concat(r,xw(r,[],n))}function Sw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Cw(e){let t=_w(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=iw(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=fC(n)!==a||fC(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ww(e){return rw(e)?e:e.contextElement}function Tw(e){let t=ww(e);if(!iw(t))return mC(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Cw(t),o=(a?fC(n.width):n.width)/r,s=(a?fC(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ew=mC(0);function Dw(e){let t=ew(e);return!hw()||!t.visualViewport?Ew:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ow(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ew(e)}function kw(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ww(e),o=mC(1);t&&(r?rw(r)&&(o=Tw(r)):o=Tw(e));let s=Ow(a,n,r)?Dw(a):mC(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ew(a),t=rw(r)?ew(r):r,n=e,i=Sw(n);for(;i&&t!==n;){let e=Tw(i),t=i.getBoundingClientRect(),r=_w(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ew(i),i=Sw(n)}}return IC({width:u,height:d,x:c,y:l})}function Aw(e,t){let n=vw(e).scrollLeft;return t?t.left+n:kw(tw(e)).left+n}function jw(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Aw(e,n),y:n.top+t.scrollTop}}function Mw(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=tw(r),s=t?cw(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=mC(1),u=mC(0),d=iw(r);if((d||!a)&&(($C(r)!==`body`||ow(o))&&(c=vw(r)),d)){let e=kw(r);l=Tw(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?jw(o,c):mC(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Nw(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pw(e){let t=vw(e),n=e.ownerDocument.body,r=dC(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=dC(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Aw(e),o=-t.scrollTop;return _w(n).direction===`rtl`&&(a+=dC(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fw=25;function Iw(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ew(e),a=tw(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!hw()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Aw(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fw&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Lw(e,t){let n=kw(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Tw(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Rw(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Iw(e,n,t);else if(t===`document`)r=Pw(tw(e));else if(rw(t))r=Lw(t,n);else{let n=Dw(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return IC(r)}function zw(e,t){let n=t.get(e);if(n)return n;let r=xw(e,[],!1).filter(e=>rw(e)&&$C(e)!==`body`),i=null,a=_w(e).position===`fixed`,o=a?yw(e):e;for(;rw(o)&&!gw(o);){let e=_w(o),t=pw(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=yw(o)}return t.set(e,r),r}function Bw(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?cw(t)?[]:zw(t,this._c):[].concat(n),r],o=Rw(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Rw(t,a[e],i);s=dC(n.top,s),c=uC(n.right,c),l=uC(n.bottom,l),u=dC(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Vw(e){let{width:t,height:n}=Cw(e);return{width:t,height:n}}function Hw(e,t,n){let r=iw(t),i=tw(t),a=n===`fixed`,o=kw(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=mC(0);if((r||!a)&&(($C(t)!==`body`||ow(i))&&(s=vw(t)),r)){let e=kw(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Aw(i));let l=i&&!r&&!a?jw(i,s):mC(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Uw(e){return _w(e).position===`static`}function Ww(e,t){if(!iw(e)||_w(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return tw(e)===n&&(n=n.ownerDocument.body),n}function Gw(e,t){let n=ew(e);if(cw(e))return n;if(!iw(e)){let t=yw(e);for(;t&&!gw(t);){if(rw(t)&&!Uw(t))return t;t=yw(t)}return n}let r=Ww(e,t);for(;r&&sw(r)&&Uw(r);)r=Ww(r,t);return r&&gw(r)&&Uw(r)&&!pw(r)?n:r||mw(e)||n}var Kw=async function(e){let t=this.getOffsetParent||Gw,n=this.getDimensions,r=await n(e.floating);return{reference:Hw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qw(e){return _w(e).direction===`rtl`}var Jw={convertOffsetParentRelativeRectToViewportRelativeRect:Mw,getDocumentElement:tw,getClippingRect:Bw,getOffsetParent:Gw,getElementRects:Kw,getClientRects:Nw,getDimensions:Vw,getScale:Tw,isElement:rw,isRTL:qw};function Yw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xw(e,t,n){let r=null,i,a=tw(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=pC(d),h=pC(a.clientWidth-(u+f)),g=pC(a.clientHeight-(d+p)),_=pC(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:dC(0,uC(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Yw(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ew(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Zw(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ww(e),u=i||a?[...l?xw(l):[],...t?xw(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xw(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?kw(e):null;c&&g();function g(){let t=kw(e);h&&!Yw(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qw=JC,$w=YC,eT=HC,tT=ZC,nT=GC,rT=VC,iT=XC,aT=(e,t,n)=>{let r=new Map,i=n??{},a={...Jw,...i.platform,_c:r};return BC(e,t,{...i,platform:a})},oT=typeof document<`u`?m.useLayoutEffect:function(){};function sT(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sT(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!sT(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function cT(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lT(e,t){let n=cT(e);return Math.round(t*n)/n}function uT(e){let t=m.useRef(e);return oT(()=>{t.current=e}),t}function dT(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);sT(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=uT(c),O=uT(i),k=uT(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),aT(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!sT(T.current,t)&&(T.current=t,wv.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);oT(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);oT(()=>(j.current=!0,()=>{j.current=!1}),[]),oT(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=lT(N.floating,u.x),r=lT(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...cT(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var fT=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:rT({element:r.current,padding:i}).fn(n):r?rT({element:r,padding:i}).fn(n):{}}}},pT=(e,t)=>{let n=Qw(e);return{name:n.name,fn:n.fn,options:[e,t]}},mT=(e,t)=>{let n=$w(e);return{name:n.name,fn:n.fn,options:[e,t]}},hT=(e,t)=>({fn:iT(e).fn,options:[e,t]}),gT=(e,t)=>{let n=eT(e);return{name:n.name,fn:n.fn,options:[e,t]}},_T=(e,t)=>{let n=tT(e);return{name:n.name,fn:n.fn,options:[e,t]}},vT=(e,t)=>{let n=nT(e);return{name:n.name,fn:n.fn,options:[e,t]}},yT=(e,t)=>{let n=fT(e);return{name:n.name,fn:n.fn,options:[e,t]}},bT=Object.defineProperty,xT=(e,t)=>bT(e,`name`,{value:t,configurable:!0}),ST=`Popper`,[CT,wT]=Iv(ST),[TT,ET]=CT(ST),DT=xT(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,V.jsx)(TT,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),OT=`PopperAnchor`,kT=m.forwardRef(xT(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=ET(OT,n),o=m.useRef(null),s=a.onAnchorChange,c=sv(t,m.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=m.useRef(null);m.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&IT(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,V.jsx)(Dv.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),AT=`PopperContent`,[jT,MT]=CT(AT),NT=m.forwardRef(xT(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:h,...g}=e,_=ET(AT,n),[v,y]=m.useState(null),b=sv(t,y),[x,S]=m.useState(null),C=WS(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(PT),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:ee,middlewareData:te}=dT({strategy:`fixed`,placement:E,whileElementsMounted:xT((...e)=>Zw(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[pT({mainAxis:i+T,alignmentAxis:o}),c&&mT({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?hT():void 0,...A}),c&&gT({...A}),_T({...A,apply:xT(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&yT({element:x,padding:s}),FT({arrowWidth:w,arrowHeight:T}),f&&vT({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),P=_.setPlacementState;iy(()=>(P(N),()=>{P(void 0)}),[N,P]);let[ne,re]=IT(N),ie=Ry(h);iy(()=>{ee&&ie?.()},[ee,ie]);let ae=te.arrow?.x,oe=te.arrow?.y,se=te.arrow?.centerOffset!==0,[ce,le]=m.useState();return iy(()=>{v&&le(window.getComputedStyle(v).zIndex)},[v]),(0,V.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:ee?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ce,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(` `),...te.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,V.jsx)(jT,{scope:n,placedSide:ne,placedAlign:re,onArrowChange:S,arrowX:ae,arrowY:oe,shouldHideArrow:se,children:(0,V.jsx)(Dv.div,{"data-side":ne,"data-align":re,...g,ref:b,style:{...g.style,animation:ee?g.style?.animation:`none`}})})})},`PopperContent`));function PT(e){return e!==null}xT(PT,`isNotNull`);var FT=xT(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=IT(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function IT(e){let[t,n=`center`]=e.split(`-`);return[t,n]}xT(IT,`getSideAndAlignFromPlacement`);var LT=DT,RT=kT,zT=NT,BT=Object.defineProperty,VT=(e,t)=>BT(e,`name`,{value:t,configurable:!0}),HT=!1;function UT(){let[e,t]=m.useState(HT);return m.useEffect(()=>{HT||(HT=!0,t(!0))},[]),e}VT(UT,`useIsHydrated`);var WT=m.useSyncExternalStore;function GT(){return()=>{}}VT(GT,`subscribe`);function KT(){return WT(GT,()=>!0,()=>!1)}VT(KT,`useIsHydratedModern`);var qT=typeof WT==`function`?KT:UT,JT=Object.defineProperty,YT=(e,t)=>JT(e,`name`,{value:t,configurable:!0}),XT=`rovingFocusGroup.onEntryFocus`,ZT={bubbles:!1,cancelable:!0},QT=`RovingFocusGroup`,[$T,eE,tE]=Bv(QT),[nE,rE]=Iv(QT,[tE]),[iE,aE]=nE(QT),oE=m.forwardRef(YT(function(e,t){return(0,V.jsx)($T.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)($T.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,V.jsx)(sE,{...e,ref:t})})})},`RovingFocusGroup`)),sE=m.forwardRef(YT(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=m.useRef(null),p=sv(t,f),h=Fy(a),[g,_]=py({prop:o,defaultProp:s??null,onChange:c,caller:QT}),[v,y]=m.useState(!1),b=Ry(l),x=eE(n),S=m.useRef(!1),[C,w]=m.useState(0);return m.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(XT,b),()=>e.removeEventListener(XT,b)},[b]),(0,V.jsx)(iE,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:m.useCallback(e=>_(e),[_]),onItemShiftTab:m.useCallback(()=>y(!0),[]),onFocusableItemAdd:m.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:m.useCallback(()=>w(e=>e-1),[]),children:(0,V.jsx)(Dv.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Y(e.onMouseDown,()=>{S.current=!0}),onFocus:Y(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(XT,ZT);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);pE([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Y(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),cE=`RovingFocusGroupItem`,lE=m.forwardRef(YT(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=jy(),l=a||c,u=aE(cE,n),d=u.currentTabStopId===l,f=eE(n),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:g}=u,_=qT();return iy(()=>{if(_&&r)return p(),()=>h()},[_,r,p,h]),m.useEffect(()=>{if(!_&&r)return p(),()=>h()},[_,r,p,h]),(0,V.jsx)($T.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,V.jsx)(Dv.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Y(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=fE(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?mE(n,r+1):n.slice(r+1)}setTimeout(()=>pE(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:g!=null}):o})})},`RovingFocusGroupItem`)),uE={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function dE(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}YT(dE,`getDirectionAwareKey`);function fE(e,t,n){let r=dE(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return uE[r]}YT(fE,`getFocusIntent`);function pE(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}YT(pE,`focusFirst`);function mE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}YT(mE,`wrapArray`);var hE=oE,gE=lE,_E=Object.defineProperty,vE=(e,t)=>_E(e,`name`,{value:t,configurable:!0});function yE(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}vE(yE,`usePrevious`);var bE=Object.defineProperty,xE=(e,t)=>bE(e,`name`,{value:t,configurable:!0});function SE(e,[t,n]){return Math.min(n,Math.max(t,e))}xE(SE,`clamp`);var CE=Object.defineProperty,wE=(e,t)=>CE(e,`name`,{value:t,configurable:!0}),TE=`Popover`,[EE,DE]=Iv(TE,[wT]),OE=wT(),[kE,AE]=EE(TE),jE=wE(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=OE(t),c=m.useRef(null),[l,u]=m.useState(!1),[d,f]=py({prop:r,defaultProp:i??!1,onChange:a,caller:TE});return(0,V.jsx)(LT,{...s,children:(0,V.jsx)(kE,{scope:t,contentId:jy(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),ME=`PopoverTrigger`,NE=m.forwardRef(wE(function(e,t){let{__scopePopover:n,...r}=e,i=AE(ME,n),a=OE(n),o=sv(t,i.triggerRef),s=(0,V.jsx)(Dv.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":WE(i.open),...r,ref:o,onClick:Y(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,V.jsx)(RT,{asChild:!0,...a,children:s})},`PopoverTrigger`)),PE=`PopoverPortal`,[FE,IE]=EE(PE,{forceMount:void 0}),LE=wE(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=AE(PE,t);return(0,V.jsx)(FE,{scope:t,forceMount:n,children:(0,V.jsx)(xy,{present:n||a.open,children:(0,V.jsx)(_b,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),RE=`PopoverContent`,zE=m.forwardRef(wE(function(e,t){let n=IE(RE,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=AE(RE,e.__scopePopover);return(0,V.jsx)(xy,{present:r||a.open,children:a.modal?(0,V.jsx)(VE,{...i,ref:t}):(0,V.jsx)(HE,{...i,ref:t})})},`PopoverContent`)),BE=uv(`PopoverContent.RemoveScroll`),VE=m.forwardRef(wE(function(e,t){let n=AE(RE,e.__scopePopover),r=m.useRef(null),i=sv(t,r),a=m.useRef(!1);return m.useEffect(()=>{let e=r.current;if(e)return Vx(e)},[]),(0,V.jsx)(Mx,{as:BE,allowPinchZoom:!0,children:(0,V.jsx)(UE,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),HE=m.forwardRef(wE(function(e,t){let n=AE(RE,e.__scopePopover),r=m.useRef(!1),i=m.useRef(!1);return(0,V.jsx)(UE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),UE=m.forwardRef(wE(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=AE(RE,n),p=OE(n);return Cb(),(0,V.jsx)(ib,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,V.jsx)(Ky,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,V.jsx)(zT,{"data-state":WE(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function WE(e){return e?`open`:`closed`}wE(WE,`getState`);var GE=jE,KE=NE,qE=LE,JE=zE,YE=Object.defineProperty,XE=(e,t)=>YE(e,`name`,{value:t,configurable:!0}),ZE=[` `,`Enter`,`ArrowUp`,`ArrowDown`],QE=[` `,`Enter`],$E=`Select`,[eD,tD,nD]=Bv($E),[rD,iD]=Iv($E,[nD,wT]),aD=wT(),[oD,sD]=rD($E),[cD,lD]=rD($E);function uD(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:h,internal_do_not_use_render:g}=e,_=aD(t),[v,y]=m.useState(null),[b,x]=m.useState(null),[S,C]=m.useState(!1),w=Fy(l),[T,E]=py({prop:r,defaultProp:i??!1,onChange:a,caller:$E}),[D,O]=py({prop:o,defaultProp:s,onChange:c,caller:$E}),k=m.useRef(null),A=m.useRef(D);m.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=XE(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let j=!v||!!h||!!v.closest(`form`),[M,N]=m.useState(new Set),ee=jy(),te=Array.from(M).map(e=>e.props.value).join(`;`),P=m.useCallback(e=>{N(t=>new Set(t).add(e))},[]),ne=m.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),re={required:p,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ee,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:M,nativeSelectKey:te,isFormControl:j};return(0,V.jsx)(LT,{..._,children:(0,V.jsx)(oD,{scope:t,...re,children:(0,V.jsx)(eD.Provider,{scope:t,children:(0,V.jsx)(cD,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:ne,children:YD(g)?g(re):n})})})})}XE(uD,`SelectProvider`);var dD=XE(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,V.jsx)(uD,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[n,e?(0,V.jsx)(JD,{__scopeSelect:t}):null]})})},`Select`),fD=`SelectTrigger`,pD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=aD(n),o=sD(fD,n),s=o.disabled||r,c=sv(t,o.onTriggerChange),l=tD(n),u=m.useRef(`touch`),[d,f,p]=ZD(e=>{let t=l().filter(e=>!e.disabled),n=QD(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),h=XE(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,V.jsx)(RT,{asChild:!0,...a,children:(0,V.jsx)(Dv.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":XD(o.value)?``:void 0,...i,ref:c,onClick:Y(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&h(e)}),onPointerDown:Y(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:Y(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&ZE.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),mD=`SelectValue`,hD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=sD(mD,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=sv(t,c.onValueNodeChange);iy(()=>{l(u)},[l,u]);let f=XD(c.value);return(0,V.jsx)(Dv.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,V.jsx)(m.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),gD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,V.jsx)(Dv.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[_D,vD]=rD(`SelectPortal`,{forceMount:void 0}),yD=XE(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,V.jsx)(_D,{scope:e.__scopeSelect,forceMount:n,children:(0,V.jsx)(_b,{asChild:!0,...r})})},`SelectPortal`),bD=`SelectContent`,xD=m.forwardRef(XE(function(e,t){let n=vD(bD,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=sD(bD,e.__scopeSelect),[o,s]=m.useState();return iy(()=>{s(new DocumentFragment)},[]),(0,V.jsx)(xy,{present:r||a.open,children:({present:e})=>e?(0,V.jsx)(DD,{...i,ref:t}):(0,V.jsx)(SD,{...i,fragment:o})})},`SelectContent`)),SD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?wv.createPortal((0,V.jsx)(wD,{scope:n,children:(0,V.jsx)(eD.Slot,{scope:n,children:(0,V.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),CD=10,[wD,TD]=rD(bD),ED=uv(`SelectContent.RemoveScroll`),DD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=sD(bD,n),[b,x]=m.useState(null),[S,C]=m.useState(null),w=sv(t,x),[T,E]=m.useState(null),[D,O]=m.useState(null),k=tD(n),[A,j]=m.useState(!1),M=m.useRef(!1);m.useEffect(()=>{if(b)return Vx(b)},[b]),Cb();let N=m.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),ee=m.useCallback(()=>N([T,b]),[N,T,b]);m.useEffect(()=>{A&&ee()},[A,ee]);let{onOpenChange:te,triggerPointerDownPosRef:P}=y;m.useEffect(()=>{if(b){let e={x:0,y:0},t=XE(t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},`handlePointerMove`),n=XE(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||te(!1),document.removeEventListener(`pointermove`,t),P.current=null},`handlePointerUp`);return P.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,te,P]),m.useEffect(()=>{let e=XE(()=>te(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[ne,re]=ZD(e=>{let t=k().filter(e=>!e.disabled),n=QD(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ie=m.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(M.current=!0))},[y.value]),ae=m.useCallback(()=>b?.focus(),[b]),oe=m.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),se=r===`popper`?kD:OD,ce=se===kD?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,V.jsx)(wD,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ie,selectedItem:T,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:ee,selectedItemText:D,position:r,isPositioned:A,searchRef:ne,children:(0,V.jsx)(Mx,{as:ED,allowPinchZoom:!0,children:(0,V.jsx)(ib,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Y(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,V.jsx)(Ky,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,V.jsx)(se,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...ce,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Y(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),OD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=sD(bD,n),o=TD(bD,n),[s,c]=m.useState(null),[l,u]=m.useState(null),d=sv(t,u),f=tD(n),p=m.useRef(!1),h=m.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=m.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-CD,d=SE(a,[CD,Math.max(CD,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-CD,d=SE(a,[CD,Math.max(CD,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-CD*2,u=g.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-CD,D=c-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=m+h+k,j=x-A;if(A<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+g.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}s.style.margin=`${CD}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);iy(()=>b(),[b]);let[x,S]=m.useState();iy(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=m.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,V.jsx)(AD,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,V.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,V.jsx)(Dv.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),kD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=CD,...a}=e,o=aD(n);return(0,V.jsx)(zT,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[AD,jD]=rD(bD,{}),MD=`SelectViewport`,ND=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=TD(MD,n),o=jD(MD,n),s=sv(t,a.onViewportChange),c=m.useRef(0);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,V.jsx)(eD.Slot,{scope:n,children:(0,V.jsx)(Dv.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Y(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-CD*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[PD,FD]=rD(`SelectGroup`),ID=`SelectItem`,[LD,RD]=rD(ID),zD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=sD(ID,n),c=TD(ID,n),l=s.value===r,[u,d]=m.useState(a??``),[f,p]=m.useState(!1),h=sv(t,Ry(e=>c.itemRefCallback?.(e,r,i))),g=jy(),_=m.useRef(`touch`),v=XE(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,V.jsx)(LD,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:m.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,V.jsx)(eD.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,V.jsx)(Dv.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Y(o.onFocus,()=>p(!0)),onBlur:Y(o.onBlur,()=>p(!1)),onClick:Y(o.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:Y(o.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:Y(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Y(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Y(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(QE.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),BD=`SelectItemText`,VD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=sD(BD,n),s=TD(BD,n),c=RD(BD,n),l=lD(BD,n),[u,d]=m.useState(null),f=Ry(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=sv(t,d,c.onItemTextChange,f),h=u?.textContent,g=m.useMemo(()=>(0,V.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=l;return iy(()=>(_(g),()=>v(g)),[_,v,g]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Dv.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!XD(o.value)?wv.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),HD=`SelectScrollUpButton`,UD=m.forwardRef(XE(function(e,t){let n=TD(HD,e.__scopeSelect),r=jD(HD,e.__scopeSelect),[i,a]=m.useState(!1),o=sv(t,r.onScrollButtonChange);return iy(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};XE(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,V.jsx)(KD,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),WD=`SelectScrollDownButton`,GD=m.forwardRef(XE(function(e,t){let n=TD(WD,e.__scopeSelect),r=jD(WD,e.__scopeSelect),[i,a]=m.useState(!1),o=sv(t,r.onScrollButtonChange);return iy(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};XE(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,V.jsx)(KD,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),KD=m.forwardRef(XE(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=TD(`SelectScrollButton`,n),o=m.useRef(null),s=tD(n),c=m.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),iy(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,V.jsx)(Dv.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Y(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Y(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Y(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),qD=`SelectBubbleInput`,JD=m.forwardRef(XE(function({__scopeSelect:e,...t},n){let r=sD(qD,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=m.useRef(null),h=sv(n,p),g=i??``,_=yE(g),v=Array.from(d).some(e=>(e.props.value??``)===``);return m.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(_!==g&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,g),e.dispatchEvent(t)}},[_,g]),(0,V.jsxs)(Dv.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...jv,...t.style},ref:h,defaultValue:g,children:[XD(i)&&!v?(0,V.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function YD(e){return typeof e==`function`}XE(YD,`isFunction`);function XD(e){return e===``||e===void 0}XE(XD,`shouldShowPlaceholder`);function ZD(e){let t=Ry(e),n=m.useRef(``),r=m.useRef(0),i=m.useCallback(e=>{let i=n.current+e;t(i),XE((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=m.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}XE(ZD,`useTypeaheadSearch`);function QD(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$D(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}XE(QD,`findNextItem`);function $D(e,t){return e.map((n,r)=>e[(t+r)%e.length])}XE($D,`wrapArray`);var eO=Object.defineProperty,tO=(e,t)=>eO(e,`name`,{value:t,configurable:!0}),nO=`Switch`,[rO,iO]=Iv(nO),[aO,oO]=rO(nO);function sO(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=py({prop:n,defaultProp:i??!1,onChange:c,caller:nO}),[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useRef(!1),[b,x]=m.useReducer(e=>e+1,0),S={checked:f,setChecked:p,disabled:a,control:h,setControl:g,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,userInteractionCount:b,onUserInteraction:x,required:l,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,V.jsx)(aO,{scope:t,...S,children:hO(d)?d(S):r})}tO(sO,`SwitchProvider`);var cO=`SwitchTrigger`,lO=m.forwardRef(tO(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:h,bubbleInput:g}=oO(cO,e),_=sv(r,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=tO(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,V.jsx)(Dv.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":gO(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:Y(t,e=>{p(),d(e=>!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),uO=m.forwardRef(tO(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,V.jsx)(sO,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(lO,{...d,ref:t,__scopeSwitch:n}),e&&(0,V.jsx)(mO,{__scopeSwitch:n})]})})},`Switch`)),dO=`SwitchThumb`,fO=m.forwardRef(tO(function(e,t){let{__scopeSwitch:n,...r}=e,i=oO(dO,n);return(0,V.jsx)(Dv.span,{"data-state":gO(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),pO=`SwitchBubbleInput`,mO=m.forwardRef(tO(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:h,setBubbleInput:g}=oO(pO,e),_=sv(r,g),v=WS(i),y=m.useRef(!1),b=m.useRef(s),x=m.useRef(o);m.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=b.current!==s;b.current=s;let c=!(r&&a.current);if(i&&n){y.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=m.useRef(s);return(0,V.jsx)(Dv.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:_,onClick:Y(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function hO(e){return typeof e==`function`}tO(hO,`isFunction`);function gO(e){return e?`checked`:`unchecked`}tO(gO,`getState`);var _O=Object.defineProperty,vO=(e,t)=>_O(e,`name`,{value:t,configurable:!0}),yO=`Tabs`,[bO,xO]=Iv(yO,[rE]),SO=rE(),[CO,wO]=bO(yO),TO=m.forwardRef(vO(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Fy(s),[d,f]=py({prop:r,onChange:i,defaultProp:a??``,caller:yO});return(0,V.jsx)(CO,{scope:n,baseId:jy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,V.jsx)(Dv.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),EO=`TabsList`,DO=m.forwardRef(vO(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=wO(EO,n),o=SO(n);return(0,V.jsx)(hE,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,V.jsx)(Dv.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),OO=`TabsTrigger`,kO=m.forwardRef(vO(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=wO(OO,n),s=SO(n),c=MO(o.baseId,r),l=NO(o.baseId,r),u=r===o.value;return(0,V.jsx)(gE,{asChild:!0,...s,focusable:!i,active:u,children:(0,V.jsx)(Dv.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Y(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Y(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),AO=`TabsContent`,jO=m.forwardRef(vO(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=wO(AO,n),c=MO(s.baseId,r),l=NO(s.baseId,r),u=r===s.value,d=m.useRef(u);return m.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,V.jsx)(xy,{present:i||u,children:({present:n})=>(0,V.jsx)(Dv.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function MO(e,t){return`${e}-trigger-${t}`}vO(MO,`makeTriggerId`);function NO(e,t){return`${e}-content-${t}`}vO(NO,`makeContentId`);var PO=TO,FO=DO,IO=kO,LO=jO,RO=Object.defineProperty,zO=(e,t)=>RO(e,`name`,{value:t,configurable:!0}),[BO,VO]=Iv(`Tooltip`,[wT]),HO=wT(),UO=`TooltipProvider`,WO=700,GO=`tooltip.open`,[KO,qO]=BO(UO),JO=zO(e=>{let{__scopeTooltip:t,delayDuration:n=WO,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=m.useRef(!0),s=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,V.jsx)(KO,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:m.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:m.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),YO=`Tooltip`,[XO,ZO]=BO(YO),QO=zO(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=qO(YO,e.__scopeTooltip),l=HO(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),h=jy(),g=m.useRef(0),_=o??c.disableHoverableContent,v=s??c.delayDuration,y=m.useRef(!1),[b,x]=py({prop:r,defaultProp:i??!1,onChange:zO(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(GO))):c.onClose(),a?.(e)},`onChange`),caller:YO}),S=m.useMemo(()=>b?y.current?`delayed-open`:`instant-open`:`closed`,[b]),C=m.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),w=m.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),T=m.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},v)},[v,x]);m.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let E=f??h;return(0,V.jsx)(LT,{...l,children:(0,V.jsx)(XO,{scope:t,contentId:E,setContentId:p,open:b,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:m.useCallback(()=>{_?w():(window.clearTimeout(g.current),g.current=0)},[w,_]),onOpen:C,onClose:w,disableHoverableContent:_,children:n})})},`Tooltip`),$O=`TooltipTrigger`,ek=m.forwardRef(zO(function(e,t){let{__scopeTooltip:n,...r}=e,i=ZO($O,n),a=qO($O,n),o=HO(n),s=sv(t,m.useRef(null),i.onTriggerChange),c=m.useRef(!1),l=m.useRef(!1),u=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,V.jsx)(RT,{asChild:!0,...o,children:(0,V.jsx)(Dv.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:Y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:Y(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Y(e.onBlur,i.onClose),onClick:Y(e.onClick,i.onClose)})})},`TooltipTrigger`)),tk=`TooltipPortal`,[nk,rk]=BO(tk,{forceMount:void 0}),ik=zO(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=ZO(tk,t);return(0,V.jsx)(nk,{scope:t,forceMount:n,children:(0,V.jsx)(xy,{present:n||a.open,children:(0,V.jsx)(_b,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),ak=`TooltipContent`,ok=m.forwardRef(zO(function(e,t){let n=rk(ak,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=ZO(ak,e.__scopeTooltip);return(0,V.jsx)(xy,{present:r||o.open,children:o.disableHoverableContent?(0,V.jsx)(lk,{side:i,...a,ref:t}):(0,V.jsx)(sk,{side:i,...a,ref:t})})},`TooltipContent`)),sk=m.forwardRef(zO(function(e,t){let n=ZO(ak,e.__scopeTooltip),r=qO(ak,e.__scopeTooltip),i=m.useRef(null),a=sv(t,i),[o,s]=m.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=m.useCallback(()=>{s(null),d(!1)},[d]),p=m.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=dk(r,uk(r,n.getBoundingClientRect())),a=fk(t.getBoundingClientRect()),o=mk([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=zO(e=>p(e,u),`handleTriggerLeave`),t=zO(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),m.useEffect(()=>{if(o){let e=zO(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!pk(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,V.jsx)(lk,{...e,ref:a})},`TooltipContentHoverable`)),ck=pv(`TooltipContent`),lk=m.forwardRef(zO(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=ZO(ak,n),u=HO(n),{onClose:d}=l;m.useEffect(()=>(document.addEventListener(GO,d),()=>document.removeEventListener(GO,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=zO(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return iy(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,V.jsx)(Ky,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,V.jsxs)(zT,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,V.jsx)(ck,{children:r}),i?(0,V.jsx)(Mv,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function uk(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}zO(uk,`getExitSideFromRect`);function dk(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}zO(dk,`getPaddedExitPoints`);function fk(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}zO(fk,`getPointsFromRect`);function pk(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}zO(pk,`isPointInPolygon`);function mk(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),hk(t)}zO(mk,`getHull`);function hk(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}zO(hk,`getHullPresorted`);var gk=JO,_k=QO,vk=ek,yk=ik,bk=ok,xk=jg(`group/button motion-reduce:transition-none motion-reduce:active:scale-100 inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[scale,background-color,box-shadow,color,border-color] duration-150 active:not-aria-[haspopup]:scale-[0.97] ease-snap outline-none select-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`btn-tint text-primary-foreground [--tint:var(--primary)] disabled:text-muted-foreground`,soft:`btn-soft text-foreground`,outline:`btn-outline text-foreground [&_svg]:text-muted-foreground`,secondary:`btn-soft text-secondary-foreground`,ghost:`btn-ghost text-foreground [&_svg]:text-muted-foreground hover:[&_svg]:text-foreground`,destructive:`btn-tint text-white [--tint:var(--destructive)] focus-visible:outline-destructive disabled:text-muted-foreground dark:text-background`,link:`text-link underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-3`,xs:`h-7 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1.5 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-2 px-4`,icon:`size-8`,"icon-xs":`size-7 [&_svg:not([class*='size-'])]:size-3.5`,"icon-sm":`size-7`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function X({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?dv:`button`;return(0,V.jsx)(a,{"aria-keyshortcuts":r?void 0:`Enter Space`,"aria-description":r?`When focused, press Enter to activate.`:`When focused, press Enter or Space to activate.`,"aria-describedby":`focused-action-help`,"data-slot":`button`,"data-variant":t,"data-size":n,className:J(xk({variant:t,size:n,className:e})),...i})}var Sk=J(`pointer-events-none inline-flex h-[1.125rem] min-w-[1.125rem] w-fit items-center justify-center gap-1 rounded-[4px] bg-accent px-1 font-sans text-2xs leading-none font-medium text-muted-foreground select-none`,`in-data-[slot=tooltip-content]:bg-accent in-data-[slot=tooltip-content]:text-muted-foreground`,`in-data-[variant=default]:bg-primary-foreground/16 in-data-[variant=default]:text-primary-foreground`,`in-data-[variant=destructive]:bg-white/16 in-data-[variant=destructive]:text-current`,`[&_svg:not([class*='size-'])]:size-3`);function Ck({className:e,...t}){return(0,V.jsx)(`kbd`,{"data-slot":`kbd`,className:J(Sk,e),...t})}function wk({className:e,...t}){return(0,V.jsx)(`kbd`,{"data-slot":`kbd-group`,className:J(`inline-flex items-center gap-0.5`,e),...t})}var Tk=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),Ek={alt:`⌥`,ctrl:`⌃`,shift:`⇧`,meta:`⌘`,cmd:`⌘`},Dk={enter:`↵`,esc:`Esc`,escape:`Esc`,arrowleft:`←`,arrowright:`→`,arrowup:`↑`,arrowdown:`↓`,space:`Space`,delete:`Del`,backspace:`⌫`};function Ok(e){return e.split(`+`).map(e=>{let t=e.toLowerCase();return Tk&&Ek[t]?Ek[t]:Dk[t]??(e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1))})}function kk({chord:e,className:t}){let n=Ok(e);return(0,V.jsx)(wk,{className:t,children:n.map((e,t)=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[t>0?(0,V.jsx)(`span`,{className:`sr-only`,children:`plus`}):null,(0,V.jsx)(Ck,{children:e})]},t))})}function Ak({chord:e,children:t,className:n}){return(0,V.jsxs)(`span`,{className:J(`kbd-hint inline-flex shrink-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,n),children:[(0,V.jsx)(kk,{chord:e}),t]})}function jk(){let[e,t]=(0,m.useReducer)(e=>e+1,0);return(0,m.useEffect)(()=>F.subscribe(t),[]),e}function Mk(){return jk(),F.status()}function Nk(e){return jk(),F.get(e)}function Pk(e){let t=(0,m.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),n=(0,m.useCallback)(()=>window.matchMedia(e).matches,[e]);return(0,m.useSyncExternalStore)(t,n)}function Fk(){return Pk(`(max-width: 767.98px) and (orientation: landscape) and (max-height: 500px)`)}var Ik={keyboardOpen:!1,keyboardInset:0},Lk=`(max-width: 767.98px)`,Rk=100,zk=new Set([`button`,`checkbox`,`color`,`date`,`datetime-local`,`file`,`hidden`,`image`,`month`,`radio`,`range`,`reset`,`submit`,`time`,`week`]);function Bk(e){return typeof HTMLTextAreaElement<`u`&&e instanceof HTMLTextAreaElement}function Vk(e){return typeof HTMLInputElement<`u`&&e instanceof HTMLInputElement}function Hk(e){if(!(typeof HTMLElement<`u`&&e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;let t=e.closest(`[contenteditable]`);return t!==null&&t.getAttribute(`contenteditable`)!==`false`}function Uk(e){return Bk(e)?!e.disabled&&!e.readOnly:Vk(e)?!e.disabled&&!e.readOnly&&!zk.has(e.type):Hk(e)}function Wk(e,t){return Number.isFinite(e)&&e>0?e:t}function Gk(){return Wk(window.innerHeight,0)}function Kk(e){let t=Gk();return Wk(e?.height??t,t)}function qk(e){return Math.max(Gk(),Kk(e))}function Jk(e){return e?.matches??window.innerWidth<768}function Yk(e,t,n){if(!e)return Math.max(0,n-t);let r=Gk()||n,i=Number.isFinite(e.offsetTop)?Math.max(0,e.offsetTop):0;return Math.max(0,r-t-i)}function Xk(e,t){return e.keyboardOpen===t.keyboardOpen&&e.keyboardInset===t.keyboardInset}function Zk(e,t){e(e=>Xk(e,t)?e:t)}function Qk(){return{media:typeof window.matchMedia==`function`?window.matchMedia(Lk):null,viewport:window.visualViewport??null}}function $k(e){return{phone:Jk(e.media),baseline:qk(e.viewport),resetting:!1}}function eA(e,t,n){return!t.phone||t.resetting||!Uk(document.activeElement)||t.baseline-n<Rk?Ik:{keyboardOpen:!0,keyboardInset:Yk(e.viewport,n,t.baseline)}}function tA(e,t,n){let r=Kk(e.viewport),i=Jk(e.media);if(i!==t.phone){t.phone=i,t.baseline=qk(e.viewport),t.resetting=!0,Zk(n,Ik);return}if(!i||t.resetting){t.baseline=qk(e.viewport),t.resetting=!1,Zk(n,Ik);return}t.baseline=Math.max(t.baseline,qk(e.viewport)),Zk(n,eA(e,t,r))}function nA(e,t,n){t.baseline=qk(e.viewport),t.resetting=!0,Zk(n,Ik)}function rA(e){e.current!==void 0&&(typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame(e.current):window.clearTimeout(e.current),e.current=void 0)}function iA(e,t){rA(t),t.current=typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(e):window.setTimeout(e,0)}function aA(e,t,n){return e?(e.addEventListener(t,n),()=>e.removeEventListener(t,n)):()=>{}}function oA(e,t,n,r){return[aA(window,`focusin`,t),aA(window,`focusout`,t),aA(window,`resize`,t),aA(window,`orientationchange`,n),aA(e.media,`change`,r),aA(e.viewport,`resize`,t),aA(e.viewport,`scroll`,t)]}function sA(e,t,n,r){e.current=void 0,tA(t,n,r)}function cA(e,t,n,r){nA(e,t,n),r()}function lA(e,t,n,r){t.phone=Jk(e.media),nA(e,t,n),r()}function uA(e,t){rA(e),t.forEach(e=>e())}function dA(e){let t=Qk(),n=$k(t),r={},i=()=>sA(r,t,n,e),a=()=>iA(i,r),o=oA(t,a,()=>cA(t,n,e,a),()=>lA(t,n,e,a));return a(),()=>uA(r,o)}function fA(){let[e,t]=(0,m.useState)(Ik);return(0,m.useEffect)(()=>dA(t),[]),e}function pA(e,t,n){if(!e||typeof window>`u`)return;let r=window.visualViewport,i=r?.height??Math.max(0,window.innerHeight-(t?n:0));return{wrapper:{top:`${Math.max(0,r?.offsetTop??0)}px`,bottom:`auto`,height:`${i}px`},content:{width:`calc(100vw - 24px)`,maxWidth:`calc(100vw - 24px)`,maxHeight:`${Math.max(0,i-32)}px`}}}function mA({open:e,onOpenChange:t,label:n,description:r,dismissOnBackdrop:i=!0,className:a,style:o,onCloseAutoFocus:s,children:c}){let l=vf(),u=Pk(`(max-width: 767.98px)`),{keyboardOpen:d,keyboardInset:f}=fA(),p=pA(u,d,f);return(0,V.jsx)(Yx,{open:e,onOpenChange:t,children:(0,V.jsx)(Cu,{children:e?(0,V.jsxs)(tS,{forceMount:!0,children:[(0,V.jsx)(rS,{asChild:!0,forceMount:!0,children:(0,V.jsx)(H.div,{className:`fixed inset-0 z-50 bg-scrim backdrop-blur-sm`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:`easeOut`}})}),(0,V.jsx)(`div`,{className:J(`pointer-events-none fixed inset-0 z-50 grid place-items-center`,u?`p-3`:`p-4`),style:p?.wrapper,children:(0,V.jsx)(sS,{asChild:!0,forceMount:!0,onCloseAutoFocus:s,onInteractOutside:e=>{i||e.preventDefault()},onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[data-nav], [data-autofocus], textarea`);t&&(e.preventDefault(),t.focus())},...r?{}:{"aria-describedby":void 0},children:(0,V.jsxs)(H.div,{className:J(`glass-pop pointer-events-auto flex max-h-[min(86svh,48rem)] w-full max-w-2xl flex-col overflow-hidden rounded-2xl outline-none`,a),style:{...o,...p?.content??{}},initial:{opacity:0,scale:l?1:.98,y:l?0:6},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:l?1:.98,transition:{duration:.15,ease:`easeIn`}},transition:{duration:.2,ease:[.32,.72,0,1]},children:[(0,V.jsx)(fS,{className:`sr-only`,children:n}),r?(0,V.jsx)(mS,{className:`sr-only`,children:r}):null,c]})})})]}):null})})}var hA=[],gA=0,_A=new Set;function vA(){for(let e of[..._A])e()}function yA(e){return _A.add(e),()=>{_A.delete(e)}}function bA(){let e;for(let t of hA)(!e||t.priority>e.priority||t.priority===e.priority&&t.order<e.order)&&(e=t);return e?.id}var xA={question:30,confirm:20,help:10,sheet:5};function SA(e,t){let n=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return hA=[...hA,{id:n,priority:t,order:++gA}],vA(),()=>{hA=hA.filter(e=>e.id!==n),vA()}},[e,t,n]);let r=(0,m.useSyncExternalStore)(yA,bA,()=>void 0);return e&&r===n}function CA(){return hA.length>0}function wA(){return(0,m.useSyncExternalStore)(yA,()=>hA.length>0,()=>!1)}var TA=[`lobby`,`tasks`,`plan`,`quickfix`,`git`,`knowledge`,`metrics`],EA=`already answered in another window`,DA=`Attached files:`,OA=new Set(TA);function kA(e){let t=e.replace(/^#\/?/,``).split(`/`).filter(Boolean);if(t[0]===`issues`)return[`#/git/issues`,...t.slice(1,2)].join(`/`);if(t[0]===`sessions`||t[0]===`excalidraw`)return`#/lobby`}function AA(e){let t=e.replace(/^#\/?/,``).split(`/`).filter(Boolean),n=t[0];if(!n||n===`lobby`)return{kind:`tab`,tab:`lobby`,rest:t.slice(1)};if(n===`settings`)return{kind:`settings`};if(OA.has(n))return{kind:`tab`,tab:n,rest:t.slice(1)}}function jA(e,...t){return`#/${e}${t.filter(Boolean).map(e=>`/${encodeURIComponent(e)}`).join(``)}`}function MA(e){window.location.hash!==e&&(window.location.hash=e)}function NA(){let[e,t]=(0,m.useState)(()=>AA(kA(window.location.hash)??window.location.hash)??{kind:`tab`,tab:`lobby`,rest:[]});return(0,m.useEffect)(()=>{let e=()=>{let e=kA(window.location.hash),n=AA(e||window.location.hash);(e||!n)&&window.history.replaceState(null,``,e??`#/lobby`),t(n??{kind:`tab`,tab:`lobby`,rest:[]})};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function PA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty`,className:J(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 p-6 text-center text-balance`,e),...t})}function FA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-header`,className:J(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var IA=jg(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`relative flex size-9 shrink-0 items-center justify-center rounded-md border bg-card text-foreground shadow-sm/5 [&_svg:not([class*='size-'])]:size-4.5`}},defaultVariants:{variant:`default`}});function LA({className:e,variant:t=`default`,...n}){return(0,V.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:J(IA({variant:t,className:e})),...n})}function RA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-title`,className:J(`text-[1.0625rem] leading-6 font-medium`,e),...t})}function zA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`empty-description`,className:J(`text-[0.8125rem] leading-[1.125rem] text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function BA({className:e,...t}){return(0,V.jsx)(`span`,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:J(`inline-flex size-4 shrink-0 items-end justify-between text-primary`,e),...t,children:[0,1,2].map(e=>(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`block aspect-square h-[28%] shrink-0 rounded-full bg-current motion-safe:animate-[hop_0.9s_ease-in-out_infinite]`,style:{animationDelay:`${e*.14}s`}},e))})}var VA=jg([`relative w-full text-sm border has-[>svg]:grid-cols-[calc(var(--spacing)*3)_1fr] grid-cols-[0_1fr] grid gap-y-0.5 items-center [&>svg:not([class*=size-])]:size-4`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_[data-slot=alert-action]]:sm:row-end-3`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:items-start`,`has-[>[data-slot=alert-title]+[data-slot=alert-description]]:[&_svg]:translate-y-0.5`,`rounded-lg`,`px-3`,`py-2.5`,`has-[>svg]:gap-x-2.5`],{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/30 bg-destructive/4 [&>svg]:text-destructive`,info:`border-info/30 bg-info/4 [&>svg]:text-info`,success:`border-success/30 bg-success/4 [&>svg]:text-success`,warning:`border-warning/30 bg-warning/4 [&>svg]:text-warning`,invert:`border-invert bg-invert text-invert-foreground [&_[data-slot=alert-description]]:text-invert-foreground/70`}},defaultVariants:{variant:`default`}});function HA({className:e,variant:t,...n}){return(0,V.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:J(VA({variant:t}),e),...n})}function UA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-description`,className:J(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function WA({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-action`,className:J(`flex gap-1.5 max-sm:col-start-2 max-sm:mt-2 max-sm:justify-start sm:col-start-3 sm:row-start-1 sm:justify-end sm:self-center`,e),...t})}function GA({label:e=`Connecting…`}){return(0,V.jsxs)(`div`,{className:`flex min-h-48 min-w-0 w-full max-w-full flex-1 items-center justify-center gap-2 overflow-y-auto px-4 py-8 text-sm text-muted-foreground max-md:min-h-32 max-md:text-center`,children:[(0,V.jsx)(BA,{}),(0,V.jsx)(`span`,{children:e})]})}function KA({message:e,onRetry:t}){return(0,V.jsxs)(PA,{className:`m-4 min-h-0 min-w-0 flex-1 overflow-y-auto max-md:m-2 max-md:max-h-full max-md:px-2`,children:[(0,V.jsxs)(FA,{children:[(0,V.jsxs)(RA,{className:`flex items-center gap-2`,children:[(0,V.jsx)(ug,{className:`size-4 text-destructive`,"aria-hidden":`true`}),`Could not load this view`]}),(0,V.jsx)(zA,{children:e??`The request failed. Try again.`})]}),t?(0,V.jsxs)(X,{variant:`outline`,onClick:t,children:[(0,V.jsx)(Rh,{"aria-hidden":`true`}),`Try again`]}):null]})}function qA({onRetry:e}){return(0,V.jsxs)(HA,{variant:`destructive`,role:`status`,className:`mx-3 mb-1 max-h-32 w-auto min-w-0 overflow-y-auto max-sm:mx-2 max-md:items-start`,children:[(0,V.jsx)(bg,{className:`size-4`,"aria-hidden":`true`}),(0,V.jsx)(UA,{children:`Lost pi — reconnecting every 2 s. Your planning session and tasks carry on when it is back.`}),e?(0,V.jsx)(WA,{children:(0,V.jsx)(X,{variant:`link`,className:`h-8 px-1 text-destructive max-md:h-auto max-md:min-h-11`,onClick:e,children:`Retry now`})}):null]})}function JA(e,t,n,r=!0){jk();let[i,a]=(0,m.useState)({loading:!0,at:0}),[o,s]=(0,m.useState)(0),c=[F.status().connection,...n.map(e=>F.get(e).version)].join(`,`),l=JSON.stringify(t);(0,m.useEffect)(()=>{if(!r)return;let t=!0,n=performance.now();return a(e=>({...e,loading:!0})),Se(e,JSON.parse(l)).then(e=>t&&a({data:e,loading:!1,at:n}),e=>t&&a(t=>({...t,error:e instanceof Error?e.message:String(e),loading:!1}))),()=>{t=!1}},[e,l,c,o,r]);let u=(0,m.useCallback)(()=>s(e=>e+1),[]);return{data:i.data,error:i.error,loading:i.loading,requestedAt:i.at,reload:u}}function YA({delayDuration:e=400,...t}){return(0,V.jsx)(gk,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function XA({...e}){return(0,V.jsx)(_k,{"data-slot":`tooltip`,...e})}function ZA({...e}){return(0,V.jsx)(vk,{"data-slot":`tooltip-trigger`,...e})}function QA({className:e,sideOffset:t=6,children:n,...r}){return(0,V.jsx)(yk,{children:(0,V.jsx)(bk,{"data-slot":`tooltip-content`,sideOffset:t,className:J(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md border bg-popover px-2 py-1 text-xs leading-snug text-popover-foreground shadow-md/5 has-data-[slot=kbd]:pr-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-lg data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:n})})}function $A(e){return[...e.querySelectorAll(`[data-nav]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-hidden`)!==`true`)}function ej(e,t,n){let r=$A(e);if(r.length===0)return!1;let i=t?r.findIndex(e=>e===t||e.contains(t)):-1,a=r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?n>0?-1:r.length:i)+n))];return!a||a===t?!1:(a.focus({preventScroll:!1}),!0)}function tj(e){return e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&![`checkbox`,`radio`,`button`].includes(e.type)||e instanceof HTMLElement&&e.isContentEditable}function nj(e,t=!0){return e===`ArrowDown`||t&&e===`j`?1:e===`ArrowUp`||t&&e===`k`?-1:0}function rj(e,t=!0){return e===`ArrowRight`||t&&e===`l`?1:e===`ArrowLeft`||t&&e===`h`?-1:0}var ij=`button:not([disabled]), a[href], [role='button']:not([aria-disabled='true'])`;function aj(e){return[...e.querySelectorAll(ij)].filter(e=>e.offsetParent!==null)}function oj(e,t,n){let r=aj(e);if(r.length===0)return;let i=t?r.findIndex(e=>e===t||e.contains(t)):-1;r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?n>0?-1:r.length:i)+n))]?.focus()}function sj(e,t=document.querySelector(`[data-pane='list']`)){if(!t)return;let n=[...t.querySelectorAll(`button[data-row]`)].filter(e=>e.offsetParent!==null),r=n.findIndex(e=>e.getAttribute(`aria-current`)===`true`),i=Math.max(0,Math.min(n.length-1,r<0?e>0?0:n.length-1:r+e));n[i]?.click(),n[i]?.focus({preventScroll:!0}),n[i]?.scrollIntoView({block:`nearest`})}function cj(e){return e.querySelector(`[aria-current='true']`)??aj(e)[0]}function lj(){let e=document.getElementById(`main`);if(!e)return!1;let t=e.querySelector(`[data-pane='list']`);return((t?cj(t):void 0)??aj(e)[0]??e).focus(),!0}function uj(){let e=document.querySelector(`[role='tab'][aria-selected='true']`);if(e)return e.focus({preventScroll:!0}),!0;let t=document.getElementById(`main`);return t?.focus({preventScroll:!0}),!!t}var dj={active:!1},fj=new Set([`g`,`j`,`k`,`h`,`l`,`d`,`p`,`/`,`?`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]);function pj(e){if(!e)return!1;let t=e.toLowerCase();return t===`delete`||/^[a-z]$/.test(t)&&!fj.has(t)}function mj(e,t){return t.toLowerCase()===`delete`?e.key===`Delete`||e.key===`Backspace`:e.key.toLowerCase()===t.toLowerCase()}function hj(){return CA()||!!document.querySelector(`[role='dialog'], [role='alertdialog'], [role='menu'], [role='listbox']`)}function gj(e,t,{enabled:n=!0,inDialog:r=!1}={}){let i=(0,m.useRef)(t);i.current=t,(0,m.useEffect)(()=>{if(!n||!e)return;let t=t=>{t.defaultPrevented||t.isComposing||t.repeat||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||mj(t,e)&&(tj(t.target)||(r||!hj())&&(t.preventDefault(),i.current()))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n,r])}var _j={neutral:`text-foreground`,primary:``,danger:`text-destructive hover:text-destructive`};function vj({label:e,icon:t,tone:n=`neutral`,shortcut:r,href:i,pressed:a,text:o,iconOnly:s,className:c,disabled:l,...u}){let d=(0,m.useRef)(null),f=pj(r);gj(f?r:void 0,()=>d.current?.click(),{enabled:f&&!l});let p=(0,V.jsx)(t,{"aria-hidden":`true`}),h=n===`primary`?`default`:s?`ghost`:`outline`,g=J(!s&&`px-2.5`,s?`max-md:size-11`:`max-md:min-h-11 max-md:min-w-11 max-md:h-auto max-md:whitespace-normal`,_j[n],c),_=s?`icon`:`default`,v=s?p:(0,V.jsxs)(V.Fragment,{children:[p,(0,V.jsx)(`span`,{children:o??e}),r?(0,V.jsx)(kk,{chord:r,className:`kbd-hint ml-1 max-md:hidden`}):null]}),y=i?(0,V.jsx)(X,{asChild:!0,ref:d,variant:h,size:_,"data-tone":n,className:g,children:(0,V.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer noopener`,"aria-label":e,"aria-keyshortcuts":f?r:void 0,children:v})}):(0,V.jsx)(X,{ref:d,type:`button`,variant:h,size:_,"data-tone":n,"aria-label":e,"aria-pressed":a,"aria-keyshortcuts":f?r:void 0,disabled:l,className:g,...u,children:v});return s?(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:y}),(0,V.jsxs)(QA,{children:[e,(0,V.jsx)(kk,{chord:r??(i?`Enter`:`Enter / Space`),className:`max-md:hidden`})]})]}):y}function yj({children:e,className:t}){function n(e){let t=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0;if(!t)return;let n=[...e.currentTarget.querySelectorAll(`button:not([disabled]), a[href]`)],r=n.indexOf(e.target);r<0||(e.preventDefault(),e.stopPropagation(),n[Math.max(0,Math.min(n.length-1,r+t))]?.focus())}return(0,V.jsx)(`div`,{role:`toolbar`,"aria-label":`Actions`,onKeyDown:n,className:J(`sticky -top-5 z-10 -mx-5 -mt-5 flex min-h-12 flex-wrap items-center gap-1 border-b border-border bg-[var(--workspace-card)] px-4 py-2 [&>[data-tone=danger]:not(:first-child)]:ml-auto max-md:static max-md:z-auto max-md:mx-0 max-md:mt-0 max-md:min-h-11 max-md:gap-2 max-md:border-b-0 max-md:bg-transparent max-md:px-0 max-md:py-1 max-md:backdrop-blur-none`,t),children:e})}function bj({...e}){return(0,V.jsx)(Yx,{"data-slot":`sheet`,...e})}function xj({...e}){return(0,V.jsx)(gS,{"data-slot":`sheet-close`,...e})}function Sj({...e}){return(0,V.jsx)(tS,{"data-slot":`sheet-portal`,...e})}function Cj({className:e,...t}){return(0,V.jsx)(rS,{"data-slot":`sheet-overlay`,className:J(`fixed inset-0 z-50 bg-scrim backdrop-blur-sm duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function wj({className:e,children:t,side:n=`right`,showCloseButton:r=!0,forceMount:i,hidden:a,...o}){return(0,V.jsxs)(Sj,{forceMount:i,children:[a?null:(0,V.jsx)(Cj,{}),(0,V.jsxs)(sS,{forceMount:i,hidden:a,"data-slot":`sheet-content`,"data-side":n,className:J(`glass-pop fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg/5 transition duration-200 ease-calm data-[side=bottom]:rounded-t-2xl data-[side=top]:rounded-b-2xl data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-8 data-[side=left]:data-open:slide-in-from-left-8 data-[side=right]:data-open:slide-in-from-right-8 data-[side=top]:data-open:slide-in-from-top-8 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-8 data-[side=left]:data-closed:slide-out-to-left-8 data-[side=right]:data-closed:slide-out-to-right-8 data-[side=top]:data-closed:slide-out-to-top-8`,e),...o,children:[t,r&&(0,V.jsx)(gS,{"data-slot":`sheet-close`,asChild:!0,children:(0,V.jsxs)(X,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,V.jsx)(wg,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function Tj({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`sheet-header`,className:J(`flex flex-col gap-0.5 p-4`,e),...t})}function Ej({className:e,...t}){return(0,V.jsx)(fS,{"data-slot":`sheet-title`,className:J(`text-base font-medium text-foreground`,e),...t})}function Dj({className:e,...t}){return(0,V.jsx)(mS,{"data-slot":`sheet-description`,className:J(`text-sm text-muted-foreground`,e),...t})}var Oj=jg(`bg-muted-foreground/15 motion-safe:animate-skeleton`,{variants:{shape:{block:`rounded-sm`,card:`rounded-lg`,pill:`rounded-full`}},defaultVariants:{shape:`block`}});function kj({className:e,shape:t,...n}){return(0,V.jsx)(`div`,{"aria-hidden":`true`,className:J(Oj({shape:t}),e),"data-slot":`skeleton`,...n})}function Aj(){return Pk(`(min-width: 1024px)`)}function jj({className:e,...t}){return(0,V.jsx)(`section`,{className:J(`min-h-0 min-w-0`,e),...t})}function Mj({open:e,onClose:t,describe:n,children:r}){let i=SA(e,xA.sheet),a=Pk(`(max-width: 767.98px)`),o=(0,m.useRef)(!1);return i&&(o.current=!0),e||(o.current=!1),(0,V.jsx)(bj,{open:e&&i,onOpenChange:e=>!e&&t(),children:(0,V.jsxs)(wj,{forceMount:e&&o.current?!0:void 0,hidden:!i,showCloseButton:!1,side:a?`bottom`:`right`,className:J(`gap-0`,a?`data-[side=bottom]:inset-0 data-[side=bottom]:h-full data-[side=bottom]:max-w-none data-[side=bottom]:rounded-none`:`data-[side=right]:w-[92%] data-[side=right]:sm:max-w-3xl`,!i&&`!hidden`),children:[(0,V.jsxs)(Tj,{className:`flex-row items-center justify-between border-b px-4 py-2`,children:[(0,V.jsx)(Ej,{className:`text-sm`,children:`Detail`}),(0,V.jsx)(Dj,{className:`sr-only`,children:n}),(0,V.jsx)(xj,{asChild:!0,children:(0,V.jsxs)(X,{variant:`ghost`,size:`sm`,"aria-label":`Close detail`,title:`Close · Esc`,className:J(`gap-2`,a&&`h-11 px-3 text-sm`),children:[(0,V.jsx)(wg,{"aria-hidden":`true`}),`Close`,a?null:(0,V.jsx)(kk,{chord:`Esc`,className:`kbd-hint`})]})})]}),(0,V.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:r})]})})}function Nj({list:e,detail:t,open:n,detailClassName:r,listPane:i,detailPane:a,onListKey:o,onDetailKey:s}){let c=n&&t!==null;return(0,V.jsxs)(`div`,{className:J(`grid min-h-0 min-w-0 flex-1`,c?`grid-rows-[minmax(0,1fr)_minmax(0,2fr)]`:`grid-rows-1`),children:[(0,V.jsx)(jj,{"data-pane":`list`,ref:i,onKeyDown:o,className:J(`min-w-0 overflow-x-hidden overflow-y-auto`,c?`border-b border-border`:`pb-dock`),children:e}),c?(0,V.jsx)(jj,{"data-pane":`detail`,ref:a,"aria-label":`Detail`,tabIndex:0,onKeyDown:s,className:J(`min-w-0 overflow-x-hidden overflow-y-auto px-5 pt-5 pb-dock`,r),children:t}):null]})}function Pj({wide:e,list:t,detail:n,open:r,onClose:i,hint:a,describe:o,inlineDetail:s,detailClassName:c}){let l=(0,m.useRef)(null),u=(0,m.useRef)(null);function d(t){let n=l.current;if(!n||t.defaultPrevented||t.nativeEvent.isComposing||CA()||t.altKey||t.ctrlKey||t.metaKey||tj(t.target)||t.target instanceof HTMLInputElement)return;let r=nj(t.key,!1);r?(t.preventDefault(),oj(n,t.target,r)):t.key===`Home`||t.key===`End`?(t.preventDefault(),oj(n,t.target,t.key===`Home`?`first`:`last`)):(e||s)&&rj(t.key)===1&&u.current&&(t.preventDefault(),u.current.focus())}function f(e){e.defaultPrevented||e.nativeEvent.isComposing||CA()||e.altKey||e.ctrlKey||e.metaKey||tj(e.target)||rj(e.key)===-1&&l.current&&(e.preventDefault(),cj(l.current)?.focus())}return!e&&s?(0,V.jsx)(Nj,{list:t,detail:n,open:r,detailClassName:c,listPane:l,detailPane:u,onListKey:d,onDetailKey:f}):e?(0,V.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[clamp(17rem,28%,23rem)_minmax(0,1fr)] gap-3 p-3`,children:[(0,V.jsx)(`div`,{className:`workspace-pane min-h-0 min-w-0 overflow-hidden rounded-xl border shadow-xs`,children:(0,V.jsx)(jj,{"data-pane":`list`,ref:l,onKeyDown:d,className:`h-full overflow-y-auto pb-dock`,children:t})}),(0,V.jsx)(`div`,{className:`workspace-pane min-h-0 min-w-0 overflow-hidden rounded-xl border shadow-xs`,children:(0,V.jsx)(jj,{"data-pane":`detail`,ref:u,tabIndex:0,"aria-label":`Detail`,onKeyDown:f,className:J(`h-full overflow-y-auto px-5 pt-5 pb-dock outline-none focus-visible:bg-muted/30`,c),children:n??(0,V.jsx)(`div`,{className:`grid h-full min-h-48 place-items-center`,children:(0,V.jsxs)(`div`,{className:`flex max-w-xs flex-col items-center gap-3 text-center`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground`,children:(0,V.jsx)(vh,{className:`size-5`})}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),(0,V.jsxs)(`p`,{className:`kbd-hint flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,V.jsx)(kk,{chord:`ArrowUp`}),(0,V.jsx)(kk,{chord:`ArrowDown`}),`move`]}),(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,V.jsx)(kk,{chord:`ArrowRight`}),`open`]})]})]})})})})]}):(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto pb-dock`,children:[(0,V.jsx)(jj,{"data-pane":`list`,ref:l,onKeyDown:d,className:`max-md:shrink-0`,children:t}),(0,V.jsx)(Mj,{open:r&&n!==null,onClose:i,describe:o,children:n})]})}function Fj({title:e,count:t,lead:n,children:r}){return(0,V.jsxs)(`div`,{className:`sticky top-0 z-10 flex min-h-12 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border bg-[var(--workspace-card)] px-4 py-2 max-md:static max-md:z-auto max-md:bg-transparent max-md:px-3 max-md:py-2 max-md:backdrop-blur-none`,children:[(0,V.jsx)(`h2`,{className:n?`sr-only`:`text-sm font-medium`,children:e}),n,(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-2 flex-1`}),t?(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:t}):null,r?(0,V.jsx)(`div`,{className:`flex items-center gap-1.5`,children:r}):null]})}function Ij(){return(0,V.jsx)(`div`,{className:`flex flex-col gap-1.5 p-3`,role:`status`,"aria-label":`Loading`,children:[0,1,2,3].map(e=>(0,V.jsx)(kj,{shape:`card`,className:`h-11`},e))})}function Lj({className:e,...t}){return(0,V.jsx)(`textarea`,{"data-slot":`textarea`,className:J(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background bg-clip-padding px-3 py-2 text-base shadow-control transition-[border-color,box-shadow] duration-150 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/24 focus-visible:shadow-none disabled:cursor-not-allowed disabled:opacity-64 aria-invalid:border-destructive/36 aria-invalid:focus-visible:border-destructive/64 aria-invalid:focus-visible:ring-destructive/16 md:text-sm dark:bg-input/32`,e),...t})}function Rj(e){return e<10?`0${e}`:String(e)}function zj(e){if(!Number.isFinite(e))return`0`;let t=new Date(e);return`${Rj(t.getHours())}:${Rj(t.getMinutes())}`}function Bj(e){if(!Number.isFinite(e)||e<5e3)return`now`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<48?`${r}h`:`${Math.floor(r/24)}d`}function Vj(e){let t=Bj(e);return t===`now`?`just now`:`${t} ago`}function Hj({...e}){return(0,V.jsx)(PS,{"data-slot":`alert-dialog`,...e})}function Uj({...e}){return(0,V.jsx)(FS,{"data-slot":`alert-dialog-portal`,...e})}function Wj({className:e,...t}){return(0,V.jsx)(IS,{"data-slot":`alert-dialog-overlay`,className:J(`fixed inset-0 z-50 bg-scrim backdrop-blur-sm duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Gj({className:e,...t}){return(0,V.jsxs)(Uj,{children:[(0,V.jsx)(Wj,{}),(0,V.jsx)(LS,{"data-slot":`alert-dialog-content`,className:J(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 glass-pop rounded-2xl p-5 text-sm duration-200 data-open:zoom-in-[0.98] data-closed:zoom-out-[0.98] outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})]})}function Kj({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:J(`flex flex-col gap-1.5`,e),...t})}function qj({className:e,...t}){return(0,V.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:J(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function Jj({className:e,...t}){return(0,V.jsx)(BS,{"data-slot":`alert-dialog-title`,className:J(`text-base font-medium text-foreground`,e),...t})}function Yj({className:e,...t}){return(0,V.jsx)(VS,{"data-slot":`alert-dialog-description`,className:J(`text-sm text-muted-foreground`,e),...t})}function Xj({className:e,variant:t=`default`,...n}){return(0,V.jsx)(X,{variant:t,size:`sm`,className:J(`h-7 gap-1 px-2.5`,e),asChild:!0,children:(0,V.jsx)(RS,{"data-slot":`alert-dialog-action`,...n})})}function Zj({className:e,...t}){return(0,V.jsx)(X,{variant:`outline`,size:`sm`,className:J(`h-7 gap-1 px-2.5`,e),asChild:!0,children:(0,V.jsx)(zS,{"data-slot":`alert-dialog-cancel`,...t})})}function Qj({label:e,text:t,shortcut:n,title:r,description:i,confirmLabel:a,onConfirm:o,icon:s,disabled:c,variant:l=`outline`,iconOnly:u,compact:d}){let[f,p]=(0,m.useState)(!1),h=SA(f,xA.confirm),g=l===`destructive`;return gj(`y`,()=>{p(!1),o()},{enabled:f&&h,inDialog:!0}),(0,V.jsxs)(Hj,{open:f&&h,onOpenChange:p,children:[(0,V.jsx)(vj,{label:e,icon:s,tone:g?`danger`:`neutral`,disabled:c,shortcut:n,iconOnly:u,...d?{"data-compact":!0,className:`size-8`}:{},...t?{text:t}:{},onClick:()=>p(!0)}),(0,V.jsxs)(Gj,{children:[(0,V.jsxs)(Kj,{children:[(0,V.jsx)(Jj,{children:r}),(0,V.jsx)(Yj,{children:i})]}),(0,V.jsxs)(qj,{children:[(0,V.jsxs)(Zj,{className:`max-md:min-h-11 max-md:whitespace-normal`,children:[`Keep it`,(0,V.jsx)(kk,{chord:`Esc`,className:`kbd-hint ml-1 max-md:hidden`})]}),(0,V.jsxs)(Xj,{variant:g?`destructive`:`default`,className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:o,children:[a,(0,V.jsx)(kk,{chord:`Y`,className:`kbd-hint ml-1 max-md:hidden`})]})]})]})]})}function $j(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var eM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nM={};function rM(e,t){return((t||nM).jsx?tM:eM).test(e)}var iM=/[ \t\n\f\r]/g;function aM(e){return typeof e==`object`?e.type===`text`&&oM(e.value):oM(e)}function oM(e){return e.replace(iM,``)===``}var sM=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};sM.prototype.normal={},sM.prototype.property={},sM.prototype.space=void 0;function cM(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new sM(n,r,t)}function lM(e){return e.toLowerCase()}var uM=class{constructor(e,t){this.attribute=t,this.property=e}};uM.prototype.attribute=``,uM.prototype.booleanish=!1,uM.prototype.boolean=!1,uM.prototype.commaOrSpaceSeparated=!1,uM.prototype.commaSeparated=!1,uM.prototype.defined=!1,uM.prototype.mustUseProperty=!1,uM.prototype.number=!1,uM.prototype.overloadedBoolean=!1,uM.prototype.property=``,uM.prototype.spaceSeparated=!1,uM.prototype.space=void 0;var dM=s({boolean:()=>Z,booleanish:()=>pM,commaOrSpaceSeparated:()=>_M,commaSeparated:()=>gM,number:()=>Q,overloadedBoolean:()=>mM,spaceSeparated:()=>hM}),fM=0,Z=vM(),pM=vM(),mM=vM(),Q=vM(),hM=vM(),gM=vM(),_M=vM();function vM(){return 2**++fM}var yM=Object.keys(dM),bM=class extends uM{constructor(e,t,n,r){let i=-1;if(super(e,t),xM(this,`space`,r),typeof n==`number`)for(;++i<yM.length;){let e=yM[i];xM(this,yM[i],(n&dM[e])===dM[e])}}};bM.prototype.defined=!0;function xM(e,t,n){n&&(e[t]=n)}function SM(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new bM(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[lM(r)]=r,n[lM(a.attribute)]=r}return new sM(t,n,e.space)}var CM=SM({properties:{ariaActiveDescendant:null,ariaAtomic:pM,ariaAutoComplete:null,ariaBusy:pM,ariaChecked:pM,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:hM,ariaCurrent:null,ariaDescribedBy:hM,ariaDetails:null,ariaDisabled:pM,ariaDropEffect:hM,ariaErrorMessage:null,ariaExpanded:pM,ariaFlowTo:hM,ariaGrabbed:pM,ariaHasPopup:null,ariaHidden:pM,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:hM,ariaLevel:Q,ariaLive:null,ariaModal:pM,ariaMultiLine:pM,ariaMultiSelectable:pM,ariaOrientation:null,ariaOwns:hM,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:pM,ariaReadOnly:pM,ariaRelevant:null,ariaRequired:pM,ariaRoleDescription:hM,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:pM,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function wM(e,t){return t in e?e[t]:t}function TM(e,t){return wM(e,t.toLowerCase())}var EM=SM({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:gM,acceptCharset:hM,accessKey:hM,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:hM,autoFocus:Z,autoPlay:Z,blocking:hM,capture:null,charSet:null,checked:Z,cite:null,className:hM,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:pM,controls:Z,controlsList:hM,coords:Q|gM,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:mM,draggable:pM,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:hM,height:Q,hidden:mM,high:Q,href:null,hrefLang:null,htmlFor:hM,httpEquiv:hM,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:hM,itemRef:hM,itemScope:Z,itemType:hM,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Z,optimum:Q,pattern:null,ping:hM,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:hM,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:hM,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:pM,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:pM,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:hM,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:pM,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:gM,part:hM,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:TM}),DM=SM({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:_M,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:hM,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gM,g2:gM,glyphName:gM,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:_M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:hM,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_M,rev:_M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_M,requiredFeatures:_M,requiredFonts:_M,requiredFormats:_M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:_M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_M,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:wM}),OM=SM({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),kM=SM({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:TM}),AM=SM({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),jM={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},MM=/[A-Z]/g,NM=/-[a-z]/g,PM=/^data[-\w.:]+$/i;function FM(e,t){let n=lM(t),r=t,i=uM;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&PM.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(NM,LM);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!NM.test(e)){let n=e.replace(MM,IM);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=bM}return new i(r,t)}function IM(e){return`-`+e.toLowerCase()}function LM(e){return e.charAt(1).toUpperCase()}var RM=cM([CM,EM,OM,kM,AM],`html`),zM=cM([CM,DM,OM,kM,AM],`svg`);function BM(e){return e.join(` `).trim()}var VM=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
59
- `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),HM=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(VM());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),UM=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),WM=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(HM()),r=UM();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),GM=qM(`end`),KM=qM(`start`);function qM(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function JM(e){let t=KM(e),n=GM(e);if(t&&n)return{start:t,end:n}}function YM(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ZM(e.position):`start`in e||`end`in e?ZM(e):`line`in e||`column`in e?XM(e):``}function XM(e){return QM(e&&e.line)+`:`+QM(e&&e.column)}function ZM(e){return XM(e&&e.start)+`-`+XM(e&&e.end)}function QM(e){return e&&typeof e==`number`?e:1}var $M=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=YM(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};$M.prototype.file=``,$M.prototype.name=``,$M.prototype.reason=``,$M.prototype.message=``,$M.prototype.stack=``,$M.prototype.column=void 0,$M.prototype.line=void 0,$M.prototype.ancestors=void 0,$M.prototype.cause=void 0,$M.prototype.fatal=void 0,$M.prototype.place=void 0,$M.prototype.ruleId=void 0,$M.prototype.source=void 0;var eN=l(WM(),1),tN={}.hasOwnProperty,nN=new Map,rN=/[A-Z]/g,iN=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),aN=new Set([`td`,`th`]),oN=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function sN(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=vN(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=_N(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?zM:RM,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cN(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function cN(e,t,n){if(t.type===`element`)return lN(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return uN(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return fN(e,t,n);if(t.type===`mdxjsEsm`)return dN(e,t);if(t.type===`root`)return pN(e,t,n);if(t.type===`text`)return mN(e,t)}function lN(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=zM,e.schema=i),e.ancestors.push(t);let a=wN(e,t.tagName,!1),o=yN(e,t),s=xN(e,t);return iN.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!aM(e)})),hN(e,o,a,t),gN(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uN(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}TN(e,t.position)}function dN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);TN(e,t.position)}function fN(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=zM,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:wN(e,t.name,!0),o=bN(e,t),s=xN(e,t);return hN(e,o,a,t),gN(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function pN(e,t,n){let r={};return gN(r,xN(e,t)),e.create(t,e.Fragment,r,n)}function mN(e,t){return t.value}function hN(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gN(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function _N(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function vN(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=KM(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function yN(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&tN.call(t.properties,i)){let a=SN(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&aN.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function bN(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else TN(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else TN(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function xN(e,t){let n=[],r=-1,i=e.passKeys?new Map:nN;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=cN(e,a,o);s!==void 0&&n.push(s)}return n}function SN(e,t,n){let r=FM(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$j(n):BM(n)),r.property===`style`){let t=typeof n==`object`?n:CN(e,String(n));return e.stylePropertyNameCase===`css`&&(t=EN(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?jM[r.property]||r.property:r.attribute,n]}}function CN(e,t){try{return(0,eN.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new $M("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=oN+`#cannot-parse-style-attribute`,r}}function wN(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=rM(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=rM(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return tN.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);TN(e)}function TN(e,t){let n=new $M("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=oN+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function EN(e){let t={},n;for(n in e)tN.call(e,n)&&(t[DN(n)]=e[n]);return t}function DN(e){let t=e.replace(rN,ON);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ON(e){return`-`+e.toLowerCase()}var kN={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},AN={};function jN(e,t){let n=t||AN;return MN(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function MN(e,t,n){if(PN(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return NN(e.children,t,n)}return Array.isArray(e)?NN(e,t,n):``}function NN(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=MN(e[i],t,n);return r.join(``)}function PN(e){return!!(e&&typeof e==`object`)}var FN=document.createElement(`i`);function IN(e){let t=`&`+e+`;`;FN.innerHTML=t;let n=FN.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function LN(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function RN(e,t){return e.length>0?(LN(e,e.length,0,t),e):t}var zN={}.hasOwnProperty;function BN(e){let t={},n=-1;for(;++n<e.length;)VN(t,e[n]);return t}function VN(e,t){let n;for(n in t){let r=(zN.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){zN.call(r,a)||(r[a]=[]);let e=i[a];HN(r[a],Array.isArray(e)?e:e?[e]:[])}}}function HN(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);LN(e,0,0,r)}function UN(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function WN(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var GN=nP(/[A-Za-z]/),KN=nP(/[\dA-Za-z]/),qN=nP(/[#-'*+\--9=?A-Z^-~]/);function JN(e){return e!==null&&(e<32||e===127)}var YN=nP(/\d/),XN=nP(/[\dA-Fa-f]/),ZN=nP(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function QN(e){return e!==null&&(e<0||e===32)}function $N(e){return e===-2||e===-1||e===32}var eP=nP(/\p{P}|\p{S}/u),tP=nP(/\s/);function nP(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function rP(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&KN(e.charCodeAt(n+1))&&KN(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function iP(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $N(r)?(e.enter(n),s(r)):t(r)}function s(r){return $N(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function aP(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&$N(t)?(e.enter(r),c(t)):l(t)}function c(t){return $N(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var oP={tokenize:sP};function sP(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),iP(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var cP=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){lP(this,e,t,n,!1)}addBefore(e,t,n){lP(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function lP(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var uP={tokenize:fP},dP={tokenize:pP};function fP(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new cP;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(dP,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(dP,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new cP;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pP(e,t,n){return iP(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function mP(e){if(e===null||QN(e)||tP(e))return 1;if(eP(e))return 2}function hP(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var gP={name:`attention`,resolveAll:_P,tokenize:vP};function _P(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};yP(o,-a),yP(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=RN(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=RN(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=RN(r,hP(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=RN(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=RN(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),LN(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function vP(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mP(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=mP(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function yP(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var bP={name:`autolink`,tokenize:xP};function xP(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return GN(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||KN(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||KN(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||JN(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qN(t)?(e.consume(t),l):n(t)}function u(e){return KN(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||KN(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var SP={partial:!0,tokenize:CP};function CP(e,t,n){return r;function r(t){return $N(t)?iP(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var wP={continuation:{tokenize:EP},exit:DP,name:`blockQuote`,tokenize:TP};function TP(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $N(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function EP(e,t,n){let r=this;return i;function i(t){return $N(t)?iP(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(wP,t,n)(r)}}function DP(e){e.exit(`blockQuote`)}var OP={name:`characterEscape`,tokenize:kP};function kP(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ZN(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var AP={name:`characterReference`,tokenize:jP};function jP(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=KN,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=XN,u):(e.enter(`characterReferenceValue`),a=7,o=YN,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===KN&&!IN(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var MP={partial:!0,tokenize:NP};function NP(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var PP={concrete:!0,name:`codeFenced`,tokenize:FP};function FP(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$N(t)?iP(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(MP,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$N(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),iP(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$N(t)?iP(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(MP,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$N(t)?iP(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$N(t)?iP(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var IP={name:`codeIndented`,tokenize:RP},LP={partial:!0,tokenize:zP};function RP(e,t,n){return r;function r(t){return e.enter(`codeIndented`),aP(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):$(t)?e.attempt(LP,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||$(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function zP(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):$(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):aP(e,t,a,`linePrefix`,4,4)(o)}function a(e){return $(e)?i(e):n(e)}}var BP={name:`codeText`,previous:HP,resolve:VP,tokenize:UP};function VP(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function HP(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function UP(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var WP=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&GP(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),GP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),GP(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);GP(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);GP(this.left,t.reverse())}}}};function GP(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function KP(e){let t={},n=-1,r,i,a,o,s,c,l,u=new WP(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,qP(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return LN(e,0,1/0,u.slice(0)),!l}function qP(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var JP={resolve:XP,tokenize:ZP},YP={partial:!0,tokenize:QP};function XP(e){return KP(e),e}function ZP(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(YP,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function QP(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),iP(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function $P(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||JN(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||QN(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||JN(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function eF(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$N(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function tF(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),iP(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function nF(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$N(i)?iP(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var rF={name:`definition`,tokenize:aF},iF={partial:!0,tokenize:oF};function aF(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return eF.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=WN(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return QN(t)?nF(e,l)(t):l(t)}function l(t){return $P(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(iF,d,d)(t)}function d(t){return $N(t)?iP(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function oF(e,t,n){return r;function r(t){return QN(t)?nF(e,i)(t):n(t)}function i(t){return tF(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $N(t)?iP(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var sF={name:`hardBreakEscape`,tokenize:cF};function cF(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var lF={name:`headingAtx`,resolve:uF,tokenize:dF};function uF(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};LN(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function dF(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||QN(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):$N(n)?iP(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||QN(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var fF=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),pF=[`pre`,`script`,`style`,`textarea`],mF={concrete:!0,name:`htmlFlow`,resolveTo:gF,tokenize:_F},hF={partial:!0,tokenize:vF};function gF(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _F(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):GN(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):GN(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return GN(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||QN(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&pF.includes(l)?(i=1,r.interrupt?t(s):O(s)):fF.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||KN(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $N(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||GN(t)?(e.consume(t),b):$N(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||KN(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$N(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$N(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||QN(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$N(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):$N(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ne):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(hF,re,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(MP,A,re)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return pF.includes(n)?(e.consume(t),ne):O(t)}return GN(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),ne):t===45&&i===2?(e.consume(t),P):O(t)}function ne(t){return t===null||$(t)?(e.exit(`htmlFlowData`),re(t)):(e.consume(t),ne)}function re(n){return e.exit(`htmlFlow`),t(n)}}function vF(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(SP,t,n)}}var yF={name:`htmlText`,tokenize:bF};function bF(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):GN(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):GN(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return GN(t)?(e.consume(t),S):n(t)}function S(t){return t===45||KN(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):$N(t)?(e.consume(t),C):M(t)}function w(t){return t===45||KN(t)?(e.consume(t),w):t===47||t===62||QN(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||GN(t)?(e.consume(t),E):$(t)?(o=T,N(t)):$N(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||KN(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):$N(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):$N(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||QN(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||QN(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return $N(t)?iP(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var xF={name:`labelEnd`,resolveAll:TF,resolveTo:EF,tokenize:DF},SF={tokenize:OF},CF={tokenize:kF},wF={tokenize:AF};function TF(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&LN(e,0,e.length,n),e}function EF(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=RN(o,e.slice(i+1,i+r+3)),o=RN(o,[[`enter`,l,t]]),o=RN(o,hP(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=RN(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=RN(o,e.slice(a+1)),o=RN(o,[[`exit`,s,t]]),LN(e,i,e.length,o),e}function DF(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(WN(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(SF,u,o?u:d)(t):t===91?e.attempt(CF,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(wF,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function OF(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return QN(t)?nF(e,a)(t):a(t)}function a(t){return t===41?u(t):$P(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return QN(t)?nF(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?tF(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return QN(t)?nF(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function kF(e,t,n){let r=this;return i;function i(t){return eF.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(WN(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function AF(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var jF={name:`labelStartImage`,resolveAll:xF.resolveAll,tokenize:MF};function MF(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var NF={name:`labelStartLink`,resolveAll:xF.resolveAll,tokenize:PF};function PF(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var FF={name:`lineEnding`,tokenize:IF};function IF(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),iP(e,t,`linePrefix`)}}var LF={name:`thematicBreak`,tokenize:RF};function RF(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$N(t)?iP(e,s,`whitespace`)(t):s(t))}}var zF={continuation:{tokenize:UF},exit:GF,name:`list`,tokenize:HF},BF={partial:!0,tokenize:KF},VF={partial:!0,tokenize:WF};function HF(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:YN(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(LF,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return YN(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(SP,r.interrupt?n:u,e.attempt(BF,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $N(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function UF(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(SP,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,iP(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$N(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(VF,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,iP(e,e.attempt(zF,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function WF(e,t,n){let r=this;return iP(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function GF(e){e.exit(this.containerState.type)}function KF(e,t,n){let r=this;return iP(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$N(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var qF={name:`setextUnderline`,resolveTo:JF,tokenize:YF};function JF(e,t){let n=new cP,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function YF(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$N(t)?iP(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var XF={tokenize:ZF};function ZF(e){let t=this,n=e.attempt(SP,r,e.attempt(this.parser.constructs.flowInitial,i,iP(e,e.attempt(this.parser.constructs.flow,i,e.attempt(JP,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var QF={resolveAll:nI()},$F=tI(`string`),eI=tI(`text`);function tI(e){return{resolveAll:nI(e===`text`?rI:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function nI(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function rI(e,t){let n=new cP,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var iI=s({attentionMarkers:()=>fI,contentInitial:()=>oI,disable:()=>pI,document:()=>aI,flow:()=>cI,flowInitial:()=>sI,insideSpan:()=>dI,string:()=>lI,text:()=>uI}),aI={42:zF,43:zF,45:zF,48:zF,49:zF,50:zF,51:zF,52:zF,53:zF,54:zF,55:zF,56:zF,57:zF,62:wP},oI={91:rF},sI={[-2]:IP,[-1]:IP,32:IP},cI={35:lF,42:LF,45:[qF,LF],60:mF,61:qF,95:LF,96:PP,126:PP},lI={38:AP,92:OP},uI={[-5]:FF,[-4]:FF,[-3]:FF,33:jF,38:AP,42:gP,60:[bP,yF],91:NF,92:[sF,OP],93:xF,95:gP,96:BP},dI={null:[gP,QF]},fI={null:[42,95]},pI={null:[]};function mI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=RN(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=hP(a,l.events,l),l.events):[]}function f(e,t){return gI(p(e),t)}function p(e){return hI(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&LN(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function hI(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function gI(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
60
- `;break;case-3:o=`\r
61
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function _I(e){let t={constructs:BN([iI,...(e||{}).extensions||[]]),content:n(oP),defined:[],document:n(uP),flow:n(XF),lazy:{},string:n($F),text:n(eI)};return t;function n(e){return n;function n(n){return mI(t,e,n)}}}function vI(e){for(;!KP(e););return e}var yI=/[\0\t\n\r]/g;function bI(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){yI.lastIndex=c;let n=yI.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var xI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function SI(e){return e.replace(xI,CI)}function CI(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return UN(n.slice(t?2:1),t?16:10)}return IN(n)||e}var wI={}.hasOwnProperty;function TI(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),EI(n)(vI(_I(n).document().write(bI()(e,t,!0))))}function EI(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ue),characterEscape:T,characterReference:T,codeFenced:a(de),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(de,o),codeText:a(fe,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(I),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(L),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:ie,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:F,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ae,resourceDestinationString:P,resourceTitleString:ne,resource:re,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};OI(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];wI.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||AI).call(a,void 0,e[0])}for(r.position={start:DI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:DI(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:DI(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||AI).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+YM({start:e.start,end:e.end})+`): it’s not open`);n.position.end=DI(e.end)}function u(){return jN(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=WN(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:DI(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=DI(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=DI(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=SI(t),n.identifier=WN(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=WN(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=UN(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=IN(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=DI(e.end)}function le(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function F(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ue(){return{type:`blockquote`,children:[]}}function de(){return{type:`code`,lang:null,meta:null,value:``}}function fe(){return{type:`inlineCode`,value:``}}function I(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function L(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function DI(e){return{line:e.line,column:e.column,offset:e.offset}}function OI(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?OI(e,r):kI(e,r)}}function kI(e,t){let n;for(n in t)if(wI.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function AI(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+YM({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+YM({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+YM({start:t.start,end:t.end})+`) is still open`)}function jI(e){let t=this;t.parser=n;function n(n){return TI(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function MI(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function NI(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
62
- `}]}function PI(e,t){let n=t.value?t.value+`
63
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function FI(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function II(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LI(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=rP(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function RI(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zI(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function BI(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function VI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return BI(e,t);let i={src:rP(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function HI(e,t){let n={src:rP(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function UI(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function WI(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return BI(e,t);let i={href:rP(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function GI(e,t){let n={href:rP(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KI(e,t,n){let r=e.all(t),i=n?qI(n):JI(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
64
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
65
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function qI(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=JI(n[r])}return t}function JI(e){return e.spread??e.children.length>1}function YI(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function XI(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZI(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function QI(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $I(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=KM(t.children[1]),o=GM(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function eL(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function tL(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var nL=9,rL=32;function iL(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(aL(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(aL(t.slice(i),i>0,!1)),a.join(``)}function aL(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===nL||t===rL;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===nL||t===rL;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function oL(e,t){let n={type:`text`,value:iL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sL(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var cL={blockquote:MI,break:NI,code:PI,delete:FI,emphasis:II,footnoteReference:LI,heading:RI,html:zI,imageReference:VI,image:HI,inlineCode:UI,linkReference:WI,link:GI,listItem:KI,list:YI,paragraph:XI,root:ZI,strong:QI,table:$I,tableCell:tL,tableRow:eL,text:oL,thematicBreak:sL,toml:lL,yaml:lL,definition:lL,footnoteDefinition:lL};function lL(){}var{defineProperty:uL}=Object,dL=typeof self==`object`?self:globalThis,fL=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new dL[e](t)},pL=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?uL(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof dL[e]==`function`?fL(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(fL(a,o),i)};return r},mL=e=>pL(new Map,e)(0),hL=``,{toString:gL}={},{keys:_L,is:vL}=Object,yL=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=gL.call(e).slice(8,-1);switch(n){case`Array`:return[1,hL];case`Object`:return[2,hL];case`Date`:return[3,hL];case`RegExp`:return[4,hL];case`Map`:return[5,hL];case`Set`:return[6,hL];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},bL=([e,t])=>e===0&&(t===`function`||t===`symbol`),xL=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=yL(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&vL(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of _L(o))(e||!bL(yL(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?hL:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(bL(yL(n))||bL(yL(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!bL(yL(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},SL=(e,{json:t,lossy:n}={})=>{let r=[];return xL(!(t||n),!!t,new Map,r)(e),r},CL=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?mL(SL(e,t)):structuredClone(e):(e,t)=>mL(SL(e,t));function wL(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function TL(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function EL(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||wL,r=e.options.footnoteBackLabel||TL,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=rP(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...CL(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
66
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
67
- `}]}}var DL=(function(e){if(e==null)return ML;if(typeof e==`function`)return jL(e);if(typeof e==`object`)return Array.isArray(e)?OL(e):kL(e);if(typeof e==`string`)return AL(e);throw Error(`Expected function, string, or object as test`)});function OL(e){let t=[],n=-1;for(;++n<e.length;)t[n]=DL(e[n]);return jL(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function kL(e){let t=e;return jL(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function AL(e){return jL(t);function t(t){return t&&t.type===e}}function jL(e){return t;function t(t,n,r){return!!(NL(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ML(){return!0}function NL(e){return typeof e==`object`&&!!e&&`type`in e}function PL(e){return e}var FL=[];function IL(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=DL(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+PL(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=FL,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=LL(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function LL(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?FL:[e]}function RL(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),IL(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var zL={}.hasOwnProperty,BL={};function VL(e,t){let n=t||BL,r=new Map,i=new Map,a={all:s,applyData:UL,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...cL,...n.handlers},one:o,options:n,patch:HL,wrap:GL};return RL(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(zL.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=CL(n);return r.children=a.all(e),r}return CL(e)}return(a.options.unknownHandler||WL)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=KL(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=KL(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function HL(e,t){e.position&&(t.position=JM(e))}function UL(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,CL(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function WL(e,t){let n=t.data||{},r=`value`in t&&!(zL.call(n,`hProperties`)||zL.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GL(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
68
- `});++r<e.length;)r&&n.push({type:`text`,value:`
69
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
70
- `}),n}function KL(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qL(e,t){let n=VL(e,t),r=n.one(e,void 0),i=EL(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
71
- `},i)),a}function JL(e,t){return e&&`run`in e?async function(n,r){let i=qL(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qL(n,{file:r,...e||t})}}function YL(e){if(e)throw e}var XL=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ZL(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function QL(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?$L(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function $L(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var eR={basename:tR,dirname:nR,extname:rR,join:iR,sep:`/`};function tR(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);sR(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function nR(e){if(sR(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function rR(e){sR(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function iR(...e){let t=-1,n;for(;++t<e.length;)sR(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:aR(n)}function aR(e){sR(e);let t=e.codePointAt(0)===47,n=oR(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function oR(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function sR(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var cR={cwd:lR};function lR(){return`/`}function uR(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function dR(e){if(typeof e==`string`)e=new URL(e);else if(!uR(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return fR(e)}function fR(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var pR=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],mR=class{constructor(e){let t;t=e?uR(e)?{path:e}:typeof e==`string`||vR(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:cR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<pR.length;){let e=pR[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)pR.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?eR.basename(this.path):void 0}set basename(e){gR(e,`basename`),hR(e,`basename`),this.path=eR.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?eR.dirname(this.path):void 0}set dirname(e){_R(this.basename,`dirname`),this.path=eR.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?eR.extname(this.path):void 0}set extname(e){if(hR(e,`extname`),_R(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=eR.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){uR(e)&&(e=dR(e)),gR(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?eR.basename(this.path,this.extname):void 0}set stem(e){gR(e,`stem`),hR(e,`stem`),this.path=eR.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new $M(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function hR(e,t){if(e&&e.includes(eR.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+eR.sep+"`")}function gR(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function _R(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function vR(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var yR=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),bR=l(XL(),1),xR={}.hasOwnProperty,SR=new class e extends yR{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=QL()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,bR.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(TR(`data`,this.frozen),this.namespace[e]=t,this):xR.call(this.namespace,e)&&this.namespace[e]||void 0:e?(TR(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=OR(e),n=this.parser||this.Parser;return CR(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),CR(`process`,this.parser||this.Parser),wR(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=OR(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);AR(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),CR(`processSync`,this.parser||this.Parser),wR(`processSync`,this.compiler||this.Compiler),this.process(e,r),DR(`processSync`,`process`,t),n;function r(e,r){t=!0,YL(e),n=r}}run(e,t,n){ER(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=OR(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),DR(`runSync`,`run`,n),r;function i(e,t){YL(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=OR(t),r=this.compiler||this.Compiler;return wR(`stringify`,r),ER(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(TR(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,bR.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ZL(o)&&ZL(r)&&(r=(0,bR.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function CR(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function wR(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function TR(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ER(e){if(!ZL(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function DR(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function OR(e){return kR(e)?e:new mR(e)}function kR(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function AR(e){return typeof e==`string`||jR(e)}function jR(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var MR=[],NR={allowDangerousHtml:!0},PR=/^(https?|ircs?|mailto|xmpp)$/i,FR=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function IR(e){let t=LR(e),n=RR(e);return zR(t.runSync(t.parse(n),n),e)}function LR(e){let t=e.rehypePlugins||MR,n=e.remarkPlugins||MR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...NR}:NR;return SR().use(jI).use(n).use(JL,r).use(t)}function RR(e){let t=e.children||``,n=new mR;return typeof t==`string`?n.value=t:``+t,n}function zR(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||BR;for(let e of FR)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return RL(e,l),sN(e,{Fragment:V.Fragment,components:i,ignoreInvalidStyle:!0,jsx:V.jsx,jsxs:V.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in kN)if(Object.hasOwn(kN,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=kN[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function BR(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||PR.test(e.slice(0,t))?e:``}function VR(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function HR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function UR(e,t,n){let r=DL((n||{}).ignore||[]),i=WR(t),a=-1;for(;++a<i.length;)IL(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function WR(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([GR(e[0]),KR(e[1])])}return t}function GR(e){return typeof e==`string`?new RegExp(HR(e),`g`):e}function KR(e){return typeof e==`function`?e:function(){return e}}var qR=`phrasing`,JR=[`autolink`,`link`,`image`,`label`];function YR(){return{transforms:[rz],enter:{literalAutolink:ZR,literalAutolinkEmail:QR,literalAutolinkHttp:QR,literalAutolinkWww:QR},exit:{literalAutolink:nz,literalAutolinkEmail:tz,literalAutolinkHttp:$R,literalAutolinkWww:ez}}}function XR(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:qR,notInConstruct:JR},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:qR,notInConstruct:JR},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:qR,notInConstruct:JR}]}}function ZR(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function QR(e){this.config.enter.autolinkProtocol.call(this,e)}function $R(e){this.config.exit.autolinkProtocol.call(this,e)}function ez(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function tz(e){this.config.exit.autolinkEmail.call(this,e)}function nz(e){this.exit(e)}function rz(e){UR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,iz],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,az]],{ignore:[`link`,`linkReference`]})}function iz(e,t,n,r,i){let a=``;if(!cz(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!oz(n)))return!1;let o=sz(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function az(e,t,n,r){return!cz(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function oz(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function sz(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=VR(e,`(`),a=VR(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function cz(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||tP(n)||eP(n))&&(!t||n!==47)}vz.peek=_z;function lz(){this.buffer()}function uz(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function dz(){this.buffer()}function fz(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function pz(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WN(this.sliceSerialize(e)).toLowerCase(),n.label=t}function mz(e){this.exit(e)}function hz(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WN(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gz(e){this.exit(e)}function _z(){return`[`}function vz(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function yz(){return{enter:{gfmFootnoteCallString:lz,gfmFootnoteCall:uz,gfmFootnoteDefinitionLabelString:dz,gfmFootnoteDefinition:fz},exit:{gfmFootnoteCallString:pz,gfmFootnoteCall:mz,gfmFootnoteDefinitionLabelString:hz,gfmFootnoteDefinition:gz}}}function bz(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:vz},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
72
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Sz:xz))),s(),o}}function xz(e,t,n){return t===0?e:Sz(e,t,n)}function Sz(e,t,n){return(n?``:` `)+e}var Cz=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Oz.attention=kz,Oz.peek=Az;function wz(){return{canContainEols:[`delete`],enter:{strikethrough:Ez},exit:{strikethrough:Dz}}}function Tz(){return{handlers:{delete:Oz},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Cz}]}}function Ez(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Dz(e){this.exit(e)}function Oz(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function kz(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Az(){return`~`}function jz(e){return e.length}function Mz(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||jz,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Nz(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Pz(r[d]);else{let e=Pz(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
73
- `)}function Nz(e){return e==null?``:String(e)}function Pz(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Fz=DL([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Iz(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Lz);return i(),o}function Lz(e,t,n){return`>`+(n?``:` `)+e}function Rz(e,t){return zz(e,t.inConstruct,!0)&&!zz(e,t.notInConstruct,!1)}function zz(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Bz(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
74
- `&&!e.before&&!e.after&&Rz(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
75
- `}function Vz(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Hz(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Uz(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Wz(e,t,n,r){let i=Uz(n),a=e.value||``;if(Hz(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Gz);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Vz(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
76
- `,encode:["`"],...o.current()})),t()}return u+=o.move(`
77
- `),a&&(u+=o.move(a+`
78
- `)),u+=o.move(s),c(),u}function Gz(e,t,n){return(n?``:` `)+e}function Kz(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qz(e,t,n,r){let i=Kz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
79
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Jz(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Yz.attention=Xz,Yz.peek=Zz;function Yz(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Xz(e,t){return{construct:`emphasis`,markers:Jz(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function Zz(e,t,n){return n.options.emphasis||`*`}function Qz(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function $z(e,t){let n=!1;return RL(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&jN(e)&&(t.options.setext||n))}function eB(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if($z(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
80
- `,after:`
81
- `});return r(),t(),o+`
82
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
83
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
84
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=Qz(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}tB.peek=nB;function tB(e){return e.value||``}function nB(){return`<`}rB.peek=iB;function rB(e,t,n,r){let i=Kz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function iB(){return`!`}aB.peek=oB;function aB(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function oB(){return`!`}sB.peek=cB;function sB(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function cB(){return"`"}function lB(e,t){let n=jN(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}uB.peek=dB;function uB(e,t,n,r){let i=Kz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(lB(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function dB(e,t,n){return lB(e,n)?`<`:`[`}fB.peek=pB;function fB(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pB(){return`[`}function mB(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function hB(e){let t=mB(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gB(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _B(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vB(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?gB(n):mB(n),s=e.ordered?o===`.`?`)`:`.`:hB(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),_B(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function yB(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function bB(e,t,n,r){let i=yB(n),a=n.bulletCurrent||mB(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function xB(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function SB(e,t,n,r){if(!e.children.some(function(e){return Fz(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function CB(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}wB.attention=TB,wB.peek=EB;function wB(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function TB(e,t){return{construct:`strong`,markers:CB(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function EB(e,t,n){return n.options.strong||`*`}function DB(e,t,n,r){return n.safe(e.value,r)}function OB(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kB(e,t,n){let r=(_B(n)+(n.options.ruleSpaces?` `:``)).repeat(OB(n));return n.options.ruleSpaces?r.slice(0,-1):r}var AB={blockquote:Iz,break:Bz,code:Wz,definition:qz,emphasis:Yz,hardBreak:Bz,heading:eB,html:tB,image:rB,imageReference:aB,inlineCode:sB,link:uB,linkReference:fB,list:vB,listItem:bB,paragraph:xB,root:SB,strong:wB,text:DB,thematicBreak:kB};function jB(){return{enter:{table:MB,tableData:IB,tableHeader:IB,tableRow:PB},exit:{codeText:LB,table:NB,tableData:FB,tableHeader:FB,tableRow:FB}}}function MB(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function NB(e){this.exit(e),this.data.inTable=void 0}function PB(e){this.enter({type:`tableRow`,children:[]},e)}function FB(e){this.exit(e)}function IB(e){this.enter({type:`tableCell`,children:[]},e)}function LB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,RB));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function RB(e,t){return t===`|`?t:e}function zB(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
85
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
86
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Mz(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=AB.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function BB(){return{exit:{taskListCheckValueChecked:HB,taskListCheckValueUnchecked:HB,paragraph:UB}}}function VB(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:WB}}}function HB(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function UB(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function WB(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=AB.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function GB(){return[YR(),yz(),wz(),jB(),BB()]}function KB(e){return{extensions:[XR(),bz(e),Tz(),zB(e),VB()]}}var qB={tokenize:sV,partial:!0},JB={tokenize:cV,partial:!0},YB={tokenize:lV,partial:!0},XB={tokenize:uV,partial:!0},ZB={tokenize:dV,partial:!0},QB={name:`wwwAutolink`,tokenize:aV,previous:fV},$B={name:`protocolAutolink`,tokenize:oV,previous:pV},eV={name:`emailAutolink`,tokenize:iV,previous:mV},tV={};function nV(){return{text:tV}}for(var rV=48;rV<123;)tV[rV]=eV,rV++,rV===58?rV=65:rV===91&&(rV=97);tV[43]=eV,tV[45]=eV,tV[46]=eV,tV[95]=eV,tV[72]=[eV,$B],tV[104]=[eV,$B],tV[87]=[eV,QB],tV[119]=[eV,QB];function iV(e,t,n){let r=this,i,a;return o;function o(t){return!hV(t)||!mV.call(r,r.previous)||gV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return hV(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ZB,u,l)(t):t===45||t===95||KN(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&GN(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function aV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!fV.call(r,r.previous)||gV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(qB,e.attempt(JB,e.attempt(YB,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function oV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&pV.call(r,r.previous)&&!gV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(GN(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||JN(t)||QN(t)||tP(t)||eP(t)?n(t):e.attempt(JB,e.attempt(YB,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function sV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function cV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(XB,c,s)(t):t===null||QN(t)||tP(t)||t!==45&&eP(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function lV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(XB,t,a)(o):o===null||QN(o)||tP(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function uV(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||QN(o)||tP(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||QN(e)||tP(e)?t(e):r(e)}function a(e){return GN(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):GN(t)?(e.consume(t),o):n(t)}}function dV(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return KN(e)?n(e):t(e)}}function fV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||QN(e)}function pV(e){return!GN(e)}function mV(e){return!(e===47||hV(e))}function hV(e){return e===43||e===45||e===46||e===95||KN(e)}function gV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var _V={tokenize:TV,partial:!0};function vV(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:SV,continuation:{tokenize:CV},exit:wV}},text:{91:{name:`gfmFootnoteCall`,tokenize:xV},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:yV,resolveTo:bV}}}}function yV(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=WN(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function bV(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function xV(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||QN(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(WN(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return QN(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function SV(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||QN(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=WN(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return QN(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),iP(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function CV(e,t,n){return e.check(SP,t,e.attempt(_V,t,n))}function wV(e){e.exit(`gfmFootnoteDefinition`)}function TV(e,t,n){let r=this;return iP(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function EV(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&LN(o,o.length,0,hP(s,e.slice(r+1,n),t)),LN(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),LN(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=mP(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=mP(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var DV=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){OV(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function OV(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function kV(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function AV(){return{flow:{null:{name:`table`,tokenize:jV,resolveAll:MV}}}}function jV(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$N(t)?iP(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||QN(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$N(t)?iP(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $N(t)?iP(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $N(t)?iP(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):$N(n)?iP(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||QN(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function MV(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new DV;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(PV(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=NV(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=NV(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=NV(f,t,o,i,n,d)):(o[0]=o[1],d=NV(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&PV(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=kV(t.events,n))}return e}function NV(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},FV(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=FV(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=FV(t.events,n[2]),a=FV(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},FV(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function PV(e,t,n,r,i){let a=[],o=FV(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function FV(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var IV={name:`tasklistCheck`,tokenize:RV};function LV(){return{text:{91:IV}}}function RV(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return QN(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):$N(r)?e.check({tokenize:zV},t,n)(r):n(r)}}function zV(e,t,n){return iP(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function BV(e){return BN([nV(),vV(),EV(e),AV(),LV()])}var VV={};function HV(e){let t=this,n=e||VV,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(BV(n)),a.push(GB()),o.push(KB(n))}var UV=new Set([`http:`,`https:`,`mailto:`,`tel:`]);function WV(e){let t=(e??``).trim();if(t===``)return``;if(/^[#/.]/.test(t))return t;try{let e=new URL(t,`https://example.invalid`);return UV.has(e.protocol)?t:``}catch{return``}}var GV=4e3,KV=/^\s*(?:```|~~~)/,qV=/^#{1,6}\s/,JV=/^\s{0,3}\[[^\]]+\]:\s*\S|\[\^[^\]]+\]/m;function YV(e){if(e.length<=GV||JV.test(e))return[e];let t=[],n=[],r=!1;for(let i of e.split(`
87
- `))KV.test(i)?r=!r:!r&&qV.test(i)&&n.some(e=>e.trim())&&(t.push(n.join(`
88
- `)),n=[]),n.push(i);return t.push(n.join(`
89
- `)),t}function XV(e,t,n=!1){let r=t?.start?.offset,i=t?.end?.offset;if(r===void 0||i===void 0)return;let a=e.slice(r,i);if(!n){let e=a.match(/^`+/)?.[0];return e&&a.endsWith(e)?a.slice(e.length,-e.length):a}let o=a.match(/^ {0,3}(`{3,}|~{3,})[^\r\n]*(?:\r\n|\n|\r)/);if(!o)return a;let s=a.slice(o[0].length),c=RegExp(`^ {0,3}${o[1][0]}{${o[1].length},}[ \\t]*$`,`m`).exec(s);return c?s.slice(0,c.index):s}function ZV(e,t){return!e&&!t}async function QV(e,t){if(!t)throw Error(`Clipboard is unavailable. Select the code and copy it manually.`);await t.writeText(e)}var $V=/^-\s+(.+?)\s+\(([^()\s]+\/[^()\s]+)\)\s*$/;function eH(e){let t=e.lastIndexOf(`${DA}\n`);if(t<0||t>0&&e[t-1]!==`
90
- `)return{body:e,files:[]};let n=e.slice(t+DA.length+1).split(`
91
- `).filter(Boolean),r=[];for(let t of n){let n=$V.exec(t);if(!n)return{body:e,files:[]};let i=n[1].split(/[\\/]/).pop()??``;if(!/^[\w.-]+$/.test(i))return{body:e,files:[]};r.push({id:i,name:i.replace(/^[a-z0-9]+-/,``),mime:n[2]})}return r.length>0?{body:e.slice(0,t).trimEnd(),files:r}:{body:e,files:[]}}var tH=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);function nH({files:e}){return e.length===0?null:(0,V.jsx)(`ul`,{className:`mt-2 flex min-w-0 max-w-full flex-wrap gap-2`,"aria-label":`Attached files`,children:e.map(e=>(0,V.jsx)(`li`,{children:tH.has(e.mime)?(0,V.jsx)(`a`,{href:I(`/files/preview/attachments/${e.id}`),target:`_blank`,rel:`noopener noreferrer`,className:`block max-w-full overflow-hidden rounded-lg border border-border bg-muted/40 transition-transform duration-150 ease-snap hover:scale-[1.02] focus-visible:outline-2 focus-visible:outline-ring max-md:min-h-11 max-md:min-w-11`,children:(0,V.jsx)(`img`,{src:I(`/files/preview/attachments/${e.id}`),alt:e.name,loading:`lazy`,className:`max-h-40 max-w-[min(14rem,100%)] object-cover`})}):(0,V.jsxs)(`span`,{className:`inline-flex max-w-[min(16rem,100%)] min-w-0 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground`,children:[e.mime===`application/pdf`?(0,V.jsx)(Om,{"aria-hidden":`true`,className:`size-4 shrink-0`}):(0,V.jsx)(bh,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,V.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))})}var rH=!1,iH=[],aH=0,oH=900;function sH(){rH=!0,window.clearTimeout(aH),aH=window.setTimeout(cH,oH)}function cH(){rH=!1,window.clearTimeout(aH);let e=iH;iH=[];for(let t of e)t()}function lH(e){if(!rH)return e(),()=>{};let t=()=>e();return iH.push(t),()=>{iH=iH.filter(e=>e!==t)}}var uH=8;function dH(e,t=24){let[n,r]=(0,m.useState)(t),i=(0,m.useRef)(8),a=n<e;return(0,m.useEffect)(()=>{if(!a)return;let e=0,t=lH(()=>{e=requestAnimationFrame(()=>{let e=performance.now();(0,wv.flushSync)(()=>r(e=>e+i.current));let t=Math.max(1,performance.now()-e);i.current=Math.max(2,Math.min(400,Math.round(i.current*uH/t)))})});return()=>{t(),cancelAnimationFrame(e)}},[a,n]),Math.min(n,e)}function fH(e){return e?.type===`text`?e.value??``:(e?.children??[]).map(fH).join(``)}function pH(e,t=!1){let n=t||e.tagName===`a`;e.tagName===`code`&&(e.properties={...e.properties,copyBlocked:n,blockCode:t===!1&&e.properties?.blockCode});for(let t of e.children??[])e.tagName===`pre`&&(t.properties={...t.properties,blockCode:!0}),pH(t,n)}function mH(){return e=>pH(e)}function hH(e){let[t,n]=(0,m.useState)(!1);async function r(){try{await QV(e,navigator.clipboard),n(!0),np.success(`Code copied.`)}catch{np.error(`Could not copy code. Select it and copy manually, or allow clipboard access.`)}}return{copied:t,copy:r}}function gH({text:e,children:t,block:n=!1}){let{copy:r}=hH(e),i=(0,m.useRef)(void 0);return(0,V.jsxs)(`code`,{role:`button`,tabIndex:0,"aria-label":`Copy code`,"aria-keyshortcuts":`Enter Space`,title:`Copy code · Enter / Space`,className:J(`cursor-copy focus-visible:outline-2 focus-visible:outline-ring`,!n&&`max-md:break-words max-md:[overflow-wrap:anywhere]`),onPointerDown:e=>{i.current={x:e.clientX,y:e.clientY,moved:!1}},onPointerMove:e=>{let t=i.current;t&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(t.moved=!0)},onClick:e=>{e.stopPropagation(),ZV(window.getSelection()?.toString()??``,i.current?.moved??!1)&&r(),i.current=void 0},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),ZV(window.getSelection()?.toString()??``,!1)&&r())},children:[t,n?null:(0,V.jsx)(`span`,{className:`sr-only`,children:` (activate to copy)`})]})}function _H({node:e,children:t,source:n}){let r=e,{copied:i,copy:a}=hH(XV(n,r?.position,!0)??fH(r)),o=r?.children?.find(e=>e.tagName===`code`)?.properties?.className,s=(Array.isArray(o)?o:[]).map(String).find(e=>e.startsWith(`language-`))?.slice(9);return(0,V.jsxs)(`div`,{className:`relative my-3 max-md:min-w-0 max-md:max-w-full rounded-lg bg-muted`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between pl-3`,children:[(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[s&&/^[\w+#.-]{1,20}$/.test(s)?s:`code`,` · tap to copy`]}),(0,V.jsx)(vj,{label:i?`Copied`:`Copy the code`,icon:i?Rp:gm,iconOnly:!0,onClick:()=>void a()})]}),(0,V.jsx)(`pre`,{className:`!my-0 max-md:max-w-full overflow-x-auto max-md:overscroll-x-contain !rounded-t-none !bg-transparent px-3 pb-3 text-sm leading-relaxed [&>code]:block`,children:t})]})}function vH(e){return{pre:t=>(0,V.jsx)(_H,{...t,source:e}),code:({node:t,children:n})=>{let r=t;if(r?.properties?.copyBlocked)return(0,V.jsx)(`code`,{children:n});let i=!!r?.properties?.blockCode;return(0,V.jsx)(gH,{text:XV(e,r?.position,i)??fH(r),block:i,children:n})},a:({href:e,children:t})=>(0,V.jsx)(`a`,{href:e?I(e):void 0,target:`_blank`,rel:`noopener noreferrer nofollow`,children:t}),img:({src:e,alt:t})=>(0,V.jsx)(`img`,{src:e?I(e):void 0,alt:t??``,loading:`lazy`}),table:({children:e})=>(0,V.jsx)(`div`,{className:`my-3 w-full max-md:min-w-0 max-md:max-w-full overflow-x-auto max-md:overscroll-x-contain`,children:(0,V.jsx)(`table`,{className:`w-full max-md:min-w-max border-collapse text-sm`,children:e})})}}var yH=(0,m.memo)(function({text:e}){return(0,V.jsx)(IR,{remarkPlugins:[HV],rehypePlugins:[mH],urlTransform:WV,components:vH(e),children:e})}),bH=(0,m.memo)(function({text:e,className:t}){let{body:n,files:r}=eH(e),i=n?YV(n):[],a=dH(i.length,3);return(0,V.jsxs)(`div`,{className:J(`md-body max-md:min-w-0 max-md:max-w-full max-md:break-words max-md:[overflow-wrap:anywhere]`,t),children:[i.slice(0,a).map((e,t)=>(0,V.jsx)(yH,{text:e},t)),(0,V.jsx)(nH,{files:r})]})});function xH({title:e,note:t,className:n,children:r,collapsed:i,onToggle:a,shortcut:o,...s}){let c=typeof e==`string`?e:`pane`;return(0,V.jsxs)(`section`,{className:J(`workspace-frame group/frame relative flex min-h-0 min-w-0 flex-col rounded-xl border shadow-xs`,i&&`flex-none`,n),...s,children:[e||t||a?(0,V.jsxs)(`div`,{className:J(`flex min-h-12 shrink-0 items-center justify-between gap-3 px-4`,!i&&`border-b border-border`),children:[e?(0,V.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-medium`,children:e}):(0,V.jsx)(`span`,{}),(0,V.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2`,children:[t?(0,V.jsx)(`span`,{className:`flex items-center gap-2 truncate text-xs text-muted-foreground`,children:t}):null,a?(0,V.jsxs)(`button`,{type:`button`,"aria-expanded":!i,"aria-label":i?`Expand ${c}`:`Minimize ${c}`,title:`${i?`Expand`:`Minimize`}${o?` · ${o}`:``}`,"aria-keyshortcuts":o?`${o} Enter Space`:`Enter Space`,"aria-describedby":`focused-action-help`,onClick:a,className:`btn-ghost -mr-1.5 inline-flex h-8 items-center gap-1.5 rounded-lg border border-transparent px-2 text-muted-foreground transition-[box-shadow,color,scale] duration-150 ease-snap outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100 max-md:h-11 max-md:min-w-11 max-md:justify-center`,children:[o?(0,V.jsx)(kk,{chord:o,className:`kbd-hint max-md:hidden`}):null,(0,V.jsx)(Bp,{"aria-hidden":`true`,className:J(`size-4 transition-transform duration-200 ease-snap`,i&&`-rotate-90`)})]}):null]})]}):null,i?null:r]})}function SH({title:e,right:t,className:n}){return(0,V.jsxs)(`span`,{className:J(`flex min-w-0 items-center gap-3`,n),children:[(0,V.jsx)(`span`,{className:`truncate font-medium`,children:e}),(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),t?(0,V.jsx)(`span`,{className:`shrink-0 text-xs font-normal text-muted-foreground`,children:t}):null]})}function CH({title:e,right:t,prominent:n,children:r}){return(0,V.jsxs)(`section`,{className:J(`flex min-w-0 flex-col`,n?`gap-4`:`workspace-section gap-3 rounded-xl border p-4 shadow-xs max-md:rounded-lg max-md:p-3`),children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:(0,V.jsx)(SH,{title:e,right:t,className:n?`[&>span:first-child]:font-semibold`:void 0})}),r]})}var wH=`Pull requests`,TH=`An agent reviews it, optionally with a focus you type; Jev's quick read sizes it up first.`,EH=`nothing is posted to GitHub`,DH=`Refresh to load open pull requests with the GitHub CLI (gh).`,OH=`No open pull requests.`,kH=`loading pull requests from GitHub…`,AH=`reading the diff…`,jH=`the pull request has new commits since this review — review it again`,MH=`(no description)`,NH=`Review with a focus (optional)`,PH=`Leave it empty for a full review.`;function FH(e){return e===`passing`?`✓`:e===`failing`?`✗`:e===`pending`?`…`:``}function IH(e){return e===`passing`?`text-success`:e===`failing`?`text-destructive`:`text-muted-foreground`}function LH(e,t){return`+${e} −${t}`}function RH(e){return e===`APPROVED`?`approved`:e===`CHANGES_REQUESTED`?`changes requested`:e===`REVIEW_REQUIRED`?`review required`:``}function zH(e){return e?e.status===`running`?`reviewing`:e.status!==`done`||!e.verdict?``:e.verdict===`approve`?`approved`:e.verdict===`changes`?`changes found`:`commented`:``}function BH(e){return e===`approve`?`approve`:e===`changes`?`request changes`:e===`comment`?`comment`:``}function VH(e,t){if(e.status===`running`)return HH(e,t);if(e.status===`cancelled`)return`stopped`;let n=e.status===`done`?HH(e,t):e.status;return[BH(e.verdict),n].filter(Boolean).join(` · `)}function HH(e,t){let n=Math.max(0,Math.round(((e.finishedAt??t)-e.startedAt)/1e3));return n<60?`${n}s`:`${Math.floor(n/60)}m ${String(n%60).padStart(2,`0`)}s`}function UH(e,t){return[e.state?e.draft?`draft`:e.state.toLowerCase():e.draft?`draft`:``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${Vj(t-Date.parse(e.updatedAt))}`:``].filter(Boolean).join(` · `)}function WH(e){let t=`${e.changedFiles} file${e.changedFiles===1?``:`s`}`;return`${e.headRef||`?`} → ${e.baseRef||`?`} · ${LH(e.additions,e.deletions)} · ${t}`}function GH(e){let t=e.mergeable===`CONFLICTING`?`conflicts`:e.mergeable===`MERGEABLE`?`mergeable`:``;return[e.checks?`checks ${e.checks} (${e.checkCount})`:``,RH(e.decision),t,e.labels.join(`, `)].filter(Boolean).join(` · `)}function KH(e){return[`${e.changedFiles} file${e.changedFiles===1?``:`s`}`,e.labels.join(`, `),e.review?.stale?`stale`:``].filter(Boolean).join(` · `)}function qH(e){return e.read?`${e.read.model} · ${e.read.ms} ms`:``}function JH(e){let[t,n]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),e?t:Date.now()}function YH({pull:e,now:t}){return(0,V.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:[(0,V.jsxs)(`span`,{className:`font-normal text-muted-foreground tabular-nums`,children:[`#`,e.number]}),` `,e.title]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:UH(e,t)}),(0,V.jsx)(`p`,{className:`text-sm tabular-nums`,children:WH(e)}),GH(e)?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:GH(e)}):null,e.url?(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`inline-flex max-w-full break-all text-xs text-primary underline underline-offset-4 max-md:min-h-11 max-md:items-center`,children:e.url}):null]})}function XH({read:e}){return(0,V.jsxs)(CH,{title:`Jev's read`,right:qH(e),children:[e.status===`running`?(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(BA,{className:`size-3.5`}),AH]}):null,e.status===`failed`?(0,V.jsx)(`p`,{className:`text-sm text-foreground`,children:e.error??`Jev could not read it`}):null,e.status===`done`&&e.line?(0,V.jsx)(bH,{text:e.line}):null]})}function ZH({review:e,now:t}){return(0,V.jsxs)(V.Fragment,{children:[e.model?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[e.model,e.thinking].filter(Boolean).join(` · `)}):null,e.focus?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`focus: `,e.focus]}):null,e.saved?(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`kept from `,Vj(t-e.startedAt)]}):null,e.stale?(0,V.jsx)(`p`,{className:`text-sm text-foreground`,children:jH}):null,e.status===`running`?(0,V.jsx)(QH,{steps:e.steps}):null,e.status===`cancelled`?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`stopped`}):null,e.status===`failed`||e.status===`timeout`?(0,V.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`✗ `,e.error??e.status]}):null,e.text?(0,V.jsx)(bH,{text:e.text}):null]})}function QH({steps:e}){return(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.slice(-6).map((e,t)=>(0,V.jsxs)(`li`,{className:`break-words`,children:[`· `,e]},t))})}function $H({number:e,focus:t,onChange:n}){return(0,V.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,V.jsx)(`label`,{htmlFor:`focus-${e}`,className:`text-[0.8125rem] font-medium text-foreground`,children:NH}),(0,V.jsx)(Lj,{id:`focus-${e}`,value:t,rows:2,maxLength:2e3,className:`max-md:min-h-11`,onChange:e=>n(e.target.value)}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:PH})]})}function eU({number:e,review:t,now:n,focus:r,onFocus:i}){return(0,V.jsxs)(CH,{title:`Review`,right:t?VH(t,n):void 0,children:[t?(0,V.jsx)(ZH,{review:t,now:n}):null,(0,V.jsx)($H,{number:e,focus:r,onChange:i}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`A read-only agent reviews it — `,EH,`.`]})]})}function tU({files:e}){return(0,V.jsx)(CH,{title:`Files`,right:String(e.length),children:(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-border`,children:(0,V.jsx)(`table`,{className:`w-full border-collapse text-sm tabular-nums`,children:(0,V.jsx)(`tbody`,{children:e.map(e=>(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`max-w-0 px-3 py-1.5 break-all`,children:e.path}),(0,V.jsx)(`td`,{className:`px-3 py-1.5 text-right text-xs whitespace-nowrap text-muted-foreground`,children:LH(e.additions,e.deletions)})]},e.path))})})})})}function nU({note:e,now:t}){let n=[e.state&&e.state!==`COMMENTED`?e.state.toLowerCase().replace(/_/g,` `):``,e.at?Vj(t-Date.parse(e.at)):``].filter(Boolean).join(` · `);return(0,V.jsxs)(`article`,{className:`card-flat flex flex-col gap-1.5 rounded-lg border px-3.5 py-2.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),n?(0,V.jsx)(`span`,{children:n}):null]}),e.body.trim()?(0,V.jsx)(bH,{text:e.body.trim()}):null]})}function rU({notes:e,now:t}){return e.length===0?null:(0,V.jsx)(CH,{title:`Discussion`,right:String(e.length),children:(0,V.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,V.jsx)(nU,{note:e,now:t},n))})})}function iU({number:e,error:t}){return t?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t]}):(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(BA,{className:`size-3.5`}),`loading #`,e,`…`]})}function aU({number:e,onChanged:t}){let n=JA(`git.pull`,{number:e},[`git`]),[r,i]=(0,m.useState)(``),a=n.data?.review?.status===`running`,o=JH(a);if(!n.data)return(0,V.jsx)(iU,{number:e,error:n.error});let{pull:s,review:c,read:l}=n.data,u=()=>{n.reload(),t?.()},d=async()=>{let t=r.trim();i(``),await U(`git.review`,{number:e,...t?{focus:t}:{}}),u()},f=async()=>{await U(`git.jev`,{number:e}),u()},p=async()=>{await U(`git.cancelReview`,{number:e}),u()};return(0,V.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Pull request #${e}`,children:[(0,V.jsxs)(yj,{children:[(0,V.jsx)(vj,{label:`Review`,icon:Oh,tone:`primary`,shortcut:`V`,disabled:a,onClick:()=>void d()}),(0,V.jsx)(vj,{label:`Jev's read`,icon:Mp,shortcut:`Q`,disabled:a,onClick:()=>void f()}),a?(0,V.jsx)(Qj,{icon:im,label:`Stop the review`,text:`Stop`,shortcut:`X`,title:`Stop this review?`,description:`The agent stops reading the pull request. Nothing is posted to GitHub.`,confirmLabel:`Stop review`,variant:`destructive`,onConfirm:()=>void p()}):null]}),(0,V.jsx)(YH,{pull:s,now:o}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:TH}),l?(0,V.jsx)(XH,{read:l}):null,(0,V.jsx)(eU,{number:e,review:c,now:o,focus:r,onFocus:i}),s.files.length>0?(0,V.jsx)(tU,{files:s.files}):null,(0,V.jsx)(CH,{title:`Description`,children:s.body.trim()?(0,V.jsx)(bH,{text:s.body.trim()}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:MH})}),(0,V.jsx)(rU,{notes:s.notes,now:o})]})}var oU=jg([`relative inline-flex w-fit shrink-0 items-center justify-center border border-transparent font-medium whitespace-nowrap outline-none transition-shadow`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-64`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-3 [&_svg:not([class*=opacity-])]:opacity-80`],{variants:{variant:{default:`bg-primary text-primary-foreground`,secondary:`bg-accent text-secondary-foreground`,outline:`border-input bg-background text-foreground dark:bg-input/32`,info:`bg-info/8 text-info dark:bg-info/16`,success:`bg-success/8 text-success dark:bg-success/16`,warning:`bg-warning/8 text-warning dark:bg-warning/16`,destructive:`bg-destructive/8 text-destructive dark:bg-destructive/16`},size:{sm:`h-4 min-w-4 gap-1 px-1 text-3xs leading-none`,default:`h-[1.125rem] min-w-[1.125rem] gap-1 px-1 text-xs`,lg:`h-5 min-w-5 gap-1 px-1.5 text-xs`},radius:{default:`rounded-sm`,full:`rounded-full`}},defaultVariants:{variant:`default`,size:`default`,radius:`default`}});function sU({className:e,variant:t,size:n,radius:r,asChild:i=!1,...a}){let o=i?dv:`span`;return(0,V.jsx)(o,{"data-slot":`badge`,className:J(oU({variant:t,size:n,radius:r,className:e})),...a})}var cU=`flex min-h-10 w-full flex-col gap-1 rounded-lg border border-transparent px-3 py-2.5 text-left outline-none transition-colors duration-150 hover:bg-accent/60 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring aria-[current=true]:bg-accent`,lU=`flex flex-col gap-1 px-2 pb-3`,uU=`px-4 pt-4 pb-1 text-xs font-medium text-muted-foreground`,dU=`inline-flex h-7 items-center rounded-md px-2.5 text-sm font-medium text-muted-foreground outline-none transition-colors duration-150 hover:bg-accent/60 hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-[state=active]:bg-accent data-[state=active]:text-foreground`;function fU({checks:e}){let t=FH(e);return t?(0,V.jsx)(`span`,{className:J(`w-4 shrink-0 text-center`,IH(e)),"aria-hidden":`true`,children:t}):(0,V.jsx)(`span`,{className:`w-4 shrink-0`,"aria-hidden":`true`})}function pU({pull:e,selected:t,onSelect:n}){let r=zH(e.review);return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(e.number),className:J(cU,`max-md:min-h-11`),children:[(0,V.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,V.jsx)(fU,{checks:e.checks}),e.draft?(0,V.jsx)(sU,{variant:`secondary`,children:`draft`}):null,(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title})]}),(0,V.jsxs)(`span`,{className:`flex flex-wrap items-baseline justify-between gap-x-3 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{children:KH(e)}),(0,V.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[r?(0,V.jsx)(`span`,{children:r}):null,(0,V.jsx)(`span`,{className:`tabular-nums`,children:LH(e.additions,e.deletions)})]})]})]})})}function mU({pulls:e,selectedId:t,onSelect:n}){return(0,V.jsx)(`ul`,{className:lU,children:e.map(e=>(0,V.jsx)(pU,{pull:e,selected:e.number===t,onSelect:n},e.number))})}function hU(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function gU({label:e,hint:t,buttonLabel:n=`Send`,onSend:r}){let i=(0,m.useId)(),[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)(!1),l=async()=>{a.trim()&&!s&&(c(!0),await r(a)&&o(``),c(!1))};return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium text-foreground`,children:e}),(0,V.jsx)(Lj,{id:i,value:a,rows:2,"aria-describedby":t?`${i}-hint`:void 0,onChange:e=>o(e.target.value),onKeyDown:e=>{hU(e)&&(e.preventDefault(),l())}}),t?(0,V.jsx)(`p`,{id:`${i}-hint`,className:J(`text-xs text-muted-foreground`,/(?:Enter|Esc)/.test(t)&&`max-md:hidden`),children:t}):null,(0,V.jsx)(`div`,{className:`flex self-end`,children:(0,V.jsx)(vj,{label:n,icon:s?Km:Ap,tone:`primary`,shortcut:`Enter`,className:s?`[&_svg]:animate-spin`:void 0,onClick:()=>void l(),disabled:!a.trim()||s})})]})}var _U=`Issues`,vU=`Issue`,yU=`Plan it opens a planning session on this issue; save the plan as a task once the panel agrees it.`,bU=`Refresh to load open issues with the GitHub CLI (gh).`,xU=`No open issues. File one with New issue.`,SU=`loading issues from GitHub…`,CU=`issues are off (lobby.issues)`,wU=`(no description)`;function TU(e,t){return[e.state?e.state.toLowerCase():``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${Vj(t-Date.parse(e.updatedAt))}`:``,e.labels.join(`, `)].filter(Boolean).join(` · `)}function EU(e,t){return[e.author?`by ${e.author}`:``,e.updatedAt?Vj(t-Date.parse(e.updatedAt)):``].filter(Boolean).join(` · `)}function DU(e){return e.length>0?`[${e.slice(0,2).join(`, `)}]`:``}function OU({issue:e,now:t}){return(0,V.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:[(0,V.jsxs)(`span`,{className:`font-normal text-muted-foreground tabular-nums`,children:[`#`,e.number]}),` `,e.title]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:TU(e,t)}),e.url?(0,V.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`inline-flex max-w-full break-all text-xs text-primary underline underline-offset-4 max-md:min-h-11 max-md:items-center`,children:e.url}):null]})}function kU({comment:e,now:t}){return(0,V.jsxs)(`article`,{className:`card-flat flex flex-col gap-1.5 rounded-lg border px-3.5 py-2.5`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),e.createdAt?(0,V.jsx)(`span`,{children:Vj(t-Date.parse(e.createdAt))}):null]}),(0,V.jsx)(bH,{text:e.body.trim()})]})}function AU({comments:e,now:t}){return e.length===0?null:(0,V.jsx)(CH,{title:`Comments`,right:String(e.length),children:(0,V.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,V.jsx)(kU,{comment:e,now:t},n))})})}function jU({issue:e}){let t=async()=>{await U(`planner.new`,{seed:{issue:{number:e.number,title:e.title,...e.url?{url:e.url}:{}},body:e.body}})&&MA(jA(`plan`))};return(0,V.jsx)(Qj,{icon:Sg,label:`Plan #${e.number} with the panel`,text:`Plan it`,shortcut:`N`,title:`Plan #${e.number} with the panel?`,description:`A new planning session starts from this issue. A plan already under way waits under Plan → Previous.`,confirmLabel:`Plan it`,onConfirm:()=>void t()})}function MU({number:e}){let t=JA(`issues.get`,{number:e},[`issues`]),n=Date.now();if(!t.data)return t.error?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t.error]}):(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(BA,{className:`size-3.5`}),`loading #`,e,`…`]});let r=t.data.issue;return(0,V.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${vU} #${e}`,children:[(0,V.jsx)(yj,{children:(0,V.jsx)(jU,{issue:r})}),(0,V.jsx)(OU,{issue:r,now:n}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:yU}),(0,V.jsx)(CH,{title:`Description`,children:r.body.trim()?(0,V.jsx)(bH,{text:r.body.trim()}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:wU})}),(0,V.jsx)(AU,{comments:r.comments,now:n})]})}function NU({issue:e,selected:t,now:n,onSelect:r}){let i=DU(e.labels);return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>r(e.number),className:J(cU,`max-md:min-h-11`),children:[(0,V.jsxs)(`span`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),i?(0,V.jsx)(`span`,{className:`max-w-full break-words text-xs text-muted-foreground`,children:i}):null]}),(0,V.jsx)(`span`,{className:`pl-9 text-xs text-muted-foreground`,children:EU(e,n)})]})})}function PU({issues:e,selectedId:t,now:n,onSelect:r}){return(0,V.jsx)(`ul`,{className:lU,children:e.map(e=>(0,V.jsx)(NU,{issue:e,selected:e.number===t,now:n,onSelect:r},e.number))})}var FU=()=>MA(jA(`git`,`issues`)),IU=e=>MA(jA(`git`,`issues`,String(e)));function LU(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function RU(){return(0,V.jsx)(PA,{className:`m-4 flex-1`,children:(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(em,{"aria-hidden":`true`})}),(0,V.jsx)(RA,{children:`Issues are off`}),(0,V.jsx)(zA,{className:`font-mono`,children:CU})]})})}function zU({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?xU:e?SU:bU;return(0,V.jsxs)(PA,{className:`m-4 flex-1`,children:[(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(em,{"aria-hidden":`true`})}),(0,V.jsx)(zA,{className:n?`text-destructive`:void 0,children:i})]}),n?(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:r,children:`Retry`}):null]})}function BU({onCreate:e}){return(0,V.jsx)(jj,{className:`shrink-0 border-t border-border p-4`,children:(0,V.jsx)(gU,{label:`New issue`,hint:`The first line becomes the title; the rest is the body. Enter files it.`,buttonLabel:`File issue`,onSend:e})})}function VU(){let e=Nk(`status`).data?.issuesEnabled??!0;return{enabled:e,read:JA(`issues.list`,{},[`issues`],e)}}function HU({enabled:e,read:t}){return!e||t.error?.includes(`issues are off`)?(0,V.jsx)(RU,{}):!t.data&&t.error?(0,V.jsx)(KA,{message:`Could not load issues. ${t.error}`,onRetry:t.reload}):null}function UU({issues:e,rest:t,top:n}){let r=Aj(),{read:i}=e,a=LU(t),o=i.data?.issues??[],s=async e=>await U(`issues.create`,{text:e})?(i.reload(),!0):!1,c=HU(e);if(c)return(0,V.jsxs)(V.Fragment,{children:[n,c]});if(i.data&&o.length===0)return(0,V.jsxs)(V.Fragment,{children:[n,(0,V.jsx)(zU,{loading:i.data.loading,loaded:i.data.loaded,error:i.data.error,onRetry:i.reload}),(0,V.jsx)(`div`,{className:`shrink-0 pb-dock`,children:(0,V.jsx)(BU,{onCreate:s})})]});let l=(0,V.jsxs)(V.Fragment,{children:[n,i.data?.error?(0,V.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,i.data.error]}):null,i.data?(0,V.jsx)(PU,{issues:o,selectedId:a,now:Date.now(),onSelect:IU}):(0,V.jsx)(Ij,{}),(0,V.jsx)(BU,{onCreate:s})]});return(0,V.jsx)(Pj,{wide:r,list:l,detail:a===void 0?null:(0,V.jsx)(MU,{number:a},a),open:a!==void 0,onClose:FU,hint:`Select an issue to read it.`,describe:`Issue detail`})}var WU=()=>MA(jA(`git`)),GU=e=>MA(jA(`git`,String(e)));function KU(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function qU({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?OH:e?kH:DH;return(0,V.jsxs)(PA,{className:`m-4 flex-1`,children:[(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(Pm,{"aria-hidden":`true`})}),(0,V.jsx)(zA,{className:n?`text-destructive`:void 0,children:i})]}),n?(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:r,children:`Retry`}):null]})}var JU=[{id:`pulls`,label:wH,hash:jA(`git`)},{id:`issues`,label:_U,hash:jA(`git`,`issues`)}];function YU({view:e}){return(0,V.jsx)(`div`,{role:`radiogroup`,"aria-label":`Show`,onKeyDown:t=>{if(![`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(t.key))return;t.preventDefault();let n=JU.find(t=>t.id!==e);MA(n.hash),requestAnimationFrame(()=>document.getElementById(`git-view-${n.id}`)?.focus())},className:`inline-flex rounded-lg bg-muted p-0.5`,children:JU.map(t=>(0,V.jsx)(`button`,{id:`git-view-${t.id}`,type:`button`,role:`radio`,"aria-checked":t.id===e,tabIndex:t.id===e?0:-1,onClick:()=>MA(t.hash),className:J(`min-h-11 min-w-11 rounded-md px-3 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,t.id===e&&`bg-background text-foreground shadow-sm`),children:t.label},t.id))})}function XU(e,t){return(0,m.useCallback)(()=>{U(`git.pulls`,{refresh:!0}).then(()=>e.reload()),t.enabled&&U(`issues.list`,{refresh:!0}).then(()=>t.read.reload())},[e,t])}function ZU({view:e,count:t,busy:n,refresh:r}){return(0,V.jsx)(Fj,{title:e===`issues`?_U:wH,count:t,lead:(0,V.jsx)(YU,{view:e}),children:(0,V.jsx)(vj,{label:`Refresh`,icon:Mh,shortcut:`R`,disabled:n,className:J(`h-7`,n&&`[&_svg]:animate-spin`),onClick:r})})}function QU({read:e,rest:t,top:n}){let r=Aj(),i=KU(t),a=e.data?.pulls??[];if(!e.data&&e.error)return(0,V.jsxs)(V.Fragment,{children:[n,(0,V.jsx)(KA,{message:`Could not load pull requests. ${e.error}`,onRetry:e.reload})]});if(e.data&&a.length===0)return(0,V.jsxs)(V.Fragment,{children:[n,(0,V.jsx)(qU,{loading:e.data.loading,loaded:e.data.loaded,error:e.data.error,onRetry:e.reload})]});let o=(0,V.jsxs)(V.Fragment,{children:[n,e.data?.error?(0,V.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,e.data.error]}):null,e.data?(0,V.jsx)(mU,{pulls:a,selectedId:i,onSelect:GU}):(0,V.jsx)(Ij,{})]}),s=i===void 0?null:(0,V.jsx)(aU,{number:i,onChanged:e.reload},i);return(0,V.jsx)(Pj,{wide:r,list:o,detail:s,open:i!==void 0,onClose:WU,hint:`Select a pull request to see its detail.`,describe:`Pull request detail`})}var $U=()=>JA(`git.pulls`,{},[`git`]);function eW(e,t,n){let r=e===`issues`?n.read:t,i=e===`issues`?n.read.data?.issues:t.data?.pulls,a=t.loading||!!t.data?.loading||n.enabled&&(n.read.loading||!!n.read.data?.loading),o=i&&(e===`pulls`||n.enabled)?`${i.length} open`:void 0;return{busy:a||r.loading,count:o}}function tW({rest:e}){let t=$U(),n=VU(),r=XU(t,n),i=e[0]===`issues`?`issues`:`pulls`,{busy:a,count:o}=eW(i,t,n),s=(0,V.jsx)(ZU,{view:i,count:o,busy:a,refresh:r}),c=i===`issues`?(0,V.jsx)(UU,{issues:n,rest:e.slice(1),top:s}):(0,V.jsx)(QU,{read:t,rest:e,top:s});return(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:c})}function nW(e){let t=(0,m.useRef)(null),n=(0,m.useRef)(!0),[r,i]=(0,m.useState)(!0),a=(0,m.useRef)(void 0),o=(0,m.useRef)(null),s=(0,m.useCallback)(()=>{n.current=!0,i(!0);let e=t.current;e&&(e.scrollTop=e.scrollHeight)},[]);return(0,m.useLayoutEffect)(()=>{n.current&&s()},[e,s]),(0,m.useLayoutEffect)(()=>{let e=t.current;if(!e||typeof ResizeObserver>`u`)return;let r=new ResizeObserver(()=>{n.current&&(e.scrollTop=e.scrollHeight)});return r.observe(e),a.current=r,()=>{r.disconnect(),a.current=void 0,o.current=null}},[]),(0,m.useLayoutEffect)(()=>{let e=a.current,n=t.current?.firstElementChild??null;e&&n!==o.current&&(o.current&&e.unobserve(o.current),n&&e.observe(n),o.current=n)},[e]),{ref:t,atBottom:r,stick:s,onScroll:(0,m.useCallback)(()=>{let e=t.current;e&&(n.current=e.scrollHeight-e.scrollTop-e.clientHeight<48,i(n.current))},[])}}var rW={DEV:fm,DESIGN:gh,QA:Xh,RESEARCH:og,"QUICK FIX":Eg,SCOUT:mm,PLANNER:Bh,CLASSIFIER:ig,LOBBY:oh,LINT:Hm};function iW(e){return e?rW[e.toUpperCase()]??Pp:Ip}function aW(e){let t=e?.toUpperCase();return t===`ORACLE`||t===`MASTER`}function oW({source:e,className:t,strokeWidth:n}){if(aW(e))return(0,V.jsx)(`span`,{"aria-hidden":`true`,"data-agent-icon":e,className:J(`agent-oracle shrink-0`,t)});let r=iW(e);return(0,V.jsx)(r,{"aria-hidden":`true`,"data-agent-icon":e??`thinking`,strokeWidth:n,className:J(`shrink-0`,t)})}var sW={MASTER:`text-primary`,DEV:`text-source-dev`,DESIGN:`text-source-design`,QA:`text-source-qa`,RESEARCH:`text-source-research`,"QUICK FIX":`text-source-quickfix`,ORACLE:`text-primary`,LOBBY:`text-muted-foreground`};function cW(e){return e.length<=2?e:e.charAt(0)+e.slice(1).toLowerCase()}function lW(e){return sW[e]??`text-muted-foreground`}var uW={MASTER:`var(--primary)`,DEV:`var(--source-dev)`,DESIGN:`var(--source-design)`,QA:`var(--source-qa)`,RESEARCH:`var(--source-research)`,"QUICK FIX":`var(--source-quickfix)`,ORACLE:`var(--primary)`,LOBBY:`var(--muted-foreground)`};function dW(e){return uW[e]??`var(--muted-foreground)`}function fW(e){if(e.role===`researcher`)return`RESEARCH`;let t=e.domain??e.role;return t===`backend`||t===`dev`?`DEV`:t===`designer`||t===`design`?`DESIGN`:t===`researcher`||t===`research`?`RESEARCH`:t===`qa`?`QA`:t?String(t).toUpperCase():`AGENT`}function pW(e){return e?.runs??[]}function mW(e,t=40){let n=new Map;for(let t of e)n.set(t.source,t);return[...n.values()].sort((e,t)=>e.at-t.at).slice(-t)}function hW({source:e,name:t,time:n,head:r,live:i,children:a,aside:o}){let s=r&&!aW(e);return(0,V.jsxs)(`div`,{className:`chat-agent group/msg`,"data-live":i||void 0,style:i?{"--orb":dW(e)}:void 0,children:[s||o?(0,V.jsxs)(`p`,{className:`chat-speaker`,children:[s?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium text-foreground`,style:{"--orb":dW(e)},children:[(0,V.jsx)(oW,{source:e,strokeWidth:2.25,className:`size-3.5 text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`}),t]}):null,s&&n?(0,V.jsx)(`time`,{className:`text-xs text-muted-foreground tabular-nums`,children:n}):null,o?(0,V.jsx)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:o}):null]}):null,(0,V.jsx)(`div`,{className:`chat-prose`,children:a}),n&&!s?(0,V.jsx)(`time`,{className:`chat-meta`,children:n}):null]})}function gW({time:e,head:t,note:n,children:r,below:i,actions:a}){return(0,V.jsxs)(`div`,{className:`group/msg flex flex-col items-end gap-1`,children:[(0,V.jsx)(`div`,{className:`chat-bubble`,children:r}),e||n||a?(0,V.jsxs)(`div`,{className:`chat-meta flex items-center gap-2`,children:[a,n?(0,V.jsx)(`span`,{children:n}):null,e?(0,V.jsx)(`time`,{className:`tabular-nums`,children:e}):null]}):null,i]})}function _W({failed:e,children:t}){return(0,V.jsx)(`div`,{role:`note`,className:J(`chat-note`,e&&`text-destructive`),children:(0,V.jsx)(`span`,{children:t})})}function vW({className:e}){return(0,V.jsxs)(`span`,{"aria-hidden":`true`,className:J(`typing-dots`,e),children:[(0,V.jsx)(`span`,{}),(0,V.jsx)(`span`,{}),(0,V.jsx)(`span`,{})]})}function yW({onClick:e,className:t}){return(0,V.jsx)(`button`,{type:`button`,"aria-label":`Jump to latest`,title:`Jump to latest`,onClick:e,className:J(`jump-latest btn-outline grid size-9 place-items-center rounded-full border bg-card text-foreground shadow-card outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:size-11`,t),children:(0,V.jsx)(wp,{"aria-hidden":`true`,className:`size-4`})})}function bW(e,t){return e===`lobby.thinking`||t===`1`}var xW=`bot-lobby.collapsed.`,SW=new Set,CW=new Map;function wW(e){if(CW.has(e))return CW.get(e);if(e===`lobby.thinking`)return bW(e);try{return bW(e,localStorage.getItem(xW+e))}catch{return!1}}function TW(e,t){CW.set(e,t);try{e!==`lobby.thinking`&&localStorage.setItem(xW+e,t?`1`:`0`)}catch{}for(let e of[...SW])e()}function EW(e){return SW.add(e),()=>{SW.delete(e)}}function DW(e){TW(e,!wW(e))}function OW(e){return[(0,m.useSyncExternalStore)(EW,()=>wW(e),()=>bW(e)),(0,m.useCallback)(()=>TW(e,!wW(e)),[e])]}function kW({className:e}){return(0,V.jsx)(`span`,{"aria-hidden":`true`,"data-slot":`working-mark`,className:J(`working-mark`,e),children:(0,V.jsx)(`span`,{className:`working-mark-core`})})}var AW=`lobby.activity.open`;function jW({entry:e}){return e.pending?(0,V.jsx)(kW,{className:`size-3`}):e.kind===`error`?(0,V.jsx)(wg,{"aria-hidden":`true`,className:`size-3.5 text-destructive`}):e.kind===`warning`?(0,V.jsx)(ug,{"aria-hidden":`true`,className:`size-3.5 text-warning`}):e.kind===`success`?(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`size-3.5 text-success`}):(0,V.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}function MW({entry:e}){return(0,V.jsxs)(`li`,{className:`activity-step`,title:zj(e.at),style:e.pending?{"--orb":dW(e.source)}:void 0,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-5 w-6 items-center justify-center`,children:(0,V.jsx)(jW,{entry:e})}),(0,V.jsx)(`span`,{className:`sr-only`,children:e.pending?`pending`:e.kind}),(0,V.jsxs)(`span`,{className:`min-w-0 break-words`,children:[(0,V.jsx)(`span`,{className:J(`font-medium`,lW(e.source)),children:cW(e.source)}),` `,(0,V.jsx)(`span`,{className:e.kind===`error`?`text-destructive`:e.pending?`text-foreground`:void 0,children:e.pending?`${e.text}…`:e.text})]})]})}function NW(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${String(n%60).padStart(2,`0`)}m`}function PW(e){let t=[...e].reverse().find(e=>e.pending),n=[...new Set(e.map(e=>cW(e.source)))];return{...t?{live:t}:{},took:(e.at(-1)?.at??0)-(e[0]?.at??0),count:`${e.length} ${e.length===1?`step`:`steps`}`,sources:n.length>3?`${n.slice(0,3).join(`, `)} +${n.length-3}`:n.join(`, `),errors:e.filter(e=>e.kind===`error`).length,warnings:e.filter(e=>e.kind===`warning`).length}}function FW(e){let[t,n]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}function IW({entries:e}){let[t]=OW(AW),[n,r]=(0,m.useState)();(0,m.useEffect)(()=>r(void 0),[t]);let i=n??t,a=(0,m.useId)(),{live:o,took:s,count:c,sources:l,errors:u,warnings:d}=PW(e),f=FW(!!o),p=o?{"--orb":dW(o.source)}:void 0;return(0,V.jsxs)(`div`,{className:`activity-run`,"data-live":o?!0:void 0,"data-open":i||void 0,style:p,children:[(0,V.jsxs)(`button`,{type:`button`,"aria-expanded":i,"aria-controls":a,onClick:()=>r(!i),className:`activity-toggle`,children:[o?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(kW,{}),(0,V.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,V.jsx)(LW,{text:`Working`}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:` · `}),(0,V.jsxs)(`span`,{className:`activity-live-step`,children:[(0,V.jsx)(`span`,{className:J(`font-medium`,lW(o.source)),children:cW(o.source)}),` `,(0,V.jsxs)(`span`,{className:`text-foreground`,children:[o.text,`…`]})]},o.id)]}),(0,V.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[c,e[0]&&f-e[0].at>=1e3?` · ${NW(f-e[0].at)}`:``]})]}):(0,V.jsxs)(`span`,{className:`min-w-0 truncate`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:s>=1e3?`Worked for ${NW(s)}`:`Worked`}),(0,V.jsxs)(`span`,{children:[` · `,c,l?` · ${l}`:``]})]}),u?(0,V.jsxs)(`span`,{className:`shrink-0 text-destructive`,children:[u,` `,u===1?`error`:`errors`]}):null,d?(0,V.jsxs)(`span`,{className:`shrink-0 text-warning`,children:[d,` `,d===1?`warning`:`warnings`]}):null,(0,V.jsx)(Bp,{"aria-hidden":`true`,className:`activity-chevron size-3.5 shrink-0`})]}),i?(0,V.jsx)(`ol`,{id:a,"aria-label":`Activity`,className:`activity-steps`,children:e.map(e=>(0,V.jsx)(MW,{entry:e},e.id))}):null]})}function LW({text:e}){return(0,V.jsxs)(`span`,{className:`activity-shimmer`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:e}),[...e].map((e,t)=>(0,V.jsx)(`span`,{"aria-hidden":`true`,style:{"--i":t},children:e},t))]})}function RW(e,t){let n=[...t].sort((e,t)=>e.at-t.at||e.id-t.id),r=[],i=0,a=e=>{let t=[];for(;i<n.length&&n[i].at<e;)t.push(n[i++]);t.length&&r.push({kind:`activity`,key:`steps-${t[0].id}`,entries:t})};for(let t of e)a(t.at),r.push({kind:`message`,entry:t});return a(1/0),r}var zW=3e5,BW=`No task is running in this session.`,VW=`Type a request below and press enter to start one: the oracle scouts, proposes, plans and delegates.`,HW=`Nothing said yet. Type below to talk to the oracle about this task.`;function UW({entry:e}){return(0,V.jsxs)(_W,{failed:e.text.startsWith(`✗`),children:[e.text,e.at?` · ${zj(e.at)}`:``]})}function WW({entry:e,head:t}){if(e.role===`you`)return(0,V.jsx)(gW,{time:zj(e.at),head:t,children:(0,V.jsx)(bH,{text:e.text})});let n=e.role===`panel`;return(0,V.jsx)(hW,{source:n?`PLANNER`:`ORACLE`,name:n?`Panel`:`Oracle`,time:zj(e.at),head:t,children:(0,V.jsx)(bH,{text:e.text})})}var GW=(0,m.memo)(function({entry:e,head:t,fresh:n}){return(0,V.jsx)(H.div,{initial:n?{opacity:0,y:10}:!1,animate:{opacity:1,y:0},transition:{type:`spring`,stiffness:420,damping:32},children:e.role===`note`?(0,V.jsx)(UW,{entry:e}):(0,V.jsx)(WW,{entry:e,head:t})})},(e,t)=>e.head===t.head&&e.entry.id===t.entry.id&&e.entry.text===t.entry.text&&e.entry.at===t.entry.at);function KW({text:e,busy:t,working:n}){let r=!!e?.trim();return!r&&(!t||n)?null:(0,V.jsx)(hW,{source:`ORACLE`,name:`Oracle`,head:!0,live:t,aside:t&&r?`writing…`:void 0,children:r?(0,V.jsx)(bH,{text:e??``}):(0,V.jsx)(vW,{className:`mt-1`})})}function qW({hasTask:e}){return(0,V.jsxs)(PA,{className:`h-full border-0`,children:[(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(ih,{"aria-hidden":`true`})}),e?null:(0,V.jsx)(RA,{children:BW}),(0,V.jsx)(zA,{children:e?HW:VW})]}),e?null:(0,V.jsxs)(`ul`,{className:`flex flex-col gap-2 text-sm text-muted-foreground`,children:[(0,V.jsxs)(`li`,{className:`flex items-center justify-center gap-2`,children:[`Or plan it first with the whole panel in `,(0,V.jsx)(kk,{chord:`3`}),` Plan`]}),(0,V.jsxs)(`li`,{className:`flex items-center justify-center gap-2`,children:[`or make a direct change in `,(0,V.jsx)(kk,{chord:`4`}),` Quick fix`]})]})]})}async function JW(e){let t=await Se(`lobby.history`,{before:e});return{entries:t.entries,hasOlder:t.hasOlder}}function YW(e,t,n){let[r,i]=(0,m.useState)([]),[a,o]=(0,m.useState)(t),[s,c]=(0,m.useState)(!1),l=(0,m.useMemo)(()=>{let t=new Set(e.map(e=>e.id));return[...r.filter(e=>!t.has(e.id)),...e]},[r,e]);return{merged:l,more:a,loading:s,load:(0,m.useCallback)(async()=>{let e=l[0]?.id;if(e===void 0||s||!a)return;c(!0);let t=n.current,r=t?.scrollHeight??0,u=t?.scrollTop??0;try{let t=await JW(e);i(e=>[...t.entries,...e]),o(t.hasOlder),window.requestAnimationFrame(()=>{let e=n.current;e&&(e.scrollTop=e.scrollHeight-r+u)})}catch{o(!1)}finally{c(!1)}},[l,s,a,n])}}var XW=[];function ZW({chat:e,activity:t=XW,reply:n,busy:r,hasOlder:i,hasTask:a}){let o=(0,m.useMemo)(()=>t.slice(-400),[t]),{ref:s,atBottom:c,stick:l,onScroll:u}=nW(`${e.length}:${n?.length??0}:${o.length}:${o.at(-1)?.pending??``}`),{merged:d,more:f,loading:p,load:h}=YW(e,i,s),g=(0,m.useCallback)(()=>{u();let e=s.current;e&&e.scrollTop<80&&f&&!p&&h()},[u,s,f,p,h]),_=(0,m.useMemo)(()=>RW(d,o),[d,o]),v=d.length===0&&o.length===0&&!n?.trim()&&!r,y=_.at(-1),b=y?.kind===`activity`&&!!PW(y.entries).live,[x,S]=(0,m.useState)(!1);return(0,m.useEffect)(()=>S(!0),[]),(0,V.jsxs)(xH,{"aria-label":`Conversation`,"data-bare":!0,className:`flex-1 rounded-none border-0 shadow-none`,children:[(0,V.jsx)(`div`,{ref:s,onScroll:g,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-5 pt-4 pb-dock outline-none focus-visible:bg-muted/30`,role:`log`,"aria-label":`Conversation`,tabIndex:0,children:v?(0,V.jsx)(qW,{hasTask:a}):(0,V.jsxs)(`div`,{className:`chat-column`,children:[f?(0,V.jsx)(`p`,{className:`mb-4 text-center text-xs text-muted-foreground`,children:`Earlier messages load as you scroll up.`}):null,_.map((e,t)=>{if(e.kind===`activity`)return(0,V.jsx)(IW,{entries:e.entries},e.key);let n=_[t-1],r=n?.kind===`message`?n.entry:void 0,i=!r||r.role!==e.entry.role||e.entry.at-r.at>zW;return(0,V.jsx)(GW,{entry:e.entry,head:i,fresh:x},e.entry.id)}),(0,V.jsx)(KW,{text:n,busy:r,working:b})]})}),c?null:(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-dock z-10 flex justify-center [&>*]:pointer-events-auto`,children:(0,V.jsx)(yW,{onClick:l})})]})}function QW(e){let t=e[0]===`ask`,[n,r]=t?e.slice(1):e;return{chat:t,agent:n,file:r}}function $W(e,t){let{agent:n,file:r}=QW(e);return jA(`knowledge`,...t?[`ask`]:[],n??``,r??``)}var eG=[`master`,`designer`,`backend`,`qa`],tG={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`},nG={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`},rG=`Every write archives the version before it.`;function iG(e){if(e<1e3)return String(e);let t=e/1e3;return`${t>=10?Math.round(t):t.toFixed(1)}k`}function aG(e){return`over the compaction threshold — ask the oracle to compact ${e}`}function oG(e){return{text:e.text,occurrence:e.occurrence}}function sG(e){return eG.map(t=>{let n=e.filter(e=>e.agent===t);return{agent:t,files:n,notes:n.reduce((e,t)=>e+t.notes,0)}}).filter(e=>e.files.length>0)}function cG(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function lG({initial:e,busy:t,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),o=()=>{!t&&i.trim()&&n(i)};return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-input p-3`,children:[(0,V.jsx)(`label`,{htmlFor:`knowledge-entry`,className:`text-sm font-medium text-foreground`,children:`Edit entry`}),(0,V.jsx)(Lj,{id:`knowledge-entry`,value:i,rows:4,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:e=>{cG(e)&&(e.preventDefault(),o())}}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:rG}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:r,disabled:t,children:`Cancel`}),(0,V.jsxs)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:o,disabled:t||!i.trim(),children:[t?(0,V.jsx)(BA,{}):null,`Save`]})]})]})]})}function uG({open:e,file:t,initial:n,busy:r,onClose:i,onSave:a}){let[o,s]=(0,m.useState)(n),c=SA(e,xA.confirm);return(0,V.jsx)(mA,{open:e&&c,onOpenChange:e=>!e&&i(),label:`Edit ${t}`,description:rG,dismissOnBackdrop:!1,className:`max-w-3xl`,children:(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-6`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`h2`,{className:`text-base font-medium`,children:[`Edit `,t]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:rG})]}),(0,V.jsx)(Lj,{value:o,rows:14,className:`min-h-0 flex-1 font-mono text-sm`,onChange:e=>s(e.target.value)}),(0,V.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:i,disabled:r,children:`Cancel`}),(0,V.jsxs)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>a(o),disabled:r,children:[r?(0,V.jsx)(BA,{}):null,`Save file`]})]})]})})}function dG({note:e,about:t,onTakeBack:n,busy:r}){let i=t?`about "${t.replace(/\s+/g,` `).trim().slice(0,50)}": ${e.text}`:e.text;return(0,V.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(wh,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-primary`}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:i}),(0,V.jsx)(vj,{label:`Take the note back`,icon:fg,iconOnly:!0,className:`-my-1 size-7`,disabled:r,onClick:()=>n(e.id)})]})}function fG({entry:e,index:t,selected:n,notes:r,onPick:i,onTakeBack:a,busy:o}){let s=()=>i(t);return(0,V.jsxs)(`li`,{role:`button`,tabIndex:0,"aria-pressed":n,onClick:s,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s())},className:n?`flex min-h-9 cursor-pointer flex-col gap-1 rounded-lg border border-primary/30 bg-accent px-3 py-2.5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`:`flex min-h-9 cursor-pointer flex-col gap-1 rounded-lg border border-border px-3 py-2.5 outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,children:[(0,V.jsx)(`div`,{className:`flex gap-2`,children:(0,V.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,V.jsx)(bH,{text:e.text})})}),r.length>0?(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 pl-1`,children:r.map(e=>(0,V.jsx)(dG,{note:e,onTakeBack:a,busy:o},e.id))}):null]})}function pG({notes:e,onTakeBack:t,busy:n}){return e.length===0?null:(0,V.jsx)(CH,{title:`Notes on entries that changed`,right:String(e.length),children:(0,V.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,V.jsx)(dG,{note:e,about:e.entry,onTakeBack:t,busy:n},e.id))})})}function mG({view:e}){let t=e.entries.length;return(0,V.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,V.jsxs)(`h2`,{className:`min-w-0 break-words text-lg font-semibold tracking-tight`,children:[nG[e.agent],` `,(0,V.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`· `,e.file]})]}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t,` `,t===1?`entry`:`entries`,` · `,iG(e.chars),` chars`]}),e.over?(0,V.jsx)(`p`,{className:`text-sm text-foreground`,children:aG(e.file)}):null]})}function hG({draft:e,picked:t,setDraft:n,onEditFile:r,onDelete:i}){let a=!!e;return(0,V.jsxs)(yj,{children:[(0,V.jsx)(vj,{label:`Edit the entry`,text:`Edit`,icon:Eh,shortcut:`E`,disabled:a||!t,onClick:()=>n({kind:`edit`,entry:t})}),(0,V.jsx)(vj,{label:t?`Add an entry after it`:`Add an entry`,text:`Add`,icon:Ah,shortcut:`A`,disabled:a,onClick:()=>n({kind:`add`,entry:t})}),(0,V.jsx)(vj,{label:`Comment on the entry`,text:`Comment`,icon:nh,shortcut:`C`,disabled:a||!t,onClick:()=>n({kind:`comment`,entry:t})}),(0,V.jsx)(vj,{label:`Edit the whole file`,text:`Edit file`,icon:wm,shortcut:`F`,disabled:a,onClick:r}),(0,V.jsx)(Qj,{icon:cg,label:`Delete the entry`,text:`Delete`,shortcut:`Delete`,title:`Delete this entry?`,description:`The entry and its notes are removed. The version before is archived.`,confirmLabel:`Delete entry`,variant:`destructive`,disabled:a||!t,onConfirm:i})]})}function gG({agent:e,file:t,onChanged:n}){let r=JA(`knowledge.open`,{agent:e,file:t},[`knowledge`]),[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=r.data?.view,p=f?.entries??[],h=p[Math.min(i,Math.max(0,p.length-1))],g=async e=>{d(!0),await e(),s(void 0),r.reload(),n(),d(!1)},_=e=>void g(()=>U(`knowledge.unnote`,{id:e})),v=()=>{h&&g(()=>U(`knowledge.remove`,{agent:e,file:t,ref:oG(h)}))},y=n=>{let r=o?.entry;if(o?.kind===`edit`&&r)return void g(()=>U(`knowledge.edit`,{agent:e,file:t,ref:oG(r),text:n}));if(o?.kind===`comment`&&r)return void g(()=>U(`knowledge.comment`,{agent:e,file:t,ref:oG(r),text:n}));g(()=>U(`knowledge.add`,{agent:e,file:t,...h?{ref:oG(h)}:{},text:n}))};return f?(0,V.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${nG[e]} ${t}`,children:[(0,V.jsx)(hG,{draft:o,picked:h,setDraft:s,onEditFile:()=>l(!0),onDelete:v}),(0,V.jsx)(mG,{view:f}),p.length===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing here yet. Add the first entry below.`}):null,(0,V.jsx)(`ul`,{className:`workspace-section flex flex-col gap-2 rounded-xl border p-3 shadow-xs`,children:p.map((e,t)=>(0,V.jsx)(fG,{entry:e,index:t,selected:t===i,notes:f.attached.filter(t=>t.entry===e.text),onPick:a,onTakeBack:_,busy:u},`${t}-${e.text}`))}),o?.kind===`edit`?(0,V.jsx)(lG,{initial:o.entry.text,busy:u,onSave:y,onCancel:()=>s(void 0)}):null,o?.kind===`comment`?(0,V.jsx)(gU,{label:`Comment on this entry`,hint:rG,buttonLabel:`Add note`,onSend:async e=>(y(e),!0)}):null,o?.kind===`add`?(0,V.jsx)(gU,{label:`Add an entry`,hint:rG,buttonLabel:`Add entry`,onSend:async e=>(y(e),!0)}):null,u&&!o?(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(BA,{}),` saving…`]}):null,(0,V.jsx)(pG,{notes:f.detached,onTakeBack:_,busy:u}),(0,V.jsx)(uG,{open:c,file:t,initial:f.content,busy:u,onClose:()=>l(!1),onSave:n=>{l(!1),g(()=>U(`knowledge.replaceFile`,{agent:e,file:t,text:n}))}})]}):r.error?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not read the file. `,r.error]}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`reading…`})}function _G(e){return`${e.agent}/${e.file}`}var vG={master:`ORACLE`,designer:`DESIGN`,backend:`DEV`,qa:`QA`},yG=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function bG({info:e}){return(0,V.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground tabular-nums`,children:[(0,V.jsx)(`span`,{children:iG(e.chars)}),e.over?(0,V.jsx)(`span`,{className:`text-foreground`,children:`· over`}):null,e.notes>0?(0,V.jsx)(`span`,{className:`text-primary`,children:yG(e.notes,`note`)}):null]})}function xG({info:e,selected:t,onSelect:n}){return(0,V.jsx)(`li`,{className:`ktree-leaf`,children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(_G(e)),className:J(cU,`ktree-file min-h-9 flex-row items-center gap-2 py-1.5 max-md:min-h-11`),children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`ktree-bud`}),(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 truncate text-sm text-foreground`,t&&`font-medium`),children:e.label}),(0,V.jsx)(bG,{info:e})]})})}var SG=`bot-lobby.knowledge.folded`;function CG(){try{let e=JSON.parse(window.localStorage.getItem(SG)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function wG({files:e,models:t={},selectedKey:n,onSelect:r}){let[i,a]=(0,m.useState)(CG),o=sG(e),s=e.reduce((e,t)=>e+t.notes,0);function c(e,t){a(n=>{let r=t?n.filter(t=>t!==e):[...new Set([...n,e])];try{window.localStorage.setItem(SG,JSON.stringify(r))}catch{}return r})}return(0,V.jsxs)(`div`,{className:`ktree px-3 pt-1 pb-3`,children:[(0,V.jsxs)(`p`,{className:`ktree-root`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`card-flat grid size-8 shrink-0 place-items-center rounded-lg border text-primary`,children:(0,V.jsx)(Mp,{className:`size-4`})}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:`block text-sm font-medium`,children:`Project knowledge`}),(0,V.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[yG(e.length,`file`),` · `,yG(o.length,`agent`),s>0?` · ${yG(s,`note`)}`:``]})]})]}),(0,V.jsx)(`ul`,{className:`ktree-branches`,"aria-label":`Agents and their knowledge`,children:o.map(e=>{let a=!i.includes(e.agent),o=vG[e.agent],s=`knowledge-${e.agent}`,l=t[e.agent];return(0,V.jsxs)(`li`,{className:`ktree-branch`,style:{"--orb":dW(o)},children:[(0,V.jsx)(`h3`,{children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space ArrowLeft ArrowRight`,"aria-describedby":`focused-action-help`,type:`button`,"aria-expanded":a,"aria-controls":s,onClick:()=>c(e.agent,!a),onKeyDown:t=>{t.key===`ArrowLeft`||t.key===`h`?(t.preventDefault(),t.stopPropagation(),c(e.agent,!1)):(t.key===`ArrowRight`||t.key===`l`)&&(t.preventDefault(),t.stopPropagation(),a||c(e.agent,!0))},className:`ktree-node max-md:min-h-11`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`ktree-tile`,children:(0,V.jsx)(oW,{source:o,strokeWidth:2.25,className:o===`ORACLE`?`size-5`:`size-3.5`})}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`span`,{className:`block truncate text-sm font-medium text-foreground`,children:tG[e.agent]}),l?(0,V.jsxs)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:`runs on `}),l]}):null]}),(0,V.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[e.notes>0?(0,V.jsxs)(`span`,{className:`text-primary`,children:[yG(e.notes,`note`),` · `]}):null,yG(e.files.length,`file`)]}),(0,V.jsx)(Wp,{"aria-hidden":`true`,className:J(`size-3.5 shrink-0 text-muted-foreground transition-transform duration-200 ease-snap`,a&&`rotate-90`)})]})}),(0,V.jsx)(Cu,{initial:!1,children:a?(0,V.jsx)(H.ul,{id:s,"aria-label":`${tG[e.agent]}'s knowledge`,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:520,damping:42},className:`ktree-leaves`,children:e.files.map(e=>(0,V.jsx)(xG,{info:e,selected:_G(e)===n,onSelect:r},_G(e)))},`files`):null})]},e.agent)})})]})}var TG=()=>MA(jA(`knowledge`)),EG=e=>{let[t,n]=e.split(`/`);MA(jA(`knowledge`,t??``,n??``))};function DG(){return(0,V.jsx)(PA,{className:`m-4 flex-1`,children:(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(Mp,{"aria-hidden":`true`})}),(0,V.jsx)(zA,{children:`No knowledge files yet.`})]})})}function OG(e,t,n,r){let i=e.find(e=>e.agent===t&&e.file===n);return i?(0,V.jsx)(gG,{agent:i.agent,file:i.file,onChanged:r},_G(i)):t&&n?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That file is not on the list any more.`}):null}function kG(){let e=Nk(`lobby`),t=Nk(`status`),n=e.data,r=t.data?.busy??!1;return!n?.chat.length&&!n?.reply&&!r?(0,V.jsx)(`p`,{className:`m-auto max-w-md px-5 pb-dock text-center text-sm text-muted-foreground`,children:`Ask about this project below. The oracle checks saved knowledge, searches the codebase for missing information, and saves verified findings.`}):(0,V.jsx)(ZW,{chat:n?.chat??[],reply:n?.reply,busy:r,hasOlder:n?.hasOlderChat??!1,hasTask:!!n?.task})}function AG({read:e,selected:t}){let n=e.data?.files.reduce((e,t)=>e+t.notes,0)??0;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Fj,{title:`Knowledge`,count:n>0?`${n} note${n===1?``:`s`}`:void 0}),(0,V.jsx)(jG,{read:e,selected:t})]})}function jG({read:e,selected:t}){return!e.data&&e.error?(0,V.jsx)(KA,{message:`Could not load the knowledge files. ${e.error}`,onRetry:e.reload}):e.data?e.data.files.length?(0,V.jsx)(wG,{files:e.data.files,models:e.data.models??{},selectedKey:t,onSelect:EG}):(0,V.jsx)(DG,{}):(0,V.jsx)(Ij,{})}function MG({rest:e}){let{chat:t,agent:n,file:r}=QW(e),i=Aj(),a=JA(`knowledge.files`,{},[`knowledge`]),o=a.data?.files??[],s=o.find(e=>e.agent===n&&e.file===r);return(0,V.jsx)(Pj,{wide:i,inlineDetail:!0,list:(0,V.jsx)(AG,{read:a,selected:s?_G(s):void 0}),detail:t?(0,V.jsx)(kG,{}):OG(o,n,r,a.reload),detailClassName:t?`flex flex-col overflow-hidden p-0`:void 0,open:t||!!(n&&r),onClose:TG,hint:`Select a file to read its entries, or ask about the project below.`,describe:t?`Knowledge chat`:`Knowledge file`})}function NG(e){let t=e[0]===`board`,n=e[+!!t];try{return{board:t,id:n?decodeURIComponent(n):void 0}}catch{return{board:t,id:n}}}var PG=e=>e?.panels??{conversation:!0,activity:!0,thinking:!0};function FG({data:e,status:t}){let n=PG(t);if(!n.conversation)return null;let r=n.activity?e?.activity:void 0;return(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:(0,V.jsx)(ZW,{chat:e?.chat??[],...r?{activity:r}:{},reply:e?.reply,busy:t?.busy??!1,hasOlder:e?.hasOlderChat??!1,hasTask:!!e?.task})})}function IG(){let e=Nk(`lobby`),t=Nk(`status`);return!e.data&&e.loading?(0,V.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(BA,{}),(0,V.jsx)(`span`,{children:`Connecting…`})]}):!e.data&&e.error?(0,V.jsx)(KA,{message:e.error,onRetry:()=>F.onHello({})}):(0,V.jsx)(FG,{data:e.data,status:t.data})}var LG=jg([`relative flex flex-col overflow-hidden bg-card text-card-foreground rounded-(--frame-radius)`,`[--frame-radius:var(--radius-xl)]`,`[--frame-gap:0px] [--frame-px:0px] [--frame-py:0px] [--frame-panel-header-gap:0rem] [--frame-panel-footer-gap:--spacing(1)]`,`[--frame-panel-px-adjust:0px] [--frame-panel-py-adjust:0px] [--frame-panel-header-px-adjust:0px] [--frame-panel-header-py-adjust:0px] [--frame-panel-footer-px-adjust:0px] [--frame-panel-footer-py-adjust:0px]`,`[--frame-panel-px:calc(var(--frame-panel-px-base)+var(--frame-panel-px-adjust))] [--frame-panel-py:calc(var(--frame-panel-py-base)+var(--frame-panel-py-adjust))] [--frame-panel-header-px:calc(var(--frame-panel-header-px-base)+var(--frame-panel-header-px-adjust))] [--frame-panel-header-py:calc(var(--frame-panel-header-py-base)+var(--frame-panel-header-py-adjust))] [--frame-panel-footer-px:calc(var(--frame-panel-footer-px-base)+var(--frame-panel-footer-px-adjust))] [--frame-panel-footer-py:calc(var(--frame-panel-footer-py-base)+var(--frame-panel-footer-py-adjust))]`,``,`[--frame-panel-bg:var(--workspace-card)] [--frame-panel-border-color:var(--workspace-border)] [--frame-border-color:var(--workspace-border)]`,`[--frame-panel-radius:calc(var(--frame-radius)-var(--frame-px)-1px)]`],{variants:{variant:{default:`border border-[var(--frame-border-color)] bg-clip-padding`,inverse:`[--frame-panel-bg:color-mix(in_oklch,var(--color-muted)_40%,transparent)] border border-[var(--frame-border-color)] bg-background bg-clip-padding`,ghost:`[--frame-panel-radius:calc(var(--frame-radius)-var(--frame-px))]`},spacing:{xs:`[--frame-panel-px-base:--spacing(2)] [--frame-panel-py-base:--spacing(2)] [--frame-panel-header-px-base:--spacing(2)] [--frame-panel-header-py-base:--spacing(0.5)] [--frame-panel-footer-px-base:--spacing(2)] [--frame-panel-footer-py-base:--spacing(0.5)]`,sm:`[--frame-panel-px-base:--spacing(3)] [--frame-panel-py-base:--spacing(3.5)] [--frame-panel-header-px-base:--spacing(3)] [--frame-panel-header-py-base:--spacing(1.5)] [--frame-panel-footer-px-base:--spacing(3)] [--frame-panel-footer-py-base:--spacing(1.5)]`,default:`[--frame-panel-px-base:--spacing(4)] [--frame-panel-py-base:--spacing(4)] [--frame-panel-header-px-base:--spacing(4)] [--frame-panel-header-py-base:--spacing(2)] [--frame-panel-footer-px-base:--spacing(4)] [--frame-panel-footer-py-base:--spacing(2)]`,lg:`[--frame-panel-px-base:--spacing(5)] [--frame-panel-py-base:--spacing(5)] [--frame-panel-header-px-base:--spacing(5)] [--frame-panel-header-py-base:--spacing(2.5)] [--frame-panel-footer-px-base:--spacing(5)] [--frame-panel-footer-py-base:--spacing(2.5)]`},stacked:{true:``,false:``},dense:{true:`p-0 gap-0 border-[var(--frame-border-color)] [--frame-panel-radius:var(--frame-radius)] [&_[data-slot=frame-panel]]:-mx-px [&_[data-slot=frame-panel]]:before:hidden [&_[data-slot=frame-panel]:last-child]:-mb-px [&:not(:has([data-slot=frame-panel-header]))_[data-slot=frame-panel]:is(:first-child)]:-mt-px`,false:``}},defaultVariants:{variant:`default`,spacing:`default`,stacked:!1,dense:!1}});function RG({className:e,variant:t,spacing:n,stacked:r,dense:i,...a}){return(0,V.jsx)(`div`,{className:J(LG({variant:t,spacing:n,stacked:r,dense:i}),e),"data-slot":`frame`,"data-spacing":n,...a})}function zG({className:e,fit:t,...n}){return(0,V.jsx)(`div`,{className:J(`relative min-w-0 [[data-slot=frame-panel-header]+&]:border-t [[data-slot=frame-panel]+&]:border-t border-(--frame-panel-border-color)`,!t&&`grow`,`px-(--frame-panel-px) py-(--frame-panel-py)`,e),"data-slot":`frame-panel`,...n})}function BG({className:e,...t}){return(0,V.jsx)(`header`,{className:J(`flex flex-col gap-(--frame-panel-header-gap) px-(--frame-panel-header-px) py-(--frame-panel-header-py)`,e),"data-slot":`frame-panel-header`,...t})}var VG={master:`master`,scout:`scout`,worker:`worker`,reviewer:`QA gate`,researcher:`research`,quickfix:`quick fix`,planner:`oracle (plan)`,panel:`panel`};function HG(e){let t=Number.isFinite(e)?Math.max(0,Math.round(e/1e3)):0,n=Math.floor(t/60);if(n===0)return`${t}s`;let r=t%60;return r===0?`${n}m`:`${n}m ${String(r).padStart(2,`0`)}s`}function UG(e){return e>0?HG(e):`—`}function WG(e,t){return t>0?`${Math.round(e/t*100)}%`:`—`}function GG(e){return e<=0?`—`:e<.01?`<$0.01`:`$${e.toFixed(2)}`}function KG(e){return!Number.isFinite(e)||e<1e3?String(Math.max(0,Math.round(e||0))):e<1e6?`${Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1)}M`}function qG(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)}s`}function JG(e){return e>=.9?{icon:`✓`,word:`healthy`,tone:`healthy`}:e>=.7?{icon:`!`,word:`shaky`,tone:`shaky`}:{icon:`✗`,word:`failing`,tone:`failing`}}function YG(e){return e===`model`?`by model · thinking`:`by model · thinking · agent`}function XG(e,t){let n=t===`model-kind`?VG[e.kinds[0]??``]??e.kinds[0]??``:``;return[e.model,e.thinking,n].filter(Boolean).join(` · `)}var ZG=[`bg-chart-1`,`bg-chart-2`,`bg-chart-3`,`bg-chart-4`,`bg-chart-5`],QG={MASTER:`bg-primary`,ORACLE:`bg-primary`,DEV:`bg-source-dev`,DESIGN:`bg-source-design`,QA:`bg-source-qa`,RESEARCH:`bg-source-research`,"QUICK FIX":`bg-source-quickfix`};function $G(e){let t=QG[e.toUpperCase()];if(t)return t;let n=0;for(let t of e)n=(n*31+t.charCodeAt(0))%ZG.length;return ZG[n]??ZG[0]}function eK(e){return VG[e]??e}var tK=6;function nK({daily:e,cost:t}){let n=vf(),[r,i]=(0,m.useState)(null),a=t?`Daily cost`:`Daily runs`,o=e.map(e=>t?e.cost:e.runs),s=Math.max(...o,t?.01:1),c=t?[0,s/2,s]:[...new Set([0,Math.ceil(s/2),s])],l=Date.parse(e[0]?.date??`1970-01-01`),u=Date.parse(e.at(-1)?.date??`1970-01-01`),d=Math.max(1,(u-l)/864e5),f=e=>52+(Date.parse(e)-l)/(d*864e5)*424,p=Math.max(.5,Math.min(28,424/(d+1)*.65)),h=e=>t?`$${e.toFixed(2)}`:String(Math.round(e)),g=e=>new Date(`${e}T12:00:00Z`).toLocaleDateString(void 0,{month:`short`,day:`numeric`,timeZone:`UTC`}),_=[...new Set([e[0]?.date,e[Math.floor(e.length/2)]?.date,e.at(-1)?.date])].filter(e=>!!e);return(0,V.jsxs)(iK,{title:a,right:t?`USD · per day`:`all runs · successful runs`,children:[(0,V.jsx)(`div`,{className:`flex min-h-5 flex-wrap items-baseline gap-x-2 text-xs`,"aria-live":`polite`,children:r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`font-medium`,children:g(r.date)}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:t?h(r.cost):`${r.runs} runs · ${r.successes} successful`})]}):(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Hover or focus a day to inspect it.`})}),(0,V.jsxs)(`svg`,{viewBox:`0 0 512 220`,className:`w-full overflow-visible`,role:`group`,"aria-label":a,children:[c.map(e=>(0,V.jsxs)(`g`,{"aria-hidden":`true`,children:[(0,V.jsx)(`line`,{x1:`36`,x2:`494`,y1:180-e/s*144,y2:180-e/s*144,stroke:`var(--workspace-border)`,strokeDasharray:`3 5`,opacity:`0.6`}),(0,V.jsx)(`text`,{x:`29`,y:184-e/s*144,textAnchor:`end`,fill:`var(--muted-foreground)`,fontSize:`10`,children:h(e)})]},e)),e.map((e,a)=>{let o=(t?e.cost:e.runs)/s*144,c=l===u?264:f(e.date),d=`${e.date}: ${t?h(e.cost):`${e.runs} runs, ${e.successes} successful`}`;return(0,V.jsxs)(`g`,{role:`img`,"aria-label":d,tabIndex:0,className:`outline-none`,onFocus:()=>i(e),onBlur:()=>i(null),onPointerEnter:()=>i(e),onPointerLeave:()=>i(null),children:[(0,V.jsx)(`title`,{children:d}),(0,V.jsx)(`rect`,{x:c-Math.max(p,12)/2,y:`26`,width:Math.max(p,12),height:`156`,rx:`4`,fill:`var(--accent)`,opacity:+(r?.date===e.date)}),(0,V.jsx)(H.rect,{"data-trend-bar":!0,x:c-p/2,width:p,rx:`3`,fill:`var(--chart-1)`,initial:!n&&{height:0,y:180},animate:{height:o,y:180-o},transition:{duration:n?0:.65,delay:n?0:Math.min(a*.04,.3),ease:[.22,1,.36,1]}}),t?null:(0,V.jsx)(H.rect,{x:c-p/2,width:p,rx:`3`,fill:`var(--success)`,initial:!n&&{height:0,y:180},animate:{height:e.successes/s*144,y:180-e.successes/s*144},transition:{duration:n?0:.65,delay:n?0:Math.min(a*.04,.3)}})]},e.date)}),_.map(e=>(0,V.jsx)(`text`,{"aria-hidden":`true`,x:l===u?264:f(e),y:`205`,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`11`,children:g(e)},e))]}),t?null:(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-4 text-xs text-muted-foreground`,children:[(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`i`,{className:`size-2 rounded-sm bg-primary`,"aria-hidden":`true`}),`All runs`]}),(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`i`,{className:`size-2 rounded-sm bg-success`,"aria-hidden":`true`}),`Successful`]})]})]})}function rK({daily:e}){return(0,V.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,V.jsx)(nK,{daily:e}),(0,V.jsx)(nK,{daily:e,cost:!0})]})}function iK({title:e,right:t,children:n}){return(0,V.jsxs)(RG,{role:`region`,className:`min-w-0`,"aria-label":e,children:[(0,V.jsx)(BG,{className:`py-2.5`,children:(0,V.jsxs)(`h2`,{className:`flex items-baseline justify-between gap-3 text-sm font-semibold`,children:[(0,V.jsx)(`span`,{children:e}),t?(0,V.jsx)(`span`,{className:`truncate text-xs font-normal text-muted-foreground`,children:t}):null]})}),(0,V.jsx)(zG,{className:`flex min-w-0 flex-col gap-3`,children:n})]})}function aK({rows:e,render:t}){let[n,r]=(0,m.useState)(!1),i=n?e:e.slice(0,tK);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:i.map(t)}),e.length>tK?(0,V.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"aria-expanded":n,onClick:()=>r(e=>!e),className:`h-6 self-start rounded-lg text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:n?`Show fewer`:`Show all ${e.length}`}):null]})}function oK({width:e,className:t,title:n}){let r=vf();return(0,V.jsx)(H.div,{"data-chart-bar":!0,title:n,className:`h-full ${t}`,initial:!r&&{width:0},animate:{width:`${e}%`},transition:{duration:r?0:.7,ease:[.22,1,.36,1]}})}function sK(e,t){return t>0?Math.max(1.5,e/t*100):0}function cK({label:e,value:t,marker:n,max:r,valueText:i,sub:a}){return(0,V.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,V.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[i,a?(0,V.jsx)(`span`,{className:`ml-2 text-xs text-muted-foreground`,children:a}):null]})]}),(0,V.jsxs)(`div`,{className:`relative h-5 overflow-hidden rounded-md border border-border bg-muted chart-track`,role:`img`,"aria-label":`${e}: ${i}`,children:[(0,V.jsx)(oK,{className:`rounded-r-md bg-linear-to-r from-primary/65 to-primary`,width:sK(t,r)}),n?(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-1/2 h-3 w-0.5 -translate-y-1/2 rounded-full bg-foreground/40`,style:{left:`${Math.min(99.5,sK(n,r))}%`}}):null]})]})}function lK({groups:e,label:t}){let n=e.filter(e=>e.avgMs>0).sort((e,t)=>t.avgMs-e.avgMs),r=Math.max(...n.map(e=>Math.max(e.avgMs,e.p90Ms)),1);return(0,V.jsx)(iK,{title:`Average run time`,right:`per model · thinking · tick is p90`,children:n.length===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,V.jsx)(aK,{rows:n,render:e=>(0,V.jsx)(cK,{label:t(e),value:e.avgMs,marker:e.p90Ms,max:r,valueText:UG(e.avgMs),sub:`p90 ${UG(e.p90Ms)}`},t(e))})})}var uK={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`},dK={healthy:`text-success`,shaky:`text-warning`,failing:`text-destructive`};function fK({label:e,rate:t,runs:n}){let r=JG(t),i=`${Math.round(t*100)}%`;return(0,V.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,V.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 tabular-nums`,children:[(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5 ${dK[r.tone]}`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full ${uK[r.tone]}`}),(0,V.jsx)(`span`,{className:`sr-only`,children:r.word}),i]}),(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` run`,n===1?``:`s`]})]})]}),(0,V.jsxs)(`div`,{className:`flex h-5 overflow-hidden rounded-md border border-border bg-muted`,role:`img`,"aria-label":`${e}: ${r.word}, ${i} of ${n} runs`,children:[(0,V.jsx)(oK,{className:`bg-success/80`,width:t*100}),(0,V.jsx)(oK,{className:`bg-destructive/60`,width:(1-t)*100})]})]})}function pK({groups:e,label:t}){let n=e.filter(e=>e.runs>0).sort((e,t)=>e.successes/e.runs-t.successes/t.runs);return(0,V.jsx)(iK,{title:`Success rate`,right:`green worked · red failed`,children:n.length===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No runs yet.`}):(0,V.jsx)(aK,{rows:n,render:e=>(0,V.jsx)(fK,{label:t(e),rate:e.successes/e.runs,runs:e.runs},t(e))})})}function mK({share:e}){return(0,V.jsx)(`ul`,{className:`flex flex-wrap gap-x-6 gap-y-1.5 text-xs`,children:e.map(e=>(0,V.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`size-2 shrink-0 rounded-full ${$G(e.agent)}`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`text-[0.8125rem]`,children:cW(e.agent)}),(0,V.jsxs)(`span`,{className:`tabular-nums`,children:[Math.round(e.share*100),`%`]}),(0,V.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`avg `,HG(e.ms/Math.max(1,e.runs)),` ×`,e.runs]})]},e.agent))})}function hK({share:e}){return(0,V.jsx)(`div`,{className:`flex h-6 gap-0.5 overflow-hidden rounded-md border border-border bg-muted`,role:`img`,"aria-label":`Share of run time by agent`,children:e.map(e=>(0,V.jsx)(oK,{className:`${$G(e.agent)} opacity-85`,width:e.share*100,title:`${e.agent} ${Math.round(e.share*100)}%`},e.agent))})}function gK({times:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.avgMs),1);return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2.5 pt-1`,children:[(0,V.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Request to done, by the oracle's model`}),(0,V.jsx)(aK,{rows:e,render:e=>(0,V.jsx)(cK,{label:[e.model,e.thinking].filter(Boolean).join(` · `),value:e.avgMs,max:t,valueText:HG(e.avgMs),sub:`×${e.tasks}`},`${e.model}-${e.thinking}`)})]})}function _K({timeShare:e}){let t=e.byAgent;return(0,V.jsxs)(iK,{title:`Where the time goes`,right:`share of run time by agent`,children:[t.length===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,V.jsx)(hK,{share:t}),(0,V.jsx)(mK,{share:t})]}),(0,V.jsx)(gK,{times:e.taskTimes})]})}var vK=`reui-select inline-flex h-8 min-w-36 cursor-pointer items-center justify-between gap-2 rounded-lg border px-[calc(--spacing(3)-1px)] text-left text-sm text-foreground outline-none select-none transition-[color,box-shadow,background-color,border-color] duration-150 focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-ring/24 disabled:pointer-events-none disabled:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0`,yK=`-me-1 size-3 shrink-0 opacity-50`,bK=`flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-sm text-foreground outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[state=checked]:bg-foreground/[0.08] data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-7`;function xK(e){return(0,V.jsx)(dD,{...e})}function SK(e){return(0,V.jsx)(hD,{"data-slot":`select-value`,...e})}function CK({className:e,children:t,...n}){return(0,V.jsxs)(pD,{"data-slot":`select-trigger`,className:J(vK,e),...n,children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:t}),(0,V.jsx)(gD,{asChild:!0,children:(0,V.jsx)(Bp,{"aria-hidden":`true`,strokeWidth:2.25,className:yK})})]})}function wK({className:e,children:t,position:n=`popper`,align:r=`start`,...i}){return(0,V.jsx)(yD,{children:(0,V.jsxs)(xD,{"data-slot":`select-content`,position:n,align:r,sideOffset:4,className:J(`dropdown-glass z-50 max-h-(--radix-select-content-available-height) min-w-(--radix-select-trigger-width) origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg p-1 text-foreground data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.98] motion-reduce:animate-none`,e),...i,children:[(0,V.jsx)(UD,{className:`flex h-6 justify-center items-center`,children:(0,V.jsx)(Kp,{"aria-hidden":`true`,className:`size-4`})}),(0,V.jsx)(ND,{children:t}),(0,V.jsx)(GD,{className:`flex h-6 justify-center items-center`,children:(0,V.jsx)(Bp,{"aria-hidden":`true`,className:`size-4`})})]})})}function TK({className:e,children:t,...n}){return(0,V.jsx)(zD,{"data-slot":`select-item`,className:J(bK,e),...n,children:(0,V.jsx)(VD,{children:t})})}function EK({className:e,type:t,...n}){return(0,V.jsx)(`input`,{type:t,"data-slot":`input`,className:J(`flex h-8 w-full rounded-lg border border-input bg-background bg-clip-padding px-3 py-1 text-base shadow-control transition-[border-color,box-shadow] duration-150 outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/24 focus-visible:shadow-none disabled:cursor-not-allowed disabled:opacity-64 aria-invalid:border-destructive/36 aria-invalid:focus-visible:border-destructive/64 aria-invalid:focus-visible:ring-destructive/16 md:text-sm dark:bg-input/32`,e),...n})}var DK=[{value:`all`,label:`All time`},{value:`today`,label:`Today`},{value:`week`,label:`Past 7 days`},{value:`range`,label:`Date range`}];function OK(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function kK({onChange:e}){let[t,n]=(0,m.useState)(`all`),r=OK(new Date),[i,a]=(0,m.useState)(r),[o,s]=(0,m.useState)(r),[c,l]=(0,m.useState)(``);function u(t){if(n(t),l(``),t===`all`)e({});else if(t===`range`)i&&o&&i<=o&&e({from:i,to:o});else{let n=new Date;t===`week`&&n.setDate(n.getDate()-6),e({from:OK(n),to:r})}}return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-end gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,V.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Period`}),(0,V.jsxs)(xK,{value:t,onValueChange:u,children:[(0,V.jsx)(CK,{"aria-label":`Metrics period`,children:(0,V.jsx)(SK,{})}),(0,V.jsx)(wK,{children:DK.map(e=>(0,V.jsx)(TK,{value:e.value,children:e.label},e.value))})]})]}),t===`range`?(0,V.jsxs)(`form`,{className:`flex min-w-0 flex-wrap items-end gap-2`,onSubmit:t=>{if(t.preventDefault(),!i||!o||i>o){l(`Choose an end date on or after the start date.`);return}l(``),e({from:i,to:o})},children:[(0,V.jsxs)(`label`,{className:`flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground`,children:[`Start date`,(0,V.jsx)(EK,{type:`date`,required:!0,value:i,onChange:e=>a(e.target.value),className:`h-9 w-36 max-w-full text-xs`})]}),(0,V.jsxs)(`label`,{className:`flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground`,children:[`End date`,(0,V.jsx)(EK,{type:`date`,required:!0,value:o,onChange:e=>s(e.target.value),className:`h-9 w-36 max-w-full text-xs`})]}),(0,V.jsx)(X,{type:`submit`,size:`sm`,className:`h-9`,children:`Apply`}),c?(0,V.jsx)(`p`,{role:`alert`,className:`w-full text-xs text-destructive`,children:c}):null]}):null]})}function AK({label:e,value:t,sub:n}){return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,V.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:t}),n?(0,V.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n}):null]})}var jK=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function MK({summary:e}){let t=Object.entries(e.byPurpose).sort((e,t)=>t[1]-e[1]);return(0,V.jsxs)(`section`,{className:`card-flat flex flex-col gap-3 rounded-xl border p-4`,"aria-label":`Classifier (Jev)`,children:[(0,V.jsx)(`h2`,{className:`text-sm font-medium`,children:`Classifier (Jev)`}),e.calls===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`no calls recorded`}):(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-3 sm:grid-cols-4`,children:[(0,V.jsx)(AK,{label:`Calls`,value:jK(e.calls,`call`),sub:`${WG(e.ok,e.calls)} ok`}),(0,V.jsx)(AK,{label:`Speed`,value:`p50 ${qG(e.p50Ms)}`,sub:`p90 ${qG(e.p90Ms)}`}),(0,V.jsx)(AK,{label:`Read`,value:e.input>0?`${KG(e.input)} tokens`:`—`}),(0,V.jsx)(AK,{label:`Routed down`,value:e.routed>0?jK(e.routed,`run`):`none`,sub:e.routed>0?`${WG(e.routedOk,e.routed)} ok`:`no runs routed`})]}),(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`text-primary`,children:`spared`}),` `,jK(e.seatRunsSkipped,`seat run`),` skipped · `,jK(e.questionsAnswered,`question`),` answered · `,jK(e.quickFixesHeld,`quick fix`,`quick fixes`),` held`,t.length>0?(0,V.jsx)(`span`,{className:`ml-3 border-l border-border pl-3`,children:t.map(([e,t])=>`${e} ${t}`).join(` · `)}):null]})]})}var NK=[`Runs`,`OK`,`Avg`,`p50`,`p90`,`Turns`,`Tools`,`Tokens`,`tok/s`,`$/run`,`$ total`,`Stalls`];function PK(e,t=0){return e>0?e.toFixed(t):`—`}function FK(e){return[String(e.runs),WG(e.successes,e.runs),UG(e.avgMs),UG(e.p50Ms),UG(e.p90Ms),PK(e.avgTurns,1),PK(e.avgTools,1),e.avgTokens>0?KG(e.avgTokens):`—`,e.tokensPerSecond>0?e.tokensPerSecond.toFixed(0):`—`,GG(e.avgCost),GG(e.totalCost),e.timeouts>0?String(e.timeouts):`—`]}function IK(e,t){return t===`model-kind`?eK(e.kinds[0]??``):e.kinds.map(eK).join(`, `)}function LK({groups:e,groupBy:t}){return(0,V.jsxs)(`section`,{className:`card-flat flex min-h-0 flex-col gap-2 overflow-hidden rounded-xl border pt-4`,"aria-label":`All models`,children:[(0,V.jsxs)(`h2`,{className:`flex flex-wrap items-baseline justify-between gap-3 px-4 text-sm font-medium`,children:[(0,V.jsx)(`span`,{children:`All models`}),(0,V.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[t===`model`?`by model · thinking`:`by model · thinking · agent`,` · sorted by runs`]})]}),(0,V.jsx)(`div`,{className:`max-h-80 overflow-auto outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,tabIndex:0,role:`region`,"aria-label":`All model metrics, scroll horizontally to see all columns`,children:(0,V.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,V.jsx)(`thead`,{className:`sticky top-0 bg-card text-muted-foreground`,children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Model`}),(0,V.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Think`}),(0,V.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:t===`model-kind`?`Agent`:`Agents`}),NK.map(e=>(0,V.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-right font-medium whitespace-nowrap`,children:e},e))]})}),(0,V.jsx)(`tbody`,{children:e.map(e=>(0,V.jsxs)(`tr`,{className:`border-t border-border/70 transition-colors hover:bg-muted`,children:[(0,V.jsx)(`th`,{scope:`row`,className:`px-3 py-1.5 text-left font-normal text-foreground`,children:e.model}),(0,V.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:e.thinking||`—`}),(0,V.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:IK(e,t)||`—`}),FK(e).map((e,t)=>(0,V.jsx)(`td`,{className:`px-3 py-1.5 text-right tabular-nums whitespace-nowrap text-foreground`,children:e},NK[t]))]},XG(e,t)))})]})})]})}var RK={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`};function zK({label:e,value:t,sub:n,dot:r}){return(0,V.jsxs)(`div`,{className:`workspace-section flex min-w-0 flex-col gap-1 rounded-xl border px-4 py-4 shadow-xs`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,V.jsxs)(`span`,{className:`flex items-center gap-2 text-2xl leading-tight font-semibold tracking-tight tabular-nums`,children:[r?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${RK[r.tone]}`}),(0,V.jsx)(`span`,{className:`sr-only`,children:r.word})]}):null,t]}),(0,V.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n||`\xA0`})]})}function BK({tiles:e}){let t=JG(e.runs>0?e.successes/e.runs:0),n=e.runs-e.successes;return(0,V.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-5 [&>:last-child]:col-span-2 sm:[&>:last-child]:col-span-1`,children:[(0,V.jsx)(zK,{label:`Runs`,value:String(e.runs),sub:e.runs===0?`no runs yet`:``}),(0,V.jsx)(zK,{label:`Success`,value:WG(e.successes,e.runs),sub:`${n} failed${e.stalls>0?` · ${e.stalls} stalled`:``}`,dot:{tone:t.tone,word:t.word}}),(0,V.jsx)(zK,{label:`Avg run`,value:UG(e.avgMs),sub:`p90 ${UG(e.p90Ms)}`}),(0,V.jsx)(zK,{label:`Cost`,value:GG(e.cost),sub:e.runs>0?`${GG(e.cost/e.runs)} per run`:`—`}),(0,V.jsx)(zK,{label:`Tasks`,value:`${e.completed} done`,sub:e.avgCompleteMs>0?`avg ${HG(e.avgCompleteMs)} · ${e.active} active`:`${e.active} active`})]})}var VK=`No runs recorded yet. Every Master turn, subagent run, quick fix and planning round lands here with its model, thinking level, time, tokens and cost.`;function HK({groupBy:e,onGroup:t}){return(0,V.jsx)(`div`,{role:`radiogroup`,"aria-label":`Group by`,className:`flex max-w-full flex-wrap gap-0.5 rounded-lg bg-muted p-0.5`,onKeyDown:n=>{let r=n.key===`ArrowRight`||n.key===`ArrowDown`?1:n.key===`ArrowLeft`||n.key===`ArrowUp`?-1:0;if(!r)return;n.preventDefault();let i=[`model`,`model-kind`],a=i[(i.indexOf(e)+r+i.length)%i.length];t(a),requestAnimationFrame(()=>n.currentTarget.querySelector(`[aria-checked='true']`)?.focus())},children:[`model`,`model-kind`].map(n=>(0,V.jsx)(X,{variant:`ghost`,size:`sm`,role:`radio`,tabIndex:e===n?0:-1,className:e===n?`bg-card text-foreground shadow-card hover:bg-card`:`text-muted-foreground`,"aria-checked":e===n,onClick:()=>t(n),children:YG(n)},n))})}function UK({query:e,onQuery:t}){return(0,V.jsxs)(`label`,{className:`relative flex max-w-full items-center`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:`Search runs`}),(0,V.jsx)(Wh,{"aria-hidden":`true`,className:`pointer-events-none absolute left-2.5 size-3.5 text-muted-foreground`}),(0,V.jsx)(`input`,{id:`metrics-search`,type:`search`,value:e,maxLength:500,placeholder:`Search runs: model, agent, tool…`,onChange:e=>t(e.target.value),className:`h-8 w-64 max-w-full rounded-lg border border-input bg-background pr-9 pl-8 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30`}),(0,V.jsx)(kk,{chord:`/`,className:`kbd-hint pointer-events-none absolute right-2`})]})}function WK({data:e,groupBy:t,query:n}){let r=e=>XG(e,t);return(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,V.jsx)(BK,{tiles:e.tiles}),e.tiles.runs===0?(0,V.jsx)(`p`,{className:`card-flat rounded-xl border p-4 text-sm text-muted-foreground`,children:n?`No run matches "${n}" in this period.`:`No runs in this period. ${VK}`}):null,e.daily.length>0?(0,V.jsx)(rK,{daily:e.daily}):null,e.classifier?(0,V.jsx)(MK,{summary:e.classifier}):null,e.tiles.runs>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,V.jsx)(lK,{groups:e.groups,label:r}),(0,V.jsx)(pK,{groups:e.groups,label:r})]}),(0,V.jsx)(LK,{groups:e.groups,groupBy:t})]}):null,e.tiles.runs>0||e.timeShare.taskTimes.length>0?(0,V.jsx)(_K,{timeShare:e.timeShare}):null]})}function GK(){return(0,V.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,role:`status`,"aria-label":`Loading metrics`,children:[0,1,2,3,4].map(e=>(0,V.jsx)(kj,{shape:`card`,className:`h-20`},e))})}function KK(){let[e,t]=(0,m.useState)(`model`),[n,r]=(0,m.useState)(``),[i,a]=(0,m.useState)({}),o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=JA(`metrics.get`,{groupBy:e,query:n,...i,timeZone:o},[`metrics`]);return!s.data&&s.error?(0,V.jsx)(KA,{message:`Could not load metrics. ${s.error}`,onRetry:s.reload}):(0,V.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-4 px-5 pt-5 pb-dock`,children:[(0,V.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Metrics`}),(0,V.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Daily trends and model performance`})]}),s.loading&&s.data?(0,V.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,V.jsx)(BA,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}),` refreshing`]}):null,(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`})]}),(0,V.jsxs)(`section`,{"aria-label":`Metrics filters`,className:`workspace-section flex flex-wrap items-end gap-4 rounded-xl border p-4`,children:[(0,V.jsx)(kK,{onChange:a}),(0,V.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-end gap-3 lg:w-auto lg:flex-1 lg:justify-end`,children:[(0,V.jsx)(HK,{groupBy:e,onGroup:t}),(0,V.jsx)(UK,{query:n,onQuery:r})]}),(0,V.jsxs)(`p`,{className:`w-full text-xs text-muted-foreground`,children:[i.from?`${i.from} – ${i.to}`:`All recorded dates`,` · `,o,`. Runs and active tasks use their start date; completed tasks use their completion date.`]})]}),s.error?(0,V.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Could not refresh metrics. `,s.error]}):null,(0,V.jsx)(`div`,{"aria-busy":s.loading,className:s.loading&&s.data?`opacity-60`:void 0,children:s.data?(0,V.jsx)(WK,{data:s.data,groupBy:e,query:n},JSON.stringify([s.data,e])):(0,V.jsx)(GK,{})})]})}var qK=class{seen=new Set;initialized=new Set;storage;constructor(e){this.storage=e;try{let t=JSON.parse(e?.getItem(`bot-lobby.prompt-seen`)??`[]`);Array.isArray(t)&&(this.seen=new Set(t.filter(e=>typeof e==`string`)))}catch{}}observe(e,t,n=!1){let r=this.initialized.has(e)&&!n?t.filter(e=>!this.seen.has(e)):[];this.initialized.add(e);for(let e of t)this.seen.add(e);try{this.storage?.setItem(`bot-lobby.prompt-seen`,JSON.stringify([...this.seen]))}catch{}return r}};function JK(e,t){return JSON.stringify([e,`prompt`,t])}function YK(e,t,n){return JSON.stringify([e,`dialog`,t,n])}function XK(e,t,n){return JSON.stringify([e,`delivery`,t,n])}var ZK=`bot-lobby.prompt-sound-muted`,QK=new Set,$K,eq=!1;function tq(){try{return localStorage.getItem(ZK)===`on`}catch{return eq}}function nq(e){eq=e;try{localStorage.setItem(ZK,e?`on`:`off`)}catch{}for(let e of QK)e()}function rq(e){return QK.add(e),()=>{QK.delete(e)}}function iq(){return(0,m.useSyncExternalStore)(rq,tq,()=>!1)}function aq(){(0,m.useEffect)(()=>{let e=()=>{try{$K??=new AudioContext,$K.resume().catch(()=>void 0)}catch{}};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,e)}},[])}function oq(){if(!tq()&&$K&&$K.state===`running`)try{let e=$K.currentTime,t=$K.createOscillator(),n=$K.createGain();t.frequency.setValueAtTime(960,e),t.frequency.exponentialRampToValueAtTime(360,e+.16),n.gain.setValueAtTime(1e-4,e),n.gain.exponentialRampToValueAtTime(.12,e+.012),n.gain.exponentialRampToValueAtTime(1e-4,e+.22),t.connect(n),n.connect($K.destination),t.start(e),t.stop(e+.24),t.onended=()=>{t.disconnect(),n.disconnect()}}catch{}}function sq(){if(!tq()&&$K&&$K.state===`running`)try{let e=$K.currentTime,t=$K.createOscillator(),n=$K.createGain();t.frequency.setValueAtTime(1500,e),n.gain.setValueAtTime(1e-4,e),n.gain.exponentialRampToValueAtTime(.045,e+.004),n.gain.exponentialRampToValueAtTime(1e-4,e+.028),t.connect(n),n.connect($K.destination),t.start(e),t.stop(e+.03),t.onended=()=>{t.disconnect(),n.disconnect()}}catch{}}var cq=`bot-lobby.notifications`,lq=`/icon-192.png`,uq=new Set;function dq(){for(let e of[...uq])e()}function fq(){try{return localStorage.getItem(cq)===`on`}catch{return!1}}function pq(e){return uq.add(e),()=>{uq.delete(e)}}function mq(e){try{localStorage.setItem(cq,e?`on`:`off`)}catch{}dq()}function hq(){return(0,m.useSyncExternalStore)(pq,fq,()=>!1)}async function gq(){return typeof Notification>`u`?`unsupported`:(Notification.permission==="default"&&await Notification.requestPermission().catch(()=>void 0),Notification.permission===`granted`?(mq(!0),`granted`):`denied`)}function _q(){mq(!1)}function vq(e){if(e===`completed`)return`finished`;if(e===`abandoned`)return`dropped`}function yq(){return typeof Notification<`u`&&Notification.permission===`granted`&&document.hidden}function bq(e){try{new Notification(`bot-lobby`,{body:e,icon:lq,tag:`bot-lobby`})}catch{}}function xq(){try{return new qK(sessionStorage)}catch{return new qK}}function Sq(e,t){let n=t.payload;return t.kind===`sessionDialog`&&n?.dialog?.id?YK(e,t.sessionId??n.key??t.from,n.dialog.id):JK(e,t.id)}function Cq(){let e=hq();aq(),jk();let t=JA(`tasks.list`,{},[`tasks`]),n=JA(`sessions.list`,{},[`sessions`]),r=F.get(`prompts`),i=F.get(`lobby`).data,a=(0,m.useRef)(xq()),o=(0,m.useRef)(new Set([`prompts`,`sessions`,`delivery`])),s=(0,m.useRef)(void 0),c=fe()??`current`,l=F.status().connection;return{enabled:e,tasks:t,sessions:n,prompts:r,lobby:i,seen:a,quiet:o,previousState:s,project:c,connection:l,lastConnection:(0,m.useRef)(l)}}function wq(e,t,n,r,i){if(!i)return;let{seen:a,project:o,quiet:s,enabled:c}=e,l=a.current.observe(`${o}:${t}`,n,s.current.has(t));s.current.delete(t),l.length&&(l.forEach(()=>oq()),c&&yq()&&bq(r),t===`delivery`&&np.info(r,{action:{label:`Review tasks`,onClick:()=>MA(`#/tasks`)}}))}function Tq(e){let{prompts:t,sessions:n,tasks:r,project:i}=e,a=t.data?.prompts;wq(e,`prompts`,(a??[]).map(e=>Sq(i,e)),`A question is waiting for you.`,!!a&&!t.loading),wq(e,`sessions`,n.data?.background.flatMap(e=>e.dialogs.map(t=>YK(i,e.sessionId??e.key,t.id)))??[],`A background session is asking something.`,!!n.data&&!n.loading),wq(e,`delivery`,r.data?.rows.filter(e=>e.delivery&&(e.delivery.status===`pending_approval`||e.delivery.status===`deferred`||e.delivery.status===`recoverable_failure`)).map(e=>XK(i,e.id,e.delivery.reviewId))??[],`Completed work is ready for delivery review in Tasks.`,!!r.data&&!r.loading)}function Eq(e){let{lastConnection:t,connection:n,quiet:r,previousState:i,lobby:a,enabled:o}=e;if(t.current!==n||n!==`live`){t.current=n,r.current=new Set([`prompts`,`sessions`,`delivery`]),i.current=void 0;return}Tq(e);let s=a?.task?.state??``,c=vq(s);i.current&&c&&s!==i.current&&o&&yq()&&bq(`${a?.task?.title??`The task`} ${c}.`),i.current=s}function Dq(){let e=Cq(),{connection:t,enabled:n,project:r,prompts:i,sessions:a,tasks:o,lobby:s}=e;(0,m.useEffect)(()=>Eq(e),[t,n,r,i.data,i.loading,a.data,a.loading,o.data,o.loading,s])}function Oq({className:e,thumbClassName:t,...n}){return(0,V.jsx)(uO,{"aria-keyshortcuts":`Enter Space`,"aria-description":`When focused, press Enter or Space to toggle.`,"data-slot":`switch`,className:J(`peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent outline-none before:absolute before:-inset-x-2 before:-inset-y-3 before:content-[''] transition-[background-color,box-shadow] duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-64 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...n,children:(0,V.jsx)(fO,{"data-slot":`switch-thumb`,className:J(`pointer-events-none block size-4 rounded-full bg-background shadow-sm/5 ring-0 [transition:translate_.15s,scale_.1s_.1s] origin-left in-[[role=switch]:active]:scale-x-110 data-[state=checked]:origin-right data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:bg-white`,t)})})}function kq(e,t,n){let r=-1;for(let i=0;i<e.length;i+=1)t.includes(e[i])&&(r<0||Math.abs(i-n)<Math.abs(r-n))&&(r=i);return r}function Aq(e,t,n,r){for(let i=n+r;i>=0&&i<e.length;i+=r)if(t.includes(e[i]))return i;return n}var jq={off:`No extra reasoning: the quickest, cheapest answer.`,minimal:`A moment of reasoning, barely.`,low:`Light reasoning for simple work.`,medium:`Balanced reasoning for most work.`,high:`Careful reasoning: slower, better on hard problems.`,xhigh:`Very deep reasoning: slow and costly.`,max:`As deep as the model goes.`};function Mq(e,t,n,r){let i=Math.max(t.length-1,1);if(e===`ArrowRight`||e===`ArrowUp`)return Aq(t,n,r,1);if(e===`ArrowLeft`||e===`ArrowDown`)return Aq(t,n,r,-1);if(e===`Home`)return kq(t,n,0);if(e===`End`)return kq(t,n,i)}function Nq(e,t,n,r,i){let a=e.current?.getBoundingClientRect();if(!a||a.width===0)return i;let o=Math.min(1,Math.max(0,(t-a.left)/a.width));return kq(n,r,Math.round(o*Math.max(n.length-1,1)))}function Pq(e){let[t,n]=(0,m.useState)(),r=(0,m.useRef)(void 0),i=(0,m.useRef)(0),a=(0,m.useCallback)(()=>{r.current=void 0,i.current=0,n(void 0)},[]);return(0,m.useEffect)(()=>{if(t===void 0)return;let e=window.setTimeout(a,1e4);return()=>window.clearTimeout(e)},[t,a]),{chosenByKey:t,intended:r,choose:(t,o)=>{r.current=t,n(t),i.current+=1,Promise.resolve(e(o)).catch(()=>void 0).then(()=>{--i.current,i.current<=0&&a()})}}}function Fq({levels:e,supported:t,value:n,disabled:r,onChange:i}){let a=(0,m.useRef)(null),[o,s]=(0,m.useState)(),c=Pq(i),l=kq(e,t,Math.max(0,e.indexOf(n))),u=o??c.chosenByKey??l,d=n=>Nq(a,n,e,t,l);function f(e){r||t.length===0||(e.currentTarget.setPointerCapture(e.pointerId),s(d(e.clientX)))}function p(e){if(o===void 0)return;let t=d(e.clientX);t!==o&&s(t)}function h(){if(o===void 0)return;let t=e[o];s(void 0),t&&t!==n&&i(t)}function g(n){if(r||u<0)return;let i=c.intended.current??u,a=Mq(n.key,e,t,i);if(a===void 0)return;n.preventDefault();let o=e[a];o&&a!==i&&c.choose(a,o)}function _(n){let i=e[n];!r&&i&&t.includes(i)&&n!==(c.intended.current??u)&&c.choose(n,i)}return{track:a,shown:u,dragging:o!==void 0,jump:_,handlers:{onPointerDown:f,onPointerMove:p,onPointerUp:h,onPointerCancel:()=>s(void 0),onKeyDown:g}}}var Iq={xhigh:`Extra high`},Lq=e=>Iq[e]??`${e.charAt(0).toUpperCase()}${e.slice(1)}`,Rq={type:`spring`,stiffness:520,damping:38},zq={off:`var(--muted-foreground)`,minimal:`oklch(0.68 0.07 250)`,low:`oklch(0.66 0.12 255)`,medium:`oklch(0.62 0.17 270)`,high:`oklch(0.6 0.2 292)`,xhigh:`oklch(0.66 0.21 335)`,max:`oklch(0.64 0.21 300)`},Bq=`1.375rem`,Vq=[`oklch(0.62 0.22 300)`,`oklch(0.7 0.19 340)`,`oklch(0.8 0.12 215)`,`oklch(0.55 0.2 275)`],Hq=10;function Uq(e){let t=Math.sin(e*12.9898+78.233)*43758.5453;return t-Math.floor(t)}function Wq({value:e,levels:t,supported:n,recommended:r,model:i,label:a,disabled:o,onChange:s}){let c=vf()??!1,l=Fq({levels:t,supported:n,value:e,disabled:o,onChange:s}),{shown:u,dragging:d}=l,f=Math.max(t.length-1,1),p=Math.max(u,0),m=t[u]??e,h=p===t.length-1&&t.length>1,g=u>=0&&!d&&m!==e,_=r?kq(t,n,Math.max(0,t.indexOf(r))):-1,v=i??`this model`,y=d||c?{duration:0}:Rq,b=zq[m]??`var(--primary)`,x=e=>`calc(${Bq} + (100% - 2 * ${Bq}) * ${e/f})`;return(0,V.jsxs)(`div`,{className:J(`grid min-w-0 gap-2.5`,o&&`opacity-64`),style:{"--effort-tone":b},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,"aria-hidden":`true`,children:[`Effort`,` `,(0,V.jsx)(`span`,{"data-slot":`effort-value`,className:J(`font-semibold transition-colors duration-200`,h?`text-[oklch(0.72_0.12_225)] dark:text-[oklch(0.82_0.1_220)]`:`text-(--effort-tone)`,m===`off`&&`text-foreground`),children:Lq(m)})]}),(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`About effort`,className:`rounded-full text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring`,children:(0,V.jsx)(nm,{className:`size-4`})})}),(0,V.jsx)(QA,{children:`More effort means more reasoning before each answer: slower and costlier, better on hard problems.`})]})]}),(0,V.jsxs)(`div`,{className:`flex justify-between px-1 text-xs text-muted-foreground`,"aria-hidden":`true`,children:[(0,V.jsx)(`span`,{children:`Faster`}),(0,V.jsx)(`span`,{children:`Smarter`})]}),(0,V.jsxs)(`div`,{role:`slider`,tabIndex:o?-1:0,"aria-label":a,"aria-valuemin":0,"aria-valuemax":t.length-1,"aria-valuenow":p,"aria-valuetext":m,"aria-disabled":o||void 0,...l.handlers,"data-slot":`effort-track`,"data-level":m,"data-top":h||void 0,"data-dragging":d||void 0,className:`effort-track relative h-11 cursor-pointer touch-none rounded-full outline-none select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 overflow-hidden rounded-full`,children:(0,V.jsx)(H.span,{"data-slot":`effort-fill`,className:`effort-fill absolute inset-y-0 left-0`,initial:!1,animate:{width:`calc(${Bq} + (100% - 2 * ${Bq}) * ${p/f} + ${Bq})`},transition:y,children:h?(0,V.jsx)(Gq,{}):null})}),(0,V.jsx)(`div`,{ref:l.track,"aria-hidden":`true`,className:`absolute inset-y-0`,style:{left:Bq,right:Bq}}),t.map((e,t)=>{let r=n.includes(e);return(0,V.jsx)(`span`,{"aria-hidden":`true`,"data-stop":e,"data-supported":r,title:r?Lq(e):`Not supported by ${v}`,className:J(`absolute top-1/2 size-1.5 -translate-x-1/2 -translate-y-1/2 rounded-full transition-colors duration-200`,r?t<=p?`bg-white/70`:`bg-muted-foreground/45`:`ring-1 ring-muted-foreground/45`),style:{left:x(t)}},e)}),_>=0&&_!==p?(0,V.jsx)(`span`,{"aria-hidden":`true`,"data-slot":`effort-recommended-mark`,className:`absolute top-1/2 h-3.5 w-0.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-foreground/35`,style:{left:x(_)}}):null,(0,V.jsxs)(H.span,{"aria-hidden":`true`,"data-slot":`effort-thumb`,className:`absolute top-1/2 z-10`,initial:!1,animate:{left:x(p)},transition:y,children:[h&&!c?(0,V.jsx)(Kq,{}):null,(0,V.jsx)(H.span,{className:`effort-brain relative flex size-9 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full`,initial:!c&&{scale:.86},animate:{scale:d===void 0?1:1.12},transition:{type:`spring`,stiffness:600,damping:18},children:(0,V.jsx)(Ip,{className:`size-5`,strokeWidth:2})},m)]})]}),(0,V.jsx)(`div`,{className:`relative h-4 text-xs`,"aria-hidden":_<0||void 0,children:_>=0?(0,V.jsx)(`span`,{"data-slot":`effort-recommended`,className:J(`absolute top-0 -translate-x-1/2 whitespace-nowrap transition-colors`,p===_?`font-medium text-foreground`:`text-muted-foreground`),style:{left:`clamp(2.5rem, ${x(_)}, calc(100% - 2.5rem))`},children:`Recommended`}):null}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,"aria-live":`polite`,children:jq[m]??``}),g?(0,V.jsxs)(`p`,{className:`text-xs text-warning`,children:[e,` is not supported by `,v,`, so it runs at `,m,`.`]}):null]})}function Gq(){let e=Array.from({length:432},(e,t)=>t);return(0,V.jsx)(`span`,{className:`effort-mosaic absolute inset-0 grid content-center`,"data-slot":`effort-mosaic`,children:e.map(e=>(0,V.jsx)(`i`,{style:{background:Vq[Math.floor(Uq(e)*Vq.length)],opacity:.35+Uq(e+997)*.65,"--twinkle":`${(Uq(e+31)*3).toFixed(2)}s`}},e))})}function Kq(){return(0,V.jsx)(`span`,{className:`effort-sparks`,"data-slot":`effort-sparks`,children:Array.from({length:Hq},(e,t)=>{let n=t/Hq*Math.PI*2+Uq(t)*.5,r=26+Uq(t+7)*14;return(0,V.jsx)(`i`,{style:{"--dx":`${(Math.cos(n)*r).toFixed(1)}px`,"--dy":`${(Math.sin(n)*r*.7).toFixed(1)}px`,"--delay":`${(Uq(t+3)*1.6).toFixed(2)}s`,background:Vq[t%Vq.length]}},t)})})}function qq(e){return(0,V.jsx)(GE,{...e})}function Jq(e){return(0,V.jsx)(KE,{"data-slot":`popover-trigger`,...e})}function Yq({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,V.jsx)(qE,{children:(0,V.jsx)(JE,{"data-slot":`popover-content`,align:t,sideOffset:n,className:J(`reui-menu z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg border p-1 outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.98] data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none`,e),...r})})}function Xq(e,t){let n=`${e.label} ${e.hint??``} ${e.value}`.toLowerCase();return t.toLowerCase().split(/\s+/).filter(Boolean).every(e=>n.includes(e))}function Zq({value:e,options:t,onChange:n,label:r,className:i,disabled:a}){let[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``),[u,d]=(0,m.useState)(0),f=(0,m.useRef)(null),p=(0,m.useId)(),h=(0,m.useMemo)(()=>t.filter(e=>Xq(e,c)),[t,c]),g=t.find(t=>t.value===e);(0,m.useEffect)(()=>{o&&(l(``),d(Math.max(0,t.findIndex(t=>t.value===e))))},[o]),(0,m.useEffect)(()=>{c&&d(0)},[c]),(0,m.useEffect)(()=>{f.current?.querySelector(`[data-index="${u}"]`)?.scrollIntoView({block:`nearest`})},[u,o,h.length]);function _(t){t&&(s(!1),t.value!==e&&n(t.value))}function v(e){e.key===`ArrowDown`?(e.preventDefault(),d(e=>Math.min(h.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),d(e=>Math.max(0,e-1))):e.key===`Home`&&!c?(e.preventDefault(),d(0)):e.key===`End`&&!c?(e.preventDefault(),d(Math.max(0,h.length-1))):e.key===`Tab`?s(!1):e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),_(h[u]))}return(0,V.jsxs)(qq,{open:o,onOpenChange:s,children:[(0,V.jsxs)(Jq,{type:`button`,role:`combobox`,"aria-label":r,"aria-keyshortcuts":`Enter Space ArrowDown ArrowUp`,"aria-description":`When focused, press Enter, Space or an arrow key to choose. Type to search.`,"aria-expanded":o,"aria-haspopup":`listbox`,"aria-controls":o?p:void 0,disabled:a,onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),s(!0))},"data-slot":`select-trigger`,className:J(vK,`w-full min-w-0 overflow-hidden whitespace-nowrap`,i),children:[(0,V.jsx)(`span`,{className:`min-w-0 truncate`,children:g?.label??e}),(0,V.jsx)(Bp,{"aria-hidden":`true`,strokeWidth:2.25,className:yK})]}),(0,V.jsxs)(Yq,{align:`start`,sideOffset:4,collisionPadding:8,onOpenAutoFocus:e=>{e.preventDefault(),e.currentTarget.querySelector(`input`)?.focus()},className:`p-0 flex max-h-[min(20rem,var(--radix-popover-content-available-height))] w-[max(var(--radix-popover-trigger-width),17rem)] max-w-(--radix-popover-content-available-width) flex-col overflow-hidden rounded-lg outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.98] data-closed:animate-out data-closed:fade-out-0`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-2.5`,children:[(0,V.jsx)(Wh,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,V.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),onKeyDown:v,role:`searchbox`,"aria-label":`Search ${r}`,"aria-controls":p,"aria-activedescendant":h[u]?`${p}-${u}`:void 0,placeholder:`Search…`,autoComplete:`off`,spellCheck:!1,className:`h-8 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground`})]}),(0,V.jsxs)(`div`,{ref:f,id:p,role:`listbox`,"aria-label":r,className:`min-h-0 flex-1 overflow-y-auto p-1`,children:[h.length===0?(0,V.jsxs)(`p`,{className:`px-2.5 py-2 text-xs text-muted-foreground`,children:[`Nothing matches “`,c,`”.`]}):null,h.map((t,n)=>(0,V.jsx)(`div`,{id:`${p}-${n}`,role:`option`,"aria-selected":t.value===e,"data-index":n,onPointerMove:()=>d(n),onClick:()=>_(t),className:J(`flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-sm select-none sm:min-h-7`,t.value===e&&`bg-foreground/[0.08]`,n===u&&`bg-accent text-accent-foreground`),children:(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:t.label}),t.hint?(0,V.jsx)(`span`,{className:`line-clamp-2 text-pretty text-xs text-muted-foreground/80`,children:t.hint}):null]})},t.value))]})]})]})}function Qq({label:e,help:t,children:n,stacked:r}){return(0,V.jsxs)(`div`,{className:r?`grid gap-1.5`:`grid gap-1.5 md:grid-cols-[minmax(0,1fr)_minmax(0,18rem)] md:items-center md:gap-6`,children:[(0,V.jsxs)(`div`,{className:`min-w-0 break-words`,children:[(0,V.jsx)(`div`,{className:`break-words text-[0.8125rem] font-medium`,children:e}),t?(0,V.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:t}):null]}),(0,V.jsx)(`div`,{className:`min-w-0`,children:n})]})}function $q({children:e}){return(0,V.jsx)(RG,{dense:!0,children:(0,V.jsx)(zG,{className:`flex flex-col divide-y divide-border py-0 [&>*]:py-3`,children:e})})}function eJ({value:e,items:t,label:n,onChange:r}){return(0,V.jsx)(Zq,{value:e,options:t.map(e=>({value:e.value,label:e.label,...e.help?{hint:e.help}:{}})),label:n,onChange:r,className:`max-md:h-auto max-md:min-h-11 max-md:items-start max-md:py-2 max-md:[&>span:first-child]:overflow-visible max-md:[&>span:first-child]:text-clip max-md:[&>span:first-child]:whitespace-normal max-md:[&>span:first-child]:break-words`})}var tJ=`(prefers-color-scheme: dark)`,nJ=[`dark`,`light`,`system`],rJ=m.createContext(void 0);function iJ(e){return e!==null&&nJ.includes(e)}function aJ(){return window.matchMedia(tJ).matches?`dark`:`light`}function oJ(){let e=document.createElement(`style`);return e.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;transition:none!important}`)),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.remove()})})}}function sJ(e){return e instanceof HTMLElement&&!!(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable='true']`))}function cJ({children:e,defaultTheme:t=`system`,storageKey:n=`theme`,disableTransitionOnChange:r=!0,...i}){let[a,o]=m.useState(()=>{let e=localStorage.getItem(n);return iJ(e)?e:t}),s=m.useCallback(e=>{localStorage.setItem(n,e),o(e)},[n]),c=m.useCallback(e=>{let t=document.documentElement,n=e===`system`?aJ():e,i=r?oJ():null;t.classList.remove(`light`,`dark`),t.classList.add(n),i&&i()},[r]);m.useEffect(()=>{if(c(a),a!==`system`)return;let e=window.matchMedia(tJ),t=()=>{c(`system`)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}},[a,c]),m.useEffect(()=>{let e=e=>{e.repeat||e.metaKey||e.ctrlKey||e.altKey||sJ(e.target)||e.key.toLowerCase()===`d`&&o(e=>{let t=e===`dark`?`light`:e===`light`?`dark`:aJ()===`dark`?`light`:`dark`;return localStorage.setItem(n,t),t})};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[n]),m.useEffect(()=>{let e=e=>{if(e.storageArea===localStorage&&e.key===n){if(iJ(e.newValue)){o(e.newValue);return}o(t)}};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}},[t,n]);let l=m.useMemo(()=>({theme:a,setTheme:s}),[a,s]);return(0,V.jsx)(rJ.Provider,{...i,value:l,children:e})}var lJ=()=>{let e=m.useContext(rJ);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e},uJ=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],dJ={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scout`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`},fJ={model:`Model`,thinking:`Effort`,timeout:`Time limit`,instructions:`Instructions`},pJ=`inherit`,mJ=`inherit`,hJ=`Use the session's current model`,gJ=`__custom__`,_J=`custom…`,vJ=`Type a provider/model id`,yJ={master:`high`,designer:`medium`,backend:`medium`,qa:`medium`,scout:`low`,researcher:`low`,quickfix:`low`,planner:`high`},bJ=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],xJ={agents:`Agents`,workflow:`Workflow`,lint:`Linting`,lobby:`Lobby`,classifier:`Classifier`,appearance:`Appearance`,notifications:`Notifications`,install:`Install as app`},SJ=[{id:`startOn`,label:`On when pi starts`,help:`off: pi starts as plain pi, and ctrl+shift+m or /bot-lobby on turns bot-lobby on (a session that owns a task under way always starts on)`},{id:`issues`,label:`Issues`,help:`GitHub issues under Git`}],CJ=[{id:`conversation`,label:`Conversation pane`},{id:`activity`,label:`Activity steps in the conversation`},{id:`thinking`,label:`Thinking bubble`}],wJ=`shown on the Lobby tab`,TJ=`Planning rounds`,EJ=`how many rounds the panel gets before the oracle settles the rest alone`,DJ=[2,3,5,8,0],OJ=`Split long plans`,kJ=`saving a plan with more steps offers to split it into up to 5 tasks`,AJ=[6,8,10,12,0],jJ=`Port`,MJ=`the base port (then the next free up to +20); 0 means any free port; applies the next time pi starts`,NJ=`Open browser`,PJ=`open this page in the browser when pi starts`,FJ=[{id:`off`,label:`off`,help:`tasks work in the folder you started them in`},{id:`branch`,label:`branch`,help:`each new task gets a git branch named after it, checked out in the working folder`},{id:`worktree`,label:`worktree`,help:`each new task gets its own worktree and branch, named after it: every agent runs there, apart from your checkout`}],IJ=`Git isolation`,LJ=[{id:`off`,label:`off`,help:`agents' work is never linted`},{id:`advise`,label:`advise`,help:`the oracle and QA are told what the project's linter finds on the lines a task changed; nothing is held`},{id:`block`,label:`block`,help:`new lint errors also hold a task's completion until they are fixed, or you accept the work as it is`}],RJ={intro:`After every worker step, before QA and at completion, bot-lobby lints only the files the task's agents touched. Problems on the lines the task changed are the task's; anything already there is shown but never holds it. Suppressions and lint-config changes the task adds go to QA to judge.`,mode:`Lint gate`,command:`Command`,commandHelp:`empty runs the linters the project configures (ESLint, Biome, Oxlint, Ruff), each from its own folder; a command runs without a shell from the repository's top, with {files} standing for the touched files`,commandPlaceholder:`found from the project`,extensions:`File types`,extensionsHelp:`which touched files the command is given, such as .ts .tsx .py`,extensionsPlaceholder:`every touched file`,timeout:`Time limit`,timeoutHelp:`for one linter run; one that runs over reads as could not run, and holds nothing`,found:`Found in this project`,foundHelp:`config files in the project and the folders a few levels below it`,foundNone:`No linter config found. Add one to the project, or set a command above.`,foundReplaced:`The command replaces these.`,installed:`installed`,missing:`not installed`,missingHelp:`install the project's dependencies there, or lint cannot run`,top:`project root`},zJ=[{id:`auto`,label:`Auto (OpenCode's free Jev, else TypeSafe)`},{id:`opencode`,label:`OpenCode Zen`},{id:`typesafe`,label:`TypeSafe`},{id:`openrouter`,label:`OpenRouter`},{id:`vercel`,label:`Vercel AI Gateway`}],BJ=[{id:`seats`,label:`Planning seats`,help:`each round, only the seats your idea or latest answers touch sit; 1-4 in the Plan tab pins one`},{id:`answers`,label:`Obvious answers`,help:`a panel question whose recommended option the conversation already makes clearly right is answered for you (listed under Assumptions)`},{id:`triage`,label:`Task triage`,help:`a new task's size, domains and research need reach the Master as hints; a quick fix that is really a task is held for you`},{id:`effort`,label:`Effort routing`,help:`a simple step runs one thinking level lower, a trivial one on the cheaper model below; a routed run that falls short runs again on your settings`},{id:`qa`,label:`QA risk`,help:`once a task's work is in, the classifier reads the diff and sizes QA to it: no QA agent for a change with nothing that runs, a light check for a small one, deep review where a defect would spread; with it off the engine's rules decide`},{id:`review`,label:`Pull request read`,help:`the Git tab's quick read of a pull request: its size, and how likely it is risky, security-relevant, breaking or untested, before an agent reviews it`},{id:`knowledge`,label:`Relevant knowledge`,help:`when an agent's knowledge, standards or decisions file is too long for its prompt, the classifier picks the sections that bear on the step, and the agent is told where the rest is`},{id:`scripts`,label:`Shared scripts`,help:`the classifier matches each step to the shared scripts that do part of it, and the agent is told to run them instead of redoing the work`},{id:`files`,label:`File hints`,help:`scouts, workers, quick fixes and the planning panel start with the files most likely needed, and can look more up with find_relevant_files`}],VJ={enabled:`Classifier`,enabledHelp:`a fast model makes the obvious decisions so large models spend fewer tokens on them`,engine:`Answered by`,engineHelp:`Jev, another classifier model, or any chat model your pi logins offer (OpenAI, Anthropic, Google, …); a small, fast one works best`,engineJev:`Jev on a host`,engineJevHelp:`TypeSafe's classifier, on the host below`,engineClassifier:`classifier model`,engineChat:`chat model, answers as JSON`,host:`Host`,model:`Model`,modelHelp:`empty uses the host's default`,key:`API key`,keyNote:`the key pi already holds for this host; it is never read by this page`,cheap:`Cheaper model`,cheapNone:`none: trivial steps keep their model and drop a thinking level`,cheapHelp:`what effort routing runs trivial steps on`},HJ={title:`Settings`,intro:`Each agent's model and effort, the workflow and its lint gate, the lobby and the classifier. Changes save as you make them.`,loading:`Loading settings…`,loadFailed:`Could not load settings.`,saved:`Settings saved`,saving:`Saving…`,appearanceHelp:`Light, dark, or follow your system. Kept in this browser only.`,themeLabel:`Mode`,themeItems:[{id:`light`,label:`Light`},{id:`dark`,label:`Dark`},{id:`system`,label:`System`}],notificationsLabel:`Browser notifications`,notificationsHelp:`While this page is hidden, tell me when a question waits, a task finishes or a background session asks something.`,notificationsBlocked:`Notifications are blocked in your browser. Allow them for this site and try again.`,notificationsUnsupported:`This browser does not offer notifications.`,notificationsOn:`Browser notifications are on.`,notificationsOff:`Browser notifications are off.`,installLabel:`Install bot-lobby`,installHelp:`Opens in its own fullscreen window, with the shell cached so it starts when Pi is not running.`,installButton:`Install as fullscreen app`,installUnavailable:`Your browser has not offered to install it. Use its menu: “Install app” (Chrome, Edge) or Share, then “Add to Home Screen” (Safari).`,installDone:`bot-lobby is installed.`,installedNow:`Running as an installed app.`,fullscreenLabel:`Fullscreen`,fullscreenHelp:`Hide the browser's own bars for this tab (F11 does the same).`,fullscreenOn:`Exit fullscreen`,fullscreenOff:`Go fullscreen`},UJ=`https://tweakcn.com/editor/theme`;function WJ(){let{theme:e}=lJ();return e===`dark`||e===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}function GJ({palette:e,dark:t}){let n=ae(e,t);return(0,V.jsxs)(`span`,{"aria-hidden":`true`,className:`flex h-9 items-center gap-1.5 rounded-lg border border-border px-2`,style:{background:n.background},children:[(0,V.jsx)(`span`,{className:`size-4 rounded-full border border-black/10`,style:{background:n.card}}),(0,V.jsx)(`span`,{className:`size-4 rounded-full`,style:{background:n.primary}}),(0,V.jsx)(`span`,{className:`h-2 flex-1 rounded-full`,style:{background:n.accent}})]})}function KJ(){let e=Be(),t=WJ(),n=(0,m.useRef)(null);function r(t){let r=t.key===`ArrowRight`||t.key===`ArrowDown`?1:t.key===`ArrowLeft`||t.key===`ArrowUp`?-1:0;if(!r)return;t.preventDefault(),t.stopPropagation();let i=Math.max(0,e.all.findIndex(t=>t.id===e.active.id)),a=e.all[(i+r+e.all.length)%e.all.length];e.choose(a.id),window.requestAnimationFrame(()=>n.current?.querySelector(`[data-theme-id="${a.id}"]`)?.focus())}return(0,V.jsx)(`div`,{ref:n,role:`radiogroup`,"aria-label":`Colour theme`,onKeyDown:r,className:`grid grid-cols-2 gap-2 md:grid-cols-3 lg:grid-cols-4`,children:e.all.map(n=>{let r=n.id===e.active.id;return(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space ArrowLeft ArrowRight`,"aria-describedby":`focused-action-help`,type:`button`,role:`radio`,"aria-checked":r,"data-theme-id":n.id,tabIndex:r?0:-1,onClick:()=>e.choose(n.id),className:J(`grid gap-1.5 rounded-lg border p-2 text-left outline-none transition-[border-color,box-shadow,background-color] duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,r?`border-primary bg-accent shadow-[0_0_0_1px_var(--primary)]`:`border-border hover:bg-accent/50`),children:[(0,V.jsx)(GJ,{palette:n,dark:t}),(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center justify-between gap-2 px-0.5 text-[0.8125rem] font-medium`,children:[(0,V.jsxs)(`span`,{className:`truncate max-md:break-words max-md:overflow-visible max-md:text-clip max-md:whitespace-normal`,children:[n.name,e.isSaved(n.id)?(0,V.jsx)(`span`,{className:`ml-1.5 text-xs font-normal text-muted-foreground`,children:`saved`}):null]}),r?(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]})]},n.id)})})}function qJ({entry:e}){let t=Be(),[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(e.name),[o,s]=(0,m.useState)();async function c(){let n=i.trim();if(!n||n===e.name)return r(!1);try{await t.rename(e.id,n),r(!1),s(void 0),np.success(`Renamed to ${n}.`)}catch(e){s(e.message)}}return(0,V.jsxs)(`li`,{className:`flex min-h-10 flex-wrap items-center gap-2 py-1.5`,children:[n?(0,V.jsxs)(`form`,{className:`flex min-w-0 flex-1 items-center gap-1 max-md:flex-wrap`,onSubmit:e=>{e.preventDefault(),c()},children:[(0,V.jsx)(EK,{autoFocus:!0,value:i,maxLength:40,"aria-label":`New name for ${e.name}`,"aria-invalid":o?!0:void 0,onChange:e=>a(e.target.value),onKeyDown:t=>{t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),a(e.name),r(!1))},className:`h-8 max-w-64 max-md:h-11 max-md:min-h-11 max-md:min-w-0 max-md:flex-1`}),(0,V.jsx)(vj,{label:`Save the name`,text:`Save`,icon:Rp,tone:`primary`,type:`submit`,disabled:!i.trim()}),(0,V.jsx)(vj,{label:`Keep the old name`,icon:wg,iconOnly:!0,onClick:()=>{a(e.name),r(!1)}})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium max-md:break-words max-md:overflow-visible max-md:text-clip max-md:whitespace-normal`,children:e.name}),(0,V.jsx)(vj,{label:`Rename ${e.name}`,text:`Rename`,icon:Eh,onClick:()=>{a(e.name),r(!0)}}),(0,V.jsx)(Qj,{label:`Remove ${e.name}`,text:`Remove`,title:`Remove ${e.name}?`,description:`It is removed for every pi session. Keep a copy of its CSS if you want to use it again.`,confirmLabel:`Remove theme`,icon:cg,variant:`destructive`,onConfirm:()=>void t.remove(e.id).catch(e=>np.error(e.message))})]}),o?(0,V.jsx)(`p`,{role:`alert`,className:`w-full text-xs text-destructive`,children:o}):null]})}function JJ(){let e=Be();return e.saved.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No saved themes yet. Import one below and give it a name.`}):(0,V.jsx)(`ul`,{"aria-label":`Saved themes`,className:`divide-y divide-border`,children:e.saved.map(e=>(0,V.jsx)(qJ,{entry:e},e.id))})}function YJ(){let e=Be(),[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)(),[s,c]=(0,m.useState)(!1),l=(0,m.useRef)(null);async function u(t,a){let s=j(t);if(`error`in s){o(s.error);return}o(void 0),c(!0);try{let t=await e.adopt(s,r.trim()||s.name||a);n(``),i(``);let o=s.light?s.dark?void 0:`dark`:`light`;np.success(o?`${t.name} saved and applied. It has no ${o} colours, so ${o} mode keeps the default ones.`:`${t.name} saved and applied.`)}catch(e){o(e.message)}finally{c(!1)}}async function d(e){if(e){if(e.size>2e5){o(`That file is too large to be a theme.`);return}await u(await e.text(),e.name.replace(/\.[^.]+$/,``)||`Custom theme`)}}return(0,V.jsxs)(`div`,{className:`grid gap-2`,children:[(0,V.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Pick or build a theme in the`,` `,(0,V.jsxs)(`a`,{href:UJ,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-0.5 text-link underline-offset-2 hover:underline`,children:[`tweakcn editor `,(0,V.jsx)(bm,{"aria-hidden":`true`,className:`size-3`})]}),`, press Code, copy it, and paste it here, or save it as a file and upload that. Colours and fonts are used; corners stay the page's own.`]}),(0,V.jsxs)(`label`,{className:`grid gap-1 text-xs text-muted-foreground`,children:[`Name`,(0,V.jsx)(EK,{value:r,maxLength:40,placeholder:`the theme's own name, or the file's`,onChange:e=>i(e.target.value),className:`h-8 max-w-80 text-foreground max-md:h-11 max-md:min-h-11`})]}),(0,V.jsx)(Lj,{value:t,onChange:e=>{n(e.target.value),o(void 0)},rows:4,spellCheck:!1,"aria-label":`Theme CSS from tweakcn`,"aria-invalid":a?!0:void 0,placeholder:`:root {
92
- --background: oklch(0.98 0 0);
93
- --primary: oklch(0.55 0.2 260);
94
- …
95
- }
96
- .dark { … }`,className:`max-h-56 font-mono text-xs md:text-xs`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1 max-md:flex-wrap`,children:[(0,V.jsx)(`input`,{ref:l,type:`file`,accept:`.css,.json,text/css,application/json`,hidden:!0,tabIndex:-1,"aria-label":`Upload a theme file`,onChange:e=>{d(e.target.files?.[0]),e.target.value=``}}),(0,V.jsx)(vj,{label:`Save and apply the pasted theme`,text:`Save theme`,icon:Rp,tone:`primary`,disabled:!t.trim()||s,onClick:()=>void u(t,`Custom theme`)}),(0,V.jsx)(vj,{label:`Upload a .css or .json theme file`,text:`Upload file`,icon:mg,disabled:s,onClick:()=>l.current?.click()}),a?(0,V.jsx)(`p`,{role:`alert`,className:`ml-2 min-w-0 text-xs text-destructive max-md:ml-0 max-md:basis-full`,children:a}):null]})]})}function XJ(){let{theme:e,setTheme:t}=lJ(),n=iq();return(0,V.jsx)(CH,{prominent:!0,title:xJ.appearance,children:(0,V.jsxs)($q,{children:[(0,V.jsx)(Qq,{label:`Prompt sounds`,help:`A droplet for each new actionable prompt or delivery review. Kept in this browser; sound starts after interaction. Desktop notifications remain separate.`,children:(0,V.jsx)(Oq,{checked:!n,onCheckedChange:e=>nq(!e),"aria-label":`Prompt sounds`})}),(0,V.jsx)(Qq,{label:HJ.themeLabel,help:HJ.appearanceHelp,children:(0,V.jsx)(eJ,{value:e,items:HJ.themeItems.map(e=>({value:e.id,label:e.label})),label:HJ.themeLabel,onChange:e=>t(e)})}),(0,V.jsx)(Qq,{label:`Colour theme`,help:`The page's colours, the same in every pi session.`,stacked:!0,children:(0,V.jsx)(KJ,{})}),(0,V.jsx)(Qq,{label:`Saved themes`,help:`Themes you imported, kept with pi for every session and project.`,stacked:!0,children:(0,V.jsx)(JJ,{})}),(0,V.jsx)(Qq,{label:`Import a theme`,stacked:!0,children:(0,V.jsx)(YJ,{})})]})})}var ZJ={master:[`master`],designer:[`agents`,`designer`],backend:[`agents`,`backend`],qa:[`agents`,`qa`],scout:[`scout`],researcher:[`researcher`],quickfix:[`quickFix`],planner:[`planner`]},QJ=[...SJ,...CJ.map(e=>({id:`panel:${e.id}`,label:e.label,help:wJ}))];function $J(e,t){switch(t){case`master`:return e.master;case`scout`:return{model:e.scout.model,thinking:`low`,timeoutMs:e.scout.timeoutMs,mcpTools:e.scout.mcpTools};case`researcher`:return e.researcher;case`quickfix`:return e.quickFix;case`planner`:return e.planner;default:return e.agents[t]}}function eY(e,t){return ZJ[e].reduceRight((e,t)=>({[t]:e}),t)}function tY(e,t){return e.find(e=>e.id===t)?.thinkingLevels??bJ}function nY(e,t){return bJ[kq(bJ,e,Math.max(0,bJ.indexOf(t)))]??t}var rY=e=>e>0?`${e} round${e===1?``:`s`}`:`unlimited`,iY=e=>e>0?`over ${e} steps`:`never`;function aY({label:e,children:t}){return(0,V.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),t]})}function oY(e){let[t,n]=(0,m.useState)(!1),[r,i]=(0,m.useState)(``),a=e.models.some(t=>t.id===e.value),o=[...e.inherit?[{value:pJ,label:mJ,help:hJ}]:[],...e.none?[{value:pJ,label:`none`,help:`Use the primary model`}]:[],...!e.inherit&&!e.none&&e.value===`inherit`?[{value:pJ,label:mJ,help:hJ}]:[],...e.models.map(e=>({value:e.id,label:e.id,...e.label&&e.label!==e.id?{help:e.label}:{}})),...!a&&e.value!==`inherit`?[{value:e.value,label:e.value,help:vJ}]:[],{value:gJ,label:_J,help:vJ}],s=t=>{if(t!==`__custom__`)return e.onChange(t);i(a?``:e.value),n(!0)},c=()=>{let t=r.trim();n(!1),t&&t!==e.value&&e.onChange(t)};return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsx)(eJ,{value:e.value,items:o,label:e.label,onChange:s}),t?(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,V.jsx)(EK,{autoFocus:!0,value:r,placeholder:`provider/model`,"aria-label":`Model id`,className:`min-w-0 flex-1 max-md:h-11 max-md:min-h-11`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),(0,V.jsx)(vj,{label:`Use this model`,icon:Rp,tone:`primary`,onClick:c})]}):null]})}function sY({label:e,help:t,checked:n,onChange:r}){return(0,V.jsxs)(`div`,{className:`flex min-h-0 items-center justify-between gap-4 max-md:min-h-11 max-md:items-start`,children:[(0,V.jsxs)(`div`,{className:`min-w-0`,children:[(0,V.jsx)(`div`,{className:`break-words text-[0.8125rem] font-medium`,children:e}),t?(0,V.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:t}):null]}),(0,V.jsx)(Oq,{checked:n,onCheckedChange:r,"aria-label":e})]})}function cY({value:e,onSave:t,placeholder:n,label:r}){let[i,a]=(0,m.useState)(e);(0,m.useEffect)(()=>a(e),[e]);let o=()=>{let n=i.trim();n!==e&&t(n)};return(0,V.jsx)(EK,{value:i,placeholder:n,"aria-label":r,className:`max-md:h-11 max-md:min-h-11`,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())}})}function lY({value:e,label:t,onSave:n}){let r=Math.round(e/6e4);return(0,V.jsx)(dY,{label:t,value:String(r),min:1,suffix:`min`,onSave:e=>{let t=Number(e);return!Number.isFinite(t)||t<=0?(np.error(`"${e}" is not a positive number of minutes.`),!1):(n(Math.round(t*6e4)),!0)}})}function uY({value:e,onSave:t}){return(0,V.jsx)(dY,{label:jJ,value:String(e),min:0,max:65535,onSave:e=>!/^\d+$/.test(e)||Number(e)>65535?(np.error(`"${e}" is not a port (0, or 1-65535).`),!1):(t(Number(e)),!0)})}function dY({label:e,value:t,min:n,max:r,suffix:i,onSave:a}){let[o,s]=(0,m.useState)(t);(0,m.useEffect)(()=>s(t),[t]);let c=()=>{o!==t&&(a(o.trim())||s(t))};return(0,V.jsxs)(`div`,{className:`relative`,children:[(0,V.jsx)(EK,{type:`number`,inputMode:`numeric`,min:n,max:r,value:o,"aria-label":e,className:J(i?`pr-10`:void 0,`max-md:h-11 max-md:min-h-11`),onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),i?(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-0 right-2.5 flex items-center text-xs text-muted-foreground`,children:i}):null]})}function fY({value:e,label:t,onSave:n}){let[r,i]=(0,m.useState)(e);return(0,m.useEffect)(()=>i(e),[e]),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,V.jsx)(Lj,{rows:2,value:r,"aria-label":t,onChange:e=>i(e.target.value),onBlur:()=>{r.trim()!==e&&n(r.trim())}}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved when you leave the field.`})]})}function pY({kind:e,config:t,models:n,save:r}){let i=$J(t,e),a=t=>r(eY(e,t)),o=dJ[e],s=tY(n,i.model),c=t=>{let r={model:t};e!==`scout`&&!tY(n,t).includes(i.thinking)&&(r.thinking=nY(tY(n,t),i.thinking)),a(r)},l=e!==`scout`&&e!==`researcher`,[u,d]=(0,m.useState)(!!i.instructions);return(0,V.jsxs)(`section`,{className:J(LG({spacing:`default`}),`glass min-w-0`),children:[(0,V.jsxs)(BG,{className:`flex-row items-baseline justify-between gap-3 py-3 max-md:flex-col max-md:items-start`,children:[(0,V.jsx)(`h3`,{className:`text-sm font-semibold max-md:max-w-full max-md:break-words`,children:o}),(0,V.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground max-md:min-w-0 max-md:max-w-full max-md:break-words max-md:overflow-visible max-md:text-clip max-md:whitespace-normal`,children:[i.model===`inherit`?`session model`:i.model,` · `,e===`scout`?`low`:i.thinking]})]}),(0,V.jsxs)(zG,{className:`flex min-w-0 flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-1`,children:[(0,V.jsx)(aY,{label:fJ.model,children:(0,V.jsx)(oY,{value:i.model,models:n,label:`${o} model`,inherit:e===`master`,onChange:c})}),e===`scout`?(0,V.jsx)(aY,{label:fJ.thinking,children:(0,V.jsxs)(`p`,{className:`flex h-8 items-center gap-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(Ip,{"aria-hidden":`true`,className:`size-4`}),(0,V.jsx)(`span`,{className:`capitalize`,children:`low`}),` (fixed for scouts)`]})}):(0,V.jsx)(Wq,{value:i.thinking,levels:bJ,supported:s,recommended:yJ[e],model:i.model===`inherit`?`the session model`:i.model,label:`${o} effort`,onChange:e=>a({thinking:e})})]}),(0,V.jsxs)(`div`,{className:`flex min-h-7 items-center justify-between gap-3 max-md:flex-wrap max-md:items-start`,children:[l?(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"aria-expanded":u,onClick:()=>d(e=>!e),className:`flex min-h-8 max-w-full items-center gap-1 rounded-md text-left text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:h-auto max-md:min-h-11`,children:[(0,V.jsx)(Wp,{"aria-hidden":`true`,className:J(`size-3.5 transition-transform duration-200 ease-snap`,u&&`rotate-90`)}),fJ.instructions,!u&&i.instructions?(0,V.jsx)(`span`,{className:`text-primary`,children:`· set`}):null]}):(0,V.jsx)(`span`,{}),e===`master`?null:(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 max-md:flex-wrap`,children:[(0,V.jsx)(`span`,{className:`break-words text-xs text-muted-foreground`,children:`Time limit`}),(0,V.jsx)(`div`,{className:`w-24`,children:(0,V.jsx)(lY,{value:i.timeoutMs??t.workflow.agentTimeoutMs,label:`${o} time limit`,onSave:e=>a({timeoutMs:e})})})]})]}),l&&u?(0,V.jsx)(fY,{value:i.instructions??``,label:`${o} instructions`,onSave:e=>a({instructions:e})}):null,(0,V.jsx)(fY,{value:(i.mcpTools??[]).join(`
97
- `),label:`${o} MCP tool grants (one exact tool name per line)`,onSave:e=>a({mcpTools:e.split(/\s+/).filter(Boolean)})}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Grant exact names such as mcp__github__get_issue. Children inherit these grants; read-only agents also require read-only tools.`})]})]})}function mY(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function hY({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,V.jsx)(sY,{label:t.label,help:t.help,checked:mY(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function gY({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,V.jsx)(CH,{prominent:!0,title:xJ.workflow,children:(0,V.jsx)($q,{children:(0,V.jsx)(Qq,{label:IJ,help:FJ.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,V.jsx)(eJ,{value:n,items:FJ.map(e=>({value:e.id,label:e.label})),label:IJ,onChange:e=>void t({workflow:{gitIsolation:e}})})})})})}var _Y=e=>e?`${e}/`:RJ.top;function vY(e){return e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean)}function yY({replaced:e}){let t=JA(`settings.linters`,{},[]),n=t.data?.linters;return(0,V.jsx)(Qq,{label:RJ.found,help:e?RJ.foundReplaced:RJ.foundHelp,children:n?n.length===0?(0,V.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:RJ.foundNone}):(0,V.jsx)(`ul`,{"aria-label":RJ.found,className:J(`flex flex-col gap-1.5 md:items-end`,e&&`opacity-60`),children:n.map(e=>(0,V.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-2 text-sm`,children:[(0,V.jsx)(`span`,{className:`min-w-0 break-words font-medium`,children:e.tool}),(0,V.jsx)(`span`,{className:`min-w-0 break-words text-xs text-muted-foreground`,children:_Y(e.folder)}),(0,V.jsxs)(`span`,{title:e.installed?void 0:RJ.missingHelp,className:J(`inline-flex shrink-0 items-center gap-1 text-xs`,e.installed?`text-success`:`text-warning`),children:[e.installed?(0,V.jsx)(Qp,{"aria-hidden":`true`,className:`size-3.5`}):(0,V.jsx)(Xp,{"aria-hidden":`true`,className:`size-3.5`}),e.installed?RJ.installed:RJ.missing]})]},`${e.tool}:${e.folder}`))}):(0,V.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:t.error?t.error:`Looking…`})})}function bY({config:e,save:t}){let n=e.lint,r=n.mode===`off`,i=n.command.trim().length>0;return(0,V.jsxs)(CH,{prominent:!0,title:xJ.lint,children:[(0,V.jsx)(`p`,{className:`max-w-3xl text-sm text-muted-foreground`,children:RJ.intro}),(0,V.jsxs)($q,{children:[(0,V.jsx)(Qq,{label:RJ.mode,help:LJ.find(e=>e.id===n.mode)?.help,children:(0,V.jsx)(eJ,{value:n.mode,items:LJ.map(e=>({value:e.id,label:e.label})),label:RJ.mode,onChange:e=>void t({lint:{mode:e}})})}),(0,V.jsxs)(`div`,{className:J(`flex flex-col divide-y divide-border [&>*]:py-3 [&>*:first-child]:pt-0 [&>*:last-child]:pb-0`,r&&`opacity-60`),"aria-disabled":r||void 0,children:[(0,V.jsx)(Qq,{label:RJ.command,help:RJ.commandHelp,children:(0,V.jsx)(cY,{value:n.command,label:RJ.command,placeholder:RJ.commandPlaceholder,onSave:e=>void t({lint:{command:e}})})}),i?(0,V.jsx)(Qq,{label:RJ.extensions,help:RJ.extensionsHelp,children:(0,V.jsx)(cY,{value:n.extensions.join(` `),label:RJ.extensions,placeholder:RJ.extensionsPlaceholder,onSave:e=>void t({lint:{extensions:vY(e)}})})}):null,(0,V.jsx)(Qq,{label:RJ.timeout,help:RJ.timeoutHelp,children:(0,V.jsx)(lY,{value:n.timeoutMs,label:`Lint ${RJ.timeout.toLowerCase()}`,onSave:e=>void t({lint:{timeoutMs:e}})})}),(0,V.jsx)(yY,{replaced:i})]})]})]})}function xY({config:e,save:t}){let n=e.lobby.web;return(0,V.jsx)(CH,{prominent:!0,title:xJ.lobby,children:(0,V.jsxs)($q,{children:[QJ.map(n=>(0,V.jsx)(hY,{config:e,item:n,save:t},n.id)),(0,V.jsx)(Qq,{label:TJ,help:EJ,children:(0,V.jsx)(eJ,{value:String(e.lobby.maxPlanningRounds),items:DJ.map(e=>({value:String(e),label:rY(e)})),label:TJ,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,V.jsx)(Qq,{label:OJ,help:kJ,children:(0,V.jsx)(eJ,{value:String(e.lobby.splitPlanAbove),items:AJ.map(e=>({value:String(e),label:iY(e)})),label:OJ,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,V.jsx)(Qq,{label:jJ,help:MJ,children:(0,V.jsx)(uY,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,V.jsx)(sY,{label:NJ,help:PJ,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})})]})})}function SY({value:e,models:t,classifiers:n,onChange:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(``),c=new Set([...n.map(e=>e.id),...t.map(e=>e.id)]),l=[{value:``,label:VJ.engineJev,help:VJ.engineJevHelp},...n.map(e=>({value:e.id,label:e.id,help:`${VJ.engineClassifier}${e.label===e.id?``:` · ${e.label}`}`})),...t.map(e=>({value:e.id,label:e.id,help:`${VJ.engineChat}${e.label&&e.label!==e.id?` · ${e.label}`:``}`})),...e&&!c.has(e)?[{value:e,label:e,help:vJ}]:[],{value:gJ,label:_J,help:vJ}],u=t=>{if(t!==`__custom__`)return r(t);s(c.has(e)?``:e),a(!0)},d=()=>{let t=o.trim();a(!1),t!==e&&r(t)};return(0,V.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,V.jsx)(eJ,{value:e,items:l,label:VJ.engine,onChange:u}),i?(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-start gap-2`,children:[(0,V.jsx)(EK,{autoFocus:!0,value:o,placeholder:`provider/model`,"aria-label":`Classifier model id`,className:`min-w-0 flex-1 max-md:h-11 max-md:min-h-11`,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())}}),(0,V.jsx)(vj,{label:`Use this model`,icon:Rp,tone:`primary`,onClick:d})]}):null]})}function CY({config:e,models:t,classifiers:n,save:r}){let i=e.classifier,a=zJ.find(e=>e.id===i.provider)?.label,o=!i.engine;return(0,V.jsx)(CH,{prominent:!0,title:xJ.classifier,children:(0,V.jsxs)($q,{children:[(0,V.jsx)(sY,{label:VJ.enabled,help:VJ.enabledHelp,checked:i.enabled,onChange:e=>void r({classifier:{enabled:e}})}),(0,V.jsx)(Qq,{label:VJ.engine,help:VJ.engineHelp,children:(0,V.jsx)(SY,{value:i.engine,models:t,classifiers:n,onChange:e=>void r({classifier:{engine:e}})})}),o?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Qq,{label:VJ.host,children:(0,V.jsx)(eJ,{value:i.provider,items:zJ.map(e=>({value:e.id,label:e.label})),label:VJ.host,onChange:e=>void r({classifier:{provider:e}})})}),(0,V.jsx)(Qq,{label:VJ.model,help:VJ.modelHelp,children:(0,V.jsx)(cY,{value:i.model,label:VJ.model,placeholder:`the host's default`,onSave:e=>void r({classifier:{model:e}})})}),(0,V.jsx)(Qq,{label:VJ.key,help:VJ.keyNote,children:(0,V.jsx)(`p`,{className:`break-words text-sm text-muted-foreground md:text-right`,children:a??i.provider})})]}):null,BJ.map(e=>(0,V.jsx)(sY,{label:e.label,help:e.help,checked:i.features[e.id],onChange:t=>void r({classifier:{features:{[e.id]:t}}})},e.id)),(0,V.jsx)(Qq,{label:VJ.cheap,help:VJ.cheapHelp,children:(0,V.jsx)(oY,{value:i.effort.cheapModel,models:t,label:VJ.cheap,none:!0,onChange:e=>void r({classifier:{effort:{cheapModel:e}}})})})]})})}function wY(){let e=hq(),t=async e=>{if(!e)return _q();let t=await gq();t===`granted`?np.success(HJ.notificationsOn):np.error(t===`unsupported`?HJ.notificationsUnsupported:HJ.notificationsBlocked)};return(0,V.jsx)(CH,{prominent:!0,title:xJ.notifications,children:(0,V.jsx)($q,{children:(0,V.jsx)(sY,{label:HJ.notificationsLabel,help:HJ.notificationsHelp,checked:e,onChange:e=>void t(e)})})})}function TY(){let{available:e,install:t}=y(),n=b(),r=x();return(0,V.jsx)(CH,{prominent:!0,title:xJ.install,children:(0,V.jsxs)($q,{children:[(0,V.jsx)(Qq,{label:HJ.installLabel,help:n?HJ.installedNow:HJ.installHelp,children:n?null:(0,V.jsx)(`div`,{className:`flex md:justify-end`,children:(0,V.jsx)(vj,{label:HJ.installButton,icon:vm,tone:`primary`,onClick:()=>e?void t().then(()=>np.success(HJ.installDone)):np.warning(HJ.installUnavailable)})})}),r.supported?(0,V.jsx)(Qq,{label:HJ.fullscreenLabel,help:HJ.fullscreenHelp,children:(0,V.jsx)(`div`,{className:`flex md:justify-end`,children:(0,V.jsx)(vj,{label:r.on?HJ.fullscreenOn:HJ.fullscreenOff,icon:r.on?uh:Xm,pressed:r.on,onClick:()=>void r.toggle()})})}):null]})})}var EY=[`Agents`,`Workflow`,`Linting`,`Lobby`,`Classifier`,`Appearance & notifications`];function DY({config:e,models:t,classifierModels:n=[],onConfig:r}){let[i,a]=(0,m.useState)(`Agents`),o=(0,m.useRef)(Promise.resolve()),s=e=>{let t=async()=>{try{return r((await Se(`settings.set`,{patch:e})).config),np.success(HJ.saved),!0}catch(e){return np.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}},n=o.current.then(t,t);return o.current=n,n};return(0,V.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 px-5 pt-5 pb-dock md:px-8 md:pt-8`,children:[(0,V.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:HJ.title}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:HJ.intro})]}),(0,V.jsx)(`nav`,{"aria-label":`Settings sections`,className:`-mx-1 min-w-0 flex flex-wrap gap-1 border-b border-border pb-3 max-md:flex-nowrap max-md:overflow-x-auto max-md:overscroll-x-contain max-md:pb-2`,children:EY.map(e=>(0,V.jsx)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-current":i===e?`page`:void 0,"aria-controls":`settings-${e.split(` `)[0]}`,onClick:()=>a(e),className:J(`h-8 rounded-lg border border-transparent px-3 text-sm font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11 max-md:h-auto max-md:shrink-0 max-md:whitespace-nowrap`,i===e?`bg-accent text-foreground`:`text-muted-foreground hover:bg-accent/60 hover:text-foreground`),children:e},e))}),(0,V.jsx)(`div`,{id:`settings-Agents`,hidden:i!==`Agents`,"aria-hidden":i!==`Agents`,children:(0,V.jsx)(CH,{prominent:!0,title:xJ.agents,children:(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-4 xl:grid-cols-2`,children:uJ.map(n=>(0,V.jsx)(pY,{kind:n,config:e,models:t,save:s},n))})})}),(0,V.jsx)(`div`,{id:`settings-Workflow`,hidden:i!==`Workflow`,"aria-hidden":i!==`Workflow`,children:(0,V.jsx)(gY,{config:e,save:s})}),(0,V.jsx)(`div`,{id:`settings-Linting`,hidden:i!==`Linting`,"aria-hidden":i!==`Linting`,children:(0,V.jsx)(bY,{config:e,save:s})}),(0,V.jsx)(`div`,{id:`settings-Lobby`,hidden:i!==`Lobby`,"aria-hidden":i!==`Lobby`,children:(0,V.jsx)(xY,{config:e,save:s})}),(0,V.jsx)(`div`,{id:`settings-Classifier`,hidden:i!==`Classifier`,"aria-hidden":i!==`Classifier`,children:(0,V.jsx)(CY,{config:e,models:t,classifiers:n,save:s})}),(0,V.jsx)(`div`,{id:`settings-Appearance`,hidden:i!==`Appearance & notifications`,"aria-hidden":i!==`Appearance & notifications`,children:(0,V.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,V.jsx)(XJ,{}),(0,V.jsx)(wY,{}),(0,V.jsx)(TY,{})]})})]})}function OY(){return(0,V.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-5 pt-5 pb-dock md:px-8 md:pt-8`,role:`status`,"aria-label":HJ.loading,children:[0,1,2,3].map(e=>(0,V.jsx)(kj,{shape:`card`,className:`h-48`},e))})}function kY(){let e=JA(`settings.get`,{},[`status`]),[t,n]=(0,m.useState)(),r=(0,m.useRef)(0),i=(0,m.useCallback)(e=>{r.current=performance.now(),n(e)},[]);return(0,m.useEffect)(()=>{e.data&&e.requestedAt>r.current&&n(e.data.config)},[e.data,e.requestedAt]),!t&&e.error?(0,V.jsx)(KA,{message:`${HJ.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,V.jsx)(DY,{config:t,models:e.data?.models??[],classifierModels:e.data?.classifierModels??[],onConfig:i}):(0,V.jsx)(OY,{})}function AY(){let e=globalThis.DOMParser;if(!e)throw Error(`DOMParser is unavailable`);return new e}var jY=`default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src 'none'; font-src 'none'; connect-src 'none'; media-src 'none'; frame-src 'none'; object-src 'none'; form-action 'none'; base-uri 'none'`,MY=new Set(`div span p br hr h1 h2 h3 h4 h5 h6 section article header footer main aside nav ul ol li dl dt dd strong em b i u s small sub sup blockquote pre code table thead tbody tfoot tr th td caption colgroup col figure figcaption style`.split(` `)),NY=new Set(`class id title role aria-label aria-hidden colspan rowspan scope`.split(` `));function PY(e){if(!e||typeof e!=`object`)return;let t=e;if(!(typeof t.html!=`string`||t.html.length>1e5)&&!(t.css!==void 0&&(typeof t.css!=`string`||t.css.length>5e4)))return{html:t.html,...typeof t.css==`string`?{css:t.css}:{}}}function FY(e){let t=e.replace(/\/\*[\s\S]*?\*\//g,``);return/\\|@import|url\s*\(|image-set\s*\(|expression\s*\(|behavior\s*:|-moz-binding/i.test(t)?``:t.replace(/<\/?style/gi,``)}function IY(e){if(!MY.has(e.localName)||e.namespaceURI!==`http://www.w3.org/1999/xhtml`){e.remove();return}for(let t of[...e.attributes])t.name===`style`?e.setAttribute(`style`,FY(t.value)):NY.has(t.name)||e.removeAttribute(t.name);e.localName===`style`&&(e.textContent=FY(e.textContent??``));for(let t of[...e.children])IY(t)}function LY(e,t){try{return RY(e,t??AY())}catch{return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${jY}"><meta name="referrer" content="no-referrer"></head><body><p role="status">Static mockup unavailable. The preview could not be safely rendered.</p></body></html>`}}function RY(e,t){let n=t.parseFromString(e.html,`text/html`);for(let e of[...n.head.children,...n.body.children])IY(e);let r=[...n.head.querySelectorAll(`style`)].map(e=>e.outerHTML).join(``);return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${jY}"><meta name="referrer" content="no-referrer"><style>body{margin:16px;overflow-wrap:anywhere}*{box-sizing:border-box}${FY(e.css??``).replace(/</g,`\\3c `)}</style>${r}</head><body>${n.body.innerHTML}</body></html>`}function zY({preview:e,label:t,className:n,frameWidth:r,minWidth:i,onOpen:a}){let o=(0,m.useMemo)(()=>LY(e),[e]),s=(0,m.useRef)(null),[c,l]=(0,m.useState)();if((0,m.useLayoutEffect)(()=>{let e=s.current;if(!r&&!i||!e)return;let t=()=>l({width:e.clientWidth,height:e.clientHeight});if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[r,i]),!r&&!i)return(0,V.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,className:J(`h-80 w-full rounded-lg border bg-background`,n)});let u=r??Math.max(c?.width??0,i??0),d=c&&c.width>0&&u>0?Math.min(1,c.width/u):1;return(0,V.jsxs)(`div`,{ref:s,className:J(`group/mock relative h-80 w-full max-w-full overflow-hidden rounded-lg border bg-background max-md:min-h-0 max-md:max-h-full max-md:overflow-x-hidden max-md:overflow-y-auto max-md:overscroll-contain`,n),children:[(0,V.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:o,tabIndex:a?-1:void 0,className:J(`absolute top-0 left-0 origin-top-left border-0`,a&&`pointer-events-none`),style:{width:u||`100%`,height:c?c.height/d:`100%`,transform:`scale(${d})`}}),a?(0,V.jsx)(`button`,{type:`button`,"data-compact":``,onClick:a,"aria-label":`Expand the mockup: ${t}`,className:`absolute inset-0 flex items-end justify-end p-2 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-inset max-md:p-3`,children:(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-border bg-card/90 px-1.5 py-0.5 text-[0.6875rem] font-medium text-muted-foreground opacity-0 shadow-sm backdrop-blur transition-opacity group-hover/mock:opacity-100 group-focus-within/mock:opacity-100`,children:[(0,V.jsx)(Jm,{"aria-hidden":`true`,className:`size-3`}),`Expand`]})}):null]})}var BY=/\s*\(recommended\)\s*$/i,VY=1024,HY=`(max-width: 767.98px)`,UY=`max-md:hidden`,WY=e=>e.replace(BY,``);function GY(e){return!!(e&&(e.htmlPreview||e.image||e.preview))}function KY({option:e}){let t=WY(e.label);return GY(e)?(0,V.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[e.htmlPreview?(0,V.jsx)(zY,{preview:e.htmlPreview,label:t,minWidth:VY,className:`h-auto min-h-[18rem] flex-1`}):null,e.image?(0,V.jsx)(`img`,{src:I(e.image),alt:`Mockup: ${t}`,className:`min-h-0 w-full flex-1 rounded-lg border bg-background object-contain`}):null,e.preview?(0,V.jsx)(bH,{text:e.preview,className:J(`overflow-auto rounded-lg border bg-background p-4 text-sm`,!e.htmlPreview&&!e.image&&`flex-1`)}):null]}):(0,V.jsx)(`p`,{className:`grid h-full place-items-center p-6 text-sm text-muted-foreground`,children:`No mockup for this option.`})}function qY({options:e,start:t,title:n,picked:r=[],multi:i=!1,onChoose:a,onClose:o,onIndex:s}){let c=vf(),l=Pk(HY),{keyboardOpen:u,keyboardInset:d}=fA(),f=(0,m.useRef)(null),p=(0,m.useRef)(null),[h,g]=(0,m.useState)(()=>Math.min(Math.max(0,t),e.length-1)),_=e[h],v=e.length-1;(0,m.useEffect)(()=>s?.(h),[h,s]),(0,m.useLayoutEffect)(()=>{let e=f.current;e&&(e.scrollLeft=h*e.clientWidth),p.current?.focus()},[]);let y=(0,m.useCallback)(e=>{let t=Math.min(Math.max(0,e),v),n=f.current;g(t),n?.scrollTo({left:t*n.clientWidth,behavior:c?`auto`:`smooth`})},[v,c]);(0,m.useEffect)(()=>{let e=f.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{e.scrollLeft=h*e.clientWidth});return t.observe(e),()=>t.disconnect()},[h]);function b(){let e=f.current;if(!e||e.clientWidth===0)return;let t=Math.round(e.scrollLeft/e.clientWidth);t!==h&&t>=0&&t<=v&&g(t)}function x(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=t.target;if(n.closest(`input, textarea, [contenteditable='true']`))return;let r={ArrowLeft:-1,ArrowRight:1,PageUp:-1,PageDown:1}[t.key];if(r){t.preventDefault(),y(h+r);return}if(t.key===`Home`||t.key===`End`){t.preventDefault(),y(t.key===`Home`?0:v);return}let i=Number(t.key);if(Number.isInteger(i)&&i>=1&&i<=e.length){t.preventDefault(),y(i-1);return}t.key===`Enter`&&a&&!(n instanceof HTMLButtonElement)&&(t.preventDefault(),a(h))}let S=r.includes(h),C=l&&u?{height:`calc(100vh - ${d}px - 1.5rem)`,maxHeight:`calc(100vh - ${d}px - 1.5rem)`}:void 0;return(0,V.jsxs)(`div`,{ref:p,tabIndex:-1,"data-autofocus":``,onKeyDown:x,style:C,className:`mockup-viewer flex h-full min-h-0 flex-col outline-none max-md:h-[calc(100svh-1.5rem)] max-md:max-h-[calc(100svh-1.5rem)]`,role:`region`,"aria-label":`Mockups: ${n}`,"aria-roledescription":`carousel`,children:[(0,V.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-border px-4 py-3 sm:px-5`,children:[(0,V.jsx)(X,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":`Back to the question`,title:l?`Back to the question`:`Back · Esc`,onClick:()=>o(h),className:`max-md:size-11`,children:(0,V.jsx)(ch,{"aria-hidden":`true`})}),(0,V.jsx)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:n}),(0,V.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,"aria-live":`polite`,children:[h+1,` of `,e.length]}),(0,V.jsx)(`div`,{role:`tablist`,"aria-label":`Options`,className:`flex w-full flex-wrap gap-1.5 sm:w-auto`,children:e.map((e,t)=>(0,V.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t===h,"aria-controls":`mockup-slide-${t}`,"data-compact":``,onClick:()=>y(t),className:J(`inline-flex h-7 max-w-48 items-center gap-1 rounded-lg border px-2.5 text-xs font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:h-11 max-md:min-w-11`,t===h?`border-primary/50 bg-accent text-foreground`:`border-border text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,V.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:t+1}),(0,V.jsx)(`span`,{className:`truncate`,children:WY(e.label)}),r.includes(t)?(0,V.jsx)(Rp,{"aria-label":`picked`,className:`size-3 text-primary`}):null]},t))})]}),(0,V.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[(0,V.jsx)(`div`,{ref:f,onScroll:b,className:`mockup-track flex h-full snap-x snap-mandatory overflow-x-auto overflow-y-hidden overscroll-x-contain`,children:e.map((t,n)=>(0,V.jsxs)(`section`,{id:`mockup-slide-${n}`,role:`tabpanel`,"aria-roledescription":`slide`,"aria-label":`${n+1} of ${e.length}: ${WY(t.label)}`,"aria-hidden":n!==h,className:`flex h-full w-full shrink-0 snap-center snap-always flex-col gap-2 overflow-y-hidden px-4 py-4 sm:px-14 max-md:overflow-y-auto max-md:overscroll-contain`,children:[(0,V.jsxs)(`div`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[n+1,`.`]}),(0,V.jsx)(`span`,{className:`font-medium`,children:WY(t.label)}),BY.test(t.label)?(0,V.jsx)(`span`,{className:`text-xs font-medium text-primary`,children:`Recommended`}):null,r.includes(n)?(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-primary`,children:[(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`size-3`}),`picked`]}):null]}),t.description?(0,V.jsx)(bH,{text:t.description,className:`text-sm text-muted-foreground`}):null,(0,V.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,V.jsx)(KY,{option:t})})]},n))}),h>0?(0,V.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Previous option`,title:l?`Previous option`:`Previous · ←`,onClick:()=>y(h-1),className:`absolute top-1/2 left-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,V.jsx)(Hp,{"aria-hidden":`true`})}):null,h<v?(0,V.jsx)(X,{type:`button`,variant:`outline`,size:`icon`,"aria-label":`Next option`,title:l?`Next option`:`Next · →`,onClick:()=>y(h+1),className:`absolute top-1/2 right-2 -translate-y-1/2 rounded-full max-md:hidden max-md:size-11`,children:(0,V.jsx)(Wp,{"aria-hidden":`true`})}):null]}),(0,V.jsxs)(`footer`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-t border-border px-4 py-3 sm:px-5`,children:[(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(Ak,{chord:`←→`,className:UY,children:`option`}),a?(0,V.jsx)(Ak,{chord:`Enter`,className:UY,children:i?S?`unpick`:`pick`:`choose`}):null,(0,V.jsx)(Ak,{chord:`Esc`,className:UY,children:`back`})]}),a&&_?(0,V.jsxs)(X,{type:`button`,onClick:()=>a(h),className:`max-w-full max-md:min-h-11 max-md:min-w-11`,children:[i&&S?`Unpick`:i?`Pick`:`Choose`,(0,V.jsx)(`span`,{className:`truncate`,children:WY(_.label)})]}):null]})]})}function JY(e,t,n){e.nativeEvent.isComposing||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),n()),e.key===`Enter`&&e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),t()))}function YY({text:e,disabled:t=!1,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),[o,s]=(0,m.useState)(!1),[c,l]=(0,m.useState)(``),u=(0,m.useRef)(null);(0,m.useEffect)(()=>{u.current?.focus({preventScroll:!0}),u.current?.select()},[]);let d=async()=>{if(!(t||o||!i.trim())){s(!0),l(``);try{await n(i.trim()),r()}catch(e){l(e instanceof Error?e.message:String(e)),s(!1)}}};return(0,V.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,onKeyDown:e=>JY(e,()=>void d(),()=>{o||r()}),children:[(0,V.jsxs)(`label`,{className:`text-sm`,children:[`Edit message`,(0,V.jsx)(Lj,{ref:u,value:i,onChange:e=>a(e.target.value),disabled:o,className:`mt-2 max-h-[40vh] min-h-24 max-md:min-h-28`})]}),c?(0,V.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Could not save. `,c]}):null,(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,V.jsx)(X,{size:`sm`,className:`max-md:min-h-11`,onClick:()=>void d(),disabled:t||o||!i.trim(),children:o?`Saving…`:`Save`}),(0,V.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,disabled:o,onClick:r,children:`Cancel`})]})]})}var XY=1200;function ZY({question:e}){let[t,n]=(0,m.useState)(),r=SA(t!==void 0,xA.sheet),i=e.options.flatMap((e,t)=>e.mockup?[{option:e,index:t,mockup:e.mockup}]:[]);if(i.length===0)return null;let a=e.options.map(e=>({label:e.label,description:e.description,...e.mockup?{htmlPreview:e.mockup}:{}}));return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`ul`,{"aria-label":`Mockups`,className:`grid grid-cols-2 gap-2 md:grid-cols-3`,children:i.map(({option:e,index:t,mockup:r})=>(0,V.jsxs)(`li`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,V.jsx)(zY,{preview:r,label:WY(e.label),frameWidth:XY,onOpen:()=>n(t),className:`aspect-[3/2] h-auto`}),(0,V.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[(0,V.jsxs)(`span`,{className:`tabular-nums`,children:[t+1,`.`]}),` `,WY(e.label)]})]},t))}),(0,V.jsx)(mA,{open:t!==void 0&&r,onOpenChange:e=>{e||n(void 0)},label:`Mockups: ${e.text}`,className:`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-6xl`,children:t===void 0?null:(0,V.jsx)(qY,{options:a,start:t,title:e.text,onClose:()=>n(void 0)})})]})}function QY({questions:e}){return(0,V.jsx)(`ol`,{className:`mt-1 flex flex-col gap-2`,children:e.map((e,t)=>(0,V.jsxs)(`li`,{className:`card-flat flex min-w-0 flex-col gap-2 rounded-xl border p-3 text-sm`,style:{"--orb":dW(e.from)},children:[(0,V.jsxs)(`p`,{className:`flex items-start gap-2`,children:[(0,V.jsxs)(`span`,{className:`mt-px inline-flex shrink-0 items-center gap-1 rounded-full bg-[color-mix(in_oklab,var(--orb)_12%,transparent)] px-2 py-0.5 text-xs font-medium text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`,children:[(0,V.jsx)(oW,{source:e.from,className:`size-3`}),cW(e.from)]}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsxs)(`span`,{className:`sr-only`,children:[`Question `,t+1,`: `]}),e.text]})]}),e.options.length?(0,V.jsx)(`ul`,{"aria-label":`Options`,className:`flex flex-wrap gap-1.5`,children:e.options.map(e=>(0,V.jsxs)(`li`,{className:`rounded-lg border border-border bg-muted/60 px-2 py-1 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`font-medium text-foreground`,children:e.label}),e.description?` — ${e.description}`:``]},e.label))}):null,(0,V.jsx)(ZY,{question:e})]},t))})}function $Y({message:e}){let t=e.decided??[];return t.length?(0,V.jsx)(`ul`,{"aria-label":`Settled for you`,className:`mt-1 flex flex-col gap-1`,children:t.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 text-sm`,title:`Settled by the classifier, ${Math.round(e.probability*100)}% sure. Comment on the plan to overrule it.`,children:[(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`mt-[0.1875rem] size-3.5 shrink-0 text-success`}),(0,V.jsxs)(`span`,{className:`min-w-0`,children:[(0,V.jsx)(`span`,{className:J(`font-medium`,lW(e.from)),children:cW(e.from)}),` `,(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.question}),` `,(0,V.jsx)(`span`,{className:`font-medium`,children:e.answer}),(0,V.jsxs)(`span`,{className:`decided-hint`,children:[`auto · `,Math.round(e.probability*100),`% · comment to overrule`]})]})]},t))}):null}function eX({message:e,index:t,busy:n,readOnly:r}){let[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),c=o&&(o.editedAt??0)>(e.editedAt??0)?o:e,l=n||c!==e,u=async n=>{let r=await Se(`planner.editMessage`,{messageIndex:t,at:e.at,text:n});s(r.message)},d=!r&&!e.settled?.length&&!i?(0,V.jsxs)(`button`,{type:`button`,disabled:l,onClick:()=>a(!0),className:`chat-action`,children:[(0,V.jsx)(Eh,{"aria-hidden":`true`,className:`size-3`}),`Edit`]}):null;return(0,V.jsx)(gW,{time:e.at>0?zj(e.at):void 0,head:!0,note:c.editedAt?`(edited)`:void 0,actions:d,children:i?(0,V.jsx)(YY,{text:c.text,disabled:n,onSave:u,onCancel:()=>a(!1)}):(0,V.jsx)(bH,{text:c.text})})}function tX({message:e,index:t,busy:n,readOnly:r}){if(e.role===`you`)return(0,V.jsx)(eX,{message:e,index:t,busy:n,readOnly:r});let i=e.questions??[];return(0,V.jsxs)(hW,{source:`PLANNER`,name:`Panel`,time:e.at>0?zj(e.at):void 0,head:!0,bubble:i.length===0,aside:i.length?`${i.length} question${i.length===1?``:`s`}`:void 0,children:[i.length>0?(0,V.jsx)(QY,{questions:i}):(0,V.jsx)(bH,{text:e.text}),(0,V.jsx)($Y,{message:e})]})}function nX({messages:e,seed:t,busy:n=!1,readOnly:r=!1}){return(0,V.jsxs)(`div`,{className:`chat-column`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,V.jsx)(_W,{children:t}):null,e.map((e,t)=>(0,V.jsx)(tX,{message:e,index:t,busy:n,readOnly:r},`${e.at}-${t}`)),n?(0,V.jsx)(hW,{source:`PLANNER`,name:`Panel`,head:!0,live:!0,aside:`the panel is thinking`,children:(0,V.jsx)(vW,{className:`mt-1`})}):null]})}function rX({className:e,...t}){return(0,V.jsx)(tC,{"aria-keyshortcuts":`Space`,"aria-description":`When focused, press Space to toggle.`,"data-slot":`checkbox`,className:J(`peer relative flex size-[1.125rem] shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background bg-clip-padding text-primary-foreground shadow-control transition-[background-color,border-color,box-shadow] duration-150 outline-none before:absolute before:-inset-3 before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-64 data-[state=checked]:shadow-none dark:bg-input/32 data-[state=checked]:border-primary data-[state=checked]:bg-primary`,e),...t,children:(0,V.jsx)(rC,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center`,children:(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`size-3`,strokeWidth:3})})})}var iX=`ORACLE`,aX=`No draft yet.`,oX=`The draft appears after the panel's first round.`,sX=`What each seat needs`,cX=[`backend`,`designer`,`qa`,`researcher`],lX={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`},uX=`Describe a task in the box below. The panel asks what it needs to know, round by round, until the plan is clear.`,dX={ORACLE:`Chairs the panel, and settles the last round alone.`,DEV:`Code, data and the APIs it touches.`,DESIGN:`Screens, flows and the words on them.`,QA:`Tests, edge cases and what could break.`,RESEARCH:`Prior art, docs and sources.`},fX=[{title:`Describe it`,text:`Say what you want in the box below.`},{title:`The panel asks`,text:`Each seat asks what it needs to know.`},{title:`A draft forms`,text:`Answer, comment on lines, go another round.`},{title:`Save the plan`,text:`Keep it, or start it as a task.`}];function pX(e){let t=e.filter(e=>e.member);return`${t.filter(e=>e.seated).length} of ${t.length} seated`}function mX(e,t=0){return t<=0?`round ${e}`:e>t?`round ${e} · past the limit, revising`:e===t?`final round ${e}/${t}`:`round ${e}/${t}`}function hX(e,t){return`${e} ${t}${e===1?``:`s`}`}function gX(e){return e.round===0&&e.messages.length===0&&!e.busy}function _X(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${lX[t.member]} failed`).split(`
98
- `)[0]}function vX(e){let t=[],n=_X(e);return e.busy?t.push(mX(e.round,e.limit)):n?t.push(`${n} — Retry runs the round again`):e.questions.length>0&&t.push(`${hX(e.questions.length,`question`)} waiting`),!e.busy&&e.round>0&&t.push(mX(e.round,e.limit)),!e.busy&&e.limit>0&&e.round+1===e.limit&&t.push(`the next round is the last: the oracle settles the rest`),t}function yX(e,t){let n=lX[e],r=t.seats.includes(e),i=t.members.find(t=>t.member===e),a={member:e,label:n,seated:r,working:!1};if(!r)return{...a,text:`off`};if(i?.status===`thinking`)return{...a,working:!0,text:i.step??`thinking`};if(i?.status===`failed`)return{...a,text:`failed — Retry`};if(!i)return{...a,text:`·`};if(i.reply?.status===`ready`)return{...a,text:`ready`};let o=t.questions.filter(e=>e.from===n).length;return{...a,text:o===0?`done`:hX(o,`question`)}}function bX(e){let t=e.questions.filter(e=>e.from===iX).length;return[{label:iX,seated:!0,working:e.busy,text:e.busy?`chairing`:t?hX(t,`question`):`·`},...cX.map(t=>yX(t,e))]}function xX({cell:e,intro:t}){let n=t?e.member?e.seated?`seated`:`not seated`:`chairs`:e.text;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`span`,{className:J(`inline-flex items-center gap-1 font-medium`,e.seated?lW(e.label):`text-muted-foreground`),children:[(0,V.jsx)(oW,{source:e.label,className:`size-3`}),cW(e.label)]}),e.working&&!t?(0,V.jsx)(BA,{className:`size-3`,"aria-hidden":`true`}):null,n===`·`?null:(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:n})]})}function SX({cell:e,intro:t,onToggled:n}){let{member:r}=e,i=`roster-chip inline-flex h-7 items-center gap-1.5 rounded-full border px-2.5 text-xs whitespace-nowrap max-md:min-h-11`;if(!r)return(0,V.jsx)(`li`,{className:J(i,`border-transparent bg-muted`),children:(0,V.jsx)(xX,{cell:e,intro:t})});let a=async()=>{await U(`planner.toggleSeat`,{member:r})&&n()};return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`label`,{className:J(i,`cursor-pointer pl-1.5 transition-colors`,e.seated?`border-border bg-card hover:bg-muted`:`border-dashed border-border text-muted-foreground hover:bg-muted`),children:[(0,V.jsx)(rX,{checked:e.seated,onCheckedChange:()=>void a(),"aria-label":`${cW(e.label)} sits on the panel`,className:`size-3.5 rounded-[4px] [&_svg]:size-2.5`}),(0,V.jsx)(xX,{cell:e,intro:t})]})})}function CX({cells:e,intro:t,onToggled:n,className:r}){return(0,V.jsx)(`ul`,{"aria-label":`Panel`,className:J(`flex flex-wrap items-center gap-1.5`,r),children:e.map(e=>(0,V.jsx)(SX,{cell:e,intro:t,onToggled:n},e.label))})}function wX({cell:e,onToggled:t}){let{member:n}=e,r=cW(e.label),i=J(`flex h-full flex-col gap-2 rounded-xl border p-3.5 transition-[background-color,border-color,box-shadow]`,e.seated?`border-[color-mix(in_oklab,var(--orb)_26%,var(--border))] bg-[color-mix(in_oklab,var(--orb)_5%,var(--card))] shadow-card`:`border-dashed border-input bg-transparent`),a=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:J(`grid size-6 place-items-center rounded-lg bg-[color-mix(in_oklab,var(--orb)_14%,transparent)] text-[color-mix(in_oklab,var(--orb)_85%,var(--foreground))]`,!e.seated&&`opacity-50 grayscale`),children:(0,V.jsx)(oW,{source:e.label,className:`size-3.5`})}),(0,V.jsx)(`span`,{className:J(`truncate text-sm font-semibold`,e.seated?lW(e.label):`text-muted-foreground`),children:r})]}),n?(0,V.jsx)(rX,{checked:e.seated,onCheckedChange:()=>void TX(n,t),"aria-label":`${r} sits on the panel`}):null]}),(0,V.jsx)(`span`,{className:`text-xs leading-relaxed text-muted-foreground`,children:dX[e.label]}),(0,V.jsx)(`span`,{className:J(`mt-auto text-xs font-medium`,e.seated?`text-foreground`:`text-muted-foreground`),children:n?e.seated?`seated`:`sits this one out`:`always chairs`})]}),o={"--orb":dW(e.label)};return n?(0,V.jsx)(`li`,{style:o,children:(0,V.jsx)(`label`,{className:J(i,`cursor-pointer`,e.seated?`hover:shadow-[0_0_0_3px_color-mix(in_oklab,var(--orb)_10%,transparent)]`:`hover:bg-muted`),children:a})}):(0,V.jsx)(`li`,{style:o,children:(0,V.jsx)(`div`,{className:i,children:a})})}async function TX(e,t){await U(`planner.toggleSeat`,{member:e})&&t()}function EX({cells:e,onToggled:t}){return(0,V.jsx)(`ul`,{"aria-label":`Panel`,className:`grid grid-cols-1 gap-3 @lg:grid-cols-2 @4xl:grid-cols-5`,children:e.map(e=>(0,V.jsx)(wX,{cell:e,onToggled:t},e.label))})}function DX({snap:e}){let t=vX(e),n=!e.busy&&_X(e)!==void 0;return(0,V.jsxs)(`p`,{role:`status`,className:n?`inline-flex items-center gap-2 text-sm text-destructive`:`inline-flex items-center gap-2 text-sm text-muted-foreground`,children:[e.busy?(0,V.jsx)(BA,{className:`size-3.5`,"aria-hidden":`true`}):null,t.join(` · `)]})}function OX({onOpen:e}){let t=(0,m.useRef)(null);return gj(`v`,()=>t.current?.click()),(0,V.jsxs)(`button`,{ref:t,type:`button`,"aria-haspopup":`dialog`,"aria-keyshortcuts":`V`,onClick:e,className:`plan-link group`,children:[`View plan`,(0,V.jsx)(Wp,{"aria-hidden":`true`,className:`size-3.5 transition-transform duration-150 group-hover:translate-x-0.5 motion-reduce:transition-none`}),(0,V.jsx)(kk,{chord:`V`,className:`kbd-hint ml-1`})]})}function kX({iconOnly:e}){return(0,V.jsx)(vj,{label:`Previous plans`,text:`Previous`,icon:Ph,shortcut:`H`,iconOnly:e,onClick:()=>MA(jA(`plan`,`previous`))})}function AX({snap:e,onDone:t}){let n=Nk(`status`).data?.keys.find(e=>e.action===`savePlan`)?.label,r=Pk(`(max-width: 767.98px)`),i=e=>async()=>{await U(e,{})&&t()};return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1 @min-[68rem]:shrink-0`,children:[e.questions.length>0&&!e.busy?(0,V.jsx)(vj,{label:`Answer questions`,icon:eh,tone:`primary`,shortcut:`A`,onClick:()=>void i(`planner.answer`)()}):null,e.retryable?(0,V.jsx)(vj,{label:`Retry`,icon:Rh,shortcut:`R`,onClick:()=>void i(`planner.retry`)()}):null,(0,V.jsx)(kX,{iconOnly:r}),(0,V.jsx)(vj,{"data-plan-save":!0,label:`Save the plan`,text:`Save`,icon:Hh,shortcut:n??`Ctrl+S`,iconOnly:r,disabled:!e.draft||e.busy,onClick:()=>void i(`planner.save`)()}),(0,V.jsx)(Qj,{icon:Em,label:`New plan`,shortcut:`N`,iconOnly:r,title:`Start a new plan?`,description:`The conversation and the draft are left behind. Saved plans are not touched.`,confirmLabel:`New plan`,onConfirm:()=>void U(`planner.new`,{}).then(t)})]})}function jX({snap:e,onDone:t,onViewPlan:n}){return(0,V.jsxs)(`header`,{className:`@container flex shrink-0 flex-col gap-2.5 border-b border-border px-5 pt-3 pb-3 max-md:shrink max-md:px-4 max-md:py-2.5`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-1`,children:[(0,V.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:`Planning`}),(0,V.jsx)(DX,{snap:e}),e.draft?(0,V.jsx)(OX,{onOpen:n}):null]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2.5 @min-[68rem]:flex-nowrap`,children:[(0,V.jsx)(CX,{cells:bX(e),intro:!1,onToggled:t,className:`order-last basis-full max-md:-mx-4 max-md:flex-nowrap max-md:overflow-x-auto max-md:px-4 max-md:[scrollbar-width:none] @min-[68rem]:order-none @min-[68rem]:min-w-0 @min-[68rem]:basis-auto`}),(0,V.jsx)(AX,{snap:e,onDone:t})]})]})}function MX(e){let t=!1;return e.split(`
99
- `).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function NX({notes:e}){return(0,V.jsx)(V.Fragment,{children:e.map((e,t)=>(0,V.jsx)(`p`,{className:`ml-6 rounded-lg border border-primary/15 bg-accent px-3 py-1.5 text-sm text-foreground italic`,children:e},t))})}var PX=[],FX=(0,m.memo)(function({row:e,index:t,notes:n,form:r,onComment:i}){let a=e.text.trim(),o=()=>i(t);return(0,V.jsxs)(`li`,{"data-line":t,className:J(`group/line`,!r&&`[contain-intrinsic-size:auto_2.75rem] [content-visibility:auto]`),children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-1`,children:[(0,V.jsx)(`span`,{className:`flex w-4 shrink-0 justify-center pt-3.5`,"aria-hidden":`true`,children:n.length>0?(0,V.jsx)(`span`,{className:`size-2 rounded-full bg-primary`}):null}),(0,V.jsx)(`div`,{className:J(`min-w-0 flex-1 cursor-pointer rounded-lg px-2 py-1.5 transition-colors hover:bg-muted`,r&&`bg-muted`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&o(),children:e.fenced?e.text:(0,V.jsx)(bH,{text:e.text})}),(0,V.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 text-muted-foreground max-md:size-11 opacity-0 transition-opacity group-hover/line:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,"aria-label":`Comment on this line: ${a}`,onClick:o,children:(0,V.jsx)(nh,{"aria-hidden":`true`})})]}),(0,V.jsx)(NX,{notes:n}),r]})});function IX({draft:e,comments:t,commenting:n,form:r,onComment:i}){let a=(0,m.useMemo)(()=>MX(e),[e]),o=dH(a.length);return(0,V.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:a.slice(0,o).map((e,a)=>e.text.trim()?(0,V.jsx)(FX,{row:e,index:a,notes:t.get(e.text.trim())??PX,form:a===n?r:void 0,onComment:i},a):(0,V.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},a))})}function LX({notes:e}){return e.length===0?null:(0,V.jsx)(CH,{title:sX,children:(0,V.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,V.jsxs)(`div`,{className:`flex min-w-0 gap-3 max-md:flex-wrap`,children:[(0,V.jsx)(`dt`,{className:J(`w-20 shrink-0 font-medium`,lW(e.from)),children:cW(e.from)}),(0,V.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,V.jsx)(bH,{text:e.text})})]},t))})})}function RX({line:e,onCancel:t,onSent:n}){let r=(0,m.useRef)(null);return(0,m.useEffect)(()=>{let e=r.current?.querySelector(`textarea`);e?.focus(),e?.scrollIntoView({block:`nearest`})},[]),(0,V.jsxs)(`div`,{ref:r,role:`group`,"aria-label":`Comment on this line`,className:`line-comment relative mt-1 mb-2 ml-6 rounded-xl border p-3`,children:[(0,V.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Cancel the comment`,title:`Cancel · Esc`,onClick:t,className:`absolute top-1.5 right-1.5 size-7 text-muted-foreground max-md:size-11`,children:(0,V.jsx)(wg,{"aria-hidden":`true`})}),(0,V.jsx)(gU,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async t=>await U(`planner.commentLine`,{line:e,text:t.trim()})?(n(t.trim()),!0):!1})]})}function zX({open:e,onClose:t,snap:n,comments:r,onSent:i}){let a=SA(e,xA.sheet),o=Pk(`(max-width: 767.98px)`),s=(0,m.useRef)(null),[c,l]=(0,m.useState)(),u=(0,m.useMemo)(()=>n.draft?MX(n.draft):[],[n.draft]),d=c===void 0?void 0:u[c]?.text.trim(),f=()=>{let e=c;l(void 0),requestAnimationFrame(()=>s.current?.querySelector(`[data-line="${e}"] button[aria-label^="Comment on this line"]`)?.focus())};return(0,V.jsx)(bj,{open:e&&a,onOpenChange:e=>!e&&t(),children:(0,V.jsxs)(wj,{showCloseButton:!1,side:o?`bottom`:`right`,"aria-label":`Draft plan`,onEscapeKeyDown:e=>{d!==void 0&&(e.preventDefault(),f())},onCloseAutoFocus:()=>l(void 0),className:J(`plan-sheet gap-0`,o?`data-[side=bottom]:inset-0 data-[side=bottom]:h-full data-[side=bottom]:max-w-none data-[side=bottom]:rounded-none`:`data-[side=right]:w-[min(44rem,92vw)] data-[side=right]:sm:max-w-none`),children:[(0,V.jsxs)(Tj,{className:`flex-row items-center justify-between gap-3 border-b px-5 py-3 max-md:px-4`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(Ej,{className:`text-base font-semibold tracking-tight`,children:`Draft plan`}),(0,V.jsxs)(Dj,{className:`text-xs text-muted-foreground`,children:[n.round>0?`${mX(n.round,n.limit)} · `:``,`choose a line to comment on it`]})]}),(0,V.jsx)(xj,{asChild:!0,children:(0,V.jsxs)(X,{variant:`ghost`,size:`sm`,"aria-label":`Close the plan`,title:`Close · Esc`,className:J(`gap-2 text-muted-foreground`,o&&`h-11 px-3 text-sm`),children:[(0,V.jsx)(wg,{"aria-hidden":`true`}),`Close`,o?null:(0,V.jsx)(kk,{chord:`Esc`,className:`kbd-hint`})]})})]}),(0,V.jsxs)(`div`,{ref:s,className:`flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain px-5 pt-4 pb-8 max-md:px-3 max-md:pb-[max(1.5rem,env(safe-area-inset-bottom))]`,children:[n.draft?(0,V.jsx)(IX,{draft:n.draft,comments:r,commenting:d===void 0?void 0:c,form:d===void 0?void 0:(0,V.jsx)(RX,{line:d,onCancel:f,onSent:e=>(i(d,e),f())},c),onComment:l}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.busy?oX:aX}),(0,V.jsx)(LX,{notes:n.notes})]})]})})}var BX=()=>MA(jA(`plan`,`previous`)),VX=e=>MA(jA(`plan`,`previous`,e));function HX(e){let t=Date.now()-Date.parse(e);return Number.isFinite(t)?Vj(Math.max(0,t)):``}function UX(e,t){return[`${t} message${t===1?``:`s`}`,`round ${e.rounds}`,HX(e.updatedAt)].filter(Boolean).join(` · `)}function WX({plan:e,selected:t}){return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>VX(e.id),className:J(cU,`max-md:min-h-11`),children:[(0,V.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),e.hasDraft?(0,V.jsx)(sU,{variant:`secondary`,children:`draft`}):null]}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:UX(e,e.messages)})]})})}function GX({id:e,onGone:t}){let n=JA(`planner.previousGet`,{id:e},[`planner`]),r=n.data;if(!r)return n.error?(0,V.jsx)(KA,{message:`Could not load that plan. ${n.error}`,onRetry:n.reload}):null;let i=!!r.archivedAt,a=async()=>{await U(`planner.previousOpen`,{id:e})&&MA(jA(`plan`))},o=async()=>{await U(`planner.previousArchive`,{id:e,archived:!i})&&t()},s=async()=>{await U(`planner.previousDelete`,{id:e})&&t()};return(0,V.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":r.title,children:[(0,V.jsxs)(yj,{children:[(0,V.jsx)(vj,{label:`Carry on planning`,text:`Carry on`,icon:Oh,tone:`primary`,shortcut:`C`,onClick:()=>void a()}),(0,V.jsx)(vj,{label:i?`Bring it back from the archive`:`Archive`,text:i?`Unarchive`:`Archive`,icon:i?bp:Sp,shortcut:`E`,onClick:()=>void o()}),(0,V.jsx)(Qj,{icon:cg,label:`Delete`,shortcut:`Delete`,title:`Delete "${r.title}"?`,description:`The conversation and the draft are removed for good.`,confirmLabel:`Delete plan`,variant:`destructive`,onConfirm:()=>void s()})]}),(0,V.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:r.title}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:[i?`archived`:``,UX(r,r.messages.length),r.seed??``].filter(Boolean).join(` · `)})]}),(0,V.jsxs)(CH,{title:`Draft plan`,children:[r.draft?(0,V.jsx)(bH,{text:r.draft}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The panel had not written a draft yet.`}),(0,V.jsx)(LX,{notes:r.notes})]}),(0,V.jsx)(CH,{title:`Conversation`,children:(0,V.jsx)(nX,{messages:r.messages,readOnly:!0})})]})}function KX({id:e}){let t=Aj(),[n,r]=(0,m.useState)(!1),i=JA(`planner.previous`,n?{archived:!0}:{},[`planner`]),a=i.data?.plans??[];if(!i.data&&i.error)return(0,V.jsx)(KA,{message:`Could not load the previous plans. ${i.error}`,onRetry:i.reload});let o=(0,V.jsxs)(Fj,{title:n?`Archived plans`:`Previous plans`,count:i.data?String(a.length):void 0,children:[(0,V.jsx)(vj,{label:`Back to the current plan`,icon:Ep,iconOnly:!0,onClick:()=>MA(jA(`plan`))}),(0,V.jsx)(vj,{label:n?`Show the previous plans`:`Show the archived plans`,text:n?`Previous`:`Archived`,icon:n?Ph:Sp,pressed:n,onClick:()=>{r(e=>!e),BX()}})]}),s=i.data?a.length===0?(0,V.jsx)(`p`,{className:`px-4 py-6 text-sm text-muted-foreground`,children:n?`No archived plans.`:`No previous plans. A plan you leave without saving it as a task waits here; one saved as a task is in the Tasks tab.`}):(0,V.jsx)(`ul`,{className:J(lU,`pt-2`),"aria-label":n?`Archived plans`:`Previous plans`,children:a.map(t=>(0,V.jsx)(WX,{plan:t,selected:t.id===e},t.id))}):(0,V.jsx)(Ij,{});return(0,V.jsx)(Pj,{wide:t,list:(0,V.jsxs)(V.Fragment,{children:[o,s]}),detail:e?(0,V.jsx)(GX,{id:e,onGone:()=>{i.reload(),BX()}},e):null,open:e!==void 0,onClose:BX,hint:`Pick a plan to read it, carry it on, archive it or delete it.`,describe:`A previous plan`})}function qX({limit:e}){return e<=0?null:(0,V.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`flex gap-1`,children:Array.from({length:e},(t,n)=>(0,V.jsx)(`span`,{className:J(`h-1.5 w-4 rounded-full`,n===e-1?`bg-primary`:`bg-border`)},n))}),(0,V.jsxs)(`span`,{children:[`up to `,e,` rounds, the last the oracle's`]})]})}function JX({snap:e,onDone:t}){let n=bX(e);return(0,V.jsx)(`div`,{className:`@container flex-1 overflow-y-auto px-5 pt-8 pb-dock max-md:px-4 max-md:pt-5 md:px-8 md:pt-10`,children:(0,V.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-8`,children:[(0,V.jsxs)(`header`,{className:`flex flex-col gap-4 @3xl:flex-row @3xl:items-end @3xl:justify-between`,children:[(0,V.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`card-flat grid size-11 shrink-0 place-items-center rounded-xl border text-primary`,children:(0,V.jsx)(Bh,{className:`size-5`})}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:`Plan with the panel`}),(0,V.jsx)(`p`,{className:`max-w-xl text-sm leading-relaxed text-muted-foreground`,children:uX})]})]}),(0,V.jsxs)(`div`,{className:`flex flex-col items-start gap-2 @3xl:items-end`,children:[(0,V.jsx)(kX,{}),(0,V.jsx)(qX,{limit:e.limit})]})]}),(0,V.jsxs)(`section`,{"aria-labelledby":`plan-panel`,className:`flex flex-col gap-3`,children:[(0,V.jsx)(`h3`,{id:`plan-panel`,className:`text-xs text-muted-foreground`,children:(0,V.jsx)(SH,{title:`The panel`,right:pX(n)})}),(0,V.jsx)(EX,{cells:n,onToggled:t})]}),(0,V.jsxs)(`section`,{"aria-labelledby":`plan-steps`,className:`flex flex-col gap-3`,children:[(0,V.jsx)(`h3`,{id:`plan-steps`,className:`text-xs text-muted-foreground`,children:(0,V.jsx)(SH,{title:`How a plan comes together`})}),(0,V.jsx)(`ol`,{className:`grid gap-3 @2xl:grid-cols-2 @4xl:grid-cols-4`,children:fX.map((e,t)=>(0,V.jsxs)(`li`,{className:`card-flat relative flex gap-3 rounded-xl border p-3.5`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-6 shrink-0 place-items-center rounded-full bg-accent text-xs font-semibold text-primary tabular-nums`,children:t+1}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),(0,V.jsx)(`span`,{className:`text-xs leading-relaxed text-muted-foreground`,children:e.text})]})]},e.title))})]}),(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground`,children:[(0,V.jsx)(wp,{"aria-hidden":`true`,className:`size-4 text-primary motion-safe:animate-bounce`}),`Start in the box below.`,(0,V.jsx)(Ak,{chord:`/`,className:`max-md:hidden`,children:`write`}),(0,V.jsx)(Ak,{chord:`Enter`,className:`max-md:hidden`,children:`send to the panel`})]})]})})}function YX({snap:e,reload:t}){let[n,r]=(0,m.useState)(!1),[i,a]=(0,m.useState)(new Map),o=(e,t)=>a(n=>new Map(n).set(e,[...n.get(e)??[],t])),{ref:s,onScroll:c}=nW(`${JSON.stringify(e.messages)}${e.busy}`);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(jX,{snap:e,onDone:t,onViewPlan:()=>r(!0)}),(0,V.jsx)(`div`,{ref:s,onScroll:c,className:`min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-5 pt-5 pb-dock max-md:px-4`,children:(0,V.jsx)(nX,{messages:e.messages,busy:e.busy})}),(0,V.jsx)(zX,{open:n,onClose:()=>r(!1),snap:e,comments:i,onSent:o})]})}function XX({rest:e=[]}){return e[0]===`previous`?(0,V.jsx)(KX,{id:e[1]}):(0,V.jsx)(ZX,{})}function ZX(){let e=JA(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,V.jsx)(KA,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,V.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=gX(t);return(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:n?(0,V.jsx)(JX,{snap:t,onDone:e.reload}):(0,V.jsx)(YX,{snap:t,reload:e.reload})})}var QX=`Describe a small change in the box below and one agent makes it now, beside any running task.`;function $X(e){return e.prompt.split(`
100
- `).find(e=>e.trim())?.trim()??`(empty)`}function eZ(e){return[...e].reverse()}function tZ(e){let t=Number.isFinite(e)?Math.max(0,Math.round(e/1e3)):0,n=Math.floor(t/60);if(n===0)return`${t}s`;let r=t%60;return r===0?`${n}m`:`${n}m ${String(r).padStart(2,`0`)}s`}function nZ(e,t){return e.startedAt?tZ((e.finishedAt??t)-e.startedAt):``}function rZ(e,t){let n=e.model?`${e.model}${e.thinking?` · ${e.thinking}`:``}`:e.thinking??``;return[nZ(e,t),n,e.tools?`${e.tools} tool${e.tools===1?``:`s`}`:``,e.usage?.cost?`$${e.usage.cost.toFixed(2)}`:``].filter(Boolean).join(` · `)}function iZ(e){return e===`queued`?`Waiting for the quick fix ahead of it.`:e===`running`?`starting…`:e===`held`?`Not started.`:`No tool calls.`}function aZ({job:e}){let t=e.status===`held`;return(0,V.jsxs)(V.Fragment,{children:[e.route?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Routed `,e.route]}):null,e.note&&t?(0,V.jsxs)(`p`,{className:`flex items-start gap-2 rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-sm text-foreground`,children:[(0,V.jsx)(ug,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,V.jsxs)(`span`,{children:[`Held: `,e.note,`.`]})]}):null,e.note&&!t?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.routed?`Routed here by the oracle — ${e.note}`:e.note}):null,e.routed&&!e.note?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Routed here by the oracle.`}):null]})}function oZ({job:e}){let t=e.status===`running`;return e.steps.length===0?(0,V.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[t?(0,V.jsx)(BA,{className:`size-3.5`}):null,iZ(e.status)]}):(0,V.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.steps.map((e,n)=>(0,V.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,V.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:zj(e.at)}),(0,V.jsx)(`span`,{className:`flex h-5 w-3.5 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:e.pending&&t?(0,V.jsx)(BA,{className:`size-3.5`}):(0,V.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}),(0,V.jsx)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:e.pending&&t?`${e.text}…`:e.text})]},n))})}function sZ({job:e}){return e.status===`held`?(0,V.jsxs)(yj,{children:[(0,V.jsx)(vj,{label:`Run anyway`,icon:Oh,tone:`primary`,shortcut:`R`,onClick:()=>void U(`quickfix.runAnyway`,{id:e.id})}),(0,V.jsx)(vj,{label:`Turn it into a task`,text:`Make it a task`,icon:Wm,shortcut:`T`,onClick:()=>void U(`quickfix.movedToTask`,{id:e.id})})]}):e.status!==`queued`&&e.status!==`running`?null:(0,V.jsx)(yj,{children:(0,V.jsx)(Qj,{icon:im,label:`Cancel the quick fix`,text:`Cancel`,shortcut:`C`,title:`Cancel this quick fix?`,description:`The agent stops. Files it already edited stay as they are.`,confirmLabel:`Cancel quick fix`,variant:`destructive`,onConfirm:()=>void U(`quickfix.cancel`,{id:e.id})})})}function cZ({job:e,now:t}){return(0,V.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Quick fix detail`,children:[(0,V.jsx)(sZ,{job:e}),(0,V.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,V.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:$X(e)}),(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:e.status}),rZ(e,t)?(0,V.jsx)(`span`,{children:rZ(e,t)}):null]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),e.prompt.trim().includes(`
101
- `)?(0,V.jsx)(bH,{text:e.prompt}):null,(0,V.jsx)(aZ,{job:e}),(0,V.jsx)(CH,{title:`Steps`,children:(0,V.jsx)(oZ,{job:e})}),e.files?.length?(0,V.jsx)(CH,{title:`Edited`,children:(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,V.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,V.jsx)(`p`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:e.error}):null,e.report?(0,V.jsx)(CH,{title:`Report`,children:(0,V.jsx)(bH,{text:e.report})}):null]})}function lZ({status:e}){if(e===`running`)return(0,V.jsx)(BA,{className:`size-3.5`,"aria-label":`running`});let t={queued:um,success:Rp,failed:wg,timeout:wg,cancelled:fh,held:Sh,running:um}[e];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(t,{"aria-hidden":`true`,className:`size-4 ${e===`success`?`text-success`:e===`failed`||e===`timeout`?`text-destructive`:e===`held`?`text-warning`:`text-muted-foreground`}`}),(0,V.jsx)(`span`,{className:`sr-only`,children:e})]})}function uZ({job:e,selected:t,now:n,onSelect:r}){let i=nZ(e,n);return(0,V.jsx)(`li`,{children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>r(e.id),className:J(cU,`flex-row items-start gap-2.5 text-sm max-md:min-h-11`),children:[(0,V.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:(0,V.jsx)(lZ,{status:e.status})}),(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:$X(e)}),i?(0,V.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function dZ({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,V.jsx)(`ul`,{className:lU,children:e.map(e=>(0,V.jsx)(uZ,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}var fZ=()=>MA(jA(`quickfix`)),pZ=e=>MA(jA(`quickfix`,e));function mZ(e){let[t,n]=(0,m.useState)(()=>Date.now());return(0,m.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),e?t:Date.now()}function hZ(){return(0,V.jsx)(PA,{className:`m-4 flex-1`,children:(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(Eg,{"aria-hidden":`true`})}),(0,V.jsx)(zA,{className:`font-medium text-foreground`,children:QX})]})})}function gZ({id:e}){let t=Aj(),n=JA(`quickfix.list`,{},[`quickfix`]),r=eZ(n.data?.jobs??[]),i=mZ(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,V.jsx)(KA,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,V.jsx)(hZ,{}):(0,V.jsx)(_Z,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:a})}function _Z({id:e,wide:t,loaded:n,jobs:r,now:i}){let a=e??(t?r[0]?.id:void 0),o=r.find(e=>e.id===a),s=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Fj,{title:`Quick fixes`,count:String(r.length)}),n?(0,V.jsx)(dZ,{jobs:r,selectedId:a,now:i,onSelect:pZ}):(0,V.jsx)(Ij,{})]});return(0,V.jsx)(Pj,{wide:t,list:s,detail:o?(0,V.jsx)(cZ,{job:o,now:i}):e?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:fZ,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}var vZ={},yZ=new Set;function bZ(e){vZ=e;for(let e of[...yZ])e()}function xZ(e){vZ.taskId!==e&&bZ({...vZ,taskId:e})}function SZ(e){return yZ.add(e),()=>{yZ.delete(e)}}function CZ(){return(0,m.useSyncExternalStore)(SZ,()=>vZ,()=>vZ)}function wZ(e,t=0,n=!1){let r=!n&&!e.waiting&&!!e.runningSince,i=r?Date.parse(e.serverNow)-Date.parse(e.runningSince):0;return Math.max(0,e.elapsedMs)+(Number.isFinite(i)?Math.max(0,i):0)+(r?Math.max(0,t):0)}function TZ(e){let t=Math.floor(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}function EZ(e,t){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),!e)return;let t=performance.now(),n=window.setInterval(()=>r(performance.now()-t),1e3);return()=>window.clearInterval(n)},[e,t]),e?n:0}function DZ({timing:e,stopped:t}){let[n,r]=(0,m.useState)(0);return(0,m.useEffect)(()=>{if(r(0),t||e.waiting||!e.runningSince)return;let n=performance.now(),i=window.setInterval(()=>r(performance.now()-n),1e3);return()=>window.clearInterval(i)},[e,t]),(0,V.jsxs)(`span`,{className:`tabular-nums break-words`,children:[e.waiting?`Waiting for you · `:``,e.phase.replaceAll(`_`,` `),` · `,TZ(wZ(e,n,t)),` execution`]})}function OZ({work:e,timing:t,stopped:n}){let r=e.running&&!n&&!t?.waiting,i=EZ(r,e);return(0,V.jsxs)(`span`,{className:`tabular-nums break-words`,"data-work-clock":r?`running`:`stopped`,children:[t?.waiting?`Waiting for you · `:``,t?`${t.phase.replaceAll(`_`,` `)} · `:``,`worked `,TZ(e.workedMs+i)]})}function kZ({timing:e,work:t,stopped:n=!1}){return t?(0,V.jsx)(OZ,{work:t,...e?{timing:e}:{},stopped:n}):e?(0,V.jsx)(DZ,{timing:e,stopped:n},JSON.stringify(e)):(0,V.jsx)(`span`,{children:`Timing unavailable`})}var AZ=`This merges the reviewed commit into main and pushes main, then removes the task worktree after verifying the merge. The task branch is kept.`,jZ={pending_approval:`Ready for your review`,deferred:`Saved for later`,in_progress:`Delivery in progress`,successful:`Delivered`,recoverable_failure:`Delivery needs attention`};function MZ({delivery:e,title:t}){return(0,V.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,V.jsx)(`p`,{className:`font-medium break-words`,children:t}),(0,V.jsxs)(`dl`,{className:`grid gap-1 break-all text-muted-foreground`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`inline`,children:`Project: `}),(0,V.jsx)(`dd`,{className:`inline`,children:e.project})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`inline`,children:`Repository: `}),(0,V.jsx)(`dd`,{className:`inline`,children:e.repository??`Unavailable — refresh review`})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`inline`,children:`Source: `}),(0,V.jsxs)(`dd`,{className:`inline`,children:[e.sourceBranch,` · `,e.sourceCommit??`Commit unavailable`]})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`dt`,{className:`inline`,children:`Target: `}),(0,V.jsxs)(`dd`,{className:`inline`,children:[`main`,e.targetCommit?` · ${e.targetCommit}`:``]})]})]}),(0,V.jsxs)(`p`,{children:[`Checks: `,e.verification?.checks??`unavailable`]}),(0,V.jsx)(`p`,{children:e.verification?.summary??`Verification unavailable. Refresh the review before delivery.`}),e.verification?(0,V.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Local completion/QA: `,e.verification.localVerified?`passed`:`not verified`,` · Repository rules: `,e.verification.rulesKnown?`known`:`unavailable`,e.verification.requiredChecks.length?` · Required: ${e.verification.requiredChecks.join(`, `)}`:``]}):null]})}function NZ({action:e,delivery:t,busy:n,onAction:r}){let i=t.blocked[e],a=e===`merge_main`&&t.status===`successful`&&!!t.cleanupError,o=n||t.status===`in_progress`||t.status===`successful`&&!a||!!i;return(0,V.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:o,onClick:()=>r(e),children:e===`create_pr`?`Create PR`:a?`Retry worktree cleanup`:`Merge to main`}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e===`create_pr`?`Pushes the task branch and opens a PR targeting main. Does not merge.`:a?`Main was delivered. Removes the retained worktree after confirmation.`:`Updates and pushes main, then removes the task worktree. Requires confirmation.`}),i?(0,V.jsxs)(`p`,{className:`text-sm text-destructive`,children:[i,` Refresh review after resolving this restriction, then choose the action again.`]}):null]})}async function PZ(e,t,n){let r={taskId:t,reviewId:n};return e===`refresh`?Se(`tasks.deliveryReview`,{taskId:t}):e===`defer`?Se(`tasks.deliveryDefer`,r):Se(`tasks.deliver`,{...r,action:e,...e===`merge_main`?{confirmMain:!0}:{}})}function FZ({taskId:e,delivery:t}){let[n,r]=(0,m.useState)(t),[i,a]=(0,m.useState)(!1),[o,s]=(0,m.useState)(),[c,l]=(0,m.useState)(!1),u=(0,m.useRef)(null),d=fe(),f=`${d}:${e}`,p=(0,m.useRef)(f);return p.current=f,(0,m.useEffect)(()=>(p.current=f,()=>{p.current=``}),[f]),(0,m.useEffect)(()=>{r(t),l(!1)},[t,e]),{current:n,setCurrent:r,busy:i,setBusy:a,error:o,setError:s,confirm:c,setConfirm:l,trigger:u,project:d,identity:f,scope:p}}function IZ(e){return e.scope.current===e.identity&&e.project===fe()}function LZ(e,t){let n=(0,m.useRef)(!1);async function r(r){if(!(n.current||r===`merge_main`&&!e.confirm)){n.current=!0,e.setBusy(!0),e.setError(void 0),e.setConfirm(!1);try{let n=await PZ(r,t.taskId,e.current.reviewId);IZ(e)&&(e.setCurrent(n.delivery),t.onChanged())}catch(t){IZ(e)&&e.setError(t instanceof Error?t.message:String(t))}finally{n.current=!1,e.scope.current&&e.setBusy(!1)}}}return r}function RZ(e){let t=FZ(e),n=LZ(t,e),r=SA(t.confirm,xA.confirm),i=t.current.status===`successful`||t.current.status===`in_progress`;function a(){t.trigger.current=document.activeElement,t.setConfirm(!0)}return{...t,request:n,slot:r,terminal:i,reviewMerge:a}}function zZ({review:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Task completion is recorded separately. Nothing is published without your approval.`}),(0,V.jsx)(`p`,{role:`status`,className:`text-sm`,children:e.busy?`Updating delivery…`:e.current.operation?`Operation: ${e.current.operation.stage}`:jZ[e.current.status]}),e.current.error||e.error?(0,V.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.error??e.current.error,` Completed work is retained. Refresh review to reconcile the result before retrying.`]}):null,e.current.cleanupError?(0,V.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[e.current.cleanupError,` Retry cleanup after resolving it.`]}):null,e.current.operation?.worktreeRemoved?(0,V.jsx)(`p`,{className:`text-sm`,children:`Task worktree removed.`}):null,e.current.result?(0,V.jsxs)(`p`,{className:`text-sm break-all`,children:[e.current.result.action===`create_pr`?`PR #${e.current.result.pullNumber??``} created`:`main pushed · ${e.current.result.commit??``}`,e.current.result.pullUrl?(0,V.jsxs)(`span`,{children:[` · `,e.current.result.pullUrl]}):null]}):null]})}function BZ({review:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mt-3 grid gap-3 max-md:grid-cols-1 md:grid-cols-2`,children:[(0,V.jsx)(NZ,{action:`create_pr`,delivery:e.current,busy:e.busy,onAction:()=>void e.request(`create_pr`)}),(0,V.jsx)(NZ,{action:`merge_main`,delivery:e.current,busy:e.busy,onAction:e.reviewMerge})]}),(0,V.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,V.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy,onClick:()=>void e.request(`refresh`),children:`Refresh review`}),(0,V.jsx)(X,{variant:`ghost`,className:`max-md:min-h-11`,disabled:e.busy||e.terminal,onClick:()=>void e.request(`defer`),children:`Not now`})]})]})}function VZ({review:e}){let t=e.current.status===`successful`&&!!e.current.cleanupError,n=t?`Main was already delivered. Remove the task worktree if it still contains only the reviewed commit. The task branch is kept.`:AZ;return(0,V.jsx)(mA,{open:e.slot,onOpenChange:e.setConfirm,label:t?`Confirm worktree removal`:`Confirm merge to main`,description:n,onCloseAutoFocus:t=>{t.preventDefault(),requestAnimationFrame(()=>e.trigger.current?.focus())},children:(0,V.jsxs)(`div`,{className:`grid gap-4 p-4`,children:[(0,V.jsx)(`h3`,{className:`font-medium`,children:t?`Remove task worktree?`:`Merge to main?`}),(0,V.jsx)(`p`,{className:`text-sm`,children:n}),(0,V.jsxs)(`p`,{className:`break-all text-sm text-muted-foreground`,children:[e.current.repository,` · `,e.current.sourceCommit,` → main`]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,V.jsx)(X,{variant:`outline`,className:`max-md:min-h-11`,onClick:()=>e.setConfirm(!1),children:`Cancel`}),(0,V.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,disabled:e.busy||!!e.current.blocked.merge_main||e.terminal&&!t,onClick:()=>void e.request(`merge_main`),children:t?`Confirm worktree removal`:`Confirm merge and push main`})]})]})})}function HZ({title:e,review:t}){return(0,V.jsxs)(CH,{title:`Completed work · delivery review`,right:jZ[t.current.status],children:[(0,V.jsx)(MZ,{delivery:t.current,title:e}),(0,V.jsx)(zZ,{review:t}),(0,V.jsx)(BZ,{review:t}),(0,V.jsx)(VZ,{review:t})]})}function UZ(e){let t=RZ(e);return(0,V.jsx)(HZ,{title:e.title,review:t})}var WZ=8;function GZ(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function KZ(e,t){let n=Math.min(t,WZ);if(n<=0)return[];let r=Math.min(n,Math.round(Math.max(0,e)/t*n));return Array.from({length:n},(e,t)=>t<r)}function qZ({done:e,total:t}){return(0,V.jsx)(`span`,{className:`inline-flex items-center gap-0.5`,"aria-hidden":`true`,children:KZ(e,t).map((e,t)=>(0,V.jsx)(`span`,{className:J(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-muted-foreground/25`)},t))})}function JZ({check:e,className:t}){return(0,V.jsx)(e===`done`?Qp:e===`dropped`?om:cm,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,e===`done`?`text-success`:`text-muted-foreground`,t)})}var YZ={open:cm,delivered:em,addressed:Qp},XZ={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function ZZ({comment:e}){let t=Vj(Date.now()-Date.parse(e.createdAt)),n=YZ[e.status];return(0,V.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(n,{"aria-hidden":`true`,className:e.status===`addressed`?`size-3.5 text-success`:`size-3.5`}),XZ[e.status],`, `,t,e.editedAt?` (edited)`:``]})}function QZ({comment:e,taskId:t,own:n}){let[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(),s=a&&(a.editedAt??``)>(e.editedAt??``)?a:e;return(0,V.jsxs)(`li`,{className:`card-flat min-w-0 rounded-lg border px-3.5 py-2.5`,children:[r?(0,V.jsx)(YY,{text:s.text,onSave:async n=>{let r=await Se(`tasks.editComment`,{taskId:t,commentId:e.id,text:n});o(r.comment)},onCancel:()=>i(!1)}):(0,V.jsx)(bH,{text:s.text}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsx)(ZZ,{comment:s}),n&&!r?(0,V.jsx)(X,{size:`sm`,variant:`ghost`,className:`max-md:min-h-11`,onClick:()=>i(!0),children:`Edit`}):null]})]})}function $Z({taskId:e,finished:t,canComment:n}){let r=JA(`tasks.comments`,{taskId:e},[`tasks`]),i=Nk(`status`),a=r.data?.comments??[],o=a.filter(e=>e.status!==`addressed`).length;return(0,V.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,V.jsx)(`h3`,{id:`comments-${e}`,className:`text-sm`,children:(0,V.jsx)(SH,{title:`Comments`,right:o>0?`${o} open`:void 0})}),a.length===0?(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`No comments.`:n?`No comments yet. Comment on the plan in the box below (Markdown and images work); the oracle amends it.`:`No comments yet.`}):(0,V.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(t=>(0,V.jsx)(QZ,{taskId:e,comment:t,own:!!(t.by&&t.by===i.data?.sessionId)},`${e}-${t.id}`))})]})}var eQ={mine:`This session`,others:`Other sessions`,pending:`Pending`,recent:`Finished`,archived:`Archived`},tQ={open:`open`,done:`done`,dropped:`abandoned`},nQ={none:{label:`None`,depth:`nothing that runs changed: the engine's checks decide, no QA agent`,tone:`bg-accent text-muted-foreground`},low:{label:`Low`,depth:`a light check: the diff, the nearest tests, done once confident`,tone:`bg-success/10 text-success`},medium:{label:`Medium`,depth:`a standard check: the acceptance criteria and realistic regressions`,tone:`bg-warning/10 text-warning`},high:{label:`High`,depth:`a deep, adversarial review: invariants, recovery and everything the change reaches`,tone:`bg-destructive/10 text-destructive`}};function rQ(e){let t=e.source===`classifier`?`Jev`:`rules`;if(!e.qaRequired)return`${t} · no QA agent`;let{min:n,max:r}=e.testBudget;return`${t} · ${n===r?r:`${n}-${r}`} new tests at most`}var iQ=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function aQ(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function oQ(e){return e===`now`?`just now`:`${e} ago`}function sQ(e){if(e.kind===`plan`)return[`planned`,e.age?e.age===`now`?`saved just now`:`saved ${e.age} ago`:``,e.issue?`#${e.issue}`:``].filter(Boolean).join(` · `);let t=e.owner??(e.section===`mine`?`this session`:``);return[aQ(e.status,e.paused),e.auto?`auto`:``,t].filter(Boolean).join(` · `)}function cQ(e){let t=[];for(let n of e){let e=t.at(-1);e&&e.section===n.section?e.rows.push(n):t.push({section:n.section,rows:[n]})}return t}function lQ(e){let t=e.filter(e=>e.kind!==`archived`),n=t.filter(e=>e.check===`open`).length,r=t.length-n,i=e.length-t.length;return[n?`${n} open`:``,r?`${r} finished`:``,i?`${i} archived`:``].filter(Boolean).join(` · `)||`0`}function uQ({step:e,stopped:t}){let n=EZ(!t,e);return(0,V.jsx)(`span`,{className:`tabular-nums`,children:TZ((e.workedMs??0)+n)})}function dQ(){return(0,V.jsxs)(`span`,{"aria-hidden":`true`,className:`relative mt-[0.3125rem] grid size-4 shrink-0 place-items-center`,children:[(0,V.jsx)(`span`,{className:`absolute size-2.5 rounded-full bg-primary/30 motion-safe:animate-status-ping`}),(0,V.jsx)(`span`,{className:`size-2 rounded-full bg-primary`})]})}function fQ(e){return(e.split(`
102
- `).find(e=>e.trim())?.trim()??``).replace(/^steps?\s+\d+(?:\s*[-–]\s*\d+)?\s*[:.\-–]\s*/i,``).replace(/^\*\*?goal\*\*?\s*[:\-–]\s*/i,``)}function pQ({name:e,className:t}){return(0,V.jsx)(`span`,{"aria-hidden":`true`,className:J(`grid size-5 shrink-0 place-items-center rounded-md border border-border bg-card`,lW(e),t),children:(0,V.jsx)(oW,{source:e,className:`size-3`})})}function mQ({id:e,agents:t,stepText:n}){let[r,i]=(0,m.useState)(Date.now);(0,m.useEffect)(()=>{let e=window.setInterval(()=>i(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let a=t.filter(e=>!e.parentRunId||!t.some(t=>t.runId===e.parentRunId)).flatMap(e=>[e,...t.filter(t=>t.parentRunId===e.runId)]);return(0,V.jsx)(`ul`,{id:e,"aria-label":`Agents on this step`,className:`mt-2 flex flex-col overflow-hidden rounded-lg border border-border bg-card`,children:a.map(e=>{let i=fW({domain:e.domain}),a=!!e.parentRunId&&t.some(t=>t.runId===e.parentRunId),o=Date.parse(e.startedAt),s=fQ(e.instruction),c=s&&s.toLowerCase()!==n.trim().toLowerCase()?s:``;return(0,V.jsxs)(`li`,{className:`flex min-w-0 items-center gap-2.5 border-b border-border px-3 py-2 text-xs last:border-b-0`,children:[a?(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1.5 h-4 w-3 shrink-0 rounded-bl-md border-b border-l border-border`}):null,(0,V.jsx)(pQ,{name:i}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:J(`font-medium`,lW(i)),children:cW(i)}),a?(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`child`}):null,(0,V.jsx)(kW,{className:`size-3 text-muted-foreground`}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`working`})]}),c?(0,V.jsx)(`span`,{className:`truncate text-muted-foreground`,title:e.instruction,children:c}):null]}),Number.isFinite(o)?(0,V.jsx)(`span`,{className:`shrink-0 tabular-nums text-muted-foreground`,children:TZ(Math.max(0,r-o))}):null]},e.runId)})})}function hQ({agents:e,count:t,step:n,stopped:r}){let i=[...new Set(e.map(e=>fW({domain:e.domain})))].slice(0,3);return(0,V.jsxs)(V.Fragment,{children:[i.length>0?(0,V.jsx)(`span`,{className:`flex -space-x-1.5`,children:i.map(e=>(0,V.jsx)(pQ,{name:e,className:`size-[1.125rem] ring-2 ring-card`},e))}):null,(0,V.jsxs)(`span`,{children:[t,` `,t===1?`agent`:`agents`,(0,V.jsx)(`span`,{className:`sr-only`,children:` working`})]}),(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/60`,children:`·`}),(0,V.jsx)(uQ,{step:n,stopped:r})]})}var gQ=`inline-flex h-6 shrink-0 items-center gap-1.5 rounded-full border border-primary/20 bg-primary/5 pr-2 pl-1 text-xs font-medium text-primary`;function _Q({step:e,index:t,stopped:n}){let r=!!e.active&&!n,i=r?e.agents??[]:[],a=i.length||(e.activeAgentCount??1),[o,s]=(0,m.useState)(!1),c=(0,m.useId)(),l=e.status===`done`,u=l?`text-success`:e.status===`current`?`text-primary`:`text-muted-foreground`,d=l?Qp:cm;return(0,V.jsxs)(`li`,{className:`flex min-w-0 flex-col`,"data-step":r?`active`:e.status,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5 text-sm max-md:flex-wrap`,children:[r?(0,V.jsx)(dQ,{}):(0,V.jsx)(d,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 ${u}`}),(0,V.jsxs)(`span`,{className:`shrink-0 text-xs leading-5 text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,V.jsx)(`span`,{className:J(`min-w-0 break-words`,r||e.status===`current`?`text-foreground`:`text-muted-foreground`),children:e.text}),r&&i.length>0?(0,V.jsxs)(`button`,{type:`button`,"aria-expanded":o,"aria-controls":c,onClick:()=>s(e=>!e),className:J(gQ,`-my-0.5 transition-colors outline-none hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`),children:[(0,V.jsx)(hQ,{agents:i,count:a,step:e,stopped:n}),(0,V.jsx)(Bp,{"aria-hidden":`true`,className:J(`size-3 transition-transform duration-200`,o&&`rotate-180`)}),(0,V.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):r?(0,V.jsxs)(`span`,{className:J(gQ,`-my-0.5`),children:[(0,V.jsx)(hQ,{agents:i,count:a,step:e,stopped:n}),(0,V.jsx)(`span`,{className:`sr-only`,children:` (being worked on now)`})]}):e.status===`current`&&!n?(0,V.jsxs)(`span`,{className:`shrink-0 rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:[`next`,(0,V.jsx)(`span`,{className:`sr-only`,children:` (the step up next)`})]}):null]}),o&&i.length>0?(0,V.jsx)(`div`,{className:`pl-[3.25rem] max-md:pl-0`,children:(0,V.jsx)(mQ,{id:c,agents:i,stepText:e.text})}):null]})}function vQ({steps:e,stopped:t}){let n=e.filter(e=>e.status===`done`).length;return(0,V.jsx)(CH,{title:`Steps`,right:`${n}/${e.length} done`,children:(0,V.jsx)(`ol`,{className:`flex flex-col gap-2`,"aria-label":`Steps`,children:e.map((e,n)=>(0,V.jsx)(_Q,{step:e,index:n,stopped:t},`${n}-${e.text}`))})})}function yQ({text:e}){let[t,n]=(0,m.useState)(!1),r=(0,m.useId)();return(0,V.jsxs)(CH,{title:`Full plan`,children:[(0,V.jsxs)(`button`,{type:`button`,"aria-expanded":t,"aria-controls":r,onClick:()=>n(e=>!e),className:`inline-flex min-h-11 w-fit items-center gap-1.5 rounded-md text-sm text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,V.jsx)(Wp,{"aria-hidden":`true`,className:J(`size-4 transition-transform duration-200 ease-snap`,t&&`rotate-90`)}),t?`Hide the details`:`Read the details of each step`]}),t?(0,V.jsx)(`div`,{id:r,children:(0,V.jsx)(bH,{text:e})}):null]})}function bQ({detail:e,finished:t}){return e.plan&&e.planDetails?(0,V.jsx)(yQ,{text:e.planDetails}):e.plan?(0,V.jsx)(CH,{title:`Approved plan`,children:(0,V.jsx)(bH,{text:e.plan})}):e.proposal?(0,V.jsx)(CH,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,V.jsx)(bH,{text:e.proposal})}):(0,V.jsx)(CH,{title:`Plan`,children:(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`It ended before a plan was made.`:`No proposal or plan yet — the oracle is still clarifying or scouting.`})})}function xQ({amendments:e}){return e.length===0?null:(0,V.jsx)(CH,{title:`Amendments`,children:(0,V.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,V.jsx)(`li`,{className:`break-words`,children:e},e))})})}function SQ({detail:e}){return e.waiting.length===0&&e.blockers.length===0?null:(0,V.jsx)(CH,{title:`Waiting on`,children:(0,V.jsxs)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:[e.waiting.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex gap-2`,children:[(0,V.jsx)(Xp,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,V.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.kind,` `,e.detail]})]},`${t}-${e.kind}`)),e.blockers.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex gap-2`,children:[(0,V.jsx)(om,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,V.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))]})})}function CQ({risk:e}){let t=nQ[e.risk];return(0,V.jsxs)(CH,{title:`QA risk`,right:rQ(e),children:[(0,V.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-1 text-sm`,"data-qa-risk":e.risk,children:[(0,V.jsx)(`span`,{className:J(`rounded-md px-2 py-0.5 text-xs font-medium`,t.tone),children:t.label}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:t.depth})]}),e.focusAreas.length>0?(0,V.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,"aria-label":`What QA looks at first`,children:e.focusAreas.map(e=>(0,V.jsx)(`li`,{className:`break-words`,children:e},e))}):null,(0,V.jsxs)(`p`,{className:`text-xs break-words text-muted-foreground`,children:[e.riskFactors.join(` · `),e.qaRequired?` · existing tests ${e.existingTestsLikelySufficient?`likely enough`:`likely not enough`}`:``]})]})}function wQ({runs:e}){return e.length===0?null:(0,V.jsx)(CH,{title:`Recent runs`,children:(0,V.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,V.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function TQ({detail:e,finished:t}){return(0,V.jsxs)(V.Fragment,{children:[e.steps.length>0?(0,V.jsx)(vQ,{steps:e.steps,stopped:t}):null,e.request?(0,V.jsx)(CH,{title:`Request`,children:(0,V.jsx)(bH,{text:e.request})}):null,(0,V.jsx)(bQ,{detail:e,finished:t})]})}function EQ({detail:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(xQ,{amendments:e.amendments}),(0,V.jsx)(SQ,{detail:e}),e.qaRisk?(0,V.jsx)(CQ,{risk:e.qaRisk}):null,(0,V.jsx)(wQ,{runs:e.runs})]})}function DQ({row:e,quiet:t=!1}){let n=(0,m.useRef)(!0);(0,m.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]);async function r(){if(e.section===`mine`)return MA(`#/lobby`);let t=fe(),r=()=>n.current&&fe()===t;try{let t=await Se(`tasks.open`,{taskId:e.id});if(!r())return;let n=await Se(`status.get`,{});if(!r())return;if(t.sessionId&&t.sessionId===n.sessionId)return MA(`#/lobby`);if(t.sessionId&&!t.key)return np.info(`This task runs in another terminal. Switch to that terminal to work on it.`);if(n.busy)return np.info(`The oracle is working in this window. Stop it first, then open the task in its session.`);await U(`sessions.switch`,t.key?{key:t.key}:{claimTaskId:e.id})&&r()&&MA(`#/lobby`)}catch(e){r()&&np.error(e instanceof Error?e.message:String(e))}}let i=e.section===`mine`;return(0,V.jsx)(vj,{label:i?`Open in its session: this window`:`Open in its session`,text:`Open in session`,icon:Op,tone:t?`neutral`:`primary`,shortcut:`S`,onClick:()=>void r()})}function OQ({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,V.jsxs)(`span`,{className:`font-medium text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,V.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,V.jsxs)(`span`,{children:[n>0?(0,V.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,V.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function kQ({planId:e}){let t=JA(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,V.jsxs)(V.Fragment,{children:[n.issue?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,V.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,V.jsx)(OQ,{split:n.split}):null,(0,V.jsx)(CH,{title:`Agreed plan`,children:(0,V.jsx)(bH,{text:n.brief})})]}):t.error?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function AQ({row:e,onGone:t}){let n=async n=>{await U(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await U(`plans.discard`,{planId:e.id})&&t()};return(0,V.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-4`,"aria-label":e.title,children:[(0,V.jsxs)(yj,{children:[(0,V.jsx)(vj,{label:`Start here`,icon:Oh,tone:`primary`,shortcut:`S`,onClick:()=>void n(`here`)}),(0,V.jsx)(vj,{label:`Start in a new session`,text:`New session`,icon:Qh,shortcut:`N`,onClick:()=>void n(`session`)}),(0,V.jsx)(Qj,{icon:cg,label:`Discard`,shortcut:`Delete`,title:`Discard "${e.title}"?`,description:`The saved plan is removed from the list. This cannot be undone.`,confirmLabel:`Discard`,variant:`destructive`,onConfirm:()=>void r()})]}),(0,V.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,V.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,V.jsx)(JZ,{check:`open`,className:`mt-1.5`}),(0,V.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${oQ(e.age)}`:``]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,V.jsx)(kQ,{planId:e.id})]})}function jQ({row:e,onResumed:t}){let[n,r]=(0,m.useState)(!1),i=(0,m.useRef)(!0);(0,m.useEffect)(()=>(i.current=!0,()=>{i.current=!1}),[]);async function a(){let n=fe();r(!0);try{let r=await Se(`tasks.resume`,{taskId:e.id});if(fe()!==n)return;np(r.notice,{action:{label:`View task`,onClick:()=>MA(jA(`tasks`,e.id))}}),t()}catch(e){fe()===n&&np.error(e instanceof Error?e.message:String(e))}finally{i.current&&r(!1)}}let o=e.owner===`not running`;return(0,V.jsx)(vj,{label:o?`Resume: carry it on in a background session`:`Resume: unpause it where it runs`,text:`Resume`,icon:Oh,tone:`primary`,shortcut:`R`,disabled:n,onClick:()=>void a()})}function MQ(e){if(e.kind===`archived`)return{state:`archived`,rest:oQ(e.age??`now`)};let t=e.check!==`open`,n=e.owner??(e.section===`mine`?`this session`:``),r=t&&e.age?`${e.check===`dropped`?`dropped`:`done`} ${oQ(e.age)}`:``;return{state:aQ(e.status,e.paused),rest:[t?``:n,r].filter(Boolean).join(` · `)}}function NQ(e){return e?[GZ(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function PQ({row:e}){return e.progress?(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,V.jsx)(qZ,{done:e.progress.done,total:e.progress.total}),(0,V.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]})]}):null}function FQ({row:e,task:t}){let n=t?.git?`branch ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``,{state:r,rest:i}=MQ(e);return(0,V.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,V.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-semibold tracking-tight`,children:[(0,V.jsx)(JZ,{check:e.check,className:`mt-1.5`}),(0,V.jsxs)(`span`,{className:`sr-only`,children:[tQ[e.check],`:`]}),(0,V.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,V.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:r}),i?(0,V.jsx)(`span`,{children:i}):null]}),(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,NQ(t),n].filter(Boolean).join(` · `)}),(0,V.jsx)(PQ,{row:e})]})}function IQ({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await U(`tasks.restore`,{taskId:r},{undo:()=>void U(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await U(`tasks.archive`,{taskId:r},{undo:()=>void U(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await U(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void U(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function LQ({row:e,archive:t}){return e.check===`open`?(0,V.jsx)(Qj,{label:`Archive`,icon:Sp,shortcut:`E`,title:`Archive "${e.title}"?`,description:`A task still under way is abandoned first, then moved to the archive. Restore brings it back.`,confirmLabel:`Archive`,onConfirm:()=>void t()}):(0,V.jsx)(vj,{label:`Archive`,icon:Sp,shortcut:`E`,onClick:()=>void t()})}function RQ({on:e,toggle:t}){return gj(`a`,t),(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsxs)(`label`,{className:`flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-[0.8125rem] font-medium transition-colors hover:bg-accent max-md:min-h-11`,children:[(0,V.jsx)(Mh,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,V.jsx)(`span`,{children:`Auto`}),(0,V.jsx)(Oq,{checked:e,onCheckedChange:t,"aria-label":`Auto mode`,"aria-keyshortcuts":`A`}),(0,V.jsx)(kk,{chord:`A`,className:`kbd-hint`})]})}),(0,V.jsx)(QA,{children:`Auto mode: the oracle decides without asking`})]})}function zQ(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=IQ(e),o=t.kind===`archived`,s=t.kind===`task`&&t.check===`open`&&!!t.resumable;return(0,V.jsxs)(yj,{children:[s?(0,V.jsx)(jQ,{row:t,onResumed:e.onChanged}):null,t.kind===`task`&&t.check===`open`?(0,V.jsx)(DQ,{row:t,quiet:s}):null,o?(0,V.jsx)(vj,{label:`Restore`,icon:Ih,shortcut:`R`,onClick:()=>void n()}):null,t.check===`open`&&!o?(0,V.jsx)(RQ,{on:!!t.auto,toggle:a}):null,o?null:(0,V.jsx)(LQ,{row:t,archive:r}),(0,V.jsx)(Qj,{icon:cg,label:o?`Delete for good`:`Delete`,text:`Delete`,shortcut:`Delete`,title:`Delete "${t.title}" for good?`,description:`This cannot be undone.`,confirmLabel:`Delete`,variant:`destructive`,onConfirm:()=>void i()})]})}function BQ(e){let{row:t}=e,n=t.kind===`plan`,r=JA(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=Nk(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,V.jsx)(AQ,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`,s=r.data?r.data.work:t.work;return(0,V.jsxs)(`article`,{className:`flex min-w-0 flex-col gap-5`,"aria-label":t.title,children:[(0,V.jsx)(zQ,{...e}),(0,V.jsx)(FQ,{row:t,task:a}),(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,V.jsx)(kZ,{timing:r.data?.timing??t.timing,...s?{work:s}:{},stopped:t.check!==`open`})}),r.data?.delivery?(0,V.jsx)(UZ,{taskId:t.id,title:t.title,delivery:r.data.delivery,onChanged:r.reload},t.id):null,r.data?(0,V.jsx)(TQ,{detail:r.data,finished:!o}):null,(0,V.jsx)($Z,{taskId:t.id,finished:!o,canComment:o}),r.data?(0,V.jsx)(EQ,{detail:r.data}):null,r.error&&!r.data?(0,V.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null]})}function VQ({row:e}){return e.check===`open`&&e.progress?(0,V.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,V.jsx)(qZ,{done:e.progress.done,total:e.progress.total}),(0,V.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,V.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function HQ(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function UQ({row:e,card:t}){return(0,V.jsxs)(V.Fragment,{children:[t?(0,V.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:e.status.replaceAll(`_`,` `)}):null,e.check===`open`?(0,V.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:sQ(e)}):null,e.kind===`plan`?null:(0,V.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:(0,V.jsx)(kZ,{timing:e.timing,...e.work?{work:e.work}:{},stopped:e.check!==`open`})}),e.delivery?(0,V.jsxs)(`span`,{className:`pl-6 text-xs text-foreground`,children:[`Delivery: `,e.delivery.status.replaceAll(`_`,` `),` · open task to review`]}):null]})}function WQ({row:e,selected:t,onSelect:n,card:r=!1}){return(0,V.jsx)(`li`,{className:r?`overflow-hidden rounded-lg border border-input bg-card shadow-sm`:void 0,children:(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(e.id),className:J(cU,`max-md:min-h-11`),children:[(0,V.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,V.jsx)(JZ,{check:e.check,className:`mt-0.5`}),(0,V.jsxs)(`span`,{className:`sr-only`,children:[tQ[e.check],`:`]}),(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 break-words`,HQ(e),t&&`font-medium text-foreground`),children:e.title}),(0,V.jsx)(VQ,{row:e})]}),(0,V.jsx)(UQ,{row:e,card:r})]})})}function GQ({rows:e,selectedId:t,onSelect:n}){return(0,V.jsx)(`div`,{className:`flex flex-col pb-2`,children:cQ(e).map(({section:e,rows:r})=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h3`,{className:uU,children:(0,V.jsx)(SH,{title:eQ[e],right:String(r.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,V.jsx)(`ul`,{className:lU,children:r.map(e=>(0,V.jsx)(WQ,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var KQ=()=>MA(jA(`tasks`,`board`)),qQ=e=>MA(jA(`tasks`,`board`,e)),JQ=[`Backlog`,`In progress`,`Completed`];function YQ(e){if(e.kind!==`archived`&&e.section!==`archived`)return e.check===`done`?`Completed`:e.kind===`plan`||e.status===`created`||e.check===`dropped`?`Backlog`:`In progress`}function XQ({title:e,rows:t,id:n}){return(0,V.jsxs)(RG,{role:`region`,"aria-label":e,spacing:`sm`,className:`min-w-0 max-md:rounded-lg`,children:[(0,V.jsx)(BG,{className:`py-2`,children:(0,V.jsxs)(`h2`,{className:`flex items-center justify-between gap-2 text-sm font-semibold`,children:[e,(0,V.jsx)(sU,{variant:`secondary`,radius:`full`,children:t.length})]})}),(0,V.jsxs)(zG,{children:[(0,V.jsx)(`ul`,{className:`flex flex-col gap-3`,children:t.map(e=>(0,V.jsx)(WQ,{row:e,selected:e.id===n,onSelect:qQ,card:!0},`${e.kind}-${e.id}`))}),t.length?null:(0,V.jsx)(`p`,{className:`py-4 text-sm text-muted-foreground`,children:`No tasks here.`})]})]})}function ZQ({rows:e,id:t}){return(0,V.jsx)(`div`,{className:`grid min-w-0 items-start gap-4 p-4 max-md:gap-3 max-md:p-3 md:grid-cols-3`,"aria-label":`Task board`,children:JQ.map(n=>(0,V.jsx)(XQ,{title:n,rows:e.filter(e=>YQ(e)===n),id:t},n))})}function QQ({id:e}){let t=JA(`tasks.list`,{},[`tasks`,`plans`]),n=t.data?.rows??[],r=n.find(t=>t.id===e&&YQ(t)!==void 0),i=r?.kind===`task`?r.id:void 0;if((0,m.useEffect)(()=>(xZ(i),()=>xZ(void 0)),[i]),!t.data&&t.error)return(0,V.jsx)(KA,{message:`Could not load tasks. ${t.error}`,onRetry:t.reload});let a=r?(0,V.jsx)(BQ,{row:r,onGone:KQ,onChanged:t.reload},r.id):null;return(0,V.jsx)(Pj,{wide:!1,list:t.data?(0,V.jsx)(ZQ,{rows:n,id:e}):(0,V.jsx)(Ij,{}),detail:a,open:!!r,onClose:KQ,hint:`Select a task to see its detail.`,describe:`Task detail`})}var $Q=()=>MA(jA(`tasks`)),e$=e=>MA(jA(`tasks`,e));function t$(){return(0,V.jsxs)(PA,{className:`m-4 flex-1`,children:[(0,V.jsxs)(FA,{children:[(0,V.jsx)(LA,{variant:`icon`,children:(0,V.jsx)(Hm,{"aria-hidden":`true`})}),(0,V.jsx)(zA,{children:iQ})]}),(0,V.jsx)(X,{className:`max-md:min-h-11 max-md:whitespace-normal`,onClick:()=>MA(jA(`plan`)),children:`Plan a task`})]})}function n$({shown:e,count:t,onToggle:n}){return(0,V.jsxs)(`label`,{className:`btn-outline flex h-7 min-w-0 cursor-pointer items-center gap-2 rounded-lg border bg-card px-2 text-xs font-medium transition-[box-shadow] max-md:h-11 max-md:min-w-11`,children:[(0,V.jsx)(rX,{checked:e,onCheckedChange:n,"aria-label":`Show archived tasks`,className:`size-4`}),`Archived`,(0,V.jsx)(sU,{variant:`secondary`,className:`h-5 px-1.5`,children:t})]})}function r$({id:e,board:t=!1}){return(0,V.jsxs)(PO,{value:t?`board`:`list`,onValueChange:e=>MA(jA(`tasks`,...e===`board`?[`board`]:[])),className:`flex min-h-0 flex-1 flex-col`,children:[(0,V.jsxs)(FO,{"aria-label":`Task views`,className:`flex gap-1 border-b border-border px-4 py-2 max-md:px-3 max-md:py-1.5`,children:[(0,V.jsx)(IO,{value:`list`,className:dU,children:`List`}),(0,V.jsx)(IO,{value:`board`,className:dU,children:`Board`})]}),(0,V.jsx)(LO,{value:`list`,className:`flex min-h-0 flex-1 flex-col`,children:(0,V.jsx)(i$,{id:e})}),(0,V.jsx)(LO,{value:`board`,className:`flex min-h-0 flex-1 flex-col`,children:(0,V.jsx)(QQ,{id:e})})]})}function i$({id:e}){let t=Aj(),[n,r]=(0,m.useState)(!1),i=JA(`tasks.list`,{},[`tasks`,`plans`]),a=JA(`tasks.archived`,{},[`tasks`]),o=i.data?.rows??[],s=a.data?.rows??[],c=n?[...o,...s]:o,l=e??(t?c[0]?.id:void 0),u=[...c,...s].find(e=>e.id===l&&e.kind===`task`)?.id;if((0,m.useEffect)(()=>(xZ(u),()=>xZ(void 0)),[u]),!i.data&&i.error)return(0,V.jsx)(KA,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,V.jsx)(t$,{});let d=[...c,...s].find(e=>e.id===l),f=(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Fj,{title:`Tasks`,count:lQ(c),children:(0,V.jsx)(n$,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,V.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:iQ}):(0,V.jsx)(GQ,{rows:c,selectedId:l,onSelect:e$}):(0,V.jsx)(Ij,{})]}),p=d?(0,V.jsx)(BQ,{row:d,onGone:$Q,onChanged:i.reload},d.id):e?(0,V.jsx)(a$,{}):null;return(0,V.jsx)(Pj,{wide:t,list:f,detail:p,open:!!e,onClose:$Q,hint:`Select a task to see its detail.`,describe:`Task detail`})}function a$(){return(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}var o$={l:`lobby`,p:`plan`,t:`tasks`,u:`git`,n:`knowledge`,q:`quickfix`,m:`metrics`,e:`settings`};function s$(){return Pk(`(max-width: 767.98px)`)?(0,V.jsxs)(`section`,{className:`flex min-h-full flex-1 flex-col items-center justify-center gap-4 px-6 py-12 text-center`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-medium`,children:`Metrics is unavailable on phones.`}),(0,V.jsx)(`a`,{href:`#/lobby`,className:`btn-tint inline-flex min-h-11 items-center justify-center rounded-lg border px-5 text-sm font-medium focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:`Lobby`})]}):(0,V.jsx)(KK,{})}function c$(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function l$(e){if(e.kind===`settings`)return(0,V.jsx)(kY,{});switch(e.tab){case`lobby`:return(0,V.jsx)(IG,{});case`tasks`:return(0,V.jsx)(r$,{...NG(e.rest)});case`plan`:return(0,V.jsx)(XX,{rest:e.rest});case`quickfix`:return(0,V.jsx)(gZ,{id:c$(e.rest)});case`metrics`:return(0,V.jsx)(s$,{});case`git`:return(0,V.jsx)(tW,{rest:e.rest});case`knowledge`:return(0,V.jsx)(MG,{rest:e.rest})}}function u$(e,t){return t.overlay?!0:e===`savePlan`&&!t.saveAvailable}var d$={tab:`Tab`,esc:`Escape`,escape:`Escape`,enter:`Enter`,space:`Space`,pageup:`PageUp`,pagedown:`PageDown`,home:`Home`,end:`End`,"]":`BracketRight`,"[":`BracketLeft`,"/":`Slash`,"?":`Slash`,",":`Comma`,".":`Period`};function f$(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:d$[e]}function p$(e){let t={alt:!1,ctrl:!1,shift:!1,meta:!1,code:``};for(let n of e.toLowerCase().split(`+`))if(n===`alt`)t.alt=!0;else if(n===`ctrl`||n===`control`)t.ctrl=!0;else if(n===`shift`)t.shift=!0;else if(n===`meta`||n===`cmd`)t.meta=!0;else{let e=f$(n);if(!e)return;t.code=e}return t.code?t:void 0}function m$(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function h$(e,t){let n=p$(t);return n?m$(e,n):!1}function g$(e,t){for(let n of t)if(h$(e,n.key))return n.action}function _$(e,t){for(let n of t)if(h$(e,n.key))return n.id}function v$(e){return tj(e.target)||e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||CA()||!!document.querySelector(`[role='dialog'], [role='menu'], [role='listbox']`)}function y$(e,t,n,r){let i=!e.shiftKey&&/^[1-9]$/.test(e.key)?t[Number(e.key)-1]:void 0;if(i)r(i.id);else if(e.key===`/`)n(`search`);else if(e.key===`?`)n(`help`);else if(e.key===`j`||e.key===`k`)sj(e.key===`j`?1:-1);else return!1;return!0}function b$(e,t){let n=_$(e,t.tabs),r=g$(e,t.keys);return!n&&!r?!1:u$(r,{overlay:!!document.querySelector(`[role='dialog']:not([data-state='closed']), [role='menu']:not([data-state='closed']), [role='listbox']`)||CA(),typing:tj(e.target)||e.target instanceof HTMLInputElement,saveAvailable:!!document.querySelector(`[data-plan-save]:not([disabled])`)})||(r===`search`||r===`savePlan`)&&!t.insideApp()?!0:(e.preventDefault(),n?t.onTab(n):r&&t.onAction(r),!0)}function x$(e,t,n){if(e.key===`Escape`)return Date.now()<n&&e.preventDefault(),0;if(Date.now()<n){let n=o$[e.key];return n&&(e.preventDefault(),t.onTab(n)),0}return e.key===`g`?Date.now()+1500:(y$(e,t.tabs,t.onAction,t.onTab)&&e.preventDefault(),0)}function S$(e){(0,m.useEffect)(()=>{if(!e.enabled)return;let t=0,n=n=>{if(n.defaultPrevented||n.isComposing)return;if(!e.insideApp()){g$(n,e.keys)===`help`&&(n.preventDefault(),e.onAction(`help`));return}let r=!n.altKey&&!n.ctrlKey&&!n.metaKey;if(r&&v$(n)){t=0;return}if(b$(n,e)){t=0;return}t=r?x$(n,e,t):0};return window.addEventListener(`keydown`,n,!0),()=>window.removeEventListener(`keydown`,n,!0)},[e.enabled,e.keys,e.tabs,e.insideApp,e.onAction,e.onTab])}var C$=[{id:`focus`,caps:[`/`],help:`focus search, or the message box`},{id:`send`,label:`Enter`,help:`send the message`},{id:`newline`,label:`Shift+Enter`,help:`a new line (lists carry on)`},{id:`format`,label:`Ctrl+B`,help:`bold; Ctrl+I italic, Ctrl+E code, Ctrl+K link`},{id:`leave`,label:`Esc`,help:`leave the box for the tab bar`}],w$=[{id:`digits`,caps:[`1`,`…`,`9`],help:`jump to a tab in current order`},{id:`help`,caps:[`?`],help:`keyboard shortcuts`},...Object.entries(o$).map(([e,t])=>({id:`go.${t}`,caps:[`g`,e],help:`jump to ${t}`})),{id:`project`,caps:[`P`],help:`open the project switcher`},{id:`theme`,caps:[`D`],help:`switch between light and dark`},{id:`edit`,label:`Ctrl+Enter`,help:`save an edited message; Esc cancels`}],T$=[{id:`tasks`,page:`Tasks`,keys:[[`E`,`archive`],[`R`,`restore`],[`A`,`auto mode`],[`Delete`,`delete`]]},{id:`saved`,page:`Saved plan`,keys:[[`S`,`start here`],[`N`,`new session`],[`Delete`,`discard`]]},{id:`plan`,page:`Plan`,keys:[[`A`,`answer`],[`R`,`retry`],[`Ctrl+S`,`save`],[`N`,`new plan`]]},{id:`quickfix`,page:`Quick fix`,keys:[[`R`,`run anyway`],[`T`,`make a task`],[`C`,`cancel`]]},{id:`git`,page:`Git`,keys:[[`R`,`refresh both lists`],[`V`,`review`],[`Q`,`Jev's read`],[`X`,`stop`],[`N`,`plan an issue`]]},{id:`knowledge`,page:`Knowledge`,keys:[[`E`,`edit`],[`A`,`add`],[`C`,`comment`],[`F`,`edit file`],[`Delete`,`delete`]]},{id:`confirm`,page:`Asked to confirm`,keys:[[`Y`,`yes, do it`],[`Esc`,`keep it`]]}],E$=[{id:`enter`,caps:[`↓`],help:`from the tab bar, into the page`},{id:`rows`,caps:[`↑`,`↓`],help:`move through a list (j and k work too)`},{id:`pane`,caps:[`←`,`→`],help:`between a list and its detail (h and l)`},{id:`ends`,caps:[`Home`,`End`],help:`first and last row`},{id:`open`,caps:[`Enter`,`Space`],help:`activate the focused button or row (links: Enter; checkboxes: Space)`},{id:`back`,label:`Esc`,help:`back up to the tab bar`}],D$=[{id:`qmove`,caps:[`↑`,`↓`],help:`move between the options`},{id:`qpick`,label:`Space`,help:`pick an option (several when allowed)`},{id:`qchoose`,label:`Enter`,help:`choose and go on; in your own answer, send it`},{id:`qacross`,caps:[`←`,`→`],help:`previous and next question`},{id:`qdigit`,caps:[`1`,`2`,`…`],help:`pick that option`},{id:`qesc`,label:`Esc`,help:`put the question away for later`}];function O$({line:e}){return(0,V.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,V.jsx)(`span`,{className:`flex w-28 shrink-0 items-center`,children:e.caps?(0,V.jsx)(`span`,{className:`inline-flex items-center gap-1`,children:e.caps.map(e=>(0,V.jsx)(Ck,{children:e},e))}):(0,V.jsx)(kk,{chord:e.label??``})}),(0,V.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function k$(){return(0,V.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Buttons on a page`}),T$.map(e=>(0,V.jsxs)(`div`,{className:`flex items-start gap-3 py-1`,children:[(0,V.jsx)(`span`,{className:`w-28 shrink-0 pt-0.5 text-sm font-medium`,children:e.page}),(0,V.jsx)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1.5 text-sm text-muted-foreground`,children:e.keys.map(([e,t])=>(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(kk,{chord:e}),t]},e))})]},e.id))]})}function A$({title:e,lines:t}){return(0,V.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,V.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e}),t.map(e=>(0,V.jsx)(O$,{line:e},e.id))]})}function j$(e){return e.map(e=>({id:e.action,label:e.label,help:e.help}))}function M$(e){return e.map(e=>({id:`tab.${e.id}`,label:e.key,help:`jump to the ${e.label} tab`}))}function N$({open:e,onOpenChange:t,keys:n,tabs:r}){let i=Pk(`(max-width: 767.98px)`),a=e&&!i,o=SA(a,xA.help);return(0,m.useEffect)(()=>{i&&e&&t(!1)},[i,e,t]),(0,m.useEffect)(()=>{if(!a||!o)return;let e=e=>{let r=n.find(e=>e.action===`help`)?.key;(e.key===`Escape`||r&&h$(e,r))&&(e.preventDefault(),t(!1))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[n,t,o,a]),i?null:(0,V.jsxs)(mA,{open:a&&o,onOpenChange:t,label:`Keys`,className:`max-w-4xl`,children:[(0,V.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-border px-6 py-4`,children:[(0,V.jsx)(`h2`,{"aria-hidden":`true`,className:`text-base font-semibold tracking-tight`,children:`Keyboard shortcuts`}),(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(kk,{chord:`Esc`}),(0,V.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:()=>t(!1),children:(0,V.jsx)(wg,{"aria-hidden":`true`})})]})]}),(0,V.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-x-10 gap-y-6 overflow-y-auto px-6 py-5 md:grid-cols-2`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,V.jsx)(A$,{title:`Everywhere`,lines:j$(n)}),(0,V.jsx)(A$,{title:`Jump to a tab`,lines:M$(r)}),(0,V.jsx)(A$,{title:`Navigation and editing`,lines:w$}),(0,V.jsx)(A$,{title:`Message box`,lines:C$})]}),(0,V.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,V.jsx)(A$,{title:`Lists and panes`,lines:E$}),(0,V.jsx)(k$,{}),(0,V.jsx)(A$,{title:`Questions`,lines:D$})]})]})]})}var P$=`size-[1.05rem]`;function F$({hint:e,onHelp:t,className:n,side:r=`top`}){return(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"aria-keyshortcuts":e,"aria-describedby":`focused-action-help`,onClick:t,className:n,children:(0,V.jsx)(Bm,{"aria-hidden":`true`,className:P$})})}),(0,V.jsxs)(QA,{side:r,children:[`Keyboard shortcuts `,(0,V.jsx)(kk,{chord:e})]})]})}function I$({className:e,side:t=`top`}){let n=iq(),r=Pk(`(max-width: 767.98px)`),i=r?`App sounds`:n?`Unmute prompt sounds`:`Mute prompt sounds`;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":i,"aria-pressed":n,"aria-describedby":r?`app-sounds-help focused-action-help`:`focused-action-help`,className:e,onClick:()=>nq(!n),children:n?(0,V.jsx)(vg,{"aria-hidden":`true`,className:P$}):(0,V.jsx)(gg,{"aria-hidden":`true`,className:P$})})}),(0,V.jsx)(QA,{side:t,children:i})]}),r?(0,V.jsx)(`span`,{id:`app-sounds-help`,className:`sr-only`,children:`App sounds controls prompt tones and navigation ticks.`}):null]})}function L$({className:e,side:t=`top`}){let{theme:n,setTheme:r}=lJ(),i=n===`dark`||n===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":i?`Switch to light mode`:`Switch to dark mode`,"aria-keyshortcuts":`D`,"aria-describedby":`focused-action-help`,onClick:()=>r(i?`light`:`dark`),className:e,children:i?(0,V.jsx)(ng,{"aria-hidden":`true`,className:P$}):(0,V.jsx)(mh,{"aria-hidden":`true`,className:P$})})}),(0,V.jsxs)(QA,{side:t,children:[i?`Light mode`:`Dark mode`,` `,(0,V.jsx)(`span`,{className:`max-md:hidden`,children:(0,V.jsx)(kk,{chord:`D`})})]})]})}function R$(e){return e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}async function z$(e){if(e.size===0)throw Error(`${e.name||`That file`} is empty.`);if(e.size>20971520)throw Error(`${e.name||`That file`} is larger than 20 MB.`);let t=new URLSearchParams({name:e.name||`pasted-file`,type:e.type}),n=await fetch(I(`/api/files.upload?${t}`),{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e,credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new be(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw new be(r.error,r.code,n.status);return r.result}function B$(e,t,n,r){let i=e.slice(0,t),a=e.slice(t,n),o=e.slice(n);if(a.length>=r.length*2&&a.startsWith(r)&&a.endsWith(r)){let e=a.slice(r.length,a.length-r.length);return{value:i+e+o,start:t,end:t+e.length}}return i.endsWith(r)&&o.startsWith(r)?{value:i.slice(0,i.length-r.length)+a+o.slice(r.length),start:t-r.length,end:n-r.length}:{value:i+r+a+r+o,start:t+r.length,end:n+r.length}}function V$(e,t,n){let r=e.slice(t,n)||`text`,i=`[${r}](url)`,a=t+r.length+3;return{value:e.slice(0,t)+i+e.slice(n),start:a,end:a+3}}var H$=/^(\s*)(?:([-*+])|(\d+)([.)]))\s+(\[[ xX]\]\s+)?/;function U$(e,t){let n=e.lastIndexOf(`
103
- `,t-1)+1,r=e.indexOf(`
104
- `,t),i=e.slice(n,r<0?e.length:r),a=H$.exec(i);if(!a||t-n<a[0].length)return;let[o,s=``,c,l,u=`.`,d]=a;if(i.slice(o.length).trim()===``)return{value:e.slice(0,n)+e.slice(r<0?e.length:r),start:n,end:n};let f=`\n${s}${c??`${Number(l)+1}${u}`} ${d?`[ ] `:``}`;return{value:e.slice(0,t)+f+e.slice(t),start:t+f.length,end:t+f.length}}function W$({rest:e}){let{chat:t}=QW(e);return(0,V.jsx)(`div`,{role:`group`,"aria-label":`Knowledge pane`,className:`flex items-center gap-0.5 rounded-lg bg-muted p-0.5`,children:[`Chat`,`Docs`].map(n=>(0,V.jsx)(`button`,{type:`button`,"aria-pressed":t===(n===`Chat`),onClick:()=>MA($W(e,n===`Chat`)),className:J(`h-6 rounded-md border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t===(n===`Chat`)?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:n},n))})}function G$(e){let[t,n]=(0,m.useState)(!1),[r,i]=(0,m.useState)();async function a(r){if(!t){n(!0),i(void 0);try{let{project:t}=await Se(`projects.open`,{path:r});_e([t]),L(t.id,e)}catch(e){i(e.message)}finally{n(!1)}}}return{opening:t,error:r,open:a}}function K$({path:e,parent:t,busy:n,browse:r}){let[i,a]=(0,m.useState)(e);return(0,m.useEffect)(()=>a(e),[e]),(0,V.jsxs)(`form`,{className:`flex h-9 min-w-0 items-center rounded-md border border-input bg-background shadow-xs transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/20 max-md:h-11`,onSubmit:e=>{e.preventDefault(),r(i)},children:[(0,V.jsx)(`button`,{type:`button`,"aria-label":`Parent folder`,title:`Parent folder (Backspace)`,disabled:n||!t,onClick:()=>t&&r(t),className:`grid h-full w-9 shrink-0 place-items-center border-r border-input text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:(0,V.jsx)(Ap,{"aria-hidden":`true`,className:`size-4`})}),(0,V.jsx)(`input`,{"aria-label":`Folder path`,value:i,disabled:n,spellCheck:!1,autoComplete:`off`,onChange:e=>a(e.target.value),className:`h-full min-w-0 flex-1 bg-transparent px-3 font-mono text-[0.8125rem] text-foreground outline-none placeholder:text-muted-foreground disabled:opacity-60`}),(0,V.jsx)(`button`,{type:`submit`,disabled:n||!i.trim(),className:`h-full shrink-0 border-l border-input px-3 text-xs font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:bg-muted disabled:pointer-events-none disabled:opacity-40`,children:`Go`})]})}function q$(e,t,n){let r=[...e.currentTarget.querySelectorAll(`button[data-folder]:not(:disabled)`)],i=r.indexOf(document.activeElement),a={ArrowDown:Math.min(r.length-1,i+1),ArrowUp:Math.max(0,i-1),Home:0,End:r.length-1}[e.key];a!==void 0&&r.length>0?(e.preventDefault(),r[a]?.focus()):e.key===`Backspace`&&t&&(e.preventDefault(),n(t))}function J$({data:e,loading:t,busy:n,browse:r}){let i=e?.folders.length??0;return(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-hidden rounded-md border border-border`,children:[(0,V.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center justify-between border-b border-border bg-muted/50 px-3 text-[0.7rem] font-medium tracking-wide text-muted-foreground uppercase`,children:[(0,V.jsx)(`span`,{children:`Name`}),(0,V.jsx)(`span`,{className:`normal-case tracking-normal`,children:t?`Loading…`:`${i.toLocaleString()} ${i===1?`folder`:`folders`}${e?.truncated?` (first 2,000)`:``}`})]}),(0,V.jsxs)(`div`,{"aria-label":`Folders`,role:`group`,onKeyDown:t=>q$(t,e?.parent,r),className:`h-64 overflow-y-auto overscroll-contain py-1 max-md:h-[min(40vh,16rem)]`,children:[e?.folders.map(e=>{let t=e.name.startsWith(`.`);return(0,V.jsxs)(`button`,{type:`button`,"data-folder":!0,disabled:n,onClick:()=>r(e.path),title:e.path,className:`group/row flex h-8 w-full min-w-0 items-center gap-2.5 px-3 text-left text-[0.8125rem] transition-colors outline-none hover:bg-muted focus-visible:bg-accent focus-visible:text-accent-foreground disabled:opacity-60 max-md:h-11`,children:[(0,V.jsx)(Mm,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,t?`text-muted-foreground/60`:`text-muted-foreground`)}),(0,V.jsx)(`span`,{className:J(`min-w-0 flex-1 truncate`,t&&`text-muted-foreground`),children:e.name}),(0,V.jsx)(Wp,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground/0 transition-colors group-hover/row:text-muted-foreground group-focus-visible/row:text-muted-foreground`})]},e.path)}),e&&!i?(0,V.jsx)(`p`,{className:`px-3 py-6 text-center text-xs text-muted-foreground`,children:`No subfolders. You can open this folder.`}):null,e?.truncated?(0,V.jsx)(`p`,{className:`px-3 py-2 text-xs text-muted-foreground`,children:`Only the first 2,000 entries are listed. Enter a path to go further.`}):null]})]})}function Y$({tab:e,close:t,busyChanged:n}){let[r,i]=(0,m.useState)(),a=JA(`projects.browse`,r===void 0?{}:{path:r},[]),o=G$(e);return(0,m.useEffect)(()=>n(o.opening),[o.opening,n]),(0,V.jsxs)(`div`,{className:`flex min-h-0 max-h-full w-[min(40rem,calc(100vw-2rem))] flex-col overflow-y-auto max-md:max-h-[calc(100svh-2rem)]`,children:[(0,V.jsxs)(`div`,{className:`flex flex-col gap-1 border-b border-border px-5 pt-4 pb-3 max-md:px-4`,children:[(0,V.jsx)(`h2`,{className:`text-[0.9375rem] font-semibold`,children:`Open project folder`}),(0,V.jsx)(`p`,{className:`break-words text-xs text-muted-foreground`,children:`Folders on the machine running bot-lobby. The project opens in a session of its own; this one keeps running, and its project-local extensions stay off until you enable them.`})]}),(0,V.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-3 px-5 py-4 max-md:px-4`,children:[(0,V.jsx)(K$,{path:a.data?.path??r??``,parent:a.data?.parent,busy:o.opening,browse:i}),(0,V.jsx)(J$,{data:a.data,loading:a.loading,busy:a.loading||o.opening,browse:i}),a.loading?(0,V.jsx)(`p`,{role:`status`,className:`sr-only`,children:`Loading folders…`}):null,a.error||o.error?(0,V.jsx)(`p`,{role:`alert`,className:`break-words text-xs text-destructive`,children:a.error??o.error}):null]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 border-t border-border bg-muted/30 px-5 py-3 max-md:px-4`,children:[a.error?(0,V.jsx)(X,{variant:`outline`,onClick:a.reload,disabled:a.loading,className:`max-md:min-h-11`,children:`Retry`}):null,(0,V.jsx)(X,{variant:`outline`,onClick:t,disabled:o.opening,className:`max-md:min-h-11`,children:`Cancel`}),(0,V.jsx)(X,{disabled:!a.data||a.loading||!!a.error||o.opening,onClick:()=>void o.open(a.data.path),className:`max-md:min-h-11`,children:o.opening?`Opening project…`:`Open this folder`})]})]})}function X$({open:e,onClose:t,tab:n}){let r=SA(e,xA.help),[i,a]=(0,m.useState)(!1);return(0,V.jsx)(mA,{open:r,label:`Open project folder`,className:`max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[calc(100vw-2rem)]`,onOpenChange:e=>{!e&&!i&&t()},dismissOnBackdrop:!i,onCloseAutoFocus:e=>{e.preventDefault(),document.querySelector(`[role="combobox"][aria-label="Project"]`)?.focus()},children:e?(0,V.jsx)(Y$,{tab:n,close:t,busyChanged:a}):null})}function Z$(){try{return{id:fe()}}catch(e){return{error:e.message}}}function Q$(e,t){if(e){if(t&&!e.projects.some(e=>e.id===t))return`Selected project is unknown or offline. Refresh or choose a running project.`;if(!e.projects.length)return`No authorized running projects found. Open a folder from the Project menu, or refresh.`}}function $$(){let[e,t]=(0,m.useState)(),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1),o=(0,m.useRef)(0);async function s(){let e=++o.current;a(!0),r(void 0);try{let n=await Se(`projects.list`,{});_e(n.projects),e===o.current&&t(n)}catch(t){e===o.current&&r(t.message)}finally{e===o.current&&a(!1)}}(0,m.useEffect)(()=>(s(),()=>{o.current++}),[]);let[c,l]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{if(!i)return l(!1);let e=setTimeout(()=>l(!0),300);return()=>clearTimeout(e)},[i]),{data:e,error:n,busy:i,slow:c,refresh:s}}function e1({data:e,error:t}){let n=Z$();return n.error??t??Q$(e,n.id)}function t1({projects:e}){let t=e1(e);return t?(0,V.jsxs)(`p`,{role:`alert`,className:`notice flex min-w-0 items-start gap-2 pt-1 pb-0.5 text-xs break-words text-destructive`,children:[(0,V.jsx)(ug,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,V.jsx)(`span`,{children:t})]}):null}function n1(e){let t=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,n=e.key===`Home`?`first`:e.key===`End`?`last`:void 0;if(!t&&!n)return;let r=[...e.currentTarget.querySelectorAll(`[role='option']`)];if(r.length===0)return;e.preventDefault();let i=r.indexOf(document.activeElement);r[n===`first`?0:n===`last`?r.length-1:Math.max(0,Math.min(r.length-1,(i<0?t>0?-1:r.length:i)+t))]?.focus()}var r1=`bot-lobby:open-projects`;function i1({projects:e,tab:t,name:n,branch:r,look:i}){let a=i===`chip`,{data:o,busy:s,slow:c,refresh:l}=e,[u,d]=(0,m.useState)(!1),[f,p]=(0,m.useState)(!1),h=Z$(),g=e1(e),_=h.error?`invalid`:h.id??o?.currentId??``;gj(`p`,()=>d(!0)),(0,m.useEffect)(()=>{let e=()=>d(!0);return window.addEventListener(r1,e),()=>window.removeEventListener(r1,e)},[]),gj(`r`,()=>void l(),{enabled:u,inDialog:!0});function v(e){d(!1),e!==_&&L(e,t)}return(0,V.jsxs)(`div`,{"aria-busy":s,className:`flex min-w-0 items-center gap-1`,children:[(0,V.jsxs)(qq,{open:u,onOpenChange:d,children:[(0,V.jsxs)(Jq,{type:`button`,role:`combobox`,"aria-label":`Project`,"aria-description":`${n}${r?`, branch ${r}`:``}`,"aria-haspopup":`listbox`,"aria-expanded":u,"aria-keyshortcuts":`P ArrowDown`,onKeyDown:e=>{e.key!==`ArrowDown`||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),d(!0))},title:r?`${n} · ${r}`:n,className:J(`group flex min-w-0 items-center outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:pointer-events-none`,a?`composer-chip h-7 gap-1.5 rounded-full px-2.5 text-xs font-medium text-foreground aria-expanded:bg-[var(--composer-chip-hover)]`:`h-10 gap-2 rounded-lg px-1.5 text-sm font-medium hover:bg-accent aria-expanded:bg-accent`),children:[a?(0,V.jsx)(Mm,{"aria-hidden":`true`,className:J(`size-3.5 shrink-0`,g&&`text-destructive`)}):(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,"data-problem":g?!0:void 0,children:n.trim().charAt(0).toUpperCase()||`?`}),(0,V.jsx)(`span`,{className:`truncate`,children:n}),a?(0,V.jsx)(Bp,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground transition-transform duration-150 group-aria-expanded:rotate-180 motion-reduce:transition-none`}):(0,V.jsx)(Jp,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`})]}),(0,V.jsxs)(Yq,{align:`start`,side:a?`top`:`bottom`,sideOffset:8,"aria-label":`Projects`,onKeyDown:n1,onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[role='option'][aria-selected='true']`)??e.currentTarget?.querySelector(`[role='option']`);t&&(e.preventDefault(),t.focus())},className:`p-0 flex max-h-[calc(100svh-2rem)] w-[min(26rem,calc(100vw-1.5rem))] origin-(--radix-popover-content-transform-origin) flex-col overflow-hidden rounded-xl outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 max-md:w-[calc(100vw-2rem)]`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-2`,children:[(0,V.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Running projects`}),(0,V.jsxs)(`button`,{type:`button`,onClick:()=>void l(),disabled:s,"aria-label":`Refresh list`,"aria-keyshortcuts":`R`,className:`inline-flex h-7 items-center gap-1.5 rounded-lg px-2 text-xs text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:opacity-60 max-md:h-11`,children:[s?(0,V.jsx)(BA,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):(0,V.jsx)(Mh,{"aria-hidden":`true`,className:`size-3`}),`Refresh`,(0,V.jsx)(kk,{chord:`R`,className:`kbd-hint`})]})]}),(0,V.jsx)(`div`,{role:`listbox`,"aria-label":`Projects`,className:`flex max-h-72 flex-col overflow-y-auto overscroll-contain p-1 max-md:max-h-[calc(100svh-12rem)]`,children:o?.projects.map(e=>{let t=e.id===_;return(0,V.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>v(e.id),className:J(`flex min-h-10 w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring max-md:min-h-11`,t&&`bg-accent`),children:[(0,V.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:t?(0,V.jsx)(Rp,{"aria-hidden":`true`,className:`size-3.5 text-primary`}):null}),(0,V.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,V.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium`,children:e.name}),(0,V.jsxs)(`span`,{className:`block whitespace-normal break-all text-xs text-muted-foreground`,children:[e.cwd,` · :`,e.port]})]})]},e.id)})}),(0,V.jsxs)(`button`,{type:`button`,className:`flex min-h-11 items-center gap-2 border-t border-border px-3 py-3 text-sm font-medium outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:()=>{d(!1),p(!0)},children:[(0,V.jsx)(Am,{"aria-hidden":`true`,className:`size-4`}),`Open folder…`]})]})]}),(0,V.jsx)(X$,{open:f,onClose:()=>p(!1),tab:t}),c||g?(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`Refresh projects`,disabled:s,onClick:()=>void l(),className:J(`inline-flex shrink-0 items-center justify-center text-muted-foreground outline-none transition-[background-color,color,scale] hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] disabled:opacity-60 motion-reduce:active:scale-100`,a?`composer-chip size-7 rounded-full`:`size-8 rounded-lg hover:bg-accent max-md:size-11`),children:s?(0,V.jsx)(BA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):(0,V.jsx)(Mh,{"aria-hidden":`true`,className:`size-3.5`})})}),(0,V.jsx)(QA,{side:a?`top`:`bottom`,children:`Refresh projects`})]}):null]})}var a1={id:`oracle`,pill:`Oracle`,label:`Message the oracle`,placeholder:`Message the oracle…`},o1=new Set([`lobby`,`tasks`,`plan`,`quickfix`,`knowledge`]);function s1(e){return e.kind===`tab`&&o1.has(e.tab)}function c1(e,t){if(e.kind!==`tab`)return[a1];if(e.tab===`knowledge`)return[{id:`knowledge`,pill:`Oracle`,label:`Ask the oracle about this project`,placeholder:`Ask about this project — the oracle searches the code and learns what is missing…`}];if(e.tab===`plan`)return[{id:`panel`,pill:`Panel`,label:`Message the panel`,placeholder:`Describe a task, or answer the panel…`},a1];if(e.tab===`quickfix`)return[{id:`quickfix`,pill:`Quick fix`,label:`Describe a quick fix`,placeholder:`Describe a small change…`},a1];let n=e.tab===`tasks`?NG(e.rest).id??t:void 0;return n?[{id:`comment`,pill:`Comment`,label:`Comment on ${n}`,placeholder:`Comment on ${n}'s plan…`,taskId:n},{id:`task`,pill:`Task's oracle`,label:`Message ${n}'s oracle`,placeholder:`Leave a message for ${n}'s oracle…`,taskId:n},a1]:[a1]}var l1=0,u1=`toolbar-button composer-tool relative inline-flex size-8 items-center justify-center rounded-full border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,d1=`composer-chip inline-flex h-7 min-w-0 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function f1(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function p1({file:e,onRemove:t}){let n=(0,V.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,onClick:t,className:J(`btn-ghost flex shrink-0 items-center justify-center rounded-lg border text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,e.image?`absolute top-1 right-1 size-5 bg-background/80 text-foreground backdrop-blur-sm`:`size-7`),children:(0,V.jsx)(wg,{"aria-hidden":`true`,className:`size-3.5`})});return e.image?(0,V.jsxs)(H.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},title:`${e.name} · ${R$(e.size)}`,className:`relative size-16 shrink-0 overflow-hidden rounded-lg border border-border bg-muted`,children:[(0,V.jsx)(`img`,{src:I(e.image),alt:e.name,className:`size-full object-cover`}),e.state===`uploading`?(0,V.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center bg-background/60`,children:(0,V.jsx)(BA,{className:`size-4`,"aria-hidden":`true`,role:`presentation`})}):null,n]}):(0,V.jsxs)(H.li,{layout:!0,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:`spring`,stiffness:520,damping:32},className:`flex h-9 min-w-0 items-center gap-2 rounded-lg border border-border bg-muted pr-1 pl-2.5`,children:[(0,V.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center text-muted-foreground`,children:[(0,V.jsx)(Om,{"aria-hidden":`true`,className:`size-4`}),e.state===`uploading`?(0,V.jsx)(BA,{className:`absolute -right-1 -bottom-1 size-2.5`,"aria-hidden":`true`,role:`presentation`}):null]}),(0,V.jsxs)(`span`,{className:`min-w-0 max-w-40`,children:[(0,V.jsx)(`span`,{className:`block truncate text-xs font-medium`,children:e.name}),(0,V.jsx)(`span`,{className:`block text-[0.65rem] leading-tight text-muted-foreground`,children:e.state===`uploading`?`uploading…`:R$(e.size)})]}),n]})}function m1({route:e,keys:t,projects:n,onHelp:r,dockNav:i}){let[a,o]=(0,m.useState)(``),[s,c]=(0,m.useState)([]),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(!1),[p,h]=(0,m.useState)(!1),[g,_]=(0,m.useState)(),v=Nk(`status`),y=Nk(`lobby`),b=wA(),x=(v.data?.busy??!1)||!!y.data?.reply?.trim(),S=Fk(),C=Pk(`(max-width: 767.98px)`),{keyboardOpen:w,keyboardInset:T}=fA(),E=s1(e),D=(0,m.useRef)(E);D.current=E;let{taskId:O}=CZ(),k=(0,m.useMemo)(()=>c1(e,O),[e,O]),A=k.map(e=>`${e.id}:${e.taskId??``}`).join(`|`),j=k.find(e=>e.id===g)??k[0];(0,m.useEffect)(()=>_(void 0),[A]);let M=(0,m.useRef)(null),N=(0,m.useRef)(null),ee=(0,m.useRef)(null),te=(0,m.useRef)(s);te.current=s;let P=(0,m.useRef)(void 0);(0,m.useLayoutEffect)(()=>{let e=P.current,t=N.current;e&&t&&(P.current=void 0,t.setSelectionRange(e.start,e.end))},[a]);let ne=(0,m.useCallback)(e=>{P.current={start:e.start,end:e.end},o(e.value)},[]);(0,m.useEffect)(()=>{let e=M.current;if(!e)return;let t=document.documentElement,n=()=>{let n=e.getBoundingClientRect();t.style.setProperty(`--composer-h`,b||!E?`0px`:`${Math.ceil(n.height+(C?T:0))}px`),t.style.setProperty(`--composer-x`,`${Math.round(n.left)}px`),t.style.setProperty(`--composer-w`,`${Math.round(n.width)}px`)};n();let r=new ResizeObserver(n);return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n),t.style.setProperty(`--composer-h`,`0px`),t.style.removeProperty(`--composer-x`),t.style.removeProperty(`--composer-w`)}},[b,T,w,C,E]);let re=(0,m.useCallback)(e=>{if(!D.current)return;let t=[...e],n=8-te.current.length;t.length>n&&np.warning(`At most 8 files go with one message.`);for(let e of t.slice(0,Math.max(0,n))){let t=`f${++l1}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):void 0;c(r=>[...r,{key:t,name:e.name||(n?`image.png`:`file`),size:e.size,...n?{image:n}:{},state:`uploading`}]),z$(e).then(e=>c(n=>n.map(n=>n.key===t?{...n,state:`ready`,info:e}:n))).catch(e=>{np.error(e instanceof Error?e.message:`That file did not upload.`),c(e=>e.filter(e=>e.key!==t))})}},[]),ie=(0,m.useCallback)(e=>{c(t=>{let n=t.find(t=>t.key===e);return n?.image&&URL.revokeObjectURL(n.image),t.filter(t=>t.key!==e)})},[]),ae=s.some(e=>e.state===`uploading`),oe=s.flatMap(e=>e.info?[e.info.id]:[]),se=(a.trim().length>0||oe.length>0)&&!ae&&!d,ce=(0,m.useCallback)(async()=>{if(!se||!D.current)return;f(!0);let t=oe.length>0?oe:void 0,n={text:a,...t?{attachments:t}:{}};try{let t=!0;if(j.id===`oracle`){let e=await Se(`lobby.send`,n);e.notice&&np(e.notice)}else j.id===`knowledge`?(t=await U(`knowledge.ask`,n)!==void 0,t&&e.kind===`tab`&&MA($W(e.rest,!0))):t=j.id===`panel`?await U(`planner.send`,n)!==void 0:j.id===`quickfix`?await U(`quickfix.submit`,n)!==void 0:j.id===`task`?await U(`tasks.message`,{taskId:j.taskId,...n})!==void 0:await U(`tasks.comment`,{taskId:j.taskId,...n})!==void 0;if(t){o(``);for(let e of te.current)e.image&&URL.revokeObjectURL(e.image);c([])}}catch(e){np.error(e instanceof Error?e.message:`Could not send`)}finally{f(!1)}},[se,oe,j,a,e]),le=(0,m.useCallback)(async()=>{try{await Se(`lobby.abort`,{})}catch(e){np.error(e instanceof Error?e.message:`Could not stop`)}},[]),F=e=>{if(e.key===`Escape`&&!e.nativeEvent.isComposing){e.preventDefault(),uj();return}let t=e.currentTarget,n=e.key.toLowerCase();if((e.ctrlKey||e.metaKey)&&!e.altKey&&!e.shiftKey&&[`b`,`i`,`e`,`k`].includes(n)){e.preventDefault();let{selectionStart:r,selectionEnd:i,value:a}=t;ne(n===`k`?V$(a,r,i):B$(a,r,i,n===`b`?`**`:n===`i`?`_`:"`"));return}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&n===`p`){e.preventDefault(),u(e=>!e);return}if(e.key===`Enter`&&e.shiftKey&&!e.nativeEvent.isComposing&&t.selectionStart===t.selectionEnd){let n=U$(t.value,t.selectionStart);n&&(e.preventDefault(),ne(n));return}if(e.key===`Backspace`&&t.value===``&&te.current.length>0){e.preventDefault(),ie(te.current.at(-1).key);return}(f1(e)||e.key===`Enter`&&(e.metaKey||e.ctrlKey))&&(e.preventDefault(),ce())},ue=e=>{let t=[...e.clipboardData.files];t.length!==0&&(e.preventDefault(),re(t))},de=e=>{e.preventDefault(),h(!1),e.dataTransfer.files.length>0&&re(e.dataTransfer.files)},fe=e.kind===`tab`&&e.tab===`knowledge`,I=!C&&!S,L=S&&k.length>1?(0,V.jsxs)(xK,{value:j.id,onValueChange:e=>_(e),children:[(0,V.jsx)(CK,{"aria-label":`Send to`,className:`h-7 min-w-0 gap-1.5 px-2 text-xs`,children:(0,V.jsx)(SK,{})}),(0,V.jsx)(wK,{children:k.map(e=>(0,V.jsx)(TK,{value:e.id,children:e.pill},e.id))})]}):k.length>1?(0,V.jsx)(`div`,{role:`radiogroup`,"aria-label":`Send to`,className:J(`flex items-center gap-0.5 max-md:flex-wrap`,!I&&`rounded-lg bg-muted p-0.5 shadow-[inset_0_1px_2px_rgb(0_0_0/0.07)]`),children:k.map(e=>(0,V.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,role:`radio`,"data-compact":!0,"aria-checked":e.id===j.id,onClick:()=>_(e.id),className:J(I?d1:`h-6 rounded-md border border-transparent px-2.5 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,I?e.id===j.id?`composer-chip-on`:`text-muted-foreground hover:text-foreground`:e.id===j.id?`btn-outline btn-soft bg-card text-foreground`:`btn-ghost text-muted-foreground hover:text-foreground`),children:e.pill},e.id))}):I?(0,V.jsxs)(`span`,{className:J(d1,`text-muted-foreground`),children:[(0,V.jsx)(ih,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`To the `,j.pill.toLowerCase()]}):(0,V.jsxs)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:[`To the `,j.pill.toLowerCase()]}),pe=v.data?.workspace.name??`bot-lobby`,me=v.data?.branch??v.data?.workspace.branch,he=I?(0,V.jsxs)(`div`,{className:`composer-tray pointer-events-auto mx-auto w-full max-w-3xl`,"aria-label":`Message context`,role:`group`,children:[(0,V.jsx)(i1,{look:`chip`,projects:n,tab:e.kind===`tab`?e.tab:e.kind,name:pe,branch:me}),fe?null:L,(0,V.jsxs)(`div`,{className:`@container ml-auto flex min-w-0 flex-1 items-center justify-end gap-3 overflow-hidden`,children:[e.kind===`tab`&&e.tab===`plan`?(0,V.jsx)(Ak,{chord:t.savePlan??`Ctrl+S`,className:`hidden @[24rem]:inline-flex`,children:`save plan`}):null,(0,V.jsx)(Ak,{chord:`Shift+Enter`,className:`hidden @[14rem]:inline-flex`,children:`new line`}),(0,V.jsxs)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"data-compact":!0,onClick:r,className:J(d1,`kbd-hint shrink-0 px-1.5 text-muted-foreground hover:text-foreground`),children:[(0,V.jsx)(kk,{chord:t.help??`Alt+H`,className:`kbd-hint`}),(0,V.jsx)(`span`,{className:`hidden @[8rem]:inline`,children:`shortcuts`})]})]}),(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`a`,{href:`#/settings`,"aria-label":`Models and effort`,className:J(d1,`size-7 shrink-0 justify-center px-0 text-muted-foreground hover:text-foreground`),children:(0,V.jsx)(Kh,{"aria-hidden":`true`,className:`size-4`})})}),(0,V.jsx)(QA,{children:`Each agent's model and effort`})]})]}):null;return(0,V.jsxs)(`div`,{id:`app-dock`,ref:M,style:C&&w?{bottom:`${T}px`}:void 0,className:J(`dock pointer-events-none absolute inset-x-0 bottom-0 z-30 px-6 pb-[max(1.25rem,env(safe-area-inset-bottom))] transition-opacity duration-200 ease-snap max-md:px-2`,C&&w?`max-md:pb-2`:`max-md:pb-[max(0.5rem,env(safe-area-inset-bottom))]`,b&&`opacity-0`),hidden:!E,"aria-hidden":!E||void 0,inert:b||!E,children:[i?(0,V.jsx)(`div`,{className:`pointer-events-auto mx-auto mb-1.5 w-full max-w-[46rem]`,children:i}):null,he,(0,V.jsx)(`div`,{className:`pointer-events-auto relative mx-auto w-full max-w-[46rem]`,children:(0,V.jsxs)(`div`,{className:J(`group/composer composer-box relative rounded-[22px] border border-dock-border bg-dock shadow-dock transition-[border-color,box-shadow] duration-200 ease-snap focus-within:border-[color-mix(in_oklab,var(--ring)_28%,var(--dock-border))] focus-within:shadow-dock-focus`,S&&`min-[500px]:max-md:grid min-[500px]:max-md:grid-cols-[minmax(0,1fr)_auto] min-[500px]:max-md:min-w-0`,p&&`border-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--ring)_30%,transparent)]`),onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),h(!0))},onDragLeave:()=>h(!1),onDrop:de,children:[(0,V.jsx)(Cu,{initial:!1,children:s.length>0?(0,V.jsx)(H.ul,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:420,damping:36},"aria-label":`Attachments`,className:J(`flex flex-wrap items-end gap-2 overflow-hidden px-3 pt-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:s.map(e=>(0,V.jsx)(p1,{file:e,onRemove:()=>ie(e.key)},e.key))},`files`):null}),l?(0,V.jsx)(`div`,{"aria-label":`Markdown preview`,role:`region`,className:J(`max-h-48 overflow-y-auto border-b border-border px-4 py-3`,S&&`min-[500px]:max-md:col-span-full min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full`),children:a.trim()?(0,V.jsx)(bH,{text:a}):(0,V.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}):null,(0,V.jsx)(`div`,{className:J(`flex px-4 pt-3.5 pb-1`,S&&`min-[500px]:max-md:col-start-1 min-[500px]:max-md:min-w-0 min-[500px]:max-md:max-w-full min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:(0,V.jsx)(`textarea`,{ref:N,id:`composer-text`,"aria-label":j.label,value:a,onChange:e=>o(e.target.value),onKeyDown:F,onPaste:ue,placeholder:x&&j.id===`oracle`?`The oracle is working. Enter steers it…`:j.placeholder,rows:1,className:J(`field-sizing-content max-h-[min(45vh,20rem)] min-h-[1.75rem] md:min-h-[2.75rem] w-full min-w-0 flex-1 resize-none bg-transparent text-base leading-relaxed caret-primary outline-none placeholder:text-muted-foreground md:text-[0.9375rem] md:leading-relaxed`,S&&`min-[500px]:max-md:max-h-[44px] min-[500px]:max-md:overflow-y-auto`)})}),(0,V.jsxs)(`div`,{className:J(`flex flex-wrap items-center gap-x-2 gap-y-2 px-2 pt-1 pb-2`,S&&`min-[500px]:max-md:col-start-2 min-[500px]:max-md:min-w-0 min-[500px]:max-md:flex-nowrap min-[500px]:max-md:gap-y-0 min-[500px]:max-md:pt-1 min-[500px]:max-md:pb-1`),children:[(0,V.jsx)(`input`,{ref:ee,type:`file`,multiple:!0,hidden:!0,tabIndex:-1,"aria-label":`Attach files`,onChange:e=>{re(e.target.files??[]),e.target.value=``}}),(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Attach images, PDFs or files`,"data-compact":!0,onClick:()=>ee.current?.click(),className:u1,children:(0,V.jsx)(Ah,{"aria-hidden":`true`,className:`size-[1.125rem]`})})}),(0,V.jsx)(QA,{children:`Attach images, PDFs or files`})]}),(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`Preview the Markdown`,"aria-pressed":l,"aria-keyshortcuts":`Alt+P`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>u(e=>!e),className:u1,children:(0,V.jsx)(Sm,{"aria-hidden":`true`,className:`size-4`})})}),(0,V.jsxs)(QA,{children:[`Preview `,(0,V.jsx)(kk,{chord:`Alt+P`})]})]}),fe||!I?(0,V.jsx)(`div`,{className:J(`contents`,C&&!S&&`max-md:block max-md:w-full max-md:order-last`),children:fe?(0,V.jsx)(W$,{rest:e.kind===`tab`?e.rest:[]}):L}):null,(0,V.jsx)(`span`,{className:`flex-1`}),(0,V.jsxs)(`div`,{className:`contents max-md:ml-auto max-md:flex max-md:items-center max-md:gap-2`,children:[x&&j.id===`oracle`?(0,V.jsx)(Qj,{label:`Stop`,icon:eg,iconOnly:!0,compact:!0,title:`Stop the oracle?`,description:`The current response stops. Work already recorded is kept.`,confirmLabel:`Stop`,variant:`destructive`,onConfirm:()=>void le()}):null,(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`button`,{type:`button`,"aria-label":`Send`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>void ce(),disabled:!se,className:`relative inline-flex size-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-xs shadow-primary/24 inset-shadow-[0_1px_rgb(255_255_255/16%)] before:absolute before:-inset-1 before:content-[''] transition-[background-color,box-shadow,scale] duration-150 ease-snap outline-none hover:scale-105 hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background active:inset-shadow-[0_1px_rgb(0_0_0/8%)] active:shadow-none disabled:opacity-64 disabled:shadow-none disabled:hover:scale-100 motion-reduce:hover:scale-100`,children:d?(0,V.jsx)(BA,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5 text-primary-foreground`}):(0,V.jsx)(Ap,{"aria-hidden":`true`,className:`size-4`,strokeWidth:2.25})})}),(0,V.jsxs)(QA,{children:[`Send `,(0,V.jsx)(kk,{chord:`Enter`})]})]})]})]}),p?(0,V.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 flex items-center justify-center rounded-xl bg-card/90 text-sm font-medium text-primary backdrop-blur-[2px]`,children:`Drop to attach`}):null]})})]})}function h1({state:e}){return e===`live`?(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsx)(`span`,{role:`img`,"aria-label":`Connected`,className:`grid size-6 place-items-center`,children:(0,V.jsx)(`span`,{className:`size-2 rounded-full bg-success`})})}),(0,V.jsx)(QA,{children:`Connected`})]}):e===`connecting`?(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-warning motion-safe:animate-status-pulse`}),`reconnecting…`]}):(0,V.jsx)(`span`,{className:`text-xs font-medium text-destructive`,children:`Connection lost`})}function g1(e){if(!e)return 0;let t=[...e.children].filter(e=>e instanceof HTMLElement&&e.offsetParent!==null&&getComputedStyle(e).position!==`absolute`);if(!t.length)return 0;let n=Math.min(...t.map(e=>e.getBoundingClientRect().left)),r=Math.max(...t.map(e=>e.getBoundingClientRect().right)),i=0;for(let t of e.querySelectorAll(`*`))t.clientWidth<=1||t.offsetParent===null||t.scrollWidth<=t.clientWidth+1||getComputedStyle(t).textOverflow===`ellipsis`&&(i+=t.scrollWidth-t.clientWidth);return r-n+i}var _1=24;function v1(){let e=(0,m.useRef)(null),[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(()=>{});return r.current=()=>{let t=e.current;if(!t)return;let r=t.querySelector(`[role="tablist"]`),i=getComputedStyle(t),a=parseFloat(i.columnGap)||0,o=t.clientWidth-(parseFloat(i.paddingLeft)||0)-(parseFloat(i.paddingRight)||0),s=g1(t.querySelector(`.where`))+(r?.offsetWidth??0)+g1(t.querySelector(`.tools`))+a*2;n(s+_1<=o)},(0,m.useLayoutEffect)(()=>r.current()),(0,m.useLayoutEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>r.current());n.observe(t);for(let e of t.querySelectorAll(`[role="tablist"], .where, .tools`))n.observe(e);return()=>n.disconnect()},[]),{header:e,one:t}}function y1({connection:e,projects:t,lead:n,tabs:r,extra:i,tools:a}){let{header:o,one:s}=v1(),c=Pk(`(max-width: 767.98px)`);return(0,V.jsxs)(`header`,{ref:o,className:`app-header shrink-0`,"data-one-row":s||void 0,children:[(0,V.jsx)(`div`,{className:`where flex min-w-0 items-center gap-2`,children:n}),c?(0,V.jsx)(`div`,{className:`phone-status flex min-w-0 items-center justify-end gap-2`,children:(0,V.jsx)(h1,{state:e})}):null,(0,V.jsx)(`div`,{className:`tabs min-w-0`,children:r}),(0,V.jsxs)(`div`,{className:`tools flex min-w-0 items-center justify-end gap-2`,children:[i,c?null:(0,V.jsx)(h1,{state:e}),a,(0,V.jsx)(`span`,{id:`focused-action-help`,className:`sr-only`,children:`Focused buttons: Enter or Space. Links: Enter. Checkboxes: Space.`})]}),(0,V.jsx)(t1,{projects:t})]})}var b1=`group/item flex min-h-8 w-full min-w-0 items-center gap-2 rounded-lg px-2.5 text-sm text-sidebar-foreground outline-none transition-colors duration-150 hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:bg-sidebar-accent aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:font-medium [&>svg]:text-[var(--sidebar-icon)] hover:[&>svg]:text-sidebar-foreground aria-[current=page]:[&>svg]:text-sidebar-foreground max-md:min-h-11`;function x1({route:e,keys:t,rail:n}){let r=t.settings??`Alt+S`,i=(0,V.jsxs)(`a`,{href:`#/settings`,"aria-label":`Settings`,"aria-current":e.kind===`settings`?`page`:void 0,"aria-keyshortcuts":r,className:n?C1:J(b1,`flex-1`),children:[(0,V.jsx)(Jh,{"aria-hidden":`true`,className:`size-4 shrink-0`}),n?null:(0,V.jsx)(`span`,{className:`flex-1`,children:`Settings`})]});return(0,V.jsx)(w1,{label:`Settings`,hint:r,side:n?`right`:`top`,children:i})}function S1({route:e,keys:t,onHelp:n,closer:r,phone:i=!1}){let a=J(C1,i?`size-11`:`size-8`);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`flex min-h-12 items-center justify-end px-1`,children:r}),(0,V.jsx)(`span`,{className:`flex-1`}),(0,V.jsxs)(`div`,{className:`sidebar-foot flex items-center gap-1 px-1 py-2`,children:[(0,V.jsx)(x1,{route:e,keys:t}),i?null:(0,V.jsx)(F$,{hint:t.help??`Alt+H`,onHelp:n,className:a}),(0,V.jsx)(L$,{className:a}),(0,V.jsx)(I$,{className:a})]})]})}var C1=`inline-flex size-8 shrink-0 items-center justify-center rounded-lg text-[var(--sidebar-icon)] outline-none transition-[background-color,color,scale] duration-150 hover:bg-sidebar-accent hover:text-sidebar-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] aria-pressed:text-sidebar-foreground aria-[current=page]:bg-[var(--sidebar-selected)] aria-[current=page]:text-sidebar-foreground aria-[current=page]:shadow-control motion-reduce:active:scale-100`;function w1({label:e,hint:t,side:n=`right`,children:r}){return(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:r}),(0,V.jsxs)(QA,{side:n,children:[e,` `,t?(0,V.jsx)(kk,{chord:t}):null]})]})}function T1({route:e,keys:t,onHelp:n}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`span`,{className:`flex-1`}),(0,V.jsx)(F$,{hint:t.help??`Alt+H`,onHelp:n,className:C1,side:`right`}),(0,V.jsx)(L$,{className:C1,side:`right`}),(0,V.jsx)(I$,{className:C1,side:`right`}),(0,V.jsx)(x1,{route:e,keys:t,rail:!0})]})}function E1(e){return(0,V.jsx)(`aside`,{id:`app-sidebar`,"aria-label":`Sidebar`,"data-folded":!0,className:`app-sidebar`,children:(0,V.jsx)(T1,{...e})})}function D1({open:e,onOpenChange:t,...n}){return(0,V.jsx)(bj,{open:e,onOpenChange:t,children:(0,V.jsxs)(wj,{side:`left`,showCloseButton:!1,"aria-describedby":`sidebar-sheet-description`,className:`app-sidebar-sheet gap-0 p-0 pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[(0,V.jsx)(Ej,{className:`sr-only`,children:`Sidebar`}),(0,V.jsx)(Dj,{id:`sidebar-sheet-description`,className:`sr-only`,children:`Settings and the app's switches.`}),(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col px-1`,onClick:e=>{e.target.closest(`a[href]`)&&t(!1)},children:(0,V.jsx)(S1,{...n,phone:!0,closer:(0,V.jsx)(xj,{"aria-label":`Close sidebar`,className:J(C1,`size-11`),children:(0,V.jsx)(wg,{"aria-hidden":`true`,className:`size-4`})})})})]})})}function O1({onOpen:e,expanded:t}){return(0,V.jsx)(`button`,{type:`button`,"aria-label":`Open sidebar`,"aria-haspopup":`dialog`,"aria-expanded":t,onClick:e,className:J(C1,`size-11 text-foreground`),children:(0,V.jsx)(Qm,{"aria-hidden":`true`,className:`size-[1.15rem]`})})}function k1(e){let t=e.match(/[#&?]?token=([^&\s#]+)/i);if(t?.[1])return decodeURIComponent(t[1]);let n=e.trim();return n&&!n.includes(`/`)&&!n.includes(` `)?n:void 0}function A1(){let[e,t]=(0,m.useState)(``),[n,r]=(0,m.useState)(),[i,a]=(0,m.useState)(!1);async function o(e){a(!0),r(void 0),e&&(window.location.hash=`token=${encodeURIComponent(e)}`),await we()?window.location.reload():(r(e?`That link did not sign in. Copy the link from Pi and try again.`:`Paste the link from Pi below.`),a(!1))}function s(t){t.preventDefault(),o(k1(e))}return(0,V.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-y-auto p-6 max-md:items-start max-md:p-4`,children:(0,V.jsxs)(`form`,{onSubmit:s,className:`glass flex min-h-0 w-full max-w-md flex-col gap-4 rounded-xl p-6 max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[28rem] max-md:overflow-y-auto max-md:p-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(Rm,{className:`size-5`,"aria-hidden":`true`}),(0,V.jsx)(`h1`,{className:`text-base font-medium`,children:`Sign in to bot-lobby`})]}),(0,V.jsxs)(`p`,{className:`break-words text-sm text-muted-foreground`,children:[`Pi printed a link when it started (or run `,(0,V.jsx)(`code`,{className:`rounded-lg bg-muted px-1.5 py-0.5 font-mono text-xs`,children:`/bot-lobby web`}),`to see it again). Paste it here.`]}),(0,V.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,V.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,V.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,placeholder:`http://127.0.0.1:7347/#token=…`,className:`h-8 min-w-0 rounded-lg border border-input bg-background px-3.5 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 max-md:h-11`})]}),n?(0,V.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,V.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,V.jsx)(X,{type:`button`,variant:`ghost`,disabled:i,onClick:()=>void o(void 0),className:`max-md:min-h-11`,children:`Retry`}),(0,V.jsx)(X,{type:`submit`,disabled:i||!e.trim(),className:`max-md:min-h-11`,children:`Sign in`})]})]})})}var j1=.6;function M1(e,t,n={}){return{initial:e?void 0:!1,animate:t,transition:{duration:j1,...n}}}var N1=(e,t)=>[0,Math.max(e,.001),Math.min(Math.max(t,e+.01),.999),1];function P1(e,t=0,n=1){return M1(e,{pathLength:[0,0,1,1],strokeOpacity:[0,0,1,1]},{pathLength:{duration:j1,times:N1(t,n),ease:`easeInOut`},strokeOpacity:{duration:j1,times:N1(t,t+.02)}})}function F1(e,t){return M1(e,{scale:[0,0,1.3,1]},{times:N1(t,t+.18),ease:`easeOut`})}function I1(e,t,n=1.3){return M1(e,{scale:[1,1,n,1,1]},{times:[0,Math.max(t,.001),Math.min(t+.15,.9),Math.min(t+.35,.99),1],ease:`easeInOut`})}var L1=(e=.5,t=.5)=>({transformBox:`fill-box`,originX:e,originY:t});function R1({play:e}){return(0,V.jsxs)(H.g,{style:L1(.1,.9),...M1(e,{rotate:[0,-12,8,-4,0],scale:[1,1.12,.96,1.02,1]},{ease:`easeInOut`}),children:[(0,V.jsx)(`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}),[8,12,16].map((t,n)=>(0,V.jsx)(H.circle,{cx:t,cy:11,r:1.15,fill:`currentColor`,stroke:`none`,...M1(e,{fillOpacity:[0,0,1,1,0],y:[0,0,-1.5,0,0]},{times:[0,.12+n*.12,.24+n*.12,.72,1]})},t))]})}function z1({play:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.path,{d:`M13 5h8`,...P1(e,.15,.45)}),(0,V.jsx)(H.path,{d:`M13 12h8`,...P1(e,.3,.6)}),(0,V.jsx)(H.path,{d:`M13 19h8`,...P1(e,.45,.75)}),(0,V.jsx)(H.path,{d:`m3 17 2 2 4-4`,...P1(e,.35,.7)}),(0,V.jsx)(H.path,{d:`m3 7 2 2 4-4`,...P1(e,0,.35)})]})}function B1({play:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.circle,{cx:6,cy:19,r:3,style:L1(),...I1(e,0)}),(0,V.jsx)(H.path,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,...P1(e,.1,.7)}),(0,V.jsx)(H.circle,{cx:18,cy:5,r:3,style:L1(),...F1(e,.62)})]})}function V1({play:e}){return(0,V.jsx)(H.g,{style:L1(),...M1(e,{rotate:[0,-14,10,-6,0],scale:[1,1.18,.94,1.04,1]},{duration:.5,ease:`easeInOut`}),children:(0,V.jsx)(H.path,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,fill:`currentColor`,...M1(e,{fillOpacity:[0,.85,0]},{duration:.5,times:[0,.2,1]})})})}function H1({play:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.circle,{cx:12,cy:12,r:10,style:L1(),...M1(e,{scale:[1,1,1.4],strokeOpacity:[0,.5,0]},{times:[0,.25,1],ease:`easeOut`})}),(0,V.jsx)(H.circle,{cx:12,cy:12,r:10,style:L1(),...M1(e,{scale:[1,.86,1.06,1]},{times:[0,.25,.55,1],ease:`easeInOut`})}),(0,V.jsx)(H.circle,{cx:12,cy:12,r:1,fill:`currentColor`,style:L1(),...M1(e,{scale:[1,2.4,.8,1]},{times:[0,.3,.6,1],ease:`easeInOut`})})]})}function U1({play:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`}),[`M8 17v-3`,`M13 17V5`,`M18 17V9`].map((t,n)=>(0,V.jsx)(H.path,{d:t,style:L1(.5,1),...M1(e,{scaleY:[0,0,1.18,1]},{times:N1(.08+n*.14,.4+n*.14),ease:`easeOut`})},t))]})}function W1({play:e}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(H.circle,{cx:6,cy:6,r:3,style:L1(),...I1(e,0)}),(0,V.jsx)(H.line,{x1:6,x2:6,y1:9,y2:21,...P1(e,.05,.45)}),(0,V.jsx)(H.path,{d:`M13 6h3a2 2 0 0 1 2 2v7`,...P1(e,.2,.62)}),(0,V.jsx)(H.circle,{cx:18,cy:18,r:3,style:L1(),...F1(e,.58)})]})}function G1({play:e}){return(0,V.jsxs)(H.g,{style:L1(),...M1(e,{scaleX:[1,.55,1.08,1],y:[0,-1,0,0]},{times:[0,.35,.65,1],ease:`easeInOut`}),children:[(0,V.jsx)(H.path,{d:`M12 5v16`,style:L1(),...M1(e,{scaleY:[1,1.12,1,1]},{times:[0,.35,.65,1]})}),(0,V.jsx)(`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`})]})}var K1={lobby:R1,tasks:z1,plan:B1,quickfix:V1,issues:H1,metrics:U1,git:W1,knowledge:G1};function q1({id:e,play:t,className:n}){let r=K1[e];return r?(0,V.jsx)(`svg`,{"aria-hidden":`true`,"data-tab-icon":e,"data-play":t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,className:J(`overflow-visible`,n),children:(0,V.jsx)(r,{play:t})},t):null}function J1(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=0||n<2)return e;let r=Math.floor(n/2),i=(r-.75)*t,a=(r+1.75)*t;return e<i?e+Math.ceil((i-e)/t)*t:e>a?e-Math.ceil((e-a)/t)*t:e}function Y1(e){return/(\d)$/.exec(e)?.[1]}function X1(e){return e.filter(e=>e.id!==`metrics`)}function Z1(e,t,n=5){return J1(e,t,n)}function Q1(e,t,n){let r=t.find(t=>t.id===e);if(r)return r.label;let i=n.replace(/^#\/?/,``).split(`/`)[0];return i===`settings`?`Settings`:i===`metrics`?`Metrics`:i?i.charAt(0).toUpperCase()+i.slice(1):`Lobby`}var $1=`phone-tab-card inline-flex h-11 min-w-11 shrink-0 items-center justify-center gap-1.5 rounded-lg border px-2.5 text-sm font-medium whitespace-nowrap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`;function e0(e){let t=Y1(e.key);return t?`${t}. ${e.label}`:e.label}function t0(e,t){let n=Y1(e.key);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(q1,{id:e.id,play:+!!t,className:`size-4 shrink-0`}),n?(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`text-[0.7rem] font-semibold tabular-nums text-muted-foreground`,children:n}):null,t?(0,V.jsx)(`span`,{className:`max-w-[8.5rem] truncate`,children:e.label}):null]})}function n0(e){return e?{duration:0}:{type:`spring`,stiffness:520,damping:30,mass:.5}}function r0({tab:e,selected:t,reduced:n}){return(0,V.jsx)(H.span,{className:`inline-flex items-center gap-1.5`,animate:{scale:t?1.04:1},transition:n0(n),children:t0(e,t)})}function i0({tab:e,selected:t,canonical:n,reduced:r,onClick:i,roving:a}){let o=e0(e);return n?(0,V.jsx)(`button`,{type:`button`,role:`tab`,id:`tab-${e.id}`,"data-phone-tab-id":e.id,"aria-controls":`main`,"aria-label":o,"aria-keyshortcuts":e.key,"aria-selected":t,tabIndex:t||a?0:-1,onClick:i,className:$1,children:(0,V.jsx)(r0,{tab:e,selected:t,reduced:r})}):(0,V.jsx)(`span`,{"data-phone-tab-id":e.id,"data-active":t?`true`:`false`,className:$1,"aria-hidden":`true`,children:(0,V.jsx)(r0,{tab:e,selected:t,reduced:r})})}function a0({tabs:e,activeId:t,canonical:n,reduced:r,onClick:i,canonicalRef:a}){let o=t??e[0]?.id;return(0,V.jsx)(`div`,{ref:n?a:void 0,"data-phone-period":n?`canonical`:`copy`,"aria-hidden":!n||void 0,role:n?`tablist`:void 0,"aria-label":n?`Lobby tabs`:void 0,className:`phone-tabs-period`,children:e.map(e=>(0,V.jsx)(i0,{tab:e,selected:e.id===t,canonical:n,reduced:r,roving:e.id===o,onClick:t=>i(e.id,t)},e.id))})}function o0(e){return e<=0?0:e===1?1:5}function s0({tabs:e,activeId:t,reduced:n,onClick:r,canonicalRef:i}){let a=o0(e.length),o=Math.floor(a/2);return a?(0,V.jsx)(V.Fragment,{children:Array.from({length:a},(a,s)=>(0,V.jsx)(a0,{tabs:e,activeId:t,canonical:s===o,reduced:n,onClick:r,canonicalRef:s===o?i:void 0},s))}):null}function c0(e){e.current!==void 0&&window.clearTimeout(e.current),e.current=void 0}function l0(e){return e?.closest(`[data-phone-tab-id]`)?.dataset.phoneTabId}function u0(e){return l0(e.target instanceof Element?e.target:null)}function d0(e){return l0(document.elementFromPoint(e.clientX,e.clientY))??l0(e.target instanceof Element?e.target:null)}function f0(e,t){let n=e.dataset.phoneTabId;if(!n)return;let r=e.getBoundingClientRect();if(Number.isFinite(r.width))return{id:n,element:e,distance:Math.abs(r.left+r.width/2-t)}}function p0(e,t){return[...e.querySelectorAll(`[data-phone-tab-id]`)].map(e=>f0(e,t)).filter(e=>e!==void 0)}function m0(e){return e.reduce((e,t)=>!e||t.distance<e.distance?t:e,void 0)}function h0(e,t){return m0(p0(t,e.getBoundingClientRect().left+e.clientWidth/2))}function g0(e,t){if(e&&t)return[...e.querySelectorAll(`[data-phone-tab-id]`)].find(e=>e.dataset.phoneTabId===t)}function _0(e){let t=Number.parseFloat(getComputedStyle(e.parentElement??e).columnGap)||6;return e.offsetWidth+t}function v0(e,t,n){let r=Math.max(0,n.findIndex(e=>e.id===t));if(e===`Home`)return n[0]?.id;if(e===`End`)return n.at(-1)?.id;if(e===`ArrowRight`)return n[(r+1)%n.length]?.id;if(e===`ArrowLeft`)return n[(r-1+n.length)%n.length]?.id}function y0(e,t){return Math.abs(e-t)<=2}function b0(){let e=(0,m.useRef)(null),t=(0,m.useRef)(null),n=(0,m.useRef)(null),r=(0,m.useRef)(void 0),i=(0,m.useRef)(void 0),a=(0,m.useRef)(void 0),o=(0,m.useRef)(void 0),s=(0,m.useRef)(void 0),c=(0,m.useRef)(void 0),l=(0,m.useRef)(0),u=(0,m.useRef)(0),d=(0,m.useRef)(void 0);return(0,m.useMemo)(()=>({scroller:e,track:t,canonical:n,gesture:r,candidate:i,crossed:a,settleTimer:o,commitTimer:s,clickGuard:c,generation:l,scrollGeneration:u,programmatic:d}),[])}function x0(e){return{clearPending:(0,m.useCallback)(()=>{c0(e.settleTimer),c0(e.commitTimer),e.candidate.current=void 0,e.generation.current+=1},[e])}}function S0(e){let t=(0,m.useCallback)(t=>{let n=e.scroller.current;if(!n)return;let r=e.scrollGeneration.current+1;e.scrollGeneration.current=r;let i={value:Math.max(0,t),generation:r};e.programmatic.current=i,n.scrollLeft=i.value,i.value=n.scrollLeft},[e]),n=(0,m.useCallback)(n=>{let r=e.scroller.current;if(!r||!n||r.clientWidth<=0)return;let i=r.getBoundingClientRect(),a=n.getBoundingClientRect(),o=r.scrollLeft+a.left+a.width/2-(i.left+r.clientWidth/2);t(o)},[e,t]);return{centre:n,centreCanonical:(0,m.useCallback)(t=>{let r=g0(e.canonical.current,t);r&&(e.crossed.current=r),n(r)},[n,e]),rebase:(0,m.useCallback)((n,r)=>{let i=Z1(n.scrollLeft,_0(r));if(y0(i,n.scrollLeft))return!1;let a=i-n.scrollLeft;return e.gesture.current&&(e.gesture.current.originScrollLeft+=a),t(i),!0},[e,t])}}function C0(e){let t=(0,m.useCallback)(()=>{e.clickGuard.current=void 0},[e]);return{clearGuard:t,guardClick:(0,m.useCallback)(n=>{t(),e.clickGuard.current={kind:n}},[t,e]),consumeGuard:(0,m.useCallback)(n=>!n||!e.clickGuard.current?!1:(t(),!0),[t,e])}}function w0(e){return(0,m.useCallback)(()=>{let t=e.scroller.current,n=e.track.current;if(!t||!n)return;let r=h0(t,n);return r&&r.element!==e.crossed.current&&(e.crossed.current=r.element,sq()),e.candidate.current=r,r},[e])}function T0(e,t,n,r,i){let a=(0,m.useCallback)((r,i)=>{r&&r.id!==e.activeId&&(c0(t.commitTimer),t.commitTimer.current=window.setTimeout(()=>{i!==t.generation.current||t.candidate.current?.element!==r.element||e.blocked||(n(),e.onSelect(r.id))},500))},[n,e,t]);return(0,m.useCallback)(()=>{c0(t.settleTimer),c0(t.commitTimer);let e=++t.generation.current;t.settleTimer.current=window.setTimeout(()=>{if(e!==t.generation.current||t.gesture.current)return;let n=r();n&&(i(n.element),a(n,e))},120)},[a,i,r,t])}function E0(e,t,n){return(0,m.useCallback)(r=>e.tabs.some(e=>e.id===r)?(t(),e.onSelect(r),n(r),!0):!1,[n,t,e])}function D0(e,t,n,r){return(0,m.useCallback)(()=>{let i=e.scroller.current,a=e.canonical.current;if(!i||!a)return;let o=e.programmatic.current;if(o&&o.generation===e.scrollGeneration.current&&y0(i.scrollLeft,o.value)){e.programmatic.current=void 0;return}if(e.programmatic.current=void 0,c0(e.commitTimer),c0(e.settleTimer),e.candidate.current=void 0,e.generation.current+=1,t(i,a)){e.gesture.current||r();return}n(),e.gesture.current||r()},[n,t,e,r])}function O0(e,t,n,r){let i=(0,m.useRef)({clearPending:t,settle:n});i.current={clearPending:t,settle:n},(0,m.useEffect)(()=>{let t=e.scroller.current;if(!r||!t)return;let n=n=>{let r=n.deltaX||(n.shiftKey?n.deltaY:0);r&&(n.preventDefault(),e.programmatic.current=void 0,i.current.clearPending(),t.scrollLeft+=r,i.current.settle())};return t.addEventListener(`wheel`,n,{passive:!1}),()=>t.removeEventListener(`wheel`,n)},[r,e])}function k0(e,t,n){return(0,m.useCallback)(r=>{t(),n(),e.programmatic.current=void 0,e.gesture.current={id:r.pointerId,x:r.clientX,y:r.clientY,moved:!1,originScrollLeft:r.currentTarget.scrollLeft,downTabId:u0(r)},r.currentTarget.setPointerCapture?.(r.pointerId)},[n,t,e])}function A0(e,t){return(0,m.useCallback)(n=>{let r=e.gesture.current;r&&r.id===n.pointerId&&(Math.hypot(n.clientX-r.x,n.clientY-r.y)<8||(r.moved=!0,t(),(n.pointerType===`mouse`||n.pointerType===`pen`)&&(n.currentTarget.scrollLeft=r.originScrollLeft+r.x-n.clientX,n.preventDefault())))},[t,e])}function j0(e,t,n,r){return(0,m.useCallback)(i=>{let a=e.gesture.current;if(!a||a.id!==i.pointerId)return;e.gesture.current=void 0;let o=d0(i),s=a.downTabId;if(s&&!a.moved&&(!o||o===s)){n.guardClick(`committed`),t(s);return}(a.moved||s&&o&&o!==s)&&n.guardClick(`drag`),a.moved&&r()},[t,n,e,r])}function M0(e,t,n){return(0,m.useCallback)(()=>{let r=e.gesture.current?.moved;e.gesture.current=void 0,r&&t.guardClick(`drag`),r&&n()},[t,e,n])}function N0(e,t,n,r,i){return{onPointerDown:k0(e,i,n.clearGuard),onPointerMove:A0(e,i),onPointerUp:j0(e,t,n,r),onPointerCancel:M0(e,n,r)}}function P0(e,t){return(0,m.useCallback)((n,r)=>{t.consumeGuard(r.detail!==0)||e(n)},[e,t])}function F0(e,t){return(0,m.useCallback)(n=>{if(t.consumeGuard(n.detail!==0))return;let r=n.target instanceof Element?n.target.closest(`[data-phone-tab-id]`):null;if(!r||r.closest(`button`))return;let i=r.dataset.phoneTabId;i&&e(i)},[e,t])}function I0(e,t,n){return(0,m.useCallback)(r=>{if(r.key===`ArrowDown`&&!r.altKey){lj()&&r.preventDefault();return}if(!e.tabs.length)return;let i=r.target.closest(`[role='tab']`)?.dataset.phoneTabId??e.activeId??e.tabs[0].id,a=v0(r.key,i,e.tabs);a?(r.preventDefault(),dj.active=!0,dj.to=a,n(a),g0(t.canonical.current,a)?.focus({preventScroll:!0})):(r.key===`Enter`||r.key===` `)&&i&&(r.preventDefault(),n(i))},[n,e,t])}function L0(e){let[t,n]=(0,m.useState)(0),[r,i]=(0,m.useState)(!1);return{sidePad:t,peek:r,setPeek:i,updatePad:(0,m.useCallback)(()=>{let t=e.scroller.current;if(!t||t.clientWidth<=0)return;let r=Math.max(22,t.clientWidth/2);n(e=>Math.abs(e-r)<.5?e:r)},[e])}}function R0(e,t){return e.find(e=>e.id===t)?.id??e[0]?.id}function z0(e,t,n,r){let{activeId:i,keyboardOpen:a,tabs:o}=e;(0,m.useLayoutEffect)(()=>{n(),t(R0(o,i))},[i,t,a,o,n,r])}function B0(e,t,n,r,i){let{activeId:a,tabs:o}=e;(0,m.useEffect)(()=>{let e=t.scroller.current;if(!e||typeof ResizeObserver>`u`)return;let s=new ResizeObserver(()=>{e.clientWidth<=0||(n(),i(),r(R0(o,a)))});return s.observe(e),t.track.current&&s.observe(t.track.current),()=>s.disconnect()},[a,r,n,t,o,i])}function V0(e){(0,m.useEffect)(()=>{let t=()=>e();return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[e])}function H0(e,t,n,r){(0,m.useEffect)(()=>{n(),t.crossed.current=void 0},[n,e.activeId,e.blocked,e.keyboardOpen,t,r])}function U0(e,t,n){(0,m.useEffect)(()=>()=>{t(),n(),e.programmatic.current=void 0},[n,t,e])}function W0(e,t,n){(0,m.useEffect)(()=>{e.keyboardOpen||n(!1),t()},[t,e.blocked,e.keyboardOpen,n])}function G0(e){let t=b0(),{clearPending:n}=x0(t),r=S0(t),i=C0(t),a=L0(t),o=w0(t),s=T0(e,t,n,o,r.centre),c=E0(e,n,r.centreCanonical),l=D0(t,r.rebase,o,s),u=N0(t,c,i,s,n);O0(t,n,s,e.tabs.length>0);let d=I0(e,t,c),f=F0(c,i),p=P0(c,i),m=e.tabs.map(e=>e.id).join(`\0`);return z0(e,r.centreCanonical,a.updatePad,!e.keyboardOpen||a.peek),B0(e,t,n,r.centreCanonical,a.updatePad),H0(e,t,n,m),V0(n),U0(t,n,i.clearGuard),W0(e,n,a.setPeek),{scroller:t.scroller,track:t.track,canonical:t.canonical,sidePad:a.sidePad,periods:o0(e.tabs.length),peek:a.peek,setPeek:a.setPeek,onScroll:l,...u,onSurfaceClick:f,onCardClick:p,onKeyDown:d}}function K0(e,t){return Q1(e,t,window.location.hash)}function q0({tabs:e,activeId:t,onSelect:n}){let r=(0,m.useMemo)(()=>X1(e),[e]),i=wA(),{keyboardOpen:a}=fA(),o=!!vf(),s=K0(t,e),c=G0({tabs:r,activeId:t,blocked:i,keyboardOpen:a,reduced:o,onSelect:n});if(!r.length)return null;let l=a&&!c.peek;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{"aria-hidden":l?`true`:void 0,inert:l,hidden:l,children:(0,V.jsx)(Y0,{tabs:r,activeId:t,label:s,reduced:o,carousel:c,keyboardOpen:a})}),l?(0,V.jsx)(J0,{label:s,onOpen:()=>c.setPeek(!0)}):null]})}function J0({label:e,onOpen:t}){return(0,V.jsx)(`div`,{className:`phone-tabs phone-tabs-handle`,children:(0,V.jsxs)(`button`,{type:`button`,"data-phone-tabs-handle":!0,"aria-expanded":`false`,"aria-label":`Open tabs, current page ${e}`,onPointerDown:e=>e.preventDefault(),onClick:t,className:`phone-tabs-current inline-flex min-h-11 items-center gap-2 rounded-lg border px-4 text-sm font-medium focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,children:[(0,V.jsx)(`span`,{className:`truncate`,children:e}),(0,V.jsx)(Kp,{"aria-hidden":`true`,className:`size-4`})]})})}function Y0({tabs:e,activeId:t,label:n,reduced:r,carousel:i,keyboardOpen:a}){return(0,V.jsxs)(`div`,{className:`phone-tabs`,"data-phone-tabs":!0,"data-periods":i.periods,children:[t&&!e.some(e=>e.id===t)?(0,V.jsx)(`span`,{"data-phone-page-handle":!0,className:`phone-tabs-page-handle`,children:n}):null,(0,V.jsx)(`div`,{ref:i.scroller,className:`phone-tabs-scroller`,onScroll:i.onScroll,onPointerDown:i.onPointerDown,onPointerMove:i.onPointerMove,onPointerUp:i.onPointerUp,onPointerCancel:i.onPointerCancel,onClick:i.onSurfaceClick,children:(0,V.jsx)(`div`,{ref:i.track,className:`phone-tabs-track`,style:{"--phone-period-pad":`${i.sidePad}px`},onKeyDown:i.onKeyDown,children:(0,V.jsx)(s0,{tabs:e,activeId:t,reduced:r,onClick:i.onCardClick,canonicalRef:i.canonical})})}),a&&i.peek?(0,V.jsx)(`button`,{type:`button`,"aria-label":`Close tabs`,onPointerDown:e=>e.preventDefault(),onClick:()=>i.setPeek(!1),className:`phone-tabs-close`,children:(0,V.jsx)(Bp,{"aria-hidden":`true`,className:`size-4`})}):null]})}function X0(e){return/(\d)$/.exec(e)?.[1]}var Z0=160;function Q0(e){let t=vf(),[n,r]=(0,m.useState)(0),i=(0,m.useRef)(0),a=(0,m.useCallback)(()=>{t||performance.now()<i.current||(i.current=performance.now()+j1*1e3,r(e=>e+1))},[t]),o=(0,m.useRef)(e);return(0,m.useEffect)(()=>{let t=e&&!o.current;if(o.current=e,!t)return;let n=window.setTimeout(a,Z0);return()=>window.clearTimeout(n)},[e,a]),{play:n,onPointerEnter:(0,m.useCallback)(e=>{e.pointerType!==`touch`&&a()},[a])}}var $0=(0,m.forwardRef)(function({tab:e,active:t},n){let r=X0(e.key),{play:i,onPointerEnter:a}=Q0(t);return(0,V.jsxs)(XA,{children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsxs)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,onPointerEnter:a,className:J(`relative z-10 inline-flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-[var(--tab-outline)] px-2.5 text-[0.8125rem] leading-none font-medium whitespace-nowrap outline-none`,`transition-colors duration-200 ease-snap focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,t?`text-foreground`:`bg-[var(--tab-idle)] text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,V.jsx)(q1,{id:e.id,play:i,className:J(`size-3.5 shrink-0 transition-colors duration-200`,t&&`text-primary`)}),r?(0,V.jsx)(`span`,{"aria-hidden":`true`,className:J(`text-[0.72rem] font-semibold tabular-nums transition-colors duration-200`,t?`text-primary`:`text-muted-foreground/75`),children:r}):null,(0,V.jsx)(`span`,{children:e.label})]})}),(0,V.jsxs)(QA,{children:[e.label,` `,(0,V.jsx)(kk,{chord:e.key})]})]})}),e2=1.5;function t2(e,t,n=t?.left??0,r=t?.right??0,i=1){if(e){if(!t||r-n<.5){e.style.opacity=`0`;return}e.style.opacity=String(Math.min(1,(r-n)/14)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${r-n}px`,e.style.transform=`translateX(${n}px)`,e.style.scale=i===1?``:`1 ${i}`}}function n2(e,t){let n=e.right-e.left,{height:r}=e,i=e2/2,a=Math.max(0,Math.min(e.radius-i,r/2-i,n/2-i)),o=r/2,s=e=>+(t===`left`?e:n-e).toFixed(2),c=+(t===`left`),l=1-c,u=i,d=n-i,f=r-i;return[`M${s(u)} ${o}L${s(u)} ${i+a}A${a} ${a} 0 0 ${c} ${s(u+a)} ${i}L${s(d-a)} ${i}A${a} ${a} 0 0 ${c} ${s(d)} ${i+a}L${s(d)} ${o}`,`M${s(u)} ${o}L${s(u)} ${f-a}A${a} ${a} 0 0 ${l} ${s(u+a)} ${f}L${s(d-a)} ${f}A${a} ${a} 0 0 ${l} ${s(d)} ${f-a}L${s(d)} ${o}`]}function r2(e,t,n,r){if(!e)return;if(!t||r<=.002){e.style.opacity=`0`;return}let i=t.right-t.left,a=`${i}x${t.height}r${t.radius}${n}`;e.dataset.shape!==a&&(e.dataset.shape=a,e.dataset.port=n,e.setAttribute(`viewBox`,`0 0 ${i} ${t.height}`),n2(t,n).forEach((t,n)=>e.children[n]?.setAttribute(`d`,t))),e.style.opacity=String(Math.min(1,r*12)),e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${i}px`,e.style.transform=`translateX(${t.left}px)`;let o=`${Math.min(1,r)} 2`;for(let t of e.children)t.style.strokeDasharray=o}var i2={type:`spring`,visualDuration:.12,bounce:0},a2={type:`spring`,visualDuration:.17,bounce:.15,delay:.015},o2={type:`spring`,visualDuration:.17,bounce:.05,delay:.07},s2={type:`spring`,visualDuration:.22,bounce:.25},c2={type:`spring`,visualDuration:.2,bounce:0},l2={type:`spring`,stiffness:900,damping:18,velocity:45,restDelta:.02,restSpeed:1},u2=(()=>{let e=yr({keyframes:[0,1],visualDuration:s2.visualDuration,bounce:s2.bounce}),t=0;for(;t<1e3&&e.next(t).value<.97;)t+=4;return t/1e3})(),d2={type:`spring`,visualDuration:.28,bounce:.6};function f2(e,t){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),i=(0,m.useRef)(null),a=(0,m.useRef)(null),o=(0,m.useRef)(null),s=(0,m.useRef)({}),c=(0,m.useRef)([]),l=(0,m.useRef)(void 0),u=(0,m.useRef)([]),d=(0,m.useRef)(1),f=(0,m.useRef)(1),p=(0,m.useCallback)(e=>{let t=e?s.current[e]:void 0;if(!t)return;let n=parseFloat(getComputedStyle(t).borderTopLeftRadius)||0;return{left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,height:t.offsetHeight,radius:n}},[]),h=(0,m.useCallback)(()=>{for(let e of u.current)e.stop();u.current=[];for(let e of Object.values(s.current))e?.style.translate&&(e.style.translate=``)},[]),g=(0,m.useCallback)(e=>{h(),l.current=e,d.current=1,f.current=1;let t=p(e);t2(r.current,t),t2(i.current,void 0),r2(a.current,t,`left`,1),r2(o.current,void 0,`left`,0);for(let e of c.current)e&&(e.style.width=`0px`);cH()},[p,h]),_=(0,m.useCallback)((e,t)=>{let n=p(e),m=p(t);if(!n||!m)return g(t);h(),sH(),l.current=t;let _=m.left>n.left?1:-1,v=_>0?n.right:n.left,y=_>0?m.left:m.right,b=Math.abs(y-v),x=_>0?`right`:`left`,S=_>0?`left`:`right`,C=c.current.map(e=>{let t=e?.parentElement;return t?{liquid:e,from:t.offsetLeft,to:t.offsetLeft+t.offsetWidth}:void 0}),w=b>4?1-4/b:0,T={drained:1-Math.min(1,d.current),unrung:1-Math.min(1,f.current),head:0,tail:0,filled:0,rung:0,squash:1,budge:0},E=s.current[t];d.current=0,f.current=0;let D=()=>{let e=(n.right-n.left)*Math.min(1,T.drained);t2(i.current,n,_>0?n.left+e:n.left,_>0?n.right:n.right-e),r2(o.current,n,x,1-T.unrung);let t=v+_*b*T.head,s=v+_*b*T.tail,c=Math.min(t,s),l=Math.max(t,s);for(let e of C){if(!e?.liquid)continue;let t=Math.max(c,e.from),n=Math.min(l,e.to);e.liquid.style.width=`${Math.max(0,n-t)}px`,e.liquid.style.transform=`translateX(${Math.max(0,t-e.from)}px)`}let u=_*T.budge,d=u?{...m,left:m.left+u,right:m.right+u}:m;E&&(E.style.translate=Math.abs(u)>.01?`${u.toFixed(2)}px`:``);let f=(d.right-d.left)*Math.min(1,Math.max(0,T.filled));t2(r.current,d,_>0?d.left:d.right-f,_>0?d.left+f:d.right,Math.min(1,T.squash)),r2(a.current,d,S,T.rung)},O=(e,t,n,r,i=1)=>{let a=Vf(t,i,{...n,onUpdate:t=>{T[e]=t,r?.(t),D()}});return u.current.push(a),a},k=!1,A=()=>{if(k)return;k=!0;let e=O(`filled`,0,s2,e=>{d.current=e});e.then(()=>{l.current===t&&cH()}),O(`squash`,.8,d2),O(`rung`,0,c2,e=>{f.current=e}),O(`budge`,0,{...l2,delay:u2},void 0,0),Promise.all([e,...u.current]).then(()=>{l.current===t&&u.current.includes(e)&&g(t)})};O(`drained`,T.drained,i2),O(`unrung`,T.unrung,i2),O(`head`,0,a2,e=>{e>=w&&A()}),O(`tail`,0,o2),D()},[p,g,h]);(0,m.useLayoutEffect)(()=>{let t=l.current,n=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;!t||!e||t===e||n?g(e):_(t,e)},[e,t,_,g]);let v=(0,m.useRef)(e);return v.current=e,(0,m.useEffect)(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=!0,r=new ResizeObserver(()=>{if(t){t=!1;return}g(v.current)});return r.observe(e),()=>{r.disconnect(),h()}},[g,h]),{track:n,fill:r,drain:i,ring:a,unring:o,cells:s,liquids:c}}var p2=(0,m.forwardRef)(function({which:e},t){return(0,V.jsxs)(`svg`,{ref:t,"aria-hidden":`true`,[`data-tab-${e}`]:``,className:`pointer-events-none absolute left-0 z-20 overflow-visible opacity-0 will-change-transform`,fill:`none`,children:[(0,V.jsx)(`path`,{pathLength:1,strokeWidth:e2,strokeLinecap:`round`,className:`stroke-tab-rim`}),(0,V.jsx)(`path`,{pathLength:1,strokeWidth:e2,strokeLinecap:`round`,className:`stroke-tab-rim`})]})});function m2(e){if(e.left||e.right)return`linear-gradient(to right, ${e.left?`transparent 0, black 28px`:`black 0`}, ${e.right?`black calc(100% - 28px), transparent 100%`:`black 100%`})`}function h2({tabs:e,activeId:t,onSelect:n}){let r=Pk(`(max-width: 767.98px)`),{track:i,fill:a,drain:o,ring:s,unring:c,cells:l,liquids:u}=f2(t,e.length),d=(0,m.useRef)(null),[f,p]=(0,m.useState)({left:!1,right:!1}),h=(0,m.useCallback)(()=>{let e=d.current;if(!e)return;let t=e.scrollLeft>2,n=e.scrollLeft+e.clientWidth<e.scrollWidth-2;p(e=>e.left===t&&e.right===n?e:{left:t,right:n})},[]);(0,m.useEffect)(()=>{let e=d.current;if(!e||typeof ResizeObserver>`u`)return;h();let t=new ResizeObserver(h);return t.observe(e),e.firstElementChild&&t.observe(e.firstElementChild),()=>t.disconnect()},[h,e.length]),(0,m.useEffect)(()=>{let e=d.current,n=t?l.current[t]:void 0;e&&n&&(n.offsetLeft<e.scrollLeft?e.scrollLeft=n.offsetLeft-8:n.offsetLeft+n.offsetWidth>e.scrollLeft+e.clientWidth&&(e.scrollLeft=n.offsetLeft+n.offsetWidth-e.clientWidth+8))},[t,l]);function g(r){if(r.key===`ArrowDown`&&!r.altKey){lj()&&r.preventDefault();return}let i=r.key===`ArrowRight`?1:r.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;r.preventDefault();let a=r.target.closest(`[role='tab']`)?.id.replace(/^tab-/,``)??t,o=e[(Math.max(0,e.findIndex(e=>e.id===a))+i+e.length)%e.length];dj.active=!0,dj.to=o.id,window.setTimeout(()=>{dj.active=!1,dj.to=void 0},3e3),n(o.id),l.current[o.id]?.focus({preventScroll:!0})}return r?(0,V.jsx)(q0,{tabs:e,activeId:t,onSelect:n}):(0,V.jsx)(`div`,{ref:d,onScroll:h,style:{maskImage:m2(f),WebkitMaskImage:m2(f)},className:`min-w-0 max-w-full overflow-x-auto [scrollbar-width:none] pointer-coarse:-my-1.5 pointer-coarse:py-1.5 [&::-webkit-scrollbar]:hidden`,children:(0,V.jsxs)(`div`,{ref:i,role:`tablist`,"aria-label":`Lobby tabs`,onKeyDown:g,className:`relative mx-auto flex w-max items-center py-0.5`,children:[(0,V.jsx)(`span`,{ref:o,"aria-hidden":`true`,"data-tab-drain":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,V.jsx)(`span`,{ref:a,"aria-hidden":`true`,"data-tab-fill":!0,className:`pointer-events-none absolute left-0 z-0 rounded-lg bg-tab-fill opacity-0 will-change-transform`}),(0,V.jsx)(p2,{ref:c,which:`unring`}),(0,V.jsx)(p2,{ref:s,which:`ring`}),e.map((e,n)=>(0,V.jsxs)(m.Fragment,{children:[n>0?(0,V.jsxs)(`span`,{"aria-hidden":`true`,"data-tab-link":!0,className:`relative h-[2px] w-3.5 shrink-0 sm:w-4`,children:[(0,V.jsx)(`span`,{className:`absolute inset-0 border-t-2 border-dotted border-input`}),(0,V.jsx)(`span`,{ref:e=>{u.current[n-1]=e},"data-tab-liquid":!0,className:`absolute top-0 left-0 h-[2px] w-0 rounded-full bg-tab-liquid shadow-[0_0_6px_var(--tab-liquid)] will-change-transform`})]}):null,(0,V.jsx)($0,{ref:t=>{l.current[e.id]=t},tab:e,active:e.id===t})]},e.id))]})})}function g2({oracleBusy:e,runs:t,activity:n,background:r}){let i=new Set;e&&i.add(`Oracle`);for(let e of t)e.status===`running`&&i.add(cW(fW(e)));for(let e of n)e.pending&&e.source!==`LOBBY`&&i.add(e.source===`MASTER`?`Oracle`:cW(e.source));let a=r.filter(e=>e.alive&&e.busy).length;return a&&i.add(a===1?`1 in the background`:`${a} in the background`),[...i]}function _2(e){return e.length<=2?e.join(`, `):`${e.slice(0,2).join(`, `)} +${e.length-2}`}function v2(...e){let t=e.filter(e=>!!e);if(!t.length)return;let n=Math.max(...t.map(e=>e.left)),r=Math.max(...t.map(e=>e.top)),i=Math.min(...t.map(e=>e.left+e.width)),a=Math.min(...t.map(e=>e.top+e.height));return i>n&&a>r?{left:n,top:r,width:i-n,height:a-r}:void 0}function y2(e,t){return v2(e,{left:e.left,top:e.top,width:e.width,height:Math.max(0,t-e.top)})}var b2=6,x2=`bot-lobby.orb`,S2=e=>typeof e==`number`&&Number.isFinite(e)&&e>=0&&e<=1;function C2(e,t,n,r){let i=e=>e+b2,a=(e,t)=>Math.max(e+b2,e+t-r-b2);return{x:Math.min(a(n.left,n.width),Math.max(i(n.left),e)),y:Math.min(a(n.top,n.height),Math.max(i(n.top),t))}}function w2(e,t,n,r){let i=e=>Math.max(1,e-r),a=C2(e,t,n,r);return{fx:Math.min(1,Math.max(0,(a.x-n.left)/i(n.width))),fy:Math.min(1,Math.max(0,(a.y-n.top)/i(n.height)))}}function T2(e,t,n){return C2(t.left+e.fx*Math.max(0,t.width-n),t.top+e.fy*Math.max(0,t.height-n),t,n)}function E2(e){if(e)try{let t=JSON.parse(e);return S2(t.fx)&&S2(t.fy)?{fx:t.fx,fy:t.fy}:void 0}catch{return}}function D2(){try{return E2(localStorage.getItem(x2))}catch{return}}function O2(e){try{localStorage.setItem(x2,JSON.stringify(e))}catch{}}var k2=5,A2=16,j2={fx:1,fy:1};function M2(e){return{left:e.left,top:e.top,width:e.width,height:e.height}}function N2(e){let t=document.getElementById(`main`)?.getBoundingClientRect();if(!t)return;if(!e)return M2(t);let n=window.visualViewport,r=M2({left:n?.offsetLeft??0,top:n?.offsetTop??0,width:n?.width??window.innerWidth,height:n?.height??window.innerHeight}),i=v2(M2(t),r);if(!i)return;let a=document.getElementById(`app-dock`)?.getBoundingClientRect().top;return a===void 0?i:y2(i,a)}function P2(e,t){return!e||!t?e===t:e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function F2(e){let[t,n]=(0,m.useState)(()=>N2(e));return(0,m.useEffect)(()=>{let t=()=>{let t=N2(e);n(e=>P2(e,t)?e:t)},r=document.getElementById(`main`),i=document.getElementById(`app-dock`),a=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t);r&&a?.observe(r),i&&a?.observe(i);let o=window.visualViewport;return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),o?.addEventListener(`resize`,t),o?.addEventListener(`scroll`,t),t(),()=>{a?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t),o?.removeEventListener(`resize`,t),o?.removeEventListener(`scroll`,t)}},[e]),t}var I2=(0,m.forwardRef)(function({spotlight:e,thinking:t,busy:n=[],tone:r,expanded:i,hidden:a,shortcut:o,onOpen:s},c){let l=Pk(`(max-width: 767.98px)`),u=F2(l),[d,f]=(0,m.useState)(D2),[p,h]=(0,m.useState)(),[g,_]=(0,m.useState)(!1),v=(0,m.useRef)(void 0),y=(0,m.useRef)(!1),b=(0,m.useRef)(44),x=d??(l?j2:void 0),S=p??(x&&u?T2(x,u,b.current):void 0),C=(0,m.useCallback)((e,t)=>{let n=N2(l);if(!n)return;let r=w2(e,t,n,b.current);f(r),O2(r)},[l]);(0,m.useEffect)(()=>{u&&h(e=>e&&C2(e.x,e.y,u,b.current))},[u]);function w(e){if(e.button!==0)return;let t=e.currentTarget.getBoundingClientRect();b.current=t.width,v.current={id:e.pointerId,sx:e.clientX,sy:e.clientY,ox:t.left,oy:t.top,moved:!1},e.currentTarget.setPointerCapture?.(e.pointerId)}function T(e){let t=v.current;if(!t||t.id!==e.pointerId)return;let n=e.clientX-t.sx,r=e.clientY-t.sy;if(!t.moved&&Math.hypot(n,r)<k2)return;t.moved=!0;let i=N2(l);i&&h(C2(t.ox+n,t.oy+r,i,b.current))}function E(e){let t=v.current;v.current=void 0,t?.moved&&(y.current=!0,C(t.ox+e.clientX-t.sx,t.oy+e.clientY-t.sy),h(void 0))}function D(e){let t=e.shiftKey?64:A2,n={ArrowLeft:[-t,0],ArrowRight:[t,0],ArrowUp:[0,-t],ArrowDown:[0,t]}[e.key];if(!n||e.altKey||e.ctrlKey||e.metaKey)return;e.preventDefault();let r=e.currentTarget.getBoundingClientRect();b.current=r.width,C(r.left+n[0],r.top+n[1])}let O=!e&&n.length>0,k=e?cW(e):O?_2(n):void 0,A=e?`${t.map(cW).join(`, `)} thinking. `:O?`${n.join(`, `)} at work. `:``,j=S&&u?S.x-u.left<140:!1,M={"--orb":r,...S?{left:S.x,top:S.y,right:`auto`,bottom:`auto`}:{}};return(0,V.jsxs)(XA,{open:g&&!p,onOpenChange:_,children:[(0,V.jsx)(ZA,{asChild:!0,children:(0,V.jsxs)(`button`,{ref:c,type:`button`,"aria-label":`Open Thinking`,"aria-description":`${A}Drag, or use the arrow keys, to move it.`,"aria-haspopup":`dialog`,"aria-expanded":i,"aria-keyshortcuts":o?`${o} Enter Space`:`Enter Space`,onClick:e=>{if(y.current){y.current=!1,e.preventDefault();return}s()},onPointerDown:w,onPointerMove:T,onPointerUp:E,onPointerCancel:()=>{v.current=void 0,h(void 0)},onKeyDown:D,style:M,"data-thinking":e?``:void 0,"data-busy":O?``:void 0,"data-dragging":p?``:void 0,"data-placed":S?``:void 0,"data-flip":j||void 0,className:J(`thinking-bubble fixed z-20 touch-none rounded-full outline-none select-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,a&&`invisible`),children:[(0,V.jsx)(Cu,{initial:!1,children:k?(0,V.jsx)(H.span,{className:`orb-label`,initial:{opacity:0,x:j?-8:8,scale:.9},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:j?-8:8,scale:.9},transition:{type:`spring`,visualDuration:.3,bounce:.35},children:(0,V.jsx)(Cu,{mode:`popLayout`,initial:!1,children:(0,V.jsx)(H.span,{className:`inline-flex items-center gap-1`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{type:`spring`,visualDuration:.28,bounce:.3},children:k},k)})},`label`):null}),(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`orb orb-float`,children:(0,V.jsx)(`span`,{className:`orb-icon`,children:(0,V.jsx)(oW,{source:e,strokeWidth:2.25,className:`size-3.5`})})})]})}),(0,V.jsxs)(QA,{side:`top`,children:[`Thinking `,!l&&o?(0,V.jsx)(kk,{chord:o}):null,(0,V.jsx)(`span`,{className:`text-background/70`,children:` · drag to move`})]})]})}),L2=/^\s*(?:#{1,6}\s+(.+?)\s*#*|\*\*([^*\n]{2,90}?):?\*\*:?|__([^_\n]{2,90}?):?__:?)\s*$/,R2=260,z2=200,B2=/^\s*(?:[-*+]\s|\d+[.)]\s|>|```|~~~|\|)/m;function V2(e){let t=[],n=[],r=!1;for(let i of e){if(/^\s*(```|~~~)/.test(i)&&(r=!r),!r&&!i.trim()){n.length&&t.push(n.join(`
105
- `).trim()),n=[];continue}n.push(i)}return n.length&&t.push(n.join(`
106
- `).trim()),t.filter(Boolean)}function H2(e){let t=e.split(/(?<=[.!?…])\s+(?=[A-Z"'“‘`(\[])/),n=[];for(let e of t){let t=n.at(-1);t!==void 0&&(t.split("`").length-1)%2==1?n[n.length-1]=`${t} ${e}`:n.push(e)}return n}function U2(e){if(e.length<=R2||B2.test(e))return[e];let t=[],n=``;for(let r of H2(e.replace(/\s*\n\s*/g,` `)))n&&n.length+r.length+1>z2?(t.push(n),n=r):n=n?`${n} ${r}`:r;return n&&t.push(n),t}function W2(e){let t=e.replace(/\r\n?/g,`
107
- `).trim().split(`
108
- `),n=[{lines:[]}],r=!1;for(let e of t){/^\s*(```|~~~)/.test(e)&&(r=!r);let t=r?null:L2.exec(e),i=t?(t[1]??t[2]??t[3])?.trim():void 0;i?n.push({title:i,lines:[]}):n.at(-1).lines.push(e)}let i=[];for(let e of n){let t=V2(e.lines);if(e.title)i.push({title:e.title,text:t.join(`
109
-
110
- `)});else for(let e of t)for(let t of U2(e))i.push({text:t})}return i}var G2=4,K2=1800,q2=e=>({"--orb":e});function J2(e){let[t,n]=(0,m.useState)(0),r=e.join(`|`);return(0,m.useEffect)(()=>{if(n(0),e.length<2)return;let t=window.setInterval(()=>n(e=>e+1),K2);return()=>window.clearInterval(t)},[r,e.length]),e.length?e[t%e.length]:void 0}function Y2({thought:e}){let t=(0,m.useMemo)(()=>W2(e.text),[e.text]),[n,r]=(0,m.useState)(!1),i=n?0:Math.max(0,t.length-G2),a=t.slice(i),o=cW(e.source);return(0,V.jsxs)(`li`,{className:`thought`,style:q2(dW(e.source)),"data-live":e.live||void 0,"aria-label":`${o}${e.live?`, thinking`:``}`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(`span`,{className:`thought-label`,children:[(0,V.jsx)(oW,{source:e.source,strokeWidth:2.25,className:`size-3.5`}),o]}),(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.live?(0,V.jsxs)(`span`,{className:`thought-live`,children:[`thinking`,(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`thought-ellipsis`})]}):Vj(Date.now()-e.at)}),t.length>1?(0,V.jsxs)(`span`,{className:`ml-auto text-xs text-muted-foreground tabular-nums`,children:[t.length,` steps`]}):null]}),i?(0,V.jsxs)(`button`,{type:`button`,"data-compact":!0,className:`thought-more`,onClick:()=>r(!0),children:[i,` earlier `,i===1?`step`:`steps`]}):null,(0,V.jsx)(`ol`,{className:`thought-steps`,"data-single":a.length===1||void 0,children:a.map((t,n)=>(0,V.jsxs)(`li`,{"data-current":e.live&&n===a.length-1||void 0,children:[t.title?(0,V.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:t.title}):null,t.text?(0,V.jsx)(bH,{text:t.text,className:`thought-text`}):null]},i+n))})]})}function X2(e,t,n){(0,m.useEffect)(()=>{if(!e||!t)return;let r=e=>{e.defaultPrevented||e.isComposing||!h$(e,t)||e.target?.closest(`input, textarea, [contenteditable='true']`)||(e.preventDefault(),n())};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e,t,n])}function Z2(e){return[...e].sort((e,t)=>Number(t.live)-Number(e.live)||t.at-e.at||t.id-e.id)}function Q2({thoughts:e,collapsed:t,onToggle:n,shortcut:r,busy:i=[]}){let a=Z2(mW(e)),o=a.filter(e=>e.live).map(e=>e.source),s=J2(o),c=s?dW(s):i.length?`var(--primary)`:`var(--orb-idle)`,l=s?`thinking`:i.length?`busy`:void 0,u=(0,m.useRef)(null),d=(0,m.useRef)(t);d.current=t,(0,m.useEffect)(()=>()=>{d.current||n()},[n]);let f=SA(!t,xA.sheet),p=wA();X2(f,r,n);let h=a.length>0||i.length>0;return(0,V.jsxs)(V.Fragment,{children:[h&&(0,wv.createPortal)((0,V.jsx)(I2,{ref:u,spotlight:s,thinking:o,busy:i,tone:c,expanded:!t,hidden:p,shortcut:r,onOpen:n}),document.body),(0,V.jsxs)(mA,{open:f,onOpenChange:e=>{!e&&!t&&n()},label:`Thinking`,className:J(`thought-pane max-w-xl`,l&&`thought-pane-live`),style:q2(c),onCloseAutoFocus:e=>{e.preventDefault(),requestAnimationFrame(()=>{document.querySelector(`[role='dialog']`)||u.current?.focus()})},children:[(0,V.jsx)(`div`,{"aria-hidden":`true`,className:`thought-aura`,"data-working":l}),(0,V.jsx)(`div`,{className:`relative min-h-0 overflow-y-auto p-3 outline-none sm:p-4`,role:`log`,"aria-label":`Latest thoughts`,tabIndex:0,children:a.length?(0,V.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(e=>(0,V.jsx)(Y2,{thought:e},e.id))}):(0,V.jsx)(`p`,{className:`px-2 py-6 text-center text-sm text-muted-foreground`,children:`Thoughts from the oracle and every agent appear here, and only here.`})})]})]})}var $2=`(max-width: 767.98px)`,e4=32;function t4(e){e.style.removeProperty(`max-height`),e.removeAttribute(`data-phone-fit`);let t=e.querySelector(`[role='log'][data-phone-fit]`);t&&(t.style.removeProperty(`min-height`),t.style.removeProperty(`overflow-y`),t.removeAttribute(`data-phone-fit`))}function n4(){let e=document.querySelector(`.thought-pane`);if(!e)return;if(!window.matchMedia($2).matches){t4(e);return}let t=window.visualViewport,n=t?.offsetTop??0,r=n+(t?.height??window.innerHeight),i=document.getElementById(`app-dock`)?.getBoundingClientRect().top??r;e.style.maxHeight=`${Math.max(0,Math.min(r,i)-n-e4)}px`,e.dataset.phoneFit=``;let a=e.querySelector(`[role='log']`);a&&(a.style.minHeight=`0`,a.style.overflowY=`auto`,a.dataset.phoneFit=``)}function r4(e){(0,m.useEffect)(()=>{if(!e)return;let t=()=>n4(),n=typeof MutationObserver>`u`?void 0:new MutationObserver(t);n?.observe(document.body,{childList:!0,subtree:!0});let r=document.getElementById(`app-dock`),i=typeof ResizeObserver>`u`?void 0:new ResizeObserver(t);r&&i?.observe(r);let a=window.visualViewport;return window.addEventListener(`resize`,t),window.addEventListener(`orientationchange`,t),a?.addEventListener(`resize`,t),t(),()=>{n?.disconnect(),i?.disconnect(),window.removeEventListener(`resize`,t),window.removeEventListener(`orientationchange`,t),a?.removeEventListener(`resize`,t),document.querySelectorAll(`.thought-pane[data-phone-fit]`).forEach(t4)}},[e])}function i4({status:e,lobby:t}){r4(!!(e&&e.panels?.thinking!==!1));let[n,r]=OW(`lobby.thinking`),i=JA(`sessions.list`,{},[`sessions`]);if(!e||e.panels?.thinking===!1)return null;let a=g2({oracleBusy:e.busy,runs:pW(t),activity:t?.activity??[],background:i.data?.background??[]}),o=e.keys.find(e=>e.action===`thinking`)?.label;return(0,V.jsx)(Q2,{thoughts:t?.thoughts??[],collapsed:n,onToggle:r,shortcut:o,busy:a})}var a4=/\s*\(recommended\)\s*$/i,o4=1200,s4=`Type something.`,c4=`(max-width: 767.98px)`,l4=`max-md:hidden`;function u4(e){return{text:e.replace(a4,``),recommended:a4.test(e)}}function d4({label:e}){let{text:t,recommended:n}=u4(e);return(0,V.jsxs)(`span`,{className:`leading-snug break-words`,children:[t,n?(0,V.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function f4({multi:e,on:t}){return(0,V.jsxs)(`span`,{"aria-hidden":`true`,className:J(`relative mt-0.5 flex size-4 shrink-0 items-center justify-center border`,e?`rounded-lg`:`rounded-full`,t?`border-primary bg-primary text-primary-foreground`:`border-input`),children:[t?(0,V.jsx)(Rp,{className:J(e?`size-3`:`hidden`)}):null,t&&!e?(0,V.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function p4({option:e,index:t,multi:n,name:r,selected:i,onToggle:a,onFocusOption:o}){return(0,V.jsxs)(`div`,{className:`grid gap-1`,children:[(0,V.jsxs)(`label`,{className:J(`flex min-h-9 cursor-pointer items-start gap-2.5 rounded-lg border px-3 py-2 text-start text-sm transition-[background-color,border-color,transform] duration-150 ease-snap active:scale-[0.99] max-md:min-h-11`,i?`border-primary/50 bg-accent`:`border-input bg-background hover:bg-accent/60`,`has-[:focus-visible]:border-ring has-[:focus-visible]:ring-3 has-[:focus-visible]:ring-ring/30`),children:[(0,V.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,className:`sr-only`,checked:i,onChange:a,onFocus:o}),(0,V.jsx)(f4,{multi:n,on:i}),(0,V.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:(0,V.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,V.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,V.jsx)(d4,{label:e.label})]})})]}),e.description?(0,V.jsx)(bH,{text:e.description,className:`px-3 text-muted-foreground`}):null]})}function m4({option:e,onExpand:t}){let n=Pk(c4);return!e||!GY(e)?null:(0,V.jsxs)(`div`,{className:`card-flat flex min-w-0 max-w-full flex-col gap-2 rounded-lg border p-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,V.jsxs)(`p`,{className:`min-w-0 truncate text-xs font-medium text-muted-foreground`,children:[`Preview · `,u4(e.label).text]}),(0,V.jsxs)(X,{type:`button`,variant:`ghost`,size:`xs`,onClick:t,"aria-keyshortcuts":`E`,title:n?`Expand mockup`:`Expand · E`,className:`-my-1 shrink-0 max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,V.jsx)(Jm,{"aria-hidden":`true`}),`Expand`]})]}),e.image?(0,V.jsx)(`img`,{src:I(e.image),alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-lg border object-contain`}):null,e.htmlPreview?(0,V.jsx)(zY,{preview:e.htmlPreview,label:u4(e.label).text,frameWidth:o4,onOpen:t,className:`h-auto aspect-[3/2]`}):null,e.preview?(0,V.jsx)(bH,{text:e.preview,className:`text-xs`}):null]})}function h4({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i}){return(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,V.jsx)(X,{type:`button`,variant:`ghost`,onClick:i,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),(0,V.jsx)(X,{type:e,disabled:n||r,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:r?`Sending…`:t})]})}function g4(e,t,n,r){let i=e[r];if(!i)return;let a=n[r]?.trim();if(a)return{questionIndex:r,question:i.question,kind:`custom`,answer:a};let o=(t[r]??[]).map(e=>i.options[e]?.label).filter(e=>!!e);if(o.length!==0)return i.multiSelect?{questionIndex:r,question:i.question,kind:`multi`,answer:o.join(`, `),selected:o}:{questionIndex:r,question:i.question,kind:`option`,answer:o[0]??null}}function _4({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,V.jsx)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:e.map((e,a)=>{let o=!!n[a]?.trim()||(t[a]?.length??0)>0;return(0,V.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-description":`When focused, press Enter or Space to open this question.`,type:`button`,onClick:()=>i(a),"aria-current":a===r,className:J(`inline-flex min-h-8 min-w-0 items-center gap-1 rounded-lg border px-3 text-xs font-medium transition-colors max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[(0,V.jsxs)(`span`,{className:`min-w-0 break-words text-start`,children:[a+1,` `,e.header]}),o?(0,V.jsx)(Rp,{className:`size-3 shrink-0`,"aria-hidden":`true`}):null]},a)})})}function v4({questions:e,submitting:t,onAnswer:n,onCancel:r,expanded:i,onExpand:a}){let[o,s]=(0,m.useState)(0),[c,l]=(0,m.useState)(!1),u=i??c,d=e=>a?a(e):l(e),[f,p]=(0,m.useState)(0),h=(0,m.useRef)(0),g=(0,m.useRef)(!1),[_,v]=(0,m.useState)({}),[y,b]=(0,m.useState)({}),[x,S]=(0,m.useState)({}),C=(0,m.useRef)(null),w=e[o],T=_[o]??[],E=y[o]??``,D=w?.options[x[o]??T[0]??0],O=g4(e,_,y,o),k=w?.multiSelect===!0;if((0,m.useEffect)(()=>{let e=C.current;e&&(e.querySelector(`[data-option="${_[o]?.[0]??0}"]`)??e.querySelector(`[data-nav]`))?.focus()},[o]),(0,m.useEffect)(()=>{let e=g.current&&!u;g.current=u,e&&(S(e=>({...e,[o]:h.current})),C.current?.querySelector(`[data-option="${h.current}"]`)?.focus())},[u]),!w)return null;let A=w.options.some(GY);function j(e){p(Math.max(0,e)),h.current=Math.max(0,e),d(!0)}function M(e){h.current=e,d(!1)}if(u&&A)return(0,V.jsx)(qY,{options:w.options,start:f,title:w.header||w.question,picked:T,multi:k,onChoose:e=>{N(e),k||M(e)},onClose:M,onIndex:e=>{h.current=e}},o);function N(e){let t=k?T.includes(e)?T.filter(t=>t!==e):[...T,e]:[e];v({..._,[o]:t}),k||b({...y,[o]:``}),S({...x,[o]:e})}function ee(t,r){if(g4(e,t,r,o)){if(o<e.length-1){s(o+1);return}n({answers:e.map((n,i)=>g4(e,t,r,i)).filter(e=>!!e),cancelled:!1})}}function te(e){e.preventDefault(),t||ee(_,y)}function P(t){t>=0&&t<e.length&&s(t)}function ne(e){let n=e.target,r=C.current;if(!r||e.altKey)return;if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),t||ee(_,y);return}if(n instanceof HTMLTextAreaElement){e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing?(e.preventDefault(),t||ee(_,y)):e.key===`ArrowUp`&&n.selectionStart===0&&n.selectionEnd===0&&(e.preventDefault(),ej(r,n,-1));return}let i=nj(e.key);if(i){e.preventDefault(),ej(r,n,i);return}if(e.key===`Home`||e.key===`End`){e.preventDefault(),ej(r,n,e.key===`Home`?`first`:`last`);return}let a=rj(e.key);if(a&&!(n instanceof HTMLButtonElement)){e.preventDefault(),P(o+a);return}let s=n instanceof HTMLInputElement&&n.dataset.option!==void 0?Number(n.dataset.option):-1;if(e.key===`Enter`&&s>=0){if(e.preventDefault(),k)T.length>0&&T.includes(s)?ee(_,y):N(s);else{let e={..._,[o]:[s]},t={...y,[o]:``};v(e),b(t),ee(e,t)}return}if(e.key===` `&&s>=0){e.preventDefault(),N(s);return}let c=Number(e.key);if(Number.isInteger(c)&&c>=1&&c<=w.options.length){e.preventDefault(),N(c-1),r.querySelector(`[data-option="${c-1}"]`)?.focus();return}e.key.toLowerCase()===`e`&&A&&!e.ctrlKey&&!e.metaKey&&(e.preventDefault(),j(s>=0?s:x[o]??T[0]??0))}return(0,V.jsxs)(`form`,{ref:C,className:`flex min-w-0 flex-col gap-3`,onSubmit:te,onKeyDown:ne,children:[(0,V.jsx)(_4,{questions:e,picks:_,own:y,index:o,onGo:s}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.length>1?`Question ${o+1} of ${e.length}`:`Question`}),(0,V.jsx)(bH,{text:w.question,className:`mt-1 text-base`})]}),(0,V.jsxs)(`div`,{className:J(`grid min-w-0 gap-4`,D?.preview||D?.image||D?.htmlPreview?`lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)]`:``),children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[w.options.map((e,t)=>(0,V.jsx)(p4,{option:e,index:t,multi:k,name:`question-${o}`,selected:T.includes(t),onToggle:()=>N(t),onFocusOption:()=>S({...x,[o]:t})},t)),(0,V.jsxs)(`label`,{className:`flex min-h-9 min-w-0 flex-col gap-1 rounded-lg border border-input px-3 py-1.5 text-sm focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/30 max-md:min-h-11`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Your own answer`}),(0,V.jsx)(Lj,{"data-nav":``,value:E,onChange:e=>{b({...y,[o]:e.target.value}),e.target.value&&v({..._,[o]:[]})},placeholder:s4,"aria-label":`Your own answer`,rows:2,className:`min-h-9 resize-none border-0 bg-transparent p-0 text-sm shadow-none focus-visible:ring-0 md:text-sm max-md:min-h-11`})]})]}),(0,V.jsx)(m4,{option:D,onExpand:()=>j(w.options.indexOf(D))})]}),(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(`span`,{children:k?`Pick several`:`Pick one`}),(0,V.jsx)(Ak,{chord:`↑↓`,className:l4,children:`move`}),(0,V.jsx)(Ak,{chord:k?`Space`:`Enter`,className:l4,children:k?`pick`:`choose`}),k?(0,V.jsx)(Ak,{chord:`Enter`,className:l4,children:`next`}):null,e.length>1?(0,V.jsx)(Ak,{chord:`←→`,className:l4,children:`question`}):null,A?(0,V.jsx)(Ak,{chord:`E`,className:l4,children:`expand mockups`}):null,(0,V.jsx)(Ak,{chord:`Esc`,className:l4,children:`later`})]}),(0,V.jsx)(h4,{primary:`submit`,primaryLabel:o<e.length-1?`Next`:`Answer`,disabled:!O,submitting:t,onCancel:r})]})}function y4(e,t,n){let r=e.currentTarget,i=e.target;if(e.altKey||tj(i))return;let a=nj(e.key);if(a){e.preventDefault(),ej(r,i,a);return}let o=i instanceof HTMLInputElement&&i.dataset.option!==void 0?Number(i.dataset.option):-1;if((e.key===`Enter`||e.key===` `)&&o>=0){e.preventDefault(),n(o,e.key===`Enter`);return}let s=Number(e.key);Number.isInteger(s)&&s>=1&&s<=t&&(e.preventDefault(),n(s-1,!1),r.querySelector(`[data-option="${s-1}"]`)?.focus())}function b4({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``),o=(0,m.useRef)(null);return(0,m.useEffect)(()=>{o.current?.querySelector(`[data-nav]`)?.focus()},[]),(0,V.jsxs)(`form`,{ref:o,className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},onKeyDown:r=>y4(r,e.options.length,(r,i)=>{let o=e.options[r];o!==void 0&&(a(o),i&&!t&&n(o))}),children:[(0,V.jsx)(bH,{text:e.title,className:`text-base`}),(0,V.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map((e,t)=>(0,V.jsx)(p4,{option:{label:e},index:t,multi:!1,name:`choice`,selected:i===e,onToggle:()=>a(e)},e))}),(0,V.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,V.jsx)(Ak,{chord:`↑↓`,className:l4,children:`move`}),(0,V.jsx)(Ak,{chord:`Enter`,className:l4,children:`choose`}),(0,V.jsx)(Ak,{chord:`Esc`,className:l4,children:`later`})]}),(0,V.jsx)(h4,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function x4({view:e,submitting:t,onAnswer:n}){let r=(0,m.useRef)(null);(0,m.useEffect)(()=>r.current?.focus(),[]);function i(e){if(e.altKey||e.ctrlKey||e.metaKey||t)return;let r=e.key.toLowerCase();r===`y`?n(!0):r===`n`&&n(!1)}return(0,V.jsxs)(`div`,{ref:r,tabIndex:-1,"data-autofocus":``,onKeyDown:i,className:`flex min-w-0 flex-col gap-3 outline-none`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(bH,{text:e.question,className:`text-base`}),e.detail?(0,V.jsx)(bH,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,V.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,V.jsx)(Ak,{chord:`Y`,className:l4,children:`yes`}),(0,V.jsx)(Ak,{chord:`N`,className:l4,children:`no`}),(0,V.jsx)(Ak,{chord:`Esc`,className:l4,children:`later`})]}),(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,V.jsx)(X,{type:`button`,disabled:t,onClick:()=>n(!0),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]})]})]})}function S4({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,V.jsxs)(`form`,{className:`flex min-w-0 flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,V.jsx)(bH,{text:e.question,className:`text-base`}),(0,V.jsx)(Lj,{autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},value:i,onChange:e=>a(e.target.value),placeholder:e.placeholder??s4,"aria-label":e.question,rows:3,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}),(0,V.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,V.jsx)(Ak,{chord:`Enter`,className:l4,children:`answer`}),(0,V.jsx)(Ak,{chord:`Shift+Enter`,className:l4,children:`new line`}),(0,V.jsx)(Ak,{chord:`Esc`,className:l4,children:`later`})]}),(0,V.jsx)(h4,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function C4({dialog:e,submitting:t,onAnswer:n}){let[r,i]=(0,m.useState)(e.method===`editor`?e.prefill??``:``),[a,o]=(0,m.useState)(``),s=e.options??[],c=e.method===`select`?a!==``:r.trim()!==``,l=(0,m.useRef)(null);(0,m.useEffect)(()=>{l.current?.querySelector(`[data-nav], textarea`)?.focus()},[]);function u(t){t.preventDefault(),e.method===`select`?n({value:a}):e.method===`confirm`?n({confirmed:!0}):(e.method===`input`||e.method===`editor`)&&n({value:r.trim()})}return(0,V.jsxs)(`form`,{ref:l,className:`flex min-w-0 flex-col gap-3`,onSubmit:u,onKeyDown:r=>{e.method===`select`&&y4(r,s.length,(e,r)=>{let i=s[e];i!==void 0&&(o(i),r&&!t&&n({value:i}))})},children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,V.jsx)(bH,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,V.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,V.jsx)(p4,{option:{label:e},index:t,multi:!1,name:`dialog`,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,V.jsx)(Lj,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??s4,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-9 resize-none text-sm md:text-sm max-md:min-h-11`}):null,(0,V.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,V.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({cancelled:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Cancel`}),e.method===`confirm`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(X,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({confirmed:!1}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`No`}),(0,V.jsx)(X,{type:`button`,disabled:t,onClick:()=>n({confirmed:!0}),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Yes`})]}):(0,V.jsx)(X,{type:`submit`,disabled:!c||t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:t?`Sending…`:`Answer`})]})]})}function w4(e){let{view:t}=e;return t.kind===`questionnaire`?(0,V.jsx)(v4,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel,...e.onExpand?{expanded:e.expanded??!1,onExpand:e.onExpand}:{}}):t.kind===`choose`?(0,V.jsx)(b4,{...e,view:t}):t.kind===`confirm`?(0,V.jsx)(x4,{...e,view:t}):t.kind===`text`?(0,V.jsx)(S4,{...e,view:t}):(0,V.jsx)(C4,{...e,dialog:t.dialog})}function T4(e){return typeof e==`object`&&e?e:{}}function E4(e){return typeof e==`string`?e.trim():``}function D4(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function O4(e){let t=T4(e),n=E4(t.label);if(!n)return;let r=E4(t.description),i=E4(t.preview),a=E4(t.image),o=PY(t.htmlPreview);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{},...o?{htmlPreview:o}:{}}}function k4(e){let t=T4(e),n=E4(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(O4).filter(e=>!!e);return{question:n,header:E4(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function A4(e){let t=T4(e),n=E4(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=E4(t.message),i=D4(t.options),a=E4(t.placeholder),o=E4(t.prefill);return{id:E4(t.id),method:n,title:E4(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function j4(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(k4).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function M4(e){return{kind:`choose`,title:E4(e.title)||`Choose an option`,options:D4(e.options)}}function N4(e){let t=E4(e.question)||E4(e.title)||`Continue?`,n=E4(e.detail)||E4(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function P4(e){let t=E4(e.question)||E4(e.title)||`Type an answer`,n=E4(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function F4(e){let t=T4(e.payload);if(e.kind===`questionnaire`)return j4(t);if(e.kind===`choose`)return M4(t);if(e.kind===`confirm`)return N4(t);if(e.kind===`text`)return P4(t);let n=A4(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}var I4=`(max-width: 767.98px)`;function L4({submitting:e,onKeep:t,onLeave:n}){return(0,V.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`alert`,children:[(0,V.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,V.jsxs)(`div`,{className:`flex items-center justify-end gap-2 max-md:flex-wrap max-md:justify-start`,children:[(0,V.jsx)(X,{type:`button`,variant:`outline`,onClick:t,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Keep answering`}),(0,V.jsx)(X,{type:`button`,disabled:e,onClick:n,className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:e?`Leaving…`:`Leave`})]})]})}function R4({count:e,onOpen:t}){return(0,V.jsxs)(X,{type:`button`,variant:`soft`,onClick:t,"aria-label":`${e} question${e===1?``:`s`} waiting — open`,className:`gap-1.5 text-warning max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:[(0,V.jsx)(nm,{"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`tabular-nums`,children:e}),(0,V.jsx)(`span`,{className:`hidden md:inline`,children:`waiting`})]})}function z4({prompts:e,answer:t,dismiss:n,minimized:r,onMinimize:i}){let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),d=Pk(I4),{keyboardOpen:f,keyboardInset:p}=fA(),h=e.length,g=e[0],_=g?F4(g):void 0,v=h>0&&!r,y=SA(v,xA.question);(0,m.useEffect)(()=>{h===0&&(o(!1),i(!1))},[h,i]);let b=g?.id;(0,m.useEffect)(()=>u(!1),[b]);async function x(e,t){c(!0);try{await e,o(!1)}catch(e){e instanceof be&&e.code===`question_withdrawn`?np(EA):np.error(e instanceof Error?e.message:t)}finally{c(!1)}}let S=g?.from?`${g.from} asks`:`A question`;return(0,V.jsx)(mA,{open:v&&y&&!!g,label:`Question from the lobby`,dismissOnBackdrop:!1,onOpenChange:e=>{e||(l?u(!1):a?o(!1):i(!0))},style:d&&f?{maxHeight:`calc(100vh - ${p}px - 1.5rem)`}:void 0,className:J(l?`h-[min(92svh,60rem)] max-h-[min(92svh,60rem)] max-w-6xl`:`max-w-3xl`,`max-md:w-[calc(100vw-2rem)] max-md:max-w-[calc(100vw-2rem)] max-md:max-h-[calc(100svh-1.5rem)]`,l&&`max-md:h-[calc(100svh-1.5rem)]`),children:g?(0,V.jsxs)(`section`,{"aria-label":`Question from the lobby`,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,V.jsxs)(`header`,{className:J(`flex items-center gap-3 px-6 pt-5 pb-3 max-md:px-4 max-md:pt-4 max-md:pb-2`,l&&`hidden`),children:[(0,V.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-muted-foreground first-letter:uppercase`,children:[S,h>1?` · 1 of ${h}`:``]}),(0,V.jsx)(X,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Later: put the question away`,title:d?`Later`:`Later · Esc`,onClick:()=>i(!0),className:`max-md:size-11`,children:(0,V.jsx)(wg,{"aria-hidden":`true`})})]}),(0,V.jsx)(`div`,{className:l?`flex min-h-0 min-w-0 flex-1 flex-col`:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain px-6 pb-6 max-md:px-4 max-md:pb-4`,children:_?a?(0,V.jsx)(L4,{submitting:s,onKeep:()=>o(!1),onLeave:()=>void x(n(g.id),`Could not leave the question`)}):(0,V.jsx)(w4,{view:_,submitting:s,onAnswer:e=>void x(t(g.id,e),`Could not send the answer`),onCancel:()=>o(!0),expanded:l,onExpand:u},g.id):(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3 max-md:flex-wrap max-md:justify-start`,children:[(0,V.jsx)(`p`,{className:`max-md:min-w-0 max-md:flex-1 text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,V.jsx)(X,{type:`button`,disabled:s,onClick:()=>void x(n(g.id),`Could not dismiss the question`),className:`max-md:h-auto max-md:min-h-11 max-md:min-w-11 max-md:whitespace-normal`,children:`Dismiss`})]})})]}):null})}var B4=2;function V4(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function H4(e){try{return JSON.parse(e)}catch{return}}function U4(e,t){switch(e.type){case`hello`:t.onHello?.(e.versions);return;case`changed`:t.onChanged?.(e.topic,e.version);return;case`feed`:t.onFeed?.({activity:e.activity,thoughts:e.thoughts,chat:e.chat});return;case`reply`:t.onReply?.(e.text);return;case`notice`:t.onNotice?.(e.text,e.level)}}function W4(e,t=V4){let n=t(I(`/api/events`));return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===B4?`offline`:`connecting`),n.onmessage=t=>{let n=H4(t.data);n&&U4(n,e)},()=>n.close()}var G4=2e3,K4=()=>Se(`projects.list`,{});async function q4(){let e;try{e=fe()}catch{return}if(e&&!ve(e))try{_e((await K4()).projects)}catch{}}function J4(){let e=(0,m.useRef)(void 0),t=(0,m.useRef)(void 0),n=(0,m.useCallback)(()=>{clearTimeout(t.current),e.current?.();try{fe()}catch{F.onStatus({connection:`offline`});return}e.current=W4({onHello:e=>{F.onHello(e),q4()},onChanged:(e,t)=>F.onChanged(e,t),onFeed:e=>F.onFeedDelta(e),onReply:e=>F.onReplyDelta(e),onNotice:(e,t)=>np[t](e),onConnection:e=>{F.onStatus({connection:e}),e===`offline`&&(clearTimeout(t.current),t.current=setTimeout(()=>{ye(K4).catch(()=>!1).finally(n)},G4))}})},[]);return(0,m.useEffect)(()=>(n(),()=>{clearTimeout(t.current),e.current?.()}),[n]),n}var Y4=`bot-lobby.recoveredAt`,X4;function Z4(e,t=Q4()){try{X4===void 0&&(X4=Number(t?.getItem(Y4)??0))}catch{X4??=0}if(X4!==void 0&&e<=X4)return!1;X4=e;try{t?.setItem(Y4,String(e))}catch{}return!0}function Q4(){try{return globalThis.sessionStorage}catch{return}}function $4(e){let t=e?.recovered?.at,n=e?.recovered?.text;(0,m.useEffect)(()=>{t!==void 0&&n&&Z4(t)&&np.success(n)},[t,n])}function e3(){let e=Nk(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await Se(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await Se(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}function t3(e,t,n,r,i){e===`search`?(document.querySelector(`#main input[type='search']`)??document.getElementById(`composer-text`))?.focus():e===`help`?n():e===`settings`?MA(`#/settings`):e===`thinking`?DW(`lobby.thinking`):e===`sidebar`?i():e===`activity`?t.kind===`tab`&&t.tab===`lobby`?DW(AW):MA(jA(`lobby`)):e===`nextTab`?r(1):e===`prevTab`?r(-1):e===`savePlan`&&t.kind===`tab`&&t.tab===`plan`&&U(`planner.save`,{})}var n3=`toolbar-button inline-flex size-8 shrink-0 items-center justify-center rounded-lg border text-foreground transition-[background-color,border-color,scale] duration-150 ease-snap outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring active:scale-[0.97] motion-reduce:active:scale-100`,r3=2500;function i3(e){let[t,n]=(0,m.useState)(!1),r=(0,m.useRef)(!1);return e===`live`&&(r.current=!0),(0,m.useEffect)(()=>{if(e!==`connecting`||!r.current)return n(!1);let t=setTimeout(()=>n(!0),r3);return()=>clearTimeout(t)},[e]),e===`offline`||e===`connecting`&&t}function a3({connection:e,onRetry:t}){return i3(e)?(0,V.jsx)(qA,{onRetry:t}):null}var o3={tick:0,route:0,focus:0};window.addEventListener(`hashchange`,()=>{o3.route=++o3.tick}),document.addEventListener(`focusin`,()=>{o3.focus=++o3.tick});var s3=()=>o3.focus>o3.route;function c3(e){return e.kind===`tab`?e.tab:e.kind}function l3(){let e=NA(),t=Nk(`status`),n=Nk(`lobby`),{prompts:r,answer:i,dismiss:a}=e3(),{connection:o,signedOut:s}=Mk(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useRef)(null),p=J4();Dq();let h=t.data;$4(h);let g=!!h&&!s;(0,m.useEffect)(()=>{g&&Re()},[g]);let _=h?.tabs??[],v=h?.keys??[],y=e.kind===`tab`?e.tab:void 0,b=(0,m.useCallback)(e=>MA(jA(e)),[]),x=(0,V.jsx)(h2,{tabs:_,activeId:y,onSelect:b}),S=Pk(`(max-width: 767.98px)`),C=(0,m.useCallback)(e=>{let t=S?_.filter(e=>e.id!==`metrics`):_;if(t.length===0)return;let n=t[(Math.max(0,t.findIndex(e=>e.id===y))+e+t.length)%t.length];n&&MA(jA(n.id))},[_,y,S]),w=(0,m.useCallback)(()=>l(e=>!e),[]),T=$$(),[E,D]=(0,m.useState)(!1),O=(0,m.useCallback)(()=>{S&&D(e=>!e)},[S]),k=(0,m.useCallback)(t=>{(t!==`thinking`&&t!==`activity`||h?.panels?.[t]!==!1)&&t3(t,AA(window.location.hash)??e,w,C,O)},[e,w,C,O,h?.panels]),A=(0,m.useCallback)(()=>{let e=document.activeElement;return!e||e===document.body||f.current?.contains(e)===!0||e.closest(`.thinking-bubble`)?!0:e.closest(`[data-state='closed']`)!==null},[]);S$({enabled:!!h,keys:v,tabs:_,insideApp:A,onAction:k,onTab:b});let j=(0,m.useCallback)(()=>F.onHello({}),[]),M=e.kind===`tab`?e.tab:e.kind,N=!!h;(0,m.useEffect)(()=>{if(!N)return;let e=dj.active&&dj.to===M;if(dj.active=!1,dj.to=void 0,e)return;let t=requestAnimationFrame(()=>{if(s3()||document.querySelector(`[role='dialog']:not([data-state='closed'])`))return;let e=document.getElementById(`composer-text`),t=window.matchMedia(`(max-width: 767.98px)`).matches,n=window.matchMedia(`(pointer: coarse)`).matches;!t&&!n&&e&&!e.disabled&&!e.closest(`[inert]`)?e.focus({preventScroll:!0}):document.activeElement?.id!==`composer-text`&&document.getElementById(`main`)?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(t)},[M,N]);let ee=Object.fromEntries(v.map(e=>[e.action,e.label])),te=!!h&&!s,P=h?.workspace.name??`bot-lobby`,ne=S?te?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(O1,{expanded:E,onOpen:()=>D(!0)}),(0,V.jsx)(i1,{look:`bar`,projects:T,tab:M,name:P,branch:h?.branch??h?.workspace.branch})]}):(0,V.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium`,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,className:`project-mark`,children:P.charAt(0).toUpperCase()}),(0,V.jsx)(`span`,{className:`truncate`,children:P})]}):null,re=(0,V.jsx)(y1,{connection:o,projects:T,lead:ne,tabs:S?null:x,extra:u&&r.length>0?(0,V.jsx)(R4,{count:r.length,onOpen:()=>d(!1)}):null,tools:te?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L$,{className:n3,side:`bottom`}),(0,V.jsx)(I$,{className:n3,side:`bottom`})]})});if(s||!h)return(0,V.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col`,children:[re,(0,V.jsx)(`main`,{className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto`,children:s?(0,V.jsx)(A1,{}):t.error?(0,V.jsx)(KA,{message:t.error,onRetry:j}):(0,V.jsx)(GA,{})})]});let ie={route:e,keys:ee,onHelp:w},ae=s1(e);return(0,V.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex`,children:[S?null:(0,V.jsx)(E1,{...ie}),(0,V.jsxs)(`div`,{className:`relative flex min-w-0 flex-1 flex-col`,children:[re,(0,V.jsx)(a3,{connection:o,onRetry:p}),(0,V.jsx)(`main`,{id:`main`,tabIndex:-1,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||tj(e.target)||e.target.closest(`[role='dialog'], [role='menu'], [role='listbox']`)||uj()&&e.preventDefault()},role:y?`tabpanel`:void 0,"aria-labelledby":y?`tab-${y}`:void 0,className:`surface flex min-h-0 flex-1 flex-col overflow-y-auto outline-none`,children:(0,V.jsx)(H.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.2,.8,.2,1]},className:`flex min-h-0 flex-1 flex-col`,children:l$(e)},c3(e))}),S&&!ae?(0,V.jsx)(`div`,{className:`shrink-0 px-2 pt-1.5 pb-[max(0.5rem,env(safe-area-inset-bottom))]`,children:x}):null,(0,V.jsx)(m1,{route:e,keys:ee,projects:T,onHelp:w,dockNav:S&&ae?x:null})]}),S?(0,V.jsx)(D1,{...ie,open:E,onOpenChange:D}):null,(0,V.jsx)(i4,{status:h,lobby:n.data}),(0,V.jsx)(z4,{prompts:r,answer:i,dismiss:a,minimized:u,onMinimize:d}),(0,V.jsx)(N$,{open:c,onOpenChange:l,keys:v,tabs:_})]})}async function u3(e){switch(e){case`status`:return Se(`status.get`,{});case`lobby`:return Se(`lobby.snapshot`,{});case`prompts`:return Se(`prompts.list`,{});default:return}}var d3=[`status`,`lobby`,`prompts`];function f3(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await we(),e&&(F.markUsed(d3,u3),t(!0))})(),()=>{e=!1}},[]),e}function p3(){return f3()?(0,V.jsx)(l3,{}):(0,V.jsx)(`div`,{className:`fixed inset-0 flex`,children:(0,V.jsx)(GA,{})})}var m3={info:Im,success:Qp,warning:ug,error:om},h3={info:`text-info`,success:`text-success`,warning:`text-warning`,error:`text-destructive`};function g3(){let{item:e,waiting:t}=ip(),n=wA(),r=e&&!n;return(0,m.useEffect)(()=>{if(!e||n)return;let r=window.setTimeout(()=>tp(e.id),t>0?Math.min(e.duration,1600):e.duration);return()=>window.clearTimeout(r)},[e,n,t]),(0,V.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`pointer-events-none fixed z-40 flex justify-center px-4`,style:{bottom:`calc(var(--composer-h, 0px) + 0.25rem)`,left:`var(--composer-x, 0px)`,width:`var(--composer-w, 100%)`},children:(0,V.jsx)(Cu,{mode:`wait`,children:r?(0,V.jsxs)(H.div,{initial:{opacity:0,scale:.55,y:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.92,y:6,transition:{duration:.14,ease:`easeIn`}},transition:{type:`spring`,stiffness:560,damping:15,mass:.8},className:`pointer-events-auto flex max-w-[min(32rem,100%)] items-center gap-2.5 rounded-lg border border-glass-border bg-popover px-3.5 py-2.5 text-sm text-popover-foreground shadow-xl shadow-black/25 backdrop-blur-xs`,children:[(0,V.jsx)(_3,{kind:e.kind}),(0,V.jsx)(`span`,{className:`min-w-0 break-words`,children:e.message}),e.action?(0,V.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,className:`btn-outline -my-1.5 -mr-1 h-7 shrink-0 rounded-lg border px-2.5 text-xs font-medium text-foreground transition-[box-shadow,scale] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,onClick:()=>{e.action?.onClick(),tp(e.id)},children:e.action.label}):null]},e.id):null})})}function _3({kind:e}){let t=m3[e];return(0,V.jsx)(t,{"aria-hidden":`true`,className:J(`size-4 shrink-0`,h3[e])})}(0,qf.createRoot)(document.getElementById(`root`)).render((0,V.jsx)(m.StrictMode,{children:(0,V.jsx)(cJ,{children:(0,V.jsx)(Au,{reducedMotion:`user`,children:(0,V.jsxs)(YA,{children:[(0,V.jsx)(p3,{}),(0,V.jsx)(g3,{})]})})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});