@saywright/studio 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +5 -0
- package/README.md +63 -2
- package/bin/saywright.mjs +10 -0
- package/dist/THIRD_PARTY_NOTICES.md +2699 -0
- package/dist/axe.min.js +12 -0
- package/dist/bridge.js +6582 -0
- package/dist/cli.mjs +56050 -0
- package/dist/client/assets/Calibration-xY4YDLzU.js +1 -0
- package/dist/client/assets/Calibration-xY4YDLzU.js.br +0 -0
- package/dist/client/assets/Calibration-xY4YDLzU.js.gz +0 -0
- package/dist/client/assets/CodeViews-ytEy2pIT.js +3 -0
- package/dist/client/assets/CodeViews-ytEy2pIT.js.br +0 -0
- package/dist/client/assets/CodeViews-ytEy2pIT.js.gz +0 -0
- package/dist/client/assets/CommandPalette-BA3akF-p.js +1 -0
- package/dist/client/assets/CommandPalette-BA3akF-p.js.br +0 -0
- package/dist/client/assets/CommandPalette-BA3akF-p.js.gz +0 -0
- package/dist/client/assets/HelpDialog-C6qmdEwi.js +1 -0
- package/dist/client/assets/HelpDialog-C6qmdEwi.js.br +0 -0
- package/dist/client/assets/HelpDialog-C6qmdEwi.js.gz +0 -0
- package/dist/client/assets/ReportView-Bj9xxLCi.js +4 -0
- package/dist/client/assets/ReportView-Bj9xxLCi.js.br +0 -0
- package/dist/client/assets/ReportView-Bj9xxLCi.js.gz +0 -0
- package/dist/client/assets/SettingsDialog-VrACcdUX.js +1 -0
- package/dist/client/assets/SettingsDialog-VrACcdUX.js.br +0 -0
- package/dist/client/assets/SettingsDialog-VrACcdUX.js.gz +0 -0
- package/dist/client/assets/asr.worker-FcRNDSsJ.js +17 -0
- package/dist/client/assets/asr.worker-FcRNDSsJ.js.br +0 -0
- package/dist/client/assets/asr.worker-FcRNDSsJ.js.gz +0 -0
- package/dist/client/assets/button-B2NFEpCs.js +18 -0
- package/dist/client/assets/button-B2NFEpCs.js.br +0 -0
- package/dist/client/assets/button-B2NFEpCs.js.gz +0 -0
- package/dist/client/assets/camera-BD9K1f5I.js +1 -0
- package/dist/client/assets/cn-Wq33h1G4.js +1 -0
- package/dist/client/assets/cn-Wq33h1G4.js.br +0 -0
- package/dist/client/assets/cn-Wq33h1G4.js.gz +0 -0
- package/dist/client/assets/confirm-D1U-bFIL.js +41 -0
- package/dist/client/assets/confirm-D1U-bFIL.js.br +0 -0
- package/dist/client/assets/confirm-D1U-bFIL.js.gz +0 -0
- package/dist/client/assets/footprints-DiYtIryA.js +1 -0
- package/dist/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/client/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/client/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/client/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/client/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/client/assets/index-BakNwOFF.css +2 -0
- package/dist/client/assets/index-BakNwOFF.css.br +0 -0
- package/dist/client/assets/index-BakNwOFF.css.gz +0 -0
- package/dist/client/assets/index-DUAtV_Av.js +18 -0
- package/dist/client/assets/index-DUAtV_Av.js.br +0 -0
- package/dist/client/assets/index-DUAtV_Av.js.gz +0 -0
- package/dist/client/assets/ort-wasm-simd-threaded-DcHrbrbl.wasm +0 -0
- package/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
- package/dist/client/assets/preload-helper-BLdHbfdN.js.br +0 -0
- package/dist/client/assets/preload-helper-BLdHbfdN.js.gz +0 -0
- package/dist/client/assets/refresh-cw-Dobx2YmO.js +1 -0
- package/dist/client/assets/tracker.worker-DWwj76VA.js +41 -0
- package/dist/client/assets/tracker.worker-DWwj76VA.js.br +0 -0
- package/dist/client/assets/tracker.worker-DWwj76VA.js.gz +0 -0
- package/dist/client/assets/vision_bundle-ByYCzljp.js +41 -0
- package/dist/client/assets/vision_bundle-ByYCzljp.js.br +0 -0
- package/dist/client/assets/vision_bundle-ByYCzljp.js.gz +0 -0
- package/dist/client/favicon.svg +1 -0
- package/dist/client/index.html +27 -0
- package/dist/client/index.html.br +0 -0
- package/dist/client/index.html.gz +0 -0
- package/dist/client/voice-capture-worklet.js +23 -0
- package/dist/sample/index.html +13 -0
- package/dist/sample/package.json +23 -0
- package/dist/sample/playwright.config.ts +20 -0
- package/dist/sample/saywright.config.json +68 -0
- package/dist/sample/src/App.tsx +32 -0
- package/dist/sample/src/components/AddressCard.tsx +16 -0
- package/dist/sample/src/components/CouponField.tsx +50 -0
- package/dist/sample/src/components/Header.tsx +26 -0
- package/dist/sample/src/components/LineItems.tsx +22 -0
- package/dist/sample/src/components/OrderSummary.tsx +32 -0
- package/dist/sample/src/components/ProductCard.tsx +26 -0
- package/dist/sample/src/ds/Badge.tsx +14 -0
- package/dist/sample/src/ds/Button.tsx +16 -0
- package/dist/sample/src/ds/Card.tsx +17 -0
- package/dist/sample/src/ds/Heading.tsx +14 -0
- package/dist/sample/src/ds/ProductGrid.tsx +15 -0
- package/dist/sample/src/ds/SummaryRow.tsx +18 -0
- package/dist/sample/src/ds/TextField.tsx +31 -0
- package/dist/sample/src/ds/index.ts +7 -0
- package/dist/sample/src/lib/cart.ts +20 -0
- package/dist/sample/src/lib/money.ts +7 -0
- package/dist/sample/src/lib/pricing.ts +34 -0
- package/dist/sample/src/lib/route.ts +17 -0
- package/dist/sample/src/main.tsx +10 -0
- package/dist/sample/src/pages/Checkout.tsx +37 -0
- package/dist/sample/src/pages/Shop.tsx +27 -0
- package/dist/sample/src/styles.css +155 -0
- package/dist/sample/tests/smoke.spec.ts +7 -0
- package/dist/sample/tsconfig.json +37 -0
- package/dist/sample/vite.config.ts +8 -0
- package/dist/server/node-BgmEDdmn.mjs +23 -0
- package/dist/server/node-DuXxFg5I.mjs +2501 -0
- package/dist/server/speech-worker.mjs +266 -0
- package/package.json +97 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeViews-ytEy2pIT.js","assets/cn-Wq33h1G4.js","assets/SettingsDialog-VrACcdUX.js","assets/confirm-D1U-bFIL.js","assets/button-B2NFEpCs.js","assets/preload-helper-BLdHbfdN.js","assets/refresh-cw-Dobx2YmO.js","assets/CommandPalette-BA3akF-p.js","assets/camera-BD9K1f5I.js","assets/footprints-DiYtIryA.js","assets/HelpDialog-C6qmdEwi.js","assets/Calibration-xY4YDLzU.js","assets/ReportView-Bj9xxLCi.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,o as n,r,t as i}from"./cn-Wq33h1G4.js";import{A as a,B as o,D as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as g,O as _,P as v,R as y,S as b,U as ee,V as x,W as S,X as C,Z as te,_ as w,a as ne,b as re,c as ie,d as ae,f as oe,g as se,h as ce,i as le,j as ue,k as de,l as T,m as fe,n as pe,o as me,p as he,q as ge,r as _e,s as ve,t as ye,u as be,v as xe,x as Se,y as Ce,z as E}from"./confirm-D1U-bFIL.js";import{$ as D,A as we,At as O,B as Te,C as Ee,Ct as De,D as k,Dt as Oe,E as ke,Et as Ae,F as je,G as Me,H as Ne,I as Pe,K as A,L as Fe,M as Ie,Mt as Le,N as Re,Nt as ze,O as Be,Ot as Ve,P as He,Q as Ue,R as We,S as Ge,St as Ke,T as qe,Tt as Je,U as Ye,V as Xe,W as Ze,Z as Qe,_ as $e,a as j,at as et,b as tt,bt as nt,c as rt,ct as it,d as at,et as ot,f as st,g as ct,h as lt,ht as ut,i as dt,it as M,j as ft,jt as pt,k as mt,kt as ht,l as gt,m as _t,mt as vt,n as yt,nt as bt,o as xt,ot as St,p as Ct,pt as wt,q as Tt,r as Et,rt as N,s as Dt,t as P,tt as Ot,u as kt,v as At,w as jt,wt as Mt,x as Nt,xt as Pt,y as Ft,yt as It,z as Lt}from"./button-B2NFEpCs.js";import{t as Rt}from"./preload-helper-BLdHbfdN.js";(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 zt=e((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 ee(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,x||(x=!0,re());else{var t=n(l);t!==null&&oe(ee,t.startTime-e)}}}var x=!1,S=-1,C=5,te=-1;function w(){return g?!0:!(e.unstable_now()-te<C)}function ne(){if(g=!1,x){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&w());){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&&oe(ee,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?re():x=!1}}}var re;if(typeof y==`function`)re=function(){y(ne)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=ne,re=function(){ae.postMessage(null)}}else re=function(){_(ne,0)};function oe(t,n){S=_(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`):C=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(S),S=-1):h=!0,oe(ee,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,x||(x=!0,re()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Bt=e(((e,t)=>{t.exports=zt()})),Vt=e((e=>{var n=Bt(),r=t(),i=te();function a(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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(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)&&p(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(a(559))}}var y=null,b=null;function ee(e,t,n){return e===n||e===t&&(y=e,!0)}function x(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function S(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 C(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 w=Object.assign,ne=Symbol.for(`react.element`),re=Symbol.for(`react.transitional.element`),ie=Symbol.for(`react.portal`),ae=Symbol.for(`react.fragment`),oe=Symbol.for(`react.strict_mode`),se=Symbol.for(`react.profiler`),ce=Symbol.for(`react.consumer`),le=Symbol.for(`react.context`),ue=Symbol.for(`react.forward_ref`),de=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),fe=Symbol.for(`react.memo`),pe=Symbol.for(`react.lazy`),me=Symbol.for(`react.activity`),he=Symbol.for(`react.legacy_hidden`),ge=Symbol.for(`react.memo_cache_sentinel`),_e=Symbol.for(`react.view_transition`),ve=Symbol.for(`react.recoverable`),ye=Symbol.iterator;function be(e){return typeof e!=`object`||!e?null:(e=ye&&e[ye]||e[`@@iterator`],typeof e==`function`?e:null)}var xe=Symbol.for(`react.client.reference`);function Se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ae:return`Fragment`;case se:return`Profiler`;case oe:return`StrictMode`;case de:return`Suspense`;case T:return`SuspenseList`;case me:return`Activity`;case _e:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case ie:return`Portal`;case le:return e.displayName||`Context`;case ce:return(e._context.displayName||`Context`)+`.Consumer`;case ue:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case fe:return t=e.displayName||null,t===null?Se(e.type)||`Memo`:t;case pe:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var Ce=Array.isArray,E=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,we={pending:!1,data:null,method:null,action:null},O=[],Te=-1;function Ee(e){return{current:e}}function De(e){0>Te||(e.current=O[Te],O[Te]=null,Te--)}function k(e,t){Te++,O[Te]=e.current,e.current=t}var Oe=Ee(null),ke=Ee(null),Ae=Ee(null),je=Ee(null);function Me(e,t){switch(k(Ae,t),k(ke,e),k(Oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}De(Oe),k(Oe,e)}function Ne(){De(Oe),De(ke),De(Ae)}function Pe(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,k(je,e)),t=Oe.current;var n=dp(t,e.type);t!==n&&(k(ke,e),k(Oe,n))}function A(e){ke.current===e&&(De(Oe),De(ke)),je.current===e&&(De(je),sh._currentValue=we)}var Fe,Ie;function Le(e){if(Fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Fe=t&&t[1]||``,Ie=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+Fe+e+Ie}var Re=!1;function ze(e,t){if(!e||Re)return``;Re=!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(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);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=`
|
|
7
|
+
`+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{Re=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Le(n):``}function Be(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le(`Lazy`);case 13:return e.child!==t&&t!==null?Le(`Suspense Fallback`):Le(`Suspense`);case 19:return Le(`SuspenseList`);case 0:case 15:return ze(e.type,!1);case 11:return ze(e.type.render,!1);case 1:return ze(e.type,!0);case 31:return Le(`Activity`);case 30:return Le(`ViewTransition`);default:return``}}function Ve(e){try{var t=``,n=null;do t+=Be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var He=Object.prototype.hasOwnProperty,Ue=n.unstable_scheduleCallback,We=n.unstable_cancelCallback,Ge=n.unstable_shouldYield,Ke=n.unstable_requestPaint,qe=n.unstable_now,Je=n.unstable_getCurrentPriorityLevel,Ye=n.unstable_ImmediatePriority,Xe=n.unstable_UserBlockingPriority,Ze=n.unstable_NormalPriority,Qe=n.unstable_LowPriority,$e=n.unstable_IdlePriority,j=n.log,et=n.unstable_setDisableYieldValue,tt=null,nt=null;function rt(e){if(typeof j==`function`&&et(e),nt&&typeof nt.setStrictMode==`function`)try{nt.setStrictMode(tt,e)}catch{}}var it=Math.clz32?Math.clz32:st,at=Math.log,ot=Math.LN2;function st(e){return e>>>=0,e===0?32:31-(at(e)/ot|0)|0}var ct=256,lt=262144,ut=4194304;function dt(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 M(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=dt(n))):i=dt(o):i=dt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=dt(n))):i=dt(o)):i=dt(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 ft(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pt(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-it(n),i=1<<r;t|=e[r],n&=~i}return t}function mt(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 ht(){var e=ut;return ut<<=1,!(ut&62914560)&&(ut=4194304),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function _t(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vt(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-it(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&&yt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function yt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-it(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-it(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function xt(e,t){var n=t&-t;return n=n&42?1:St(n),(n&(e.suspendedLanes|t))===0?n:0}function St(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 Ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function wt(){var e=D.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function Tt(e,t){var n=D.p;try{return D.p=e,t()}finally{D.p=n}}var Et=Math.random().toString(36).slice(2),N=`__reactFiber$`+Et,Dt=`__reactProps$`+Et,P=`__reactContainer$`+Et,Ot=`__reactEvents$`+Et,kt=`__reactListeners$`+Et,At=`__reactHandles$`+Et,jt=`__reactResources$`+Et,Mt=`__reactMarker$`+Et,Nt=`__reactLoad$`+Et;function Pt(e){delete e[N],delete e[Dt],delete e[kt],delete e[At]}function Ft(e){var t;if(t=e[N])return t;for(var n=e.parentNode;n;){if(t=n[P]||n[N]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[N])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function It(e){if(e=e[N]||e[P]){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(a(33))}function Rt(e){var t=e[jt];return t||=e[jt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function zt(e){e[Mt]=!0}function Vt(e){e[Nt]=void 0}var Ht=new Set,F={};function Ut(e,t){I(e,t),I(e+`Capture`,t)}function I(e,t){for(F[e]=t,e=0;e<t.length;e++)Ht.add(t[e])}var Wt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Gt={},Kt={};function qt(e){return He.call(Kt,e)?!0:He.call(Gt,e)?!1:Wt.test(e)?Kt[e]=!0:(Gt[e]=!0,!1)}var L=!1;function Jt(){var e=L;return L=!1,e}function Yt(e,t,n){if(qt(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 Xt(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 Zt(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 Qt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function $t(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function en(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 tn(e){if(!e._valueTracker){var t=$t(e)?`checked`:`value`;e._valueTracker=en(e,t,``+e[t])}}function nn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=$t(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var rn=/[\n"\\]/g;function an(e){return e.replace(rn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function on(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=``+Qt(t)):e.value!==``+Qt(t)&&(e.value=``+Qt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):cn(e,Qt(n)):o===`number`&&e.value==t?cn(e,Qt(e.value)):cn(e,Qt(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=``+Qt(s):e.removeAttribute(`name`)}function sn(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)){tn(e);return}n=n==null?``:``+Qt(n),t=t==null?n:``+Qt(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),tn(e)}function cn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function ln(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=``+Qt(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 un(e,t,n){t!=null&&(t=``+Qt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Qt(n)}function dn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(Ce(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),tn(e)}function fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pn=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 mn(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||pn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function hn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(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]=``,L=!0);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&(mn(e,i,r),L=!0)}else for(var o in t)t.hasOwnProperty(o)&&mn(e,o,t[o])}function gn(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 _n=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`]]),vn=/^[\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 yn(e){return vn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function bn(){}var xn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cn=null,wn=null;function Tn(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(on(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="`+an(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Dt]||null;if(!i)throw Error(a(90));on(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&nn(r)}break a;case`textarea`:un(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&ln(e,!!n.multiple,t,!1)}}}var En=!1;function Dn(e,t,n){if(En)return e(t,n);En=!0;try{return e(t)}finally{if(En=!1,(Cn!==null||wn!==null)&&(zd(),Cn&&(t=Cn,e=wn,wn=Cn=null,Tn(t),e)))for(t=0;t<e.length;t++)Tn(e[t])}}function On(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(a(231,t,typeof n));return n}var kn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,An=!1;if(kn)try{var jn={};Object.defineProperty(jn,"passive",{get:function(){An=!0}}),window.addEventListener(`test`,jn,jn),window.removeEventListener(`test`,jn,jn)}catch{An=!1}var Mn=null,Nn=null,Pn=null;function Fn(){if(Pn)return Pn;var e,t=Nn,n=t.length,r,i=`value`in Mn?Mn.value:Mn.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 Pn=i.slice(e,1<r?1-r:void 0)}function In(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 Ln(){return!0}function Rn(){return!1}function zn(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)?Ln:Rn,this.isPropagationStopped=Rn,this}return w(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=Ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Ln)},persist:function(){},isPersistent:Ln}),t}var Bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vn=zn(Bn),Hn=w({},Bn,{view:0,detail:0}),Un=zn(Hn),Wn,Gn,Kn,qn=w({},Hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rr,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!==Kn&&(Kn&&e.type===`mousemove`?(Wn=e.screenX-Kn.screenX,Gn=e.screenY-Kn.screenY):Gn=Wn=0,Kn=e),Wn)},movementY:function(e){return`movementY`in e?e.movementY:Gn}}),Jn=zn(qn),Yn=zn(w({},qn,{dataTransfer:0})),Xn=zn(w({},Hn,{relatedTarget:0})),Zn=zn(w({},Bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Qn=zn(w({},Bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),R=zn(w({},Bn,{data:0})),$n={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},er={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`},tr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tr[e])?!!t[e]:!1}function rr(){return nr}var ir=zn(w({},Hn,{key:function(e){if(e.key){var t=$n[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=In(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?er[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rr,charCode:function(e){return e.type===`keypress`?In(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?In(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ar=zn(w({},qn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),or=zn(w({},Bn,{submitter:0})),sr=zn(w({},Hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rr})),cr=zn(w({},Bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=zn(w({},qn,{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})),ur=zn(w({},Bn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=kn&&`CompositionEvent`in window,pr=null;kn&&`documentMode`in document&&(pr=document.documentMode);var mr=kn&&`TextEvent`in window&&!pr,hr=kn&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Fn(),Pn=Nn=Mn=null,br=!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 hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={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 wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){Cn?wn?wn.push(r):wn=[r]:Cn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Vf(e,0)}function kr(e){if(nn(Lt(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(kn){var Mr;if(kn){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,Sn(e)),Dn(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(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(!He.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(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 Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(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=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(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=Wr(e.document)}return t}function Yr(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 Xr=kn&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(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}),$r&&Ur($r,r)||($r=r,r=Jf(Qr,`onSelect`),0<r.length&&(t=new Vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};kn&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`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(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Ut(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;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 bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=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)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[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&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(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-it(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<kd)throw kd=0,Ad=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(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 Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(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 Ii(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 Li(e,t,n,r,i,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,Oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case me:return e=Ni(31,n,t,i),e.elementType=me,e.lanes=o,e;case ae:return Ri(n.children,i,o,t);case oe:s=8,i|=24;break;case se:return e=Ni(12,n,t,i|2),e.elementType=se,e.lanes=o,e;case de:return e=Ni(13,n,t,i),e.elementType=de,e.lanes=o,e;case T:return e=Ni(19,n,t,i),e.elementType=T,e.lanes=o,e;case he:case _e:return e=i|32,e=Ni(30,n,t,e),e.elementType=_e,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case le:s=10;break a;case ce:s=9;break a;case ue:s=11;break a;case fe:s=14;break a;case pe:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Ve(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Ve(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-it(r)-1;r&=~(1<<i),n+=1;var a=32-it(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-it(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,z=null,B=!1,aa=null,oa=!1,sa=Error(a(519));function ca(e){throw ma(Ui(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),sa}function la(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[N]=e,t[Dt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),sn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),dn(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||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=bn),t=!0):t=!1,t||ca(e,!0)}function ua(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:ia=ia.return}}function da(e){if(e!==ia)return!1;if(!B)return ua(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&z&&ca(e),ua(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));z=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));z=dm(e)}else t===27?(t=z,Sp(e.type)?(e=um,um=null,z=e):z=t):z=ia?lm(e.stateNode.nextSibling):null;return!0}function fa(){z=ia=null,B=!1}function pa(){var e=aa;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),aa=null),e}function ma(e){aa===null?aa=[e]:aa.push(e)}var ha=Ee(null),ga=null,V=null;function _a(e,t,n){k(ha,t._currentValue),t._currentValue=n}function va(e){e._currentValue=ha.current,De(ha)}function ya(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ba(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ya(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ya(s,n,e),s=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),ya(i.return,n,e),s=i.child,s=s===null?null:s.sibling):s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function xa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Hr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===je.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}i=i.return}return e!==null&&ba(t,e,n,r),t.flags|=262144,e!==null}function Sa(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ca(e){ga=e,V=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wa(e){return Ea(ga,e)}function Ta(e,t){return ga===null&&Ca(e),Ea(e,t)}function Ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},V===null){if(e===null)throw Error(a(308));V=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else V=V.next=t;return n}var Da=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Oa=n.unstable_scheduleCallback,ka=n.unstable_NormalPriority,Aa={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ja(){return{controller:new Da,data:new Map,refCount:0}}function Ma(e){e.refCount--,e.refCount===0&&Oa(ka,function(){e.controller.abort()})}function Na(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Pa=null;function Fa(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ia=null,La=0,Ra=0,za=null;function Ba(e,t){if(Ia===null){var n=Ia=[];La=0,Ra=Pf(),za={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return La++,t.then(Va,Va),t}function Va(){if(--La===0&&(Pa=null,Ia!==null)){za!==null&&(za.status=`fulfilled`);var e=Ia;Ia=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ha(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ua=E.S;E.S=function(e,t){if(hd=qe(),typeof t==`object`&&t&&typeof t.then==`function`&&Ba(e,t),Pa!==null)for(var n=bf;n!==null;)Na(n,Pa),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Na(r,n),r=r.next;if(Ra!==0){r=Pa,r===null&&(r=Pa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ua!==null&&Ua(e,t)};var Wa=Ee(null);function Ga(){var e=Wa.current;return e===null?q.pooledCache:e}function Ka(e,t){t===null?k(Wa,Wa.current):k(Wa,t.pool)}function qa(){var e=Ga();return e===null?null:{parent:Aa._currentValue,pool:e}}var Ja=Error(a(460)),Ya=Error(a(474)),Xa=Error(a(542)),Za={then:function(){}};function Qa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function $a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(bn,bn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e===void 0&&!(`reason`in t)?Error(a(600)):e;default:if(typeof t.status==`string`)t.then(bn,bn);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ro(e),e}throw to=t,Ja}}function eo(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(to=e,Ja):e}}var to=null;function no(){if(to===null)throw Error(a(459));var e=to;return to=null,e}function ro(e){if(e===Ja||e===Xa)throw Error(a(483))}var io=null,ao=0;function oo(e){var t=ao;return ao+=1,io===null&&(io=[]),$a(io,e,t)}function so(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function co(e,t){throw t.$$typeof===ne?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function lo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Fi(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=zi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===ae?(e=d(e,t,n.props.children,r,n.key),so(e,n),e):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===pe&&eo(a)===t.type)?(t=i(t,n.props),so(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),so(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case re:return n=Li(t.type,t.key,t.props,null,e.mode,n),so(n,t),n.return=e,n;case ie:return t=Vi(t,e.mode,n),t.return=e,t;case pe:return t=eo(t),f(e,t,n)}if(Ce(t)||be(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,oo(t),n);if(t.$$typeof===le)return f(e,Ta(e,t),n);co(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case re:return n.key===i?l(e,t,n,r):null;case ie:return n.key===i?u(e,t,n,r):null;case pe:return n=eo(n),p(e,t,n,r)}if(Ce(n)||be(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,oo(n),r);if(n.$$typeof===le)return p(e,t,Ta(e,n),r);co(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case re:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case ie:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case pe:return r=eo(r),m(e,t,n,r,i)}if(Ce(r)||be(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,oo(r),i);if(r.$$typeof===le)return m(e,t,n,Ta(t,r),i);co(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),B&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return B&&$i(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)}),B&&$i(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),B&&$i(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return B&&$i(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,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(i,e)}),B&&$i(i,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===ae&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case re:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===ae){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),so(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===pe&&eo(l)===r.type){n(e,r.sibling),c=i(r,o.props),so(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===ae?(c=Ri(o.props.children,e.mode,c,o.key),so(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),so(c,o),c.return=e,e=c)}return s(e);case ie: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=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case pe:return o=eo(o),_(e,r,o,c)}if(Ce(o))return h(e,r,o,c);if(be(o)){if(l=be(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,oo(o),c);if(o.$$typeof===le)return _(e,r,Ta(e,o),c);co(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ao=0;var i=_(e,t,n,r);return io=null,i}catch(t){if(t===Ja||t===Xa)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var uo=lo(!0),fo=lo(!1),po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ho(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}function yo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var bo=!1;function xo(){if(bo){var e=za;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;po=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Ra&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=w({},d,f);break a;case 2:po=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=Ee(null),Eo=Ee(0);function Do(e,t){e=id,k(Eo,e),k(To,t),id=e|t.baseLanes}function Oo(){k(Eo,id),k(To,To.current)}function ko(){id=Eo.current,De(To),De(Eo)}var Ao=Ee(null),jo=null;function Mo(e){var t=e.alternate;k(Lo,Lo.current&1),k(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){k(Lo,Lo.current),k(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(k(Lo,Lo.current),k(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){k(Lo,Lo.current),k(Ao,Ao.current)}function Io(e){De(Ao),jo===e&&(jo=null),De(Lo)}var Lo=Ee(0);function Ro(e,t){k(Ao,Ao.current),k(Lo,t)}function zo(e){De(Lo),De(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vo=0,H=null,U=null,Ho=null,Uo=!1,Wo=!1,Go=!1,Ko=0,qo=0,Jo=null,Yo=0;function Xo(){throw Error(a(321))}function Zo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function Qo(e,t,n,r,i,a){return Vo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?hc:gc,Go=!1,a=n(r,i),Go=!1,Wo&&(a=es(t,n,r,i)),$o(e),a}function $o(e){E.H=mc;var t=U!==null&&U.next!==null;if(Vo=0,Ho=U=H=null,Uo=!1,qo=0,Jo=null,t)throw Error(a(300));e===null||Nc||(e=e.dependencies,e!==null&&Sa(e)&&(Nc=!0))}function es(e,t,n,r){H=e;var i=0;do{if(Wo&&(Jo=null),qo=0,Wo=!1,25<=i)throw Error(a(301));if(i+=1,Ho=U=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}E.H=_c,o=t(n,r)}while(Wo);return o}function ts(){var e=E.H,t=e.useState()[0];return t=typeof t.then==`function`?cs(t):t,e=e.useState()[0],(U===null?null:U.memoizedState)!==e&&(H.flags|=1024),t}function ns(){var e=Ko!==0;return Ko=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Uo=!1}Vo=0,Ho=U=H=null,Wo=!1,qo=Ko=0,Jo=null}function as(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ho===null?H.memoizedState=Ho=e:Ho=Ho.next=e,Ho}function os(){if(U===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=U.next;var t=Ho===null?H.memoizedState:Ho.next;if(t!==null)Ho=t,U=e;else{if(e===null)throw H.alternate===null?Error(a(467)):Error(a(310));U=e,e={memoizedState:U.memoizedState,baseState:U.baseState,baseQueue:U.baseQueue,queue:U.queue,next:null},Ho===null?H.memoizedState=Ho=e:Ho=Ho.next=e}return Ho}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cs(e){var t=qo;return qo+=1,Jo===null&&(Jo=[]),e=$a(Jo,e,t),t=H,(Ho===null?t.memoizedState:Ho.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?hc:gc),e}function ls(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return cs(e);if(e.$$typeof===ve)return;if(e.$$typeof===le)return wa(e)}throw Error(a(438,String(e)))}function us(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=ss(),H.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]=ge;return t.index++,n}function ds(e,t){return typeof t==`function`?t(e):t}function fs(e){return ps(os(),U,e)}function ps(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Vo&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ra&&(d=!0);else if((Vo&p)===p){u=u.next,p===Ra&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,H.lanes|=p,od|=p;f=u.action,Go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,H.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(Nc=!0,d&&(n=za,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ms(e){var t=os(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Hr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function hs(e,t,n){var r=H,i=os(),o=B;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Hr((U||i).memoizedState,n);if(s&&(i.memoizedState=n,Nc=!0),i=i.queue,Bs(vs.bind(null,r,i,e),[e]),e=i.getSnapshot!==t||s||Ho!==null&&!!(Ho.memoizedState.tag&1),Fs(e?9:8,{destroy:void 0},_s.bind(null,r,i,n,t),null),e){if(r.flags|=2048,q===null)throw Error(a(349));o||Vo&127||gs(r,t,n)}return n}function gs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=ss(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _s(e,t,n,r){t.value=n,t.getSnapshot=r,ys(t)&&bs(e)}function vs(e,t,n){return n(function(){ys(t)&&bs(e)})}function ys(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function bs(e){var t=Oi(e,2);t!==null&&Pd(t,e,2)}function xs(e){var t=as();if(typeof e==`function`){var n=e;if(e=n(),Go){rt(!0);try{n()}finally{rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:e},t}function Ss(e,t,n,r){return e.baseState=n,ps(e,U,typeof r==`function`?r:ds)}function Cs(e,t,n,r,i){if(dc(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};E.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ws(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ws(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=E.T,o={};o.types=a===null?null:a.types,E.T=o;try{var s=n(i,r),c=E.S;c!==null&&c(o,s),Ts(e,t,s)}catch(n){Ds(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),E.T=a}}else try{a=n(i,r),Ts(e,t,a)}catch(n){Ds(e,t,n)}}function Ts(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Es(e,t,n)},function(n){return Ds(e,t,n)}):Es(e,t,n)}function Es(e,t,n){t.status=`fulfilled`,t.value=n,Os(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ws(e,n)))}function Ds(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Os(t),t=t.next;while(t!==r)}e.action=null}function Os(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ks(e,t){return t}function As(e,t){if(B){var n=q.formState;if(n!==null){a:{var r=H;if(B){if(z){b:{for(var i=z,a=oa;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){z=lm(i.nextSibling),r=i.data===`F!`;break a}}ca(r)}r=!1}r&&(t=n[0])}}return n=as(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:t},n.queue=r,n=cc.bind(null,H,r),r.dispatch=n,r=xs(!1),a=uc.bind(null,H,!1,r.queue),r=as(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Cs.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function js(e){return Ms(os(),U,e)}function Ms(e,t,n){if(t=ps(e,t,ks)[0],e=fs(ds)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=cs(t)}catch(e){throw e===Ja?Xa:e}else r=t;t=os();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Fs(9,{destroy:void 0},Ns.bind(null,i,n),null)),[r,a,e]}function Ns(e,t){e.action=t}function Ps(e){var t=os(),n=U;if(n!==null)return Ms(t,n,e);os(),t=t.memoizedState,n=os();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Fs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=ss(),H.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 Is(){return os().memoizedState}function Ls(e,t,n,r){var i=as();H.flags|=e,i.memoizedState=Fs(1|t,{destroy:void 0},n,r===void 0?null:r)}function Rs(e,t,n,r){var i=os();r=r===void 0?null:r;var a=i.memoizedState.inst;U!==null&&r!==null&&Zo(r,U.memoizedState.deps)?i.memoizedState=Fs(t,a,n,r):(H.flags|=e,i.memoizedState=Fs(1|t,a,n,r))}function zs(e,t){Ls(8390656,8,e,t)}function Bs(e,t){Rs(2048,8,e,t)}function Vs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=ss(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hs(e){var t=os().memoizedState;return Vs({ref:t,nextImpl:e}),function(){if(K&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Us(e,t){return Rs(4,2,e,t)}function Ws(e,t){return Rs(4,4,e,t)}function Gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ks(e,t,n){n=n==null?null:n.concat([e]),Rs(4,4,Gs.bind(null,t,e),n)}function qs(){}function Js(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zo(t,r[1]))return r[0];if(r=e(),Go){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r}function Xs(e,t,n){return n===void 0||Vo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),H.lanes|=e,od|=e,n)}function Zs(e,t,n,r){return Hr(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(Y&261930)?(Nc=!0,e.memoizedState=n):(e=Md(),H.lanes|=e,od|=e,t):(e=Xs(e,n,r),Hr(e,t)||(Nc=!0),e)}function Qs(e,t,n,r,i){var a=D.p;D.p=a!==0&&8>a?a:8;var o=E.T,s={};s.types=o===null?null:o.types,E.T=s,uc(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?lc(e,t,Ha(c,r),jd(e)):lc(e,t,r,jd(e))}catch(n){lc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function $s(){}function ec(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=tc(e).queue;Qs(e,i,t,we,n===null?$s:function(){return nc(e),n(r)})}function tc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:we,baseState:we,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:we},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ds,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nc(e){var t=tc(e);t.next===null&&(t=e.alternate.memoizedState),lc(e,t.next.queue,{},jd())}function rc(){return wa(sh)}function ic(){return os().memoizedState}function ac(){return os().memoizedState}function oc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=go(n);var r=_o(t,e,n);r!==null&&(Pd(r,t,n),vo(r,t,n)),t={cache:ja()},e.payload=t;return}t=t.return}}function sc(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},dc(e)?fc(t,n):(n=Di(e,t,n,r),n!==null&&(Pd(n,e,r),pc(n,t,r)))}function cc(e,t,n){lc(e,t,n,jd())}function lc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(dc(e))fc(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,Hr(s,o))return Ei(e,t,i,0),q===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Pd(n,e,r),pc(n,t,r),!0}return!1}function uc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},dc(e)){if(t)throw Error(a(479))}else t=Di(e,n,r,2),t!==null&&Pd(t,e,2)}function dc(e){var t=e.alternate;return e===H||t!==null&&t===H}function fc(e,t){Wo=Uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,bt(e,n)}}var mc={readContext:wa,use:ls,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useInsertionEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useDeferredValue:Xo,useTransition:Xo,useSyncExternalStore:Xo,useId:Xo,useHostTransitionStatus:Xo,useFormState:Xo,useActionState:Xo,useOptimistic:Xo,useMemoCache:Xo,useCacheRefresh:Xo,useEffectEvent:Xo},hc={readContext:wa,use:ls,useCallback:function(e,t){return as().memoizedState=[e,t===void 0?null:t],e},useContext:wa,useEffect:zs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ls(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var n=as();t=t===void 0?null:t;var r=e();if(Go){rt(!0);try{e()}finally{rt(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=as();if(n!==void 0){var i=n(t);if(Go){rt(!0);try{n(t)}finally{rt(!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=sc.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=as();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,n=cc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qs,useDeferredValue:function(e,t){return Xs(as(),e,t)},useTransition:function(){var e=xs(!1);return e=Qs.bind(null,H,e.queue,!0,!1),as().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,i=as();if(B){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),q===null)throw Error(a(349));Y&127||gs(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,zs(vs.bind(null,r,o,e),[e]),r.flags|=2048,Fs(9,{destroy:void 0},_s.bind(null,r,o,n,t),null),n},useId:function(){var e=as(),t=q.identifierPrefix;if(B){var n=Qi,r=Zi;n=(r&~(1<<32-it(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ko++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:rc,useFormState:As,useActionState:As,useOptimistic:function(e){var t=as();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=uc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:us,useCacheRefresh:function(){return as().memoizedState=oc.bind(null,H)},useEffectEvent:function(e){var t=as(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},gc={readContext:wa,use:ls,useCallback:Js,useContext:wa,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:fs,useRef:Is,useState:function(){return fs(ds)},useDebugValue:qs,useDeferredValue:function(e,t){return Zs(os(),U.memoizedState,e,t)},useTransition:function(){var e=fs(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:js,useActionState:js,useOptimistic:function(e,t){return Ss(os(),U,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs},_c={readContext:wa,use:ls,useCallback:Js,useContext:wa,useEffect:Bs,useImperativeHandle:Ks,useInsertionEffect:Us,useLayoutEffect:Ws,useMemo:Ys,useReducer:ms,useRef:Is,useState:function(){return ms(ds)},useDebugValue:qs,useDeferredValue:function(e,t){var n=os();return U===null?Xs(n,e,t):Zs(n,U.memoizedState,e,t)},useTransition:function(){var e=ms(ds)[0],t=os().memoizedState;return[typeof e==`boolean`?e:cs(e),t]},useSyncExternalStore:hs,useId:ic,useHostTransitionStatus:rc,useFormState:Ps,useActionState:Ps,useOptimistic:function(e,t){var n=os();return U===null?(n.baseState=e,[e,n.queue.dispatch]):Ss(n,U,e,t)},useMemoCache:us,useCacheRefresh:ac,useEffectEvent:Hs};function vc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:w({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Pd(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Pd(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(Pd(t,e,n),vo(t,e,n))}};function bc(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?!Ur(n,r)||!Ur(i,a):!0}function xc(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&&yc.enqueueReplaceState(t,t.state,null)}function Sc(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=w({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){xi(e)}function wc(e){console.error(e)}function Tc(e){xi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(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 Oc(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=go(e),e.tag=3,e}function Ac(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(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&xa(t,n,i,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,i)),!1;case 22:return n.flags|=65536,r===Za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),mf(e,r,i)),!1}throw Error(a(435,n.tag))}return mf(e,r,i),Kd(),!1}if(B)return t=Ao.current,t===null?(r!==sa&&(t=Error(a(423),{cause:r}),ma(Ui(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ui(r,n),i=Oc(e.stateNode,r,i),yo(e,i),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==sa&&(e=Error(a(422),{cause:r}),ma(Ui(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Ui(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Oc(n.stateNode,r,e),yo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=kc(i),Ac(i,e,n,r),yo(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(a(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?fo(t,null,n,r):uo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ca(t),r=Qo(e,t,n,o,a,i),s=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(B&&s&&ta(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(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 Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ka(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ka(t,null),Oo(),Fo()):(Ka(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Ga();return a=a===null?null:{parent:Aa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ka(t,null),Oo(),Po(t),e!==null&&xa(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return uo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(No(t),(e=z)?(e=am(e,oa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,z=null)):e=null,e===null)throw ca(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),i){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558))}else if(Nc||xa(e,t,n,!1),i=(n&e.childLanes)!==0,Nc||i){if(To.current===null){if(r=q,r!==null&&(s=xt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Pd(r,e,s),Mc;Kd()}t=Hc(e,t,n)}else e=o.treeContext,z=lm(s.nextSibling),ia=t,B=!0,aa=null,oa=!1,e!==null&&ra(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(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(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Ca(t),n=Qo(e,t,n,r,void 0,i),r=ns(),e!==null&&!Nc?(rs(e,t,i),ll(e,t,i)):(B&&r&&ta(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Ca(t),t.updateQueue=null,n=es(t,r,n,i),$o(e),r=ns(),e!==null&&!Nc?(rs(e,t,a),ll(e,t,a)):(B&&r&&ta(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Ca(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=wa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},mo(t),o=n.contextType,a.context=typeof o==`object`&&o?wa(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(vc(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&&yc.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Sc(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=wa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&xc(t,a,r,o),po=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||po?(typeof d==`function`&&(vc(t,n,d,r),l=t.memoizedState),(c=po||bc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ho(e,t),o=t.memoizedProps,u=Sc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=wa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&xc(t,a,r,c),po=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||po||e!==null&&e.dependencies!==null&&Sa(e.dependencies)?(typeof s==`function`&&(vc(t,n,s,r),p=t.memoizedState),(u=po||bc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=uo(t,e.child,null,i),t.child=uo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return fa(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:qa()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(B){if(i?Mo(t):Fo(),(e=z)?(e=am(e,oa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,z=null)):e=null,e===null)throw ca(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(Mo(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=qa():(s=Aa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Fi(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 $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return uo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,i,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Fo(),o=i.fallback,s=t.mode,i=el({mode:`visible`,children:i.children},s),o=Ri(o,s,c,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,uo(t,e.child,null,c),i=t.child,i.memoizedState=Xc(c),i.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,i)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(i=Error(a(419)),i.stack=``,i.digest=r,ma({value:i,source:null,stack:null})),tl(e,t,c)}if(Nc||xa(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(To.current!==null)return tl(e,t,c);if(r=q,r!==null&&(i=xt(r,c),i!==0&&i!==s.retryLane))throw s.retryLane=i,Oi(e,i),Pd(r,e,i),Mc;return om(o)||Kd(),tl(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,z=lm(o.nextSibling),ia=t,B=!0,aa=null,oa=!1,e!==null&&ra(t,e),t=$c(t,i.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ya(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function al(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 ol(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 sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=B?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(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=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return _a(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(xa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Sa(e)))}function dl(e,t,n){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),_a(t,Aa,e.memoizedState.cache),fa();break;case 27:case 5:Pe(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=xa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(Mo(t),e=ll(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(xa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:_a(t,Aa,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,B&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=eo(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=Sc(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ue){t.tag=11,t=Fc(null,t,e,r,n);break a}if(i===fe){t.tag=14,t=Ic(null,t,e,r,n);break a}if(i===le){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=Se(e)||e,Error(a(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Sc(r,t.pendingProps),qc(e,t,r,i,n);case 3:a:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,ho(e,t),So(t,r,null,n);var s=t.memoizedState;if(r=s.cache,_a(t,Aa,r),r!==o.cache&&ba(t,[Aa],n,!0),xo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==i){i=Ui(Error(a(424)),t),ma(i),t=Jc(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(z=lm(e.firstChild),ia=t,B=!0,aa=null,oa=!0,n=fo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(fa(),r===i){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(t.stateNode=fp(t.type,t.pendingProps,Ae.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pe(t),e===null&&B&&(r=t.stateNode=hm(t.type,t.pendingProps,Ae.current),ia=t,oa=!0,i=z,Sp(t.type)?(um=i,z=lm(r.firstChild)):z=i),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((i=r=z)&&(r=rm(r,t.type,t.pendingProps,oa),r===null?i=!1:(t.stateNode=r,ia=t,z=lm(r.firstChild),oa=!1,i=!0)),i||ca(t)),Pe(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(i,o)?r=null:s!==null&&pp(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Qo(e,t,ts,null,null,n),sh._currentValue=i),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=z)&&(n=im(n,t.pendingProps,oa),n===null?e=!1:(t.stateNode=n,ia=t,z=null,e=!0)),e||ca(t)),null;case 13:return Qc(e,t,n);case 4:return Me(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=uo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return i=t.type._context,r=t.pendingProps.children,Ca(t),i=wa(i),r=r(i),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Ca(t),r=wa(Aa),e===null?(i=Ga(),i===null&&(i=q,o=ja(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},mo(t),_a(t,Aa,i)):((e.lanes&n)!==0&&(ho(e,t),So(t,null,null,n),xo()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,_a(t,Aa,r),r!==i.cache&&ba(t,[Aa],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),_a(t,Aa,r))),Pc(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:B&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(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(Ud())e.flags|=8192;else throw to=Za,Ya}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Ud())e.flags|=8192;else throw to=Za,Ya}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ht(),e.lanes|=t,ud|=t)}function _l(e,t){if(!B)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 W(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 vl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return W(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),va(Aa),Ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(da(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pa())),W(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(W(t),ml(t,i,null,r,n)):(W(t),hl(t,o))):o?o===e.memoizedState?(W(t),t.flags&=-16777217):(pl(t),W(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),W(t),ml(t,i,e,r,n)),null;case 27:if(A(t),n=Ae.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return W(t),t.subtreeFlags&=-33554433,null}e=Oe.current,da(t)?la(t,e):(e=hm(i,r,n),t.stateNode=e,pl(t))}return W(t),t.subtreeFlags&=-33554433,null;case 5:if(A(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return W(t),t.subtreeFlags&=-33554433,null}if(o=Oe.current,da(t))la(t,o);else{var s=lp(Ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);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(i,{is:r.is}):s.createElement(i)}}o[N]=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(np(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return W(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=Ae.current,da(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ia,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[N]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||ca(t,!0)}else e=lp(e).createTextNode(r),e[N]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=da(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[N]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=pa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(a(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=da(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[N]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),i=!1}else i=pa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),W(t),null);case 4:return Ne(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,W(t),null;case 10:return va(t.type),W(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return W(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)_l(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),B&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&qe()>gd&&(t.flags|=128,i=!0,_l(r,!1),t.lanes=4194304)}}else{if(!i){if(e=Bo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!B)return W(t),null}else 2*qe()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,i=!0,_l(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=qe(),e.sibling=null,o=Lo.current,o=i?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||B?Ro(t,o):(n=o,k(Ao,t),k(Lo,n),jo===null&&(jo=t)),B&&$i(t,r.treeForkCount),e}return W(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&gl(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&&De(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),va(Aa),W(t),null;case 25:return null;case 30:return t.flags|=33554432,W(t),null}throw Error(a(156,t.tag))}function yl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(Aa),Ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return A(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(a(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ne(),null;case 10:return va(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&De(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(Aa),null;case 25:return null;default:return null}}function bl(e,t){switch(na(t),t.tag){case 3:va(Aa),Ne();break;case 26:case 27:case 5:A(t);break;case 4:Ne();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:va(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&De(Wa);break;case 24:va(Aa)}}function xl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Sl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Cl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){Z(e,e.return,t)}}}function wl(e,t,n){n.props=Sc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Tl(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=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);p(e.child,!1,Qp,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){Z(e,t,n)}}function El(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function Dl(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++)em(e.stateNode,t[n])}function Ol(e){for(var t=e.return;t!==null&&(jl(t)&&em(e.stateNode,t.stateNode),!Al(t));)t=t.return}function kl(e){for(var t=e.return;t!==null&&(jl(t)&&tm(e.stateNode,t.stateNode),!Al(t));)t=t.return}function Al(e){return e.tag===5||e.tag===3||e.tag===27}function jl(e){return e&&e.tag===7&&e.stateNode!==null}function Ml(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Nl(e,t,n){try{var r=e.stateNode;ip(r,e.type,n,t),r[Dt]=t}catch(t){Z(e,e.return,t)}}function Pl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function Fl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Pl(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&&Sp(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 Il(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=bn)),Dl(e,r),L=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Dl(e,r),L=!0;else if(i!==4&&(i===27&&(Dl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);np(t,r,n),t[N]=e,t[Dt]=n}catch(t){Z(e,e.return,t)}}var zl=!1,Bl=null;function Vl(e){(e.tag===30||e.subtreeFlags&33554432)&&(zl=!0)}var Hl=null;function Ul(){var e=Hl;return Hl=null,e}var Wl=0;function Gl(e,t,n,r,i){return Wl=0,Kl(e.child,t,n,r,i)}function Kl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);zl=!0,Tp(o,Wl===0?t:t+`_`+Wl,n),Wl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Kl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function ql(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||ql(e.child,t)),e=e.sibling}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(a(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Gl(e,n,t,null,!1)||ql(e.child,!1))}e=e.sibling}}function Yl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Jl(e):Gl(e,i,a,null,!1)?(Jl(e),n.paired||t||Nd(e,r.onEnter)):ql(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e,t),e=e.sibling;else Jl(e)}function Xl(e){if(Bl!==null&&Bl.size!==0){var t=Bl;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=bi(n.default,n.share);if(a!==`none`&&(Gl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):ql(e.child,!1)),t.delete(r),t.size===0)break}}}Xl(e)}e=e.sibling}}}function Zl(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Bl===null?void 0:Bl.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Gl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Bl.delete(n),Nd(e,t.onShare)):ql(e.child,!1)),Bl!==null&&Xl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Bl!==null&&Xl(e)}function Ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Gl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Ql(e);e=e.sibling}}function $l(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))}$l(e)}e=e.sibling}}function eu(e){if(e.tag===30)e.stateNode.paired=null,ql(e.child,!1),$l(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)eu(e),e=e.sibling;else $l(e)}function tu(e){for(e=e.child;e!==null;)e.tag===30?ql(e.child,!1):e.subtreeFlags&33554432&&tu(e),e=e.sibling}function nu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Wl<a.length){var l=a[Wl],u=Op(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&&Tp(c,Wl===0?n:n+`_`+Wl,i),s&&e.flags&4||(Hl===null&&(Hl=[]),Hl.push(c,Wl===0?r:r+`_`+Wl,t.memoizedProps)),Wl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:nu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function ru(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Wl=0,i=nu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&ru(e,t);e=e.sibling}}var iu=!1,G=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,sp=gh,e=Jr(e),Yr(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(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Zl(r[a]);if(e.alternate===null&&e.flags&2)n&&Vl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Zl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Vl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Ql(e),mu(n))}}Bl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(i&1024&&r!==null){n=void 0,i=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=Sc(t.type,i);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){Z(t,t.return,e)}}break;case 3:if(i&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(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=vi(r.memoizedProps,r.stateNode),i=t.memoizedProps,i=bi(i.default,i.update),i!==`none`&&Gl(r,n,i,r.memoizedState=[],!0));break;default:if(i&1024)throw Error(a(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&xl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Sc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}}r&64&&Cl(n),r&512&&Tl(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{wo(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Rl(n);case 26:case 5:Fu(e,n),t===null&&r&4&&Ml(n),r&512&&Tl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||iu,!r){var a=t!==null&&t.memoizedState!==null||G;t=iu,i=G,iu=r,(G=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),iu=t,G=i}break;case 30:Fu(e,n),r&512&&Tl(n,n.return);break;case 7:r&512&&Tl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(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){Z(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,L=!0}catch(t){Z(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){Z(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pt(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 bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount==`function`)try{nt.onCommitFiberUnmount(tt,n)}catch{}switch(n.tag){case 26:G||El(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!G&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:G||El(n,t),kl(n);var r=bu,i=xu;Sp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:G||El(n,t),kl(n);case 6:if(n.tag===6&&kl(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),L=!0}catch(e){Z(n,t,e)}else try{bu.removeChild(n.stateNode),L=!0}catch(e){Z(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:Sl(2,n,t),G||Sl(4,n,t),Su(e,t,n);break;case 1:G||(El(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&wl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:G=(r=G)||n.memoizedState!==null,Su(e,t,n),G=r;break;case 30:El(n,t),Su(e,t,n);break;case 7:G||El(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){Z(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){Z(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(a(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var o=r[i],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(a(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&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}Ou(t,e,n),ju(e),i&4&&(Sl(3,e,e.return),xl(3,e),Sl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&64&&iu&&(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=ku,Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),i&4){if(i=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(iu)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,i=o.ownerDocument||o;b:switch(t){case`title`:r=i.getElementsByTagName(`title`)[0],(!r||r[Mt]||r[N]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=i.createElement(t),i.head.insertBefore(r,i.querySelector(`head > title`))),np(r,t,n),r[N]=e,zt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,i).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=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,i).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=i.createElement(t),np(r,t,n),i.head.appendChild(r);break;default:throw Error(a(468,t))}r[N]=e,zt(r),t=r}e.stateNode=t}}else iu||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else i===n?n===null&&e.stateNode!==null&&Nl(e,e.memoizedProps,r.memoizedProps):(i===null?(t=r.stateNode,t===null||G||t.parentNode.removeChild(t)):i.count--,n===null?iu||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),i&512&&(G||r===null||El(r,r.return)),r!==null&&i&4&&Nl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Ou(t,e,n),au=o,ju(e),i&512&&(G||r===null||El(r,r.return)),e.flags&32){t=e.stateNode;try{fn(t,``),L=!0}catch(t){Z(e,e.return,t)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,Nl(e,t,r===null?t:r.memoizedProps)),i&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),i&4){if(e.stateNode===null)throw Error(a(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,L=!0}catch(t){Z(e,e.return,t)}}break;case 3:if(L=!1,Wm=null,o=ku,ku=bm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){Z(e,e.return,t)}ou&&(ou=!1,Mu(e)),L=!1;break;case 4:i=au,au=iu,r=Jt(),o=ku,ku=bm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,L&&uu&&(du=!0),L=r,au=i;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=qe()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=iu,l=G,u=au;iu=c||o,au=u||o,G=l||s,Ou(t,e,n),G=l,au=u,iu=c,ju(e),i&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||iu||G||(t=s||G,n=iu,r=G,iu=o||iu,G=t,Iu(e,2),iu=n,G=r),!o&&au||gu(e,o)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:i&512&&(G||r===null||El(r,r.return)),i=Jt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&bi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&L&&(e.flags|=4),uu=o,L=i;break;case 21:break;case 7:i&512&&(G||r===null||El(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Pl(r)){n=r;break}r=r.return}r=null;for(var i=e.return;i!==null;){if(jl(i)){var o=i.stateNode;r===null?r=[o]:r.push(o)}if(Al(i))break;i=i.return}var s=r;if(n==null)throw Error(a(160));switch(n.tag){case 27:var c=n.stateNode;Ll(e,Fl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(fn(l,``),n.flags&=-33),Ll(e,Fl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Il(e,Fl(e),u,s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else ru(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Yl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Ul(),Nu(t,e),!lu&&!du){if(e=Hl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(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`})),fu=!0}Hl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Yl(e,!1));break;case 30:r=lu,i=Ul(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Wl=0,t=nu(e,n,t,o,s,a,!0),Wl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Hl=i):i!==null&&(i.push.apply(i,Hl),Hl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Sl(4,n,n.return),Iu(n,r);break;case 1:El(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&wl(n,n.return,i),Iu(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:El(n,n.return),n.tag!==5&&n.tag!==27||kl(n),Iu(n,r);break;case 6:kl(n);break;case 26:El(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||G||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:El(n,n.return),Iu(n,r);break;case 7:El(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(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:Lu(i,a,n),xl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],c)}catch(e){Z(r,r.return,e)}}s&&o&64&&Cl(a),Tl(a,a.return);break;case 27:n&2&&Rl(a);case 5:a.tag!==5&&a.tag!==27||Ol(a),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 6:Ol(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||iu||Km(bm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&Ml(a),Tl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),Tl(a,a.return);break;case 30:Lu(i,a,n),Tl(a,a.return);break;case 7:Tl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ma(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ma(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&tu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&eu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&xl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ma(a)));break;case 12:if(a&2048){Bu(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){Z(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(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&&eu(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&eu(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(ql(a.child,!0),ql(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(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:Hu(a,o,s,c,i),xl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(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:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=bm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Bl===null&&(Bl=new Map),Bl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(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 Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&Sl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:Sl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ma(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=wa(Aa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wa(Aa).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return K&2&&Y!==0?Y&-Y:E.T===null?wt():Pf()}function Md(){if(ld===0){if(!(Y&536870912)||B){var e=lt;lt<<=1,!(lt&3932160)&&(lt=262144),ld=e}else ld=536870912}return e=Ao.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(vi(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Y,ld,!1)),_t(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(sd|=n),ad===4&&Rd(e,Y,ld,!1)),Ef(e))}function Fd(e,t,n){if(K&6)throw Error(a(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ft(e,t),i=r?Yd(e,t):qd(e,t,!0),o=r;do{if(i===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))i=qd(e,t,!1),o=!1;else{if(i===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;i=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,i=4;break a}o=fd,fd=i,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=md+300-qe(),10<i)){if(Rd(r,t,ld,!td),M(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=gp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),i);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}}while(1);Ef(e)}function Id(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;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},Bl=null,Ku(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=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-qe():(a&4194048)===a?hd-qe():0,m=eh(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(nf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):nf(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(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(!Hr(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 Rd(e,t,n,r){t=pt(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-it(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&yt(e,n,t)}function zd(){return K&6?!0:(Df(0,!1),!1)}function Bd(){if(J!==null){if(X===0)var e=J.return;else e=J,V=ga=null,is(e),io=null,ao=0,e=J;for(;e!==null;)bl(e.alternate,e),e=e.return;J=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),q=e,J=n=Fi(e.current,null),Y=t,X=0,ed=null,td=!1,nd=ft(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=pt(e,t),Ti(),n}function Hd(e,t){H=null,E.H=mc,t===Ja||t===Xa?(t=no(),X=3):t===Ya?(t=no(),X=4):X=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,J===null&&(ad=1,Ec(e,Ui(t,e.current)))}function Ud(){var e=Ao.current;return e===null?!0:(Y&4194048)===Y?jo===null:(Y&62914560)===Y||Y&536870912?e===jo:!1}function Wd(){var e=E.H;return E.H=mc,e===null?mc:e}function Gd(){var e=E.A;return E.A=Qu,e}function Kd(){ad=4,td||(Y&4194048)!==Y&&Ao.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||q===null||Rd(q,Y,ld,!1)}function qd(e,t,n){var r=K;K|=2;var i=Wd(),a=Gd();(q!==e||Y!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if(X!==0&&J!==null){var s=J,c=ed;switch(X){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=X;if(X=0,ed=null,$d(e,s,c,l),n&&nd){o=0;break a}break;default:l=X,X=0,ed=null,$d(e,s,c,l)}}Jd(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,V=ga=null,K=r,E.H=i,E.A=a,J===null&&(q=null,Y=0,Ti()),o}function Jd(){for(;J!==null;)Zd(J)}function Yd(e,t){var n=K;K|=2;var r=Wd(),i=Gd();q!==e||Y!==t?(_d=null,gd=qe()+500,Vd(e,t)):nd=ft(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=ed;b:switch(X){case 1:X=0,ed=null,$d(e,t,o,1);break;case 2:case 9:if(Qa(o)){X=0,ed=null,Qd(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),Ef(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Qa(o)?(X=0,ed=null,Qd(t)):(X=0,ed=null,$d(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Ym(s):c.stateNode.complete){X=0,ed=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,ef(u))}break b}}X=0,ed=null,$d(e,t,o,5);break;case 6:X=0,ed=null,$d(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(a(462))}}Xd();break}catch(t){Hd(e,t)}while(1);return V=ga=null,E.H=r,E.A=i,K=n,J===null?(q=null,Y=0,Ti(),ad):0}function Xd(){for(;J!==null&&!Ge();)Zd(J)}function Zd(e){var t=fl(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function Qd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:is(t);var r=t;r===ia&&(B?(ua(r),r.tag===5&&r.stateNode!=null&&(z=r.stateNode)):(ua(r),B=!0));default:bl(n,t),t=J=Ii(t,id),t=fl(n,t,id)}e.memoizedProps=e.pendingProps,t===null?ef(e):J=t}function $d(e,t,n,r){V=ga=null,is(t),io=null,ao=0;var i=t.return;try{if(jc(e,i,t,n,Y)){ad=1,Ec(e,Ui(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;ad=1,Ec(e,Ui(n,e.current)),J=null;return}t.flags&32768?(B||r===1?e=!0:nd||Y&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),tf(t,e)):ef(t)}function ef(e){var t=e;do{if(t.flags&32768){tf(t,td);return}e=t.return;var n=vl(t.alternate,t,id);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);ad===0&&(ad=5)}function tf(e,t){do{var n=yl(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);ad=6,J=null}function nf(e,t,n,r,i,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do df();while(yd!==0);if(K&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));e===q&&(J=q=null,Y=0),xd=t,bd=e,Sd=n,wd=i,Td=r,rf(e,t,n,s,c,l,f)}}function rf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=wi,vt(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Fa(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Ze,function(){return ff(),null})):(e.callbackNode=null,e.callbackPriority=0),zl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=E.T,E.T=null,i=D.p,D.p=2,a=K,K|=4;try{pu(e,t,n)}finally{K=a,D.p=i,E.T=r}}yd=1,zl?Ed=Mp(o,e.containerInfo,Od,sf,cf,of,lf,ff,af,null,null):(sf(),cf(),lf())}function af(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function of(){yd===3&&(yd=0,Pu(xd,bd),yd=4)}function sf(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=E.T,E.T=null;var i=D.p;D.p=2;var a=K;K|=4;try{uu=du=!1,Au(t,e,n),n=cp;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(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 _=Kr(s,h),v=Kr(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}}gh=!!sp,cp=sp=null}finally{K=a,D.p=i,E.T=r}}e.current=t,yd=2}}function cf(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=E.T,E.T=null;var r=D.p;D.p=2;var i=K;K|=4;try{hu(e,t.alternate,t)}finally{K=i,D.p=r,E.T=n}}yd=3}}function lf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Ke();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,uf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),Ct(r),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot==`function`)try{nt.onCommitFiberRoot(tt,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=E.T,a=D.p,D.p=2,E.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{E.T=n,D.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=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);Sd&3&&df(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Df(0,!1)}}function uf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ma(t)))}function df(){return Ed!==null&&(Ed.skipTransition(),Ed=null),sf(),cf(),lf(),ff()}function ff(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=Ct(Sd),r=E.T,i=D.p;try{D.p=32>n?32:n,E.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,K&6)throw Error(a(331));var c=K;if(K|=4,Yu(o.current),Vu(o,o.current,s,n),K=c,Df(0,!1),nt&&typeof nt.onPostCommitFiberRoot==`function`)try{nt.onPostCommitFiberRoot(tt,o)}catch{}return!0}finally{D.p=i,E.T=r,uf(e,t)}}function pf(e,t,n){t=Ui(n,t),t=Oc(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(_t(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Ui(n,e),n=kc(2),r=_o(t,n,2),r!==null&&(Ac(n,r,t,e),_t(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;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)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>qe()-md?K&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=ht()),e=Oi(e,t),e!==null&&(_t(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Ue(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;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-it(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=M(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ft(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=qe(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-it(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=mt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=M(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&We(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ft(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&We(r),Ct(n)){case 2:case 8:n=Xe;break;case 32:n=Ze;break;case 268435456:n=$e;break;default:n=Ze}return r=jf.bind(null,e),n=Ue(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&We(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(df()&&e.callbackNode!==n)return null;var r=Y;return r=M(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),Af(e,qe()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(df())return null;Fd(e,t,!0)}function Nf(){bp(function(){K&6?Ue(Ye,Of):kf()})}function Pf(){if(Tf===0){var e=Ra;e===0&&(e=ct,ct<<=1,!(ct&261888)&&(ct=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:yn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[Dt]||null).action),o=r.submitter;o&&(t=(t=o[Dt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);ec(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),ec(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<hi.length;Lf++){var Rf=hi[Lf];gi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),I(`onMouseEnter`,[`mouseout`,`mouseover`]),I(`onMouseLeave`,[`mouseout`,`mouseover`]),I(`onPointerEnter`,[`pointerout`,`pointerover`]),I(`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 zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(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){xi(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){xi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[Ot];n===void 0&&(n=t[Ot]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Ht.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!An||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 Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Ft(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Dn(function(){var r=a,i=Sn(n),o=[];a:{var c=mi.get(e);if(c!==void 0){var l=Vn,u=e;switch(e){case`keypress`:if(In(n)===0)break a;case`keydown`:case`keyup`:l=ir;break;case`focusin`:u=`focus`,l=Xn;break;case`focusout`:u=`blur`,l=Xn;break;case`beforeblur`:case`afterblur`:l=Xn;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=Jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=sr;break;case si:case ci:case li:l=Zn;break;case pi:l=cr;break;case`scroll`:case`scrollend`:l=Un;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ar;break;case`submit`:l=or;break;case`toggle`:case`beforetoggle`:l=ur}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=On(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==xn&&(u=n.relatedTarget||n.fromElement)&&(Ft(u)||u[P]))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?Ft(l):null,l!==null&&(f=s(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ar,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,Ft(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?C(c,l,Yf):null,c!==null&&Xf(o,u,c,d,!1),l!==null&&f!==null&&Xf(o,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 _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&gn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(o,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Lt(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(o,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(o,n,i)}var y;if(fr)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 br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Fn()):(Mn=i,Nn=`value`in Mn?Mn.value:Mn.textContent,br=!0)),v=Jf(r,b),0<v.length&&(b=new R(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new R(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),If(o,e,r,n,i)}Vf(o,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(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=On(e,n),i!=null&&r.unshift(qf(e,i,a)),i=On(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(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=On(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=On(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
|
|
10
|
+
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&fn(e,``+r);else return;break;case`className`:Xt(e,`class`,r);break;case`tabIndex`:Xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Xt(e,n,r);break;case`style`:hn(e,r,o);return;case`data`:if(t!==`object`){Xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(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`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=yn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=bn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(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=yn(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`:Q(`beforetoggle`,e),Q(`toggle`,e),Yt(e,`popover`,r);break;case`xlinkActuate`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Yt(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=_n.get(n)||n,Yt(e,n,r);else return}L=!0}function tp(e,t,n,r,i,o){switch(n){case`style`:hn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)fn(e,r);else if(typeof r==`number`||typeof r==`bigint`)fn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=bn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!F.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),o=n.slice(2,i?n.length-7:void 0),t=e[Dt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,i),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,i);break a}L=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Yt(e,n,r)}return}L=!0}function np(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!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`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=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(a(137,t));break;default:$(e,t,r,d,n,null)}}sn(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&ln(e,!!r,n,!0):ln(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}dn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(gn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&tp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}var rp={};function ip(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 i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(L=!0),o=m;break;case`name`:m!==f&&(L=!0),i=m;break;case`checked`:m!==f&&(L=!0),u=m;break;case`defaultChecked`:m!==f&&(L=!0),d=m;break;case`value`:m!==f&&(L=!0),s=m;break;case`defaultValue`:m!==f&&(L=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}on(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:o!==l&&(L=!0),p=o;break;case`defaultValue`:o!==l&&(L=!0),c=o;break;case`multiple`:o!==l&&(L=!0),s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?ln(e,!!n,n?[]:``,!1):ln(e,!!n,t,!0)):ln(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:i!==o&&(L=!0),p=i;break;case`defaultValue`:i!==o&&(L=!0),m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}un(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(L=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(gn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&tp(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||tp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function ap(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function op(){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&&ap(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&&ap(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 sp=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(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 dp(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 fp(e,t,n,r){return n=lp(n).createElement(e),n[N]=r,n[Dt]=t,np(n,e,t),zt(n),n}function pp(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 mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(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),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(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 Tp(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 Ep(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 Dp(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 Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(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`&&(Ap(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+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.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 Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:w({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.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},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.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(Bp(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=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.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,Rp(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,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=v(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=lp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(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}Fp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Hp,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||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Ft(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=C(n,a,S),t===null?t=!1:(p(t,!0,ee,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=C(r,a,S),t===null?t=!1:(p(t,!0,x,a,r),a=y,b=y=null,t=a!==null)),t):!1}function Zp(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)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(a(566));var t=[];p(this._fragmentFiber.child,!1,Hp,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),Zp(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 i=t[r];i.tag===6?(i=v(i),Zp(i,n)):v(i).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=v(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(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,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(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,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(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`:nm(n),Pt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(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[Mt])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=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(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 lm(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 um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(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 pm(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 mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&$(e,t,r,null,rp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===bn&&(e.onclick=null),Pt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pt(e)}var vm=new Map,ym=new Set;function bm(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 xm=D.d;D.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=zd();return e||t}function Cm(e){var t=It(e);t!==null&&t.tag===5&&t.type===`form`?nc(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=an(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),zt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+an(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+an(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+an(n.imageSizes)+`"]`)):i+=`[href="`+an(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=w({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Nt]=!0,o.onload=o.onerror=function(){Vt(o)}),zt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+an(r)+`"][href="`+an(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=w({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),zt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Rt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=w({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);zt(c),np(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,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=w({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Rt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=w({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),zt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var i=(i=Ae.current)?bm(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Rt(i).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=Pm(n.href);var o=Rt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.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},vm.set(e,o)),Lm(i,e,o,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Rt(i).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(a(444,e))}}function Pm(e){return`href="`+an(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Nt]){r.loading=1;return}}else t=e.createElement(`link`),t[Nt]=!0,t.onload=t.onerror=Vt.bind(null,t),np(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 Rm(e){return`[src="`+an(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+an(n.href)+`"]`);if(r)return t.instance=r,zt(r),r;var i=w({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),zt(r),np(r,`style`,i),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pm(n.href);var o=e.querySelector(Fm(i));if(o)return t.state.loading|=4,t.instance=o,zt(o),o;r=Im(n),(i=vm.get(i))&&Hm(r,i),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}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(i=e.querySelector(zm(o)))?(t.instance=i,zt(i),i):(r=n,(i=vm.get(o))&&(r=w({},n),Um(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),zt(i),np(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(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 Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,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[Mt]||a[N]||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 Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(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 Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(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=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,zt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),zt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(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=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.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=nh.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 sh={$$typeof:le,Provider:null,Consumer:null,_currentValue:we,_currentValue2:we,_threadCount:0};function ch(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=gt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.hiddenUpdates=gt(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 lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=ja(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},mo(a),e}function uh(e){return e?(e=ji,e):ji}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(Pd(n,e,t),vo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Pd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=jd();t=St(t);var n=Oi(e,t);n!==null&&Pd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=E.T;E.T=null;var a=D.p;try{D.p=2,yh(e,t,n,r)}finally{D.p=a,E.T=i}}function vh(e,t,n,r){var i=E.T;E.T=null;var a=D.p;try{D.p=8,yh(e,t,n,r)}finally{D.p=a,E.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.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=dt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-it(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(K&6)&&(gd=qe()+500,Df(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Pd(s,a,2),zd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=Sn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Ft(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(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 xh=e,null}function Ch(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(Je()){case Ye:return 2;case Xe:return 8;case Ze:case Qe:return 32;case $e:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`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 Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(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&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Ft(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,Tt(e.priority,function(){hh(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 Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xn=r,n.target.dispatchEvent(r),xn=null}else return t=It(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,t){e.blockedOn===t&&(e.blockedOn=null,wh||(wh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Bh===e&&(Bh=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(Sh(r||n)===null)continue;break}var a=It(n);a!==null&&(e.splice(t,3),t-=3,ec(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.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||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Dt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){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 Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;dh(n,jd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),zd(),t[P]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=wt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=r.version;if(Kh!==`19.3.0`)throw Error(a(527,Kh,`19.3.0`));D.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:E,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{tt=Jh.inject(qh),nt=Jh}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,i,s,c,Uh),e[P]=t.current,Wf(e),new Wh(t)}})),Ht=e(((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=Vt()})),F=n(t(),1),Ut=Ht(),I=r();function Wt(){let e=(0,F.useRef)(null);return(0,F.useEffect)(()=>(A.attachCanvas(e.current),()=>A.attachCanvas(null)),[]),(0,I.jsx)(`canvas`,{ref:e,className:`pointer-events-none fixed inset-0 z-[100] size-full`,"aria-hidden":!0})}var Gt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function Kt(e,t){return Fe(e)?e[Gt(0,e.length,t)]:e}var qt=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return L(this.animations,`duration`)}get iterationDuration(){return L(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function L(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var Jt=class extends qt{then(e,t){return this.finished.finally(e).then(()=>{})}},Yt=[];function Xt(e){Ne(typeof e.test==`function`&&typeof e.read==`function`,`Effects passed to animate.addEffect() need test() and read().`,`effect-missing-test`),Zt(e),Yt.unshift(e)}function Zt(e){Ze(Yt,e)}function Qt(e){return Yt.find(t=>t.test(e))}function $t(e,t,n={},r){let i=[],{velocity:a}=n,o=n.reduceMotion??r?.shouldReduceMotion;for(let s in t){if(s===`transition`||s===`transitionEnd`)continue;let c=t[s];if(c===void 0)continue;let l=e(s),u=l.get();u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a?je.update(()=>l.set(c)):(l.start(Nt(s,l,c,o&&tt.has(s)?{type:!1}:n,r)),l.animation&&i.push(l.animation))}let{transitionEnd:s}=t;if(s){let t=()=>je.update(()=>{for(let t in s)e(t).set(s[t])});i.length?Promise.all(i).then(t):t()}return i}function en(e,t,n,r,i){return $t(r=>{let a=e.get(t,r);if(!a){let o;if(!i){let i=n[r];o=tn(i)??e.read(t,r,i),Ne(o!==void 0,`"${r}" can't be read from the animated subject. Provide [from, to] keyframes.`,`effect-unreadable-value`)}a=Ee(o,{owner:i}),e(t,{[r]:a})}return a},n,r,i)}function tn(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}var nn=class{constructor(e=je.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function rn(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new nn(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}var an={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},on={};function sn(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].get();a!==void 0&&(typeof a==`number`?a:parseFloat(a))!==+!!i.startsWith(`scale`)&&(t+=(t&&` `)+(on[i]||(on[i]=(an[i]||i)+`(`))+_t(a,we[i])+`)`)}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+`rotate(`+_t(i,we.pathRotation)+`)`),t||`none`}var cn=new Set([`originX`,`originY`,`originZ`]),ln=(e,t)=>_t(e.get(t)?.get(),mt[t]),un=(e,t,n,r)=>{let i,a;if(k.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>ke.indexOf(e)-ke.indexOf(t)))}t.get(`transform`)||(!ct(e)&&!t.get(`transformBox`)&&un(e,t,`transformBox`,new Ge(`fill-box`)),t.set(`transform`,new Ge(`none`),()=>{e.style.transform=sn(t)})),a=t.get(`transform`)}else cn.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new Ge(``),()=>{let n=ln(t,`originX`)??`50%`,r=ln(t,`originY`)??`50%`,i=ln(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=qe(n)?()=>{e.style.setProperty(n,r.get())}:()=>{e.style[n]=_t(r.get(),mt[n])};return t.set(n,r,i,a)},dn=e=>ct(e)||lt(e),fn=(e,t)=>{if(k.has(t))return Be(e,t);let n=getComputedStyle(e),r=qe(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},pn=rn(un,{test:dn,read:fn});function mn(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var hn=(e,t,n,r,i=n)=>{let a=mn(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=At(i));let o=mt[n]||mt[i],s=a?()=>{e[i]=_t(r.get(),mt[n])}:()=>{let t=_t(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function gn(e,t,n,r){return je.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new Ge(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var _n=rn((e,t,n,r)=>n.startsWith(`path`)?gn(e,t,n,r):n.startsWith(`attr`)?hn(e,t,n,r,vn(n)):(k.has(n)||cn.has(n)||qe(n)||n in e.style?un:hn)(e,t,n,r),{test:lt,read:(e,t)=>k.has(t)?mt[t]?.default||0:qe(t)||st.includes(t)?fn(e,t)||e.getAttribute(At(t))||0:(t=vn(t),e.getAttribute(At(t))??e.getAttribute(t)??void 0)});function vn(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}var yn={},bn=e=>lt(e)?_n:pn,xn=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=$e}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return at(this.current)}getProps(){return yn}};function Sn(e,t,n,r){if(r)return $t(e=>r.getValue(e,null),t,n,r);let i=bn(e);return en(i,e,t,n,new xn(i,e))}var Cn=rn((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>Xe(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}});function wn(e){let t=Me(()=>Ee(e)),{isStatic:n}=(0,F.useContext)(rt);if(n){let[,n]=(0,F.useState)(e);(0,F.useEffect)(()=>t.on(`change`,n),[])}return t}function Tn(e){return typeof e==`object`&&!Array.isArray(e)}function En(e,t,n,r){return e==null?[]:typeof e==`string`&&Tn(t)?Ct(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Dn(e,t,n){return e*(t+1)+n*t}function On(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function kn(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(Ze(e,i),r--)}}function An(e,t,n,r,i,a){kn(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Pe(i,a,r[o]),easing:Kt(n,o)})}function jn(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Mn(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Nn=`easeInOut`,Pn=20;function Fn(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}if(!Array.isArray(o)){l.set(o.name,On(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=On(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Rn(e),{delay:l=0,times:u=ft(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,ee=typeof l==`function`?l(o,s):l,x=c.length,S=jt(p)?p:i?.[p||`keyframes`];if(x<=2&&S){let e=100;if(x===2&&Vn(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=Lt(b));let r=He(n,e,S);y=r.ease,b=r.duration}b??=a;let C=d+ee;u.length===1&&u[0]===0&&(u[1]=1);let te=u.length-c.length;if(te>0&&Ie(u,te),c.length===1&&c.unshift(null),m&&Ye(m<Pn,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Pn} or apply repeat at the sequence level instead.`),m&&m<Pn){let e=b>0?_/b:0;b=Dn(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?We(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Kt(f,e-1))}jn(u,m,e)}let w=C+b;An(r,c,y,u,C,w),g=Math.max(ee+b,g),f=Math.max(w,f)};if(Ft(p)){let e=In(p,s);_(m,h,Ln(`default`,e))}else{let e=En(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=In(r,s);for(let e in m)_(m[e],zn(h,e),Ln(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Mn);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(Te(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Nn)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function In(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ln(e,t){return t[e]||(t[e]=[]),t[e]}function Rn(e){return Array.isArray(e)?e:[e]}function zn(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Bn=e=>typeof e==`number`,Vn=e=>e.every(Bn);function Hn(e,t){return Ft(e)||typeof e==`number`||typeof e==`string`&&!Tn(t)}function Un(e,t,n,r){let i=[];if(Hn(e,t))i.push(gt(e,Tn(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=En(e,t,r),o=a.length;Ne(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...Sn(r,t,s,kt.get(r))):i.push(...en(Qt(r)??Cn,r,t,s))}}return i}function Wn(e,t,n){let r=[];return Fn(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Ee(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Re}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Un(n,e,t))}),r}function Gn(e){return Array.isArray(e)&&e.some(Array.isArray)}function Kn(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),Gn(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Wn(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Un(e,i,{...c,...r},t)}let l=new Jt(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{Ze(t.animations,l)})),l}return i}var qn=Object.assign(Kn(),{addEffect:Xt,removeEffect:Zt}),Jn=Object.defineProperty,Yn=(e,t)=>Jn(e,`name`,{value:t,configurable:!0}),Xn=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`}),Zn=F.forwardRef(Yn(function(e,t){return(0,I.jsx)(l.span,{...e,ref:t,style:{...Xn,...e.style}})},`VisuallyHidden`)),Qn=Object.defineProperty,R=(e,t)=>Qn(e,`name`,{value:t,configurable:!0}),$n={LTR:`ltr`,RTL:`rtl`},er=[`Enter`,` `],tr=[`ArrowDown`,`PageUp`,`Home`],nr=[`ArrowUp`,`PageDown`,`End`],rr=[...tr,...nr],ir={ltr:[...er,`ArrowRight`],rtl:[...er,`ArrowLeft`]},ar={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},or=`Menu`,[sr,cr,lr]=u(or),[ur,dr]=S(or,[lr,Se,w]),fr=Se(),pr=w(),[mr,hr]=ur(or),[gr,_r]=ur(or),vr=R(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=fr(t),[c,l]=F.useState(null),u=F.useRef(!1),f=d(a),p=m(i);return F.useEffect(()=>{let e=R(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=R(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),F.useEffect(()=>{if(!n)return;let e=R(()=>f(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,I.jsx)(xe,{...s,children:(0,I.jsx)(mr,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:l,children:(0,I.jsx)(gr,{scope:t,onClose:F.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:o,children:r})})})},`Menu`),yr=F.forwardRef(R(function(e,t){let{__scopeMenu:n,...r}=e,i=fr(n);return(0,I.jsx)(Ce,{...i,...r,ref:t})},`MenuAnchor`)),br=`MenuPortal`,[xr,Sr]=ur(br,{forceMount:void 0}),Cr=R(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=hr(br,t);return(0,I.jsx)(xr,{scope:t,forceMount:n,children:(0,I.jsx)(E,{present:n||o.open,children:(0,I.jsx)(a,{asChild:!0,container:i,children:r})})})},`MenuPortal`),wr=`MenuContent`,[Tr,Er]=ur(wr),Dr=F.forwardRef(R(function(e,t){let n=Sr(wr,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=hr(wr,e.__scopeMenu),o=_r(wr,e.__scopeMenu);return(0,I.jsx)(sr.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(E,{present:r||a.open,children:(0,I.jsx)(sr.Slot,{scope:e.__scopeMenu,children:o.modal?(0,I.jsx)(Or,{...i,ref:t}):(0,I.jsx)(kr,{...i,ref:t})})})})},`MenuContent`)),Or=F.forwardRef(R(function(e,t){let n=hr(wr,e.__scopeMenu),r=F.useRef(null),i=C(t,r);return F.useEffect(()=>{let e=r.current;if(e)return s(e)},[]),(0,I.jsx)(jr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:x(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),kr=F.forwardRef(R(function(e,t){let n=hr(wr,e.__scopeMenu);return(0,I.jsx)(jr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),Ar=ge(`MenuContent.ScrollLock`),jr=F.forwardRef(R(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:y,...b}=e,ee=hr(wr,n),S=_r(wr,n),te=fr(n),w=pr(n),ne=cr(n),[ie,ae]=F.useState(null),oe=F.useRef(null),[se,le]=F.useState(null);g(se);let{nodes:T,registry:fe}=v(),pe=!!(i||y),me=C(t,oe,ee.onContentChange,le),he=F.useRef(0),ge=F.useRef(``),_e=F.useRef(0),ve=F.useRef(null),ye=F.useRef(`right`),be=F.useRef(0),xe=F.useMemo(()=>y?[oe,...T.map(e=>({current:e}))]:[],[oe,T,y]),Se=y?_:F.Fragment,Ce=y?{as:Ar,allowPinchZoom:!0,shards:xe}:void 0,E=R(e=>{let t=ge.current+e,n=ne().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=ii(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){ge.current=e,window.clearTimeout(he.current),e!==``&&(he.current=window.setTimeout(()=>s(``),1e3))}R(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);F.useEffect(()=>()=>window.clearTimeout(he.current),[]),de();let D=F.useCallback(e=>ye.current===ve.current?.side&&oi(e,ve.current?.area),[]);return(0,I.jsx)(Tr,{scope:n,searchRef:ge,onItemEnter:F.useCallback(e=>{D(e)&&e.preventDefault()},[D]),onItemLeave:F.useCallback(e=>{D(e)||(oe.current?.focus(),ae(null))},[D]),onTriggerLeave:F.useCallback(e=>{D(e)&&e.preventDefault()},[D]),pointerGraceTimerRef:_e,onPointerGraceIntentChange:F.useCallback(e=>{ve.current=e},[]),children:(0,I.jsx)(h,{registry:pe?fe:null,children:(0,I.jsx)(Se,{...Ce,children:(0,I.jsx)(ue,{asChild:!0,trapped:i,branches:T,onMountAutoFocus:x(a,e=>{e.preventDefault(),oe.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,I.jsx)(c,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:(0,I.jsx)(ce,{asChild:!0,...w,dir:S.dir,orientation:`vertical`,loop:r,currentTabStopId:ie,onCurrentTabStopIdChange:ae,onEntryFocus:x(l,e=>{S.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,I.jsx)(re,{role:`menu`,"aria-orientation":`vertical`,"data-state":$r(ee.open),"data-radix-menu-content":``,dir:S.dir,...te,...b,ref:me,style:{outline:`none`,...b.style},onKeyDown:x(b.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&E(e.key));let i=oe.current;if(e.target!==i||!rr.includes(e.key))return;e.preventDefault();let a=ne().filter(e=>!e.disabled).map(e=>e.ref.current);nr.includes(e.key)&&a.reverse(),ni(a)}),onBlur:x(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(he.current),ge.current=``)}),onPointerMove:x(e.onPointerMove,si(e=>{let t=e.target,n=be.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>be.current?`right`:`left`;ye.current=t,be.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),Mr=F.forwardRef(R(function(e,t){let{__scopeMenu:n,...r}=e;return(0,I.jsx)(l.div,{role:`group`,...r,ref:t})},`MenuGroup`)),Nr=`MenuItem`,Pr=`menu.itemSelect`,Fr=F.forwardRef(R(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=F.useRef(null),o=_r(Nr,e.__scopeMenu),s=Er(Nr,e.__scopeMenu),c=C(t,a),l=F.useRef(!1),u=R(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Pr,{bubbles:!0,cancelable:!0});e.addEventListener(Pr,e=>r?.(e),{once:!0}),p(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,I.jsx)(Ir,{...i,ref:c,disabled:n,onClick:x(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:x(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:x(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&er.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Ir=F.forwardRef(R(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Er(Nr,n),s=pr(n),c=F.useRef(null),u=C(t,c),[d,f]=F.useState(!1),[p,m]=F.useState(``);return F.useEffect(()=>{let e=c.current;e&&m((e.textContent??``).trim())},[a.children]),(0,I.jsx)(sr.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:(0,I.jsx)(se,{asChild:!0,...s,focusable:!r,children:(0,I.jsx)(l.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:u,onPointerMove:x(e.onPointerMove,si(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:x(e.onPointerLeave,si(e=>o.onItemLeave(e))),onFocus:x(e.onFocus,()=>f(!0)),onBlur:x(e.onBlur,()=>f(!1))})})})},`MenuItemImpl`)),[Lr,Rr]=ur(`MenuRadioGroup`,{value:void 0,onValueChange:R(()=>{},`onValueChange`)}),zr=F.forwardRef(R(function(e,t){let{value:n,onValueChange:r,...i}=e,a=d(r);return(0,I.jsx)(Lr,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,I.jsx)(Mr,{...i,ref:t})})},`MenuRadioGroup`)),Br=`MenuRadioItem`,Vr=F.forwardRef(R(function(e,t){let{value:n,...r}=e,i=Rr(Br,e.__scopeMenu),a=n===i.value;return(0,I.jsx)(Hr,{scope:e.__scopeMenu,checked:a,children:(0,I.jsx)(Fr,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":ti(a),onSelect:x(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})},`MenuRadioItem`)),[Hr,Ur]=ur(`MenuItemIndicator`,{checked:!1}),Wr=F.forwardRef(R(function(e,t){let{__scopeMenu:n,...r}=e;return(0,I.jsx)(l.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),Gr=`MenuSub`,[Kr,qr]=ur(Gr),Jr=R(e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=hr(Gr,t),o=fr(t),[s,c]=F.useState(null),[l,u]=F.useState(null),f=d(i);return F.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,I.jsx)(xe,{...o,children:(0,I.jsx)(mr,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:(0,I.jsx)(Kr,{scope:t,contentId:y(),triggerId:y(),trigger:s,onTriggerChange:c,children:n})})})},`MenuSub`),Yr=`MenuSubTrigger`,Xr=F.forwardRef(R(function(e,t){let n=hr(Yr,e.__scopeMenu),r=_r(Yr,e.__scopeMenu),i=qr(Yr,e.__scopeMenu),a=Er(Yr,e.__scopeMenu),o=F.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=F.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);F.useEffect(()=>u,[u]),F.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=C(t,i.onTriggerChange);return(0,I.jsx)(yr,{asChild:!0,...l,children:(0,I.jsx)(Ir,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":$r(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:x(e.onPointerMove,si(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:x(e.onPointerLeave,si(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:x(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||(a.searchRef.current===``||t.key!==` `)&&ir[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})},`MenuSubTrigger`)),Zr=`MenuSubContent`,Qr=F.forwardRef(R(function(e,t){let n=Sr(wr,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=hr(wr,e.__scopeMenu),s=_r(wr,e.__scopeMenu),c=qr(Zr,e.__scopeMenu),l=F.useRef(null),u=C(t,l);return(0,I.jsx)(sr.Provider,{scope:e.__scopeMenu,children:(0,I.jsx)(E,{present:r||o.open,children:(0,I.jsx)(sr.Slot,{scope:e.__scopeMenu,children:(0,I.jsx)(jr,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===$n.RTL?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:x(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:x(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:x(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ar[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})},`MenuSubContent`));function $r(e){return e?`open`:`closed`}R($r,`getOpenState`);function ei(e){return e===`indeterminate`}R(ei,`isIndeterminate`);function ti(e){return ei(e)?`indeterminate`:e?`checked`:`unchecked`}R(ti,`getCheckedState`);function ni(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}R(ni,`focusFirst`);function ri(e,t){return e.map((n,r)=>e[(t+r)%e.length])}R(ri,`wrapArray`);function ii(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ri(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}R(ii,`getNextMatch`);function ai(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}R(ai,`isPointInPolygon`);function oi(e,t){return t?ai({x:e.clientX,y:e.clientY},t):!1}R(oi,`isPointerInGraceArea`);function si(e){return t=>t.pointerType===`mouse`?e(t):void 0}R(si,`whenMouse`);var ci=Object.defineProperty,li=(e,t)=>ci(e,`name`,{value:t,configurable:!0}),ui=`ContextMenu`,[di,fi]=S(ui,[dr]),pi=dr(),[mi,hi]=di(ui),gi=li(e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:s=!0}=e,c=F.useRef(!1),[l,u]=o({prop:i,defaultProp:!1,onChange:r,caller:ui}),d=pi(t);return(0,I.jsx)(mi,{scope:t,open:l,onOpenChange:u,modal:s,hasInteractedRef:c,children:(0,I.jsx)(vr,{...d,dir:a,open:l,onOpenChange:u,modal:s,children:n})})},`ContextMenu`),_i=`ContextMenuTrigger`,vi=F.forwardRef(li(function(e,t){let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=hi(_i,n),o=pi(n),[s,c]=F.useState({x:0,y:0}),u=F.useMemo(()=>({current:{getBoundingClientRect:li(()=>DOMRect.fromRect({width:0,height:0,...s}),`getBoundingClientRect`)}}),[s]),d=F.useRef(0),f=F.useCallback(()=>window.clearTimeout(d.current),[]),p=li(e=>{a.hasInteractedRef.current=!0,c({x:e.clientX,y:e.clientY}),a.onOpenChange(!0)},`handleOpen`);return F.useEffect(()=>f,[f]),F.useEffect(()=>void(r&&f()),[r,f]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(yr,{...o,virtualRef:u}),(0,I.jsx)(l.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:x(e.onContextMenu,e=>{f(),p(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:x(e.onPointerDown,wi(e=>{f(),a.open&&a.onOpenChange(!1),d.current=window.setTimeout(()=>p(e),700)})),onPointerMove:r?e.onPointerMove:x(e.onPointerMove,wi(f)),onPointerCancel:r?e.onPointerCancel:x(e.onPointerCancel,wi(f)),onPointerUp:r?e.onPointerUp:x(e.onPointerUp,wi(f))})]})},`ContextMenuTrigger`)),yi=li(e=>{let{__scopeContextMenu:t,...n}=e,r=pi(t);return(0,I.jsx)(Cr,{...r,...n})},`ContextMenuPortal`),bi=`ContextMenuContent`,xi=F.forwardRef(li(function(e,t){let{__scopeContextMenu:n,...r}=e,i=hi(bi,n),a=pi(n),o=F.useRef(!1);return(0,I.jsx)(Dr,{...a,side:`right`,sideOffset:2,align:`start`,...r,ref:t,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`ContextMenuContent`)),Si=F.forwardRef(li(function(e,t){let{__scopeContextMenu:n,...r}=e,i=pi(n);return(0,I.jsx)(Fr,{...i,...r,ref:t})},`ContextMenuItem`)),Ci=F.forwardRef(li(function(e,t){let{__scopeContextMenu:n,...r}=e,i=pi(n);return(0,I.jsx)(Wr,{...i,...r,ref:t})},`ContextMenuSeparator`));function wi(e){return t=>t.pointerType===`mouse`?void 0:e(t)}li(wi,`whenTouchOrPen`);var Ti=Object.defineProperty,Ei=(e,t)=>Ti(e,`name`,{value:t,configurable:!0}),Di=`DropdownMenu`,[Oi,ki]=S(Di,[dr]),Ai=dr(),[ji,Mi]=Oi(Di),Ni=Ei(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:s,modal:c=!0}=e,l=Ai(t),u=F.useRef(null),[d,f]=o({prop:i,defaultProp:a??!1,onChange:s,caller:Di});return(0,I.jsx)(ji,{scope:t,triggerId:y(),triggerRef:u,contentId:y(),open:d,onOpenChange:f,onOpenToggle:F.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,I.jsx)(vr,{...l,open:d,onOpenChange:f,dir:r,modal:c,children:n})})},`DropdownMenu`),Pi=`DropdownMenuTrigger`,Fi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Mi(Pi,n),o=Ai(n),s=C(t,a.triggerRef);return(0,I.jsx)(yr,{asChild:!0,...o,children:(0,I.jsx)(l.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:x(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:x(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Ii=Ei(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Ai(t);return(0,I.jsx)(Cr,{...r,...n})},`DropdownMenuPortal`),Li=`DropdownMenuContent`,Ri=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Mi(Li,n),a=Ai(n),o=F.useRef(!1);return(0,I.jsx)(Dr,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:x(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:x(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),zi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(Fr,{...i,...r,ref:t})},`DropdownMenuItem`)),Bi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(zr,{...i,...r,ref:t})},`DropdownMenuRadioGroup`)),Vi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(Vr,{...i,...r,ref:t})},`DropdownMenuRadioItem`)),Hi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(Wr,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Ui=Ei(e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,s=Ai(t),[c,l]=o({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,I.jsx)(Jr,{...s,open:c,onOpenChange:l,children:n})},`DropdownMenuSub`),Wi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(Xr,{...i,...r,ref:t})},`DropdownMenuSubTrigger`)),Gi=F.forwardRef(Ei(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Ai(n);return(0,I.jsx)(Qr,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuSubContent`)),Ki=Object.defineProperty,qi=(e,t)=>Ki(e,`name`,{value:t,configurable:!0});function Ji(e,[t,n]){return Math.min(n,Math.max(t,e))}qi(Ji,`clamp`);var Yi=Object.defineProperty,Xi=(e,t)=>Yi(e,`name`,{value:t,configurable:!0}),Zi=`Popover`,[Qi,$i]=S(Zi,[Se]),ea=Se(),[ta,na]=Qi(Zi),ra=Xi(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=ea(t),l=F.useRef(null),[u,d]=F.useState(!1),[f,p]=F.useState(0),[m,h]=F.useState(0),[g,_]=o({prop:r,defaultProp:i??!1,onChange:a,caller:Zi});return(0,I.jsx)(xe,{...c,children:(0,I.jsx)(ta,{scope:t,contentId:y(),titleId:y(),descriptionId:y(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,triggerRef:l,open:g,onOpenChange:_,onOpenToggle:F.useCallback(()=>_(e=>!e),[_]),hasCustomAnchor:u,onCustomAnchorAdd:F.useCallback(()=>d(!0),[]),onCustomAnchorRemove:F.useCallback(()=>d(!1),[]),modal:s,children:n})})},`Popover`),ia=`PopoverTrigger`,z=F.forwardRef(Xi(function(e,t){let{__scopePopover:n,...r}=e,i=na(ia,n),a=ea(n),o=C(t,i.triggerRef),s=(0,I.jsx)(l.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":ma(i.open),...r,ref:o,onClick:x(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,I.jsx)(Ce,{asChild:!0,...a,children:s})},`PopoverTrigger`)),B=`PopoverPortal`,[aa,oa]=Qi(B,{forceMount:void 0}),sa=Xi(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=na(B,t);return(0,I.jsx)(aa,{scope:t,forceMount:n,children:(0,I.jsx)(E,{present:n||o.open,children:(0,I.jsx)(a,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),ca=`PopoverContent`,la=F.forwardRef(Xi(function(e,t){let n=oa(ca,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=na(ca,e.__scopePopover);return(0,I.jsx)(E,{present:r||a.open,children:a.modal?(0,I.jsx)(da,{...i,ref:t}):(0,I.jsx)(fa,{...i,ref:t})})},`PopoverContent`)),ua=ge(`PopoverContent.RemoveScroll`),da=F.forwardRef(Xi(function(e,t){let n=na(ca,e.__scopePopover),r=F.useRef(null),i=C(t,r),a=F.useRef(!1),{nodes:o,registry:c}=v();return F.useEffect(()=>{let e=r.current;if(e)return s(e)},[]),(0,I.jsx)(_,{as:ua,allowPinchZoom:!0,shards:F.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,I.jsx)(pa,{...e,ref:i,branchNodes:o,branchRegistry:c,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:x(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:x(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),fa=F.forwardRef(Xi(function(e,t){let n=na(ca,e.__scopePopover),r=F.useRef(!1),i=F.useRef(!1);return(0,I.jsx)(pa,{...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`)),pa=F.forwardRef(Xi(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,"aria-describedby":f,branchNodes:p,branchRegistry:m,..._}=e,v=na(ca,n),y=ea(n),[b,ee]=F.useState(null),x=C(t,ee);return g(b),de(),(0,I.jsx)(h,{registry:m,children:(0,I.jsx)(ue,{asChild:!0,loop:!0,trapped:r,branches:p,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,I.jsx)(c,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,I.jsx)(re,{"data-state":ma(v.open),role:`dialog`,id:v.contentId,"aria-labelledby":v.titlePresent?v.titleId:void 0,"aria-describedby":v.descriptionPresent?ha(f,v.descriptionId):f,...y,..._,ref:x,style:{..._.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 ma(e){return e?`open`:`closed`}Xi(ma,`getState`);function ha(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Xi(ha,`concatAriaDescribedby`);var ga=Object.defineProperty,V=(e,t)=>ga(e,`name`,{value:t,configurable:!0}),_a={Vertical:`vertical`,Horizontal:`horizontal`},va={LTR:`ltr`,RTL:`rtl`},ya=[`PageUp`,`PageDown`],ba=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],xa={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},Sa=`Slider`,[Ca,wa,Ta]=u(Sa),[Ea,Da]=S(Sa,[Ta]),[Oa,ka]=Ea(Sa),Aa=F.forwardRef(V(function(e,t){let{name:n,min:r=0,max:i=100,step:a=1,orientation:s=_a.Horizontal,disabled:c=!1,minStepsBetweenThumbs:l=0,preserveThumbOrder:u=!1,defaultValue:d=[r],value:f,onValueChange:p=V(()=>{},`onValueChange`),onValueCommit:m=V(()=>{},`onValueCommit`),inverted:h=!1,form:g,..._}=e,v=F.useRef(new Set),y=F.useRef(0),b=F.useRef(!1),[ee,S]=F.useState(null),te=s===_a.Horizontal?Na:Pa,[w,ne]=F.useState(null),re=C(t,ne),[ie=[],ae]=o({prop:f,defaultProp:d,onChange:V(e=>{[...v.current][y.current]?.focus({preventScroll:!0,focusVisible:b.current}),b.current=!1,p(e)},`onChange`)}),oe=F.useRef(ie),se=F.useRef(ie);F.useEffect(()=>{let e=g?w?.ownerDocument.getElementById(g):w?.closest(`form`);if(e instanceof HTMLFormElement){let t=V(()=>ae(se.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[w,g,ae]);function ce(e){de(e,Qa(ie,e))}V(ce,`handleSlideStart`);function le(e){de(e,y.current)}V(le,`handleSlideMove`);function ue(){String(ie)!==String(oe.current)&&m(ie)}V(ue,`handleSlideEnd`);function de(e,t,{commit:n}={commit:!1}){let o=ro(a),s=Ji(io(Math.round((e-r)/a)*a+r,o),[r,i]),c=l*a;function d(e){let n=u?Ji(s,[e[t-1]===void 0?r:e[t-1]+c,e[t+1]===void 0?i:e[t+1]-c]):s,a=Ya(e,n,t);return to(a,c)?{nextValues:a,changedIndex:u?t:a.indexOf(n),hasChanged:String(a)!==String(e)}:null}V(d,`getNextValues`);let f=d(ie);f?.hasChanged&&S(f.nextValues),ae((e=[])=>{let t=d(e);return t?(y.current=t.changedIndex,t.hasChanged&&n&&m(t.nextValues),t.hasChanged?t.nextValues:e):e})}return V(de,`updateValues`),(0,I.jsx)(Oa,{scope:e.__scopeSlider,name:n,disabled:c,min:r,max:i,valueIndexToChangeRef:y,thumbs:v.current,values:ie,orientation:s,form:g,userRequestedValues:ee,children:(0,I.jsx)(Ca.Provider,{scope:e.__scopeSlider,children:(0,I.jsx)(Ca.Slot,{scope:e.__scopeSlider,children:(0,I.jsx)(te,{"aria-disabled":c,"data-disabled":c?``:void 0,..._,ref:re,onPointerDown:x(_.onPointerDown,()=>{c||(oe.current=ie,b.current=!1)}),min:r,max:i,inverted:h,onSlideStart:c?void 0:ce,onSlideMove:c?void 0:le,onSlideEnd:c?void 0:ue,onHomeKeyDown:()=>{c||(b.current=!0,de(r,0,{commit:!0}))},onEndKeyDown:()=>{c||(b.current=!0,de(i,ie.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!c){b.current=!0;let n=ya.includes(e.key)||e.shiftKey&&ba.includes(e.key)?10:1,i=y.current,o=ie[i];de(ao(o,{min:r,step:a,direction:t,multiplier:n}),i,{commit:!0})}}})})})})},`Slider`)),[ja,Ma]=Ea(Sa,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Na=F.forwardRef(V(function(e,t){let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=F.useState(null),p=C(t,f),h=F.useRef(void 0),g=m(i),_=g===va.LTR,v=_&&!a||!_&&a;function y(e){let t=h.current||d.getBoundingClientRect(),i=no([0,t.width],v?[n,r]:[r,n]);return h.current=t,i(e-t.left)}return V(y,`getValueFromPointer`),(0,I.jsx)(ja,{scope:e.__scopeSlider,startEdge:v?`left`:`right`,endEdge:v?`right`:`left`,direction:v?1:-1,size:`width`,children:(0,I.jsx)(Fa,{dir:g,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=y(e.clientX);o?.(t)},onSlideMove:e=>{let t=y(e.clientX);s?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=xa[v?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})},`SliderHorizontal`)),Pa=F.forwardRef(V(function(e,t){let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=F.useRef(null),d=C(t,u),f=F.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=no([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return V(m,`getValueFromPointer`),(0,I.jsx)(ja,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,I.jsx)(Fa,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=xa[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})},`SliderVertical`)),Fa=F.forwardRef(V(function(e,t){let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...u}=e,d=ka(Sa,n);return(0,I.jsx)(l.span,{...u,ref:t,onKeyDown:x(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):ya.concat(ba).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:x(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),d.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:x(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:x(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})},`SliderImpl`)),Ia=`SliderTrack`,La=F.forwardRef(V(function(e,t){let{__scopeSlider:n,...r}=e,i=ka(Ia,n);return(0,I.jsx)(l.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})},`SliderTrack`)),Ra=`SliderRange`,za=F.forwardRef(V(function(e,t){let{__scopeSlider:n,...r}=e,i=ka(Ra,n),a=Ma(Ra,n),o=F.useRef(null),s=C(t,o),c=i.values.length,u=i.values.map(e=>Xa(e,i.min,i.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return(0,I.jsx)(l.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:s,style:{...e.style,[a.startEdge]:d+`%`,[a.endEdge]:f+`%`}})},`SliderRange`)),[Ba,Va]=Ea(`SliderThumb`),Ha=`SliderThumbProvider`;function Ua(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=ka(Ha,t),o=wa(t),[s,c]=F.useState(null),l=F.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=b(s),d=!s||!!a.form||!!s.closest(`form`),f=a.values[l],p=n??(a.name?a.name+(a.values.length>1?`[]`:``):void 0),m=f===void 0?0:Xa(f,a.min,a.max);F.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]);let h={value:f,name:p,form:a.form,isFormControl:d,index:l,thumb:s,onThumbChange:c,percent:m,size:u};return(0,I.jsx)(Ba,{scope:t,...h,children:oo(i)?i(h):r})}V(Ua,`SliderThumbProvider`);var Wa=`SliderThumbTrigger`,Ga=F.forwardRef(V(function(e,t){let{__scopeSlider:n,...r}=e,i=ka(Wa,n),a=Ma(Wa,n),{index:o,value:s,percent:c,size:u,onThumbChange:d}=Va(Wa,n),f=C(t,d),p=Za(o,i.values.length),m=u?.[a.size],h=m?$a(m,c,a.direction):0;return(0,I.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${h}px)`},children:(0,I.jsx)(Ca.ItemSlot,{scope:n,children:(0,I.jsx)(l.span,{role:`slider`,"aria-label":e[`aria-label`]||p,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:f,style:s===void 0?{display:`none`}:e.style,onFocus:x(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})},`SliderThumbTrigger`)),Ka=F.forwardRef(V(function(e,t){let{__scopeSlider:n,name:r,...i}=e;return(0,I.jsx)(Ua,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ga,{...i,ref:t,__scopeSlider:n}),r?(0,I.jsx)(Ja,{__scopeSlider:n},e):null]})})},`SliderThumb`)),qa=`SliderBubbleInput`,Ja=F.forwardRef(V(function({__scopeSlider:e,onInput:t,...n},r){let{index:i,value:a,name:o,form:s}=Va(qa,e),{userRequestedValues:c}=ka(qa,e),u=F.useRef(null),d=C(u,r),f=F.useRef(!1),p=F.useRef(a),m=F.useRef(c),h=F.useRef(c);return F.useEffect(()=>{let e=u.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=p.current,o=r!==a;p.current=a;let s=c!==h.current;if(h.current=c,o&&n){let t=c!==m.current;m.current=c;let o=c?.[i];f.current=!(t&&(s&&o!==r||o===a));let l=new Event(`input`,{bubbles:!0});n.call(e,a),e.dispatchEvent(l),f.current=!1}},[i,a,c]),(0,I.jsx)(l.input,{style:{display:`none`},name:o,form:s,...n,ref:d,defaultValue:a,onInput:x(t,e=>{f.current&&e.stopPropagation()})})},`SliderBubbleInput`));function Ya(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}V(Ya,`getNextSortedValues`);function Xa(e,t,n){return Ji(100/(n-t)*(e-t),[0,100])}V(Xa,`convertValueToPercentage`);function Za(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}V(Za,`getLabel`);function Qa(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}V(Qa,`getClosestValueIndex`);function $a(e,t,n){let r=e/2;return(r-no([0,50],[0,r])(t)*n)*n}V($a,`getThumbInBoundsOffset`);function eo(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}V(eo,`getStepsBetweenValues`);function to(e,t){if(t>0){let n=eo(e);return Math.min(...n)>=t}return!0}V(to,`hasMinStepsBetweenValues`);function no(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}V(no,`linearScale`);function ro(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}V(ro,`getDecimalCount`);function io(e,t){let n=10**t;return Math.round(e*n)/n}V(io,`roundValue`);function ao(e,{min:t,step:n,direction:r,multiplier:i}){let a=ro(n),o=(e-t)/n,s=Math.round(o),c=io(s*n+t,a)===io(e,a),l;return l=c?s+i*r:r>0?Math.ceil(o):Math.floor(o),io(l*n+t,a)}V(ao,`getNextStepValue`);function oo(e){return typeof e==`function`}V(oo,`isFunction`);var so=Object.defineProperty,co=(e,t)=>so(e,`name`,{value:t,configurable:!0}),lo=`Switch`,[uo,fo]=S(lo),[po,mo]=uo(lo);function ho(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:c,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=o({prop:n,defaultProp:i??!1,onChange:l,caller:lo}),[h,g]=F.useState(null),[_,v]=F.useState(null),[y,b]=F.useState(null),ee={checked:p,setChecked:m,disabled:a,control:h,setControl:g,name:c,form:s,value:d,userClick:y,onUserClick:b,required:u,defaultChecked:i,isFormControl:!h||!!s||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,I.jsx)(po,{scope:t,...ee,children:Co(f)?f(ee):r})}co(ho,`SwitchProvider`);var go=`SwitchTrigger`,_o=F.forwardRef(co(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:u,setControl:d,setChecked:f,onUserClick:p,isFormControl:m,bubbleInput:h}=mo(go,e),g=C(r,d),_=F.useRef(c);return F.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=co(()=>f(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,f]),(0,I.jsx)(l.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":u,"data-state":wo(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:x(t,e=>{let t=e.isPropagationStopped();p({requestedChecked:!c,hasConsumerStoppedPropagation:t}),f(e=>!e),h&&m&&(t||e.stopPropagation())})})},`SwitchTrigger`)),vo=F.forwardRef(co(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,I.jsx)(ho,{__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,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(_o,{...d,ref:t,__scopeSwitch:n}),e&&(0,I.jsx)(So,{__scopeSwitch:n})]})})},`Switch`)),yo=`SwitchThumb`,bo=F.forwardRef(co(function(e,t){let{__scopeSwitch:n,...r}=e,i=mo(yo,n);return(0,I.jsx)(l.span,{"data-state":wo(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),xo=`SwitchBubbleInput`,So=F.forwardRef(co(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=mo(xo,e),g=C(r,h),_=b(i),v=F.useRef(!1),y=F.useRef(o),ee=F.useRef(a),S=F.useRef(null);F.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=y.current!==o;y.current=o;let i=a!==null&&a!==ee.current;if(ee.current=a,i)S.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=S.current;S.current=null;let r=t?.requestedChecked===o;v.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),v.current=!1}},[m,o,a]);let te=F.useRef(o);return(0,I.jsx)(l.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??te.current,required:c,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:x(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function Co(e){return typeof e==`function`}co(Co,`isFunction`);function wo(e){return e?`checked`:`unchecked`}co(wo,`getState`);var To=Object.defineProperty,Eo=(e,t)=>To(e,`name`,{value:t,configurable:!0}),Do={Automatic:`automatic`,Manual:`manual`},Oo=`Tabs`,[ko,Ao]=S(Oo,[w]),jo=w(),[Mo,No]=ko(Oo),Po=F.forwardRef(Eo(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:s=`horizontal`,dir:c,activationMode:u=Do.Automatic,...d}=e,f=m(c),[p,h]=o({prop:r,onChange:i,defaultProp:a??``,caller:Oo});return(0,I.jsx)(Mo,{scope:n,baseId:y(),value:p,onValueChange:h,orientation:s,dir:f,activationMode:u,children:(0,I.jsx)(l.div,{dir:f,"data-orientation":s,...d,ref:t})})},`Tabs`)),Fo=`TabsList`,Io=F.forwardRef(Eo(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=No(Fo,n),o=jo(n);return(0,I.jsx)(ce,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,I.jsx)(l.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Lo=`TabsTrigger`,Ro=F.forwardRef(Eo(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=No(Lo,n),s=jo(n),c=Vo(o.baseId,r),u=H(o.baseId,r),d=r===o.value;return(0,I.jsx)(se,{asChild:!0,...s,focusable:!i,active:d,children:(0,I.jsx)(l.button,{type:`button`,role:`tab`,"aria-selected":d,"aria-controls":u,"data-state":d?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:x(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:x(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:x(e.onFocus,()=>{let e=o.activationMode!==Do.Manual;!d&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),zo=`TabsContent`,Bo=F.forwardRef(Eo(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=No(zo,n),c=Vo(s.baseId,r),u=H(s.baseId,r),d=r===s.value,f=F.useRef(d);return F.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(E,{present:i||d,children:({present:n})=>(0,I.jsx)(l.div,{"data-state":d?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Vo(e,t){return`${e}-trigger-${t}`}Eo(Vo,`makeTriggerId`);function H(e,t){return`${e}-content-${t}`}Eo(H,`makeContentId`);var U=Object.defineProperty,Ho=(e,t)=>U(e,`name`,{value:t,configurable:!0}),Uo=`Toggle`,Wo=F.forwardRef(Ho(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[s,c]=o({prop:n,onChange:i,defaultProp:r??!1,caller:Uo});return(0,I.jsx)(l.button,{type:`button`,"aria-pressed":s,"data-state":s?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:x(e.onClick,()=>{e.disabled||c(!s)})})},`Toggle`)),Go=Object.defineProperty,Ko=(e,t)=>Go(e,`name`,{value:t,configurable:!0}),qo=`ToggleGroup`,Jo={Single:`single`,Multiple:`multiple`},[Yo,Xo]=S(qo,[w]),Zo=w(),Qo=F.forwardRef(Ko(function(e,t){let{type:n,...r}=e;if(n===Jo.Single)return(0,I.jsx)(ts,{role:`radiogroup`,...r,ref:t});if(n===Jo.Multiple)return(0,I.jsx)(ns,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${qo}\``)},`ToggleGroup`)),[$o,es]=Yo(qo),ts=F.forwardRef(Ko(function(e,t){let{value:n,defaultValue:r,onValueChange:i=Ko(()=>{},`onValueChange`),...a}=e,[s,c]=o({prop:n,defaultProp:r??``,onChange:i,caller:qo});return(0,I.jsx)($o,{scope:e.__scopeToggleGroup,type:Jo.Single,value:F.useMemo(()=>s?[s]:[],[s]),onItemActivate:c,onItemDeactivate:F.useCallback(()=>c(``),[c]),children:(0,I.jsx)(as,{...a,ref:t})})},`ToggleGroupImplSingle`)),ns=F.forwardRef(Ko(function(e,t){let{value:n,defaultValue:r,onValueChange:i=Ko(()=>{},`onValueChange`),...a}=e,[s,c]=o({prop:n,defaultProp:r??[],onChange:i,caller:qo}),l=F.useCallback(e=>c((t=[])=>[...t,e]),[c]),u=F.useCallback(e=>c((t=[])=>t.filter(t=>t!==e)),[c]);return(0,I.jsx)($o,{scope:e.__scopeToggleGroup,type:Jo.Multiple,value:s,onItemActivate:l,onItemDeactivate:u,children:(0,I.jsx)(as,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[rs,is]=Yo(qo),as=F.forwardRef(Ko(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,u=Zo(n),d=m(o),f={dir:d,...c};return(0,I.jsx)(rs,{scope:n,rovingFocus:i,disabled:r,children:i?(0,I.jsx)(ce,{asChild:!0,...u,orientation:a,dir:d,loop:s,children:(0,I.jsx)(l.div,{...f,ref:t})}):(0,I.jsx)(l.div,{...f,ref:t})})},`ToggleGroupImpl`)),os=`ToggleGroupItem`,ss=F.forwardRef(Ko(function(e,t){let n=es(os,e.__scopeToggleGroup),r=is(os,e.__scopeToggleGroup),i=Zo(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=F.useRef(null);return r.rovingFocus?(0,I.jsx)(se,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,I.jsx)(cs,{...s,ref:t})}):(0,I.jsx)(cs,{...s,ref:t})},`ToggleGroupItem`)),cs=F.forwardRef(Ko(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=es(os,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===Jo.Single?o:void 0;return(0,I.jsx)(Wo,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),ls=Object.defineProperty,us=(e,t)=>ls(e,`name`,{value:t,configurable:!0}),[ds,fs]=S(`Tooltip`,[Se]),ps=Se(),ms=`TooltipProvider`,hs=700,gs=`tooltip.open`,[_s,vs]=ds(ms),ys=us(e=>{let{__scopeTooltip:t,delayDuration:n=hs,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=F.useRef(!0),s=F.useRef(!1),c=F.useRef(0);return F.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,I.jsx)(_s,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:F.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:F.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:F.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),bs=`Tooltip`,[xs,Ss]=ds(bs),Cs=us(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:s,delayDuration:c}=e,l=vs(bs,e.__scopeTooltip),u=ps(t),[d,f]=F.useState(null),[p,m]=F.useState(void 0),h=y(),g=F.useRef(0),_=s??l.disableHoverableContent,v=c??l.delayDuration,b=F.useRef(!1),[ee,x]=o({prop:r,defaultProp:i??!1,onChange:us(e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(gs))):l.onClose(),a?.(e)},`onChange`),caller:bs}),S=F.useMemo(()=>ee?b.current?`delayed-open`:`instant-open`:`closed`,[ee]),C=F.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,x(!0)},[x]),te=F.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),w=F.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,x(!0),g.current=0},v)},[v,x]);F.useEffect(()=>()=>{g.current&&=(window.clearTimeout(g.current),0)},[]);let ne=p??h;return(0,I.jsx)(xe,{...u,children:(0,I.jsx)(xs,{scope:t,contentId:ne,setContentId:m,open:ee,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:F.useCallback(()=>{l.isOpenDelayedRef.current?w():C()},[l.isOpenDelayedRef,w,C]),onTriggerLeave:F.useCallback(()=>{_?te():(window.clearTimeout(g.current),g.current=0)},[te,_]),onOpen:C,onClose:te,disableHoverableContent:_,children:n})})},`Tooltip`),ws=`TooltipTrigger`,Ts=F.forwardRef(us(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=Ss(ws,n),o=vs(ws,n),s=ps(n),c=F.useRef(null),u=C(t,c,a.onTriggerChange),d=F.useRef(!1),f=F.useRef(!1),p=F.useCallback(()=>d.current=!1,[]);return F.useEffect(()=>()=>document.removeEventListener(`pointerup`,p),[p]),(0,I.jsx)(Ce,{asChild:!0,...s,children:(0,I.jsx)(l.button,{"aria-describedby":a.open?Vs(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:u,onPointerMove:x(e.onPointerMove,e=>{e.pointerType!==`touch`&&!f.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),f.current=!0)}),onPointerLeave:x(e.onPointerLeave,()=>{a.onTriggerLeave(),f.current=!1}),onPointerDown:x(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener(`pointerup`,p,{once:!0})}),onFocus:x(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:x(e.onBlur,a.onClose),onClick:x(e.onClick,a.onClose)})})},`TooltipTrigger`)),Es=`TooltipPortal`,[Ds,Os]=ds(Es,{forceMount:void 0}),ks=us(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Ss(Es,t);return(0,I.jsx)(Ds,{scope:t,forceMount:n,children:(0,I.jsx)(E,{present:n||o.open,children:(0,I.jsx)(a,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),As=`TooltipContent`,js=F.forwardRef(us(function(e,t){let n=Os(As,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Ss(As,e.__scopeTooltip);return(0,I.jsx)(E,{present:r||o.open,children:o.disableHoverableContent?(0,I.jsx)(Ps,{side:i,...a,ref:t}):(0,I.jsx)(Ms,{side:i,...a,ref:t})})},`TooltipContent`)),Ms=F.forwardRef(us(function(e,t){let n=Ss(As,e.__scopeTooltip),r=vs(As,e.__scopeTooltip),i=F.useRef(null),a=C(t,i),[o,s]=F.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=F.useCallback(()=>{s(null),d(!1)},[d]),p=F.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Is(r,Fs(r,n.getBoundingClientRect())),a=Ls(t.getBoundingClientRect()),o=zs([...i,...a]);s(o),d(!0)},[d]);return F.useEffect(()=>()=>f(),[f]),F.useEffect(()=>{if(c&&u){let e=us(e=>p(e,u),`handleTriggerLeave`),t=us(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]),F.useEffect(()=>{if(o){let e=us(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Rs(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,I.jsx)(Ps,{...e,ref:a})},`TooltipContentHoverable`)),Ns=f(`TooltipContent`),Ps=F.forwardRef(us(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...l}=e,u=Ss(As,n),d=ps(n),{onClose:f}=u,[p,m]=F.useState(null),h=C(t,m);g(p),F.useEffect(()=>(document.addEventListener(gs,f),()=>document.removeEventListener(gs,f)),[f]),F.useEffect(()=>{if(u.trigger){let e=us(e=>{e.target instanceof Node&&e.target.contains(u.trigger)&&f()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[u.trigger,f]);let{setContentId:_}=u;return ee(()=>(_(a),()=>{_(void 0)}),[a,_]),(0,I.jsx)(c,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:f,children:(0,I.jsxs)(re,{"data-state":u.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:u.contentId,...d,...l,ref:h,style:{...l.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,I.jsx)(Ns,{children:r}),i?(0,I.jsx)(Zn,{id:u.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function Fs(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`)}}us(Fs,`getExitSideFromRect`);function Is(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}us(Is,`getPaddedExitPoints`);function Ls(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}]}us(Ls,`getPointsFromRect`);function Rs(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}us(Rs,`isPointInPolygon`);function zs(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)),Bs(t)}us(zs,`getHull`);function Bs(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)}us(Bs,`getHullPresorted`);function Vs(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}us(Vs,`concatAriaDescribedby`);var Hs={name:`app-window`,size:24,node:[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]};Hs.node;var Us=j(Hs),Ws={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};Ws.node;var Gs=j(Ws),Ks={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Ks.node;var qs=j(Ks),Js={name:`arrow-up-to-line`,size:24,node:[[`path`,{d:`M5 3h14`,key:`7usisc`}],[`path`,{d:`m18 13-6-6-6 6`,key:`1kf1n9`}],[`path`,{d:`M12 7v14`,key:`1akyts`}]]};Js.node;var Ys=j(Js),Xs={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Xs.node;var Zs=j(Xs),Qs={name:`audio-lines`,size:24,node:[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]};Qs.node;var $s=j(Qs),ec={name:`box`,size:24,node:[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]};ec.node;var tc=j(ec),nc={name:`camera-off`,size:24,node:[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]};nc.node;var rc=j(nc),ic={name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]],aliases:[`bar-chart-2`]};ic.node;var ac=j(ic),oc={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};oc.node;var sc=j(oc),cc={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`]};cc.node;var lc=j(cc),uc={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};uc.node;var dc=j(uc),fc={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`]};fc.node;var pc=j(fc),mc={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`]};mc.node;var hc=j(mc),gc={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};gc.node;var _c=j(gc),vc={name:`component`,size:24,node:[[`path`,{d:`M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1uwlt4`}],[`path`,{d:`M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z`,key:`10291m`}],[`path`,{d:`M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z`,key:`1tqoq1`}],[`path`,{d:`M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z`,key:`1x6lto`}]]};vc.node;var yc=j(vc),bc={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`}]]};bc.node;var xc=j(bc),Sc={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};Sc.node;var Cc=j(Sc),wc={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};wc.node;var Tc=j(wc),Ec={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`}]]};Ec.node;var Dc=j(Ec),Oc={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Oc.node;var kc=j(Oc),Ac={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`}]]};Ac.node;var jc=j(Ac),Mc={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`}]]};Mc.node;var Nc=j(Mc),Pc={name:`file-code-corner`,size:24,node:[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],aliases:[`file-code-2`]};Pc.node;var Fc=j(Pc),Ic={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`}]]};Ic.node;var Lc=j(Ic),Rc={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};Rc.node;var zc=j(Rc),Bc={name:`folder-git-2`,size:24,node:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]};Bc.node;var Vc=j(Bc),Hc={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};Hc.node;var Uc=j(Hc),Wc={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};Wc.node;var Gc=j(Wc),Kc={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};Kc.node;var qc=j(Kc),Jc={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`}]]};Jc.node;var Yc=j(Jc),Xc={name:`git-compare-arrows`,size:24,node:[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]};Xc.node;var Zc=j(Xc),Qc={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Qc.node;var $c=j(Qc),el={name:`hand-fist`,size:24,node:[[`path`,{d:`M12.035 17.012a3 3 0 0 0-3-3l-.311-.002a.72.72 0 0 1-.505-1.229l1.195-1.195A2 2 0 0 1 10.828 11H12a2 2 0 0 0 0-4H9.243a3 3 0 0 0-2.122.879l-2.707 2.707A4.83 4.83 0 0 0 3 14a8 8 0 0 0 8 8h2a8 8 0 0 0 8-8V7a2 2 0 1 0-4 0v2a2 2 0 1 0 4 0`,key:`1ff7rl`}],[`path`,{d:`M13.888 9.662A2 2 0 0 0 17 8V5A2 2 0 1 0 13 5`,key:`1xmd21`}],[`path`,{d:`M9 5A2 2 0 1 0 5 5V10`,key:`f3wfjw`}],[`path`,{d:`M9 7V4A2 2 0 1 1 13 4V7.268`,key:`eaoucv`}]]};el.node;var tl=j(el),nl={name:`hand-grab`,size:24,node:[[`path`,{d:`M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4`,key:`edstyy`}],[`path`,{d:`M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`19wdwo`}],[`path`,{d:`M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5`,key:`1lugqo`}],[`path`,{d:`M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1hbeus`}],[`path`,{d:`M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0`,key:`1etffm`}]],aliases:[`grab`]};nl.node;var rl=j(nl),il={name:`hand`,size:24,node:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]};il.node;var al=j(il),ol={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};ol.node;var sl=j(ol),cl={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`}]]};cl.node;var ll=j(cl),ul={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`}]]};ul.node;var dl=j(ul),fl={name:`laptop`,size:24,node:[[`path`,{d:`M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z`,key:`1pdavp`}],[`path`,{d:`M20.054 15.987H3.946`,key:`14rxg9`}]]};fl.node;var pl=j(fl),ml={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`]};ml.node;var hl=j(ml),gl={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};gl.node;var _l=j(gl),W={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};W.node;var vl=j(W),yl={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};yl.node;var bl=j(yl),xl={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};xl.node;var Sl=j(xl),Cl={name:`message-square-text`,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:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]};Cl.node;var wl=j(Cl),Tl={name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]};Tl.node;var El=j(Tl),Dl={name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]};Dl.node;var Ol=j(Dl),kl={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};kl.node;var Al=j(kl),jl={name:`monitor-off`,size:24,node:[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M17 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 1.184-1.826`,key:`cv7jms`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`path`,{d:`M8.656 3H20a2 2 0 0 1 2 2v10a2 2 0 0 1-.293 1.042`,key:`z8ni2w`}]]};jl.node;var Ml=j(jl),Nl={name:`monitor-up`,size:24,node:[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]};Nl.node;var Pl=j(Nl),Fl={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`}]]};Fl.node;var Il=j(Fl),Ll={name:`mouse-pointer-2`,size:24,node:[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]};Ll.node;var Rl=j(Ll),zl={name:`mouse-pointer-click`,size:24,node:[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]};zl.node;var Bl=j(zl),Vl={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`}]]};Vl.node;var Hl=j(Vl),Ul={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`}]]};Ul.node;var Wl=j(Ul),Gl={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`}]]};Gl.node;var Kl=j(Gl),ql={name:`plug-zap`,size:24,node:[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]],aliases:[`plug-zap-2`]};ql.node;var Jl=j(ql),Yl={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`}]]};Yl.node;var Xl=j(Yl),Zl={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`}]]};Zl.node;var Ql=j(Zl),$l={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};$l.node;var eu=j($l),tu={name:`scan-line`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]};tu.node;var nu=j(tu),ru={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};ru.node;var iu=j(ru),G={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};G.node;var au=j(G),ou={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};ou.node;var su=j(ou),cu={name:`square-dashed-mouse-pointer`,size:24,node:[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h2`,key:`1qve2z`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v2`,key:`p14lih`}],[`path`,{d:`M3 14v1`,key:`vnatye`}]],aliases:[`mouse-pointer-square-dashed`]};cu.node;var lu=j(cu),uu={name:`square-plus`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]],aliases:[`plus-square`]};uu.node;var du=j(uu),fu={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};fu.node;var pu=j(fu),mu={name:`tablet`,size:24,node:[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,ry:`2`,key:`76otgf`}],[`line`,{x1:`12`,x2:`12.01`,y1:`18`,y2:`18`,key:`1dp563`}]]};mu.node;var hu=j(mu),gu={name:`thumbs-down`,size:24,node:[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]};gu.node;var _u=j(gu),vu={name:`thumbs-up`,size:24,node:[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]};vu.node;var yu=j(vu),bu={name:`timer`,size:24,node:[[`line`,{x1:`10`,x2:`14`,y1:`2`,y2:`2`,key:`14vaq8`}],[`line`,{x1:`12`,x2:`15`,y1:`14`,y2:`11`,key:`17fdiu`}],[`circle`,{cx:`12`,cy:`14`,r:`8`,key:`1e1u0o`}]]};bu.node;var xu=j(bu),Su={name:`trending-down`,size:24,node:[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]};Su.node;var Cu=j(Su),wu={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};wu.node;var Tu=j(wu),Eu={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`]};Eu.node;var Du=j(Eu),Ou={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};Ou.node;var ku=j(Ou),Au={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`}]]};Au.node;var ju=j(Au),Mu={name:`video-off`,size:24,node:[[`path`,{d:`M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196`,key:`w8jjjt`}],[`path`,{d:`M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`,key:`1xawa7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Mu.node;var Nu=j(Mu),Pu={name:`wand-sparkles`,size:24,node:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]],aliases:[`wand-2`]};Pu.node;var Fu=j(Pu),Iu={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`}]]};Iu.node;var Lu=j(Iu),Ru=()=>Rt(()=>import(`./CodeViews-ytEy2pIT.js`),__vite__mapDeps([0,1])),zu=(0,F.lazy)(()=>Ru().then(e=>({default:e.DiffView}))),Bu=(0,F.lazy)(()=>Ru().then(e=>({default:e.CodeBlock})));function Vu({file:e}){let t=(0,I.jsx)(`pre`,{className:`overflow-hidden whitespace-pre-wrap break-all rounded-[8px] bg-sunken py-1 pl-[44px] pr-2 font-mono text-[11.5px] leading-[18px] ring-1 ring-inset ring-line`,children:e.hunks.flatMap(e=>e.lines.map(e=>e.text)).join(`
|
|
11
|
+
`)});return(0,I.jsx)(F.Suspense,{fallback:t,children:(0,I.jsx)(zu,{file:e})})}function Hu(e){let t=(0,I.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Source code`,className:`overflow-x-auto rounded-[8px] bg-sunken py-2 pl-[46px] pr-3 font-mono text-[11.5px] leading-[19px] ring-1 ring-inset ring-line`,children:e.code.replace(/\n$/,``)});return(0,I.jsx)(F.Suspense,{fallback:t,children:(0,I.jsx)(Bu,{...e})})}function Uu(){let e=D(e=>e.changes),t=e.filter(e=>e.status===`preview`);return e.length?(0,I.jsxs)(`div`,{className:`flex flex-col gap-2 p-3`,children:[t.length>1&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-[10px] bg-ai-soft px-3 py-2 ring-1 ring-inset ring-ai-line/30`,children:[(0,I.jsxs)(`span`,{className:`text-[12.5px] font-medium text-ai-fg`,children:[t.length,` previews stacked`]}),(0,I.jsxs)(`div`,{className:`flex gap-1`,children:[(0,I.jsx)(P,{size:`xs`,variant:`ghost`,onClick:()=>void A.undo(`panel`),children:`Undo last`}),(0,I.jsx)(P,{size:`xs`,variant:`primary`,onClick:()=>void A.keep(`panel`),children:`Keep all`})]})]}),(0,I.jsx)(Dt,{initial:!1,children:e.map(e=>(0,I.jsx)(xt.div,{layout:!0,initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.18},children:(0,I.jsx)(Wu,{change:e,defaultOpen:e.status===`preview`&&e.id===t[0]?.id})},e.id))})]}):(0,I.jsx)(ve,{icon:(0,I.jsx)(Zc,{}),title:`No changes yet`,children:`Point at something in your app and say what to change. Each change lands as a live preview you can keep or undo.`})}function Wu({change:e,defaultOpen:t}){let[n,r]=(0,F.useState)(t),a=e.files.reduce((e,t)=>e+t.added,0),o=e.files.reduce((e,t)=>e+t.removed,0);return(0,I.jsxs)(`div`,{className:i(`rounded-[10px] bg-raised ring-1 ring-inset`,e.status===`preview`?`ring-ai-line/40`:`ring-line`),"data-change":e.id,children:[(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>r(!n),className:`flex w-full items-start gap-2.5 px-3 pb-2 pt-2.5 text-left`,children:[(0,I.jsx)(`span`,{className:i(`mt-px flex size-6 shrink-0 items-center justify-center rounded-[7px] [&_svg]:size-[13px]`,e.source===`quick`?`bg-human-soft text-human-fg`:`bg-ai-soft text-ai-fg`),children:e.source===`quick`?(0,I.jsx)(Lu,{}):(0,I.jsx)(ae,{})}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`span`,{className:`flex items-center gap-2`,children:(0,I.jsx)(`span`,{className:i(`truncate text-[13px] font-medium`,e.status===`undone`?`text-fg-3 line-through`:`text-fg`),children:e.title})}),e.said&&(0,I.jsxs)(`span`,{className:`mt-0.5 block truncate text-[12px] text-human-fg`,children:[`“`,e.said,`”`]}),(0,I.jsxs)(`span`,{className:`mt-1 flex items-center gap-1.5 text-[11.5px] text-fg-3`,children:[(0,I.jsx)(Gu,{status:e.status}),(0,I.jsx)(`span`,{children:e.source===`quick`?`Quick edit`:e.source===`fake`?`Test double`:e.model??(e.source===`claude`?`Claude`:`AI`)}),e.latencyMs!=null&&(0,I.jsxs)(`span`,{children:[`· `,Je(e.latencyMs)]}),(0,I.jsxs)(`span`,{children:[`· `,nt(e.createdAt)]}),(0,I.jsxs)(`span`,{className:`ml-auto font-mono text-ok`,children:[`+`,a]}),(0,I.jsxs)(`span`,{className:`font-mono text-bad`,children:[`−`,o]})]})]}),(0,I.jsx)(sc,{className:i(`mt-1 size-3.5 shrink-0 text-fg-3 transition-transform`,n&&`rotate-90`)})]}),(0,I.jsx)(Dt,{initial:!1,children:n&&(0,I.jsx)(xt.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:{duration:.18},className:`overflow-hidden`,children:(0,I.jsxs)(`div`,{className:`space-y-2 px-3 pb-3`,children:[e.summary&&(0,I.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-2`,children:e.summary}),e.files.map(e=>(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11.5px] text-fg-2`,children:[(0,I.jsx)(Fc,{className:`size-3.5 text-fg-3`}),(0,I.jsx)(`button`,{"data-hand":!0,className:`truncate font-mono hover:text-fg hover:underline`,onClick:()=>A.openRelative(e.path,e.hunks[0]?.newStart??1),title:e.path,children:e.path}),e.created&&(0,I.jsx)(ne,{tone:`ok`,children:`new`})]}),(0,I.jsx)(Vu,{file:e})]},e.path)),e.status===`preview`&&(0,I.jsxs)(`div`,{className:`flex justify-end gap-1 pt-1`,children:[(0,I.jsx)(P,{size:`sm`,variant:`ghost`,icon:(0,I.jsx)(ju,{}),onClick:()=>void A.undoChange(e.id),children:`Undo`}),(0,I.jsx)(P,{size:`sm`,variant:`primary`,icon:(0,I.jsx)(dt,{}),onClick:()=>void A.keepChange(e.id),children:`Keep`})]}),e.status===`kept`&&e.files.length===1&&(0,I.jsxs)(`div`,{className:`text-[11.5px] text-fg-3`,children:[`Saved in `,Ke(e.files[0].path),`.`]})]})},`diff`)})]})}function Gu({status:e}){return e===`preview`?(0,I.jsx)(ne,{tone:`ai`,children:`Preview`}):e===`kept`?(0,I.jsx)(ne,{tone:`ok`,children:`Kept`}):(0,I.jsx)(ne,{children:`Undone`})}var Ku=[{id:`seo`,label:`SEO`,hint:`Indexing, titles, links, structured data, speed (Google Search Central).`},{id:`content`,label:`Content`,hint:`Clarity, reading level, buttons, errors, Arabic and right-to-left text.`},{id:`ux`,label:`UI/UX`,hint:`Forms, targets, feedback, layout and the usability heuristics.`},{id:`a11y`,label:`Accessibility`,hint:`WCAG 2.2 AA with axe-core: names, contrast, keyboard, labels.`}],qu=[`blocker`,`high`,`medium`,`low`,`info`],Ju=`saywright.experts`;function Yu(){try{let e=JSON.parse(localStorage.getItem(Ju)??`null`);if(Array.isArray(e)&&e.length)return e.filter(e=>[`seo`,`content`,`ux`,`a11y`].includes(e))}catch{}return[`seo`,`content`,`ux`,`a11y`]}var Xu=Le(()=>({picked:Yu(),review:null,pageUrl:null,running:!1,progress:0,thinking:{},error:null})),Zu=Xu.setState,Qu=Xu.getState,$u=e=>({rule:e.rule,title:e.title,what:e.what,fix:e.fix,els:e.els}),K=e=>({rule:e.rule,title:e.title,what:e.what,fix:e.fix,els:e.el?[e.el]:void 0,rewrite:e.rewrite}),q={toggle(e){let t=Qu().picked.includes(e)?Qu().picked.filter(t=>t!==e):[...Qu().picked,e];Zu({picked:t});try{localStorage.setItem(Ju,JSON.stringify(t))}catch{}},async load(){let e=Qe().app.url;if(e)try{let{review:t}=await ze.get(`/experts/review?url=${encodeURIComponent(e)}`);Zu({review:t,pageUrl:e,error:null})}catch{}},async run(){let e=Qu().picked;if(e.length&&!Qu().running){Zu({running:!0,progress:0,error:null});try{let t=await A.bridge.review(e,`${location.origin}/axe.min.js`,e=>Zu({progress:e}));if(!t)throw Error(`The page couldn’t be checked. Is the app open?`);Zu({review:(await ze.post(`/experts/review`,{review:t,experts:e})).review,pageUrl:Qe().app.url})}catch(e){Zu({error:e instanceof Error?e.message:String(e)})}finally{Zu({running:!1})}}},async askAi(e){let t=Qu().review;if(t&&!Qu().thinking[e]){Zu({thinking:{...Qu().thinking,[e]:!0},error:null});try{Zu({review:(await ze.post(`/experts/ai`,{url:t.url,expert:e})).review})}catch(e){Zu({error:e instanceof Error?e.message:String(e)})}finally{Zu({thinking:{...Qu().thinking,[e]:!1}})}}},async show(e){await A.reveal(e)||A.notify(`That element isn’t on the page any more. Review the page again.`,`info`)},fix(e,t){return A.fixReview(e,Ku.find(e=>e.id===t)?.label??t)},async installSkills(){try{return await ze.post(`/experts/skills`,{})}catch(e){return Zu({error:e instanceof Error?e.message:String(e)}),null}}},J={blocker:{label:`Blocker`,dot:`bg-bad`,text:`text-bad`},high:{label:`High`,dot:`bg-bad/70`,text:`text-bad`},medium:{label:`Medium`,dot:`bg-warn`,text:`text-warn`},low:{label:`Low`,dot:`bg-fg-3`,text:`text-fg-2`},info:{label:`Info`,dot:`bg-line-strong`,text:`text-fg-3`}},Y=e=>qu.indexOf(e);function X({s:e}){return(0,I.jsx)(`span`,{className:i(`mt-[5px] size-[7px] shrink-0 rounded-full`,J[e].dot)})}function ed({children:e,className:t}){return(0,I.jsx)(`span`,{className:i(`inline-block h-[18px] shrink-0 rounded-[5px] bg-sunken px-1.5 font-mono text-[10.5px] leading-[18px] text-fg-3`,t),children:e})}function td({severity:e,title:t,rule:n,what:r,fix:a,html:o,wcag:s,source:c,verdict:l,rewrite:u,item:d,expert:f,count:p,fromAi:m}){let[h,g]=(0,F.useState)(!1),_=Tt(),v=l?.verdict===`dismissed`,y=d.els?.[0];return(0,I.jsxs)(`div`,{className:i(`border-t border-line first:border-0`,v&&`opacity-55`),"data-finding":n,children:[(0,I.jsxs)(`button`,{className:`flex w-full items-start gap-2.5 px-3 py-2 text-left hover:bg-hover/60`,onClick:()=>g(!h),"aria-expanded":h,children:[(0,I.jsx)(X,{s:e}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`span`,{className:`block text-[12.5px] leading-snug text-fg`,children:[m&&(0,I.jsx)(ae,{className:`mr-1 inline size-3 -translate-y-px text-ai`,"aria-label":`Found by ${_}`}),t,p&&p>1?(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[` · `,p]}):null]}),l&&(0,I.jsxs)(`span`,{className:i(`mt-0.5 block text-[11.5px] leading-snug`,v?`text-fg-3`:`text-ai-fg`),children:[v?`Dismissed`:`Confirmed`,`: `,l.note]})]}),(0,I.jsx)(ed,{className:`mt-[1px] max-w-[112px] truncate`,children:n.replace(/^axe:/,``)}),(0,I.jsx)(sc,{className:i(`mt-[3px] size-3.5 shrink-0 text-fg-3 transition-transform`,h&&`rotate-90`)})]}),h&&(0,I.jsxs)(`div`,{className:`space-y-2 px-3 pb-3 pl-[30px] text-[12px] leading-relaxed`,children:[(0,I.jsx)(`p`,{className:`text-fg-2`,children:r}),u?(0,I.jsxs)(`div`,{className:`space-y-1 rounded-[8px] bg-sunken p-2`,children:[(0,I.jsx)(`div`,{className:`text-fg-3 line-through decoration-fg-3/50`,children:u.before}),(0,I.jsx)(`div`,{className:`text-fg`,children:u.after})]}):(0,I.jsxs)(`p`,{className:`text-fg`,children:[(0,I.jsx)(`span`,{className:`text-fg-3`,children:`Fix: `}),a]}),o?.length?(0,I.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`The elements’ HTML`,className:`max-h-[96px] overflow-auto whitespace-pre-wrap break-all rounded-[6px] bg-sunken p-2 font-mono text-[10.5px] text-fg-3`,children:o.join(`
|
|
12
|
+
`)}):null,(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[s?.map(e=>(0,I.jsxs)(ed,{children:[`WCAG `,e]},e)),c&&(0,I.jsxs)(`a`,{href:c,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-0.5 text-[11.5px] text-human-fg hover:underline`,children:[`Rule `,(0,I.jsx)(jc,{className:`size-3`})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-1.5 pt-0.5`,children:[y&&(0,I.jsx)(P,{size:`sm`,variant:`ghost`,icon:(0,I.jsx)(Tc,{}),onClick:()=>void q.show(y),children:`Show`}),(0,I.jsxs)(P,{size:`sm`,variant:`ai`,icon:(0,I.jsx)(ae,{}),onClick:()=>void q.fix([d],f),disabled:v,children:[`Fix with `,_]})]})]})]})}function nd({r:e}){let t=e.field;if(!t||!t.crux&&!t.search&&!t.analytics&&!t.errors?.length)return null;let n=(e,t,n)=>e==null?`text-fg-3`:e<=t?`text-ok`:e>n?`text-bad`:`text-warn`;return(0,I.jsxs)(`div`,{className:`space-y-1.5 rounded-[10px] px-3 py-2.5 text-[12px] ring-1 ring-inset ring-line`,"data-field":!0,children:[t.crux&&(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2.5 gap-y-1`,children:[(0,I.jsx)(qc,{className:`size-3.5 text-fg-3`}),(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[`Real users`,t.crux.scope===`origin`?` (whole site)`:``,`:`]}),(0,I.jsxs)(`span`,{className:n(t.crux.lcp,2500,4e3),children:[`LCP `,t.crux.lcp==null?`—`:`${(t.crux.lcp/1e3).toFixed(1)} s`]}),(0,I.jsxs)(`span`,{className:n(t.crux.inp,200,500),children:[`INP `,t.crux.inp==null?`—`:`${t.crux.inp} ms`]}),(0,I.jsxs)(`span`,{className:n(t.crux.cls,.1,.25),children:[`CLS `,t.crux.cls??`—`]})]}),t.search&&(0,I.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,I.jsx)(iu,{className:`mt-[2px] size-3.5 shrink-0 text-fg-3`}),(0,I.jsxs)(`span`,{className:`text-fg-2`,children:[Pt(t.search.clicks),` clicks · `,Pt(t.search.impressions),` impressions · position `,t.search.position.toFixed(1),t.search.queries.length?(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[` · `,t.search.queries.slice(0,3).map(e=>`“${e.query}”`).join(`, `)]}):null]})]}),t.analytics&&(0,I.jsxs)(`div`,{className:`text-fg-2`,children:[(0,I.jsx)(`span`,{className:`text-fg-3`,children:`Analytics:`}),` `,Pt(t.analytics.views),` views · `,Pt(t.analytics.users),` users · `,Math.round(t.analytics.engagementRate*100),`% engaged`]}),t.errors?.map(e=>(0,I.jsx)(`div`,{className:`text-[11.5px] text-warn`,children:e},e))]})}function rd({r:e,expert:t,label:n}){let r=Xu(e=>!!e.thinking[t]),i=Tt(),a=(0,F.useMemo)(()=>e.checks.filter(e=>e.expert===t).sort((e,t)=>Y(e.severity)-Y(t.severity)),[e,t]),o=e.ai[t],s=(0,F.useMemo)(()=>[...o?.findings??[]].sort((e,t)=>Y(e.severity)-Y(t.severity)),[o]),c=[...a.filter(e=>e.severity!==`info`&&o?.verdicts[e.key]?.verdict!==`dismissed`).map($u),...s.filter(e=>e.severity!==`info`).map(K)],l=a.filter(e=>Y(e.severity)<=1).length+s.filter(e=>Y(e.severity)<=1).length;return(0,I.jsxs)(`section`,{className:`rounded-[10px] ring-1 ring-inset ring-line`,"data-expert":t,children:[(0,I.jsxs)(`header`,{className:`flex items-center gap-2 px-3 py-2.5`,children:[(0,I.jsx)(`span`,{className:`text-[13px] font-semibold text-fg`,children:n}),(0,I.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:a.length+s.length?`${a.length+s.length} found${l?`, ${l} serious`:``}`:`Nothing found`}),(0,I.jsx)(`span`,{className:`flex-1`}),(0,I.jsx)(P,{size:`sm`,variant:o?`ghost`:`secondary`,icon:r?(0,I.jsx)(T,{}):(0,I.jsx)(ae,{}),onClick:()=>void q.askAi(t),disabled:r,"data-ask-ai":t,children:o?`Again`:`Ask ${i}`})]}),o&&(0,I.jsxs)(`p`,{className:`border-t border-line px-3 py-2 text-[12px] leading-relaxed text-fg-2`,"data-ai-summary":!0,children:[(0,I.jsx)(ae,{className:`mr-1 inline size-3 text-ai`}),o.summary]}),a.map(e=>(0,I.jsx)(td,{severity:e.severity,title:e.title,rule:e.rule,what:e.what,fix:e.fix,html:e.html,wcag:e.wcag,source:e.source,verdict:o?.verdicts[e.key],item:$u(e),expert:t,count:e.count},e.key)),s.map((e,n)=>(0,I.jsx)(td,{severity:e.severity,title:e.title,rule:e.rule,what:e.what,fix:e.fix,rewrite:e.rewrite,item:K(e),expert:t,fromAi:!0},`ai-${n}`)),c.length>1&&(0,I.jsx)(`div`,{className:`border-t border-line px-3 py-2`,children:(0,I.jsxs)(P,{size:`sm`,variant:`ai`,icon:(0,I.jsx)(Fu,{}),onClick:()=>void q.fix(c,t),"data-fix-expert":t,children:[`Fix all `,c.length,` with `,i]})})]})}function id(){let e=Xu(e=>e.picked),t=Xu(e=>e.review),n=Xu(e=>e.running),r=Xu(e=>e.progress),a=Xu(e=>e.error),o=D(e=>e.app.url),s=D(e=>e.app.connected),[c,l]=(0,F.useState)(null);(0,F.useEffect)(()=>{o&&q.load()},[o]);let u=t&&o&&ad(t.url,o)?t:null,d=(0,F.useMemo)(()=>{let e={};for(let t of u?.checks??[])e[t.severity]=(e[t.severity]??0)+1;return e},[u]);return(0,I.jsxs)(`div`,{className:`space-y-3 p-3`,"data-experts":!0,children:[(0,I.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Ku.map(t=>(0,I.jsx)(`button`,{"data-hand":!0,title:t.hint,onClick:()=>q.toggle(t.id),"aria-pressed":e.includes(t.id),className:i(`h-7 rounded-full px-3 text-[12px] font-medium ring-1 ring-inset transition-colors`,e.includes(t.id)?`bg-human-soft text-human-fg ring-human-line`:`text-fg-3 ring-line hover:text-fg-2`),children:t.label},t.id))}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(P,{variant:`primary`,size:`md`,onClick:()=>void q.run(),disabled:n||!e.length||!s,icon:n?(0,I.jsx)(T,{}):void 0,"data-review-page":!0,children:n?`Checking the page…${r>0&&r<1?` ${Math.round(r*100)}%`:``}`:u?`Review again`:`Review this page`}),u&&(0,I.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:nt(u.at)})]}),!u&&!n&&(0,I.jsx)(`p`,{className:`text-[12px] leading-relaxed text-fg-3`,children:`Checks this page against Google Search Central, WCAG 2.2 (axe-core), GOV.UK and web.dev guidance, in your browser. Then an AI expert can judge what the checks can’t and every finding can be fixed in place.`}),a&&(0,I.jsx)(`p`,{className:`text-[12px] text-bad`,children:a})]}),u&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-fg-3`,children:[(0,I.jsx)(`span`,{className:`min-w-0 truncate`,children:Oe(u.url)}),qu.filter(e=>d[e]).map(e=>(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,I.jsx)(`span`,{className:i(`size-[6px] rounded-full`,J[e].dot)}),d[e],` `,J[e].label.toLowerCase()]},e))]}),(0,I.jsx)(nd,{r:u}),Ku.filter(e=>u.experts.includes(e.id)||u.ai[e.id]).map(e=>(0,I.jsx)(rd,{r:u,expert:e.id,label:e.label},e.id)),(0,I.jsxs)(`div`,{className:`rounded-[10px] px-3 py-2.5 text-[12px] leading-relaxed text-fg-3 ring-1 ring-inset ring-line`,children:[`Use the same experts in your own coding agent (Claude Code, Cursor, Codex, Copilot…): they are added to this app as Agent Skills.`,(0,I.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[(0,I.jsx)(P,{size:`sm`,onClick:async()=>{let e=await q.installSkills();e&&l(e.written)},children:`Add to this app`}),(0,I.jsx)(P,{size:`sm`,variant:`ghost`,onClick:()=>Ue({overlay:`settings`,settingsTab:`services`}),children:`Connect Google data`})]}),c&&(0,I.jsx)(`div`,{className:`mt-1.5 font-mono text-[11px] text-ok`,children:c.slice(0,4).join(` · `)})]})]})]})}function ad(e,t){try{let n=new URL(e),r=new URL(t);return n.pathname===r.pathname}catch{return e===t}}function od(){let e=D(e=>e.selection),t=D(e=>e.inspect),n=D(e=>e.inspectLoading),r=bt();if(!e)return(0,I.jsx)(ve,{icon:(0,I.jsx)(eu,{}),title:`Nothing selected`,children:r?`In Edit mode, click an element in your app (or pinch it) to see its component, props and source. Pinch it again to deselect; hold the pinch (or ${Ve(`shift+click`)}) to select several.`:`In Edit mode, click an element in your app to see its component, props and source. Click it again to deselect; ${Ve(`shift+click`)} selects several.`});let i=t?`${t.file}:${t.line}`:e.src&&!/^(https?:|\/|webpack-internal:)/.test(e.src)?e.src.replace(/:\d+$/,``):null;return(0,I.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,I.jsxs)(`div`,{className:`rounded-[10px] bg-raised p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,I.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-[8px] bg-human-soft text-human-fg`,children:(0,I.jsx)(yc,{className:`size-4`})}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`truncate text-[14px] font-semibold text-fg`,children:t?.name??e.name}),t?.designSystem&&(0,I.jsx)(ne,{tone:`human`,children:`Design system`})]}),i?(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>void A.openInEditor(e),className:`mt-0.5 block max-w-full truncate font-mono text-[11.5px] text-fg-3 hover:text-fg-2 hover:underline`,title:`Open in editor`,children:i}):!n&&(0,I.jsx)(`div`,{className:`mt-0.5 text-[11.5px] text-fg-3`,children:`No source location`}),t?.guessed&&(0,I.jsx)(`div`,{className:`mt-1 text-[11.5px] leading-snug text-fg-3`,children:`Probably here: found by searching your code for its text, not told by your app.`})]})]}),(0,I.jsxs)(`dl`,{className:`mt-3 grid grid-cols-[72px_1fr] gap-x-2 gap-y-1 text-[12px]`,children:[e.text&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`dt`,{className:`text-fg-3`,children:`Text`}),(0,I.jsxs)(`dd`,{className:`truncate text-fg-2`,children:[`“`,e.text,`”`]})]}),(0,I.jsx)(`dt`,{className:`text-fg-3`,children:`Element`}),(0,I.jsxs)(`dd`,{className:`font-mono text-[11.5px] text-fg-2`,children:[`<`,e.tag,`>`,e.role?` · ${e.role}`:``]}),(0,I.jsx)(`dt`,{className:`text-fg-3`,children:`Size`}),(0,I.jsxs)(`dd`,{className:`tabular font-mono text-[11.5px] text-fg-2`,children:[Math.round(e.rect.w),` × `,Math.round(e.rect.h)]})]}),(0,I.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[(0,I.jsx)(P,{size:`xs`,icon:(0,I.jsx)(Ys,{}),onClick:()=>void A.step(`parent`),children:`Parent`}),(0,I.jsx)(P,{size:`xs`,icon:(0,I.jsx)(Gs,{}),onClick:()=>void A.step(`child`),children:`Inside`}),(0,I.jsx)(P,{size:`xs`,icon:(0,I.jsx)(_c,{}),onClick:()=>void A.openInEditor(e),children:`Open in editor`}),(0,I.jsx)(P,{size:`xs`,icon:(0,I.jsx)(xc,{}),onClick:()=>void A.copyLocator(e),children:`Locator`})]})]}),n&&!t&&(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-1 text-[12px] text-fg-3`,children:[(0,I.jsx)(T,{className:`size-3`}),` Reading source…`]}),t&&(0,I.jsx)(sd,{inspect:t}),t&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{action:(0,I.jsxs)(`button`,{"data-hand":!0,className:`text-[11.5px] text-fg-3 hover:text-fg`,onClick:()=>A.openFile(t.absPath,t.line,t.col),children:[t.file.split(`/`).pop(),`:`,t.line]}),children:`Source`}),(0,I.jsx)(Hu,{code:t.snippet.lines.join(`
|
|
13
|
+
`),start:t.snippet.start,focus:t.snippet.focus})]})]})}function sd({inspect:e}){return e.props.length?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{children:`Props`}),(0,I.jsxs)(`div`,{className:`space-y-2.5 rounded-[10px] bg-raised p-3 ring-1 ring-inset ring-line`,children:[e.props.map(e=>(0,I.jsxs)(`div`,{className:`grid grid-cols-[76px_1fr] items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`truncate font-mono text-[11.5px] text-fg-3`,children:e.name}),e.options&&!e.dynamic?(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.options.map(t=>(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>t!==e.value&&void A.setProp(e.name,t),className:i(`h-[24px] rounded-[6px] px-2 font-mono text-[11.5px] transition-colors`,t===e.value?`bg-human text-[#1b1203]`:`bg-sunken text-fg-2 ring-1 ring-inset ring-line hover:text-fg`),children:t},t))}):(0,I.jsx)(`span`,{className:i(`truncate font-mono text-[11.5px]`,e.dynamic?`text-fg-3`:`text-fg-2`),children:e.value})]},e.name)),e.designSystem&&(0,I.jsx)(`p`,{className:`pt-0.5 text-[11.5px] text-fg-3`,children:`Clicking a value previews the change. Keep or undo it like any other.`})]})]}):(0,I.jsxs)(`div`,{className:`flex items-center gap-2 rounded-[10px] px-1 text-[12px] text-fg-3`,children:[(0,I.jsx)(hl,{className:`size-3.5`}),` No props set here.`]})}function cd({label:e,value:t,hint:n}){return(0,I.jsxs)(`div`,{className:`rounded-[10px] bg-raised p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:e}),(0,I.jsx)(`div`,{className:`tabular mt-1 text-[20px] font-semibold tracking-[-0.02em] text-fg`,children:t}),n&&(0,I.jsx)(`div`,{className:`mt-0.5 text-[11px] text-fg-3`,children:n})]})}function ld({label:e,a:t,b:n,aLabel:r,bLabel:i}){let a=t+n||1;return(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-[11.5px]`,children:[(0,I.jsx)(`span`,{className:`text-fg-3`,children:e}),(0,I.jsxs)(`span`,{className:`tabular text-fg-2`,children:[r,` `,t,` · `,i,` `,n]})]}),(0,I.jsxs)(`div`,{className:`flex h-1.5 overflow-hidden rounded-full bg-active`,children:[(0,I.jsx)(`div`,{className:`bg-human transition-[width] duration-300`,style:{width:`${t/a*100}%`}}),(0,I.jsx)(`div`,{className:`bg-ai transition-[width] duration-300`,style:{width:`${n/a*100}%`}})]})]})}function ud(){let e=D(e=>e.summary);return(0,F.useEffect)(()=>{A.refreshSummary();let e=setInterval(()=>void A.refreshSummary(),5e3);return()=>clearInterval(e)},[]),e?(0,I.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,I.jsx)(`p`,{className:`px-0.5 text-[12px] leading-relaxed text-fg-3`,children:`This session, measured on your machine. Use it to compare pointing and talking with how you usually work.`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,I.jsx)(cd,{label:`Requests`,value:e.commands,hint:`${e.changes} changes · ${e.answers} answers`}),(0,I.jsx)(cd,{label:`Kept on first try`,value:e.keepRate==null?`—`:`${Math.round(e.keepRate*100)}%`,hint:`${e.kept} kept · ${e.undone} undone`}),(0,I.jsx)(cd,{label:`Time to preview`,value:Je(e.medianLatencyMs),hint:`median · ${e.quick} quick, ${e.ai} AI`}),(0,I.jsx)(cd,{label:`Time to decide`,value:Je(e.medianDecisionMs),hint:`median, preview → keep/undo`}),(0,I.jsx)(cd,{label:`Words per request`,value:e.medianWords??`—`,hint:`median`}),(0,I.jsx)(cd,{label:`Tests`,value:`${e.testsPassed}/${e.testsRun}`,hint:`passed / run`})]}),(0,I.jsxs)(`div`,{className:`space-y-3 rounded-[10px] bg-raised p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsx)(ie,{children:`How you worked`}),(0,I.jsx)(ld,{label:`Input`,a:e.byInput.voice,b:e.byInput.typed,aLabel:`voice`,bLabel:`typed`}),(0,I.jsx)(ld,{label:`Pointing`,a:e.byPointer.hand,b:e.byPointer.mouse,aLabel:`hand`,bLabel:`mouse`})]}),(0,I.jsx)(`a`,{href:`/api/metrics/export`,download:!0,children:(0,I.jsx)(P,{size:`sm`,icon:(0,I.jsx)(Dc,{}),className:`w-full`,children:`Export session (JSONL)`})}),(0,I.jsxs)(`p`,{className:`px-0.5 text-[11.5px] leading-relaxed text-fg-3`,children:[`Every event is also appended to `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:`.saywright/metrics.jsonl`}),` in your app’s folder. Nothing is sent anywhere.`]})]}):(0,I.jsx)(`div`,{className:`p-4 text-[12px] text-fg-3`,children:`Loading…`})}function dd({children:e,className:t,tone:n=`default`}){return(0,I.jsx)(`kbd`,{className:i(`inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-[4px] px-1 font-mono text-[10.5px] font-medium leading-none`,n==="default"?`bg-sunken text-fg-2 ring-1 ring-inset ring-line shadow-[inset_0_-1px_0_var(--line)]`:`bg-white/15 text-current`,t),children:e})}function fd({children:e}){return(0,I.jsx)(ys,{delayDuration:350,skipDelayDuration:200,children:e})}function pd({label:e,kbd:t,side:n=`bottom`,children:r}){return(0,I.jsxs)(Cs,{children:[(0,I.jsx)(Ts,{asChild:!0,children:r}),(0,I.jsx)(ks,{children:(0,I.jsxs)(js,{side:n,sideOffset:6,className:`z-[70] flex items-center gap-2 rounded-[7px] bg-raised px-2 py-1 text-[12px] text-fg shadow-pop`,children:[e,t&&(0,I.jsx)(dd,{children:t})]})})]})}function md({value:e,onChange:t,options:n,size:r=`md`,collapse:a=!1,className:o}){let s=(0,F.useId)();return(0,I.jsx)(Qo,{type:`single`,value:e,onValueChange:e=>e&&t(e),className:i(`relative inline-flex items-center gap-0.5 rounded-[9px] bg-sunken p-[3px] ring-1 ring-inset ring-line`,o),children:n.map(t=>{let n=t.value===e,o=(0,I.jsxs)(ss,{value:t.value,"data-hand":!0,title:t.tip?void 0:t.title,className:i(`relative inline-flex select-none items-center justify-center gap-1.5 rounded-[6px] font-medium transition-colors duration-150 [&_svg]:size-[13px]`,r===`md`?`h-[26px] px-2.5 text-[12.5px]`:`h-[22px] px-2 text-[11.5px]`,a&&t.icon&&`max-[1179px]:px-2`,n?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[n&&(0,I.jsx)(xt.span,{layoutId:`seg-${s}`,className:`absolute inset-0 rounded-[6px] bg-raised shadow-[0_0_0_1px_var(--line-strong),0_1px_2px_rgba(0,0,0,.18)]`,transition:{type:`spring`,stiffness:520,damping:40,mass:.7}}),(0,I.jsxs)(`span`,{className:`relative z-10 inline-flex items-center gap-1.5`,children:[t.icon,(0,I.jsx)(`span`,{className:i(a&&t.icon&&`max-[1179px]:sr-only`),children:t.label})]})]},t.value);return t.tip?(0,I.jsx)(pd,{label:t.tip,kbd:t.kbd,children:(0,I.jsx)(`span`,{className:`inline-flex`,children:o})},t.value):o})})}var hd=(0,F.createContext)(void 0);function gd({checked:e,onCheckedChange:t,id:n,disabled:r,"aria-label":a,"aria-labelledby":o}){let s=(0,F.useContext)(hd);return(0,I.jsx)(vo,{id:n,"aria-label":a,"aria-labelledby":o??(a?void 0:s),"data-hand":!0,checked:e,disabled:r,onCheckedChange:t,className:i(`relative inline-flex h-[18px] w-[30px] shrink-0 items-center rounded-full transition-colors duration-200 disabled:opacity-40`,e?`bg-human`:`bg-active ring-1 ring-inset ring-line-strong`),children:(0,I.jsx)(bo,{className:`block size-[14px] translate-x-[2px] rounded-full bg-white shadow-[0_1px_2px_rgba(0,0,0,.35)] transition-transform duration-200 will-change-transform data-[state=checked]:translate-x-[14px]`})})}function _d(e){return e>=85?{color:`var(--ok)`,soft:`var(--ok-soft)`,label:`good`}:e>=65?{color:`var(--warn)`,soft:`var(--warn-soft)`,label:`fair`}:{color:`var(--bad)`,soft:`var(--bad-soft)`,label:`poor`}}function vd({value:e,size:t=64,stroke:n=6,children:r}){let i=(t-n)/2,a=2*Math.PI*i,o=_d(e);return(0,I.jsxs)(`div`,{className:`relative shrink-0`,style:{width:t,height:t},children:[(0,I.jsxs)(`svg`,{width:t,height:t,className:`-rotate-90`,children:[(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:`var(--active)`,strokeWidth:n}),(0,I.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:o.color,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:`${e/100*a} ${a}`,style:{transition:`stroke-dasharray 800ms var(--ease-snap)`}})]}),(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:r??(0,I.jsx)(`span`,{className:`tabular text-[15px] font-semibold text-fg`,children:e})})]})}function yd({now:e,before:t}){if(t===void 0)return null;let n=e-t;return n?(0,I.jsxs)(`span`,{className:i(`inline-flex items-center gap-0.5 text-[11px] font-medium`,n>0?`text-ok`:`text-bad`),children:[n>0?(0,I.jsx)(Tu,{className:`size-3`}):(0,I.jsx)(Cu,{className:`size-3`}),n>0?`+`:``,n]}):(0,I.jsx)(`span`,{className:`text-[11px] text-fg-3`,children:`±0`})}var bd=[`stability`,`usability`,`performance`,`accessibility`];function xd({scores:e,previous:t,report:n,t:r}){let a=n?.lang===`ar`,[o,s]=(0,F.useState)(null);return(0,I.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[auto_1fr]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4 rounded-[14px] bg-raised p-4 ring-1 ring-inset ring-line`,children:[(0,I.jsx)(vd,{value:e.overall,size:92,stroke:8,children:(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`div`,{className:`tabular text-[26px] font-semibold leading-none tracking-[-0.03em] text-fg`,children:e.overall}),(0,I.jsx)(`div`,{className:`mt-0.5 text-[10.5px] text-fg-3`,children:`/ 100`})]})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[12px] font-medium text-fg-3`,children:r.overall}),(0,I.jsxs)(`div`,{className:`mt-1 flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[15px] font-semibold capitalize`,style:{color:_d(e.overall).color},children:r.tone[_d(e.overall).label]}),t&&(0,I.jsxs)(`span`,{className:`flex items-center gap-1 text-[11px] text-fg-3`,children:[(0,I.jsx)(yd,{now:e.overall,before:t.overall}),` `,r.vsPrevious]})]})]})]}),(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-3 xl:grid-cols-4`,children:bd.map(c=>{let l=e[c],u=(a?l.notesAr:null)??l.notes,d=n?.scoreNotes?.[c]||u[0]||``,f=o===c;return(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>s(f?null:c),className:i(`group flex flex-col rounded-[14px] bg-raised p-3 text-start ring-1 ring-inset ring-line transition-shadow hover:ring-line-strong`,f&&`ring-line-strong`),children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(vd,{value:l.score,size:46,stroke:5}),(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`div`,{className:`text-[12px] font-medium text-fg-2`,children:r[c]}),(0,I.jsx)(yd,{now:l.score,before:t?.[c].score})]}),(0,I.jsx)(fe,{className:i(`ms-auto size-3.5 text-fg-3 opacity-0 transition group-hover:opacity-100`,f&&`rotate-180 opacity-100`)})]}),(0,I.jsx)(`p`,{className:i(`mt-2 text-[11.5px] leading-snug text-fg-3`,!f&&`line-clamp-2`),children:d}),f&&u.length>0&&u[0].startsWith(`−`)&&(0,I.jsx)(`ul`,{className:`mt-2 space-y-1 border-t border-line pt-2`,children:u.map((e,t)=>(0,I.jsxs)(`li`,{className:`text-[11.5px] leading-snug text-fg-2`,children:[(0,I.jsx)(`span`,{className:`tabular font-semibold text-bad`,children:e.split(`:`)[0]}),e.slice(e.indexOf(`:`))]},t))})]},c)})})]})}var Sd={name:`Saywright`,tagline:`Point at your app. Say what to change.`,taglineAr:`أشِر إلى تطبيقك وقل ما تريد تغييره.`,slug:`saywright`};function Cd(e){let t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t} s`;let n=Math.round(t/60);return n<60?`${n} min`:`${Math.floor(n/60)} h ${String(n%60).padStart(2,`0`)} min`}function wd(e,[t,n,r,i]){return e===1?t:e===2?n:e>=3&&e<=10?`${e} ${r}`:`${e} ${i}`}var Td={second:[`ثانية واحدة`,`ثانيتان`,`ثوانٍ`,`ثانية`],minute:[`دقيقة واحدة`,`دقيقتان`,`دقائق`,`دقيقة`],hour:[`ساعة واحدة`,`ساعتان`,`ساعات`,`ساعة`],page:[`صفحة واحدة`,`صفحتان`,`صفحات`,`صفحة`],issue:[`مشكلة واحدة`,`مشكلتان`,`مشكلات`,`مشكلة`],step:[`خطوة واحدة`,`خطوتان`,`خطوات`,`خطوة`],request:[`طلب واحد`,`طلبان`,`طلبات`,`طلبًا`]},Ed={missing:{en:`not found on the page`,ar:`لم يُعثر عليه في الصفحة`},hidden:{en:`it was hidden`,ar:`كان مخفيًا`},unreadable:{en:`the recorded step couldn’t be read`,ar:`تعذّرت قراءة الخطوة المسجّلة`},file:{en:`a replay can’t choose files for you`,ar:`لا تستطيع الإعادة اختيار الملفات عنك`},"no-option":{en:`that choice isn’t in the list any more`,ar:`هذا الخيار لم يعد في القائمة`},"not-a-field":{en:`it can’t be typed into`,ar:`لا يمكن الكتابة فيه`},"not-recording":{en:`the app didn’t start recording`,ar:`لم يبدأ التطبيق التسجيل`},error:{en:`something went wrong`,ar:`حدث خطأ`},stopped:{en:`you stopped it`,ar:`أوقفتَها أنت`},timeout:{en:`the app didn’t answer`,ar:`لم يستجب التطبيق`},disconnected:{en:`the app wasn’t connected`,ar:`لم يكن التطبيق متصلًا`}},Dd=(e,t)=>Ed[e]?.[t]??e;function Od(){let e=et(e=>e.list),t=et(e=>e.live);(0,F.useEffect)(()=>void M.refreshList(),[]);let n=t.status===`recording`||t.status===`starting`;return(0,I.jsxs)(`div`,{className:`space-y-3 p-3`,children:[(0,I.jsxs)(`div`,{className:`rounded-[12px] bg-raised p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsx)(`div`,{className:`text-[13px] font-semibold text-fg`,children:`Test sessions`}),(0,I.jsxs)(`p`,{className:`mt-1 text-[12px] leading-relaxed text-fg-3`,children:[`Use your app while talking about it. `,Sd.name,` captures what happens and writes a report: issues with evidence, scores, and fixes.`]}),(0,I.jsx)(P,{size:`sm`,className:`mt-2.5 w-full`,icon:n?(0,I.jsx)(`span`,{className:`size-2 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}):(0,I.jsx)(dc,{className:`text-bad`}),onClick:()=>n?void M.stop():et.setState({setup:!0}),children:n?`Stop recording`:`Record a session`})]}),(0,I.jsx)(kd,{}),!e.length&&(0,I.jsx)(ve,{icon:(0,I.jsx)(Ol,{}),title:`No sessions yet`,children:`Record one from the top bar. Talk in English or Arabic; nothing leaves this computer unless an AI is connected to write the report.`}),(0,I.jsx)(`div`,{className:`space-y-1.5`,children:e.map(e=>{let t=e.report?.overall,n=e.status===`processing`||e.status===`recording`,r=e.report?.findings,a=r==null?`${e.counts.errors+e.counts.failedRequests+e.counts.frustration} issues`:`${r} ${r===1?`finding`:`findings`}`;return(0,I.jsxs)(`div`,{className:`group flex items-center gap-3 rounded-[10px] px-2.5 py-2 ring-1 ring-inset ring-transparent hover:bg-hover hover:ring-line`,children:[(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>M.openReport(e.id),className:`flex min-w-0 flex-1 items-center gap-3 text-start`,children:[(0,I.jsx)(`span`,{className:i(`flex size-9 shrink-0 items-center justify-center rounded-[9px] text-[13px] font-semibold tabular`),style:t==null?void 0:{background:_d(t).soft,color:_d(t).color},children:n?(0,I.jsx)(T,{className:`size-3.5`}):t??(0,I.jsx)(Lc,{className:`size-4 text-fg-3`})}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`span`,{className:`block truncate text-[12.5px] font-medium text-fg`,children:e.report?.title||e.name}),(0,I.jsx)(`span`,{className:`block truncate text-[11.5px] text-fg-3`,children:e.status===`recording`?`Recording now`:e.status===`processing`?e.stage||`Writing the report`:e.status===`failed`?`Report failed`:`${nt(e.startedAt)} · ${e.endedAt?Cd(e.endedAt-e.startedAt):`?`} · ${e.source===`autopilot`?`Autopilot · ${a}`:`${e.counts.speech} said · ${a}`}`})]})]}),(0,I.jsx)(yt,{size:`sm`,className:`opacity-0 group-hover:opacity-100 focus-visible:opacity-100`,"aria-label":`Delete session`,disabled:e.status===`recording`,onClick:async()=>{await pe({title:`Delete this session?`,body:`Its recordings, screenshots and report are deleted from this computer.`,action:`Delete session`,danger:!0})&&M.remove(e.id)},children:(0,I.jsx)(be,{})})]},e.id)})})]})}function kd(){let[e,t]=(0,F.useState)(``),[n,r]=(0,F.useState)(`20`),[i,a]=(0,F.useState)(!1),o=D(e=>!!e.autopilot),s=D(e=>e.app.connected),c=D(e=>!!e.status?.ai.ready),l=(0,F.useId)();return(0,I.jsxs)(`div`,{className:`rounded-[12px] bg-raised p-3 ring-1 ring-inset ring-line`,"data-autopilot-card":!0,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[13px] font-semibold text-fg`,children:[(0,I.jsx)(ae,{className:`size-3.5 text-ai`}),`Autopilot`]}),(0,I.jsx)(`p`,{className:`mt-1 text-[12px] leading-relaxed text-fg-3`,children:`The AI uses your app like a tester, step by step, and reports what is wrong, with the evidence and where it is in the code.`}),(0,I.jsx)(`input`,{value:e,onChange:e=>t(e.target.value),disabled:o,placeholder:`What to try (optional): add a product and check out`,"aria-label":`What Autopilot should try`,spellCheck:!1,className:`mt-2.5 h-8 w-full rounded-[8px] bg-sunken px-2.5 text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line-strong placeholder:text-fg-3 focus:ring-human-line`,"data-autopilot-goal":!0}),(0,I.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[12px] text-fg-2`,children:`Steps, at most`}),(0,I.jsx)(md,{size:`sm`,value:n,onChange:r,options:[{value:`10`,label:`10`},{value:`20`,label:`20`},{value:`40`,label:`40`}]})]}),(0,I.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2`,children:[(0,I.jsx)(`span`,{id:l,className:`text-[12px] text-fg-2`,children:`Let it delete, pay, send and sign out`}),(0,I.jsx)(gd,{checked:i,onCheckedChange:a,disabled:o,"aria-labelledby":l})]}),(0,I.jsx)(P,{size:`sm`,className:`mt-2.5 w-full`,icon:(0,I.jsx)(ae,{}),disabled:!o&&!s,onClick:()=>o?A.autopilot.stop():void A.startAutopilot({goal:e.trim(),maxSteps:Number(n),allowRisky:i}),"data-autopilot-start":!0,children:o?`Stop Autopilot`:`Start Autopilot`}),!c&&(0,I.jsxs)(`p`,{className:`mt-1.5 text-[11.5px] text-fg-3`,children:[`It needs an AI to decide what to try.`,` `,(0,I.jsx)(`button`,{className:`font-medium text-human underline-offset-2 hover:underline`,onClick:()=>Ue({overlay:`settings`,settingsTab:`ai`}),children:`Connect one`})]})]})}var Ad={click:(0,I.jsx)(Bl,{}),fill:(0,I.jsx)(ku,{}),press:(0,I.jsx)(Cc,{}),goto:(0,I.jsx)(Kl,{}),note:(0,I.jsx)(oe,{})};function jd(){let e=D(e=>e.mode),t=D(e=>e.recorder),n=D(e=>e.selection),[r,a]=(0,F.useState)(``),o=e===`record`,s=!t.steps.length&&!t.expectations.length;return(0,I.jsxs)(`div`,{className:`space-y-4 p-3`,children:[(0,I.jsxs)(`div`,{className:i(`rounded-[10px] p-3 ring-1 ring-inset`,o?`bg-bad-soft ring-bad/25`:`bg-raised ring-line`),children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,I.jsx)(`span`,{className:i(`flex size-8 shrink-0 items-center justify-center rounded-[8px]`,o?`bg-bad/15 text-bad`:`bg-sunken text-fg-3 ring-1 ring-inset ring-line`),children:o?(0,I.jsx)(`span`,{className:`size-2.5 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}):(0,I.jsx)(he,{className:`size-4`})}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:o?`Recording your steps`:`Narrate a bug, get a test`}),(0,I.jsx)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:o?`From ${Oe(t.startUrl??``)}`:`Use the app, then say what you expected.`})]}),o?(0,I.jsx)(P,{size:`sm`,onClick:()=>A.setMode(`edit`),children:`Stop`}):(0,I.jsx)(P,{size:`sm`,variant:`primary`,onClick:()=>A.setMode(`record`),kbd:(0,I.jsx)(dd,{tone:`onDark`,children:`R`}),children:`Write test`})]}),o&&s&&(0,I.jsxs)(`ol`,{className:`mt-3 space-y-1.5 text-[12px] leading-relaxed text-fg-2`,children:[(0,I.jsx)(`li`,{children:`1. Click and type in your app as usual. Each action becomes a step.`}),(0,I.jsx)(`li`,{children:`2. Point at the wrong value and say “this should show …”.`}),(0,I.jsx)(`li`,{children:`3. Say “generate test”, then “run test”.`})]})]}),(t.steps.length>0||o)&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{action:!s&&(0,I.jsxs)(`button`,{"data-hand":!0,className:`flex items-center gap-1 text-[11.5px] text-fg-3 hover:text-fg`,onClick:()=>A.newRecording(),children:[(0,I.jsx)(Xl,{className:`size-3`}),` Start over`]}),children:`Steps`}),t.steps.length?(0,I.jsx)(`ol`,{className:`space-y-1`,children:t.steps.map((e,t)=>(0,I.jsxs)(`li`,{className:`group flex items-center gap-2 rounded-[8px] bg-raised px-2 py-1.5 text-[12.5px] ring-1 ring-inset ring-line`,children:[(0,I.jsx)(`span`,{className:`w-4 text-right font-mono text-[11px] text-fg-3`,children:t+1}),(0,I.jsx)(`span`,{className:`text-fg-3 [&_svg]:size-[13px]`,children:Ad[e.kind]}),(0,I.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-fg-2`,title:e.description,children:e.description}),(0,I.jsx)(`button`,{"data-hand":!0,className:`rounded p-0.5 text-fg-3 opacity-0 hover:text-bad group-hover:opacity-100`,onClick:()=>A.removeStep(t),"aria-label":`Remove step`,children:(0,I.jsx)(be,{className:`size-3.5`})})]},t))}):(0,I.jsx)(`p`,{className:`px-1 text-[12px] text-fg-3`,children:`No steps yet. Click around in your app.`})]}),(t.expectations.length>0||o)&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{children:`Checks`}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[t.expectations.map((e,n)=>{let r=t.run?.status===`passed`,i=t.run?.status===`failed`;return(0,I.jsxs)(`div`,{className:`group flex items-start gap-2 rounded-[8px] bg-raised px-2 py-1.5 text-[12.5px] ring-1 ring-inset ring-line`,children:[(0,I.jsx)(`span`,{className:`mt-0.5 [&_svg]:size-[14px]`,children:r?(0,I.jsx)(lc,{className:`text-ok`}):i?(0,I.jsx)(hc,{className:`text-bad`}):(0,I.jsx)(lc,{className:`text-fg-3`})}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1 text-fg-2`,children:[(0,I.jsx)(`span`,{className:`text-fg`,children:e.description}),` should show `,(0,I.jsxs)(`span`,{className:`font-mono text-human-fg`,children:[`“`,e.expected,`”`]}),e.actual&&(0,I.jsxs)(`span`,{className:`block truncate text-[11.5px] text-fg-3`,children:[`It showed “`,It(e.actual,e.expected),`”`]})]}),(0,I.jsx)(`button`,{"data-hand":!0,className:`rounded p-0.5 text-fg-3 opacity-0 hover:text-bad group-hover:opacity-100`,onClick:()=>A.removeExpectation(n),"aria-label":`Remove check`,children:(0,I.jsx)(be,{className:`size-3.5`})})]},n)}),o&&!n&&(0,I.jsx)(`p`,{className:`px-1 pt-1 text-[12px] leading-relaxed text-fg-3`,children:`Point at a value in your app and say “this should show …”, or type it in the box below.`}),o&&n&&(0,I.jsxs)(`form`,{className:`flex items-center gap-1.5 pt-1`,onSubmit:e=>{e.preventDefault(),r.trim()&&(A.addExpectationFor(n,r.trim()),a(``))},children:[(0,I.jsx)(`input`,{"data-hand":!0,value:r,onChange:e=>a(e.target.value),placeholder:`${n.name} should show…`,className:`h-7 min-w-0 flex-1 rounded-[7px] bg-sunken px-2 text-[12.5px] text-fg ring-1 ring-inset ring-line outline-none placeholder:text-fg-3 focus:ring-human-line disabled:opacity-60`}),(0,I.jsx)(P,{size:`sm`,type:`submit`,disabled:!r.trim(),children:`Add`})]})]})]}),t.expectations.length>0&&(0,I.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,I.jsx)(P,{size:`sm`,icon:(0,I.jsx)(Fu,{}),onClick:()=>void A.generateTest(),children:t.spec?`Regenerate`:`Generate test`}),(0,I.jsx)(P,{size:`sm`,variant:`primary`,icon:t.running?(0,I.jsx)(T,{className:`size-3`}):(0,I.jsx)(Kl,{}),disabled:t.running,onClick:()=>void A.runTest(),children:t.running?`Running…`:`Run test`})]}),t.run&&(0,I.jsx)(Md,{}),t.spec&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{action:(0,I.jsx)(`button`,{"data-hand":!0,className:`ml-3 min-w-0 truncate font-mono text-[11.5px] text-fg-3 hover:text-fg`,title:`Open ${t.spec.path}`,onClick:()=>A.openRelative(t.spec.path,1),children:t.spec.path.split(`/`).pop()}),children:`Playwright test`}),(0,I.jsx)(Hu,{code:t.spec.code,language:`typescript`})]}),(t.installing||t.installLog.length>0)&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(ie,{children:t.installing?`Installing the test browser…`:`Install log`}),(0,I.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Install output`,className:`max-h-[160px] overflow-auto rounded-[8px] bg-sunken p-2 font-mono text-[11px] leading-relaxed text-fg-3 ring-1 ring-inset ring-line`,children:t.installLog.join(`
|
|
14
|
+
`)||`…`})]}),!o&&s&&!t.spec&&(0,I.jsxs)(`div`,{className:`rounded-[10px] border border-dashed border-line-strong p-3 text-[12px] leading-relaxed text-fg-3`,children:[(0,I.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 font-medium text-fg-2`,children:[(0,I.jsx)(Dc,{className:`size-3.5`}),` Tests are saved in your app`]}),`Generated specs go to `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:`tests/saywright/`}),` and run with your project’s own Playwright.`]})]})}function Md(){let e=D(e=>e.recorder.run),t=D(e=>e.recorder.verifying),n=Tt();return e.status===`passed`?(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-[10px] bg-ok-soft p-3 ring-1 ring-inset ring-ok/25`,children:[(0,I.jsx)(lc,{className:`size-4 text-ok`}),(0,I.jsxs)(`div`,{className:`text-[12.5px] text-fg`,children:[`Passed in `,(e.durationMs/1e3).toFixed(1),` s`,t?` with the fix applied`:``,`.`]})]}):e.status===`failed`?(0,I.jsxs)(`div`,{className:`space-y-2 rounded-[10px] bg-bad-soft p-3 ring-1 ring-inset ring-bad/25`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(hc,{className:`size-4 text-bad`}),(0,I.jsx)(`span`,{className:`text-[12.5px] font-medium text-fg`,children:`The test fails, so it reproduces the bug`})]}),(e.expected||e.received)&&(0,I.jsxs)(`div`,{className:`grid grid-cols-[70px_1fr] gap-x-2 gap-y-0.5 font-mono text-[11.5px]`,children:[(0,I.jsx)(`span`,{className:`text-fg-3`,children:`Expected`}),(0,I.jsx)(`span`,{className:`text-ok`,children:e.expected}),(0,I.jsx)(`span`,{className:`text-fg-3`,children:`Received`}),(0,I.jsx)(`span`,{className:`text-bad`,children:e.received})]}),(0,I.jsxs)(P,{size:`sm`,variant:`ai`,icon:(0,I.jsx)(ae,{}),onClick:()=>void A.fix(),children:[`Fix with `,n]})]}):e.status===`setup-needed`?(0,I.jsxs)(`div`,{className:`space-y-2 rounded-[10px] bg-warn-soft p-3 ring-1 ring-inset ring-warn/25`,children:[(0,I.jsx)(`div`,{className:`text-[12.5px] text-fg`,children:e.message}),(0,I.jsx)(P,{size:`sm`,onClick:()=>void A.installBrowser(),children:`Install test browser`})]}):(0,I.jsxs)(`div`,{className:`rounded-[10px] bg-bad-soft p-3 text-[12px] text-fg ring-1 ring-inset ring-bad/25`,children:[(0,I.jsx)(ne,{tone:`bad`,children:`Error`}),` `,(0,I.jsx)(`span`,{className:`ml-1`,children:e.message})]})}var Nd=400;function Pd(){let e=N(e=>e.ui.panelOpen),t=N(e=>e.ui.panelTab),n=N(e=>e.setUi),r=D(e=>e.changes.filter(e=>e.status===`preview`).length),a=D(e=>e.mode===`record`),o=D(e=>!!e.selection),s=et(e=>e.live.status===`recording`),c=Xu(e=>e.running||Object.values(e.thinking).some(Boolean)),l=[{id:`changes`,label:`Changes`,badge:r?(0,I.jsx)(`span`,{className:`rounded-full bg-ai px-1.5 text-[10.5px] font-semibold leading-[16px] text-[#021a20]`,children:r}):null},{id:`inspect`,label:`Inspect`,badge:o?(0,I.jsx)(`span`,{className:`size-1.5 rounded-full bg-human`}):null},{id:`test`,label:`Test`,badge:a?(0,I.jsx)(`span`,{className:`size-1.5 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}):null},{id:`experts`,label:`Experts`,badge:c?(0,I.jsx)(`span`,{className:`size-1.5 rounded-full bg-ai`}):null},{id:`sessions`,label:`Sessions`,badge:s?(0,I.jsx)(`span`,{className:`size-1.5 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}):null},{id:`session`,label:`Stats`,icon:(0,I.jsx)(ac,{})}];return(0,I.jsx)(xt.aside,{initial:!1,animate:{width:e?Nd:0},transition:{type:`spring`,stiffness:420,damping:42},className:`relative shrink-0 overflow-hidden border-l border-line bg-panel`,"aria-hidden":!e,children:(0,I.jsxs)(Po,{value:t,onValueChange:e=>n({panelTab:e}),className:`flex h-full flex-col`,style:{width:Nd},children:[(0,I.jsxs)(`div`,{className:`flex h-[42px] shrink-0 items-center gap-1 border-b border-line pl-2 pr-1.5`,children:[(0,I.jsx)(Io,{className:`flex flex-1 items-center gap-0.5`,children:l.map(e=>(0,I.jsxs)(Ro,{value:e.id,"data-hand":!0,"data-tab":e.id,title:e.icon?e.label:void 0,"aria-label":e.icon?e.label:void 0,className:i(`relative inline-flex h-7 items-center gap-1.5 rounded-[7px] px-2 text-[12.5px] font-medium transition-colors [&_svg]:size-[15px]`,t===e.id?`bg-active text-fg`:`text-fg-3 hover:bg-hover hover:text-fg-2`),children:[e.icon??e.label,e.badge]},e.id))}),(0,I.jsx)(yt,{size:`sm`,onClick:()=>n({panelOpen:!1}),"aria-label":`Close panel`,children:(0,I.jsx)(Et,{})})]}),(0,I.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,I.jsx)(Bo,{value:`changes`,className:`outline-none`,children:(0,I.jsx)(Uu,{})}),(0,I.jsx)(Bo,{value:`inspect`,className:`outline-none`,children:(0,I.jsx)(od,{})}),(0,I.jsx)(Bo,{value:`test`,className:`outline-none`,children:(0,I.jsx)(jd,{})}),(0,I.jsx)(Bo,{value:`experts`,className:`outline-none`,children:(0,I.jsx)(id,{})}),(0,I.jsx)(Bo,{value:`sessions`,className:`outline-none`,children:(0,I.jsx)(Od,{})}),(0,I.jsx)(Bo,{value:`session`,className:`outline-none`,children:(0,I.jsx)(ud,{})})]})]})})}var Fd={viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,strokeLinecap:`round`,strokeLinejoin:`round`};function Id(e){return(0,I.jsxs)(`svg`,{...Fd,...e,children:[(0,I.jsx)(`path`,{d:`M9.5 13V4.75a1.75 1.75 0 0 1 3.5 0V11`}),(0,I.jsx)(`path`,{d:`M13 10.5a1.6 1.6 0 0 1 3.2 0v1`}),(0,I.jsx)(`path`,{d:`M16.2 11.2a1.6 1.6 0 0 1 3.2.3V15a7 7 0 0 1-7 7h-.7a6.6 6.6 0 0 1-5.2-2.6l-1.9-2.5a1.7 1.7 0 0 1 2.6-2.2l2.3 2.1V13`})]})}function Ld(e){return(0,I.jsxs)(`svg`,{...Fd,...e,children:[(0,I.jsx)(`circle`,{cx:`8.6`,cy:`13.4`,r:`3.4`}),(0,I.jsx)(`path`,{d:`M11.4 11.4 11.9 4.6a1.4 1.4 0 0 1 2.8.2l-.4 6.8`}),(0,I.jsx)(`path`,{d:`M14.3 11.6 15.4 6a1.4 1.4 0 0 1 2.7.6L17 12.4`}),(0,I.jsx)(`path`,{d:`M17 12.4 18 9.6a1.3 1.3 0 0 1 2.4 1L19 16a6 6 0 0 1-6 4.5h-.8a5 5 0 0 1-3.6-1.6`})]})}function Rd(e){return(0,I.jsxs)(`svg`,{...Fd,...e,children:[(0,I.jsx)(`path`,{d:`M9.6 12.5 7.6 4.9a1.7 1.7 0 0 1 3.3-.9L12.6 11`}),(0,I.jsx)(`path`,{d:`m12.6 11 1.7-6.9a1.7 1.7 0 0 1 3.3.8L16 12`}),(0,I.jsx)(`path`,{d:`M16 12.2a1.6 1.6 0 0 1 3.1.6V15a7 7 0 0 1-7 7h-.6A6.5 6.5 0 0 1 5 15.5v-1.6a1.9 1.9 0 0 1 3.4-1.1l1.2 1.6`})]})}function zd({className:e,box:t=!0}){let n=D(e=>e.camera.status),r=(0,F.useRef)(null),a=(0,F.useRef)(null);return(0,F.useEffect)(()=>{let e=e=>{let t=r.current;t&&(t.srcObject=e,e&&t.play().catch(()=>void 0))};return e(A.stream),A.streamListeners.add(e),()=>void A.streamListeners.delete(e)},[]),(0,F.useEffect)(()=>{let e=a.current;if(!e||n!==`on`)return;let r=()=>{let n=e.getContext(`2d`);if(!n)return;let r=Math.min(2,window.devicePixelRatio||1),i=e.clientWidth,a=e.clientHeight;(e.width!==Math.round(i*r)||e.height!==Math.round(a*r))&&(e.width=Math.round(i*r),e.height=Math.round(a*r)),n.setTransform(r,0,0,r,0,0),n.clearRect(0,0,i,a);let o=A.engine.state,s=N.getState();if(t){let e=s.engine.box;n.setLineDash([4,4]),n.strokeStyle=`rgba(255,255,255,.35)`,n.lineWidth=1,n.strokeRect(e.x0*i,e.y0*a,(e.x1-e.x0)*i,(e.y1-e.y0)*a),n.setLineDash([])}let c=o.landmarks;if(!s.camera.skeleton||!c||!o.present)return;let l=e=>({x:(1-c[e].x)*i,y:c[e].y*a});n.strokeStyle=`rgba(255,255,255,.75)`,n.lineWidth=1.6,n.lineCap=`round`;for(let[e,t]of ut){let r=l(e),i=l(t);n.beginPath(),n.moveTo(r.x,r.y),n.lineTo(i.x,i.y),n.stroke()}n.fillStyle=`rgba(255,255,255,.9)`;for(let e=0;e<c.length;e++){let t=l(e);n.beginPath(),n.arc(t.x,t.y,1.8,0,Math.PI*2),n.fill()}let u=l(8),d=l(4);(o.pinching||o.pinchAmount>.5)&&(n.strokeStyle=`rgba(255,178,36,${.4+o.pinchAmount*.6})`,n.lineWidth=2,n.beginPath(),n.moveTo(u.x,u.y),n.lineTo(d.x,d.y),n.stroke()),n.fillStyle=`#ffb224`,n.beginPath(),n.arc(u.x,u.y,4,0,Math.PI*2),n.fill()};return A.frameListeners.add(r),()=>void A.frameListeners.delete(r)},[n,t]),(0,I.jsxs)(`div`,{className:i(`relative overflow-hidden bg-black`,e),children:[(0,I.jsx)(`video`,{ref:r,muted:!0,playsInline:!0,className:`absolute inset-0 size-full -scale-x-100 object-cover opacity-90`}),(0,I.jsx)(`canvas`,{ref:a,className:`absolute inset-0 size-full`})]})}var Bd={small:{w:224,h:168},large:{w:320,h:240}},Vd=16,Hd=Bd,Ud=[{key:`point`,icon:(0,I.jsx)(Id,{}),label:`Point`,does:`Aim the cursor`},{key:`pinch`,icon:(0,I.jsx)(Ld,{}),label:`Pinch`,does:`Select, or deselect (Edit); click (Use). Hold to add.`},{key:`drag`,icon:(0,I.jsx)(rl,{}),label:`Pinch + move`,does:`Scroll the app`},{key:`peace`,icon:(0,I.jsx)(Rd,{}),label:`Peace sign`,does:`Start talking; pause to send`},{key:`up`,icon:(0,I.jsx)(yu,{}),label:`Thumb up`,does:`Keep the preview`},{key:`down`,icon:(0,I.jsx)(_u,{}),label:`Thumb down`,does:`Undo the preview`},{key:`palm`,icon:(0,I.jsx)(al,{}),label:`Open palm`,does:`Stop / cancel`},{key:`fist`,icon:(0,I.jsx)(tl,{}),label:`Fist`,does:`Pause the cursor to reposition your hand`}];function Wd(e){if(!e.present)return null;if(e.dragging)return`drag`;switch(e.pose){case`point`:return`point`;case`pinch`:return`pinch`;case`open`:return`palm`;case`thumbUp`:return`up`;case`thumbDown`:return`down`;case`victory`:return`peace`;case`fist`:return`fist`;default:return null}}var Gd={point:`Pointing`,pinch:`Pinching`,drag:`Scrolling`,palm:`Hold still to stop`,up:`Hold to keep`,down:`Hold to undo`,peace:`Hold to talk`,fist:`Cursor paused`};function Kd(e,t,n,r){let i=n.h+r;return{x:e.endsWith(`l`)?Vd:Math.max(Vd,t.w-n.w-Vd),y:e.startsWith(`t`)?64:Math.max(64,t.h-i-Vd)}}function qd(){let e=D(e=>e.camera),t=D(e=>e.hand),n=N(e=>e.camera.pip),r=N(e=>e.camera.corner),a=N(e=>e.camera.legend),o=N(e=>e.setCamera),s=(0,F.useRef)(null),[c,l]=(0,F.useState)({w:0,h:0}),[u,d]=(0,F.useState)(null),f=wn(Vd),p=wn(400),m=Hd[n],h=a?70:34,g=e.status===`on`||e.status===`starting`||e.status===`error`&&u!==e.error;(0,F.useLayoutEffect)(()=>{let e=s.current?.parentElement;if(!e)return;let t=new ResizeObserver(([e])=>l({w:e.contentRect.width,h:e.contentRect.height}));return t.observe(e),()=>t.disconnect()},[]),(0,F.useEffect)(()=>{if(!c.w)return;let e=Kd(r,c,m,h);qn(f,e.x,{type:`spring`,stiffness:420,damping:38}),qn(p,e.y,{type:`spring`,stiffness:420,damping:38})},[r,c,m,h,f,p]);let _=Wd(t),v=(e,t)=>{let n=e+m.w/2<c.w/2;return`${t+(m.h+h)/2<c.h/2?`t`:`b`}${n?`l`:`r`}`};return(0,I.jsxs)(xt.div,{ref:s,drag:!0,dragMomentum:!1,onDragEnd:()=>{let e=v(f.get(),p.get());if(e===r){let t=Kd(e,c,m,h);qn(f,t.x,{type:`spring`,stiffness:420,damping:38}),qn(p,t.y,{type:`spring`,stiffness:420,damping:38})}else o({corner:e})},style:{x:f,y:p,width:m.w},className:i(`glass absolute left-0 top-0 z-30 overflow-hidden rounded-[14px] transition-[width] duration-200`,!g&&`pointer-events-none invisible`),"data-hand-ignore":!0,children:[(0,I.jsxs)(`div`,{className:`group relative bg-black`,style:{height:m.h},children:[(0,I.jsx)(zd,{className:`absolute inset-0`}),e.status===`starting`&&(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 bg-black/60 text-[12px] text-white/80`,children:[(0,I.jsx)(T,{className:`size-4`}),`Starting hand tracking…`]}),e.status===`error`&&(0,I.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 bg-[#120c0c] p-3 text-center text-[11.5px] leading-snug text-white/80`,children:[(0,I.jsx)(Nu,{className:`size-5 text-bad`}),e.error,(0,I.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,I.jsxs)(`button`,{"data-hand":!0,className:`rounded-[6px] bg-white/15 px-2 py-1 text-[11.5px] font-medium text-white hover:bg-white/25`,onClick:()=>void A.startCamera(),children:[(0,I.jsx)(Ql,{className:`mr-1 inline size-3`}),`Retry`]}),(0,I.jsx)(`button`,{"data-hand":!0,className:`rounded-[6px] px-2 py-1 text-[11.5px] text-white/70 hover:text-white`,onClick:()=>d(e.error),children:`Dismiss`})]})]}),e.status===`on`&&!t.present&&(0,I.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-2 text-center text-[11.5px] font-medium text-white/85 [text-shadow:0_1px_3px_rgba(0,0,0,.8)]`,children:`Raise your hand into the box`}),(0,I.jsxs)(`div`,{className:`absolute right-1.5 top-1.5 flex gap-0.5 opacity-0 transition-opacity group-hover:opacity-100`,children:[(0,I.jsx)(Jd,{label:n===`small`?`Larger`:`Smaller`,onClick:()=>o({pip:n===`small`?`large`:`small`}),children:n===`small`?(0,I.jsx)(Sl,{}):(0,I.jsx)(Al,{})}),(0,I.jsx)(Jd,{label:`Hand settings`,onClick:()=>Ue({overlay:`settings`,settingsTab:`hand`}),children:(0,I.jsx)(au,{})}),(0,I.jsx)(Jd,{label:`Turn off hand control (C)`,onClick:()=>A.stopCamera(),children:(0,I.jsx)(Et,{})})]})]}),(0,I.jsxs)(`div`,{className:`flex h-[34px] items-center gap-2 px-2.5 text-[11.5px]`,children:[(0,I.jsx)(`span`,{className:i(`size-1.5 rounded-full`,t.present?`bg-human`:`bg-fg-3/60`)}),(0,I.jsx)(`span`,{className:i(`font-medium`,t.present?`text-fg`:`text-fg-3`),children:_?Gd[_]:t.present?`Hand found`:`No hand`}),(0,I.jsxs)(`span`,{className:`ml-auto font-mono text-[10.5px] text-fg-3`,children:[e.fps?`${e.fps} fps`:``,` `,e.delegate===`CPU`?`· CPU`:``]})]}),a&&(0,I.jsx)(`div`,{className:`flex items-center justify-between border-t border-line px-1.5 py-1`,children:Ud.map(e=>(0,I.jsx)(pd,{side:`top`,label:(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`b`,{className:`font-medium`,children:e.label}),` · `,e.does]}),children:(0,I.jsx)(`span`,{className:i(`flex size-[24px] items-center justify-center rounded-[6px] text-fg-3 transition-colors [&_svg]:size-[15px]`,_===e.key&&`bg-human-soft text-human-fg`),children:e.icon})},e.key))})]})}function Jd({label:e,onClick:t,children:n}){return(0,I.jsx)(pd,{label:e,children:(0,I.jsx)(yt,{size:`sm`,onClick:t,"aria-label":e,className:`size-6 rounded-[6px] bg-black/50 text-white/85 backdrop-blur hover:bg-black/70 hover:text-white [&_svg]:size-[12px]`,children:n})})}function Yd(e,t,n){if(!n||e.repeat||e.isComposing||e.altKey||t===`field`||t===`command-text`)return null;let r=e.ctrlKey||e.metaKey;return e.key===`Enter`&&!r?`keep`:r&&!e.shiftKey&&e.key.toLowerCase()===`z`?`undo`:null}var Xd=e=>e?`Return keeps · ⌘Z undoes`:`Enter keeps · Ctrl Z undoes`,Zd={sm:`small`,md:`medium`,lg:`large`,xl:`extra large`};function Qd(e,t,n,r,i){let a=e=>()=>void A.handleUtterance(e,null,`typed`);if(e===`record`){let e=[];return r.failed&&e.push({label:`Fix it`,run:()=>void A.fix()}),r.expectations&&e.push({label:r.spec?`Run test`:`Generate test`,run:()=>void(r.spec?A.runTest():A.generateTest())}),n&&e.push({label:`This should show…`,run:()=>i(`this should show `)}),e}if(!n)return[];let o=[];if(t?.designSystem){let e=t.props.find(e=>e.options&&[`size`,`padding`,`columns`,`gap`].includes(e.name));if(e?.options){let t=e.options.indexOf(e.value);t<e.options.length-1&&o.push({label:e.name===`padding`||e.name===`gap`?`More space`:`Bigger`,run:a(e.name===`padding`||e.name===`gap`?`more spacing`:`bigger`)}),t>0&&o.push({label:e.name===`padding`||e.name===`gap`?`Tighter`:`Smaller`,run:a(e.name===`padding`||e.name===`gap`?`tighter`:`smaller`)})}let n=t.props.find(e=>e.options&&[`variant`,`tone`,`emphasis`].includes(e.name));if(n?.options)for(let e of n.options.filter(e=>e!==n.value).slice(0,2))o.push({label:`Make it ${Zd[e]??e}`,run:()=>void A.setProp(n.name,e)})}return o.push({label:`Rename…`,run:()=>i(`rename to `)}),o.length<4&&o.push({label:`Why does it look like this?`,run:a(`Why does this look the way it does?`)}),o.slice(0,4)}function $d(){let e=D(e=>e.mode),t=D(e=>e.selection),n=D(e=>e.pins),r=D(e=>e.inspect),a=D(e=>e.voice),o=D(e=>e.focusInput),s=D(e=>e.draft),c=D(e=>e.history),l=D(e=>!!e.request),u=D(e=>e.recorder),d=D(e=>e.changes.some(e=>e.status===`preview`)),f=D(e=>e.status?.target.hasCode??!0),p=D(e=>e.camera.status===`on`||e.camera.status===`starting`),m=N(e=>e.camera),h=p&&m.corner.startsWith(`b`)?Bd[m.pip].w+32:0,[g,_]=(0,F.useState)(``),[v,y]=(0,F.useState)(-1),b=(0,F.useRef)(null);(0,F.useEffect)(()=>{o&&b.current?.focus()},[o]);let ee=e=>{_(e),requestAnimationFrame(()=>{b.current?.focus(),b.current?.setSelectionRange(e.length,e.length)})};(0,F.useEffect)(()=>{s&&ee(s.text)},[s?.n]);let x=(0,F.useMemo)(()=>s?.alternatives.length?s.alternatives.map(e=>({label:e,run:()=>ee(e)})):d||!f&&e!==`record`?[]:Qd(e,r,!!t,{expectations:u.expectations.length,spec:!!u.spec,failed:u.run?.status===`failed`},ee),[e,r,t,u.expectations.length,u.spec,u.run?.status,d,f,s]);(0,F.useEffect)(()=>{let e=e=>{let t=e.target;if(e.metaKey||e.ctrlKey||e.altKey||/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||t.isContentEditable)return;let n=Number(e.key);n>=1&&n<=x.length&&!s?.alternatives.length&&(e.preventDefault(),x[n-1].run())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[x,s]);let S=()=>{let e=g.trim();e&&(_(``),y(-1),s&&b.current?.blur(),A.submitText(e))},C=()=>{_(``),A.clearDraft()},te=a.state!==`idle`,w=!!s?.alternatives.length,ne=l?`Ask the next thing: it runs when this one is done`:e===`record`?`Say what’s wrong: “this should show $80.80”`:n.length?`Say what to do with these ${n.length}: “make this look like that”…`:t?`What should change about ${t.name}${t.text&&t.text.length<24?` “${t.text}”`:``}?`:e===`use`?`Ask about your app or describe a change…`:`Point at something and say what to change, or type here`;return(0,I.jsxs)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 z-30 flex flex-col items-center gap-2 px-4 transition-[padding] duration-200`,style:h?m.corner===`bl`?{paddingLeft:h}:{paddingRight:h}:void 0,children:[(0,I.jsx)(Dt,{children:x.length>0&&!te&&(0,I.jsxs)(xt.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:6},transition:{duration:.16},className:`pointer-events-auto flex flex-wrap items-center justify-center gap-1.5`,"data-tour":`suggestions`,children:[w&&(0,I.jsx)(`span`,{className:`glass inline-flex h-7 items-center rounded-[8px] px-2.5 text-[12px] text-fg-3`,children:`Or did you say`}),x.map((e,t)=>(0,I.jsxs)(`button`,{"data-hand":!0,onClick:e.run,className:i(`glass inline-flex h-7 items-center gap-2 rounded-[8px] pr-2.5 text-[12px] font-medium text-fg-2 transition-colors hover:text-fg`,w?`pl-2.5`:`pl-1.5`),children:[!w&&(0,I.jsx)(dd,{className:`h-4 min-w-4 text-[10px]`,children:t+1}),e.label]},e.label))]},`suggestions`)}),(0,I.jsxs)(`div`,{className:i(`glass pointer-events-auto flex w-[min(660px,100%)] items-center gap-1.5 rounded-[14px] p-1.5 transition-shadow`,te&&`shadow-[var(--shadow-float),0_0_0_1.5px_var(--human-line)]`),"data-tour":`dock`,children:[(0,I.jsx)(pd,{label:te?`Stop and send`:`Talk: hold, or click for hands-free`,kbd:`Space`,side:`top`,children:(0,I.jsx)(`button`,{"data-hand":!0,"aria-label":`Talk`,onPointerDown:e=>{e.currentTarget.setPointerCapture?.(e.pointerId),A.pressTalk()},onPointerUp:()=>A.releaseTalk(),onPointerCancel:()=>A.releaseTalk(),className:i(`relative flex size-[34px] shrink-0 items-center justify-center rounded-[10px] transition-colors [&_svg]:size-[16px]`,te?`bg-human text-[#1b1203]`:`bg-sunken text-fg-2 ring-1 ring-inset ring-line hover:text-fg`),children:(0,I.jsx)(Ol,{})})}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[n.map((e,t)=>(0,I.jsxs)(`span`,{className:`inline-flex h-6 max-w-[120px] shrink-0 items-center gap-1 rounded-[6px] bg-human-soft pl-1 pr-0.5 text-[11.5px] font-medium text-human-fg`,children:[(0,I.jsx)(`span`,{className:`flex size-4 items-center justify-center rounded-full bg-human font-mono text-[10px] text-[#1b1203]`,children:t+1}),(0,I.jsx)(`span`,{className:`truncate`,children:e.name}),(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>A.deselect(e.id),className:`rounded-[4px] p-0.5 hover:bg-black/10`,"aria-label":`Take out of the selection`,children:(0,I.jsx)(Et,{className:`size-3`})})]},e.id)),t&&!n.length&&(0,I.jsxs)(`span`,{className:`inline-flex h-6 max-w-[170px] shrink-0 items-center gap-1 rounded-[6px] bg-human-soft pl-2 pr-0.5 text-[11.5px] font-medium text-human-fg`,children:[(0,I.jsx)(`span`,{className:`truncate`,children:t.text&&t.text.length<18?`${t.name} · ${t.text}`:t.name}),(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>A.select(null),className:`rounded-[4px] p-0.5 hover:bg-black/10`,"aria-label":`Deselect`,children:(0,I.jsx)(Et,{className:`size-3`})})]}),(0,I.jsx)(`input`,{ref:b,"data-hand":!0,value:g,onChange:e=>{_(e.target.value),y(-1),e.target.value||A.clearDraft()},onKeyDown:e=>{let t=Yd({key:e.key,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,shiftKey:e.shiftKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing},g.trim()?`command-text`:`command-empty`,+!!d);if(t)e.preventDefault(),t===`keep`?A.keep(`key`):A.undo(`key`);else if(e.key===`Enter`&&!e.nativeEvent.isComposing)e.preventDefault(),S();else if(e.key===`Escape`)C(),b.current?.blur();else if(e.key===`ArrowUp`&&(!g||v>=0)&&c.length){e.preventDefault();let t=Math.min(c.length-1,v+1);y(t),_(c[t])}else if(e.key===`ArrowDown`&&v>=0){e.preventDefault();let t=v-1;y(t),_(t>=0?c[t]:``)}},placeholder:ne,className:`h-[34px] min-w-0 flex-1 bg-transparent px-1.5 text-[13.5px] text-fg outline-none placeholder:text-fg-3`,"aria-label":`Describe a change`,spellCheck:!1,autoComplete:`off`})]}),!g&&!te&&d&&(0,I.jsx)(`span`,{className:`hidden shrink-0 pr-1 text-[11.5px] text-fg-3 sm:block`,"data-keys":!0,children:Xd(De)}),!g&&!te&&!d&&(0,I.jsxs)(`span`,{className:`hidden shrink-0 items-center gap-1 pr-1 text-[11.5px] text-fg-3 sm:flex`,children:[`hold `,(0,I.jsx)(dd,{children:`Space`})]}),s&&g&&(0,I.jsxs)(`span`,{className:`hidden shrink-0 items-center gap-1 pr-1 text-[11.5px] text-fg-3 sm:flex`,"data-draft":!0,children:[(0,I.jsx)(dd,{children:`↵`}),` send · `,(0,I.jsx)(dd,{children:`Esc`}),` discard`]}),(0,I.jsx)(`button`,{"data-hand":!0,"aria-label":`Send`,disabled:!g.trim(),onClick:S,className:`flex size-[30px] shrink-0 items-center justify-center rounded-[9px] bg-fg text-inverse transition-opacity disabled:opacity-25 [&_svg]:size-[15px]`,children:(0,I.jsx)(Zs,{})})]})]})}var ef={type:`spring`,stiffness:520,damping:42,mass:.9};function tf(){let e=D(e=>e.island),t=D(e=>e.voice.state),n=D(e=>e.request),r=D(e=>e.changes),i=D(e=>!!e.replay),a=D(e=>!!e.autopilot),o=r.filter(e=>e.status===`preview`),s,c;return i?(s=`replay`,c=(0,I.jsx)(uf,{})):a?(s=`autopilot`,c=(0,I.jsx)(df,{})):t!==`idle`||e.kind===`listening`?(s=`listening`,c=(0,I.jsx)(sf,{})):n&&!nf(e)?(s=`thinking`,c=(0,I.jsx)(pf,{})):e.kind===`answer`?(s=`answer`,c=(0,I.jsx)(vf,{text:e.text,said:e.said,latencyMs:e.latencyMs,model:e.model})):e.kind===`message`?(s=`message-${e.text}`,c=(0,I.jsx)(bf,{text:e.text,tone:e.tone,actions:e.actions,sticky:e.sticky})):e.kind===`needs-key`?(s=`needs-key`,c=(0,I.jsx)(xf,{text:e.text,actions:e.actions})):o.length?(s=`preview-${o[0].id}`,c=(0,I.jsx)(hf,{changes:o})):(s=`idle`,c=(0,I.jsx)(rf,{})),(0,I.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-3 z-30 flex justify-center px-4`,"data-island":s.split(`-`)[0],children:(0,I.jsx)(xt.div,{layout:!0,transition:ef,className:`glass pointer-events-auto max-w-full overflow-hidden`,style:{borderRadius:16},children:(0,I.jsx)(Dt,{mode:`popLayout`,initial:!1,children:(0,I.jsxs)(xt.div,{layout:`position`,initial:{opacity:0,filter:`blur(6px)`,scale:.98},animate:{opacity:1,filter:`blur(0px)`,scale:1},exit:{opacity:0,filter:`blur(6px)`,scale:.98,transition:{duration:.1}},transition:{duration:.18,ease:[.2,.9,.25,1]},children:[c,n&&s!==`thinking`&&s!==`listening`&&s!==`replay`&&s!==`autopilot`&&(0,I.jsx)(Z,{})]},s)})})})}var nf=e=>e.kind===`answer`||e.kind===`needs-key`||e.kind===`message`&&(!!e.sticky||!!e.actions?.length);function rf(){let e=D(e=>e.mode),t=D(e=>e.selection),n=D(e=>e.pins.length),r=D(e=>e.camera.status===`on`),i=D(e=>e.recorder),a=(0,I.jsx)(lu,{}),o=(0,I.jsxs)(I.Fragment,{children:[`Point at anything, hold `,(0,I.jsx)(dd,{children:`Space`}),` and say what to change`]});return e===`record`?(a=(0,I.jsx)(`span`,{className:`size-2 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}),o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`font-medium text-fg`,children:`Recording`}),(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[Ae(i.steps.length,`step`),` · `,Ae(i.expectations.length,`check`)]}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:`· point at what’s wrong, say what it should show`})]})):e===`use`?(a=(0,I.jsx)(Bl,{}),o=(0,I.jsxs)(I.Fragment,{children:[`Using your app · hold `,(0,I.jsx)(dd,{children:`Space`}),` to ask or change something`]})):n>1?o=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`font-medium text-human-fg`,children:[n,` selected`]}),` · try “make this look like that”`]}):t&&(o=(0,I.jsxs)(I.Fragment,{children:[`Say what to change about `,(0,I.jsx)(`span`,{className:`max-w-[200px] truncate rounded-[5px] bg-human-soft px-1.5 py-px font-medium text-human-fg`,children:t.text&&t.text.length<28?`${t.name} · ${t.text}`:t.name})]})),(0,I.jsxs)(`div`,{className:`flex h-[38px] items-center gap-2.5 whitespace-nowrap pl-3.5 pr-4 text-[12.5px] text-fg-2 [&_svg]:size-[14px] [&_svg]:text-fg-3`,children:[a,(0,I.jsx)(`span`,{className:`flex items-center gap-1.5`,children:o}),r&&e!==`record`&&(0,I.jsxs)(`span`,{className:`hidden items-center gap-1 border-l border-line-strong pl-2.5 text-fg-3 md:flex`,children:[(0,I.jsx)(Rd,{className:`!size-[14px]`}),` talk`]})]})}function af(){let e=(0,F.useRef)([]);return(0,F.useEffect)(()=>{let t=0,n=[.55,.85,1,.75,.5],r=i=>{let a=A.voice.level();e.current.forEach((e,t)=>{if(!e)return;let r=.6+.4*Math.sin(i/110+t*1.7),o=4+Math.min(1,a*n[t]*r*1.6)*16;e.style.height=`${o}px`}),t=requestAnimationFrame(r)};return t=requestAnimationFrame(r),()=>cancelAnimationFrame(t)},[]),(0,I.jsx)(`span`,{className:`flex h-5 w-[26px] items-center justify-center gap-[2.5px]`,"aria-hidden":!0,children:[0,1,2,3,4].map(t=>(0,I.jsx)(`span`,{ref:n=>void(e.current[t]=n),className:`w-[3px] rounded-full bg-human transition-[height] duration-75`,style:{height:4}},t))})}function of({words:e,bindings:t}){let n=new Map(t.map(e=>[e.index,e]));return(0,I.jsx)(`span`,{className:`leading-[1.6]`,children:e.map((e,t)=>{let r=n.get(t);return r?(0,I.jsxs)(`span`,{children:[(0,I.jsxs)(`span`,{className:i(`inline-flex items-baseline gap-1 rounded-[5px] px-1 py-px`,r.el?`bg-human-soft text-human-fg`:`border border-dashed border-line-strong text-fg-3`),children:[e,(0,I.jsx)(`span`,{className:`max-w-[140px] truncate text-[11px] font-medium opacity-75`,children:r.el?r.el.name:`?`})]}),` `]},t):(0,I.jsxs)(`span`,{children:[e,` `]},t)})})}function sf(){let e=D(e=>e.voice),t=D(e=>e.hover),n=e.state===`starting`;return(0,I.jsxs)(`div`,{className:`flex min-h-[44px] w-[min(620px,calc(100vw-80px))] items-center gap-3 py-2 pl-3.5 pr-2`,"data-voice":e.state,children:[n?(0,I.jsx)(T,{className:`mx-[5px] size-4 text-human`}):(0,I.jsx)(af,{}),(0,I.jsx)(`div`,{className:`min-w-0 flex-1 text-[14px] text-fg`,children:e.words.length?(0,I.jsx)(of,{words:e.words,bindings:e.bindings}):(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[n?`Starting the mic…`:e.state===`finishing`?`Working out what you said…`:`Listening…`,t&&!n&&e.state!==`finishing`&&(0,I.jsxs)(`span`,{className:`ml-2 text-[12px]`,children:[`pointing at `,(0,I.jsx)(`span`,{className:`text-human-fg`,children:t.name})]})]})}),(0,I.jsx)(`span`,{className:`shrink-0 text-[11.5px] text-fg-3`,children:e.state===`finishing`?e.words.length?`Finishing…`:``:n?`One moment`:e.trigger===`hold`?`Release to send`:`Pause to send`}),(0,I.jsx)(yt,{size:`sm`,onClick:()=>A.cancelTalk(),"aria-label":`Cancel`,children:(0,I.jsx)(Et,{})})]})}function cf({since:e}){let[t,n]=(0,F.useState)(Date.now());return(0,F.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),100);return()=>clearInterval(e)},[]),(0,I.jsxs)(`span`,{className:`tabular shrink-0 font-mono text-[11.5px] text-fg-3`,children:[((t-e)/1e3).toFixed(1),`s`]})}function lf(){return(0,I.jsxs)(`span`,{className:`relative flex size-6 shrink-0 items-center justify-center`,children:[(0,I.jsx)(`span`,{className:`absolute inset-0 rounded-full`,style:{background:`conic-gradient(from 0deg, transparent, var(--ai))`,animation:`spin 1.1s linear infinite`,mask:`radial-gradient(circle, transparent 7.5px, #000 8px)`}}),(0,I.jsx)(ae,{className:`size-[12px] text-ai`})]})}function uf(){let e=D(e=>e.replay);if(!e)return null;let t=e.phase===`finishing`?1:e.phase===`playing`?(e.step-.5)/Math.max(1,e.total):0;return(0,I.jsxs)(`div`,{className:`relative flex h-[48px] w-[min(560px,calc(100vw-80px))] items-center gap-3 pl-3 pr-1.5`,"data-replay":e.phase,children:[(0,I.jsx)(lf,{}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:[`Replaying “`,e.name,`”`,e.phase===`playing`&&(0,I.jsxs)(`span`,{className:`tabular`,children:[` · step `,e.step,` of `,e.total]})]}),(0,I.jsxs)(`div`,{className:`shimmer-text truncate text-[12.5px] font-medium`,"data-replay-step":!0,children:[e.description,e.phase===`playing`?``:`…`]})]}),(0,I.jsx)(P,{variant:`ghost`,size:`sm`,onClick:()=>A.replayer.stop(),kbd:(0,I.jsx)(dd,{children:`Esc`}),"data-replay-stop":!0,children:`Stop`}),(0,I.jsx)(`span`,{className:`absolute bottom-0 start-0 h-[2px] bg-ai transition-[width] duration-500 ease-out`,style:{width:`${t*100}%`}})]})}function df(){let e=D(e=>e.autopilot);if(!e)return null;let t=e.phase===`finishing`?1:e.step/Math.max(1,e.total);return(0,I.jsxs)(`div`,{className:`relative flex h-[48px] w-[min(560px,calc(100vw-80px))] items-center gap-3 pl-3 pr-1.5`,"data-autopilot":e.phase,children:[(0,I.jsx)(lf,{}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:[`Autopilot`,e.goal?`: ${e.goal}`:``,e.step>0&&e.phase!==`finishing`&&(0,I.jsxs)(`span`,{className:`tabular`,children:[` · step `,e.step,` of `,e.total]}),e.found>0&&(0,I.jsxs)(`span`,{className:`tabular text-warn`,children:[` · `,e.found,` found`]})]}),(0,I.jsxs)(`div`,{className:`shimmer-text truncate text-[12.5px] font-medium`,"data-autopilot-step":!0,children:[e.description,e.phase===`acting`?``:`…`]})]}),(0,I.jsx)(P,{variant:`ghost`,size:`sm`,onClick:()=>A.autopilot.stop(),kbd:(0,I.jsx)(dd,{children:`Esc`}),"data-autopilot-stop":!0,children:`Stop`}),(0,I.jsx)(`span`,{className:`absolute bottom-0 start-0 h-[2px] bg-ai transition-[width] duration-500 ease-out`,style:{width:`${t*100}%`}})]})}function ff(){let e=D(e=>e.waiting);return e.length?(0,I.jsxs)(`span`,{title:e.map(e=>`“${e.text}”`).join(`
|
|
15
|
+
`),children:[` `,`· next: “`,e[0].text,`”`,e.length>1?` and ${e.length-1} more`:``]}):null}function pf(){let e=D(e=>e.request),t=D(e=>e.waiting.length);if(!e)return null;let n=e.step===`Stopping`,r=e.detail?`${e.step} · ${e.detail}`:e.step;return(0,I.jsxs)(`div`,{className:`flex h-[48px] w-[min(560px,calc(100vw-80px))] items-center gap-3 pl-3 pr-1.5`,"data-waiting":t,children:[(0,I.jsx)(lf,{}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:[`“`,e.text,`”`,(0,I.jsx)(ff,{})]}),(0,I.jsxs)(`div`,{className:`shimmer-text truncate text-[12.5px] font-medium`,children:[r,`…`]})]}),(0,I.jsx)(cf,{since:e.startedAt}),e.kind!==`test`&&!n&&(0,I.jsx)(P,{variant:`ghost`,size:`sm`,onClick:()=>void A.cancelRequest(),kbd:(0,I.jsx)(dd,{children:`Esc`}),children:`Stop`})]})}function Z(){let e=D(e=>e.request),t=D(e=>e.waiting.length);return e?(0,I.jsxs)(`div`,{className:`flex h-[36px] items-center gap-2.5 border-t border-line pl-3.5 pr-1.5 text-[11.5px] text-fg-3`,"data-working":!0,"data-waiting":t,children:[(0,I.jsx)(T,{className:`size-3 shrink-0 text-ai`}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[e.step===`Stopping`?`Stopping`:`Working on`,` “`,e.text,`”`,(0,I.jsx)(ff,{})]}),(0,I.jsx)(cf,{since:e.startedAt}),e.kind!==`test`&&e.step!==`Stopping`&&(0,I.jsx)(P,{variant:`ghost`,size:`xs`,onClick:()=>void A.cancelRequest(),children:`Stop`})]}):null}function mf(e){return e.source===`quick`?`Quick edit`:e.source===`fake`?`AI (test double)`:e.model??(e.source===`claude`?`Claude`:`AI`)}function hf({changes:e}){let t=e[0],n=D(e=>e.recorder.verifying),r=D(e=>e.recorder.running),i=t.files.reduce((e,t)=>e+t.added,0),a=t.files.reduce((e,t)=>e+t.removed,0);return(0,I.jsxs)(`div`,{className:`flex min-h-[50px] w-max max-w-[min(720px,calc(100vw-48px))] items-center gap-3 py-1.5 pl-3 pr-1.5`,children:[(0,I.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-[8px] bg-ai-soft text-ai-fg ring-1 ring-inset ring-ai-line/30`,children:(0,I.jsx)(ae,{className:`size-[14px]`})}),(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`truncate text-[13px] font-medium text-fg`,children:t.title}),e.length>1&&(0,I.jsxs)(ne,{tone:`ai`,children:[e.length,` previews`]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1.5 whitespace-nowrap text-[11.5px] text-fg-3`,children:n&&r?(0,I.jsxs)(`span`,{className:`flex items-center gap-1.5 text-ai-fg`,children:[(0,I.jsx)(T,{className:`size-3`}),` Checking with your test…`]}):(0,I.jsxs)(I.Fragment,{children:[t.said&&(0,I.jsxs)(`span`,{className:`max-w-[220px] truncate text-fg-2`,title:`What you said`,children:[`“`,t.said,`” ·`]}),(0,I.jsx)(`span`,{children:mf(t)}),t.latencyMs!=null&&(0,I.jsxs)(`span`,{children:[`· `,Je(t.latencyMs)]}),(0,I.jsx)(`span`,{children:`·`}),(0,I.jsx)(`span`,{className:`font-mono`,children:t.files.length===1?Ke(t.files[0].path):Ae(t.files.length,`file`)}),(0,I.jsxs)(`span`,{className:`font-mono text-ok`,children:[`+`,i]}),(0,I.jsxs)(`span`,{className:`font-mono text-bad`,children:[`−`,a]})]})})]}),(0,I.jsxs)(`div`,{className:`ml-3 flex flex-col items-end gap-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(P,{variant:`ghost`,size:`sm`,icon:(0,I.jsx)(ju,{}),onClick:()=>void A.undo(`click`),"aria-keyshortcuts":De?`Meta+Z`:`Control+Z`,children:`Undo`}),(0,I.jsx)(P,{variant:`primary`,size:`sm`,icon:(0,I.jsx)(dt,{}),onClick:()=>void A.keep(`click`),"aria-keyshortcuts":`Enter`,children:e.length>1?`Keep all`:`Keep`})]}),(0,I.jsx)(`span`,{className:`whitespace-nowrap pr-1 text-[11px] text-fg-3`,"data-keys":!0,children:Xd(De)})]})]})}var gf=/((?:[\w.-]+\/)*[\w.-]+\.(?:tsx|ts|jsx|js|css|json|md|html)):(\d+)/g;function _f({text:e}){let t=[];return e.split(/(`[^`]+`)/g).forEach((e,n)=>{if(e.startsWith("`")&&e.endsWith("`")){t.push((0,I.jsx)(`code`,{className:`rounded-[4px] bg-sunken px-1 py-px font-mono text-[12px] text-fg ring-1 ring-inset ring-line`,children:e.slice(1,-1)},n));return}let r=0;for(let i of e.matchAll(gf)){i.index>r&&t.push(e.slice(r,i.index));let[a,o,s]=i;t.push((0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>A.openRelative(o,Number(s)),className:`rounded-[4px] bg-ai-soft px-1 py-px font-mono text-[12px] text-ai-fg hover:underline`,title:`Open in editor`,children:a},`${n}-${i.index}`)),r=i.index+a.length}r<e.length&&t.push(e.slice(r))}),(0,I.jsx)(I.Fragment,{children:t})}function vf({text:e,said:t,latencyMs:n,model:r}){return(0,I.jsxs)(`div`,{className:`w-[min(580px,calc(100vw-48px))] py-2.5 pl-3.5 pr-2`,children:[(0,I.jsxs)(`div`,{className:`mb-1 flex items-center gap-2 text-[11.5px] text-fg-3`,children:[(0,I.jsx)(ae,{className:`size-[13px] text-ai`}),(0,I.jsx)(`span`,{className:`font-medium text-ai-fg`,children:r&&r!==`fake-claude`?r:`AI`}),n!=null&&(0,I.jsxs)(`span`,{children:[`· `,Je(n)]}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[`· “`,t,`”`]}),(0,I.jsx)(yt,{size:`sm`,onClick:()=>A.dismissIsland(),"aria-label":`Close`,children:(0,I.jsx)(Et,{})})]}),(0,I.jsx)(`div`,{className:`max-h-[220px] overflow-y-auto pr-2 text-[13px] leading-relaxed text-fg`,children:(0,I.jsx)(_f,{text:e})})]})}var yf={info:{icon:(0,I.jsx)(ll,{}),cls:`text-fg-3`},ok:{icon:(0,I.jsx)(lc,{}),cls:`text-ok`},warn:{icon:(0,I.jsx)(Du,{}),cls:`text-warn`},error:{icon:(0,I.jsx)(hc,{}),cls:`text-bad`}};function bf({text:e,tone:t,actions:n,sticky:r}){return(0,I.jsxs)(`div`,{className:`flex min-h-[40px] w-max max-w-[min(680px,calc(100vw-48px))] items-center gap-2.5 py-1.5 pl-3.5 pr-1.5`,children:[(0,I.jsx)(`span`,{className:i(`shrink-0 [&_svg]:size-[15px]`,yf[t].cls),children:yf[t].icon}),(0,I.jsx)(`span`,{className:`text-[12.5px] leading-snug text-fg`,children:e}),n?.map(e=>(0,I.jsx)(P,{size:`sm`,variant:e.primary?`primary`:`ghost`,onClick:e.run,className:`ml-1 first-of-type:ml-2`,children:e.label},e.label)),(r||n?.length)&&(0,I.jsx)(yt,{size:`sm`,onClick:()=>A.dismissIsland(),"aria-label":`Dismiss`,children:(0,I.jsx)(Et,{})}),!r&&!n?.length&&(0,I.jsx)(`span`,{className:`w-1.5`})]})}function xf({text:e,actions:t}){return(0,I.jsxs)(`div`,{className:`flex min-h-[44px] w-max max-w-[min(680px,calc(100vw-48px))] items-center gap-2.5 py-1.5 pl-3.5 pr-1.5`,children:[(0,I.jsx)(dl,{className:`size-[15px] shrink-0 text-warn`}),(0,I.jsx)(`span`,{className:`text-[12.5px] leading-snug text-fg`,children:e}),(t??[{label:`Connect an AI`,primary:!0,run:()=>Ue({overlay:`settings`,settingsTab:`ai`,island:{kind:`idle`}})}]).map(e=>(0,I.jsx)(P,{size:`sm`,variant:e.primary?`primary`:`ghost`,className:`ml-1 shrink-0 first-of-type:ml-2`,onClick:e.run,children:e.label},e.label)),(0,I.jsx)(yt,{size:`sm`,onClick:()=>A.dismissIsland(),"aria-label":`Dismiss`,children:(0,I.jsx)(Et,{})})]})}var Sf={type:`spring`,stiffness:700,damping:48,mass:.6};function Cf(e){if(!e)return null;let t=/^(.*):(\d+):\d+$/.exec(e);return t?`${Ke(t[1])}:${t[2]}`:e}function wf({rect:e,scale:t,children:n,tone:r,frameW:a}){let o=e.y>30/t,s=e.x+e.w/2>a*.6;return(0,I.jsx)(`div`,{className:i(`pointer-events-none absolute flex`,s?`right-0`:`left-0`),style:{top:o?void 0:0,bottom:o?`100%`:void 0,transform:`scale(${1/t})`,transformOrigin:`${o?`bottom`:`top`} ${s?`right`:`left`}`,paddingBottom:o?4:0,paddingTop:o?0:4,paddingLeft:o||s?0:4,paddingRight:!o&&s?4:0},children:(0,I.jsx)(`div`,{className:i(`flex h-[22px] items-center gap-1.5 whitespace-nowrap rounded-[6px] px-1.5 text-[11.5px] font-medium shadow-[0_2px_8px_rgba(0,0,0,.25)]`,r===`human`&&`bg-human text-[#1b1203]`,r===`ai`&&`bg-ai text-[#021a20]`,r===`soft`&&`bg-[#16171c]/90 text-white backdrop-blur`),children:n})})}function Tf({el:e,scale:t,snapped:n,frameW:r,frameH:i,hint:a,record:o}){let s=(0,F.useRef)(null),c=s.current!==null&&s.current!==e.id;s.current=e.id;let l=e.rect;return(0,I.jsxs)(xt.div,{className:`pointer-events-none absolute rounded-[4px]`,initial:!1,animate:{left:l.x,top:l.y,width:l.w,height:l.h,opacity:1},exit:{opacity:0,transition:{duration:.12}},transition:c?Sf:{duration:0},style:{boxShadow:o?`0 0 0 ${1.5/t}px var(--bad), inset 0 0 0 9999px rgba(255,99,105,.07)`:`0 0 0 ${1.5/t}px var(--human), inset 0 0 0 9999px rgba(255,178,36,.07)`},"data-hover-box":o?`record`:`edit`,children:[(0,I.jsxs)(wf,{rect:l,scale:t,tone:`soft`,frameW:r,children:[(0,I.jsx)(`span`,{className:o?`text-[#ff9a9e]`:`text-[#ffc35a]`,children:e.name}),e.text&&e.name!==e.text&&(0,I.jsx)(`span`,{className:`max-w-[180px] truncate text-white/70`,children:e.text}),n&&(0,I.jsx)(`span`,{className:`text-white/45`,children:`· snapped`})]}),a&&(0,I.jsx)(Ef,{rect:l,scale:t,frameH:i,...a})]})}function Ef({rect:e,scale:t,frameH:n,tap:r,hold:i}){let a=e.y+e.h+30/t<n;return(0,I.jsx)(`div`,{className:`pointer-events-none absolute left-1/2 flex`,style:{top:a?`100%`:void 0,bottom:a?void 0:0,transform:`translateX(-50%) scale(${1/t})`,transformOrigin:a?`top center`:`bottom center`,paddingTop:a?5:0,paddingBottom:a?0:5},"data-pinch-hint":!0,children:(0,I.jsxs)(`div`,{className:`flex h-[21px] items-center gap-1.5 whitespace-nowrap rounded-full bg-[#16171c]/90 px-2.5 text-[11px] text-white/75 shadow-[0_2px_8px_rgba(0,0,0,.25)] backdrop-blur`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`font-semibold text-[#ffc35a]`,children:`Pinch`}),` `,r]}),i&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-white/30`,children:`·`}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`font-semibold text-[#ffc35a]`,children:`Hold`}),` `,i]})]})]})})}var Df={select:`to select`,only:`to select only this`,deselect:`to deselect`,clear:`to clear`,none:``},Of={add:`to add`,remove:`to take out`,none:null};function kf({el:e,scale:t,frameW:n,frameH:r,hint:i,number:a}){let o=e.rect,s=D(t=>t.inspect&&t.selection?.id===e.id?`${t.inspect.guessed?`likely `:``}${Ke(t.inspect.file)}:${t.inspect.line}`:null);return(0,I.jsxs)(`div`,{className:`pointer-events-none absolute rounded-[4px]`,style:{left:o.x,top:o.y,width:o.w,height:o.h,boxShadow:`0 0 0 ${2/t}px var(--human), 0 0 0 ${6/t}px var(--human-soft)`},children:[[[0,0],[1,0],[0,1],[1,1]].map(([e,n])=>(0,I.jsx)(`span`,{className:`absolute rounded-[2px] bg-panel`,style:{width:7/t,height:7/t,left:`calc(${e*100}% - ${3.5/t}px)`,top:`calc(${n*100}% - ${3.5/t}px)`,boxShadow:`0 0 0 ${1.5/t}px var(--human)`}},`${e}${n}`)),(0,I.jsxs)(wf,{rect:o,scale:t,tone:`human`,frameW:n,children:[a!=null&&(0,I.jsx)(`span`,{className:`flex size-4 items-center justify-center rounded-full bg-[#1b1203] font-mono text-[10px] text-human`,children:a}),(0,I.jsx)(`span`,{children:e.name}),(s||e.src)&&(0,I.jsx)(`span`,{className:`font-mono text-[10.5px] font-normal opacity-70`,children:s??Cf(e.src)}),(0,I.jsx)(`span`,{className:`h-3 w-px bg-black/20`}),(0,I.jsx)(jf,{label:`Select what contains it`,kbd:`↑`,onClick:()=>void A.step(`parent`),children:(0,I.jsx)(Ys,{})}),(0,I.jsx)(jf,{label:`Select inside it`,kbd:`↓`,onClick:()=>void A.step(`child`),children:(0,I.jsx)(Gs,{})}),(0,I.jsx)(jf,{label:`Open in editor`,kbd:`O`,onClick:()=>void A.openInEditor(e),children:(0,I.jsx)(_c,{})}),(0,I.jsx)(jf,{label:`Deselect`,onClick:()=>A.deselect(e.id),children:(0,I.jsx)(Et,{})})]}),i&&(0,I.jsx)(Ef,{rect:o,scale:t,frameH:r,...i})]})}function Af({el:e,step:t,total:n,scale:r,frameW:i}){return(0,I.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-10 overflow-hidden`,children:(0,I.jsx)(Dt,{children:e&&(0,I.jsx)(xt.div,{className:`absolute rounded-[4px]`,initial:{opacity:0,scale:1.08},animate:{opacity:1,scale:1},exit:{opacity:0,transition:{duration:.15}},transition:{duration:.2,ease:[.2,.9,.25,1]},style:{left:e.rect.x,top:e.rect.y,width:e.rect.w,height:e.rect.h,boxShadow:`0 0 0 ${2/r}px var(--ai), 0 0 0 ${6/r}px rgba(60,200,232,.2), inset 0 0 0 9999px rgba(60,200,232,.08)`},"data-replay-target":t,children:(0,I.jsxs)(wf,{rect:e.rect,scale:r,tone:`ai`,frameW:i,children:[`Step `,t,` of `,n]})},`replay-${t}`)})})}function jf({label:e,kbd:t,onClick:n,children:r}){return(0,I.jsx)(pd,{label:e,kbd:t,side:`top`,children:(0,I.jsx)(`button`,{"data-hand":!0,onClick:e=>{e.stopPropagation(),n()},className:`pointer-events-auto mx-[3px] inline-flex size-[18px] items-center justify-center rounded-[4px] hover:bg-black/15 [&_svg]:size-[12px]`,"aria-label":e,children:r})})}function Mf({scale:e,width:t,height:n}){let r=D(e=>e.mode),i=D(e=>e.hover),a=D(e=>e.snapped),o=D(e=>e.selection),s=D(e=>e.pins),c=D(e=>e.pointer),l=D(e=>e.voice.state===`listening`),u=D(e=>e.voice.bindings),d=D(e=>e.previewTargets),f=D(e=>e.changes),p=D(e=>e.replay),m=D(e=>e.hand.pose===`pinch`);if(p)return(0,I.jsx)(Af,{el:p.target,step:p.step,total:p.total,scale:e,frameW:t});let h=l&&u.some(e=>e.el?.id===i?.id),g=!!i&&(r===`edit`||r===`record`||c===`hand`||l)&&i.id!==o?.id&&!h,_=r===`edit`&&c===`hand`&&!l&&!m&&i?wt(i,vt({selection:o,pins:s})):null,v=_&&_.tap!==`none`?{tap:Df[_.tap],hold:Of[_.hold]}:null,y=new Set(f.filter(e=>e.status===`preview`).map(e=>e.id)),b=d.filter(e=>y.has(e.changeId)),ee=new Set;return(0,I.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-10 overflow-hidden`,children:[b.filter(e=>!ee.has(e.el.id)&&(ee.add(e.el.id),!0)).map(n=>(0,I.jsx)(`div`,{className:`absolute rounded-[4px]`,style:{left:n.el.rect.x,top:n.el.rect.y,width:n.el.rect.w,height:n.el.rect.h,boxShadow:`0 0 0 ${1.5/e}px var(--ai), inset 0 0 0 9999px rgba(60,200,232,.06)`},children:n.el.id!==o?.id&&(0,I.jsx)(wf,{rect:n.el.rect,scale:e,tone:`ai`,frameW:t,children:`Preview`})},`ai-${n.el.id}`)),s.map((e,t)=>[e,t]).filter(([e])=>e.id!==o?.id).map(([t,n])=>(0,I.jsx)(`div`,{className:`absolute rounded-[4px]`,style:{left:t.rect.x,top:t.rect.y,width:t.rect.w,height:t.rect.h,boxShadow:`0 0 0 ${1.5/e}px var(--human), 0 0 0 ${5/e}px var(--human-soft)`},"data-picked":n+1,children:(0,I.jsx)(`span`,{className:`absolute flex items-center justify-center rounded-full bg-human font-mono text-[11px] font-semibold text-[#1b1203] shadow-[0_2px_6px_rgba(0,0,0,.3)]`,style:{width:18,height:18,right:-9/e,top:-9/e,transform:`scale(${1/e})`},children:n+1})},`pin-${t.id}`)),o&&(0,I.jsx)(kf,{el:o,scale:e,frameW:t,frameH:n,number:s.length&&s.findIndex(e=>e.id===o.id)+1||null,hint:i?.id===o.id?v:null}),(0,I.jsx)(Dt,{children:g&&i&&(0,I.jsx)(Tf,{el:i,scale:e,snapped:a&&c===`hand`,frameW:t,frameH:n,hint:v,record:r===`record`},`hover`)}),(0,I.jsx)(Dt,{children:l&&u.filter(e=>e.el).map(n=>(0,I.jsx)(xt.div,{className:`absolute rounded-[4px]`,initial:{opacity:0,scale:1.04},animate:{opacity:1,scale:1},exit:{opacity:0},style:{left:n.el.rect.x,top:n.el.rect.y,width:n.el.rect.w,height:n.el.rect.h,boxShadow:`0 0 0 ${2/e}px var(--human), inset 0 0 0 9999px rgba(255,178,36,.12)`},children:(0,I.jsxs)(wf,{rect:n.el.rect,scale:e,tone:`human`,frameW:t,children:[`“`,n.word,`”`]})},`bind-${n.index}`))})]})}function Nf({className:e}){return(0,I.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:e,"aria-hidden":!0,children:[(0,I.jsx)(`rect`,{width:`32`,height:`32`,rx:`9`,fill:`#0B0C10`}),(0,I.jsx)(`rect`,{x:`.5`,y:`.5`,width:`31`,height:`31`,rx:`8.5`,fill:`none`,stroke:`white`,strokeOpacity:`.1`}),(0,I.jsx)(`circle`,{cx:`16`,cy:`16`,r:`8.5`,fill:`none`,stroke:`#FFB224`,strokeWidth:`2.5`}),(0,I.jsx)(`circle`,{cx:`16`,cy:`16`,r:`3`,fill:`#3CC8E8`})]})}var Pf=`Saywright runs on your computer. Your code leaves it only when you ask the AI something: then just your request, what you pointed at and the code around it go to the AI you chose.`,Ff=[[`Quick edits`,`Size, variant, text, move and remove are done on this computer. Nothing is sent.`],[`A request to the AI`,`Your words, what you pointed at (its name, text and place in the code) and the code around it go to the AI you connected. A model on this computer keeps them here.`],[`Reports and reviews`,`Written by an AI, they send it what was recorded (steps, what the screen said, errors, what was said, a few screenshots) or the page reviewed. Without one they are written here.`],[`Voice`,`The on-device model hears you on this computer. The browser’s own recogniser (in Chrome) sends the audio to Google: Settings → Voice.`],[`Your files`,`Changes are written to your files as previews to keep or undo. Nothing is committed unless you turn that on, and nothing is pushed.`],[`Keys`,`API keys stay in a file on this computer, and go only to their provider.`]];function If({className:e}){return(0,I.jsxs)(ra,{children:[(0,I.jsx)(z,{asChild:!0,children:(0,I.jsx)(`button`,{"data-hand":!0,className:i(`font-medium text-fg-2 underline decoration-line-strong underline-offset-2 hover:text-fg`,e),children:`What’s sent?`})}),(0,I.jsx)(sa,{children:(0,I.jsxs)(la,{side:`top`,align:`start`,sideOffset:6,collisionPadding:12,className:`z-[80] w-[min(400px,calc(100vw-24px))] rounded-[12px] bg-panel p-3.5 text-[12px] leading-relaxed text-fg-2 shadow-pop outline-none`,"data-whats-sent":!0,children:[(0,I.jsx)(`div`,{className:`mb-2 text-[12.5px] font-semibold text-fg`,children:`What leaves this computer, and when`}),(0,I.jsx)(`dl`,{className:`space-y-1.5`,children:Ff.map(([e,t])=>(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`dt`,{className:`inline font-medium text-fg`,children:[e,`: `]}),(0,I.jsx)(`dd`,{className:`inline`,children:t})]},e))})]})})]})}function Lf({className:e}){return(0,I.jsxs)(`span`,{className:i(`text-[12.5px] leading-relaxed text-fg-3`,e),"data-privacy":!0,children:[Pf,` `,(0,I.jsx)(If,{})]})}function Rf(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60);return`${n?`${n}:${String(r).padStart(2,`0`)}`:r}:${String(t%60).padStart(2,`0`)}`}function zf(e,t=500){let[n,r]=(0,F.useState)(Date.now());return(0,F.useEffect)(()=>{if(!e)return;let n=setInterval(()=>r(Date.now()),t);return()=>clearInterval(n)},[e,t]),n}function Bf(){let e=et(e=>e.live),t=et(e=>e.setup),n=e.status===`recording`||e.status===`starting`||e.status===`stopping`,r=zf(n);if(n)return(0,I.jsx)(pd,{label:e.status===`starting`?`Cancel: don’t record after all`:`Stop and write the report`,children:(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>void M.stop(),disabled:e.status===`stopping`,className:`inline-flex h-7 items-center gap-2 rounded-[7px] bg-bad-soft pl-2.5 pr-2 text-[12px] font-semibold text-bad ring-1 ring-inset ring-bad/30 transition-colors hover:bg-bad/15`,children:[(0,I.jsx)(`span`,{className:`size-2 rounded-full bg-bad`,style:{animation:`rec-pulse 1.4s ease-in-out infinite`}}),(0,I.jsx)(`span`,{className:`tabular`,children:e.status===`starting`?e.countdown?.left?`In ${e.countdown.left}…`:`Starting…`:e.status===`stopping`?`Saving…`:Rf(r-e.startedAt)}),(0,I.jsx)(pu,{className:`size-3 fill-current`})]})});let i=null;return e.status===`processing`&&e.id?i=(0,I.jsx)(pd,{label:e.stage||`Writing the report`,children:(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>M.openReport(e.id),className:`inline-flex h-7 items-center gap-2 rounded-[7px] bg-ai-soft px-2.5 text-[12px] font-medium text-ai-fg ring-1 ring-inset ring-ai-line/40`,children:[(0,I.jsx)(T,{className:`size-3`}),`Writing report…`]})}):e.status===`ready`&&e.id?i=(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>M.openReport(e.id),className:`inline-flex h-7 items-center gap-1.5 rounded-[7px] bg-ai px-2.5 text-[12px] font-semibold text-[#021a20] shadow-[0_0_0_3px_var(--ai-soft)]`,children:[(0,I.jsx)(Lc,{className:`size-3.5`}),`Report ready`]}):e.status===`failed`&&e.id&&(i=(0,I.jsx)(pd,{label:e.error||`The report couldn’t be written`,children:(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>M.openReport(e.id),className:`inline-flex h-7 items-center gap-1.5 rounded-[7px] bg-bad-soft px-2.5 text-[12px] font-medium text-bad ring-1 ring-inset ring-bad/30`,children:[(0,I.jsx)(Lc,{className:`size-3.5`}),`Report failed`]})})),(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[i,(0,I.jsx)(Vf,{setup:t,compact:!!i})]})}function Vf({setup:e,compact:t}){let n=D(e=>!!e.replay);return(0,I.jsxs)(ra,{open:e&&!n,onOpenChange:e=>et.setState({setup:e}),children:[(0,I.jsx)(pd,{label:n?`Wait for the replay to finish`:`Record session: use your app and talk, then get a report with what went wrong`,children:(0,I.jsx)(z,{asChild:!0,children:(0,I.jsxs)(`button`,{"data-hand":!0,"data-tour":`record`,disabled:n,className:i(`inline-flex h-7 items-center gap-1.5 rounded-[7px] text-[12px] font-medium text-fg-2 ring-1 ring-inset ring-line-strong transition-colors hover:bg-hover hover:text-fg disabled:pointer-events-none disabled:opacity-45`,t?`w-7 justify-center`:`px-2.5 max-[1179px]:w-7 max-[1179px]:justify-center max-[1179px]:px-0`,e&&`bg-active text-fg`),children:[(0,I.jsx)(dc,{className:`size-3.5 text-bad`}),(0,I.jsx)(`span`,{className:i(t?`sr-only`:`max-[1179px]:sr-only`),children:`Record session`})]})})}),(0,I.jsx)(sa,{children:(0,I.jsx)(la,{side:`bottom`,align:`end`,sideOffset:8,className:`z-[60] w-[360px] rounded-[14px] bg-panel p-4 shadow-pop outline-none`,onOpenAutoFocus:e=>e.preventDefault(),children:(0,I.jsx)(Q,{})})})]})}function Q(){let e=et(e=>e.prefs),t=et(e=>e.speech),n=et(e=>e.live),[r,i]=(0,F.useState)(``),a=e=>M.setPrefs(e);(0,F.useEffect)(()=>void M.refreshSpeech(),[]),(0,F.useEffect)(()=>{e.mic&&M.warmSpeech(e.lang)},[e.lang,e.mic]);let o=e.lang===`en`?`en`:`ar`,s=t?.active[o]??null,c=t?.models.find(e=>e.id===s),l=t?.models.find(e=>e.langs.includes(o)&&!e.installed)??null,u=t?.models.find(e=>e.installing!=null),d=t?.models.filter(e=>e.wordErrors.ar!=null).sort((e,t)=>e.wordErrors.ar-t.wordErrors.ar)[0],f=t?.models.find(e=>e.id===t.active.ar),p=o===`ar`&&c&&d&&!d.installed&&f?.wordErrors.ar!=null&&f.id!==d.id?{best:d,now:f.wordErrors.ar}:null;return(0,I.jsxs)(`div`,{className:`space-y-3.5`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[14px] font-semibold tracking-[-0.01em] text-fg`,children:`Record a session`}),(0,I.jsxs)(`p`,{className:`mt-1 text-[12.5px] leading-relaxed text-fg-3`,children:[`Use your app and say what you notice, in English or Arabic. Every click, error, request and slow moment is captured; when you stop, you get a report with scores and fixes. For a Playwright test instead, use Write test mode (`,(0,I.jsx)(`b`,{className:`font-medium text-fg-2`,children:`R`}),`).`]})]}),(0,I.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>e.key===`Enter`&&void M.start(r),placeholder:`What are you testing? (optional)`,className:`h-8 w-full rounded-[8px] bg-sunken px-2.5 text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line placeholder:text-fg-3 focus:ring-ai-line`}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsx)(`div`,{className:`text-[12px] font-medium text-fg-3`,children:`I’ll talk in`}),(0,I.jsx)(md,{className:`w-full [&>*]:flex-1`,value:e.lang,onChange:e=>a({lang:e}),options:[{value:`en`,label:`English`},{value:`ar`,label:`العربية`},{value:`auto`,label:`Both`,title:`Arabic and English, even in one sentence`}]}),(0,I.jsx)(Hf,{speech:t,model:c?.label??null,candidate:l,installing:u,wantsMic:e.mic}),p&&e.mic&&!u&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-[8px] bg-ai-soft px-2.5 py-1.5`,"data-arabic-upgrade":!0,children:[(0,I.jsxs)(`p`,{className:`text-[11.5px] leading-snug text-ai-fg`,children:[`More accurate Arabic: `,p.best.wordErrors.ar,`% of words wrong instead of `,p.now,`%.`]}),(0,I.jsxs)(P,{size:`xs`,variant:`ai`,onClick:()=>void M.installSpeech(p.best.id),children:[`Install (`,(p.best.sizeMb/1e3).toFixed(1),` GB)`]})]})]}),(0,I.jsxs)(`div`,{className:`divide-y divide-line rounded-[10px] ring-1 ring-inset ring-line`,children:[(0,I.jsx)(Uf,{icon:(0,I.jsx)(Ol,{}),title:`Record my voice`,hint:`Transcribed on this computer, linked to what you point at`,on:e.mic,set:e=>a({mic:e})}),(0,I.jsx)(Uf,{icon:(0,I.jsx)(Pl,{}),title:`Record the screen`,hint:`Chrome asks what to share: choose this tab`,on:e.screen,set:e=>a({screen:e})}),e.screen&&(0,I.jsx)(Uf,{title:`Keep a video`,hint:`For replaying moments in the report`,on:e.video,set:e=>a({video:e}),indent:!0}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2.5 px-3 py-2.5`,children:[(0,I.jsx)(`span`,{className:`text-fg-3 [&_svg]:size-[15px]`,children:(0,I.jsx)(xu,{})}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`span`,{className:`block text-[12.5px] font-medium text-fg`,children:`Count down first`}),(0,I.jsx)(`span`,{className:`block text-[11.5px] text-fg-3`,children:`Checks the mic hears you before recording starts`})]}),(0,I.jsx)(md,{value:String(e.countdown),onChange:e=>a({countdown:Number(e)}),options:[{value:`0`,label:`Off`},{value:`3`,label:`3 s`},{value:`5`,label:`5 s`}]})]})]}),n.error&&!n.id&&(0,I.jsxs)(`div`,{className:`space-y-1.5 rounded-[8px] bg-bad-soft px-2.5 py-2 text-[12px] text-bad`,children:[(0,I.jsx)(`div`,{children:n.error}),n.busy&&(0,I.jsx)(P,{size:`xs`,onClick:()=>void M.start(r,!0),children:`Stop it and start this one`})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,I.jsx)(P,{variant:`primary`,size:`md`,className:`flex-1 !bg-bad !text-inverse hover:!bg-bad/90`,icon:(0,I.jsx)(`span`,{className:`size-2 rounded-full bg-inverse`}),onClick:()=>void M.start(r),children:`Start recording`})}),(0,I.jsxs)(`p`,{className:`text-[11.5px] leading-relaxed text-fg-3`,children:[`While recording: `,(0,I.jsx)(`b`,{className:`font-medium text-fg-2`,children:`M`}),` marks a moment (`,(0,I.jsx)(`b`,{className:`font-medium text-fg-2`,children:Ve(`alt+shift+m`)}),` inside the app). Recordings are kept in your app’s `,(0,I.jsx)(`span`,{className:`font-mono`,children:`.saywright/sessions`}),`; a report written by an AI sends it what was recorded. `,(0,I.jsx)(If,{})]})]})}function Hf({speech:e,model:t,candidate:n,installing:r,wantsMic:i}){return!i||!e?null:r?(0,I.jsxs)(`div`,{className:`space-y-1 pt-1`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between text-[11.5px] text-fg-3`,children:[(0,I.jsxs)(`span`,{children:[`Installing `,r.label,`…`]}),(0,I.jsxs)(`span`,{className:`tabular`,children:[r.installing??0,`%`]})]}),(0,I.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-active`,children:(0,I.jsx)(`div`,{className:`h-full bg-ai transition-[width] duration-300`,style:{width:`${r.installing??0}%`}})})]}):e.runtime===`missing`||e.runtime===`failed`?(0,I.jsxs)(`p`,{className:`pt-1 text-[11.5px] leading-relaxed text-warn`,children:[`The speech engine can’t run on this computer`,e.runtimeError?` (${e.runtimeError})`:``,`. Your voice is still recorded; transcribe it later.`]}):t?(0,I.jsxs)(`p`,{className:`pt-1 text-[11.5px] text-fg-3`,children:[`Transcribed on this computer with `,t,`.`]}):n?(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-2 pt-1`,children:[(0,I.jsx)(`p`,{className:`text-[11.5px] leading-snug text-warn`,children:`No speech model for this language yet.`}),(0,I.jsxs)(P,{size:`xs`,variant:`ai`,onClick:()=>void M.installSpeech(n.id),children:[`Install (`,n.sizeMb,` MB)`]})]}):null}function Uf({icon:e,title:t,hint:n,on:r,set:a,indent:o}){return(0,I.jsxs)(`label`,{className:i(`flex cursor-default items-center gap-2.5 px-3 py-2.5`,o&&`pl-9`),children:[e&&(0,I.jsx)(`span`,{className:`text-fg-3 [&_svg]:size-[15px]`,children:e}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`span`,{className:`block text-[12.5px] font-medium text-fg`,children:t}),(0,I.jsx)(`span`,{className:`block text-[11.5px] text-fg-3`,children:n})]}),(0,I.jsx)(gd,{checked:r,onCheckedChange:a})]})}function Wf({open:e,onClose:t,start:n=`folder`}){let[r,i]=(0,F.useState)(n),[a,o]=(0,F.useState)(null);return(0,F.useEffect)(()=>{e?i(n):o(null)},[e,n]),(0,I.jsx)(_e,{open:e,onOpenChange:e=>!e&&t(),title:`Link an app`,showTitle:!0,position:`top`,className:`w-[min(720px,calc(100vw-32px))]`,children:(0,I.jsxs)(Po,{value:r,onValueChange:e=>{i(e),o(null)},className:`flex min-h-0 flex-col`,"data-link-dialog":!0,children:[(0,I.jsxs)(Io,{"aria-label":`Where the app is`,className:`flex shrink-0 items-center gap-1 border-b border-line px-4 pt-1.5`,children:[(0,I.jsx)(Gf,{value:`folder`,icon:(0,I.jsx)(Uc,{}),children:`Folder on this computer`}),(0,I.jsx)(Gf,{value:`url`,icon:(0,I.jsx)($c,{}),children:`Address`}),(0,I.jsx)(Gf,{value:`github`,icon:(0,I.jsx)(Yc,{}),children:`GitHub`})]}),(0,I.jsx)(Bo,{value:r,className:`min-h-0 flex-1 overflow-y-auto p-5 outline-none`,children:a?(0,I.jsx)(Zf,{probe:a,cloned:r===`github`,onBack:()=>o(null),onProbe:o,onLinked:t}):r===`folder`?(0,I.jsx)(qf,{onProbe:o}):r===`url`?(0,I.jsx)(Yf,{onProbe:o}):(0,I.jsx)(Xf,{onProbe:o})})]})})}function Gf({value:e,icon:t,children:n}){return(0,I.jsxs)(Ro,{value:e,"data-hand":!0,className:i(`relative flex h-9 items-center gap-1.5 px-2.5 text-[12.5px] font-medium text-fg-3 transition-colors hover:text-fg-2 [&_svg]:size-[14px]`,`data-[state=active]:text-fg data-[state=active]:after:absolute data-[state=active]:after:inset-x-2 data-[state=active]:after:-bottom-px data-[state=active]:after:h-0.5 data-[state=active]:after:bg-fg`),children:[t,n]})}function Kf(){let[e,t]=(0,F.useState)(!1),[n,r]=(0,F.useState)(null);return{busy:e,error:n,run:async e=>{t(!0),r(null);try{return await e()}catch(e){return r(e instanceof Error?e.message:String(e)),null}finally{t(!1)}},setError:r}}function qf({onProbe:e}){let[t,n]=(0,F.useState)(null),[r,i]=(0,F.useState)(``),{busy:a,error:o,run:s}=Kf(),c=async e=>{let t=await s(()=>O.folders(e));t&&(n(t),i(t.path))};(0,F.useEffect)(()=>{c()},[]);let l=async t=>{let n=await s(()=>O.probeFolder(t));n&&e(n)},u=t?[...t.folders].sort((e,t)=>Number(t.app)-Number(e.app)):[];return(0,I.jsxs)(`div`,{className:`space-y-3`,"data-folder-picker":!0,children:[(0,I.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-2`,children:`Pick your app’s own folder: the one with its package.json, or its index.html. Folders marked “app” have one.`}),(0,I.jsxs)(`form`,{className:`flex gap-2`,onSubmit:e=>{e.preventDefault(),c(r)},children:[(0,I.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),spellCheck:!1,placeholder:`/path/to/your/app`,className:`h-9 min-w-0 flex-1 rounded-[8px] bg-sunken px-3 font-mono text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`,"aria-label":`Folder`}),(0,I.jsx)(P,{type:`submit`,size:`md`,icon:(0,I.jsx)(Cc,{}),disabled:a,children:`Go`}),(0,I.jsx)(P,{type:`button`,size:`md`,variant:`primary`,icon:(0,I.jsx)(dt,{}),disabled:a||!t,onClick:()=>t&&void l(t.path),"data-use-folder":!0,children:`Use this folder`})]}),t&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.places.map(e=>(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>void c(e.path),className:`inline-flex h-6 items-center gap-1 rounded-full px-2.5 text-[11.5px] text-fg-2 ring-1 ring-inset ring-line hover:bg-hover`,children:[e.label===`Home`?(0,I.jsx)(sl,{className:`size-3`}):(0,I.jsx)(Gc,{className:`size-3`}),e.label]},e.path))}),(0,I.jsxs)(`div`,{className:`overflow-hidden rounded-[10px] ring-1 ring-inset ring-line`,children:[t.parent&&(0,I.jsx)(Jf,{icon:(0,I.jsx)(Zs,{}),name:`..`,onOpen:()=>void c(t.parent)}),u.length===0&&(0,I.jsx)(`p`,{className:`px-3 py-6 text-center text-[12.5px] text-fg-3`,children:`No folders here. Type your app’s path above, or go up.`}),(0,I.jsx)(`div`,{className:`max-h-[300px] overflow-y-auto`,children:u.map(e=>(0,I.jsx)(Jf,{icon:e.app?(0,I.jsx)(Vc,{}):(0,I.jsx)(Gc,{}),name:e.name,app:e.app,onOpen:()=>void c(e.path),onUse:e.app?()=>void l(e.path):void 0},e.path))})]})]}),a&&(0,I.jsx)(T,{className:`text-fg-3`}),o&&(0,I.jsx)(`p`,{className:`text-[12.5px] text-bad`,children:o})]})}function Jf({icon:e,name:t,app:n,onOpen:r,onUse:i}){return(0,I.jsxs)(`div`,{className:`group flex items-center gap-2 border-b border-line px-3 py-1.5 last:border-0 hover:bg-hover`,"data-folder":t,children:[(0,I.jsxs)(`button`,{"data-hand":!0,onClick:r,className:`flex min-w-0 flex-1 items-center gap-2 text-start text-[12.5px] text-fg [&_svg]:size-[15px] [&_svg]:shrink-0 [&_svg]:text-fg-3`,children:[e,(0,I.jsx)(`span`,{className:`truncate`,children:t}),n&&(0,I.jsx)(ne,{tone:`human`,children:`app`})]}),i&&(0,I.jsx)(P,{size:`xs`,variant:`ghost`,onClick:i,"aria-label":`Use ${t}`,children:`Use`})]})}function Yf({onProbe:e}){let[t,n]=(0,F.useState)(``),{busy:r,error:i,run:a}=Kf();return(0,I.jsxs)(`form`,{className:`space-y-3`,onSubmit:async n=>{n.preventDefault();let r=await a(()=>O.probeUrl(t));r&&e(r)},children:[(0,I.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-2`,children:`An app already running on this computer (http://localhost:3000), or a deployed one (staging, production). The studio shows it through a small local proxy, so nothing in it needs to change.`}),(0,I.jsx)(`label`,{htmlFor:`link-address`,className:`block text-[12px] font-medium text-fg-2`,children:`Address`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`input`,{id:`link-address`,autoFocus:!0,value:t,onChange:e=>n(e.target.value),placeholder:`http://localhost:3000 or https://example.com`,spellCheck:!1,className:`h-9 min-w-0 flex-1 rounded-[8px] bg-sunken px-3 font-mono text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`,"data-url-input":!0}),(0,I.jsx)(P,{type:`submit`,variant:`primary`,size:`md`,disabled:r||!t.trim(),icon:r?(0,I.jsx)(T,{}):void 0,children:`Check`})]}),i&&(0,I.jsx)(`p`,{className:`text-[12.5px] text-bad`,children:i})]})}function Xf({onProbe:e}){let t=pt(e=>e.cloneDir),n=pt(e=>e.cloneLog),[r,i]=(0,F.useState)(``),[a,o]=(0,F.useState)(t),{busy:s,error:c,run:l}=Kf();return(0,F.useEffect)(()=>o(e=>e||t),[t]),(0,I.jsxs)(`form`,{className:`space-y-3`,onSubmit:async t=>{t.preventDefault();let n=await l(()=>O.clone(r,a));n&&e(n)},children:[(0,I.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-2`,children:`Cloned onto this computer to work on. Private repositories work when the GitHub CLI is signed in (gh auth login) or git already has access.`}),(0,I.jsxs)(`label`,{className:`block text-[12px] font-medium text-fg-2`,children:[`Repository`,(0,I.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>i(e.target.value),placeholder:`owner/name or https://github.com/owner/name`,spellCheck:!1,className:`mt-1 h-9 w-full rounded-[8px] bg-sunken px-3 font-mono text-[12.5px] font-normal text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`})]}),(0,I.jsxs)(`label`,{className:`block text-[12px] font-medium text-fg-2`,children:[`Clone into`,(0,I.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),spellCheck:!1,className:`mt-1 h-8 w-full rounded-[8px] bg-sunken px-3 font-mono text-[12px] font-normal text-fg-2 outline-none ring-1 ring-inset ring-line focus:ring-human-line`})]}),(0,I.jsx)(P,{type:`submit`,variant:`primary`,size:`md`,disabled:s||!r.trim(),icon:s?(0,I.jsx)(T,{}):(0,I.jsx)(Yc,{}),children:s?`Cloning…`:`Clone`}),(s||c)&&n.length>0&&(0,I.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Clone output`,className:`max-h-[160px] overflow-auto rounded-[8px] bg-sunken px-3 py-2 font-mono text-[11.5px] leading-relaxed text-fg-3`,dir:`ltr`,children:n.slice(-12).join(`
|
|
16
|
+
`)}),c&&(0,I.jsx)(`p`,{className:`text-[12.5px] text-bad`,children:c})]})}function Zf({probe:e,cloned:t,onBack:n,onProbe:r,onLinked:a}){let o=!!e.root,s=o&&e.framework===`other`&&!e.start,[c,l]=(0,F.useState)(e.name),[u,d]=(0,F.useState)(e.start??``),[f,p]=(0,F.useState)(s?``:e.url??``),{busy:m,error:h,run:g}=Kf(),_=Qf(s&&!e.candidates?.length?e.root:null),v=e.candidates?.length?e.candidates:_,y=o&&(e.framework===`static`||!!u.trim())||!!f.trim(),b=async e=>{let t=await g(()=>O.probeFolder(e));t&&r(t)},ee=async()=>{await g(()=>O.link(e,{name:c.trim()||e.name,start:o?u.trim()||null:void 0,url:f.trim()||void 0}))&&a()};return(0,I.jsxs)(`div`,{className:`space-y-4`,"data-probe":!0,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)($,{app:{name:c,icon:e.icon},className:`size-11`}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),className:`h-8 w-full rounded-[7px] bg-transparent px-1.5 text-[16px] font-semibold text-fg outline-none ring-inset hover:ring-1 hover:ring-line focus:ring-1 focus:ring-human-line`,"aria-label":`Name`}),(0,I.jsxs)(`div`,{className:`mt-0.5 flex flex-wrap items-center gap-1.5 px-1.5 text-[12px] text-fg-3`,children:[e.framework&&!s&&(0,I.jsx)(ne,{children:ep[e.framework]??e.framework}),e.packageManager&&!s&&(0,I.jsx)(`span`,{children:e.packageManager}),e.root&&(0,I.jsx)(`span`,{className:`truncate font-mono text-[11.5px]`,children:e.root}),!e.root&&e.title&&(0,I.jsx)(`span`,{className:`truncate`,children:e.title})]})]})]}),s&&(0,I.jsxs)(`div`,{className:`flex items-start gap-2 rounded-[10px] bg-warn-soft px-3.5 py-2.5 text-[12.5px] leading-relaxed text-warn`,role:`status`,"data-not-an-app":!0,children:[(0,I.jsx)(Du,{className:`mt-0.5 size-4 shrink-0`}),(0,I.jsxs)(`span`,{children:[e.notes[0]??`This folder isn’t an app the studio can start.`,v.length>0&&` Did you mean one of the apps inside it?`]})]}),v.length>0&&(0,I.jsxs)(`div`,{"data-suggested-apps":!0,children:[(0,I.jsx)(`div`,{className:`mb-1.5 text-[12px] font-medium text-fg-2`,children:e.candidates?.length?`Apps in this repository`:`Apps in this folder`}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:v.map(e=>(0,I.jsxs)(P,{size:`sm`,icon:(0,I.jsx)(Vc,{}),onClick:()=>void b(e.path),children:[e.name,e.framework&&(0,I.jsxs)(`span`,{className:`text-fg-3`,children:[`· `,ep[e.framework]??e.framework]})]},e.path))})]}),(0,I.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[o&&(0,I.jsx)($f,{label:`Dev command`,hint:`Run in its folder to start it. Empty: you start it yourself.`,children:(0,I.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`npm run dev`,spellCheck:!1,className:`h-8 w-full rounded-[8px] bg-sunken px-2.5 font-mono text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`,"data-start-input":!0})}),(0,I.jsx)($f,{label:`Address`,hint:e.framework===`static`&&!u.trim()?`The studio serves this folder itself, at an address it picks.`:o?`Where its dev server usually answers. The studio follows it if it moves.`:`Opened in the studio through its proxy.`,children:(0,I.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),placeholder:e.framework===`static`&&!u.trim()?`Picked when it is served`:`http://localhost:5173`,spellCheck:!1,className:`h-8 w-full rounded-[8px] bg-sunken px-2.5 font-mono text-[12.5px] text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`,"data-url-field":!0})})]}),e.notes.length>+!!s&&(0,I.jsx)(`ul`,{className:`space-y-1.5 rounded-[10px] bg-sunken/60 px-3.5 py-2.5 text-[12.5px] leading-relaxed text-fg-2`,children:e.notes.slice(+!!s).map(e=>(0,I.jsxs)(`li`,{className:`flex gap-2`,children:[(0,I.jsx)(`span`,{className:`mt-[7px] size-1 shrink-0 rounded-full bg-fg-3`}),e]},e))}),e.needsInstall&&!t&&(0,I.jsxs)(`p`,{className:`flex items-start gap-2 rounded-[10px] bg-warn-soft px-3.5 py-2.5 text-[12.5px] leading-relaxed text-warn`,children:[(0,I.jsx)(Du,{className:`mt-0.5 size-4 shrink-0`}),`Its dependencies aren’t installed. Installing runs the project’s install scripts: only do it for code you trust.`]}),t&&o&&(0,I.jsxs)(`p`,{className:`flex items-start gap-2 rounded-[10px] bg-warn-soft px-3.5 py-2.5 text-[12.5px] leading-relaxed text-warn`,"data-runs-code":!0,children:[(0,I.jsx)(Du,{className:`mt-0.5 size-4 shrink-0`}),(0,I.jsxs)(`span`,{children:[`Opening it runs this repository’s own commands on your computer`,e.needsInstall?`: its install scripts, then `:`: `,(0,I.jsx)(`code`,{className:`font-mono`,children:u.trim()||`nothing until you start it`}),`. Only open code you trust.`]})]}),h&&(0,I.jsx)(`p`,{className:`text-[12.5px] text-bad`,children:h}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,I.jsx)(P,{variant:`ghost`,onClick:n,children:`Back`}),!y&&(0,I.jsx)(`span`,{className:`ms-auto text-[12px] text-fg-3`,children:`Needs a dev command or an address`}),(0,I.jsx)(P,{className:i(y&&`ms-auto`),variant:`primary`,size:`md`,disabled:m||!y,icon:m?(0,I.jsx)(T,{}):(0,I.jsx)(dt,{}),onClick:()=>void ee(),"data-link-confirm":!0,children:t&&o&&u.trim()?`Link and run it`:`Link and open`})]})]})}function Qf(e){let[t,n]=(0,F.useState)([]);return(0,F.useEffect)(()=>{if(n([]),!e)return;let t=!0;return O.folders(e).then(e=>t&&n(e.folders.filter(e=>e.app).map(e=>({name:e.name,path:e.path})))).catch(()=>void 0),()=>{t=!1}},[e]),t}function $f({label:e,hint:t,children:n}){return(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsx)(`span`,{className:`mb-1 block text-[12px] font-medium text-fg-2`,children:e}),n,(0,I.jsx)(`span`,{className:`mt-1 block text-[11.5px] leading-snug text-fg-3`,children:t})]})}var ep={vite:`Vite`,next:`Next.js`,cra:`Create React App`,astro:`Astro`,remix:`Remix`,"react-router":`React Router`,sveltekit:`SvelteKit`,nuxt:`Nuxt`,angular:`Angular`,gatsby:`Gatsby`,static:`Static site`,other:`Web app`};function $({app:e,className:t}){let[n,r]=(0,F.useState)(!1);if(e.icon&&!n)return(0,I.jsx)(`img`,{src:e.icon,alt:``,onError:()=>r(!0),className:i(`size-9 shrink-0 rounded-[9px] bg-white object-contain p-1 ring-1 ring-inset ring-line`,t)});let a=e.name.split(/[\s_-]+/).map(e=>e[0]).join(``).slice(0,2).toUpperCase();return(0,I.jsx)(`span`,{className:i(`flex size-9 shrink-0 items-center justify-center rounded-[9px] bg-human-soft text-[13px] font-semibold text-human-fg ring-1 ring-inset ring-human-line/30`,t),children:a||`·`})}function tp(e){return!e||e.status===`stopped`?null:e.status===`running`?{tone:`ok`,text:`Running${e.url?` · ${Oe(e.url)}`:``}`}:e.status===`starting`?{tone:`warn`,text:`Starting…`}:e.status===`installing`?{tone:`warn`,text:`Installing…`}:{tone:`bad`,text:`Stopped with an error${e.exitCode==null?``:` (${e.exitCode})`}`}}var np=e=>e?.querySelector(`[data-first-action]`)??null;function rp(){let e=D(e=>e.status!==null&&!e.status.app),t=pt(e=>e.launcher),n=pt(e=>e.active),r=pt(e=>e.apps),i=pt(e=>e.loaded),a=pt(e=>e.launcherPref),o=pt(e=>e.linking),s=bt(),c=t||e,l=(0,F.useRef)(null),u=le(c,{onEscape:n?()=>O.hide():void 0,initialFocus:()=>np(l.current)??l.current,returnFocus:()=>document.querySelector(`[data-app-switcher]`)}),d=(0,F.useCallback)(e=>{l.current=e,u(e)},[u]);return(0,F.useEffect)(()=>{c&&i&&l.current&&document.activeElement===l.current&&np(l.current)?.focus()},[c,i]),(0,I.jsx)(Dt,{children:c&&(0,I.jsxs)(xt.div,{ref:d,tabIndex:-1,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16},className:`fixed inset-0 z-40 flex flex-col overflow-y-auto bg-bg outline-none`,role:`dialog`,"aria-modal":`true`,"aria-label":`Your apps`,"data-launcher":!0,children:[(0,I.jsxs)(`header`,{className:`flex h-[54px] shrink-0 items-center gap-2.5 border-b border-line bg-panel px-4`,children:[(0,I.jsx)(Nf,{className:`size-[24px]`}),(0,I.jsx)(`span`,{className:`text-[14px] font-semibold tracking-[-0.01em] text-fg`,children:Sd.name}),(0,I.jsxs)(`span`,{className:`hidden text-[12.5px] text-fg-3 md:inline`,children:[`· `,Sd.tagline]}),(0,I.jsxs)(`div`,{className:`ms-auto flex items-center gap-1`,children:[(0,I.jsx)(Sp,{}),(0,I.jsx)(`span`,{className:`mx-1 h-4 w-px bg-line-strong`}),(0,I.jsx)(pd,{label:s?`Gestures, phrases and shortcuts`:`Phrases and shortcuts`,children:(0,I.jsx)(yt,{onClick:()=>Ue({overlay:`help`}),"aria-label":`Help`,children:(0,I.jsx)(pc,{})})}),(0,I.jsx)(pd,{label:`Settings`,children:(0,I.jsx)(yt,{onClick:()=>Ue({overlay:`settings`,settingsTab:`general`}),"aria-label":`Settings`,children:(0,I.jsx)(au,{})})}),n&&(0,I.jsx)(pd,{label:`Back to the open app`,kbd:`Esc`,children:(0,I.jsx)(yt,{onClick:()=>O.hide(),"aria-label":`Back to the open app`,children:(0,I.jsx)(Et,{})})})]})]}),(0,I.jsx)(`main`,{className:`mx-auto w-full max-w-[1080px] flex-1 px-5 pb-16 pt-9`,children:i?r.length?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`mb-5 flex flex-wrap items-end gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.02em] text-fg`,children:`Your apps`}),(0,I.jsx)(`p`,{className:`mt-1 text-[13px] text-fg-3`,children:`Pick up where you left off, or link another app. Each keeps its own sessions, changes and settings.`})]}),(0,I.jsx)(P,{className:`ms-auto`,variant:`primary`,size:`md`,icon:(0,I.jsx)(oe,{}),onClick:()=>O.setLinking(`folder`),"data-link-app":!0,children:`Link an app`})]}),(0,I.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:r.map((e,t)=>(0,I.jsx)(op,{app:e,current:e.id===n,first:t===0},e.id))}),!r.some(e=>e.sample)&&(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>void O.sample(),className:`mt-4 text-[12.5px] text-fg-3 underline decoration-line-strong underline-offset-2 hover:text-fg-2`,children:`Try the sample shop (it has a real bug to find)`})]}):(0,I.jsx)(ip,{onLink:e=>O.setLinking(e)}):(0,I.jsx)(`div`,{className:`flex justify-center pt-24`,children:(0,I.jsx)(T,{className:`size-5 text-fg-3`})})}),i&&(0,I.jsxs)(`footer`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2 border-t border-line px-5 py-3 text-[12px] text-fg-3`,children:[(0,I.jsxs)(`label`,{className:`flex items-center gap-2`,"data-hand":!0,children:[(0,I.jsx)(gd,{checked:a,onCheckedChange:e=>void O.setLauncherPref(e),"aria-label":`Show this list when the studio starts`}),`Show this list when the studio starts`]}),(0,I.jsx)(Lf,{className:`ms-auto max-w-[680px] text-[12px]`})]}),(0,I.jsx)(Wf,{open:!!o,start:o??`folder`,onClose:()=>O.setLinking(null)})]},`launcher`)})}function ip({onLink:e}){let t=D(e=>e.status?.tourSeen===!1),n=N(e=>e.onboarded),r=t&&!n;return(0,I.jsxs)(`div`,{className:`mx-auto max-w-[760px] pt-6 text-center`,"data-welcome":!0,children:[(0,I.jsx)(Nf,{className:`mx-auto size-12`}),(0,I.jsxs)(`h1`,{className:`mt-5 text-[26px] font-semibold tracking-[-0.02em] text-fg`,children:[`Welcome to `,Sd.name]}),(0,I.jsx)(`p`,{className:`mx-auto mt-2 max-w-[520px] text-[14px] leading-relaxed text-fg-2`,children:`Link the app you are building. Point at anything in it, say or type what to change, and keep or undo the result.`}),(0,I.jsxs)(`div`,{className:`mt-8 grid gap-3 text-start sm:grid-cols-3`,children:[(0,I.jsx)(ap,{icon:(0,I.jsx)(Uc,{}),title:`A folder on this computer`,onClick:()=>e(`folder`),first:!0,children:`Any web app: Vite, Next.js, Astro, Angular, plain HTML. The studio starts it for you.`}),(0,I.jsx)(ap,{icon:(0,I.jsx)($c,{}),title:`An address`,onClick:()=>e(`url`),children:`Already running locally, or deployed (staging, production): test, record and audit it.`}),(0,I.jsx)(ap,{icon:(0,I.jsx)(Yc,{}),title:`A GitHub repository`,onClick:()=>e(`github`),children:`Cloned here, installed and started, ready to change.`})]}),(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>void O.sample(),className:`mt-8 inline-flex items-center gap-1.5 text-[13px] font-medium text-human-fg hover:underline`,"data-try-sample":!0,children:[`Or try the sample shop first `,(0,I.jsx)(qs,{className:`size-3.5`})]}),r&&(0,I.jsx)(`p`,{className:`mt-2 text-[12.5px] text-fg-3`,children:`A one-minute tour starts once your app is open.`})]})}function ap({icon:e,title:t,children:n,onClick:r,first:i}){return(0,I.jsxs)(`button`,{"data-hand":!0,onClick:r,"data-first-action":i||void 0,className:`group flex flex-col items-start rounded-[14px] bg-raised p-4 text-start ring-1 ring-inset ring-line transition hover:ring-line-strong`,children:[(0,I.jsx)(`span`,{className:`flex size-9 items-center justify-center rounded-[9px] bg-sunken text-fg-2 ring-1 ring-inset ring-line [&_svg]:size-[17px] group-hover:text-fg`,children:e}),(0,I.jsx)(`span`,{className:`mt-3 block text-[13.5px] font-semibold text-fg`,children:t}),(0,I.jsx)(`span`,{className:`mt-1 block text-[12.5px] leading-relaxed text-fg-3`,children:n})]})}function op({app:e,current:t,first:n}){let r=pt(t=>t.runs[e.id]),a=pt(t=>t.opening?.id===e.id&&!t.opening.error),o=tp(r),s=e.envs.find(t=>t.id===e.env)??e.envs[0];return(0,I.jsxs)(`article`,{className:i(`flex flex-col rounded-[14px] bg-raised p-4 ring-1 ring-inset transition-shadow`,t?`ring-human-line/60`:`ring-line hover:ring-line-strong`),"data-app":e.id,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)($,{app:e}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`h2`,{className:`truncate text-[14px] font-semibold text-fg`,children:e.name}),t&&(0,I.jsx)(ne,{tone:`human`,children:`Open`})]}),(0,I.jsxs)(`div`,{className:`mt-0.5 flex flex-wrap items-center gap-1.5 text-[11.5px] text-fg-3`,children:[e.framework&&(0,I.jsx)(`span`,{children:ep[e.framework]??e.framework}),!e.root&&(0,I.jsx)(`span`,{children:`· address only`}),e.sample&&(0,I.jsx)(`span`,{children:`· sample`})]})]}),(0,I.jsx)(cp,{app:e,run:r})]}),(0,I.jsx)(`div`,{className:`mt-3 space-y-1`,children:e.envs.map(t=>(0,I.jsx)(sp,{app:e,env:t,chosen:t.id===s.id},t.id))}),o&&(0,I.jsxs)(`div`,{className:`mt-2.5 flex items-center gap-1.5 text-[11.5px] text-fg-3`,"data-run":r?.status,children:[(0,I.jsx)(me,{tone:o.tone,pulse:o.tone===`warn`}),o.text]}),(0,I.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-4`,children:[(0,I.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:t?`Open now`:`Opened ${nt(e.openedAt)}`}),(0,I.jsx)(P,{className:`ms-auto`,variant:t?`secondary`:`primary`,size:`sm`,icon:a?(0,I.jsx)(T,{}):(0,I.jsx)(Kl,{}),disabled:a,onClick:()=>t?O.hide():void O.open(e.id),"data-open-app":!0,"data-first-action":n||void 0,children:t?`Back to it`:`Open`})]})]})}function sp({app:e,env:t,chosen:n}){return(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>void O.open(e.id,t.id),className:i(`flex w-full items-center gap-2 rounded-[8px] px-2 py-1 text-start text-[12px] hover:bg-hover`,n?`text-fg-2`:`text-fg-3`),title:`Open ${t.label}: ${t.url}`,"data-env":t.id,children:[t.kind===`local`?(0,I.jsx)(_c,{className:`size-3.5 shrink-0`}):(0,I.jsx)($c,{className:`size-3.5 shrink-0`}),(0,I.jsx)(`span`,{className:`w-[74px] shrink-0 font-medium`,children:t.label}),(0,I.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-[11.5px]`,children:Oe(t.url)}),t.connection===`proxy`&&(0,I.jsx)(`span`,{className:`shrink-0 text-[10.5px] text-fg-3`,children:`via proxy`})]})}function cp({app:e,run:t}){let[n,r]=(0,F.useState)(null),i=t?.status===`running`||t?.status===`starting`;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(Ni,{children:[(0,I.jsx)(Fi,{asChild:!0,children:(0,I.jsx)(yt,{size:`sm`,"aria-label":`More for ${e.name}`,children:(0,I.jsx)(kc,{})})}),(0,I.jsx)(Ii,{children:(0,I.jsxs)(Ri,{align:`end`,sideOffset:6,className:`z-[60] min-w-[230px] rounded-[10px] bg-raised p-1 shadow-pop`,children:[(0,I.jsx)(lp,{icon:(0,I.jsx)($c,{}),onSelect:()=>r(`env`),children:`Add an address (staging, production)…`}),(0,I.jsx)(lp,{icon:(0,I.jsx)(tc,{}),onSelect:()=>r(`name`),children:`Rename…`}),e.root&&(0,I.jsx)(lp,{icon:(0,I.jsx)(Kl,{}),onSelect:()=>r(`start`),children:`Dev command…`}),e.root&&e.packageManager&&(0,I.jsxs)(lp,{icon:(0,I.jsx)(Ql,{}),onSelect:()=>void O.install(e.id),children:[`Install dependencies (`,e.packageManager,` install)`]}),i&&(0,I.jsx)(lp,{icon:(0,I.jsx)(pu,{}),onSelect:()=>void O.stop(e.id),children:`Stop its dev server`}),(0,I.jsx)(Hi,{className:`my-1 h-px bg-line`}),(0,I.jsx)(lp,{icon:(0,I.jsx)(be,{}),danger:!0,onSelect:async()=>{await pe({title:`Remove ${e.name} from the studio?`,body:`Its code, sessions and reports stay where they are on this computer. You can link it again at any time.`,action:`Remove`,danger:!0})&&O.remove(e.id)},children:`Remove from the studio`})]})})]}),n&&(0,I.jsx)(up,{app:e,what:n,onClose:()=>r(null)})]})}function lp({icon:e,children:t,onSelect:n,danger:r}){return(0,I.jsxs)(zi,{onSelect:n,className:i(`flex h-8 cursor-default items-center gap-2 rounded-[7px] px-2 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover [&_svg]:size-[14px] [&_svg]:text-fg-3`,r&&`text-bad [&_svg]:text-bad`),children:[e,t]})}function up({app:e,what:t,onClose:n}){let[r,a]=(0,F.useState)(t===`name`?e.name:t===`start`?e.start??``:``),[o,s]=(0,F.useState)(`Production`),[c,l]=(0,F.useState)(null),[u,d]=(0,F.useState)(!1),f=async()=>{d(!0),l(null);try{t===`name`?await O.update(e.id,{name:r}):t===`start`?await O.update(e.id,{start:r.trim()||null}):await O.addEnv(e.id,r,o),n()}catch(e){l(e instanceof Error?e.message:String(e))}finally{d(!1)}},p=le(!0,{onEscape:n}),m=(0,F.useId)();return(0,I.jsx)(`div`,{ref:p,className:`fixed inset-0 z-[70] flex items-center justify-center bg-black/40 p-4`,onClick:n,children:(0,I.jsxs)(`form`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${m}-title`,"aria-describedby":`${m}-hint`,className:`w-[min(440px,100%)] rounded-[14px] bg-panel p-5 shadow-pop`,onClick:e=>e.stopPropagation(),onSubmit:e=>{e.preventDefault(),f()},children:[(0,I.jsx)(`h3`,{id:`${m}-title`,className:`text-[14px] font-semibold text-fg`,children:t===`name`?`Rename ${e.name}`:t===`start`?`Dev command`:`Another address for ${e.name}`}),(0,I.jsx)(`p`,{id:`${m}-hint`,className:`mt-1 text-[12.5px] text-fg-3`,children:t===`start`?`Run in ${e.root} to start it. Leave empty if you start it yourself.`:t===`env`?`A staging or production address: open it to test, record and audit the deployed app.`:`How it is listed here.`}),t===`env`&&(0,I.jsx)(`div`,{className:`mt-3 flex gap-1.5`,children:[`Staging`,`Production`,`Preview`].map(e=>(0,I.jsx)(`button`,{type:`button`,"data-hand":!0,onClick:()=>s(e),className:i(`h-7 rounded-full px-3 text-[12px] ring-1 ring-inset`,o===e?`bg-fg text-inverse ring-fg`:`text-fg-2 ring-line hover:bg-hover`),children:e},e))}),(0,I.jsx)(`input`,{autoFocus:!0,value:r,onChange:e=>a(e.target.value),placeholder:t===`env`?`https://example.com`:t===`start`?`npm run dev`:``,spellCheck:!1,className:i(`mt-3 h-9 w-full rounded-[8px] bg-sunken px-3 text-[13px] text-fg outline-none ring-1 ring-inset ring-line-strong focus:ring-human-line`,t!==`name`&&`font-mono text-[12.5px]`)}),c&&(0,I.jsx)(`p`,{className:`mt-2 text-[12px] text-bad`,children:c}),(0,I.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,I.jsx)(P,{type:`button`,variant:`ghost`,onClick:n,children:`Cancel`}),(0,I.jsx)(P,{type:`submit`,variant:`primary`,disabled:u||t!==`start`&&!r.trim(),icon:u?(0,I.jsx)(T,{}):void 0,children:`Save`})]})]})})}function dp(){let e=pt(e=>e.opening),t=pt(e=>e.apps),n=pt(e=>e.opening?e.runs[e.opening.id]:void 0),[r,a]=(0,F.useState)(!1),o=t.find(t=>t.id===e?.id),s=!!e?.error,c=()=>{o&&!s&&O.stop(o.id),O.dismissOpening()},l=le(!!e,{onEscape:s||o?c:void 0}),u=(0,F.useId)();if(!e)return null;let d=o?.name??(e.id===`sample`?`the sample shop`:`the app`),f=n?.log??[];return(0,I.jsx)(`div`,{ref:l,className:`fixed inset-0 z-[65] flex items-center justify-center bg-black/45 p-4 backdrop-blur-[2px]`,"data-opening":s?`failed`:`busy`,children:(0,I.jsxs)(`div`,{role:s?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-labelledby":`${u}-title`,"aria-describedby":`${u}-what`,className:`w-[min(560px,100%)] overflow-hidden rounded-[14px] bg-panel shadow-pop`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3 p-5`,children:[s?(0,I.jsx)(Du,{className:`mt-0.5 size-5 shrink-0 text-warn`}):(0,I.jsx)(T,{className:`mt-0.5 size-5 shrink-0 text-human`}),(0,I.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`h3`,{id:`${u}-title`,className:`text-[14.5px] font-semibold text-fg`,children:s?`${d} didn’t open`:`${e.step===`Opening`?`Opening`:e.step} ${e.step.startsWith(`Starting the`)||e.step.startsWith(`Installing`)?``:d}`.trim()}),(0,I.jsx)(`p`,{id:`${u}-what`,className:i(`mt-1 whitespace-pre-line text-[12.5px] leading-relaxed`,s?`text-fg-2`:`shimmer-text`),children:s?e.error?.split(`
|
|
17
|
+
`)[0]:n?.status===`starting`?`Running “${n.command}” and waiting for it to answer…`:n?.status===`installing`?`Running “${n.command}”…`:`Connecting…`})]})]}),f.length>1&&(0,I.jsxs)(`div`,{className:`border-t border-line`,children:[(0,I.jsxs)(`button`,{"data-hand":!0,onClick:()=>a(!r),className:`flex w-full items-center gap-1.5 px-5 py-2 text-start text-[12px] text-fg-3 hover:text-fg-2`,children:[(0,I.jsx)(fe,{className:i(`size-3.5 transition-transform`,(r||s)&&`rotate-180`)}),`Its output`]}),(r||s)&&(0,I.jsx)(`pre`,{tabIndex:0,role:`region`,"aria-label":`Its output`,className:`max-h-[220px] overflow-auto bg-sunken px-5 py-3 font-mono text-[11.5px] leading-relaxed text-fg-2`,dir:`ltr`,"data-run-log":!0,children:f.slice(-40).join(`
|
|
18
|
+
`)})]}),(0,I.jsx)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-line bg-sunken/40 px-5 py-3`,children:s?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(P,{variant:`ghost`,onClick:()=>O.dismissOpening(),children:`Close`}),e.code===`needs-install`&&o&&(0,I.jsx)(P,{variant:`primary`,icon:(0,I.jsx)(Ql,{}),onClick:async()=>{await O.install(o.id)&&O.open(o.id,e.env||void 0)},children:`Install dependencies and open`}),e.code!==`needs-install`&&o&&(0,I.jsx)(P,{variant:`primary`,icon:(0,I.jsx)(Ql,{}),onClick:()=>void O.open(o.id,e.env||void 0),children:`Try again`})]}):o&&(0,I.jsx)(P,{variant:`ghost`,onClick:c,children:`Cancel`})})]})})}function fp(){let e=pt(e=>e.pending),t=le(!!e,{onEscape:()=>O.dismissOpening()}),n=(0,F.useId)();return e?(0,I.jsx)(`div`,{ref:t,className:`fixed inset-0 z-[66] flex items-center justify-center bg-black/45 p-4`,"data-pending-switch":!0,children:(0,I.jsxs)(`div`,{role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`${n}-title`,"aria-describedby":`${n}-what`,className:`w-[min(460px,100%)] rounded-[14px] bg-panel p-5 shadow-pop`,children:[(0,I.jsx)(`h3`,{id:`${n}-title`,className:`text-[14.5px] font-semibold text-fg`,children:`Keep or undo first?`}),(0,I.jsxs)(`p`,{id:`${n}-what`,className:`mt-1.5 text-[12.5px] leading-relaxed text-fg-2`,children:[e.message,` They stay in its code if you keep them.`]}),(0,I.jsxs)(`div`,{className:`mt-4 flex flex-wrap justify-end gap-2`,children:[(0,I.jsx)(P,{variant:`ghost`,onClick:()=>O.dismissOpening(),children:`Cancel`}),(0,I.jsx)(P,{onClick:()=>void O.open(e.id,e.env,`undo`),children:`Undo and switch`}),(0,I.jsx)(P,{variant:`primary`,onClick:()=>void O.open(e.id,e.env,`keep`),children:`Keep and switch`})]})]})}):null}function pp(){let e=D(e=>e.status),t=D(e=>e.app.connected),n=D(e=>e.app.url),r=pt(e=>e.apps),i=e?.app,a=r.filter(e=>e.id!==i?.id).slice(0,6),o=i?i.env.url.replace(/\/$/,``)+(n?new URL(n).pathname.replace(/^\/$/,``):``):``;return(0,I.jsxs)(Ni,{onOpenChange:e=>e&&void O.refresh(),children:[(0,I.jsx)(Fi,{asChild:!0,children:(0,I.jsxs)(`button`,{"data-hand":!0,className:`flex min-w-0 items-center gap-1.5 rounded-[8px] py-1 pl-1.5 pr-1 text-start hover:bg-hover`,"data-app-switcher":!0,children:[(0,I.jsx)(me,{tone:t?`ok`:`off`}),(0,I.jsx)(`span`,{className:`truncate text-[13px] font-medium text-fg`,children:i?.name??(e?`No app open`:`Connecting…`)}),i&&i.envs.length>1&&(0,I.jsx)(`span`,{className:`shrink-0 rounded-[5px] bg-active px-1.5 text-[10.5px] font-medium text-fg-2`,children:i.env.label}),(0,I.jsx)(`span`,{className:`hidden max-w-[220px] truncate font-mono text-[11.5px] text-fg-3 md:inline`,children:Oe(o)}),(0,I.jsx)(fe,{className:`size-3.5 shrink-0 text-fg-3`})]})}),(0,I.jsx)(Ii,{children:(0,I.jsxs)(Ri,{align:`start`,sideOffset:6,className:`z-[60] w-[300px] rounded-[10px] bg-raised p-1 shadow-pop`,children:[i&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`px-2 pb-1 pt-1.5 text-[11px] font-medium uppercase tracking-[0.05em] text-fg-3`,children:i.name}),i.envs.map(e=>(0,I.jsxs)(mp,{icon:e.kind===`local`?(0,I.jsx)(_c,{}):(0,I.jsx)($c,{}),onSelect:()=>void O.open(i.id,e.id),checked:e.id===i.env.id,children:[(0,I.jsx)(`span`,{className:`w-[72px] shrink-0`,children:e.label}),(0,I.jsx)(`span`,{className:`truncate font-mono text-[11px] text-fg-3`,children:Oe(e.url)})]},e.id)),(0,I.jsx)(Hi,{className:`my-1 h-px bg-line`})]}),a.length>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`px-2 pb-1 pt-1.5 text-[11px] font-medium uppercase tracking-[0.05em] text-fg-3`,children:`Switch to`}),a.map(e=>(0,I.jsx)(mp,{icon:(0,I.jsx)($,{app:e,className:`size-[18px] rounded-[5px] p-0 text-[9px]`}),onSelect:()=>void O.open(e.id),children:(0,I.jsx)(`span`,{className:`truncate`,children:e.name})},e.id)),(0,I.jsx)(Hi,{className:`my-1 h-px bg-line`})]}),(0,I.jsx)(mp,{icon:(0,I.jsx)(_l,{}),onSelect:()=>O.show(),children:`All apps`}),(0,I.jsx)(mp,{icon:(0,I.jsx)(oe,{}),onSelect:()=>O.show(`folder`),children:`Link an app…`}),i&&(0,I.jsxs)(mp,{icon:(0,I.jsx)(bl,{}),onSelect:()=>void O.close(),children:[`Close `,i.name]})]})})]})}function mp({icon:e,children:t,onSelect:n,checked:r}){return(0,I.jsxs)(zi,{onSelect:n,className:i(`flex h-8 cursor-default items-center gap-2 rounded-[7px] px-2 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover [&>svg]:size-[14px] [&>svg]:shrink-0 [&>svg]:text-fg-3`),children:[e,(0,I.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:t}),r&&(0,I.jsx)(dt,{className:`size-3.5 text-human`})]})}var hp={fill:{label:`Fit to window`,size:null,icon:(0,I.jsx)(Il,{})},desktop:{label:`Desktop · 1280`,size:[1280,800],icon:(0,I.jsx)(pl,{})},tablet:{label:`Tablet · 820`,size:[820,1180],icon:(0,I.jsx)(hu,{})},mobile:{label:`Phone · 390`,size:[390,844],icon:(0,I.jsx)(su,{})}};function gp({on:e}){return(0,I.jsx)(`span`,{className:`relative inline-flex size-[13px] items-center justify-center`,children:(0,I.jsx)(`span`,{className:i(`size-[9px] rounded-full`,e?`bg-bad`:`bg-current`),style:e?{animation:`rec-pulse 1.4s ease-in-out infinite`}:void 0})})}var _p={edit:`Edit`,use:`Use`,record:`Write test`};function vp(){let e=bt(),t=D(e=>e.mode),n=D(e=>e.status),r=N(e=>e.ui.panelOpen),i=N(e=>e.setUi);return(0,I.jsxs)(`header`,{className:`relative z-20 flex h-[46px] shrink-0 items-center gap-2 border-b border-line bg-panel pl-3 pr-2`,children:[(0,I.jsx)(`h1`,{className:`sr-only`,children:n?.app?`${Sd.name} · ${n.app.name}`:Sd.name}),(0,I.jsxs)(`div`,{className:`flex min-w-0 flex-1 basis-0 items-center gap-2.5`,children:[(0,I.jsx)(Nf,{className:`size-[22px] shrink-0`}),(0,I.jsx)(`span`,{className:`hidden text-[13px] font-semibold tracking-[-0.01em] text-fg min-[1180px]:inline`,children:Sd.name}),(0,I.jsx)(`span`,{className:`mx-1 hidden h-4 w-px bg-line-strong min-[1180px]:block`}),(0,I.jsxs)(`div`,{className:`flex min-w-0 items-center gap-0.5`,children:[(0,I.jsx)(pp,{}),n?.app&&(0,I.jsx)(pd,{label:`Reload the app`,children:(0,I.jsx)(yt,{size:`sm`,onClick:()=>A.reloadApp(),"aria-label":`Reload the app`,children:(0,I.jsx)(Ql,{})})})]})]}),(0,I.jsx)(`div`,{className:`shrink-0`,"data-mode-switcher":!0,children:(0,I.jsx)(md,{value:t,onChange:e=>A.setMode(e),collapse:!0,options:[{value:`edit`,label:_p.edit,icon:(0,I.jsx)(lu,{}),tip:`Edit: point at things and change them`,kbd:`E`},{value:`use`,label:_p.use,icon:(0,I.jsx)(Bl,{}),tip:`Use: click through your app as usual`,kbd:`U`},{value:`record`,label:_p.record,icon:(0,I.jsx)(gp,{on:t===`record`}),tip:`Write test: use your app, say what it should show, get a Playwright test`,kbd:`R`}]})}),(0,I.jsxs)(`div`,{className:`flex flex-1 basis-0 items-center justify-end gap-1`,children:[(0,I.jsx)(Bf,{}),(0,I.jsx)(`span`,{className:`mx-1 h-4 w-px bg-line-strong`}),(0,I.jsx)(wp,{}),(0,I.jsx)(`span`,{className:`mx-1 h-4 w-px bg-line-strong`}),e&&(0,I.jsx)(bp,{}),(0,I.jsx)(xp,{}),(0,I.jsx)(Sp,{}),(0,I.jsx)(`span`,{className:`mx-1 h-4 w-px bg-line-strong`}),(0,I.jsx)(pd,{label:`Command palette: every action, by name`,kbd:Ve(`mod+k`),children:(0,I.jsx)(yt,{onClick:()=>Ue({overlay:`palette`}),"aria-label":`Command palette`,"data-tour":`palette`,children:(0,I.jsx)(iu,{})})}),(0,I.jsx)(pd,{label:e?`Gestures, phrases and shortcuts`:`Phrases and shortcuts`,kbd:`?`,children:(0,I.jsx)(yt,{onClick:()=>Ue({overlay:`help`}),"aria-label":`Help`,"data-tour":`help`,children:(0,I.jsx)(pc,{})})}),(0,I.jsx)(pd,{label:`Settings`,children:(0,I.jsx)(yt,{onClick:()=>Ue({overlay:`settings`,settingsTab:`general`}),"aria-label":`Settings`,children:(0,I.jsx)(au,{})})}),(0,I.jsx)(pd,{label:r?`Hide panel`:`Show panel`,kbd:`\\`,children:(0,I.jsx)(yt,{active:r,onClick:()=>i({panelOpen:!r}),"aria-label":`Toggle panel`,children:(0,I.jsx)(Hl,{})})})]})]})}function yp({children:e,onClick:t,label:n,tone:r,...a}){return(0,I.jsx)(pd,{label:n,children:(0,I.jsx)(`button`,{"data-hand":!0,...a,onClick:t,className:i(`inline-flex h-7 items-center gap-1.5 rounded-[7px] px-2 text-[12px] font-medium text-fg-2 transition-colors hover:bg-hover hover:text-fg [&_svg]:size-[14px]`,r===`warn`&&`text-warn hover:text-warn`,r===`bad`&&`text-bad hover:text-bad`,r===`human`&&`text-human-fg hover:text-human-fg`),children:e})})}function bp(){let e=D(e=>e.camera),t=D(e=>e.hand.present),n=N(e=>e.onboarded),r=()=>{e.status===`on`?A.stopCamera():n?A.startCamera():Ue({overlay:`onboarding`})};return e.status===`starting`?(0,I.jsxs)(yp,{onClick:()=>void 0,label:`Starting the camera and hand tracking`,children:[(0,I.jsx)(T,{className:`size-3`}),` Hand`]}):e.status===`error`?(0,I.jsxs)(yp,{onClick:r,label:e.error??`Camera error`,tone:`bad`,children:[(0,I.jsx)(rc,{}),` Camera`]}):e.status===`on`?(0,I.jsxs)(yp,{onClick:r,label:`Hand tracking on · ${e.fps} fps · ${e.delegate??``} (C to turn off)`,children:[(0,I.jsx)(me,{tone:t?`human`:`ok`,pulse:t}),` Hand`]}):(0,I.jsxs)(yp,{onClick:r,label:`Turn on hand control (C)`,children:[(0,I.jsx)(rc,{}),` Hand`]})}function xp(){let e=D(e=>e.voice);if(!e.supported)return(0,I.jsxs)(yp,{onClick:()=>Ue({overlay:`settings`,settingsTab:`voice`}),label:`Voice isn’t available with these settings in this browser`,tone:`warn`,children:[(0,I.jsx)(El,{}),` Voice`]});let t=e.state===`starting`||e.state===`listening`;return(0,I.jsxs)(yp,{onClick:()=>A.toggleTalk(),label:t?`Listening… (Space or pause to send)`:`Talk: hold Space, or tap it for hands-free`,tone:t?`human`:void 0,children:[t?(0,I.jsx)(me,{tone:`human`,pulse:!0}):(0,I.jsx)(Ol,{}),` Voice`]})}function Sp(){let e=D(e=>e.status?.ai);if(!e)return null;if(!e.ready)return(0,I.jsxs)(yp,{onClick:()=>Ue({overlay:`settings`,settingsTab:`ai`}),label:`No AI connected. Quick edits (size, variant, text, move, remove) are free and work offline. Connect your Claude, ChatGPT or Gemini plan, an API key, or a model on this computer for the rest.`,tone:`warn`,"data-tour":`ai`,children:[(0,I.jsx)(me,{tone:`warn`}),` No AI `,(0,I.jsx)(`span`,{className:`hidden text-fg-3 xl:inline`,children:`· quick edits are free`})]});let t=e.usage,n=e.source===`fake`?`AI (test)`:Cp(e.who),r=e.who?.connection===`ollama`||e.who?.connection===`lmstudio`,i=e.who?.plan?t.planUsd>=.005?`${ht(t.planUsd)} of plan use`:`no extra bill`:r?`free`:`${ht(t.usd)} today`,a=t.calls?` · Today: ${t.usd>=.005?`${ht(t.usd)}, `:``}${Pt(t.tokens)} tokens in ${t.calls} call${t.calls===1?``:`s`}${t.planUsd>=.01?` (plan use worth ${ht(t.planUsd)} at API prices; no extra bill)`:``}`:` · Nothing used today`;return(0,I.jsxs)(yp,{onClick:()=>Ue({overlay:`settings`,settingsTab:t.calls||t.level!==`ok`?`usage`:`ai`}),label:`${e.who?`${e.who.label} · ${e.who.model}`:`AI`} · ${e.effort} effort${a}${t.message?` · ${t.message}`:``}`,tone:t.level===`over`?`bad`:t.level===`warn`?`warn`:void 0,"data-tour":`ai`,children:[(0,I.jsx)(me,{tone:t.level===`ok`?`ai`:t.level===`warn`?`warn`:`bad`}),` `,n,(0,I.jsxs)(`span`,{"data-usage-today":!0,className:`tabular-nums text-fg-3`,children:[`· `,i]})]})}function Cp(e){return e?e.plan?e.connection===`claude-code`?`Claude plan`:e.connection===`codex`?`ChatGPT plan`:`Gemini`:e.model.replace(/^Claude /,``):`AI`}function wp(){let e=N(e=>e.ui.device),t=N(e=>e.setUi),n=hp[e];return(0,I.jsxs)(Ni,{children:[(0,I.jsx)(pd,{label:`Viewport size`,children:(0,I.jsx)(Fi,{asChild:!0,children:(0,I.jsxs)(`button`,{"data-hand":!0,className:`inline-flex h-7 items-center gap-1 rounded-[7px] px-2 text-fg-2 hover:bg-hover hover:text-fg [&_svg]:size-[14px]`,"aria-label":`Viewport size`,children:[n.icon,(0,I.jsx)(fe,{className:`!size-3 text-fg-3`})]})})}),(0,I.jsx)(Ii,{children:(0,I.jsx)(Ri,{align:`end`,sideOffset:6,className:`z-[80] min-w-[200px] rounded-[10px] bg-raised p-1 shadow-pop`,children:(0,I.jsx)(Bi,{value:e,onValueChange:e=>t({device:e}),children:Object.keys(hp).map(e=>(0,I.jsxs)(Vi,{value:e,"data-hand":!0,className:`flex cursor-default items-center gap-2.5 rounded-[6px] px-2 py-1.5 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover data-[state=checked]:text-human-fg [&_svg]:size-[14px] [&_svg]:text-fg-3`,children:[hp[e].icon,hp[e].label]},e))})})})]})}var Tp=64,Ep=104;function Dp(){let e=bt(),t=D(e=>e.status),n=D(e=>e.statusError),r=D(e=>e.app.connected),a=D(e=>e.app.outdated),o=D(e=>e.app.reloadKey),s=D(e=>e.mode),c=D(e=>!!e.replay),l=N(e=>e.ui.device),u=(0,F.useRef)(null),d=(0,F.useRef)(null),[f,p]=(0,F.useState)({w:0,h:0}),[m,h]=(0,F.useState)(!1),g=t?.target.frameUrl||void 0;(0,F.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let t=new ResizeObserver(([e])=>p({w:e.contentRect.width,h:e.contentRect.height}));return t.observe(e),()=>t.disconnect()},[]);let _=Math.max(200,f.w-56),v=Math.max(200,f.h-Tp-Ep),y=hp[l].size,b=y?Math.min(1,_/y[0],v/y[1]):1,ee=y?y[0]:_,x=y?y[1]:v,S=f.w>0;(0,F.useEffect)(()=>A.setScale(b),[b]),(0,F.useEffect)(()=>{if(S)return A.attachFrame(d.current,g),()=>A.attachFrame(null)},[g,o,S]);let[C,te]=(0,F.useState)(!0);return(0,F.useEffect)(()=>{if(h(!1),r){te(!1);return}let e=setTimeout(()=>te(!0),350),t=setTimeout(()=>h(!0),6e3);return()=>{clearTimeout(e),clearTimeout(t)}},[r,g,o]),(0,I.jsxs)(`main`,{ref:u,className:`canvas-grid relative min-w-0 flex-1 overflow-hidden`,"data-stage":!0,children:[f.w>0&&(0,I.jsx)(`div`,{className:`absolute left-1/2 -translate-x-1/2`,style:{top:Tp,width:ee*b,height:x*b},children:(0,I.jsxs)(`div`,{className:`relative overflow-hidden rounded-[10px] bg-white shadow-frame`,style:{width:ee,height:x,transform:b===1?void 0:`scale(${b})`,transformOrigin:`0 0`},"data-tour":`frame`,children:[g&&(0,I.jsx)(`iframe`,{ref:d,src:g,title:`Your app`,className:`absolute inset-0 size-full border-0 bg-white`,onLoad:()=>A.frameLoaded()},o),(0,I.jsx)(kp,{active:s===`edit`&&!c}),(0,I.jsx)(Mf,{scale:b,width:ee,height:x}),c&&(0,I.jsx)(`div`,{className:`absolute inset-0 z-[15] cursor-progress`,"data-replay-shield":!0}),(0,I.jsx)(`div`,{className:i(`absolute inset-0 z-20 flex items-center justify-center bg-canvas/80 backdrop-blur-sm transition-opacity duration-300`,C?`opacity-100`:`pointer-events-none opacity-0`),"aria-hidden":!C,children:C&&(0,I.jsx)(Op,{app:t?.app??null,loaded:!!t,url:g,slow:m,error:n,outdated:a})})]})}),(0,I.jsx)(tf,{}),(0,I.jsx)($d,{}),e&&(0,I.jsx)(qd,{})]})}function Op({app:e,loaded:t,url:n,slow:r,error:i,outdated:a}){if(a)return(0,I.jsxs)(`div`,{className:`max-w-[380px] text-center`,"data-outdated":a,children:[(0,I.jsx)(Jl,{className:`mx-auto mb-3 size-6 text-warn`}),(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:a===`plugin`?`This app’s Saywright plugin needs an update`:`This studio is older than the app’s Saywright plugin`}),(0,I.jsx)(`div`,{className:`mt-1.5 text-[12.5px] leading-relaxed text-fg-3`,children:a===`plugin`?(0,I.jsxs)(I.Fragment,{children:[`In the app’s folder, run `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:`npm i -D @saywright/vite@latest`}),`, then restart its dev server.`]}):(0,I.jsxs)(I.Fragment,{children:[`Update Saywright: stop it and start it again with `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:`npx @saywright/studio@latest`}),`.`]})})]});if(i)return(0,I.jsxs)(`div`,{className:`max-w-[340px] text-center`,children:[(0,I.jsx)(Jl,{className:`mx-auto mb-3 size-6 text-warn`}),(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:`The studio server isn’t responding`}),(0,I.jsx)(`div`,{className:`mt-1 text-[12.5px] text-fg-3`,children:`Check that Saywright is still running in the terminal you started it from.`})]});if(t&&!e)return(0,I.jsxs)(`div`,{className:`max-w-[360px] text-center`,"data-no-app":!0,children:[(0,I.jsx)(Us,{className:`mx-auto mb-3 size-6 text-fg-3`}),(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:`No app open`}),(0,I.jsx)(`div`,{className:`mt-1 text-[12.5px] text-fg-3`,children:`Open one of your apps, or link a new one.`}),(0,I.jsxs)(`div`,{className:`mt-3 flex justify-center gap-2`,children:[(0,I.jsx)(P,{variant:`primary`,onClick:()=>O.show(),children:`Open an app`}),(0,I.jsx)(P,{onClick:()=>void O.sample(),children:`Try the sample shop`})]})]});let o=e?.env.url||n;return(0,I.jsxs)(`div`,{className:`max-w-[360px] text-center`,children:[(0,I.jsx)(T,{className:`mx-auto mb-3 size-5 text-fg-3`}),(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:e?`Connecting to ${e.name}…`:`Connecting to your app…`}),r&&o&&(0,I.jsxs)(`div`,{className:`mt-1.5 text-[12.5px] leading-relaxed text-fg-3`,children:[`Still waiting for `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:o}),`. Check that it is running`,e?.env.connection===`plugin`?(0,I.jsxs)(I.Fragment,{children:[` `,`and that its Vite config includes the `,(0,I.jsx)(`span`,{className:`font-mono text-fg-2`,children:`saywright()`}),` plugin`]}):null,`.`]})]})}function kp({active:e}){let[t,n]=(0,F.useState)(null);return(0,I.jsxs)(gi,{onOpenChange:e=>!e&&n(null),children:[(0,I.jsx)(vi,{asChild:!0,disabled:!e,children:(0,I.jsx)(`div`,{ref:e=>A.attachOverlay(e),className:e?`absolute inset-0`:`pointer-events-none absolute inset-0`,onPointerMove:e=>A.mouseMove(e.clientX,e.clientY,e.altKey),onPointerLeave:()=>A.mouseLeave(),onClick:e=>void A.mouseClick(e.clientX,e.clientY,e.shiftKey,e.altKey,e.detail),onWheel:e=>A.wheel(e.deltaX,e.deltaY),onContextMenu:()=>n(Qe().hover)})}),(0,I.jsx)(yi,{children:(0,I.jsx)(xi,{className:`z-[80] min-w-[220px] rounded-[10px] bg-raised p-1 shadow-pop`,children:t?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`truncate px-2 pb-1.5 pt-1 text-[11.5px] text-fg-3`,children:t.label}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(nu,{}),onSelect:()=>A.select(t),children:`Select`}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(du,{}),onSelect:()=>A.toggleSelected(t),hint:Ve(`shift+Click`),children:vt(Qe()).some(e=>e.id===t.id)?`Take out of the selection`:`Add to the selection`}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(Ys,{}),onSelect:async()=>{let e=await A.bridge.step(t.id,`parent`);e&&A.select(e)},children:`Select what contains it`}),(0,I.jsx)(Ci,{className:`my-1 h-px bg-line`}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(wl,{}),onSelect:()=>{A.select(t),Ue({focusInput:Qe().focusInput+1})},children:`Ask about this…`}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(_c,{}),onSelect:()=>void A.openInEditor(t),hint:`O`,children:`Open in editor`}),(0,I.jsx)(Ap,{icon:(0,I.jsx)(xc,{}),onSelect:()=>void A.copyLocator(t),children:`Copy Playwright locator`})]}):(0,I.jsx)(`div`,{className:`px-2 py-1.5 text-[12px] text-fg-3`,children:`Nothing under the pointer`})})})]})}function Ap({icon:e,children:t,onSelect:n,hint:r}){return(0,I.jsxs)(Si,{"data-hand":!0,onSelect:n,className:`flex cursor-default items-center gap-2.5 rounded-[6px] px-2 py-1.5 text-[12.5px] text-fg outline-none data-[highlighted]:bg-hover [&_svg]:size-[14px] [&_svg]:text-fg-3`,children:[e,(0,I.jsx)(`span`,{className:`flex-1`,children:t}),r&&(0,I.jsx)(`span`,{className:`font-mono text-[11px] text-fg-3`,children:r})]})}function jp({value:e,onChange:t,min:n=0,max:r=1,step:i=.01,label:a}){return(0,I.jsxs)(Aa,{className:`relative flex h-5 w-full touch-none select-none items-center`,value:[e],min:n,max:r,step:i,onValueChange:e=>t(e[0]),"aria-label":a,children:[(0,I.jsx)(La,{className:`relative h-[4px] grow overflow-hidden rounded-full bg-active`,children:(0,I.jsx)(za,{className:`absolute h-full rounded-full bg-human`})}),(0,I.jsx)(Ka,{"data-hand":!0,className:`block size-[14px] rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,.15),0_1px_3px_rgba(0,0,0,.35)] outline-none transition-shadow focus-visible:shadow-[0_0_0_4px_var(--human-soft)]`})]})}function Mp(e){return e?[`point`,`say`,`keep`,`changes`,`ai`,`more`,`done`]:[`point`,`ai`,`more`,`done`]}function Np(e){return{selected:e.selection?.id??null,previews:e.changes.filter(e=>e.status===`preview`).map(e=>e.id),decided:e.changes.filter(e=>e.status!==`preview`).length}}function Pp(e,t,n){return e===`point`?n.selected!==null&&n.selected!==t.selected:e===`say`?n.previews.some(e=>!t.previews.includes(e)):e===`keep`&&n.decided>t.decided}var Fp={"claude-code":`Claude`,codex:`ChatGPT`,"gemini-cli":`Gemini`,gemini:`Gemini`},Ip=new Set([`ollama`,`lmstudio`]);function Lp(e){let t=e?.who;return e?.source===`fake`?`Anything bigger goes to the test stand-in, which costs nothing.`:t?t.plan?`Anything bigger goes to ${Fp[t.connection]??t.label} on your plan, with no extra bill. What it used today shows here.`:Ip.has(t.connection)?`Anything bigger goes to ${t.model}, on this computer: free.`:`Anything bigger goes to ${t.model} on your API key, paid per request. Today’s spend shows here; set a budget in Settings.`:`Anything bigger goes to your AI.`}function Rp(e,t){let n=t.mac?`Return`:`Enter`;switch(e){case`point`:{let e=t.hasCode?` and the file and line it comes from`:``;return t.editing?{title:`Point at something`,body:`This is your app, running live. Click anything in it${t.sample?`, like the Pay button`:`: a button, a heading, a price`}. The tag shows what it is${e}.`}:{title:`Point at something`,body:`This is your app, running live. Press E for Edit mode, then click anything in it. The tag shows what it is${e}.`}}case`say`:return{title:`Say what to change`,body:`${t.mic?`Hold Space and say it, or type it here and press ${n}`:`Type it here and press ${n}`}: “make it smaller”, “rename to Place order”. Keys 1 to 4 run a suggestion.`};case`keep`:return{title:`Keep it or undo it`,body:`${t.waiting?`This is a live preview: your file and your app have already changed.`:`Each change arrives as a live preview: your file and your app change at once.`} ${n} keeps it, ${Ve(`mod+z`,t.mac)} puts both back.`};case`changes`:return{title:`See the code`,body:`Every change is listed here with its diff and its file. Nothing is committed unless you turn that on in Settings.`};case`ai`:return t.ai?.ready?{title:`Your AI`,body:`Quick edits stay instant and free. ${Lp(t.ai)}`}:{title:`Bigger changes need an AI`,body:`Size, variant, text, move and remove are quick edits: instant, free and offline. For anything else, connect the AI you already pay for, or an API key with a budget.`};case`more`:return{title:`Test and review`,body:`Record session: use your app and talk, then get a report with evidence. ${t.ai?.ready?`In the panel, Autopilot lets the AI try your app like a tester, and Experts review the page for SEO, content, UX and accessibility.`:`In the panel, Experts review the page for SEO, content, UX and accessibility; with an AI connected, Autopilot tries your app like a tester.`}${t.hasCode?``:` Link the app’s folder to fix what they find.`}`};case`done`:return{title:`You’re set`,body:`Press ? for phrases and shortcuts, and ${Ve(`mod+k`,t.mac)} to find any action by name. Take this tour again from Help.`}}}function zp(e){return!e.replay&&!e.autopilot&&e.voice.state===`idle`&&!e.request}var Bp=12,Vp=12,Hp=16,Up=18,Wp=(e,t,n)=>Math.max(t,Math.min(e,Math.max(t,n)));function Gp(e,t,n){return e===`bottom`?n.h-(t.y+t.h):e===`top`?t.y:e===`right`?n.w-(t.x+t.w):t.x}function Kp(e,t,n,r){if(e===`top`||e===`bottom`){let i=Wp(t.x+t.w/2-n.w/2,Vp,r.w-n.w-Vp);return{x:i,y:Wp(e===`bottom`?t.y+t.h+Bp:t.y-Bp-n.h,Vp,r.h-n.h-Vp),side:e,arrow:Wp(t.x+t.w/2-i,Up,n.w-Up)}}let i=Wp(t.y+t.h/2-n.h/2,Vp,r.h-n.h-Vp);return{x:Wp(e===`right`?t.x+t.w+Bp:t.x-Bp-n.w,Vp,r.w-n.w-Vp),y:i,side:e,arrow:Wp(t.y+t.h/2-i,Up,n.h-Up)}}function qp(e,t,n,r){for(let i of r){if(i===`inside`)return{x:Wp(e.x+Hp,Vp,n.w-t.w-Vp),y:Wp(e.y+e.h-t.h-Hp,Vp,n.h-t.h-Vp),side:i,arrow:null};let r=(i===`top`||i===`bottom`?t.h:t.w)+Bp+Vp;if(Gp(i,e,n)>=r)return Kp(i,e,t,n)}return Kp([`bottom`,`top`,`right`,`left`].reduce((t,r)=>Gp(r,e,n)>Gp(t,e,n)?r:t),e,t,n)}var Jp=Le()(()=>({on:!1,step:`point`,from:Np(Qe()),started:0})),Yp=()=>Mp(Qe().status?.target.hasCode??!0),Xp=null;function Zp(){Xp?.(),Xp=D.subscribe(e=>{let t=Jp.getState();t.on&&Pp(t.step,t.from,Np(e))&&$p.next()})}function Qp(){N.getState().set({onboarded:!0});let e=Qe().status;e&&Ue({status:{...e,tourSeen:!0}}),ze.put(`/tour`,{seen:!0}).catch(()=>void 0)}var $p={start(){Jp.setState(e=>({on:!0,step:Yp()[0],from:Np(Qe()),started:e.started+1})),Zp()},next(){let e=Jp.getState();if(!e.on)return;let t=Yp(),n=t[t.indexOf(e.step)+1];if(!n)return $p.end();Jp.setState({step:n,from:Np(Qe())})},end(){Jp.getState().on&&(Xp?.(),Xp=null,Jp.setState({on:!1}),Qp())}},em=[`How it works`,`Camera`,`Reach`,`Pinch`,`Talk or type`],tm=e=>em.map((e,t)=>({name:e,i:t})).filter(t=>e||t.i!==1&&t.i!==2&&t.i!==3);function nm(){let e=D(e=>e.overlay===`onboarding`),t=D(e=>e.onboardingStep),n=bt(),r=tm(n),a=e=>Ue({onboardingStep:e}),[o,s]=(0,F.useState)(!1),c=()=>Jp.getState().on,l=(e=o)=>{N.getState().set({onboarded:!0}),Ue({overlay:null,onboardingStep:0}),s(!1),e?A.notify(`Hand control is off. Turn it on again in Settings → Labs.`,`info`):c()||A.notify(`You’re set. Point at something in your app and talk.`,`ok`)};return(0,I.jsxs)(_e,{open:e,onOpenChange:e=>{e||l()},title:`Set up ${Sd.name}`,position:`top`,className:`w-[min(600px,calc(100vw-32px))]`,children:[(0,I.jsx)(`div`,{className:`flex items-center gap-1.5 border-b border-line px-5 py-3`,children:r.map(({name:e,i:n},a)=>(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(`span`,{className:i(`flex size-[18px] items-center justify-center rounded-full text-[10.5px] font-semibold`,n<t?`bg-human text-[#1b1203]`:n===t?`bg-fg text-inverse`:`bg-active text-fg-3`),children:n<t?(0,I.jsx)(dt,{className:`size-3`}):a+1}),(0,I.jsx)(`span`,{className:i(`text-[12px]`,n===t?`font-medium text-fg`:`text-fg-3`),children:e}),a<r.length-1&&(0,I.jsx)(`span`,{className:`mx-1 h-px w-4 bg-line-strong`})]},e))}),(0,I.jsx)(Dt,{mode:`wait`,initial:!1,children:(0,I.jsxs)(xt.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},exit:{opacity:0,x:-12},transition:{duration:.16},className:`flex min-h-[340px] flex-col`,children:[t===0&&(0,I.jsx)(om,{handLab:n,onHands:()=>a(1),onSkip:()=>a(4)}),n&&t===1&&(0,I.jsx)(sm,{onNext:()=>a(2),onSkip:()=>{N.getState().setLabs({hand:!1}),s(!0),N.getState().onboarded?l(!0):a(4)}}),n&&t===2&&(0,I.jsx)(cm,{onSkip:()=>a(3)}),n&&t===3&&(0,I.jsx)(um,{onNext:()=>a(4)}),t===4&&(0,I.jsx)(dm,{onDone:()=>l(),onType:()=>{l(),Ue({focusInput:Qe().focusInput+1}),c()||A.notify(`You’re set. Point at something in your app, then type what to change.`,`ok`)}})]},t)})]})}function rm({children:e}){return(0,I.jsx)(`div`,{className:`flex-1 px-6 pb-2 pt-5`,children:e})}function im({children:e,left:t}){return(0,I.jsxs)(`div`,{className:`mt-4 flex shrink-0 items-center justify-between border-t border-line px-5 py-3`,children:[(0,I.jsx)(`div`,{children:t}),(0,I.jsx)(`div`,{className:`flex gap-2`,children:e})]})}function am({icon:e,title:t,children:n}){return(0,I.jsxs)(`div`,{className:`flex gap-3`,children:[(0,I.jsx)(`span`,{className:`flex size-8 shrink-0 items-center justify-center rounded-[8px] bg-sunken text-fg-2 ring-1 ring-inset ring-line [&_svg]:size-[16px]`,children:e}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:t}),(0,I.jsx)(`div`,{className:`text-[12.5px] leading-relaxed text-fg-3`,children:n})]})]})}function om({handLab:e,onHands:t,onSkip:n}){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(rm,{children:[(0,I.jsx)(Nf,{className:`mb-4 size-10`}),(0,I.jsx)(`h2`,{className:`text-[20px] font-semibold tracking-[-0.02em] text-fg`,children:`Point at your app. Say what to change.`}),(0,I.jsxs)(`p`,{className:`mt-1.5 text-[13px] leading-relaxed text-fg-3`,children:[Sd.name,` turns pointing and talking into code changes you can see right away, keep, or undo.`]}),(0,I.jsxs)(`div`,{className:`mt-5 space-y-3.5`,children:[(0,I.jsxs)(am,{icon:(0,I.jsx)(Rl,{}),title:`“This” is whatever you point at`,children:[`Point while you talk or type: “make `,(0,I.jsx)(`b`,{className:`font-medium text-human-fg`,children:`this`}),` look like `,(0,I.jsx)(`b`,{className:`font-medium text-human-fg`,children:`that`}),`”.`]}),(0,I.jsxs)(am,{icon:(0,I.jsx)(Zc,{}),title:`Every change is a live preview`,children:[`It lands in your code and your app at once. `,(0,I.jsx)(dd,{children:Ve(`enter`)}),` keeps it,`,` `,Mt(`mod+z`).map(e=>(0,I.jsx)(dd,{className:`me-0.5`,children:e},e)),` `,`undoes it.`]}),(0,I.jsx)(am,{icon:(0,I.jsx)(ae,{}),title:`Simple edits are instant, AI does the rest`,children:`Size, variant, text, move and remove run offline in milliseconds. Bigger asks go to the AI you connect: your Claude, ChatGPT or Gemini plan, an API key, or a model on this computer.`}),(0,I.jsx)(am,{icon:(0,I.jsx)(vl,{}),title:`What leaves your computer`,children:(0,I.jsx)(Lf,{className:`text-[12.5px]`})})]})]}),(0,I.jsx)(im,{left:e?(0,I.jsx)(`button`,{"data-hand":!0,onClick:n,className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`Skip, I’ll use the mouse`}):null,children:e?(0,I.jsx)(P,{variant:`primary`,size:`md`,icon:(0,I.jsx)(al,{}),onClick:t,children:`Set up hand control`}):(0,I.jsx)(P,{variant:`primary`,size:`md`,onClick:n,children:`Continue`})})]})}function sm({onNext:e,onSkip:t}){let n=D(e=>e.camera),r=D(e=>e.hand.present);return(0,F.useEffect)(()=>{Qe().camera.status!==`on`&&A.startCamera()},[]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(rm,{children:[(0,I.jsx)(`h2`,{className:`text-[17px] font-semibold text-fg`,children:`Show your hand to the camera`}),(0,I.jsx)(`p`,{className:`mt-1 text-[12.5px] leading-relaxed text-fg-3`,children:`Allow camera access when your browser asks. Sit about an arm’s length away, with your hand in front of your chest.`}),(0,I.jsxs)(`div`,{className:`relative mt-4 aspect-[4/3] w-full overflow-hidden rounded-[12px] ring-1 ring-line`,children:[(0,I.jsx)(zd,{className:`absolute inset-0`,box:!1}),n.status!==`on`&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 bg-sunken text-[12.5px] text-fg-3`,children:n.status===`error`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Nc,{className:`size-5 text-bad`}),(0,I.jsx)(`span`,{className:`max-w-[360px] text-center text-fg-2`,children:n.error}),(0,I.jsx)(P,{size:`sm`,onClick:()=>void A.startCamera(),children:`Try again`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(T,{className:`size-5`}),`Starting the camera and the hand model…`]})}),n.status===`on`&&(0,I.jsx)(`div`,{className:i(`absolute bottom-3 left-1/2 flex -translate-x-1/2 items-center gap-2 rounded-full px-3 py-1.5 text-[12.5px] font-medium backdrop-blur`,r?`bg-human text-[#1b1203]`:`bg-black/60 text-white`),children:r?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(dt,{className:`size-4`}),` Hand found`]}):(0,I.jsx)(I.Fragment,{children:`Raise one hand, palm towards the screen`})})]})]}),(0,I.jsx)(im,{left:(0,I.jsx)(`button`,{"data-hand":!0,onClick:t,className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`Skip hand control`}),children:(0,I.jsx)(P,{variant:`primary`,size:`md`,disabled:n.status!==`on`,onClick:e,children:`Continue`})})]})}function cm({onSkip:e}){return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(rm,{children:[(0,I.jsx)(`h2`,{className:`text-[17px] font-semibold text-fg`,children:`Map your reach to the screen`}),(0,I.jsx)(`p`,{className:`mt-1 text-[12.5px] leading-relaxed text-fg-3`,children:`You’ll point at four targets near the corners. Small, relaxed movements will then cover the whole screen, so your arm doesn’t get tired.`}),(0,I.jsx)(`div`,{className:`mt-5 grid grid-cols-3 gap-3`,children:[[`Point`,`with your index finger, where it feels natural`,(0,I.jsx)(Id,{},`p`)],[`Hold still`,`for a moment, or pinch, to capture each corner`,(0,I.jsx)(Ld,{},`q`)],[`Four corners`,`top left, top right, bottom right, bottom left`,(0,I.jsx)(al,{},`h`)]].map(([e,t,n])=>(0,I.jsxs)(`div`,{className:`rounded-[10px] bg-sunken p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsx)(`span`,{className:`text-human-fg [&_svg]:size-5`,children:n}),(0,I.jsx)(`div`,{className:`mt-2 text-[12.5px] font-medium text-fg`,children:e}),(0,I.jsx)(`div`,{className:`text-[12px] leading-snug text-fg-3`,children:t})]},e))})]}),(0,I.jsx)(im,{left:(0,I.jsx)(`button`,{"data-hand":!0,onClick:e,className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`Use the default reach`}),children:(0,I.jsx)(P,{variant:`primary`,size:`md`,onClick:()=>Ue({overlay:`calibrate`,calibrateReturn:`onboarding`}),children:`Start calibration`})})]})}function lm(){let e=(0,F.useRef)(null);return(0,F.useEffect)(()=>{let t=0,n=()=>{let r=A.engine.state;e.current&&(e.current.style.width=`${(r.present?r.pinchAmount:0)*100}%`,e.current.style.background=r.pinching?`var(--human)`:`var(--fg-3)`),t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>cancelAnimationFrame(t)},[]),(0,I.jsx)(`div`,{className:`relative h-2 overflow-hidden rounded-full bg-active`,children:(0,I.jsx)(`div`,{ref:e,className:`absolute inset-y-0 left-0 rounded-full transition-[background] duration-100`})})}function um({onNext:e}){let[t,n]=(0,F.useState)([!1,!1,!1]),r=N(e=>e.engine.pinchOn),a=N(e=>e.setEngine),o=t.every(Boolean);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(rm,{children:[(0,I.jsx)(`h2`,{className:`text-[17px] font-semibold text-fg`,children:`Pinch the three targets`}),(0,I.jsx)(`p`,{className:`mt-1 text-[12.5px] leading-relaxed text-fg-3`,children:`Point at a target and tap your thumb and index finger together. The click lands where you were pointing just before the pinch, so a little wobble is fine.`}),(0,I.jsx)(`div`,{className:`mt-5 flex justify-center gap-6`,children:t.map((e,t)=>(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>n(e=>e.map((e,n)=>n===t||e)),className:i(`flex size-[86px] items-center justify-center rounded-[18px] text-[13px] font-medium transition-all duration-200`,e?`bg-human text-[#1b1203]`:`bg-sunken text-fg-2 ring-1 ring-inset ring-line-strong hover:text-fg`),children:e?(0,I.jsx)(dt,{className:`size-6`}):`Target ${t+1}`},t))}),(0,I.jsxs)(`div`,{className:`mt-6 space-y-2 rounded-[10px] bg-sunken p-3 ring-1 ring-inset ring-line`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-[12px]`,children:[(0,I.jsx)(`span`,{className:`text-fg-2`,children:`Pinch closeness`}),(0,I.jsx)(`span`,{className:`text-fg-3`,children:`fills up as your fingers close`})]}),(0,I.jsx)(lm,{}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 pt-1`,children:[(0,I.jsx)(`span`,{className:`w-[86px] text-[12px] text-fg-2`,children:`Sensitivity`}),(0,I.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:`Firm`}),(0,I.jsx)(jp,{value:Ot(r),onChange:e=>a(ot(e))}),(0,I.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:`Light`})]})]})]}),(0,I.jsx)(im,{left:(0,I.jsx)(`button`,{"data-hand":!0,onClick:()=>Ue({overlay:`calibrate`,calibrateReturn:`onboarding`,onboardingStep:2}),className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`Recalibrate reach`}),children:(0,I.jsx)(P,{variant:o?`primary`:`secondary`,size:`md`,onClick:e,children:o?`Continue`:`Skip`})})]})}function dm({onDone:e,onType:t}){let n=D(e=>e.voice),r=D(e=>e.camera.status===`on`),[a,o]=(0,F.useState)(null);(0,F.useEffect)(()=>(A.dryRun=e=>o(e),()=>{A.dryRun=null}),[]);let s=n.state===`starting`||n.state===`listening`;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(rm,{children:[(0,I.jsx)(`h2`,{className:`text-[17px] font-semibold text-fg`,children:`Talk to it`}),(0,I.jsxs)(`p`,{className:`mt-1 text-[12.5px] leading-relaxed text-fg-3`,children:[`Hold `,(0,I.jsx)(dd,{children:`Space`}),` and say something, like “make this bigger”, then let go. Rather type? Everything works typed too: press `,(0,I.jsx)(dd,{children:`/`}),` or click the box at the bottom.`,r&&(0,I.jsxs)(I.Fragment,{children:[` `,`Or hold a peace sign `,(0,I.jsx)(Rd,{className:`inline size-4 align-[-3px] text-human-fg`}),` and pause when you’re done.`]})]}),(0,I.jsx)(`div`,{className:i(`mt-5 flex min-h-[110px] flex-col items-center justify-center gap-2 rounded-[12px] p-4 text-center ring-1 ring-inset transition-colors`,s?`bg-human-soft ring-human-line`:a?`bg-ok-soft ring-ok/25`:`bg-sunken ring-line`),children:n.supported?s?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ol,{className:`size-5 text-human-fg`}),(0,I.jsx)(`span`,{className:`text-[15px] text-fg`,children:n.words.join(` `)||`Listening…`})]}):a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(dt,{className:`size-5 text-ok`}),(0,I.jsxs)(`span`,{className:`text-[15px] text-fg`,children:[`“`,a,`”`]}),(0,I.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:`Heard you. In the studio, that would apply to what you point at.`})]}):n.error?(0,I.jsxs)(`span`,{className:`text-[12.5px] text-bad`,children:[n.error,` You can type your requests instead.`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ol,{className:`size-5 text-fg-3`}),(0,I.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:`Waiting for you to talk…`})]}):(0,I.jsx)(`span`,{className:`text-[12.5px] text-fg-2`,children:`Voice isn’t available here (no microphone, or no speech recognition in this browser). Type your requests instead.`})}),(0,I.jsxs)(`p`,{className:`mt-3 text-[12px] text-fg-3`,children:[`Your browser recognises speech`,n.model===`ready`?`, and a speech model on this computer double-checks it`:``,`. Not catching you well? Settings → Voice has a mic test and other options.`]})]}),(0,I.jsx)(im,{left:!a&&(0,I.jsx)(`button`,{"data-hand":!0,onClick:t,className:`text-[12.5px] text-fg-3 hover:text-fg`,"data-skip-voice":!0,children:`Skip, I’ll type`}),children:(0,I.jsx)(P,{variant:`primary`,size:`md`,onClick:e,children:a?`Start building`:`Finish`})})]})}var fm=[`[data-tour="dock"]`,`[data-tour="suggestions"]`];function pm(e,t){switch(e){case`point`:return t?{anchor:[`[data-tour="frame"]`],rings:[],sides:[`inside`]}:{anchor:[`[data-mode-switcher]`],rings:[`[data-mode-switcher]`],sides:[`bottom`]};case`say`:return{anchor:[fm],rings:[fm],sides:[`top`]};case`keep`:return{anchor:[`[data-island="preview"] .glass`,`[data-island] .glass`],rings:[`[data-island="preview"] .glass`],sides:[`bottom`]};case`changes`:return{anchor:[`[data-change]`,`[data-tab="changes"]`],rings:[`[data-tab="changes"]`,`[data-change]`],sides:[`left`,`bottom`]};case`ai`:return{anchor:[`[data-tour="ai"]`],rings:[`[data-tour="ai"]`],sides:[`bottom`]};case`more`:return{anchor:[`[data-tour="record"]`],rings:[`[data-tour="record"]`,[`[data-tab="experts"]`,`[data-tab="sessions"]`]],sides:[`bottom`]};case`done`:return{anchor:[`[data-tour="help"]`],rings:[[`[data-tour="palette"]`,`[data-tour="help"]`]],sides:[`bottom`]}}}function mm(e){if(!e||e.closest(`[aria-hidden="true"]`))return null;let t=e.getBoundingClientRect();return t.width<1||t.height<1||t.right<=0||t.bottom<=0||t.left>=innerWidth||t.top>=innerHeight?null:{x:Math.round(t.x),y:Math.round(t.y),w:Math.round(t.width),h:Math.round(t.height)}}function hm(e){let t=(Array.isArray(e)?e:[e]).map(e=>mm(document.querySelector(e))).filter(e=>!!e);if(!t.length)return null;let n=Math.min(...t.map(e=>e.x)),r=Math.min(...t.map(e=>e.y));return{x:n,y:r,w:Math.max(...t.map(e=>e.x+e.w))-n,h:Math.max(...t.map(e=>e.y+e.h))-r}}function gm(e,t){let[n,r]=(0,F.useState)(null);return(0,F.useEffect)(()=>{if(!e)return r(null);let n=0,i=``,a=()=>{let o=e.anchor.map(hm).find(e=>!!e),s=o?null:hm(`[data-stage]`),c=o??s,l=c?{anchor:c,sides:o?e.sides:[`inside`],rings:e.rings.map(hm).filter(e=>!!e),card:{w:t.current?.offsetWidth??340,h:t.current?.offsetHeight??170},view:{w:innerWidth,h:innerHeight}}:null,u=JSON.stringify(l);u!==i&&(i=u,r(l)),n=requestAnimationFrame(a)};return n=requestAnimationFrame(a),()=>cancelAnimationFrame(n)},[e,t]),n}function _m(){let e=D(e=>e.overlay!==null||!e.status?.app),t=pt(e=>e.launcher||!!e.opening||!!e.pending),n=et(e=>!!e.open);return e||t||n}function vm(){let e=D(e=>!!e.status?.app?.sample),t=D(e=>e.status?.target.hasCode??!0),n=D(e=>e.mode===`edit`),r=D(e=>e.voice.supported),i=D(e=>e.changes.some(e=>e.status===`preview`)),a=D(e=>e.status?.ai??null);return{sample:e,hasCode:t,editing:n,mic:r,waiting:i,mac:De,ai:a}}function ym(){let e=Jp(e=>e.on),t=N(e=>e.onboarded),n=D(e=>!e.status||e.status.tourSeen!==!1),r=D(e=>!!e.status?.app&&e.app.connected),i=_m();(0,F.useEffect)(()=>{if(e||t||n||!r||i||location.pathname.startsWith(`/report/`))return;let a=setTimeout(()=>$p.start(),600);return()=>clearTimeout(a)},[e,t,n,r,i])}function bm(){return ym(),Jp(e=>e.on)?(0,I.jsx)(Cm,{}):null}var xm=e=>e instanceof HTMLElement&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function Sm(){$p.end(),A.notify(`Tour closed. Take it again any time from Help (?).`,`info`)}function Cm(){let e=Jp(e=>e.step),t=Jp(e=>e.started),n=_m(),r=vm(),i=Mp(r.hasCode),a=Math.max(0,i.indexOf(e)),o=a===i.length-1,s=Rp(e,r),c=e===`point`||e===`say`||e===`keep`,l=(0,F.useRef)(null),u=gm(Tm(n?null:pm(e,r.editing)),l),d=u?qp(u.anchor,u.card,u.view,u.sides):null,f=!!d,p=(0,F.useId)();(0,F.useEffect)(()=>{e===`changes`?N.getState().setUi({panelOpen:!0,panelTab:`changes`}):e===`more`&&N.getState().setUi({panelOpen:!0})},[e]);let m=(0,F.useRef)(0);(0,F.useEffect)(()=>{if(!f||n)return;if(m.current!==t){m.current=t,l.current?.focus({preventScroll:!0});return}let e=0,r=performance.now()+1e3,i=()=>{!document.activeElement||document.activeElement===document.body?l.current?.focus({preventScroll:!0}):performance.now()<r&&(e=requestAnimationFrame(i))};return i(),()=>cancelAnimationFrame(e)},[f,n,t]),(0,F.useLayoutEffect)(()=>()=>{l.current?.contains(document.activeElement)&&document.querySelector(`[data-tour="help"]`)?.focus({preventScroll:!0})},[]);let[h,g]=(0,F.useState)(``),_=(0,F.useRef)(null);return(0,F.useEffect)(()=>{_.current===t?g(`Step ${a+1} of ${i.length}: ${s.title}. ${s.body}`):_.current=t},[e,t]),(0,F.useEffect)(()=>{if(n)return;let e=e=>{e.key!==`Escape`||St(e)||it()||(l.current?.contains(document.activeElement)||!xm(e.target)&&zp(Qe()))&&(e.preventDefault(),Sm())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{role:`status`,className:`sr-only`,children:h}),u?.rings.map((e,t)=>(0,I.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none fixed z-[44] rounded-[10px]`,style:{left:e.x-4,top:e.y-4,width:e.w+8,height:e.h+8,boxShadow:`0 0 0 2px var(--human), 0 0 0 6px var(--human-soft)`,animation:`rec-pulse 1.8s ease-in-out infinite`},"data-tour-ring":!0},t)),!n&&(0,I.jsxs)(`div`,{ref:l,role:`dialog`,"aria-labelledby":`${p}-title`,"aria-describedby":`${p}-body`,tabIndex:-1,className:`fixed z-[45] w-[340px] max-w-[calc(100vw-24px)] rounded-[14px] bg-panel p-4 shadow-pop outline-none`,style:{left:d?.x??0,top:d?.y??0,visibility:d?`visible`:`hidden`},onKeyDown:wm,"data-tour-card":e,children:[d&&(0,I.jsx)(Dm,{side:d.side,at:d.arrow}),(0,I.jsxs)(xt.div,{initial:{opacity:0,y:3},animate:{opacity:1,y:0},transition:{duration:.16},children:[(0,I.jsxs)(`div`,{className:`text-[11.5px] font-medium tabular-nums text-fg-3`,children:[a+1,` of `,i.length]}),(0,I.jsx)(`h2`,{id:`${p}-title`,className:`mt-1 text-[14.5px] font-semibold tracking-[-0.01em] text-fg`,children:s.title}),(0,I.jsx)(`p`,{id:`${p}-body`,className:`mt-1 text-[12.5px] leading-relaxed text-fg-2`,children:s.body})]},e),(0,I.jsxs)(`div`,{className:`mt-3.5 flex items-center gap-1.5`,children:[!o&&(0,I.jsx)(P,{variant:`ghost`,onClick:Sm,className:`-ms-2`,"data-tour-skip":!0,children:`Skip tour`}),(0,I.jsx)(`span`,{className:`flex-1`}),e===`say`&&r.mic&&(0,I.jsx)(P,{variant:`ghost`,onClick:()=>Ue({overlay:`onboarding`,onboardingStep:4}),children:`Check your mic`}),e===`ai`&&!r.ai?.ready&&(0,I.jsx)(P,{variant:`secondary`,onClick:()=>{$p.next(),Ue({overlay:`settings`,settingsTab:`ai`})},children:`Connect an AI`}),(0,I.jsx)(P,{variant:c?`secondary`:`primary`,onClick:()=>$p.next(),"data-tour-next":!0,children:o?`Done`:`Next`})]})]})]})}function wm(e){(e.key===`Enter`||e.key===` `)&&e.target instanceof HTMLElement&&e.target.closest(`button`)&&e.stopPropagation()}function Tm(e){let t=(0,F.useRef)({key:``,spec:null}),n=JSON.stringify(e);return t.current.key!==n&&(t.current={key:n,spec:e}),t.current.spec}var Em={bottom:`border-l border-t`,top:`border-b border-r`,left:`border-r border-t`,right:`border-b border-l`};function Dm({side:e,at:t}){if(t===null||e===`inside`)return null;let n=e===`bottom`?{top:-5,left:t-5}:e===`top`?{bottom:-5,left:t-5}:e===`left`?{right:-5,top:t-5}:{left:-5,top:t-5};return(0,I.jsx)(`span`,{"aria-hidden":!0,className:i(`absolute size-2.5 rotate-45 border-line-strong bg-panel`,Em[e]),style:n})}function Om(){let e=(0,F.useRef)(null);return(0,F.useEffect)(()=>{let t=0,n=()=>{let r=Math.min(1,M.client.micLevel),i=e.current?.children;if(i)for(let e=0;e<i.length;e++)i[e].style.height=`${3+Math.max(0,r*13-Math.abs(e-3)*2.2)}px`;t=requestAnimationFrame(n)};return t=requestAnimationFrame(n),()=>cancelAnimationFrame(t)},[]),(0,I.jsx)(`div`,{ref:e,className:`flex h-4 items-center gap-[2px]`,"aria-hidden":!0,children:Array.from({length:7},(e,t)=>(0,I.jsx)(`span`,{className:`block w-[3px] rounded-full bg-ok transition-[height] duration-75`,style:{height:3}},t))})}function km(e){let[t,n]=(0,F.useState)(!1);return(0,F.useEffect)(()=>{if(!e)return;let t=setInterval(()=>n(M.client.voiceStatus().state===`speaking`),150);return()=>clearInterval(t)},[e]),e&&t}function Am({icon:e,label:t,status:n,tone:r,extra:a}){return(0,I.jsxs)(`li`,{className:`flex items-center gap-3 py-2`,"data-check":t,"data-tone":r,children:[(0,I.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center rounded-[8px] bg-active text-fg-2 [&_svg]:size-[15px]`,children:e}),(0,I.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,I.jsx)(`span`,{className:`block text-[12.5px] font-medium text-fg`,children:t}),(0,I.jsx)(`span`,{className:i(`block text-[11.5px] leading-snug`,r===`ok`?`text-ok`:r===`warn`?`text-warn`:r===`bad`?`text-bad`:`text-fg-3`),children:n})]}),a,(0,I.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center [&_svg]:size-[14px]`,children:r===`ok`?(0,I.jsx)(dt,{className:`text-ok`}):r===`wait`?(0,I.jsx)(T,{className:`size-3.5 text-fg-3`}):r===`warn`?(0,I.jsx)(Du,{className:`text-warn`}):(0,I.jsx)(Et,{className:`text-bad`})})]})}function jm({c:e}){let t={opening:[`Opening… allow it if the browser asks`,`wait`],checking:[`Listening…`,`wait`],ok:[km(e.mic===`ok`)?`Hearing you`:`Working. Say something to check`,`ok`],quiet:[`No sound from it: is it muted?`,`warn`],blocked:[`Blocked: allow it from the address bar`,`bad`],failed:[`Couldn’t be opened: is one connected?`,`bad`]},n={ok:[`Sharing this tab`,`ok`],denied:[`Not shared: no video or pictures`,`warn`],unsupported:[`This browser can’t record it`,`warn`]},r={loading:[`Loading…`,`wait`],ok:[`Ready to write down what you say`,`ok`],unavailable:[`Not installed: your voice is kept, not written down yet`,`warn`]};return(0,I.jsxs)(`ul`,{className:`divide-y divide-line`,children:[e.mic!==`off`&&(0,I.jsx)(Am,{icon:(0,I.jsx)(Ol,{}),label:`Microphone`,status:t[e.mic][0],tone:t[e.mic][1],extra:e.mic===`ok`||e.mic===`checking`?(0,I.jsx)(Om,{}):null}),e.speech!==`off`&&(0,I.jsx)(Am,{icon:(0,I.jsx)($s,{}),label:`Speech model`,status:r[e.speech][0],tone:r[e.speech][1]}),e.screen!==`off`&&(0,I.jsx)(Am,{icon:(0,I.jsx)(Pl,{}),label:`Screen`,status:n[e.screen][0],tone:n[e.screen][1]}),(0,I.jsx)(Am,{icon:(0,I.jsx)(Us,{}),label:`Your app`,status:e.app===`ok`?`Connected`:`Connecting…`,tone:e.app===`ok`?`ok`:`wait`})]})}function Mm({c:e}){let t=2*Math.PI*46,n=e.left===0;return(0,I.jsxs)(`div`,{className:`relative mx-auto size-[120px]`,"data-count":e.left,children:[(0,I.jsxs)(`svg`,{viewBox:`0 0 120 120`,className:i(`absolute inset-0 -rotate-90`,n&&`animate-spin [animation-duration:1.4s]`),children:[(0,I.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,strokeWidth:`5`,className:`stroke-active`}),(0,I.jsx)(`circle`,{cx:`60`,cy:`60`,r:46,fill:`none`,strokeWidth:`5`,strokeLinecap:`round`,className:`stroke-bad`,strokeDasharray:n?`${t*.22} ${t}`:t,style:n?void 0:{strokeDashoffset:0,animation:`countdown-ring ${e.total}s linear forwards`}})]}),(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,I.jsx)(Dt,{mode:`popLayout`,children:n?(0,I.jsx)(xt.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},className:`text-fg-2 [&_svg]:size-7`,children:(0,I.jsx)(Ol,{})},`wait`):(0,I.jsx)(xt.span,{initial:{opacity:0,scale:1.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.35,ease:[.2,.9,.25,1]},className:`tabular text-[56px] font-semibold leading-none tracking-[-0.03em] text-fg`,children:e.left},e.left)})})]})}function Nm(){let e=et(e=>e.live.status===`starting`&&!e.live.id?e.live.countdown??null:null),t=!!e,n=le(t);return(0,F.useEffect)(()=>{if(!t)return;let e=e=>{(e.key===`Escape`||e.key===`Enter`)&&(e.preventDefault(),e.stopImmediatePropagation(),e.key===`Escape`?M.cancelStart():M.startNow())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[t]),(0,I.jsx)(Dt,{children:e&&(0,I.jsx)(xt.div,{ref:n,className:`fixed inset-0 z-[75] flex items-center justify-center bg-black/40 backdrop-blur-[3px]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.15}},"data-countdown":!0,children:(0,I.jsxs)(xt.div,{initial:{opacity:0,y:10,scale:.97},animate:{opacity:1,y:0,scale:1},className:`w-[min(380px,calc(100vw-32px))] rounded-[18px] bg-panel p-5 shadow-pop ring-1 ring-inset ring-line`,role:`dialog`,"aria-modal":`true`,"aria-label":`Recording starts soon`,children:[(0,I.jsx)(Mm,{c:e}),(0,I.jsx)(`p`,{className:`mt-3 text-center text-[14px] font-semibold text-fg`,"aria-live":`polite`,children:e.left>0?`Recording starts in a moment`:e.waiting??`Starting…`}),(0,I.jsx)(`p`,{className:`mt-0.5 text-center text-[12px] text-fg-3`,children:e.left>0?`Getting everything ready meanwhile.`:`Recording starts as soon as it is.`}),(0,I.jsx)(`div`,{className:`mt-3 rounded-[12px] bg-raised px-3 ring-1 ring-inset ring-line`,children:(0,I.jsx)(jm,{c:e})}),(0,I.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,I.jsx)(P,{variant:`primary`,size:`md`,className:`flex-1 !bg-bad !text-inverse hover:!bg-bad/90`,onClick:()=>M.startNow(),"data-start-now":!0,children:e.goLabel}),(0,I.jsx)(P,{size:`md`,variant:`ghost`,onClick:()=>M.cancelStart(),"data-cancel-start":!0,children:`Cancel`})]})]})},`countdown`)})}function Pm({tone:e}){let t=(0,F.useRef)(null);return(0,F.useEffect)(()=>{let e=0,n=()=>{let r=Math.min(1,M.client.micLevel),i=t.current?.children;if(i)for(let e=0;e<i.length;e++)i[e].style.height=`${3+Math.max(0,r*11-Math.abs(e-2)*2.2)}px`;e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[]),(0,I.jsx)(`div`,{ref:t,className:`flex h-3.5 items-center gap-[2px]`,"aria-hidden":!0,children:Array.from({length:5},(t,n)=>(0,I.jsx)(`span`,{className:i(`block w-[3px] rounded-full transition-[height,background-color] duration-75`,e===`ok`?`bg-ok`:e===`warn`?`bg-warn/80`:`bg-bad/70`),style:{height:3}},n))})}function Fm(){let[e,t]=(0,F.useState)(()=>M.client.voiceStatus());return(0,F.useEffect)(()=>{let e=setInterval(()=>{let e=M.client.voiceStatus();t(t=>t.state===e.state&&t.text===e.text?t:e)},150);return()=>clearInterval(e)},[]),e}function Im(){let e=Fm(),t=e.state===`off`||e.state===`blocked`||e.state===`unavailable`;return(0,I.jsx)(pd,{label:e.hint,children:(0,I.jsxs)(`div`,{className:`flex min-w-[64px] flex-col items-center justify-center gap-[3px]`,"data-voice":e.state,children:[t?(0,I.jsx)(`span`,{className:`flex h-3.5 items-center text-fg-3 [&_svg]:size-[13px]`,children:(0,I.jsx)(El,{})}):(0,I.jsx)(Pm,{tone:e.tone}),(0,I.jsx)(`span`,{className:i(`whitespace-nowrap text-[10px] font-medium leading-none`,e.tone===`ok`?`text-ok`:e.tone===`warn`?`text-warn`:e.tone===`bad`?`text-bad`:`text-fg-3`),children:e.text})]})})}function Lm(){let e=et(e=>e.live),t=e.status===`recording`||e.status===`starting`||e.status===`stopping`,n=zf(t,250),r=e.captions[e.captions.length-1],i=e.lastIssue&&n-e.lastIssue.t<7e3?e.lastIssue:null,a=e.counts.errors+e.counts.failedRequests+e.counts.frustration;return(0,I.jsx)(Dt,{initial:!1,children:t&&(0,I.jsx)(xt.div,{initial:{height:0,opacity:0},animate:{height:40,opacity:1},exit:{height:0,opacity:0},transition:{type:`spring`,stiffness:420,damping:40},className:`relative z-10 shrink-0 overflow-hidden border-b border-bad/25 bg-[linear-gradient(90deg,var(--bad-soft),transparent_55%)]`,children:(0,I.jsxs)(`div`,{className:`flex h-10 items-center gap-3 px-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`size-2 rounded-full bg-bad`,style:{animation:e.paused||e.status===`starting`?void 0:`rec-pulse 1.4s ease-in-out infinite`}}),(0,I.jsx)(`span`,{className:`text-[12px] font-semibold text-bad`,children:e.status===`starting`?`Starting…`:e.paused?`Paused`:`Recording`}),(0,I.jsx)(`span`,{className:`tabular text-[12.5px] font-semibold text-fg`,children:e.status===`starting`?`—`:Rf(n-e.startedAt)})]}),e.status!==`starting`&&(0,I.jsx)(Im,{}),e.screen!==`on`&&e.status===`recording`&&(0,I.jsx)(pd,{label:e.screen===`denied`?`Screen sharing was declined: no screenshots this time`:`Not recording the screen`,children:(0,I.jsx)(`span`,{className:`text-fg-3 [&_svg]:size-[14px]`,children:(0,I.jsx)(Ml,{})})}),(0,I.jsx)(`div`,{className:`relative h-full min-w-0 flex-1`,children:(0,I.jsx)(Dt,{mode:`popLayout`,initial:!1,children:i?(0,I.jsxs)(xt.div,{initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},className:`absolute inset-0 flex items-center gap-1.5 text-[12.5px] text-bad`,children:[(0,I.jsx)(Du,{className:`size-3.5 shrink-0`}),(0,I.jsx)(`span`,{className:`truncate`,children:i.text})]},`i${i.t}`):r?(0,I.jsx)(xt.div,{initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},className:`absolute inset-0 flex items-center`,children:(0,I.jsxs)(`span`,{dir:`auto`,className:`truncate text-[12.5px] text-fg-2`,children:[`“`,r.text,`”`]})},`c${r.t}`):(0,I.jsx)(xt.div,{initial:{opacity:0},animate:{opacity:1},className:`absolute inset-0 flex items-center text-[12.5px] text-fg-3`,children:e.mic===`on`||e.mic===`starting`?`Use your app and say what you notice — it appears here as you talk.`:`Use your app; everything you do is being captured.`},`hint`)})}),(0,I.jsxs)(`div`,{className:`hidden items-center gap-3 text-[11.5px] text-fg-3 md:flex`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`b`,{className:`tabular font-semibold text-fg`,children:e.counts.events}),` events`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`b`,{className:`tabular font-semibold text-fg`,children:e.counts.speech}),` said`]}),(0,I.jsxs)(`span`,{className:a?`text-bad`:``,children:[(0,I.jsx)(`b`,{className:a?`tabular font-semibold`:`tabular font-semibold text-fg`,children:a}),` issues`]}),e.lost?(0,I.jsx)(pd,{label:`The studio couldn’t be reached for a long while: some narration or video wasn’t kept. Check that npm run dev is still running.`,children:(0,I.jsx)(`span`,{className:`text-bad`,children:`some not saved`})}):e.backlog>6&&(0,I.jsx)(pd,{label:`Waiting to reach the studio; nothing is lost yet.`,children:(0,I.jsx)(`span`,{className:`text-warn`,children:`uploading…`})})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsx)(pd,{label:`Mark this moment`,kbd:`M`,children:(0,I.jsx)(P,{size:`sm`,variant:`ghost`,icon:(0,I.jsx)(zc,{}),onClick:()=>M.mark(``,`button`),disabled:e.status!==`recording`,children:`Mark`})}),e.mic===`on`&&(0,I.jsx)(pd,{label:e.paused?`Resume recording your voice`:`Pause recording your voice`,children:(0,I.jsx)(P,{size:`sm`,variant:`ghost`,icon:e.paused?(0,I.jsx)(Kl,{}):(0,I.jsx)(Wl,{}),onClick:()=>M.client.setPaused(!e.paused),children:e.paused?`Resume`:`Pause`})}),(0,I.jsx)(P,{size:`sm`,variant:`primary`,className:`!bg-bad !text-white hover:!bg-bad/90`,icon:(0,I.jsx)(pu,{className:`fill-current`}),onClick:()=>void M.stop(),disabled:e.status===`stopping`,children:e.status===`stopping`?`Saving…`:e.status===`starting`?`Cancel`:`Stop`})]})]})})})}function Rm(e){let t=null,n={view:null,failed:!1,load:()=>t??=e().then(e=>{n.view=e,n.failed=!1},()=>{n.failed=!0,t=null})};return n}var zm={settings:Rm(()=>Rt(()=>import(`./SettingsDialog-VrACcdUX.js`).then(e=>e.SettingsDialog),__vite__mapDeps([2,1,3,4,5,6]))),palette:Rm(()=>Rt(()=>import(`./CommandPalette-BA3akF-p.js`).then(e=>e.CommandPalette),__vite__mapDeps([7,1,3,4,5,8,9]))),help:Rm(()=>Rt(()=>import(`./HelpDialog-C6qmdEwi.js`).then(e=>e.HelpDialog),__vite__mapDeps([10,1,3,4,5,9,2,6]))),calibrate:Rm(()=>Rt(()=>import(`./Calibration-xY4YDLzU.js`).then(e=>e.Calibration),__vite__mapDeps([11,1,4,5]))),report:Rm(()=>Rt(()=>import(`./ReportView-Bj9xxLCi.js`).then(e=>e.ReportView),__vite__mapDeps([12,1,3,4,5,8,6])))};function Bm({of:e,wanted:t,frame:n}){let[r,i]=(0,F.useState)(t),[,a]=(0,F.useReducer)(e=>e+1,0);t&&!r&&i(!0);let o=e.view;return(0,F.useEffect)(()=>{r&&t&&!o&&e.load().then(a)},[e,r,t,o]),o?r?(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(o,{})}):null:!t||!n?null:(0,I.jsx)(_e,{open:!0,title:n,onOpenChange:e=>!e&&Ue({overlay:null}),className:`w-[min(420px,calc(100vw-32px))]`,children:(0,I.jsx)(`div`,{className:`grid h-40 place-items-center px-6 text-center text-[12.5px] text-fg-3`,children:e.failed?`This didn’t load. Reload the studio, then try again.`:(0,I.jsx)(T,{})})})}function Vm(){let e=D(e=>e.overlay),t=et(e=>!!e.open);return(0,F.useEffect)(()=>{let e=()=>{for(let e of Object.values(zm))e.load()};if(typeof requestIdleCallback==`function`){let t=requestIdleCallback(e,{timeout:4e3});return()=>cancelIdleCallback(t)}let t=setTimeout(e,2e3);return()=>clearTimeout(t)},[]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Bm,{of:zm.settings,wanted:e===`settings`,frame:`Settings`}),(0,I.jsx)(Bm,{of:zm.palette,wanted:e===`palette`,frame:`Command palette`}),(0,I.jsx)(Bm,{of:zm.help,wanted:e===`help`,frame:`Help`}),(0,I.jsx)(nm,{}),(0,I.jsx)(Bm,{of:zm.calibrate,wanted:e===`calibrate`,frame:`Calibration`}),(0,I.jsx)(Bm,{of:zm.report,wanted:t})]})}function Hm(){return(0,F.useEffect)(()=>{A.start()},[]),(0,I.jsxs)(fd,{children:[(0,I.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,I.jsx)(vp,{}),(0,I.jsx)(bm,{}),(0,I.jsx)(Lm,{}),(0,I.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,I.jsx)(Dp,{}),(0,I.jsx)(Pd,{})]})]}),(0,I.jsx)(Vm,{}),(0,I.jsx)(rp,{}),(0,I.jsx)(dp,{}),(0,I.jsx)(fp,{}),(0,I.jsx)(Nm,{}),(0,I.jsx)(ye,{}),(0,I.jsx)(Wt,{})]})}(0,Ut.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(F.StrictMode,{children:(0,I.jsx)(Hm,{})}));export{_c as $,au as A,wl as B,ju as C,Xn as Ct,_u as D,yu as E,Kl as F,qc as G,al as H,Hl as I,jc as J,zc as K,Bl as L,eu as M,Ql as N,pu as O,Xl as P,xc as Q,Il as R,Fu as S,Fi as St,xu as T,rl as U,_l as V,tl as W,Dc as X,kc as Y,Tc as Z,hd as _,Ii as _t,Lf as a,Ys as at,q as b,Gi as bt,Ld as c,Us as ct,wd as d,Io as dt,hc as et,Cd as f,Ro as ft,gd as g,zi as gt,xd as h,Ri as ht,_p as i,sc as it,iu as j,lu as k,Id as l,Po as lt,Sd as m,Ni as mt,jp as n,dc as nt,zd as o,qs as ot,Dd as p,Ji as pt,Nc as q,hp as r,lc as rt,Rd as s,Gs as st,$p as t,pc as tt,Td as u,Bo as ut,md as v,Hi as vt,Du as w,Lu as x,Wi as xt,dd as y,Ui as yt,Ol as z};
|