@a-t-h-i/bot-lobby 0.6.20 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/webui/static.ts +6 -2
- package/webui/dist/assets/index-BEiuc5X3.css +2 -0
- package/webui/dist/assets/index-Clb_LGTn.js +99 -0
- package/webui/dist/build.json +23 -23
- package/webui/dist/index.html +2 -2
- package/webui/dist/assets/index-9daVA-Sp.js +0 -99
- package/webui/dist/assets/index-DKVApIgy.css +0 -2
|
@@ -0,0 +1,99 @@
|
|
|
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 ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return ee(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function k(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 ie(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,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+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+re(a,u),c+=ie(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+re(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(k(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 ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(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 oe=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 se(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,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ce(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 se(ce.bind(null,e))}var le={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=le,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=ce,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 ee(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 ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=se,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 ee(e){let t=e.replace(/!important/gi,``).trim();if(t&&T.test(t)&&!E.test(t))return t}function D(e,t,n){let r=e.replace(/^--/,``).toLowerCase();if(!w.has(r))return;let i=ee(t);i&&(n[r]=i)}function O(e){let t={};for(let n of e.matchAll(/--([a-z0-9-]+)\s*:\s*([^;}]+)/gi))D(n[1],n[2],t);return t}function te(e){if(!e||typeof e!=`object`)return;let t={};for(let[n,r]of Object.entries(e))typeof r==`string`&&D(n,r,t);return Object.keys(t).length>0?t:void 0}function ne(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`&&D(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=O(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 re={"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)`},k=`"Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,ie=`ui-monospace, "JetBrains Mono", "Cascadia Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`;function ae(e,t){let n=[];for(let[e,r]of Object.entries(t))e===`font-sans`?n.push(`--app-font-sans:${r},${k};`):e===`font-mono`?n.push(`--app-font-mono:${r},${ie};`):n.push(`--${e}:${r};`);for(let[e,r]of Object.entries(re))e in t||n.push(`--${e}:${r};`);return`${e}{${n.join(``)}}`}function A(e){let t=[];return e.light&&t.push(ae(`:root`,e.light)),e.dark&&t.push(ae(`.dark`,e.dark)),t.join(`
|
|
2
|
+
`)}function oe(e,t,n,r,i=0){let a=n,o=r,s=e=>Number(e.toFixed(3));return{id:e,name:t,light:{background:`oklch(0.975 ${s(o*.1)} ${a})`,foreground:`oklch(0.22 ${s(o*.25)} ${a})`,card:`oklch(1 0 0)`,"card-foreground":`oklch(0.22 ${s(o*.25)} ${a})`,popover:`oklch(1 0 0 / 0.92)`,"popover-foreground":`oklch(0.22 ${s(o*.25)} ${a})`,primary:`oklch(${s(.5+i)} ${o} ${a})`,"primary-foreground":`oklch(0.99 0 0)`,secondary:`oklch(0.3 ${s(o*.3)} ${a} / 0.06)`,"secondary-foreground":`oklch(0.22 ${s(o*.25)} ${a})`,muted:`oklch(0.3 ${s(o*.3)} ${a} / 0.05)`,"muted-foreground":`oklch(0.5 ${s(o*.2)} ${a})`,accent:`oklch(${s(.5+i)} ${o} ${a} / 0.1)`,"accent-foreground":`oklch(0.22 ${s(o*.25)} ${a})`,destructive:`oklch(0.52 0.19 28)`,border:`oklch(0.92 ${s(o*.08)} ${a})`,input:`oklch(0.87 ${s(o*.1)} ${a})`,ring:`oklch(${s(.6+i)} ${s(o*.9)} ${a})`,"chart-1":`oklch(${s(.5+i)} ${o} ${a})`,"chart-2":`oklch(0.52 0.12 160)`,"chart-3":`oklch(0.55 0.1 200)`,"chart-4":`oklch(0.55 0.15 340)`,"chart-5":`oklch(0.6 0.13 75)`},dark:{background:`oklch(0.145 ${s(o*.08)} ${a})`,foreground:`oklch(0.93 ${s(o*.05)} ${a})`,card:`oklch(0.18 ${s(o*.09)} ${a})`,"card-foreground":`oklch(0.93 ${s(o*.05)} ${a})`,popover:`oklch(0.18 ${s(o*.09)} ${a} / 0.94)`,"popover-foreground":`oklch(0.93 ${s(o*.05)} ${a})`,primary:`oklch(${s(.76+i/2)} ${s(o*.85)} ${a})`,"primary-foreground":`oklch(0.18 ${s(o*.4)} ${a})`,secondary:`oklch(1 0 0 / 0.045)`,"secondary-foreground":`oklch(0.93 ${s(o*.05)} ${a})`,muted:`oklch(1 0 0 / 0.04)`,"muted-foreground":`oklch(0.7 ${s(o*.15)} ${a})`,accent:`oklch(0.76 ${s(o*.85)} ${a} / 0.14)`,"accent-foreground":`oklch(0.93 ${s(o*.05)} ${a})`,destructive:`oklch(0.74 0.12 25)`,border:`oklch(0.25 ${s(o*.1)} ${a})`,input:`oklch(0.3 ${s(o*.1)} ${a})`,ring:`oklch(${s(.76+i/2)} ${s(o*.85)} ${a})`,"chart-1":`oklch(${s(.76+i/2)} ${s(o*.85)} ${a})`,"chart-2":`oklch(0.78 0.11 160)`,"chart-3":`oklch(0.8 0.1 195)`,"chart-4":`oklch(0.78 0.11 340)`,"chart-5":`oklch(0.8 0.12 80)`}}}var se=`mist`,ce=[{id:se,name:`Mist`},oe(`forest`,`Forest`,155,.12),oe(`ocean`,`Ocean`,225,.12),oe(`violet`,`Violet`,305,.16),oe(`rose`,`Rose`,5,.16),oe(`amber`,`Amber`,70,.14,.06),oe(`mono`,`Mono`,260,0)],le={light:{background:`#f4f5f9`,card:`#ffffff`,primary:`#4650d1`,accent:`#e6e9fb`},dark:{background:`#08090c`,card:`#0e1015`,primary:`#8f9bff`,accent:`#151a33`}};function ue(e,t){let n=t?e.dark:e.light,r=le[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 de=`bot-lobby.palette`,fe=`bot-lobby-palette`,pe=`custom`,me=new Set,he=ge();function ge(){try{let e=localStorage.getItem(de);if(!e)return{id:se};let t=JSON.parse(e),n=te(t.custom?.light),r=te(t.custom?.dark),i=(n||r)&&typeof t.custom?.name==`string`?{id:pe,name:t.custom.name.slice(0,40),...n?{light:n}:{},...r?{dark:r}:{}}:void 0;return{id:(t.id===`custom`?i:ce.some(e=>e.id===t.id))?t.id:se,...i?{custom:i}:{}}}catch{return{id:se}}}function _e(e){return e.id===`custom`&&e.custom?e.custom:ce.find(t=>t.id===e.id)??ce[0]}function j(){if(typeof document>`u`)return;let e=A(_e(he)),t=document.getElementById(fe);if(!e){t?.remove();return}t||(t=document.createElement(`style`),t.id=fe,document.head.appendChild(t)),t.textContent=e}function M(e){he=e;try{localStorage.setItem(de,JSON.stringify(e))}catch{}j();for(let e of[...me])e()}typeof window<`u`&&(j(),window.addEventListener(`storage`,e=>{if(e.key===de){he=ge(),j();for(let e of[...me])e()}}));function ve(e){return me.add(e),()=>{me.delete(e)}}function ye(){let e=(0,m.useSyncExternalStore)(ve,()=>he,()=>he),t=(0,m.useCallback)(e=>M({...he,id:e}),[]),n=(0,m.useCallback)((e,t)=>{let n={id:pe,name:(e.name??t).slice(0,40)||`Custom theme`,...e.light?{light:e.light}:{},...e.dark?{dark:e.dark}:{}};return M({id:pe,custom:n}),n},[]),r=(0,m.useCallback)(()=>M({id:he.id===`custom`?se:he.id}),[]),i=e.custom;return{active:_e(e),custom:i,all:i?[...ce,i]:[...ce],choose:t,adopt:n,removeCustom:r}}var be=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})),xe=o(((e,t)=>{t.exports=be()})),Se=(0,m.createContext)({});function Ce(e){let t=(0,m.useRef)(null);return t.current===null&&(t.current=e()),t.current}var we=typeof window<`u`?m.useLayoutEffect:m.useEffect,Te=(0,m.createContext)(null);function Ee(e,t){e.indexOf(t)===-1&&e.push(t)}function De(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var Oe=(e,t,n)=>n>t?t:n<e?e:n,ke={},Ae=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),je=e=>typeof e==`object`&&!!e,Me=e=>/^0[^.\s]+$/u.test(e);function Ne(e){let t;return()=>(t===void 0&&(t=e()),t)}var Pe=e=>e,Fe=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Ie=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},Le=class{constructor(){this.subscriptions=[]}add(e){return Ee(this.subscriptions,e),()=>this.remove(e)}remove(e){De(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}},Re=e=>e*1e3,ze=e=>e/1e3,Be=(e,t)=>t?1e3/t*e:0,Ve=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,He=1e-7,Ue=12;function We(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ve(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>He&&++s<Ue);return o}function Ge(e,t,n,r){if(e===t&&n===r)return Pe;let i=t=>We(t,0,1,e,n);return e=>e===0||e===1?e:Ve(i(e),t,r)}var Ke=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qe=e=>t=>1-e(1-t),Je=Ge(.33,1.53,.69,.99),Ye=qe(Je),Xe=Ke(Ye),Ze=e=>e>=1?1:(e*=2)<1?.5*Ye(e):.5*(2-2**(-10*(e-1))),Qe=e=>1-Math.sin(Math.acos(e)),$e=qe(Qe),et=Ke(Qe),tt=Ge(.42,0,1,1),nt=Ge(0,0,.58,1),rt=Ge(.42,0,.58,1),it=e=>Array.isArray(e)&&typeof e[0]!=`number`,at=e=>Array.isArray(e)&&typeof e[0]==`number`,ot={linear:Pe,easeIn:tt,easeInOut:rt,easeOut:nt,circIn:Qe,circInOut:et,circOut:$e,backIn:Ye,backInOut:Xe,backOut:Je,anticipate:Ze},st=e=>typeof e==`string`,ct=e=>{if(at(e)){e.length;let[t,n,r,i]=e;return Ge(t,n,r,i)}return st(e)?(ot[e],`${e}`,ot[e]):e},lt={delta:0,timestamp:0,isProcessing:!1},ut;function dt(){ut=void 0}var ft={now:()=>(ut===void 0&&ft.set(lt.isProcessing||ke.useManualTiming?lt.timestamp:performance.now()),ut),set:e=>{ut=e,queueMicrotask(dt)}},pt=e=>Math.round(e*1e5)/1e5,mt=e=>t=>typeof t==`string`&&t.startsWith(e),ht=mt(`--`),gt=mt(`var(--`),_t=e=>gt(e)?vt.test(e.split(`/*`)[0].trim()):!1,vt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function yt(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var bt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},xt={...bt,transform:e=>Oe(0,1,e)},St={...bt,default:1},Ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wt(e){return e==null}var Tt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Et=(e,t)=>n=>!!(typeof n==`string`&&Tt.test(n)&&n.startsWith(e)||t&&!wt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ot=e=>Oe(0,255,e),kt={...bt,transform:e=>Math.round(Ot(e))},At={test:Et(`rgb`,`red`),parse:Dt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kt.transform(e)+`, `+kt.transform(t)+`, `+kt.transform(n)+`, `+pt(xt.transform(r))+`)`};function jt(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 Mt={test:Et(`#`),parse:jt,transform:At.transform},Nt=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pt=Nt(`deg`),Ft=Nt(`%`),N=Nt(`px`),It=Nt(`vh`),Lt=Nt(`vw`),Rt={...Ft,parse:e=>Ft.parse(e)/100,transform:e=>Ft.transform(e*100)},zt={test:Et(`hsl`,`hue`),parse:Dt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Ft.transform(pt(t))+`, `+Ft.transform(pt(n))+`, `+pt(xt.transform(r))+`)`},Bt={test:e=>At.test(e)||Mt.test(e)||zt.test(e),parse:e=>At.test(e)?At.parse(e):zt.test(e)?zt.parse(e):Mt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?At.transform(e):zt.transform(e),getAnimatableNone:e=>{let t=Bt.parse(e);return t.alpha=0,Bt.transform(t)}},Vt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ht=new RegExp(Ct.source),Ut=new RegExp(Vt.source,`i`);function Wt(e){return isNaN(e)&&typeof e==`string`&&(Ht.test(e)||Ut.test(e))}var Gt=`number`,Kt=`color`,qt=`var`,Jt=`var(`,Yt="${}",Xt=/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 Zt(e){let t=e.toString();return Ht.test(t)||Ut.test(t)}function Qt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Xt,e=>(Bt.test(e)?(r.color.push(a),i.push(Kt),n.push(Bt.parse(e))):e.startsWith(Jt)?(r.var.push(a),i.push(qt),n.push(e)):(r.number.push(a),i.push(Gt),n.push(parseFloat(e))),++a,Yt)).split(Yt),indexes:r,types:i}}function $t(e){return Qt(e).values}function en({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===Gt?pt(r[a]):e===Kt?Bt.transform(r[a]):r[a]}return i}}function tn(e){return en(Qt(e))}var nn=e=>typeof e==`number`?0:Bt.test(e)?Bt.getAnimatableNone(e):e,rn=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:nn(e);function an(e){let t=Qt(e);return en(t)(t.values.map((e,n)=>rn(e,t.split[n])))}var on={test:Wt,parse:$t,createTransformer:tn,getAnimatableNone:an};function sn(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 cn({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=sn(s,r,e+1/3),a=sn(s,r,e),o=sn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ln(e,t){return n=>n>0?t:e}var un=(e,t,n)=>e+(t-e)*n,dn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},fn=[Mt,At,zt],pn=e=>fn.find(t=>t.test(e));function mn(e){let t=pn(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===zt&&(n=cn(n)),n}var hn=(e,t)=>{let n=mn(e),r=mn(t);if(!n||!r)return ln(e,t);let i={...n};return e=>(i.red=dn(n.red,r.red,e),i.green=dn(n.green,r.green,e),i.blue=dn(n.blue,r.blue,e),i.alpha=un(n.alpha,r.alpha,e),At.transform(i))},gn=new Set([`none`,`hidden`]);function _n(e,t){return gn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vn(e,t){return n=>un(e,t,n)}function yn(e){return typeof e==`number`?vn:typeof e==`string`?_t(e)?ln:Bt.test(e)?hn:Cn:Array.isArray(e)?bn:typeof e==`object`?Bt.test(e)?hn:xn:ln}function bn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>yn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function xn(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=yn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Sn(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 Cn=(e,t)=>{let n=on.createTransformer(t),r=Qt(e),i=Qt(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?gn.has(e)&&!i.values.length||gn.has(t)&&!r.values.length?_n(e,t):Fe(bn(Sn(r,i),i.values),n):(`${e}${t}`,ln(e,t))},wn=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Tn(e,t){let n=wn.exec(e);if(!n)return;let r=wn.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>pt(un(a,o,e))+i}function En(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return un(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Tn(e,t);if(n)return n}return yn(e)(e,t)}var Dn=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function On(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 kn=40;function An(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=Dn.reduce((e,t)=>(e[t]=On(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ke.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,kn),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:Dn.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<Dn.length;t++)o[Dn[t]].cancel(e)},state:n,steps:o}}var{schedule:P,cancel:jn,steps:Mn}=An(typeof requestAnimationFrame<`u`?requestAnimationFrame:Pe,!0,lt),Nn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>P.update(t,e),stop:()=>jn(t),now:()=>lt.isProcessing?lt.timestamp:ft.now()}},Pn=(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)})`},Fn=2e4;function In(e,t=50,n=Fn,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 Ln(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(In(r),Fn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:ze(i)}}var Rn={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},zn=e=>e<0?1/Math.max(1+e,Rn.minDamping):Math.max(1-e,Rn.minDamping);function Bn(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 Un(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Vn(e,t){return e*Math.sqrt(1-t*t)}var Hn=12;function Un(e,t,n){let r=n;for(let n=1;n<Hn;n++)r-=e(r)/t(r);return r}var Wn=.001;function Gn({duration:e=Rn.duration,bounce:t=Rn.bounce}){let n,r;Rn.maxDuration;let i=zn(t);e=Oe(Rn.minDuration,Rn.maxDuration,ze(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Vn(t,i),o=Math.exp(-r);return Wn-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Vn(t*t,i);return(-n(t)+Wn>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=Un(n,r,a),s=o*Bn(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:Re(e)}}var Kn=(e,t)=>(t?e>=0:e>0)&&e<1/0;function qn(e,t){if(Kn(e,t))return e}function Jn(e){let t=qn(e.stiffness),n=qn(e.damping,!0),r=qn(e.mass),i={...e,stiffness:t??Rn.stiffness,damping:n??Rn.damping,mass:r??Rn.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=zn(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Bn(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Gn(i)),i.isResolvedFromDuration=!0;(!Kn(i.stiffness)||!Kn(i.damping,!0))&&(i.stiffness=Rn.stiffness,i.damping=Rn.damping)}return i}function Yn(e=Rn.visualDuration,t=Rn.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}=Jn({...n}),f=e=>d?0:-ze(e),p=s/(2*Math.sqrt(o*c)),m=ze(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?Rn.restSpeed.granular:Rn.restSpeed.default),g.restDelta=n.restDelta||(e?Rn.restDelta.granular:Rn.restDelta.default)};_();let v,y,b;if(p<1){let e=Vn(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=>Re(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=Re(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(In(S),Fn),t=Pn(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}Yn.applyToOptions=e=>{let t=Ln(e,100,Yn);return e.ease=t.ease,e.duration=Re(t.duration),e.type=`keyframes`,e};function Xn({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=Yn({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 Zn(e,t,n){let r=[],i=n||ke.mix||En,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Fe(Array.isArray(t)?t[n]||Pe:t,a)),r.push(a)}return r}function Qn(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=Zn(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=Ie(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Oe(e[0],e[a-1],t)):l}function $n(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Ie(0,t,r);e.push(un(n,1,i))}}function er(e){let t=[0];return $n(t,e.length-1),t}function tr(e,t){return e.map(e=>e*t)}function nr(e,t){return e.map(()=>t||rt).splice(0,e.length-1)}function rr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=it(r)?r.map(ct):ct(r)||rt,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:(ke.mix||En)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?Oe(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Qn(tr(n&&n.length===t.length?n:er(t),e),t,{ease:Array.isArray(i)?i:nr(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var ir=5;function ar(e,t,n){let r=Math.max(t-ir,0);return Be(n-e(r),t-r)}function or(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):ar(t=>e.next(t).value,t,e.next(t).value)}var sr=e=>e!==null;function cr(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var lr={decay:Xn,inertia:Xn,tween:rr,keyframes:rr,spring:Yn};function ur(e){typeof e.type==`string`&&(e.type=lr[e.type])}function dr(e,t){return{kind:e,animation:t,timestamp:ft.now(),frameTimestamp:lt.timestamp,frameIsProcessing:lt.isProcessing}}function fr(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...dr(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function pr(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...dr(`layout-animation-start`,e),node:t})}catch{}}var mr=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)}},hr=e=>e/100,gr=class extends mr{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(),fr(this,this.options)}initAnimation(){let{options:e}=this;ur(e);let{type:t=rr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||rr;s!==rr&&typeof o[0]!=`number`&&(this.mixKeyframes=Fe(hr,En(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=In(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=Oe(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!==Xn&&(b.value=cr(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 ze(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ze(e)}get time(){return ze(this.currentTime)}set time(e){e=Re(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 or(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=ze(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Nn,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)}},_r=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function vr(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ct)||[];if(!r)return e;let i=n.replace(r,``),a=+!!_r.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var yr=/\b([a-z-]*)\(.*?\)/gu,br={...on,getAnimatableNone:e=>{let t=e.match(yr);return t?t.map(vr).join(` `):e}},xr={...on,getAnimatableNone:e=>{let t=on.parse(e);return on.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Sr={...bt,transform:Math.round},Cr={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,inset:N,insetBlock:N,insetBlockStart:N,insetBlockEnd:N,insetInline:N,insetInlineStart:N,insetInlineEnd:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,paddingBlock:N,paddingBlockStart:N,paddingBlockEnd:N,paddingInline:N,paddingInlineStart:N,paddingInlineEnd:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,marginBlock:N,marginBlockStart:N,marginBlockEnd:N,marginInline:N,marginInlineStart:N,marginInlineEnd:N,fontSize:N,backgroundPositionX:N,backgroundPositionY:N,rotate:Pt,pathRotation:Pt,rotateX:Pt,rotateY:Pt,rotateZ:Pt,scale:St,scaleX:St,scaleY:St,scaleZ:St,skew:Pt,skewX:Pt,skewY:Pt,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:xt,originX:Rt,originY:Rt,originZ:N,zIndex:Sr,fillOpacity:xt,strokeOpacity:xt,numOctaves:Sr},wr={...Cr,color:Bt,backgroundColor:Bt,outlineColor:Bt,fill:Bt,stroke:Bt,borderColor:Bt,borderTopColor:Bt,borderRightColor:Bt,borderBottomColor:Bt,borderLeftColor:Bt,filter:br,WebkitFilter:br,mask:xr,WebkitMask:xr},Tr=e=>wr[e],Er=new Set([br,xr]);function Dr(e,t){let n=Tr(e);return Er.has(n)||(n=on),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Or(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var kr=e=>e*180/Math.PI,Ar=e=>Mr(kr(Math.atan2(e[1],e[0]))),jr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ar,rotateZ:Ar,skewX:e=>kr(Math.atan(e[1])),skewY:e=>kr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Mr=e=>(e%=360,e<0&&(e+=360),e),Nr=Ar,Pr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ir={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pr,scaleY:Fr,scale:e=>(Pr(e)+Fr(e))/2,rotateX:e=>Mr(kr(Math.atan2(e[6],e[5]))),rotateY:e=>Mr(kr(Math.atan2(-e[2],e[0]))),rotateZ:Nr,rotate:Nr,skewX:e=>kr(Math.atan(e[4])),skewY:e=>kr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Lr(e){return+!!e.includes(`scale`)}function Rr(e,t){if(!e||e===`none`)return Lr(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Ir,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jr,i=t}if(!i)return Lr(t);let a=r[t],o=i[1].split(`,`).map(Br);return typeof a==`function`?a(o):o[a]}var zr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Rr(n,t)};function Br(e){return parseFloat(e.trim())}var Vr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Hr=new Set([...Vr,`pathRotation`]),Ur=e=>e===bt||e===N,Wr=new Set([`x`,`y`,`z`]),Gr=Vr.filter(e=>!Wr.has(e));function Kr(e){let t=[];return Gr.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 qr=new Set([`bottom`,`right`]);function Jr(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 Yr={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Jr(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Jr(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})=>Rr(e,`x`),y:({transform:e})=>Rr(e,`y`)};Yr.translateX=Yr.x,Yr.translateY=Yr.y;var Xr=new Set,Zr=!1,Qr=!1,$r=!1;function ei(){if(Qr){let e=[],t=new Set,n=new Set;Xr.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),qr.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Kr(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)})}Qr=!1,Zr=!1,Xr.forEach(e=>e.complete($r)),Xr.clear()}function ti(){Xr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qr=!0)})}function ni(){$r=!0,ti(),ei(),$r=!1}function ri(e,t,n){if(typeof e==`string`){if(Ae(e)||Me(e))return parseFloat(e);if(!on.test(e)&&on.test(n))return Dr(t,n)}return e??void 0}var ii=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?(Xr.add(this),Zr||(Zr=!0,P.read(ti),P.resolveKeyframes(ei))):(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=ri(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])}Or(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xr.delete(this)}cancel(){this.state===`scheduled`&&(Xr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},ai=e=>e.startsWith(`--`);function oi(e,t,n){ai(t)?e.style.setProperty(t,n):e.style[t]=n}var si={};function ci(e,t){let n=Ne(e);return()=>si[t]??n()}var li=ci(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ui=ci(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),di=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,fi={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function pi(e,t){if(e)return typeof e==`function`?ui()?Pn(e,t):`ease-out`:at(e)?di(e):Array.isArray(e)?e.map(e=>pi(e,t)||fi.easeOut):fi[e]}function mi(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=pi(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 hi(e){return typeof e==`function`&&`applyToOptions`in e}function gi({type:e,...t}){return hi(e)&&ui()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var _i=class extends mr{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=gi(e);this.animation=mi(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cr(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),oi(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},fr(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 ze(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ze(e)}get time(){return ze(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Re(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&&li()?(this.animation.timeline=e,t?.(this.animation),Pe):n(this)}},vi={anticipate:Ze,backInOut:Xe,circInOut:et};function yi(e){return e in vi}function bi(e){typeof e.ease==`string`&&yi(e.ease)&&(e.ease=vi[e.ease])}var xi=10,Si=class extends _i{constructor(e){bi(e),ur(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 gr({...a,autoplay:!1}),s=Math.max(xi,ft.now()-this.startTime),c=Oe(0,xi,s-xi),l=o.sample(s).value,{name:u}=this.options;i&&u&&oi(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Ci=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(on.test(e)||e===`0`)&&!e.startsWith(`url(`));function wi(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 Ti(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=Ci(i,t),s=Ci(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):wi(e)||(n===`spring`||hi(n))&&r}function Ei(e){e.duration=0,e.type=`keyframes`}var Di=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Oi=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ki(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Oi.test(e[t]))return!0;return!1}var Ai=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ji=Ne(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Mi(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Di.has(n)||Ai.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 ji()&&(Di.has(n)||Ai.has(n)&&ki(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Ni=40,Pi=class extends mr{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||ii;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;Ti(e,i,a,o)||(u=!1,(ke.instantAnimations||!s)&&l?.(cr(e,n,t)),e[0]=e[e.length-1],Ei(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>Ni?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&&Mi(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new Si(n)}catch{m=new gr(n)}}else m=new gr(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(),ni()),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()}};function Fi(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 Ii=30,Li=e=>!isNaN(parseFloat(e)),Ri={current:void 0},zi=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=Li(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 Le)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new Le,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(){P.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 Ri.current&&Ri.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ft.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ii)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ii);return Be(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 Bi(e,t){return new zi(e,t)}function Vi(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Hi(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Vi(n,e)}var Ui={type:`spring`,stiffness:500,damping:25,restSpeed:10},Wi=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gi={type:`keyframes`,duration:.8},Ki={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},qi=(e,{keyframes:t})=>t.length>2?Gi:Hr.has(e)?e.startsWith(`scale`)?Wi(t[1]):Ui:Ki,Ji=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Yi(e){for(let t in e)if(!Ji.has(t))return!0;return!1}var Xi=(e,t,n,r={},i,a)=>o=>{let s=Hi(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Re(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};Yi(s)||Object.assign(u,qi(e,u)),u.duration&&=Re(u.duration),u.repeatDelay&&=Re(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ei(u),u.delay===0&&(d=!0)),(ke.instantAnimations||ke.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Ei(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=cr(u.keyframes,s);if(e!==void 0){P.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new gr(u):new Pi(u)},Zi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qi(e){let t=Zi.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function $i(e,t,n=1){`${e}`;let[r,i]=Qi(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Ae(e)?parseFloat(e):e}return _t(i)?$i(i,t,n+1):i}function ea(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ta(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...ea(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function na(e,t,n){return ta(e.getProps(),t,n,e)}var ra=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,ia=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Vr]),aa=e=>Array.isArray(e);function oa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bi(n))}function sa(e){return aa(e)?e[e.length-1]||0:e}function F(e,t){let{transitionEnd:n={},transition:r={},...i}=na(e,t)||{};i={...i,...n};for(let t in i)oa(e,t,sa(i[t]))}var ca=e=>!!(e&&e.getVelocity);function la(e){return!!(ca(e)&&e.add)}function ua(e,t){let n=e.getValue(`willChange`);if(la(n))return n.add(t);if(!n&&ke.WillChange){let n=new ke.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function da(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var fa=`data-`+da(`framerAppearId`);function pa(e){return e.props[fa]}var ma=typeof window<`u`;function ha({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function ga(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Vi(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&&ha(f,t))continue;let o={delay:n,...Hi(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){P.update(()=>r.set(i));continue}let p=!1;if(ma&&window.MotionHandoffAnimation){let n=pa(e);if(n){let e=window.MotionHandoffAnimation(n,t,P);e!==null&&(o.startTime=e,p=!0)}}ua(e,t);let m=l??e.shouldReduceMotion;r.start(Xi(t,r,i,m&&ia.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>P.update(()=>{o&&F(e,o)});d.length?Promise.all(d).then(t):t()}return d}function _a(e,t,n={}){let r=na(e,t,ra(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?ga(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(_a(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Fi(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 va(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>_a(e,t,n))):typeof t==`string`?_a(e,t,n):Promise.all(ga(e,na(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var ya={test:e=>e===`auto`,parse:e=>e},ba=e=>t=>t.test(e),xa=[bt,N,Ft,Pt,Lt,It,ya],Sa=e=>xa.find(ba(e));function Ca(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||Me(e)}var wa=new Set([`auto`,`none`,`0`]);function Ta(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!wa.has(t)&&Zt(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Dr(n,i))}var Ea=class extends ii{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(),_t(r))){let i=$i(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ia.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Sa(r),o=Sa(i);if(yt(r)!==yt(i)&&Yr[n]){this.needsMeasurement=!0;return}if(a!==o){if(Ur(a)&&Ur(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Yr[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ca(e[t]))&&n.push(t);n.length&&Ta(e,n,t)}measure(){let{element:e,name:t}=this;return Yr[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()}},Da=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Oa(e){return je(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function ka(e){return je(e)&&`ownerSVGElement`in e}var Aa=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function ja(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 Ma={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Na=Vr.length;function Pa(e,t,n){let r=``,i=!0;for(let a=0;a<Na;a++){let o=Vr[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=Aa(s,Cr[o]);if(!c){i=!1;let t=Ma[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Aa(a,Cr.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Fa(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(Hr.has(e)){o=!0;continue}if(ht(e)){i[e]=n;continue}{let t=Aa(n,Cr[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Pa(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 Ia={offset:`stroke-dashoffset`,array:`stroke-dasharray`},La={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ra(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Ia:La;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var za=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ba(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Fa(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 za)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&&Ra(d,i,a,o,!1)}function Va({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ha({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ua(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 Wa(e){return e===void 0||e===1}function Ga({scale:e,scaleX:t,scaleY:n}){return!Wa(e)||!Wa(t)||!Wa(n)}function Ka(e){return Ga(e)||qa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qa(e){return Ja(e.x)||Ja(e.y)}function Ja(e){return e&&e!==`0%`}function Ya(e,t,n){return n+t*(e-n)}function Xa(e,t,n,r,i){return i!==void 0&&(e=Ya(e,i,r)),Ya(e,n,r)+t}function Za(e,t=0,n=1,r,i){e.min=Xa(e.min,t,n,r,i),e.max=Xa(e.max,t,n,r,i)}function Qa(e,{x:t,y:n}){Za(e.x,t.translate,t.scale,t.originPoint),Za(e.y,n.translate,n.scale,n.originPoint)}var $a=.999999999999,eo=1.0000000000001;function to(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&&(no(e.x,-a.scroll.offset.x),no(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Qa(e,o)),r&&Ka(a.latestValues)&&ao(e,a.latestValues,a.layout?.layoutBox))}t.x<eo&&t.x>$a&&(t.x=1),t.y<eo&&t.y>$a&&(t.y=1)}function no(e,t){e.min+=t,e.max+=t}function ro(e,t,n,r,i=.5){Za(e,t,n,un(e.min,e.max,i),r)}function io(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function ao(e,t,n){let r=n??e;ro(e.x,io(t.x,r.x),t.scaleX,t.scale,t.originX),ro(e.y,io(t.y,r.y),t.scaleY,t.scale,t.originY)}function oo(e,t){return Va(Ua(e.getBoundingClientRect(),t))}function so(e,t,n){let r=oo(e,n),{scroll:i}=t;return i&&(no(r.x,i.offset.x),no(r.y,i.offset.y)),r}var{schedule:co,cancel:lo}=An(queueMicrotask,!1),uo={x:!1,y:!1};function fo(){return uo.x||uo.y}function po(e){return e===`x`||e===`y`?uo[e]?null:(uo[e]=!0,()=>{uo[e]=!1}):uo.x||uo.y?null:(uo.x=uo.y=!0,()=>{uo.x=uo.y=!1})}function mo(e,t){let n=ja(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ho(e){return!(e.pointerType===`touch`||fo())}function go(e,t,n={}){let[r,i,a]=mo(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(!ho(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 _o=(e,t)=>t?e===t||_o(e,t.parentElement):!1,vo=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,yo=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function bo(e){return yo.has(e.tagName)||e.isContentEditable===!0}var xo=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function So(e){return xo.has(e.tagName)||e.isContentEditable===!0}var Co=new WeakSet;function wo(e){return t=>{t.key===`Enter`&&e(t)}}function To(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Eo=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=wo(()=>{if(Co.has(n))return;To(n,`down`);let e=wo(()=>{To(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>To(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Do(e){return vo(e)&&!fo()}var Oo=new WeakSet;function ko(e,t,n={}){let[r,i,a]=mo(e,n),o=e=>{let r=e.currentTarget;if(!Do(e)||Oo.has(e))return;Co.add(r),n.stopPropagation&&Oo.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Co.has(r)&&Co.delete(r),Do(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||_o(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),Oa(e)&&(e.addEventListener(`focus`,e=>Eo(e,i)),!bo(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var Ao=new WeakMap,jo,Mo=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:ka(r)&&`getBBox`in r?r.getBBox()[t]:r[n],No=Mo(`inline`,`width`,`offsetWidth`),Po=Mo(`block`,`height`,`offsetHeight`);function Fo({target:e,borderBoxSize:t}){Ao.get(e)?.forEach(n=>{n(e,{get width(){return No(e,t)},get height(){return Po(e,t)}})})}function Io(e){e.forEach(Fo)}function Lo(){typeof ResizeObserver<`u`&&(jo=new ResizeObserver(Io))}function Ro(e,t){jo||Lo();let n=ja(e);return n.forEach(e=>{let n=Ao.get(e);n||(n=new Set,Ao.set(e,n)),n.add(t),jo?.observe(e)}),()=>{n.forEach(e=>{let n=Ao.get(e);n?.delete(t),n?.size||jo?.unobserve(e)})}}var zo=new Set,Bo;function Vo(){Bo=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};zo.forEach(t=>t(e))},window.addEventListener(`resize`,Bo)}function Ho(e){return zo.add(e),Bo||Vo(),()=>{zo.delete(e),!zo.size&&typeof Bo==`function`&&(window.removeEventListener(`resize`,Bo),Bo=void 0)}}function Uo(e,t){return typeof e==`function`?Ho(e):Ro(e,t)}var Wo={value:null,addProjectionMetrics:null};function Go(e){return ka(e)&&e.tagName===`svg`}var I=e=>typeof e==`number`?e:parseFloat(e),Ko=()=>({translate:0,scale:1,origin:0,originPoint:0}),qo=()=>({x:Ko(),y:Ko()}),Jo=()=>({min:0,max:0}),Yo=()=>({x:Jo(),y:Jo()}),Xo=new WeakMap;function Zo(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Qo(e){return typeof e==`string`||Array.isArray(e)}var $o=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],es=[`initial`,...$o];function ts(e){if(Zo(e.animate))return!0;for(let t=0;t<es.length;t++)if(Qo(e[es[t]]))return!0;return!1}function ns(e){return!!(ts(e)||e.variants)}function rs(e,t,n){for(let r in t){let i=t[r],a=n[r];if(ca(i))e.addValue(r,i);else if(ca(a))e.addValue(r,Bi(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,Bi(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var is={current:null},as={current:!1},os=typeof window<`u`;function ss(){if(as.current=!0,os){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>is.current=e.matches;e.addEventListener(`change`,t),t()}else is.current=!1}}var cs=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ls={};function us(e){ls=e}function ds(){return ls}var fs=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=ii,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,P.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=ts(t),this.isVariantNode=ns(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&&ca(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,Xo.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:(as.current||ss(),this.shouldReduceMotion=is.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(),jn(this.notifyUpdate),jn(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&&Di.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new _i({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Re(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Hr.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&P.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 ls){let t=ls[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):Yo()}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<cs.length;t++){let n=cs[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=rs(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=Bi(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`&&(Ae(n)||Me(n))?n=parseFloat(n):typeof n!=`number`&&!on.test(n)&&on.test(t)&&(n=Dr(e,t)),this.setBaseTarget(e,ca(n)?n.get():n)),ca(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new Le),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){co.render(this.render)}},ps=class extends fs{constructor(){super(...arguments),this.KeyframeResolver=Ea}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;ca(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},ms=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function hs(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 gs={};function _s(e,{layout:t,layoutId:n}){return Hr.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!gs[e]||e===`opacity`)}function vs(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(ca(r[t])||i&&ca(i[t])||_s(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function ys(e){return window.getComputedStyle(e)}var bs=class extends ps{constructor(){super(...arguments),this.type=`html`,this.renderInstance=hs}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Hr.has(t))return this.projection?.isProjecting?Lr(t):zr(e,t);{let n=ys(e),r=(ht(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return oo(e,t)}build(e,t,n){Fa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return vs(e,t,n)}},xs=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`]),Ss=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Cs(e,t,n,r){hs(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(xs.has(n)?n:da(n),t.attrs[n])}function ws(e,t,n){let r=vs(e,t,n);for(let n in e)if(ca(e[n])||ca(t[n])){let t=Vr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ts=class extends ps{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Yo}getBaseTargetFromProps(e,t){return Hr.has(t)?super.getBaseTargetFromProps(e,t)??Lr(t):e[t]}getDefaultValue(e){return Hr.has(e)?this.latestValues[e]??Lr(e):void 0}readValueFromInstance(e,t){if(Hr.has(t)){let e=Tr(t);return e&&e.default||0}if(za.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=xs.has(t)?t:da(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ws(e,t,n)}build(e,t,n){Ba(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Cs(e,t,n,r)}mount(e){this.isSVGTag=Ss(e.tagName),super.mount(e)}};function Es(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 Ds=[...$o].reverse();function Os(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>va(e,t,n))),n=As(),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(Ds.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?Qo(g)||g===!1?g:void 0:h,v=Qo(_),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||Zo(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=ks(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}=na(e,n,ra(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)?!Es(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=na(s,n)?.transition?.delayChildren;r.delay=Fi(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&na(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&&!ca(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=As(),i=!0}}}function ks(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Es(t,e):!1}function As(){let e={};for(let t of $o)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function js(e,t){e.min=t.min,e.max=t.max}function Ms(e,t){js(e.x,t.x),js(e.y,t.y)}function Ns(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ps=.9999,Fs=1.0001,Is=-.01,Ls=.01;function Rs(e){return e.max-e.min}function zs(e,t,n){return Math.abs(e-t)<=n}function Bs(e,t,n,r=.5){e.origin=r,e.originPoint=un(t.min,t.max,e.origin),e.scale=Rs(n)/Rs(t),e.translate=un(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ps&&e.scale<=Fs||isNaN(e.scale))&&(e.scale=1),(e.translate>=Is&&e.translate<=Ls||isNaN(e.translate))&&(e.translate=0)}function Vs(e,t,n,r){Bs(e.x,t.x,n.x,r?r.originX:void 0),Bs(e.y,t.y,n.y,r?r.originY:void 0)}function Hs(e,t,n,r=0){e.min=(r?un(n.min,n.max,r):n.min)+t.min,e.max=e.min+Rs(t)}function Us(e,t,n,r){Hs(e.x,t.x,n.x,r?.x),Hs(e.y,t.y,n.y,r?.y)}function Ws(e,t,n,r=0){let i=r?un(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Rs(t)}function Gs(e,t,n,r){Ws(e.x,t.x,n.x,r?.x),Ws(e.y,t.y,n.y,r?.y)}function Ks(e,t,n,r,i){return e-=t,e=Ya(e,1/n,r),i!==void 0&&(e=Ya(e,1/i,r)),e}function qs(e,t=0,n=1,r=.5,i,a=e,o=e){if(Ft.test(t)&&(t=parseFloat(t),t=un(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=un(a.min,a.max,r);e===a&&(s-=t),e.min=Ks(e.min,t,n,s,i),e.max=Ks(e.max,t,n,s,i)}function Js(e,t,[n,r,i],a,o){qs(e,t[n],t[r],t[i],t.scale,a,o)}var Ys=[`x`,`scaleX`,`originX`],Xs=[`y`,`scaleY`,`originY`];function Zs(e,t,n,r){Js(e.x,t,Ys,n?n.x:void 0,r?r.x:void 0),Js(e.y,t,Xs,n?n.y:void 0,r?r.y:void 0)}function Qs(e){return e.translate===0&&e.scale===1}function $s(e){return Qs(e.x)&&Qs(e.y)}function ec(e,t){return e.min===t.min&&e.max===t.max}function tc(e,t){return ec(e.x,t.x)&&ec(e.y,t.y)}function nc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rc(e,t){return nc(e.x,t.x)&&nc(e.y,t.y)}function ic(e){return Rs(e.x)/Rs(e.y)}function ac(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function oc(e){return[e(`x`),e(`y`)]}function sc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cc={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(N.test(e))e=parseFloat(e);else return e}return`${sc(e,t.target.x)}% ${sc(e,t.target.y)}%`}},lc={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=on.parse(e);if(i.length>5)return r;let a=on.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=un(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 uc(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 dc=Da.length,fc=e=>typeof e==`number`||N.test(e);function pc(e,t,n,r,i,a){i?(e.opacity=un(0,n.opacity??1,hc(r)),e.opacityExit=un(t.opacity??1,0,gc(r))):a&&(e.opacity=un(t.opacity??1,n.opacity??1,r));for(let i=0;i<dc;i++){let a=Da[i],o=mc(t,a),s=mc(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||fc(o)===fc(s)?(e[a]=Math.max(un(I(o),I(s),r),0),(Ft.test(s)||Ft.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=un(t.rotate||0,n.rotate||0,r))}function mc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var hc=_c(0,.5,$e),gc=_c(.5,.95,Pe);function _c(e,t,n){return r=>r<e?0:r>t?1:n(Ie(e,t,r))}function vc(e,t,n){let r=ca(e)?e:Bi(e);return r.start(Xi(``,r,t,n)),r.animation}function yc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var bc=(e,t)=>e.depth-t.depth,xc=class{constructor(){this.children=[],this.isDirty=!1}add(e){Ee(this.children,e),this.isDirty=!0}remove(e){De(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bc),this.isDirty=!1,this.children.forEach(e)}};function Sc(e,t){let n=ft.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(jn(r),e(a-t))};return P.setup(r,!0),()=>jn(r)}function Cc(e){return ca(e)?e.get():e}var wc=class{constructor(){this.members=[]}add(e){Ee(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&&(De(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(De(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)}},Tc={borderRadius:{...cc,applyTo:[...Da]},borderTopLeftRadius:cc,borderTopRightRadius:cc,borderBottomLeftRadius:cc,borderBottomRightRadius:cc,boxShadow:lc},Ec={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(gs,{...Tc,...gs});var Dc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Oc=[``,`X`,`Y`,`Z`],kc=1e3,Ac=0;function jc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Mc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=pa(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,P,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Mc(r)}function Nc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ac++,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,Wo.value&&(Dc.nodes=Dc.calculatedTargetDeltas=Dc.calculatedProjections=0),this.nodes.forEach(Ic),this.nodes.forEach(Kc),this.nodes.forEach(qc),this.nodes.forEach(Lc),Wo.addProjectionMetrics&&Wo.addProjectionMetrics(Dc)},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 xc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Le),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=ka(t)&&!Go(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;P.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Sc(i,250),Ec.hasAnimatedSinceResize&&(Ec.hasAnimatedSinceResize=!1,this.nodes.forEach(Gc)))})}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()||el,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!rc(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={...Hi(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||Gc(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(),jn(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(Jc),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&&Mc(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(Bc),this.nodes.forEach(zc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hc),this.nodes.forEach(Uc),this.nodes.forEach(Wc),this.nodes.forEach(Pc),this.nodes.forEach(Fc)):this.nodes.forEach(Vc),this.clearAllSnapshots();let e=ft.now();lt.delta=Oe(0,1e3/60,e-lt.timestamp),lt.timestamp=e,lt.isProcessing=!0,Mn.update.process(lt),Mn.preRender.process(lt),Mn.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,co.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rc),this.sharedNodes.forEach(Yc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Rs(this.snapshot.measuredBox.x)&&!Rs(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||=Yo(),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&&!$s(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ka(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)),il(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Yo();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ol))){let{scroll:e}=this.root;e&&(no(t.x,e.offset.x),no(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Yo();if(Ms(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&&Ms(t,e),no(t.x,i.offset.x),no(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Yo();Ms(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&&(no(r.x,-n.scroll.offset.x),no(r.y,-n.scroll.offset.y)),Ka(n.latestValues)&&ao(r,n.latestValues,n.layout?.layoutBox)}return Ka(this.latestValues)&&ao(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Yo();Ms(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Ka(n.latestValues))continue;let r;n.instance&&(Ga(n.latestValues)&&n.updateSnapshot(),r=Yo(),Ms(r,n.measurePageBox())),Zs(t,n.latestValues,n.snapshot?.layoutBox,r)}return Ka(this.latestValues)&&Zs(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!==lt.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=lt.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=Yo(),this.targetWithTransforms=Yo()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Us(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ms(this.target,this.layout.layoutBox),Qa(this.target,this.targetDelta)):Ms(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),Wo.value&&Dc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ga(this.parent.latestValues)||qa(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=Yo(),this.relativeTargetOrigin=Yo(),Gs(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ms(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===lt.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;Ms(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;to(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=Yo());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ns(this.prevProjectionDelta.x,this.projectionDelta.x),Ns(this.prevProjectionDelta.y,this.projectionDelta.y)),Vs(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!ac(this.projectionDelta.x,this.prevProjectionDelta.x)||!ac(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Wo.value&&Dc.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=qo(),this.projectionDelta=qo(),this.projectionDeltaWithTransform=qo()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=qo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Yo(),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($c));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=un(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=un(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Xc(o.x,e.x,n),Xc(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gs(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Qc(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&tc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Yo(),Ms(f,this.relativeTarget)),c&&(this.animationValues=a,pc(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&&=(jn(this.pendingAnimation),void 0),this.pendingAnimation=P.update(()=>{Ec.hasAnimatedSinceResize=!0,this.motionValue||=Bi(0),this.motionValue.jump(0,!1),this.currentAnimation=vc(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()}}),pr(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(kc),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&&al(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||Yo();let t=Rs(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Rs(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Ms(t,i),ao(t,r),Vs(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new wc),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&&jc(`z`,e,r,this.animationValues);for(let t=0;t<Oc.length;t++)jc(`rotate${Oc[t]}`,e,r,this.animationValues),jc(`skew${Oc[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=Cc(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=Cc(t?.pointerEvents)||``),this.hasProjected&&!Ka(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=uc(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 gs){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=gs[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?Cc(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(zc),this.root.sharedNodes.clear()}}}function Pc(e){e.updateLayout()}function Fc(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`)oc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Rs(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;js(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else al(i,t.layoutBox,n)&&oc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Rs(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=qo();Vs(o,n,t.layoutBox);let s=qo();a?Vs(s,e.applyTransform(r,!0),t.measuredBox):Vs(s,n,t.layoutBox);let c=!$s(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=Yo();Gs(s,t.layoutBox,i.layoutBox,o);let c=Yo();Gs(c,n,a.layoutBox,o),rc(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 Ic(e){Wo.value&&Dc.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 Lc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Rc(e){e.clearSnapshot()}function zc(e){e.clearMeasurements()}function Bc(e){e.isLayoutDirty=!0,e.updateLayout()}function Vc(e){e.isLayoutDirty=!1}function Hc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Uc(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Wc(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Gc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kc(e){e.resolveTargetDelta()}function qc(e){e.calcProjection()}function Jc(e){e.resetSkewAndRotation()}function Yc(e){e.removeLeadSnapshot()}function Xc(e,t,n){e.translate=un(t.translate,0,n),e.scale=un(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zc(e,t,n,r){e.min=un(t.min,n.min,r),e.max=un(t.max,n.max,r)}function Qc(e,t,n,r){Zc(e.x,t.x,n.x,r),Zc(e.y,t.y,n.y,r)}function $c(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var el={duration:.45,ease:[.4,0,.1,1]},tl=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nl=tl(`applewebkit/`)&&!tl(`chrome/`)?Math.round:Pe;function rl(e){e.min=nl(e.min),e.max=nl(e.max)}function il(e){rl(e.x),rl(e.y)}function al(e,t,n){return e===`position`||e===`preserve-aspect`&&!zs(ic(t),ic(n),.2)}function ol(e){return e!==e.root&&e.scroll?.wasRoot}var sl=Nc({attachResizeListener:(e,t)=>yc(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),cl={current:void 0},ll=Nc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!cl.current){let e=new sl({});e.mount(window),e.setOptions({layoutScroll:!0}),cl.current=e}return cl.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),ul=(0,m.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function dl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function fl(...e){return t=>{let n=!1,r=e.map(e=>{let r=dl(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():dl(e[t],null)}}}}function pl(...e){return m.useCallback(fl(...e),e)}var L=xe(),ml=class extends m.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Oa(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Oa(e)&&e.offsetWidth||0,r=Oa(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 hl({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)(ul),u=pl(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,L.jsx)(ml,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:m.cloneElement(e,{ref:u})})}var gl=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Ce(_l),d=(0,m.useId)(),f=(0,m.useRef)(n),p=(0,m.useRef)(r);we(()=>{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,L.jsx)(hl,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,L.jsx)(Te.Provider,{value:g,children:e})};function _l(){return new Map}function vl(e=!0){let t=(0,m.useContext)(Te);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 yl=e=>e.key||``;function bl(e){let t=[];return m.Children.forEach(e,e=>{(0,m.isValidElement)(e)&&t.push(e)}),t}var xl=({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]=vl(o),f=(0,m.useMemo)(()=>bl(e),[e]),p=o&&!u?[]:f.map(yl),h=(0,m.useRef)(!0),g=Ce(()=>new Map),_=(0,m.useRef)(new Set),[v,y]=(0,m.useState)(f),[b,x]=(0,m.useState)(f);we(()=>{o&&!u&&!b.length&&d?.()},[u,o,b.length,d]),we(()=>{h.current=!1;for(let e=0;e<b.length;e++){let t=yl(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(yl(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>g.get(yl(e)))?e=f:a===`wait`&&(e=S),x(bl(e)),y(f),null}let{forceRender:C}=(0,m.useContext)(Se);return(0,L.jsx)(L.Fragment,{children:b.map(e=>{let m=yl(e),v=o&&!u?!1:f===b||p.includes(m);return(0,L.jsx)(gl,{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)})})},Sl=(0,m.createContext)({strict:!1}),Cl={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`]},wl=!1;function Tl(){if(wl)return;let e={};for(let t in Cl)e[t]={isEnabled:e=>Cl[t].some(t=>!!e[t])};us(e),wl=!0}function El(){return Tl(),ds()}function Dl(e){let t=El();for(let n in e)t[n]={...t[n],...e[n]};us(t)}function Ol({children:e,...t}){let n=(0,m.useContext)(ul);t={...n,...t},t.transition=Vi(t.transition,n.transition),t.isStatic=Ce(()=>t.isStatic);let r=(0,m.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,L.jsx)(ul.Provider,{value:r,children:e})}var kl=(0,m.createContext)({});function Al(e,t){if(ts(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Qo(t)?t:void 0,animate:Qo(n)?n:void 0}}return e.inherit===!1?{}:t}function jl(e){let{initial:t,animate:n}=Al(e,(0,m.useContext)(kl));return(0,m.useMemo)(()=>({initial:t,animate:n}),[Ml(t),Ml(n)])}function Ml(e){return Array.isArray(e)?e.join(` `):e}var Nl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pl(e,t,n){for(let r in t)!ca(t[r])&&!_s(r,n)&&(e[r]=t[r])}function Fl({transformTemplate:e},t){return(0,m.useMemo)(()=>{let n=Nl();return Fa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Il(e,t){let n=e.style||{},r={};return Pl(r,n,e),Object.assign(r,Fl(e,t)),r}function Ll(e,t){let n={},r=Il(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 Rl=()=>({...Nl(),attrs:{}});function zl(e,t,n,r){let i=(0,m.useMemo)(()=>{let n=Rl();return Ba(n,t,Ss(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Pl(t,e.style,e),i.style={...t,...i.style}}return i}var Bl=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 Vl(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Bl.has(e)}function Hl(e,t){return e.startsWith(`on`)?!Vl(e):t?.(e)??!Vl(e)}function Ul(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(ca(e[a])||(Hl(a,r)||n===!0&&Vl(a)||!t&&!Vl(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Wl=[`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 Gl(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Wl.indexOf(e)>-1||/[A-Z]/u.test(e))}function Kl(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Gl(e)?zl:Ll)(t,r,i,e),l=Ul(t,typeof e==`string`,a,s),u=e===m.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,m.useMemo)(()=>ca(d)?d.get():d,[d]);return(0,m.createElement)(e,{...u,children:f})}function ql({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Jl(n,r,i,e),renderState:t()}}function Jl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Cc(a[e]);let{initial:o,animate:s}=e,c=ts(e),l=ns(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`&&!Zo(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ta(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 Yl=e=>(t,n)=>{let r=(0,m.useContext)(kl),i=(0,m.useContext)(Te),a=()=>ql(e,t,r,i);return n?a():Ce(a)},Xl=Yl({scrapeMotionValuesFromProps:vs,createRenderState:Nl}),Zl=Yl({scrapeMotionValuesFromProps:ws,createRenderState:Rl}),Ql=Symbol.for(`motionComponentSymbol`);function $l(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 eu=(0,m.createContext)({});function tu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function nu(e,t,n,r,i,a){let{visualElement:o}=(0,m.useContext)(kl),s=(0,m.useContext)(Sl),c=(0,m.useContext)(Te),l=(0,m.useContext)(ul),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)(eu);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&ru(f.current,n,i,g);let _=(0,m.useRef)(!1);(0,m.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[fa],y=(0,m.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return we(()=>{p.current&&h&&(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),we(()=>{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 ru(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:iu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&tu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function iu(e){if(e)return e.options.allowProjection===!1?iu(e.parent):e.projection}function au(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Dl(r);let a=n?n===`svg`:Gl(e),o=a?Zl:Xl;function s(n,s){let c,l={...(0,m.useContext)(ul),...n,layoutId:ou(n)},{isStatic:u,isValidProp:d}=l,f=jl(n),p=o(n,u);if(!u&&typeof window<`u`){su(l,r);let t=cu(l);c=t.MeasureLayout,f.visualElement=nu(e,p,l,i,t.ProjectionNode,a)}return(0,L.jsxs)(kl.Provider,{value:f,children:[c&&f.visualElement?(0,L.jsx)(c,{visualElement:f.visualElement,...l}):null,Kl(e,n,$l(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[Ql]=e,c}function ou({layoutId:e}){let t=(0,m.useContext)(Se).id;return t&&e!==void 0?t+`-`+e:e}function su(e,t){(0,m.useContext)(Sl).strict}function cu(e){let{drag:t,layout:n}=El();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function lu(e,t){if(typeof Proxy>`u`)return au;let n=new Map,r=(n,r)=>au(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,au(a,void 0,e,t)),n.get(a))})}var uu=(e,t)=>t.isSVG??Gl(e)?new Ts(t):new bs(t,{allowProjection:e!==m.Fragment}),du=class extends ms{constructor(e){super(e),e.animationState||=Os(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Zo(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?.()}},fu=0,pu={animation:{Feature:du},exit:{Feature:class extends ms{constructor(){super(...arguments),this.id=fu++}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}=na(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 mu(e){return{point:{x:e.pageX,y:e.pageY}}}var hu=e=>t=>vo(t)&&e(t,mu(t));function gu(e,t,n,r){return yc(e,t,hu(n),r)}var _u=({current:e})=>e?e.ownerDocument.defaultView:null,vu=(e,t)=>Math.abs(e-t);function yu(e,t){let n=vu(e.x,t.x),r=vu(e.y,t.y);return Math.sqrt(n**2+r**2)}var bu=new Set([`auto`,`scroll`]),xu=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=Su(this.lastRawMoveEventInfo,this.transformPagePoint));let e=wu(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=yu(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=Su(t,this.transformPagePoint),this.hasPendingMove=!0,P.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=wu(e.type===`pointercancel`?this.lastMoveEventInfo:Su(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!vo(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Su(mu(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=lt;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,wu(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=Fe(gu(this.contextWindow,`pointermove`,this.handlePointerMove,d),gu(this.contextWindow,`pointerup`,this.handlePointerUp,d),gu(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(bu.has(e.overflowX)||bu.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),P.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jn(this.updatePoint)}};function Su(e,t){return t?{point:t(e.point)}:e}function Cu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wu({point:e},t){return{point:e,delta:Cu(e,Eu(t)),offset:Cu(e,Tu(t)),velocity:Du(t,.1)}}function Tu(e){return e[0]}function Eu(e){return e[e.length-1]}function Du(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Eu(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Re(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Re(t)*2&&(r=e[1]);let a=ze(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 Ou(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?un(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?un(n,e,r.max):Math.min(e,n)),e}function ku(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 Au(e,{top:t,left:n,bottom:r,right:i}){return{x:ku(e.x,n,i),y:ku(e.y,t,r)}}function ju(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 Mu(e,t){return{x:ju(e.x,t.x),y:ju(e.y,t.y)}}function Nu(e,t){let n=.5,r=Rs(e),i=Rs(t);return i>r?n=Ie(t.min,t.max-r,e.min):r>i&&(n=Ie(e.min,e.max-i,t.min)),Oe(0,1,n)}function Pu(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 Fu=.35;function Iu(e=Fu){return e===!1?e=0:e===!0&&(e=Fu),{x:Lu(e,`left`,`right`),y:Lu(e,`top`,`bottom`)}}function Lu(e,t,n){return{min:Ru(e,t),max:Ru(e,n)}}function Ru(e,t){return typeof e==`number`?e:e[t]||0}var zu=new WeakMap,Bu=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=Yo(),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=po(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),oc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Ft.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Rs(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&P.update(()=>i(e,t),!1,!0),ua(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=Wu(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&&P.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 xu(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:_u(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&&P.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||!Uu(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ou(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&&tu(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Au(n.layoutBox,e):!1,this.elastic=Iu(t),r!==this.constraints&&!tu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&oc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Pu(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!tu(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=so(n,r.root,this.visualElement.getTransformPagePoint()),a=Mu(r.layout.layoutBox,i);if(t){let e=t(Ha(a));this.hasMutatedConstraints=!!e,e&&(a=Va(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=oc(o=>{if(!Uu(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 ua(this.visualElement,e),n.start(Xi(e,n,0,t,this.visualElement,!1))}stopAnimation(){oc(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();oc(e=>{if(!Uu(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-un(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!tu(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};oc(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Nu({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(),oc(t=>{let n=this.getAxisMotionValue(t);if(!Uu(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(un(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;zu.set(this.visualElement,this);let e=this.visualElement.current,t=gu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&So(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();tu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Hu(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),P.read(r);let o=yc(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(oc(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=Fu,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Vu(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Hu(e,t,n){let r=Uo(e,Vu(n)),i=Uo(t,Vu(n));return()=>{r(),i()}}function Uu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Gu=class extends ms{constructor(e){super(e),this.removeGroupControls=Pe,this.removeListeners=Pe,this.controls=new Bu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pe}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()}},Ku=e=>(t,n)=>{e&&P.update(()=>e(t,n),!1,!0)},qu=class extends ms{constructor(){super(...arguments),this.removePointerDownListener=Pe}onPointerDown(e){this.session=new xu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_u(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ku(e),onStart:Ku(t),onMove:Ku(n),onEnd:(e,t)=>{delete this.session,r&&P.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=gu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Ju=!1,Yu=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),Ju&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ec.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}),Ju=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||P.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(),co.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ju=!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 Xu(e){let[t,n]=vl(),r=(0,m.useContext)(Se);return(0,L.jsx)(Yu,{...e,layoutGroup:r,switchLayoutGroup:(0,m.useContext)(eu),isPresent:t,safeToRemove:n})}var Zu={pan:{Feature:qu},drag:{Feature:Gu,ProjectionNode:ll,MeasureLayout:Xu}};function Qu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&P.postRender(()=>i(t,mu(t)))}var $u=class extends ms{mount(){let{current:e}=this.node;e&&(this.unmount=go(e,(e,t)=>(Qu(this.node,t,`Start`),e=>Qu(this.node,e,`End`))))}unmount(){}},ed=class extends ms{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=Fe(yc(this.node.current,`focus`,()=>this.onFocus()),yc(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function td(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&&P.postRender(()=>i(t,mu(t)))}var nd=class extends ms{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ko(e,(e,t)=>(td(this.node,t,`Start`),(e,{success:t})=>td(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},rd=new WeakMap,id=new WeakMap,ad=e=>{let t=rd.get(e.target);t&&t(e)},od=e=>{e.forEach(ad)};function sd({root:e,...t}){let n=e||document;id.has(n)||id.set(n,{});let r=id.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(od,{root:e,...t})),r[i]}function R(e,t,n){let r=sd(t);return rd.set(e,n),r.observe(e),()=>{rd.delete(e),r.unobserve(e)}}var z={some:0,all:1},cd=class extends ms{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:z[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=R(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(ld(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ld({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ud={inView:{Feature:cd},tap:{Feature:nd},focus:{Feature:ed},hover:{Feature:$u}},dd={layout:{ProjectionNode:ll,MeasureLayout:Xu}},fd=lu({...pu,...ud,...Zu,...dd},uu);function pd(){!as.current&&ss();let[e]=(0,m.useState)(is.current);return e}var B=fd,md=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,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){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&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=ee,D=function(){te.postMessage(null)}}else D=function(){_(ee,0)};function ne(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,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),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}}}})),hd=o(((e,t)=>{t.exports=md()})),gd=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`})),_d=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=gd()})),vd=o((e=>{var t=hd(),n=p(),r=_d();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`),ee=Symbol.for(`react.transitional.element`),D=Symbol.for(`react.portal`),O=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),ne=Symbol.for(`react.profiler`),re=Symbol.for(`react.consumer`),k=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),A=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.activity`),le=Symbol.for(`react.legacy_hidden`),ue=Symbol.for(`react.memo_cache_sentinel`),de=Symbol.for(`react.view_transition`),fe=Symbol.for(`react.recoverable`),pe=Symbol.iterator;function me(e){return typeof e!=`object`||!e?null:(e=pe&&e[pe]||e[`@@iterator`],typeof e==`function`?e:null)}var he=Symbol.for(`react.client.reference`);function ge(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case O:return`Fragment`;case ne:return`Profiler`;case te:return`StrictMode`;case ae:return`Suspense`;case A:return`SuspenseList`;case ce:return`Activity`;case de:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case D:return`Portal`;case k:return e.displayName||`Context`;case re:return(e._context.displayName||`Context`)+`.Consumer`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?ge(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var _e=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},ye=[],be=-1;function xe(e){return{current:e}}function Se(e){0>be||(e.current=ye[be],ye[be]=null,be--)}function Ce(e,t){be++,ye[be]=e.current,e.current=t}var we=xe(null),Te=xe(null),Ee=xe(null),De=xe(null);function Oe(e,t){switch(Ce(Ee,t),Ce(Te,e),Ce(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bp(t),e=xp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Se(we),Ce(we,e)}function ke(){Se(we),Se(Te),Se(Ee)}function Ae(e){var t=e.memoizedState;t!==null&&(_h._currentValue=t.memoizedState,Ce(De,e)),t=we.current;var n=xp(t,e.type);t!==n&&(Ce(Te,e),Ce(we,n))}function je(e){Te.current===e&&(Se(we),Se(Te)),De.current===e&&(Se(De),_h._currentValue=ve)}var Me,Ne;function Pe(e){if(Me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||``,Ne=-1<e.stack.indexOf(`
|
|
11
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
12
|
+
`+Me+e+Ne}var Fe=!1;function Ie(e,t){if(!e||Fe)return``;Fe=!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{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Pe(n):``}function Le(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe(`Lazy`);case 13:return e.child!==t&&t!==null?Pe(`Suspense Fallback`):Pe(`Suspense`);case 19:return Pe(`SuspenseList`);case 0:case 15:return Ie(e.type,!1);case 11:return Ie(e.type.render,!1);case 1:return Ie(e.type,!0);case 31:return Pe(`Activity`);case 30:return Pe(`ViewTransition`);default:return``}}function Re(e){try{var t=``,n=null;do t+=Le(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
16
|
+
Error generating stack: `+e.message+`
|
|
17
|
+
`+e.stack}}var ze=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,He=t.unstable_shouldYield,Ue=t.unstable_requestPaint,We=t.unstable_now,Ge=t.unstable_getCurrentPriorityLevel,Ke=t.unstable_ImmediatePriority,qe=t.unstable_UserBlockingPriority,Je=t.unstable_NormalPriority,Ye=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,Ze=t.log,Qe=t.unstable_setDisableYieldValue,$e=null,et=null;function tt(e){if(typeof Ze==`function`&&Qe(e),et&&typeof et.setStrictMode==`function`)try{et.setStrictMode($e,e)}catch{}}var nt=Math.clz32?Math.clz32:at,rt=Math.log,it=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(rt(e)/it|0)|0}var ot=256,st=262144,ct=4194304;function lt(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 ut(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=lt(n))):i=lt(o):i=lt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=lt(n))):i=lt(o)):i=lt(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 dt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ft(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-nt(n),i=1<<r;t|=e[r],n&=~i}return t}function pt(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 mt(){var e=ct;return ct<<=1,!(ct&62914560)&&(ct=4194304),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _t(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-nt(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&&vt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function vt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-nt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function bt(e,t){var n=t&-t;return n=n&42?1:xt(n),(n&(e.suspendedLanes|t))===0?n:0}function xt(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 St(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ct(){var e=M.p;return e===0?(e=window.event,e===void 0?32:Nh(e.type)):e}function wt(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Tt=Math.random().toString(36).slice(2),Et=`__reactFiber$`+Tt,Dt=`__reactProps$`+Tt,Ot=`__reactContainer$`+Tt,kt=`__reactEvents$`+Tt,At=`__reactListeners$`+Tt,jt=`__reactHandles$`+Tt,Mt=`__reactResources$`+Tt,Nt=`__reactMarker$`+Tt,Pt=`__reactLoad$`+Tt;function Ft(e){delete e[Et],delete e[Dt],delete e[At],delete e[jt]}function N(e){var t;if(t=e[Et])return t;for(var n=e.parentNode;n;){if(t=n[Ot]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sm(e);e!==null;){if(n=e[Et])return n;e=Sm(e)}return t}e=n,n=e.parentNode}return null}function It(e){if(e=e[Et]||e[Ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Rt(e){var t=e[Mt];return t||=e[Mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function zt(e){e[Nt]=!0}function Bt(e){e[Pt]=void 0}var Vt=new Set,Ht={};function Ut(e,t){Wt(e,t),Wt(e+`Capture`,t)}function Wt(e,t){for(Ht[e]=t,e=0;e<t.length;e++)Vt.add(t[e])}var Gt=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]*$`),Kt={},qt={};function Jt(e){return ze.call(qt,e)?!0:ze.call(Kt,e)?!1:Gt.test(e)?qt[e]=!0:(Kt[e]=!0,!1)}var Yt=!1;function Xt(){var e=Yt;return Yt=!1,e}function Zt(e,t,n){if(Jt(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 Qt(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 $t(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 en(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function tn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function nn(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 rn(e){if(!e._valueTracker){var t=tn(e)?`checked`:`value`;e._valueTracker=nn(e,t,``+e[t])}}function an(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=tn(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var on=/[\n"\\]/g;function sn(e){return e.replace(on,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function cn(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=``+en(t)):e.value!==``+en(t)&&(e.value=``+en(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):un(e,en(n)):o===`number`&&e.value==t?un(e,en(e.value)):un(e,en(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=``+en(s):e.removeAttribute(`name`)}function ln(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)){rn(e);return}n=n==null?``:``+en(n),t=t==null?n:``+en(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),rn(e)}function un(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function dn(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=``+en(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 fn(e,t,n){if(t!=null&&(t=``+en(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+en(n)}function pn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(_e(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=en(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),rn(e)}function mn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hn=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 gn(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||hn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function _n(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]=``,Yt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(gn(e,a,r),Yt=!0)}else for(var o in t)t.hasOwnProperty(o)&&gn(e,o,t[o])}function vn(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 yn=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`]]),bn=/^[\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 xn(e){return bn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Sn(){}var Cn=null;function wn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tn=null,En=null;function Dn(e){var t=It(e);if(t&&(e=t.stateNode)){var n=e[Dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(cn(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="`+sn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Dt]||null;if(!a)throw Error(i(90));cn(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&&an(r)}break a;case`textarea`:fn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&dn(e,!!n.multiple,t,!1)}}}var On=!1;function kn(e,t,n){if(On)return e(t,n);On=!0;try{return e(t)}finally{if(On=!1,(Tn!==null||En!==null)&&(Jd(),Tn&&(t=Tn,e=En,En=Tn=null,Dn(t),e)))for(t=0;t<e.length;t++)Dn(e[t])}}function An(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Dt]||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 P=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,jn=!1;if(P)try{var Mn={};Object.defineProperty(Mn,"passive",{get:function(){jn=!0}}),window.addEventListener(`test`,Mn,Mn),window.removeEventListener(`test`,Mn,Mn)}catch{jn=!1}var Nn=null,Pn=null,Fn=null;function In(){if(Fn)return Fn;var e,t=Pn,n=t.length,r,i=`value`in Nn?Nn.value:Nn.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 Fn=i.slice(e,1<r?1-r:void 0)}function Ln(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 Rn(){return!0}function zn(){return!1}function Bn(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)?Rn:zn,this.isPropagationStopped=zn,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=Rn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Rn)},persist:function(){},isPersistent:Rn}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hn=Bn(Vn),Un=T({},Vn,{view:0,detail:0}),Wn=Bn(Un),Gn,Kn,qn,Jn=T({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ar,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!==qn&&(qn&&e.type===`mousemove`?(Gn=e.screenX-qn.screenX,Kn=e.screenY-qn.screenY):Kn=Gn=0,qn=e),Gn)},movementY:function(e){return`movementY`in e?e.movementY:Kn}}),Yn=Bn(Jn),Xn=Bn(T({},Jn,{dataTransfer:0})),Zn=Bn(T({},Un,{relatedTarget:0})),Qn=Bn(T({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0})),$n=Bn(T({},Vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),er=Bn(T({},Vn,{data:0})),tr={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},nr={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`},rr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function ir(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rr[e])?!!t[e]:!1}function ar(){return ir}var or=Bn(T({},Un,{key:function(e){if(e.key){var t=tr[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?nr[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ar,charCode:function(e){return e.type===`keypress`?Ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),sr=Bn(T({},Jn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),cr=Bn(T({},Vn,{submitter:0})),lr=Bn(T({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ar})),ur=Bn(T({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),dr=Bn(T({},Jn,{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})),fr=Bn(T({},Vn,{newState:0,oldState:0,source:0})),pr=[9,13,27,32],mr=P&&`CompositionEvent`in window,hr=null;P&&`documentMode`in document&&(hr=document.documentMode);var gr=P&&`TextEvent`in window&&!hr,_r=P&&(!mr||hr&&8<hr&&11>=hr),vr=` `,yr=!1;function br(e,t){switch(e){case`keyup`:return pr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function xr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Sr=!1;function Cr(e,t){switch(e){case`compositionend`:return xr(t);case`keypress`:return t.which===32?(yr=!0,vr):null;case`textInput`:return e=t.data,e===vr&&yr?null:e;default:return null}}function wr(e,t){if(Sr)return e===`compositionend`||!mr&&br(e,t)?(e=In(),Fn=Pn=Nn=null,Sr=!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 _r&&t.locale!==`ko`?null:t.data;default:return null}}var Tr={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 Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Tr[e.type]:t===`textarea`}function Dr(e,t,n,r){Tn?En?En.push(r):En=[r]:Tn=r,t=rp(t,`onChange`),0<t.length&&(n=new Hn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Or=null,kr=null;function Ar(e){Xf(e,0)}function jr(e){if(an(Lt(e)))return e}function Mr(e,t){if(e===`change`)return t}var Nr=!1;if(P){var Pr;if(P){var Fr=`oninput`in document;if(!Fr){var Ir=document.createElement(`div`);Ir.setAttribute(`oninput`,`return;`),Fr=typeof Ir.oninput==`function`}Pr=Fr}else Pr=!1;Nr=Pr&&(!document.documentMode||9<document.documentMode)}function Lr(){Or&&(Or.detachEvent(`onpropertychange`,Rr),kr=Or=null)}function Rr(e){if(e.propertyName===`value`&&jr(kr)){var t=[];Dr(t,kr,e,wn(e)),kn(Ar,t)}}function zr(e,t,n){e===`focusin`?(Lr(),Or=t,kr=n,Or.attachEvent(`onpropertychange`,Rr)):e===`focusout`&&Lr()}function Br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return jr(kr)}function Vr(e,t){if(e===`click`)return jr(t)}function Hr(e,t){if(e===`input`||e===`change`)return jr(t)}function Ur(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Wr=typeof Object.is==`function`?Object.is:Ur;function Gr(e,t){if(Wr(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(!ze.call(t,i)||!Wr(e[i],t[i]))return!1}return!0}function Kr(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 qr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jr(e,t){var n=qr(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=qr(n)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kr(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=Kr(e.document)}return t}function Zr(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 Qr=P&&`documentMode`in document&&11>=document.documentMode,$r=null,ei=null,ti=null,ni=!1;function ri(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ni||$r==null||$r!==Kr(r)||(r=$r,`selectionStart`in r&&Zr(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}),ti&&Gr(ti,r)||(ti=r,r=rp(ei,`onSelect`),0<r.length&&(t=new Hn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=$r)))}function ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ai={animationend:ii(`Animation`,`AnimationEnd`),animationiteration:ii(`Animation`,`AnimationIteration`),animationstart:ii(`Animation`,`AnimationStart`),transitionrun:ii(`Transition`,`TransitionRun`),transitionstart:ii(`Transition`,`TransitionStart`),transitioncancel:ii(`Transition`,`TransitionCancel`),transitionend:ii(`Transition`,`TransitionEnd`)},oi={},si={};P&&(si=document.createElement(`div`).style,`AnimationEvent`in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),`TransitionEvent`in window||delete ai.transitionend.transition);function ci(e){if(oi[e])return oi[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in si)return oi[e]=t[n];return e}var li=ci(`animationend`),ui=ci(`animationiteration`),di=ci(`animationstart`),fi=ci(`transitionrun`),pi=ci(`transitionstart`),mi=ci(`transitioncancel`),hi=ci(`transitionend`),gi=new Map,_i=`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(` `);_i.push(`scrollEnd`);function vi(e,t){gi.set(e,t),Ut(t,[e])}var yi=0;function bi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Ad.identifierPrefix;var n=yi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function xi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Rd;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 Si(e,t){return e=xi(e),t=xi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var Ci=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)},wi=[],Ti=0,Ei=0;function Di(){for(var e=Ti,t=Ei=Ti=0;t<e;){var n=wi[t];wi[t++]=null;var r=wi[t];wi[t++]=null;var i=wi[t];wi[t++]=null;var a=wi[t];if(wi[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&&ji(n,i,a)}}function Oi(e,t,n,r){wi[Ti++]=e,wi[Ti++]=t,wi[Ti++]=n,wi[Ti++]=r,Ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ki(e,t,n,r){return Oi(e,t,n,r),Mi(e)}function Ai(e,t){return Oi(e,null,null,t),Mi(e)}function ji(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-nt(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Mi(e){if(50<zd)throw zd=0,Bd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ni={};function Pi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fi(e,t,n,r){return new Pi(e,t,n,r)}function Ii(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Li(e,t){var n=e.alternate;return n===null?(n=Fi(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 Ri(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 zi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ii(r)&&(s=1);else if(typeof r==`string`)s=rh(e,n,we.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ce:return e=Fi(31,n,t,a),e.elementType=ce,e.lanes=o,e;case O:return Bi(n.children,a,o,t);case te:s=8,a|=24;break;case ne:return e=Fi(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case ae:return e=Fi(13,n,t,a),e.elementType=ae,e.lanes=o,e;case A:return e=Fi(19,n,t,a),e.elementType=A,e.lanes=o,e;case le:case de:return e=a|32,e=Fi(30,n,t,e),e.elementType=de,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case k:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case se:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Bi(e,t,n,r){return e=Fi(7,e,r,t),e.lanes=n,e}function Vi(e,t,n){return e=Fi(6,e,null,t),e.lanes=n,e}function Hi(e){var t=Fi(18,null,null,0);return t.stateNode=e,t}function Ui(e,t,n){return t=Fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Wi=new WeakMap;function Gi(e,t){if(typeof e==`object`&&e){var n=Wi.get(e);return n===void 0?(t={value:e,source:t,stack:Re(t)},Wi.set(e,t),t):n}return{value:e,source:t,stack:Re(t)}}var Ki=[],qi=0,Ji=null,Yi=0,Xi=[],Zi=0,Qi=null,$i=1,ea=``;function ta(e,t){Ki[qi++]=Yi,Ki[qi++]=Ji,Ji=e,Yi=t}function na(e,t,n){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,Qi=e;var r=$i;e=ea;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var a=32-nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,$i=1<<32-nt(t)+i|n<<i|r,ea=a+e}else $i=1<<a|n<<i|r,ea=e}function ra(e){e.return!==null&&(ta(e,1),na(e,1,0))}function ia(e){for(;e===Ji;)Ji=Ki[--qi],Ki[qi]=null,Yi=Ki[--qi],Ki[qi]=null;for(;e===Qi;)Qi=Xi[--Zi],Xi[Zi]=null,ea=Xi[--Zi],Xi[Zi]=null,$i=Xi[--Zi],Xi[Zi]=null}function aa(e,t){Xi[Zi++]=$i,Xi[Zi++]=ea,Xi[Zi++]=Qi,$i=t.id,ea=t.overflow,Qi=e}var oa=null,sa=null,F=!1,ca=null,la=!1,ua=Error(i(519));function da(e){throw _a(Gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ua}function fa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Et]=e,t[Dt]=r,n){case`dialog`:U(`cancel`,t),U(`close`,t);break;case`iframe`:case`object`:case`embed`:U(`load`,t);break;case`video`:case`audio`:for(n=0;n<Jf.length;n++)U(Jf[n],t);break;case`source`:U(`error`,t);break;case`img`:case`image`:case`link`:U(`error`,t),U(`load`,t);break;case`details`:U(`toggle`,t);break;case`input`:U(`invalid`,t),ln(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:U(`invalid`,t);break;case`textarea`:U(`invalid`,t),pn(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&&(U(`beforetoggle`,t),U(`toggle`,t)),r.onScroll!=null&&U(`scroll`,t),r.onScrollEnd!=null&&U(`scrollend`,t),r.onClick!=null&&(t.onclick=Sn),t=!0):t=!1,t||da(e,!0)}function pa(e){for(oa=e.return;oa;)switch(oa.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:oa=oa.return}}function ma(e){if(e!==oa)return!1;if(!F)return pa(e),F=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Cp(e.type,e.memoizedProps)),n=!n),n&&sa&&da(e),pa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=xm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));sa=xm(e)}else t===27?(t=sa,Mp(e.type)?(e=bm,bm=null,sa=e):sa=t):sa=oa?ym(e.stateNode.nextSibling):null;return!0}function ha(){sa=oa=null,F=!1}function ga(){var e=ca;return e!==null&&(Sd===null?Sd=e:Sd.push.apply(Sd,e),ca=null),e}function _a(e){ca===null?ca=[e]:ca.push(e)}var va=xe(null),ya=null,ba=null;function xa(e,t,n){Ce(va,t._currentValue),t._currentValue=n}function Sa(e){e._currentValue=va.current,Se(va)}function Ca(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 wa(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),Ca(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),Ca(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),Ca(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 Ta(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;Wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===De.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[_h]:e.push(_h))}a=a.return}return e!==null&&wa(t,e,n,r),t.flags|=262144,e!==null}function Ea(e){for(e=e.firstContext;e!==null;){if(!Wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Da(e){ya=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Oa(e){return Aa(ya,e)}function ka(e,t){return ya===null&&Da(e),Aa(e,t)}function Aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ba===null){if(e===null)throw Error(i(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return n}var ja=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()})}},Ma=t.unstable_scheduleCallback,Na=t.unstable_NormalPriority,Pa={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fa(){return{controller:new ja,data:new Map,refCount:0}}function Ia(e){e.refCount--,e.refCount===0&&Ma(Na,function(){e.controller.abort()})}function La(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 Ra=null;function za(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ba=null,Va=0,Ha=0,Ua=null;function Wa(e,t){if(Ba===null){var n=Ba=[];Va=0,Ha=Uf(),Ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Va++,t.then(Ga,Ga),t}function Ga(){if(--Va===0&&(Ra=null,Ba!==null)){Ua!==null&&(Ua.status=`fulfilled`);var e=Ba;Ba=null,Ha=0,Ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ka(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 qa=j.S;j.S=function(e,t){if(Td=We(),typeof t==`object`&&t&&typeof t.then==`function`&&Wa(e,t),Ra!==null)for(var n=kf;n!==null;)La(n,Ra),n=n.next;if(n=e.types,n!==null){for(var r=kf;r!==null;)La(r,n),r=r.next;if(Ha!==0){r=Ra,r===null&&(r=Ra=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}qa!==null&&qa(e,t)};var Ja=xe(null);function Ya(){var e=Ja.current;return e===null?sd.pooledCache:e}function Xa(e,t){t===null?Ce(Ja,Ja.current):Ce(Ja,t.pool)}function Za(){var e=Ya();return e===null?null:{parent:Pa._currentValue,pool:e}}var Qa=Error(i(460)),$a=Error(i(474)),eo=Error(i(542)),to={then:function(){}};function no(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ro(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Sn,Sn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,so(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(Sn,Sn);else{if(e=sd,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,so(e),e}throw ao=t,Qa}}function io(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ao=e,Qa):e}}var ao=null;function oo(){if(ao===null)throw Error(i(459));var e=ao;return ao=null,e}function so(e){if(e===Qa||e===eo)throw Error(i(483))}var co=null,lo=0;function uo(e){var t=lo;return lo+=1,co===null&&(co=[]),ro(co,e,t)}function fo(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function po(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 mo(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=Li(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=Vi(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===O?(e=d(e,t,n.props.children,r,n.key),fo(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&io(i)===t.type)?(t=a(t,n.props),fo(t,n),t.return=e,t):(t=zi(n.type,n.key,n.props,null,e.mode,r),fo(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=Ui(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=Bi(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=Vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ee:return n=zi(t.type,t.key,t.props,null,e.mode,n),fo(n,t),n.return=e,n;case D:return t=Ui(t,e.mode,n),t.return=e,t;case se:return t=io(t),f(e,t,n)}if(_e(t)||me(t))return t=Bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,uo(t),n);if(t.$$typeof===k)return f(e,ka(e,t),n);po(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 ee:return n.key===i?l(e,t,n,r):null;case D:return n.key===i?u(e,t,n,r):null;case se:return n=io(n),p(e,t,n,r)}if(_e(n)||me(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,uo(n),r);if(n.$$typeof===k)return p(e,t,ka(e,n),r);po(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 ee:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case D:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:return r=io(r),m(e,t,n,r,i)}if(_e(r)||me(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,uo(r),i);if(r.$$typeof===k)return m(e,t,n,ka(t,r),i);po(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),F&&ta(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return F&&ta(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)}),F&&ta(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),F&&ta(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return F&&ta(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)}),F&&ta(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case ee:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),fo(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===se&&io(l)===r.type){n(e,r.sibling),c=a(r,o.props),fo(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Bi(o.props.children,e.mode,c,o.key),fo(c,o),c.return=e,e=c):(c=zi(o.type,o.key,o.props,null,e.mode,c),fo(c,o),c.return=e,e=c)}return s(e);case D: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=Ui(o,e.mode,c),c.return=e,e=c}return s(e);case se:return o=io(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(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,uo(o),c);if(o.$$typeof===k)return _(e,r,ka(e,o),c);po(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=Vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{lo=0;var i=_(e,t,n,r);return co=null,i}catch(t){if(t===Qa||t===eo)throw t;var a=Fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ho=mo(!0),go=mo(!1),_o=!1;function vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yo(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 bo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,od&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Mi(e),ji(e,null,n),t}return Oi(e,r,t,n),Mi(e)}function So(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,yt(e,n)}}function Co(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 wo=!1;function To(){if(wo){var e=Ua;if(e!==null)throw e}}function Eo(e,t,n,r){wo=!1;var i=e.updateQueue;_o=!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?(z&f)===f:(r&f)===f){f!==0&&f===Ha&&(wo=!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:_o=!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),md|=o,e.lanes=o,e.memoizedState=d}}function Do(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Oo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Do(n[e],t)}var ko=xe(null),Ao=xe(0);function jo(e,t){e=pd,Ce(Ao,e),Ce(ko,t),pd=e|t.baseLanes}function Mo(){Ce(Ao,pd),Ce(ko,ko.current)}function No(){pd=Ao.current,Se(ko),Se(Ao)}var Po=xe(null),Fo=null;function Io(e){var t=e.alternate;Ce(Vo,Vo.current&1),Ce(Po,e),Fo===null&&(t===null||ko.current!==null||t.memoizedState!==null)&&(Fo=e)}function Lo(e){Ce(Vo,Vo.current),Ce(Po,e),Fo===null&&(Fo=e)}function Ro(e){e.tag===22?(Ce(Vo,Vo.current),Ce(Po,e),Fo===null&&(Fo=e)):zo()}function zo(){Ce(Vo,Vo.current),Ce(Po,Po.current)}function Bo(e){Se(Po),Fo===e&&(Fo=null),Se(Vo)}var Vo=xe(0);function Ho(e,t){Ce(Po,Po.current),Ce(Vo,t)}function Uo(e){Se(Vo),Se(Po),Fo===e&&(Fo=null)}function Wo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gm(n)||_m(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 Go=0,I=null,Ko=null,qo=null,Jo=!1,Yo=!1,Xo=!1,Zo=0,Qo=0,$o=null,es=0;function ts(){throw Error(i(321))}function ns(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wr(e[n],t[n]))return!1;return!0}function rs(e,t,n,r,i,a){return Go=a,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?bc:xc,Xo=!1,a=n(r,i),Xo=!1,Yo&&(a=as(t,n,r,i)),is(e),a}function is(e){j.H=yc;var t=Ko!==null&&Ko.next!==null;if(Go=0,qo=Ko=I=null,Jo=!1,Qo=0,$o=null,t)throw Error(i(300));e===null||Rc||(e=e.dependencies,e!==null&&Ea(e)&&(Rc=!0))}function as(e,t,n,r){I=e;var a=0;do{if(Yo&&($o=null),Qo=0,Yo=!1,25<=a)throw Error(i(301));if(a+=1,qo=Ko=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}j.H=Sc,o=t(n,r)}while(Yo);return o}function os(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?ps(t):t,e=e.useState()[0],(Ko===null?null:Ko.memoizedState)!==e&&(I.flags|=1024),t}function ss(){var e=Zo!==0;return Zo=0,e}function cs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ls(e){if(Jo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Jo=!1}Go=0,qo=Ko=I=null,Yo=!1,Qo=Zo=0,$o=null}function us(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qo===null?I.memoizedState=qo=e:qo=qo.next=e,qo}function ds(){if(Ko===null){var e=I.alternate;e=e===null?null:e.memoizedState}else e=Ko.next;var t=qo===null?I.memoizedState:qo.next;if(t!==null)qo=t,Ko=e;else{if(e===null)throw I.alternate===null?Error(i(467)):Error(i(310));Ko=e,e={memoizedState:Ko.memoizedState,baseState:Ko.baseState,baseQueue:Ko.baseQueue,queue:Ko.queue,next:null},qo===null?I.memoizedState=qo=e:qo=qo.next=e}return qo}function fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ps(e){var t=Qo;return Qo+=1,$o===null&&($o=[]),e=ro($o,e,t),t=I,(qo===null?t.memoizedState:qo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?bc:xc),e}function ms(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ps(e);if(e.$$typeof===fe)return;if(e.$$typeof===k)return Oa(e)}throw Error(i(438,String(e)))}function hs(e){var t=null,n=I.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=I.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=fs(),I.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]=ue;return t.index++,n}function gs(e,t){return typeof t==`function`?t(e):t}function _s(e){return vs(ds(),Ko,e)}function vs(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?(Go&f)===f:(z&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ha&&(d=!0);else if((Go&p)===p){u=u.next,p===Ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,I.lanes|=p,md|=p;f=u.action,Xo&&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,I.lanes|=f,md|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Wr(o,e.memoizedState)&&(Rc=!0,d&&(n=Ua,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 ys(e){var t=ds(),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);Wr(o,t.memoizedState)||(Rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function bs(e,t,n){var r=I,a=ds(),o=F;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Wr((Ko||a).memoizedState,n);if(s&&(a.memoizedState=n,Rc=!0),a=a.queue,Gs(Cs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||qo!==null&&!!(qo.memoizedState.tag&1),Bs(e?9:8,{destroy:void 0},Ss.bind(null,r,a,n,t),null),e){if(r.flags|=2048,sd===null)throw Error(i(349));o||Go&127||xs(r,t,n)}return n}function xs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=I.updateQueue,t===null?(t=fs(),I.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ss(e,t,n,r){t.value=n,t.getSnapshot=r,ws(t)&&Ts(e)}function Cs(e,t,n){return n(function(){ws(t)&&Ts(e)})}function ws(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wr(e,n)}catch{return!0}}function Ts(e){var t=Ai(e,2);t!==null&&Wd(t,e,2)}function Es(e){var t=us();if(typeof e==`function`){var n=e;if(e=n(),Xo){tt(!0);try{n()}finally{tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:e},t}function Ds(e,t,n,r){return e.baseState=n,vs(e,Ko,typeof r==`function`?r:gs)}function Os(e,t,n,r,a){if(gc(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)}};j.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ks(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ks(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};o.types=a===null?null:a.types,j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),As(e,t,s)}catch(n){Ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),As(e,t,a)}catch(n){Ms(e,t,n)}}function As(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){js(e,t,n)},function(n){return Ms(e,t,n)}):js(e,t,n)}function js(e,t,n){t.status=`fulfilled`,t.value=n,Ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ks(e,n)))}function Ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ns(t),t=t.next;while(t!==r)}e.action=null}function Ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ps(e,t){return t}function Fs(e,t){if(F){var n=sd.formState;if(n!==null){a:{var r=I;if(F){if(sa){b:{for(var i=sa,a=la;i.nodeType!==8;){if(!a){i=null;break b}if(i=ym(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){sa=ym(i.nextSibling),r=i.data===`F!`;break a}}da(r)}r=!1}r&&(t=n[0])}}return n=us(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:t},n.queue=r,n=pc.bind(null,I,r),r.dispatch=n,r=Es(!1),a=hc.bind(null,I,!1,r.queue),r=us(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Os.bind(null,I,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Is(e){return Ls(ds(),Ko,e)}function Ls(e,t,n){if(t=vs(e,t,Ps)[0],e=_s(gs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ps(t)}catch(e){throw e===Qa?eo:e}else r=t;t=ds();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(I.flags|=2048,Bs(9,{destroy:void 0},Rs.bind(null,i,n),null)),[r,a,e]}function Rs(e,t){e.action=t}function zs(e){var t=ds(),n=Ko;if(n!==null)return Ls(t,n,e);ds(),t=t.memoizedState,n=ds();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Bs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=I.updateQueue,t===null&&(t=fs(),I.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 Vs(){return ds().memoizedState}function Hs(e,t,n,r){var i=us();I.flags|=e,i.memoizedState=Bs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Us(e,t,n,r){var i=ds();r=r===void 0?null:r;var a=i.memoizedState.inst;Ko!==null&&r!==null&&ns(r,Ko.memoizedState.deps)?i.memoizedState=Bs(t,a,n,r):(I.flags|=e,i.memoizedState=Bs(1|t,a,n,r))}function Ws(e,t){Hs(8390656,8,e,t)}function Gs(e,t){Us(2048,8,e,t)}function Ks(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=fs(),I.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qs(e){var t=ds().memoizedState;return Ks({ref:t,nextImpl:e}),function(){if(od&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Js(e,t){return Us(4,2,e,t)}function Ys(e,t){return Us(4,4,e,t)}function Xs(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 Zs(e,t,n){n=n==null?null:n.concat([e]),Us(4,4,Xs.bind(null,t,e),n)}function Qs(){}function $s(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ns(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ec(e,t){var n=ds();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ns(t,r[1]))return r[0];if(r=e(),Xo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r}function tc(e,t,n){return n===void 0||Go&1073741824&&!(z&261930)?e.memoizedState=t:(e.memoizedState=n,e=Hd(),I.lanes|=e,md|=e,n)}function nc(e,t,n,r){return Wr(n,t)?n:ko.current===null?!(Go&106)||Go&1073741824&&!(z&261930)?(Rc=!0,e.memoizedState=n):(e=Hd(),I.lanes|=e,md|=e,t):(e=tc(e,n,r),Wr(e,t)||(Rc=!0),e)}function rc(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};s.types=o===null?null:o.types,j.T=s,hc(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?mc(e,t,Ka(c,r),Vd(e)):mc(e,t,r,Vd(e))}catch(n){mc(e,t,{then:function(){},status:`rejected`,reason:n},Vd())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ic(){}function ac(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=oc(e).queue;rc(e,a,t,ve,n===null?ic:function(){return sc(e),n(r)})}function oc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:ve},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sc(e){var t=oc(e);t.next===null&&(t=e.alternate.memoizedState),mc(e,t.next.queue,{},Vd())}function cc(){return Oa(_h)}function lc(){return ds().memoizedState}function uc(){return ds().memoizedState}function dc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Vd();e=bo(n);var r=xo(t,e,n);r!==null&&(Wd(r,t,n),So(r,t,n)),t={cache:Fa()},e.payload=t;return}t=t.return}}function fc(e,t,n){var r=Vd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},gc(e)?_c(t,n):(n=ki(e,t,n,r),n!==null&&(Wd(n,e,r),vc(n,t,r)))}function pc(e,t,n){mc(e,t,n,Vd())}function mc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(gc(e))_c(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,Wr(s,o))return Oi(e,t,i,0),sd===null&&Di(),!1}catch{}if(n=ki(e,t,i,r),n!==null)return Wd(n,e,r),vc(n,t,r),!0}return!1}function hc(e,t,n,r){if(r={lane:2,revertLane:Uf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error(i(479))}else t=ki(e,n,r,2),t!==null&&Wd(t,e,2)}function gc(e){var t=e.alternate;return e===I||t!==null&&t===I}function _c(e,t){Yo=Jo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yt(e,n)}}var yc={readContext:Oa,use:ms,useCallback:ts,useContext:ts,useEffect:ts,useImperativeHandle:ts,useLayoutEffect:ts,useInsertionEffect:ts,useMemo:ts,useReducer:ts,useRef:ts,useState:ts,useDebugValue:ts,useDeferredValue:ts,useTransition:ts,useSyncExternalStore:ts,useId:ts,useHostTransitionStatus:ts,useFormState:ts,useActionState:ts,useOptimistic:ts,useMemoCache:ts,useCacheRefresh:ts,useEffectEvent:ts},bc={readContext:Oa,use:ms,useCallback:function(e,t){return us().memoizedState=[e,t===void 0?null:t],e},useContext:Oa,useEffect:Ws,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Hs(4194308,4,Xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hs(4194308,4,e,t)},useInsertionEffect:function(e,t){Hs(4,2,e,t)},useMemo:function(e,t){var n=us();t=t===void 0?null:t;var r=e();if(Xo){tt(!0);try{e()}finally{tt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=us();if(n!==void 0){var i=n(t);if(Xo){tt(!0);try{n(t)}finally{tt(!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=fc.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=us();return e={current:e},t.memoizedState=e},useState:function(e){e=Es(e);var t=e.queue,n=pc.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){return tc(us(),e,t)},useTransition:function(){var e=Es(!1);return e=rc.bind(null,I,e.queue,!0,!1),us().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=us();if(F){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),sd===null)throw Error(i(349));z&127||xs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ws(Cs.bind(null,r,o,e),[e]),r.flags|=2048,Bs(9,{destroy:void 0},Ss.bind(null,r,o,n,t),null),n},useId:function(){var e=us(),t=sd.identifierPrefix;if(F){var n=ea,r=$i;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=es++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:Fs,useActionState:Fs,useOptimistic:function(e){var t=us();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=hc.bind(null,I,!0,n),n.dispatch=t,[e,t]},useMemoCache:hs,useCacheRefresh:function(){return us().memoizedState=dc.bind(null,I)},useEffectEvent:function(e){var t=us(),n={impl:e};return t.memoizedState=n,function(){if(od&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},xc={readContext:Oa,use:ms,useCallback:$s,useContext:Oa,useEffect:Gs,useImperativeHandle:Zs,useInsertionEffect:Js,useLayoutEffect:Ys,useMemo:ec,useReducer:_s,useRef:Vs,useState:function(){return _s(gs)},useDebugValue:Qs,useDeferredValue:function(e,t){return nc(ds(),Ko.memoizedState,e,t)},useTransition:function(){var e=_s(gs)[0],t=ds().memoizedState;return[typeof e==`boolean`?e:ps(e),t]},useSyncExternalStore:bs,useId:lc,useHostTransitionStatus:cc,useFormState:Is,useActionState:Is,useOptimistic:function(e,t){return Ds(ds(),Ko,e,t)},useMemoCache:hs,useCacheRefresh:uc,useEffectEvent:qs},Sc={readContext:Oa,use:ms,useCallback:$s,useContext:Oa,useEffect:Gs,useImperativeHandle:Zs,useInsertionEffect:Js,useLayoutEffect:Ys,useMemo:ec,useReducer:ys,useRef:Vs,useState:function(){return ys(gs)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=ds();return Ko===null?tc(n,e,t):nc(n,Ko.memoizedState,e,t)},useTransition:function(){var e=ys(gs)[0],t=ds().memoizedState;return[typeof e==`boolean`?e:ps(e),t]},useSyncExternalStore:bs,useId:lc,useHostTransitionStatus:cc,useFormState:zs,useActionState:zs,useOptimistic:function(e,t){var n=ds();return Ko===null?(n.baseState=e,[e,n.queue.dispatch]):Ds(n,Ko,e,t)},useMemoCache:hs,useCacheRefresh:uc,useEffectEvent:qs};function Cc(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 wc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Vd(),i=bo(r);i.payload=t,n!=null&&(i.callback=n),t=xo(e,i,r),t!==null&&(Wd(t,e,r),So(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Vd(),i=bo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=xo(e,i,r),t!==null&&(Wd(t,e,r),So(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Vd(),r=bo(n);r.tag=2,t!=null&&(r.callback=t),t=xo(e,r,n),t!==null&&(Wd(t,e,n),So(t,e,n))}};function Tc(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?!Gr(n,r)||!Gr(i,a):!0}function Ec(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&&wc.enqueueReplaceState(t,t.state,null)}function Dc(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 Oc(e){Ci(e)}function kc(e){console.error(e)}function Ac(e){Ci(e)}function jc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Mc(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 Nc(e,t,n){return n=bo(n),n.tag=3,n.payload={element:null},n.callback=function(){jc(e,t)},n}function Pc(e){return e=bo(e),e.tag=3,e}function Fc(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(){Mc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Mc(t,n,r),typeof i!=`function`&&(Od===null?Od=new Set([this]):Od.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ic(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ta(t,n,a,!0),n=Po.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Fo===null?tf():n.alternate===null&&B===0&&(B=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===to?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Cf(e,r,a)),!1;case 22:return n.flags|=65536,r===to?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)),Cf(e,r,a)),!1}throw Error(i(435,n.tag))}return Cf(e,r,a),tf(),!1}if(F)return t=Po.current,t===null?(r!==ua&&(t=Error(i(423),{cause:r}),_a(Gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Gi(r,n),a=Nc(e.stateNode,r,a),Co(e,a),B!==4&&(B=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ua&&(e=Error(i(422),{cause:r}),_a(Gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Gi(o,n),xd===null?xd=[o]:xd.push(o),B!==4&&(B=2),t===null)return!0;r=Gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Nc(n.stateNode,r,e),Co(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`&&(Od===null||!Od.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Pc(a),Fc(a,e,n,r),Co(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Lc=Error(i(461)),Rc=!1;function zc(e,t,n,r){t.child=e===null?go(t,null,n,r):ho(t,e.child,n,r)}function Bc(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 Da(t),r=rs(e,t,n,o,a,i),s=ss(),e!==null&&!Rc?(cs(e,t,i),L(e,t,i)):(F&&s&&ra(t),t.flags|=1,zc(e,t,r,i),t.child)}function Vc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ii(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Hc(e,t,a,r,i)):(e=zi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ml(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Gr:n,n(o,r)&&e.ref===t.ref)return L(e,t,i)}return t.flags|=1,e=Li(a,r),e.ref=t.ref,e.return=t,t.child=e}function Hc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Gr(a,r)&&e.ref===t.ref){if(Rc=!1,t.pendingProps=r=a,ml(e,i))e.flags&131072&&(Rc=!0);else return t.lanes=e.lanes,L(e,t,i)}}return Xc(e,t,n,r,i)}function Uc(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 Gc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xa(t,a===null?null:a.cachePool),a===null?Mo():jo(t,a),Ro(t);else return r=t.lanes=536870912,Gc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Xa(t,null),Mo(),zo()):(Xa(t,a.cachePool),jo(t,a),zo(),t.memoizedState=null);return zc(e,t,i,n),t.child}function Wc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gc(e,t,n,r,i){var a=Ya();return a=a===null?null:{parent:Pa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Xa(t,null),Mo(),Ro(t),e!==null&&Ta(e,t,r,!0),t.childLanes=i,null}function Kc(e,t){return t=al({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qc(e,t,n){return ho(t,e.child,null,n),e=Kc(t,t.pendingProps),e.flags|=2,Bo(t),t.memoizedState=null,e}function Jc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(F){if(r.mode===`hidden`)return e=Kc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Wc(null,e);if(Lo(t),(e=sa)?(e=hm(e,la),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw da(t);return t.lanes=536870912,null}return Kc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Lo(t),a){if(t.flags&256)t.flags&=-257,t=qc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Rc||Ta(e,t,n,!1),a=(n&e.childLanes)!==0,Rc||a){if(ko.current===null){if(r=sd,r!==null&&(s=bt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ai(e,s),Wd(r,e,s),Lc;tf()}t=qc(e,t,n)}else e=o.treeContext,sa=ym(s.nextSibling),oa=t,F=!0,ca=null,la=!1,e!==null&&aa(t,e),t=Kc(t,r),t.flags|=134221824;return t}return e=Li(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Yc(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 Xc(e,t,n,r,i){return Da(t),n=rs(e,t,n,r,void 0,i),r=ss(),e!==null&&!Rc?(cs(e,t,i),L(e,t,i)):(F&&r&&ra(t),t.flags|=1,zc(e,t,n,i),t.child)}function Zc(e,t,n,r,i,a){return Da(t),t.updateQueue=null,n=as(t,r,n,i),is(e),r=ss(),e!==null&&!Rc?(cs(e,t,a),L(e,t,a)):(F&&r&&ra(t),t.flags|=1,zc(e,t,n,a),t.child)}function Qc(e,t,n,r,i){if(Da(t),t.stateNode===null){var a=Ni,o=n.contextType;typeof o==`object`&&o&&(a=Oa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=wc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},vo(t),o=n.contextType,a.context=typeof o==`object`&&o?Oa(o):Ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Cc(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&&wc.enqueueReplaceState(a,a.state,null),Eo(t,r,a,i),To(),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=Dc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ni,typeof u==`object`&&u&&(o=Oa(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)&&Ec(t,a,r,o),_o=!1;var f=t.memoizedState;a.state=f,Eo(t,r,a,i),To(),l=t.memoizedState,s||f!==l||_o?(typeof d==`function`&&(Cc(t,n,d,r),l=t.memoizedState),(c=_o||Tc(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,yo(e,t),o=t.memoizedProps,u=Dc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ni,typeof l==`object`&&l&&(c=Oa(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)&&Ec(t,a,r,c),_o=!1,f=t.memoizedState,a.state=f,Eo(t,r,a,i),To();var p=t.memoizedState;o!==d||f!==p||_o||e!==null&&e.dependencies!==null&&Ea(e.dependencies)?(typeof s==`function`&&(Cc(t,n,s,r),p=t.memoizedState),(u=_o||Tc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ea(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,Yc(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=ho(t,e.child,null,i),t.child=ho(t,null,n,i)):zc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=L(e,t,i),e}function $c(e,t,n,r){return ha(),t.flags|=256,zc(e,t,n,r),t.child}var el={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tl(e){return{baseLanes:e,cachePool:Za()}}function nl(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=yd),e}function rl(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Vo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(F){if(i?Io(t):zo(),(e=sa)?(e=hm(e,la),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qi===null?null:{id:$i,overflow:ea},retryLane:536870912,hydrationErrors:null},n=Hi(e),n.return=t,t.child=n,oa=t,sa=null)):e=null,e===null)throw da(t);return t.lanes=_m(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(zo(),i=t.mode,a=al({mode:`hidden`,children:a},i),r=Bi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=tl(n),r.childLanes=nl(e,o,n),t.memoizedState=el,Wc(null,r)):(Io(t),il(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return sl(e,t,a,o,r,c,s,n)}return i?(zo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Li(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Bi(i,a,n,null),i.flags|=2):i=Li(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Wc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=tl(n):(a=i.cachePool,a===null?a=Za():(s=Pa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=nl(e,o,n),t.memoizedState=el,Wc(e.child,r)):(Io(t),n=e.child,e=n.sibling,n=Li(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 il(e,t){return t=al({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function al(e,t){return e=Fi(22,e,null,t),e.lanes=0,e}function ol(e,t,n){return ho(t,e.child,null,n),e=il(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Io(t),t.flags&=-257,ol(e,t,c)):t.memoizedState===null?(zo(),o=a.fallback,s=t.mode,a=al({mode:`visible`,children:a.children},s),o=Bi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,ho(t,e.child,null,c),a=t.child,a.memoizedState=tl(c),a.childLanes=nl(e,r,c),t.memoizedState=el,Wc(null,a)):(zo(),t.child=e.child,t.flags|=128,null);if(Io(t),_m(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,_a({value:a,source:null,stack:null})),ol(e,t,c)}if(Rc||Ta(e,t,c,!1),r=(c&e.childLanes)!==0,Rc||r){if(ko.current!==null)return ol(e,t,c);if(r=sd,r!==null&&(a=bt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ai(e,a),Wd(r,e,a),Lc;return gm(o)||tf(),ol(e,t,c)}return gm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,sa=ym(o.nextSibling),oa=t,F=!0,ca=null,la=!1,e!==null&&aa(t,e),t=il(t,a.children),t.flags|=134221824,t)}function cl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ca(e.return,t,n)}function ll(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Wo(n)===null&&(t=e),e=e.sibling}return t}function ul(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 dl(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 fl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Vo.current;if(t.flags&128)return Ho(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ho(t,o),i===`backwards`&&e!==null?(dl(e),zc(e,t,r,n),dl(e)):zc(e,t,r,n),r=F?Yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cl(e,n,t);else if(e.tag===19)cl(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=ll(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,dl(t)),ul(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&&Wo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ul(t,!0,n,null,a,r);break;case`together`:ul(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=ll(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ul(t,!1,i,n,a,r)}return t.child}function pl(e,t,n){var r=t.pendingProps;return xa(t,t.type,r.value),zc(e,t,r.children,n),t.child}function L(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),md|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ta(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=Li(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Li(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ml(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ea(e)))}function hl(e,t,n){switch(t.tag){case 3:Oe(t,t.stateNode.containerInfo),xa(t,Pa,e.memoizedState.cache),ha();break;case 27:case 5:Ae(t);break;case 4:Oe(t,t.stateNode.containerInfo);break;case 10:xa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Io(t),t.flags|=128,null;r=Ta(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?rl(e,t,n):(Io(t),e=L(e,t,n),e===null?null:e.sibling)}Io(t);break;case 19:if(t.flags&128)return fl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return fl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ho(t,Vo.current),r)break;return null;case 22:return t.lanes=0,Uc(e,t,n,t.pendingProps);case 24:xa(t,Pa,e.memoizedState.cache)}return L(e,t,n)}function gl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Rc=!0;else{if(!ml(e,n)&&!(t.flags&128))return Rc=!1,hl(e,t,n);Rc=!!(e.flags&131072)}}else Rc=!1,F&&t.flags&1048576&&na(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=io(t.elementType),t.type=e,typeof e==`function`)Ii(e)?(r=Dc(e,r),t.tag=1,t=Qc(null,t,e,r,n)):(t.tag=0,t=Xc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=Bc(null,t,e,r,n);break a}if(a===oe){t.tag=14,t=Vc(null,t,e,r,n);break a}if(a===k){t.tag=10,t.type=e,t=pl(null,t,n);break a}}throw t=ge(e)||e,Error(i(306,t,``))}}return t;case 0:return Xc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Dc(r,t.pendingProps),Qc(e,t,r,a,n);case 3:a:{if(Oe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,yo(e,t),Eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,xa(t,Pa,r),r!==o.cache&&wa(t,[Pa],n,!0),To(),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=$c(e,t,r,n);break a}if(r!==a){a=Gi(Error(i(424)),t),_a(a),t=$c(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(sa=ym(e.firstChild),oa=t,F=!0,ca=null,la=!0,n=go(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ha(),r===a){t=L(e,t,n);break a}zc(e,t,r,n)}t=t.child}return t;case 26:return Yc(e,t),e===null?(n=Um(t.type,null,t.pendingProps,null))?t.memoizedState=n:F||(t.stateNode=Sp(t.type,t.pendingProps,Ee.current,t)):t.memoizedState=Um(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ae(t),e===null&&F&&(r=t.stateNode=Tm(t.type,t.pendingProps,Ee.current),oa=t,la=!0,a=sa,Mp(t.type)?(bm=a,sa=ym(r.firstChild)):sa=a),zc(e,t,t.pendingProps.children,n),Yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((a=r=sa)&&(r=pm(r,t.type,t.pendingProps,la),r===null?a=!1:(t.stateNode=r,oa=t,sa=ym(r.firstChild),la=!1,a=!0)),a||da(t)),Ae(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Cp(a,o)?r=null:s!==null&&Cp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=rs(e,t,os,null,null,n),_h._currentValue=a),Yc(e,t),zc(e,t,r,n),t.child;case 6:return e===null&&F&&((e=n=sa)&&(n=mm(n,t.pendingProps,la),n===null?e=!1:(t.stateNode=n,oa=t,sa=null,e=!0)),e||da(t)),null;case 13:return rl(e,t,n);case 4:return Oe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ho(t,null,r,n):zc(e,t,r,n),t.child;case 11:return Bc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Yc(e,t),zc(e,t,r,n),t.child;case 8:return zc(e,t,t.pendingProps.children,n),t.child;case 12:return zc(e,t,t.pendingProps.children,n),t.child;case 10:return pl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Da(t),a=Oa(a),r=r(a),t.flags|=1,zc(e,t,r,n),t.child;case 14:return Vc(e,t,t.type,t.pendingProps,n);case 15:return Hc(e,t,t.type,t.pendingProps,n);case 19:return fl(e,t,n);case 31:return Jc(e,t,n);case 22:return Uc(e,t,n,t.pendingProps);case 24:return Da(t),r=Oa(Pa),e===null?(a=Ya(),a===null&&(a=sd,o=Fa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},vo(t),xa(t,Pa,a)):((e.lanes&n)!==0&&(yo(e,t),Eo(t,null,null,n),To()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,xa(t,Pa,r),r!==a.cache&&wa(t,[Pa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),xa(t,Pa,r))),zc(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:F&&ra(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Yc(e,t),zc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function _l(e){e.flags|=4}function vl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?ih(t,r):ih(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(Qd())e.flags|=8192;else throw ao=to,$a}}else e.flags&=-16777217}function yl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t)){if(Qd())e.flags|=8192;else throw ao=to,$a}}function bl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:mt(),e.lanes|=t,bd|=t)}function xl(e,t){if(!F)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 Sl(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 Cl(e,t,n){var r=t.pendingProps;switch(ia(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sl(t),null;case 1:return Sl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Sa(Pa),ke(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ma(t)?_l(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ga())),Sl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(_l(t),o===null?(Sl(t),vl(t,a,null,r,n)):(Sl(t),yl(t,o))):o?o===e.memoizedState?(Sl(t),t.flags&=-16777217):(_l(t),Sl(t),yl(t,o)):(e=e.memoizedProps,e!==r&&_l(t),Sl(t),vl(t,a,e,r,n)),null;case 27:if(je(t),n=Ee.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&_l(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Sl(t),t.subtreeFlags&=-33554433,null}e=we.current,ma(t)?fa(t,e):(e=Tm(a,r,n),t.stateNode=e,_l(t))}return Sl(t),t.subtreeFlags&=-33554433,null;case 5:if(je(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&_l(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Sl(t),t.subtreeFlags&=-33554433,null}if(o=we.current,ma(t))fa(t,o);else{var s=yp(Ee.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[Et]=t,o[Dt]=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&&_l(t)}}return Sl(t),t.subtreeFlags&=-33554433,vl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&_l(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ee.current,ma(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=oa,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||lp(e.nodeValue,n)),e||da(t,!0)}else e=yp(e).createTextNode(r),e[Et]=t,t.stateNode=e}return Sl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ma(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[Et]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Sl(t),e=!1}else n=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Bo(t),t):(Bo(t),null);if(t.flags&128)throw Error(i(558))}return Sl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ma(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[Et]=t}else ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Sl(t),a=!1}else a=ga(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Bo(t),t):(Bo(t),null)}return Bo(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),bl(t,t.updateQueue),Sl(t),null);case 4:return ke(),e===null&&$f(t.stateNode.containerInfo),t.flags|=67108864,Sl(t),null;case 10:return Sa(t.type),Sl(t),null;case 19:if(Uo(t),r=t.memoizedState,r===null)return Sl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)xl(r,!1);else{if(B!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Wo(e),o!==null){for(t.flags|=128,xl(r,!1),e=o.updateQueue,t.updateQueue=e,bl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ri(n,e),n=n.sibling;return Ho(t,Vo.current&1|2),F&&ta(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&We()>Ed&&(t.flags|=128,a=!0,xl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Wo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,bl(t,e),xl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!F)return Sl(t),null}else 2*We()-r.renderingStartTime>Ed&&n!==536870912&&(t.flags|=128,a=!0,xl(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=We(),e.sibling=null,o=Vo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||F?Ho(t,o):(n=o,Ce(Po,t),Ce(Vo,n),Fo===null&&(Fo=t)),F&&ta(t,r.treeForkCount),e}return Sl(t),null;case 22:case 23:return Bo(t),No(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Sl(t),t.subtreeFlags&6&&(t.flags|=8192)):Sl(t),n=t.updateQueue,n!==null&&bl(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&&Se(Ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(Pa),Sl(t),null;case 25:return null;case 30:return t.flags|=33554432,Sl(t),null}throw Error(i(156,t.tag))}function wl(e,t){switch(ia(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(Pa),ke(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Bo(t),t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Uo(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 ke(),null;case 10:return Sa(t.type),null;case 22:case 23:return Bo(t),No(),e!==null&&Se(Ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(Pa),null;case 25:return null;default:return null}}function Tl(e,t){switch(ia(t),t.tag){case 3:Sa(Pa),ke();break;case 26:case 27:case 5:je(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Bo(t);break;case 13:Bo(t);break;case 19:Uo(t);break;case 10:Sa(t.type);break;case 22:case 23:Bo(t),No(),e!==null&&Se(Ja);break;case 24:Sa(Pa)}}function El(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){Sf(t,t.return,e)}}function Dl(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){Sf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Sf(t,t.return,e)}}function Ol(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Oo(t,n)}catch(t){Sf(e,e.return,t)}}}function kl(e,t,n){n.props=Dc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Sf(e,t,n)}}function Al(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=bi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Wp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Gp(e);f(e.child,!1,cm,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){Sf(e,t,n)}}function jl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Sf(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){Sf(e,t,n)}else n.current=null}}function Ml(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++)um(e.stateNode,t[n])}function Nl(e){for(var t=e.return;t!==null&&(Il(t)&&um(e.stateNode,t.stateNode),!Fl(t));)t=t.return}function Pl(e){for(var t=e.return;t!==null&&(Il(t)&&dm(e.stateNode,t.stateNode),!Fl(t));)t=t.return}function Fl(e){return e.tag===5||e.tag===3||e.tag===27}function Il(e){return e&&e.tag===7&&e.stateNode!==null}function Ll(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){Sf(e,e.return,t)}}function Rl(e,t,n){try{var r=e.stateNode;mp(r,e.type,n,t),r[Dt]=t}catch(t){Sf(e,e.return,t)}}function zl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mp(e.type)||e.tag===4}function Bl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||zl(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&&Mp(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 Vl(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=Sn)),Ml(e,r),Yt=!0;else if(i!==4&&(i===27&&(Ml(e,r),r=null,Mp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Vl(e,t,n,r),e=e.sibling;e!==null;)Vl(e,t,n,r),e=e.sibling}function Hl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ml(e,r),Yt=!0;else if(i!==4&&(i===27&&(Ml(e,r),r=null,Mp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Hl(e,t,n,r),e=e.sibling;e!==null;)Hl(e,t,n,r),e=e.sibling}function Ul(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[Et]=e,t[Dt]=n}catch(t){Sf(e,e.return,t)}}var Wl=!1,Gl=null;function Kl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Wl=!0)}var ql=null;function Jl(){var e=ql;return ql=null,e}var Yl=0;function Xl(e,t,n,r,i){return Yl=0,Zl(e.child,t,n,r,i)}function Zl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Rp(o);r.push(s),s.view&&(a=!0)}else a||Rp(o).view&&(a=!0);Wl=!0,Fp(o,Yl===0?t:t+`_`+Yl,n),Yl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Zl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Ql(e,t){for(;e!==null;)e.tag===5?Ip(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Ql(e.child,t)),e=e.sibling}function $l(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&($l(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=Si(t.default,t.share),t!==`none`&&(Xl(e,n,t,null,!1)||Ql(e.child,!1))}e=e.sibling}}function eu(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=bi(r,n),a=Si(r.default,n.paired?r.share:r.enter);a===`none`?$l(e):Xl(e,i,a,null,!1)?($l(e),n.paired||t||Ud(e,r.onEnter)):Ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e,t),e=e.sibling;else $l(e)}function tu(e){if(Gl!==null&&Gl.size!==0){var t=Gl;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=Si(n.default,n.share);if(a!==`none`&&(Xl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Ud(e,n.onShare)):Ql(e.child,!1)),t.delete(r),t.size===0)break}}}tu(e)}e=e.sibling}}}function nu(e){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode),r=Gl===null?void 0:Gl.get(n),i=Si(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Xl(e,n,i,null,!1)?r===void 0?Ud(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Gl.delete(n),Ud(e,t.onShare)):Ql(e.child,!1)),Gl!==null&&tu(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)nu(e),e=e.sibling;else Gl!==null&&tu(e)}function ru(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode);t=Si(t.default,t.update),e.flags&=-5,t!==`none`&&Xl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ru(e);e=e.sibling}}function iu(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,Ql(e.child,!1))}iu(e)}e=e.sibling}}function au(e){if(e.tag===30)e.stateNode.paired=null,Ql(e.child,!1),iu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)au(e),e=e.sibling;else iu(e)}function ou(e){for(e=e.child;e!==null;)e.tag===30?Ql(e.child,!1):e.subtreeFlags&33554432&&ou(e),e=e.sibling}function su(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Yl<a.length){var l=a[Yl],u=Rp(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&&Fp(c,Yl===0?n:n+`_`+Yl,i),s&&e.flags&4||(ql===null&&(ql=[]),ql.push(c,Yl===0?r:r+`_`+Yl,t.memoizedProps)),Yl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:su(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function cu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=bi(n,r),a=Si(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(zp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Yl=0,i=su(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Ud(e,n.onUpdate))}else e.subtreeFlags&33554432&&cu(e,t);e=e.sibling}}var lu=!1,uu=!1,du=!1,fu=!1,pu=typeof WeakSet==`function`?WeakSet:Set,mu=null,hu=!1,gu=!1,_u=!1,vu=!1;function yu(e,t,n){if(e=e.containerInfo,_p=Eh,e=Xr(e),Zr(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},Eh=!1,n=(n&335544064)===n,mu=t,t=n?9270:1024;mu!==null;){if(e=mu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&nu(r[a]);if(e.alternate===null&&e.flags&2)n&&Kl(e),bu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&nu(r),bu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Kl(e),bu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,mu=r):(n&&ru(e),bu(n))}}Gl=null}function bu(e){for(;mu!==null;){var t=mu,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=Dc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Sf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)fm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:fm(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=bi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=Si(a.default,a.update),a!==`none`&&Xl(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,mu=r;break}mu=t.return}}function xu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Vu(e,n),r&4&&El(5,n);break;case 1:if(Vu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Sf(n,n.return,e)}else{var i=Dc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Sf(n,n.return,e)}}}r&64&&Ol(n),r&512&&Al(n,n.return);break;case 3:if(Vu(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{Oo(e,t)}catch(e){Sf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ul(n);case 26:case 5:Vu(e,n),t===null&&r&4&&Ll(n),r&512&&Al(n,n.return);break;case 12:Vu(e,n);break;case 31:Vu(e,n),r&4&&Au(e,n);break;case 13:Vu(e,n),r&4&&ju(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ef.bind(null,n),vm(e,n))));break;case 22:if(r=n.memoizedState!==null||lu,!r){var a=t!==null&&t.memoizedState!==null||uu;t=lu,i=uu,lu=r,(uu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Uu(e,n,r)):Vu(e,n),lu=t,uu=i}break;case 30:Vu(e,n),r&512&&Al(n,n.return);break;case 7:r&512&&Al(n,n.return);default:Vu(e,n)}}function Su(e,t){for(e=e.child;e!==null;)Cu(e,t),e=e.sibling}function Cu(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){Sf(e,e.return,t)}wu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Yt=!0}catch(t){Sf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Pp(s,!0):Pp(e.stateNode,!1)}catch(t){Sf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&Su(e,t);break;default:Su(e,t)}}function wu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:Cu(n,r);break a;case 22:n.memoizedState===null&&wu(n,r);break a;default:wu(n,r)}}e=e.sibling}}function Tu(e){var t=e.alternate;t!==null&&(e.alternate=null,Tu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ft(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 Eu=null,Du=!1;function Ou(e,t,n){for(n=n.child;n!==null;)ku(e,t,n),n=n.sibling}function ku(e,t,n){if(et&&typeof et.onCommitFiberUnmount==`function`)try{et.onCommitFiberUnmount($e,n)}catch{}switch(n.tag){case 26:uu||jl(n,t),Ou(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!uu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:uu||jl(n,t),Pl(n);var r=Eu,i=Du;Mp(n.type)&&(Eu=n.stateNode,Du=!1),Ou(e,t,n),Em(n.stateNode,n.type,n.memoizedProps),Eu=r,Du=i;break;case 5:uu||jl(n,t),Pl(n);case 6:if(n.tag===6&&Pl(n),r=Eu,i=Du,Eu=null,Ou(e,t,n),Eu=r,Du=i,Eu!==null){if(Du)try{(Eu.nodeType===9?Eu.body:Eu.nodeName===`HTML`?Eu.ownerDocument.body:Eu).removeChild(n.stateNode),Yt=!0}catch(e){Sf(n,t,e)}else try{Eu.removeChild(n.stateNode),Yt=!0}catch(e){Sf(n,t,e)}}break;case 18:Eu!==null&&(Du?(e=Eu,Np(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Zh(e)):Np(Eu,n.stateNode));break;case 4:r=Eu,i=Du,Eu=n.stateNode.containerInfo,Du=!0,Ou(e,t,n),Eu=r,Du=i;break;case 0:case 11:case 14:case 15:Dl(2,n,t),uu||Dl(4,n,t),Ou(e,t,n);break;case 1:uu||(jl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&kl(n,t,r)),Ou(e,t,n);break;case 21:Ou(e,t,n);break;case 22:uu=(r=uu)||n.memoizedState!==null,Ou(e,t,n),uu=r;break;case 30:jl(n,t),Ou(e,t,n);break;case 7:uu||jl(n,t),Ou(e,t,n);break;default:Ou(e,t,n)}}function Au(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zh(e)}catch(e){Sf(t,t.return,e)}}}function ju(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){Sf(t,t.return,e)}}function Mu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pu),t;default:throw Error(i(435,e.tag))}}function Nu(e,t){var n=Mu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Df.bind(null,e,t);t.then(r,r)}})}function Pu(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(Mp(l.type)){Eu=l.stateNode,Du=!1;break a}break;case 5:Eu=l.stateNode,Du=!1;break a;case 3:case 4:Eu=l.stateNode.containerInfo,Du=!0;break a}l=l.return}if(Eu===null)throw Error(i(160));ku(s,c,o),Eu=null,Du=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Iu(t,e,n),t=t.sibling}var Fu=null;function Iu(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}Pu(t,e,n),Lu(e),a&4&&(Dl(3,e,e.return),El(3,e),Dl(5,e,e.return));break;case 1:Pu(t,e,n),Lu(e),a&512&&(uu||r===null||jl(r,r.return)),a&64&&lu&&(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=Fu,Pu(t,e,n),Lu(e),a&512&&(uu||r===null||jl(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(lu)e.stateNode=Sp(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[Nt]||r[Et]||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[Et]=e,zt(r),t=r;break a;case`link`:if(o=th(`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=th(`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[Et]=e,zt(r),t=r}e.stateNode=t}}else lu||nh(o,e.type,e.stateNode)}else e.stateNode=Xm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Rl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||uu||t.parentNode.removeChild(t)):a.count--,n===null?lu||nh(o,e.type,e.stateNode):Xm(o,n,e.memoizedProps))}break;case 27:Pu(t,e,n),Lu(e),a&512&&(uu||r===null||jl(r,r.return)),r!==null&&a&4&&Rl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=du,du=!1,Pu(t,e,n),du=o,Lu(e),a&512&&(uu||r===null||jl(r,r.return)),e.flags&32){t=e.stateNode;try{mn(t,``),Yt=!0}catch(t){Sf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Rl(e,t,r===null?t:r.memoizedProps)),a&1024&&(fu=!0);break;case 6:if(Pu(t,e,n),Lu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Yt=!0}catch(t){Sf(e,e.return,t)}}break;case 3:if(Yt=!1,eh=null,o=Fu,Fu=Am(t.containerInfo),Pu(t,e,n),Fu=o,Lu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Zh(t.containerInfo)}catch(t){Sf(e,e.return,t)}fu&&(fu=!1,Ru(e)),Yt=!1;break;case 4:a=du,du=lu,r=Xt(),o=Fu,Fu=Am(e.stateNode.containerInfo),Pu(t,e,n),Lu(e),Fu=o,Yt&&gu&&(_u=!0),Yt=r,du=a;break;case 12:Pu(t,e,n),Lu(e);break;case 31:Pu(t,e,n),Lu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nu(e,t)));break;case 13:Pu(t,e,n),Lu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(wd=We()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=lu,l=uu,u=du;lu=c||o,du=u||o,uu=l||s,Pu(t,e,n),uu=l,du=u,lu=c,Lu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||lu||uu||(t=s||uu,n=lu,r=uu,lu=o||lu,uu=t,Hu(e,2),lu=n,uu=r),!o&&du||Su(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Nu(e,n))));break;case 19:Pu(t,e,n),Lu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Nu(e,t)));break;case 30:a&512&&(uu||r===null||jl(r,r.return)),a=Xt(),o=gu,s=(n&335544064)===n,c=e.memoizedProps,gu=s&&Si(c.default,c.update)!==`none`,Pu(t,e,n),Lu(e),s&&r!==null&&Yt&&(e.flags|=4),gu=o,Yt=a;break;case 21:break;case 7:a&512&&(uu||r===null||jl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Pu(t,e,n),Lu(e)}}function Lu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(zl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Il(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Fl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Hl(e,Bl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(mn(l,``),n.flags&=-33),Hl(e,Bl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Vl(e,Bl(e),u,s);break;default:throw Error(i(161))}}catch(t){Sf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ru(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ru(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Eh=!0,t.reset(),Eh=!1),e=e.sibling}}function zu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Bu(t,e),t=t.sibling;else cu(t,!1)}function Bu(e,t){var n=e.alternate;if(n===null)eu(e,!1);else switch(e.tag){case 3:if(vu=hu=!1,Jl(),zu(t,e),!hu&&!_u){if(e=ql,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ip(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`})),vu=!0}ql=null;break;case 5:zu(t,e);break;case 4:r=hu,hu=!1,zu(t,e),hu&&(_u=!0),hu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?zu(t,e):eu(e,!1));break;case 30:r=hu,i=Jl(),hu=!1,zu(t,e),hu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=bi(a,o),o=bi(n.memoizedProps,o);var s=Si(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Yl=0,t=su(e,n,t,o,s,a,!0),Yl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Ud(e,e.memoizedProps.onUpdate),ql=i):i!==null&&(i.push.apply(i,ql),ql=i),hu=e.flags&32?!0:r;break;default:zu(t,e)}}function Vu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)xu(e,t.alternate,t),t=t.sibling}function Hu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Dl(4,n,n.return),Hu(n,r);break;case 1:jl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&kl(n,n.return,i),Hu(n,r);break;case 27:r&2&&Em(n.stateNode,n.type,n.memoizedProps);case 5:jl(n,n.return),n.tag!==5&&n.tag!==27||Pl(n),Hu(n,r);break;case 6:Pl(n);break;case 26:jl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||uu||i.parentNode.removeChild(i),Hu(n,r);break;case 22:n.memoizedState===null&&Hu(n,r);break;case 30:jl(n,n.return),Hu(n,r);break;case 7:jl(n,n.return);default:Hu(n,r)}e=e.sibling}}function Uu(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:Uu(i,a,n),El(4,a);break;case 1:if(Uu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Sf(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++)Do(l[i],c)}catch(e){Sf(r,r.return,e)}}s&&o&64&&Ol(a),Al(a,a.return);break;case 27:n&2&&Ul(a);case 5:a.tag!==5&&a.tag!==27||Nl(a),Uu(i,a,n),s&&r===null&&o&4&&Ll(a),Al(a,a.return);break;case 6:Nl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||lu||nh(Am(c.ownerDocument),a.type,c),Uu(i,a,n),s&&r===null&&o&4&&Ll(a),Al(a,a.return);break;case 12:Uu(i,a,n);break;case 31:Uu(i,a,n),s&&o&4&&Au(i,a);break;case 13:Uu(i,a,n),s&&o&4&&ju(i,a);break;case 22:a.memoizedState===null&&Uu(i,a,n),Al(a,a.return);break;case 30:Uu(i,a,n),Al(a,a.return);break;case 7:Al(a,a.return);default:Uu(i,a,n)}t=t.sibling}}function Wu(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&&Ia(n))}function Gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ia(e))}function Ku(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)qu(e,t,n,r),t=t.sibling;else i&&ou(t)}function qu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&au(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ku(e,t,n,r),a&2048&&El(9,t);break;case 1:Ku(e,t,n,r);break;case 3:Ku(e,t,n,r),i&&vu&&(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&&Ia(a)));break;case 12:if(a&2048){Ku(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){Sf(t,t.return,e)}}else Ku(e,t,n,r);break;case 31:Ku(e,t,n,r);break;case 13:Ku(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&&au(t),o._visibility&2?Ku(e,t,n,r):(o._visibility|=2,Ju(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&au(s),o._visibility&2?Ku(e,t,n,r):Yu(e,t)),a&2048&&Wu(s,t);break;case 24:Ku(e,t,n,r),a&2048&&Gu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Ql(a.child,!0),Ql(t.child,!0))),Ku(e,t,n,r);break;default:Ku(e,t,n,r)}}function Ju(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:Ju(a,o,s,c,i),El(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ju(a,o,s,c,i)):u._visibility&2?Ju(a,o,s,c,i):Yu(a,o),i&&l&2048&&Wu(o.alternate,o);break;case 24:Ju(a,o,s,c,i),i&&l&2048&&Gu(o.alternate,o);break;default:Ju(a,o,s,c,i)}t=t.sibling}}function Yu(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:Yu(n,r),i&2048&&Wu(r.alternate,r);break;case 24:Yu(n,r),i&2048&&Gu(r.alternate,r);break;default:Yu(n,r)}t=t.sibling}}var Xu=8192;function Zu(e,t,n){if(e.subtreeFlags&Xu)for(e=e.child;e!==null;)Qu(e,t,n),e=e.sibling}function Qu(e,t,n){switch(e.tag){case 26:Zu(e,t,n),e.flags&Xu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&sh(n,e)):ch(n,Fu,e.memoizedState,e.memoizedProps));break;case 5:Zu(e,t,n),e.flags&Xu&&(e=e.stateNode,(t&335544128)===t&&sh(n,e));break;case 3:case 4:var r=Fu;Fu=Am(e.stateNode.containerInfo),Zu(e,t,n),Fu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Xu,Xu=16777216,Zu(e,t,n),Xu=r):Zu(e,t,n));break;case 30:if((e.flags&Xu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Gl===null&&(Gl=new Map),Gl.set(r,i)}Zu(e,t,n);break;default:Zu(e,t,n)}}function $u(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 ed(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];mu=r,rd(r,e)}$u(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)td(e),e=e.sibling}function td(e){switch(e.tag){case 0:case 11:case 15:ed(e),e.flags&2048&&Dl(9,e,e.return);break;case 3:ed(e);break;case 12:ed(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,nd(e)):ed(e);break;default:ed(e)}}function nd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];mu=r,rd(r,e)}$u(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dl(8,t,t.return),nd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,nd(t));break;default:nd(t)}e=e.sibling}}function rd(e,t){for(;mu!==null;){var n=mu;switch(n.tag){case 0:case 11:case 15:Dl(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:Ia(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,mu=r;else a:for(n=e;mu!==null;){r=mu;var i=r.sibling,a=r.return;if(Tu(r),r===n){mu=null;break a}if(i!==null){i.return=a,mu=i;break a}mu=a}}}var id={getCacheForType:function(e){var t=Oa(Pa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Oa(Pa).controller.signal}},ad=typeof WeakMap==`function`?WeakMap:Map,od=0,sd=null,R=null,z=0,cd=0,ld=null,ud=!1,dd=!1,fd=!1,pd=0,B=0,md=0,gd=0,vd=0,yd=0,bd=0,xd=null,Sd=null,Cd=!1,wd=0,Td=0,Ed=1/0,Dd=null,Od=null,kd=0,Ad=null,jd=null,Md=0,Nd=0,Pd=null,Fd=null,Id=null,Ld=null,Rd=null,zd=0,Bd=null;function Vd(){return od&2&&z!==0?z&-z:j.T===null?Ct():Uf()}function Hd(){if(yd===0){if(!(z&536870912)||F){var e=st;st<<=1,!(st&3932160)&&(st=262144),yd=e}else yd=536870912}return e=Po.current,e!==null&&(e.flags|=32),yd}function Ud(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Wp(bi(e.memoizedProps,n))),Ld===null&&(Ld=[]),Ld.push(t.bind(null,r))}}function Wd(e,t,n){(e===sd&&(cd===2||cd===9)||e.cancelPendingCommit!==null)&&(Xd(e,0),qd(e,z,yd,!1)),gt(e,n),(!(od&2)||e!==sd)&&(e===sd&&(!(od&2)&&(gd|=n),B===4&&qd(e,z,yd,!1)),Ff(e))}function Gd(e,t,n){if(od&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||dt(e,t),a=r?af(e,t):nf(e,t,!0),o=r;do{if(a===0){dd&&!r&&qd(e,t,0,!1);break}if(n=e.current.alternate,o&&!V(n)){a=nf(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=xd;var l=c.current.memoizedState.isDehydrated;if(l&&(Xd(c,s).flags|=256),s=nf(c,s,!1),s!==2&&s!==6){if(fd&&!l){c.errorRecoveryDisabledLanes|=o,gd|=o,a=4;break a}o=Sd,Sd=a,o!==null&&(Sd===null?Sd=o:Sd.push.apply(Sd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Xd(e,0),qd(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:qd(r,t,yd,!ud);break a;case 2:Sd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=wd+300-We(),10<a)){if(qd(r,t,yd,!ud),ut(r,0,!0)!==0)break a;Md=t,r.timeoutHandle=Ep(Kd.bind(null,r,n,Sd,Dd,Cd,t,yd,gd,bd,ud,o,`Throttled`,-0,0),a);break a}Kd(r,n,Sd,Dd,Cd,t,yd,gd,bd,ud,o,null,-0,0)}break}while(1);Ff(e)}function Kd(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:Sn},Gl=null,Qu(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=fh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?wd-We():(a&4194048)===a?Td-We():0,m=uh(d,m),m!==null)){Md=a,e.cancelPendingCommit=m(df.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),qd(e,a,o,!l);return}df(e,t,a,n,r,i,o,s,c,l,u,d)}function V(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(!Wr(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 qd(e,t,n,r){t=ft(e,t),t&=~vd,t&=~gd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-nt(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&vt(e,n,t)}function Jd(){return od&6?!0:(If(0,!1),!1)}function Yd(){if(R!==null){if(cd===0)var e=R.return;else e=R,ba=ya=null,ls(e),co=null,lo=0,e=R;for(;e!==null;)Tl(e.alternate,e),e=e.return;R=null}}function Xd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Dp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Md=0,Yd(),sd=e,R=n=Li(e.current,null),z=t,cd=0,ld=null,ud=!1,dd=dt(e,t),fd=!1,bd=yd=vd=gd=md=B=0,Sd=xd=null,Cd=!1,pd=ft(e,t),Di(),n}function Zd(e,t){I=null,j.H=yc,t===Qa||t===eo?(t=oo(),cd=3):t===$a?(t=oo(),cd=4):cd=t===Lc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ld=t,R===null&&(B=1,jc(e,Gi(t,e.current)))}function Qd(){var e=Po.current;return e===null?!0:(z&4194048)===z?Fo===null:(z&62914560)===z||z&536870912?e===Fo:!1}function $d(){var e=j.H;return j.H=yc,e===null?yc:e}function ef(){var e=j.A;return j.A=id,e}function tf(){B=4,ud||(z&4194048)!==z&&Po.current!==null||(dd=!0),!(md&134217727)&&!(gd&134217727)||sd===null||qd(sd,z,yd,!1)}function nf(e,t,n){var r=od;od|=2;var i=$d(),a=ef();(sd!==e||z!==t)&&(Dd=null,Xd(e,t)),t=!1;var o=B;a:do try{if(cd!==0&&R!==null){var s=R,c=ld;switch(cd){case 8:Yd(),o=6;break a;case 3:case 2:case 9:case 6:Po.current===null&&(t=!0);var l=cd;if(cd=0,ld=null,cf(e,s,c,l),n&&dd){o=0;break a}break;default:l=cd,cd=0,ld=null,cf(e,s,c,l)}}rf(),o=B;break}catch(t){Zd(e,t)}while(1);return t&&e.shellSuspendCounter++,ba=ya=null,od=r,j.H=i,j.A=a,R===null&&(sd=null,z=0,Di()),o}function rf(){for(;R!==null;)H(R)}function af(e,t){var n=od;od|=2;var r=$d(),a=ef();sd!==e||z!==t?(Dd=null,Ed=We()+500,Xd(e,t)):dd=dt(e,t);a:do try{if(cd!==0&&R!==null){t=R;var o=ld;b:switch(cd){case 1:cd=0,ld=null,cf(e,t,o,1);break;case 2:case 9:if(no(o)){cd=0,ld=null,sf(t);break}t=function(){cd!==2&&cd!==9||sd!==e||(cd=7),Ff(e)},o.then(t,t);break a;case 3:cd=7;break a;case 4:cd=5;break a;case 7:no(o)?(cd=0,ld=null,sf(t)):(cd=0,ld=null,cf(e,t,o,7));break;case 5:var s=null;switch(R.tag){case 26:s=R.memoizedState;case 5:case 27:var c=R;if(s?ah(s):c.stateNode.complete){cd=0,ld=null;var l=c.sibling;if(l!==null)R=l;else{var u=c.return;u===null?R=null:(R=u,lf(u))}break b}}cd=0,ld=null,cf(e,t,o,5);break;case 6:cd=0,ld=null,cf(e,t,o,6);break;case 8:Yd(),B=6;break a;default:throw Error(i(462))}}of();break}catch(t){Zd(e,t)}while(1);return ba=ya=null,j.H=r,j.A=a,od=n,R===null?(sd=null,z=0,Di(),B):0}function of(){for(;R!==null&&!He();)H(R)}function H(e){var t=gl(e.alternate,e,pd);e.memoizedProps=e.pendingProps,t===null?lf(e):R=t}function sf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Zc(n,t,t.pendingProps,t.type,void 0,z);break;case 11:t=Zc(n,t,t.pendingProps,t.type.render,t.ref,z);break;case 5:ls(t);var r=t;r===oa&&(F?(pa(r),r.tag===5&&r.stateNode!=null&&(sa=r.stateNode)):(pa(r),F=!0));default:Tl(n,t),t=R=Ri(t,pd),t=gl(n,t,pd)}e.memoizedProps=e.pendingProps,t===null?lf(e):R=t}function cf(e,t,n,r){ba=ya=null,ls(t),co=null,lo=0;var i=t.return;try{if(Ic(e,i,t,n,z)){B=1,jc(e,Gi(n,e.current)),R=null;return}}catch(t){if(i!==null)throw R=i,t;B=1,jc(e,Gi(n,e.current)),R=null;return}t.flags&32768?(F||r===1?e=!0:dd||z&536870912?e=!1:(ud=e=!0,(r===2||r===9||r===3||r===6)&&(r=Po.current,r!==null&&r.tag===13&&(r.flags|=16384))),uf(t,e)):lf(t)}function lf(e){var t=e;do{if(t.flags&32768){uf(t,ud);return}e=t.return;var n=Cl(t.alternate,t,pd);if(n!==null){R=n;return}if(t=t.sibling,t!==null){R=t;return}R=t=e}while(t!==null);B===0&&(B=5)}function uf(e,t){do{var n=wl(e.alternate,e);if(n!==null){n.flags&=32767,R=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){R=e;return}R=e=n}while(e!==null);B=6,R=null}function df(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do yf();while(kd!==0);if(od&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===sd&&(R=sd=null,z=0),jd=t,Ad=e,Md=n,Pd=a,Fd=r,ff(e,t,n,s,c,l,f)}}function ff(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Nd=s,s|=Ei,_t(e,n,s,r,i,a),Ld=null,(n&335544064)===n?(Rd=za(e),r=10262):(Rd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Of(Je,function(){return bf(),null})):(e.callbackNode=null,e.callbackPriority=0),Wl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,a=od,od|=4;try{yu(e,t,n)}finally{od=a,M.p=i,j.T=r}}kd=1,Wl?Id=Hp(o,e.containerInfo,Rd,hf,gf,mf,_f,bf,pf,null,null):(hf(),gf(),_f())}function pf(e){if(kd!==0){var t=Ad.onRecoverableError;t(e,{componentStack:null})}}function mf(){kd===3&&(kd=0,Bu(jd,Ad),kd=4)}function hf(){if(kd===1){kd=0;var e=Ad,t=jd,n=Md,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=j.T,j.T=null;var i=M.p;M.p=2;var a=od;od|=4;try{gu=_u=!1,Iu(t,e,n),n=vp;var o=Xr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Yr(s.ownerDocument.documentElement,s)){if(c!==null&&Zr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Jr(s,h),v=Jr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Eh=!!_p,vp=_p=null}finally{od=a,M.p=i,j.T=r}}e.current=t,kd=2}}function gf(){if(kd===2){kd=0;var e=Ad,t=jd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=od;od|=4;try{xu(e,t.alternate,t)}finally{od=i,M.p=r,j.T=n}}kd=3}}function _f(){if(kd===4||kd===3){kd=0;var e=Id;Id=null,Ue();var t=Ad,n=jd,r=Md,i=Fd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?kd=5:(kd=0,jd=Ad=null,vf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Od=null),St(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot==`function`)try{et.onCommitFiberRoot($e,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=j.T,a=M.p,M.p=2,j.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{j.T=n,M.p=a}}if(i=Ld,o=Rd,Rd=null,i!==null&&(Ld=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);Md&3&&yf(),Ff(t),a=t.pendingLanes,r&261930&&a&42?t===Bd?zd++:(zd=0,Bd=t):(zd=0,Bd=null),If(0,!1)}}function vf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ia(t)))}function yf(){return Id!==null&&(Id.skipTransition(),Id=null),hf(),gf(),_f(),bf()}function bf(){if(kd!==5)return!1;var e=Ad,t=Nd;Nd=0;var n=St(Md),r=j.T,a=M.p;try{M.p=32>n?32:n,j.T=null,n=Pd,Pd=null;var o=Ad,s=Md;if(kd=0,jd=Ad=null,Md=0,od&6)throw Error(i(331));var c=od;if(od|=4,td(o.current),qu(o,o.current,s,n),od=c,If(0,!1),et&&typeof et.onPostCommitFiberRoot==`function`)try{et.onPostCommitFiberRoot($e,o)}catch{}return!0}finally{M.p=a,j.T=r,vf(e,t)}}function xf(e,t,n){t=Gi(n,t),t=Nc(e.stateNode,t,2),e=xo(e,t,2),e!==null&&(gt(e,2),Ff(e))}function Sf(e,t,n){if(e.tag===3)xf(e,e,n);else for(;t!==null;){if(t.tag===3){xf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Od===null||!Od.has(r))){e=Gi(n,e),n=Pc(2),r=xo(t,n,2),r!==null&&(Fc(n,r,t,e),gt(r,2),Ff(r));break}}t=t.return}}function Cf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ad;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)||(fd=!0,i.add(n),e=wf.bind(null,e,t,n),t.then(e,e))}function wf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,sd===e&&(z&n)===n&&(B===4||B===3&&(z&62914560)===z&&300>We()-wd?od&2?vd|=n:Xd(e,0):vd|=n,bd===z&&(bd=0)),Ff(e)}function Tf(e,t){t===0&&(t=mt()),e=Ai(e,t),e!==null&&(gt(e,t),Ff(e))}function Ef(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tf(e,n)}function Df(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),Tf(e,n)}function Of(e,t){return Be(e,t)}var kf=null,Af=null,jf=!1,Mf=!1,Nf=!1,Pf=0;function Ff(e){e!==Af&&e.next===null&&(Af===null?kf=Af=e:Af=Af.next=e),Mf=!0,jf||(jf=!0,Hf())}function If(e,t){if(!Nf&&Mf){Nf=!0;do for(var n=!1,r=kf;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-nt(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Vf(r,a))}else a=z,a=ut(r,r===sd?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||dt(r,a)||(n=!0,Vf(r,a))}r=r.next}while(n);Nf=!1}}function Lf(){Rf()}function Rf(){Mf=jf=!1;var e=0;Pf!==0&&Tp()&&(e=Pf);for(var t=We(),n=null,r=kf;r!==null;){var i=r.next,a=zf(r,t);a===0?(r.next=null,n===null?kf=i:n.next=i,i===null&&(Af=n)):(n=r,(e!==0||a&3)&&(Mf=!0)),r=i}kd!==0&&kd!==5||If(e,!1),Pf!==0&&(Pf=0)}function zf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=pt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=sd,n=z,n=ut(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(cd===2||cd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ve(r),St(n)){case 2:case 8:n=qe;break;case 32:n=Je;break;case 268435456:n=Xe;break;default:n=Je}return r=Bf.bind(null,e),n=Be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ve(r),e.callbackPriority=2,e.callbackNode=null,2}function Bf(e,t){if(kd!==0&&kd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(yf()&&e.callbackNode!==n)return null;var r=z;return r=ut(e,e===sd?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Gd(e,r,t),zf(e,We()),e.callbackNode!=null&&e.callbackNode===n?Bf.bind(null,e):null)}function Vf(e,t){if(yf())return null;Gd(e,t,!0)}function Hf(){Ap(function(){od&6?Be(Ke,Lf):Rf()})}function Uf(){if(Pf===0){var e=Ha;e===0&&(e=ot,ot<<=1,!(ot&261888)&&(ot=256)),Pf=e}return Pf}function Wf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:xn(e)}function Gf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Wf((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Wf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Hn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pf!==0){var e=new FormData(i,o);ac(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ac(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Kf=0;Kf<_i.length;Kf++){var qf=_i[Kf];vi(qf.toLowerCase(),`on`+(qf[0].toUpperCase()+qf.slice(1)))}vi(li,`onAnimationEnd`),vi(ui,`onAnimationIteration`),vi(di,`onAnimationStart`),vi(`dblclick`,`onDoubleClick`),vi(`focusin`,`onFocus`),vi(`focusout`,`onBlur`),vi(fi,`onTransitionRun`),vi(pi,`onTransitionStart`),vi(mi,`onTransitionCancel`),vi(hi,`onTransitionEnd`),Wt(`onMouseEnter`,[`mouseout`,`mouseover`]),Wt(`onMouseLeave`,[`mouseout`,`mouseover`]),Wt(`onPointerEnter`,[`pointerout`,`pointerover`]),Wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ut(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ut(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ut(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ut(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ut(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ut(`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){Ci(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){Ci(e)}i.currentTarget=null,a=c}}}}function U(e,t){var n=t[kt];n===void 0&&(n=t[kt]=new Set);var r=e+`__bubble`;n.has(r)||(ep(t,e,2,!1),n.add(r))}function Zf(e,t,n){var r=0;t&&(r|=4),ep(n,e,r,t)}var Qf=`_reactListening`+Math.random().toString(36).slice(2);function $f(e){if(!e[Qf]){e[Qf]=!0,Vt.forEach(function(t){t!==`selectionchange`&&(Yf.has(t)||Zf(t,!1,e),Zf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qf]||(t[Qf]=!0,Zf(`selectionchange`,!1,t))}}function ep(e,t,n,r){switch(Nh(t)){case 2:var i=Dh;break;case 8:i=Oh;break;default:i=kh}n=i.bind(null,t,n,e),i=void 0,!jn||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 tp(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=N(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}kn(function(){var r=a,i=wn(n),s=[];a:{var c=gi.get(e);if(c!==void 0){var l=Hn,u=e;switch(e){case`keypress`:if(Ln(n)===0)break a;case`keydown`:case`keyup`:l=or;break;case`focusin`:u=`focus`,l=Zn;break;case`focusout`:u=`blur`,l=Zn;break;case`beforeblur`:case`afterblur`:l=Zn;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=Yn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=lr;break;case li:case ui:case di:l=Qn;break;case hi:l=ur;break;case`scroll`:case`scrollend`:l=Wn;break;case`wheel`:l=dr;break;case`copy`:case`cut`:case`paste`:l=$n;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=sr;break;case`submit`:l=cr;break;case`toggle`:case`beforetoggle`:l=fr}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=An(m,p),g!=null&&d.push(np(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!==Cn&&(u=n.relatedTarget||n.fromElement)&&(N(u)||u[Ot]))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?N(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=Yn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=sr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Lt(c),h=l==null?u:Lt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,N(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,ip):null,c!==null&&ap(s,u,c,d,!1),l!==null&&f!==null&&ap(s,f,l,d,!0)))}a:{if(c=r?Lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Mr;else if(Er(c)){if(Nr)_=Hr;else{_=Br;var v=zr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&vn(r.elementType)&&(_=Mr):_=Vr;if(_&&=_(e,r)){Dr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Lt(r):window,e){case`focusin`:(Er(v)||v.contentEditable===`true`)&&($r=v,ei=r,ti=null);break;case`focusout`:ti=ei=$r=null;break;case`mousedown`:ni=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ni=!1,ri(s,n,i);break;case`selectionchange`:if(Qr)break;case`keydown`:case`keyup`:ri(s,n,i)}var y;if(mr)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 Sr?br(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(_r&&n.locale!==`ko`&&(Sr||b!==`onCompositionStart`?b===`onCompositionEnd`&&Sr&&(y=In()):(Nn=i,Pn=`value`in Nn?Nn.value:Nn.textContent,Sr=!0)),v=rp(r,b),0<v.length&&(b=new er(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=xr(n),y!==null&&(b.data=y)))),(y=gr?Cr(e,n):wr(e,n))&&(b=rp(r,`onBeforeInput`),0<b.length&&(v=new er(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Gf(s,e,r,n,i)}Xf(s,t)})}function np(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rp(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=An(e,n),i!=null&&r.unshift(np(e,i,a)),i=An(e,t),i!=null&&r.push(np(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ip(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(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=An(n,a),l!=null&&o.unshift(np(n,l,c))):i||(l=An(n,a),l!=null&&o.push(np(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===``||mn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&mn(e,``+r);else return;break;case`className`:Qt(e,`class`,r);break;case`tabIndex`:Qt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Qt(e,n,r);break;case`style`:_n(e,r,o);return;case`data`:if(t!==`object`){Qt(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=xn(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=xn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Sn);return;case`onScroll`:r!=null&&U(`scroll`,e);return;case`onScrollEnd`:r!=null&&U(`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=xn(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`:U(`beforetoggle`,e),U(`toggle`,e),Zt(e,`popover`,r);break;case`xlinkActuate`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:$t(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:$t(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Zt(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=yn.get(n)||n,Zt(e,n,r);else return}Yt=!0}function dp(e,t,n,r,a,o){switch(n){case`style`:_n(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`)mn(e,r);else if(typeof r==`number`||typeof r==`bigint`)mn(e,``+r);else return;break;case`onScroll`:r!=null&&U(`scroll`,e);return;case`onScrollEnd`:r!=null&&U(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=Sn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Ht.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[Dt]||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}Yt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Zt(e,n,r)}return}Yt=!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`:U(`error`,e),U(`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`:U(`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)}}ln(e,o,c,l,u,s,a,!1);return;case`select`:for(a in U(`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&&dn(e,!!r,n,!0):dn(e,!!r,t,!1);return;case`textarea`:for(s in U(`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)}pn(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`:U(`beforetoggle`,e),U(`toggle`,e),U(`cancel`,e),U(`close`,e);break;case`iframe`:case`object`:U(`load`,e);break;case`video`:case`audio`:for(r=0;r<Jf.length;r++)U(Jf[r],e);break;case`image`:U(`error`,e),U(`load`,e);break;case`details`:U(`toggle`,e);break;case`embed`:case`source`:case`link`:U(`error`,e),U(`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(vn(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&&(Yt=!0),o=m;break;case`name`:m!==f&&(Yt=!0),a=m;break;case`checked`:m!==f&&(Yt=!0),u=m;break;case`defaultChecked`:m!==f&&(Yt=!0),d=m;break;case`value`:m!==f&&(Yt=!0),s=m;break;case`defaultValue`:m!==f&&(Yt=!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)}}cn(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&&(Yt=!0),p=o;break;case`defaultValue`:o!==l&&(Yt=!0),c=o;break;case`multiple`:o!==l&&(Yt=!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?dn(e,!!n,n?[]:``,!1):dn(e,!!n,t,!0)):dn(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&&(Yt=!0),p=a;break;case`defaultValue`:a!==o&&(Yt=!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)}fn(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&&(Yt=!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(vn(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 yp(e){return e.nodeType===9?e:e.ownerDocument}function bp(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 xp(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 Sp(e,t,n,r){return n=yp(n).createElement(e),n[Et]=r,n[Dt]=t,fp(n,e,t),zt(n),n}function Cp(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 wp=null;function Tp(){var e=window.event;return e&&e.type===`popstate`?e!==wp&&(wp=e,!0):(wp=null,!1)}var Ep=typeof setTimeout==`function`?setTimeout:void 0,Dp=typeof clearTimeout==`function`?clearTimeout:void 0,Op=typeof Promise==`function`?Promise:void 0,kp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Ep,Ap=typeof queueMicrotask==`function`?queueMicrotask:Op===void 0?Ep:function(e){return Op.resolve(null).then(e).catch(jp)};function jp(e){setTimeout(function(){throw e})}function Mp(e){return e===`head`}function Np(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`)Dm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Dm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Dm(e.ownerDocument.body)}n=i}while(n);Zh(t)}function Pp(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 Fp(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 Ip(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 Lp(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 Rp(e){return Lp(e.getBoundingClientRect(),getComputedStyle(e),e)}function zp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Lp(t,n,e)}function Bp(e){return e.documentElement.clientHeight}function Vp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Hp(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`&&(Bp(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+=oh(f),u>lh){s.length=o;break}f=new Promise(Vp.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 Up(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Up.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Up.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},Up.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Wp(e){return{name:e,group:new Up(`group`,e),imagePair:new Up(`image-pair`,e),old:new Up(`old`,e),new:new Up(`new`,e)}}function Gp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Gp.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(Xp(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=Jp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),f(this._fragmentFiber.child,!1,Kp,e,s,r)}this._eventListeners=a}};function Kp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Gp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Xp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Jp(i.optionsOrUseCapture),f(this._fragmentFiber.child,!1,qp,e,n,i),r.splice(t,1),a!==null&&a()}};function qp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Jp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Yp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Xp(e,t,n,r){if(e.length===0)return-1;r=Yp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Yp(a.optionsOrUseCapture)===r)return i}return-1}Gp.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,Jp(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,Jp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Gp.prototype.focus=function(e){f(this._fragmentFiber.child,!0,Zp,e,void 0,void 0)};function Zp(e,t){return e.tag!==6&&(e=v(e),Cm(e,t))}Gp.prototype.focusLast=function(e){var t=[];f(this._fragmentFiber.child,!0,Qp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Zp(t[n],e);n--);};function Qp(e,t){return t.push(e),!1}Gp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=yp(e).activeElement,e!==null&&f(this._fragmentFiber.child,!1,$p,e,void 0,void 0))};function $p(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Gp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),f(this._fragmentFiber.child,!1,em,e,void 0,void 0)};function em(e,t){return e.tag!==6&&(e=v(e),t.observe(e),!1)}Gp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),f(this._fragmentFiber.child,!1,tm,e,void 0,void 0);for(var n=t=0;n<nm.length;n++){var r=nm[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):nm[t++]=r}nm.length=t}};function tm(e,t){return e.tag!==6&&(e=v(e),t.unobserve(e),!1)}var nm=[],rm=!1;function im(e,t,n){nm.push({fragmentInstance:e,observer:t,instance:n}),rm||(rm=!0,wm(function(){rm=!1;var e=nm;nm=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Gp.prototype.getClientRects=function(){var e=[];return f(this._fragmentFiber.child,!1,am,e,void 0,void 0),e};function am(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}Gp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Gp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];f(this._fragmentFiber.child,!1,Qp,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||om(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function om(e,t,n,r,i){var a=N(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 sm(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)}Gp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];f(this._fragmentFiber.child,!1,Qp,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),sm(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),sm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function cm(e,t){return e=v(e),lm(e,t),!1}function lm(e,t){e.reactFragments??=new Set,e.reactFragments.add(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.addEventListener(i.type,i.attachedListener,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<nm.length;i++){var a=nm[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(nm[r++]=a)}nm.length=r,n.observe(e)}),lm(e,t))}function dm(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,Jp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?im(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function fm(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`:fm(n),Ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pm(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[Nt])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=ym(e.nextSibling),e===null)break}return null}function mm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ym(e.nextSibling),e===null))return null;return e}function hm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ym(e.nextSibling),e===null))return null;return e}function gm(e){return e.data===`$?`||e.data===`$~`}function _m(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vm(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 ym(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 bm=null;function xm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ym(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sm(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 Cm(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 wm(e){kp(function(){kp(function(t){return e(t)})})}function Tm(e,t,n){switch(t=yp(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 Em(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===Sn&&(e.onclick=null),Ft(e)}function Dm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ft(e)}var Om=new Map,km=new Set;function Am(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 jm=M.d;M.d={f:Mm,r:Nm,D:Im,C:Lm,L:Rm,m:zm,X:Vm,S:Bm,M:Hm};function Mm(){var e=jm.f(),t=Jd();return e||t}function Nm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?sc(t):jm.r(e)}var Pm=typeof document>`u`?null:document;function Fm(e,t,n){var r=Pm;if(r&&typeof t==`string`&&t){var i=sn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),km.has(i)||(km.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),fp(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Im(e){jm.D(e),Fm(`dns-prefetch`,e,null)}function Lm(e,t){jm.C(e,t),Fm(`preconnect`,e,t)}function Rm(e,t,n){jm.L(e,t,n);var r=Pm;if(r&&e&&t){var i=`link[rel="preload"][as="`+sn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+sn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+sn(n.imageSizes)+`"]`)):i+=`[href="`+sn(e)+`"]`;var a=i;switch(t){case`style`:a=Wm(e);break;case`script`:a=Jm(e)}if(!(Om.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Om.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gm(a))||t===`script`&&r.querySelector(Ym(a))))){var o=r.createElement(`link`);fp(o,`link`,e),t===`style`&&(o[Pt]=!0,o.onload=o.onerror=function(){Bt(o)}),zt(o),r.head.appendChild(o)}}}function zm(e,t){jm.m(e,t);var n=Pm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+sn(r)+`"][href="`+sn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jm(e)}if(!Om.has(a)&&(e=T({rel:`modulepreload`,href:e},t),Om.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ym(a)))return}r=n.createElement(`link`),fp(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Bm(e,t,n){jm.S(e,t,n);var r=Pm;if(r&&e){var i=Rt(r).hoistableStyles,a=Wm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Om.get(a))&&Qm(e,n);var c=o=r.createElement(`link`);zt(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,Zm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vm(e,t){jm.X(e,t);var n=Pm;if(n&&e){var r=Rt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),zt(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){jm.M(e,t);var n=Pm;if(n&&e){var r=Rt(n).hoistableScripts,i=Jm(e),a=r.get(i);a||(a=n.querySelector(Ym(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=Om.get(i))&&$m(e,t),a=n.createElement(`script`),zt(a),fp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Um(e,t,n,r){var a=(a=Ee.current)?Am(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=Wm(n.href),t=Rt(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=Wm(n.href);var o=Rt(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(Gm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=Om.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},Om.set(e,o)),qm(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=Jm(n),t=Rt(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 Wm(e){return`href="`+sn(e)+`"`}function Gm(e){return`link[rel="stylesheet"][`+e+`]`}function Km(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Pt]){r.loading=1;return}}else t=e.createElement(`link`),t[Pt]=!0,t.onload=t.onerror=Bt.bind(null,t),fp(t,`link`,n),zt(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 Jm(e){return`[src="`+sn(e)+`"]`}function Ym(e){return`script[async]`+e}function Xm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+sn(n.href)+`"]`);if(r)return t.instance=r,zt(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`),zt(r),fp(r,`style`,a),Zm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wm(n.href);var o=e.querySelector(Gm(a));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Km(n),(a=Om.get(a))&&Qm(r,a),o=(e.ownerDocument||e).createElement(`link`),zt(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,Zm(o,n.precedence,e),t.instance=o;case`script`:return o=Jm(n.src),(a=e.querySelector(Ym(o)))?(t.instance=a,zt(a),a):(r=n,(a=Om.get(o))&&(r=T({},n),$m(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),zt(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,Zm(r,n.precedence,e));return t.instance}function Zm(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 Qm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $m(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var eh=null;function th(e,t,n){if(eh===null){var r=new Map,i=eh=new Map;i.set(n,r)}else i=eh,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[Nt]||a[Et]||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 nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rh(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 ih(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function ah(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function oh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function sh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=oh(t),e.suspenseyImages.push(t)),e=ph.bind(e),t.decode().then(e,e))}function ch(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=Wm(r.href),a=t.querySelector(Gm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=fh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Km(r),(i=Om.get(i))&&Qm(r,i),a=a.createElement(`link`),zt(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=fh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var lh=0;function uh(e,t){return e.stylesheets&&e.count===0&&hh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&lh===0&&(lh=62500*gp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>lh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function dh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function fh(){this.count--,dh(this)}function ph(){this.imgCount--,dh(this)}var mh=null;function hh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mh=new Map,t.forEach(gh,e),mh=null,fh.call(e))}function gh(e,t){if(!(t.state.loading&4)){var n=mh.get(e);if(n)var r=n.get(null);else{n=new Map,mh.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=fh.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 _h={$$typeof:k,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function vh(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=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(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 yh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new vh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Fi(3,null,null,t),e.current=a,a.stateNode=e,t=Fa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},vo(a),e}function bh(e){return e?(e=Ni,e):Ni}function xh(e,t,n,r,i,a){i=bh(i),r.context===null?r.context=i:r.pendingContext=i,r=bo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=xo(e,r,t),n!==null&&(Wd(n,e,t),So(n,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ch(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function wh(e){if(e.tag===13||e.tag===31){var t=Ai(e,67108864);t!==null&&Wd(t,e,67108864),Ch(e,67108864)}}function Th(e){if(e.tag===13||e.tag===31){var t=Vd();t=xt(t);var n=Ai(e,t);n!==null&&Wd(n,e,t),Ch(e,t)}}var Eh=!0;function Dh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,kh(e,t,n,r)}finally{M.p=a,j.T=i}}function Oh(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,kh(e,t,n,r)}finally{M.p=a,j.T=i}}function kh(e,t,n,r){if(Eh){var i=Ah(r);if(i===null)tp(e,t,r,jh,n),Hh(e,r);else if(Wh(i,e,t,n,r))r.stopPropagation();else if(Hh(e,r),t&4&&-1<Vh.indexOf(e)){for(;i!==null;){var a=It(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=lt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-nt(o);s.entanglements[1]|=c,o&=~c}Ff(a),!(od&6)&&(Ed=We()+500,If(0,!1))}}break;case 31:case 13:s=Ai(a,2),s!==null&&Wd(s,a,2),Jd(),Ch(a,2)}if(a=Ah(r),a===null&&tp(e,t,r,jh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else tp(e,t,r,null,n)}}function Ah(e){return e=wn(e),Mh(e)}var jh=null;function Mh(e){if(jh=null,e=N(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 jh=e,null}function Nh(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(Ge()){case Ke:return 2;case qe:return 8;case Je:case Ye:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Ph=!1,Fh=null,Ih=null,Lh=null,Rh=new Map,zh=new Map,Bh=[],Vh=`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 Hh(e,t){switch(e){case`focusin`:case`focusout`:Fh=null;break;case`dragenter`:case`dragleave`:Ih=null;break;case`mouseover`:case`mouseout`:Lh=null;break;case`pointerover`:case`pointerout`:Rh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:zh.delete(t.pointerId)}}function Uh(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=It(t),t!==null&&wh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Wh(e,t,n,r,i){switch(t){case`focusin`:return Fh=Uh(Fh,e,t,n,r,i),!0;case`dragenter`:return Ih=Uh(Ih,e,t,n,r,i),!0;case`mouseover`:return Lh=Uh(Lh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Rh.set(a,Uh(Rh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,zh.set(a,Uh(zh.get(a)||null,e,t,n,r,i)),!0}return!1}function Gh(e){var t=N(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,wt(e.priority,function(){Th(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,wt(e.priority,function(){Th(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 Kh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ah(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Cn=r,n.target.dispatchEvent(r),Cn=null}else return t=It(n),t!==null&&wh(t),e.blockedOn=n,!1;t.shift()}return!0}function qh(e,t,n){Kh(e)&&n.delete(t)}function W(){Ph=!1,Fh!==null&&Kh(Fh)&&(Fh=null),Ih!==null&&Kh(Ih)&&(Ih=null),Lh!==null&&Kh(Lh)&&(Lh=null),Rh.forEach(qh),zh.forEach(qh)}function Jh(e,n){e.blockedOn===n&&(e.blockedOn=null,Ph||(Ph=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,W)))}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(Mh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,ac(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Zh(e){function t(t){return Jh(t,e)}Fh!==null&&Jh(Fh,e),Ih!==null&&Jh(Ih,e),Lh!==null&&Jh(Lh,e),Rh.forEach(t),zh.forEach(t);for(var n=0;n<Bh.length;n++){var r=Bh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Bh.length&&(n=Bh[0],n.blockedOn===null);)Gh(n),n.blockedOn===null&&Bh.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[Dt]||null;if(typeof a==`function`)o||Xh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Mh(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;xh(n,Vd(),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;xh(e.current,2,null,e,null,null),Jd(),t[Ot]=null}};function eg(e){this._internalRoot=e}eg.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bh.length&&t!==0&&t<Bh[n].priority;n++);Bh.splice(n,0,e),n===0&&Gh(e)}};var tg=n.version;if(tg!==`19.3.0`)throw Error(i(527,tg,`19.3.0`));M.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:j,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var rg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rg.isDisabled&&rg.supportsFiber)try{$e=rg.inject(ng),et=rg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Oc,s=kc,c=Ac;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=yh(e,1,!1,null,null,n,r,null,o,s,c,Qh),e[Ot]=t.current,$f(e),new $h(t)}})),yd=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=vd()}))(),bd={activity:400,thoughts:40,chat:100};function xd(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 Sd=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:xd(t.activity,e.activity??[],bd.activity),thoughts:xd(t.thoughts,e.thoughts??[],bd.thoughts),chat:xd(t.chat,e.chat??[],bd.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 Cd(){return new Sd}var wd=Cd(),Td={info:3600,success:3e3,warning:5e3,error:6e3},Ed,Dd=[],Od=0,kd=new Set;function Ad(){for(let e of[...kd])e()}function jd(e,t,n){let r=t.trim();if(!r||Ed?.message===r||Dd.some(e=>e.message===r))return;let i={id:++Od,kind:e,message:r,duration:n?.duration??Td[e],...n?.action?{action:n.action}:{}};Ed?Dd=[...Dd,i].slice(-3):Ed=i,Ad()}function Md(e){Ed?.id===e&&(Ed=Dd[0],Dd=Dd.slice(1),Ad())}var Nd=Object.assign((e,t)=>jd(`info`,e,t),{success:(e,t)=>jd(`success`,e,t),error:(e,t)=>jd(`error`,e,t),warning:(e,t)=>jd(`warning`,e,t),info:(e,t)=>jd(`info`,e,t)});function Pd(e){return kd.add(e),()=>{kd.delete(e)}}function Fd(){return{item:(0,m.useSyncExternalStore)(Pd,()=>Ed,()=>void 0),waiting:(0,m.useSyncExternalStore)(Pd,()=>Dd.length,()=>0)}}var Id=/^[a-f0-9]{32}$/;function Ld(){return globalThis.location}function Rd(){let e=Ld()?.search??``,t=new URLSearchParams(e).getAll(`project`);if(t.length){if(t.length!==1||!Id.test(t[0]))throw Error(`Invalid project ID. Choose a running project below.`);return t[0]}}function zd(e){if(!e.startsWith(`/api/`)&&!e.startsWith(`/files/preview/`))return e;let t=Rd();return t?`/projects/${t}${e}`:e}function Bd(e,t){if(!Id.test(e))throw Error(`Invalid project ID.`);let n=Ld();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 Vd=class extends Error{code;status;constructor(e,t,n){super(e),this.name=`ApiError`,this.code=t,this.status=n}},Hd={"Content-Type":`application/json`};async function Ud(e,t={}){let n=await fetch(e===`auth.login`||e===`projects.list`?`/api/${e}`:zd(`/api/${e}`),{method:`POST`,headers:Hd,body:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>void 0);if(!r)throw new Vd(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw r.code===`unauthorized`&&wd.onStatus({signedOut:!0}),new Vd(r.error,r.code,n.status);return r.result}function Wd(){return globalThis.location}async function Gd(){let e=Wd(),t=e?new URLSearchParams(e.hash.replace(/^#/,``)).get(`token`):null;if(!t||!(await fetch(`/api/auth.login`,{method:`POST`,headers:Hd,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),wd.onStatus({signedOut:!1}),!0}function Kd(e){return e instanceof Error?e.message:`That did not work. Try again.`}async function V(e,t,n={}){try{let r=await Ud(e,t),i=r.notice;return i&&Nd(i,n.undo?{action:{label:`Undo`,onClick:n.undo}}:void 0),r}catch(e){Nd.error(Kd(e));return}}var qd=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Jd(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:qd(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Yd=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},Xd=e=>{let t=Yd(e);return t.charAt(0).toUpperCase()+t.slice(1)},Zd=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Qd={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 $d(e){return e!=null}function ef(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Qd.width,a=e.size??e.height??Qd.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?Zd(...c):Zd(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Qd[`stroke-width`])*Number(e.size??e.width??Qd.width)/Number(t.size??t.width??Qd.width):t.strokeWidth??Qd[`stroke-width`];return[`svg`,{...Object.entries(Qd).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&$d(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&$d(t.width)&&{[r(`width`)]:t.width},...`height`in t&&$d(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 tf(e,t={}){return ef(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var nf=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},rf=(0,m.createContext)({}),af=()=>(0,m.useContext)(rf),of=(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=``}=af()??{},b=!!c||nf(d),[x,S,C=[]]=tf(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:Zd(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 H(e,t=[],n=[]){let r=typeof e==`string`?Jd(e,t,n):e,i=(0,m.forwardRef)(({className:e,...t},n)=>(0,m.createElement)(of,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Xd(r.name)),i}var sf={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};sf.node;var cf=H(sf),lf={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`}]]};lf.node;var uf=H(lf),df={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};df.node;var ff=H(df),pf={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};pf.node;var mf=H(pf),hf={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`}]]};hf.node;var gf=H(hf),_f={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};_f.node;var vf=H(_f),yf={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`}]]};yf.node;var bf=H(yf),xf={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`}]]};xf.node;var Sf=H(xf),Cf={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};Cf.node;var wf=H(Cf),Tf={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Tf.node;var Ef=H(Tf),Df={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};Df.node;var Of=H(Df),kf={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};kf.node;var Af=H(kf),jf={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`}]]};jf.node;var Mf=H(jf),Nf={name:`chevrons-up`,size:24,node:[[`path`,{d:`m17 11-5-5-5 5`,key:`e8nh98`}],[`path`,{d:`m17 18-5-5-5 5`,key:`2avn1x`}]]};Nf.node;var Pf=H(Nf),Ff={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`]};Ff.node;var If=H(Ff),Lf={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`]};Lf.node;var Rf=H(Lf),zf={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};zf.node;var Bf=H(zf),Vf={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`]};Vf.node;var Hf=H(Vf),Uf={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`]};Uf.node;var Wf=H(Uf),Gf={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`]};Gf.node;var Kf=H(Gf),qf={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};qf.node;var Jf=H(qf),Yf={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Yf.node;var Xf=H(Yf),U={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`}]]};U.node;var Zf=H(U),Qf={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`}]]};Qf.node;var $f=H(Qf),ep={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`}]]};ep.node;var tp=H(ep),np={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`}]]};np.node;var rp=H(np),ip={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`]};ip.node;var ap=H(ip),op={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`}]]};op.node;var sp=H(op),cp={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`}]]};cp.node;var lp=H(cp),up={name:`git-branch`,size:24,node:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]};up.node;var dp=H(up),fp={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`}]]};fp.node;var pp=H(fp),mp={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`}]]};mp.node;var hp=H(mp),gp={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`}]]};gp.node;var _p=H(gp),vp={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`}]]};vp.node;var yp=H(vp),bp={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};bp.node;var xp=H(bp),Sp={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`}]]};Sp.node;var Cp=H(Sp),wp={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`}]]};wp.node;var Tp=H(wp),Ep={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`}]]};Ep.node;var Dp=H(Ep),Op={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`}]]};Op.node;var kp=H(Op),Ap={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`]};Ap.node;var jp=H(Ap),Mp={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`}]]};Mp.node;var Np=H(Mp),Pp={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`}]]};Pp.node;var Fp=H(Pp),Ip={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`}]]};Ip.node;var Lp=H(Ip),Rp={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Rp.node;var zp=H(Rp),Bp={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};Bp.node;var Vp=H(Bp),Hp={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`}]]};Hp.node;var Up=H(Hp),Wp={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`}]]};Wp.node;var Gp=H(Wp),Kp={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`}]]};Kp.node;var qp=H(Kp),Jp={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`}]]};Jp.node;var Yp=H(Jp),Xp={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`}]]};Xp.node;var Zp=H(Xp),Qp={name:`pen-tool`,size:24,node:[[`path`,{d:`M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z`,key:`nt11vn`}],[`path`,{d:`m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18`,key:`15qc1e`}],[`path`,{d:`m2.3 2.3 7.286 7.286`,key:`1wuzzi`}],[`circle`,{cx:`11`,cy:`11`,r:`2`,key:`xmgehs`}]]};Qp.node;var $p=H(Qp),em={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`}]]};em.node;var tm=H(em),nm={name:`pencil-off`,size:24,node:[[`path`,{d:`m10 10-6.157 6.162a2 2 0 0 0-.5.833l-1.322 4.36a.5.5 0 0 0 .622.624l4.358-1.323a2 2 0 0 0 .83-.5L14 13.982`,key:`bjo8r8`}],[`path`,{d:`m12.829 7.172 4.359-4.346a1 1 0 1 1 3.986 3.986l-4.353 4.353`,key:`16h5ne`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};nm.node;var rm=H(nm),im={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`}]]};im.node;var am=H(im),om={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`}]]};om.node;var sm=H(om),cm={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};cm.node;var lm=H(cm),um={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`}]]};um.node;var dm=H(um),fm={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`}]]};fm.node;var pm=H(fm),mm={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`}]]};mm.node;var hm=H(mm),gm={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`}]]};gm.node;var _m=H(gm),vm={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`}]]};vm.node;var ym=H(vm),bm={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};bm.node;var xm=H(bm),Sm={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};Sm.node;var Cm=H(Sm),wm={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`}]]};wm.node;var Tm=H(wm),Em={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`}]]};Em.node;var Dm=H(Em),Om={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`]};Om.node;var km=H(Om),Am={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Am.node;var jm=H(Am),Mm={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Mm.node;var Nm=H(Mm),Pm={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`}]]};Pm.node;var Fm=H(Pm),Im={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`]};Im.node;var Lm=H(Im),Rm={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`]};Rm.node;var zm=H(Rm),Bm={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`}]]};Bm.node;var Vm=H(Bm),Hm={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`}]]};Hm.node;var Um=H(Hm),Wm={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`}]]};Wm.node;var Gm=H(Wm),Km={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`}]]};Km.node;var qm=H(Km),Jm={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`}]]};Jm.node;var Ym=H(Jm),Xm={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Xm.node;var Zm=H(Xm),Qm={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`}]]};Qm.node;var $m=H(Qm);function eh(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=eh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function th(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=eh(e))&&(r&&(r+=` `),r+=t);return r}var nh=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,rh=th,ih=(e,t)=>n=>{if(t?.variants==null)return rh(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=nh(t)||nh(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 rh(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)},ah=(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},oh=(e,t)=>({classGroupId:e,validator:t}),sh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ch=`-`,lh=[],uh=`arbitrary..`,dh=e=>{let t=mh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ph(e);let n=e.split(ch);return fh(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ah(i,t):t:i||lh}return n[e]||lh}}},fh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=fh(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ch):e.slice(t).join(ch),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ph=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?uh+r:void 0})(),mh=e=>{let{theme:t,classGroups:n}=e;return hh(n,t)},hh=(e,t)=>{let n=sh();for(let r in e){let i=e[r];gh(i,n,r,t)}return n},gh=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];_h(i,t,n,r)}},_h=(e,t,n,r)=>{if(typeof e==`string`){vh(e,t,n);return}if(typeof e==`function`){yh(e,t,n,r);return}bh(e,t,n,r)},vh=(e,t,n)=>{let r=e===``?t:xh(t,e);r.classGroupId=n},yh=(e,t,n,r)=>{if(Sh(e)){gh(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(oh(n,e))},bh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];gh(o,xh(t,a),n,r)}},xh=(e,t)=>{let n=e,r=t.split(ch),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=sh(),n.nextPart.set(t,i)),n=i}return n},Sh=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ch=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)}}},wh=`!`,Th=`:`,Eh=[],Dh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Oh=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===Th){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(wh)?(c=s.slice(0,-1),l=!0):s.startsWith(wh)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Dh(t,l,c,u)};if(t){let e=t+Th,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Dh(Eh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},kh=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}},Ah=e=>({cache:Ch(e.cacheSize),parseClassName:Oh(e),sortModifiers:kh(e),postfixLookupClassGroupIds:jh(e),...dh(e)}),jh=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},Mh=/\s+/,Nh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Mh),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?_+wh:_,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},Ph=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Fh(n))&&(i&&(i+=` `),i+=r);return i},Fh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Fh(e[r]))&&(n&&(n+=` `),n+=t);return n},Ih=(e,...t)=>{let n,r,i,a,o=o=>(n=Ah(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=Nh(e,n);return i(e,a),a};return a=o,(...e)=>a(Ph(...e))},Lh=[],Rh=e=>{let t=t=>t[e]||Lh;return t.isThemeGetter=!0,t.themeKey=e,t},zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Hh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Uh=/\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$/,Wh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Gh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qh=e=>Vh.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),Jh=e=>!!e&&Number.isInteger(Number(e)),Yh=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),Xh=e=>Hh.test(e),Zh=()=>!0,Qh=e=>Uh.test(e)&&!Wh.test(e),$h=()=>!1,eg=e=>Gh.test(e),tg=e=>Kh.test(e),ng=e=>!G(e)&&!K(e),rg=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)),ig=e=>yg(e,Cg,$h),G=e=>zh.test(e),ag=e=>yg(e,wg,Qh),og=e=>yg(e,Tg,W),sg=e=>yg(e,Dg,Zh),cg=e=>yg(e,Eg,$h),lg=e=>yg(e,xg,$h),ug=e=>yg(e,Sg,tg),dg=e=>yg(e,Og,eg),K=e=>Bh.test(e),fg=e=>bg(e,wg),pg=e=>bg(e,Eg),mg=e=>bg(e,xg),hg=e=>bg(e,Cg),gg=e=>bg(e,Sg),_g=e=>bg(e,Og,!0),vg=e=>bg(e,Dg,!0),yg=(e,t,n)=>{let r=zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},bg=(e,t,n=!1)=>{let r=Bh.exec(e);return r?r[1]?t(r[1]):n:!1},xg=e=>e===`position`||e===`percentage`,Sg=e=>e===`image`||e===`url`,Cg=e=>e===`length`||e===`size`||e===`bg-size`,wg=e=>e===`length`,Tg=e=>e===`number`,Eg=e=>e===`family-name`,Dg=e=>e===`number`||e===`weight`,Og=e=>e===`shadow`,kg=Ih(()=>{let e=Rh(`color`),t=Rh(`font`),n=Rh(`text`),r=Rh(`font-weight`),i=Rh(`tracking`),a=Rh(`leading`),o=Rh(`breakpoint`),s=Rh(`container`),c=Rh(`spacing`),l=Rh(`radius`),u=Rh(`shadow`),d=Rh(`inset-shadow`),f=Rh(`text-shadow`),p=Rh(`drop-shadow`),m=Rh(`blur`),h=Rh(`perspective`),g=Rh(`aspect`),_=Rh(`ease`),v=Rh(`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(),K,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[K,G,c],T=()=>[qh,`full`,`auto`,...w()],E=()=>[Jh,`none`,`subgrid`,K,G],ee=()=>[`auto`,{span:[`full`,Jh,K,G]},Jh,K,G],D=()=>[Jh,`auto`,K,G],O=()=>[`auto`,`min`,`max`,`fr`,K,G],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],re=()=>[`auto`,...w()],k=()=>[qh,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[s,qh,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[qh,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,K,G],oe=()=>[...b(),mg,lg,{position:[K,G]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,hg,ig,{size:[K,G]}],le=()=>[Yh,fg,ag],ue=()=>[``,`none`,`full`,l,K,G],de=()=>[``,W,fg,ag],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[W,Yh,mg,lg],he=()=>[``,`none`,m,K,G],ge=()=>[`none`,W,K,G],_e=()=>[`none`,W,K,G],j=()=>[W,K,G],M=()=>[qh,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Xh],breakpoint:[Xh],color:[Zh],container:[Xh],"drop-shadow":[Xh],ease:[`in`,`out`,`in-out`],font:[ng],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Xh],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Xh],shadow:[Xh],spacing:[`px`,W],text:[Xh],"text-shadow":[Xh],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,qh,G,K,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,K,G]}],"container-named":[rg],columns:[{columns:[W,`auto`,G,K,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:[Jh,`auto`,K,G]}],basis:[{basis:[qh,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,qh,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,W,K,G]}],shrink:[{shrink:[``,W,K,G]}],order:[{order:[Jh,`first`,`last`,`none`,K,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],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:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:k()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...k()]}],"min-w":[{"min-w":[s,`screen`,`none`,...k()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...k()]}],h:[{h:[`screen`,`lh`,...k()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...k()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...k()]}],"font-size":[{text:[`base`,n,fg,ag]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,vg,sg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Yh,G]}],"font-family":[{font:[pg,cg,t]}],"font-features":[{"font-features":[G]}],"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,K,G]}],"line-clamp":[{"line-clamp":[W,`none`,K,og]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,K,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,K,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,K,ag]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[W,`auto`,K,G]}],"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:[Jh,K,G]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,K,G]}],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`,K,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Jh,K,G],radial:[``,K,G],conic:[``,Jh,K,G]},gg,ug]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,K,G]}],"outline-w":[{outline:[``,W,fg,ag]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`inner`,`none`,u,_g,dg]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,_g,dg]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[W,ag]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,_g,dg]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[W,K,G]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[K,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,K,G]}],filter:[{filter:[``,`none`,K,G]}],blur:[{blur:he()}],brightness:[{brightness:[W,K,G]}],contrast:[{contrast:[W,K,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,_g,dg]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,W,K,G]}],"hue-rotate":[{"hue-rotate":[W,K,G]}],invert:[{invert:[``,W,K,G]}],saturate:[{saturate:[W,K,G]}],sepia:[{sepia:[``,W,K,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,K,G]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[W,K,G]}],"backdrop-contrast":[{"backdrop-contrast":[W,K,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,K,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,K,G]}],"backdrop-invert":[{"backdrop-invert":[``,W,K,G]}],"backdrop-opacity":[{"backdrop-opacity":[W,K,G]}],"backdrop-saturate":[{"backdrop-saturate":[W,K,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,K,G]}],"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`,K,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,K,G]}],ease:[{ease:[`linear`,`initial`,_,K,G]}],delay:[{delay:[W,K,G]}],animate:[{animate:[`none`,v,K,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,K,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[K,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:M()}],"translate-x":[{"translate-x":M()}],"translate-y":[{"translate-y":M()}],"translate-z":[{"translate-z":M()}],"translate-none":[`translate-none`],zoom:[{zoom:[Jh,K,G]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"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`,K,G]}],"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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"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`,K,G]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[W,fg,ag,og]}],stroke:[{stroke:[`none`,...A()]}],"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 q(...e){return kg(th(e))}var Ag=Object.defineProperty,jg=(e,t)=>Ag(e,`name`,{value:t,configurable:!0});function Mg(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}jg(Mg,`setRef`);function Ng(...e){return t=>{let n=!1,r=e.map(e=>{let r=Mg(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():Mg(e[t],null)}}}}jg(Ng,`composeRefs`);function Pg(...e){return m.useCallback(Ng(...e),e)}jg(Pg,`useComposedRefs`);var Fg=Object.defineProperty,Ig=(e,t)=>Fg(e,`name`,{value:t,configurable:!0});function Lg(e){let t=m.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Kg(r)&&typeof Xg==`function`&&(r=Xg(r._payload)),m.Children.forEach(r,e=>{if(Wg(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Kg(n)&&typeof Xg==`function`&&(n=Xg(n._payload)),a=Vg(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?Ug(a):void 0,l=Pg(n,c);if(!a){if(r||r===0)throw Error(o?Yg(e):Jg(e));return r}let u=Hg(i,a.props??{});return a.type!==m.Fragment&&(u.ref=n?l:c),m.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Ig(Lg,`createSlot`);var Rg=Lg(`Slot`),zg=Symbol.for(`radix.slottable`);function Bg(e){let t=Ig(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=zg,t}Ig(Bg,`createSlottable`);var Vg=Ig((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 Hg(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}Ig(Hg,`mergeProps`);function Ug(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)}Ig(Ug,`getElementRef`);function Wg(e){return m.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zg}Ig(Wg,`isSlottable`);var Gg=Symbol.for(`react.lazy`);function Kg(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Gg&&`_payload`in e&&qg(e._payload)}Ig(Kg,`isLazyComponent`);function qg(e){return typeof e==`object`&&!!e&&`then`in e}Ig(qg,`isPromiseLike`);var Jg=Ig(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Yg=Ig(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Xg=m.use,Zg=l(_d(),1),Qg=Object.defineProperty,$g=(e,t)=>Qg(e,`name`,{value:t,configurable:!0}),e_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Lg(`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,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function t_(e,t){e&&Zg.flushSync(()=>e.dispatchEvent(t))}$g(t_,`dispatchDiscreteCustomEvent`);var n_=Object.defineProperty,r_=(e,t)=>n_(e,`name`,{value:t,configurable:!0}),i_=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`}),a_=m.forwardRef(r_(function(e,t){return(0,L.jsx)(e_.span,{...e,ref:t,style:{...i_,...e.style}})},`VisuallyHidden`)),o_=Object.defineProperty,s_=(e,t)=>o_(e,`name`,{value:t,configurable:!0});function c_(e,t){let n=m.createContext(t);n.displayName=e+`Context`;let r=s_(e=>{let{children:t,...r}=e,i=m.useMemo(()=>r,Object.values(r));return(0,L.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 s_(i,`useContext`),[r,i]}s_(c_,`createContext`);function l_(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=s_(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=m.useMemo(()=>o,Object.values(o));return(0,L.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 s_(s,`useContext`),[o,s]}s_(r,`createContext`);let i=s_(()=>{let t=n.map(e=>m.createContext(e));return s_(function(n){let r=n?.[e]||t;return m.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,u_(i,...t)]}s_(l_,`createContextScope`);function u_(...e){let t=e[0];if(e.length===1)return t;let n=s_(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return s_(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}s_(u_,`composeContextScopes`);var d_=Object.defineProperty,f_=(e,t)=>d_(e,`name`,{value:t,configurable:!0}),p_=!!(typeof window<`u`&&window.document&&window.document.createElement);function m_(e,t,{checkForDefaultPrevented:n=!0}={}){return f_(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}f_(m_,`composeEventHandlers`);function h_(e){if(!p_)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}f_(h_,`getOwnerWindow`);function g_(e){if(!p_)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}f_(g_,`getOwnerDocument`);function __(e,t=!1){let{activeElement:n}=g_(e);if(!n?.nodeName)return null;if(v_(n)&&n.contentDocument)return __(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=g_(n).getElementById(e);if(t)return t}}return n}f_(__,`getActiveElement`);function v_(e){return e.tagName===`IFRAME`}f_(v_,`isFrame`);var y_=globalThis?.document?m.useLayoutEffect:()=>{},b_=Object.defineProperty,x_=(e,t)=>b_(e,`name`,{value:t,configurable:!0}),S_=m.useEffectEvent,C_=m.useInsertionEffect;function w_(e){if(typeof S_==`function`)return S_(e);let t=m.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof C_==`function`?C_(()=>{t.current=e}):y_(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}x_(w_,`useEffectEvent`);var T_=Object.defineProperty,E_=(e,t)=>T_(e,`name`,{value:t,configurable:!0}),D_=m.useInsertionEffect||y_;function O_({prop:e,defaultProp:t,onChange:n=E_(()=>{},`onChange`),caller:r}){let[i,a,o]=k_({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,m.useCallback(t=>{if(s){let n=A_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}E_(O_,`useControllableState`);function k_({defaultProp:e,onChange:t}){let[n,r]=m.useState(e),i=m.useRef(n),a=m.useRef(t);return D_(()=>{a.current=t},[t]),m.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}E_(k_,`useUncontrolledState`);function A_(e){return typeof e==`function`}E_(A_,`isFunction`);var j_=Symbol(`RADIX:SYNC_STATE`);function M_(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=w_(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=m.useReducer((t,n)=>{if(n.type===j_)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:j_,state:i})},[i,d.state,c]),[g,f]}E_(M_,`useControllableStateReducer`);var N_=Object.defineProperty,P_=(e,t)=>N_(e,`name`,{value:t,configurable:!0});function F_(e,t){return m.useReducer((e,n)=>t[e][n]??e,e)}P_(F_,`useStateMachine`);var I_=P_(e=>{let{present:t,children:n}=e,r=L_(t),i=typeof n==`function`?n({present:r.isPresent}):m.Children.only(n),a=z_(r.ref,V_(i));return typeof n==`function`||r.isPresent?m.cloneElement(i,{ref:a}):null},`Presence`);function L_(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]=F_(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??B_(r.current),o.current=void 0):a.current=`none`},[s]),y_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=B_(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]),y_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=P_(a=>{let o=B_(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=P_(e=>{e.target===t&&(a.current=B_(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=B_(t)}else r.current=null;n(e)},[])}}P_(L_,`usePresence`);function R_(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}P_(R_,`setRef`);function z_(...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=R_(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():R_(n[e],null)}}},[])}P_(z_,`useStableComposedRefs`);function B_(e){return e?.animationName||`none`}P_(B_,`getAnimationName`);function V_(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)}P_(V_,`getElementRef`);var H_=Object.defineProperty,U_=(e,t)=>H_(e,`name`,{value:t,configurable:!0}),W_=m.useId||(()=>void 0),G_=0;function K_(e){let[t,n]=m.useState(W_());return y_(()=>{e||n(e=>e??String(G_++))},[e]),e||(t?`radix-${t}`:``)}U_(K_,`useId`);var q_=Object.defineProperty,J_=(e,t)=>q_(e,`name`,{value:t,configurable:!0});function Y_(e){let t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>((...e)=>t.current?.(...e)),[])}J_(Y_,`useCallbackRef`);var X_=Object.defineProperty,Z_=(e,t)=>X_(e,`name`,{value:t,configurable:!0}),Q_=`dismissableLayer.update`,$_=`dismissableLayer.pointerDownOutside`,ev=`dismissableLayer.focusOutside`,tv,nv=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),rv=m.forwardRef(Z_(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(nv),[d,f]=m.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=m.useState({}),g=Pg(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=ov(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=sv(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,ee=Y_(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return m.useEffect(()=>{if(E)return p.addEventListener(`keydown`,ee,{capture:!0}),()=>p.removeEventListener(`keydown`,ee,{capture:!0})},[p,E,ee]),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tv=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),cv(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=tv))}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),cv())},[d,u]),m.useEffect(()=>{let e=Z_(()=>h({}),`handleUpdate`);return document.addEventListener(Q_,e),()=>document.removeEventListener(Q_,e)},[]),(0,L.jsx)(e_.div,{...l,ref:g,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:m_(e.onFocusCapture,T.onFocusCapture),onBlurCapture:m_(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:m_(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function iv(){let e=m.useContext(nv),[t,n]=m.useState(null);return m.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Z_(iv,`useDismissableLayerSurface`);var av=Z_(()=>!0,`IS_TRUE`);function ov(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=av}=t,s=Y_(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()}Z_(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Z_(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)}Z_(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Z_(p,`handleInteractionBubble`);let m=Z_(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||lv($_,s,p,{discrete:!0})};if(Z_(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:Z_(()=>c.current=!0,`onPointerDownCapture`)}}Z_(ov,`usePointerDownOutside`);function sv(e,t=globalThis?.document){let n=Y_(e),r=m.useRef(!1);return m.useEffect(()=>{let e=Z_(e=>{e.target&&!r.current&&lv(ev,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Z_(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Z_(()=>r.current=!1,`onBlurCapture`)}}Z_(sv,`useFocusOutside`);function cv(){let e=new CustomEvent(Q_);document.dispatchEvent(e)}Z_(cv,`dispatchUpdate`);function lv(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?t_(i,a):i.dispatchEvent(a)}Z_(lv,`handleAndDispatchCustomEvent`);var uv=Object.defineProperty,dv=(e,t)=>uv(e,`name`,{value:t,configurable:!0}),fv=`focusScope.autoFocusOnMount`,pv=`focusScope.autoFocusOnUnmount`,mv={bubbles:!1,cancelable:!0},hv=m.forwardRef(dv(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Y_(i),u=Y_(a),d=m.useRef(null),f=Pg(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:Sv(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Sv(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Sv(s)};dv(e,`handleFocusIn`),dv(t,`handleFocusOut`),dv(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){Cv.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(fv,mv);s.addEventListener(fv,l),s.dispatchEvent(t),t.defaultPrevented||(gv(Ev(vv(s)),{select:!0}),document.activeElement===e&&Sv(s))}return()=>{s.removeEventListener(fv,l),setTimeout(()=>{let t=new CustomEvent(pv,mv);s.addEventListener(pv,u),s.dispatchEvent(t),t.defaultPrevented||Sv(e??document.body,{select:!0}),s.removeEventListener(pv,u),Cv.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]=_v(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Sv(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Sv(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(e_.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})},`FocusScope`));function gv(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Sv(r,{select:t}),document.activeElement!==n)return}dv(gv,`focusFirst`);function _v(e){let t=vv(e);return[yv(t,e),yv(t.reverse(),e)]}dv(_v,`getTabbableEdges`);function vv(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:dv(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}dv(vv,`getTabbableCandidates`);function yv(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):bv(r,{upTo:t})))return r}dv(yv,`findVisible`);function bv(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}dv(bv,`isHidden`);function xv(e){return e instanceof HTMLInputElement&&`select`in e}dv(xv,`isSelectableInput`);function Sv(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xv(e)&&t&&e.select()}}dv(Sv,`focus`);var Cv=wv();function wv(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Tv(e,t),e.unshift(t)},remove(t){e=Tv(e,t),e[0]?.resume()}}}dv(wv,`createFocusScopesStack`);function Tv(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}dv(Tv,`arrayRemove`);function Ev(e){return e.filter(e=>e.tagName!==`A`)}dv(Ev,`removeLinks`);var Dv=Object.defineProperty,Ov=m.forwardRef(((e,t)=>Dv(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=m.useState(!1);y_(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Zg.createPortal((0,L.jsx)(e_.div,{...r,ref:t}),o):null},`Portal`)),kv=Object.defineProperty,Av=(e,t)=>kv(e,`name`,{value:t,configurable:!0}),jv=0,Mv=null;function Nv(e){return Pv(),e.children}Av(Nv,`FocusGuards`);function Pv(){m.useEffect(()=>{Mv||={start:Fv(),end:Fv()};let{start:e,end:t}=Mv;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),jv++,()=>{jv===1&&(Mv?.start.remove(),Mv?.end.remove(),Mv=null),jv=Math.max(0,jv-1)}},[])}Av(Pv,`useFocusGuards`);function Fv(){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}Av(Fv,`createFocusGuard`);var Iv=function(){return Iv=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},Iv.apply(this,arguments)};function Lv(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 Rv(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 zv=`right-scroll-bar-position`,Bv=`width-before-scroll-bar`,Vv=`with-scroll-bars-hidden`,Hv=`--removed-body-scroll-bar-size`;function Uv(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Wv(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 Gv=typeof window<`u`?m.useLayoutEffect:m.useEffect,Kv=new WeakMap;function qv(e,t){var n=Wv(t||null,function(t){return e.forEach(function(e){return Uv(e,t)})});return Gv(function(){var t=Kv.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Uv(e,null)}),i.forEach(function(e){r.has(e)||Uv(e,a)})}Kv.set(n,e)},[e]),n}function Jv(e){return e}function Yv(e,t){t===void 0&&(t=Jv);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 Xv(e){e===void 0&&(e={});var t=Yv(null);return t.options=Iv({async:!0,ssr:!1},e),t}var Zv=function(e){var t=e.sideCar,n=Lv(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,Iv({},n))};Zv.isSideCarExport=!0;function Qv(e,t){return e.useMedium(t),Zv}var $v=Xv(),ey=function(){},ty=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:ey,onWheelCapture:ey,onTouchMoveCapture:ey}),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=Lv(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=qv([n,t]),w=Iv(Iv({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:$v,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),Iv(Iv({},w),{ref:C})):m.createElement(y,Iv({},w,{className:c,ref:C}),s))});ty.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ty.classNames={fullWidth:Bv,zeroRight:zv};var ny=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ry(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ny();return t&&e.setAttribute(`nonce`,t),e}function iy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ay(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var oy=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ry())&&(iy(t,n),ay(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sy=function(){var e=oy();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cy=function(){var e=sy();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ly={left:0,top:0,right:0,gap:0},uy=function(e){return parseInt(e||``,10)||0},dy=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[uy(n),uy(r),uy(i)]},fy=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ly;var t=dy(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])}},py=cy(),my=`data-scroll-locked`,hy=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
|
+
.${Vv} {
|
|
20
|
+
overflow: hidden ${r};
|
|
21
|
+
padding-right: ${s}px ${r};
|
|
22
|
+
}
|
|
23
|
+
body[${my}] {
|
|
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
|
+
.${zv} {
|
|
37
|
+
right: ${s}px ${r};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.${Bv} {
|
|
41
|
+
margin-right: ${s}px ${r};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.${zv} .${zv} {
|
|
45
|
+
right: 0 ${r};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.${Bv} .${Bv} {
|
|
49
|
+
margin-right: 0 ${r};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
body[${my}] {
|
|
53
|
+
${Hv}: ${s}px;
|
|
54
|
+
}
|
|
55
|
+
`},gy=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},_y=function(){m.useEffect(function(){return document.body.setAttribute(my,(gy()+1).toString()),function(){var e=gy()-1;e<=0?document.body.removeAttribute(my):document.body.setAttribute(my,e.toString())}},[])},vy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;_y();var a=m.useMemo(function(){return fy(i)},[i]);return m.createElement(py,{styles:hy(a,!t,i,n?``:`!important`)})},yy=!1;if(typeof window<`u`)try{var by=Object.defineProperty({},"passive",{get:function(){return yy=!0,!0}});window.addEventListener(`test`,by,by),window.removeEventListener(`test`,by,by)}catch{yy=!1}var xy=yy?{passive:!1}:!1,Sy=function(e){return e.tagName===`TEXTAREA`},Cy=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Sy(e)&&n[t]===`visible`)},wy=function(e){return Cy(e,`overflowY`)},Ty=function(e){return Cy(e,`overflowX`)},Ey=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),ky(e,r)){var i=Ay(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dy=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Oy=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},ky=function(e,t){return e===`v`?wy(t):Ty(t)},Ay=function(e,t){return e===`v`?Dy(t):Oy(t)},jy=function(e,t){return e===`h`&&t===`rtl`?-1:1},My=function(e,t,n,r,i){var a=jy(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=Ay(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&ky(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},Ny=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Py=function(e){return[e.deltaX,e.deltaY]},Fy=function(e){return e&&`current`in e?e.current:e},Iy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ly=function(e){return`
|
|
56
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
57
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
58
|
+
`},Ry=0,zy=[];function By(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),i=m.useState(Ry++)[0],a=m.useState(cy)[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=Rv([e.lockRef.current],(e.shards||[]).map(Fy),!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=Ny(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=Ey(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ey(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 My(h,t,e,h===`h`?s:c,!0)},[]),c=m.useCallback(function(e){var n=e;if(zy.length&&zy[zy.length-1]===a){var r=`deltaY`in n?Py(n):Ny(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Iy(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Fy).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:Vy(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=Ny(e),r.current=void 0},[]),d=m.useCallback(function(t){l(t.type,Py(t),t.target,s(t,e.lockRef.current))},[]),f=m.useCallback(function(t){l(t.type,Ny(t),t.target,s(t,e.lockRef.current))},[]);m.useEffect(function(){return zy.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,xy),document.addEventListener(`touchmove`,c,xy),document.addEventListener(`touchstart`,u,xy),function(){zy=zy.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,xy),document.removeEventListener(`touchmove`,c,xy),document.removeEventListener(`touchstart`,u,xy)}},[]);var p=e.removeScrollBar,h=e.inert;return m.createElement(m.Fragment,null,h?m.createElement(a,{styles:Ly(i)}):null,p?m.createElement(vy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hy=Qv($v,By),Uy=m.forwardRef(function(e,t){return m.createElement(ty,Iv({},e,{ref:t,sideCar:Hy}))});Uy.classNames=ty.classNames;var Wy=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gy=new WeakMap,Ky=new WeakMap,qy={},Jy=0,Yy=function(e){return e&&(e.host||Yy(e.parentNode))},Xy=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yy(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})},Zy=function(e,t,n,r){var i=Xy(t,Array.isArray(e)?e:[e]);qy[n]||(qy[n]=new WeakMap);var a=qy[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=(Gy.get(e)||0)+1,l=(a.get(e)||0)+1;Gy.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ky.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(),Jy++,function(){o.forEach(function(e){var t=Gy.get(e)-1,i=a.get(e)-1;Gy.set(e,t),a.set(e,i),t||(Ky.has(e)||e.removeAttribute(r),Ky.delete(e)),i||e.removeAttribute(n)}),Jy--,Jy||(Gy=new WeakMap,Gy=new WeakMap,Ky=new WeakMap,qy={})}},Qy=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wy(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zy(r,i,n,`aria-hidden`)):function(){return null}},$y=Object.defineProperty,eb=(e,t)=>$y(e,`name`,{value:t,configurable:!0}),tb=`Dialog`,[nb,rb]=l_(tb),[ib,ab]=nb(tb),ob=eb(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]=O_({prop:r,defaultProp:i??!1,onChange:a,caller:tb}),[d,f]=m.useState(0),[p,h]=m.useState(0);return(0,L.jsx)(ib,{scope:t,triggerRef:s,contentRef:c,contentId:K_(),titleId:K_(),descriptionId:K_(),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`),sb=`DialogTrigger`,cb=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,i=ab(sb,n),a=Pg(t,i.triggerRef);return(0,L.jsx)(e_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ob(i.open),...r,ref:a,onClick:m_(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),lb=`DialogPortal`,[ub,db]=nb(lb,{forceMount:void 0}),fb=eb(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ab(lb,t);return(0,L.jsx)(ub,{scope:t,forceMount:n,children:m.Children.map(r,e=>(0,L.jsx)(I_,{present:n||a.open,children:(0,L.jsx)(Ov,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),pb=`DialogOverlay`,mb=m.forwardRef(eb(function(e,t){let n=db(pb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ab(pb,e.__scopeDialog);return a.modal?(0,L.jsx)(I_,{present:r||a.open,children:(0,L.jsx)(gb,{...i,ref:t})}):null},`DialogOverlay`)),hb=Lg(`DialogOverlay.RemoveScroll`),gb=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,i=ab(pb,n),a=Pg(t,iv());return(0,L.jsx)(Uy,{as:hb,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(e_.div,{"data-state":Ob(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),_b=`DialogContent`,vb=m.forwardRef(eb(function(e,t){let n=db(_b,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ab(_b,e.__scopeDialog);return(0,L.jsx)(I_,{present:r||a.open,children:a.modal?(0,L.jsx)(yb,{...i,ref:t}):(0,L.jsx)(bb,{...i,ref:t})})},`DialogContent`)),yb=m.forwardRef(eb(function(e,t){let n=ab(_b,e.__scopeDialog),r=m.useRef(null),i=Pg(t,n.contentRef,r);return m.useEffect(()=>{let e=r.current;if(e)return Qy(e)},[]),(0,L.jsx)(xb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:m_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:m_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:m_(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),bb=m.forwardRef(eb(function(e,t){let n=ab(_b,e.__scopeDialog),r=m.useRef(!1),i=m.useRef(!1);return(0,L.jsx)(xb,{...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`)),xb=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ab(_b,n);return Pv(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(hv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(rv,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Ob(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Sb=`DialogTitle`,Cb=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,i=ab(Sb,n),{setTitleCount:a}=i;return y_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(e_.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),wb=`DialogDescription`,Tb=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,i=ab(wb,n),{setDescriptionCount:a}=i;return y_(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(e_.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Eb=`DialogClose`,Db=m.forwardRef(eb(function(e,t){let{__scopeDialog:n,...r}=e,i=ab(Eb,n);return(0,L.jsx)(e_.button,{type:`button`,...r,ref:t,onClick:m_(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Ob(e){return e?`open`:`closed`}eb(Ob,`getState`);var kb=Object.defineProperty,Ab=(e,t)=>kb(e,`name`,{value:t,configurable:!0}),[jb,Mb]=l_(`AlertDialog`,[rb]),Nb=rb(),Pb=Ab(e=>{let{__scopeAlertDialog:t,...n}=e,r=Nb(t);return(0,L.jsx)(ob,{...r,...n,modal:!0})},`AlertDialog`);m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Nb(n);return(0,L.jsx)(cb,{...i,...r,ref:t})},`AlertDialogTrigger`));var Fb=Ab(e=>{let{__scopeAlertDialog:t,...n}=e,r=Nb(t);return(0,L.jsx)(fb,{...r,...n})},`AlertDialogPortal`),Ib=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Nb(n);return(0,L.jsx)(mb,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Lb,Rb]=jb(`AlertDialogContent`),zb=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=Nb(n),o=Pg(t,m.useRef(null)),s=m.useRef(null);return(0,L.jsx)(Lb,{scope:n,cancelRef:s,children:(0,L.jsx)(vb,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:m_(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Bb=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Nb(n);return(0,L.jsx)(Cb,{...i,...r,ref:t})},`AlertDialogTitle`)),Vb=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Nb(n);return(0,L.jsx)(Tb,{...i,...r,ref:t})},`AlertDialogDescription`)),Hb=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=Nb(n);return(0,L.jsx)(Db,{...i,...r,ref:t})},`AlertDialogAction`)),Ub=`AlertDialogCancel`,Wb=m.forwardRef(Ab(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Rb(Ub,n),a=Nb(n),o=Pg(t,i);return(0,L.jsx)(Db,{...a,...r,ref:o})},`AlertDialogCancel`)),Gb=Pb,Kb=Fb,qb=Ib,Jb=zb,Yb=Hb,Xb=Wb,Zb=Bb,Qb=Vb,$b=Object.defineProperty,ex=(e,t)=>$b(e,`name`,{value:t,configurable:!0});function tx(e){let[t,n]=m.useState(void 0);return y_(()=>{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}ex(tx,`useSize`);var nx=Object.defineProperty,rx=(e,t)=>nx(e,`name`,{value:t,configurable:!0}),ix=`Checkbox`,[ax,ox]=l_(ix),[sx,cx]=ax(ix);function lx(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]=O_({prop:n,defaultProp:i??!1,onChange:c,caller:ix}),[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:!vx(i)&&i,isFormControl:S,bubbleInput:_,setBubbleInput:v};return(0,L.jsx)(sx,{scope:t,...C,children:_x(d)?d(C):r})}rx(lx,`CheckboxProvider`);var ux=`CheckboxTrigger`,dx=m.forwardRef(rx(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}=cx(ux,e),_=Pg(i,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?.form;if(e){let t=rx(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,L.jsx)(e_.button,{type:`button`,role:`checkbox`,"aria-checked":vx(c)?`mixed`:c,"aria-required":l,"data-state":yx(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:_,onKeyDown:m_(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:m_(n,e=>{p(),d(e=>vx(e)?!0:!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),fx=m.forwardRef(rx(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,L.jsx)(lx,{__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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(dx,{...d,ref:t,__scopeCheckbox:n}),e&&(0,L.jsx)(gx,{__scopeCheckbox:n})]})})},`Checkbox`)),px=`CheckboxIndicator`,mx=m.forwardRef(rx(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=cx(px,n);return(0,L.jsx)(I_,{present:r||vx(a.checked)||a.checked===!0,children:(0,L.jsx)(e_.span,{"data-state":yx(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),hx=`CheckboxBubbleInput`,gx=m.forwardRef(rx(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}=cx(hx,e),_=Pg(r,g),v=tx(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=vx(s),n.call(e,!vx(s)&&s),e.dispatchEvent(t),y.current=!1}},[h,s,a,o]);let S=m.useRef(!vx(s)&&s);return(0,L.jsx)(e_.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:m_(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function _x(e){return typeof e==`function`}rx(_x,`isFunction`);function vx(e){return e===`indeterminate`}rx(vx,`isIndeterminate`);function yx(e){return vx(e)?`indeterminate`:e?`checked`:`unchecked`}rx(yx,`getState`);var bx=[`top`,`right`,`bottom`,`left`],xx=Math.min,Sx=Math.max,Cx=Math.round,wx=Math.floor,Tx=e=>({x:e,y:e}),Ex={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Dx(e,t,n){return Sx(e,xx(t,n))}function Ox(e,t){return typeof e==`function`?e(t):e}function kx(e){return e.split(`-`)[0]}function Ax(e){return e.split(`-`)[1]}function jx(e){return e===`x`?`y`:`x`}function Mx(e){return e===`y`?`height`:`width`}function Nx(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Px(e){return jx(Nx(e))}function Fx(e,t,n){n===void 0&&(n=!1);let r=Ax(e),i=Px(e),a=Mx(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Wx(o)),[o,Wx(o)]}function Ix(e){let t=Wx(e);return[Lx(e),t,Lx(t)]}function Lx(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Rx=[`left`,`right`],zx=[`right`,`left`],Bx=[`top`,`bottom`],Vx=[`bottom`,`top`];function Hx(e,t,n){switch(e){case`top`:case`bottom`:return n?t?zx:Rx:t?Rx:zx;case`left`:case`right`:return t?Bx:Vx;default:return[]}}function Ux(e,t,n,r){let i=Ax(e),a=Hx(kx(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Lx)))),a}function Wx(e){let t=kx(e);return Ex[t]+e.slice(t.length)}function Gx(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Kx(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Gx(e)}function qx(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 Jx(e,t,n){let{reference:r,floating:i}=e,a=Nx(t),o=Px(t),s=Mx(o),c=kx(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=Ax(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Yx(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}=Ox(t,e),p=Kx(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=qx(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=qx(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 Xx=50,Zx=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Yx},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Jx(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<Xx&&(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}=Jx(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Qx=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}=Ox(e,t)||{};if(l==null)return{};let d=Kx(u),f={x:n,y:r},p=Px(i),m=Mx(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=xx(d[_],T),ee=xx(d[v],T),D=C-h[m]-ee,O=C/2-h[m]/2+w,te=Dx(E,O,D),ne=!c.arrow&&Ax(i)!=null&&O!==te&&a.reference[m]/2-(O<E?E:ee)-h[m]/2<0,re=ne?O<E?O-E:O-D:0;return{[p]:f[p]+re,data:{[p]:te,centerOffset:O-te-re,...ne&&{alignmentOffset:re}},reset:ne}}}),$x=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}=Ox(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=kx(r),_=Nx(o),v=kx(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Wx(o)]:Ix(o)),x=p!==`none`;!d&&x&&b.push(...Ux(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=Fx(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`||_===Nx(t)||T.every(e=>Nx(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=Nx(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 eS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function tS(e){return bx.some(t=>e[t]>=0)}var nS=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ox(e,t);switch(i){case`referenceHidden`:{let e=eS(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:tS(e)}}}case`escaped`:{let e=eS(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:tS(e)}}}default:return{}}}}},rS=new Set([`left`,`top`]);async function iS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=kx(n),s=Ax(n),c=Nx(n)===`y`,l=rS.has(o)?-1:1,u=a&&c?-1:1,d=Ox(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 aS=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 iS(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}}}}},oS=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}=Ox(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Nx(i),p=jx(f),m=u[p],h=u[f],g=(e,t)=>Dx(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}}}}}},sS=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}=Ox(e,t),u={x:n,y:r},d=Nx(i),f=jx(d),p=u[f],m=u[d],h=Ox(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=rS.has(kx(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}}}},cS=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}=Ox(e,t),c=await i.detectOverflow(t,s),l=kx(n),u=Ax(n),d=Nx(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=xx(p-c[m],g),y=xx(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*Sx(c.left,c.right):S=p-2*Sx(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 lS(){return typeof window<`u`}function uS(e){return pS(e)?(e.nodeName||``).toLowerCase():`#document`}function dS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fS(e){return((pS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function pS(e){return lS()?e instanceof Node||e instanceof dS(e).Node:!1}function mS(e){return lS()?e instanceof Element||e instanceof dS(e).Element:!1}function hS(e){return lS()?e instanceof HTMLElement||e instanceof dS(e).HTMLElement:!1}function gS(e){return!lS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof dS(e).ShadowRoot}function _S(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=OS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function vS(e){return/^(table|td|th)$/.test(uS(e))}function yS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var bS=/transform|translate|scale|rotate|perspective|filter/,xS=/paint|layout|strict|content/,SS=e=>!!e&&e!==`none`,CS;function wS(e){let t=mS(e)?OS(e):e;return SS(t.transform)||SS(t.translate)||SS(t.scale)||SS(t.rotate)||SS(t.perspective)||!ES()&&(SS(t.backdropFilter)||SS(t.filter))||bS.test(t.willChange||``)||xS.test(t.contain||``)}function TS(e){let t=AS(e);for(;hS(t)&&!DS(t);){if(wS(t))return t;if(yS(t))return null;t=AS(t)}return null}function ES(){return CS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),CS}function DS(e){return/^(html|body|#document)$/.test(uS(e))}function OS(e){return dS(e).getComputedStyle(e)}function kS(e){return mS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function AS(e){if(uS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||gS(e)&&e.host||fS(e);return gS(t)?t.host:t}function jS(e){let t=AS(e);return DS(t)?(e.ownerDocument||e).body:hS(t)&&_S(t)?t:jS(t)}function MS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=jS(e),i=r===e.ownerDocument?.body,a=dS(r);if(i){let e=NS(a);return t.concat(a,a.visualViewport||[],_S(r)?r:[],e&&n?MS(e):[])}return t.concat(r,MS(r,[],n))}function NS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PS(e){let t=OS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=hS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Cx(n)!==a||Cx(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function FS(e){return mS(e)?e:e.contextElement}function IS(e){let t=FS(e);if(!hS(t))return Tx(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=PS(t),o=(a?Cx(n.width):n.width)/r,s=(a?Cx(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var LS=Tx(0);function RS(e){let t=dS(e);return!ES()||!t.visualViewport?LS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zS(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===dS(e)}function BS(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=FS(e),o=Tx(1);t&&(r?mS(r)&&(o=IS(r)):o=IS(e));let s=zS(a,n,r)?RS(a):Tx(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=dS(a),t=mS(r)?dS(r):r,n=e,i=NS(n);for(;i&&t!==n;){let e=IS(i),t=i.getBoundingClientRect(),r=OS(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=dS(i),i=NS(n)}}return qx({width:u,height:d,x:c,y:l})}function VS(e,t){let n=kS(e).scrollLeft;return t?t.left+n:BS(fS(e)).left+n}function HS(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-VS(e,n),y:n.top+t.scrollTop}}function US(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=fS(r),s=t?yS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Tx(1),u=Tx(0),d=hS(r);if((d||!a)&&((uS(r)!==`body`||_S(o))&&(c=kS(r)),d)){let e=BS(r);l=IS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?HS(o,c):Tx(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 WS(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function GS(e){let t=kS(e),n=e.ownerDocument.body,r=Sx(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Sx(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+VS(e),o=-t.scrollTop;return OS(n).direction===`rtl`&&(a+=Sx(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var KS=25;function qS(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=dS(e),a=fS(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ES()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(VS(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<=KS&&(s-=o)}return{width:s,height:c,x:l,y:u}}function JS(e,t){let n=BS(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=IS(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function YS(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=qS(e,n,t);else if(t===`document`)r=GS(fS(e));else if(mS(t))r=JS(t,n);else{let n=RS(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return qx(r)}function XS(e,t){let n=t.get(e);if(n)return n;let r=MS(e,[],!1).filter(e=>mS(e)&&uS(e)!==`body`),i=null,a=OS(e).position===`fixed`,o=a?AS(e):e;for(;mS(o)&&!DS(o);){let e=OS(o),t=wS(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=AS(o)}return t.set(e,r),r}function ZS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?yS(t)?[]:XS(t,this._c):[].concat(n),r],o=YS(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=YS(t,a[e],i);s=Sx(n.top,s),c=xx(n.right,c),l=xx(n.bottom,l),u=Sx(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function QS(e){let{width:t,height:n}=PS(e);return{width:t,height:n}}function $S(e,t,n){let r=hS(t),i=fS(t),a=n===`fixed`,o=BS(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Tx(0);if((r||!a)&&((uS(t)!==`body`||_S(i))&&(s=kS(t)),r)){let e=BS(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=VS(i));let l=i&&!r&&!a?HS(i,s):Tx(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 eC(e){return OS(e).position===`static`}function tC(e,t){if(!hS(e)||OS(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return fS(e)===n&&(n=n.ownerDocument.body),n}function nC(e,t){let n=dS(e);if(yS(e))return n;if(!hS(e)){let t=AS(e);for(;t&&!DS(t);){if(mS(t)&&!eC(t))return t;t=AS(t)}return n}let r=tC(e,t);for(;r&&vS(r)&&eC(r);)r=tC(r,t);return r&&DS(r)&&eC(r)&&!wS(r)?n:r||TS(e)||n}var rC=async function(e){let t=this.getOffsetParent||nC,n=this.getDimensions,r=await n(e.floating);return{reference:$S(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function iC(e){return OS(e).direction===`rtl`}var aC={convertOffsetParentRelativeRectToViewportRelativeRect:US,getDocumentElement:fS,getClippingRect:ZS,getOffsetParent:nC,getElementRects:rC,getClientRects:WS,getDimensions:QS,getScale:IS,isElement:mS,isRTL:iC};function oC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sC(e,t,n){let r=null,i,a=fS(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=wx(d),h=wx(a.clientWidth-(u+f)),g=wx(a.clientHeight-(d+p)),_=wx(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Sx(0,xx(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!oC(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=dS(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function cC(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=FS(e),u=i||a?[...l?MS(l):[],...t?MS(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?sC(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?BS(e):null;c&&g();function g(){let t=BS(e);h&&!oC(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 lC=aS,uC=oS,dC=$x,fC=cS,pC=nS,mC=Qx,hC=sS,gC=(e,t,n)=>{let r=new Map,i=n??{},a={...aC,...i.platform,_c:r};return Zx(e,t,{...i,platform:a})},_C=typeof document<`u`?m.useLayoutEffect:function(){};function vC(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(!vC(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)&&!vC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function yC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bC(e,t){let n=yC(e);return Math.round(t*n)/n}function xC(e){let t=m.useRef(e);return _C(()=>{t.current=e}),t}function SC(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);vC(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,ee=xC(c),D=xC(i),O=xC(l),te=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),gC(C.current,w.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};ne.current&&!vC(T.current,t)&&(T.current=t,Zg.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);_C(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ne=m.useRef(!1);_C(()=>(ne.current=!0,()=>{ne.current=!1}),[]),_C(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(ee.current)return ee.current(x,S,te);te()}},[x,S,te,ee,E]);let re=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),k=m.useMemo(()=>({reference:x,floating:S}),[x,S]),ie=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=bC(k.floating,u.x),r=bC(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...yC(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:te,refs:re,elements:k,floatingStyles:ie}),[u,te,re,k,ie])}var CC=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?{}:mC({element:r.current,padding:i}).fn(n):r?mC({element:r,padding:i}).fn(n):{}}}},wC=(e,t)=>{let n=lC(e);return{name:n.name,fn:n.fn,options:[e,t]}},TC=(e,t)=>{let n=uC(e);return{name:n.name,fn:n.fn,options:[e,t]}},EC=(e,t)=>({fn:hC(e).fn,options:[e,t]}),DC=(e,t)=>{let n=dC(e);return{name:n.name,fn:n.fn,options:[e,t]}},OC=(e,t)=>{let n=fC(e);return{name:n.name,fn:n.fn,options:[e,t]}},kC=(e,t)=>{let n=pC(e);return{name:n.name,fn:n.fn,options:[e,t]}},AC=(e,t)=>{let n=CC(e);return{name:n.name,fn:n.fn,options:[e,t]}},jC=Object.defineProperty,MC=m.forwardRef(((e,t)=>jC(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,L.jsx)(e_.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,L.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),NC=Object.defineProperty,PC=(e,t)=>NC(e,`name`,{value:t,configurable:!0}),FC=`Popper`,[IC,LC]=l_(FC),[RC,zC]=IC(FC),BC=PC(e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null),[a,o]=m.useState(void 0);return(0,L.jsx)(RC,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),VC=`PopperAnchor`,HC=m.forwardRef(PC(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=zC(VC,n),o=m.useRef(null),s=a.onAnchorChange,c=Pg(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&&QC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,L.jsx)(e_.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),UC=`PopperContent`,[WC,GC]=IC(UC),KC=m.forwardRef(PC(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,_=zC(UC,n),[v,y]=m.useState(null),b=Pg(t,y),[x,S]=m.useState(null),C=tx(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),ee=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,te={padding:ee,boundary:D.filter(XC),altBoundary:O},{refs:ne,floatingStyles:re,placement:k,isPositioned:ie,middlewareData:ae}=SC({strategy:`fixed`,placement:E,whileElementsMounted:PC((...e)=>cC(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[wC({mainAxis:i+T,alignmentAxis:o}),c&&TC({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?EC():void 0,...te}),c&&DC({...te}),OC({...te,apply:PC(({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&&AC({element:x,padding:s}),ZC({arrowWidth:w,arrowHeight:T}),f&&kC({strategy:`referenceHidden`,...te,boundary:O?te.boundary:void 0})]}),A=_.setPlacementState;y_(()=>(A(k),()=>{A(void 0)}),[k,A]);let[oe,se]=QC(k),ce=Y_(h);y_(()=>{ie&&ce?.()},[ie,ce]);let le=ae.arrow?.x,ue=ae.arrow?.y,de=ae.arrow?.centerOffset!==0,[fe,pe]=m.useState();return y_(()=>{v&&pe(window.getComputedStyle(v).zIndex)},[v]),(0,L.jsx)(`div`,{ref:ne.setFloating,"data-radix-popper-content-wrapper":``,style:{...re,transform:ie?re.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(` `),...ae.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,L.jsx)(WC,{scope:n,placedSide:oe,placedAlign:se,onArrowChange:S,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,L.jsx)(e_.div,{"data-side":oe,"data-align":se,...g,ref:b,style:{...g.style,animation:ie?g.style?.animation:`none`}})})})},`PopperContent`)),qC=`PopperArrow`,JC={top:`bottom`,right:`left`,bottom:`top`,left:`right`},YC=m.forwardRef(PC(function(e,t){let{__scopePopper:n,...r}=e,i=GC(qC,n),a=JC[i.placedSide];return(0,L.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,L.jsx)(MC,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function XC(e){return e!==null}PC(XC,`isNotNull`);var ZC=PC(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]=QC(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 QC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}PC(QC,`getSideAndAlignFromPlacement`);var $C=BC,ew=HC,tw=KC,nw=YC,rw=Object.defineProperty,iw=(e,t)=>rw(e,`name`,{value:t,configurable:!0}),aw=`Popover`,[ow,sw]=l_(aw,[LC]),cw=LC(),[lw,uw]=ow(aw),dw=iw(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=cw(t),c=m.useRef(null),[l,u]=m.useState(!1),[d,f]=O_({prop:r,defaultProp:i??!1,onChange:a,caller:aw});return(0,L.jsx)($C,{...s,children:(0,L.jsx)(lw,{scope:t,contentId:K_(),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`),fw=`PopoverTrigger`,pw=m.forwardRef(iw(function(e,t){let{__scopePopover:n,...r}=e,i=uw(fw,n),a=cw(n),o=Pg(t,i.triggerRef),s=(0,L.jsx)(e_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ww(i.open),...r,ref:o,onClick:m_(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,L.jsx)(ew,{asChild:!0,...a,children:s})},`PopoverTrigger`)),mw=`PopoverPortal`,[hw,gw]=ow(mw,{forceMount:void 0}),_w=iw(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=uw(mw,t);return(0,L.jsx)(hw,{scope:t,forceMount:n,children:(0,L.jsx)(I_,{present:n||a.open,children:(0,L.jsx)(Ov,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),vw=`PopoverContent`,yw=m.forwardRef(iw(function(e,t){let n=gw(vw,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=uw(vw,e.__scopePopover);return(0,L.jsx)(I_,{present:r||a.open,children:a.modal?(0,L.jsx)(xw,{...i,ref:t}):(0,L.jsx)(Sw,{...i,ref:t})})},`PopoverContent`)),bw=Lg(`PopoverContent.RemoveScroll`),xw=m.forwardRef(iw(function(e,t){let n=uw(vw,e.__scopePopover),r=m.useRef(null),i=Pg(t,r),a=m.useRef(!1);return m.useEffect(()=>{let e=r.current;if(e)return Qy(e)},[]),(0,L.jsx)(Uy,{as:bw,allowPinchZoom:!0,children:(0,L.jsx)(Cw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:m_(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:m_(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:m_(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Sw=m.forwardRef(iw(function(e,t){let n=uw(vw,e.__scopePopover),r=m.useRef(!1),i=m.useRef(!1);return(0,L.jsx)(Cw,{...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`)),Cw=m.forwardRef(iw(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=uw(vw,n),p=cw(n);return Pv(),(0,L.jsx)(hv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(rv,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,L.jsx)(tw,{"data-state":ww(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 ww(e){return e?`open`:`closed`}iw(ww,`getState`);var Tw=dw,Ew=pw,Dw=_w,Ow=yw,kw=Object.defineProperty,Aw=(e,t)=>kw(e,`name`,{value:t,configurable:!0}),jw=`Switch`,[Mw,Nw]=l_(jw),[Pw,Fw]=Mw(jw);function Iw(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]=O_({prop:n,defaultProp:i??!1,onChange:c,caller:jw}),[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,L.jsx)(Pw,{scope:t,...S,children:Ww(d)?d(S):r})}Aw(Iw,`SwitchProvider`);var Lw=`SwitchTrigger`,Rw=m.forwardRef(Aw(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}=Fw(Lw,e),_=Pg(r,u),v=m.useRef(c);return m.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=Aw(()=>d(v.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,L.jsx)(e_.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":Gw(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:_,onClick:m_(t,e=>{p(),d(e=>!e),g&&h&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),zw=m.forwardRef(Aw(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,L.jsx)(Iw,{__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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Rw,{...d,ref:t,__scopeSwitch:n}),e&&(0,L.jsx)(Uw,{__scopeSwitch:n})]})})},`Switch`)),Bw=`SwitchThumb`,Vw=m.forwardRef(Aw(function(e,t){let{__scopeSwitch:n,...r}=e,i=Fw(Bw,n);return(0,L.jsx)(e_.span,{"data-state":Gw(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Hw=`SwitchBubbleInput`,Uw=m.forwardRef(Aw(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}=Fw(Hw,e),_=Pg(r,g),v=tx(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,L.jsx)(e_.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:m_(t,e=>{y.current&&e.stopPropagation()}),style:{...n.style,...v,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function Ww(e){return typeof e==`function`}Aw(Ww,`isFunction`);function Gw(e){return e?`checked`:`unchecked`}Aw(Gw,`getState`);var Kw=Object.defineProperty,qw=(e,t)=>Kw(e,`name`,{value:t,configurable:!0}),[Jw,Yw]=l_(`Tooltip`,[LC]),Xw=LC(),Zw=`TooltipProvider`,Qw=700,$w=`tooltip.open`,[eT,tT]=Jw(Zw),nT=qw(e=>{let{__scopeTooltip:t,delayDuration:n=Qw,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,L.jsx)(eT,{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`),rT=`Tooltip`,[iT,aT]=Jw(rT),oT=qw(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=tT(rT,e.__scopeTooltip),l=Xw(t),[u,d]=m.useState(null),[f,p]=m.useState(void 0),h=K_(),g=m.useRef(0),_=o??c.disableHoverableContent,v=s??c.delayDuration,y=m.useRef(!1),[b,x]=O_({prop:r,defaultProp:i??!1,onChange:qw(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent($w))):c.onClose(),a?.(e)},`onChange`),caller:rT}),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,L.jsx)($C,{...l,children:(0,L.jsx)(iT,{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`),sT=`TooltipTrigger`,cT=m.forwardRef(qw(function(e,t){let{__scopeTooltip:n,...r}=e,i=aT(sT,n),a=tT(sT,n),o=Xw(n),s=Pg(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,L.jsx)(ew,{asChild:!0,...o,children:(0,L.jsx)(e_.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:m_(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:m_(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:m_(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:m_(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:m_(e.onBlur,i.onClose),onClick:m_(e.onClick,i.onClose)})})},`TooltipTrigger`)),lT=`TooltipPortal`,[uT,dT]=Jw(lT,{forceMount:void 0}),fT=qw(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=aT(lT,t);return(0,L.jsx)(uT,{scope:t,forceMount:n,children:(0,L.jsx)(I_,{present:n||a.open,children:(0,L.jsx)(Ov,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),pT=`TooltipContent`,mT=m.forwardRef(qw(function(e,t){let n=dT(pT,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=aT(pT,e.__scopeTooltip);return(0,L.jsx)(I_,{present:r||o.open,children:o.disableHoverableContent?(0,L.jsx)(_T,{side:i,...a,ref:t}):(0,L.jsx)(hT,{side:i,...a,ref:t})})},`TooltipContent`)),hT=m.forwardRef(qw(function(e,t){let n=aT(pT,e.__scopeTooltip),r=tT(pT,e.__scopeTooltip),i=m.useRef(null),a=Pg(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=bT(r,yT(r,n.getBoundingClientRect())),a=xT(t.getBoundingClientRect()),o=CT([...i,...a]);s(o),d(!0)},[d]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&u){let e=qw(e=>p(e,u),`handleTriggerLeave`),t=qw(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=qw(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!ST(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,L.jsx)(_T,{...e,ref:a})},`TooltipContentHoverable`)),gT=Bg(`TooltipContent`),_T=m.forwardRef(qw(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=aT(pT,n),u=Xw(n),{onClose:d}=l;m.useEffect(()=>(document.addEventListener($w,d),()=>document.removeEventListener($w,d)),[d]),m.useEffect(()=>{if(l.trigger){let e=qw(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 y_(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,L.jsx)(rv,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,L.jsxs)(tw,{"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,L.jsx)(gT,{children:r}),i?(0,L.jsx)(a_,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),vT=m.forwardRef(qw(function(e,t){let{__scopeTooltip:n,...r}=e,i=Xw(n);return(0,L.jsx)(nw,{...i,...r,ref:t})},`TooltipArrow`));function yT(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`)}}qw(yT,`getExitSideFromRect`);function bT(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}qw(bT,`getPaddedExitPoints`);function xT(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}]}qw(xT,`getPointsFromRect`);function ST(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}qw(ST,`isPointInPolygon`);function CT(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)),wT(t)}qw(CT,`getHull`);function wT(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)}qw(wT,`getHullPresorted`);var TT=nT,ET=oT,DT=cT,OT=fT,kT=mT,AT=vT,jT=ih(`group/button pointer-coarse:min-h-10 pointer-coarse:min-w-10 motion-reduce:transition-none motion-reduce:active:transform-none inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-[0.8125rem] font-medium whitespace-nowrap transition-[transform,background-color,box-shadow,color,border-color,filter] duration-150 ease-snap outline-none select-none focus-visible:ring-3 focus-visible:ring-ring/40 active:not-aria-[haspopup]:scale-[0.98] 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:`bg-primary text-primary-foreground hover:brightness-110`,soft:`bg-accent text-foreground hover:bg-primary/20`,outline:`border-input bg-card text-foreground hover:bg-muted aria-expanded:bg-muted`,secondary:`bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent`,ghost:`text-foreground hover:bg-accent aria-expanded:bg-accent`,destructive:`bg-destructive text-background hover:brightness-110 focus-visible:ring-destructive/30`,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 J({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Rg:`button`;return(0,L.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:q(jT({variant:t,size:n,className:e})),...i})}var MT=q(`pointer-events-none inline-flex h-[1.125rem] min-w-[1.125rem] w-fit items-center justify-center gap-1 rounded-[5px] border border-border bg-background px-1 font-sans text-[0.7rem] leading-none font-medium text-muted-foreground select-none`,`in-data-[slot=tooltip-content]:border-background/25 in-data-[slot=tooltip-content]:bg-transparent in-data-[slot=tooltip-content]:text-background`,`in-data-[variant=default]:border-primary-foreground/35 in-data-[variant=default]:bg-primary-foreground/10 in-data-[variant=default]:text-primary-foreground`,`in-data-[variant=destructive]:border-background/40 in-data-[variant=destructive]:bg-background/10 in-data-[variant=destructive]:text-background`,`[&_svg:not([class*='size-'])]:size-3`);function NT({className:e,...t}){return(0,L.jsx)(`kbd`,{"data-slot":`kbd`,className:q(MT,e),...t})}function PT({className:e,...t}){return(0,L.jsx)(`kbd`,{"data-slot":`kbd-group`,className:q(`inline-flex items-center gap-0.5`,e),...t})}var FT=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),IT={alt:`⌥`,ctrl:`⌃`,shift:`⇧`,meta:`⌘`,cmd:`⌘`},LT={enter:`↵`,esc:`Esc`,escape:`Esc`,arrowleft:`←`,arrowright:`→`,arrowup:`↑`,arrowdown:`↓`,space:`Space`,delete:`Del`,backspace:`⌫`};function RT(e){return e.split(`+`).map(e=>{let t=e.toLowerCase();return FT&&IT[t]?IT[t]:LT[t]??(e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1))})}function zT({chord:e,className:t}){let n=RT(e);return(0,L.jsx)(PT,{className:t,children:n.map((e,t)=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[t>0?(0,L.jsx)(`span`,{className:`sr-only`,children:`plus`}):null,(0,L.jsx)(NT,{children:e})]},t))})}function BT({chord:e,children:t,className:n}){return(0,L.jsxs)(`span`,{className:q(`kbd-hint inline-flex shrink-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,n),children:[(0,L.jsx)(zT,{chord:e}),t]})}function VT({open:e,onOpenChange:t,label:n,description:r,dismissOnBackdrop:i=!0,className:a,onCloseAutoFocus:o,children:s}){let c=pd();return(0,L.jsx)(ob,{open:e,onOpenChange:t,children:(0,L.jsx)(xl,{children:e?(0,L.jsxs)(fb,{forceMount:!0,children:[(0,L.jsx)(mb,{asChild:!0,forceMount:!0,children:(0,L.jsx)(B.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,L.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 grid place-items-center p-4`,children:(0,L.jsx)(vb,{asChild:!0,forceMount:!0,onCloseAutoFocus:o,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,L.jsxs)(B.div,{className:q(`glass-pop pointer-events-auto flex max-h-[min(86svh,48rem)] w-full max-w-2xl flex-col overflow-hidden rounded-xl outline-none`,a),initial:{opacity:0,scale:c?1:.92,y:c?0:18},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:c?1:.96,y:c?0:8,transition:{duration:.12,ease:`easeIn`}},transition:{type:`spring`,stiffness:460,damping:32,mass:.9},children:[(0,L.jsx)(Cb,{className:`sr-only`,children:n}),r?(0,L.jsx)(Tb,{className:`sr-only`,children:r}):null,s]})})})]}):null})})}var HT=[],UT=0,WT=new Set;function GT(){for(let e of[...WT])e()}function KT(e){return WT.add(e),()=>{WT.delete(e)}}function qT(){let e;for(let t of HT)(!e||t.priority>e.priority||t.priority===e.priority&&t.order<e.order)&&(e=t);return e?.id}var JT={question:30,confirm:20,help:10,sheet:5};function YT(e,t){let n=(0,m.useId)();(0,m.useEffect)(()=>{if(e)return HT=[...HT,{id:n,priority:t,order:++UT}],GT(),()=>{HT=HT.filter(e=>e.id!==n),GT()}},[e,t,n]);let r=(0,m.useSyncExternalStore)(KT,qT,()=>void 0);return e&&r===n}function XT(){return HT.length>0}function ZT(){return(0,m.useSyncExternalStore)(KT,()=>HT.length>0,()=>!1)}var QT=[`lobby`,`tasks`,`plan`,`quickfix`,`issues`,`excalidraw`,`git`,`knowledge`,`metrics`],$T=`already answered in another window`,eE=`Attached files:`,tE=new Set(QT);function nE(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(n===`sessions`)return{kind:`sessions`,...t[1]?{key:t[1]}:{}};if(tE.has(n))return{kind:`tab`,tab:n,rest:t.slice(1)}}function rE(e,...t){return`#/${e}${t.filter(Boolean).map(e=>`/${encodeURIComponent(e)}`).join(``)}`}function iE(e){window.location.hash!==e&&(window.location.hash=e)}function aE(){let[e,t]=(0,m.useState)(()=>nE(window.location.hash)??{kind:`tab`,tab:`lobby`,rest:[]});return(0,m.useEffect)(()=>{let e=()=>{let e=nE(window.location.hash);e?t(e):(window.history.replaceState(null,``,`#/lobby`),t({kind:`tab`,tab:`lobby`,rest:[]}))};return e(),window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function oE({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`empty`,className:q(`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 sE({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`empty-header`,className:q(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var cE=ih(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted text-muted-foreground [&_svg:not([class*='size-'])]:size-5`}},defaultVariants:{variant:`default`}});function lE({className:e,variant:t=`default`,...n}){return(0,L.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:q(cE({variant:t,className:e})),...n})}function uE({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`empty-title`,className:q(`text-sm font-medium tracking-tight`,e),...t})}function dE({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`empty-description`,className:q(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function fE({className:e,...t}){return(0,L.jsx)(`span`,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:q(`inline-flex size-4 shrink-0 items-end justify-between text-primary`,e),...t,children:[0,1,2].map(e=>(0,L.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))})}function pE({label:e=`Connecting…`}){return(0,L.jsxs)(`div`,{className:`flex min-h-48 flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{}),(0,L.jsx)(`span`,{children:e})]})}function mE({message:e,onRetry:t}){return(0,L.jsxs)(oE,{className:`m-4 flex-1`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsxs)(uE,{className:`flex items-center gap-2`,children:[(0,L.jsx)(zm,{className:`size-4 text-destructive`,"aria-hidden":`true`}),`Could not load this view`]}),(0,L.jsx)(dE,{children:e??`The request failed. Try again.`})]}),t?(0,L.jsxs)(J,{variant:`outline`,onClick:t,children:[(0,L.jsx)(hm,{"aria-hidden":`true`}),`Try again`]}):null]})}function hE({onRetry:e}){return(0,L.jsxs)(`div`,{role:`status`,className:`mx-3 mb-1 flex items-center gap-2 rounded-lg bg-destructive/10 px-3 py-2 text-sm text-destructive max-sm:mx-2`,children:[(0,L.jsx)(Ym,{className:`size-4`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{children:`Connection lost — retrying every 2 s.`}),e?(0,L.jsx)(J,{variant:`link`,className:`h-8 px-1 text-destructive`,onClick:e,children:`Retry now`}):null]})}function gE(){let[e,t]=(0,m.useReducer)(e=>e+1,0);return(0,m.useEffect)(()=>wd.subscribe(t),[]),e}function _E(){return gE(),wd.status()}function vE(e){return gE(),wd.get(e)}function yE(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 bE(e,t,n,r=!0){gE();let[i,a]=(0,m.useState)({loading:!0,at:0}),[o,s]=(0,m.useState)(0),c=[wd.status().connection,...n.map(e=>wd.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})),Ud(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 xE({delayDuration:e=400,...t}){return(0,L.jsx)(TT,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function SE({...e}){return(0,L.jsx)(ET,{"data-slot":`tooltip`,...e})}function CE({...e}){return(0,L.jsx)(DT,{"data-slot":`tooltip-trigger`,...e})}function wE({className:e,sideOffset:t=6,children:n,...r}){return(0,L.jsx)(OT,{children:(0,L.jsxs)(kT,{"data-slot":`tooltip-content`,sideOffset:t,className:q(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-2.5 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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,(0,L.jsx)(AT,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}function TE(e){return[...e.querySelectorAll(`[data-nav]`)].filter(e=>!e.hasAttribute(`disabled`)&&e.getAttribute(`aria-hidden`)!==`true`)}function EE(e,t,n){let r=TE(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 DE(e){return e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&![`checkbox`,`radio`,`button`].includes(e.type)||e instanceof HTMLElement&&e.isContentEditable}function OE(e,t=!0){return e===`ArrowDown`||t&&e===`j`?1:e===`ArrowUp`||t&&e===`k`?-1:0}function kE(e,t=!0){return e===`ArrowRight`||t&&e===`l`?1:e===`ArrowLeft`||t&&e===`h`?-1:0}var AE=`button:not([disabled]), a[href], [role='button']:not([aria-disabled='true'])`;function jE(e){return[...e.querySelectorAll(AE)].filter(e=>e.offsetParent!==null)}function ME(e,t,n){let r=jE(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 NE(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 PE(e){return e.querySelector(`[aria-current='true']`)??jE(e)[0]}function FE(){let e=document.getElementById(`main`);if(!e)return!1;let t=e.querySelector(`[data-pane='list']`);return((t?PE(t):void 0)??jE(e)[0]??e).focus(),!0}function IE(){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 LE={active:!1},RE=new Set([`g`,`j`,`k`,`h`,`l`,`d`,`p`,`/`,`?`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]);function zE(e){if(!e)return!1;let t=e.toLowerCase();return t===`delete`||/^[a-z]$/.test(t)&&!RE.has(t)}function BE(e,t){return t.toLowerCase()===`delete`?e.key===`Delete`||e.key===`Backspace`:e.key.toLowerCase()===t.toLowerCase()}function VE(){return XT()||!!document.querySelector(`[role='dialog'], [role='alertdialog'], [role='menu'], [role='listbox']`)}function HE(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||BE(t,e)&&(DE(t.target)||(r||!VE())&&(t.preventDefault(),i.current()))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,n,r])}var UE={neutral:`text-foreground hover:bg-accent`,primary:``,danger:`text-destructive hover:bg-destructive/10 hover:text-destructive`};function Y({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=zE(r);HE(f?r:void 0,()=>d.current?.click(),{enabled:f&&!l});let p=(0,L.jsx)(t,{"aria-hidden":`true`}),h=n===`primary`?`default`:`ghost`,g=q(!s&&`px-2.5`,UE[n],c),_=s?`icon`:`default`,v=s?p:(0,L.jsxs)(L.Fragment,{children:[p,(0,L.jsx)(`span`,{children:o??e}),r?(0,L.jsx)(zT,{chord:r,className:`kbd-hint ml-1`}):null]}),y=i?(0,L.jsx)(J,{asChild:!0,ref:d,variant:h,size:_,"data-tone":n,className:g,children:(0,L.jsx)(`a`,{href:i,target:`_blank`,rel:`noreferrer noopener`,"aria-label":e,"aria-keyshortcuts":f?r:void 0,children:v})}):(0,L.jsx)(J,{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,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:y}),(0,L.jsxs)(wE,{children:[e,(0,L.jsx)(zT,{chord:r??(i?`Enter`:`Enter / Space`)})]})]}):y}function WE({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,L.jsx)(`div`,{role:`toolbar`,"aria-label":`Actions`,onKeyDown:n,className:q(`sticky -top-5 z-10 -mx-5 -mt-5 flex min-h-12 flex-wrap items-center gap-1 border-b border-border bg-card/90 px-4 py-2 backdrop-blur-sm [&>[data-tone=danger]:not(:first-child)]:ml-auto`,t),children:e})}function GE({...e}){return(0,L.jsx)(ob,{"data-slot":`sheet`,...e})}function KE({...e}){return(0,L.jsx)(Db,{"data-slot":`sheet-close`,...e})}function qE({...e}){return(0,L.jsx)(fb,{"data-slot":`sheet-portal`,...e})}function JE({className:e,...t}){return(0,L.jsx)(mb,{"data-slot":`sheet-overlay`,className:q(`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 YE({className:e,children:t,side:n=`right`,showCloseButton:r=!0,forceMount:i,hidden:a,...o}){return(0,L.jsxs)(qE,{forceMount:i,children:[a?null:(0,L.jsx)(JE,{}),(0,L.jsxs)(vb,{forceMount:i,hidden:a,"data-slot":`sheet-content`,"data-side":n,className:q(`glass-pop fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm transition duration-200 ease-in-out data-[side=right]:rounded-l-xl data-[side=left]:rounded-r-xl 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-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...o,children:[t,r&&(0,L.jsx)(Db,{"data-slot":`sheet-close`,asChild:!0,children:(0,L.jsxs)(J,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,L.jsx)(Zm,{}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function XE({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`sheet-header`,className:q(`flex flex-col gap-0.5 p-4`,e),...t})}function ZE({className:e,...t}){return(0,L.jsx)(Cb,{"data-slot":`sheet-title`,className:q(`text-base font-medium text-foreground`,e),...t})}function QE({className:e,...t}){return(0,L.jsx)(Tb,{"data-slot":`sheet-description`,className:q(`text-sm text-muted-foreground`,e),...t})}function $E(){return yE(`(min-width: 1024px)`)}function eD({className:e,...t}){return(0,L.jsx)(`section`,{className:q(`min-h-0 min-w-0`,e),...t})}function tD({open:e,onClose:t,describe:n,children:r}){let i=YT(e,JT.sheet),a=(0,m.useRef)(!1);return i&&(a.current=!0),e||(a.current=!1),(0,L.jsx)(GE,{open:e&&i,onOpenChange:e=>!e&&t(),children:(0,L.jsxs)(YE,{forceMount:e&&a.current?!0:void 0,hidden:!i,showCloseButton:!1,className:q(`gap-0 data-[side=right]:w-[92%] data-[side=right]:sm:max-w-3xl`,!i&&`!hidden`),children:[(0,L.jsxs)(XE,{className:`flex-row items-center justify-between border-b px-4 py-2`,children:[(0,L.jsx)(ZE,{className:`text-sm`,children:`Detail`}),(0,L.jsx)(QE,{className:`sr-only`,children:n}),(0,L.jsx)(KE,{asChild:!0,children:(0,L.jsxs)(J,{variant:`ghost`,size:`sm`,"aria-label":`Close detail`,title:`Close · Esc`,className:`gap-2`,children:[(0,L.jsx)(Zm,{"aria-hidden":`true`}),`Close`,(0,L.jsx)(zT,{chord:`Esc`,className:`kbd-hint`})]})})]}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:r})]})})}function nD({wide:e,list:t,detail:n,open:r,onClose:i,hint:a,describe:o}){let s=(0,m.useRef)(null),c=(0,m.useRef)(null);function l(t){let n=s.current;if(!n||t.defaultPrevented||t.nativeEvent.isComposing||XT()||t.altKey||t.ctrlKey||t.metaKey||DE(t.target)||t.target instanceof HTMLInputElement)return;let r=OE(t.key,!1);r?(t.preventDefault(),ME(n,t.target,r)):t.key===`Home`||t.key===`End`?(t.preventDefault(),ME(n,t.target,t.key===`Home`?`first`:`last`)):e&&kE(t.key)===1&&c.current&&(t.preventDefault(),c.current.focus())}function u(e){e.defaultPrevented||e.nativeEvent.isComposing||XT()||e.altKey||e.ctrlKey||e.metaKey||DE(e.target)||kE(e.key)===-1&&s.current&&(e.preventDefault(),PE(s.current)?.focus())}return e?(0,L.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[clamp(17rem,28%,23rem)_minmax(0,1fr)]`,children:[(0,L.jsx)(eD,{"data-pane":`list`,ref:s,onKeyDown:l,className:`overflow-y-auto border-r border-border pb-dock`,children:t}),(0,L.jsx)(eD,{"data-pane":`detail`,ref:c,tabIndex:0,"aria-label":`Detail`,onKeyDown:u,className:`overflow-y-auto px-5 pt-5 pb-dock outline-none focus-visible:bg-muted/30`,children:n??(0,L.jsx)(`div`,{className:`grid h-full min-h-48 place-items-center`,children:(0,L.jsxs)(`div`,{className:`flex max-w-xs flex-col items-center gap-3 text-center`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground`,children:(0,L.jsx)(qp,{className:`size-5`})}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),(0,L.jsxs)(`p`,{className:`kbd-hint flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,L.jsx)(zT,{chord:`ArrowUp`}),(0,L.jsx)(zT,{chord:`ArrowDown`}),`move`]}),(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,L.jsx)(zT,{chord:`ArrowRight`}),`open`]})]})]})})})]}):(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto pb-dock`,children:[(0,L.jsx)(eD,{"data-pane":`list`,ref:s,onKeyDown:l,children:t}),(0,L.jsx)(tD,{open:r&&n!==null,onClose:i,describe:o,children:n})]})}function rD({title:e,count:t,children:n}){return(0,L.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-card/90 px-4 py-2 backdrop-blur-sm`,children:[(0,L.jsx)(`h2`,{className:`text-sm font-medium`,children:e}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-2 flex-1`}),t?(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:t}):null,n?(0,L.jsx)(`div`,{className:`flex items-center gap-1.5`,children:n}):null]})}function iD(){return(0,L.jsx)(`div`,{className:`flex flex-col gap-1.5 p-3`,role:`status`,"aria-label":`Loading`,children:[0,1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-11 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function aD({className:e,...t}){return(0,L.jsx)(`textarea`,{"data-slot":`textarea`,className:q(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background px-3.5 py-2.5 text-base 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/30 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80`,e),...t})}function oD(e){return e<10?`0${e}`:String(e)}function sD(e){if(!Number.isFinite(e))return`0`;let t=new Date(e);return`${oD(t.getHours())}:${oD(t.getMinutes())}`}function cD(e){if(!Number.isFinite(e)||e<0)return`0s`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m`:`${Math.floor(n/60)}h ${oD(n%60)}m`}function lD(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 uD(e){let t=lD(e);return t===`now`?`just now`:`${t} ago`}function dD({...e}){return(0,L.jsx)(Gb,{"data-slot":`alert-dialog`,...e})}function fD({...e}){return(0,L.jsx)(Kb,{"data-slot":`alert-dialog-portal`,...e})}function pD({className:e,...t}){return(0,L.jsx)(qb,{"data-slot":`alert-dialog-overlay`,className:q(`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 mD({className:e,...t}){return(0,L.jsxs)(fD,{children:[(0,L.jsx)(pD,{}),(0,L.jsx)(Jb,{"data-slot":`alert-dialog-content`,className:q(`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-xl p-5 text-sm duration-150 outline-none sm:max-w-md 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),...t})]})}function hD({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:q(`flex flex-col gap-1.5`,e),...t})}function gD({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:q(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function _D({className:e,...t}){return(0,L.jsx)(Zb,{"data-slot":`alert-dialog-title`,className:q(`text-base font-medium text-foreground`,e),...t})}function vD({className:e,...t}){return(0,L.jsx)(Qb,{"data-slot":`alert-dialog-description`,className:q(`text-sm text-muted-foreground`,e),...t})}function yD({className:e,variant:t=`default`,...n}){return(0,L.jsx)(J,{variant:t,className:q(`h-8`,e),asChild:!0,children:(0,L.jsx)(Yb,{"data-slot":`alert-dialog-action`,...n})})}function bD({className:e,...t}){return(0,L.jsx)(J,{variant:`outline`,className:q(`h-8`,e),asChild:!0,children:(0,L.jsx)(Xb,{"data-slot":`alert-dialog-cancel`,...t})})}function xD({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=YT(f,JT.confirm),g=l===`destructive`;return HE(`y`,()=>{p(!1),o()},{enabled:f&&h,inDialog:!0}),(0,L.jsxs)(dD,{open:f&&h,onOpenChange:p,children:[(0,L.jsx)(Y,{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,L.jsxs)(mD,{children:[(0,L.jsxs)(hD,{children:[(0,L.jsx)(_D,{children:r}),(0,L.jsx)(vD,{children:i})]}),(0,L.jsxs)(gD,{children:[(0,L.jsxs)(bD,{children:[`Keep it`,(0,L.jsx)(zT,{chord:`Esc`,className:`kbd-hint ml-1`})]}),(0,L.jsxs)(yD,{variant:g?`destructive`:`default`,onClick:o,children:[a,(0,L.jsx)(zT,{chord:`Y`,className:`kbd-hint ml-1`})]})]})]})]})}function SD(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var CD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TD={};function ED(e,t){return((t||TD).jsx?wD:CD).test(e)}var DD=/[ \t\n\f\r]/g;function OD(e){return typeof e==`object`?e.type===`text`&&kD(e.value):kD(e)}function kD(e){return e.replace(DD,``)===``}var AD=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};AD.prototype.normal={},AD.prototype.property={},AD.prototype.space=void 0;function jD(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new AD(n,r,t)}function MD(e){return e.toLowerCase()}var ND=class{constructor(e,t){this.attribute=t,this.property=e}};ND.prototype.attribute=``,ND.prototype.booleanish=!1,ND.prototype.boolean=!1,ND.prototype.commaOrSpaceSeparated=!1,ND.prototype.commaSeparated=!1,ND.prototype.defined=!1,ND.prototype.mustUseProperty=!1,ND.prototype.number=!1,ND.prototype.overloadedBoolean=!1,ND.prototype.property=``,ND.prototype.spaceSeparated=!1,ND.prototype.space=void 0;var PD=s({boolean:()=>X,booleanish:()=>ID,commaOrSpaceSeparated:()=>BD,commaSeparated:()=>zD,number:()=>Z,overloadedBoolean:()=>LD,spaceSeparated:()=>RD}),FD=0,X=VD(),ID=VD(),LD=VD(),Z=VD(),RD=VD(),zD=VD(),BD=VD();function VD(){return 2**++FD}var HD=Object.keys(PD),UD=class extends ND{constructor(e,t,n,r){let i=-1;if(super(e,t),WD(this,`space`,r),typeof n==`number`)for(;++i<HD.length;){let e=HD[i];WD(this,HD[i],(n&PD[e])===PD[e])}}};UD.prototype.defined=!0;function WD(e,t,n){n&&(e[t]=n)}function GD(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new UD(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[MD(r)]=r,n[MD(a.attribute)]=r}return new AD(t,n,e.space)}var KD=GD({properties:{ariaActiveDescendant:null,ariaAtomic:ID,ariaAutoComplete:null,ariaBusy:ID,ariaChecked:ID,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:RD,ariaCurrent:null,ariaDescribedBy:RD,ariaDetails:null,ariaDisabled:ID,ariaDropEffect:RD,ariaErrorMessage:null,ariaExpanded:ID,ariaFlowTo:RD,ariaGrabbed:ID,ariaHasPopup:null,ariaHidden:ID,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:RD,ariaLevel:Z,ariaLive:null,ariaModal:ID,ariaMultiLine:ID,ariaMultiSelectable:ID,ariaOrientation:null,ariaOwns:RD,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:ID,ariaReadOnly:ID,ariaRelevant:null,ariaRequired:ID,ariaRoleDescription:RD,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:ID,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function qD(e,t){return t in e?e[t]:t}function JD(e,t){return qD(e,t.toLowerCase())}var YD=GD({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:zD,acceptCharset:RD,accessKey:RD,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alpha:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:RD,autoFocus:X,autoPlay:X,blocking:RD,capture:null,charSet:null,checked:X,cite:null,className:RD,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:ID,controls:X,controlsList:RD,coords:Z|zD,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:LD,draggable:ID,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:RD,height:Z,hidden:LD,high:Z,href:null,hrefLang:null,htmlFor:RD,httpEquiv:RD,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:RD,itemRef:RD,itemScope:X,itemType:RD,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,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:X,optimum:Z,pattern:null,ping:RD,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:RD,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:RD,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootCustomElementRegistry:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shadowRootSerializable:X,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:ID,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:ID,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:RD,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:ID,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:X,disablePictureInPicture:X,disableRemotePlayback:X,exportParts:zD,part:RD,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:JD}),XD=GD({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:BD,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:RD,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:zD,g2:zD,glyphName:zD,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:BD,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,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:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:RD,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:BD,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:BD,rev:BD,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:BD,requiredFeatures:BD,requiredFonts:BD,requiredFormats:BD,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:BD,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:BD,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:BD,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:qD}),ZD=GD({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()}}),QD=GD({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:JD}),$D=GD({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),eO={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`},tO=/[A-Z]/g,nO=/-[a-z]/g,rO=/^data[-\w.:]+$/i;function iO(e,t){let n=MD(t),r=t,i=ND;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&rO.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(nO,oO);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!nO.test(e)){let n=e.replace(tO,aO);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=UD}return new i(r,t)}function aO(e){return`-`+e.toLowerCase()}function oO(e){return e.charAt(1).toUpperCase()}var sO=jD([KD,YD,ZD,QD,$D],`html`),cO=jD([KD,XD,ZD,QD,$D],`svg`);function lO(e){return e.join(` `).trim()}var uO=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})),dO=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(uO());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}})),fO=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))}})),pO=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(dO()),r=fO();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})),mO=gO(`end`),hO=gO(`start`);function gO(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 _O(e){let t=hO(e),n=mO(e);if(t&&n)return{start:t,end:n}}function vO(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?bO(e.position):`start`in e||`end`in e?bO(e):`line`in e||`column`in e?yO(e):``}function yO(e){return xO(e&&e.line)+`:`+xO(e&&e.column)}function bO(e){return yO(e&&e.start)+`-`+yO(e&&e.end)}function xO(e){return e&&typeof e==`number`?e:1}var SO=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=vO(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}};SO.prototype.file=``,SO.prototype.name=``,SO.prototype.reason=``,SO.prototype.message=``,SO.prototype.stack=``,SO.prototype.column=void 0,SO.prototype.line=void 0,SO.prototype.ancestors=void 0,SO.prototype.cause=void 0,SO.prototype.fatal=void 0,SO.prototype.place=void 0,SO.prototype.ruleId=void 0,SO.prototype.source=void 0;var CO=l(pO(),1),wO={}.hasOwnProperty,TO=new Map,EO=/[A-Z]/g,DO=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),OO=new Set([`td`,`th`]),kO=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function AO(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=VO(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=BO(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`?cO:sO,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=jO(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function jO(e,t,n){if(t.type===`element`)return MO(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return NO(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return FO(e,t,n);if(t.type===`mdxjsEsm`)return PO(e,t);if(t.type===`root`)return IO(e,t,n);if(t.type===`text`)return LO(e,t)}function MO(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=cO,e.schema=i),e.ancestors.push(t);let a=qO(e,t.tagName,!1),o=HO(e,t),s=WO(e,t);return DO.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!OD(e)})),RO(e,o,a,t),zO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function NO(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)}JO(e,t.position)}function PO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);JO(e,t.position)}function FO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=cO,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:qO(e,t.name,!0),o=UO(e,t),s=WO(e,t);return RO(e,o,a,t),zO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function IO(e,t,n){let r={};return zO(r,WO(e,t)),e.create(t,e.Fragment,r,n)}function LO(e,t){return t.value}function RO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function BO(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 VO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=hO(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 HO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&wO.call(t.properties,i)){let a=GO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&OO.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 UO(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 JO(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 JO(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function WO(e,t){let n=[],r=-1,i=e.passKeys?new Map:TO;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=jO(e,a,o);s!==void 0&&n.push(s)}return n}function GO(e,t,n){let r=iO(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?SD(n):lO(n)),r.property===`style`){let t=typeof n==`object`?n:KO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=YO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?eO[r.property]||r.property:r.attribute,n]}}function KO(e,t){try{return(0,CO.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new SO("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=kO+`#cannot-parse-style-attribute`,r}}function qO(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=ED(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=ED(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return wO.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);JO(e)}function JO(e,t){let n=new SO("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=kO+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function YO(e){let t={},n;for(n in e)wO.call(e,n)&&(t[XO(n)]=e[n]);return t}function XO(e){let t=e.replace(EO,ZO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ZO(e){return`-`+e.toLowerCase()}var QO={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`]},$O={};function ek(e,t){let n=t||$O;return tk(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function tk(e,t,n){if(rk(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 nk(e.children,t,n)}return Array.isArray(e)?nk(e,t,n):``}function nk(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=tk(e[i],t,n);return r.join(``)}function rk(e){return!!(e&&typeof e==`object`)}var ik=document.createElement(`i`);function ak(e){let t=`&`+e+`;`;ik.innerHTML=t;let n=ik.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ok(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 sk(e,t){return e.length>0?(ok(e,e.length,0,t),e):t}var ck={}.hasOwnProperty;function lk(e){let t={},n=-1;for(;++n<e.length;)uk(t,e[n]);return t}function uk(e,t){let n;for(n in t){let r=(ck.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ck.call(r,a)||(r[a]=[]);let e=i[a];dk(r[a],Array.isArray(e)?e:e?[e]:[])}}}function dk(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ok(e,0,0,r)}function fk(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 pk(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var mk=wk(/[A-Za-z]/),hk=wk(/[\dA-Za-z]/),gk=wk(/[#-'*+\--9=?A-Z^-~]/);function _k(e){return e!==null&&(e<32||e===127)}var vk=wk(/\d/),yk=wk(/[\dA-Fa-f]/),bk=wk(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function xk(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var Sk=wk(/\p{P}|\p{S}/u),Ck=wk(/\s/);function wk(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Tk(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&hk(e.charCodeAt(n+1))&&hk(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 Ek(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Dk(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&$(t)?(e.enter(r),c(t)):l(t)}function c(t){return $(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Ok={tokenize:kk};function kk(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`),Ek(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 Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ak=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){jk(this,e,t,n,!1)}addBefore(e,t,n){jk(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 jk(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 Mk={tokenize:Pk},Nk={tokenize:Fk};function Pk(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 Ak;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(Nk,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(Nk,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 Q(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 Ak;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 Fk(e,t,n){return Ek(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ik(e){if(e===null||xk(e)||Ck(e))return 1;if(Sk(e))return 2}function Lk(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 Rk={name:`attention`,resolveAll:zk,tokenize:Bk};function zk(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};Vk(o,-a),Vk(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=sk(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=sk(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=sk(r,Lk(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=sk(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=sk(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ok(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 Bk(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ik(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=Ik(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 Vk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Hk={name:`autolink`,tokenize:Uk};function Uk(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 mk(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||hk(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||hk(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||_k(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):gk(t)?(e.consume(t),l):n(t)}function u(e){return hk(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||hk(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Wk={partial:!0,tokenize:Gk};function Gk(e,t,n){return r;function r(t){return $(t)?Ek(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var Kk={continuation:{tokenize:Jk},exit:Yk,name:`blockQuote`,tokenize:qk};function qk(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)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Jk(e,t,n){let r=this;return i;function i(t){return $(t)?Ek(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Kk,t,n)(r)}}function Yk(e){e.exit(`blockQuote`)}var Xk={name:`characterEscape`,tokenize:Zk};function Zk(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 bk(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Qk={name:`characterReference`,tokenize:$k};function $k(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=hk,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=yk,u):(e.enter(`characterReferenceValue`),a=7,o=vk,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===hk&&!ak(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 eA={partial:!0,tokenize:tA};function tA(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 nA={concrete:!0,name:`codeFenced`,tokenize:rA};function rA(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`),$(t)?Ek(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(eA,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Ek(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(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&&$(t)?Ek(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(eA,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(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`),$(t)?Ek(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`),$(t)?Ek(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var iA={name:`codeIndented`,tokenize:oA},aA={partial:!0,tokenize:sA};function oA(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Dk(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(aA,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function sA(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Dk(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var cA={name:`codeText`,previous:uA,resolve:lA,tokenize:dA};function lA(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 uA(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function dA(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)):Q(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||Q(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 fA=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&&pA(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),pA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pA(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);pA(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);pA(this.left,t.reverse())}}}};function pA(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 mA(e){let t={},n=-1,r,i,a,o,s,c,l,u=new fA(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,hA(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 ok(e,0,1/0,u.slice(0)),!l}function hA(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 gA={resolve:vA,tokenize:yA},_A={partial:!0,tokenize:bA};function vA(e){return mA(e),e}function yA(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):Q(t)?e.check(_A,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 bA(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ek(e,a,`linePrefix`)}function a(i){if(i===null||Q(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 xA(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||_k(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||Q(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||xk(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||_k(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 SA(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):Q(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||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function CA(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):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ek(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(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 wA(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?Ek(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var TA={name:`definition`,tokenize:DA},EA={partial:!0,tokenize:OA};function DA(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return SA.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=pk(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 xk(t)?wA(e,l)(t):l(t)}function l(t){return xA(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(EA,d,d)(t)}function d(t){return $(t)?Ek(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function OA(e,t,n){return r;function r(t){return xk(t)?wA(e,i)(t):n(t)}function i(t){return CA(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?Ek(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var kA={name:`hardBreakEscape`,tokenize:AA};function AA(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jA={name:`headingAtx`,resolve:MA,tokenize:NA};function MA(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`};ok(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function NA(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||xk(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?Ek(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||xk(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var PA=`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(`.`),FA=[`pre`,`script`,`style`,`textarea`],IA={concrete:!0,name:`htmlFlow`,resolveTo:RA,tokenize:zA},LA={partial:!0,tokenize:BA};function RA(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 zA(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:A):mk(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):mk(a)?(e.consume(a),i=4,r.interrupt?t:A):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:A):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return mk(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||xk(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&FA.includes(l)?(i=1,r.interrupt?t(s):D(s)):PA.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||hk(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||mk(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||hk(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(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):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(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||xk(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||Q(t)?D(t):$(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),re):t===60&&i===1?(e.consume(t),k):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),A):t===93&&i===5?(e.consume(t),ae):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(LA,se,O)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),O(t)):(e.consume(t),D)}function O(t){return e.check(eA,te,se)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||Q(t)?O(t):(e.enter(`htmlFlowData`),D(t))}function re(t){return t===45?(e.consume(t),A):D(t)}function k(t){return t===47?(e.consume(t),o=``,ie):D(t)}function ie(t){if(t===62){let n=o.toLowerCase();return FA.includes(n)?(e.consume(t),oe):D(t)}return mk(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ie):D(t)}function ae(t){return t===93?(e.consume(t),A):D(t)}function A(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),A):D(t)}function oe(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function BA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Wk,t,n)}}var VA={name:`htmlText`,tokenize:HA};function HA(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):mk(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):mk(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):Q(t)?(o=d,k(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?re(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):Q(t)?(o=h,k(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?re(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?re(t):Q(t)?(o=v,k(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,k(t)):(e.consume(t),y)}function b(e){return e===62?re(e):y(e)}function x(t){return mk(t)?(e.consume(t),S):n(t)}function S(t){return t===45||hk(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,k(t)):$(t)?(e.consume(t),C):re(t)}function w(t){return t===45||hk(t)?(e.consume(t),w):t===47||t===62||xk(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),re):t===58||t===95||mk(t)?(e.consume(t),E):Q(t)?(o=T,k(t)):$(t)?(e.consume(t),T):re(t)}function E(t){return t===45||t===46||t===58||t===95||hk(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):Q(t)?(o=ee,k(t)):$(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,O):Q(t)?(o=D,k(t)):$(t)?(e.consume(t),D):(e.consume(t),te)}function O(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):Q(t)?(o=O,k(t)):(e.consume(t),O)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||xk(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||xk(e)?T(e):n(e)}function re(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function k(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return $(t)?Ek(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var UA={name:`labelEnd`,resolveAll:qA,resolveTo:JA,tokenize:YA},WA={tokenize:XA},GA={tokenize:ZA},KA={tokenize:QA};function qA(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&&ok(e,0,e.length,n),e}function JA(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=sk(o,e.slice(i+1,i+r+3)),o=sk(o,[[`enter`,l,t]]),o=sk(o,Lk(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=sk(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=sk(o,e.slice(a+1)),o=sk(o,[[`exit`,s,t]]),ok(e,i,e.length,o),e}function YA(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(pk(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(WA,u,o?u:d)(t):t===91?e.attempt(GA,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(KA,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function XA(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 xk(t)?wA(e,a)(t):a(t)}function a(t){return t===41?u(t):xA(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return xk(t)?wA(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?CA(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return xk(t)?wA(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 ZA(e,t,n){let r=this;return i;function i(t){return SA.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(pk(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function QA(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 $A={name:`labelStartImage`,resolveAll:UA.resolveAll,tokenize:ej};function ej(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 tj={name:`labelStartLink`,resolveAll:UA.resolveAll,tokenize:nj};function nj(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 rj={name:`lineEnding`,tokenize:ij};function ij(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Ek(e,t,`linePrefix`)}}var aj={name:`thematicBreak`,tokenize:oj};function oj(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||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?Ek(e,s,`whitespace`)(t):s(t))}}var sj={continuation:{tokenize:dj},exit:pj,name:`list`,tokenize:uj},cj={partial:!0,tokenize:mj},lj={partial:!0,tokenize:fj};function uj(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:vk(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(aj,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 vk(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(Wk,r.interrupt?n:u,e.attempt(cj,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(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 dj(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Wk,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ek(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(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(lj,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ek(e,e.attempt(sj,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function fj(e,t,n){let r=this;return Ek(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 pj(e){e.exit(this.containerState.type)}function mj(e,t,n){let r=this;return Ek(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!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var hj={name:`setextUnderline`,resolveTo:gj,tokenize:_j};function gj(e,t){let n=new Ak,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 _j(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`),$(t)?Ek(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var vj={tokenize:yj};function yj(e){let t=this,n=e.attempt(Wk,r,e.attempt(this.parser.constructs.flowInitial,i,Ek(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gA,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 bj={resolveAll:wj()},xj=Cj(`string`),Sj=Cj(`text`);function Cj(e){return{resolveAll:wj(e===`text`?Tj: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 wj(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 Tj(e,t){let n=new Ak,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 Ej=s({attentionMarkers:()=>Pj,contentInitial:()=>Oj,disable:()=>Fj,document:()=>Dj,flow:()=>Aj,flowInitial:()=>kj,insideSpan:()=>Nj,string:()=>jj,text:()=>Mj}),Dj={42:sj,43:sj,45:sj,48:sj,49:sj,50:sj,51:sj,52:sj,53:sj,54:sj,55:sj,56:sj,57:sj,62:Kk},Oj={91:TA},kj={[-2]:iA,[-1]:iA,32:iA},Aj={35:jA,42:aj,45:[hj,aj],60:IA,61:hj,95:aj,96:nA,126:nA},jj={38:Qk,92:Xk},Mj={[-5]:rj,[-4]:rj,[-3]:rj,33:$A,38:Qk,42:Rk,60:[Hk,VA],91:tj,92:[kA,Xk],93:UA,95:Rk,96:cA},Nj={null:[Rk,bj]},Pj={null:[42,95]},Fj={null:[]};function Ij(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=sk(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Lk(a,l.events,l),l.events):[]}function f(e,t){return Rj(p(e),t)}function p(e){return Lj(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){Q(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&&ok(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 Lj(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 Rj(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 zj(e){let t={constructs:lk([Ej,...(e||{}).extensions||[]]),content:n(Ok),defined:[],document:n(Mk),flow:n(vj),lazy:{},string:n(xj),text:n(Sj)};return t;function n(e){return n;function n(n){return Ij(t,e,n)}}}function Bj(e){for(;!mA(e););return e}var Vj=/[\0\t\n\r]/g;function Hj(){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;){Vj.lastIndex=c;let n=Vj.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 Uj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wj(e){return e.replace(Uj,Gj)}function Gj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return fk(n.slice(t?2:1),t?16:10)}return ak(n)||e}var Kj={}.hasOwnProperty;function qj(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Jj(n)(Bj(zj(n).document().write(Hj()(e,t,!0))))}function Jj(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Se),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ve),blockQuote:a(he),characterEscape:T,characterReference:T,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(j),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(M),hardBreakEscape:a(ye),hardBreakTrailing:a(ye),htmlFlow:a(be,o),htmlFlowData:T,htmlText:a(be,o),htmlTextData:T,image:a(xe),label:o,link:a(Se),listItem:a(we),listItemValue:f,listOrdered:a(Ce,d),listUnordered:a(Ce),paragraph:a(Te),reference:ce,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ve),strong:a(Ee),thematicBreak:a(Oe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ne),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(O),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(k),label:ae,labelText:ie,lineEnding:ee,link:c(re),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:A,resourceTitleString:oe,resource:se,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Xj(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]];Kj.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]||Qj).call(a,void 0,e[0])}for(r.position={start:Yj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Yj(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:Yj(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]||Qj).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+vO({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Yj(e.end)}function u(){return ek(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=pk(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=De(),n.position={start:Yj(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=Yj(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Yj(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 D(){this.data.atHardBreak=!0}function O(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){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 k(){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 ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Wj(t),n.identifier=pk(t).toLowerCase()}function ae(){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 A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function se(){this.data.inReference=void 0}function ce(){this.data.referenceType=`collapsed`}function le(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=pk(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ue(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=fk(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=ak(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=Yj(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function j(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function M(){return{type:`emphasis`,children:[]}}function ve(){return{type:`heading`,depth:0,children:[]}}function ye(){return{type:`break`}}function be(){return{type:`html`,value:``}}function xe(){return{type:`image`,title:null,url:``,alt:null}}function Se(){return{type:`link`,title:null,url:``,children:[]}}function Ce(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function we(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Te(){return{type:`paragraph`,children:[]}}function Ee(){return{type:`strong`,children:[]}}function De(){return{type:`text`,value:``}}function Oe(){return{type:`thematicBreak`}}}function Yj(e){return{line:e.line,column:e.column,offset:e.offset}}function Xj(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Xj(e,r):Zj(e,r)}}function Zj(e,t){let n;for(n in t)if(Kj.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 Qj(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+vO({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vO({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+vO({start:t.start,end:t.end})+`) is still open`)}function $j(e){let t=this;t.parser=n;function n(n){return qj(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function eM(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 tM(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
62
|
+
`}]}function nM(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 rM(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iM(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aM(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Tk(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 oM(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 sM(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function cM(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 lM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cM(e,t);let i={src:Tk(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 uM(e,t){let n={src:Tk(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 dM(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 fM(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return cM(e,t);let i={href:Tk(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 pM(e,t){let n={href:Tk(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 mM(e,t,n){let r=e.all(t),i=n?hM(n):gM(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 hM(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=gM(n[r])}return t}function gM(e){return e.spread??e.children.length>1}function _M(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 vM(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yM(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bM(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xM(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=hO(t.children[1]),o=mO(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 SM(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 CM(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var wM=9,TM=32;function EM(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(DM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(DM(t.slice(i),i>0,!1)),a.join(``)}function DM(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===wM||t===TM;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===wM||t===TM;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function OM(e,t){let n={type:`text`,value:EM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function kM(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var AM={blockquote:eM,break:tM,code:nM,delete:rM,emphasis:iM,footnoteReference:aM,heading:oM,html:sM,imageReference:lM,image:uM,inlineCode:dM,linkReference:fM,link:pM,listItem:mM,list:_M,paragraph:vM,root:yM,strong:bM,table:xM,tableCell:CM,tableRow:SM,text:OM,thematicBreak:kM,toml:jM,yaml:jM,definition:jM,footnoteDefinition:jM};function jM(){}var{defineProperty:MM}=Object,NM=typeof self==`object`?self:globalThis,PM=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new NM[e](t)},FM=(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__`?MM(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 NM[e]==`function`?PM(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(PM(a,o),i)};return r},IM=e=>FM(new Map,e)(0),LM=``,{toString:RM}={},{keys:zM,is:BM}=Object,VM=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=RM.call(e).slice(8,-1);switch(n){case`Array`:return[1,LM];case`Object`:return[2,LM];case`Date`:return[3,LM];case`RegExp`:return[4,LM];case`Map`:return[5,LM];case`Set`:return[6,LM];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},HM=([e,t])=>e===0&&(t===`function`||t===`symbol`),UM=(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]=VM(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&BM(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 zM(o))(e||!HM(VM(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?LM: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||!(HM(VM(n))||HM(VM(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!HM(VM(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},WM=(e,{json:t,lossy:n}={})=>{let r=[];return UM(!(t||n),!!t,new Map,r)(e),r},GM=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?IM(WM(e,t)):structuredClone(e):(e,t)=>IM(WM(e,t));function KM(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 qM(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function JM(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||KM,r=e.options.footnoteBackLabel||qM,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=Tk(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:{...GM(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 YM=(function(e){if(e==null)return eN;if(typeof e==`function`)return $M(e);if(typeof e==`object`)return Array.isArray(e)?XM(e):ZM(e);if(typeof e==`string`)return QM(e);throw Error(`Expected function, string, or object as test`)});function XM(e){let t=[],n=-1;for(;++n<e.length;)t[n]=YM(e[n]);return $M(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ZM(e){let t=e;return $M(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function QM(e){return $M(t);function t(t){return t&&t.type===e}}function $M(e){return t;function t(t,n,r){return!!(tN(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function eN(){return!0}function tN(e){return typeof e==`object`&&!!e&&`type`in e}function nN(e){return e}var rN=[];function iN(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=YM(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 (`+nN(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=rN,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=aN(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 aN(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?rN:[e]}function oN(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),iN(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 sN={}.hasOwnProperty,cN={};function lN(e,t){let n=t||cN,r=new Map,i=new Map,a={all:s,applyData:dN,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...AM,...n.handlers},one:o,options:n,patch:uN,wrap:pN};return oN(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(sN.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=GM(n);return r.children=a.all(e),r}return GM(e)}return(a.options.unknownHandler||fN)(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=mN(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=mN(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function uN(e,t){e.position&&(t.position=_O(e))}function dN(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,GM(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function fN(e,t){let n=t.data||{},r=`value`in t&&!(sN.call(n,`hProperties`)||sN.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 pN(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 mN(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function hN(e,t){let n=lN(e,t),r=n.one(e,void 0),i=JM(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 gN(e,t){return e&&`run`in e?async function(n,r){let i=hN(n,{file:r,...t});await e.run(i,r)}:function(n,r){return hN(n,{file:r,...e||t})}}function _N(e){if(e)throw e}var vN=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 yN(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 bN(){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?xN(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 xN(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 SN={basename:CN,dirname:wN,extname:TN,join:EN,sep:`/`};function CN(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);kN(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 wN(e){if(kN(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 TN(e){kN(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 EN(...e){let t=-1,n;for(;++t<e.length;)kN(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:DN(n)}function DN(e){kN(e);let t=e.codePointAt(0)===47,n=ON(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ON(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 kN(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var AN={cwd:jN};function jN(){return`/`}function MN(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function NN(e){if(typeof e==`string`)e=new URL(e);else if(!MN(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 PN(e)}function PN(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 FN=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],IN=class{constructor(e){let t;t=e?MN(e)?{path:e}:typeof e==`string`||BN(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:AN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<FN.length;){let e=FN[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)FN.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?SN.basename(this.path):void 0}set basename(e){RN(e,`basename`),LN(e,`basename`),this.path=SN.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?SN.dirname(this.path):void 0}set dirname(e){zN(this.basename,`dirname`),this.path=SN.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?SN.extname(this.path):void 0}set extname(e){if(LN(e,`extname`),zN(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=SN.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){MN(e)&&(e=NN(e)),RN(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?SN.basename(this.path,this.extname):void 0}set stem(e){RN(e,`stem`),LN(e,`stem`),this.path=SN.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 SO(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 LN(e,t){if(e&&e.includes(SN.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+SN.sep+"`")}function RN(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function zN(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function BN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var VN=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),HN=l(vN(),1),UN={}.hasOwnProperty,WN=new class e extends VN{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=bN()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,HN.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(qN(`data`,this.frozen),this.namespace[e]=t,this):UN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qN(`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=XN(e),n=this.parser||this.Parser;return GN(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),GN(`process`,this.parser||this.Parser),KN(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=XN(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);QN(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(),GN(`processSync`,this.parser||this.Parser),KN(`processSync`,this.compiler||this.Compiler),this.process(e,r),YN(`processSync`,`process`,t),n;function r(e,r){t=!0,_N(e),n=r}}run(e,t,n){JN(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=XN(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),YN(`runSync`,`run`,n),r;function i(e,t){_N(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=XN(t),r=this.compiler||this.Compiler;return KN(`stringify`,r),JN(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(qN(`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,HN.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];yN(o)&&yN(r)&&(r=(0,HN.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function GN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function KN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function qN(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 JN(e){if(!yN(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function YN(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function XN(e){return ZN(e)?e:new IN(e)}function ZN(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function QN(e){return typeof e==`string`||$N(e)}function $N(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var eP=[],tP={allowDangerousHtml:!0},nP=/^(https?|ircs?|mailto|xmpp)$/i,rP=[{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 iP(e){let t=aP(e),n=oP(e);return sP(t.runSync(t.parse(n),n),e)}function aP(e){let t=e.rehypePlugins||eP,n=e.remarkPlugins||eP,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tP}:tP;return WN().use($j).use(n).use(gN,r).use(t)}function oP(e){let t=e.children||``,n=new IN;return typeof t==`string`?n.value=t:``+t,n}function sP(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||cP;for(let e of rP)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return oN(e,l),AO(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.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 QO)if(Object.hasOwn(QO,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=QO[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 cP(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||nP.test(e.slice(0,t))?e:``}function lP(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 uP(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function dP(e,t,n){let r=YM((n||{}).ignore||[]),i=fP(t),a=-1;for(;++a<i.length;)iN(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 fP(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([pP(e[0]),mP(e[1])])}return t}function pP(e){return typeof e==`string`?new RegExp(uP(e),`g`):e}function mP(e){return typeof e==`function`?e:function(){return e}}var hP=`phrasing`,gP=[`autolink`,`link`,`image`,`label`];function _P(){return{transforms:[TP],enter:{literalAutolink:yP,literalAutolinkEmail:bP,literalAutolinkHttp:bP,literalAutolinkWww:bP},exit:{literalAutolink:wP,literalAutolinkEmail:CP,literalAutolinkHttp:xP,literalAutolinkWww:SP}}}function vP(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hP,notInConstruct:gP},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hP,notInConstruct:gP},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hP,notInConstruct:gP}]}}function yP(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function bP(e){this.config.enter.autolinkProtocol.call(this,e)}function xP(e){this.config.exit.autolinkProtocol.call(this,e)}function SP(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 CP(e){this.config.exit.autolinkEmail.call(this,e)}function wP(e){this.exit(e)}function TP(e){dP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,EP],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,DP]],{ignore:[`link`,`linkReference`]})}function EP(e,t,n,r,i){let a=``;if(!AP(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!OP(n)))return!1;let o=kP(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 DP(e,t,n,r){return!AP(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function OP(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 kP(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=lP(e,`(`),a=lP(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 AP(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Ck(n)||Sk(n))&&(!t||n!==47)}BP.peek=zP;function jP(){this.buffer()}function MP(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function NP(){this.buffer()}function PP(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function FP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pk(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IP(e){this.exit(e)}function LP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pk(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RP(e){this.exit(e)}function zP(){return`[`}function BP(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 VP(){return{enter:{gfmFootnoteCallString:jP,gfmFootnoteCall:MP,gfmFootnoteDefinitionLabelString:NP,gfmFootnoteDefinition:PP},exit:{gfmFootnoteCallString:FP,gfmFootnoteCall:IP,gfmFootnoteDefinitionLabelString:LP,gfmFootnoteDefinition:RP}}}function HP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:BP},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?WP:UP))),s(),o}}function UP(e,t,n){return t===0?e:WP(e,t,n)}function WP(e,t,n){return(n?``:` `)+e}var GP=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];XP.attention=ZP,XP.peek=QP;function KP(){return{canContainEols:[`delete`],enter:{strikethrough:JP},exit:{strikethrough:YP}}}function qP(){return{handlers:{delete:XP},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:GP}]}}function JP(e){this.enter({type:`delete`,children:[],position:void 0},e)}function YP(e){this.exit(e)}function XP(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 ZP(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function QP(){return`~`}function $P(e){return e.length}function eF(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$P,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=tF(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]=nF(r[d]);else{let e=nF(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 tF(e){return e==null?``:String(e)}function nF(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 rF=YM([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function iF(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()),aF);return i(),o}function aF(e,t,n){return`>`+(n?``:` `)+e}function oF(e,t){return sF(e,t.inConstruct,!0)&&!sF(e,t.notInConstruct,!1)}function sF(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 cF(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&&oF(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
75
|
+
`}function lF(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 uF(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 dF(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fF(e,t,n,r){let i=dF(n),a=e.value||``;if(uF(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,pF);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(lF(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 pF(e,t,n){return(n?``:` `)+e}function mF(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hF(e,t,n,r){let i=mF(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 gF(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}_F.attention=vF,_F.peek=yF;function _F(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function vF(e,t){return{construct:`emphasis`,markers:gF(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function yF(e,t,n){return n.options.emphasis||`*`}function bF(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function xF(e,t){let n=!1;return oN(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)&&ek(e)&&(t.options.setext||n))}function SF(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(xF(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=bF(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}CF.peek=wF;function CF(e){return e.value||``}function wF(){return`<`}TF.peek=EF;function TF(e,t,n,r){let i=mF(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 EF(){return`!`}DF.peek=OF;function DF(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 OF(){return`!`}kF.peek=AF;function kF(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 AF(){return"`"}function jF(e,t){let n=ek(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))}MF.peek=NF;function MF(e,t,n,r){let i=mF(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(jF(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 NF(e,t,n){return jF(e,n)?`<`:`[`}PF.peek=FF;function PF(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 FF(){return`[`}function IF(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 LF(e){let t=IF(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 RF(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zF(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 BF(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?RF(n):IF(n),s=e.ordered?o===`.`?`)`:`.`:LF(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),zF(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 VF(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 HF(e,t,n,r){let i=VF(n),a=n.bulletCurrent||IF(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 UF(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function WF(e,t,n,r){if(!e.children.some(function(e){return rF(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function GF(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}KF.attention=qF,KF.peek=JF;function KF(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function qF(e,t){return{construct:`strong`,markers:GF(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function JF(e,t,n){return n.options.strong||`*`}function YF(e,t,n,r){return n.safe(e.value,r)}function XF(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 ZF(e,t,n){let r=(zF(n)+(n.options.ruleSpaces?` `:``)).repeat(XF(n));return n.options.ruleSpaces?r.slice(0,-1):r}var QF={blockquote:iF,break:cF,code:fF,definition:hF,emphasis:_F,hardBreak:cF,heading:SF,html:CF,image:TF,imageReference:DF,inlineCode:kF,link:MF,linkReference:PF,list:BF,listItem:HF,paragraph:UF,root:WF,strong:KF,text:YF,thematicBreak:ZF};function $F(){return{enter:{table:eI,tableData:iI,tableHeader:iI,tableRow:nI},exit:{codeText:aI,table:tI,tableData:rI,tableHeader:rI,tableRow:rI}}}function eI(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 tI(e){this.exit(e),this.data.inTable=void 0}function nI(e){this.enter({type:`tableRow`,children:[]},e)}function rI(e){this.exit(e)}function iI(e){this.enter({type:`tableCell`,children:[]},e)}function aI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oI));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oI(e,t){return t===`|`?t:e}function sI(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 eF(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=QF.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cI(){return{exit:{taskListCheckValueChecked:uI,taskListCheckValueUnchecked:uI,paragraph:dI}}}function lI(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fI}}}function uI(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dI(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 fI(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=QF.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 pI(){return[_P(),VP(),KP(),$F(),cI()]}function mI(e){return{extensions:[vP(),HP(e),qP(),sI(e),lI()]}}var hI={tokenize:kI,partial:!0},gI={tokenize:AI,partial:!0},_I={tokenize:jI,partial:!0},vI={tokenize:MI,partial:!0},yI={tokenize:NI,partial:!0},bI={name:`wwwAutolink`,tokenize:DI,previous:PI},xI={name:`protocolAutolink`,tokenize:OI,previous:FI},SI={name:`emailAutolink`,tokenize:EI,previous:II},CI={};function wI(){return{text:CI}}for(var TI=48;TI<123;)CI[TI]=SI,TI++,TI===58?TI=65:TI===91&&(TI=97);CI[43]=SI,CI[45]=SI,CI[46]=SI,CI[95]=SI,CI[72]=[SI,xI],CI[104]=[SI,xI],CI[87]=[SI,bI],CI[119]=[SI,bI];function EI(e,t,n){let r=this,i,a;return o;function o(t){return!LI(t)||!II.call(r,r.previous)||RI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return LI(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(yI,u,l)(t):t===45||t===95||hk(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&&mk(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function DI(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!PI.call(r,r.previous)||RI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(hI,e.attempt(gI,e.attempt(_I,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function OI(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&FI.call(r,r.previous)&&!RI(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(mk(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||_k(t)||xk(t)||Ck(t)||Sk(t)?n(t):e.attempt(gI,e.attempt(_I,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function kI(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 AI(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(vI,c,s)(t):t===null||xk(t)||Ck(t)||t!==45&&Sk(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 jI(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(vI,t,a)(o):o===null||xk(o)||Ck(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function MI(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||xk(o)||Ck(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||xk(e)||Ck(e)?t(e):r(e)}function a(e){return mk(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):mk(t)?(e.consume(t),o):n(t)}}function NI(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return hk(e)?n(e):t(e)}}function PI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xk(e)}function FI(e){return!mk(e)}function II(e){return!(e===47||LI(e))}function LI(e){return e===43||e===45||e===46||e===95||hk(e)}function RI(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 zI={tokenize:qI,partial:!0};function BI(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:WI,continuation:{tokenize:GI},exit:KI}},text:{91:{name:`gfmFootnoteCall`,tokenize:UI},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:VI,resolveTo:HI}}}}function VI(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=pk(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 HI(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 UI(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||xk(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(pk(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return xk(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 WI(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||xk(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=pk(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return xk(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),Ek(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function GI(e,t,n){return e.check(Wk,t,e.attempt(zI,t,n))}function KI(e){e.exit(`gfmFootnoteDefinition`)}function qI(e,t,n){let r=this;return Ek(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 JI(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&&ok(o,o.length,0,Lk(s,e.slice(r+1,n),t)),ok(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ok(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=Ik(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=Ik(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var YI=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){XI(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 XI(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 ZI(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 QI(){return{flow:{null:{name:`table`,tokenize:$I,resolveAll:eL}}}}function $I(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):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?Ek(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||xk(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,$(t)?Ek(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 $(t)?Ek(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||Q(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 $(t)?Ek(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(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||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?Ek(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||xk(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 eL(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 YI;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(nL(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=tL(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=tL(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=tL(f,t,o,i,n,d)):(o[0]=o[1],d=tL(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&nL(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=ZI(t.events,n))}return e}function tL(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},rL(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=rL(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=rL(t.events,n[2]),a=rL(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({},rL(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function nL(e,t,n,r,i){let a=[],o=rL(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 rL(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var iL={name:`tasklistCheck`,tokenize:oL};function aL(){return{text:{91:iL}}}function oL(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 xk(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 Q(r)?t(r):$(r)?e.check({tokenize:sL},t,n)(r):n(r)}}function sL(e,t,n){return Ek(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function cL(e){return lk([wI(),BI(),JI(e),QI(),aL()])}var lL={};function uL(e){let t=this,n=e||lL,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cL(n)),a.push(pI()),o.push(mI(n))}var dL=new Set([`http:`,`https:`,`mailto:`,`tel:`]);function fL(e){let t=(e??``).trim();if(t===``)return``;if(/^[#/.]/.test(t))return t;try{let e=new URL(t,`https://example.invalid`);return dL.has(e.protocol)?t:``}catch{return``}}function pL(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 mL(e,t){return!e&&!t}async function hL(e,t){if(!t)throw Error(`Clipboard is unavailable. Select the code and copy it manually.`);await t.writeText(e)}var gL=/^-\s+(.+?)\s+\(([^()\s]+\/[^()\s]+)\)\s*$/;function _L(e){let t=e.lastIndexOf(`${eE}\n`);if(t<0||t>0&&e[t-1]!==`
|
|
87
|
+
`)return{body:e,files:[]};let n=e.slice(t+eE.length+1).split(`
|
|
88
|
+
`).filter(Boolean),r=[];for(let t of n){let n=gL.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 vL=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]);function yL({files:e}){return e.length===0?null:(0,L.jsx)(`ul`,{className:`mt-2 flex flex-wrap gap-2`,"aria-label":`Attached files`,children:e.map(e=>(0,L.jsx)(`li`,{children:vL.has(e.mime)?(0,L.jsx)(`a`,{href:zd(`/files/preview/attachments/${e.id}`),target:`_blank`,rel:`noopener noreferrer`,className:`block overflow-hidden rounded-lg border border-border bg-muted/40 transition-transform duration-150 ease-snap hover:scale-[1.02]`,children:(0,L.jsx)(`img`,{src:zd(`/files/preview/attachments/${e.id}`),alt:e.name,loading:`lazy`,className:`max-h-40 max-w-56 object-cover`})}):(0,L.jsxs)(`span`,{className:`inline-flex max-w-64 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,L.jsx)(lp,{"aria-hidden":`true`,className:`size-4 shrink-0`}):(0,L.jsx)(Yp,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate`,children:e.name})]})},e.id))})}function bL(e){return e?.type===`text`?e.value??``:(e?.children??[]).map(bL).join(``)}function xL(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}),xL(t,n)}function SL(){return e=>xL(e)}function CL(e){let[t,n]=(0,m.useState)(!1);async function r(){try{await hL(e,navigator.clipboard),n(!0),Nd.success(`Code copied.`)}catch{Nd.error(`Could not copy code. Select it and copy manually, or allow clipboard access.`)}}return{copied:t,copy:r}}function wL({text:e,children:t,block:n=!1}){let{copy:r}=CL(e),i=(0,m.useRef)(void 0);return(0,L.jsxs)(`code`,{role:`button`,tabIndex:0,"aria-label":`Copy code`,"aria-keyshortcuts":`Enter Space`,title:`Copy code · Enter / Space`,className:`cursor-copy focus-visible:outline-2 focus-visible:outline-ring`,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(),mL(window.getSelection()?.toString()??``,i.current?.moved??!1)&&r(),i.current=void 0},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),mL(window.getSelection()?.toString()??``,!1)&&r())},children:[t,n?null:(0,L.jsx)(`span`,{className:`sr-only`,children:` (activate to copy)`})]})}function TL({node:e,children:t,source:n}){let r=e,{copied:i,copy:a}=CL(pL(n,r?.position,!0)??bL(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,L.jsxs)(`div`,{className:`relative my-3 rounded-lg bg-muted`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between pl-3`,children:[(0,L.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[s&&/^[\w+#.-]{1,20}$/.test(s)?s:`code`,` · tap to copy`]}),(0,L.jsx)(Y,{label:i?`Copied`:`Copy the code`,icon:i?Ef:Zf,iconOnly:!0,onClick:()=>void a()})]}),(0,L.jsx)(`pre`,{className:`!my-0 overflow-x-auto !rounded-t-none !bg-transparent px-3 pb-3 text-sm leading-relaxed [&>code]:block`,children:t})]})}function EL(e){return{pre:t=>(0,L.jsx)(TL,{...t,source:e}),code:({node:t,children:n})=>{let r=t;if(r?.properties?.copyBlocked)return(0,L.jsx)(`code`,{children:n});let i=!!r?.properties?.blockCode;return(0,L.jsx)(wL,{text:pL(e,r?.position,i)??bL(r),block:i,children:n})},a:({href:e,children:t})=>(0,L.jsx)(`a`,{href:e?zd(e):void 0,target:`_blank`,rel:`noopener noreferrer nofollow`,children:t}),img:({src:e,alt:t})=>(0,L.jsx)(`img`,{src:e?zd(e):void 0,alt:t??``,loading:`lazy`}),table:({children:e})=>(0,L.jsx)(`div`,{className:`my-3 w-full overflow-x-auto`,children:(0,L.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:e})})}}var DL=(0,m.memo)(function({text:e,className:t}){let{body:n,files:r}=_L(e);return(0,L.jsxs)(`div`,{className:q(`md-body`,t),children:[n?(0,L.jsx)(iP,{remarkPlugins:[uL],rehypePlugins:[SL],urlTransform:fL,components:EL(n),children:n}):null,(0,L.jsx)(yL,{files:r})]})});function OL({title:e,note:t,className:n,children:r,collapsed:i,onToggle:a,shortcut:o,...s}){let c=typeof e==`string`?e:`pane`;return(0,L.jsxs)(`section`,{className:q(`group/frame relative flex min-h-0 min-w-0 flex-col`,i&&`flex-none`,n),...s,children:[e||t||a?(0,L.jsxs)(`div`,{className:q(`flex min-h-12 shrink-0 items-center justify-between gap-3 px-4`,!i&&`border-b border-border`),children:[e?(0,L.jsx)(`h2`,{className:`min-w-0 truncate text-sm font-medium`,children:e}):(0,L.jsx)(`span`,{}),(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2`,children:[t?(0,L.jsx)(`span`,{className:`flex items-center gap-2 truncate text-xs text-muted-foreground`,children:t}):null,a?(0,L.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:`-mr-1.5 inline-flex h-10 items-center gap-1.5 rounded-lg px-2 text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`,children:[o?(0,L.jsx)(zT,{chord:o,className:`kbd-hint`}):null,(0,L.jsx)(Of,{"aria-hidden":`true`,className:q(`size-4 transition-transform duration-200 ease-snap`,i&&`-rotate-90`)})]}):null]})]}):null,i?null:r]})}function kL({title:e,right:t,className:n}){return(0,L.jsxs)(`span`,{className:q(`flex min-w-0 items-center gap-3`,n),children:[(0,L.jsx)(`span`,{className:`truncate font-medium`,children:e}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),t?(0,L.jsx)(`span`,{className:`shrink-0 text-xs font-normal text-muted-foreground`,children:t}):null]})}function AL({title:e,right:t,prominent:n,children:r}){return(0,L.jsxs)(`section`,{className:q(`flex flex-col`,n?`gap-3`:`gap-2.5`),children:[(0,L.jsx)(`h3`,{className:n?`text-sm text-foreground`:`text-xs text-muted-foreground`,children:(0,L.jsx)(kL,{title:e,right:t,className:n?`[&>span:first-child]:font-semibold`:void 0})}),r]})}var jL=`Pull requests`,ML=`An agent reviews it, optionally with a focus you type; Jev's quick read sizes it up first.`,NL=`nothing is posted to GitHub`,PL=`Refresh to load open pull requests with the GitHub CLI (gh).`,FL=`No open pull requests.`,IL=`loading pull requests from GitHub…`,LL=`reading the diff…`,RL=`the pull request has new commits since this review — review it again`,zL=`(no description)`,BL=`Review with a focus (optional)`,VL=`Leave it empty for a full review.`;function HL(e){return e===`passing`?`✓`:e===`failing`?`✗`:e===`pending`?`…`:``}function UL(e){return e===`passing`?`text-success`:e===`failing`?`text-destructive`:`text-muted-foreground`}function WL(e,t){return`+${e} −${t}`}function GL(e){return e===`APPROVED`?`approved`:e===`CHANGES_REQUESTED`?`changes requested`:e===`REVIEW_REQUIRED`?`review required`:``}function KL(e){return e?e.status===`running`?`reviewing`:e.status!==`done`||!e.verdict?``:e.verdict===`approve`?`approved`:e.verdict===`changes`?`changes found`:`commented`:``}function qL(e){return e===`approve`?`approve`:e===`changes`?`request changes`:e===`comment`?`comment`:``}function JL(e,t){if(e.status===`running`)return YL(e,t);if(e.status===`cancelled`)return`stopped`;let n=e.status===`done`?YL(e,t):e.status;return[qL(e.verdict),n].filter(Boolean).join(` · `)}function YL(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 XL(e,t){return[e.state?e.draft?`draft`:e.state.toLowerCase():e.draft?`draft`:``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${uD(t-Date.parse(e.updatedAt))}`:``].filter(Boolean).join(` · `)}function ZL(e){let t=`${e.changedFiles} file${e.changedFiles===1?``:`s`}`;return`${e.headRef||`?`} → ${e.baseRef||`?`} · ${WL(e.additions,e.deletions)} · ${t}`}function QL(e){let t=e.mergeable===`CONFLICTING`?`conflicts`:e.mergeable===`MERGEABLE`?`mergeable`:``;return[e.checks?`checks ${e.checks} (${e.checkCount})`:``,GL(e.decision),t,e.labels.join(`, `)].filter(Boolean).join(` · `)}function $L(e){return[`${e.changedFiles} file${e.changedFiles===1?``:`s`}`,e.labels.join(`, `),e.review?.stale?`stale`:``].filter(Boolean).join(` · `)}function eR(e){return e.read?`${e.read.model} · ${e.read.ms} ms`:``}function tR(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 nR({pull:e,now:t}){return(0,L.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:[(0,L.jsxs)(`span`,{className:`font-normal text-muted-foreground tabular-nums`,children:[`#`,e.number]}),` `,e.title]}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:XL(e,t)}),(0,L.jsx)(`p`,{className:`text-sm tabular-nums`,children:ZL(e)}),QL(e)?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:QL(e)}):null,e.url?(0,L.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`text-xs break-all text-primary underline underline-offset-4`,children:e.url}):null]})}function rR({read:e}){return(0,L.jsxs)(AL,{title:`Jev's read`,right:eR(e),children:[e.status===`running`?(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{className:`size-3.5`}),LL]}):null,e.status===`failed`?(0,L.jsx)(`p`,{className:`text-sm text-foreground`,children:e.error??`Jev could not read it`}):null,e.status===`done`&&e.line?(0,L.jsx)(DL,{text:e.line}):null]})}function iR({review:e,now:t}){return(0,L.jsxs)(L.Fragment,{children:[e.model?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:[e.model,e.thinking].filter(Boolean).join(` · `)}):null,e.focus?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`focus: `,e.focus]}):null,e.saved?(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`kept from `,uD(t-e.startedAt)]}):null,e.stale?(0,L.jsx)(`p`,{className:`text-sm text-foreground`,children:RL}):null,e.status===`running`?(0,L.jsx)(aR,{steps:e.steps}):null,e.status===`cancelled`?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`stopped`}):null,e.status===`failed`||e.status===`timeout`?(0,L.jsxs)(`p`,{className:`text-sm text-destructive`,children:[`✗ `,e.error??e.status]}):null,e.text?(0,L.jsx)(DL,{text:e.text}):null]})}function aR({steps:e}){return(0,L.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.slice(-6).map((e,t)=>(0,L.jsxs)(`li`,{className:`break-words`,children:[`· `,e]},t))})}function oR({number:e,focus:t,onChange:n}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(`label`,{htmlFor:`focus-${e}`,className:`text-[0.8125rem] font-medium text-foreground`,children:BL}),(0,L.jsx)(aD,{id:`focus-${e}`,value:t,rows:2,maxLength:2e3,onChange:e=>n(e.target.value)}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:VL})]})}function sR({number:e,review:t,now:n,focus:r,onFocus:i}){return(0,L.jsxs)(AL,{title:`Review`,right:t?JL(t,n):void 0,children:[t?(0,L.jsx)(iR,{review:t,now:n}):null,(0,L.jsx)(oR,{number:e,focus:r,onChange:i}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`A read-only agent reviews it — `,NL,`.`]})]})}function cR({files:e}){return(0,L.jsx)(AL,{title:`Files`,right:String(e.length),children:(0,L.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-border`,children:(0,L.jsx)(`table`,{className:`w-full border-collapse text-sm tabular-nums`,children:(0,L.jsx)(`tbody`,{children:e.map(e=>(0,L.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,L.jsx)(`td`,{className:`max-w-0 px-3 py-1.5 break-all`,children:e.path}),(0,L.jsx)(`td`,{className:`px-3 py-1.5 text-right text-xs whitespace-nowrap text-muted-foreground`,children:WL(e.additions,e.deletions)})]},e.path))})})})})}function lR({note:e,now:t}){let n=[e.state&&e.state!==`COMMENTED`?e.state.toLowerCase().replace(/_/g,` `):``,e.at?uD(t-Date.parse(e.at)):``].filter(Boolean).join(` · `);return(0,L.jsxs)(`article`,{className:`flex flex-col gap-1.5 rounded-lg border border-border bg-background/60 px-3.5 py-2.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),n?(0,L.jsx)(`span`,{children:n}):null]}),e.body.trim()?(0,L.jsx)(DL,{text:e.body.trim()}):null]})}function uR({notes:e,now:t}){return e.length===0?null:(0,L.jsx)(AL,{title:`Discussion`,right:String(e.length),children:(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,L.jsx)(lR,{note:e,now:t},n))})})}function dR({number:e,error:t}){return t?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t]}):(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{className:`size-3.5`}),`loading #`,e,`…`]})}function fR({number:e,onChanged:t}){let n=bE(`git.pull`,{number:e},[`git`]),[r,i]=(0,m.useState)(``),a=n.data?.review?.status===`running`,o=tR(a);if(!n.data)return(0,L.jsx)(dR,{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 V(`git.review`,{number:e,...t?{focus:t}:{}}),u()},f=async()=>{await V(`git.jev`,{number:e}),u()},p=async()=>{await V(`git.cancelReview`,{number:e}),u()};return(0,L.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Pull request #${e}`,children:[(0,L.jsxs)(WE,{children:[(0,L.jsx)(Y,{label:`Review`,icon:sm,tone:`primary`,shortcut:`V`,disabled:a,onClick:()=>void d()}),(0,L.jsx)(Y,{label:`Jev's read`,icon:bf,shortcut:`Q`,disabled:a,onClick:()=>void f()}),a?(0,L.jsx)(xD,{icon:Wf,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,L.jsx)(nR,{pull:s,now:o}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:ML}),l?(0,L.jsx)(rR,{read:l}):null,(0,L.jsx)(sR,{number:e,review:c,now:o,focus:r,onFocus:i}),s.files.length>0?(0,L.jsx)(cR,{files:s.files}):null,(0,L.jsx)(AL,{title:`Description`,children:s.body.trim()?(0,L.jsx)(DL,{text:s.body.trim()}):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:zL})}),(0,L.jsx)(uR,{notes:s.notes,now:o})]})}var pR=ih(`group/badge inline-flex h-6 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-lg border border-transparent px-2.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:ring-[3px] focus-visible:ring-ring/40 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-accent text-foreground [a]:hover:bg-primary/20`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-accent`,destructive:`bg-destructive/12 text-destructive [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-accent`,ghost:`hover:bg-accent hover:text-foreground`,link:`text-link underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function mR({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Rg:`span`;return(0,L.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:q(pR({variant:t}),e),...r})}var hR=`flex min-h-10 w-full flex-col gap-0.5 rounded-lg px-2.5 py-2 text-left outline-none transition-colors duration-150 hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/40 aria-[current=true]:bg-accent`,gR=`flex flex-col gap-0.5 px-2 pb-2`,_R=`px-4 pt-4 pb-1 text-xs font-medium text-muted-foreground`;function vR({checks:e}){let t=HL(e);return t?(0,L.jsx)(`span`,{className:q(`w-4 shrink-0 text-center`,UL(e)),"aria-hidden":`true`,children:t}):(0,L.jsx)(`span`,{className:`w-4 shrink-0`,"aria-hidden":`true`})}function yR({pull:e,selected:t,onSelect:n}){let r=KL(e.review);return(0,L.jsx)(`li`,{children:(0,L.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:hR,children:[(0,L.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,L.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,L.jsx)(vR,{checks:e.checks}),e.draft?(0,L.jsx)(mR,{variant:`secondary`,children:`draft`}):null,(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title})]}),(0,L.jsxs)(`span`,{className:`flex flex-wrap items-baseline justify-between gap-x-3 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{children:$L(e)}),(0,L.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[r?(0,L.jsx)(`span`,{children:r}):null,(0,L.jsx)(`span`,{className:`tabular-nums`,children:WL(e.additions,e.deletions)})]})]})]})})}function bR({pulls:e,selectedId:t,onSelect:n}){return(0,L.jsx)(`ul`,{className:gR,children:e.map(e=>(0,L.jsx)(yR,{pull:e,selected:e.number===t,onSelect:n},e.number))})}var xR=()=>iE(rE(`git`)),SR=e=>iE(rE(`git`,String(e)));function CR(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function wR({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?FL:e?IL:PL;return(0,L.jsxs)(oE,{className:`m-4 flex-1`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(pp,{"aria-hidden":`true`})}),(0,L.jsx)(dE,{className:n?`text-destructive`:void 0,children:i})]}),n?(0,L.jsx)(J,{variant:`outline`,onClick:r,children:`Retry`}):null]})}function TR({rest:e}){let t=$E(),n=bE(`git.pulls`,{},[`git`]),r=CR(e),i=n.data?.pulls??[],a=(0,m.useCallback)(()=>{V(`git.pulls`,{refresh:!0}).then(()=>n.reload())},[n]);if(!n.data&&n.error)return(0,L.jsx)(mE,{message:`Could not load pull requests. ${n.error}`,onRetry:n.reload});if(n.data&&i.length===0)return(0,L.jsx)(wR,{loading:n.data.loading,loaded:n.data.loaded,error:n.data.error,onRetry:n.reload});let o=n.loading||!!n.data?.loading,s=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:jL,count:n.data?`${i.length} open`:void 0,children:(0,L.jsx)(Y,{label:`Refresh`,icon:dm,shortcut:`R`,disabled:o,className:q(`h-7`,o&&`[&_svg]:animate-spin`),onClick:a})}),n.data?.error?(0,L.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,n.data.error]}):null,n.data?(0,L.jsx)(bR,{pulls:i,selectedId:r,onSelect:SR}):(0,L.jsx)(iD,{})]}),c=r===void 0?null:(0,L.jsx)(fR,{number:r,onChanged:n.reload},r);return(0,L.jsx)(nD,{wide:t,list:s,detail:c,open:r!==void 0,onClose:xR,hint:`Select a pull request to see its detail.`,describe:`Pull request detail`})}function ER(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function DR({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,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`label`,{htmlFor:i,className:`text-sm font-medium text-foreground`,children:e}),(0,L.jsx)(aD,{id:i,value:a,rows:2,"aria-describedby":t?`${i}-hint`:void 0,onChange:e=>o(e.target.value),onKeyDown:e=>{ER(e)&&(e.preventDefault(),l())}}),t?(0,L.jsx)(`p`,{id:`${i}-hint`,className:`text-xs text-muted-foreground`,children:t}):null,(0,L.jsx)(`div`,{className:`flex self-end`,children:(0,L.jsx)(Y,{label:n,icon:s?Dp:vf,tone:`primary`,shortcut:`Enter`,className:s?`[&_svg]:animate-spin`:void 0,onClick:()=>void l(),disabled:!a.trim()||s})})]})}var OR=`Issues`,kR=`Issue`,AR=`p plans it with the planning panel, then save it as a task`,jR=`Refresh to load open issues with the GitHub CLI (gh).`,MR=`No open issues. File one with New issue.`,NR=`loading issues from GitHub…`,PR=`issues are off (lobby.issues)`,FR=`(no description)`;function IR(e,t){return[e.state?e.state.toLowerCase():``,e.author?`by ${e.author}`:``,e.updatedAt?`updated ${uD(t-Date.parse(e.updatedAt))}`:``,e.labels.join(`, `)].filter(Boolean).join(` · `)}function LR(e,t){return[e.author?`by ${e.author}`:``,e.updatedAt?uD(t-Date.parse(e.updatedAt)):``].filter(Boolean).join(` · `)}function RR(e){return e.length>0?`[${e.slice(0,2).join(`, `)}]`:``}function zR({issue:e,now:t}){return(0,L.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:[(0,L.jsxs)(`span`,{className:`font-normal text-muted-foreground tabular-nums`,children:[`#`,e.number]}),` `,e.title]}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:IR(e,t)}),e.url?(0,L.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer nofollow`,className:`text-xs break-all text-primary underline underline-offset-4`,children:e.url}):null]})}function BR({comment:e,now:t}){return(0,L.jsxs)(`article`,{className:`flex flex-col gap-1.5 rounded-lg border border-border bg-background/60 px-3.5 py-2.5`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:e.author??`comment`}),e.createdAt?(0,L.jsx)(`span`,{children:uD(t-Date.parse(e.createdAt))}):null]}),(0,L.jsx)(DL,{text:e.body.trim()})]})}function VR({comments:e,now:t}){return e.length===0?null:(0,L.jsx)(AL,{title:`Comments`,right:String(e.length),children:(0,L.jsx)(`div`,{className:`flex flex-col gap-3`,children:e.map((e,n)=>(0,L.jsx)(BR,{comment:e,now:t},n))})})}function HR({number:e}){let t=bE(`issues.get`,{number:e},[`issues`]),n=Date.now();if(!t.data)return t.error?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load #`,e,`. `,t.error]}):(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{className:`size-3.5`}),`loading #`,e,`…`]});let r=t.data.issue;return(0,L.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${kR} #${e}`,children:[(0,L.jsx)(zR,{issue:r,now:n}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:AR}),(0,L.jsx)(AL,{title:`Description`,children:r.body.trim()?(0,L.jsx)(DL,{text:r.body.trim()}):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:FR})}),(0,L.jsx)(VR,{comments:r.comments,now:n})]})}function UR({issue:e,selected:t,now:n,onSelect:r}){let i=RR(e.labels);return(0,L.jsx)(`li`,{children:(0,L.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:hR,children:[(0,L.jsxs)(`span`,{className:`flex flex-wrap items-start gap-2 text-sm`,children:[(0,L.jsxs)(`span`,{className:`shrink-0 text-muted-foreground tabular-nums`,children:[`#`,e.number]}),(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.title}),i?(0,L.jsx)(`span`,{className:`max-w-full break-words text-xs text-muted-foreground`,children:i}):null]}),(0,L.jsx)(`span`,{className:`pl-9 text-xs text-muted-foreground`,children:LR(e,n)})]})})}function WR({issues:e,selectedId:t,now:n,onSelect:r}){return(0,L.jsx)(`ul`,{className:gR,children:e.map(e=>(0,L.jsx)(UR,{issue:e,selected:e.number===t,now:n,onSelect:r},e.number))})}var GR=()=>iE(rE(`issues`)),KR=e=>iE(rE(`issues`,String(e)));function qR(e){let t=Number(e[0]);return Number.isInteger(t)&&t>0?t:void 0}function JR(){return(0,L.jsx)(oE,{className:`m-4 flex-1`,children:(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(Bf,{"aria-hidden":`true`})}),(0,L.jsx)(uE,{children:`Issues are off`}),(0,L.jsx)(dE,{className:`font-mono`,children:PR})]})})}function YR({loading:e,loaded:t,error:n,onRetry:r}){let i=n?`✗ ${n}`:t?MR:e?NR:jR;return(0,L.jsxs)(oE,{className:`m-4 flex-1`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(Bf,{"aria-hidden":`true`})}),(0,L.jsx)(dE,{className:n?`text-destructive`:void 0,children:i})]}),n?(0,L.jsx)(J,{variant:`outline`,onClick:r,children:`Retry`}):null]})}function XR({onCreate:e}){return(0,L.jsx)(eD,{className:`shrink-0 border-t border-border p-4`,children:(0,L.jsx)(DR,{label:`New issue`,hint:`The first line becomes the title; the rest is the body. Enter files it.`,buttonLabel:`File issue`,onSend:e})})}function ZR({rest:e}){let t=$E(),n=vE(`status`).data?.issuesEnabled??!0,r=bE(`issues.list`,{},[`issues`],n),i=qR(e),a=r.data?.issues??[],o=Date.now(),s=(0,m.useCallback)(()=>{V(`issues.list`,{refresh:!0}).then(()=>r.reload())},[r]),c=async e=>await V(`issues.create`,{text:e})?(r.reload(),!0):!1;if(!n)return(0,L.jsx)(JR,{});if(!r.data&&r.error)return r.error.includes(`issues are off`)?(0,L.jsx)(JR,{}):(0,L.jsx)(mE,{message:`Could not load issues. ${r.error}`,onRetry:r.reload});let l=r.loading||!!r.data?.loading,u=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:OR,count:r.data?`${a.length} open`:void 0,children:(0,L.jsx)(Y,{label:`Refresh`,icon:dm,shortcut:`R`,disabled:l,className:q(`h-7`,l&&`[&_svg]:animate-spin`),onClick:s})}),r.data?.error?(0,L.jsxs)(`p`,{className:`px-3 pt-2 text-sm text-destructive`,children:[`✗ `,r.data.error]}):null,r.data?(0,L.jsx)(WR,{issues:a,selectedId:i,now:o,onSelect:KR}):(0,L.jsx)(iD,{}),(0,L.jsx)(XR,{onCreate:c})]}),d=i===void 0?null:(0,L.jsx)(HR,{number:i},i),f=r.data&&a.length===0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(YR,{loading:r.data.loading,loaded:r.data.loaded,error:r.data.error,onRetry:r.reload}),(0,L.jsx)(`div`,{className:`shrink-0 pb-dock`,children:(0,L.jsx)(XR,{onCreate:c})})]}):(0,L.jsx)(nD,{wide:t,list:u,detail:d,open:i!==void 0,onClose:GR,hint:`Select an issue to read it.`,describe:`Issue detail`});return(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:f})}var QR=[`master`,`designer`,`backend`,`qa`],$R={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`},ez={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`},tz=`Every write archives the version before it.`;function nz(e){if(e<1e3)return String(e);let t=e/1e3;return`${t>=10?Math.round(t):t.toFixed(1)}k`}function rz(e){return`over the compaction threshold — ask the oracle to compact ${e}`}function iz(e){return{text:e.text,occurrence:e.occurrence}}function az(e){return QR.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 oz(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function sz({initial:e,busy:t,onSave:n,onCancel:r}){let[i,a]=(0,m.useState)(e),o=()=>{!t&&i.trim()&&n(i)};return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border border-input p-3`,children:[(0,L.jsx)(`label`,{htmlFor:`knowledge-entry`,className:`text-sm font-medium text-foreground`,children:`Edit entry`}),(0,L.jsx)(aD,{id:`knowledge-entry`,value:i,rows:4,autoFocus:!0,onChange:e=>a(e.target.value),onKeyDown:e=>{oz(e)&&(e.preventDefault(),o())}}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:tz}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(J,{variant:`outline`,onClick:r,disabled:t,children:`Cancel`}),(0,L.jsxs)(J,{onClick:o,disabled:t||!i.trim(),children:[t?(0,L.jsx)(fE,{}):null,`Save`]})]})]})]})}function cz({open:e,file:t,initial:n,busy:r,onClose:i,onSave:a}){let[o,s]=(0,m.useState)(n),c=YT(e,JT.confirm);return(0,L.jsx)(VT,{open:e&&c,onOpenChange:e=>!e&&i(),label:`Edit ${t}`,description:tz,dismissOnBackdrop:!1,className:`max-w-3xl`,children:(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`h2`,{className:`text-base font-medium`,children:[`Edit `,t]}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:tz})]}),(0,L.jsx)(aD,{value:o,rows:14,className:`min-h-0 flex-1 font-mono text-sm`,onChange:e=>s(e.target.value)}),(0,L.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,L.jsx)(J,{variant:`outline`,onClick:i,disabled:r,children:`Cancel`}),(0,L.jsxs)(J,{onClick:()=>a(o),disabled:r,children:[r?(0,L.jsx)(fE,{}):null,`Save file`]})]})]})})}function lz({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,L.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(tm,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-primary`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,children:i}),(0,L.jsx)(Y,{label:`Take the note back`,icon:Vm,iconOnly:!0,className:`-my-1 size-7`,disabled:r,onClick:()=>n(e.id)})]})}function uz({entry:e,index:t,selected:n,notes:r,onPick:i,onTakeBack:a,busy:o}){let s=()=>i(t);return(0,L.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-3 focus-visible:ring-ring/40`:`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-3 focus-visible:ring-ring/40`,children:[(0,L.jsx)(`div`,{className:`flex gap-2`,children:(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,L.jsx)(DL,{text:e.text})})}),r.length>0?(0,L.jsx)(`ul`,{className:`flex flex-col gap-1 pl-1`,children:r.map(e=>(0,L.jsx)(lz,{note:e,onTakeBack:a,busy:o},e.id))}):null]})}function dz({notes:e,onTakeBack:t,busy:n}){return e.length===0?null:(0,L.jsx)(AL,{title:`Notes on entries that changed`,right:String(e.length),children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,L.jsx)(lz,{note:e,about:e.entry,onTakeBack:t,busy:n},e.id))})})}function fz({view:e}){let t=e.entries.length;return(0,L.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:[ez[e.agent],` `,(0,L.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`· `,e.file]})]}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[t,` `,t===1?`entry`:`entries`,` · `,nz(e.chars),` chars`]}),e.over?(0,L.jsx)(`p`,{className:`text-sm text-foreground`,children:rz(e.file)}):null]})}function pz({draft:e,picked:t,setDraft:n,onEditFile:r,onDelete:i}){let a=!!e;return(0,L.jsxs)(WE,{children:[(0,L.jsx)(Y,{label:`Edit the entry`,text:`Edit`,icon:am,shortcut:`E`,disabled:a||!t,onClick:()=>n({kind:`edit`,entry:t})}),(0,L.jsx)(Y,{label:t?`Add an entry after it`:`Add an entry`,text:`Add`,icon:lm,shortcut:`A`,disabled:a,onClick:()=>n({kind:`add`,entry:t})}),(0,L.jsx)(Y,{label:`Comment on the entry`,text:`Comment`,icon:Np,shortcut:`C`,disabled:a||!t,onClick:()=>n({kind:`comment`,entry:t})}),(0,L.jsx)(Y,{label:`Edit the whole file`,text:`Edit file`,icon:ap,shortcut:`F`,disabled:a,onClick:r}),(0,L.jsx)(xD,{icon:Lm,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 mz({agent:e,file:t,onChanged:n}){let r=bE(`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(()=>V(`knowledge.unnote`,{id:e})),v=()=>{h&&g(()=>V(`knowledge.remove`,{agent:e,file:t,ref:iz(h)}))},y=n=>{let r=o?.entry;if(o?.kind===`edit`&&r)return void g(()=>V(`knowledge.edit`,{agent:e,file:t,ref:iz(r),text:n}));if(o?.kind===`comment`&&r)return void g(()=>V(`knowledge.comment`,{agent:e,file:t,ref:iz(r),text:n}));g(()=>V(`knowledge.add`,{agent:e,file:t,...h?{ref:iz(h)}:{},text:n}))};return f?(0,L.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`${ez[e]} ${t}`,children:[(0,L.jsx)(pz,{draft:o,picked:h,setDraft:s,onEditFile:()=>l(!0),onDelete:v}),(0,L.jsx)(fz,{view:f}),p.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing here yet. Add the first entry below.`}):null,(0,L.jsx)(`ul`,{className:`flex flex-col gap-2`,children:p.map((e,t)=>(0,L.jsx)(uz,{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,L.jsx)(sz,{initial:o.entry.text,busy:u,onSave:y,onCancel:()=>s(void 0)}):null,o?.kind===`comment`?(0,L.jsx)(DR,{label:`Comment on this entry`,hint:tz,buttonLabel:`Add note`,onSend:async e=>(y(e),!0)}):null,o?.kind===`add`?(0,L.jsx)(DR,{label:`Add an entry`,hint:tz,buttonLabel:`Add entry`,onSend:async e=>(y(e),!0)}):null,u&&!o?(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{}),` saving…`]}):null,(0,L.jsx)(dz,{notes:f.detached,onTakeBack:_,busy:u}),(0,L.jsx)(cz,{open:c,file:t,initial:f.content,busy:u,onClose:()=>l(!1),onSave:n=>{l(!1),g(()=>V(`knowledge.replaceFile`,{agent:e,file:t,text:n}))}})]}):r.error?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not read the file. `,r.error]}):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`reading…`})}function hz(e){return`${e.agent}/${e.file}`}function gz({info:e}){return(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground tabular-nums`,children:[(0,L.jsx)(`span`,{children:nz(e.chars)}),e.over?(0,L.jsx)(`span`,{className:`text-foreground`,children:`· over`}):null,e.notes>0?(0,L.jsxs)(`span`,{className:`text-primary`,children:[e.notes,` note`,e.notes===1?``:`s`]}):null]})}function _z({info:e,selected:t,onSelect:n}){return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":t?`true`:void 0,onClick:()=>n(hz(e)),className:q(hR,`min-h-9 flex-row items-center justify-between gap-3 py-1.5`),children:[(0,L.jsx)(`span`,{className:q(`min-w-0 truncate text-sm text-foreground`,t&&`font-medium`),children:e.label}),(0,L.jsx)(gz,{info:e})]})})}var vz={master:Sf,designer:Gp,backend:Cm,qa:Dm},yz=`bot-lobby.knowledge.folded`;function bz(){try{let e=JSON.parse(window.localStorage.getItem(yz)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}function xz({files:e,selectedKey:t,onSelect:n}){let[r,i]=(0,m.useState)(bz);function a(e,t){i(n=>{let r=t?n.filter(t=>t!==e):[...new Set([...n,e])];try{window.localStorage.setItem(yz,JSON.stringify(r))}catch{}return r})}return(0,L.jsx)(`div`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:az(e).map(e=>{let i=!r.includes(e.agent),o=vz[e.agent],s=`knowledge-${e.agent}`;return(0,L.jsxs)(`section`,{children:[(0,L.jsx)(`h3`,{children:(0,L.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space ArrowLeft ArrowRight`,"aria-describedby":`focused-action-help`,type:`button`,"aria-expanded":i,"aria-controls":s,onClick:()=>a(e.agent,!i),onKeyDown:t=>{t.key===`ArrowLeft`||t.key===`h`?(t.preventDefault(),t.stopPropagation(),a(e.agent,!1)):(t.key===`ArrowRight`||t.key===`l`)&&(t.preventDefault(),t.stopPropagation(),i||a(e.agent,!0))},className:`mt-1 flex h-8 w-full items-center gap-2 rounded-lg px-2.5 text-left text-xs font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40`,children:[(0,L.jsx)(Af,{"aria-hidden":`true`,className:q(`size-3.5 shrink-0 transition-transform duration-200 ease-snap`,i&&`rotate-90`)}),(0,L.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:$R[e.agent]}),e.notes>0?(0,L.jsxs)(`span`,{className:`shrink-0 font-normal text-primary tabular-nums`,children:[e.notes,` note`,e.notes===1?``:`s`]}):null]})}),(0,L.jsx)(xl,{initial:!1,children:i?(0,L.jsx)(B.ul,{id:s,initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:520,damping:42},className:`flex flex-col gap-0.5 overflow-hidden pl-3`,children:e.files.map(e=>(0,L.jsx)(_z,{info:e,selected:hz(e)===t,onSelect:n},hz(e)))},`files`):null})]},e.agent)})})}var Sz=()=>iE(rE(`knowledge`)),Cz=e=>{let[t,n]=e.split(`/`);iE(rE(`knowledge`,t??``,n??``))};function wz(){return(0,L.jsx)(oE,{className:`m-4 flex-1`,children:(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(bf,{"aria-hidden":`true`})}),(0,L.jsx)(dE,{children:`No knowledge files yet.`})]})})}function Tz(e,t,n,r){let i=e.find(e=>e.agent===t&&e.file===n);return i?(0,L.jsx)(mz,{agent:i.agent,file:i.file,onChanged:r},hz(i)):t&&n?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That file is not on the list any more.`}):null}function Ez({agent:e,file:t}){let n=$E(),r=bE(`knowledge.files`,{},[`knowledge`]),i=r.data?.files??[];if(!r.data&&r.error)return(0,L.jsx)(mE,{message:`Could not load the knowledge files. ${r.error}`,onRetry:r.reload});if(r.data&&i.length===0)return(0,L.jsx)(wz,{});let a=i.reduce((e,t)=>e+t.notes,0),o=i.find(n=>n.agent===e&&n.file===t),s=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:`Knowledge`,count:a>0?`${a} note${a===1?``:`s`}`:void 0}),r.data?(0,L.jsx)(xz,{files:i,selectedKey:o?hz(o):void 0,onSelect:Cz}):(0,L.jsx)(iD,{})]});return(0,L.jsx)(nD,{wide:n,list:s,detail:Tz(i,e,t,r.reload),open:!!(e&&t),onClose:Sz,hint:`Select a file to read its entries.`,describe:`Knowledge file`})}function Dz({className:e,...t}){return(0,L.jsx)(fx,{"aria-keyshortcuts":`Space`,"aria-description":`When focused, press Space to toggle.`,"data-slot":`checkbox`,className:q(`peer relative flex size-[1.125rem] shrink-0 items-center justify-center rounded-[5px] border border-input bg-background text-primary-foreground transition-colors duration-150 outline-none before:absolute before:-inset-3 before:content-[''] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary`,e),...t,children:(0,L.jsx)(mx,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center`,children:(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3`,strokeWidth:3})})})}var Oz=`Sessions`,kz=`No sessions yet. A session is a live Excalidraw room that you and your agents draw in together.`,Az=`a add one: in Excalidraw, Share → Live collaboration → Start session, then paste the link`,jz=`n or make a new room here and open its link in Excalidraw`,Mz=`Up to 5 sessions; each can be assigned to one agent or several.`,Nz=`Agents may draw here.`,Pz=`Agents may only look.`,Fz=`checking the room…`,Iz=`Check that the room can be reached.`,Lz=`Assigned to`,Rz=`Assigned agents read the board and draw on it with excalidraw_read and excalidraw_draw, and appear in the room under their own name.`,zz=`Add or rename`,Bz=`Add by link`,Vz=`In Excalidraw, Share → Live collaboration → Start session, then paste the link. Enter adds it.`,Hz=`New room`,Uz=`Makes a fresh room link to open in Excalidraw; the name is optional.`,Wz=`Rename`,Gz=`draw`,Kz=`look only`,qz=`Copied to the clipboard`,Jz=`Could not reveal the link.`,Yz=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],Xz={master:`Master (oracle)`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scouts`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`};function Zz(e){return e===0?`no agents`:`${e} agent${e===1?``:`s`}`}function Qz(e){return e?e.ok?`✓`:`!`:``}function $z({id:e,label:t,hint:n,buttonLabel:r,initial:i=``,required:a,onSubmit:o}){let[s,c]=(0,m.useState)(i),l=async()=>{(!a||s.trim())&&await o(s)&&c(i)};return(0,L.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,L.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium text-foreground`,children:t}),(0,L.jsx)(`input`,{id:e,value:s,maxLength:80,onChange:e=>c(e.target.value),className:`h-8 w-full rounded-lg border border-input bg-background px-3 text-sm outline-none transition-[border-color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30`}),n?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n}):null,(0,L.jsx)(J,{type:`submit`,className:`h-8 self-end`,disabled:a&&!s.trim(),children:r})]})}function eB({onChanged:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(DR,{label:Bz,hint:Vz,buttonLabel:`Add`,onSend:async t=>await V(`excalidraw.add`,{link:t})?(e(),!0):!1}),(0,L.jsx)($z,{id:`new-room`,label:Hz,hint:Uz,buttonLabel:Hz,onSubmit:async t=>{let n=t.trim();return await V(`excalidraw.create`,n?{name:n}:{})?(e(),!0):!1}})]})}function tB({session:e,revealed:t}){return(0,L.jsx)(`p`,{className:`rounded-lg border border-border bg-muted px-3 py-2 font-mono text-sm break-all text-foreground`,children:t??e.masked})}function nB({session:e}){return(0,L.jsx)(`p`,{className:e.contribute?`text-sm text-primary`:`text-sm text-muted-foreground`,children:e.contribute?Nz:Pz})}function rB({check:e,checking:t}){return t?(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{className:`size-3.5`,"aria-hidden":`true`}),Fz]}):e?(0,L.jsxs)(`p`,{className:e.ok?`text-sm text-primary`:`text-sm text-foreground`,children:[e.ok?`✓`:`!`,` `,e.text]}):(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Iz})}function iB({agent:e,on:t,onToggle:n}){return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`label`,{className:`flex min-h-8 w-full cursor-pointer items-center gap-2.5 rounded-lg px-2 text-sm transition-colors hover:bg-muted`,children:[(0,L.jsx)(Dz,{checked:t,onCheckedChange:()=>n(e)}),(0,L.jsx)(`span`,{className:t?`text-foreground`:`text-muted-foreground`,children:Xz[e]})]})})}function aB({session:e,onChanged:t}){let n=async n=>{await V(`excalidraw.toggleAgent`,{id:e.id,agent:n})&&t()},r=async()=>{await V(`excalidraw.toggleAll`,{id:e.id})&&t()},i=e.agents.length===Yz.length;return(0,L.jsxs)(AL,{title:Lz,right:Zz(e.agents.length),children:[(0,L.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:Yz.map(t=>(0,L.jsx)(iB,{agent:t,on:e.agents.includes(t),onToggle:n},t))}),(0,L.jsx)(`div`,{className:`flex`,children:(0,L.jsx)(Y,{label:i?`Take every agent off`:`Assign every agent`,icon:Cp,onClick:()=>void r()})}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Rz})]})}function oB({session:e,onChanged:t}){return(0,L.jsx)($z,{id:`rename-room`,label:Wz,initial:e.name,required:!0,buttonLabel:Wz,onSubmit:async n=>await V(`excalidraw.rename`,{id:e.id,name:n.trim()})?(t(),!0):!1},e.name)}function sB({session:e,check:t,checking:n,onCheck:r,onChanged:i,onRemove:a}){let[o,s]=(0,m.useState)(),c=async()=>{try{s((await Ud(`excalidraw.reveal`,{id:e.id})).link)}catch(e){Nd.error(e instanceof Error?e.message:Jz)}},l=()=>void navigator.clipboard?.writeText(o??``).then(()=>Nd(qz)).catch(()=>void 0),u=async()=>{await V(`excalidraw.toggleContribute`,{id:e.id})&&i()};return(0,L.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,L.jsxs)(WE,{children:[o?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Y,{label:`Copy the link`,text:`Copy`,icon:Zf,shortcut:`C`,onClick:l}),(0,L.jsx)(Y,{label:`Open board`,icon:tp,tone:`primary`,shortcut:`O`,href:o})]}):(0,L.jsx)(Y,{label:`Reveal the link`,text:`Reveal`,icon:rp,shortcut:`R`,onClick:()=>void c()}),(0,L.jsx)(Y,{label:e.contribute?`Look only: agents stop drawing`:`Let agents draw`,text:e.contribute?`Look only`:`Let agents draw`,icon:e.contribute?rm:am,shortcut:`W`,pressed:e.contribute,onClick:()=>void u()}),(0,L.jsx)(Y,{label:`Check the room`,text:`Check`,icon:n?Dp:Dm,shortcut:`T`,disabled:n,onClick:r}),(0,L.jsx)(xD,{icon:Lm,label:`Remove the session`,text:`Remove`,shortcut:`Delete`,title:`Remove "${e.name}"?`,description:`Agents lose this session at once; the Excalidraw room itself is not touched.`,confirmLabel:`Remove session`,variant:`destructive`,onConfirm:a})]}),(0,L.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:e.name}),(0,L.jsx)(tB,{session:e,revealed:o}),(0,L.jsx)(nB,{session:e}),(0,L.jsx)(rB,{check:t,checking:n}),(0,L.jsx)(aB,{session:e,onChanged:i}),(0,L.jsxs)(AL,{title:zz,children:[(0,L.jsx)(eB,{onChanged:i}),(0,L.jsx)(oB,{session:e,onChanged:i})]})]})}function cB({check:e,checking:t}){if(t)return(0,L.jsx)(fE,{className:`size-3.5 shrink-0 text-muted-foreground`});let n=Qz(e);return n?(0,L.jsx)(`span`,{className:q(`w-3.5 shrink-0 text-center`,e?.ok?`text-primary`:`text-foreground`),"aria-hidden":`true`,children:n}):(0,L.jsx)(`span`,{className:`w-3.5 shrink-0`,"aria-hidden":`true`})}function lB({session:e,check:t,checking:n,selected:r,onSelect:i}){return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"data-row":!0,"aria-current":r?`true`:void 0,onClick:()=>i(e.id),className:hR,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(cB,{check:t,checking:n}),(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,r&&`font-medium`),children:e.name}),(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:Zz(e.agents.length)})]}),(0,L.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 pl-[1.375rem] text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`font-mono break-all`,children:e.masked}),(0,L.jsx)(mR,{variant:`secondary`,children:e.contribute?Gz:Kz})]})]})})}function uB({sessions:e,checks:t,checking:n,selectedId:r,onSelect:i}){return(0,L.jsx)(`ul`,{className:gR,children:e.map(e=>(0,L.jsx)(lB,{session:e,check:t[e.id],checking:n.includes(e.id),selected:e.id===r,onSelect:i},e.id))})}var dB=()=>iE(rE(`excalidraw`)),fB=e=>iE(rE(`excalidraw`,e));function pB({onChanged:e}){return(0,L.jsxs)(oE,{className:`m-4 flex-1`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)($p,{"aria-hidden":`true`})}),(0,L.jsx)(uE,{children:kz}),(0,L.jsx)(dE,{className:`font-mono`,children:Az}),(0,L.jsx)(dE,{className:`font-mono`,children:jz}),(0,L.jsx)(dE,{children:Mz})]}),(0,L.jsx)(`div`,{className:`flex w-full max-w-md flex-col gap-4 text-left`,children:(0,L.jsx)(eB,{onChanged:e})})]})}function mB({id:e}){let t=$E(),n=bE(`excalidraw.list`,{},[`excalidraw`]),[r,i]=(0,m.useState)({}),[a,o]=(0,m.useState)([]),s=n.data?.sessions??[],c=s.find(t=>t.id===e),l=async e=>{o(t=>[...t,e]);let t=await V(`excalidraw.check`,{id:e});o(t=>t.filter(t=>t!==e)),t&&i(n=>({...n,[e]:t}))},u=async()=>{c&&await V(`excalidraw.remove`,{id:c.id})&&(n.reload(),dB())};if(!n.data&&n.error)return(0,L.jsx)(mE,{message:`Could not load sessions. ${n.error}`,onRetry:n.reload});if(n.data&&s.length===0)return(0,L.jsx)(pB,{onChanged:n.reload});let d=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:Oz,count:n.data?`${s.length}/5`:void 0}),n.data?(0,L.jsx)(uB,{sessions:s,checks:r,checking:a,selectedId:e,onSelect:fB}):(0,L.jsx)(iD,{})]}),f=c?(0,L.jsx)(sB,{session:c,check:r[c.id],checking:a.includes(c.id),onCheck:()=>void l(c.id),onChanged:n.reload,onRemove:()=>void u()}):null;return(0,L.jsx)(nD,{wide:t,list:d,detail:f,open:c!==void 0,onClose:dB,hint:`Select a session to see its link and agents.`,describe:`Session detail`})}function hB(e,t){return e===`lobby.thinking`||t===`1`}var gB=`bot-lobby.collapsed.`,_B=new Set,vB=new Map;function yB(e){if(vB.has(e))return vB.get(e);if(e===`lobby.thinking`)return hB(e);try{return hB(e,localStorage.getItem(gB+e))}catch{return!1}}function bB(e,t){vB.set(e,t);try{e!==`lobby.thinking`&&localStorage.setItem(gB+e,t?`1`:`0`)}catch{}for(let e of[..._B])e()}function xB(e){return _B.add(e),()=>{_B.delete(e)}}function SB(e){bB(e,!yB(e))}function CB(e){return[(0,m.useSyncExternalStore)(xB,()=>yB(e),()=>hB(e)),(0,m.useCallback)(()=>bB(e,!yB(e)),[e])]}function wB(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 TB={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 EB(e){return e.length<=2?e:e.charAt(0)+e.slice(1).toLowerCase()}function DB(e){return TB[e]??`text-muted-foreground`}function OB(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 kB(e){return e?.runs??[]}function AB(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 jB({entry:e}){return e.pending?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):e.kind===`error`?(0,L.jsx)(Zm,{"aria-hidden":`true`,className:`size-3.5 text-destructive`}):e.kind===`warning`?(0,L.jsx)(zm,{"aria-hidden":`true`,className:`size-3.5 text-warning`}):e.kind===`success`?(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3.5 text-success`}):(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}function MB({entry:e}){return(0,L.jsxs)(`li`,{className:`grid grid-cols-[2.75rem_5rem_1rem_minmax(0,1fr)] items-baseline gap-x-2 rounded-lg px-2 py-1.5 text-sm transition-colors hover:bg-muted`,children:[(0,L.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:sD(e.at)}),(0,L.jsx)(`span`,{className:q(`overflow-hidden text-xs font-medium whitespace-nowrap`,DB(e.source)),children:EB(e.source)}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center self-center`,children:(0,L.jsx)(jB,{entry:e})}),(0,L.jsx)(`span`,{className:`sr-only`,children:e.pending?`pending`:e.kind}),(0,L.jsx)(`span`,{className:q(`min-w-0 break-words`,e.kind===`error`?`text-destructive`:e.pending?``:`text-muted-foreground`),children:e.pending?`${e.text}…`:e.text})]})}function NB({entries:e,collapsed:t,onToggle:n,shortcut:r,bare:i}){let a=e.slice(-400),o=a.filter(e=>e.pending).length,{ref:s,atBottom:c,stick:l,onScroll:u}=wB(JSON.stringify(a));return(0,L.jsxs)(OL,{"aria-label":`Activity`,...i?{}:{title:`Activity`},collapsed:t,...n?{onToggle:n}:{},shortcut:r,className:`flex-1`,note:o?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),` `,o,` running`]}):void 0,children:[(0,L.jsx)(`div`,{ref:s,onScroll:u,className:`min-h-0 flex-1 overflow-y-auto px-2 pt-2 pb-dock outline-none focus-visible:bg-muted/30`,role:`log`,"aria-label":`Activity`,tabIndex:0,children:a.length===0?(0,L.jsx)(`p`,{className:`px-2 py-1 text-sm text-muted-foreground`,children:`No activity yet.`}):(0,L.jsx)(`ul`,{children:a.map(e=>(0,L.jsx)(MB,{entry:e},e.id))})}),c?null:(0,L.jsx)(`div`,{className:`absolute inset-x-0 bottom-dock z-10 flex justify-center`,children:(0,L.jsx)(Y,{label:`Jump to latest`,text:`Latest`,icon:ff,className:`rounded-full bg-card shadow-card`,onClick:l})})]})}var PB=3e5,FB=`earlier messages load as you scroll up`,IB=`No task is running in this session.`,LB=`Type a request below and press enter to start one: the oracle scouts, proposes, plans and delegates.`,RB=`Nothing said yet. Type below to talk to the oracle about this task.`;function zB({entry:e}){let t=e.text.startsWith(`✗`);return(0,L.jsx)(`div`,{className:t?`flex justify-center text-sm text-destructive`:`flex justify-center text-sm text-muted-foreground`,children:(0,L.jsxs)(`span`,{className:`max-w-[80%] text-center`,children:[e.text,e.at?` · ${sD(e.at)}`:``]})})}function BB({name:e,children:t}){return(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,L.jsx)(`span`,{className:`font-medium`,children:e}),(0,L.jsx)(`span`,{className:`ml-auto flex items-center gap-2 text-xs text-muted-foreground`,children:t})]})}function VB({entry:e,head:t}){return e.role===`you`?(0,L.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[t?(0,L.jsxs)(`span`,{className:`flex items-baseline gap-2 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:sD(e.at)}),(0,L.jsx)(`span`,{className:`font-medium`,children:`You`})]}):null,(0,L.jsx)(`div`,{className:`max-w-[78%] rounded-xl rounded-tr-sm border border-primary/10 bg-you px-3.5 py-2`,children:(0,L.jsx)(DL,{text:e.text})})]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t?(0,L.jsx)(BB,{name:e.role===`panel`?`Panel`:`Oracle`,children:(0,L.jsx)(`time`,{children:sD(e.at)})}):null,(0,L.jsx)(`div`,{className:`max-w-[88%] pl-4`,children:(0,L.jsx)(DL,{text:e.text})})]})}var HB=(0,m.memo)(function({entry:e,head:t,fresh:n}){return(0,L.jsx)(B.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,L.jsx)(zB,{entry:e}):(0,L.jsx)(VB,{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 UB({text:e,busy:t}){let n=!!e?.trim();return!n&&!t?null:(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(BB,{name:`Oracle`,children:t?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),n?`writing`:`working…`]}):null}),n?(0,L.jsx)(`div`,{className:`max-w-[88%] pl-4`,children:(0,L.jsx)(DL,{text:e??``})}):null]})}function WB({hasTask:e}){return(0,L.jsxs)(oE,{className:`h-full border-0`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(Fp,{"aria-hidden":`true`})}),e?null:(0,L.jsx)(uE,{children:IB}),(0,L.jsx)(dE,{children:e?RB:LB})]}),e?null:(0,L.jsxs)(`ul`,{className:`flex flex-col gap-2 text-sm text-muted-foreground`,children:[(0,L.jsxs)(`li`,{className:`flex items-center justify-center gap-2`,children:[`Or plan it first with the whole panel in `,(0,L.jsx)(zT,{chord:`3`}),` Plan`]}),(0,L.jsxs)(`li`,{className:`flex items-center justify-center gap-2`,children:[`or make a direct change in `,(0,L.jsx)(zT,{chord:`4`}),` Quick fix`]})]})]})}async function GB(e){let t=await Ud(`lobby.history`,{before:e});return{entries:t.entries,hasOlder:t.hasOlder}}function KB(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 GB(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])}}function qB({chat:e,reply:t,busy:n,hasOlder:r,hasTask:i,bare:a}){let{ref:o,atBottom:s,stick:c,onScroll:l}=wB(e.length+(t?.length??0)),{merged:u,more:d,loading:f,load:p}=KB(e,r,o),h=(0,m.useCallback)(()=>{l();let e=o.current;e&&e.scrollTop<80&&d&&!f&&p()},[l,o,d,f,p]),g=u.length===0&&!t?.trim()&&!n,[_,v]=(0,m.useState)(!1);return(0,m.useEffect)(()=>v(!0),[]),(0,L.jsxs)(OL,{"aria-label":`Conversation`,...a?{}:{title:`Conversation`},note:d?FB:void 0,className:`flex-1`,children:[(0,L.jsx)(`div`,{ref:o,onScroll:h,className:`min-h-0 flex-1 overflow-y-auto px-5 pt-4 pb-dock outline-none focus-visible:bg-muted/30`,role:`log`,"aria-label":`Conversation`,tabIndex:0,children:g?(0,L.jsx)(WB,{hasTask:i}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[u.map((e,t)=>{let n=u[t-1],r=!n||n.role!==e.role||e.at-n.at>PB;return(0,L.jsx)(HB,{entry:e,head:r,fresh:_},e.id)}),(0,L.jsx)(UB,{text:t,busy:n})]})}),s?null:(0,L.jsx)(`div`,{className:`absolute right-4 bottom-dock z-10`,children:(0,L.jsx)(Y,{label:`Jump to latest`,text:`Latest`,icon:ff,tone:`primary`,className:`rounded-full shadow-sm`,onClick:c})})]})}function JB(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]),t}function YB(e){return e===`running`?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):e===`success`?(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3.5 text-success`}):e===`failed`||e===`timeout`||e===`error`?(0,L.jsx)(Zm,{"aria-hidden":`true`,className:`size-3.5 text-destructive`}):(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/50`})}function XB(e,t){let n=e.startedAt?Date.parse(e.startedAt):NaN;return cD((e.finishedAt?Date.parse(e.finishedAt):t)-n)}function ZB({runs:e}){let t=JB(e.some(e=>e.status===`running`));return e.length===0?null:(0,L.jsx)(`ul`,{className:`-mt-1 flex shrink-0 flex-wrap items-center gap-1.5 px-4 pb-3`,"aria-label":`Runs`,children:e.map((e,n)=>(0,L.jsxs)(`li`,{className:`flex items-center gap-2 rounded-full bg-muted py-1 pr-3 pl-2 text-xs`,children:[(0,L.jsx)(`span`,{className:`flex size-4 items-center justify-center`,children:YB(e.status)}),(0,L.jsx)(`span`,{className:`sr-only`,children:e.status??`unknown`}),(0,L.jsx)(`span`,{className:q(`font-medium`,DB(OB(e))),children:EB(OB(e))}),e.activity??e.step?(0,L.jsx)(`span`,{className:`max-w-[18rem] truncate text-muted-foreground`,children:e.activity??e.step}):null,(0,L.jsx)(`span`,{className:`tabular-nums text-muted-foreground`,children:XB(e,t)})]},e.runId??n))})}var QB=8;function $B(e){return e?e.path===`fast`?`fast track (${e.size})`:`full workflow (${e.size})`:``}function eV(e,t){let n=Math.min(t,QB);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 tV({done:e,total:t}){return(0,L.jsx)(`span`,{className:`inline-flex items-center gap-0.5`,"aria-hidden":`true`,children:eV(e,t).map((e,t)=>(0,L.jsx)(`span`,{className:q(`h-1.5 w-3 rounded-full`,e?`bg-primary`:`bg-muted-foreground/25`)},t))})}function nV({check:e,className:t}){return(0,L.jsx)(e===`done`?Rf:e===`dropped`?Kf:Jf,{"aria-hidden":`true`,className:q(`size-4 shrink-0`,e===`done`?`text-success`:`text-muted-foreground`,t)})}function rV({children:e}){return(0,L.jsx)(`span`,{className:`hidden shrink-0 items-center gap-1 text-xs text-muted-foreground md:inline-flex`,children:e})}function iV({done:e,total:t,current:n}){let r=t>0?Math.min(100,Math.round(e/t*100)):0;return(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsxs)(`span`,{className:`tabular-nums`,children:[e,` of `,t,` steps`]}),(0,L.jsx)(`div`,{className:`h-1.5 w-16 overflow-hidden rounded-full bg-border`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":e,"aria-label":`Plan progress`,children:(0,L.jsx)(B.div,{className:`h-full rounded-full bg-primary`,initial:!1,animate:{width:`${r}%`},transition:{type:`spring`,stiffness:260,damping:30}})}),n?(0,L.jsxs)(`span`,{className:`hidden max-w-[16rem] truncate xl:inline`,children:[`now: `,(0,L.jsx)(`span`,{className:`text-foreground`,children:n})]}):null]})}function aV({task:e,status:t}){let n=t?.branch??t?.workspace.branch,r=e?.git?.branch??n;return(0,L.jsxs)(`section`,{className:`flex h-12 shrink-0 items-center gap-3 px-4`,"aria-label":`Task`,role:`group`,children:[(0,L.jsxs)(`h2`,{className:`min-w-0 flex-1 truncate text-[0.8125rem] font-medium`,title:e?.title,children:[e?.title??`No task yet`,e?null:(0,L.jsx)(`span`,{className:`ml-2 font-normal text-muted-foreground`,children:t?.sessionName??`Type a request below to start one.`})]}),e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`shrink-0 rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:e.state.replace(/_/g,` `)}),(0,L.jsx)(rV,{children:e.id}),e.track?(0,L.jsx)(rV,{children:$B(e.track)}):null,(e.domains??[]).length>0?(0,L.jsx)(rV,{children:e.domains.join(`, `)}):null,r?(0,L.jsxs)(`span`,{className:`hidden max-w-48 shrink-0 items-center gap-1 text-xs text-muted-foreground lg:inline-flex`,children:[(0,L.jsx)(dp,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,L.jsxs)(`span`,{className:`truncate`,children:[r,e.git?.from?` · from ${e.git.from}`:``]})]}):null,e.progress?(0,L.jsx)(iV,{done:e.progress.done,total:e.progress.total,current:e.currentStep}):null]}):null]})}function oV(e,t){return t.overlay?!0:e===`savePlan`&&!t.saveAvailable}var sV={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 cV(e){return e.length===1&&/[a-z]/i.test(e)?`Key${e.toUpperCase()}`:e.length===1&&/[0-9]/.test(e)?`Digit${e}`:sV[e]}function lV(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=cV(n);if(!e)return;t.code=e}return t.code?t:void 0}function uV(e,t){return e.code===t.code&&e.altKey===t.alt&&e.ctrlKey===t.ctrl&&e.shiftKey===t.shift&&e.metaKey===t.meta}function dV(e,t){let n=lV(t);return n?uV(e,n):!1}function fV(e,t){for(let n of t)if(dV(e,n.key))return n.action}function pV(e,t){for(let n of t)if(dV(e,n.key))return n.id}function mV(e){return DE(e.target)||e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||XT()||!!document.querySelector(`[role='dialog'], [role='menu'], [role='listbox']`)}function hV(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`)NE(e.key===`j`?1:-1);else return!1;return!0}function gV(e,t){let n=pV(e,t.tabs),r=fV(e,t.keys);return!n&&!r?!1:oV(r,{overlay:!!document.querySelector(`[role='dialog'], [role='menu'], [role='listbox']`)||XT(),typing:DE(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 _V(e,t,n){if(e.key===`Escape`)return Date.now()<n&&e.preventDefault(),0;if(Date.now()<n){let n=Xq[e.key];return n&&(e.preventDefault(),t.onTab(n)),0}return e.key===`g`?Date.now()+1500:(hV(e,t.tabs,t.onAction,t.onTab)&&e.preventDefault(),0)}function vV(e){(0,m.useEffect)(()=>{if(!e.enabled)return;let t=0,n=n=>{if(n.defaultPrevented||n.isComposing)return;if(!e.insideApp()){fV(n,e.keys)===`help`&&(n.preventDefault(),e.onAction(`help`));return}let r=!n.altKey&&!n.ctrlKey&&!n.metaKey;if(r&&mV(n)){t=0;return}if(gV(n,e)){t=0;return}t=r?_V(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])}function yV({thought:e}){return(0,L.jsxs)(`li`,{className:`flex flex-wrap items-start gap-x-3 gap-y-1 border-b border-border py-3 text-sm last:border-0`,children:[(0,L.jsx)(`span`,{className:q(`shrink-0 pt-0.5 text-xs font-medium`,DB(e.source)),children:EB(e.source)}),e.live?(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 pt-0.5 text-xs text-primary`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full bg-primary motion-safe:animate-pulse`}),`thinking`]}):null,(0,L.jsx)(`div`,{className:`w-full min-w-0 text-muted-foreground italic`,children:(0,L.jsx)(DL,{text:e.text})})]})}function bV(e,t,n){(0,m.useEffect)(()=>{if(!e||!t)return;let r=e=>{!e.isComposing&&dV(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 xV({thoughts:e,collapsed:t,onToggle:n,shortcut:r}){let i=AB(e),a=(0,m.useRef)(null),o=(0,m.useRef)(t);o.current=t,(0,m.useEffect)(()=>()=>{o.current||n()},[n]);let s=YT(!t,JT.sheet),c=ZT();return bV(s,r,n),(0,L.jsxs)(L.Fragment,{children:[(0,Zg.createPortal)((0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(J,{ref:a,type:`button`,variant:`outline`,"aria-label":`Open Thinking`,"aria-haspopup":`dialog`,"aria-expanded":!t,"aria-keyshortcuts":r?`${r} Enter Space`:`Enter Space`,onClick:n,className:q(`thinking-bubble fixed z-20 size-11 rounded-full shadow-card`,c&&`invisible`),children:(0,L.jsx)(Sf,{"aria-hidden":`true`})})}),(0,L.jsxs)(wE,{side:`left`,children:[`Thinking `,r?(0,L.jsx)(zT,{chord:r}):null]})]}),document.body),(0,L.jsxs)(VT,{open:s,onOpenChange:e=>{!e&&!t&&n()},label:`Thinking`,onCloseAutoFocus:e=>{e.preventDefault(),requestAnimationFrame(()=>{document.querySelector(`[role='dialog']`)||a.current?.focus()})},children:[(0,L.jsxs)(`header`,{className:`flex items-center justify-between gap-4 border-b border-border px-4 py-3`,children:[(0,L.jsx)(`h2`,{className:`text-[0.9375rem] font-medium`,children:`Thinking`}),(0,L.jsxs)(J,{variant:`ghost`,"aria-keyshortcuts":`Escape Enter Space`,onClick:n,children:[(0,L.jsx)(Lp,{"aria-hidden":`true`}),`Minimize `,(0,L.jsx)(`kbd`,{"data-slot":`kbd`,className:q(MT,`ml-0.5`),children:`Esc`})]})]}),(0,L.jsx)(`div`,{className:`min-h-0 overflow-y-auto px-4 py-2 outline-none focus-visible:bg-muted/30`,role:`log`,"aria-label":`Latest thoughts`,tabIndex:0,children:i.length?(0,L.jsx)(`ul`,{children:i.map(e=>(0,L.jsx)(yV,{thought:e},e.id))}):(0,L.jsx)(`p`,{className:`py-4 text-sm text-muted-foreground`,children:`Thoughts from the oracle and every agent appear here, and only here.`})})]})]})}var SV=(e,t)=>e?.keys.find(e=>e.action===t)?.label,CV=e=>e?.panels??{conversation:!0,activity:!0,thinking:!0};function wV({name:e,icon:t,shortcut:n,onClick:r}){return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`Expand ${e}`,"aria-expanded":!1,"aria-keyshortcuts":n,onClick:r,className:`inline-flex size-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`,children:(0,L.jsx)(t,{"aria-hidden":`true`,className:`size-4`})})}),(0,L.jsxs)(wE,{side:`left`,children:[`Expand `,e,n?(0,L.jsx)(zT,{chord:n}):null]})]})}function TV(e){let t=CV(e.status);return(0,L.jsx)(`aside`,{"aria-label":`Minimized panes`,className:`flex w-12 shrink-0 flex-col items-center gap-1 border-l border-border py-2`,children:t.activity&&e.activityFolded?(0,L.jsx)(wV,{name:`Activity`,icon:cf,shortcut:SV(e.status,`activity`),onClick:e.toggleActivity}):null})}function EV(e){let{data:t,status:n,activityFolded:r,toggleActivity:i}=e,a=CV(n),o=a.activity&&!r;if(!a.conversation&&!o)return null;let s=a.conversation&&o;return(0,L.jsxs)(`div`,{className:q(`grid min-h-0 flex-1`,s?`grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)] divide-x divide-border`:`grid-cols-1`),children:[a.conversation?(0,L.jsx)(qB,{chat:t?.chat??[],reply:t?.reply,busy:n?.busy??!1,hasOlder:t?.hasOlderChat??!1,hasTask:!!t?.task}):null,o?(0,L.jsx)(NB,{entries:t?.activity??[],collapsed:!1,onToggle:i,shortcut:SV(n,`activity`)}):null]})}function DV(e){let{status:t}=e,n=CV(t).activity&&e.activityFolded;return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,L.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:(0,L.jsx)(EV,{...e})}),n?(0,L.jsx)(TV,{...e}):null]})}function OV({data:e,status:t}){let n=CV(t),r=[...n.conversation?[{id:`conversation`,label:`Conversation`,icon:Fp}]:[],...n.activity?[{id:`activity`,label:`Activity`,icon:cf}]:[]],[i,a]=(0,m.useState)(`conversation`),o=r.find(e=>e.id===i)??r[0],s=(e?.activity??[]).filter(e=>e.pending).length;return o?(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[r.length>1?(0,L.jsx)(`div`,{role:`radiogroup`,"aria-label":`Pane`,className:`flex shrink-0 items-center gap-0.5 border-b border-border px-3 py-2`,children:r.map(e=>{let t=e.id===o.id,n=e.icon;return(0,L.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,onClick:()=>a(e.id),className:q(`inline-flex h-10 items-center gap-1.5 rounded-lg px-2.5 text-[0.8125rem] font-medium outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/40`,t?`bg-accent text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:[(0,L.jsx)(n,{"aria-hidden":`true`,className:`size-4`}),e.label,e.id===`activity`&&s>0?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):null]},e.id)})}):null,o.id===`conversation`?(0,L.jsx)(qB,{chat:e?.chat??[],reply:e?.reply,busy:t?.busy??!1,hasOlder:e?.hasOlderChat??!1,hasTask:!!e?.task,bare:!0}):null,o.id===`activity`?(0,L.jsx)(NB,{entries:e?.activity??[],collapsed:!1,bare:!0}):null]}):null}function kV(e){let{data:t,status:n}=e,r=$E(),i=CV(n);return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`shrink-0 border-b border-border`,children:[(0,L.jsx)(aV,{task:t?.task,status:n}),(0,L.jsx)(ZB,{runs:kB(t)})]}),r?(0,L.jsx)(DV,{...e}):(0,L.jsx)(OV,{...e}),i.thinking?(0,L.jsx)(xV,{thoughts:t?.thoughts??[],collapsed:e.thinkingFolded,onToggle:e.toggleThinking,shortcut:SV(n,`thinking`)}):null]})}function AV(){let e=vE(`lobby`),t=vE(`status`),[n,r]=CB(`lobby.activity`),[i,a]=CB(`lobby.thinking`);return!e.data&&e.loading?(0,L.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(fE,{}),(0,L.jsx)(`span`,{children:`Connecting…`})]}):!e.data&&e.error?(0,L.jsx)(mE,{message:e.error,onRetry:()=>wd.onHello({})}):(0,L.jsx)(kV,{data:e.data,status:t.data,activityFolded:n,thinkingFolded:i,toggleActivity:r,toggleThinking:a})}var jV={master:`master`,scout:`scout`,worker:`worker`,reviewer:`QA gate`,researcher:`research`,quickfix:`quick fix`,planner:`oracle (plan)`,panel:`panel`};function MV(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 NV(e){return e>0?MV(e):`—`}function PV(e,t){return t>0?`${Math.round(e/t*100)}%`:`—`}function FV(e){return e<=0?`—`:e<.01?`<$0.01`:`$${e.toFixed(2)}`}function IV(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 LV(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)}s`}function RV(e){return e>=.9?{icon:`✓`,word:`healthy`,tone:`healthy`}:e>=.7?{icon:`!`,word:`shaky`,tone:`shaky`}:{icon:`✗`,word:`failing`,tone:`failing`}}function zV(e){return e===`model`?`by model · thinking`:`by model · thinking · agent`}function BV(e,t){let n=t===`model-kind`?jV[e.kinds[0]??``]??e.kinds[0]??``:``;return[e.model,e.thinking,n].filter(Boolean).join(` · `)}var VV=[`bg-chart-1`,`bg-chart-2`,`bg-chart-3`,`bg-chart-4`,`bg-chart-5`],HV={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 UV(e){let t=HV[e.toUpperCase()];if(t)return t;let n=0;for(let t of e)n=(n*31+t.charCodeAt(0))%VV.length;return VV[n]??VV[0]}function WV(e){return jV[e]??e}var GV=6;function KV({title:e,right:t,children:n}){return(0,L.jsxs)(`section`,{className:`flex min-w-0 flex-col gap-3 rounded-xl border border-border p-4`,"aria-label":e,children:[(0,L.jsxs)(`h2`,{className:`flex items-baseline justify-between gap-3 text-sm font-medium`,children:[(0,L.jsx)(`span`,{children:e}),t?(0,L.jsx)(`span`,{className:`truncate text-xs font-normal text-muted-foreground`,children:t}):null]}),n]})}function qV({rows:e,render:t}){let[n,r]=(0,m.useState)(!1),i=n?e:e.slice(0,GV);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:i.map(t)}),e.length>GV?(0,L.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-3 focus-visible:ring-ring/30`,children:n?`Show fewer`:`Show all ${e.length}`}):null]})}function JV(e,t){return t>0?Math.max(1.5,e/t*100):0}function YV({label:e,value:t,marker:n,max:r,valueText:i,sub:a}){return(0,L.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,L.jsxs)(`span`,{className:`shrink-0 tabular-nums`,children:[i,a?(0,L.jsx)(`span`,{className:`ml-2 text-xs text-muted-foreground`,children:a}):null]})]}),(0,L.jsxs)(`div`,{className:`relative h-1.5 rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${i}`,children:[(0,L.jsx)(`div`,{className:`h-full rounded-full bg-primary/70`,style:{width:`${JV(t,r)}%`}}),n?(0,L.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,JV(n,r))}%`}}):null]})]})}function XV({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,L.jsx)(KV,{title:`Average run time`,right:`per model · thinking · tick is p90`,children:n.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,L.jsx)(qV,{rows:n,render:e=>(0,L.jsx)(YV,{label:t(e),value:e.avgMs,marker:e.p90Ms,max:r,valueText:NV(e.avgMs),sub:`p90 ${NV(e.p90Ms)}`},t(e))})})}var ZV={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`},QV={healthy:`text-success`,shaky:`text-warning`,failing:`text-destructive`};function $V({label:e,rate:t,runs:n}){let r=RV(t),i=`${Math.round(t*100)}%`;return(0,L.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3 text-[0.8125rem]`,children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,title:e,children:e}),(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-2 tabular-nums`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-1.5 ${QV[r.tone]}`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 rounded-full ${ZV[r.tone]}`}),(0,L.jsx)(`span`,{className:`sr-only`,children:r.word}),i]}),(0,L.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` run`,n===1?``:`s`]})]})]}),(0,L.jsxs)(`div`,{className:`flex h-1.5 overflow-hidden rounded-full bg-muted`,role:`img`,"aria-label":`${e}: ${r.word}, ${i} of ${n} runs`,children:[(0,L.jsx)(`div`,{className:`h-full bg-success/70`,style:{width:`${t*100}%`}}),(0,L.jsx)(`div`,{className:`h-full bg-destructive/45`,style:{width:`${(1-t)*100}%`}})]})]})}function eH({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,L.jsx)(KV,{title:`Success rate`,right:`green worked · red failed`,children:n.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No runs yet.`}):(0,L.jsx)(qV,{rows:n,render:e=>(0,L.jsx)($V,{label:t(e),rate:e.successes/e.runs,runs:e.runs},t(e))})})}function tH({share:e}){return(0,L.jsx)(`ul`,{className:`flex flex-wrap gap-x-6 gap-y-1.5 text-xs`,children:e.map(e=>(0,L.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`size-2 shrink-0 rounded-full ${UV(e.agent)}`,"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`text-[0.8125rem]`,children:EB(e.agent)}),(0,L.jsxs)(`span`,{className:`tabular-nums`,children:[Math.round(e.share*100),`%`]}),(0,L.jsxs)(`span`,{className:`text-muted-foreground tabular-nums`,children:[`avg `,MV(e.ms/Math.max(1,e.runs)),` ×`,e.runs]})]},e.agent))})}function nH({share:e}){return(0,L.jsx)(`div`,{className:`flex h-2.5 gap-0.5 overflow-hidden rounded-full`,role:`img`,"aria-label":`Share of run time by agent`,children:e.map(e=>(0,L.jsx)(`span`,{className:`${UV(e.agent)} opacity-75 first:rounded-l-full last:rounded-r-full`,style:{width:`${e.share*100}%`},title:`${e.agent} ${Math.round(e.share*100)}%`},e.agent))})}function rH({times:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.avgMs),1);return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2.5 pt-1`,children:[(0,L.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Request to done, by the oracle's model`}),(0,L.jsx)(qV,{rows:e,render:e=>(0,L.jsx)(YV,{label:[e.model,e.thinking].filter(Boolean).join(` · `),value:e.avgMs,max:t,valueText:MV(e.avgMs),sub:`×${e.tasks}`},`${e.model}-${e.thinking}`)})]})}function iH({timeShare:e}){let t=e.byAgent;return(0,L.jsx)(KV,{title:`Where the time goes`,right:`share of run time by agent`,children:t.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No timed runs yet.`}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,L.jsx)(nH,{share:t}),(0,L.jsx)(tH,{share:t}),(0,L.jsx)(rH,{times:e.taskTimes})]})})}function aH({label:e,value:t,sub:n}){return(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,L.jsx)(`span`,{className:`text-sm font-medium tabular-nums`,children:t}),n?(0,L.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n}):null]})}var oH=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function sH({summary:e}){let t=Object.entries(e.byPurpose).sort((e,t)=>t[1]-e[1]);return(0,L.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-xl border border-border p-4`,"aria-label":`Classifier (Jev)`,children:[(0,L.jsx)(`h2`,{className:`text-sm font-medium`,children:`Classifier (Jev)`}),e.calls===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`no calls recorded`}):(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-3 sm:grid-cols-4`,children:[(0,L.jsx)(aH,{label:`Calls`,value:oH(e.calls,`call`),sub:`${PV(e.ok,e.calls)} ok`}),(0,L.jsx)(aH,{label:`Speed`,value:`p50 ${LV(e.p50Ms)}`,sub:`p90 ${LV(e.p90Ms)}`}),(0,L.jsx)(aH,{label:`Read`,value:e.input>0?`${IV(e.input)} tokens`:`—`}),(0,L.jsx)(aH,{label:`Routed down`,value:e.routed>0?oH(e.routed,`run`):`none`,sub:e.routed>0?`${PV(e.routedOk,e.routed)} ok`:`no runs routed`})]}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`text-primary`,children:`spared`}),` `,oH(e.seatRunsSkipped,`seat run`),` skipped · `,oH(e.questionsAnswered,`question`),` answered · `,oH(e.quickFixesHeld,`quick fix`,`quick fixes`),` held`,t.length>0?(0,L.jsx)(`span`,{className:`ml-3 border-l border-border pl-3`,children:t.map(([e,t])=>`${e} ${t}`).join(` · `)}):null]})]})}var cH=[`Runs`,`OK`,`Avg`,`p50`,`p90`,`Turns`,`Tools`,`Tokens`,`tok/s`,`$/run`,`$ total`,`Stalls`];function lH(e,t=0){return e>0?e.toFixed(t):`—`}function uH(e){return[String(e.runs),PV(e.successes,e.runs),NV(e.avgMs),NV(e.p50Ms),NV(e.p90Ms),lH(e.avgTurns,1),lH(e.avgTools,1),e.avgTokens>0?IV(e.avgTokens):`—`,e.tokensPerSecond>0?e.tokensPerSecond.toFixed(0):`—`,FV(e.avgCost),FV(e.totalCost),e.timeouts>0?String(e.timeouts):`—`]}function dH(e,t){return t===`model-kind`?WV(e.kinds[0]??``):e.kinds.map(WV).join(`, `)}function fH({groups:e,groupBy:t}){return(0,L.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-2 overflow-hidden rounded-xl border border-border pt-4`,"aria-label":`All models`,children:[(0,L.jsxs)(`h2`,{className:`flex flex-wrap items-baseline justify-between gap-3 px-4 text-sm font-medium`,children:[(0,L.jsx)(`span`,{children:`All models`}),(0,L.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[t===`model`?`by model · thinking`:`by model · thinking · agent`,` · sorted by runs`]})]}),(0,L.jsx)(`div`,{className:`max-h-80 overflow-auto outline-none focus-visible:ring-3 focus-visible:ring-ring/40`,tabIndex:0,role:`region`,"aria-label":`All model metrics, scroll horizontally to see all columns`,children:(0,L.jsxs)(`table`,{className:`w-full border-collapse text-xs`,children:[(0,L.jsx)(`thead`,{className:`sticky top-0 bg-card text-muted-foreground`,children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Model`}),(0,L.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:`Think`}),(0,L.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-left font-medium`,children:t===`model-kind`?`Agent`:`Agents`}),cH.map(e=>(0,L.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 text-right font-medium whitespace-nowrap`,children:e},e))]})}),(0,L.jsx)(`tbody`,{children:e.map(e=>(0,L.jsxs)(`tr`,{className:`border-t border-border/70 transition-colors hover:bg-muted`,children:[(0,L.jsx)(`th`,{scope:`row`,className:`px-3 py-1.5 text-left font-normal text-foreground`,children:e.model}),(0,L.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:e.thinking||`—`}),(0,L.jsx)(`td`,{className:`px-3 py-1.5 whitespace-nowrap text-muted-foreground`,children:dH(e,t)||`—`}),uH(e).map((e,t)=>(0,L.jsx)(`td`,{className:`px-3 py-1.5 text-right tabular-nums whitespace-nowrap text-foreground`,children:e},cH[t]))]},BV(e,t)))})]})})]})}var pH={healthy:`bg-success`,shaky:`bg-warning`,failing:`bg-destructive`};function mH({label:e,value:t,sub:n,dot:r}){return(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 bg-card px-4 py-3.5`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-2xl leading-tight font-semibold tracking-tight tabular-nums`,children:[r?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full ${pH[r.tone]}`}),(0,L.jsx)(`span`,{className:`sr-only`,children:r.word})]}):null,t]}),(0,L.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:n||`\xA0`})]})}function hH({tiles:e}){let t=RV(e.runs>0?e.successes/e.runs:0),n=e.runs-e.successes;return(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-border bg-border sm:grid-cols-5 [&>:last-child]:col-span-2 sm:[&>:last-child]:col-span-1`,children:[(0,L.jsx)(mH,{label:`Runs`,value:String(e.runs),sub:e.runs===0?`no runs yet`:``}),(0,L.jsx)(mH,{label:`Success`,value:PV(e.successes,e.runs),sub:`${n} failed${e.stalls>0?` · ${e.stalls} stalled`:``}`,dot:{tone:t.tone,word:t.word}}),(0,L.jsx)(mH,{label:`Avg run`,value:NV(e.avgMs),sub:`p90 ${NV(e.p90Ms)}`}),(0,L.jsx)(mH,{label:`Cost`,value:FV(e.cost),sub:e.runs>0?`${FV(e.cost/e.runs)} per run`:`—`}),(0,L.jsx)(mH,{label:`Tasks`,value:`${e.completed} done`,sub:e.avgCompleteMs>0?`avg ${MV(e.avgCompleteMs)} · ${e.active} active`:`${e.active} active`})]})}var gH=`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 _H({groupBy:e,onGroup:t}){return(0,L.jsx)(`div`,{role:`radiogroup`,"aria-label":`Group by`,className:`flex 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,L.jsx)(J,{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:zV(n)},n))})}function vH({query:e,onQuery:t}){return(0,L.jsxs)(`label`,{className:`relative flex items-center`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:`Search runs`}),(0,L.jsx)(xm,{"aria-hidden":`true`,className:`pointer-events-none absolute left-2.5 size-3.5 text-muted-foreground`}),(0,L.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,L.jsx)(zT,{chord:`/`,className:`kbd-hint pointer-events-none absolute right-2`})]})}function yH({data:e,groupBy:t,query:n}){let r=e=>BV(e,t);return e.tiles.runs===0?(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(hH,{tiles:e.tiles}),(0,L.jsx)(`p`,{className:`rounded-xl border border-border p-4 text-sm text-muted-foreground`,children:n?`No run matches "${n}".`:gH})]}):(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,L.jsx)(hH,{tiles:e.tiles}),e.classifier?(0,L.jsx)(sH,{summary:e.classifier}):null,(0,L.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-2`,children:[(0,L.jsx)(XV,{groups:e.groups,label:r}),(0,L.jsx)(eH,{groups:e.groups,label:r})]}),(0,L.jsx)(iH,{timeShare:e.timeShare}),(0,L.jsx)(fH,{groups:e.groups,groupBy:t})]})}function bH(){return(0,L.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,L.jsx)(`div`,{className:`h-20 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function xH(){let[e,t]=(0,m.useState)(`model`),[n,r]=(0,m.useState)(``),i=bE(`metrics.get`,{groupBy:e,query:n},[`metrics`]);return!i.data&&i.error?(0,L.jsx)(mE,{message:`Could not load metrics. ${i.error}`,onRetry:i.reload}):(0,L.jsxs)(`div`,{className:`mx-auto flex w-full max-w-6xl flex-col gap-4 px-5 pt-5 pb-dock`,children:[(0,L.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:`Metrics`}),i.loading&&i.data?(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsx)(fE,{className:`size-3`,"aria-hidden":`true`,role:`presentation`}),` refreshing`]}):null,(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`min-w-4 flex-1`}),(0,L.jsx)(_H,{groupBy:e,onGroup:t}),(0,L.jsx)(vH,{query:n,onQuery:r})]}),i.data?(0,L.jsx)(yH,{data:i.data,groupBy:e,query:n}):(0,L.jsx)(bH,{})]})}var SH=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 CH(e,t){return JSON.stringify([e,`prompt`,t])}function wH(e,t,n){return JSON.stringify([e,`dialog`,t,n])}function TH(e,t,n){return JSON.stringify([e,`delivery`,t,n])}var EH=`bot-lobby.prompt-sound-muted`,DH=new Set,OH,kH=!1;function AH(){try{return localStorage.getItem(EH)===`on`}catch{return kH}}function jH(e){kH=e;try{localStorage.setItem(EH,e?`on`:`off`)}catch{}for(let e of DH)e()}function MH(e){return DH.add(e),()=>{DH.delete(e)}}function NH(){return(0,m.useSyncExternalStore)(MH,AH,()=>!1)}function PH(){(0,m.useEffect)(()=>{let e=()=>{try{OH??=new AudioContext,OH.resume().catch(()=>void 0)}catch{}};return window.addEventListener(`pointerdown`,e),window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`pointerdown`,e),window.removeEventListener(`keydown`,e)}},[])}function FH(){if(!AH()&&OH&&OH.state===`running`)try{let e=OH.currentTime,t=OH.createOscillator(),n=OH.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(OH.destination),t.start(e),t.stop(e+.24),t.onended=()=>{t.disconnect(),n.disconnect()}}catch{}}var IH=`bot-lobby.notifications`,LH=`/icon-192.png`,RH=new Set;function zH(){for(let e of[...RH])e()}function BH(){try{return localStorage.getItem(IH)===`on`}catch{return!1}}function VH(e){return RH.add(e),()=>{RH.delete(e)}}function HH(e){try{localStorage.setItem(IH,e?`on`:`off`)}catch{}zH()}function UH(){return(0,m.useSyncExternalStore)(VH,BH,()=>!1)}async function WH(){return typeof Notification>`u`?`unsupported`:(Notification.permission==="default"&&await Notification.requestPermission().catch(()=>void 0),Notification.permission===`granted`?(HH(!0),`granted`):`denied`)}function GH(){HH(!1)}function KH(e){if(e===`completed`)return`finished`;if(e===`abandoned`)return`dropped`}function qH(){return typeof Notification<`u`&&Notification.permission===`granted`&&document.hidden}function JH(e){try{new Notification(`bot-lobby`,{body:e,icon:LH,tag:`bot-lobby`})}catch{}}function YH(){try{return new SH(sessionStorage)}catch{return new SH}}function XH(e,t){let n=t.payload;return t.kind===`sessionDialog`&&n?.dialog?.id?wH(e,t.sessionId??n.key??t.from,n.dialog.id):CH(e,t.id)}function ZH(){let e=UH();PH(),gE();let t=bE(`tasks.list`,{},[`tasks`]),n=bE(`sessions.list`,{},[`sessions`]),r=wd.get(`prompts`),i=wd.get(`lobby`).data,a=(0,m.useRef)(YH()),o=(0,m.useRef)(new Set([`prompts`,`sessions`,`delivery`])),s=(0,m.useRef)(void 0),c=Rd()??`current`,l=wd.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 QH(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(()=>FH()),c&&qH()&&JH(r),t===`delivery`&&Nd.info(r,{action:{label:`Review tasks`,onClick:()=>iE(`#/tasks`)}}))}function $H(e){let{prompts:t,sessions:n,tasks:r,project:i}=e,a=t.data?.prompts;QH(e,`prompts`,(a??[]).map(e=>XH(i,e)),`A question is waiting for you.`,!!a&&!t.loading),QH(e,`sessions`,n.data?.background.flatMap(e=>e.dialogs.map(t=>wH(i,e.sessionId??e.key,t.id)))??[],`A background session is asking something.`,!!n.data&&!n.loading),QH(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=>TH(i,e.id,e.delivery.reviewId))??[],`Completed work is ready for delivery review in Tasks.`,!!r.data&&!r.loading)}function eU(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}$H(e);let s=a?.task?.state??``,c=KH(s);i.current&&c&&s!==i.current&&o&&qH()&&JH(`${a?.task?.title??`The task`} ${c}.`),i.current=s}function tU(){let e=ZH(),{connection:t,enabled:n,project:r,prompts:i,sessions:a,tasks:o,lobby:s}=e;(0,m.useEffect)(()=>eU(e),[t,n,r,i.data,i.loading,a.data,a.loading,o.data,o.loading,s])}function nU({className:e,type:t,...n}){return(0,L.jsx)(`input`,{type:t,"data-slot":`input`,className:q(`flex h-8 w-full rounded-lg border border-input bg-background px-3 py-1 text-base 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/30 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80`,e),...n})}function rU({className:e,thumbClassName:t,...n}){return(0,L.jsx)(zw,{"aria-keyshortcuts":`Enter Space`,"aria-description":`When focused, press Enter or Space to toggle.`,"data-slot":`switch`,className:q(`peer relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors duration-150 outline-none before:absolute before:-inset-x-2 before:-inset-y-3 before:content-[''] focus-visible:ring-3 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,e),...n,children:(0,L.jsx)(Vw,{"data-slot":`switch-thumb`,className:q(`pointer-events-none block size-4 rounded-full bg-white shadow-sm ring-0 transition-transform duration-200 ease-snap data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`,t)})})}var iU=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],aU={repeat:1/0},oU=`M0 -4 L1 -1 L4 0 L1 1 L0 4 L-1 1 L-4 0 L-1 -1Z`,sU=[`var(--rainbow-1)`,`var(--rainbow-2)`,`var(--rainbow-3)`,`var(--rainbow-4)`,`var(--rainbow-5)`,`var(--rainbow-6)`,`var(--rainbow-7)`],cU={transformBox:`fill-box`,transformOrigin:`center`};function lU(e){switch(e){case`off`:return{animate:{scale:[1,1.03,1],rotate:-5},transition:{...aU,duration:4,ease:`easeInOut`}};case`minimal`:return{animate:{rotate:[0,0,7,9,0,0],y:[0,0,1.5,2,0,0]},transition:{...aU,duration:4.2,times:[0,.35,.7,.82,.86,1],ease:`easeInOut`}};case`low`:return{animate:{rotate:[-4,4,-4],y:[0,-1,0]},transition:{...aU,duration:3.2,ease:`easeInOut`}};case`medium`:return{animate:{rotate:[0,-5,-5,5,5,0],y:[0,-1,-1,-1,-1,0]},transition:{...aU,duration:4,times:[0,.12,.4,.52,.8,1],ease:`easeInOut`}};case`high`:return{animate:{y:[0,-1.5,0]},transition:{...aU,duration:.6,ease:`easeInOut`}};case`xhigh`:return{animate:{y:[0,-7,0,0],scaleY:[1,1.06,.88,1],scaleX:[1,.96,1.1,1]},transition:{...aU,duration:.7,times:[0,.4,.75,1],ease:`easeInOut`}};case`max`:return{animate:{y:[-1,-4,-1],rotate:[-3,3,-3]},transition:{...aU,duration:1.6,ease:`easeInOut`}}}}function uU(){return(0,L.jsx)(`g`,{className:`fill-muted-foreground`,fontWeight:`700`,children:[0,1,2].map(e=>(0,L.jsx)(B.text,{x:44+e*4.5,y:17-e*5.5,fontSize:5.5+e*2,initial:{opacity:0},animate:{opacity:[0,1,0],y:[3,-4],x:[0,2.5]},transition:{...aU,duration:2.6,delay:e*.8,ease:`easeOut`},children:`z`},e))})}function dU(){return(0,L.jsx)(`g`,{className:`fill-primary`,fontSize:`9`,children:[0,1].map(e=>(0,L.jsx)(B.text,{x:48,y:20,initial:{opacity:0},animate:{opacity:[0,1,1,0],y:[2,-5,-11,-17],x:[0,3,1,5],rotate:[0,12,-8,10]},transition:{...aU,duration:3,delay:e*1.5,ease:`easeOut`},style:cU,children:e?`♫`:`♪`},e))})}function fU(){return(0,L.jsx)(B.text,{x:52,y:14,fontSize:`12`,fontWeight:`700`,className:`fill-primary`,initial:{opacity:0,scale:0},animate:{opacity:[0,0,1,1,0],scale:[0,0,1.2,1,.6],rotate:[0,0,-12,8,0]},transition:{...aU,duration:4,times:[0,.5,.58,.85,1]},style:cU,children:`?`})}function pU({spots:e,rainbow:t}){return(0,L.jsx)(`g`,{children:e.map(([e,n,r],i)=>(0,L.jsx)(B.path,{d:oU,className:t?void 0:`fill-primary`,style:{x:e,y:n,...t?{fill:sU[i%sU.length]}:{}},initial:{scale:0},animate:{scale:[0,1.1,0],rotate:[0,90,180]},transition:{...aU,duration:1.3,delay:r,ease:`easeInOut`}},i))})}function mU(){return(0,L.jsx)(`g`,{children:[-20,20].map((e,t)=>(0,L.jsxs)(`g`,{transform:`rotate(${e} 32 34)`,children:[(0,L.jsx)(`ellipse`,{cx:32,cy:34,rx:30,ry:9,fill:`none`,strokeWidth:.8,strokeDasharray:`2 3`,className:`stroke-primary/35`}),(0,L.jsx)(B.circle,{r:2,className:`fill-primary`,animate:{cx:[2,32,62,32,2],cy:[34,43,34,25,34]},transition:{...aU,duration:1.1,delay:t*.55,ease:`linear`}})]},e))})}function hU(){return(0,L.jsx)(B.path,{d:`M53 22 Q56 27 53 29 Q50 27 53 22Z`,className:`fill-primary/60`,animate:{y:[0,8],opacity:[0,1,0]},transition:{...aU,duration:.9,ease:`easeIn`,repeatDelay:.5}})}function gU({id:e}){return(0,L.jsx)(B.circle,{cx:32,cy:34,r:27,fill:`url(#${e}-glow)`,animate:{scale:[.92,1.08,.92],opacity:[.5,.85,.5]},transition:{...aU,duration:1.6,ease:`easeInOut`},style:{transformOrigin:`32px 34px`}})}function _U({rainbow:e}){return(0,L.jsx)(`g`,{children:Array.from({length:8},(t,n)=>{let r=n/8*Math.PI*2;return(0,L.jsx)(B.circle,{cx:32,cy:34,r:2,className:e?void 0:`fill-primary`,style:e?{fill:sU[n%sU.length]}:void 0,initial:{opacity:1,scale:1},animate:{cx:32+Math.cos(r)*32,cy:34+Math.sin(r)*30,opacity:0,scale:.3},transition:{duration:.6,ease:`easeOut`}},n)})})}function vU({level:e,move:t}){let n={fill:`none`,strokeWidth:2.2,strokeLinecap:`round`,className:`stroke-foreground`};if(e===`off`)return(0,L.jsx)(`path`,{d:`M20 33 Q24.5 36.5 29 33 M35 33 Q39.5 36.5 44 33`,...n});if(e===`low`)return(0,L.jsx)(`path`,{d:`M20 34 Q24.5 29.5 29 34 M35 34 Q39.5 29.5 44 34`,...n});if(e===`max`)return(0,L.jsx)(`g`,{children:[25,39].map((e,n)=>(0,L.jsx)(B.path,{d:`M0 -5.5 L1.6 -1.6 L5.5 0 L1.6 1.6 L0 5.5 L-1.6 1.6 L-5.5 0 L-1.6 -1.6Z`,style:{x:e,y:33,fill:sU[n?4:0]},animate:t?{rotate:[0,90,180],scale:[1,1.25,1]}:{},transition:{...aU,duration:1.2,ease:`easeInOut`,delay:n*.2}},e))});let r=e===`minimal`?.45:e===`high`?.7:e===`xhigh`?1.2:1,i=t&&e===`medium`?{x:[0,-2.5,-2.5,2.5,2.5,0]}:{x:0},a=t&&e===`medium`?{...aU,duration:4,times:[0,.12,.4,.52,.8,1]}:{duration:.2},o=e===`minimal`?3.2:e===`xhigh`?1.4:3.6,s=t?{scaleY:[r,r,.1,r,r]}:{scaleY:r},c=t?{...aU,duration:o,times:[0,.44,.5,.56,1]}:{duration:.2};return(0,L.jsx)(B.g,{animate:i,transition:a,children:[25,39].map(t=>(0,L.jsxs)(`g`,{children:[(0,L.jsx)(B.ellipse,{cx:t,cy:33,rx:3.4,ry:3.8,className:`fill-foreground`,style:cU,animate:s,transition:c}),e===`minimal`?null:(0,L.jsx)(`circle`,{cx:t+1.2,cy:31.6,r:1,className:`fill-card`})]},t))})}function yU({level:e,move:t}){let n={fill:`none`,strokeWidth:2,strokeLinecap:`round`,className:`stroke-foreground`};switch(e){case`off`:return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`circle`,{cx:32,cy:42,r:1.4,className:`fill-foreground`}),t?(0,L.jsx)(B.circle,{cx:35,cy:42,r:3,fill:`none`,strokeWidth:.9,className:`stroke-primary/60`,animate:{scale:[.2,1.3,1.5,0],opacity:[.6,.9,.9,0]},transition:{...aU,duration:4,times:[0,.7,.9,1]},style:{transformOrigin:`33px 42px`}}):null]});case`minimal`:return(0,L.jsx)(B.ellipse,{cx:32,cy:42,rx:3,ry:.8,className:`fill-foreground`,animate:t?{ry:[.8,.8,3.6,3.6,.8],rx:[3,3,3.6,3.6,3]}:{},transition:{...aU,duration:6,times:[0,.6,.7,.85,1]}});case`low`:return(0,L.jsx)(`path`,{d:`M26 40 Q32 45 38 40`,...n});case`medium`:return(0,L.jsx)(`path`,{d:`M28 41.5 Q32 43 36 41.5`,...n});case`high`:return(0,L.jsx)(`path`,{d:`M27 42 L37 41`,...n});case`xhigh`:return(0,L.jsx)(`path`,{d:`M25.5 39.5 Q32 47 38.5 39.5Z`,className:`fill-foreground`});case`max`:return(0,L.jsxs)(`g`,{children:[(0,L.jsx)(`path`,{d:`M24 38.5 Q32 50 40 38.5Z`,className:`fill-foreground`}),(0,L.jsx)(`path`,{d:`M28.5 44.5 Q32 47.5 35.5 44.5 Q32 43 28.5 44.5Z`,style:{fill:`var(--rainbow-1)`}})]})}}function bU({level:e,className:t}){let n=pd()??!1,r=iU.includes(e)?e:`medium`,i=`m${(0,m.useId)().replace(/[^a-zA-Z0-9]/g,``)}`,a=!n,o=iU.indexOf(r),s=(0,m.useRef)(o),[c,l]=(0,m.useState)({n:0,up:!0});(0,m.useEffect)(()=>{o!==s.current&&(l(e=>({n:e.n+1,up:o>s.current})),s.current=o)},[o]);let u=lU(r),d=r===`max`,f=d?{stroke:`url(#${i}-rainbow)`}:void 0,p=!a||c.n===0?void 0:c.up?{y:[0,-9,0,0],scaleX:[1,.9,1.1,1],scaleY:[1,1.12,.9,1]}:{y:[0,0,0],scaleX:[1,1.12,1],scaleY:[1,.84,1]};return(0,L.jsxs)(`svg`,{viewBox:`0 0 64 64`,"data-slot":`effort-mascot`,"data-level":r,"aria-hidden":`true`,focusable:`false`,className:q(`size-14 shrink-0 overflow-visible`,t),children:[(0,L.jsxs)(`defs`,{children:[(0,L.jsxs)(`linearGradient`,{id:`${i}-rainbow`,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[sU.map((e,t)=>(0,L.jsx)(`stop`,{offset:t/(sU.length-1),stopColor:e},t)),a&&d?(0,L.jsx)(`animateTransform`,{attributeName:`gradientTransform`,type:`rotate`,from:`0 0.5 0.5`,to:`360 0.5 0.5`,dur:`2.4s`,repeatCount:`indefinite`}):null]}),(0,L.jsxs)(`radialGradient`,{id:`${i}-glow`,children:[(0,L.jsx)(`stop`,{offset:`0.35`,stopColor:`var(--rainbow-6)`,stopOpacity:`0.45`}),(0,L.jsx)(`stop`,{offset:`0.7`,stopColor:`var(--rainbow-1)`,stopOpacity:`0.18`}),(0,L.jsx)(`stop`,{offset:`1`,stopColor:`var(--rainbow-3)`,stopOpacity:`0`})]})]}),d?a?(0,L.jsx)(gU,{id:i}):(0,L.jsx)(`circle`,{cx:32,cy:34,r:27,fill:`url(#${i}-glow)`}):null,a&&r===`xhigh`?(0,L.jsx)(mU,{}):null,(0,L.jsx)(B.g,{animate:p,transition:{duration:c.up?.55:.45,ease:`easeOut`},style:{transformOrigin:`32px 56px`},children:(0,L.jsxs)(B.g,{animate:a?u.animate:{rotate:r===`off`?-5:0},transition:a?u.transition:{duration:0},style:{transformOrigin:`32px 56px`},children:[(0,L.jsxs)(B.g,{style:{transformOrigin:`32px 17px`},animate:r===`off`?{rotate:32}:r===`minimal`?{rotate:14}:a&&r===`medium`?{rotate:[0,-12,10,0]}:a&&(r===`xhigh`||r===`max`)?{rotate:[-10,10,-10]}:{rotate:0},transition:a&&(r===`medium`||r===`xhigh`||r===`max`)?{...aU,duration:r===`medium`?2:.5,ease:`easeInOut`}:{type:`spring`,stiffness:200,damping:14},children:[(0,L.jsx)(`path`,{d:`M32 17 V10`,strokeWidth:2,strokeLinecap:`round`,className:d?void 0:`stroke-primary/70`,style:f}),(0,L.jsx)(B.circle,{cx:32,cy:7.5,r:3.2,className:d?void 0:r===`off`?`fill-muted-foreground/40`:`fill-primary`,style:{...cU,...d?{fill:`url(#${i}-rainbow)`}:{}},animate:a?r===`high`?{opacity:[1,.3,1]}:r===`medium`?{scale:[1,1.25,1]}:d||r===`xhigh`?{scale:[1,1.5,1]}:{scale:1,opacity:1}:{scale:1,opacity:1},transition:{...aU,duration:r===`high`?.5:r===`medium`?1.6:.4}})]}),[4.5,54].map((e,t)=>(0,L.jsx)(B.rect,{x:e,y:29,width:5.5,height:11,rx:2.5,className:d?void 0:`fill-primary/25`,style:{...cU,...d?{fill:sU[t?5:1],opacity:.6}:{}},animate:a&&(r===`xhigh`||d)?{rotate:t?[0,18,0]:[0,-18,0]}:{rotate:0},transition:{...aU,duration:.35}},e)),(0,L.jsx)(`rect`,{x:10,y:17,width:44,height:36,rx:11,strokeWidth:d?2.6:2,className:d?`fill-primary/10`:`fill-primary/10 stroke-primary/75`,style:f}),(0,L.jsx)(`rect`,{x:15,y:23,width:34,height:25,rx:7.5,className:`fill-card stroke-border`,strokeWidth:1}),a&&r===`high`?(0,L.jsx)(B.rect,{y:24,width:2,height:23,rx:1,className:`fill-primary/25`,animate:{x:[16,46,16]},transition:{...aU,duration:1.6,ease:`easeInOut`}}):null,r===`low`||d?(0,L.jsxs)(`g`,{className:`fill-destructive/25`,children:[(0,L.jsx)(`ellipse`,{cx:19.5,cy:39.5,rx:2.6,ry:1.6}),(0,L.jsx)(`ellipse`,{cx:44.5,cy:39.5,rx:2.6,ry:1.6})]}):null,(0,L.jsx)(vU,{level:r,move:a}),r===`high`||r===`xhigh`?(0,L.jsx)(`path`,{d:`M20 27 L28.5 28.8 M44 27 L35.5 28.8`,strokeWidth:1.9,strokeLinecap:`round`,className:`stroke-foreground`}):null,(0,L.jsx)(yU,{level:r,move:a}),(0,L.jsx)(`rect`,{x:20,y:53,width:24,height:4,rx:2,className:d?void 0:`fill-primary/25`,style:d?{fill:`url(#${i}-rainbow)`}:void 0})]})},c.n),r===`off`?a?(0,L.jsx)(uU,{}):(0,L.jsx)(`text`,{x:48,y:14,fontSize:`9`,fontWeight:`700`,className:`fill-muted-foreground`,children:`z`}):null,a&&r===`minimal`?(0,L.jsx)(uU,{}):null,a&&r===`low`?(0,L.jsx)(dU,{}):null,a&&r===`medium`?(0,L.jsx)(fU,{}):null,a&&r===`high`?(0,L.jsx)(pU,{spots:[[6,14,0],[58,12,.6]]}):null,a&&r===`xhigh`?(0,L.jsx)(hU,{}):null,d?a?(0,L.jsx)(pU,{rainbow:!0,spots:[[5,12,0],[59,10,.2],[2,44,.45],[62,46,.65],[32,-2,.85],[14,60,1.05],[50,60,.3]]}):(0,L.jsx)(`g`,{children:[[5,12],[59,10],[32,-2]].map(([e,t],n)=>(0,L.jsx)(`path`,{d:oU,style:{x:e,y:t,fill:sU[n*2]}},n))}):null,a&&c.n>0&&c.up?(0,L.jsx)(_U,{rainbow:d},`burst-${c.n}`):null]})}var xU={minimal:`min`,medium:`med`},SU={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 CU(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 wU(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}function TU({value:e,levels:t,supported:n,model:r,label:i,disabled:a,onChange:o}){let s=(0,m.useRef)(null),[c,l]=(0,m.useState)(),[u,d]=(0,m.useState)(),f=(0,m.useRef)(void 0),p=(0,m.useRef)(0),h=(0,m.useCallback)(()=>{f.current=void 0,p.current=0,d(void 0)},[]),g=Math.max(t.length-1,1),_=CU(t,n,Math.max(0,t.indexOf(e))),v=c??u??_,y=v<0?0:v/g*100,b=t[v]??e,x=v>=0&&b!==e;(0,m.useEffect)(()=>{if(u===void 0)return;let e=window.setTimeout(h,1e4);return()=>window.clearTimeout(e)},[u,h]);let S=(0,m.useCallback)(e=>{let r=s.current?.getBoundingClientRect();if(!r||r.width===0)return _;let i=Math.min(1,Math.max(0,(e-r.left)/r.width));return CU(t,n,Math.round(i*g))},[g,t,_,n]);function C(e){a||n.length===0||(e.currentTarget.setPointerCapture(e.pointerId),l(S(e.clientX)))}function w(e){if(c===void 0)return;let t=S(e.clientX);t!==c&&l(t)}function T(){if(c===void 0)return;let n=t[c];l(void 0),n&&n!==e&&o(n)}function E(e){if(a||v<0)return;let r=f.current??v,i={ArrowRight:wU(t,n,r,1),ArrowUp:wU(t,n,r,1),ArrowLeft:wU(t,n,r,-1),ArrowDown:wU(t,n,r,-1),Home:CU(t,n,0),End:CU(t,n,g)}[e.key];if(i===void 0)return;e.preventDefault();let s=t[i];s&&i!==r&&(f.current=i,d(i),p.current+=1,Promise.resolve(o(s)).catch(()=>void 0).then(()=>{--p.current,p.current<=0&&h()}))}return(0,L.jsxs)(`div`,{className:q(`flex flex-col gap-1`,a&&`opacity-60`),children:[(0,L.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,L.jsx)(`span`,{"data-level":b,className:`effort-word text-[0.8125rem] font-medium capitalize`,"aria-hidden":`true`,children:b}),(0,L.jsx)(`span`,{className:`min-w-0 truncate text-xs text-muted-foreground`,children:SU[b]??``})]}),(0,L.jsxs)(`div`,{ref:s,role:`slider`,tabIndex:a?-1:0,"aria-label":i,"aria-valuemin":0,"aria-valuemax":t.length-1,"aria-valuenow":Math.max(v,0),"aria-valuetext":b,"aria-disabled":a||void 0,onPointerDown:C,onPointerMove:w,onPointerUp:T,onPointerCancel:()=>l(void 0),onKeyDown:E,className:`relative mx-2.5 h-6 touch-none cursor-pointer rounded-full outline-none select-none focus-visible:ring-3 focus-visible:ring-ring/40`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-x-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-muted`}),(0,L.jsx)(B.span,{"aria-hidden":`true`,className:`absolute top-1/2 left-0 h-1.5 -translate-y-1/2 rounded-full bg-primary`,animate:{width:`${y}%`},transition:{type:`spring`,stiffness:520,damping:34}}),t.map((e,t)=>{let i=n.includes(e);return(0,L.jsx)(`span`,{"aria-hidden":`true`,title:i?e:`${r??`This model`} does not support ${e}`,className:q(`absolute top-1/2 size-1 -translate-x-1/2 -translate-y-1/2 rounded-full`,i?t<=v?`bg-primary-foreground/80`:`bg-muted-foreground/40`:`bg-transparent ring-1 ring-muted-foreground/30`),style:{left:`${t/g*100}%`}},e)}),(0,L.jsx)(B.span,{"aria-hidden":`true`,className:q(`absolute top-1/2 size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-primary bg-white shadow-sm`,c!==void 0&&`scale-110`),animate:{left:`${y}%`},transition:{type:`spring`,stiffness:520,damping:28}})]}),(0,L.jsx)(`div`,{className:`relative mx-2.5 h-3.5 text-[0.68rem] text-muted-foreground`,"aria-hidden":`true`,children:t.map((e,t)=>{let i=n.includes(e);return(0,L.jsx)(`span`,{title:i?void 0:`${r??`This model`} does not support ${e}`,className:q(`absolute -translate-x-1/2 whitespace-nowrap`,t===v&&`font-medium text-foreground`,!i&&`opacity-40`),style:{left:`${t/g*100}%`},children:xU[e]??e},e)})}),x?(0,L.jsxs)(`p`,{className:`text-xs text-warning`,children:[e,` is not supported by `,r??`this model`,`, so it runs at `,b,`.`]}):null]})}function EU(e,t){let n=`${e.label} ${e.hint??``} ${e.value}`.toLowerCase();return t.toLowerCase().split(/\s+/).filter(Boolean).every(e=>n.includes(e))}function DU({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=>EU(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,L.jsxs)(Tw,{open:o,onOpenChange:s,children:[(0,L.jsxs)(Ew,{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:q(`flex h-8 w-full min-w-0 items-center justify-between gap-2 overflow-hidden rounded-lg border border-input bg-background px-2.5 text-[0.8125rem] whitespace-nowrap outline-none transition-[border-color,box-shadow] duration-150 hover:bg-accent/40 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50`,i),children:[(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:g?.label??e}),(0,L.jsx)(Of,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground`})]}),(0,L.jsx)(Dw,{children:(0,L.jsxs)(Ow,{align:`start`,sideOffset:4,collisionPadding:8,onOpenAutoFocus:e=>{e.preventDefault(),e.currentTarget.querySelector(`input`)?.focus()},className:`glass-pop z-50 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-95 data-closed:animate-out data-closed:fade-out-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-2.5`,children:[(0,L.jsx)(xm,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,L.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-[0.8125rem] outline-none placeholder:text-muted-foreground`})]}),(0,L.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,L.jsxs)(`p`,{className:`px-2.5 py-2 text-xs text-muted-foreground`,children:[`Nothing matches “`,c,`”.`]}):null,h.map((t,n)=>(0,L.jsxs)(`div`,{id:`${p}-${n}`,role:`option`,"aria-selected":t.value===e,"data-index":n,onPointerMove:()=>d(n),onClick:()=>_(t),className:q(`flex cursor-default items-center gap-2 rounded-lg px-2.5 py-1.5 text-[0.8125rem] select-none`,n===u&&`bg-accent`),children:[(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,L.jsx)(`span`,{className:`truncate`,children:t.label}),t.hint?(0,L.jsx)(`span`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:t.hint}):null]}),t.value===e?(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},t.value))]})]})})]})}function OU({label:e,help:t,children:n,stacked:r}){return(0,L.jsxs)(`div`,{className:r?`grid gap-1.5`:`grid gap-1.5 sm:grid-cols-[minmax(0,1fr)_minmax(0,18rem)] sm:items-center sm:gap-6`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`div`,{className:`text-[0.8125rem] font-medium`,children:e}),t?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,L.jsx)(`div`,{className:`min-w-0`,children:n})]})}function kU({children:e}){return(0,L.jsx)(`div`,{className:`flex flex-col divide-y divide-border rounded-xl border border-border px-4 [&>*]:py-3`,children:e})}function AU({value:e,items:t,label:n,onChange:r}){return(0,L.jsx)(DU,{value:e,options:t.map(e=>({value:e.value,label:e.label,...e.help?{hint:e.help}:{}})),label:n,onChange:r})}var jU=`(prefers-color-scheme: dark)`,MU=[`dark`,`light`,`system`],NU=m.createContext(void 0);function PU(e){return e!==null&&MU.includes(e)}function FU(){return window.matchMedia(jU).matches?`dark`:`light`}function IU(){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 LU(e){return e instanceof HTMLElement&&!!(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable='true']`))}function RU({children:e,defaultTheme:t=`system`,storageKey:n=`theme`,disableTransitionOnChange:r=!0,...i}){let[a,o]=m.useState(()=>{let e=localStorage.getItem(n);return PU(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`?FU():e,i=r?IU():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(jU),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||LU(e.target)||e.key.toLowerCase()===`d`&&o(e=>{let t=e===`dark`?`light`:e===`light`?`dark`:FU()===`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(PU(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,L.jsx)(NU.Provider,{...i,value:l,children:e})}var zU=()=>{let e=m.useContext(NU);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e},BU=[`master`,`designer`,`backend`,`qa`,`scout`,`researcher`,`quickfix`,`planner`],VU={master:`Master`,designer:`Designer`,backend:`Backend`,qa:`QA`,scout:`Scout`,researcher:`Researcher`,quickfix:`Quick fix`,planner:`Planner`},HU={model:`Model`,thinking:`Effort`,timeout:`Time limit`,instructions:`Instructions`},UU=`inherit`,WU=`inherit`,GU=`Use the session's current model`,KU=`__custom__`,qU=`custom…`,JU=`Type a provider/model id`,YU=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],XU={agents:`Agents`,workflow:`Workflow`,lobby:`Lobby`,classifier:`Classifier`,appearance:`Appearance`,notifications:`Notifications`,install:`Install as app`},ZU=[{id:`issues`,label:`Issues tab`,help:`the GitHub Issues tab`}],QU=[{id:`conversation`,label:`Conversation pane`},{id:`activity`,label:`Activity log pane`},{id:`thinking`,label:`Thinking bubble`}],$U=`shown on the Lobby tab`,eW=`Planning rounds`,tW=`how many rounds the panel gets before the oracle settles the rest alone`,nW=[2,3,5,8,0],rW=`Split long plans`,iW=`saving a plan with more steps offers to split it into up to 5 tasks`,aW=[6,8,10,12,0],oW=`Port`,sW=`the base port (then the next free up to +20); 0 means any free port; applies the next time pi starts`,cW=`Open browser`,lW=`open this page in the browser when pi starts`,uW=[{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`}],dW=`Git isolation`,fW=[{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`}],pW=[{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:`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, Jev picks the sections that bear on the step, and the agent is told where the rest is`},{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`}],mW={enabled:`Classifier`,enabledHelp:`Jev makes the obvious decisions so large models spend fewer tokens on them`,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`},hW={title:`Settings`,intro:`Each agent's model and effort, 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`},gW=`https://tweakcn.com/editor/theme`;function _W(){let{theme:e}=zU();return e===`dark`||e===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}function vW({palette:e,dark:t}){let n=ue(e,t);return(0,L.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,L.jsx)(`span`,{className:`size-4 rounded-full border border-black/10`,style:{background:n.card}}),(0,L.jsx)(`span`,{className:`size-4 rounded-full`,style:{background:n.primary}}),(0,L.jsx)(`span`,{className:`h-2 flex-1 rounded-full`,style:{background:n.accent}})]})}function yW(){let e=ye(),t=_W(),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,L.jsx)(`div`,{ref:n,role:`radiogroup`,"aria-label":`Colour theme`,onKeyDown:r,className:`grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4`,children:e.all.map(n=>{let r=n.id===e.active.id;return(0,L.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:q(`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-3 focus-visible:ring-ring/40`,r?`border-primary bg-accent shadow-[0_0_0_1px_var(--primary)]`:`border-border hover:bg-accent/50`),children:[(0,L.jsx)(vW,{palette:n,dark:t}),(0,L.jsxs)(`span`,{className:`flex items-center justify-between gap-2 px-0.5 text-[0.8125rem] font-medium`,children:[(0,L.jsxs)(`span`,{className:`truncate`,children:[n.name,n.id===`custom`?(0,L.jsx)(`span`,{className:`ml-1.5 text-xs font-normal text-muted-foreground`,children:`imported`}):null]}),r?(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]})]},n.id)})})}function bW(){let e=ye(),[t,n]=(0,m.useState)(``),[r,i]=(0,m.useState)(),a=(0,m.useRef)(null);function o(t,r){let a=ne(t);if(`error`in a){i(a.error);return}i(void 0);let o=e.adopt(a,r);n(``);let s=a.light?a.dark?void 0:`dark`:`light`;Nd.success(s?`${o.name} applied. It has no ${s} colours, so ${s} mode keeps the default ones.`:`${o.name} applied.`)}async function s(e){if(e){if(e.size>2e5){i(`That file is too large to be a theme.`);return}o(await e.text(),e.name.replace(/\.[^.]+$/,``)||`Custom theme`)}}return(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Pick or build a theme in the`,` `,(0,L.jsxs)(`a`,{href:gW,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-0.5 text-link underline-offset-2 hover:underline`,children:[`tweakcn editor `,(0,L.jsx)(tp,{"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,L.jsx)(aD,{value:t,onChange:e=>{n(e.target.value),i(void 0)},rows:4,spellCheck:!1,"aria-label":`Theme CSS from tweakcn`,"aria-invalid":r?!0:void 0,placeholder:`:root {
|
|
89
|
+
--background: oklch(0.98 0 0);
|
|
90
|
+
--primary: oklch(0.55 0.2 260);
|
|
91
|
+
…
|
|
92
|
+
}
|
|
93
|
+
.dark { … }`,className:`max-h-56 font-mono text-xs md:text-xs`}),(0,L.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,L.jsx)(`input`,{ref:a,type:`file`,accept:`.css,.json,text/css,application/json`,hidden:!0,tabIndex:-1,"aria-label":`Upload a theme file`,onChange:e=>{s(e.target.files?.[0]),e.target.value=``}}),(0,L.jsx)(Y,{label:`Apply the pasted theme`,text:`Apply`,icon:Ef,tone:`primary`,disabled:!t.trim(),onClick:()=>o(t,`Custom theme`)}),(0,L.jsx)(Y,{label:`Upload a .css or .json theme file`,text:`Upload file`,icon:Um,onClick:()=>a.current?.click()}),e.custom?(0,L.jsx)(xD,{label:`Remove ${e.custom.name}`,text:`Remove`,title:`Remove the imported theme?`,description:`The imported theme is stored in this browser. Keep a copy if you want to use it again.`,confirmLabel:`Remove theme`,icon:Lm,variant:`destructive`,onConfirm:()=>e.removeCustom()}):null,r?(0,L.jsx)(`p`,{role:`alert`,className:`ml-2 min-w-0 text-xs text-destructive`,children:r}):null]})]})}function xW(){let{theme:e,setTheme:t}=zU(),n=NH();return(0,L.jsx)(AL,{prominent:!0,title:XU.appearance,children:(0,L.jsxs)(kU,{children:[(0,L.jsx)(OU,{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,L.jsx)(rU,{checked:!n,onCheckedChange:e=>jH(!e),"aria-label":`Prompt sounds`})}),(0,L.jsx)(OU,{label:hW.themeLabel,help:hW.appearanceHelp,children:(0,L.jsx)(AU,{value:e,items:hW.themeItems.map(e=>({value:e.id,label:e.label})),label:hW.themeLabel,onChange:e=>t(e)})}),(0,L.jsx)(OU,{label:`Colour theme`,help:`The page's colours. Kept in this browser only.`,stacked:!0,children:(0,L.jsx)(yW,{})}),(0,L.jsx)(OU,{label:`Import a theme`,stacked:!0,children:(0,L.jsx)(bW,{})})]})})}var SW={master:[`master`],designer:[`agents`,`designer`],backend:[`agents`,`backend`],qa:[`agents`,`qa`],scout:[`scout`],researcher:[`researcher`],quickfix:[`quickFix`],planner:[`planner`]},CW=[...ZU,...QU.map(e=>({id:`panel:${e.id}`,label:e.label,help:$U}))];function wW(e,t){switch(t){case`master`:return e.master;case`scout`:return{model:e.scout.model,thinking:`low`,timeoutMs:e.scout.timeoutMs};case`researcher`:return e.researcher;case`quickfix`:return e.quickFix;case`planner`:return e.planner;default:return e.agents[t]}}function TW(e,t){return SW[e].reduceRight((e,t)=>({[t]:e}),t)}function EW(e,t){return e.find(e=>e.id===t)?.thinkingLevels??YU}function DW(e,t){return YU[CU(YU,e,Math.max(0,YU.indexOf(t)))]??t}var OW=e=>e>0?`${e} round${e===1?``:`s`}`:`unlimited`,kW=e=>e>0?`over ${e} steps`:`never`;function AW({label:e,children:t}){return(0,L.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),t]})}function jW(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:UU,label:WU,help:GU}]:[],...e.none?[{value:UU,label:`none`,help:`Use the primary model`}]:[],...!e.inherit&&!e.none&&e.value===`inherit`?[{value:UU,label:WU,help:GU}]:[],...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:JU}]:[],{value:KU,label:qU,help:JU}],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,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(AU,{value:e.value,items:o,label:e.label,onChange:s}),t?(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(nU,{autoFocus:!0,value:r,placeholder:`provider/model`,"aria-label":`Model id`,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),(0,L.jsx)(Y,{label:`Use this model`,icon:Ef,tone:`primary`,onClick:c})]}):null]})}function MW({label:e,help:t,checked:n,onChange:r}){return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`div`,{className:`text-[0.8125rem] font-medium`,children:e}),t?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t}):null]}),(0,L.jsx)(rU,{checked:n,onCheckedChange:r,"aria-label":e})]})}function NW({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,L.jsx)(nU,{value:i,placeholder:n,"aria-label":r,onChange:e=>a(e.target.value),onBlur:o,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())}})}function PW({value:e,label:t,onSave:n}){let r=Math.round(e/6e4);return(0,L.jsx)(IW,{label:t,value:String(r),min:1,suffix:`min`,onSave:e=>{let t=Number(e);return!Number.isFinite(t)||t<=0?(Nd.error(`"${e}" is not a positive number of minutes.`),!1):(n(Math.round(t*6e4)),!0)}})}function FW({value:e,onSave:t}){return(0,L.jsx)(IW,{label:oW,value:String(e),min:0,max:65535,onSave:e=>!/^\d+$/.test(e)||Number(e)>65535?(Nd.error(`"${e}" is not a port (0, or 1-65535).`),!1):(t(Number(e)),!0)})}function IW({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,L.jsxs)(`div`,{className:`relative`,children:[(0,L.jsx)(nU,{type:`number`,inputMode:`numeric`,min:n,max:r,value:o,"aria-label":e,className:i?`pr-10`:void 0,onChange:e=>s(e.target.value),onBlur:c,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),c())}}),i?(0,L.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 LW({value:e,label:t,onSave:n}){let[r,i]=(0,m.useState)(e);return(0,m.useEffect)(()=>i(e),[e]),(0,L.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsx)(aD,{rows:2,value:r,"aria-label":t,onChange:e=>i(e.target.value),onBlur:()=>{r.trim()!==e&&n(r.trim())}}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Saved when you leave the field.`})]})}function RW({kind:e,config:t,models:n,save:r}){let i=wW(t,e),a=t=>r(TW(e,t)),o=VU[e],s=EW(n,i.model),c=t=>{let r={model:t};e!==`scout`&&!EW(n,t).includes(i.thinking)&&(r.thinking=DW(EW(n,t),i.thinking)),a(r)},l=e===`scout`?`low`:DW(s,i.thinking),u=e!==`scout`&&e!==`researcher`,[d,f]=(0,m.useState)(!!i.instructions);return(0,L.jsxs)(`section`,{className:`glass flex min-w-0 flex-col gap-3 rounded-xl p-4`,children:[(0,L.jsxs)(`header`,{className:`flex items-baseline justify-between gap-3`,children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold`,children:o}),(0,L.jsxs)(`span`,{className:`truncate text-xs text-muted-foreground`,children:[i.model===`inherit`?`session model`:i.model,` · `,e===`scout`?`low`:i.thinking]})]}),(0,L.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-1`,children:(0,L.jsx)(AW,{label:HU.model,children:(0,L.jsx)(jW,{value:i.model,models:n,label:`${o} model`,inherit:e===`master`,onChange:c})})}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg bg-muted p-3`,children:[(0,L.jsx)(bU,{level:l,className:`size-16`}),(0,L.jsx)(`div`,{className:`min-w-0 flex-1`,children:e===`scout`?(0,L.jsxs)(`div`,{className:`grid gap-1`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:HU.thinking}),(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`low`,` (fixed for scouts)`]})]}):(0,L.jsx)(TU,{value:i.thinking,levels:YU,supported:s,model:i.model===`inherit`?`the session model`:i.model,label:`${o} effort`,onChange:e=>a({thinking:e})})})]}),(0,L.jsxs)(`div`,{className:`flex min-h-7 items-center justify-between gap-3`,children:[u?(0,L.jsxs)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,"aria-expanded":d,onClick:()=>f(e=>!e),className:`flex min-h-10 items-center gap-1 text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/30`,children:[(0,L.jsx)(Af,{"aria-hidden":`true`,className:q(`size-3.5 transition-transform duration-200 ease-snap`,d&&`rotate-90`)}),HU.instructions,!d&&i.instructions?(0,L.jsx)(`span`,{className:`text-primary`,children:`· set`}):null]}):(0,L.jsx)(`span`,{}),e===`master`?null:(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Time limit`}),(0,L.jsx)(`div`,{className:`w-24`,children:(0,L.jsx)(PW,{value:i.timeoutMs??t.workflow.agentTimeoutMs,label:`${o} time limit`,onSave:e=>a({timeoutMs:e})})})]})]}),u&&d?(0,L.jsx)(LW,{value:i.instructions??``,label:`${o} instructions`,onSave:e=>a({instructions:e})}):null]})}function zW(e,t){return t.startsWith(`panel:`)?e.lobby.panels[t.slice(6)]:e.lobby[t]}function BW({config:e,item:t,save:n}){let r=t.id.startsWith(`panel:`);return(0,L.jsx)(MW,{label:t.label,help:t.help,checked:zW(e,t.id),onChange:e=>{n(r?{lobby:{panels:{[t.id.slice(6)]:e}}}:{lobby:{[t.id]:e}})}})}function VW({config:e,save:t}){let n=e.workflow.gitIsolation;return(0,L.jsx)(AL,{prominent:!0,title:XU.workflow,children:(0,L.jsx)(kU,{children:(0,L.jsx)(OU,{label:dW,help:uW.find(e=>e.id===n)?.help??`enter cycles off, branch, worktree`,children:(0,L.jsx)(AU,{value:n,items:uW.map(e=>({value:e.id,label:e.label})),label:dW,onChange:e=>void t({workflow:{gitIsolation:e}})})})})})}function HW({config:e,save:t}){let n=e.lobby.web;return(0,L.jsx)(AL,{prominent:!0,title:XU.lobby,children:(0,L.jsxs)(kU,{children:[CW.map(n=>(0,L.jsx)(BW,{config:e,item:n,save:t},n.id)),(0,L.jsx)(OU,{label:eW,help:tW,children:(0,L.jsx)(AU,{value:String(e.lobby.maxPlanningRounds),items:nW.map(e=>({value:String(e),label:OW(e)})),label:eW,onChange:e=>void t({lobby:{maxPlanningRounds:Number(e)}})})}),(0,L.jsx)(OU,{label:rW,help:iW,children:(0,L.jsx)(AU,{value:String(e.lobby.splitPlanAbove),items:aW.map(e=>({value:String(e),label:kW(e)})),label:rW,onChange:e=>void t({lobby:{splitPlanAbove:Number(e)}})})}),(0,L.jsx)(OU,{label:oW,help:sW,children:(0,L.jsx)(FW,{value:n.port,onSave:e=>void t({lobby:{web:{port:e}}})})}),(0,L.jsx)(MW,{label:cW,help:lW,checked:n.openBrowser,onChange:e=>void t({lobby:{web:{openBrowser:e}}})})]})})}function UW({config:e,models:t,save:n}){let r=e.classifier,i=fW.find(e=>e.id===r.provider)?.label;return(0,L.jsx)(AL,{prominent:!0,title:XU.classifier,children:(0,L.jsxs)(kU,{children:[(0,L.jsx)(MW,{label:mW.enabled,help:mW.enabledHelp,checked:r.enabled,onChange:e=>void n({classifier:{enabled:e}})}),(0,L.jsx)(OU,{label:mW.host,children:(0,L.jsx)(AU,{value:r.provider,items:fW.map(e=>({value:e.id,label:e.label})),label:mW.host,onChange:e=>void n({classifier:{provider:e}})})}),(0,L.jsx)(OU,{label:mW.model,help:mW.modelHelp,children:(0,L.jsx)(NW,{value:r.model,label:mW.model,placeholder:`the host's default`,onSave:e=>void n({classifier:{model:e}})})}),(0,L.jsx)(OU,{label:mW.key,help:mW.keyNote,children:(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground sm:text-right`,children:i??r.provider})}),pW.map(e=>(0,L.jsx)(MW,{label:e.label,help:e.help,checked:r.features[e.id],onChange:t=>void n({classifier:{features:{[e.id]:t}}})},e.id)),(0,L.jsx)(OU,{label:mW.cheap,help:mW.cheapHelp,children:(0,L.jsx)(jW,{value:r.effort.cheapModel,models:t,label:mW.cheap,none:!0,onChange:e=>void n({classifier:{effort:{cheapModel:e}}})})})]})})}function WW(){let e=UH(),t=async e=>{if(!e)return GH();let t=await WH();t===`granted`?Nd.success(hW.notificationsOn):Nd.error(t===`unsupported`?hW.notificationsUnsupported:hW.notificationsBlocked)};return(0,L.jsx)(AL,{prominent:!0,title:XU.notifications,children:(0,L.jsx)(kU,{children:(0,L.jsx)(MW,{label:hW.notificationsLabel,help:hW.notificationsHelp,checked:e,onChange:e=>void t(e)})})})}function GW(){let{available:e,install:t}=y(),n=b(),r=x();return(0,L.jsx)(AL,{prominent:!0,title:XU.install,children:(0,L.jsxs)(kU,{children:[(0,L.jsx)(OU,{label:hW.installLabel,help:n?hW.installedNow:hW.installHelp,children:n?null:(0,L.jsx)(`div`,{className:`flex sm:justify-end`,children:(0,L.jsx)(Y,{label:hW.installButton,icon:$f,tone:`primary`,onClick:()=>e?void t().then(()=>Nd.success(hW.installDone)):Nd.warning(hW.installUnavailable)})})}),r.supported?(0,L.jsx)(OU,{label:hW.fullscreenLabel,help:hW.fullscreenHelp,children:(0,L.jsx)(`div`,{className:`flex sm:justify-end`,children:(0,L.jsx)(Y,{label:r.on?hW.fullscreenOn:hW.fullscreenOff,icon:r.on?Lp:kp,pressed:r.on,onClick:()=>void r.toggle()})})}):null]})})}var KW=[`Agents`,`Workflow`,`Lobby`,`Classifier`,`Appearance & notifications`];function qW({config:e,models:t,onConfig:n}){let[r,i]=(0,m.useState)(`Agents`),a=(0,m.useRef)(Promise.resolve()),o=e=>{let t=async()=>{try{return n((await Ud(`settings.set`,{patch:e})).config),Nd.success(hW.saved),!0}catch(e){return Nd.error(e instanceof Error?e.message:`That did not work. Try again.`),!1}},r=a.current.then(t,t);return a.current=r,r};return(0,L.jsxs)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-6 px-5 pt-5 pb-dock sm:px-8 sm:pt-8`,children:[(0,L.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:hW.title}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:hW.intro})]}),(0,L.jsx)(`nav`,{"aria-label":`Settings sections`,className:`-mx-1 flex flex-wrap gap-1 border-b border-border pb-3`,children:KW.map(e=>(0,L.jsx)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-current":r===e?`page`:void 0,"aria-controls":`settings-${e.split(` `)[0]}`,onClick:()=>i(e),className:q(`h-10 rounded-lg px-3 text-sm font-medium outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/40`,r===e?`bg-accent text-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),children:e},e))}),(0,L.jsx)(`div`,{id:`settings-Agents`,hidden:r!==`Agents`,"aria-hidden":r!==`Agents`,children:(0,L.jsx)(AL,{prominent:!0,title:XU.agents,children:(0,L.jsx)(`div`,{className:`grid grid-cols-1 gap-4 xl:grid-cols-2`,children:BU.map(n=>(0,L.jsx)(RW,{kind:n,config:e,models:t,save:o},n))})})}),(0,L.jsx)(`div`,{id:`settings-Workflow`,hidden:r!==`Workflow`,"aria-hidden":r!==`Workflow`,children:(0,L.jsx)(VW,{config:e,save:o})}),(0,L.jsx)(`div`,{id:`settings-Lobby`,hidden:r!==`Lobby`,"aria-hidden":r!==`Lobby`,children:(0,L.jsx)(HW,{config:e,save:o})}),(0,L.jsx)(`div`,{id:`settings-Classifier`,hidden:r!==`Classifier`,"aria-hidden":r!==`Classifier`,children:(0,L.jsx)(UW,{config:e,models:t,save:o})}),(0,L.jsx)(`div`,{id:`settings-Appearance`,hidden:r!==`Appearance & notifications`,"aria-hidden":r!==`Appearance & notifications`,children:(0,L.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,L.jsx)(xW,{}),(0,L.jsx)(WW,{}),(0,L.jsx)(GW,{})]})})]})}function JW(){return(0,L.jsx)(`div`,{className:`mx-auto flex w-full max-w-5xl flex-col gap-4 px-5 pt-5 pb-dock sm:px-8 sm:pt-8`,role:`status`,"aria-label":hW.loading,children:[0,1,2,3].map(e=>(0,L.jsx)(`div`,{className:`h-48 rounded-lg bg-muted motion-safe:animate-pulse`},e))})}function YW(){let e=bE(`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,L.jsx)(mE,{message:`${hW.loadFailed} ${e.error}`,onRetry:e.reload}):t?(0,L.jsx)(qW,{config:t,models:e.data?.models??[],onConfig:i}):(0,L.jsx)(JW,{})}function XW(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 ZW({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,L.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,onKeyDown:e=>XW(e,()=>void d(),()=>{o||r()}),children:[(0,L.jsxs)(`label`,{className:`text-sm`,children:[`Edit message`,(0,L.jsx)(aD,{ref:u,value:i,onChange:e=>a(e.target.value),disabled:o,className:`mt-2 max-h-[40vh] min-h-24`})]}),c?(0,L.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Could not save. `,c]}):null,(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(J,{size:`sm`,onClick:()=>void d(),disabled:t||o||!i.trim(),children:o?`Saving…`:`Save`}),(0,L.jsx)(J,{size:`sm`,variant:`ghost`,disabled:o,onClick:r,children:`Cancel`})]})]})}function QW({questions:e}){return(0,L.jsx)(`ol`,{className:`flex flex-col gap-3`,children:e.map((e,t)=>(0,L.jsxs)(`li`,{className:`flex flex-col gap-1 text-sm`,children:[(0,L.jsxs)(`p`,{children:[(0,L.jsxs)(`span`,{className:`tabular-nums text-muted-foreground`,children:[String(t+1).padStart(2,`0`),`. `]}),(0,L.jsx)(`span`,{className:q(`font-medium`,DB(e.from)),children:EB(e.from)}),` `,e.text]}),(0,L.jsx)(`ul`,{className:`flex flex-col gap-0.5 pl-6 text-muted-foreground`,children:e.options.map(e=>(0,L.jsxs)(`li`,{className:`flex gap-2`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`mt-2 size-1.5 shrink-0 rounded-full border border-muted-foreground/60`}),(0,L.jsxs)(`span`,{children:[e.label,e.description?` — ${e.description}`:``]})]},e.label))})]},t))})}function $W({message:e}){return(0,L.jsx)(L.Fragment,{children:(e.decided??[]).map((e,t)=>(0,L.jsxs)(`p`,{className:`text-sm`,children:[(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`mr-1 inline size-3.5 text-success`}),(0,L.jsx)(`span`,{className:q(`font-medium`,DB(e.from)),children:EB(e.from)}),` `,e.question,` → `,(0,L.jsx)(`strong`,{children:e.answer}),` `,(0,L.jsxs)(`span`,{className:`text-muted-foreground`,children:[`· decided by the classifier (`,e.probability.toFixed(2),`); comment on the plan to overrule`]})]},t))})}function eG({message:e,index:t,busy:n}){let[r,i]=(0,m.useState)(!1),[a,o]=(0,m.useState)(),s=a&&(a.editedAt??0)>(e.editedAt??0)?a:e,c=n||s!==e;return(0,L.jsxs)(`div`,{className:`flex flex-col items-end gap-1`,children:[(0,L.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[e.at>0?sD(e.at):``,` You`,s.editedAt?` (edited)`:``]}),(0,L.jsx)(`div`,{className:`max-w-[85%] rounded-xl rounded-tr-sm border border-primary/10 bg-you px-3.5 py-2`,children:r?(0,L.jsx)(ZW,{text:s.text,disabled:n,onSave:async n=>{let r=await Ud(`planner.editMessage`,{messageIndex:t,at:e.at,text:n});o(r.message)},onCancel:()=>i(!1)}):(0,L.jsx)(DL,{text:s.text})}),!e.settled?.length&&!r?(0,L.jsx)(J,{size:`sm`,variant:`ghost`,disabled:c,onClick:()=>i(!0),children:`Edit`}):null]})}function tG({message:e,index:t,busy:n}){let r=e.at>0?sD(e.at):``;if(e.role===`you`)return(0,L.jsx)(eG,{message:e,index:t,busy:n});let i=e.questions??[];return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:`Panel`}),` `,r]}),i.length>0?(0,L.jsx)(QW,{questions:i}):(0,L.jsx)(DL,{text:e.text}),(0,L.jsx)($W,{message:e})]})}function nG({messages:e,seed:t,busy:n=!1}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-5`,role:`log`,"aria-label":`Panel conversation`,children:[t?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t}):null,e.map((e,t)=>(0,L.jsx)(tG,{message:e,index:t,busy:n},`${e.at}-${t}`))]})}var rG=`ORACLE`,iG=`No draft yet.`,aG=`The draft appears after the panel's first round.`,oG=`What each seat needs`,sG=[`backend`,`designer`,`qa`,`researcher`],cG={backend:`DEV`,designer:`DESIGN`,qa:`QA`,researcher:`RESEARCH`};function lG(e){return`Describe a task below and the panel questions you until the plan is clear${e>0?` (at most ${e} rounds; the last one the oracle settles alone)`:``}.`}function uG(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 dG(e,t){return`${e} ${t}${e===1?``:`s`}`}function fG(e){return e.round===0&&e.messages.length===0&&!e.busy}function pG(e){let t=e.members.find(e=>e.status===`failed`);if(t)return(t.error??`${cG[t.member]} failed`).split(`
|
|
94
|
+
`)[0]}function mG(e){let t=[],n=pG(e);return e.busy?t.push(uG(e.round,e.limit)):n?t.push(`${n} — Retry runs the round again`):e.questions.length>0&&t.push(`${dG(e.questions.length,`question`)} waiting`),!e.busy&&e.round>0&&t.push(uG(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 hG(e,t){let n=cG[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`:dG(o,`question`)}}function gG(e){let t=e.questions.filter(e=>e.from===rG).length;return[{label:rG,seated:!0,working:e.busy,text:e.busy?`chairing`:t?dG(t,`question`):`·`},...sG.map(t=>hG(t,e))]}function _G(e){let t=!1;return e.split(`
|
|
95
|
+
`).map(e=>{let n=e.trimStart().startsWith("```");return n&&(t=!t),{text:e,fenced:t||n}})}function vG({notes:e}){return(0,L.jsx)(L.Fragment,{children:e.map((e,t)=>(0,L.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))})}function yG({row:e,notes:t,onComment:n}){let r=e.text.trim(),i=()=>n(r);return(0,L.jsxs)(`li`,{className:`group/line`,children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-1`,children:[(0,L.jsx)(`span`,{className:`flex w-4 shrink-0 justify-center pt-3.5`,"aria-hidden":`true`,children:t.length>0?(0,L.jsx)(`span`,{className:`size-2 rounded-full bg-primary`}):null}),(0,L.jsx)(`div`,{className:q(`min-w-0 flex-1 cursor-pointer rounded-lg px-2 py-1.5 transition-colors hover:bg-muted`,e.fenced&&`font-mono text-sm whitespace-pre-wrap break-words`),onClick:e=>!e.target.closest(`a`)&&i(),children:e.fenced?e.text:(0,L.jsx)(DL,{text:e.text})}),(0,L.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,className:`shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/line:opacity-100 focus-visible:opacity-100 [@media(hover:none)]:opacity-100`,"aria-label":`Comment on this line: ${r}`,onClick:i,children:(0,L.jsx)(Np,{"aria-hidden":`true`})})]}),(0,L.jsx)(vG,{notes:t})]})}function bG({draft:e,comments:t,onComment:n}){return(0,L.jsx)(`ul`,{className:`flex flex-col`,"aria-label":`Draft plan lines`,children:_G(e).map((e,r)=>e.text.trim()?(0,L.jsx)(yG,{row:e,notes:t.get(e.text.trim())??[],onComment:n},r):(0,L.jsx)(`li`,{"aria-hidden":`true`,className:`h-2`},r))})}function xG({notes:e}){return e.length===0?null:(0,L.jsx)(AL,{title:oG,children:(0,L.jsx)(`dl`,{className:`flex flex-col gap-2 text-sm`,children:e.map((e,t)=>(0,L.jsxs)(`div`,{className:`flex gap-3`,children:[(0,L.jsx)(`dt`,{className:q(`w-20 shrink-0 font-medium`,DB(e.from)),children:EB(e.from)}),(0,L.jsx)(`dd`,{className:`min-w-0 flex-1`,children:(0,L.jsx)(DL,{text:e.text})})]},t))})})}function SG({cell:e,intro:t}){let n=t?e.member?e.seated?`seated`:`not seated`:`chairs`:e.text;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:q(`font-medium`,e.seated?DB(e.label):`text-muted-foreground`),children:EB(e.label)}),e.working&&!t?(0,L.jsx)(fE,{className:`size-3.5`,"aria-hidden":`true`}):null,(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:n})]})}function CG({cell:e,intro:t,onToggled:n}){let{member:r}=e,i=`inline-flex min-h-8 items-center gap-2 rounded-lg border border-border px-3 text-[0.8125rem]`;if(!r)return(0,L.jsx)(`li`,{className:q(i,`bg-muted`),children:(0,L.jsx)(SG,{cell:e,intro:t})});let a=async()=>{await V(`planner.toggleSeat`,{member:r})&&n()};return(0,L.jsx)(`li`,{children:(0,L.jsxs)(`label`,{className:q(i,`cursor-pointer transition-colors`,e.seated?`bg-background hover:bg-accent`:`border-dashed text-muted-foreground hover:bg-muted`),children:[(0,L.jsx)(Dz,{checked:e.seated,onCheckedChange:()=>void a(),"aria-label":`${EB(e.label)} sits on the panel`}),(0,L.jsx)(SG,{cell:e,intro:t})]})})}function wG({cells:e,intro:t,onToggled:n}){return(0,L.jsx)(`ul`,{"aria-label":`Panel`,className:`flex flex-wrap gap-2`,children:e.map(e=>(0,L.jsx)(CG,{cell:e,intro:t,onToggled:n},e.label))})}function TG({snap:e}){let t=mG(e),n=!e.busy&&pG(e)!==void 0;return(0,L.jsxs)(`p`,{role:`status`,className:n?`flex items-center gap-2 text-sm text-destructive`:`flex items-center gap-2 text-sm text-muted-foreground`,children:[e.busy?(0,L.jsx)(fE,{className:`size-3.5`,"aria-hidden":`true`}):null,t.join(` · `)]})}function EG({snap:e,onDone:t}){let n=vE(`status`).data?.keys.find(e=>e.action===`savePlan`)?.label,r=e=>async()=>{await V(e,{})&&t()};return(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[e.questions.length>0&&!e.busy?(0,L.jsx)(Y,{label:`Answer questions`,icon:jp,tone:`primary`,shortcut:`A`,onClick:()=>void r(`planner.answer`)()}):null,e.retryable?(0,L.jsx)(Y,{label:`Retry`,icon:hm,shortcut:`R`,onClick:()=>void r(`planner.retry`)()}):null,(0,L.jsx)(Y,{"data-plan-save":!0,label:`Save the plan`,text:`Save`,icon:ym,shortcut:n??`Ctrl+S`,disabled:!e.draft||e.busy,onClick:()=>void r(`planner.save`)()}),(0,L.jsx)(xD,{icon:sp,label:`New plan`,shortcut:`N`,title:`Start a new plan?`,description:`The conversation and the draft are left behind. Saved plans are not touched.`,confirmLabel:`New plan`,onConfirm:()=>void V(`planner.new`,{}).then(t)})]})}function DG({snap:e,onDone:t}){return(0,L.jsxs)(`header`,{className:`flex shrink-0 flex-col gap-3 border-b border-border px-5 py-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight`,children:`Planning`}),(0,L.jsx)(TG,{snap:e})]}),(0,L.jsx)(EG,{snap:e,onDone:t})]}),(0,L.jsx)(wG,{cells:gG(e),intro:!1,onToggled:t})]})}function OG({line:e,onClose:t,onSent:n}){let r=YT(e!==void 0,JT.confirm);return(0,L.jsx)(VT,{open:e!==void 0&&r,onOpenChange:e=>!e&&t(),label:`Comment on this line`,className:`max-w-xl`,children:(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 p-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-base font-medium`,children:`Comment on this line`}),(0,L.jsx)(`p`,{className:`mt-1 line-clamp-3 text-sm break-words text-muted-foreground`,children:e})]}),(0,L.jsx)(DR,{label:`Your comment`,hint:`Enter adds the comment · Esc cancels`,buttonLabel:`Add comment`,onSend:async r=>e===void 0||!await V(`planner.commentLine`,{line:e,text:r.trim()})?!1:(n(e,r.trim()),t(),!0)})]})})}function kG({snap:e,onDone:t}){return(0,L.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col gap-5 p-6 sm:p-10`,children:[(0,L.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:`Plan`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:lG(e.limit)}),(0,L.jsx)(wG,{cells:gG(e),intro:!0,onToggled:t})]})}function AG({snap:e,wide:t}){let{ref:n,onScroll:r}=wB(JSON.stringify(e.messages));return(0,L.jsxs)(eD,{className:`flex flex-col`,children:[(0,L.jsx)(`h2`,{className:`flex min-h-12 shrink-0 items-center border-b border-border px-4 text-sm font-medium`,children:(0,L.jsx)(kL,{title:`Conversation`,className:`w-full`})}),(0,L.jsx)(`div`,{ref:n,onScroll:r,className:q(`min-h-0 overflow-y-auto`,t?`flex-1 px-5 pt-5 pb-dock`:`max-h-[45svh] p-5`),children:(0,L.jsx)(nG,{messages:e.messages,busy:e.busy})})]})}function jG({snap:e,comments:t,onComment:n,wide:r}){return(0,L.jsxs)(eD,{className:`flex flex-col`,children:[(0,L.jsx)(`h2`,{className:`flex min-h-12 shrink-0 items-center border-b border-border px-4 text-sm font-medium`,children:(0,L.jsx)(kL,{title:`Draft plan`,className:`w-full`})}),(0,L.jsxs)(`div`,{className:q(`flex min-h-0 flex-col gap-5 overflow-y-auto px-5 pt-5 pb-dock`,r&&`flex-1`),children:[e.draft?(0,L.jsx)(bG,{draft:e.draft,comments:t,onComment:n}):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.busy?aG:iG}),(0,L.jsx)(xG,{notes:e.notes})]})]})}function MG({snap:e,reload:t}){let n=$E(),[r,i]=(0,m.useState)(),[a,o]=(0,m.useState)(new Map);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(DG,{snap:e,onDone:t}),(0,L.jsxs)(`div`,{className:n?`grid min-h-0 flex-1 grid-cols-[minmax(0,46fr)_minmax(0,54fr)] grid-rows-[minmax(0,1fr)] divide-x divide-border`:`flex flex-col divide-y divide-border`,children:[(0,L.jsx)(AG,{snap:e,wide:n}),(0,L.jsx)(jG,{snap:e,comments:a,onComment:i,wide:n})]}),(0,L.jsx)(OG,{line:r,onClose:()=>i(void 0),onSent:(e,t)=>o(n=>new Map(n).set(e,[...n.get(e)??[],t]))})]})}function NG(){let e=bE(`planner.get`,{},[`planner`]),t=e.data;if(!t&&e.error)return(0,L.jsx)(mE,{message:`Could not load the plan. ${e.error}`,onRetry:e.reload});if(!t)return(0,L.jsx)(`p`,{role:`status`,className:`p-5 text-sm text-muted-foreground`,children:`Loading the plan…`});let n=fG(t);return(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:n?(0,L.jsx)(kG,{snap:t,onDone:e.reload}):(0,L.jsx)(MG,{snap:t,reload:e.reload})})}var PG=`Describe a small change in the box below and one agent makes it now, beside any running task.`;function FG(e){return e.prompt.split(`
|
|
96
|
+
`).find(e=>e.trim())?.trim()??`(empty)`}function IG(e){return[...e].reverse()}function LG(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 RG(e,t){return e.startedAt?LG((e.finishedAt??t)-e.startedAt):``}function zG(e,t){let n=e.model?`${e.model}${e.thinking?` · ${e.thinking}`:``}`:e.thinking??``;return[RG(e,t),n,e.tools?`${e.tools} tool${e.tools===1?``:`s`}`:``,e.usage?.cost?`$${e.usage.cost.toFixed(2)}`:``].filter(Boolean).join(` · `)}function BG(e){return e===`queued`?`Waiting for the quick fix ahead of it.`:e===`running`?`starting…`:e===`held`?`Not started.`:`No tool calls.`}function VG({job:e}){let t=e.status===`held`;return(0,L.jsxs)(L.Fragment,{children:[e.route?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Routed `,e.route]}):null,e.note&&t?(0,L.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,L.jsx)(zm,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,L.jsxs)(`span`,{children:[`Held: `,e.note,`.`]})]}):null,e.note&&!t?(0,L.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,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Routed here by the oracle.`}):null]})}function HG({job:e}){let t=e.status===`running`;return e.steps.length===0?(0,L.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[t?(0,L.jsx)(fE,{className:`size-3.5`}):null,BG(e.status)]}):(0,L.jsx)(`ol`,{className:`flex flex-col gap-1 text-sm`,children:e.steps.map((e,n)=>(0,L.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:sD(e.at)}),(0,L.jsx)(`span`,{className:`flex h-5 w-3.5 shrink-0 items-center justify-center`,"aria-hidden":`true`,children:e.pending&&t?(0,L.jsx)(fE,{className:`size-3.5`}):(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-muted-foreground/40`})}),(0,L.jsx)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:e.pending&&t?`${e.text}…`:e.text})]},n))})}function UG({job:e}){return e.status===`held`?(0,L.jsxs)(WE,{children:[(0,L.jsx)(Y,{label:`Run anyway`,icon:sm,tone:`primary`,shortcut:`R`,onClick:()=>void V(`quickfix.runAnyway`,{id:e.id})}),(0,L.jsx)(Y,{label:`Turn it into a task`,text:`Make it a task`,icon:Tp,shortcut:`T`,onClick:()=>void V(`quickfix.movedToTask`,{id:e.id})})]}):e.status!==`queued`&&e.status!==`running`?null:(0,L.jsx)(WE,{children:(0,L.jsx)(xD,{icon:Wf,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 V(`quickfix.cancel`,{id:e.id})})})}function WG({job:e,now:t}){return(0,L.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":`Quick fix detail`,children:[(0,L.jsx)(UG,{job:e}),(0,L.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold tracking-tight break-words`,children:FG(e)}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:e.status}),zG(e,t)?(0,L.jsx)(`span`,{children:zG(e,t)}):null]}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),e.prompt.trim().includes(`
|
|
97
|
+
`)?(0,L.jsx)(DL,{text:e.prompt}):null,(0,L.jsx)(VG,{job:e}),(0,L.jsx)(AL,{title:`Steps`,children:(0,L.jsx)(HG,{job:e})}),e.files?.length?(0,L.jsx)(AL,{title:`Edited`,children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.files.map(e=>(0,L.jsxs)(`li`,{className:`break-all`,children:[`· `,e]},e))})}):null,e.error?(0,L.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,L.jsx)(AL,{title:`Report`,children:(0,L.jsx)(DL,{text:e.report})}):null]})}function GG({status:e}){if(e===`running`)return(0,L.jsx)(fE,{className:`size-3.5`,"aria-label":`running`});let t={queued:Xf,success:Ef,failed:Zm,timeout:Zm,cancelled:zp,held:Zp,running:Xf}[e];return(0,L.jsxs)(L.Fragment,{children:[(0,L.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,L.jsx)(`span`,{className:`sr-only`,children:e})]})}function KG({job:e,selected:t,now:n,onSelect:r}){let i=RG(e,n);return(0,L.jsx)(`li`,{children:(0,L.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:q(hR,`flex-row items-start gap-2.5 text-sm`),children:[(0,L.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:(0,L.jsx)(GG,{status:e.status})}),(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words`,t?`font-medium text-foreground`:`text-foreground`),children:FG(e)}),i?(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:i}):null]})})}function qG({jobs:e,selectedId:t,now:n,onSelect:r}){return(0,L.jsx)(`ul`,{className:gR,children:e.map(e=>(0,L.jsx)(KG,{job:e,selected:e.id===t,now:n,onSelect:r},e.id))})}var JG=()=>iE(rE(`quickfix`)),YG=e=>iE(rE(`quickfix`,e));function XG(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 ZG(){return(0,L.jsx)(oE,{className:`m-4 flex-1`,children:(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)($m,{"aria-hidden":`true`})}),(0,L.jsx)(dE,{className:`font-medium text-foreground`,children:PG})]})})}function QG({id:e}){let t=$E(),n=bE(`quickfix.list`,{},[`quickfix`]),r=IG(n.data?.jobs??[]),i=XG(r.some(e=>e.status===`running`));if(!n.data&&n.error)return(0,L.jsx)(mE,{message:`Could not load quick fixes. ${n.error}`,onRetry:n.reload});let a=n.data&&r.length===0?(0,L.jsx)(ZG,{}):(0,L.jsx)($G,{id:e,wide:t,loaded:!!n.data,jobs:r,now:i});return(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:a})}function $G({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,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:`Quick fixes`,count:String(r.length)}),n?(0,L.jsx)(qG,{jobs:r,selectedId:a,now:i,onSelect:YG}):(0,L.jsx)(iD,{})]});return(0,L.jsx)(nD,{wide:t,list:s,detail:o?(0,L.jsx)(WG,{job:o,now:i}):e?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That quick fix is not on the list any more.`}):null,open:!!e,onClose:JG,hint:`Select a quick fix to see its steps.`,describe:`Quick fix detail`})}var eK={},tK=new Set;function nK(e){eK=e;for(let e of[...tK])e()}function rK(e){eK.taskId!==e&&nK({...eK,taskId:e})}function iK(e){(eK.session?.name!==e?.name||JSON.stringify(eK.session?.address)!==JSON.stringify(e?.address))&&nK({...eK,session:e})}function aK(e){return tK.add(e),()=>{tK.delete(e)}}function oK(){return(0,m.useSyncExternalStore)(aK,()=>eK,()=>eK)}function sK({entry:e}){let t=e.at?sD(e.at):``;return e.role===`note`?(0,L.jsxs)(`li`,{className:`text-center text-xs text-muted-foreground`,children:[e.text,t?` · ${t}`:``]}):e.role===`you`?(0,L.jsxs)(`li`,{className:`flex flex-col items-end gap-1`,children:[(0,L.jsxs)(`span`,{className:`flex items-baseline gap-2 text-xs text-muted-foreground`,children:[t,` `,(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:`You`})]}),(0,L.jsx)(`div`,{className:`max-w-[85%] rounded-xl rounded-tr-sm border border-primary/10 bg-you px-3.5 py-2`,children:(0,L.jsx)(DL,{text:e.text})})]}):(0,L.jsxs)(`li`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`size-2 rounded-full bg-primary`}),(0,L.jsx)(`span`,{className:`font-medium text-foreground`,children:`Oracle`}),` `,t]}),(0,L.jsx)(`div`,{className:`max-w-[90%] pl-4`,children:(0,L.jsx)(DL,{text:e.text})})]})}function cK({entries:e,more:t,loading:n,onMore:r,empty:i}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t?(0,L.jsx)(`div`,{className:`flex self-center`,children:(0,L.jsx)(Y,{label:`Load earlier messages`,icon:Pf,disabled:n,onClick:r??(()=>void 0)})}):null,e.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i}):(0,L.jsx)(`ol`,{"aria-label":`Conversation`,className:`flex flex-col gap-4`,children:e.map(e=>(0,L.jsx)(sK,{entry:e},e.id))})]})}function lK({address:e,empty:t}){let n=bE(`sessions.chat`,e,[`sessions`]),[r,i]=(0,m.useState)(),[a,o]=(0,m.useState)(!1),s=n.data?.entries??[],c=new Set(s.map(e=>e.id)),l=[...(r?.entries??[]).filter(e=>!c.has(e.id)),...s],u=async()=>{let t=l[0];if(!t)return;o(!0);let n=await V(`sessions.chat`,{...e,before:t.id});n&&i({entries:[...n.entries,...r?.entries??[]],more:n.hasOlder}),o(!1)},d=r?.more??n.data?.hasOlder??!1;return(0,L.jsx)(cK,{entries:l,more:d,loading:a,onMore:()=>void u(),empty:n.loading&&!n.data?`Loading the conversation…`:t})}var uK={"this window":`This window`,background:`Background`,"other terminal":`Other terminals`},dK=[`this window`,`background`,`other terminal`],fK=`Nothing said yet.`,pK=`This session runs in another terminal: its conversation shows here and your messages reach its oracle within seconds, but live activity only streams from sessions started in this window.`,mK=`No other sessions. Start one below.`;function hK(e,t,n){let r=t?.task;return{id:`here`,where:`this window`,name:e?.sessionName??r?.title??`unnamed session`,status:e?.busy?`working`:r?.state??`no task`,waiting:n,alive:!0,dialogs:[],...r?{task:r}:{}}}function gK(e){let t=e.status===`exited`?`ended`:e.status===`starting`?`starting`:e.busy?`working`:`idle`;return{id:e.key,where:`background`,name:e.name,status:t,waiting:e.dialogs.length,key:e.key,alive:e.alive,dialogs:e.dialogs,...e.sessionId?{sessionId:e.sessionId}:{}}}function _K(e){return{id:e.sessionId,where:`other terminal`,name:e.name??`unnamed session`,status:`running`,waiting:0,pid:e.pid,sessionId:e.sessionId,alive:!0,dialogs:[]}}function vK(e,t,n,r,i){let a=new Set([e?.sessionId,...r.map(e=>e.sessionId)].filter(e=>!!e)),o=i.filter(e=>!a.has(e.sessionId));return[hK(e,t,n),...r.map(gK),...o.map(_K)]}function yK(e){return`${e} question${e===1?``:`s`} waiting for you`}function bK(e){return e.status===`starting`?`starting ${e.name}…`:e.alive?`${e.name} has not said anything yet.`:`${e.name} has ended.`}function xK(e){return[e.where,e.status.replace(/_/g,` `),e.pid?`pid ${e.pid}`:``].filter(Boolean).join(` · `)}function SK(e){return e.key?{key:e.key}:e.sessionId?{sessionId:e.sessionId}:void 0}function CK({options:e,send:t}){return(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map(e=>(0,L.jsx)(J,{variant:`outline`,onClick:()=>void t({value:e}),children:e},e))})}function wK({dialog:e,send:t}){let n=(0,m.useId)(),[r,i]=(0,m.useState)(e.prefill??``);return(0,L.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,L.jsx)(`label`,{htmlFor:n,className:`sr-only`,children:e.title}),(0,L.jsx)(aD,{id:n,rows:e.method===`editor`?4:2,value:r,placeholder:e.placeholder,onChange:e=>i(e.target.value)}),(0,L.jsx)(`div`,{className:`flex self-end`,children:(0,L.jsx)(Y,{label:`Send the answer`,text:`Send`,icon:vf,tone:`primary`,disabled:!r.trim(),onClick:()=>void t({value:r.trim()})})})]})}function TK({dialog:e,send:t}){return e.method===`select`?(0,L.jsx)(CK,{options:e.options??[],send:t}):e.method===`confirm`?(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(J,{onClick:()=>void t({confirmed:!0}),children:`Yes`}),(0,L.jsx)(J,{variant:`outline`,onClick:()=>void t({confirmed:!1}),children:`No`})]}):(0,L.jsx)(wK,{dialog:e,send:t})}function EK({sessionKey:e,dialog:t,onAnswered:n}){let r=async r=>{await V(`sessions.answer`,{key:e,dialogId:t.id,answer:r})&&n()};return(0,L.jsxs)(`div`,{className:`flex flex-col gap-3 rounded-lg border border-border bg-background/60 p-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:t.title}),t.message?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t.message}):null]}),(0,L.jsx)(TK,{dialog:t,send:r}),(0,L.jsx)(`div`,{className:`flex self-start`,children:(0,L.jsx)(Y,{label:`Put it away`,text:`Put away`,icon:Zm,onClick:()=>void r({cancelled:!0})})})]})}function DK({sessionKey:e,dialogs:t,onAnswered:n}){return t.length===0?null:(0,L.jsxs)(`section`,{"aria-label":`Questions waiting`,className:`flex flex-col gap-2`,children:[(0,L.jsx)(`p`,{role:`status`,className:`text-sm font-medium text-foreground`,children:yK(t.length)}),t.map(t=>(0,L.jsx)(EK,{sessionKey:e,dialog:t,onAnswered:n},t.id))]})}var OK={"this window":Vp,background:xp,"other terminal":jm};function kK({where:e,className:t}){let n=OK[e];return(0,L.jsx)(n,{"aria-hidden":`true`,className:q(`size-4 shrink-0 text-muted-foreground`,t)})}function AK({task:e}){let t=e.progress;return(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-2 text-sm text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`break-all`,children:e.id}),t&&t.total>0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(tV,{done:t.done,total:t.total}),(0,L.jsxs)(`span`,{className:`tabular-nums`,children:[t.done,`/`,t.total]})]}):null]})}function jK({entry:e}){let{key:t}=e;return e.where===`this window`?(0,L.jsx)(WE,{children:(0,L.jsx)(Y,{label:`Back to this window`,text:`Back to the Lobby`,icon:mf,tone:`primary`,shortcut:`B`,onClick:()=>iE(`#/lobby`)})}):t?(0,L.jsxs)(WE,{children:[(0,L.jsx)(Y,{label:`Move here`,icon:gf,tone:`primary`,shortcut:`M`,onClick:()=>void V(`sessions.switch`,{key:t})}),(0,L.jsx)(xD,{icon:Wf,label:`Stop the session`,text:`Stop`,shortcut:`S`,title:`Stop ${e.name}?`,description:`Its process ends. The task keeps its state and can be resumed in this window.`,confirmLabel:`Stop session`,variant:`destructive`,disabled:!e.alive,onConfirm:()=>void V(`sessions.stop`,{key:t})})]}):null}function MK({entry:e,lobby:t}){let n=SK(e);return e.where===`this window`?(0,L.jsx)(cK,{entries:t?.chat??[],more:!1,empty:fK}):n?(0,L.jsx)(lK,{address:n,empty:e.where===`other terminal`?`Nothing said in this session yet.`:bK(e)},e.id):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:fK})}function NK({entry:e,lobby:t,onChanged:n}){return(0,L.jsxs)(`article`,{"aria-label":`Session detail`,className:`flex flex-col gap-4`,children:[(0,L.jsx)(jK,{entry:e}),(0,L.jsxs)(`header`,{className:`flex flex-col gap-1.5`,children:[(0,L.jsxs)(`h3`,{className:`flex items-center gap-2.5 text-lg font-semibold tracking-tight text-foreground`,children:[(0,L.jsx)(kK,{where:e.where,className:`size-[1.1rem]`}),e.name]}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:xK(e)}),e.task?(0,L.jsx)(AK,{task:e.task}):null,e.where!==`background`&&e.waiting>0?(0,L.jsx)(`p`,{className:`text-sm text-foreground`,children:yK(e.waiting)}):null]}),e.where===`other terminal`?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:pK}):null,e.key?(0,L.jsx)(DK,{sessionKey:e.key,dialogs:e.dialogs,onAnswered:n}):null,(0,L.jsx)(AL,{title:`Conversation`,children:(0,L.jsx)(MK,{entry:e,lobby:t})})]})}function PK({entry:e,selected:t,onSelect:n}){return(0,L.jsx)(`li`,{children:(0,L.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:q(hR,`flex-row items-start gap-2.5 text-sm`),children:[(0,L.jsx)(kK,{where:e.where,className:`mt-0.5`}),(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words text-foreground`,t&&`font-medium`),children:e.name}),(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[e.status===`working`||e.status===`starting`?(0,L.jsx)(fE,{className:`size-3`,"aria-hidden":`true`}):null,e.status.replace(/_/g,` `),e.waiting>0?(0,L.jsx)(`span`,{className:`rounded-md bg-warning/15 px-1.5 py-0.5 font-medium text-warning tabular-nums`,children:e.waiting}):null]})]})})}function FK({where:e,entries:t,selectedId:n,onSelect:r}){return(0,L.jsxs)(`section`,{"aria-label":uK[e],className:`flex flex-col`,children:[(0,L.jsx)(`h3`,{className:_R,children:(0,L.jsx)(kL,{title:uK[e],right:String(t.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,L.jsx)(`ul`,{className:gR,children:t.map(e=>(0,L.jsx)(PK,{entry:e,selected:e.id===n,onSelect:r},e.id))})]})}function IK({entries:e,selectedId:t,onSelect:n}){return(0,L.jsx)(`div`,{className:`flex flex-col pb-2`,children:dK.map(r=>{let i=e.filter(e=>e.where===r);return i.length>0?(0,L.jsx)(FK,{where:r,entries:i,selectedId:t,onSelect:n},r):null})})}var LK=()=>iE(`#/sessions`),RK=e=>iE(`#/sessions/${encodeURIComponent(e)}`);function zK({windows:e}){return e.length===0?null:(0,L.jsx)(`div`,{className:`px-4 pb-4 pt-2`,children:(0,L.jsx)(AL,{title:`Other windows`,children:(0,L.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>(0,L.jsx)(`li`,{children:(0,L.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-h-8 items-center rounded-lg px-2.5 text-sm text-foreground underline-offset-4 transition-colors hover:bg-muted hover:underline`,children:e.name})},e.url))})})})}function BK(){return(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That session is not on the list any more.`})}function VK({id:e}){let t=$E(),n=vE(`status`).data,r=vE(`lobby`).data,i=vE(`prompts`).data?.prompts.length??0,a=bE(`sessions.list`,{},[`sessions`]);if(!a.data&&a.error)return(0,L.jsx)(mE,{message:`Could not load sessions. ${a.error}`,onRetry:a.reload});let o=vK(n,r,i,a.data?.background??[],a.data?.live??[]),s=e??(t?o[0]?.id:void 0),c=o.find(e=>e.id===s),l=c&&c.where!==`this window`&&c.alive?SK(c):void 0,u=l?JSON.stringify(l):``,d=c?.name;(0,m.useEffect)(()=>(iK(l&&d?{name:d,address:l}:void 0),()=>iK(void 0)),[u,d]);let f=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:`Sessions`,count:String(o.length)}),a.data?(0,L.jsx)(IK,{entries:o,selectedId:s,onSelect:RK}):(0,L.jsx)(iD,{}),a.data&&o.length===1?(0,L.jsx)(`p`,{className:`px-4 pb-3 text-sm text-muted-foreground`,children:mK}):null,(0,L.jsx)(zK,{windows:n?.windows??[]})]}),p=c?(0,L.jsx)(NK,{entry:c,lobby:r,onChanged:a.reload},c.id):e?(0,L.jsx)(BK,{}):null;return(0,L.jsx)(nD,{wide:t,list:f,detail:p,open:!!e,onClose:LK,hint:`Select a session to see its conversation.`,describe:`Session detail`})}function HK(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 UK(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 WK({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,L.jsxs)(`span`,{className:`tabular-nums`,children:[e.waiting?`Waiting for you · `:``,e.phase.replaceAll(`_`,` `),` · `,UK(HK(e,n,t)),` execution`]})}function GK({timing:e,stopped:t=!1}){return e?(0,L.jsx)(WK,{timing:e,stopped:t},JSON.stringify(e)):(0,L.jsx)(`span`,{children:`Timing unavailable`})}var KK=`This directly merges the reviewed commit into main and pushes main. It does not create a pull request.`,qK={pending_approval:`Ready for your review`,deferred:`Saved for later`,in_progress:`Delivery in progress`,successful:`Delivered`,recoverable_failure:`Delivery needs attention`};function JK({delivery:e,title:t}){return(0,L.jsxs)(`div`,{className:`grid gap-2 text-sm`,children:[(0,L.jsx)(`p`,{className:`font-medium break-words`,children:t}),(0,L.jsxs)(`dl`,{className:`grid gap-1 break-all text-muted-foreground`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{className:`inline`,children:`Project: `}),(0,L.jsx)(`dd`,{className:`inline`,children:e.project})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{className:`inline`,children:`Repository: `}),(0,L.jsx)(`dd`,{className:`inline`,children:e.repository??`Unavailable — refresh review`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{className:`inline`,children:`Source: `}),(0,L.jsxs)(`dd`,{className:`inline`,children:[e.sourceBranch,` · `,e.sourceCommit??`Commit unavailable`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{className:`inline`,children:`Target: `}),(0,L.jsxs)(`dd`,{className:`inline`,children:[`main`,e.targetCommit?` · ${e.targetCommit}`:``]})]})]}),(0,L.jsxs)(`p`,{children:[`Checks: `,e.verification?.checks??`unavailable`]}),(0,L.jsx)(`p`,{children:e.verification?.summary??`Verification unavailable. Refresh the review before delivery.`}),e.verification?(0,L.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 YK({action:e,delivery:t,busy:n,onAction:r}){let i=t.blocked[e],a=n||t.status===`in_progress`||t.status===`successful`||!!i;return(0,L.jsxs)(`div`,{className:`grid gap-1`,children:[(0,L.jsx)(J,{variant:`outline`,disabled:a,onClick:()=>r(e),children:e===`create_pr`?`Create PR`:`Merge to main`}),(0,L.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.`:`Directly updates and pushes main. Requires confirmation.`}),i?(0,L.jsxs)(`p`,{className:`text-sm text-destructive`,children:[i,` Refresh review after resolving this restriction, then choose the action again.`]}):null]})}async function XK(e,t,n){let r={taskId:t,reviewId:n};return e===`refresh`?Ud(`tasks.deliveryReview`,{taskId:t}):e===`defer`?Ud(`tasks.deliveryDefer`,r):Ud(`tasks.deliver`,{...r,action:e,...e===`merge_main`?{confirmMain:!0}:{}})}function ZK({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=Rd(),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 QK(e){return e.scope.current===e.identity&&e.project===Rd()}function $K(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 XK(r,t.taskId,e.current.reviewId);QK(e)&&(e.setCurrent(n.delivery),t.onChanged())}catch(t){QK(e)&&e.setError(t instanceof Error?t.message:String(t))}finally{n.current=!1,e.scope.current&&e.setBusy(!1)}}}return r}function eq(e){let t=ZK(e),n=$K(t,e),r=YT(t.confirm,JT.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 tq({review:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Task completion is recorded separately. Nothing is published without your approval.`}),(0,L.jsx)(`p`,{role:`status`,className:`text-sm`,children:e.busy?`Updating delivery…`:e.current.operation?`Operation: ${e.current.operation.stage}`:qK[e.current.status]}),e.current.error||e.error?(0,L.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.result?(0,L.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,L.jsxs)(`span`,{children:[` · `,e.current.result.pullUrl]}):null]}):null]})}function nq({review:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[(0,L.jsx)(YK,{action:`create_pr`,delivery:e.current,busy:e.busy,onAction:()=>void e.request(`create_pr`)}),(0,L.jsx)(YK,{action:`merge_main`,delivery:e.current,busy:e.busy,onAction:e.reviewMerge})]}),(0,L.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,L.jsx)(J,{variant:`ghost`,disabled:e.busy,onClick:()=>void e.request(`refresh`),children:`Refresh review`}),(0,L.jsx)(J,{variant:`ghost`,disabled:e.busy||e.terminal,onClick:()=>void e.request(`defer`),children:`Not now`})]})]})}function rq({review:e}){return(0,L.jsx)(VT,{open:e.slot,onOpenChange:e.setConfirm,label:`Confirm merge to main`,description:KK,onCloseAutoFocus:t=>{t.preventDefault(),requestAnimationFrame(()=>e.trigger.current?.focus())},children:(0,L.jsxs)(`div`,{className:`grid gap-4 p-4`,children:[(0,L.jsx)(`h3`,{className:`font-medium`,children:`Merge to main?`}),(0,L.jsx)(`p`,{className:`text-sm`,children:KK}),(0,L.jsxs)(`p`,{className:`break-all text-sm text-muted-foreground`,children:[e.current.repository,` · `,e.current.sourceCommit,` → main`]}),(0,L.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,L.jsx)(J,{variant:`outline`,onClick:()=>e.setConfirm(!1),children:`Cancel`}),(0,L.jsx)(J,{disabled:e.busy||!!e.current.blocked.merge_main||e.terminal,onClick:()=>void e.request(`merge_main`),children:`Confirm merge and push main`})]})]})})}function iq({title:e,review:t}){return(0,L.jsxs)(AL,{title:`Completed work · delivery review`,right:qK[t.current.status],children:[(0,L.jsx)(JK,{delivery:t.current,title:e}),(0,L.jsx)(tq,{review:t}),(0,L.jsx)(nq,{review:t}),(0,L.jsx)(rq,{review:t})]})}function aq(e){let t=eq(e);return(0,L.jsx)(iq,{title:e.title,review:t})}var oq={open:Jf,delivered:Bf,addressed:Rf},sq={open:`waiting for the owning session`,delivered:`sent to the oracle`,addressed:`plan amended`};function cq({comment:e}){let t=uD(Date.now()-Date.parse(e.createdAt)),n=oq[e.status];return(0,L.jsxs)(`p`,{className:`mt-1 flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(n,{"aria-hidden":`true`,className:e.status===`addressed`?`size-3.5 text-success`:`size-3.5`}),sq[e.status],`, `,t,e.editedAt?` (edited)`:``]})}function lq({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,L.jsxs)(`li`,{className:`rounded-lg border border-border bg-background/60 px-3.5 py-2.5`,children:[r?(0,L.jsx)(ZW,{text:s.text,onSave:async n=>{let r=await Ud(`tasks.editComment`,{taskId:t,commentId:e.id,text:n});o(r.comment)},onCancel:()=>i(!1)}):(0,L.jsx)(DL,{text:s.text}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,L.jsx)(cq,{comment:s}),n&&!r?(0,L.jsx)(J,{size:`sm`,variant:`ghost`,onClick:()=>i(!0),children:`Edit`}):null]})]})}function uq({taskId:e,finished:t,canComment:n}){let r=bE(`tasks.comments`,{taskId:e},[`tasks`]),i=vE(`status`),a=r.data?.comments??[],o=a.filter(e=>e.status!==`addressed`).length;return(0,L.jsxs)(`section`,{"aria-labelledby":`comments-${e}`,className:`flex flex-col gap-3`,children:[(0,L.jsx)(`h3`,{id:`comments-${e}`,className:`text-sm`,children:(0,L.jsx)(kL,{title:`Comments`,right:o>0?`${o} open`:void 0})}),a.length===0?(0,L.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,L.jsx)(`ul`,{className:`flex flex-col gap-2.5`,children:a.map(t=>(0,L.jsx)(lq,{taskId:e,comment:t,own:!!(t.by&&t.by===i.data?.sessionId)},`${e}-${t.id}`))})]})}function dq({step:e,index:t}){let n=e.status===`done`?Rf:Jf,r=e.status===`done`?`text-success`:e.status===`current`?`text-primary`:`text-muted-foreground`;return(0,L.jsxs)(`li`,{className:`flex items-start gap-2.5 text-sm`,children:[(0,L.jsx)(n,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 ${r}`}),(0,L.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,L.jsx)(`span`,{className:e.status===`current`?`min-w-0 break-words text-foreground`:`min-w-0 break-words text-muted-foreground`,children:e.text}),e.status===`current`?(0,L.jsxs)(`span`,{className:`shrink-0 rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:[`now`,(0,L.jsx)(`span`,{className:`sr-only`,children:` (current step)`})]}):null]})}function fq({steps:e}){let t=e.filter(e=>e.status===`done`).length;return(0,L.jsx)(AL,{title:`Progress`,right:`${t}/${e.length} steps`,children:(0,L.jsx)(`ol`,{className:`flex flex-col gap-2`,children:e.map((e,t)=>(0,L.jsx)(dq,{step:e,index:t},`${t}-${e.text}`))})})}function pq({detail:e,finished:t}){return e.plan?(0,L.jsx)(AL,{title:`Approved plan`,children:(0,L.jsx)(DL,{text:e.plan})}):e.proposal?(0,L.jsx)(AL,{title:t?`Proposal`:`Proposal (no plan yet)`,children:(0,L.jsx)(DL,{text:e.proposal})}):(0,L.jsx)(AL,{title:`Plan`,children:(0,L.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 mq({amendments:e}){return e.length===0?null:(0,L.jsx)(AL,{title:`Amendments`,children:(0,L.jsx)(`ul`,{className:`flex list-disc flex-col gap-1 pl-5 text-sm text-muted-foreground`,children:e.map(e=>(0,L.jsx)(`li`,{className:`break-words`,children:e},e))})})}function hq({detail:e}){return e.waiting.length===0&&e.blockers.length===0?null:(0,L.jsx)(AL,{title:`Waiting on`,children:(0,L.jsxs)(`ul`,{className:`flex flex-col gap-1 text-sm`,children:[e.waiting.map((e,t)=>(0,L.jsxs)(`li`,{className:`flex gap-2`,children:[(0,L.jsx)(If,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-warning`}),(0,L.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,L.jsxs)(`li`,{className:`flex gap-2`,children:[(0,L.jsx)(Kf,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,L.jsxs)(`span`,{className:`min-w-0 break-words text-muted-foreground`,children:[e.reason,` (needs: `,e.need,`)`]})]},`${t}-${e.reason}`))]})})}function gq({runs:e}){return e.length===0?null:(0,L.jsx)(AL,{title:`Recent runs`,children:(0,L.jsx)(`ul`,{className:`flex flex-col gap-1 text-sm text-muted-foreground`,children:e.map((e,t)=>(0,L.jsx)(`li`,{className:`break-words`,children:e},`${t}-${e}`))})})}function _q({detail:e,finished:t}){return(0,L.jsxs)(L.Fragment,{children:[e.request?(0,L.jsx)(AL,{title:`Request`,children:(0,L.jsx)(DL,{text:e.request})}):null,e.steps.length>0?(0,L.jsx)(fq,{steps:e.steps}):null,(0,L.jsx)(pq,{detail:e,finished:t})]})}function vq({detail:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(mq,{amendments:e.amendments}),(0,L.jsx)(hq,{detail:e}),(0,L.jsx)(gq,{runs:e.runs})]})}var yq={mine:`This session`,others:`Other sessions`,pending:`Pending`,recent:`Finished`,archived:`Archived`},bq={open:`open`,done:`done`,dropped:`abandoned`},xq=`No tasks yet. Start one from the Lobby tab, or plan one in the Plan tab.`;function Sq(e,t){return`${e.replace(/_/g,` `)}${t?` · paused`:``}`}function Cq(e){return e===`now`?`just now`:`${e} ago`}function wq(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[Sq(e.status,e.paused),e.auto?`auto`:``,t].filter(Boolean).join(` · `)}function Tq(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 Eq(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 Dq({split:e}){let t=e.after.length>0?`, after ${e.after.map(e=>`part ${e}`).join(` and `)}`:``;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,L.jsxs)(`span`,{className:`font-medium text-primary`,children:[`part `,e.part,` of `,e.of]}),` of one plan that was split into tasks`,t?(0,L.jsx)(`span`,{className:`text-foreground`,children:t}):null]}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.titles.map((t,n)=>(0,L.jsxs)(`span`,{children:[n>0?(0,L.jsx)(`span`,{className:`text-muted-foreground/60`,children:` · `}):null,(0,L.jsxs)(`span`,{className:n+1===e.part?`font-medium text-foreground`:void 0,children:[n+1,`. `,t]})]},`${n}-${t}`))})]})}function Oq({planId:e}){let t=bE(`plans.get`,{planId:e},[`plans`]),n=t.data;return n?(0,L.jsxs)(L.Fragment,{children:[n.issue?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`from issue #`,n.issue.number,` — `,n.issue.title,n.issue.url?(0,L.jsxs)(`span`,{className:`break-all`,children:[` `,n.issue.url]}):null]}):null,n.split?(0,L.jsx)(Dq,{split:n.split}):null,(0,L.jsx)(AL,{title:`Agreed plan`,children:(0,L.jsx)(DL,{text:n.brief})})]}):t.error?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the agreed plan. `,t.error]}):null}function kq({row:e,onGone:t}){let n=async n=>{await V(`plans.start`,{planId:e.id,where:n})&&t()},r=async()=>{await V(`plans.discard`,{planId:e.id})&&t()};return(0,L.jsxs)(`article`,{className:`flex flex-col gap-4`,"aria-label":e.title,children:[(0,L.jsxs)(WE,{children:[(0,L.jsx)(Y,{label:`Start here`,icon:sm,tone:`primary`,shortcut:`S`,onClick:()=>void n(`here`)}),(0,L.jsx)(Y,{label:`Start in a new session`,text:`New session`,icon:km,shortcut:`N`,onClick:()=>void n(`session`)}),(0,L.jsx)(xD,{icon:Lm,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,L.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-medium`,children:[(0,L.jsx)(nV,{check:`open`,className:`mt-1.5`}),(0,L.jsx)(`span`,{className:`min-w-0 break-words`,children:e.title})]}),(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`pending`,e.age?` · saved ${Cq(e.age)}`:``]}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:e.id})]}),(0,L.jsx)(Oq,{planId:e.id})]})}function Aq(e){if(e.kind===`archived`)return{state:`archived`,rest:Cq(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`} ${Cq(e.age)}`:``;return{state:Sq(e.status,e.paused),rest:[t?``:n,r].filter(Boolean).join(` · `)}}function jq(e){return e?[$B(e.track),e.domains.join(`, `)].filter(Boolean).join(` · `):``}function Mq({row:e,task:t}){return e.progress?(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,L.jsx)(tV,{done:e.progress.done,total:e.progress.total}),(0,L.jsxs)(`span`,{children:[e.progress.done,` of `,e.progress.total,` steps`]}),t?.currentStep?(0,L.jsxs)(`span`,{className:`text-foreground`,children:[t.currentStep,` `,(0,L.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium`,children:`now`}),(0,L.jsx)(`span`,{className:`sr-only`,children:`(current step)`})]}):null]}):null}function Nq({row:e,task:t}){let n=t?.git?`branch ${t.git.branch}${t.git.from?` · from ${t.git.from}`:``}`:``,{state:r,rest:i}=Aq(e);return(0,L.jsxs)(`header`,{className:`flex flex-col gap-2`,children:[(0,L.jsxs)(`h2`,{className:`flex items-start gap-2.5 text-lg font-semibold tracking-tight`,children:[(0,L.jsx)(nV,{check:e.check,className:`mt-1.5`}),(0,L.jsxs)(`span`,{className:`sr-only`,children:[bq[e.check],`:`]}),(0,L.jsx)(`span`,{className:e.check===`dropped`?`min-w-0 break-words line-through`:`min-w-0 break-words`,children:e.title})]}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground`,children:[(0,L.jsx)(`span`,{className:`rounded-md bg-accent px-2 py-0.5 text-xs font-medium text-foreground`,children:r}),i?(0,L.jsx)(`span`,{children:i}):null]}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground break-all`,children:[e.id,jq(t),n].filter(Boolean).join(` · `)}),(0,L.jsx)(Mq,{row:e,task:t})]})}function Pq({row:e,onGone:t,onChanged:n}){let r=e.id;return{restore:async()=>{await V(`tasks.restore`,{taskId:r},{undo:()=>void V(`tasks.archive`,{taskId:r})})&&t()},archive:async()=>{await V(`tasks.archive`,{taskId:r},{undo:()=>void V(`tasks.restore`,{taskId:r})})&&t()},remove:async()=>{await V(`tasks.delete`,{taskId:r,where:e.kind===`archived`?`archive`:`list`})&&t()},toggleAuto:()=>void V(`tasks.auto`,{taskId:r,on:!e.auto}).then(n)}}function Fq({row:e,archive:t}){return e.check===`open`?(0,L.jsx)(xD,{label:`Archive`,icon:uf,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,L.jsx)(Y,{label:`Archive`,icon:uf,shortcut:`E`,onClick:()=>void t()})}function Iq({on:e,toggle:t}){return HE(`a`,t),(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.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`,children:[(0,L.jsx)(dm,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),(0,L.jsx)(`span`,{children:`Auto`}),(0,L.jsx)(rU,{checked:e,onCheckedChange:t,"aria-label":`Auto mode`,"aria-keyshortcuts":`A`}),(0,L.jsx)(zT,{chord:`A`,className:`kbd-hint`})]})}),(0,L.jsx)(wE,{children:`Auto mode: the oracle decides without asking`})]})}function Lq(e){let{row:t}=e,{restore:n,archive:r,remove:i,toggleAuto:a}=Pq(e),o=t.kind===`archived`;return(0,L.jsxs)(WE,{children:[t.kind===`task`?(0,L.jsx)(Rq,{taskId:t.id}):null,o?(0,L.jsx)(Y,{label:`Restore`,icon:pm,shortcut:`R`,onClick:()=>void n()}):null,t.check===`open`&&!o?(0,L.jsx)(Iq,{on:!!t.auto,toggle:a}):null,o?null:(0,L.jsx)(Fq,{row:t,archive:r}),(0,L.jsx)(xD,{icon:Lm,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 Rq({taskId:e}){let t=(0,m.useRef)(!0);(0,m.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]);async function n(){let n=Rd();try{let r=await Ud(`tasks.open`,{taskId:e});if(!t.current||Rd()!==n)return;r.notice&&Nd.info(r.notice);let i=await Ud(`status.get`,{});if(!t.current||Rd()!==n)return;let a=r.key??(r.sessionId===i.sessionId?`here`:r.sessionId);a?iE(`#/sessions/${encodeURIComponent(a)}`):r.notice||Nd.info(`This task has no active session. No replacement session was created.`)}catch(e){t.current&&Rd()===n&&Nd.error(e instanceof Error?e.message:String(e))}}return(0,L.jsx)(Y,{label:`Open task conversation`,text:`Open`,icon:Fp,shortcut:`O`,onClick:()=>void n()})}function zq(e){let{row:t}=e,n=t.kind===`plan`,r=bE(`tasks.get`,{taskId:t.id},[`tasks`],!n),i=vE(`lobby`).data?.task,a=i?.id===t.id?i:void 0;if(n)return(0,L.jsx)(kq,{row:t,onGone:e.onGone});let o=t.check===`open`&&t.kind===`task`;return(0,L.jsxs)(`article`,{className:`flex flex-col gap-5`,"aria-label":t.title,children:[(0,L.jsx)(Lq,{...e}),(0,L.jsx)(Nq,{row:t,task:a}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,L.jsx)(GK,{timing:r.data?.timing??t.timing,stopped:t.check!==`open`})}),r.data?.delivery?(0,L.jsx)(aq,{taskId:t.id,title:t.title,delivery:r.data.delivery,onChanged:r.reload},t.id):null,r.data?(0,L.jsx)(_q,{detail:r.data,finished:!o}):null,(0,L.jsx)(uq,{taskId:t.id,finished:!o,canComment:o}),r.data?(0,L.jsx)(vq,{detail:r.data}):null,r.error&&!r.data?(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Could not load the plan detail. `,r.error]}):null]})}function Bq({row:e}){return e.check===`open`&&e.progress?(0,L.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground tabular-nums`,children:[(0,L.jsx)(tV,{done:e.progress.done,total:e.progress.total}),(0,L.jsxs)(`span`,{children:[e.progress.done,`/`,e.progress.total]})]}):e.age&&e.check!==`open`?(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.age}):null}function Vq(e){return e.check===`dropped`?`text-muted-foreground line-through`:e.kind===`archived`||e.check===`done`?`text-muted-foreground`:`text-foreground`}function Hq({row:e,selected:t,onSelect:n}){return(0,L.jsx)(`li`,{children:(0,L.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:hR,children:[(0,L.jsxs)(`span`,{className:`flex items-start gap-2 text-sm`,children:[(0,L.jsx)(nV,{check:e.check,className:`mt-0.5`}),(0,L.jsxs)(`span`,{className:`sr-only`,children:[bq[e.check],`:`]}),(0,L.jsx)(`span`,{className:q(`min-w-0 flex-1 break-words`,Vq(e),t&&`font-medium text-foreground`),children:e.title}),(0,L.jsx)(Bq,{row:e})]}),e.check===`open`?(0,L.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:wq(e)}):null,e.kind===`plan`?null:(0,L.jsx)(`span`,{className:`pl-6 text-xs text-muted-foreground`,children:(0,L.jsx)(GK,{timing:e.timing,stopped:e.check!==`open`})}),e.delivery?(0,L.jsxs)(`span`,{className:`pl-6 text-xs text-foreground`,children:[`Delivery: `,e.delivery.status.replaceAll(`_`,` `),` · open task to review`]}):null]})})}function Uq({rows:e,selectedId:t,onSelect:n}){return(0,L.jsx)(`div`,{className:`flex flex-col pb-2`,children:Tq(e).map(({section:e,rows:r})=>(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:_R,children:(0,L.jsx)(kL,{title:yq[e],right:String(r.length),className:`[&>span:first-child]:font-medium [&>span:first-child]:text-muted-foreground`})}),(0,L.jsx)(`ul`,{className:gR,children:r.map(e=>(0,L.jsx)(Hq,{row:e,selected:e.id===t,onSelect:n},`${e.kind}-${e.id}`))})]},e))})}var Wq=()=>iE(rE(`tasks`)),Gq=e=>iE(rE(`tasks`,e));function Kq(){return(0,L.jsxs)(oE,{className:`m-4 flex-1`,children:[(0,L.jsxs)(sE,{children:[(0,L.jsx)(lE,{variant:`icon`,children:(0,L.jsx)(Cp,{"aria-hidden":`true`})}),(0,L.jsx)(dE,{children:xq})]}),(0,L.jsx)(J,{onClick:()=>iE(rE(`plan`)),children:`Plan a task`})]})}function qq({shown:e,count:t,onToggle:n}){return(0,L.jsxs)(`label`,{className:`flex h-7 cursor-pointer items-center gap-2 rounded-lg border border-border px-2 text-xs font-medium transition-colors hover:bg-muted`,children:[(0,L.jsx)(Dz,{checked:e,onCheckedChange:n,"aria-label":`Show archived tasks`,className:`size-4`}),`Archived`,(0,L.jsx)(mR,{variant:`secondary`,className:`h-5 px-1.5`,children:t})]})}function Jq({id:e}){let t=$E(),[n,r]=(0,m.useState)(!1),i=bE(`tasks.list`,{},[`tasks`,`plans`]),a=bE(`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)(()=>(rK(u),()=>rK(void 0)),[u]),!i.data&&i.error)return(0,L.jsx)(mE,{message:`Could not load tasks. ${i.error}`,onRetry:i.reload});if(i.data&&o.length===0&&s.length===0)return(0,L.jsx)(Kq,{});let d=[...c,...s].find(e=>e.id===l),f=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(rD,{title:`Tasks`,count:Eq(c),children:(0,L.jsx)(qq,{shown:n,count:s.length,onToggle:()=>r(e=>!e)})}),i.data?c.length===0?(0,L.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:xq}):(0,L.jsx)(Uq,{rows:c,selectedId:l,onSelect:Gq}):(0,L.jsx)(iD,{})]}),p=d?(0,L.jsx)(zq,{row:d,onGone:Wq,onChanged:i.reload},d.id):e?(0,L.jsx)(Yq,{}):null;return(0,L.jsx)(nD,{wide:t,list:f,detail:p,open:!!e,onClose:Wq,hint:`Select a task to see its detail.`,describe:`Task detail`})}function Yq(){return(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`That task is not on the list any more.`})}var Xq={l:`lobby`,p:`plan`,t:`tasks`,i:`issues`,u:`git`,s:`sessions`,n:`knowledge`,q:`quickfix`,m:`metrics`,e:`settings`,x:`excalidraw`};function Zq(e){let t=e[0];if(t)try{return decodeURIComponent(t)}catch{return t}}function Qq(e){if(e.kind===`settings`)return(0,L.jsx)(YW,{});if(e.kind===`sessions`)return(0,L.jsx)(VK,{id:Zq(e.key?[e.key]:[])});switch(e.tab){case`lobby`:return(0,L.jsx)(AV,{});case`tasks`:return(0,L.jsx)(Jq,{id:Zq(e.rest)});case`plan`:return(0,L.jsx)(NG,{});case`quickfix`:return(0,L.jsx)(QG,{id:Zq(e.rest)});case`issues`:return(0,L.jsx)(ZR,{rest:e.rest});case`metrics`:return(0,L.jsx)(xH,{});case`git`:return(0,L.jsx)(TR,{rest:e.rest});case`knowledge`:return(0,L.jsx)(Ez,{agent:e.rest[0],file:e.rest[1]});case`excalidraw`:return(0,L.jsx)(mB,{id:Zq(e.rest)})}}var $q=[{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`}],eJ=[{id:`digits`,caps:[`1`,`…`,`9`],help:`jump to a tab in current order`},{id:`help`,caps:[`?`],help:`keyboard shortcuts`},...Object.entries(Xq).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`}],tJ=[{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`],[`V`,`review`],[`Q`,`Jev's read`],[`X`,`stop`]]},{id:`issues`,page:`Issues`,keys:[[`R`,`refresh`]]},{id:`knowledge`,page:`Knowledge`,keys:[[`E`,`edit`],[`A`,`add`],[`C`,`comment`],[`F`,`edit file`],[`Delete`,`delete`]]},{id:`excalidraw`,page:`Excalidraw`,keys:[[`R`,`reveal`],[`C`,`copy`],[`O`,`open`],[`W`,`draw`],[`T`,`check`],[`Delete`,`remove`]]},{id:`sessions`,page:`Sessions`,keys:[[`M`,`move here`],[`S`,`stop`],[`B`,`back`]]},{id:`confirm`,page:`Asked to confirm`,keys:[[`Y`,`yes, do it`],[`Esc`,`keep it`]]}],nJ=[{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`}],rJ=[{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 iJ({line:e}){return(0,L.jsxs)(`div`,{className:`flex items-center gap-3 py-1`,children:[(0,L.jsx)(`span`,{className:`flex w-28 shrink-0 items-center`,children:e.caps?(0,L.jsx)(`span`,{className:`inline-flex items-center gap-1`,children:e.caps.map(e=>(0,L.jsx)(NT,{children:e},e))}):(0,L.jsx)(zT,{chord:e.label??``})}),(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.help})]})}function aJ(){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:`Buttons on a page`}),tJ.map(e=>(0,L.jsxs)(`div`,{className:`flex items-start gap-3 py-1`,children:[(0,L.jsx)(`span`,{className:`w-28 shrink-0 pt-0.5 text-sm font-medium`,children:e.page}),(0,L.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,L.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,L.jsx)(zT,{chord:e}),t]},e))})]},e.id))]})}function oJ({title:e,lines:t}){return(0,L.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`h3`,{className:`mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase`,children:e}),t.map(e=>(0,L.jsx)(iJ,{line:e},e.id))]})}function sJ(e){return e.map(e=>({id:e.action,label:e.label,help:e.help}))}function cJ(e){return e.map(e=>({id:`tab.${e.id}`,label:e.key,help:`jump to the ${e.label} tab`}))}function lJ({open:e,onOpenChange:t,keys:n,tabs:r}){let i=YT(e,JT.help);return(0,m.useEffect)(()=>{if(!e||!i)return;let r=e=>{let r=n.find(e=>e.action===`help`)?.key;(e.key===`Escape`||r&&dV(e,r))&&(e.preventDefault(),t(!1))};return window.addEventListener(`keydown`,r,!0),()=>window.removeEventListener(`keydown`,r,!0)},[e,i,t,n]),(0,L.jsxs)(VT,{open:e&&i,onOpenChange:t,label:`Keys`,className:`max-w-4xl`,children:[(0,L.jsxs)(`header`,{className:`flex items-center justify-between gap-3 border-b border-border px-6 py-4`,children:[(0,L.jsx)(`h2`,{"aria-hidden":`true`,className:`text-base font-semibold tracking-tight`,children:`Keyboard shortcuts`}),(0,L.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(zT,{chord:`Esc`}),(0,L.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Close`,onClick:()=>t(!1),children:(0,L.jsx)(Zm,{"aria-hidden":`true`})})]})]}),(0,L.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,L.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,L.jsx)(oJ,{title:`Everywhere`,lines:sJ(n)}),(0,L.jsx)(oJ,{title:`Jump to a tab`,lines:cJ(r)}),(0,L.jsx)(oJ,{title:`Navigation and editing`,lines:eJ}),(0,L.jsx)(oJ,{title:`Message box`,lines:$q})]}),(0,L.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,L.jsx)(oJ,{title:`Lists and panes`,lines:nJ}),(0,L.jsx)(aJ,{}),(0,L.jsx)(oJ,{title:`Questions`,lines:rJ})]})]})]})}function uJ(e){return e>=1048576?`${(e/1024/1024).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}async function dJ(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(zd(`/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 Vd(`the lobby answered ${n.status}`,`failed`,n.status);if(!r.ok)throw new Vd(r.error,r.code,n.status);return r.result}function fJ(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 pJ(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 mJ=/^(\s*)(?:([-*+])|(\d+)([.)]))\s+(\[[ xX]\]\s+)?/;function hJ(e,t){let n=e.lastIndexOf(`
|
|
98
|
+
`,t-1)+1,r=e.indexOf(`
|
|
99
|
+
`,t),i=e.slice(n,r<0?e.length:r),a=mJ.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}}var gJ={id:`oracle`,pill:`Oracle`,label:`Message the oracle`,placeholder:`Message the oracle…`};function _J(e){if(e)try{return decodeURIComponent(e)}catch{return e}}function vJ(e,t,n){if(e.kind===`sessions`){let e={id:`newsession`,pill:`New session`,label:`Start a task in a new session`,placeholder:`Describe a task for a new session…`};return n?[{id:`session`,pill:`Message`,label:`Message ${n.name}`,placeholder:`Message ${n.name}…`,session:n},e,gJ]:[e,gJ]}if(e.kind!==`tab`)return[gJ];if(e.tab===`plan`)return[{id:`panel`,pill:`Panel`,label:`Message the panel`,placeholder:`Describe a task, or answer the panel…`},gJ];if(e.tab===`quickfix`)return[{id:`quickfix`,pill:`Quick fix`,label:`Describe a quick fix`,placeholder:`Describe a small change…`},gJ];let r=e.tab===`tasks`?_J(e.rest[0])??t:void 0;return r?[{id:`comment`,pill:`Comment`,label:`Comment on ${r}`,placeholder:`Comment on ${r}'s plan…`,taskId:r},{id:`task`,pill:`Task's oracle`,label:`Message ${r}'s oracle`,placeholder:`Leave a message for ${r}'s oracle…`,taskId:r},gJ]:[gJ]}var yJ=0,bJ=`relative inline-flex size-8 items-center justify-center rounded-lg before:absolute before:-inset-1 before:content-[''] text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95 aria-pressed:bg-accent aria-pressed:text-foreground`;function xJ(e){return e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing}function SJ({file:e,onRemove:t}){let n=(0,L.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e.name}`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,onClick:t,className:q(`flex shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40`,e.image?`absolute top-1 right-1 size-5 bg-background/80 text-foreground backdrop-blur-sm`:`size-7`),children:(0,L.jsx)(Zm,{"aria-hidden":`true`,className:`size-3.5`})});return e.image?(0,L.jsxs)(B.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} · ${uJ(e.size)}`,className:`relative size-16 shrink-0 overflow-hidden rounded-lg border border-border bg-muted`,children:[(0,L.jsx)(`img`,{src:zd(e.image),alt:e.name,className:`size-full object-cover`}),e.state===`uploading`?(0,L.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center bg-background/60`,children:(0,L.jsx)(fE,{className:`size-4`,"aria-hidden":`true`,role:`presentation`})}):null,n]}):(0,L.jsxs)(B.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,L.jsxs)(`span`,{className:`relative flex shrink-0 items-center justify-center text-muted-foreground`,children:[(0,L.jsx)(lp,{"aria-hidden":`true`,className:`size-4`}),e.state===`uploading`?(0,L.jsx)(fE,{className:`absolute -right-1 -bottom-1 size-2.5`,"aria-hidden":`true`,role:`presentation`}):null]}),(0,L.jsxs)(`span`,{className:`min-w-0 max-w-40`,children:[(0,L.jsx)(`span`,{className:`block truncate text-xs font-medium`,children:e.name}),(0,L.jsx)(`span`,{className:`block text-[0.65rem] leading-tight text-muted-foreground`,children:e.state===`uploading`?`uploading…`:uJ(e.size)})]}),n]})}function CJ({route:e,keys:t,onHelp:n}){let[r,i]=(0,m.useState)(``),[a,o]=(0,m.useState)([]),[s,c]=(0,m.useState)(!1),[l,u]=(0,m.useState)(!1),[d,f]=(0,m.useState)(!1),[p,h]=(0,m.useState)(),g=vE(`status`),_=vE(`lobby`),v=ZT(),y=(g.data?.busy??!1)||!!_.data?.reply?.trim(),{taskId:b,session:x}=oK(),S=(0,m.useMemo)(()=>vJ(e,b,x),[e,b,x]),C=S.map(e=>`${e.id}:${e.taskId??e.session?.name??``}`).join(`|`),w=S.find(e=>e.id===p)??S[0];(0,m.useEffect)(()=>h(void 0),[C]);let T=(0,m.useRef)(null),E=(0,m.useRef)(null),ee=(0,m.useRef)(null),D=(0,m.useRef)(a);D.current=a;let O=(0,m.useRef)(void 0);(0,m.useLayoutEffect)(()=>{let e=O.current,t=E.current;e&&t&&(O.current=void 0,t.setSelectionRange(e.start,e.end))},[r]);let te=(0,m.useCallback)(e=>{O.current={start:e.start,end:e.end},i(e.value)},[]);(0,m.useEffect)(()=>{let e=T.current;if(!e)return;let t=document.documentElement,n=()=>t.style.setProperty(`--composer-h`,v?`0px`:`${Math.ceil(e.getBoundingClientRect().height)}px`);n();let r=new ResizeObserver(n);return r.observe(e),()=>{r.disconnect(),t.style.setProperty(`--composer-h`,`0px`)}},[v]);let ne=(0,m.useCallback)(e=>{let t=[...e],n=8-D.current.length;t.length>n&&Nd.warning(`At most 8 files go with one message.`);for(let e of t.slice(0,Math.max(0,n))){let t=`f${++yJ}`,n=e.type.startsWith(`image/`)?URL.createObjectURL(e):void 0;o(r=>[...r,{key:t,name:e.name||(n?`image.png`:`file`),size:e.size,...n?{image:n}:{},state:`uploading`}]),dJ(e).then(e=>o(n=>n.map(n=>n.key===t?{...n,state:`ready`,info:e}:n))).catch(e=>{Nd.error(e instanceof Error?e.message:`That file did not upload.`),o(e=>e.filter(e=>e.key!==t))})}},[]),re=(0,m.useCallback)(e=>{o(t=>{let n=t.find(t=>t.key===e);return n?.image&&URL.revokeObjectURL(n.image),t.filter(t=>t.key!==e)})},[]),k=a.some(e=>e.state===`uploading`),ie=a.flatMap(e=>e.info?[e.info.id]:[]),ae=(r.trim().length>0||ie.length>0)&&!k&&!l,A=(0,m.useCallback)(async()=>{if(!ae)return;u(!0);let e=ie.length>0?ie:void 0,t={text:r,...e?{attachments:e}:{}};try{let n=!0;if(w.id===`oracle`){let e=await Ud(`lobby.send`,t);e.notice&&Nd(e.notice)}else if(w.id===`panel`)n=await V(`planner.send`,t)!==void 0;else if(w.id===`quickfix`)n=await V(`quickfix.submit`,t)!==void 0;else if(w.id===`task`)n=await V(`tasks.message`,{taskId:w.taskId,...t})!==void 0;else if(w.id===`session`)n=await V(`sessions.message`,{...w.session.address,...t})!==void 0;else if(w.id===`newsession`){let t=await V(`sessions.start`,{request:r,...e?{attachments:e}:{}});n=t!==void 0,t?.key&&iE(`#/sessions/${encodeURIComponent(t.key)}`)}else n=await V(`tasks.comment`,{taskId:w.taskId,...t})!==void 0;if(n){i(``);for(let e of D.current)e.image&&URL.revokeObjectURL(e.image);o([])}}catch(e){Nd.error(e instanceof Error?e.message:`Could not send`)}finally{u(!1)}},[ae,ie,w,r]),oe=(0,m.useCallback)(async()=>{try{await Ud(`lobby.abort`,{})}catch(e){Nd.error(e instanceof Error?e.message:`Could not stop`)}},[]);return(0,L.jsx)(`div`,{ref:T,className:q(`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-sm:px-2 max-sm:pb-[max(0.5rem,env(safe-area-inset-bottom))]`,v&&`opacity-0`),inert:v,children:(0,L.jsx)(`div`,{className:`pointer-events-auto mx-auto w-full max-w-3xl`,children:(0,L.jsxs)(`div`,{className:q(`group/composer relative rounded-2xl border border-dock-border bg-dock shadow-dock backdrop-blur-xl backdrop-saturate-150 transition-[border-color,box-shadow] duration-300 ease-snap focus-within:border-ring/45 focus-within:shadow-dock-focus`,d&&`border-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--ring)_30%,transparent)]`),onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),f(!0))},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),e.dataTransfer.files.length>0&&ne(e.dataTransfer.files)},children:[(0,L.jsx)(xl,{initial:!1,children:a.length>0?(0,L.jsx)(B.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:`flex flex-wrap items-end gap-2 overflow-hidden px-3 pt-3`,children:a.map(e=>(0,L.jsx)(SJ,{file:e,onRemove:()=>re(e.key)},e.key))},`files`):null}),s?(0,L.jsx)(`div`,{"aria-label":`Markdown preview`,role:`region`,className:`max-h-48 overflow-y-auto border-b border-border px-4 py-3`,children:r.trim()?(0,L.jsx)(DL,{text:r}):(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Nothing to preview yet.`})}):null,(0,L.jsx)(`div`,{className:`flex px-4 pt-3 pb-1`,children:(0,L.jsx)(`textarea`,{ref:E,id:`composer-text`,"aria-label":w.label,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{if(e.key===`Escape`&&!e.nativeEvent.isComposing){e.preventDefault(),IE();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;te(n===`k`?pJ(a,r,i):fJ(a,r,i,n===`b`?`**`:n===`i`?`_`:"`"));return}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&n===`p`){e.preventDefault(),c(e=>!e);return}if(e.key===`Enter`&&e.shiftKey&&!e.nativeEvent.isComposing&&t.selectionStart===t.selectionEnd){let n=hJ(t.value,t.selectionStart);n&&(e.preventDefault(),te(n));return}if(e.key===`Backspace`&&t.value===``&&D.current.length>0){e.preventDefault(),re(D.current.at(-1).key);return}(xJ(e)||e.key===`Enter`&&(e.metaKey||e.ctrlKey))&&(e.preventDefault(),A())},onPaste:e=>{let t=[...e.clipboardData.files];t.length!==0&&(e.preventDefault(),ne(t))},placeholder:y&&w.id===`oracle`?`The oracle is working. Enter steers it…`:w.placeholder,rows:1,className:`field-sizing-content max-h-[min(45vh,20rem)] min-h-[1.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`})}),(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 gap-y-1 px-2 pt-1 pb-2`,children:[(0,L.jsx)(`input`,{ref:ee,type:`file`,multiple:!0,hidden:!0,tabIndex:-1,"aria-label":`Attach files`,onChange:e=>{ne(e.target.files??[]),e.target.value=``}}),(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.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:bJ,children:(0,L.jsx)(Yp,{"aria-hidden":`true`,className:`size-4`})})}),(0,L.jsx)(wE,{children:`Attach images, PDFs or files`})]}),(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`Preview the Markdown`,"aria-pressed":s,"aria-keyshortcuts":`Alt+P`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>c(e=>!e),className:bJ,children:(0,L.jsx)(rp,{"aria-hidden":`true`,className:`size-4`})})}),(0,L.jsxs)(wE,{children:[`Preview `,(0,L.jsx)(zT,{chord:`Alt+P`})]})]}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1.5 h-4 w-px bg-border`}),S.length>1?(0,L.jsx)(`div`,{role:`radiogroup`,"aria-label":`Send to`,className:`flex items-center gap-0.5 rounded-lg bg-muted p-0.5`,children:S.map(e=>(0,L.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,role:`radio`,"data-compact":!0,"aria-checked":e.id===w.id,onClick:()=>h(e.id),className:q(`h-7 rounded-md px-2.5 text-xs font-medium transition-[background-color,color,box-shadow] duration-150 outline-none focus-visible:ring-3 focus-visible:ring-ring/40`,e.id===w.id?`bg-card text-foreground shadow-card`:`text-muted-foreground hover:text-foreground`),children:e.pill},e.id))}):(0,L.jsxs)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:[`To the `,w.pill.toLowerCase()]}),(0,L.jsx)(`div`,{className:`@container ml-auto flex min-w-0 flex-1 items-center justify-end overflow-hidden px-2`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-3.5`,children:[e.kind===`tab`&&e.tab===`plan`?(0,L.jsx)(BT,{chord:t.savePlan??`Ctrl+S`,className:`hidden @[34rem]:inline-flex`,children:`save plan`}):null,(0,L.jsx)(BT,{chord:`/`,className:`hidden group-focus-within/composer:!hidden @[28rem]:inline-flex`,children:`write`}),(0,L.jsx)(BT,{chord:`Esc`,className:`hidden group-[:not(:focus-within)]/composer:!hidden @[28rem]:inline-flex`,children:`tabs`}),(0,L.jsx)(BT,{chord:`Shift+Enter`,className:`hidden @[22rem]:inline-flex`,children:`new line`}),(0,L.jsx)(BT,{chord:`Enter`,className:`hidden @[11rem]:inline-flex`,children:`send`}),(0,L.jsxs)(`button`,{type:`button`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"data-compact":!0,onClick:n,className:`kbd-hint inline-flex h-7 shrink-0 items-center gap-1.5 rounded-lg px-1.5 text-xs text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40`,children:[(0,L.jsx)(zT,{chord:t.help??`Alt+H`,className:`kbd-hint`}),(0,L.jsx)(`span`,{className:`hidden @[8rem]:inline`,children:`shortcuts`})]})]})}),y&&w.id===`oracle`?(0,L.jsx)(xD,{label:`Stop`,icon:Nm,iconOnly:!0,compact:!0,title:`Stop the oracle?`,description:`The current response stops. Work already recorded is kept.`,confirmLabel:`Stop`,variant:`destructive`,onConfirm:()=>void oe()}):null,(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`Send`,"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,"data-compact":!0,onClick:()=>void A(),disabled:!ae,className:`relative inline-flex size-8 items-center justify-center rounded-lg bg-primary before:absolute before:-inset-1 before:content-[''] text-primary-foreground transition-[background-color,color,transform,filter] duration-150 ease-snap outline-none hover:brightness-110 focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95 disabled:bg-muted disabled:text-muted-foreground disabled:hover:brightness-100`,children:l?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5 text-primary-foreground`}):(0,L.jsx)(vf,{"aria-hidden":`true`,className:`size-4`,strokeWidth:2.25})})}),(0,L.jsxs)(wE,{children:[`Send `,(0,L.jsx)(zT,{chord:`Enter`})]})]})]}),d?(0,L.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 wJ(){try{return{id:Rd()}}catch(e){return{error:e.message}}}function TJ(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. Start a project in Pi, then refresh.`}}function EJ(){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 Ud(`projects.list`,{});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 DJ({data:e,error:t}){let n=wJ();return n.error??t??TJ(e,n.id)}function OJ({projects:e}){let t=DJ(e);return t?(0,L.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,L.jsx)(zm,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,L.jsx)(`span`,{children:t})]}):null}function kJ(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()}function AJ({projects:e,tab:t,name:n,branch:r}){let{data:i,busy:a,slow:o,refresh:s}=e,[c,l]=(0,m.useState)(!1),u=wJ(),d=DJ(e),f=u.error?`invalid`:u.id??i?.currentId??``,p=!!i?.projects.length;HE(`p`,()=>l(!0),{enabled:p}),HE(`r`,()=>void s(),{enabled:c,inDialog:!0});function h(e){l(!1),e!==f&&Bd(e,t)}return(0,L.jsxs)(`div`,{"aria-busy":a,className:`flex min-w-0 items-center gap-1.5`,children:[(0,L.jsxs)(Tw,{open:c&&p,onOpenChange:l,children:[(0,L.jsxs)(Ew,{type:`button`,role:`combobox`,"aria-label":`Project`,"aria-description":`${n}${r?`, branch ${r}`:``}`,"aria-haspopup":`listbox`,"aria-expanded":c&&p,"aria-keyshortcuts":`P ArrowDown`,disabled:!p,onKeyDown:e=>{e.key!==`ArrowDown`||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),l(!0))},className:`group flex h-10 min-w-0 items-center gap-2 rounded-lg px-2.5 text-sm font-medium outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 disabled:pointer-events-none aria-expanded:bg-accent`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q(`size-2.5 shrink-0 rounded-full`,d?`bg-destructive`:`bg-primary`)}),(0,L.jsx)(`span`,{className:`truncate`,children:n}),(0,L.jsx)(Mf,{"aria-hidden":`true`,className:q(`size-3.5 shrink-0 text-muted-foreground`,!p&&`opacity-40`)})]}),(0,L.jsx)(Dw,{children:(0,L.jsxs)(Ow,{align:`start`,sideOffset:6,"aria-label":`Projects`,onKeyDown:kJ,onOpenAutoFocus:e=>{let t=e.currentTarget?.querySelector(`[role='option'][aria-selected='true']`)??e.currentTarget?.querySelector(`[role='option']`);t&&(e.preventDefault(),t.focus())},className:`glass-pop z-50 flex 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`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border px-3 py-2`,children:[(0,L.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Running projects`}),(0,L.jsxs)(`button`,{type:`button`,onClick:()=>void s(),disabled:a,"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-3 focus-visible:ring-ring/40 disabled:opacity-60`,children:[a?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}):(0,L.jsx)(dm,{"aria-hidden":`true`,className:`size-3`}),`Refresh`,(0,L.jsx)(zT,{chord:`R`,className:`kbd-hint`})]})]}),(0,L.jsx)(`div`,{role:`listbox`,"aria-label":`Projects`,className:`flex max-h-72 flex-col overflow-y-auto p-1`,children:i?.projects.map(e=>{let t=e.id===f;return(0,L.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,onClick:()=>h(e.id),className:q(`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-3 focus-visible:ring-ring/30`,t&&`bg-accent`),children:[(0,L.jsx)(`span`,{className:`flex h-5 w-4 shrink-0 items-center justify-center`,children:t?(0,L.jsx)(Ef,{"aria-hidden":`true`,className:`size-3.5 text-primary`}):null}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`span`,{className:`block truncate text-sm font-medium`,children:e.name}),(0,L.jsxs)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:[e.cwd,` · :`,e.port]})]})]},e.id)})})]})})]}),r?(0,L.jsxs)(`span`,{className:`hidden min-w-0 items-center gap-1 rounded-md bg-muted px-2 py-1 text-xs text-muted-foreground sm:inline-flex`,children:[(0,L.jsx)(dp,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,L.jsx)(`span`,{className:`truncate`,children:r})]}):null,o||d?(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`Refresh projects`,disabled:a,onClick:()=>void s(),className:`inline-flex size-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 disabled:opacity-60`,children:a?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-4`}):(0,L.jsx)(dm,{"aria-hidden":`true`,className:`size-4`})})}),(0,L.jsx)(wE,{side:`bottom`,children:`Refresh projects`})]}):null]})}function jJ({state:e}){return e===`live`?(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`span`,{role:`img`,"aria-label":`Connected`,className:`grid size-6 place-items-center`,children:(0,L.jsx)(`span`,{className:`size-2 rounded-full bg-success`})})}),(0,L.jsx)(wE,{children:`Connected`})]}):e===`connecting`?(0,L.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3`}),`reconnecting…`]}):(0,L.jsx)(`span`,{className:`text-xs font-medium text-destructive`,children:`Connection lost`})}var MJ=`inline-flex size-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-[background-color,color,transform] duration-150 ease-snap outline-none hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/40 active:scale-95`;function NJ({label:e,hint:t,href:n,active:r,children:i}){return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`a`,{href:n,"aria-label":e,"aria-current":r?`page`:void 0,"aria-keyshortcuts":t,"aria-describedby":`focused-action-help`,className:q(MJ,r&&`bg-accent text-foreground`),children:i})}),(0,L.jsxs)(wE,{side:`bottom`,children:[e,` `,(0,L.jsx)(zT,{chord:t})]})]})}function PJ({hint:e,onHelp:t}){return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":`Keyboard shortcuts`,"aria-haspopup":`dialog`,"aria-keyshortcuts":e,"aria-describedby":`focused-action-help`,onClick:t,className:MJ,children:(0,L.jsx)(yp,{"aria-hidden":`true`,className:`size-[1.05rem]`})})}),(0,L.jsxs)(wE,{side:`bottom`,children:[`Keyboard shortcuts `,(0,L.jsx)(zT,{chord:e})]})]})}function FJ(){let e=NH(),t=e?`Unmute prompt sounds`:`Mute prompt sounds`;return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":t,"aria-pressed":e,"aria-describedby":`focused-action-help`,className:MJ,onClick:()=>jH(!e),children:e?(0,L.jsx)(qm,{"aria-hidden":`true`,className:`size-[1.05rem]`}):(0,L.jsx)(Gm,{"aria-hidden":`true`,className:`size-[1.05rem]`})})}),(0,L.jsx)(wE,{side:`bottom`,children:t})]})}function IJ(){let{theme:e,setTheme:t}=zU(),n=e===`dark`||e===`system`&&typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches;return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsx)(`button`,{type:`button`,"aria-label":n?`Switch to light mode`:`Switch to dark mode`,"aria-keyshortcuts":`D`,"aria-describedby":`focused-action-help`,onClick:()=>t(n?`light`:`dark`),className:MJ,children:n?(0,L.jsx)(Fm,{"aria-hidden":`true`,className:`size-[1.05rem]`}):(0,L.jsx)(Up,{"aria-hidden":`true`,className:`size-[1.05rem]`})})}),(0,L.jsxs)(wE,{side:`bottom`,children:[n?`Light mode`:`Dark mode`,` `,(0,L.jsx)(zT,{chord:`D`})]})]})}function LJ({busy:e,task:t,sessionName:n}){return(0,L.jsxs)(`div`,{className:`mr-1 flex min-w-0 items-center gap-2 text-[0.8125rem]`,children:[e?(0,L.jsx)(fE,{"aria-hidden":`true`,role:`presentation`,className:`size-3.5`}):null,t?(0,L.jsxs)(`span`,{className:`hidden max-w-[16rem] truncate md:inline`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:t.id}),(0,L.jsxs)(`span`,{className:`hidden text-muted-foreground min-[1500px]:inline`,children:[` · `,t.state.replace(/_/g,` `)]})]}):(0,L.jsx)(`span`,{className:`hidden max-w-[10rem] truncate text-muted-foreground min-[1500px]:inline`,children:n??`no task in this session`})]})}function RJ({status:e,task:t,connection:n,route:r,tabs:i,extra:a,keys:o,onHelp:s}){let c=e?.workspace.name??`bot-lobby`,l=e?.branch??e?.workspace.branch,u=e?.busy??!1,d=EJ();return(0,L.jsxs)(`header`,{className:`app-header shrink-0`,children:[(0,L.jsx)(`div`,{className:`where flex min-w-0 items-center`,children:(0,L.jsx)(AJ,{projects:d,tab:r.kind===`tab`?r.tab:r.kind,name:c,branch:l})}),(0,L.jsx)(`div`,{className:`tabs min-w-0`,children:i}),(0,L.jsxs)(`div`,{className:`tools flex min-w-0 items-center justify-end gap-0.5`,children:[a,(0,L.jsx)(LJ,{busy:u,...t?{task:t}:{},...e?.sessionName?{sessionName:e.sessionName}:{}}),(0,L.jsx)(jJ,{state:n}),(0,L.jsx)(NJ,{label:`Sessions`,hint:o.sessions??`Alt+O`,href:`#/sessions`,active:r.kind===`sessions`,children:(0,L.jsx)(xp,{"aria-hidden":`true`,className:`size-[1.05rem]`})}),(0,L.jsx)(NJ,{label:`Settings`,hint:o.settings??`Alt+S`,href:`#/settings`,active:r.kind===`settings`,children:(0,L.jsx)(Tm,{"aria-hidden":`true`,className:`size-[1.05rem]`})}),(0,L.jsx)(PJ,{hint:o.help??`Alt+H`,onHelp:s}),(0,L.jsx)(IJ,{}),(0,L.jsx)(FJ,{}),(0,L.jsx)(`span`,{id:`focused-action-help`,className:`sr-only`,children:`Focused buttons: Enter or Space. Links: Enter. Checkboxes: Space.`})]}),(0,L.jsx)(OJ,{projects:d})]})}function zJ(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 BJ(){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 Gd()?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(zJ(e))}return(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center p-6`,children:(0,L.jsxs)(`form`,{onSubmit:s,className:`glass flex w-full max-w-md flex-col gap-4 rounded-xl p-6`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(_p,{className:`size-5`,"aria-hidden":`true`}),(0,L.jsx)(`h1`,{className:`text-base font-medium`,children:`Sign in to bot-lobby`})]}),(0,L.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Pi printed a link when it started (or run `,(0,L.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,L.jsxs)(`label`,{className:`flex flex-col gap-1.5 text-sm`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`Lobby link or token`}),(0,L.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 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`})]}),n?(0,L.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:n}):null,(0,L.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,L.jsx)(J,{type:`button`,variant:`ghost`,disabled:i,onClick:()=>void o(void 0),children:`Retry`}),(0,L.jsx)(J,{type:`submit`,disabled:i||!e.trim(),children:`Sign in`})]})]})})}var VJ={lobby:Fp,tasks:Cp,plan:_m,quickfix:$m,issues:Bf,metrics:wf,git:pp,knowledge:bf,excalidraw:$p};function HJ(e){return/(\d)$/.exec(e)?.[1]}var UJ=(0,m.forwardRef)(function({tab:e,active:t},n){let r=HJ(e.key),i=VJ[e.id];return(0,L.jsxs)(SE,{children:[(0,L.jsx)(CE,{asChild:!0,children:(0,L.jsxs)(`a`,{ref:n,role:`tab`,id:`tab-${e.id}`,href:`#/${e.id}`,"aria-selected":t,"aria-keyshortcuts":e.key,tabIndex:t?0:-1,className:q(`relative z-10 inline-flex h-10 shrink-0 items-center gap-1.5 rounded-lg px-3 text-[0.8125rem] leading-none font-medium whitespace-nowrap outline-none`,`transition-colors duration-300 ease-snap focus-visible:ring-3 focus-visible:ring-ring/40`,t?`text-foreground`:`text-muted-foreground hover:text-foreground`),children:[i?(0,L.jsx)(i,{"aria-hidden":`true`,className:q(`size-4 shrink-0 transition-colors duration-300`,t&&`text-primary`)}):null,r?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q(`text-[0.72rem] font-semibold tabular-nums transition-colors duration-300`,t?`text-primary`:`text-muted-foreground/75`),children:r}):null,(0,L.jsx)(`span`,{children:e.label})]})}),(0,L.jsxs)(wE,{children:[e.label,` `,(0,L.jsx)(zT,{chord:e.key})]})]})}),WJ=e=>Math.min(1,Math.max(0,e)),GJ=e=>e*e*e,KJ=e=>1-(1-e)**3,qJ=e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2;function JJ(e,t,n=t?.left??0,r=t?.right??0){if(e){if(!t||r-n<.5){e.style.opacity=`0`;return}e.style.opacity=`1`,e.style.top=`${t.top}px`,e.style.height=`${t.height}px`,e.style.width=`${r-n}px`,e.style.transform=`translateX(${n}px)`}}function YJ(e,t){let n=(0,m.useRef)(null),r=(0,m.useRef)(null),i=(0,m.useRef)(null),a=(0,m.useRef)({}),o=(0,m.useRef)([]),s=(0,m.useRef)(void 0),c=(0,m.useRef)(0),l=(0,m.useCallback)(e=>{let t=e?a.current[e]:void 0;return t?{left:t.offsetLeft,right:t.offsetLeft+t.offsetWidth,top:t.offsetTop,height:t.offsetHeight}:void 0},[]),u=(0,m.useCallback)(e=>{cancelAnimationFrame(c.current),s.current=e,JJ(r.current,l(e)),JJ(i.current,void 0);for(let e of o.current)e&&(e.style.width=`0px`)},[l]),d=(0,m.useCallback)((e,t)=>{let n=l(e),a=l(t);if(!n||!a)return u(t);cancelAnimationFrame(c.current),s.current=t;let d=a.left>n.left?1:-1,f=d>0?n.right:n.left,p=d>0?a.left:a.right,m=Math.abs(p-f),h=Math.min(560,Math.max(220,160+m*.45)),g=94.5,_=g+h,v=Math.max(_+280,210+h),y=o.current.map(e=>{let t=e?.parentElement;return t?{liquid:e,from:t.offsetLeft,to:t.offsetLeft+t.offsetWidth}:void 0}),b=performance.now(),x=e=>{let o=e-b,s=GJ(WJ(o/210)),l=(n.right-n.left)*s;JJ(i.current,n,d>0?n.left+l:n.left,d>0?n.right:n.right-l);let p=f+d*m*qJ(WJ((o-g)/h)),S=f+d*m*qJ(WJ((o-210)/h)),C=Math.min(p,S),w=Math.max(p,S);for(let e of y){if(!e?.liquid)continue;let t=Math.max(C,e.from),n=Math.min(w,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 T=(a.right-a.left)*KJ(WJ((o-_)/280));JJ(r.current,a,d>0?a.left:a.right-T,d>0?a.left+T:a.right),o<v?c.current=requestAnimationFrame(x):u(t)};c.current=requestAnimationFrame(x)},[l,u]);(0,m.useLayoutEffect)(()=>{let t=s.current,n=typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;!t||!e||t===e||n?u(e):d(t,e)},[e,t,d,u]);let f=(0,m.useRef)(e);return f.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}u(f.current)});return r.observe(e),()=>{r.disconnect(),cancelAnimationFrame(c.current)}},[u]),{track:n,fill:r,drain:i,cells:a,liquids:o}}function XJ(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 ZJ({tabs:e,activeId:t,onSelect:n}){let{track:r,fill:i,drain:a,cells:o,liquids:s}=YJ(t,e.length),c=(0,m.useRef)(null),[l,u]=(0,m.useState)({left:!1,right:!1}),d=(0,m.useCallback)(()=>{let e=c.current;if(!e)return;let t=e.scrollLeft>2,n=e.scrollLeft+e.clientWidth<e.scrollWidth-2;u(e=>e.left===t&&e.right===n?e:{left:t,right:n})},[]);(0,m.useEffect)(()=>{let e=c.current;if(!e||typeof ResizeObserver>`u`)return;d();let t=new ResizeObserver(d);return t.observe(e),e.firstElementChild&&t.observe(e.firstElementChild),()=>t.disconnect()},[d,e.length]),(0,m.useEffect)(()=>{let e=c.current,n=t?o.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,o]);function f(r){if(r.key===`ArrowDown`&&!r.altKey){FE()&&r.preventDefault();return}let i=r.key===`ArrowRight`?1:r.key===`ArrowLeft`?-1:0;if(!i||e.length===0)return;r.preventDefault();let a=e[(Math.max(0,e.findIndex(e=>e.id===t))+i+e.length)%e.length];LE.active=!0,window.setTimeout(()=>{LE.active=!1},3e3),n(a.id),o.current[a.id]?.focus({preventScroll:!0})}return(0,L.jsx)(`div`,{ref:c,onScroll:d,style:{maskImage:XJ(l),WebkitMaskImage:XJ(l)},className:`min-w-0 max-w-full overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,L.jsxs)(`div`,{ref:r,role:`tablist`,"aria-label":`Lobby tabs`,onKeyDown:f,className:`relative mx-auto flex w-max items-center gap-1 py-0.5`,children:[(0,L.jsx)(`span`,{ref:a,"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,L.jsx)(`span`,{ref:i,"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`}),e.map((e,n)=>(0,L.jsxs)(m.Fragment,{children:[n>0?(0,L.jsxs)(`span`,{"aria-hidden":`true`,"data-tab-link":!0,className:`relative h-[2px] w-3 shrink-0 sm:w-4`,children:[(0,L.jsx)(`span`,{className:`absolute inset-0 border-t-2 border-dotted border-input`}),(0,L.jsx)(`span`,{ref:e=>{s.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,L.jsx)(UJ,{ref:t=>{o.current[e.id]=t},tab:e,active:e.id===t})]},e.id))]})})}function QJ(){let e=globalThis.DOMParser;if(!e)throw Error(`DOMParser is unavailable`);return new e}var $J=`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'`,eY=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(` `)),tY=new Set(`class id title role aria-label aria-hidden colspan rowspan scope`.split(` `));function nY(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 rY(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(!eY.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`,rY(t.value)):tY.has(t.name)||e.removeAttribute(t.name);e.localName===`style`&&(e.textContent=rY(e.textContent??``));for(let t of[...e.children])iY(t)}function aY(e,t){try{return oY(e,t??QJ())}catch{return`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${$J}"><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 oY(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="${$J}"><meta name="referrer" content="no-referrer"><style>body{margin:16px;overflow-wrap:anywhere}*{box-sizing:border-box}${rY(e.css??``).replace(/</g,`\\3c `)}</style>${r}</head><body>${n.body.innerHTML}</body></html>`}function sY({preview:e,label:t}){let n=(0,m.useMemo)(()=>aY(e),[e]);return(0,L.jsx)(`iframe`,{title:`Static mockup: ${t}`,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:n,className:`h-80 w-full rounded-lg border bg-background`})}var cY=/\s*\(recommended\)\s*$/i,lY=`Type something.`;function uY(e){return{text:e.replace(cY,``),recommended:cY.test(e)}}function dY({label:e}){let{text:t,recommended:n}=uY(e);return(0,L.jsxs)(`span`,{className:`leading-snug`,children:[t,n?(0,L.jsx)(`span`,{className:`ms-1 font-medium text-primary`,children:`(Recommended)`}):null]})}function fY({multi:e,on:t}){return(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:q(`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,L.jsx)(Ef,{className:q(e?`size-3`:`hidden`)}):null,t&&!e?(0,L.jsx)(`span`,{className:`size-2 rounded-full bg-primary-foreground`}):null]})}function pY({option:e,index:t,multi:n,name:r,selected:i,onToggle:a,onFocusOption:o}){return(0,L.jsxs)(`div`,{className:`grid gap-1`,children:[(0,L.jsxs)(`label`,{className:q(`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]`,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,L.jsx)(`input`,{type:n?`checkbox`:`radio`,name:r,"data-nav":``,"data-option":t,className:`sr-only`,checked:i,onChange:a,onFocus:o}),(0,L.jsx)(fY,{multi:n,on:i}),(0,L.jsx)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:(0,L.jsxs)(`span`,{className:`flex gap-1.5`,children:[(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground tabular-nums`,children:[t+1,`.`]}),(0,L.jsx)(dY,{label:e.label})]})})]}),e.description?(0,L.jsx)(DL,{text:e.description,className:`px-3 text-muted-foreground`}):null]})}function mY({option:e}){return!e||!e.preview&&!e.image&&!e.htmlPreview?null:(0,L.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-lg border bg-muted/30 p-3`,children:[(0,L.jsxs)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:[`Preview · `,uY(e.label).text]}),e.image?(0,L.jsx)(`img`,{src:zd(e.image),alt:``,loading:`lazy`,className:`max-h-64 w-full rounded-lg border object-contain`}):null,e.htmlPreview?(0,L.jsx)(sY,{preview:e.htmlPreview,label:uY(e.label).text}):null,e.preview?(0,L.jsx)(DL,{text:e.preview,className:`text-xs`}):null]})}function hY({primary:e,primaryLabel:t,disabled:n,submitting:r,onCancel:i}){return(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,L.jsx)(J,{type:`button`,variant:`ghost`,onClick:i,children:`Cancel`}),(0,L.jsx)(J,{type:e,disabled:n||r,children:r?`Sending…`:t})]})}function gY(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 _Y({questions:e,picks:t,own:n,index:r,onGo:i}){return e.length===1?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e[0]?.header}):(0,L.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,L.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:q(`inline-flex min-h-8 items-center gap-1 rounded-lg border px-3 text-xs font-medium transition-colors`,a===r?`border-primary bg-primary/10 text-primary`:`border-border text-muted-foreground hover:bg-muted`),children:[a+1,` `,e.header,o?(0,L.jsx)(Ef,{className:`size-3`,"aria-hidden":`true`}):null]},a)})})}function vY({questions:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)({}),[c,l]=(0,m.useState)({}),[u,d]=(0,m.useState)({}),f=(0,m.useRef)(null),p=e[i],h=o[i]??[],g=c[i]??``,_=p?.options[u[i]??h[0]??0],v=gY(e,o,c,i),y=p?.multiSelect===!0;if((0,m.useEffect)(()=>{let e=f.current;e&&(e.querySelector(`[data-option="${o[i]?.[0]??0}"]`)??e.querySelector(`[data-nav]`))?.focus()},[i]),!p)return null;function b(e){let t=y?h.includes(e)?h.filter(t=>t!==e):[...h,e]:[e];s({...o,[i]:t}),y||l({...c,[i]:``}),d({...u,[i]:e})}function x(t,r){if(gY(e,t,r,i)){if(i<e.length-1){a(i+1);return}n({answers:e.map((n,i)=>gY(e,t,r,i)).filter(e=>!!e),cancelled:!1})}}function S(e){e.preventDefault(),t||x(o,c)}function C(t){t>=0&&t<e.length&&a(t)}function w(e){let n=e.target,r=f.current;if(!r||e.altKey)return;if(e.key===`Enter`&&(e.ctrlKey||e.metaKey)){e.preventDefault(),t||x(o,c);return}if(n instanceof HTMLTextAreaElement){e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing?(e.preventDefault(),t||x(o,c)):e.key===`ArrowUp`&&n.selectionStart===0&&n.selectionEnd===0&&(e.preventDefault(),EE(r,n,-1));return}let a=OE(e.key);if(a){e.preventDefault(),EE(r,n,a);return}if(e.key===`Home`||e.key===`End`){e.preventDefault(),EE(r,n,e.key===`Home`?`first`:`last`);return}let u=kE(e.key);if(u&&!(n instanceof HTMLButtonElement)){e.preventDefault(),C(i+u);return}let d=n instanceof HTMLInputElement&&n.dataset.option!==void 0?Number(n.dataset.option):-1;if(e.key===`Enter`&&d>=0){if(e.preventDefault(),y)h.length>0&&h.includes(d)?x(o,c):b(d);else{let e={...o,[i]:[d]},t={...c,[i]:``};s(e),l(t),x(e,t)}return}if(e.key===` `&&d>=0){e.preventDefault(),b(d);return}let m=Number(e.key);Number.isInteger(m)&&m>=1&&m<=p.options.length&&(e.preventDefault(),b(m-1),r.querySelector(`[data-option="${m-1}"]`)?.focus())}return(0,L.jsxs)(`form`,{ref:f,className:`flex flex-col gap-3`,onSubmit:S,onKeyDown:w,children:[(0,L.jsx)(_Y,{questions:e,picks:o,own:c,index:i,onGo:a}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.length>1?`Question ${i+1} of ${e.length}`:`Question`}),(0,L.jsx)(DL,{text:p.question,className:`mt-1 text-base`})]}),(0,L.jsxs)(`div`,{className:q(`grid min-w-0 gap-4`,_?.preview||_?.image||_?.htmlPreview?`lg:grid-cols-[minmax(0,1.1fr)_minmax(0,1fr)]`:``),children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[p.options.map((e,t)=>(0,L.jsx)(pY,{option:e,index:t,multi:y,name:`question-${i}`,selected:h.includes(t),onToggle:()=>b(t),onFocusOption:()=>d({...u,[i]:t})},t)),(0,L.jsxs)(`label`,{className:`flex min-h-9 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`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:lY}),(0,L.jsx)(aD,{"data-nav":``,value:g,onChange:e=>{l({...c,[i]:e.target.value}),e.target.value&&s({...o,[i]:[]})},placeholder:lY,"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`})]})]}),(0,L.jsx)(mY,{option:_})]}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(`span`,{children:y?`Pick several`:`Pick one`}),(0,L.jsx)(BT,{chord:`↑↓`,children:`move`}),(0,L.jsx)(BT,{chord:y?`Space`:`Enter`,children:y?`pick`:`choose`}),y?(0,L.jsx)(BT,{chord:`Enter`,children:`next`}):null,e.length>1?(0,L.jsx)(BT,{chord:`←→`,children:`question`}):null,(0,L.jsx)(BT,{chord:`Esc`,children:`later`})]}),(0,L.jsx)(hY,{primary:`submit`,primaryLabel:i<e.length-1?`Next`:`Answer`,disabled:!v,submitting:t,onCancel:r})]})}function yY(e,t,n){let r=e.currentTarget,i=e.target;if(e.altKey||DE(i))return;let a=OE(e.key);if(a){e.preventDefault(),EE(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 bY({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,L.jsxs)(`form`,{ref:o,className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i&&n(i)},onKeyDown:r=>yY(r,e.options.length,(r,i)=>{let o=e.options[r];o!==void 0&&(a(o),i&&!t&&n(o))}),children:[(0,L.jsx)(DL,{text:e.title,className:`text-base`}),(0,L.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.options.map((e,t)=>(0,L.jsx)(pY,{option:{label:e},index:t,multi:!1,name:`choice`,selected:i===e,onToggle:()=>a(e)},e))}),(0,L.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,L.jsx)(BT,{chord:`↑↓`,children:`move`}),(0,L.jsx)(BT,{chord:`Enter`,children:`choose`}),(0,L.jsx)(BT,{chord:`Esc`,children:`later`})]}),(0,L.jsx)(hY,{primary:`submit`,primaryLabel:`Choose`,disabled:!i,submitting:t,onCancel:r})]})}function xY({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,L.jsxs)(`div`,{ref:r,tabIndex:-1,"data-autofocus":``,onKeyDown:i,className:`flex flex-col gap-3 outline-none`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(DL,{text:e.question,className:`text-base`}),e.detail?(0,L.jsx)(DL,{text:e.detail,className:`mt-1 text-muted-foreground`}):null]}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,L.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,L.jsx)(BT,{chord:`Y`,children:`yes`}),(0,L.jsx)(BT,{chord:`N`,children:`no`}),(0,L.jsx)(BT,{chord:`Esc`,children:`later`})]}),(0,L.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n(!1),children:`No`}),(0,L.jsx)(J,{type:`button`,disabled:t,onClick:()=>n(!0),children:t?`Sending…`:`Yes`})]})]})]})}function SY({view:e,submitting:t,onAnswer:n,onCancel:r}){let[i,a]=(0,m.useState)(``);return(0,L.jsxs)(`form`,{className:`flex flex-col gap-3`,onSubmit:e=>{e.preventDefault(),i.trim()&&n(i.trim())},children:[(0,L.jsx)(DL,{text:e.question,className:`text-base`}),(0,L.jsx)(aD,{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??lY,"aria-label":e.question,rows:3,className:`min-h-9 resize-none text-sm md:text-sm`}),(0,L.jsxs)(`p`,{className:`flex items-center gap-x-4 text-xs text-muted-foreground`,children:[(0,L.jsx)(BT,{chord:`Enter`,children:`answer`}),(0,L.jsx)(BT,{chord:`Shift+Enter`,children:`new line`}),(0,L.jsx)(BT,{chord:`Esc`,children:`later`})]}),(0,L.jsx)(hY,{primary:`submit`,primaryLabel:`Answer`,disabled:!i.trim(),submitting:t,onCancel:r})]})}function CY({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,L.jsxs)(`form`,{ref:l,className:`flex flex-col gap-3`,onSubmit:u,onKeyDown:r=>{e.method===`select`&&yY(r,s.length,(e,r)=>{let i=s[e];i!==void 0&&(o(i),r&&!t&&n({value:i}))})},children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.title}),e.message?(0,L.jsx)(DL,{text:e.message,className:`mt-1 text-base`}):null]}),e.method===`select`?(0,L.jsx)(`div`,{className:`flex flex-col gap-2`,children:s.map((e,t)=>(0,L.jsx)(pY,{option:{label:e},index:t,multi:!1,name:`dialog`,selected:a===e,onToggle:()=>o(e)},e))}):null,e.method===`input`||e.method===`editor`?(0,L.jsx)(aD,{value:r,onChange:e=>i(e.target.value),placeholder:e.placeholder??lY,"aria-label":e.title,rows:e.method===`editor`?4:2,className:`min-h-9 resize-none text-sm md:text-sm`}):null,(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,L.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({cancelled:!0}),children:`Cancel`}),e.method===`confirm`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(J,{type:`button`,variant:`outline`,disabled:t,onClick:()=>n({confirmed:!1}),children:`No`}),(0,L.jsx)(J,{type:`button`,disabled:t,onClick:()=>n({confirmed:!0}),children:t?`Sending…`:`Yes`})]}):(0,L.jsx)(J,{type:`submit`,disabled:!c||t,children:t?`Sending…`:`Answer`})]})]})}function wY(e){let{view:t}=e;return t.kind===`questionnaire`?(0,L.jsx)(vY,{questions:t.questions,submitting:e.submitting,onAnswer:e.onAnswer,onCancel:e.onCancel}):t.kind===`choose`?(0,L.jsx)(bY,{...e,view:t}):t.kind===`confirm`?(0,L.jsx)(xY,{...e,view:t}):t.kind===`text`?(0,L.jsx)(SY,{...e,view:t}):(0,L.jsx)(CY,{...e,dialog:t.dialog})}function TY(e){return typeof e==`object`&&e?e:{}}function EY(e){return typeof e==`string`?e.trim():``}function DY(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function OY(e){let t=TY(e),n=EY(t.label);if(!n)return;let r=EY(t.description),i=EY(t.preview),a=EY(t.image),o=nY(t.htmlPreview);return{label:n,...r?{description:r}:{},...i?{preview:i}:{},...a?{image:a}:{},...o?{htmlPreview:o}:{}}}function kY(e){let t=TY(e),n=EY(t.question);if(!n)return;let r=(Array.isArray(t.options)?t.options:[]).map(OY).filter(e=>!!e);return{question:n,header:EY(t.header)||`Question`,options:r,...t.multiSelect===!0?{multiSelect:!0}:{}}}function AY(e){let t=TY(e),n=EY(t.method);if(n!==`select`&&n!==`confirm`&&n!==`input`&&n!==`editor`)return;let r=EY(t.message),i=DY(t.options),a=EY(t.placeholder),o=EY(t.prefill);return{id:EY(t.id),method:n,title:EY(t.title)||`Answer`,...r?{message:r}:{},...i.length>0?{options:i}:{},...a?{placeholder:a}:{},...o?{prefill:o}:{}}}function jY(e){let t=(Array.isArray(e.questions)?e.questions:[]).map(kY).filter(e=>!!e);return t.length>0?{kind:`questionnaire`,questions:t}:void 0}function MY(e){return{kind:`choose`,title:EY(e.title)||`Choose an option`,options:DY(e.options)}}function NY(e){let t=EY(e.question)||EY(e.title)||`Continue?`,n=EY(e.detail)||EY(e.message);return{kind:`confirm`,question:t,...n?{detail:n}:{}}}function PY(e){let t=EY(e.question)||EY(e.title)||`Type an answer`,n=EY(e.placeholder);return{kind:`text`,question:t,...n?{placeholder:n}:{}}}function FY(e){let t=TY(e.payload);if(e.kind===`questionnaire`)return jY(t);if(e.kind===`choose`)return MY(t);if(e.kind===`confirm`)return NY(t);if(e.kind===`text`)return PY(t);let n=AY(t.dialog);return n?{kind:`sessionDialog`,dialog:n}:void 0}function IY({submitting:e,onKeep:t,onLeave:n}){return(0,L.jsxs)(`div`,{className:`flex flex-col gap-4`,role:`alert`,children:[(0,L.jsx)(`p`,{className:`text-sm`,children:`Leave without answering? The oracle will not guess for you.`}),(0,L.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,L.jsx)(J,{type:`button`,variant:`outline`,onClick:t,children:`Keep answering`}),(0,L.jsx)(J,{type:`button`,disabled:e,onClick:n,children:e?`Leaving…`:`Leave`})]})]})}function LY({count:e,onOpen:t}){return(0,L.jsxs)(J,{type:`button`,variant:`soft`,onClick:t,"aria-label":`${e} question${e===1?``:`s`} waiting — open`,className:`gap-1.5 text-warning`,children:[(0,L.jsx)(Hf,{"aria-hidden":`true`}),(0,L.jsx)(`span`,{className:`tabular-nums`,children:e}),(0,L.jsx)(`span`,{className:`hidden sm:inline`,children:`waiting`})]})}function RY({prompts:e,answer:t,dismiss:n,minimized:r,onMinimize:i}){let[a,o]=(0,m.useState)(!1),[s,c]=(0,m.useState)(!1),l=e.length,u=e[0],d=u?FY(u):void 0,f=l>0&&!r,p=YT(f,JT.question);(0,m.useEffect)(()=>{l===0&&(o(!1),i(!1))},[l,i]);async function h(e,t){c(!0);try{await e,o(!1)}catch(e){e instanceof Vd&&e.code===`question_withdrawn`?Nd($T):Nd.error(e instanceof Error?e.message:t)}finally{c(!1)}}let g=u?.from?`${u.from} asks`:`A question`;return(0,L.jsx)(VT,{open:f&&p&&!!u,label:`Question from the lobby`,dismissOnBackdrop:!1,onOpenChange:e=>{e||(a?o(!1):i(!0))},className:`max-w-3xl`,children:u?(0,L.jsxs)(`section`,{"aria-label":`Question from the lobby`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`header`,{className:`flex items-center gap-3 px-6 pt-5 pb-3`,children:[(0,L.jsxs)(`p`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-muted-foreground first-letter:uppercase`,children:[g,l>1?` · 1 of ${l}`:``]}),(0,L.jsx)(J,{type:`button`,variant:`ghost`,size:`icon`,"aria-label":`Later: put the question away`,title:`Later · Esc`,onClick:()=>i(!0),children:(0,L.jsx)(Zm,{"aria-hidden":`true`})})]}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 pb-6`,children:d?a?(0,L.jsx)(IY,{submitting:s,onKeep:()=>o(!1),onLeave:()=>void h(n(u.id),`Could not leave the question`)}):(0,L.jsx)(wY,{view:d,submitting:s,onAnswer:e=>void h(t(u.id,e),`Could not send the answer`),onCancel:()=>o(!0)},u.id):(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This question cannot be shown here.`}),(0,L.jsx)(J,{type:`button`,disabled:s,onClick:()=>void h(n(u.id),`Could not dismiss the question`),children:`Dismiss`})]})})]}):null})}var zY=2;function BY(e){let t=globalThis.EventSource;if(!t)throw Error(`EventSource is not available in this environment`);return new t(e)}function VY(e){try{return JSON.parse(e)}catch{return}}function HY(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 UY(e,t=BY){let n=t(zd(`/api/events`));return e.onConnection?.(`connecting`),n.onopen=()=>e.onConnection?.(`live`),n.onerror=()=>e.onConnection?.(n.readyState===zY?`offline`:`connecting`),n.onmessage=t=>{let n=VY(t.data);n&&HY(n,e)},()=>n.close()}function WY(){let e=(0,m.useRef)(void 0),t=(0,m.useCallback)(()=>{e.current?.();try{Rd()}catch{wd.onStatus({connection:`offline`});return}e.current=UY({onHello:e=>wd.onHello(e),onChanged:(e,t)=>wd.onChanged(e,t),onFeed:e=>wd.onFeedDelta(e),onReply:e=>wd.onReplyDelta(e),onNotice:(e,t)=>Nd[t](e),onConnection:e=>wd.onStatus({connection:e})})},[]);return(0,m.useEffect)(()=>(t(),()=>e.current?.()),[t]),t}function GY(){let e=vE(`prompts`),t=(0,m.useCallback)(async(e,t)=>{await Ud(`prompts.answer`,{id:e,answer:t})},[]),n=(0,m.useCallback)(async e=>{await Ud(`prompts.dismiss`,{id:e})},[]);return{prompts:e.data?.prompts??[],loading:e.loading,error:e.error,answer:t,dismiss:n}}function KY(e,t,n,r){e===`search`?(document.querySelector(`#main input[type='search']`)??document.getElementById(`composer-text`))?.focus():e===`help`?n():e===`settings`?iE(`#/settings`):e===`sessions`?iE(`#/sessions`):e===`activity`||e===`thinking`?t.kind===`tab`&&t.tab===`lobby`?SB(`lobby.${e}`):iE(rE(`lobby`)):e===`nextTab`?r(1):e===`prevTab`?r(-1):e===`savePlan`&&t.kind===`tab`&&t.tab===`plan`&&V(`planner.save`,{})}function qY({connection:e,onRetry:t}){return e===`offline`?(0,L.jsx)(hE,{onRetry:t}):null}function JY(e){return e.kind===`tab`?e.tab:e.kind}function YY(){let e=aE(),t=vE(`status`),n=vE(`lobby`),{prompts:r,answer:i,dismiss:a}=GY(),{connection:o,signedOut:s}=_E(),[c,l]=(0,m.useState)(!1),[u,d]=(0,m.useState)(!1),f=(0,m.useRef)(null),p=WY();tU();let h=t.data,g=h?.tabs??[],_=h?.keys??[],v=e.kind===`tab`?e.tab:void 0,y=(0,m.useCallback)(e=>iE(rE(e)),[]),b=(0,m.useCallback)(e=>{if(g.length===0)return;let t=Math.max(0,g.findIndex(e=>e.id===v)),n=g[(t+e+g.length)%g.length];n&&iE(rE(n.id))},[g,v]),x=(0,m.useCallback)(()=>l(e=>!e),[]),S=(0,m.useCallback)(t=>{(t!==`thinking`&&t!==`activity`||h?.panels?.[t]!==!1)&&KY(t,nE(window.location.hash)??e,x,b)},[e,x,b,h?.panels]),C=(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},[]);vV({enabled:!!h,keys:_,tabs:g,insideApp:C,onAction:S,onTab:y});let w=(0,m.useCallback)(()=>wd.onHello({}),[]),T=e.kind===`tab`?e.tab:e.kind,E=!!h;(0,m.useEffect)(()=>{if(!E)return;if(LE.active){LE.active=!1;return}let e=requestAnimationFrame(()=>{document.activeElement?.id===`composer-text`||document.querySelector(`[role='dialog']`)||document.getElementById(`main`)?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(e)},[T,E]);let ee=Object.fromEntries(_.map(e=>[e.action,e.label])),D=(0,L.jsx)(RJ,{status:h,task:n.data?.task,connection:o,route:e,keys:ee,onHelp:x,tabs:(0,L.jsx)(ZJ,{tabs:g,activeId:v,onSelect:y}),extra:u&&r.length>0?(0,L.jsx)(LY,{count:r.length,onOpen:()=>d(!1)}):null});return s||!h?(0,L.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col`,children:[D,(0,L.jsx)(`main`,{className:`surface mx-3 mb-3 flex min-h-0 flex-1 flex-col overflow-y-auto max-sm:mx-0 max-sm:mb-0`,children:s?(0,L.jsx)(BJ,{}):t.error?(0,L.jsx)(mE,{message:t.error,onRetry:w}):(0,L.jsx)(pE,{})})]}):(0,L.jsxs)(`div`,{ref:f,className:`fixed inset-0 flex flex-col`,children:[D,(0,L.jsx)(qY,{connection:o,onRetry:p}),(0,L.jsx)(`main`,{id:`main`,tabIndex:-1,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||DE(e.target)||e.target.closest(`[role='dialog'], [role='menu'], [role='listbox']`)||IE()&&e.preventDefault()},role:v?`tabpanel`:void 0,"aria-labelledby":v?`tab-${v}`:void 0,className:`surface mx-3 mb-3 flex min-h-0 flex-1 flex-col overflow-y-auto outline-none max-sm:mx-0 max-sm:mb-0`,children:(0,L.jsx)(B.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:Qq(e)},JY(e))}),(0,L.jsx)(CJ,{route:e,keys:ee,onHelp:x}),(0,L.jsx)(RY,{prompts:r,answer:i,dismiss:a,minimized:u,onMinimize:d}),(0,L.jsx)(lJ,{open:c,onOpenChange:l,keys:_,tabs:g})]})}async function XY(e){switch(e){case`status`:return Ud(`status.get`,{});case`lobby`:return Ud(`lobby.snapshot`,{});case`prompts`:return Ud(`prompts.list`,{});default:return}}var ZY=[`status`,`lobby`,`prompts`];function QY(){let[e,t]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let e=!0;return(async()=>{await Gd(),e&&(wd.markUsed(ZY,XY),t(!0))})(),()=>{e=!1}},[]),e}function $Y(){return QY()?(0,L.jsx)(YY,{}):(0,L.jsx)(`div`,{className:`fixed inset-0 flex`,children:(0,L.jsx)(pE,{})})}var eX={info:hp,success:Rf,warning:zm,error:Kf},tX={info:`text-primary`,success:`text-success`,warning:`text-warning`,error:`text-destructive`};function nX(){let{item:e,waiting:t}=Fd(),n=ZT(),r=e&&!n;return(0,m.useEffect)(()=>{if(!e||n)return;let r=window.setTimeout(()=>Md(e.id),t>0?Math.min(e.duration,1600):e.duration);return()=>window.clearTimeout(r)},[e,n,t]),(0,L.jsx)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`pointer-events-none fixed inset-x-0 z-40 flex justify-center px-4`,style:{bottom:`calc(var(--composer-h, 0px) + 0.25rem)`},children:(0,L.jsx)(xl,{mode:`wait`,children:r?(0,L.jsxs)(B.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-3 rounded-xl border border-glass-border bg-popover/80 px-4 py-2.5 text-sm text-popover-foreground shadow-glass backdrop-blur-xs`,children:[(0,L.jsx)(rX,{kind:e.kind}),(0,L.jsx)(`span`,{className:`min-w-0 break-words`,children:e.message}),e.action?(0,L.jsx)(`button`,{"aria-keyshortcuts":`Enter Space`,"aria-describedby":`focused-action-help`,type:`button`,className:`-my-2 -mr-2 h-8 shrink-0 rounded-lg px-3 font-medium text-primary transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/40 focus-visible:outline-none`,onClick:()=>{e.action?.onClick(),Md(e.id)},children:e.action.label}):null]},e.id):null})})}function rX({kind:e}){let t=eX[e];return(0,L.jsx)(t,{"aria-hidden":`true`,className:q(`size-5 shrink-0`,tX[e])})}(0,yd.createRoot)(document.getElementById(`root`)).render((0,L.jsx)(m.StrictMode,{children:(0,L.jsx)(RU,{children:(0,L.jsx)(Ol,{reducedMotion:`user`,children:(0,L.jsxs)(xE,{children:[(0,L.jsx)($Y,{}),(0,L.jsx)(nX,{})]})})})})),`serviceWorker`in navigator&&window.addEventListener(`load`,()=>{navigator.serviceWorker.register(`/sw.js`,{updateViaCache:`none`}).catch(()=>void 0)});
|