@theokit/studio 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/dist/plugin/index.d.ts +7 -7
- package/dist/plugin/index.js +8 -8
- package/dist/spa/assets/{index-B5gt81MK.js → index-ch_F_T_4.js} +2 -2
- package/dist/spa/assets/{main-B9ECDPqJ.js → main-CL8NIho3.js} +1 -1
- package/dist/spa/assets/main-DIO6rPSG.css +1 -0
- package/dist/spa/index.html +1 -1
- package/package.json +18 -6
- package/dist/assets/geist-400-B1wb-odA.woff2 +0 -0
- package/dist/assets/geist-500-fu4ekwtu.woff2 +0 -0
- package/dist/assets/geist-600-BvYtazuD.woff2 +0 -0
- package/dist/assets/geist-mono-400-BxSzyECb.woff2 +0 -0
- package/dist/assets/geist-mono-500-BdW0Mzrp.woff2 +0 -0
- package/dist/assets/geist-mono-600-C_rrDxVZ.woff2 +0 -0
- package/dist/assets/index-BO_6oSGr.js +0 -4
- package/dist/assets/main-B8fxyGhN.css +0 -1
- package/dist/assets/main-DSIlqqrG.js +0 -132
- package/dist/assets/ui_false-B1n26OIN.js +0 -1
- package/dist/assets/ui_false-C86dpdOS.js +0 -1
- package/dist/assets/ui_false-CmAnmupH.js +0 -1
- package/dist/assets/ui_false-D-OXQOOV.js +0 -1
- package/dist/assets/ui_false-D2OIiKrG.js +0 -1
- package/dist/assets/ui_false-DXBDqAI8.js +0 -1
- package/dist/assets/ui_false-bdnHF6UP.js +0 -1
- package/dist/index.html +0 -12
- package/dist/spa/assets/main-Db-qK75F.css +0 -1
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import{_ as Pa}from"./index-BO_6oSGr.js";function Z1(e,r){for(var a=0;a<r.length;a++){const o=r[a];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(o,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function NT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wm={exports:{}},ql={};var Zy;function kT(){if(Zy)return ql;Zy=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(o,i,c){var d=null;if(c!==void 0&&(d=""+c),i.key!==void 0&&(d=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:o,key:d,ref:i!==void 0?i:null,props:c}}return ql.Fragment=r,ql.jsx=a,ql.jsxs=a,ql}var Qy;function CT(){return Qy||(Qy=1,Wm.exports=kT()),Wm.exports}var l=CT();const ET=Z1({__proto__:null},[l]);var Zm={exports:{}},Gl={},Qm={exports:{}},Jm={};var Jy;function RT(){return Jy||(Jy=1,(function(e){function r(D,V){var ae=D.length;D.push(V);e:for(;0<ae;){var Q=ae-1>>>1,xe=D[Q];if(0<i(xe,V))D[Q]=V,D[ae]=xe,ae=Q;else break e}}function a(D){return D.length===0?null:D[0]}function o(D){if(D.length===0)return null;var V=D[0],ae=D.pop();if(ae!==V){D[0]=ae;e:for(var Q=0,xe=D.length,O=xe>>>1;Q<O;){var z=2*(Q+1)-1,G=D[z],se=z+1,ue=D[se];if(0>i(G,ae))se<xe&&0>i(ue,G)?(D[Q]=ue,D[se]=ae,Q=se):(D[Q]=G,D[z]=ae,Q=z);else if(se<xe&&0>i(ue,ae))D[Q]=ue,D[se]=ae,Q=se;else break e}}return V}function i(D,V){var ae=D.sortIndex-V.sortIndex;return ae!==0?ae:D.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var h=[],p=[],x=1,y=null,b=3,w=!1,S=!1,N=!1,k=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function M(D){for(var V=a(p);V!==null;){if(V.callback===null)o(p);else if(V.startTime<=D)o(p),V.sortIndex=V.expirationTime,r(h,V);else break;V=a(p)}}function _(D){if(N=!1,M(D),!S)if(a(h)!==null)S=!0,L||(L=!0,ee());else{var V=a(p);V!==null&&Z(_,V.startTime-D)}}var L=!1,B=-1,A=5,oe=-1;function q(){return k?!0:!(e.unstable_now()-oe<A)}function W(){if(k=!1,L){var D=e.unstable_now();oe=D;var V=!0;try{e:{S=!1,N&&(N=!1,E(B),B=-1),w=!0;var ae=b;try{t:{for(M(D),y=a(h);y!==null&&!(y.expirationTime>D&&q());){var Q=y.callback;if(typeof Q=="function"){y.callback=null,b=y.priorityLevel;var xe=Q(y.expirationTime<=D);if(D=e.unstable_now(),typeof xe=="function"){y.callback=xe,M(D),V=!0;break t}y===a(h)&&o(h),M(D)}else o(h);y=a(h)}if(y!==null)V=!0;else{var O=a(p);O!==null&&Z(_,O.startTime-D),V=!1}}break e}finally{y=null,b=ae,w=!1}V=void 0}}finally{V?ee():L=!1}}}var ee;if(typeof T=="function")ee=function(){T(W)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,te=re.port2;re.port1.onmessage=W,ee=function(){te.postMessage(null)}}else ee=function(){C(W,0)};function Z(D,V){B=C(function(){D(e.unstable_now())},V)}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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var V=3;break;default:V=b}var ae=b;b=V;try{return D()}finally{b=ae}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(D,V){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ae=b;b=D;try{return V()}finally{b=ae}},e.unstable_scheduleCallback=function(D,V,ae){var Q=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Q+ae:Q):ae=Q,D){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=ae+xe,D={id:x++,callback:V,priorityLevel:D,startTime:ae,expirationTime:xe,sortIndex:-1},ae>Q?(D.sortIndex=ae,r(p,D),a(h)===null&&D===a(p)&&(N?(E(B),B=-1):N=!0,Z(_,ae-Q))):(D.sortIndex=xe,r(h,D),S||w||(S=!0,L||(L=!0,ee()))),D},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(D){var V=b;return function(){var ae=b;b=V;try{return D.apply(this,arguments)}finally{b=ae}}}})(Jm)),Jm}var eb;function TT(){return eb||(eb=1,Qm.exports=RT()),Qm.exports}var eh={exports:{}},ze={};var tb;function _T(){if(tb)return ze;tb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function C(O,z,G){this.props=O,this.context=z,this.refs=k,this.updater=G||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,z,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function E(){}E.prototype=C.prototype;function T(O,z,G){this.props=O,this.context=z,this.refs=k,this.updater=G||S}var M=T.prototype=new E;M.constructor=T,N(M,C.prototype),M.isPureReactComponent=!0;var _=Array.isArray;function L(){}var B={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function oe(O,z,G){var se=G.ref;return{$$typeof:e,type:O,key:z,ref:se!==void 0?se:null,props:G}}function q(O,z){return oe(O.type,z,O.props)}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ee(O){var z={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(G){return z[G]})}var re=/\/+/g;function te(O,z){return typeof O=="object"&&O!==null&&O.key!=null?ee(""+O.key):z.toString(36)}function Z(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(L,L):(O.status="pending",O.then(function(z){O.status==="pending"&&(O.status="fulfilled",O.value=z)},function(z){O.status==="pending"&&(O.status="rejected",O.reason=z)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function D(O,z,G,se,ue){var ge=typeof O;(ge==="undefined"||ge==="boolean")&&(O=null);var ce=!1;if(O===null)ce=!0;else switch(ge){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(O.$$typeof){case e:case r:ce=!0;break;case x:return ce=O._init,D(ce(O._payload),z,G,se,ue)}}if(ce)return ue=ue(O),ce=se===""?"."+te(O,0):se,_(ue)?(G="",ce!=null&&(G=ce.replace(re,"$&/")+"/"),D(ue,z,G,"",function(Fe){return Fe})):ue!=null&&(W(ue)&&(ue=q(ue,G+(ue.key==null||O&&O.key===ue.key?"":(""+ue.key).replace(re,"$&/")+"/")+ce)),z.push(ue)),1;ce=0;var Ne=se===""?".":se+":";if(_(O))for(var Ce=0;Ce<O.length;Ce++)se=O[Ce],ge=Ne+te(se,Ce),ce+=D(se,z,G,ge,ue);else if(Ce=w(O),typeof Ce=="function")for(O=Ce.call(O),Ce=0;!(se=O.next()).done;)se=se.value,ge=Ne+te(se,Ce++),ce+=D(se,z,G,ge,ue);else if(ge==="object"){if(typeof O.then=="function")return D(Z(O),z,G,se,ue);throw z=String(O),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return ce}function V(O,z,G){if(O==null)return O;var se=[],ue=0;return D(O,se,"","",function(ge){return z.call(G,ge,ue++)}),se}function ae(O){if(O._status===-1){var z=O._result;z=z(),z.then(function(G){(O._status===0||O._status===-1)&&(O._status=1,O._result=G)},function(G){(O._status===0||O._status===-1)&&(O._status=2,O._result=G)}),O._status===-1&&(O._status=0,O._result=z)}if(O._status===1)return O._result.default;throw O._result}var Q=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},xe={map:V,forEach:function(O,z,G){V(O,function(){z.apply(this,arguments)},G)},count:function(O){var z=0;return V(O,function(){z++}),z},toArray:function(O){return V(O,function(z){return z})||[]},only:function(O){if(!W(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return ze.Activity=y,ze.Children=xe,ze.Component=C,ze.Fragment=a,ze.Profiler=i,ze.PureComponent=T,ze.StrictMode=o,ze.Suspense=h,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,ze.__COMPILER_RUNTIME={__proto__:null,c:function(O){return B.H.useMemoCache(O)}},ze.cache=function(O){return function(){return O.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(O,z,G){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var se=N({},O.props),ue=O.key;if(z!=null)for(ge in z.key!==void 0&&(ue=""+z.key),z)!A.call(z,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&z.ref===void 0||(se[ge]=z[ge]);var ge=arguments.length-2;if(ge===1)se.children=G;else if(1<ge){for(var ce=Array(ge),Ne=0;Ne<ge;Ne++)ce[Ne]=arguments[Ne+2];se.children=ce}return oe(O.type,ue,se)},ze.createContext=function(O){return O={$$typeof:d,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},ze.createElement=function(O,z,G){var se,ue={},ge=null;if(z!=null)for(se in z.key!==void 0&&(ge=""+z.key),z)A.call(z,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(ue[se]=z[se]);var ce=arguments.length-2;if(ce===1)ue.children=G;else if(1<ce){for(var Ne=Array(ce),Ce=0;Ce<ce;Ce++)Ne[Ce]=arguments[Ce+2];ue.children=Ne}if(O&&O.defaultProps)for(se in ce=O.defaultProps,ce)ue[se]===void 0&&(ue[se]=ce[se]);return oe(O,ge,ue)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(O){return{$$typeof:f,render:O}},ze.isValidElement=W,ze.lazy=function(O){return{$$typeof:x,_payload:{_status:-1,_result:O},_init:ae}},ze.memo=function(O,z){return{$$typeof:p,type:O,compare:z===void 0?null:z}},ze.startTransition=function(O){var z=B.T,G={};B.T=G;try{var se=O(),ue=B.S;ue!==null&&ue(G,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(L,Q)}catch(ge){Q(ge)}finally{z!==null&&G.types!==null&&(z.types=G.types),B.T=z}},ze.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},ze.use=function(O){return B.H.use(O)},ze.useActionState=function(O,z,G){return B.H.useActionState(O,z,G)},ze.useCallback=function(O,z){return B.H.useCallback(O,z)},ze.useContext=function(O){return B.H.useContext(O)},ze.useDebugValue=function(){},ze.useDeferredValue=function(O,z){return B.H.useDeferredValue(O,z)},ze.useEffect=function(O,z){return B.H.useEffect(O,z)},ze.useEffectEvent=function(O){return B.H.useEffectEvent(O)},ze.useId=function(){return B.H.useId()},ze.useImperativeHandle=function(O,z,G){return B.H.useImperativeHandle(O,z,G)},ze.useInsertionEffect=function(O,z){return B.H.useInsertionEffect(O,z)},ze.useLayoutEffect=function(O,z){return B.H.useLayoutEffect(O,z)},ze.useMemo=function(O,z){return B.H.useMemo(O,z)},ze.useOptimistic=function(O,z){return B.H.useOptimistic(O,z)},ze.useReducer=function(O,z,G){return B.H.useReducer(O,z,G)},ze.useRef=function(O){return B.H.useRef(O)},ze.useState=function(O){return B.H.useState(O)},ze.useSyncExternalStore=function(O,z,G){return B.H.useSyncExternalStore(O,z,G)},ze.useTransition=function(){return B.H.useTransition()},ze.version="19.2.7",ze}var nb;function zp(){return nb||(nb=1,eh.exports=_T()),eh.exports}var th={exports:{}},Xt={};var rb;function MT(){if(rb)return Xt;rb=1;var e=zp();function r(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var o={d:{f:a,r:function(){throw Error(r(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(h,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:h,containerInfo:p,implementation:x}}var d=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Xt.createPortal=function(h,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return c(h,p,null,x)},Xt.flushSync=function(h){var p=d.T,x=o.p;try{if(d.T=null,o.p=2,h)return h()}finally{d.T=p,o.p=x,o.d.f()}},Xt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(h,p))},Xt.prefetchDNS=function(h){typeof h=="string"&&o.d.D(h)},Xt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var x=p.as,y=f(x,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?o.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:w}):x==="script"&&o.d.X(h,{crossOrigin:y,integrity:b,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Xt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=f(p.as,p.crossOrigin);o.d.M(h,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(h)},Xt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=f(x,p.crossOrigin);o.d.L(h,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Xt.preloadModule=function(h,p){if(typeof h=="string")if(p){var x=f(p.as,p.crossOrigin);o.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(h)},Xt.requestFormReset=function(h){o.d.r(h)},Xt.unstable_batchedUpdates=function(h,p){return h(p)},Xt.useFormState=function(h,p,x){return d.H.useFormState(h,p,x)},Xt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Xt.version="19.2.7",Xt}var ab;function Q1(){if(ab)return th.exports;ab=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),th.exports=MT(),th.exports}var ob;function AT(){if(ob)return Gl;ob=1;var e=TT(),r=zp(),a=Q1();function o(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,s=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(s=n.return),t=n.return;while(t)}return n.tag===3?s:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(c(t)!==t)throw Error(o(188))}function p(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(o(188));return n!==t?null:t}for(var s=t,u=n;;){var g=s.return;if(g===null)break;var v=g.alternate;if(v===null){if(u=g.return,u!==null){s=u;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===s)return h(g),t;if(v===u)return h(g),n;v=v.sibling}throw Error(o(188))}if(s.return!==u.return)s=g,u=v;else{for(var j=!1,R=g.child;R;){if(R===s){j=!0,s=g,u=v;break}if(R===u){j=!0,u=g,s=v;break}R=R.sibling}if(!j){for(R=v.child;R;){if(R===s){j=!0,s=v,u=g;break}if(R===u){j=!0,u=v,s=g;break}R=R.sibling}if(!j)throw Error(o(189))}}if(s.alternate!==u)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?t:n}function x(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=x(t),n!==null)return n;t=t.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function ee(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var re=Symbol.for("react.client.reference");function te(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===re?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case C:return"Profiler";case k:return"StrictMode";case _:return"Suspense";case L:return"SuspenseList";case oe:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case T:return t.displayName||"Context";case E:return(t._context.displayName||"Context")+".Consumer";case M:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case B:return n=t.displayName||null,n!==null?n:te(t.type)||"Memo";case A:n=t._payload,t=t._init;try{return te(t(n))}catch{}}return null}var Z=Array.isArray,D=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Q=[],xe=-1;function O(t){return{current:t}}function z(t){0>xe||(t.current=Q[xe],Q[xe]=null,xe--)}function G(t,n){xe++,Q[xe]=t.current,t.current=n}var se=O(null),ue=O(null),ge=O(null),ce=O(null);function Ne(t,n){switch(G(ge,n),G(ue,t),G(se,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?by(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=by(n),t=wy(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}z(se),G(se,t)}function Ce(){z(se),z(ue),z(ge)}function Fe(t){t.memoizedState!==null&&G(ce,t);var n=se.current,s=wy(n,t.type);n!==s&&(G(ue,t),G(se,s))}function rt(t){ue.current===t&&(z(se),z(ue)),ce.current===t&&(z(ce),Hl._currentValue=ae)}var xt,st;function mt(t){if(xt===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);xt=n&&n[1]||"",st=-1<s.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+xt+t+st}var or=!1;function jr(t,n){if(!t||or)return"";or=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ne){var J=ne}Reflect.construct(t,[],de)}else{try{de.call()}catch(ne){J=ne}t.call(de.prototype)}}else{try{throw Error()}catch(ne){J=ne}(de=t())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ne){if(ne&&J&&typeof ne.stack=="string")return[ne.stack,J.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=u.DetermineComponentFrameRoot(),j=v[0],R=v[1];if(j&&R){var P=j.split(`
|
|
4
|
-
`),K=R.split(`
|
|
5
|
-
`);for(g=u=0;u<P.length&&!P[u].includes("DetermineComponentFrameRoot");)u++;for(;g<K.length&&!K[g].includes("DetermineComponentFrameRoot");)g++;if(u===P.length||g===K.length)for(u=P.length-1,g=K.length-1;1<=u&&0<=g&&P[u]!==K[g];)g--;for(;1<=u&&0<=g;u--,g--)if(P[u]!==K[g]){if(u!==1||g!==1)do if(u--,g--,0>g||P[u]!==K[g]){var le=`
|
|
6
|
-
`+P[u].replace(" at new "," at ");return t.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",t.displayName)),le}while(1<=u&&0<=g);break}}}finally{or=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?mt(s):""}function pn(t,n){switch(t.tag){case 26:case 27:case 5:return mt(t.type);case 16:return mt("Lazy");case 13:return t.child!==n&&n!==null?mt("Suspense Fallback"):mt("Suspense");case 19:return mt("SuspenseList");case 0:case 15:return jr(t.type,!1);case 11:return jr(t.type.render,!1);case 1:return jr(t.type,!0);case 31:return mt("Activity");default:return""}}function Fi(t){try{var n="",s=null;do n+=pn(t,s),s=t,t=t.return;while(t);return n}catch(u){return`
|
|
7
|
-
Error generating stack: `+u.message+`
|
|
8
|
-
`+u.stack}}var Js=Object.prototype.hasOwnProperty,Ao=e.unstable_scheduleCallback,el=e.unstable_cancelCallback,Id=e.unstable_shouldYield,Ud=e.unstable_requestPaint,Qt=e.unstable_now,Nr=e.unstable_getCurrentPriorityLevel,ra=e.unstable_ImmediatePriority,tl=e.unstable_UserBlockingPriority,aa=e.unstable_NormalPriority,Kn=e.unstable_LowPriority,Tn=e.unstable_IdlePriority,Bd=e.log,Hd=e.unstable_setDisableYieldValue,kr=null,Jt=null;function Ht(t){if(typeof Bd=="function"&&Hd(t),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(kr,t)}catch{}}var Kt=Math.clz32?Math.clz32:Fd,$i=Math.log,Vi=Math.LN2;function Fd(t){return t>>>=0,t===0?32:31-($i(t)/Vi|0)|0}var Ka=256,Cr=262144,Xa=4194304;function Xn(t){var n=t&42;if(n!==0)return n;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Do(t,n,s){var u=t.pendingLanes;if(u===0)return 0;var g=0,v=t.suspendedLanes,j=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~v,u!==0?g=Xn(u):(j&=R,j!==0?g=Xn(j):s||(s=R&~t,s!==0&&(g=Xn(s))))):(R=u&~v,R!==0?g=Xn(R):j!==0?g=Xn(j):s||(s=u&~t,s!==0&&(g=Xn(s)))),g===0?0:n!==0&&n!==g&&(n&v)===0&&(v=g&-g,s=n&-n,v>=s||v===32&&(s&4194048)!==0)?n:g}function oa(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function $d(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 nl(){var t=Xa;return Xa<<=1,(Xa&62914560)===0&&(Xa=4194304),t}function sa(t){for(var n=[],s=0;31>s;s++)n.push(t);return n}function sr(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function qi(t,n,s,u,g,v){var j=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var R=t.entanglements,P=t.expirationTimes,K=t.hiddenUpdates;for(s=j&~s;0<s;){var le=31-Kt(s),de=1<<le;R[le]=0,P[le]=-1;var J=K[le];if(J!==null)for(K[le]=null,le=0;le<J.length;le++){var ne=J[le];ne!==null&&(ne.lane&=-536870913)}s&=~de}u!==0&&Gi(t,u,0),v!==0&&g===0&&t.tag!==0&&(t.suspendedLanes|=v&~(j&~n))}function Gi(t,n,s){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-Kt(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|s&261930}function Yi(t,n){var s=t.entangledLanes|=n;for(t=t.entanglements;s;){var u=31-Kt(s),g=1<<u;g&n|t[u]&n&&(t[u]|=n),s&=~g}}function I(t,n){var s=n&-n;return s=(s&42)!==0?1:H(s),(s&(t.suspendedLanes|n))!==0?0:s}function H(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function X(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function fe(){var t=V.p;return t!==0?t:(t=window.event,t===void 0?32:Vy(t.type))}function me(t,n){var s=V.p;try{return V.p=t,n()}finally{V.p=s}}var Se=Math.random().toString(36).slice(2),ye="__reactFiber$"+Se,we="__reactProps$"+Se,be="__reactContainer$"+Se,Re="__reactEvents$"+Se,Te="__reactListeners$"+Se,Le="__reactHandles$"+Se,Ae="__reactResources$"+Se,$e="__reactMarker$"+Se;function Je(t){delete t[ye],delete t[we],delete t[Re],delete t[Te],delete t[Le]}function vt(t){var n=t[ye];if(n)return n;for(var s=t.parentNode;s;){if(n=s[be]||s[ye]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(t=Ry(t);t!==null;){if(s=t[ye])return s;t=Ry(t)}return n}t=s,s=t.parentNode}return null}function ot(t){if(t=t[ye]||t[be]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function We(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(o(33))}function Rt(t){var n=t[Ae];return n||(n=t[Ae]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ze(t){t[$e]=!0}var la=new Set,Wn={};function an(t,n){en(t,n),en(t+"Capture",n)}function en(t,n){for(Wn[t]=n,t=0;t<n.length;t++)la.add(n[t])}var _n=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]*$"),Oo={},Zn={};function zo(t){return Js.call(Zn,t)?!0:Js.call(Oo,t)?!1:_n.test(t)?Zn[t]=!0:(Oo[t]=!0,!1)}function Er(t,n,s){if(zo(n))if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+s)}}function Rr(t,n,s){if(s===null)t.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+s)}}function Oe(t,n,s,u){if(u===null)t.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(n,s,""+u)}}function ht(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function gn(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Qn(t,n,s){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return g.call(this)},set:function(j){s=""+j,v.call(this,j)}}),Object.defineProperty(t,n,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(j){s=""+j},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Lo(t){if(!t._valueTracker){var n=gn(t)?"checked":"value";t._valueTracker=Qn(t,n,""+t[n])}}function Po(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var s=n.getValue(),u="";return t&&(u=gn(t)?t.checked?"true":"false":t.value),t=u,t!==s?(n.setValue(t),!0):!1}function lt(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Tr=/[\n"\\]/g;function tn(t){return t.replace(Tr,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function rl(t,n,s,u,g,v,j,R){t.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?t.type=j:t.removeAttribute("type"),n!=null?j==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+ht(n)):t.value!==""+ht(n)&&(t.value=""+ht(n)):j!=="submit"&&j!=="reset"||t.removeAttribute("value"),n!=null?Vd(t,j,ht(n)):s!=null?Vd(t,j,ht(s)):u!=null&&t.removeAttribute("value"),g==null&&v!=null&&(t.defaultChecked=!!v),g!=null&&(t.checked=g&&typeof g!="function"&&typeof g!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.name=""+ht(R):t.removeAttribute("name")}function h0(t,n,s,u,g,v,j,R){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.type=v),n!=null||s!=null){if(!(v!=="submit"&&v!=="reset"||n!=null)){Lo(t);return}s=s!=null?""+ht(s):"",n=n!=null?""+ht(n):s,R||n===t.value||(t.value=n),t.defaultValue=n}u=u??g,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=R?t.checked:!!u,t.defaultChecked=!!u,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(t.name=j),Lo(t)}function Vd(t,n,s){n==="number"&<(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function Io(t,n,s,u){if(t=t.options,n){n={};for(var g=0;g<s.length;g++)n["$"+s[g]]=!0;for(s=0;s<t.length;s++)g=n.hasOwnProperty("$"+t[s].value),t[s].selected!==g&&(t[s].selected=g),g&&u&&(t[s].defaultSelected=!0)}else{for(s=""+ht(s),n=null,g=0;g<t.length;g++){if(t[g].value===s){t[g].selected=!0,u&&(t[g].defaultSelected=!0);return}n!==null||t[g].disabled||(n=t[g])}n!==null&&(n.selected=!0)}}function p0(t,n,s){if(n!=null&&(n=""+ht(n),n!==t.value&&(t.value=n),s==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=s!=null?""+ht(s):""}function g0(t,n,s,u){if(n==null){if(u!=null){if(s!=null)throw Error(o(92));if(Z(u)){if(1<u.length)throw Error(o(93));u=u[0]}s=u}s==null&&(s=""),n=s}s=ht(n),t.defaultValue=s,u=t.textContent,u===s&&u!==""&&u!==null&&(t.value=u),Lo(t)}function Uo(t,n){if(n){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=n;return}}t.textContent=n}var yE=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 x0(t,n,s){var u=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,s):typeof s!="number"||s===0||yE.has(n)?n==="float"?t.cssFloat=s:t[n]=(""+s).trim():t[n]=s+"px"}function v0(t,n,s){if(n!=null&&typeof n!="object")throw Error(o(62));if(t=t.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var g in n)u=n[g],n.hasOwnProperty(g)&&s[g]!==u&&x0(t,g,u)}else for(var v in n)n.hasOwnProperty(v)&&x0(t,v,n[v])}function qd(t){if(t.indexOf("-")===-1)return!1;switch(t){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 bE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wE=/^[\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 Ki(t){return wE.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function _r(){}var Gd=null;function Yd(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Bo=null,Ho=null;function y0(t){var n=ot(t);if(n&&(t=n.stateNode)){var s=t[we]||null;e:switch(t=n.stateNode,n.type){case"input":if(rl(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+tn(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var u=s[n];if(u!==t&&u.form===t.form){var g=u[we]||null;if(!g)throw Error(o(90));rl(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(n=0;n<s.length;n++)u=s[n],u.form===t.form&&Po(u)}break e;case"textarea":p0(t,s.value,s.defaultValue);break e;case"select":n=s.value,n!=null&&Io(t,!!s.multiple,n,!1)}}}var Kd=!1;function b0(t,n,s){if(Kd)return t(n,s);Kd=!0;try{var u=t(n);return u}finally{if(Kd=!1,(Bo!==null||Ho!==null)&&(zc(),Bo&&(n=Bo,t=Ho,Ho=Bo=null,y0(n),t)))for(n=0;n<t.length;n++)y0(t[n])}}function al(t,n){var s=t.stateNode;if(s===null)return null;var u=s[we]||null;if(u===null)return null;s=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var Mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xd=!1;if(Mr)try{var ol={};Object.defineProperty(ol,"passive",{get:function(){Xd=!0}}),window.addEventListener("test",ol,ol),window.removeEventListener("test",ol,ol)}catch{Xd=!1}var ia=null,Wd=null,Xi=null;function w0(){if(Xi)return Xi;var t,n=Wd,s=n.length,u,g="value"in ia?ia.value:ia.textContent,v=g.length;for(t=0;t<s&&n[t]===g[t];t++);var j=s-t;for(u=1;u<=j&&n[s-u]===g[v-u];u++);return Xi=g.slice(t,1<u?1-u:void 0)}function Wi(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function Zi(){return!0}function S0(){return!1}function on(t){function n(s,u,g,v,j){this._reactName=s,this._targetInst=g,this.type=u,this.nativeEvent=v,this.target=j,this.currentTarget=null;for(var R in t)t.hasOwnProperty(R)&&(s=t[R],this[R]=s?s(v):v[R]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Zi:S0,this.isPropagationStopped=S0,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),n}var Wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qi=on(Wa),sl=y({},Wa,{view:0,detail:0}),SE=on(sl),Zd,Qd,ll,Ji=y({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ef,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ll&&(ll&&t.type==="mousemove"?(Zd=t.screenX-ll.screenX,Qd=t.screenY-ll.screenY):Qd=Zd=0,ll=t),Zd)},movementY:function(t){return"movementY"in t?t.movementY:Qd}}),j0=on(Ji),jE=y({},Ji,{dataTransfer:0}),NE=on(jE),kE=y({},sl,{relatedTarget:0}),Jd=on(kE),CE=y({},Wa,{animationName:0,elapsedTime:0,pseudoElement:0}),EE=on(CE),RE=y({},Wa,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),TE=on(RE),_E=y({},Wa,{data:0}),N0=on(_E),ME={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AE={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"},DE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OE(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=DE[t])?!!n[t]:!1}function ef(){return OE}var zE=y({},sl,{key:function(t){if(t.key){var n=ME[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Wi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?AE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ef,charCode:function(t){return t.type==="keypress"?Wi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Wi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),LE=on(zE),PE=y({},Ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k0=on(PE),IE=y({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ef}),UE=on(IE),BE=y({},Wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),HE=on(BE),FE=y({},Ji,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),$E=on(FE),VE=y({},Wa,{newState:0,oldState:0}),qE=on(VE),GE=[9,13,27,32],tf=Mr&&"CompositionEvent"in window,il=null;Mr&&"documentMode"in document&&(il=document.documentMode);var YE=Mr&&"TextEvent"in window&&!il,C0=Mr&&(!tf||il&&8<il&&11>=il),E0=" ",R0=!1;function T0(t,n){switch(t){case"keyup":return GE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _0(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Fo=!1;function KE(t,n){switch(t){case"compositionend":return _0(n);case"keypress":return n.which!==32?null:(R0=!0,E0);case"textInput":return t=n.data,t===E0&&R0?null:t;default:return null}}function XE(t,n){if(Fo)return t==="compositionend"||!tf&&T0(t,n)?(t=w0(),Xi=Wd=ia=null,Fo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return C0&&n.locale!=="ko"?null:n.data;default:return null}}var WE={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 M0(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!WE[t.type]:n==="textarea"}function A0(t,n,s,u){Bo?Ho?Ho.push(u):Ho=[u]:Bo=u,n=Fc(n,"onChange"),0<n.length&&(s=new Qi("onChange","change",null,s,u),t.push({event:s,listeners:n}))}var cl=null,ul=null;function ZE(t){hy(t,0)}function ec(t){var n=We(t);if(Po(n))return t}function D0(t,n){if(t==="change")return n}var O0=!1;if(Mr){var nf;if(Mr){var rf="oninput"in document;if(!rf){var z0=document.createElement("div");z0.setAttribute("oninput","return;"),rf=typeof z0.oninput=="function"}nf=rf}else nf=!1;O0=nf&&(!document.documentMode||9<document.documentMode)}function L0(){cl&&(cl.detachEvent("onpropertychange",P0),ul=cl=null)}function P0(t){if(t.propertyName==="value"&&ec(ul)){var n=[];A0(n,ul,t,Yd(t)),b0(ZE,n)}}function QE(t,n,s){t==="focusin"?(L0(),cl=n,ul=s,cl.attachEvent("onpropertychange",P0)):t==="focusout"&&L0()}function JE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ec(ul)}function eR(t,n){if(t==="click")return ec(n)}function tR(t,n){if(t==="input"||t==="change")return ec(n)}function nR(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var xn=typeof Object.is=="function"?Object.is:nR;function dl(t,n){if(xn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var s=Object.keys(t),u=Object.keys(n);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var g=s[u];if(!Js.call(n,g)||!xn(t[g],n[g]))return!1}return!0}function I0(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function U0(t,n){var s=I0(t);t=0;for(var u;s;){if(s.nodeType===3){if(u=t+s.textContent.length,t<=n&&u>=n)return{node:s,offset:n-t};t=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=I0(s)}}function B0(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?B0(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function H0(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=lt(t.document);n instanceof t.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)t=n.contentWindow;else break;n=lt(t.document)}return n}function af(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var rR=Mr&&"documentMode"in document&&11>=document.documentMode,$o=null,of=null,fl=null,sf=!1;function F0(t,n,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;sf||$o==null||$o!==lt(u)||(u=$o,"selectionStart"in u&&af(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),fl&&dl(fl,u)||(fl=u,u=Fc(of,"onSelect"),0<u.length&&(n=new Qi("onSelect","select",null,n,s),t.push({event:n,listeners:u}),n.target=$o)))}function Za(t,n){var s={};return s[t.toLowerCase()]=n.toLowerCase(),s["Webkit"+t]="webkit"+n,s["Moz"+t]="moz"+n,s}var Vo={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},lf={},$0={};Mr&&($0=document.createElement("div").style,"AnimationEvent"in window||(delete Vo.animationend.animation,delete Vo.animationiteration.animation,delete Vo.animationstart.animation),"TransitionEvent"in window||delete Vo.transitionend.transition);function Qa(t){if(lf[t])return lf[t];if(!Vo[t])return t;var n=Vo[t],s;for(s in n)if(n.hasOwnProperty(s)&&s in $0)return lf[t]=n[s];return t}var V0=Qa("animationend"),q0=Qa("animationiteration"),G0=Qa("animationstart"),aR=Qa("transitionrun"),oR=Qa("transitionstart"),sR=Qa("transitioncancel"),Y0=Qa("transitionend"),K0=new Map,cf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");cf.push("scrollEnd");function Jn(t,n){K0.set(t,n),an(n,[t])}var tc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Mn=[],qo=0,uf=0;function nc(){for(var t=qo,n=uf=qo=0;n<t;){var s=Mn[n];Mn[n++]=null;var u=Mn[n];Mn[n++]=null;var g=Mn[n];Mn[n++]=null;var v=Mn[n];if(Mn[n++]=null,u!==null&&g!==null){var j=u.pending;j===null?g.next=g:(g.next=j.next,j.next=g),u.pending=g}v!==0&&X0(s,g,v)}}function rc(t,n,s,u){Mn[qo++]=t,Mn[qo++]=n,Mn[qo++]=s,Mn[qo++]=u,uf|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function df(t,n,s,u){return rc(t,n,s,u),ac(t)}function Ja(t,n){return rc(t,null,null,n),ac(t)}function X0(t,n,s){t.lanes|=s;var u=t.alternate;u!==null&&(u.lanes|=s);for(var g=!1,v=t.return;v!==null;)v.childLanes|=s,u=v.alternate,u!==null&&(u.childLanes|=s),v.tag===22&&(t=v.stateNode,t===null||t._visibility&1||(g=!0)),t=v,v=v.return;return t.tag===3?(v=t.stateNode,g&&n!==null&&(g=31-Kt(s),t=v.hiddenUpdates,u=t[g],u===null?t[g]=[n]:u.push(n),n.lane=s|536870912),v):null}function ac(t){if(50<Ol)throw Ol=0,bm=null,Error(o(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Go={};function lR(t,n,s,u){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(t,n,s,u){return new lR(t,n,s,u)}function ff(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ar(t,n){var s=t.alternate;return s===null?(s=vn(t.tag,n,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=n,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,n=t.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function W0(t,n){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,n=s.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function oc(t,n,s,u,g,v){var j=0;if(u=t,typeof t=="function")ff(t)&&(j=1);else if(typeof t=="string")j=fT(t,s,se.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case oe:return t=vn(31,s,n,g),t.elementType=oe,t.lanes=v,t;case N:return eo(s.children,g,v,n);case k:j=8,g|=24;break;case C:return t=vn(12,s,n,g|2),t.elementType=C,t.lanes=v,t;case _:return t=vn(13,s,n,g),t.elementType=_,t.lanes=v,t;case L:return t=vn(19,s,n,g),t.elementType=L,t.lanes=v,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T:j=10;break e;case E:j=9;break e;case M:j=11;break e;case B:j=14;break e;case A:j=16,u=null;break e}j=29,s=Error(o(130,t===null?"null":typeof t,"")),u=null}return n=vn(j,s,n,g),n.elementType=t,n.type=u,n.lanes=v,n}function eo(t,n,s,u){return t=vn(7,t,u,n),t.lanes=s,t}function mf(t,n,s){return t=vn(6,t,null,n),t.lanes=s,t}function Z0(t){var n=vn(18,null,null,0);return n.stateNode=t,n}function hf(t,n,s){return n=vn(4,t.children!==null?t.children:[],t.key,n),n.lanes=s,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Q0=new WeakMap;function An(t,n){if(typeof t=="object"&&t!==null){var s=Q0.get(t);return s!==void 0?s:(n={value:t,source:n,stack:Fi(n)},Q0.set(t,n),n)}return{value:t,source:n,stack:Fi(n)}}var Yo=[],Ko=0,sc=null,ml=0,Dn=[],On=0,ca=null,lr=1,ir="";function Dr(t,n){Yo[Ko++]=ml,Yo[Ko++]=sc,sc=t,ml=n}function J0(t,n,s){Dn[On++]=lr,Dn[On++]=ir,Dn[On++]=ca,ca=t;var u=lr;t=ir;var g=32-Kt(u)-1;u&=~(1<<g),s+=1;var v=32-Kt(n)+g;if(30<v){var j=g-g%5;v=(u&(1<<j)-1).toString(32),u>>=j,g-=j,lr=1<<32-Kt(n)+g|s<<g|u,ir=v+t}else lr=1<<v|s<<g|u,ir=t}function pf(t){t.return!==null&&(Dr(t,1),J0(t,1,0))}function gf(t){for(;t===sc;)sc=Yo[--Ko],Yo[Ko]=null,ml=Yo[--Ko],Yo[Ko]=null;for(;t===ca;)ca=Dn[--On],Dn[On]=null,ir=Dn[--On],Dn[On]=null,lr=Dn[--On],Dn[On]=null}function ex(t,n){Dn[On++]=lr,Dn[On++]=ir,Dn[On++]=ca,lr=n.id,ir=n.overflow,ca=t}var $t=null,yt=null,Xe=!1,ua=null,zn=!1,xf=Error(o(519));function da(t){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hl(An(n,t)),xf}function tx(t){var n=t.stateNode,s=t.type,u=t.memoizedProps;switch(n[ye]=t,n[we]=u,s){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(s=0;s<Ll.length;s++)qe(Ll[s],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),h0(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),g0(n,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||u.suppressHydrationWarning===!0||vy(n.textContent,s)?(u.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),u.onScroll!=null&&qe("scroll",n),u.onScrollEnd!=null&&qe("scrollend",n),u.onClick!=null&&(n.onclick=_r),n=!0):n=!1,n||da(t,!0)}function nx(t){for($t=t.return;$t;)switch($t.tag){case 5:case 31:case 13:zn=!1;return;case 27:case 3:zn=!0;return;default:$t=$t.return}}function Xo(t){if(t!==$t)return!1;if(!Xe)return nx(t),Xe=!0,!1;var n=t.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||zm(t.type,t.memoizedProps)),s=!s),s&&yt&&da(t),nx(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));yt=Ey(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));yt=Ey(t)}else n===27?(n=yt,ka(t.type)?(t=Bm,Bm=null,yt=t):yt=n):yt=$t?Pn(t.stateNode.nextSibling):null;return!0}function to(){yt=$t=null,Xe=!1}function vf(){var t=ua;return t!==null&&(un===null?un=t:un.push.apply(un,t),ua=null),t}function hl(t){ua===null?ua=[t]:ua.push(t)}var yf=O(null),no=null,Or=null;function fa(t,n,s){G(yf,n._currentValue),n._currentValue=s}function zr(t){t._currentValue=yf.current,z(yf)}function bf(t,n,s){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===s)break;t=t.return}}function wf(t,n,s,u){var g=t.child;for(g!==null&&(g.return=t);g!==null;){var v=g.dependencies;if(v!==null){var j=g.child;v=v.firstContext;e:for(;v!==null;){var R=v;v=g;for(var P=0;P<n.length;P++)if(R.context===n[P]){v.lanes|=s,R=v.alternate,R!==null&&(R.lanes|=s),bf(v.return,s,t),u||(j=null);break e}v=R.next}}else if(g.tag===18){if(j=g.return,j===null)throw Error(o(341));j.lanes|=s,v=j.alternate,v!==null&&(v.lanes|=s),bf(j,s,t),j=null}else j=g.child;if(j!==null)j.return=g;else for(j=g;j!==null;){if(j===t){j=null;break}if(g=j.sibling,g!==null){g.return=j.return,j=g;break}j=j.return}g=j}}function Wo(t,n,s,u){t=null;for(var g=n,v=!1;g!==null;){if(!v){if((g.flags&524288)!==0)v=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var j=g.alternate;if(j===null)throw Error(o(387));if(j=j.memoizedProps,j!==null){var R=g.type;xn(g.pendingProps.value,j.value)||(t!==null?t.push(R):t=[R])}}else if(g===ce.current){if(j=g.alternate,j===null)throw Error(o(387));j.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(t!==null?t.push(Hl):t=[Hl])}g=g.return}t!==null&&wf(n,t,s,u),n.flags|=262144}function lc(t){for(t=t.firstContext;t!==null;){if(!xn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ro(t){no=t,Or=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Vt(t){return rx(no,t)}function ic(t,n){return no===null&&ro(t),rx(t,n)}function rx(t,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},Or===null){if(t===null)throw Error(o(308));Or=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else Or=Or.next=n;return s}var iR=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(s,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(s){return s()})}},cR=e.unstable_scheduleCallback,uR=e.unstable_NormalPriority,Dt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sf(){return{controller:new iR,data:new Map,refCount:0}}function pl(t){t.refCount--,t.refCount===0&&cR(uR,function(){t.controller.abort()})}var gl=null,jf=0,Zo=0,Qo=null;function dR(t,n){if(gl===null){var s=gl=[];jf=0,Zo=Cm(),Qo={status:"pending",value:void 0,then:function(u){s.push(u)}}}return jf++,n.then(ax,ax),n}function ax(){if(--jf===0&&gl!==null){Qo!==null&&(Qo.status="fulfilled");var t=gl;gl=null,Zo=0,Qo=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function fR(t,n){var s=[],u={status:"pending",value:null,reason:null,then:function(g){s.push(g)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var g=0;g<s.length;g++)(0,s[g])(n)},function(g){for(u.status="rejected",u.reason=g,g=0;g<s.length;g++)(0,s[g])(void 0)}),u}var ox=D.S;D.S=function(t,n){Fv=Qt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&dR(t,n),ox!==null&&ox(t,n)};var ao=O(null);function Nf(){var t=ao.current;return t!==null?t:pt.pooledCache}function cc(t,n){n===null?G(ao,ao.current):G(ao,n.pool)}function sx(){var t=Nf();return t===null?null:{parent:Dt._currentValue,pool:t}}var Jo=Error(o(460)),kf=Error(o(474)),uc=Error(o(542)),dc={then:function(){}};function lx(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ix(t,n,s){switch(s=t[s],s===void 0?t.push(n):s!==n&&(n.then(_r,_r),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,ux(t),t;default:if(typeof n.status=="string")n.then(_r,_r);else{if(t=pt,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=n,t.status="pending",t.then(function(u){if(n.status==="pending"){var g=n;g.status="fulfilled",g.value=u}},function(u){if(n.status==="pending"){var g=n;g.status="rejected",g.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,ux(t),t}throw so=n,Jo}}function oo(t){try{var n=t._init;return n(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(so=s,Jo):s}}var so=null;function cx(){if(so===null)throw Error(o(459));var t=so;return so=null,t}function ux(t){if(t===Jo||t===uc)throw Error(o(483))}var es=null,xl=0;function fc(t){var n=xl;return xl+=1,es===null&&(es=[]),ix(es,t,n)}function vl(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function mc(t,n){throw n.$$typeof===b?Error(o(525)):(t=Object.prototype.toString.call(n),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function dx(t){function n($,U){if(t){var Y=$.deletions;Y===null?($.deletions=[U],$.flags|=16):Y.push(U)}}function s($,U){if(!t)return null;for(;U!==null;)n($,U),U=U.sibling;return null}function u($){for(var U=new Map;$!==null;)$.key!==null?U.set($.key,$):U.set($.index,$),$=$.sibling;return U}function g($,U){return $=Ar($,U),$.index=0,$.sibling=null,$}function v($,U,Y){return $.index=Y,t?(Y=$.alternate,Y!==null?(Y=Y.index,Y<U?($.flags|=67108866,U):Y):($.flags|=67108866,U)):($.flags|=1048576,U)}function j($){return t&&$.alternate===null&&($.flags|=67108866),$}function R($,U,Y,ie){return U===null||U.tag!==6?(U=mf(Y,$.mode,ie),U.return=$,U):(U=g(U,Y),U.return=$,U)}function P($,U,Y,ie){var Ee=Y.type;return Ee===N?le($,U,Y.props.children,ie,Y.key):U!==null&&(U.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===A&&oo(Ee)===U.type)?(U=g(U,Y.props),vl(U,Y),U.return=$,U):(U=oc(Y.type,Y.key,Y.props,null,$.mode,ie),vl(U,Y),U.return=$,U)}function K($,U,Y,ie){return U===null||U.tag!==4||U.stateNode.containerInfo!==Y.containerInfo||U.stateNode.implementation!==Y.implementation?(U=hf(Y,$.mode,ie),U.return=$,U):(U=g(U,Y.children||[]),U.return=$,U)}function le($,U,Y,ie,Ee){return U===null||U.tag!==7?(U=eo(Y,$.mode,ie,Ee),U.return=$,U):(U=g(U,Y),U.return=$,U)}function de($,U,Y){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=mf(""+U,$.mode,Y),U.return=$,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return Y=oc(U.type,U.key,U.props,null,$.mode,Y),vl(Y,U),Y.return=$,Y;case S:return U=hf(U,$.mode,Y),U.return=$,U;case A:return U=oo(U),de($,U,Y)}if(Z(U)||ee(U))return U=eo(U,$.mode,Y,null),U.return=$,U;if(typeof U.then=="function")return de($,fc(U),Y);if(U.$$typeof===T)return de($,ic($,U),Y);mc($,U)}return null}function J($,U,Y,ie){var Ee=U!==null?U.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Ee!==null?null:R($,U,""+Y,ie);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return Y.key===Ee?P($,U,Y,ie):null;case S:return Y.key===Ee?K($,U,Y,ie):null;case A:return Y=oo(Y),J($,U,Y,ie)}if(Z(Y)||ee(Y))return Ee!==null?null:le($,U,Y,ie,null);if(typeof Y.then=="function")return J($,U,fc(Y),ie);if(Y.$$typeof===T)return J($,U,ic($,Y),ie);mc($,Y)}return null}function ne($,U,Y,ie,Ee){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return $=$.get(Y)||null,R(U,$,""+ie,Ee);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case w:return $=$.get(ie.key===null?Y:ie.key)||null,P(U,$,ie,Ee);case S:return $=$.get(ie.key===null?Y:ie.key)||null,K(U,$,ie,Ee);case A:return ie=oo(ie),ne($,U,Y,ie,Ee)}if(Z(ie)||ee(ie))return $=$.get(Y)||null,le(U,$,ie,Ee,null);if(typeof ie.then=="function")return ne($,U,Y,fc(ie),Ee);if(ie.$$typeof===T)return ne($,U,Y,ic(U,ie),Ee);mc(U,ie)}return null}function je($,U,Y,ie){for(var Ee=null,et=null,ke=U,Ie=U=0,Ye=null;ke!==null&&Ie<Y.length;Ie++){ke.index>Ie?(Ye=ke,ke=null):Ye=ke.sibling;var tt=J($,ke,Y[Ie],ie);if(tt===null){ke===null&&(ke=Ye);break}t&&ke&&tt.alternate===null&&n($,ke),U=v(tt,U,Ie),et===null?Ee=tt:et.sibling=tt,et=tt,ke=Ye}if(Ie===Y.length)return s($,ke),Xe&&Dr($,Ie),Ee;if(ke===null){for(;Ie<Y.length;Ie++)ke=de($,Y[Ie],ie),ke!==null&&(U=v(ke,U,Ie),et===null?Ee=ke:et.sibling=ke,et=ke);return Xe&&Dr($,Ie),Ee}for(ke=u(ke);Ie<Y.length;Ie++)Ye=ne(ke,$,Ie,Y[Ie],ie),Ye!==null&&(t&&Ye.alternate!==null&&ke.delete(Ye.key===null?Ie:Ye.key),U=v(Ye,U,Ie),et===null?Ee=Ye:et.sibling=Ye,et=Ye);return t&&ke.forEach(function(_a){return n($,_a)}),Xe&&Dr($,Ie),Ee}function Me($,U,Y,ie){if(Y==null)throw Error(o(151));for(var Ee=null,et=null,ke=U,Ie=U=0,Ye=null,tt=Y.next();ke!==null&&!tt.done;Ie++,tt=Y.next()){ke.index>Ie?(Ye=ke,ke=null):Ye=ke.sibling;var _a=J($,ke,tt.value,ie);if(_a===null){ke===null&&(ke=Ye);break}t&&ke&&_a.alternate===null&&n($,ke),U=v(_a,U,Ie),et===null?Ee=_a:et.sibling=_a,et=_a,ke=Ye}if(tt.done)return s($,ke),Xe&&Dr($,Ie),Ee;if(ke===null){for(;!tt.done;Ie++,tt=Y.next())tt=de($,tt.value,ie),tt!==null&&(U=v(tt,U,Ie),et===null?Ee=tt:et.sibling=tt,et=tt);return Xe&&Dr($,Ie),Ee}for(ke=u(ke);!tt.done;Ie++,tt=Y.next())tt=ne(ke,$,Ie,tt.value,ie),tt!==null&&(t&&tt.alternate!==null&&ke.delete(tt.key===null?Ie:tt.key),U=v(tt,U,Ie),et===null?Ee=tt:et.sibling=tt,et=tt);return t&&ke.forEach(function(jT){return n($,jT)}),Xe&&Dr($,Ie),Ee}function ft($,U,Y,ie){if(typeof Y=="object"&&Y!==null&&Y.type===N&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:e:{for(var Ee=Y.key;U!==null;){if(U.key===Ee){if(Ee=Y.type,Ee===N){if(U.tag===7){s($,U.sibling),ie=g(U,Y.props.children),ie.return=$,$=ie;break e}}else if(U.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===A&&oo(Ee)===U.type){s($,U.sibling),ie=g(U,Y.props),vl(ie,Y),ie.return=$,$=ie;break e}s($,U);break}else n($,U);U=U.sibling}Y.type===N?(ie=eo(Y.props.children,$.mode,ie,Y.key),ie.return=$,$=ie):(ie=oc(Y.type,Y.key,Y.props,null,$.mode,ie),vl(ie,Y),ie.return=$,$=ie)}return j($);case S:e:{for(Ee=Y.key;U!==null;){if(U.key===Ee)if(U.tag===4&&U.stateNode.containerInfo===Y.containerInfo&&U.stateNode.implementation===Y.implementation){s($,U.sibling),ie=g(U,Y.children||[]),ie.return=$,$=ie;break e}else{s($,U);break}else n($,U);U=U.sibling}ie=hf(Y,$.mode,ie),ie.return=$,$=ie}return j($);case A:return Y=oo(Y),ft($,U,Y,ie)}if(Z(Y))return je($,U,Y,ie);if(ee(Y)){if(Ee=ee(Y),typeof Ee!="function")throw Error(o(150));return Y=Ee.call(Y),Me($,U,Y,ie)}if(typeof Y.then=="function")return ft($,U,fc(Y),ie);if(Y.$$typeof===T)return ft($,U,ic($,Y),ie);mc($,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,U!==null&&U.tag===6?(s($,U.sibling),ie=g(U,Y),ie.return=$,$=ie):(s($,U),ie=mf(Y,$.mode,ie),ie.return=$,$=ie),j($)):s($,U)}return function($,U,Y,ie){try{xl=0;var Ee=ft($,U,Y,ie);return es=null,Ee}catch(ke){if(ke===Jo||ke===uc)throw ke;var et=vn(29,ke,null,$.mode);return et.lanes=ie,et.return=$,et}}}var lo=dx(!0),fx=dx(!1),ma=!1;function Cf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ha(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function pa(t,n,s){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(at&2)!==0){var g=u.pending;return g===null?n.next=n:(n.next=g.next,g.next=n),u.pending=n,n=ac(t),X0(t,null,s),n}return rc(t,u,n,s),ac(t)}function yl(t,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,s|=u,n.lanes=s,Yi(t,s)}}function Rf(t,n){var s=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var g=null,v=null;if(s=s.firstBaseUpdate,s!==null){do{var j={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};v===null?g=v=j:v=v.next=j,s=s.next}while(s!==null);v===null?g=v=n:v=v.next=n}else g=v=n;s={baseState:u.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:u.shared,callbacks:u.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=n:t.next=n,s.lastBaseUpdate=n}var Tf=!1;function bl(){if(Tf){var t=Qo;if(t!==null)throw t}}function wl(t,n,s,u){Tf=!1;var g=t.updateQueue;ma=!1;var v=g.firstBaseUpdate,j=g.lastBaseUpdate,R=g.shared.pending;if(R!==null){g.shared.pending=null;var P=R,K=P.next;P.next=null,j===null?v=K:j.next=K,j=P;var le=t.alternate;le!==null&&(le=le.updateQueue,R=le.lastBaseUpdate,R!==j&&(R===null?le.firstBaseUpdate=K:R.next=K,le.lastBaseUpdate=P))}if(v!==null){var de=g.baseState;j=0,le=K=P=null,R=v;do{var J=R.lane&-536870913,ne=J!==R.lane;if(ne?(Ge&J)===J:(u&J)===J){J!==0&&J===Zo&&(Tf=!0),le!==null&&(le=le.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var je=t,Me=R;J=n;var ft=s;switch(Me.tag){case 1:if(je=Me.payload,typeof je=="function"){de=je.call(ft,de,J);break e}de=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Me.payload,J=typeof je=="function"?je.call(ft,de,J):je,J==null)break e;de=y({},de,J);break e;case 2:ma=!0}}J=R.callback,J!==null&&(t.flags|=64,ne&&(t.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[J]:ne.push(J))}else ne={lane:J,tag:R.tag,payload:R.payload,callback:R.callback,next:null},le===null?(K=le=ne,P=de):le=le.next=ne,j|=J;if(R=R.next,R===null){if(R=g.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);le===null&&(P=de),g.baseState=P,g.firstBaseUpdate=K,g.lastBaseUpdate=le,v===null&&(g.shared.lanes=0),ba|=j,t.lanes=j,t.memoizedState=de}}function mx(t,n){if(typeof t!="function")throw Error(o(191,t));t.call(n)}function hx(t,n){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)mx(s[t],n)}var ts=O(null),hc=O(0);function px(t,n){t=Vr,G(hc,t),G(ts,n),Vr=t|n.baseLanes}function _f(){G(hc,Vr),G(ts,ts.current)}function Mf(){Vr=hc.current,z(ts),z(hc)}var yn=O(null),Ln=null;function ga(t){var n=t.alternate;G(Tt,Tt.current&1),G(yn,t),Ln===null&&(n===null||ts.current!==null||n.memoizedState!==null)&&(Ln=t)}function Af(t){G(Tt,Tt.current),G(yn,t),Ln===null&&(Ln=t)}function gx(t){t.tag===22?(G(Tt,Tt.current),G(yn,t),Ln===null&&(Ln=t)):xa()}function xa(){G(Tt,Tt.current),G(yn,yn.current)}function bn(t){z(yn),Ln===t&&(Ln=null),z(Tt)}var Tt=O(0);function pc(t){for(var n=t;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Im(s)||Um(s)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Lr=0,Pe=null,ut=null,Ot=null,gc=!1,ns=!1,io=!1,xc=0,Sl=0,rs=null,mR=0;function Nt(){throw Error(o(321))}function Df(t,n){if(n===null)return!1;for(var s=0;s<n.length&&s<t.length;s++)if(!xn(t[s],n[s]))return!1;return!0}function Of(t,n,s,u,g,v){return Lr=v,Pe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=t===null||t.memoizedState===null?Jx:Xf,io=!1,v=s(u,g),io=!1,ns&&(v=vx(n,s,u,g)),xx(t),v}function xx(t){D.H=kl;var n=ut!==null&&ut.next!==null;if(Lr=0,Ot=ut=Pe=null,gc=!1,Sl=0,rs=null,n)throw Error(o(300));t===null||zt||(t=t.dependencies,t!==null&&lc(t)&&(zt=!0))}function vx(t,n,s,u){Pe=t;var g=0;do{if(ns&&(rs=null),Sl=0,ns=!1,25<=g)throw Error(o(301));if(g+=1,Ot=ut=null,t.updateQueue!=null){var v=t.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}D.H=ev,v=n(s,u)}while(ns);return v}function hR(){var t=D.H,n=t.useState()[0];return n=typeof n.then=="function"?jl(n):n,t=t.useState()[0],(ut!==null?ut.memoizedState:null)!==t&&(Pe.flags|=1024),n}function zf(){var t=xc!==0;return xc=0,t}function Lf(t,n,s){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~s}function Pf(t){if(gc){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}gc=!1}Lr=0,Ot=ut=Pe=null,ns=!1,Sl=xc=0,rs=null}function nn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?Pe.memoizedState=Ot=t:Ot=Ot.next=t,Ot}function _t(){if(ut===null){var t=Pe.alternate;t=t!==null?t.memoizedState:null}else t=ut.next;var n=Ot===null?Pe.memoizedState:Ot.next;if(n!==null)Ot=n,ut=t;else{if(t===null)throw Pe.alternate===null?Error(o(467)):Error(o(310));ut=t,t={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Ot===null?Pe.memoizedState=Ot=t:Ot=Ot.next=t}return Ot}function vc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jl(t){var n=Sl;return Sl+=1,rs===null&&(rs=[]),t=ix(rs,t,n),n=Pe,(Ot===null?n.memoizedState:Ot.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Jx:Xf),t}function yc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return jl(t);if(t.$$typeof===T)return Vt(t)}throw Error(o(438,String(t)))}function If(t){var n=null,s=Pe.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var u=Pe.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(g){return g.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),s===null&&(s=vc(),Pe.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(t),u=0;u<t;u++)s[u]=q;return n.index++,s}function Pr(t,n){return typeof n=="function"?n(t):n}function bc(t){var n=_t();return Uf(n,ut,t)}function Uf(t,n,s){var u=t.queue;if(u===null)throw Error(o(311));u.lastRenderedReducer=s;var g=t.baseQueue,v=u.pending;if(v!==null){if(g!==null){var j=g.next;g.next=v.next,v.next=j}n.baseQueue=g=v,u.pending=null}if(v=t.baseState,g===null)t.memoizedState=v;else{n=g.next;var R=j=null,P=null,K=n,le=!1;do{var de=K.lane&-536870913;if(de!==K.lane?(Ge&de)===de:(Lr&de)===de){var J=K.revertLane;if(J===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),de===Zo&&(le=!0);else if((Lr&J)===J){K=K.next,J===Zo&&(le=!0);continue}else de={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},P===null?(R=P=de,j=v):P=P.next=de,Pe.lanes|=J,ba|=J;de=K.action,io&&s(v,de),v=K.hasEagerState?K.eagerState:s(v,de)}else J={lane:de,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},P===null?(R=P=J,j=v):P=P.next=J,Pe.lanes|=de,ba|=de;K=K.next}while(K!==null&&K!==n);if(P===null?j=v:P.next=R,!xn(v,t.memoizedState)&&(zt=!0,le&&(s=Qo,s!==null)))throw s;t.memoizedState=v,t.baseState=j,t.baseQueue=P,u.lastRenderedState=v}return g===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Bf(t){var n=_t(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=t;var u=s.dispatch,g=s.pending,v=n.memoizedState;if(g!==null){s.pending=null;var j=g=g.next;do v=t(v,j.action),j=j.next;while(j!==g);xn(v,n.memoizedState)||(zt=!0),n.memoizedState=v,n.baseQueue===null&&(n.baseState=v),s.lastRenderedState=v}return[v,u]}function yx(t,n,s){var u=Pe,g=_t(),v=Xe;if(v){if(s===void 0)throw Error(o(407));s=s()}else s=n();var j=!xn((ut||g).memoizedState,s);if(j&&(g.memoizedState=s,zt=!0),g=g.queue,$f(Sx.bind(null,u,g,t),[t]),g.getSnapshot!==n||j||Ot!==null&&Ot.memoizedState.tag&1){if(u.flags|=2048,as(9,{destroy:void 0},wx.bind(null,u,g,s,n),null),pt===null)throw Error(o(349));v||(Lr&127)!==0||bx(u,n,s)}return s}function bx(t,n,s){t.flags|=16384,t={getSnapshot:n,value:s},n=Pe.updateQueue,n===null?(n=vc(),Pe.updateQueue=n,n.stores=[t]):(s=n.stores,s===null?n.stores=[t]:s.push(t))}function wx(t,n,s,u){n.value=s,n.getSnapshot=u,jx(n)&&Nx(t)}function Sx(t,n,s){return s(function(){jx(n)&&Nx(t)})}function jx(t){var n=t.getSnapshot;t=t.value;try{var s=n();return!xn(t,s)}catch{return!0}}function Nx(t){var n=Ja(t,2);n!==null&&dn(n,t,2)}function Hf(t){var n=nn();if(typeof t=="function"){var s=t;if(t=s(),io){Ht(!0);try{s()}finally{Ht(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:t},n}function kx(t,n,s,u){return t.baseState=s,Uf(t,ut,typeof u=="function"?u:Pr)}function pR(t,n,s,u,g){if(jc(t))throw Error(o(485));if(t=n.action,t!==null){var v={payload:g,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){v.listeners.push(j)}};D.T!==null?s(!0):v.isTransition=!1,u(v),s=n.pending,s===null?(v.next=n.pending=v,Cx(n,v)):(v.next=s.next,n.pending=s.next=v)}}function Cx(t,n){var s=n.action,u=n.payload,g=t.state;if(n.isTransition){var v=D.T,j={};D.T=j;try{var R=s(g,u),P=D.S;P!==null&&P(j,R),Ex(t,n,R)}catch(K){Ff(t,n,K)}finally{v!==null&&j.types!==null&&(v.types=j.types),D.T=v}}else try{v=s(g,u),Ex(t,n,v)}catch(K){Ff(t,n,K)}}function Ex(t,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Rx(t,n,u)},function(u){return Ff(t,n,u)}):Rx(t,n,s)}function Rx(t,n,s){n.status="fulfilled",n.value=s,Tx(n),t.state=s,n=t.pending,n!==null&&(s=n.next,s===n?t.pending=null:(s=s.next,n.next=s,Cx(t,s)))}function Ff(t,n,s){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=s,Tx(n),n=n.next;while(n!==u)}t.action=null}function Tx(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function _x(t,n){return n}function Mx(t,n){if(Xe){var s=pt.formState;if(s!==null){e:{var u=Pe;if(Xe){if(yt){t:{for(var g=yt,v=zn;g.nodeType!==8;){if(!v){g=null;break t}if(g=Pn(g.nextSibling),g===null){g=null;break t}}v=g.data,g=v==="F!"||v==="F"?g:null}if(g){yt=Pn(g.nextSibling),u=g.data==="F!";break e}}da(u)}u=!1}u&&(n=s[0])}}return s=nn(),s.memoizedState=s.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_x,lastRenderedState:n},s.queue=u,s=Wx.bind(null,Pe,u),u.dispatch=s,u=Hf(!1),v=Kf.bind(null,Pe,!1,u.queue),u=nn(),g={state:n,dispatch:null,action:t,pending:null},u.queue=g,s=pR.bind(null,Pe,g,v,s),g.dispatch=s,u.memoizedState=t,[n,s,!1]}function Ax(t){var n=_t();return Dx(n,ut,t)}function Dx(t,n,s){if(n=Uf(t,n,_x)[0],t=bc(Pr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=jl(n)}catch(j){throw j===Jo?uc:j}else u=n;n=_t();var g=n.queue,v=g.dispatch;return s!==n.memoizedState&&(Pe.flags|=2048,as(9,{destroy:void 0},gR.bind(null,g,s),null)),[u,v,t]}function gR(t,n){t.action=n}function Ox(t){var n=_t(),s=ut;if(s!==null)return Dx(n,s,t);_t(),n=n.memoizedState,s=_t();var u=s.queue.dispatch;return s.memoizedState=t,[n,u,!1]}function as(t,n,s,u){return t={tag:t,create:s,deps:u,inst:n,next:null},n=Pe.updateQueue,n===null&&(n=vc(),Pe.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=t.next=t:(u=s.next,s.next=t,t.next=u,n.lastEffect=t),t}function zx(){return _t().memoizedState}function wc(t,n,s,u){var g=nn();Pe.flags|=t,g.memoizedState=as(1|n,{destroy:void 0},s,u===void 0?null:u)}function Sc(t,n,s,u){var g=_t();u=u===void 0?null:u;var v=g.memoizedState.inst;ut!==null&&u!==null&&Df(u,ut.memoizedState.deps)?g.memoizedState=as(n,v,s,u):(Pe.flags|=t,g.memoizedState=as(1|n,v,s,u))}function Lx(t,n){wc(8390656,8,t,n)}function $f(t,n){Sc(2048,8,t,n)}function xR(t){Pe.flags|=4;var n=Pe.updateQueue;if(n===null)n=vc(),Pe.updateQueue=n,n.events=[t];else{var s=n.events;s===null?n.events=[t]:s.push(t)}}function Px(t){var n=_t().memoizedState;return xR({ref:n,nextImpl:t}),function(){if((at&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function Ix(t,n){return Sc(4,2,t,n)}function Ux(t,n){return Sc(4,4,t,n)}function Bx(t,n){if(typeof n=="function"){t=t();var s=n(t);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Hx(t,n,s){s=s!=null?s.concat([t]):null,Sc(4,4,Bx.bind(null,n,t),s)}function Vf(){}function Fx(t,n){var s=_t();n=n===void 0?null:n;var u=s.memoizedState;return n!==null&&Df(n,u[1])?u[0]:(s.memoizedState=[t,n],t)}function $x(t,n){var s=_t();n=n===void 0?null:n;var u=s.memoizedState;if(n!==null&&Df(n,u[1]))return u[0];if(u=t(),io){Ht(!0);try{t()}finally{Ht(!1)}}return s.memoizedState=[u,n],u}function qf(t,n,s){return s===void 0||(Lr&1073741824)!==0&&(Ge&261930)===0?t.memoizedState=n:(t.memoizedState=s,t=Vv(),Pe.lanes|=t,ba|=t,s)}function Vx(t,n,s,u){return xn(s,n)?s:ts.current!==null?(t=qf(t,s,u),xn(t,n)||(zt=!0),t):(Lr&42)===0||(Lr&1073741824)!==0&&(Ge&261930)===0?(zt=!0,t.memoizedState=s):(t=Vv(),Pe.lanes|=t,ba|=t,n)}function qx(t,n,s,u,g){var v=V.p;V.p=v!==0&&8>v?v:8;var j=D.T,R={};D.T=R,Kf(t,!1,n,s);try{var P=g(),K=D.S;if(K!==null&&K(R,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var le=fR(P,u);Nl(t,n,le,jn(t))}else Nl(t,n,u,jn(t))}catch(de){Nl(t,n,{then:function(){},status:"rejected",reason:de},jn())}finally{V.p=v,j!==null&&R.types!==null&&(j.types=R.types),D.T=j}}function vR(){}function Gf(t,n,s,u){if(t.tag!==5)throw Error(o(476));var g=Gx(t).queue;qx(t,g,n,ae,s===null?vR:function(){return Yx(t),s(u)})}function Gx(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:ae},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pr,lastRenderedState:s},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Yx(t){var n=Gx(t);n.next===null&&(n=t.alternate.memoizedState),Nl(t,n.next.queue,{},jn())}function Yf(){return Vt(Hl)}function Kx(){return _t().memoizedState}function Xx(){return _t().memoizedState}function yR(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var s=jn();t=ha(s);var u=pa(n,t,s);u!==null&&(dn(u,n,s),yl(u,n,s)),n={cache:Sf()},t.payload=n;return}n=n.return}}function bR(t,n,s){var u=jn();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},jc(t)?Zx(n,s):(s=df(t,n,s,u),s!==null&&(dn(s,t,u),Qx(s,n,u)))}function Wx(t,n,s){var u=jn();Nl(t,n,s,u)}function Nl(t,n,s,u){var g={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(jc(t))Zx(n,g);else{var v=t.alternate;if(t.lanes===0&&(v===null||v.lanes===0)&&(v=n.lastRenderedReducer,v!==null))try{var j=n.lastRenderedState,R=v(j,s);if(g.hasEagerState=!0,g.eagerState=R,xn(R,j))return rc(t,n,g,0),pt===null&&nc(),!1}catch{}if(s=df(t,n,g,u),s!==null)return dn(s,t,u),Qx(s,n,u),!0}return!1}function Kf(t,n,s,u){if(u={lane:2,revertLane:Cm(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},jc(t)){if(n)throw Error(o(479))}else n=df(t,s,u,2),n!==null&&dn(n,t,2)}function jc(t){var n=t.alternate;return t===Pe||n!==null&&n===Pe}function Zx(t,n){ns=gc=!0;var s=t.pending;s===null?n.next=n:(n.next=s.next,s.next=n),t.pending=n}function Qx(t,n,s){if((s&4194048)!==0){var u=n.lanes;u&=t.pendingLanes,s|=u,n.lanes=s,Yi(t,s)}}var kl={readContext:Vt,use:yc,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};kl.useEffectEvent=Nt;var Jx={readContext:Vt,use:yc,useCallback:function(t,n){return nn().memoizedState=[t,n===void 0?null:n],t},useContext:Vt,useEffect:Lx,useImperativeHandle:function(t,n,s){s=s!=null?s.concat([t]):null,wc(4194308,4,Bx.bind(null,n,t),s)},useLayoutEffect:function(t,n){return wc(4194308,4,t,n)},useInsertionEffect:function(t,n){wc(4,2,t,n)},useMemo:function(t,n){var s=nn();n=n===void 0?null:n;var u=t();if(io){Ht(!0);try{t()}finally{Ht(!1)}}return s.memoizedState=[u,n],u},useReducer:function(t,n,s){var u=nn();if(s!==void 0){var g=s(n);if(io){Ht(!0);try{s(n)}finally{Ht(!1)}}}else g=n;return u.memoizedState=u.baseState=g,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:g},u.queue=t,t=t.dispatch=bR.bind(null,Pe,t),[u.memoizedState,t]},useRef:function(t){var n=nn();return t={current:t},n.memoizedState=t},useState:function(t){t=Hf(t);var n=t.queue,s=Wx.bind(null,Pe,n);return n.dispatch=s,[t.memoizedState,s]},useDebugValue:Vf,useDeferredValue:function(t,n){var s=nn();return qf(s,t,n)},useTransition:function(){var t=Hf(!1);return t=qx.bind(null,Pe,t.queue,!0,!1),nn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,s){var u=Pe,g=nn();if(Xe){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),pt===null)throw Error(o(349));(Ge&127)!==0||bx(u,n,s)}g.memoizedState=s;var v={value:s,getSnapshot:n};return g.queue=v,Lx(Sx.bind(null,u,v,t),[t]),u.flags|=2048,as(9,{destroy:void 0},wx.bind(null,u,v,s,n),null),s},useId:function(){var t=nn(),n=pt.identifierPrefix;if(Xe){var s=ir,u=lr;s=(u&~(1<<32-Kt(u)-1)).toString(32)+s,n="_"+n+"R_"+s,s=xc++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=mR++,n="_"+n+"r_"+s.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Yf,useFormState:Mx,useActionState:Mx,useOptimistic:function(t){var n=nn();n.memoizedState=n.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=Kf.bind(null,Pe,!0,s),s.dispatch=n,[t,n]},useMemoCache:If,useCacheRefresh:function(){return nn().memoizedState=yR.bind(null,Pe)},useEffectEvent:function(t){var n=nn(),s={impl:t};return n.memoizedState=s,function(){if((at&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Xf={readContext:Vt,use:yc,useCallback:Fx,useContext:Vt,useEffect:$f,useImperativeHandle:Hx,useInsertionEffect:Ix,useLayoutEffect:Ux,useMemo:$x,useReducer:bc,useRef:zx,useState:function(){return bc(Pr)},useDebugValue:Vf,useDeferredValue:function(t,n){var s=_t();return Vx(s,ut.memoizedState,t,n)},useTransition:function(){var t=bc(Pr)[0],n=_t().memoizedState;return[typeof t=="boolean"?t:jl(t),n]},useSyncExternalStore:yx,useId:Kx,useHostTransitionStatus:Yf,useFormState:Ax,useActionState:Ax,useOptimistic:function(t,n){var s=_t();return kx(s,ut,t,n)},useMemoCache:If,useCacheRefresh:Xx};Xf.useEffectEvent=Px;var ev={readContext:Vt,use:yc,useCallback:Fx,useContext:Vt,useEffect:$f,useImperativeHandle:Hx,useInsertionEffect:Ix,useLayoutEffect:Ux,useMemo:$x,useReducer:Bf,useRef:zx,useState:function(){return Bf(Pr)},useDebugValue:Vf,useDeferredValue:function(t,n){var s=_t();return ut===null?qf(s,t,n):Vx(s,ut.memoizedState,t,n)},useTransition:function(){var t=Bf(Pr)[0],n=_t().memoizedState;return[typeof t=="boolean"?t:jl(t),n]},useSyncExternalStore:yx,useId:Kx,useHostTransitionStatus:Yf,useFormState:Ox,useActionState:Ox,useOptimistic:function(t,n){var s=_t();return ut!==null?kx(s,ut,t,n):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:If,useCacheRefresh:Xx};ev.useEffectEvent=Px;function Wf(t,n,s,u){n=t.memoizedState,s=s(u,n),s=s==null?n:y({},n,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Zf={enqueueSetState:function(t,n,s){t=t._reactInternals;var u=jn(),g=ha(u);g.payload=n,s!=null&&(g.callback=s),n=pa(t,g,u),n!==null&&(dn(n,t,u),yl(n,t,u))},enqueueReplaceState:function(t,n,s){t=t._reactInternals;var u=jn(),g=ha(u);g.tag=1,g.payload=n,s!=null&&(g.callback=s),n=pa(t,g,u),n!==null&&(dn(n,t,u),yl(n,t,u))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var s=jn(),u=ha(s);u.tag=2,n!=null&&(u.callback=n),n=pa(t,u,s),n!==null&&(dn(n,t,s),yl(n,t,s))}};function tv(t,n,s,u,g,v,j){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,v,j):n.prototype&&n.prototype.isPureReactComponent?!dl(s,u)||!dl(g,v):!0}function nv(t,n,s,u){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,u),n.state!==t&&Zf.enqueueReplaceState(n,n.state,null)}function co(t,n){var s=n;if("ref"in n){s={};for(var u in n)u!=="ref"&&(s[u]=n[u])}if(t=t.defaultProps){s===n&&(s=y({},s));for(var g in t)s[g]===void 0&&(s[g]=t[g])}return s}function rv(t){tc(t)}function av(t){console.error(t)}function ov(t){tc(t)}function Nc(t,n){try{var s=t.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function sv(t,n,s){try{var u=t.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Qf(t,n,s){return s=ha(s),s.tag=3,s.payload={element:null},s.callback=function(){Nc(t,n)},s}function lv(t){return t=ha(t),t.tag=3,t}function iv(t,n,s,u){var g=s.type.getDerivedStateFromError;if(typeof g=="function"){var v=u.value;t.payload=function(){return g(v)},t.callback=function(){sv(n,s,u)}}var j=s.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(t.callback=function(){sv(n,s,u),typeof g!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var R=u.stack;this.componentDidCatch(u.value,{componentStack:R!==null?R:""})})}function wR(t,n,s,u,g){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=s.alternate,n!==null&&Wo(n,s,g,!0),s=yn.current,s!==null){switch(s.tag){case 31:case 13:return Ln===null?Lc():s.alternate===null&&kt===0&&(kt=3),s.flags&=-257,s.flags|=65536,s.lanes=g,u===dc?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([u]):n.add(u),jm(t,u,g)),!1;case 22:return s.flags|=65536,u===dc?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([u]):s.add(u)),jm(t,u,g)),!1}throw Error(o(435,s.tag))}return jm(t,u,g),Lc(),!1}if(Xe)return n=yn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=g,u!==xf&&(t=Error(o(422),{cause:u}),hl(An(t,s)))):(u!==xf&&(n=Error(o(423),{cause:u}),hl(An(n,s))),t=t.current.alternate,t.flags|=65536,g&=-g,t.lanes|=g,u=An(u,s),g=Qf(t.stateNode,u,g),Rf(t,g),kt!==4&&(kt=2)),!1;var v=Error(o(520),{cause:u});if(v=An(v,s),Dl===null?Dl=[v]:Dl.push(v),kt!==4&&(kt=2),n===null)return!0;u=An(u,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,t=g&-g,s.lanes|=t,t=Qf(s.stateNode,u,t),Rf(s,t),!1;case 1:if(n=s.type,v=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(wa===null||!wa.has(v))))return s.flags|=65536,g&=-g,s.lanes|=g,g=lv(g),iv(g,t,s,u),Rf(s,g),!1}s=s.return}while(s!==null);return!1}var Jf=Error(o(461)),zt=!1;function qt(t,n,s,u){n.child=t===null?fx(n,null,s,u):lo(n,t.child,s,u)}function cv(t,n,s,u,g){s=s.render;var v=n.ref;if("ref"in u){var j={};for(var R in u)R!=="ref"&&(j[R]=u[R])}else j=u;return ro(n),u=Of(t,n,s,j,v,g),R=zf(),t!==null&&!zt?(Lf(t,n,g),Ir(t,n,g)):(Xe&&R&&pf(n),n.flags|=1,qt(t,n,u,g),n.child)}function uv(t,n,s,u,g){if(t===null){var v=s.type;return typeof v=="function"&&!ff(v)&&v.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=v,dv(t,n,v,u,g)):(t=oc(s.type,null,u,n,n.mode,g),t.ref=n.ref,t.return=n,n.child=t)}if(v=t.child,!lm(t,g)){var j=v.memoizedProps;if(s=s.compare,s=s!==null?s:dl,s(j,u)&&t.ref===n.ref)return Ir(t,n,g)}return n.flags|=1,t=Ar(v,u),t.ref=n.ref,t.return=n,n.child=t}function dv(t,n,s,u,g){if(t!==null){var v=t.memoizedProps;if(dl(v,u)&&t.ref===n.ref)if(zt=!1,n.pendingProps=u=v,lm(t,g))(t.flags&131072)!==0&&(zt=!0);else return n.lanes=t.lanes,Ir(t,n,g)}return em(t,n,s,u,g)}function fv(t,n,s,u){var g=u.children,v=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(v=v!==null?v.baseLanes|s:s,t!==null){for(u=n.child=t.child,g=0;u!==null;)g=g|u.lanes|u.childLanes,u=u.sibling;u=g&~v}else u=0,n.child=null;return mv(t,n,v,s,u)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&cc(n,v!==null?v.cachePool:null),v!==null?px(n,v):_f(),gx(n);else return u=n.lanes=536870912,mv(t,n,v!==null?v.baseLanes|s:s,s,u)}else v!==null?(cc(n,v.cachePool),px(n,v),xa(),n.memoizedState=null):(t!==null&&cc(n,null),_f(),xa());return qt(t,n,g,s),n.child}function Cl(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function mv(t,n,s,u,g){var v=Nf();return v=v===null?null:{parent:Dt._currentValue,pool:v},n.memoizedState={baseLanes:s,cachePool:v},t!==null&&cc(n,null),_f(),gx(n),t!==null&&Wo(t,n,u,!0),n.childLanes=g,null}function kc(t,n){return n=Ec({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function hv(t,n,s){return lo(n,t.child,null,s),t=kc(n,n.pendingProps),t.flags|=2,bn(n),n.memoizedState=null,t}function SR(t,n,s){var u=n.pendingProps,g=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Xe){if(u.mode==="hidden")return t=kc(n,u),n.lanes=536870912,Cl(null,t);if(Af(n),(t=yt)?(t=Cy(t,zn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ca!==null?{id:lr,overflow:ir}:null,retryLane:536870912,hydrationErrors:null},s=Z0(t),s.return=n,n.child=s,$t=n,yt=null)):t=null,t===null)throw da(n);return n.lanes=536870912,null}return kc(n,u)}var v=t.memoizedState;if(v!==null){var j=v.dehydrated;if(Af(n),g)if(n.flags&256)n.flags&=-257,n=hv(t,n,s);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(o(558));else if(zt||Wo(t,n,s,!1),g=(s&t.childLanes)!==0,zt||g){if(u=pt,u!==null&&(j=I(u,s),j!==0&&j!==v.retryLane))throw v.retryLane=j,Ja(t,j),dn(u,t,j),Jf;Lc(),n=hv(t,n,s)}else t=v.treeContext,yt=Pn(j.nextSibling),$t=n,Xe=!0,ua=null,zn=!1,t!==null&&ex(n,t),n=kc(n,u),n.flags|=4096;return n}return t=Ar(t.child,{mode:u.mode,children:u.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Cc(t,n){var s=n.ref;if(s===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(t===null||t.ref!==s)&&(n.flags|=4194816)}}function em(t,n,s,u,g){return ro(n),s=Of(t,n,s,u,void 0,g),u=zf(),t!==null&&!zt?(Lf(t,n,g),Ir(t,n,g)):(Xe&&u&&pf(n),n.flags|=1,qt(t,n,s,g),n.child)}function pv(t,n,s,u,g,v){return ro(n),n.updateQueue=null,s=vx(n,u,s,g),xx(t),u=zf(),t!==null&&!zt?(Lf(t,n,v),Ir(t,n,v)):(Xe&&u&&pf(n),n.flags|=1,qt(t,n,s,v),n.child)}function gv(t,n,s,u,g){if(ro(n),n.stateNode===null){var v=Go,j=s.contextType;typeof j=="object"&&j!==null&&(v=Vt(j)),v=new s(u,v),n.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Zf,n.stateNode=v,v._reactInternals=n,v=n.stateNode,v.props=u,v.state=n.memoizedState,v.refs={},Cf(n),j=s.contextType,v.context=typeof j=="object"&&j!==null?Vt(j):Go,v.state=n.memoizedState,j=s.getDerivedStateFromProps,typeof j=="function"&&(Wf(n,s,j,u),v.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(j=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),j!==v.state&&Zf.enqueueReplaceState(v,v.state,null),wl(n,u,v,g),bl(),v.state=n.memoizedState),typeof v.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(t===null){v=n.stateNode;var R=n.memoizedProps,P=co(s,R);v.props=P;var K=v.context,le=s.contextType;j=Go,typeof le=="object"&&le!==null&&(j=Vt(le));var de=s.getDerivedStateFromProps;le=typeof de=="function"||typeof v.getSnapshotBeforeUpdate=="function",R=n.pendingProps!==R,le||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(R||K!==j)&&nv(n,v,u,j),ma=!1;var J=n.memoizedState;v.state=J,wl(n,u,v,g),bl(),K=n.memoizedState,R||J!==K||ma?(typeof de=="function"&&(Wf(n,s,de,u),K=n.memoizedState),(P=ma||tv(n,s,P,u,J,K,j))?(le||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(n.flags|=4194308)):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=K),v.props=u,v.state=K,v.context=j,u=P):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{v=n.stateNode,Ef(t,n),j=n.memoizedProps,le=co(s,j),v.props=le,de=n.pendingProps,J=v.context,K=s.contextType,P=Go,typeof K=="object"&&K!==null&&(P=Vt(K)),R=s.getDerivedStateFromProps,(K=typeof R=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j!==de||J!==P)&&nv(n,v,u,P),ma=!1,J=n.memoizedState,v.state=J,wl(n,u,v,g),bl();var ne=n.memoizedState;j!==de||J!==ne||ma||t!==null&&t.dependencies!==null&&lc(t.dependencies)?(typeof R=="function"&&(Wf(n,s,R,u),ne=n.memoizedState),(le=ma||tv(n,s,le,u,J,ne,P)||t!==null&&t.dependencies!==null&&lc(t.dependencies))?(K||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,ne,P),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,ne,P)),typeof v.componentDidUpdate=="function"&&(n.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof v.componentDidUpdate!="function"||j===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=ne),v.props=u,v.state=ne,v.context=P,u=le):(typeof v.componentDidUpdate!="function"||j===t.memoizedProps&&J===t.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||j===t.memoizedProps&&J===t.memoizedState||(n.flags|=1024),u=!1)}return v=u,Cc(t,n),u=(n.flags&128)!==0,v||u?(v=n.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:v.render(),n.flags|=1,t!==null&&u?(n.child=lo(n,t.child,null,g),n.child=lo(n,null,s,g)):qt(t,n,s,g),n.memoizedState=v.state,t=n.child):t=Ir(t,n,g),t}function xv(t,n,s,u){return to(),n.flags|=256,qt(t,n,s,u),n.child}var tm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nm(t){return{baseLanes:t,cachePool:sx()}}function rm(t,n,s){return t=t!==null?t.childLanes&~s:0,n&&(t|=Sn),t}function vv(t,n,s){var u=n.pendingProps,g=!1,v=(n.flags&128)!==0,j;if((j=v)||(j=t!==null&&t.memoizedState===null?!1:(Tt.current&2)!==0),j&&(g=!0,n.flags&=-129),j=(n.flags&32)!==0,n.flags&=-33,t===null){if(Xe){if(g?ga(n):xa(),(t=yt)?(t=Cy(t,zn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:ca!==null?{id:lr,overflow:ir}:null,retryLane:536870912,hydrationErrors:null},s=Z0(t),s.return=n,n.child=s,$t=n,yt=null)):t=null,t===null)throw da(n);return Um(t)?n.lanes=32:n.lanes=536870912,null}var R=u.children;return u=u.fallback,g?(xa(),g=n.mode,R=Ec({mode:"hidden",children:R},g),u=eo(u,g,s,null),R.return=n,u.return=n,R.sibling=u,n.child=R,u=n.child,u.memoizedState=nm(s),u.childLanes=rm(t,j,s),n.memoizedState=tm,Cl(null,u)):(ga(n),am(n,R))}var P=t.memoizedState;if(P!==null&&(R=P.dehydrated,R!==null)){if(v)n.flags&256?(ga(n),n.flags&=-257,n=om(t,n,s)):n.memoizedState!==null?(xa(),n.child=t.child,n.flags|=128,n=null):(xa(),R=u.fallback,g=n.mode,u=Ec({mode:"visible",children:u.children},g),R=eo(R,g,s,null),R.flags|=2,u.return=n,R.return=n,u.sibling=R,n.child=u,lo(n,t.child,null,s),u=n.child,u.memoizedState=nm(s),u.childLanes=rm(t,j,s),n.memoizedState=tm,n=Cl(null,u));else if(ga(n),Um(R)){if(j=R.nextSibling&&R.nextSibling.dataset,j)var K=j.dgst;j=K,u=Error(o(419)),u.stack="",u.digest=j,hl({value:u,source:null,stack:null}),n=om(t,n,s)}else if(zt||Wo(t,n,s,!1),j=(s&t.childLanes)!==0,zt||j){if(j=pt,j!==null&&(u=I(j,s),u!==0&&u!==P.retryLane))throw P.retryLane=u,Ja(t,u),dn(j,t,u),Jf;Im(R)||Lc(),n=om(t,n,s)}else Im(R)?(n.flags|=192,n.child=t.child,n=null):(t=P.treeContext,yt=Pn(R.nextSibling),$t=n,Xe=!0,ua=null,zn=!1,t!==null&&ex(n,t),n=am(n,u.children),n.flags|=4096);return n}return g?(xa(),R=u.fallback,g=n.mode,P=t.child,K=P.sibling,u=Ar(P,{mode:"hidden",children:u.children}),u.subtreeFlags=P.subtreeFlags&65011712,K!==null?R=Ar(K,R):(R=eo(R,g,s,null),R.flags|=2),R.return=n,u.return=n,u.sibling=R,n.child=u,Cl(null,u),u=n.child,R=t.child.memoizedState,R===null?R=nm(s):(g=R.cachePool,g!==null?(P=Dt._currentValue,g=g.parent!==P?{parent:P,pool:P}:g):g=sx(),R={baseLanes:R.baseLanes|s,cachePool:g}),u.memoizedState=R,u.childLanes=rm(t,j,s),n.memoizedState=tm,Cl(t.child,u)):(ga(n),s=t.child,t=s.sibling,s=Ar(s,{mode:"visible",children:u.children}),s.return=n,s.sibling=null,t!==null&&(j=n.deletions,j===null?(n.deletions=[t],n.flags|=16):j.push(t)),n.child=s,n.memoizedState=null,s)}function am(t,n){return n=Ec({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Ec(t,n){return t=vn(22,t,null,n),t.lanes=0,t}function om(t,n,s){return lo(n,t.child,null,s),t=am(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function yv(t,n,s){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),bf(t.return,n,s)}function sm(t,n,s,u,g,v){var j=t.memoizedState;j===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:g,treeForkCount:v}:(j.isBackwards=n,j.rendering=null,j.renderingStartTime=0,j.last=u,j.tail=s,j.tailMode=g,j.treeForkCount=v)}function bv(t,n,s){var u=n.pendingProps,g=u.revealOrder,v=u.tail;u=u.children;var j=Tt.current,R=(j&2)!==0;if(R?(j=j&1|2,n.flags|=128):j&=1,G(Tt,j),qt(t,n,u,s),u=Xe?ml:0,!R&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&yv(t,s,n);else if(t.tag===19)yv(t,s,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(g){case"forwards":for(s=n.child,g=null;s!==null;)t=s.alternate,t!==null&&pc(t)===null&&(g=s),s=s.sibling;s=g,s===null?(g=n.child,n.child=null):(g=s.sibling,s.sibling=null),sm(n,!1,g,s,v,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,g=n.child,n.child=null;g!==null;){if(t=g.alternate,t!==null&&pc(t)===null){n.child=g;break}t=g.sibling,g.sibling=s,s=g,g=t}sm(n,!0,s,null,v,u);break;case"together":sm(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function Ir(t,n,s){if(t!==null&&(n.dependencies=t.dependencies),ba|=n.lanes,(s&n.childLanes)===0)if(t!==null){if(Wo(t,n,s,!1),(s&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(o(153));if(n.child!==null){for(t=n.child,s=Ar(t,t.pendingProps),n.child=s,s.return=n;t.sibling!==null;)t=t.sibling,s=s.sibling=Ar(t,t.pendingProps),s.return=n;s.sibling=null}return n.child}function lm(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&lc(t)))}function jR(t,n,s){switch(n.tag){case 3:Ne(n,n.stateNode.containerInfo),fa(n,Dt,t.memoizedState.cache),to();break;case 27:case 5:Fe(n);break;case 4:Ne(n,n.stateNode.containerInfo);break;case 10:fa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Af(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(ga(n),n.flags|=128,null):(s&n.child.childLanes)!==0?vv(t,n,s):(ga(n),t=Ir(t,n,s),t!==null?t.sibling:null);ga(n);break;case 19:var g=(t.flags&128)!==0;if(u=(s&n.childLanes)!==0,u||(Wo(t,n,s,!1),u=(s&n.childLanes)!==0),g){if(u)return bv(t,n,s);n.flags|=128}if(g=n.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),G(Tt,Tt.current),u)break;return null;case 22:return n.lanes=0,fv(t,n,s,n.pendingProps);case 24:fa(n,Dt,t.memoizedState.cache)}return Ir(t,n,s)}function wv(t,n,s){if(t!==null)if(t.memoizedProps!==n.pendingProps)zt=!0;else{if(!lm(t,s)&&(n.flags&128)===0)return zt=!1,jR(t,n,s);zt=(t.flags&131072)!==0}else zt=!1,Xe&&(n.flags&1048576)!==0&&J0(n,ml,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(t=oo(n.elementType),n.type=t,typeof t=="function")ff(t)?(u=co(t,u),n.tag=1,n=gv(null,n,t,u,s)):(n.tag=0,n=em(null,n,t,u,s));else{if(t!=null){var g=t.$$typeof;if(g===M){n.tag=11,n=cv(null,n,t,u,s);break e}else if(g===B){n.tag=14,n=uv(null,n,t,u,s);break e}}throw n=te(t)||t,Error(o(306,n,""))}}return n;case 0:return em(t,n,n.type,n.pendingProps,s);case 1:return u=n.type,g=co(u,n.pendingProps),gv(t,n,u,g,s);case 3:e:{if(Ne(n,n.stateNode.containerInfo),t===null)throw Error(o(387));u=n.pendingProps;var v=n.memoizedState;g=v.element,Ef(t,n),wl(n,u,null,s);var j=n.memoizedState;if(u=j.cache,fa(n,Dt,u),u!==v.cache&&wf(n,[Dt],s,!0),bl(),u=j.element,v.isDehydrated)if(v={element:u,isDehydrated:!1,cache:j.cache},n.updateQueue.baseState=v,n.memoizedState=v,n.flags&256){n=xv(t,n,u,s);break e}else if(u!==g){g=An(Error(o(424)),n),hl(g),n=xv(t,n,u,s);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,yt=Pn(t.firstChild),$t=n,Xe=!0,ua=null,zn=!0,s=fx(n,null,u,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(to(),u===g){n=Ir(t,n,s);break e}qt(t,n,u,s)}n=n.child}return n;case 26:return Cc(t,n),t===null?(s=Ay(n.type,null,n.pendingProps,null))?n.memoizedState=s:Xe||(s=n.type,t=n.pendingProps,u=$c(ge.current).createElement(s),u[ye]=n,u[we]=t,Gt(u,s,t),Ze(u),n.stateNode=u):n.memoizedState=Ay(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Fe(n),t===null&&Xe&&(u=n.stateNode=Ty(n.type,n.pendingProps,ge.current),$t=n,zn=!0,g=yt,ka(n.type)?(Bm=g,yt=Pn(u.firstChild)):yt=g),qt(t,n,n.pendingProps.children,s),Cc(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Xe&&((g=u=yt)&&(u=JR(u,n.type,n.pendingProps,zn),u!==null?(n.stateNode=u,$t=n,yt=Pn(u.firstChild),zn=!1,g=!0):g=!1),g||da(n)),Fe(n),g=n.type,v=n.pendingProps,j=t!==null?t.memoizedProps:null,u=v.children,zm(g,v)?u=null:j!==null&&zm(g,j)&&(n.flags|=32),n.memoizedState!==null&&(g=Of(t,n,hR,null,null,s),Hl._currentValue=g),Cc(t,n),qt(t,n,u,s),n.child;case 6:return t===null&&Xe&&((t=s=yt)&&(s=eT(s,n.pendingProps,zn),s!==null?(n.stateNode=s,$t=n,yt=null,t=!0):t=!1),t||da(n)),null;case 13:return vv(t,n,s);case 4:return Ne(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=lo(n,null,u,s):qt(t,n,u,s),n.child;case 11:return cv(t,n,n.type,n.pendingProps,s);case 7:return qt(t,n,n.pendingProps,s),n.child;case 8:return qt(t,n,n.pendingProps.children,s),n.child;case 12:return qt(t,n,n.pendingProps.children,s),n.child;case 10:return u=n.pendingProps,fa(n,n.type,u.value),qt(t,n,u.children,s),n.child;case 9:return g=n.type._context,u=n.pendingProps.children,ro(n),g=Vt(g),u=u(g),n.flags|=1,qt(t,n,u,s),n.child;case 14:return uv(t,n,n.type,n.pendingProps,s);case 15:return dv(t,n,n.type,n.pendingProps,s);case 19:return bv(t,n,s);case 31:return SR(t,n,s);case 22:return fv(t,n,s,n.pendingProps);case 24:return ro(n),u=Vt(Dt),t===null?(g=Nf(),g===null&&(g=pt,v=Sf(),g.pooledCache=v,v.refCount++,v!==null&&(g.pooledCacheLanes|=s),g=v),n.memoizedState={parent:u,cache:g},Cf(n),fa(n,Dt,g)):((t.lanes&s)!==0&&(Ef(t,n),wl(n,null,null,s),bl()),g=t.memoizedState,v=n.memoizedState,g.parent!==u?(g={parent:u,cache:u},n.memoizedState=g,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=g),fa(n,Dt,u)):(u=v.cache,fa(n,Dt,u),u!==g.cache&&wf(n,[Dt],s,!0))),qt(t,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Ur(t){t.flags|=4}function im(t,n,s,u,g){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(g&335544128)===g)if(t.stateNode.complete)t.flags|=8192;else if(Kv())t.flags|=8192;else throw so=dc,kf}else t.flags&=-16777217}function Sv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Py(n))if(Kv())t.flags|=8192;else throw so=dc,kf}function Rc(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?nl():536870912,t.lanes|=n,is|=n)}function El(t,n){if(!Xe)switch(t.tailMode){case"hidden":n=t.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function bt(t){var n=t.alternate!==null&&t.alternate.child===t.child,s=0,u=0;if(n)for(var g=t.child;g!==null;)s|=g.lanes|g.childLanes,u|=g.subtreeFlags&65011712,u|=g.flags&65011712,g.return=t,g=g.sibling;else for(g=t.child;g!==null;)s|=g.lanes|g.childLanes,u|=g.subtreeFlags,u|=g.flags,g.return=t,g=g.sibling;return t.subtreeFlags|=u,t.childLanes=s,n}function NR(t,n,s){var u=n.pendingProps;switch(gf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(n),null;case 1:return bt(n),null;case 3:return s=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),zr(Dt),Ce(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(Xo(n)?Ur(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,vf())),bt(n),null;case 26:var g=n.type,v=n.memoizedState;return t===null?(Ur(n),v!==null?(bt(n),Sv(n,v)):(bt(n),im(n,g,null,u,s))):v?v!==t.memoizedState?(Ur(n),bt(n),Sv(n,v)):(bt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==u&&Ur(n),bt(n),im(n,g,t,u,s)),null;case 27:if(rt(n),s=ge.current,g=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&Ur(n);else{if(!u){if(n.stateNode===null)throw Error(o(166));return bt(n),null}t=se.current,Xo(n)?tx(n):(t=Ty(g,u,s),n.stateNode=t,Ur(n))}return bt(n),null;case 5:if(rt(n),g=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&Ur(n);else{if(!u){if(n.stateNode===null)throw Error(o(166));return bt(n),null}if(v=se.current,Xo(n))tx(n);else{var j=$c(ge.current);switch(v){case 1:v=j.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:v=j.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":v=j.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":v=j.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":v=j.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof u.is=="string"?j.createElement("select",{is:u.is}):j.createElement("select"),u.multiple?v.multiple=!0:u.size&&(v.size=u.size);break;default:v=typeof u.is=="string"?j.createElement(g,{is:u.is}):j.createElement(g)}}v[ye]=n,v[we]=u;e:for(j=n.child;j!==null;){if(j.tag===5||j.tag===6)v.appendChild(j.stateNode);else if(j.tag!==4&&j.tag!==27&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===n)break e;for(;j.sibling===null;){if(j.return===null||j.return===n)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}n.stateNode=v;e:switch(Gt(v,g,u),g){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Ur(n)}}return bt(n),im(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,s),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&Ur(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(o(166));if(t=ge.current,Xo(n)){if(t=n.stateNode,s=n.memoizedProps,u=null,g=$t,g!==null)switch(g.tag){case 27:case 5:u=g.memoizedProps}t[ye]=n,t=!!(t.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||vy(t.nodeValue,s)),t||da(n,!0)}else t=$c(t).createTextNode(u),t[ye]=n,n.stateNode=t}return bt(n),null;case 31:if(s=n.memoizedState,t===null||t.memoizedState!==null){if(u=Xo(n),s!==null){if(t===null){if(!u)throw Error(o(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[ye]=n}else to(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),t=!1}else s=vf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return n.flags&256?(bn(n),n):(bn(n),null);if((n.flags&128)!==0)throw Error(o(558))}return bt(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(g=Xo(n),u!==null&&u.dehydrated!==null){if(t===null){if(!g)throw Error(o(318));if(g=n.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[ye]=n}else to(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;bt(n),g=!1}else g=vf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=g),g=!0;if(!g)return n.flags&256?(bn(n),n):(bn(n),null)}return bn(n),(n.flags&128)!==0?(n.lanes=s,n):(s=u!==null,t=t!==null&&t.memoizedState!==null,s&&(u=n.child,g=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(g=u.alternate.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==g&&(u.flags|=2048)),s!==t&&s&&(n.child.flags|=8192),Rc(n,n.updateQueue),bt(n),null);case 4:return Ce(),t===null&&_m(n.stateNode.containerInfo),bt(n),null;case 10:return zr(n.type),bt(n),null;case 19:if(z(Tt),u=n.memoizedState,u===null)return bt(n),null;if(g=(n.flags&128)!==0,v=u.rendering,v===null)if(g)El(u,!1);else{if(kt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(v=pc(t),v!==null){for(n.flags|=128,El(u,!1),t=v.updateQueue,n.updateQueue=t,Rc(n,t),n.subtreeFlags=0,t=s,s=n.child;s!==null;)W0(s,t),s=s.sibling;return G(Tt,Tt.current&1|2),Xe&&Dr(n,u.treeForkCount),n.child}t=t.sibling}u.tail!==null&&Qt()>Dc&&(n.flags|=128,g=!0,El(u,!1),n.lanes=4194304)}else{if(!g)if(t=pc(v),t!==null){if(n.flags|=128,g=!0,t=t.updateQueue,n.updateQueue=t,Rc(n,t),El(u,!0),u.tail===null&&u.tailMode==="hidden"&&!v.alternate&&!Xe)return bt(n),null}else 2*Qt()-u.renderingStartTime>Dc&&s!==536870912&&(n.flags|=128,g=!0,El(u,!1),n.lanes=4194304);u.isBackwards?(v.sibling=n.child,n.child=v):(t=u.last,t!==null?t.sibling=v:n.child=v,u.last=v)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=Qt(),t.sibling=null,s=Tt.current,G(Tt,g?s&1|2:s&1),Xe&&Dr(n,u.treeForkCount),t):(bt(n),null);case 22:case 23:return bn(n),Mf(),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(s&536870912)!==0&&(n.flags&128)===0&&(bt(n),n.subtreeFlags&6&&(n.flags|=8192)):bt(n),s=n.updateQueue,s!==null&&Rc(n,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==s&&(n.flags|=2048),t!==null&&z(ao),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),zr(Dt),bt(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function kR(t,n){switch(gf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return zr(Dt),Ce(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return rt(n),null;case 31:if(n.memoizedState!==null){if(bn(n),n.alternate===null)throw Error(o(340));to()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(bn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(o(340));to()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return z(Tt),null;case 4:return Ce(),null;case 10:return zr(n.type),null;case 22:case 23:return bn(n),Mf(),t!==null&&z(ao),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return zr(Dt),null;case 25:return null;default:return null}}function jv(t,n){switch(gf(n),n.tag){case 3:zr(Dt),Ce();break;case 26:case 27:case 5:rt(n);break;case 4:Ce();break;case 31:n.memoizedState!==null&&bn(n);break;case 13:bn(n);break;case 19:z(Tt);break;case 10:zr(n.type);break;case 22:case 23:bn(n),Mf(),t!==null&&z(ao);break;case 24:zr(Dt)}}function Rl(t,n){try{var s=n.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var g=u.next;s=g;do{if((s.tag&t)===t){u=void 0;var v=s.create,j=s.inst;u=v(),j.destroy=u}s=s.next}while(s!==g)}}catch(R){ct(n,n.return,R)}}function va(t,n,s){try{var u=n.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var v=g.next;u=v;do{if((u.tag&t)===t){var j=u.inst,R=j.destroy;if(R!==void 0){j.destroy=void 0,g=n;var P=s,K=R;try{K()}catch(le){ct(g,P,le)}}}u=u.next}while(u!==v)}}catch(le){ct(n,n.return,le)}}function Nv(t){var n=t.updateQueue;if(n!==null){var s=t.stateNode;try{hx(n,s)}catch(u){ct(t,t.return,u)}}}function kv(t,n,s){s.props=co(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(u){ct(t,n,u)}}function Tl(t,n){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof s=="function"?t.refCleanup=s(u):s.current=u}}catch(g){ct(t,n,g)}}function cr(t,n){var s=t.ref,u=t.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(g){ct(t,n,g)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(g){ct(t,n,g)}else s.current=null}function Cv(t){var n=t.type,s=t.memoizedProps,u=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(g){ct(t,t.return,g)}}function cm(t,n,s){try{var u=t.stateNode;YR(u,t.type,s,n),u[we]=n}catch(g){ct(t,t.return,g)}}function Ev(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ka(t.type)||t.tag===4}function um(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ev(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&ka(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function dm(t,n,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(t),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=_r));else if(u!==4&&(u===27&&ka(t.type)&&(s=t.stateNode,n=null),t=t.child,t!==null))for(dm(t,n,s),t=t.sibling;t!==null;)dm(t,n,s),t=t.sibling}function Tc(t,n,s){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?s.insertBefore(t,n):s.appendChild(t);else if(u!==4&&(u===27&&ka(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(Tc(t,n,s),t=t.sibling;t!==null;)Tc(t,n,s),t=t.sibling}function Rv(t){var n=t.stateNode,s=t.memoizedProps;try{for(var u=t.type,g=n.attributes;g.length;)n.removeAttributeNode(g[0]);Gt(n,u,s),n[ye]=t,n[we]=s}catch(v){ct(t,t.return,v)}}var Br=!1,Lt=!1,fm=!1,Tv=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function CR(t,n){if(t=t.containerInfo,Dm=Wc,t=H0(t),af(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var g=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var j=0,R=-1,P=-1,K=0,le=0,de=t,J=null;t:for(;;){for(var ne;de!==s||g!==0&&de.nodeType!==3||(R=j+g),de!==v||u!==0&&de.nodeType!==3||(P=j+u),de.nodeType===3&&(j+=de.nodeValue.length),(ne=de.firstChild)!==null;)J=de,de=ne;for(;;){if(de===t)break t;if(J===s&&++K===g&&(R=j),J===v&&++le===u&&(P=j),(ne=de.nextSibling)!==null)break;de=J,J=de.parentNode}de=ne}s=R===-1||P===-1?null:{start:R,end:P}}else s=null}s=s||{start:0,end:0}}else s=null;for(Om={focusedElem:t,selectionRange:s},Wc=!1,Ft=n;Ft!==null;)if(n=Ft,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Ft=t;else for(;Ft!==null;){switch(n=Ft,v=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)g=t[s],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&v!==null){t=void 0,s=n,g=v.memoizedProps,v=v.memoizedState,u=s.stateNode;try{var je=co(s.type,g);t=u.getSnapshotBeforeUpdate(je,v),u.__reactInternalSnapshotBeforeUpdate=t}catch(Me){ct(s,s.return,Me)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,s=t.nodeType,s===9)Pm(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Pm(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(o(163))}if(t=n.sibling,t!==null){t.return=n.return,Ft=t;break}Ft=n.return}}function _v(t,n,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:Fr(t,s),u&4&&Rl(5,s);break;case 1:if(Fr(t,s),u&4)if(t=s.stateNode,n===null)try{t.componentDidMount()}catch(j){ct(s,s.return,j)}else{var g=co(s.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(g,n,t.__reactInternalSnapshotBeforeUpdate)}catch(j){ct(s,s.return,j)}}u&64&&Nv(s),u&512&&Tl(s,s.return);break;case 3:if(Fr(t,s),u&64&&(t=s.updateQueue,t!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{hx(t,n)}catch(j){ct(s,s.return,j)}}break;case 27:n===null&&u&4&&Rv(s);case 26:case 5:Fr(t,s),n===null&&u&4&&Cv(s),u&512&&Tl(s,s.return);break;case 12:Fr(t,s);break;case 31:Fr(t,s),u&4&&Dv(t,s);break;case 13:Fr(t,s),u&4&&Ov(t,s),u&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=zR.bind(null,s),tT(t,s))));break;case 22:if(u=s.memoizedState!==null||Br,!u){n=n!==null&&n.memoizedState!==null||Lt,g=Br;var v=Lt;Br=u,(Lt=n)&&!v?$r(t,s,(s.subtreeFlags&8772)!==0):Fr(t,s),Br=g,Lt=v}break;case 30:break;default:Fr(t,s)}}function Mv(t){var n=t.alternate;n!==null&&(t.alternate=null,Mv(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Je(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var jt=null,sn=!1;function Hr(t,n,s){for(s=s.child;s!==null;)Av(t,n,s),s=s.sibling}function Av(t,n,s){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(kr,s)}catch{}switch(s.tag){case 26:Lt||cr(s,n),Hr(t,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Lt||cr(s,n);var u=jt,g=sn;ka(s.type)&&(jt=s.stateNode,sn=!1),Hr(t,n,s),Il(s.stateNode),jt=u,sn=g;break;case 5:Lt||cr(s,n);case 6:if(u=jt,g=sn,jt=null,Hr(t,n,s),jt=u,sn=g,jt!==null)if(sn)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(s.stateNode)}catch(v){ct(s,n,v)}else try{jt.removeChild(s.stateNode)}catch(v){ct(s,n,v)}break;case 18:jt!==null&&(sn?(t=jt,Ny(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),gs(t)):Ny(jt,s.stateNode));break;case 4:u=jt,g=sn,jt=s.stateNode.containerInfo,sn=!0,Hr(t,n,s),jt=u,sn=g;break;case 0:case 11:case 14:case 15:va(2,s,n),Lt||va(4,s,n),Hr(t,n,s);break;case 1:Lt||(cr(s,n),u=s.stateNode,typeof u.componentWillUnmount=="function"&&kv(s,n,u)),Hr(t,n,s);break;case 21:Hr(t,n,s);break;case 22:Lt=(u=Lt)||s.memoizedState!==null,Hr(t,n,s),Lt=u;break;default:Hr(t,n,s)}}function Dv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{gs(t)}catch(s){ct(n,n.return,s)}}}function Ov(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{gs(t)}catch(s){ct(n,n.return,s)}}function ER(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Tv),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Tv),n;default:throw Error(o(435,t.tag))}}function _c(t,n){var s=ER(t);n.forEach(function(u){if(!s.has(u)){s.add(u);var g=LR.bind(null,t,u);u.then(g,g)}})}function ln(t,n){var s=n.deletions;if(s!==null)for(var u=0;u<s.length;u++){var g=s[u],v=t,j=n,R=j;e:for(;R!==null;){switch(R.tag){case 27:if(ka(R.type)){jt=R.stateNode,sn=!1;break e}break;case 5:jt=R.stateNode,sn=!1;break e;case 3:case 4:jt=R.stateNode.containerInfo,sn=!0;break e}R=R.return}if(jt===null)throw Error(o(160));Av(v,j,g),jt=null,sn=!1,v=g.alternate,v!==null&&(v.return=null),g.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)zv(n,t),n=n.sibling}var er=null;function zv(t,n){var s=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ln(n,t),cn(t),u&4&&(va(3,t,t.return),Rl(3,t),va(5,t,t.return));break;case 1:ln(n,t),cn(t),u&512&&(Lt||s===null||cr(s,s.return)),u&64&&Br&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var g=er;if(ln(n,t),cn(t),u&512&&(Lt||s===null||cr(s,s.return)),u&4){var v=s!==null?s.memoizedState:null;if(u=t.memoizedState,s===null)if(u===null)if(t.stateNode===null){e:{u=t.type,s=t.memoizedProps,g=g.ownerDocument||g;t:switch(u){case"title":v=g.getElementsByTagName("title")[0],(!v||v[$e]||v[ye]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=g.createElement(u),g.head.insertBefore(v,g.querySelector("head > title"))),Gt(v,u,s),v[ye]=t,Ze(v),u=v;break e;case"link":var j=zy("link","href",g).get(u+(s.href||""));if(j){for(var R=0;R<j.length;R++)if(v=j[R],v.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&v.getAttribute("rel")===(s.rel==null?null:s.rel)&&v.getAttribute("title")===(s.title==null?null:s.title)&&v.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){j.splice(R,1);break t}}v=g.createElement(u),Gt(v,u,s),g.head.appendChild(v);break;case"meta":if(j=zy("meta","content",g).get(u+(s.content||""))){for(R=0;R<j.length;R++)if(v=j[R],v.getAttribute("content")===(s.content==null?null:""+s.content)&&v.getAttribute("name")===(s.name==null?null:s.name)&&v.getAttribute("property")===(s.property==null?null:s.property)&&v.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&v.getAttribute("charset")===(s.charSet==null?null:s.charSet)){j.splice(R,1);break t}}v=g.createElement(u),Gt(v,u,s),g.head.appendChild(v);break;default:throw Error(o(468,u))}v[ye]=t,Ze(v),u=v}t.stateNode=u}else Ly(g,t.type,t.stateNode);else t.stateNode=Oy(g,u,t.memoizedProps);else v!==u?(v===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):v.count--,u===null?Ly(g,t.type,t.stateNode):Oy(g,u,t.memoizedProps)):u===null&&t.stateNode!==null&&cm(t,t.memoizedProps,s.memoizedProps)}break;case 27:ln(n,t),cn(t),u&512&&(Lt||s===null||cr(s,s.return)),s!==null&&u&4&&cm(t,t.memoizedProps,s.memoizedProps);break;case 5:if(ln(n,t),cn(t),u&512&&(Lt||s===null||cr(s,s.return)),t.flags&32){g=t.stateNode;try{Uo(g,"")}catch(je){ct(t,t.return,je)}}u&4&&t.stateNode!=null&&(g=t.memoizedProps,cm(t,g,s!==null?s.memoizedProps:g)),u&1024&&(fm=!0);break;case 6:if(ln(n,t),cn(t),u&4){if(t.stateNode===null)throw Error(o(162));u=t.memoizedProps,s=t.stateNode;try{s.nodeValue=u}catch(je){ct(t,t.return,je)}}break;case 3:if(Gc=null,g=er,er=Vc(n.containerInfo),ln(n,t),er=g,cn(t),u&4&&s!==null&&s.memoizedState.isDehydrated)try{gs(n.containerInfo)}catch(je){ct(t,t.return,je)}fm&&(fm=!1,Lv(t));break;case 4:u=er,er=Vc(t.stateNode.containerInfo),ln(n,t),cn(t),er=u;break;case 12:ln(n,t),cn(t);break;case 31:ln(n,t),cn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,_c(t,u)));break;case 13:ln(n,t),cn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ac=Qt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,_c(t,u)));break;case 22:g=t.memoizedState!==null;var P=s!==null&&s.memoizedState!==null,K=Br,le=Lt;if(Br=K||g,Lt=le||P,ln(n,t),Lt=le,Br=K,cn(t),u&8192)e:for(n=t.stateNode,n._visibility=g?n._visibility&-2:n._visibility|1,g&&(s===null||P||Br||Lt||uo(t)),s=null,n=t;;){if(n.tag===5||n.tag===26){if(s===null){P=s=n;try{if(v=P.stateNode,g)j=v.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{R=P.stateNode;var de=P.memoizedProps.style,J=de!=null&&de.hasOwnProperty("display")?de.display:null;R.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(je){ct(P,P.return,je)}}}else if(n.tag===6){if(s===null){P=n;try{P.stateNode.nodeValue=g?"":P.memoizedProps}catch(je){ct(P,P.return,je)}}}else if(n.tag===18){if(s===null){P=n;try{var ne=P.stateNode;g?ky(ne,!0):ky(P.stateNode,!1)}catch(je){ct(P,P.return,je)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=t.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,_c(t,s))));break;case 19:ln(n,t),cn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,_c(t,u)));break;case 30:break;case 21:break;default:ln(n,t),cn(t)}}function cn(t){var n=t.flags;if(n&2){try{for(var s,u=t.return;u!==null;){if(Ev(u)){s=u;break}u=u.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var g=s.stateNode,v=um(t);Tc(t,v,g);break;case 5:var j=s.stateNode;s.flags&32&&(Uo(j,""),s.flags&=-33);var R=um(t);Tc(t,R,j);break;case 3:case 4:var P=s.stateNode.containerInfo,K=um(t);dm(t,K,P);break;default:throw Error(o(161))}}catch(le){ct(t,t.return,le)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Lv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Lv(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function Fr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)_v(t,n.alternate,n),n=n.sibling}function uo(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:va(4,n,n.return),uo(n);break;case 1:cr(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&kv(n,n.return,s),uo(n);break;case 27:Il(n.stateNode);case 26:case 5:cr(n,n.return),uo(n);break;case 22:n.memoizedState===null&&uo(n);break;case 30:uo(n);break;default:uo(n)}t=t.sibling}}function $r(t,n,s){for(s=s&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,g=t,v=n,j=v.flags;switch(v.tag){case 0:case 11:case 15:$r(g,v,s),Rl(4,v);break;case 1:if($r(g,v,s),u=v,g=u.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(K){ct(u,u.return,K)}if(u=v,g=u.updateQueue,g!==null){var R=u.stateNode;try{var P=g.shared.hiddenCallbacks;if(P!==null)for(g.shared.hiddenCallbacks=null,g=0;g<P.length;g++)mx(P[g],R)}catch(K){ct(u,u.return,K)}}s&&j&64&&Nv(v),Tl(v,v.return);break;case 27:Rv(v);case 26:case 5:$r(g,v,s),s&&u===null&&j&4&&Cv(v),Tl(v,v.return);break;case 12:$r(g,v,s);break;case 31:$r(g,v,s),s&&j&4&&Dv(g,v);break;case 13:$r(g,v,s),s&&j&4&&Ov(g,v);break;case 22:v.memoizedState===null&&$r(g,v,s),Tl(v,v.return);break;case 30:break;default:$r(g,v,s)}n=n.sibling}}function mm(t,n){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&pl(s))}function hm(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&pl(t))}function tr(t,n,s,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pv(t,n,s,u),n=n.sibling}function Pv(t,n,s,u){var g=n.flags;switch(n.tag){case 0:case 11:case 15:tr(t,n,s,u),g&2048&&Rl(9,n);break;case 1:tr(t,n,s,u);break;case 3:tr(t,n,s,u),g&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&pl(t)));break;case 12:if(g&2048){tr(t,n,s,u),t=n.stateNode;try{var v=n.memoizedProps,j=v.id,R=v.onPostCommit;typeof R=="function"&&R(j,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){ct(n,n.return,P)}}else tr(t,n,s,u);break;case 31:tr(t,n,s,u);break;case 13:tr(t,n,s,u);break;case 23:break;case 22:v=n.stateNode,j=n.alternate,n.memoizedState!==null?v._visibility&2?tr(t,n,s,u):_l(t,n):v._visibility&2?tr(t,n,s,u):(v._visibility|=2,os(t,n,s,u,(n.subtreeFlags&10256)!==0||!1)),g&2048&&mm(j,n);break;case 24:tr(t,n,s,u),g&2048&&hm(n.alternate,n);break;default:tr(t,n,s,u)}}function os(t,n,s,u,g){for(g=g&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var v=t,j=n,R=s,P=u,K=j.flags;switch(j.tag){case 0:case 11:case 15:os(v,j,R,P,g),Rl(8,j);break;case 23:break;case 22:var le=j.stateNode;j.memoizedState!==null?le._visibility&2?os(v,j,R,P,g):_l(v,j):(le._visibility|=2,os(v,j,R,P,g)),g&&K&2048&&mm(j.alternate,j);break;case 24:os(v,j,R,P,g),g&&K&2048&&hm(j.alternate,j);break;default:os(v,j,R,P,g)}n=n.sibling}}function _l(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=t,u=n,g=u.flags;switch(u.tag){case 22:_l(s,u),g&2048&&mm(u.alternate,u);break;case 24:_l(s,u),g&2048&&hm(u.alternate,u);break;default:_l(s,u)}n=n.sibling}}var Ml=8192;function ss(t,n,s){if(t.subtreeFlags&Ml)for(t=t.child;t!==null;)Iv(t,n,s),t=t.sibling}function Iv(t,n,s){switch(t.tag){case 26:ss(t,n,s),t.flags&Ml&&t.memoizedState!==null&&mT(s,er,t.memoizedState,t.memoizedProps);break;case 5:ss(t,n,s);break;case 3:case 4:var u=er;er=Vc(t.stateNode.containerInfo),ss(t,n,s),er=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=Ml,Ml=16777216,ss(t,n,s),Ml=u):ss(t,n,s));break;default:ss(t,n,s)}}function Uv(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function Al(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];Ft=u,Hv(u,t)}Uv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Bv(t),t=t.sibling}function Bv(t){switch(t.tag){case 0:case 11:case 15:Al(t),t.flags&2048&&va(9,t,t.return);break;case 3:Al(t);break;case 12:Al(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Mc(t)):Al(t);break;default:Al(t)}}function Mc(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var u=n[s];Ft=u,Hv(u,t)}Uv(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:va(8,n,n.return),Mc(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,Mc(n));break;default:Mc(n)}t=t.sibling}}function Hv(t,n){for(;Ft!==null;){var s=Ft;switch(s.tag){case 0:case 11:case 15:va(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:pl(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,Ft=u;else e:for(s=t;Ft!==null;){u=Ft;var g=u.sibling,v=u.return;if(Mv(u),u===s){Ft=null;break e}if(g!==null){g.return=v,Ft=g;break e}Ft=v}}}var RR={getCacheForType:function(t){var n=Vt(Dt),s=n.data.get(t);return s===void 0&&(s=t(),n.data.set(t,s)),s},cacheSignal:function(){return Vt(Dt).controller.signal}},TR=typeof WeakMap=="function"?WeakMap:Map,at=0,pt=null,Ve=null,Ge=0,it=0,wn=null,ya=!1,ls=!1,pm=!1,Vr=0,kt=0,ba=0,fo=0,gm=0,Sn=0,is=0,Dl=null,un=null,xm=!1,Ac=0,Fv=0,Dc=1/0,Oc=null,wa=null,It=0,Sa=null,cs=null,qr=0,vm=0,ym=null,$v=null,Ol=0,bm=null;function jn(){return(at&2)!==0&&Ge!==0?Ge&-Ge:D.T!==null?Cm():fe()}function Vv(){if(Sn===0)if((Ge&536870912)===0||Xe){var t=Cr;Cr<<=1,(Cr&3932160)===0&&(Cr=262144),Sn=t}else Sn=536870912;return t=yn.current,t!==null&&(t.flags|=32),Sn}function dn(t,n,s){(t===pt&&(it===2||it===9)||t.cancelPendingCommit!==null)&&(us(t,0),ja(t,Ge,Sn,!1)),sr(t,s),((at&2)===0||t!==pt)&&(t===pt&&((at&2)===0&&(fo|=s),kt===4&&ja(t,Ge,Sn,!1)),ur(t))}function qv(t,n,s){if((at&6)!==0)throw Error(o(327));var u=!s&&(n&127)===0&&(n&t.expiredLanes)===0||oa(t,n),g=u?AR(t,n):Sm(t,n,!0),v=u;do{if(g===0){ls&&!u&&ja(t,n,0,!1);break}else{if(s=t.current.alternate,v&&!_R(s)){g=Sm(t,n,!1),v=!1;continue}if(g===2){if(v=n,t.errorRecoveryDisabledLanes&v)var j=0;else j=t.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){n=j;e:{var R=t;g=Dl;var P=R.current.memoizedState.isDehydrated;if(P&&(us(R,j).flags|=256),j=Sm(R,j,!1),j!==2){if(pm&&!P){R.errorRecoveryDisabledLanes|=v,fo|=v,g=4;break e}v=un,un=g,v!==null&&(un===null?un=v:un.push.apply(un,v))}g=j}if(v=!1,g!==2)continue}}if(g===1){us(t,0),ja(t,n,0,!0);break}e:{switch(u=t,v=g,v){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:ja(u,n,Sn,!ya);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(g=Ac+300-Qt(),10<g)){if(ja(u,n,Sn,!ya),Do(u,0,!0)!==0)break e;qr=n,u.timeoutHandle=Sy(Gv.bind(null,u,s,un,Oc,xm,n,Sn,fo,is,ya,v,"Throttled",-0,0),g);break e}Gv(u,s,un,Oc,xm,n,Sn,fo,is,ya,v,null,-0,0)}}break}while(!0);ur(t)}function Gv(t,n,s,u,g,v,j,R,P,K,le,de,J,ne){if(t.timeoutHandle=-1,de=n.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_r},Iv(n,v,de);var je=(v&62914560)===v?Ac-Qt():(v&4194048)===v?Fv-Qt():0;if(je=hT(de,je),je!==null){qr=v,t.cancelPendingCommit=je(ey.bind(null,t,n,v,s,u,g,j,R,P,le,de,null,J,ne)),ja(t,v,j,!K);return}}ey(t,n,v,s,u,g,j,R,P)}function _R(t){for(var n=t;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var g=s[u],v=g.getSnapshot;g=g.value;try{if(!xn(v(),g))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ja(t,n,s,u){n&=~gm,n&=~fo,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var g=n;0<g;){var v=31-Kt(g),j=1<<v;u[v]=-1,g&=~j}s!==0&&Gi(t,s,n)}function zc(){return(at&6)===0?(zl(0),!1):!0}function wm(){if(Ve!==null){if(it===0)var t=Ve.return;else t=Ve,Or=no=null,Pf(t),es=null,xl=0,t=Ve;for(;t!==null;)jv(t.alternate,t),t=t.return;Ve=null}}function us(t,n){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,WR(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),qr=0,wm(),pt=t,Ve=s=Ar(t.current,null),Ge=n,it=0,wn=null,ya=!1,ls=oa(t,n),pm=!1,is=Sn=gm=fo=ba=kt=0,un=Dl=null,xm=!1,(n&8)!==0&&(n|=n&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=n;0<u;){var g=31-Kt(u),v=1<<g;n|=t[g],u&=~v}return Vr=n,nc(),s}function Yv(t,n){Pe=null,D.H=kl,n===Jo||n===uc?(n=cx(),it=3):n===kf?(n=cx(),it=4):it=n===Jf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,wn=n,Ve===null&&(kt=1,Nc(t,An(n,t.current)))}function Kv(){var t=yn.current;return t===null?!0:(Ge&4194048)===Ge?Ln===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?t===Ln:!1}function Xv(){var t=D.H;return D.H=kl,t===null?kl:t}function Wv(){var t=D.A;return D.A=RR,t}function Lc(){kt=4,ya||(Ge&4194048)!==Ge&&yn.current!==null||(ls=!0),(ba&134217727)===0&&(fo&134217727)===0||pt===null||ja(pt,Ge,Sn,!1)}function Sm(t,n,s){var u=at;at|=2;var g=Xv(),v=Wv();(pt!==t||Ge!==n)&&(Oc=null,us(t,n)),n=!1;var j=kt;e:do try{if(it!==0&&Ve!==null){var R=Ve,P=wn;switch(it){case 8:wm(),j=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(n=!0);var K=it;if(it=0,wn=null,ds(t,R,P,K),s&&ls){j=0;break e}break;default:K=it,it=0,wn=null,ds(t,R,P,K)}}MR(),j=kt;break}catch(le){Yv(t,le)}while(!0);return n&&t.shellSuspendCounter++,Or=no=null,at=u,D.H=g,D.A=v,Ve===null&&(pt=null,Ge=0,nc()),j}function MR(){for(;Ve!==null;)Zv(Ve)}function AR(t,n){var s=at;at|=2;var u=Xv(),g=Wv();pt!==t||Ge!==n?(Oc=null,Dc=Qt()+500,us(t,n)):ls=oa(t,n);e:do try{if(it!==0&&Ve!==null){n=Ve;var v=wn;t:switch(it){case 1:it=0,wn=null,ds(t,n,v,1);break;case 2:case 9:if(lx(v)){it=0,wn=null,Qv(n);break}n=function(){it!==2&&it!==9||pt!==t||(it=7),ur(t)},v.then(n,n);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:lx(v)?(it=0,wn=null,Qv(n)):(it=0,wn=null,ds(t,n,v,7));break;case 5:var j=null;switch(Ve.tag){case 26:j=Ve.memoizedState;case 5:case 27:var R=Ve;if(j?Py(j):R.stateNode.complete){it=0,wn=null;var P=R.sibling;if(P!==null)Ve=P;else{var K=R.return;K!==null?(Ve=K,Pc(K)):Ve=null}break t}}it=0,wn=null,ds(t,n,v,5);break;case 6:it=0,wn=null,ds(t,n,v,6);break;case 8:wm(),kt=6;break e;default:throw Error(o(462))}}DR();break}catch(le){Yv(t,le)}while(!0);return Or=no=null,D.H=u,D.A=g,at=s,Ve!==null?0:(pt=null,Ge=0,nc(),kt)}function DR(){for(;Ve!==null&&!Id();)Zv(Ve)}function Zv(t){var n=wv(t.alternate,t,Vr);t.memoizedProps=t.pendingProps,n===null?Pc(t):Ve=n}function Qv(t){var n=t,s=n.alternate;switch(n.tag){case 15:case 0:n=pv(s,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=pv(s,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:Pf(n);default:jv(s,n),n=Ve=W0(n,Vr),n=wv(s,n,Vr)}t.memoizedProps=t.pendingProps,n===null?Pc(t):Ve=n}function ds(t,n,s,u){Or=no=null,Pf(n),es=null,xl=0;var g=n.return;try{if(wR(t,g,n,s,Ge)){kt=1,Nc(t,An(s,t.current)),Ve=null;return}}catch(v){if(g!==null)throw Ve=g,v;kt=1,Nc(t,An(s,t.current)),Ve=null;return}n.flags&32768?(Xe||u===1?t=!0:ls||(Ge&536870912)!==0?t=!1:(ya=t=!0,(u===2||u===9||u===3||u===6)&&(u=yn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Jv(n,t)):Pc(n)}function Pc(t){var n=t;do{if((n.flags&32768)!==0){Jv(n,ya);return}t=n.return;var s=NR(n.alternate,n,Vr);if(s!==null){Ve=s;return}if(n=n.sibling,n!==null){Ve=n;return}Ve=n=t}while(n!==null);kt===0&&(kt=5)}function Jv(t,n){do{var s=kR(t.alternate,t);if(s!==null){s.flags&=32767,Ve=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(t=t.sibling,t!==null)){Ve=t;return}Ve=t=s}while(t!==null);kt=6,Ve=null}function ey(t,n,s,u,g,v,j,R,P){t.cancelPendingCommit=null;do Ic();while(It!==0);if((at&6)!==0)throw Error(o(327));if(n!==null){if(n===t.current)throw Error(o(177));if(v=n.lanes|n.childLanes,v|=uf,qi(t,s,v,j,R,P),t===pt&&(Ve=pt=null,Ge=0),cs=n,Sa=t,qr=s,vm=v,ym=g,$v=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,PR(aa,function(){return oy(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=D.T,D.T=null,g=V.p,V.p=2,j=at,at|=4;try{CR(t,n,s)}finally{at=j,V.p=g,D.T=u}}It=1,ty(),ny(),ry()}}function ty(){if(It===1){It=0;var t=Sa,n=cs,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=D.T,D.T=null;var u=V.p;V.p=2;var g=at;at|=4;try{zv(n,t);var v=Om,j=H0(t.containerInfo),R=v.focusedElem,P=v.selectionRange;if(j!==R&&R&&R.ownerDocument&&B0(R.ownerDocument.documentElement,R)){if(P!==null&&af(R)){var K=P.start,le=P.end;if(le===void 0&&(le=K),"selectionStart"in R)R.selectionStart=K,R.selectionEnd=Math.min(le,R.value.length);else{var de=R.ownerDocument||document,J=de&&de.defaultView||window;if(J.getSelection){var ne=J.getSelection(),je=R.textContent.length,Me=Math.min(P.start,je),ft=P.end===void 0?Me:Math.min(P.end,je);!ne.extend&&Me>ft&&(j=ft,ft=Me,Me=j);var $=U0(R,Me),U=U0(R,ft);if($&&U&&(ne.rangeCount!==1||ne.anchorNode!==$.node||ne.anchorOffset!==$.offset||ne.focusNode!==U.node||ne.focusOffset!==U.offset)){var Y=de.createRange();Y.setStart($.node,$.offset),ne.removeAllRanges(),Me>ft?(ne.addRange(Y),ne.extend(U.node,U.offset)):(Y.setEnd(U.node,U.offset),ne.addRange(Y))}}}}for(de=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&de.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<de.length;R++){var ie=de[R];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Wc=!!Dm,Om=Dm=null}finally{at=g,V.p=u,D.T=s}}t.current=n,It=2}}function ny(){if(It===2){It=0;var t=Sa,n=cs,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=D.T,D.T=null;var u=V.p;V.p=2;var g=at;at|=4;try{_v(t,n.alternate,n)}finally{at=g,V.p=u,D.T=s}}It=3}}function ry(){if(It===4||It===3){It=0,Ud();var t=Sa,n=cs,s=qr,u=$v;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?It=5:(It=0,cs=Sa=null,ay(t,t.pendingLanes));var g=t.pendingLanes;if(g===0&&(wa=null),X(s),n=n.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(kr,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=D.T,g=V.p,V.p=2,D.T=null;try{for(var v=t.onRecoverableError,j=0;j<u.length;j++){var R=u[j];v(R.value,{componentStack:R.stack})}}finally{D.T=n,V.p=g}}(qr&3)!==0&&Ic(),ur(t),g=t.pendingLanes,(s&261930)!==0&&(g&42)!==0?t===bm?Ol++:(Ol=0,bm=t):Ol=0,zl(0)}}function ay(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,pl(n)))}function Ic(){return ty(),ny(),ry(),oy()}function oy(){if(It!==5)return!1;var t=Sa,n=vm;vm=0;var s=X(qr),u=D.T,g=V.p;try{V.p=32>s?32:s,D.T=null,s=ym,ym=null;var v=Sa,j=qr;if(It=0,cs=Sa=null,qr=0,(at&6)!==0)throw Error(o(331));var R=at;if(at|=4,Bv(v.current),Pv(v,v.current,j,s),at=R,zl(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(kr,v)}catch{}return!0}finally{V.p=g,D.T=u,ay(t,n)}}function sy(t,n,s){n=An(s,n),n=Qf(t.stateNode,n,2),t=pa(t,n,2),t!==null&&(sr(t,2),ur(t))}function ct(t,n,s){if(t.tag===3)sy(t,t,s);else for(;n!==null;){if(n.tag===3){sy(n,t,s);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(wa===null||!wa.has(u))){t=An(s,t),s=lv(2),u=pa(n,s,2),u!==null&&(iv(s,u,n,t),sr(u,2),ur(u));break}}n=n.return}}function jm(t,n,s){var u=t.pingCache;if(u===null){u=t.pingCache=new TR;var g=new Set;u.set(n,g)}else g=u.get(n),g===void 0&&(g=new Set,u.set(n,g));g.has(s)||(pm=!0,g.add(s),t=OR.bind(null,t,n,s),n.then(t,t))}function OR(t,n,s){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,pt===t&&(Ge&s)===s&&(kt===4||kt===3&&(Ge&62914560)===Ge&&300>Qt()-Ac?(at&2)===0&&us(t,0):gm|=s,is===Ge&&(is=0)),ur(t)}function ly(t,n){n===0&&(n=nl()),t=Ja(t,n),t!==null&&(sr(t,n),ur(t))}function zR(t){var n=t.memoizedState,s=0;n!==null&&(s=n.retryLane),ly(t,s)}function LR(t,n){var s=0;switch(t.tag){case 31:case 13:var u=t.stateNode,g=t.memoizedState;g!==null&&(s=g.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(o(314))}u!==null&&u.delete(n),ly(t,s)}function PR(t,n){return Ao(t,n)}var Uc=null,fs=null,Nm=!1,Bc=!1,km=!1,Na=0;function ur(t){t!==fs&&t.next===null&&(fs===null?Uc=fs=t:fs=fs.next=t),Bc=!0,Nm||(Nm=!0,UR())}function zl(t,n){if(!km&&Bc){km=!0;do for(var s=!1,u=Uc;u!==null;){if(t!==0){var g=u.pendingLanes;if(g===0)var v=0;else{var j=u.suspendedLanes,R=u.pingedLanes;v=(1<<31-Kt(42|t)+1)-1,v&=g&~(j&~R),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(s=!0,dy(u,v))}else v=Ge,v=Do(u,u===pt?v:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(v&3)===0||oa(u,v)||(s=!0,dy(u,v));u=u.next}while(s);km=!1}}function IR(){iy()}function iy(){Bc=Nm=!1;var t=0;Na!==0&&XR()&&(t=Na);for(var n=Qt(),s=null,u=Uc;u!==null;){var g=u.next,v=cy(u,n);v===0?(u.next=null,s===null?Uc=g:s.next=g,g===null&&(fs=s)):(s=u,(t!==0||(v&3)!==0)&&(Bc=!0)),u=g}It!==0&&It!==5||zl(t),Na!==0&&(Na=0)}function cy(t,n){for(var s=t.suspendedLanes,u=t.pingedLanes,g=t.expirationTimes,v=t.pendingLanes&-62914561;0<v;){var j=31-Kt(v),R=1<<j,P=g[j];P===-1?((R&s)===0||(R&u)!==0)&&(g[j]=$d(R,n)):P<=n&&(t.expiredLanes|=R),v&=~R}if(n=pt,s=Ge,s=Do(t,t===n?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,s===0||t===n&&(it===2||it===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&el(u),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||oa(t,s)){if(n=s&-s,n===t.callbackPriority)return n;switch(u!==null&&el(u),X(s)){case 2:case 8:s=tl;break;case 32:s=aa;break;case 268435456:s=Tn;break;default:s=aa}return u=uy.bind(null,t),s=Ao(s,u),t.callbackPriority=n,t.callbackNode=s,n}return u!==null&&u!==null&&el(u),t.callbackPriority=2,t.callbackNode=null,2}function uy(t,n){if(It!==0&&It!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(Ic()&&t.callbackNode!==s)return null;var u=Ge;return u=Do(t,t===pt?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(qv(t,u,n),cy(t,Qt()),t.callbackNode!=null&&t.callbackNode===s?uy.bind(null,t):null)}function dy(t,n){if(Ic())return null;qv(t,n,!0)}function UR(){ZR(function(){(at&6)!==0?Ao(ra,IR):iy()})}function Cm(){if(Na===0){var t=Zo;t===0&&(t=Ka,Ka<<=1,(Ka&261888)===0&&(Ka=256)),Na=t}return Na}function fy(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ki(""+t)}function my(t,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,t.id&&s.setAttribute("form",t.id),n.parentNode.insertBefore(s,n),t=new FormData(t),s.parentNode.removeChild(s),t}function BR(t,n,s,u,g){if(n==="submit"&&s&&s.stateNode===g){var v=fy((g[we]||null).action),j=u.submitter;j&&(n=(n=j[we]||null)?fy(n.formAction):j.getAttribute("formAction"),n!==null&&(v=n,j=null));var R=new Qi("action","action",null,u,g);t.push({event:R,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Na!==0){var P=j?my(g,j):new FormData(g);Gf(s,{pending:!0,data:P,method:g.method,action:v},null,P)}}else typeof v=="function"&&(R.preventDefault(),P=j?my(g,j):new FormData(g),Gf(s,{pending:!0,data:P,method:g.method,action:v},v,P))},currentTarget:g}]})}}for(var Em=0;Em<cf.length;Em++){var Rm=cf[Em],HR=Rm.toLowerCase(),FR=Rm[0].toUpperCase()+Rm.slice(1);Jn(HR,"on"+FR)}Jn(V0,"onAnimationEnd"),Jn(q0,"onAnimationIteration"),Jn(G0,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(aR,"onTransitionRun"),Jn(oR,"onTransitionStart"),Jn(sR,"onTransitionCancel"),Jn(Y0,"onTransitionEnd"),en("onMouseEnter",["mouseout","mouseover"]),en("onMouseLeave",["mouseout","mouseover"]),en("onPointerEnter",["pointerout","pointerover"]),en("onPointerLeave",["pointerout","pointerover"]),an("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),an("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),an("onBeforeInput",["compositionend","keypress","textInput","paste"]),an("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),an("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),an("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ll="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(" "),$R=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ll));function hy(t,n){n=(n&4)!==0;for(var s=0;s<t.length;s++){var u=t[s],g=u.event;u=u.listeners;e:{var v=void 0;if(n)for(var j=u.length-1;0<=j;j--){var R=u[j],P=R.instance,K=R.currentTarget;if(R=R.listener,P!==v&&g.isPropagationStopped())break e;v=R,g.currentTarget=K;try{v(g)}catch(le){tc(le)}g.currentTarget=null,v=P}else for(j=0;j<u.length;j++){if(R=u[j],P=R.instance,K=R.currentTarget,R=R.listener,P!==v&&g.isPropagationStopped())break e;v=R,g.currentTarget=K;try{v(g)}catch(le){tc(le)}g.currentTarget=null,v=P}}}}function qe(t,n){var s=n[Re];s===void 0&&(s=n[Re]=new Set);var u=t+"__bubble";s.has(u)||(py(n,t,2,!1),s.add(u))}function Tm(t,n,s){var u=0;n&&(u|=4),py(s,t,u,n)}var Hc="_reactListening"+Math.random().toString(36).slice(2);function _m(t){if(!t[Hc]){t[Hc]=!0,la.forEach(function(s){s!=="selectionchange"&&($R.has(s)||Tm(s,!1,t),Tm(s,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Hc]||(n[Hc]=!0,Tm("selectionchange",!1,n))}}function py(t,n,s,u){switch(Vy(n)){case 2:var g=xT;break;case 8:g=vT;break;default:g=qm}s=g.bind(null,n,s,t),g=void 0,!Xd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(g=!0),u?g!==void 0?t.addEventListener(n,s,{capture:!0,passive:g}):t.addEventListener(n,s,!0):g!==void 0?t.addEventListener(n,s,{passive:g}):t.addEventListener(n,s,!1)}function Mm(t,n,s,u,g){var v=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var j=u.tag;if(j===3||j===4){var R=u.stateNode.containerInfo;if(R===g)break;if(j===4)for(j=u.return;j!==null;){var P=j.tag;if((P===3||P===4)&&j.stateNode.containerInfo===g)return;j=j.return}for(;R!==null;){if(j=vt(R),j===null)return;if(P=j.tag,P===5||P===6||P===26||P===27){u=v=j;continue e}R=R.parentNode}}u=u.return}b0(function(){var K=v,le=Yd(s),de=[];e:{var J=K0.get(t);if(J!==void 0){var ne=Qi,je=t;switch(t){case"keypress":if(Wi(s)===0)break e;case"keydown":case"keyup":ne=LE;break;case"focusin":je="focus",ne=Jd;break;case"focusout":je="blur",ne=Jd;break;case"beforeblur":case"afterblur":ne=Jd;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=j0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=NE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=UE;break;case V0:case q0:case G0:ne=EE;break;case Y0:ne=HE;break;case"scroll":case"scrollend":ne=SE;break;case"wheel":ne=$E;break;case"copy":case"cut":case"paste":ne=TE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=k0;break;case"toggle":case"beforetoggle":ne=qE}var Me=(n&4)!==0,ft=!Me&&(t==="scroll"||t==="scrollend"),$=Me?J!==null?J+"Capture":null:J;Me=[];for(var U=K,Y;U!==null;){var ie=U;if(Y=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Y===null||$===null||(ie=al(U,$),ie!=null&&Me.push(Pl(U,ie,Y))),ft)break;U=U.return}0<Me.length&&(J=new ne(J,je,null,s,le),de.push({event:J,listeners:Me}))}}if((n&7)===0){e:{if(J=t==="mouseover"||t==="pointerover",ne=t==="mouseout"||t==="pointerout",J&&s!==Gd&&(je=s.relatedTarget||s.fromElement)&&(vt(je)||je[be]))break e;if((ne||J)&&(J=le.window===le?le:(J=le.ownerDocument)?J.defaultView||J.parentWindow:window,ne?(je=s.relatedTarget||s.toElement,ne=K,je=je?vt(je):null,je!==null&&(ft=c(je),Me=je.tag,je!==ft||Me!==5&&Me!==27&&Me!==6)&&(je=null)):(ne=null,je=K),ne!==je)){if(Me=j0,ie="onMouseLeave",$="onMouseEnter",U="mouse",(t==="pointerout"||t==="pointerover")&&(Me=k0,ie="onPointerLeave",$="onPointerEnter",U="pointer"),ft=ne==null?J:We(ne),Y=je==null?J:We(je),J=new Me(ie,U+"leave",ne,s,le),J.target=ft,J.relatedTarget=Y,ie=null,vt(le)===K&&(Me=new Me($,U+"enter",je,s,le),Me.target=Y,Me.relatedTarget=ft,ie=Me),ft=ie,ne&&je)t:{for(Me=VR,$=ne,U=je,Y=0,ie=$;ie;ie=Me(ie))Y++;ie=0;for(var Ee=U;Ee;Ee=Me(Ee))ie++;for(;0<Y-ie;)$=Me($),Y--;for(;0<ie-Y;)U=Me(U),ie--;for(;Y--;){if($===U||U!==null&&$===U.alternate){Me=$;break t}$=Me($),U=Me(U)}Me=null}else Me=null;ne!==null&&gy(de,J,ne,Me,!1),je!==null&&ft!==null&&gy(de,ft,je,Me,!0)}}e:{if(J=K?We(K):window,ne=J.nodeName&&J.nodeName.toLowerCase(),ne==="select"||ne==="input"&&J.type==="file")var et=D0;else if(M0(J))if(O0)et=tR;else{et=JE;var ke=QE}else ne=J.nodeName,!ne||ne.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?K&&qd(K.elementType)&&(et=D0):et=eR;if(et&&(et=et(t,K))){A0(de,et,s,le);break e}ke&&ke(t,J,K),t==="focusout"&&K&&J.type==="number"&&K.memoizedProps.value!=null&&Vd(J,"number",J.value)}switch(ke=K?We(K):window,t){case"focusin":(M0(ke)||ke.contentEditable==="true")&&($o=ke,of=K,fl=null);break;case"focusout":fl=of=$o=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,F0(de,s,le);break;case"selectionchange":if(rR)break;case"keydown":case"keyup":F0(de,s,le)}var Ie;if(tf)e:{switch(t){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Fo?T0(t,s)&&(Ye="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Ye="onCompositionStart");Ye&&(C0&&s.locale!=="ko"&&(Fo||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Fo&&(Ie=w0()):(ia=le,Wd="value"in ia?ia.value:ia.textContent,Fo=!0)),ke=Fc(K,Ye),0<ke.length&&(Ye=new N0(Ye,t,null,s,le),de.push({event:Ye,listeners:ke}),Ie?Ye.data=Ie:(Ie=_0(s),Ie!==null&&(Ye.data=Ie)))),(Ie=YE?KE(t,s):XE(t,s))&&(Ye=Fc(K,"onBeforeInput"),0<Ye.length&&(ke=new N0("onBeforeInput","beforeinput",null,s,le),de.push({event:ke,listeners:Ye}),ke.data=Ie)),BR(de,t,K,s,le)}hy(de,n)})}function Pl(t,n,s){return{instance:t,listener:n,currentTarget:s}}function Fc(t,n){for(var s=n+"Capture",u=[];t!==null;){var g=t,v=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||v===null||(g=al(t,s),g!=null&&u.unshift(Pl(t,g,v)),g=al(t,n),g!=null&&u.push(Pl(t,g,v))),t.tag===3)return u;t=t.return}return[]}function VR(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function gy(t,n,s,u,g){for(var v=n._reactName,j=[];s!==null&&s!==u;){var R=s,P=R.alternate,K=R.stateNode;if(R=R.tag,P!==null&&P===u)break;R!==5&&R!==26&&R!==27||K===null||(P=K,g?(K=al(s,v),K!=null&&j.unshift(Pl(s,K,P))):g||(K=al(s,v),K!=null&&j.push(Pl(s,K,P)))),s=s.return}j.length!==0&&t.push({event:n,listeners:j})}var qR=/\r\n?/g,GR=/\u0000|\uFFFD/g;function xy(t){return(typeof t=="string"?t:""+t).replace(qR,`
|
|
9
|
-
`).replace(GR,"")}function vy(t,n){return n=xy(n),xy(t)===n}function dt(t,n,s,u,g,v){switch(s){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Uo(t,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Uo(t,""+u);break;case"className":Rr(t,"class",u);break;case"tabIndex":Rr(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Rr(t,s,u);break;case"style":v0(t,u,v);break;case"data":if(n!=="object"){Rr(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||s!=="href")){t.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ki(""+u),t.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(s==="formAction"?(n!=="input"&&dt(t,n,"name",g.name,g,null),dt(t,n,"formEncType",g.formEncType,g,null),dt(t,n,"formMethod",g.formMethod,g,null),dt(t,n,"formTarget",g.formTarget,g,null)):(dt(t,n,"encType",g.encType,g,null),dt(t,n,"method",g.method,g,null),dt(t,n,"target",g.target,g,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(s);break}u=Ki(""+u),t.setAttribute(s,u);break;case"onClick":u!=null&&(t.onclick=_r);break;case"onScroll":u!=null&&qe("scroll",t);break;case"onScrollEnd":u!=null&&qe("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}s=Ki(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""+u):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":u===!0?t.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(s,u):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(s,u):t.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(s):t.setAttribute(s,u);break;case"popover":qe("beforetoggle",t),qe("toggle",t),Er(t,"popover",u);break;case"xlinkActuate":Oe(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Oe(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Oe(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Oe(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Oe(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Oe(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Oe(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Oe(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Oe(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Er(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=bE.get(s)||s,Er(t,s,u))}}function Am(t,n,s,u,g,v){switch(s){case"style":v0(t,u,v);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(o(61));if(s=u.__html,s!=null){if(g.children!=null)throw Error(o(60));t.innerHTML=s}}break;case"children":typeof u=="string"?Uo(t,u):(typeof u=="number"||typeof u=="bigint")&&Uo(t,""+u);break;case"onScroll":u!=null&&qe("scroll",t);break;case"onScrollEnd":u!=null&&qe("scrollend",t);break;case"onClick":u!=null&&(t.onclick=_r);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wn.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(g=s.endsWith("Capture"),n=s.slice(2,g?s.length-7:void 0),v=t[we]||null,v=v!=null?v[s]:null,typeof v=="function"&&t.removeEventListener(n,v,g),typeof u=="function")){typeof v!="function"&&v!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(n,u,g);break e}s in t?t[s]=u:u===!0?t.setAttribute(s,""):Er(t,s,u)}}}function Gt(t,n,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",t),qe("load",t);var u=!1,g=!1,v;for(v in s)if(s.hasOwnProperty(v)){var j=s[v];if(j!=null)switch(v){case"src":u=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:dt(t,n,v,j,s,null)}}g&&dt(t,n,"srcSet",s.srcSet,s,null),u&&dt(t,n,"src",s.src,s,null);return;case"input":qe("invalid",t);var R=v=j=g=null,P=null,K=null;for(u in s)if(s.hasOwnProperty(u)){var le=s[u];if(le!=null)switch(u){case"name":g=le;break;case"type":j=le;break;case"checked":P=le;break;case"defaultChecked":K=le;break;case"value":v=le;break;case"defaultValue":R=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,n));break;default:dt(t,n,u,le,s,null)}}h0(t,v,R,P,K,j,g,!1);return;case"select":qe("invalid",t),u=j=v=null;for(g in s)if(s.hasOwnProperty(g)&&(R=s[g],R!=null))switch(g){case"value":v=R;break;case"defaultValue":j=R;break;case"multiple":u=R;default:dt(t,n,g,R,s,null)}n=v,s=j,t.multiple=!!u,n!=null?Io(t,!!u,n,!1):s!=null&&Io(t,!!u,s,!0);return;case"textarea":qe("invalid",t),v=g=u=null;for(j in s)if(s.hasOwnProperty(j)&&(R=s[j],R!=null))switch(j){case"value":u=R;break;case"defaultValue":g=R;break;case"children":v=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(o(91));break;default:dt(t,n,j,R,s,null)}g0(t,u,g,v);return;case"option":for(P in s)s.hasOwnProperty(P)&&(u=s[P],u!=null)&&(P==="selected"?t.selected=u&&typeof u!="function"&&typeof u!="symbol":dt(t,n,P,u,s,null));return;case"dialog":qe("beforetoggle",t),qe("toggle",t),qe("cancel",t),qe("close",t);break;case"iframe":case"object":qe("load",t);break;case"video":case"audio":for(u=0;u<Ll.length;u++)qe(Ll[u],t);break;case"image":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"embed":case"source":case"link":qe("error",t),qe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in s)if(s.hasOwnProperty(K)&&(u=s[K],u!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:dt(t,n,K,u,s,null)}return;default:if(qd(n)){for(le in s)s.hasOwnProperty(le)&&(u=s[le],u!==void 0&&Am(t,n,le,u,s,void 0));return}}for(R in s)s.hasOwnProperty(R)&&(u=s[R],u!=null&&dt(t,n,R,u,s,null))}function YR(t,n,s,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,v=null,j=null,R=null,P=null,K=null,le=null;for(ne in s){var de=s[ne];if(s.hasOwnProperty(ne)&&de!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":P=de;default:u.hasOwnProperty(ne)||dt(t,n,ne,null,u,de)}}for(var J in u){var ne=u[J];if(de=s[J],u.hasOwnProperty(J)&&(ne!=null||de!=null))switch(J){case"type":v=ne;break;case"name":g=ne;break;case"checked":K=ne;break;case"defaultChecked":le=ne;break;case"value":j=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,n));break;default:ne!==de&&dt(t,n,J,ne,u,de)}}rl(t,j,R,P,K,le,v,g);return;case"select":ne=j=R=J=null;for(v in s)if(P=s[v],s.hasOwnProperty(v)&&P!=null)switch(v){case"value":break;case"multiple":ne=P;default:u.hasOwnProperty(v)||dt(t,n,v,null,u,P)}for(g in u)if(v=u[g],P=s[g],u.hasOwnProperty(g)&&(v!=null||P!=null))switch(g){case"value":J=v;break;case"defaultValue":R=v;break;case"multiple":j=v;default:v!==P&&dt(t,n,g,v,u,P)}n=R,s=j,u=ne,J!=null?Io(t,!!s,J,!1):!!u!=!!s&&(n!=null?Io(t,!!s,n,!0):Io(t,!!s,s?[]:"",!1));return;case"textarea":ne=J=null;for(R in s)if(g=s[R],s.hasOwnProperty(R)&&g!=null&&!u.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:dt(t,n,R,null,u,g)}for(j in u)if(g=u[j],v=s[j],u.hasOwnProperty(j)&&(g!=null||v!=null))switch(j){case"value":J=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(o(91));break;default:g!==v&&dt(t,n,j,g,u,v)}p0(t,J,ne);return;case"option":for(var je in s)J=s[je],s.hasOwnProperty(je)&&J!=null&&!u.hasOwnProperty(je)&&(je==="selected"?t.selected=!1:dt(t,n,je,null,u,J));for(P in u)J=u[P],ne=s[P],u.hasOwnProperty(P)&&J!==ne&&(J!=null||ne!=null)&&(P==="selected"?t.selected=J&&typeof J!="function"&&typeof J!="symbol":dt(t,n,P,J,u,ne));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 Me in s)J=s[Me],s.hasOwnProperty(Me)&&J!=null&&!u.hasOwnProperty(Me)&&dt(t,n,Me,null,u,J);for(K in u)if(J=u[K],ne=s[K],u.hasOwnProperty(K)&&J!==ne&&(J!=null||ne!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,n));break;default:dt(t,n,K,J,u,ne)}return;default:if(qd(n)){for(var ft in s)J=s[ft],s.hasOwnProperty(ft)&&J!==void 0&&!u.hasOwnProperty(ft)&&Am(t,n,ft,void 0,u,J);for(le in u)J=u[le],ne=s[le],!u.hasOwnProperty(le)||J===ne||J===void 0&&ne===void 0||Am(t,n,le,J,u,ne);return}}for(var $ in s)J=s[$],s.hasOwnProperty($)&&J!=null&&!u.hasOwnProperty($)&&dt(t,n,$,null,u,J);for(de in u)J=u[de],ne=s[de],!u.hasOwnProperty(de)||J===ne||J==null&&ne==null||dt(t,n,de,J,u,ne)}function yy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function KR(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var g=s[u],v=g.transferSize,j=g.initiatorType,R=g.duration;if(v&&R&&yy(j)){for(j=0,R=g.responseEnd,u+=1;u<s.length;u++){var P=s[u],K=P.startTime;if(K>R)break;var le=P.transferSize,de=P.initiatorType;le&&yy(de)&&(P=P.responseEnd,j+=le*(P<R?1:(R-K)/(P-K)))}if(--u,n+=8*(v+j)/(g.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Dm=null,Om=null;function $c(t){return t.nodeType===9?t:t.ownerDocument}function by(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wy(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function zm(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Lm=null;function XR(){var t=window.event;return t&&t.type==="popstate"?t===Lm?!1:(Lm=t,!0):(Lm=null,!1)}var Sy=typeof setTimeout=="function"?setTimeout:void 0,WR=typeof clearTimeout=="function"?clearTimeout:void 0,jy=typeof Promise=="function"?Promise:void 0,ZR=typeof queueMicrotask=="function"?queueMicrotask:typeof jy<"u"?function(t){return jy.resolve(null).then(t).catch(QR)}:Sy;function QR(t){setTimeout(function(){throw t})}function ka(t){return t==="head"}function Ny(t,n){var s=n,u=0;do{var g=s.nextSibling;if(t.removeChild(s),g&&g.nodeType===8)if(s=g.data,s==="/$"||s==="/&"){if(u===0){t.removeChild(g),gs(n);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Il(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,Il(s);for(var v=s.firstChild;v;){var j=v.nextSibling,R=v.nodeName;v[$e]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&v.rel.toLowerCase()==="stylesheet"||s.removeChild(v),v=j}}else s==="body"&&Il(t.ownerDocument.body);s=g}while(s);gs(n)}function ky(t,n){var s=t;t=0;do{var u=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=u}while(s)}function Pm(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Pm(s),Je(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function JR(t,n,s,u){for(;t.nodeType===1;){var g=s;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[$e])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(v=t.getAttribute("rel"),v==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(v!==g.rel||t.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||t.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||t.getAttribute("title")!==(g.title==null?null:g.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(v=t.getAttribute("src"),(v!==(g.src==null?null:g.src)||t.getAttribute("type")!==(g.type==null?null:g.type)||t.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&v&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var v=g.name==null?null:""+g.name;if(g.type==="hidden"&&t.getAttribute("name")===v)return t}else return t;if(t=Pn(t.nextSibling),t===null)break}return null}function eT(t,n,s){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Pn(t.nextSibling),t===null))return null;return t}function Cy(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Pn(t.nextSibling),t===null))return null;return t}function Im(t){return t.data==="$?"||t.data==="$~"}function Um(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function tT(t,n){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||s.readyState!=="loading")n();else{var u=function(){n(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Pn(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var Bm=null;function Ey(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(n===0)return Pn(t.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}t=t.nextSibling}return null}function Ry(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return t;n--}else s!=="/$"&&s!=="/&"||n++}t=t.previousSibling}return null}function Ty(t,n,s){switch(n=$c(s),t){case"html":if(t=n.documentElement,!t)throw Error(o(452));return t;case"head":if(t=n.head,!t)throw Error(o(453));return t;case"body":if(t=n.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function Il(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Je(t)}var In=new Map,_y=new Set;function Vc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gr=V.d;V.d={f:nT,r:rT,D:aT,C:oT,L:sT,m:lT,X:cT,S:iT,M:uT};function nT(){var t=Gr.f(),n=zc();return t||n}function rT(t){var n=ot(t);n!==null&&n.tag===5&&n.type==="form"?Yx(n):Gr.r(t)}var ms=typeof document>"u"?null:document;function My(t,n,s){var u=ms;if(u&&typeof n=="string"&&n){var g=tn(n);g='link[rel="'+t+'"][href="'+g+'"]',typeof s=="string"&&(g+='[crossorigin="'+s+'"]'),_y.has(g)||(_y.add(g),t={rel:t,crossOrigin:s,href:n},u.querySelector(g)===null&&(n=u.createElement("link"),Gt(n,"link",t),Ze(n),u.head.appendChild(n)))}}function aT(t){Gr.D(t),My("dns-prefetch",t,null)}function oT(t,n){Gr.C(t,n),My("preconnect",t,n)}function sT(t,n,s){Gr.L(t,n,s);var u=ms;if(u&&t&&n){var g='link[rel="preload"][as="'+tn(n)+'"]';n==="image"&&s&&s.imageSrcSet?(g+='[imagesrcset="'+tn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(g+='[imagesizes="'+tn(s.imageSizes)+'"]')):g+='[href="'+tn(t)+'"]';var v=g;switch(n){case"style":v=hs(t);break;case"script":v=ps(t)}In.has(v)||(t=y({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:t,as:n},s),In.set(v,t),u.querySelector(g)!==null||n==="style"&&u.querySelector(Ul(v))||n==="script"&&u.querySelector(Bl(v))||(n=u.createElement("link"),Gt(n,"link",t),Ze(n),u.head.appendChild(n)))}}function lT(t,n){Gr.m(t,n);var s=ms;if(s&&t){var u=n&&typeof n.as=="string"?n.as:"script",g='link[rel="modulepreload"][as="'+tn(u)+'"][href="'+tn(t)+'"]',v=g;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ps(t)}if(!In.has(v)&&(t=y({rel:"modulepreload",href:t},n),In.set(v,t),s.querySelector(g)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Bl(v)))return}u=s.createElement("link"),Gt(u,"link",t),Ze(u),s.head.appendChild(u)}}}function iT(t,n,s){Gr.S(t,n,s);var u=ms;if(u&&t){var g=Rt(u).hoistableStyles,v=hs(t);n=n||"default";var j=g.get(v);if(!j){var R={loading:0,preload:null};if(j=u.querySelector(Ul(v)))R.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":n},s),(s=In.get(v))&&Hm(t,s);var P=j=u.createElement("link");Ze(P),Gt(P,"link",t),P._p=new Promise(function(K,le){P.onload=K,P.onerror=le}),P.addEventListener("load",function(){R.loading|=1}),P.addEventListener("error",function(){R.loading|=2}),R.loading|=4,qc(j,n,u)}j={type:"stylesheet",instance:j,count:1,state:R},g.set(v,j)}}}function cT(t,n){Gr.X(t,n);var s=ms;if(s&&t){var u=Rt(s).hoistableScripts,g=ps(t),v=u.get(g);v||(v=s.querySelector(Bl(g)),v||(t=y({src:t,async:!0},n),(n=In.get(g))&&Fm(t,n),v=s.createElement("script"),Ze(v),Gt(v,"link",t),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(g,v))}}function uT(t,n){Gr.M(t,n);var s=ms;if(s&&t){var u=Rt(s).hoistableScripts,g=ps(t),v=u.get(g);v||(v=s.querySelector(Bl(g)),v||(t=y({src:t,async:!0,type:"module"},n),(n=In.get(g))&&Fm(t,n),v=s.createElement("script"),Ze(v),Gt(v,"link",t),s.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},u.set(g,v))}}function Ay(t,n,s,u){var g=(g=ge.current)?Vc(g):null;if(!g)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=hs(s.href),s=Rt(g).hoistableStyles,u=s.get(n),u||(u={type:"style",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=hs(s.href);var v=Rt(g).hoistableStyles,j=v.get(t);if(j||(g=g.ownerDocument||g,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(t,j),(v=g.querySelector(Ul(t)))&&!v._p&&(j.instance=v,j.state.loading=5),In.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},In.set(t,s),v||dT(g,t,s,j.state))),n&&u===null)throw Error(o(528,""));return j}if(n&&u!==null)throw Error(o(529,""));return null;case"script":return n=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ps(s),s=Rt(g).hoistableScripts,u=s.get(n),u||(u={type:"script",instance:null,count:0,state:null},s.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function hs(t){return'href="'+tn(t)+'"'}function Ul(t){return'link[rel="stylesheet"]['+t+"]"}function Dy(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function dT(t,n,s,u){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=t.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Gt(n,"link",s),Ze(n),t.head.appendChild(n))}function ps(t){return'[src="'+tn(t)+'"]'}function Bl(t){return"script[async]"+t}function Oy(t,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+tn(s.href)+'"]');if(u)return n.instance=u,Ze(u),u;var g=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),Ze(u),Gt(u,"style",g),qc(u,s.precedence,t),n.instance=u;case"stylesheet":g=hs(s.href);var v=t.querySelector(Ul(g));if(v)return n.state.loading|=4,n.instance=v,Ze(v),v;u=Dy(s),(g=In.get(g))&&Hm(u,g),v=(t.ownerDocument||t).createElement("link"),Ze(v);var j=v;return j._p=new Promise(function(R,P){j.onload=R,j.onerror=P}),Gt(v,"link",u),n.state.loading|=4,qc(v,s.precedence,t),n.instance=v;case"script":return v=ps(s.src),(g=t.querySelector(Bl(v)))?(n.instance=g,Ze(g),g):(u=s,(g=In.get(v))&&(u=y({},s),Fm(u,g)),t=t.ownerDocument||t,g=t.createElement("script"),Ze(g),Gt(g,"link",u),t.head.appendChild(g),n.instance=g);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,qc(u,s.precedence,t));return n.instance}function qc(t,n,s){for(var u=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=u.length?u[u.length-1]:null,v=g,j=0;j<u.length;j++){var R=u[j];if(R.dataset.precedence===n)v=R;else if(v!==g)break}v?v.parentNode.insertBefore(t,v.nextSibling):(n=s.nodeType===9?s.head:s,n.insertBefore(t,n.firstChild))}function Hm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Fm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var Gc=null;function zy(t,n,s){if(Gc===null){var u=new Map,g=Gc=new Map;g.set(s,u)}else g=Gc,u=g.get(s),u||(u=new Map,g.set(s,u));if(u.has(t))return u;for(u.set(t,null),s=s.getElementsByTagName(t),g=0;g<s.length;g++){var v=s[g];if(!(v[$e]||v[ye]||t==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var j=v.getAttribute(n)||"";j=t+j;var R=u.get(j);R?R.push(v):u.set(j,[v])}}return u}function Ly(t,n,s){t=t.ownerDocument||t,t.head.insertBefore(s,n==="title"?t.querySelector("head > title"):null)}function fT(t,n,s){if(s===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Py(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function mT(t,n,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var g=hs(u.href),v=n.querySelector(Ul(g));if(v){n=v._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Yc.bind(t),n.then(t,t)),s.state.loading|=4,s.instance=v,Ze(v);return}v=n.ownerDocument||n,u=Dy(u),(g=In.get(g))&&Hm(u,g),v=v.createElement("link"),Ze(v);var j=v;j._p=new Promise(function(R,P){j.onload=R,j.onerror=P}),Gt(v,"link",u),s.instance=v}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Yc.bind(t),n.addEventListener("load",s),n.addEventListener("error",s))}}var $m=0;function hT(t,n){return t.stylesheets&&t.count===0&&Xc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var u=setTimeout(function(){if(t.stylesheets&&Xc(t,t.stylesheets),t.unsuspend){var v=t.unsuspend;t.unsuspend=null,v()}},6e4+n);0<t.imgBytes&&$m===0&&($m=62500*KR());var g=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Xc(t,t.stylesheets),t.unsuspend)){var v=t.unsuspend;t.unsuspend=null,v()}},(t.imgBytes>$m?50:800)+n);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(g)}}:null}function Yc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Kc=null;function Xc(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Kc=new Map,n.forEach(pT,t),Kc=null,Yc.call(t))}function pT(t,n){if(!(n.state.loading&4)){var s=Kc.get(t);if(s)var u=s.get(null);else{s=new Map,Kc.set(t,s);for(var g=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<g.length;v++){var j=g[v];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(s.set(j.dataset.precedence,j),u=j)}u&&s.set(null,u)}g=n.instance,j=g.getAttribute("data-precedence"),v=s.get(j)||u,v===u&&s.set(null,g),s.set(j,g),this.count++,u=Yc.bind(this),g.addEventListener("load",u),g.addEventListener("error",u),v?v.parentNode.insertBefore(g,v.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(g,t.firstChild)),n.state.loading|=4}}var Hl={$$typeof:T,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function gT(t,n,s,u,g,v,j,R,P){this.tag=1,this.containerInfo=t,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=sa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sa(0),this.hiddenUpdates=sa(null),this.identifierPrefix=u,this.onUncaughtError=g,this.onCaughtError=v,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function Iy(t,n,s,u,g,v,j,R,P,K,le,de){return t=new gT(t,n,s,j,P,K,le,de,R),n=1,v===!0&&(n|=24),v=vn(3,null,null,n),t.current=v,v.stateNode=t,n=Sf(),n.refCount++,t.pooledCache=n,n.refCount++,v.memoizedState={element:u,isDehydrated:s,cache:n},Cf(v),t}function Uy(t){return t?(t=Go,t):Go}function By(t,n,s,u,g,v){g=Uy(g),u.context===null?u.context=g:u.pendingContext=g,u=ha(n),u.payload={element:s},v=v===void 0?null:v,v!==null&&(u.callback=v),s=pa(t,u,n),s!==null&&(dn(s,t,n),yl(s,t,n))}function Hy(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<n?s:n}}function Vm(t,n){Hy(t,n),(t=t.alternate)&&Hy(t,n)}function Fy(t){if(t.tag===13||t.tag===31){var n=Ja(t,67108864);n!==null&&dn(n,t,67108864),Vm(t,67108864)}}function $y(t){if(t.tag===13||t.tag===31){var n=jn();n=H(n);var s=Ja(t,n);s!==null&&dn(s,t,n),Vm(t,n)}}var Wc=!0;function xT(t,n,s,u){var g=D.T;D.T=null;var v=V.p;try{V.p=2,qm(t,n,s,u)}finally{V.p=v,D.T=g}}function vT(t,n,s,u){var g=D.T;D.T=null;var v=V.p;try{V.p=8,qm(t,n,s,u)}finally{V.p=v,D.T=g}}function qm(t,n,s,u){if(Wc){var g=Gm(u);if(g===null)Mm(t,n,u,Zc,s),qy(t,u);else if(bT(g,t,n,s,u))u.stopPropagation();else if(qy(t,u),n&4&&-1<yT.indexOf(t)){for(;g!==null;){var v=ot(g);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var j=Xn(v.pendingLanes);if(j!==0){var R=v;for(R.pendingLanes|=2,R.entangledLanes|=2;j;){var P=1<<31-Kt(j);R.entanglements[1]|=P,j&=~P}ur(v),(at&6)===0&&(Dc=Qt()+500,zl(0))}}break;case 31:case 13:R=Ja(v,2),R!==null&&dn(R,v,2),zc(),Vm(v,2)}if(v=Gm(u),v===null&&Mm(t,n,u,Zc,s),v===g)break;g=v}g!==null&&u.stopPropagation()}else Mm(t,n,u,null,s)}}function Gm(t){return t=Yd(t),Ym(t)}var Zc=null;function Ym(t){if(Zc=null,t=vt(t),t!==null){var n=c(t);if(n===null)t=null;else{var s=n.tag;if(s===13){if(t=d(n),t!==null)return t;t=null}else if(s===31){if(t=f(n),t!==null)return t;t=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Zc=t,null}function Vy(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Nr()){case ra:return 2;case tl:return 8;case aa:case Kn:return 32;case Tn:return 268435456;default:return 32}default:return 32}}var Km=!1,Ca=null,Ea=null,Ra=null,Fl=new Map,$l=new Map,Ta=[],yT="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 qy(t,n){switch(t){case"focusin":case"focusout":Ca=null;break;case"dragenter":case"dragleave":Ea=null;break;case"mouseover":case"mouseout":Ra=null;break;case"pointerover":case"pointerout":Fl.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":$l.delete(n.pointerId)}}function Vl(t,n,s,u,g,v){return t===null||t.nativeEvent!==v?(t={blockedOn:n,domEventName:s,eventSystemFlags:u,nativeEvent:v,targetContainers:[g]},n!==null&&(n=ot(n),n!==null&&Fy(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,g!==null&&n.indexOf(g)===-1&&n.push(g),t)}function bT(t,n,s,u,g){switch(n){case"focusin":return Ca=Vl(Ca,t,n,s,u,g),!0;case"dragenter":return Ea=Vl(Ea,t,n,s,u,g),!0;case"mouseover":return Ra=Vl(Ra,t,n,s,u,g),!0;case"pointerover":var v=g.pointerId;return Fl.set(v,Vl(Fl.get(v)||null,t,n,s,u,g)),!0;case"gotpointercapture":return v=g.pointerId,$l.set(v,Vl($l.get(v)||null,t,n,s,u,g)),!0}return!1}function Gy(t){var n=vt(t.target);if(n!==null){var s=c(n);if(s!==null){if(n=s.tag,n===13){if(n=d(s),n!==null){t.blockedOn=n,me(t.priority,function(){$y(s)});return}}else if(n===31){if(n=f(s),n!==null){t.blockedOn=n,me(t.priority,function(){$y(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Qc(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var s=Gm(t.nativeEvent);if(s===null){s=t.nativeEvent;var u=new s.constructor(s.type,s);Gd=u,s.target.dispatchEvent(u),Gd=null}else return n=ot(s),n!==null&&Fy(n),t.blockedOn=s,!1;n.shift()}return!0}function Yy(t,n,s){Qc(t)&&s.delete(n)}function wT(){Km=!1,Ca!==null&&Qc(Ca)&&(Ca=null),Ea!==null&&Qc(Ea)&&(Ea=null),Ra!==null&&Qc(Ra)&&(Ra=null),Fl.forEach(Yy),$l.forEach(Yy)}function Jc(t,n){t.blockedOn===n&&(t.blockedOn=null,Km||(Km=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,wT)))}var eu=null;function Ky(t){eu!==t&&(eu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){eu===t&&(eu=null);for(var n=0;n<t.length;n+=3){var s=t[n],u=t[n+1],g=t[n+2];if(typeof u!="function"){if(Ym(u||s)===null)continue;break}var v=ot(s);v!==null&&(t.splice(n,3),n-=3,Gf(v,{pending:!0,data:g,method:s.method,action:u},u,g))}}))}function gs(t){function n(P){return Jc(P,t)}Ca!==null&&Jc(Ca,t),Ea!==null&&Jc(Ea,t),Ra!==null&&Jc(Ra,t),Fl.forEach(n),$l.forEach(n);for(var s=0;s<Ta.length;s++){var u=Ta[s];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Ta.length&&(s=Ta[0],s.blockedOn===null);)Gy(s),s.blockedOn===null&&Ta.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var g=s[u],v=s[u+1],j=g[we]||null;if(typeof v=="function")j||Ky(s);else if(j){var R=null;if(v&&v.hasAttribute("formAction")){if(g=v,j=v[we]||null)R=j.formAction;else if(Ym(g)!==null)continue}else R=j.action;typeof R=="function"?s[u+1]=R:(s.splice(u,3),u-=3),Ky(s)}}}function Xy(){function t(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(j){return g=j})},focusReset:"manual",scroll:"manual"})}function n(){g!==null&&(g(),g=null),u||setTimeout(s,20)}function s(){if(!u&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,g=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),g!==null&&(g(),g=null)}}}function Xm(t){this._internalRoot=t}tu.prototype.render=Xm.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(o(409));var s=n.current,u=jn();By(s,u,t,n,null,null)},tu.prototype.unmount=Xm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;By(t.current,2,null,t,null,null),zc(),n[be]=null}};function tu(t){this._internalRoot=t}tu.prototype.unstable_scheduleHydration=function(t){if(t){var n=fe();t={blockedOn:null,target:t,priority:n};for(var s=0;s<Ta.length&&n!==0&&n<Ta[s].priority;s++);Ta.splice(s,0,t),s===0&&Gy(t)}};var Wy=r.version;if(Wy!=="19.2.7")throw Error(o(527,Wy,"19.2.7"));V.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=p(n),t=t!==null?x(t):null,t=t===null?null:t.stateNode,t};var ST={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{kr=nu.inject(ST),Jt=nu}catch{}}return Gl.createRoot=function(t,n){if(!i(t))throw Error(o(299));var s=!1,u="",g=rv,v=av,j=ov;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(g=n.onUncaughtError),n.onCaughtError!==void 0&&(v=n.onCaughtError),n.onRecoverableError!==void 0&&(j=n.onRecoverableError)),n=Iy(t,1,!1,null,null,s,u,null,g,v,j,Xy),t[be]=n.current,_m(t),new Xm(n)},Gl.hydrateRoot=function(t,n,s){if(!i(t))throw Error(o(299));var u=!1,g="",v=rv,j=av,R=ov,P=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(g=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(R=s.onRecoverableError),s.formState!==void 0&&(P=s.formState)),n=Iy(t,1,!0,n,s??null,u,g,P,v,j,R,Xy),n.context=Uy(null),s=n.current,u=jn(),u=H(u),g=ha(u),g.callback=null,pa(s,g,u),s=u,n.current.lanes=s,sr(n,s),ur(n),t[be]=n.current,_m(t),new tu(n)},Gl.version="19.2.7",Gl}var sb;function DT(){if(sb)return Zm.exports;sb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Zm.exports=AT(),Zm.exports}var OT=DT(),m=zp();const zT=NT(m),vi=Z1({__proto__:null,default:zT},[m]);var J1=e=>{throw TypeError(e)},e2=(e,r,a)=>r.has(e)||J1("Cannot "+a),Un=(e,r,a)=>(e2(e,r,"read from private field"),a?a.call(e):r.get(e)),ni=(e,r,a)=>r.has(e)?J1("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,a),dr=(e,r,a,o)=>(e2(e,r,"write to private field"),r.set(e,a),a),Gu=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Lp=/^[\\/]{2}/;function t2(e,r){return r+e.replace(/\\/g,"/")}var lb="popstate";function ib(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function LT(e={}){function r(o,i){let c=i.state?.masked,{pathname:d,search:f,hash:h}=c||o.location;return ii("",{pathname:d,search:f,hash:h},i.state&&i.state.usr||null,i.state&&i.state.key||"default",c?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function a(o,i){return typeof i=="string"?i:pr(i)}return IT(r,a,null,e)}function Be(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function Pt(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function PT(){return Math.random().toString(36).substring(2,10)}function cb(e,r){return{usr:e.state,key:e.key,idx:r,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ii(e,r,a=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?vr(r):r,state:a,key:r&&r.key||o||PT(),mask:i}}function pr({pathname:e="/",search:r="",hash:a=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function vr(e){let r={};if(e){let a=e.indexOf("#");a>=0&&(r.hash=e.substring(a),e=e.substring(0,a));let o=e.indexOf("?");o>=0&&(r.search=e.substring(o),e=e.substring(0,o)),e&&(r.pathname=e)}return r}function IT(e,r,a,o={}){let{window:i=document.defaultView,v5Compat:c=!1}=o,d=i.history,f="POP",h=null,p=x();p==null&&(p=0,d.replaceState({...d.state,idx:p},""));function x(){return(d.state||{idx:null}).idx}function y(){f="POP";let k=x(),C=k==null?null:k-p;p=k,h&&h({action:f,location:N.location,delta:C})}function b(k,C){f="PUSH";let E=ib(k)?k:ii(N.location,k,C);p=x()+1;let T=cb(E,p),M=N.createHref(E.mask||E);try{d.pushState(T,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(M)}c&&h&&h({action:f,location:N.location,delta:1})}function w(k,C){f="REPLACE";let E=ib(k)?k:ii(N.location,k,C);p=x();let T=cb(E,p),M=N.createHref(E.mask||E);d.replaceState(T,"",M),c&&h&&h({action:f,location:N.location,delta:0})}function S(k){return n2(i,k)}let N={get action(){return f},get location(){return e(i,d)},listen(k){if(h)throw new Error("A history only accepts one active listener");return i.addEventListener(lb,y),h=k,()=>{i.removeEventListener(lb,y),h=null}},createHref(k){return r(i,k)},createURL:S,encodeLocation(k){let C=S(k);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:w,go(k){return d.go(k)}};return N}function n2(e,r,a=!1){let o="http://localhost";e&&(o=e.location.origin!=="null"?e.location.origin:e.location.href),Be(o,"No window.location.(origin|href) available to create URL");let i=typeof r=="string"?r:pr(r);return i=i.replace(/ $/,"%20"),!a&&Lp.test(i)&&(i=o+i),new URL(i,o)}var ri,ub=class{constructor(e){if(ni(this,ri,new Map),e)for(let[r,a]of e)this.set(r,a)}get(e){if(Un(this,ri).has(e))return Un(this,ri).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,r){Un(this,ri).set(e,r)}};ri=new WeakMap;var UT=new Set(["lazy","caseSensitive","path","id","index","children"]);function BT(e){return UT.has(e)}var HT=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function FT(e){return HT.has(e)}function $T(e){return e.index===!0}function ci(e,r,a=[],o={},i=!1){return e.map((c,d)=>{let f=[...a,String(d)],h=typeof c.id=="string"?c.id:f.join("-");if(Be(c.index!==!0||!c.children,"Cannot specify children on an index route"),Be(i||!o[h],`Found a route id collision on id "${h}". Route id's must be globally unique within Data Router usages`),$T(c)){let p={...c,id:h};return o[h]=db(p,r(p)),p}else{let p={...c,id:h,children:void 0};return o[h]=db(p,r(p)),c.children&&(p.children=ci(c.children,r,f,o,i)),p}})}function db(e,r){return Object.assign(e,{...r,...typeof r.lazy=="object"&&r.lazy!=null?{lazy:{...e.lazy,...r.lazy}}:{}})}function r2(e,r,a="/"){return nr(e,r,a,!1)}function nr(e,r,a,o,i){let c=typeof r=="string"?vr(r):r,d=Vn(c.pathname||"/",a);if(d==null)return null;let f=i??vu(e),h=null,p=e_(d);for(let x=0;h==null&&x<f.length;++x)h=JT(f[x],p,o);return h}function a2(e,r){let{route:a,pathname:o,params:i}=e;return{id:a.id,pathname:o,params:i,data:r[a.id],loaderData:r[a.id],handle:a.handle}}function vu(e){let r=o2(e);return VT(r),r}function o2(e,r=[],a=[],o="",i=!1){let c=(d,f,h=i,p)=>{let x={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&h)return;Be(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let y=Fn([o,x.relativePath]),b=a.concat(x);d.children&&d.children.length>0&&(Be(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),o2(d.children,r,b,y,h)),!(d.path==null&&!d.index)&&r.push({path:y,score:ZT(y,d.index),routesMeta:b.map((w,S)=>{let[N,k]=i2(w.relativePath,w.caseSensitive,S===b.length-1);return{...w,matcher:N,compiledParams:k}})})};return e.forEach((d,f)=>{if(d.path===""||!d.path?.includes("?"))c(d,f);else for(let h of s2(d.path))c(d,f,!0,h)}),r}function s2(e){let r=e.split("/");if(r.length===0)return[];let[a,...o]=r,i=a.endsWith("?"),c=a.replace(/\?$/,"");if(o.length===0)return i?[c,""]:[c];let d=s2(o.join("/")),f=[];return f.push(...d.map(h=>h===""?c:[c,h].join("/"))),i&&f.push(...d),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function VT(e){e.sort((r,a)=>r.score!==a.score?a.score-r.score:QT(r.routesMeta.map(o=>o.childrenIndex),a.routesMeta.map(o=>o.childrenIndex)))}var qT=/^:[\w-]+$/,GT=3,YT=2,KT=1,XT=10,WT=-2,fb=e=>e==="*";function ZT(e,r){let a=e.split("/"),o=a.length;return a.some(fb)&&(o+=WT),r&&(o+=YT),a.filter(i=>!fb(i)).reduce((i,c)=>i+(qT.test(c)?GT:c===""?KT:XT),o)}function QT(e,r){return e.length===r.length&&e.slice(0,-1).every((o,i)=>o===r[i])?e[e.length-1]-r[r.length-1]:0}function JT(e,r,a=!1){let{routesMeta:o}=e,i={},c="/",d=[];for(let f=0;f<o.length;++f){let h=o[f],p=f===o.length-1,x=c==="/"?r:r.slice(c.length)||"/",y={path:h.relativePath,caseSensitive:h.caseSensitive,end:p},b=h.matcher&&h.compiledParams?l2(y,x,h.matcher,h.compiledParams):Ru(y,x),w=h.route;if(!b&&p&&a&&!o[o.length-1].route.index&&(b=Ru({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},x)),!b)return null;Object.assign(i,b.params),d.push({params:i,pathname:Fn([c,b.pathname]),pathnameBase:r_(Fn([c,b.pathnameBase])),route:w}),b.pathnameBase!=="/"&&(c=Fn([c,b.pathnameBase]))}return d}function Ru(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,o]=i2(e.path,e.caseSensitive,e.end);return l2(e,r,a,o)}function l2(e,r,a,o){let i=r.match(a);if(!i)return null;let c=i[0],d=c.replace(/(.)\/+$/,"$1"),f=i.slice(1);return{params:o.reduce((p,{paramName:x,isOptional:y},b)=>{if(x==="*"){let S=f[b]||"";d=c.slice(0,c.length-S.length).replace(/(.)\/+$/,"$1")}const w=f[b];return y&&!w?p[x]=void 0:p[x]=(w||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:d,pattern:e}}function i2(e,r=!1,a=!0){Pt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,h,p,x)=>{if(o.push({paramName:f,isOptional:h!=null}),h){let y=x.charAt(p+d.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,r?void 0:"i"),o]}function e_(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Pt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function Vn(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,o=e.charAt(a);return o&&o!=="/"?null:e.slice(a)||"/"}function t_({basename:e,pathname:r}){return r==="/"?e:Fn([e,r])}var Pp=e=>Gu.test(e);function n_(e,r="/"){let{pathname:a,search:o="",hash:i=""}=typeof e=="string"?vr(e):e,c;return a?(a=Up(a),a.startsWith("/")?c=mb(a.substring(1),"/"):c=mb(a,r)):c=r,{pathname:c,search:a_(o),hash:o_(i)}}function mb(e,r){let a=Tu(r).split("/");return e.split("/").forEach(i=>{i===".."?a.length>1&&a.pop():i!=="."&&a.push(i)}),a.length>1?a.join("/"):"/"}function nh(e,r,a,o){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function c2(e){return e.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function Ip(e){let r=c2(e);return r.map((a,o)=>o===r.length-1?a.pathname:a.pathnameBase)}function Yu(e,r,a,o=!1){let i;typeof e=="string"?i=vr(e):(i={...e},Be(!i.pathname||!i.pathname.includes("?"),nh("?","pathname","search",i)),Be(!i.pathname||!i.pathname.includes("#"),nh("#","pathname","hash",i)),Be(!i.search||!i.search.includes("#"),nh("#","search","hash",i)));let c=e===""||i.pathname==="",d=c?"/":i.pathname,f;if(d==null)f=a;else{let y=r.length-1;if(!o&&d.startsWith("..")){let b=d.split("/");for(;b[0]==="..";)b.shift(),y-=1;i.pathname=b.join("/")}f=y>=0?r[y]:"/"}let h=n_(i,f),p=d&&d!=="/"&&d.endsWith("/"),x=(c||d===".")&&a.endsWith("/");return!h.pathname.endsWith("/")&&(p||x)&&(h.pathname+="/"),h}var Up=e=>e.replace(/[\\/]{2,}/g,"/"),Fn=e=>Up(e.join("/")),Tu=e=>e.replace(/\/+$/,""),r_=e=>Tu(e).replace(/^\/*/,"/"),a_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,o_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hb=(e,r=302)=>{let a=r;typeof a=="number"?a={status:a}:typeof a.status>"u"&&(a.status=302);let o=new Headers(a.headers);return o.set("Location",e),new Response(null,{...a,headers:o})},s_=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],yi=class{constructor(e,r,a,o=!1){this.status=e,this.statusText=r||"",this.internal=o,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function ui(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bi(e){let r=e.map(a=>a.route.path).filter(Boolean);return Fn(r)||"/"}var u2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function d2(e,r){let a=e;if(typeof a!="string"||!Gu.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let o=a,i=!1;if(u2)try{let c=new URL(window.location.href),d=Lp.test(a)?new URL(t2(a,c.protocol)):new URL(a),f=Vn(d.pathname,r);d.origin===c.origin&&f!=null?a=f+d.search+d.hash:i=!0}catch{Pt(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:a}}var La=Symbol("Uninstrumented");function l_(e,r){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(i=>i({id:r.id,index:r.index,path:r.path,instrument(c){let d=Object.keys(a);for(let f of d)c[f]&&a[f].push(c[f])}}));let o={};if(typeof r.lazy=="function"&&a.lazy.length>0){let i=Ts(a.lazy,r.lazy,()=>{});i&&(o.lazy=i)}if(typeof r.lazy=="object"){let i=r.lazy;["middleware","loader","action"].forEach(c=>{let d=i[c],f=a[`lazy.${c}`];if(typeof d=="function"&&f.length>0){let h=Ts(f,d,()=>{});h&&(o.lazy=Object.assign(o.lazy||{},{[c]:h}))}})}return["loader","action"].forEach(i=>{let c=r[i];if(typeof c=="function"&&a[i].length>0){let d=c[La]??c,f=Ts(a[i],d,(...h)=>pb(h[0]));f&&(i==="loader"&&d.hydrate===!0&&(f.hydrate=!0),f[La]=d,o[i]=f)}}),r.middleware&&r.middleware.length>0&&a.middleware.length>0&&(o.middleware=r.middleware.map(i=>{let c=i[La]??i,d=Ts(a.middleware,c,(...f)=>pb(f[0]));return d?(d[La]=c,d):i})),o}function i_(e,r){let a={navigate:[],fetch:[]};if(r.forEach(o=>o({instrument(i){let c=Object.keys(i);for(let d of c)i[d]&&a[d].push(i[d])}})),a.navigate.length>0){let o=e.navigate[La]??e.navigate,i=Ts(a.navigate,o,(...c)=>{let[d,f]=c;return{to:typeof d=="number"||typeof d=="string"?d:d?pr(d):".",...gb(e,f??{})}});i&&(i[La]=o,e.navigate=i)}if(a.fetch.length>0){let o=e.fetch[La]??e.fetch,i=Ts(a.fetch,o,(...c)=>{let[d,,f,h]=c;return{href:f??".",fetcherKey:d,...gb(e,h??{})}});i&&(i[La]=o,e.fetch=i)}return e}function Ts(e,r,a){return e.length===0?null:async(...o)=>{let i=await f2(e,a(...o),()=>r(...o),e.length-1);if(i.type==="error")throw i.value;return i.value}}async function f2(e,r,a,o){let i=e[o],c;if(i){let d,f=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=f2(e,r,a,o-1),c=await d,Be(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await i(f,r)}catch(h){console.error("An instrumentation function threw an error:",h)}d||await f(),await d}else try{c={type:"success",value:await a()}}catch(d){c={type:"error",value:d}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function pb(e){let{request:r,context:a,params:o,pattern:i}=e;return{request:c_(r),params:{...o},pattern:i,context:u_(a)}}function gb(e,r){return{currentUrl:pr(e.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function c_(e){return{method:e.method,url:e.url,headers:{get:(...r)=>e.headers.get(...r)}}}function u_(e){if(f_(e)){let r={...e};return Object.freeze(r),r}else return{get:r=>e.get(r)}}var d_=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function f_(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===d_}var m2=["POST","PUT","PATCH","DELETE"],m_=new Set(m2),h_=["GET",...m2],p_=new Set(h_),h2=new Set([301,302,303,307,308]),g_=new Set([307,308]),rh={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},x_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},v_=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),p2="remix-router-transitions",g2=Symbol("ResetLoaderData"),xo,Ns,Da,ks,y_=class{constructor(e){ni(this,xo),ni(this,Ns),ni(this,Da),ni(this,ks),dr(this,xo,e),dr(this,Ns,vu(e))}get stableRoutes(){return Un(this,xo)}get activeRoutes(){return Un(this,Da)??Un(this,xo)}get branches(){return Un(this,ks)??Un(this,Ns)}get hasHMRRoutes(){return Un(this,Da)!=null}setRoutes(e){dr(this,xo,e),dr(this,Ns,vu(e))}setHmrRoutes(e){dr(this,Da,e),dr(this,ks,vu(e))}commitHmrRoutes(){Un(this,Da)&&(dr(this,xo,Un(this,Da)),dr(this,Ns,Un(this,ks)),dr(this,Da,void 0),dr(this,ks,void 0))}};xo=new WeakMap;Ns=new WeakMap;Da=new WeakMap;ks=new WeakMap;function b_(e){const r=e.window?e.window:typeof window<"u"?window:void 0,a=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";Be(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=e.hydrationRouteProperties||[],i=e.mapRouteProperties||v_,c=i;if(e.instrumentations){let I=e.instrumentations;c=H=>({...i(H),...l_(I.map(X=>X.route).filter(Boolean),H)})}let d={},f=new y_(ci(e.routes,c,void 0,d)),h=e.basename||"/";h.startsWith("/")||(h=`/${h}`);let p=e.dataStrategy||k_,x={...e.future},y=null,b=new Set,w=null,S=null,N=null,k=null,C=e.hydrationData!=null,E=nr(f.activeRoutes,e.history.location,h,!1,f.branches),T=!1,M=null,_,L;if(E==null&&!e.patchRoutesOnNavigation){let I=Hn(404,{pathname:e.history.location.pathname}),{matches:H,route:X}=ru(f.activeRoutes);_=!0,L=!_,E=H,M={[X.id]:I}}else if(E&&!e.hydrationData&&sa(E,f.activeRoutes,e.history.location.pathname).active&&(E=null),E)if(E.some(I=>I.route.lazy))_=!1,L=!_;else if(!E.some(I=>Bp(I.route)))_=!0,L=!_;else{let I=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,X=E;if(H){let fe=E.findIndex(me=>H[me.route.id]!==void 0);X=X.slice(0,fe+1)}L=!1,_=!0,X.forEach(fe=>{let me=x2(fe.route,I,H);L=L||me.renderFallback,_=_&&!me.shouldLoad})}else{_=!1,L=!_,E=[];let I=sa(null,f.activeRoutes,e.history.location.pathname);I.active&&I.matches&&(T=!0,E=I.matches)}let B,A={historyAction:e.history.action,location:e.history.location,matches:E,initialized:_,renderFallback:L,navigation:rh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||M,fetchers:new Map,blockers:new Map},oe="POP",q=null,W=!1,ee,re=!1,te=new Map,Z=null,D=!1,V=!1,ae=new Set,Q=new Map,xe=0,O=-1,z=new Map,G=new Set,se=new Map,ue=new Map,ge=new Set,ce=new Map,Ne,Ce=null;function Fe(){if(y=e.history.listen(({action:I,location:H,delta:X})=>{if(Ne){Ne(),Ne=void 0;return}Pt(ce.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let fe=Xa({currentLocation:A.location,nextLocation:H,historyAction:I});if(fe&&X!=null){let me=new Promise(Se=>{Ne=Se});e.history.go(X*-1),Cr(fe,{state:"blocked",location:H,proceed(){Cr(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),me.then(()=>e.history.go(X))},reset(){let Se=new Map(A.blockers);Se.set(fe,Yl),st({blockers:Se})}}),q?.resolve(),q=null;return}return pn(I,H)}),a){V_(r,te);let I=()=>q_(r,te);r.addEventListener("pagehide",I),Z=()=>r.removeEventListener("pagehide",I)}return A.initialized||pn("POP",A.location,{initialHydration:!0}),B}function rt(){y&&y(),Z&&Z(),b.clear(),ee&&ee.abort(),A.fetchers.forEach((I,H)=>kr(A.fetchers,H)),A.blockers.forEach((I,H)=>Ka(H))}function xt(I){if(b.add(I),w){let{newErrors:H}=w;w=null,I(A,{deletedFetchers:[],newErrors:H,viewTransitionOpts:void 0,flushSync:!1})}return()=>b.delete(I)}function st(I,H={}){I.matches&&(I.matches=I.matches.map(me=>{let Se=d[me.route.id],ye=me.route;return ye.element!==Se.element||ye.errorElement!==Se.errorElement||ye.hydrateFallbackElement!==Se.hydrateFallbackElement?{...me,route:Se}:me})),A={...A,...I};let X=[],fe=[];A.fetchers.forEach((me,Se)=>{me.state==="idle"&&(ge.has(Se)?X.push(Se):fe.push(Se))}),ge.forEach(me=>{!A.fetchers.has(me)&&!Q.has(me)&&X.push(me)}),b.size===0&&(w={newErrors:I.errors??null}),[...b].forEach(me=>me(A,{deletedFetchers:X,newErrors:I.errors??null,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),X.forEach(me=>kr(A.fetchers,me)),fe.forEach(me=>A.fetchers.delete(me))}function mt(I,H,{flushSync:X}={}){let fe=A.actionData!=null&&A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&A.navigation.state==="loading"&&I.state?._isRedirect!==!0,me;H.actionData?Object.keys(H.actionData).length>0?me=H.actionData:me=null:fe?me=A.actionData:me=null;let Se=H.loaderData?Cb(A.loaderData,H.loaderData,H.matches||[],H.errors):A.loaderData,ye=A.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((Te,Le)=>ye.set(Le,Yl)));let we=D?!1:nl(I,H.matches||A.matches),be=W===!0||A.navigation.formMethod!=null&&Wt(A.navigation.formMethod)&&I.state?._isRedirect!==!0;f.commitHmrRoutes(),D||oe==="POP"||(oe==="PUSH"?e.history.push(I,I.state):oe==="REPLACE"&&e.history.replace(I,I.state));let Re;if(oe==="POP"){let Te=te.get(A.location.pathname);Te&&Te.has(I.pathname)?Re={currentLocation:A.location,nextLocation:I}:te.has(I.pathname)&&(Re={currentLocation:I,nextLocation:A.location})}else if(re){let Te=te.get(A.location.pathname);Te?Te.add(I.pathname):(Te=new Set([I.pathname]),te.set(A.location.pathname,Te)),Re={currentLocation:A.location,nextLocation:I}}st({...H,actionData:me,loaderData:Se,historyAction:oe,location:I,initialized:!0,renderFallback:!1,navigation:rh,revalidation:"idle",restoreScrollPosition:we,preventScrollReset:be,blockers:ye},{viewTransitionOpts:Re,flushSync:X===!0}),oe="POP",W=!1,re=!1,D=!1,V=!1,q?.resolve(),q=null,Ce?.resolve(),Ce=null}async function or(I,H){if(q?.resolve(),q=null,typeof I=="number"){q||(q=_b());let Je=q.promise;return e.history.go(I),Je}let X=ep(A.location,A.matches,h,I,H?.fromRouteId,H?.relative),{path:fe,submission:me,error:Se}=xb(!1,X,H),ye;H?.mask&&(ye={pathname:"",search:"",hash:"",...typeof H.mask=="string"?vr(H.mask):{...A.location.mask,...H.mask}});let we=A.location,be=ii(we,fe,H&&H.state,void 0,ye);be={...be,...e.history.encodeLocation(be)};let Re=H&&H.replace!=null?H.replace:void 0,Te="PUSH";Re===!0?Te="REPLACE":Re===!1||me!=null&&Wt(me.formMethod)&&me.formAction===A.location.pathname+A.location.search&&(Te="REPLACE");let Le=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Ae=(H&&H.flushSync)===!0,$e=Xa({currentLocation:we,nextLocation:be,historyAction:Te});if($e){Cr($e,{state:"blocked",location:be,proceed(){Cr($e,{state:"proceeding",proceed:void 0,reset:void 0,location:be}),or(I,H)},reset(){let Je=new Map(A.blockers);Je.set($e,Yl),st({blockers:Je})}});return}await pn(Te,be,{submission:me,pendingError:Se,preventScrollReset:Le,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Ae,callSiteDefaultShouldRevalidate:H&&H.defaultShouldRevalidate})}function jr(){Ce||(Ce=_b()),aa(),st({revalidation:"loading"});let I=Ce.promise;return A.navigation.state==="submitting"?I:A.navigation.state==="idle"?(pn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),I):(pn(oe||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:re===!0}),I)}async function pn(I,H,X){ee&&ee.abort(),ee=null,oe=I,D=(X&&X.startUninterruptedRevalidation)===!0,$d(A.location,A.matches),W=(X&&X.preventScrollReset)===!0,re=(X&&X.enableViewTransition)===!0;let fe=f.activeRoutes,me=X?.initialHydration&&A.matches&&A.matches.length>0&&!T?A.matches:nr(fe,H,h,!1,f.branches),Se=(X&&X.flushSync)===!0;if(me&&A.initialized&&!V&&O_(A.location,H)&&!(X&&X.submission&&Wt(X.submission.formMethod))){mt(H,{matches:me},{flushSync:Se});return}let ye=sa(me,fe,H.pathname);if(ye.active&&ye.matches&&(me=ye.matches),!me){let{error:ot,notFoundMatches:We,route:Rt}=Xn(H.pathname);mt(H,{matches:We,loaderData:{},errors:{[Rt.id]:ot}},{flushSync:Se});return}let we=X&&X.overrideNavigation?{...X.overrideNavigation,matches:me,historyAction:I}:void 0;ee=new AbortController;let be=Cs(e.history,H,ee.signal,X&&X.submission),Re=e.getContext?await e.getContext():new ub,Te;if(X&&X.pendingError)Te=[za(me).route.id,{type:"error",error:X.pendingError}];else if(X&&X.submission&&Wt(X.submission.formMethod)){let ot=await Fi(be,H,X.submission,me,I,Re,ye.active,X&&X.initialHydration===!0,{replace:X.replace,flushSync:Se});if(ot.shortCircuited)return;if(ot.pendingActionResult){let[We,Rt]=ot.pendingActionResult;if(kn(Rt)&&ui(Rt.error)&&Rt.error.status===404){ee=null,mt(H,{matches:ot.matches,loaderData:{},errors:{[We]:Rt.error}});return}}me=ot.matches||me,Te=ot.pendingActionResult,we=ah(H,me,I,X.submission),Se=!1,ye.active=!1,be=Cs(e.history,be.url,be.signal)}let{shortCircuited:Le,matches:Ae,loaderData:$e,errors:Je,workingFetchers:vt}=await Js(be,H,me,I,Re,ye.active,we,X&&X.submission,X&&X.fetcherSubmission,X&&X.replace,X&&X.initialHydration===!0,Se,Te,X&&X.callSiteDefaultShouldRevalidate);Le||(ee=null,mt(H,{matches:Ae||me,...Eb(Te),loaderData:$e,errors:Je,...vt?{fetchers:vt}:{}}))}async function Fi(I,H,X,fe,me,Se,ye,we,be={}){aa();let Re=F_(H,fe,me,X);if(st({navigation:Re},{flushSync:be.flushSync===!0}),ye){let Ae=await sr(fe,H.pathname,I.signal);if(Ae.type==="aborted")return{shortCircuited:!0};if(Ae.type==="error"){if(Ae.partialMatches.length===0){let{matches:Je,route:vt}=ru(f.activeRoutes);return{matches:Je,pendingActionResult:[vt.id,{type:"error",error:Ae.error}]}}let $e=za(Ae.partialMatches).route.id;return{matches:Ae.partialMatches,pendingActionResult:[$e,{type:"error",error:Ae.error}]}}else if(Ae.matches)fe=Ae.matches;else{let{notFoundMatches:$e,error:Je,route:vt}=Xn(H.pathname);return{matches:$e,pendingActionResult:[vt.id,{type:"error",error:Je}]}}}let Te,Le=yu(fe,H);if(!Le.route.action&&!Le.route.lazy)Te={type:"error",error:Hn(405,{method:I.method,pathname:H.pathname,routeId:Le.route.id})};else{let Ae=_s(c,d,I,H,fe,Le,we?[]:o,Se),$e=await ra(I,H,Ae,Se,null);if(Te=$e[Le.route.id],!Te){for(let Je of fe)if($e[Je.route.id]){Te=$e[Je.route.id];break}}if(I.signal.aborted)return{shortCircuited:!0}}if(vo(Te)){let Ae;return be&&be.replace!=null?Ae=be.replace:Ae=jb(Te.response.headers.get("Location"),new URL(I.url),h,e.history)===A.location.pathname+A.location.search,await Nr(I,Te,!0,{submission:X,replace:Ae}),{shortCircuited:!0}}if(kn(Te)){let Ae=za(fe,Le.route.id);return(be&&be.replace)!==!0&&(oe="PUSH"),{matches:fe,pendingActionResult:[Ae.route.id,Te,Le.route.id]}}return{matches:fe,pendingActionResult:[Le.route.id,Te]}}async function Js(I,H,X,fe,me,Se,ye,we,be,Re,Te,Le,Ae,$e){let Je=ye||ah(H,X,fe,we),vt=we||be||Tb(Je),ot=!D&&!Te;if(Se){if(ot){let ht=Ao(Ae);st({navigation:Je,...ht!==void 0?{actionData:ht}:{}},{flushSync:Le})}let Oe=await sr(X,H.pathname,I.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){if(Oe.partialMatches.length===0){let{matches:gn,route:Qn}=ru(f.activeRoutes);return{matches:gn,loaderData:{},errors:{[Qn.id]:Oe.error}}}let ht=za(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,loaderData:{},errors:{[ht]:Oe.error}}}else if(Oe.matches)X=Oe.matches;else{let{error:ht,notFoundMatches:gn,route:Qn}=Xn(H.pathname);return{matches:gn,loaderData:{},errors:{[Qn.id]:ht}}}}let We=f.activeRoutes,{dsMatches:Rt,revalidatingFetchers:Ze}=vb(I,me,c,d,e.history,A,X,vt,H,Te?[]:o,Te===!0,V,ae,ge,se,G,We,h,e.patchRoutesOnNavigation!=null,f.branches,Ae,$e);if(O=++xe,!e.dataStrategy&&!Rt.some(Oe=>Oe.shouldLoad)&&!Rt.some(Oe=>Oe.route.middleware&&Oe.route.middleware.length>0)&&Ze.length===0){let Oe=new Map(A.fetchers),ht=$i(Oe);return mt(H,{matches:X,loaderData:{},errors:Ae&&kn(Ae[1])?{[Ae[0]]:Ae[1].error}:null,...Eb(Ae),...ht?{fetchers:Oe}:{}},{flushSync:Le}),{shortCircuited:!0}}if(ot){let Oe={};if(!Se){Oe.navigation=Je;let ht=Ao(Ae);ht!==void 0&&(Oe.actionData=ht)}Ze.length>0&&(Oe.fetchers=el(Ze)),st(Oe,{flushSync:Le})}Ze.forEach(Oe=>{Ht(Oe.key),Oe.controller&&Q.set(Oe.key,Oe.controller)});let la=()=>Ze.forEach(Oe=>Ht(Oe.key));ee&&ee.signal.addEventListener("abort",la);let{loaderResults:Wn,fetcherResults:an}=await tl(Rt,Ze,I,H,me);if(I.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",la),Ze.forEach(Oe=>Q.delete(Oe.key));let en=au(Wn);if(en)return await Nr(I,en.result,!0,{replace:Re}),{shortCircuited:!0};if(en=au(an),en)return G.add(en.key),await Nr(I,en.result,!0,{replace:Re}),{shortCircuited:!0};let _n=new Map(A.fetchers),{loaderData:Oo,errors:Zn}=kb(A,X,Wn,Ae,Ze,an,_n);Te&&A.errors&&(Zn={...A.errors,...Zn});let zo=$i(_n),Er=Vi(O,_n),Rr=zo||Er||Ze.length>0;return{matches:X,loaderData:Oo,errors:Zn,...Rr?{workingFetchers:_n}:{}}}function Ao(I){if(I&&!kn(I[1]))return{[I[0]]:I[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function el(I){let H=new Map(A.fetchers);return I.forEach(X=>{let fe=H.get(X.key),me=Kl(void 0,fe?fe.data:void 0);H.set(X.key,me)}),H}async function Id(I,H,X,fe){Ht(I);let me=(fe&&fe.flushSync)===!0,Se=f.activeRoutes,ye=ep(A.location,A.matches,h,X,H,fe?.relative),we=nr(Se,ye,h,!1,f.branches),be=sa(we,Se,ye);if(be.active&&be.matches&&(we=be.matches),!we){Tn(I,H,Hn(404,{pathname:ye}),{flushSync:me});return}let{path:Re,submission:Te,error:Le}=xb(!0,ye,fe);if(Le){Tn(I,H,Le,{flushSync:me});return}let Ae=e.getContext?await e.getContext():new ub,$e=(fe&&fe.preventScrollReset)===!0;if(Te&&Wt(Te.formMethod)){await Ud(I,H,Re,we,Ae,be.active,me,$e,Te,fe&&fe.defaultShouldRevalidate);return}se.set(I,{routeId:H,path:Re}),await Qt(I,H,Re,we,Ae,be.active,me,$e,Te)}async function Ud(I,H,X,fe,me,Se,ye,we,be,Re){aa(),se.delete(I);let Te=A.fetchers.get(I);Kn(I,$_(be,Te),{flushSync:ye});let Le=new AbortController,Ae=Cs(e.history,X,Le.signal,be);if(Se){let lt=await sr(fe,new URL(Ae.url).pathname,Ae.signal,I);if(lt.type==="aborted")return;if(lt.type==="error"){Tn(I,H,lt.error,{flushSync:ye});return}else if(lt.matches)fe=lt.matches;else{Tn(I,H,Hn(404,{pathname:X}),{flushSync:ye});return}}let $e=yu(fe,X);if(!$e.route.action&&!$e.route.lazy){let lt=Hn(405,{method:be.formMethod,pathname:X,routeId:H});Tn(I,H,lt,{flushSync:ye});return}Q.set(I,Le);let Je=xe,vt=_s(c,d,Ae,X,fe,$e,o,me),ot=await ra(Ae,X,vt,me,I),We=ot[$e.route.id];if(!We){for(let lt of vt)if(ot[lt.route.id]){We=ot[lt.route.id];break}}if(Ae.signal.aborted){Q.get(I)===Le&&Q.delete(I);return}if(ge.has(I)){if(vo(We)||kn(We)){Kn(I,fr(void 0));return}}else{if(vo(We))if(Q.delete(I),O>Je){Kn(I,fr(void 0));return}else return G.add(I),Kn(I,Kl(be)),Nr(Ae,We,!1,{fetcherSubmission:be,preventScrollReset:we});if(kn(We)){Tn(I,H,We.error);return}}let Rt=A.navigation.location||A.location,Ze=Cs(e.history,Rt,Le.signal),la=f.activeRoutes,Wn=A.navigation.state!=="idle"?nr(la,A.navigation.location,h,!1,f.branches):A.matches;Be(Wn,"Didn't find any matches after fetcher action");let an=++xe;z.set(I,an);let{dsMatches:en,revalidatingFetchers:_n}=vb(Ze,me,c,d,e.history,A,Wn,be,Rt,o,!1,V,ae,ge,se,G,la,h,e.patchRoutesOnNavigation!=null,f.branches,[$e.route.id,We],Re),Oo=Kl(be,We.data),Zn=new Map(A.fetchers);Zn.set(I,Oo),_n.filter(lt=>lt.key!==I).forEach(lt=>{let Tr=lt.key,tn=Zn.get(Tr),rl=Kl(void 0,tn?tn.data:void 0);Zn.set(Tr,rl),Ht(Tr),lt.controller&&Q.set(Tr,lt.controller)}),st({fetchers:Zn});let zo=()=>_n.forEach(lt=>Ht(lt.key));Le.signal.addEventListener("abort",zo);let{loaderResults:Er,fetcherResults:Rr}=await tl(en,_n,Ze,Rt,me);if(Le.signal.aborted)return;Le.signal.removeEventListener("abort",zo),z.delete(I),Q.delete(I),_n.forEach(lt=>Q.delete(lt.key));let Oe=A.fetchers.has(I),ht=lt=>{if(!Oe)return lt;let Tr=new Map(lt.fetchers);return Tr.set(I,fr(We.data)),{...lt,fetchers:Tr}},gn=au(Er);if(gn)return A=ht(A),Nr(Ze,gn.result,!1,{preventScrollReset:we});if(gn=au(Rr),gn)return G.add(gn.key),A=ht(A),Nr(Ze,gn.result,!1,{preventScrollReset:we});let Qn=new Map(A.fetchers);Oe&&Qn.set(I,fr(We.data));let{loaderData:Lo,errors:Po}=kb(A,Wn,Er,void 0,_n,Rr,Qn);Vi(an,Qn),A.navigation.state==="loading"&&an>O?(Be(oe,"Expected pending action"),ee&&ee.abort(),mt(A.navigation.location,{matches:Wn,loaderData:Lo,errors:Po,fetchers:Qn})):(st({errors:Po,loaderData:Cb(A.loaderData,Lo,Wn,Po),fetchers:Qn}),V=!1)}async function Qt(I,H,X,fe,me,Se,ye,we,be){let Re=A.fetchers.get(I);Kn(I,Kl(be,Re?Re.data:void 0),{flushSync:ye});let Te=new AbortController,Le=Cs(e.history,X,Te.signal);if(Se){let We=await sr(fe,new URL(Le.url).pathname,Le.signal,I);if(We.type==="aborted")return;if(We.type==="error"){Tn(I,H,We.error,{flushSync:ye});return}else if(We.matches)fe=We.matches;else{Tn(I,H,Hn(404,{pathname:X}),{flushSync:ye});return}}let Ae=yu(fe,X);Q.set(I,Te);let $e=xe,Je=_s(c,d,Le,X,fe,Ae,o,me),vt=await ra(Le,X,Je,me,I),ot=vt[Ae.route.id];if(!ot){for(let We of fe)if(vt[We.route.id]){ot=vt[We.route.id];break}}if(Q.get(I)===Te&&Q.delete(I),!Le.signal.aborted){if(ge.has(I)){Kn(I,fr(void 0));return}if(vo(ot))if(O>$e){Kn(I,fr(void 0));return}else{G.add(I),await Nr(Le,ot,!1,{preventScrollReset:we});return}if(kn(ot)){Tn(I,H,ot.error);return}Kn(I,fr(ot.data))}}async function Nr(I,H,X,{submission:fe,fetcherSubmission:me,preventScrollReset:Se,replace:ye}={}){X||(q?.resolve(),q=null),H.response.headers.has("X-Remix-Revalidate")&&(V=!0);let we=H.response.headers.get("Location");Be(we,"Expected a Location header on the redirect Response"),we=jb(we,new URL(I.url),h,e.history);let be=ii(A.location,we,{_isRedirect:!0});if(a){let Je=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Je=!0;else if(Pp(we)){const vt=n2(r,we,!0);Je=vt.origin!==r.location.origin||Vn(vt.pathname,h)==null}if(Je){ye?r.location.replace(we):r.location.assign(we);return}}ee=null;let Re=ye===!0||H.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Te,formAction:Le,formEncType:Ae}=A.navigation;!fe&&!me&&Te&&Le&&Ae&&(fe=Tb(A.navigation));let $e=fe||me;if(g_.has(H.response.status)&&$e&&Wt($e.formMethod))await pn(Re,be,{submission:{...$e,formAction:we},preventScrollReset:Se||W,enableViewTransition:X?re:void 0});else{let Je=ah(be,[],Re,fe);await pn(Re,be,{overrideNavigation:Je,fetcherSubmission:me,preventScrollReset:Se||W,enableViewTransition:X?re:void 0})}}async function ra(I,H,X,fe,me){let Se,ye={};try{Se=await E_(p,I,H,X,me,fe,!1)}catch(we){return X.filter(be=>be.shouldLoad).forEach(be=>{ye[be.route.id]={type:"error",error:we}}),ye}if(I.signal.aborted)return ye;if(!Wt(I.method))for(let we of X){if(Se[we.route.id]?.type==="error")break;!Se.hasOwnProperty(we.route.id)&&!A.loaderData.hasOwnProperty(we.route.id)&&(!A.errors||!A.errors.hasOwnProperty(we.route.id))&&we.shouldCallHandler()&&(Se[we.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${we.route.id}`)})}for(let[we,be]of Object.entries(Se))if(I_(be)){let Re=be.result;ye[we]={type:"redirect",response:M_(Re,I,we,X,h)}}else ye[we]=await __(be);return ye}async function tl(I,H,X,fe,me){let Se=ra(X,fe,I,me,null),ye=Promise.all(H.map(async Re=>{if(Re.matches&&Re.match&&Re.request&&Re.controller){let Le=(await ra(Re.request,Re.path,Re.matches,me,Re.key))[Re.match.route.id];return{[Re.key]:Le}}else return Promise.resolve({[Re.key]:{type:"error",error:Hn(404,{pathname:Re.path})}})})),we=await Se,be=(await ye).reduce((Re,Te)=>Object.assign(Re,Te),{});return{loaderResults:we,fetcherResults:be}}function aa(){V=!0,se.forEach((I,H)=>{Q.has(H)&&ae.add(H),Ht(H)})}function Kn(I,H,X={}){let fe=new Map(A.fetchers);fe.set(I,H),st({fetchers:fe},{flushSync:(X&&X.flushSync)===!0})}function Tn(I,H,X,fe={}){let me=za(A.matches,H),Se=new Map(A.fetchers);kr(Se,I),st({errors:{[me.route.id]:X},fetchers:Se},{flushSync:(fe&&fe.flushSync)===!0})}function Bd(I){return ue.set(I,(ue.get(I)||0)+1),ge.has(I)&&ge.delete(I),A.fetchers.get(I)||x_}function Hd(I,H){Ht(I,H?.reason),Kn(I,fr(null))}function kr(I,H){let X=A.fetchers.get(H);Q.has(H)&&!(X&&X.state==="loading"&&z.has(H))&&Ht(H),se.delete(H),z.delete(H),G.delete(H),ge.delete(H),ae.delete(H),I.delete(H)}function Jt(I){let H=(ue.get(I)||0)-1;H<=0?(ue.delete(I),ge.add(I)):ue.set(I,H),st({fetchers:new Map(A.fetchers)})}function Ht(I,H){let X=Q.get(I);X&&(X.abort(H),Q.delete(I))}function Kt(I,H){for(let X of I){let fe=H.get(X);Be(fe,`Expected fetcher: ${X}`);let me=fr(fe.data);H.set(X,me)}}function $i(I){let H=[],X=!1;for(let fe of G){let me=I.get(fe);Be(me,`Expected fetcher: ${fe}`),me.state==="loading"&&(G.delete(fe),H.push(fe),X=!0)}return Kt(H,I),X}function Vi(I,H){let X=[];for(let[fe,me]of z)if(me<I){let Se=H.get(fe);Be(Se,`Expected fetcher: ${fe}`),Se.state==="loading"&&(Ht(fe),z.delete(fe),X.push(fe))}return Kt(X,H),X.length>0}function Fd(I,H){let X=A.blockers.get(I)||Yl;return ce.get(I)!==H&&ce.set(I,H),X}function Ka(I){A.blockers.delete(I),ce.delete(I)}function Cr(I,H){let X=A.blockers.get(I)||Yl;Be(X.state==="unblocked"&&H.state==="blocked"||X.state==="blocked"&&H.state==="blocked"||X.state==="blocked"&&H.state==="proceeding"||X.state==="blocked"&&H.state==="unblocked"||X.state==="proceeding"&&H.state==="unblocked",`Invalid blocker state transition: ${X.state} -> ${H.state}`);let fe=new Map(A.blockers);fe.set(I,H),st({blockers:fe})}function Xa({currentLocation:I,nextLocation:H,historyAction:X}){if(ce.size===0)return;ce.size>1&&Pt(!1,"A router only supports one blocker at a time");let fe=Array.from(ce.entries()),[me,Se]=fe[fe.length-1],ye=A.blockers.get(me);if(!(ye&&ye.state==="proceeding")&&Se({currentLocation:I,nextLocation:H,historyAction:X}))return me}function Xn(I){let H=Hn(404,{pathname:I}),X=f.activeRoutes,{matches:fe,route:me}=ru(X);return{notFoundMatches:fe,route:me,error:H}}function Do(I,H,X){if(S=I,k=H,N=X||null,!C&&A.navigation===rh){C=!0;let fe=nl(A.location,A.matches);fe!=null&&st({restoreScrollPosition:fe})}return()=>{S=null,k=null,N=null}}function oa(I,H){return N&&N(I,H.map(fe=>a2(fe,A.loaderData)))||I.key}function $d(I,H){if(S&&k){let X=oa(I,H);S[X]=k()}}function nl(I,H){if(S){let X=oa(I,H),fe=S[X];if(typeof fe=="number")return fe}return null}function sa(I,H,X){if(e.patchRoutesOnNavigation){let fe=f.branches;if(I){if(Object.keys(I[0].params).length>0)return{active:!0,matches:nr(H,X,h,!0,fe)}}else return{active:!0,matches:nr(H,X,h,!0,fe)||[]}}return{active:!1,matches:null}}async function sr(I,H,X,fe){if(!e.patchRoutesOnNavigation)return{type:"success",matches:I};let me=I;for(;;){let Se=d;try{await e.patchRoutesOnNavigation({signal:X,path:H,matches:me,fetcherKey:fe,patch:(Re,Te)=>{X.aborted||yb(Re,Te,f,Se,c,!1)}})}catch(Re){return{type:"error",error:Re,partialMatches:me}}if(X.aborted)return{type:"aborted"};let ye=f.branches,we=nr(f.activeRoutes,H,h,!1,ye),be=null;if(we){if(Object.keys(we[0].params).length===0)return{type:"success",matches:we};if(be=nr(f.activeRoutes,H,h,!0,ye),!(be&&me.length<be.length&&qi(me,be.slice(0,me.length))))return{type:"success",matches:we}}if(be||(be=nr(f.activeRoutes,H,h,!0,ye)),!be||qi(me,be))return{type:"success",matches:null};me=be}}function qi(I,H){return I.length===H.length&&I.every((X,fe)=>X.route.id===H[fe].route.id)}function Gi(I){d={},f.setHmrRoutes(ci(I,c,void 0,d))}function Yi(I,H,X=!1){yb(I,H,f,d,c,X),f.hasHMRRoutes||st({})}return B={get basename(){return h},get future(){return x},get state(){return A},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return d},get window(){return r},initialize:Fe,subscribe:xt,enableScrollRestoration:Do,navigate:or,fetch:Id,revalidate:jr,createHref:I=>e.history.createHref(I),encodeLocation:I=>e.history.encodeLocation(I),getFetcher:Bd,resetFetcher:Hd,deleteFetcher:Jt,dispose:rt,getBlocker:Fd,deleteBlocker:Ka,patchRoutes:Yi,_internalFetchControllers:Q,_internalSetRoutes:Gi,_internalSetStateDoNotUseOrYouWillBreakYourApp(I){st(I)}},e.instrumentations&&(B=i_(B,e.instrumentations.map(I=>I.router).filter(Boolean))),B}function w_(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ep(e,r,a,o,i,c){let d,f;if(i){d=[];for(let p of r)if(d.push(p),p.route.id===i){f=p;break}}else d=r,f=r[r.length-1];let h=Yu(o||".",Ip(d),Vn(e.pathname,a)||e.pathname,c==="path");if(o==null&&(h.search=e.search,h.hash=e.hash),(o==null||o===""||o===".")&&f){let p=Fp(h.search);if(f.route.index&&!p)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&p){let x=new URLSearchParams(h.search),y=x.getAll("index");x.delete("index"),y.filter(w=>w).forEach(w=>x.append("index",w));let b=x.toString();h.search=b?`?${b}`:""}}return a!=="/"&&(h.pathname=t_({basename:a,pathname:h.pathname})),pr(h)}function xb(e,r,a){if(!a||!w_(a))return{path:r};if(a.formMethod&&!H_(a.formMethod))return{path:r,error:Hn(405,{method:a.formMethod})};let o=()=>({path:r,error:Hn(400,{type:"invalid-body"})}),c=(a.formMethod||"get").toUpperCase(),d=N2(r);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Wt(c))return o();let y=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[w,S])=>`${b}${w}=${S}
|
|
10
|
-
`,""):String(a.body);return{path:r,submission:{formMethod:c,formAction:d,formEncType:a.formEncType,formData:void 0,json:void 0,text:y}}}else if(a.formEncType==="application/json"){if(!Wt(c))return o();try{let y=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:c,formAction:d,formEncType:a.formEncType,formData:void 0,json:y,text:void 0}}}catch{return o()}}}Be(typeof FormData=="function","FormData is not available in this environment");let f,h;if(a.formData)f=rp(a.formData),h=a.formData;else if(a.body instanceof FormData)f=rp(a.body),h=a.body;else if(a.body instanceof URLSearchParams)f=a.body,h=Nb(f);else if(a.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(a.body),h=Nb(f)}catch{return o()}let p={formMethod:c,formAction:d,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Wt(p.formMethod))return{path:r,submission:p};let x=vr(r);return e&&x.search&&Fp(x.search)&&f.append("index",""),x.search=`?${f}`,{path:pr(x),submission:p}}function vb(e,r,a,o,i,c,d,f,h,p,x,y,b,w,S,N,k,C,E,T,M,_){let L=M?kn(M[1])?M[1].error:M[1].data:void 0,B=i.createURL(c.location),A=i.createURL(h),oe;if(x&&c.errors){let D=Object.keys(c.errors)[0];oe=d.findIndex(V=>V.route.id===D)}else if(M&&kn(M[1])){let D=M[0];oe=d.findIndex(V=>V.route.id===D)-1}let q=M?M[1].statusCode:void 0,W=q&&q>=400,ee={currentUrl:B,currentParams:c.matches[0]?.params||{},nextUrl:A,nextParams:d[0].params,...f,actionResult:L,actionStatus:q},re=bi(d),te=d.map((D,V)=>{let{route:ae}=D,Q=null;if(oe!=null&&V>oe)Q=!1;else if(ae.lazy)Q=!0;else if(!Bp(ae))Q=!1;else if(x){let{shouldLoad:G}=x2(ae,c.loaderData,c.errors);Q=G}else S_(c.loaderData,c.matches[V],D)&&(Q=!0);if(Q!==null)return tp(a,o,e,h,re,D,p,r,Q);let xe=!1;typeof _=="boolean"?xe=_:W?xe=!1:(y||B.pathname+B.search===A.pathname+A.search||B.search!==A.search||j_(c.matches[V],D))&&(xe=!0);let O={...ee,defaultShouldRevalidate:xe},z=li(D,O);return tp(a,o,e,h,re,D,p,r,z,O,_)}),Z=[];return S.forEach((D,V)=>{if(x||!d.some(ue=>ue.route.id===D.routeId)||w.has(V))return;let ae=c.fetchers.get(V),Q=ae&&ae.state!=="idle"&&ae.data===void 0,xe=nr(k,D.path,C??"/",!1,T);if(!xe){if(E&&Q)return;Z.push({key:V,routeId:D.routeId,path:D.path,matches:null,match:null,request:null,controller:null});return}if(N.has(V))return;let O=yu(xe,D.path),z=new AbortController,G=Cs(i,D.path,z.signal),se=null;if(b.has(V))b.delete(V),se=_s(a,o,G,D.path,xe,O,p,r);else if(Q)y&&(se=_s(a,o,G,D.path,xe,O,p,r));else{let ue;typeof _=="boolean"?ue=_:W?ue=!1:ue=y;let ge={...ee,defaultShouldRevalidate:ue};li(O,ge)&&(se=_s(a,o,G,D.path,xe,O,p,r,ge))}se&&Z.push({key:V,routeId:D.routeId,path:D.path,matches:se,match:O,request:G,controller:z})}),{dsMatches:te,revalidatingFetchers:Z}}function Bp(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function x2(e,r,a){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Bp(e))return{shouldLoad:!1,renderFallback:!1};let o=r!=null&&e.id in r,i=a!=null&&a[e.id]!==void 0;if(!o&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let c=!o&&!i;return{shouldLoad:c,renderFallback:c}}function S_(e,r,a){let o=!r||a.route.id!==r.route.id,i=!e.hasOwnProperty(a.route.id);return o||i}function j_(e,r){let a=e.route.path;return e.pathname!==r.pathname||a!=null&&a.endsWith("*")&&e.params["*"]!==r.params["*"]}function li(e,r){if(e.route.shouldRevalidate){let a=e.route.shouldRevalidate(r);if(typeof a=="boolean")return a}return r.defaultShouldRevalidate}function yb(e,r,a,o,i,c){let d;if(e){let p=o[e];Be(p,`No route found to patch children into: routeId = ${e}`),p.children||(p.children=[]),d=p.children}else d=a.activeRoutes;let f=[],h=[];if(r.forEach(p=>{let x=d.find(y=>v2(p,y));x?h.push({existingRoute:x,newRoute:p}):f.push(p)}),f.length>0){let p=ci(f,i,[e||"_","patch",String(d?.length||"0")],o);d.push(...p)}if(c&&h.length>0)for(let p=0;p<h.length;p++){let{existingRoute:x,newRoute:y}=h[p],b=x,[w]=ci([y],i,[],{},!0);Object.assign(b,{element:w.element?w.element:b.element,errorElement:w.errorElement?w.errorElement:b.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:b.hydrateFallbackElement})}a.hasHMRRoutes||a.setRoutes([...a.activeRoutes])}function v2(e,r){return"id"in e&&"id"in r&&e.id===r.id?!0:e.index===r.index&&e.path===r.path&&e.caseSensitive===r.caseSensitive?(!e.children||e.children.length===0)&&(!r.children||r.children.length===0)?!0:e.children?.every((a,o)=>r.children?.some(i=>v2(a,i)))??!1:!1}var bb=new WeakMap,y2=({key:e,route:r,manifest:a,mapRouteProperties:o})=>{let i=a[r.id];if(Be(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let c=i.lazy[e];if(!c)return;let d=bb.get(i);d||(d={},bb.set(i,d));let f=d[e];if(f)return f;let h=(async()=>{let p=BT(e),y=i[e]!==void 0&&e!=="hasErrorBoundary";if(p)Pt(!p,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),d[e]=Promise.resolve();else if(y)Pt(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let b=await c();b!=null&&(Object.assign(i,{[e]:b}),Object.assign(i,o(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(b=>b===void 0)&&(i.lazy=void 0))})();return d[e]=h,h},wb=new WeakMap;function N_(e,r,a,o,i){let c=a[e.id];if(Be(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let x=wb.get(c);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let y=(async()=>{Be(typeof e.lazy=="function","No lazy route function found");let b=await e.lazy(),w={};for(let S in b){let N=b[S];if(N===void 0)continue;let k=FT(S),E=c[S]!==void 0&&S!=="hasErrorBoundary";k?Pt(!k,"Route property "+S+" is not a supported property to be returned from a lazy route function. This property will be ignored."):E?Pt(!E,`Route "${c.id}" has a static property "${S}" defined but its lazy function is also returning a value for this property. The lazy route property "${S}" will be ignored.`):w[S]=N}Object.assign(c,w),Object.assign(c,{...o(c),lazy:void 0})})();return wb.set(c,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(e.lazy),f=[],h;for(let x of d){if(i&&i.includes(x))continue;let y=y2({key:x,route:e,manifest:a,mapRouteProperties:o});y&&(f.push(y),x===r&&(h=y))}let p=f.length>0?Promise.all(f).then(()=>{}):void 0;return p?.catch(()=>{}),h?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:h}}async function Sb(e){let r=e.matches.filter(i=>i.shouldLoad),a={};return(await Promise.all(r.map(i=>i.resolve()))).forEach((i,c)=>{a[r[c].route.id]=i}),a}async function k_(e){return e.matches.some(r=>r.route.middleware)?b2(e,()=>Sb(e)):Sb(e)}function b2(e,r){return C_(e,r,o=>{if(B_(o))throw o;return o},L_,a);function a(o,i,c){if(c)return Promise.resolve(Object.assign(c.value,{[i]:{type:"error",result:o}}));{let{matches:d}=e,f=Math.min(Math.max(d.findIndex(p=>p.route.id===i),0),Math.max(d.findIndex(p=>p.shouldCallHandler()),0)),h=za(d,d[f].route.id).route.id;return Promise.resolve({[h]:{type:"error",result:o}})}}}async function C_(e,r,a,o,i){let{matches:c,...d}=e,f=c.flatMap(p=>p.route.middleware?p.route.middleware.map(x=>[p.route.id,x]):[]);return await w2(d,f,r,a,o,i)}async function w2(e,r,a,o,i,c,d=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let h=r[d];if(!h)return await a();let[p,x]=h,y,b=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await w2(e,r,a,o,i,c,d+1)},y.value}catch(w){return y={value:await c(w,p,y)},y.value}};try{let w=await x(e,b),S=w!=null?o(w):void 0;return i(S)?S:y?S??y.value:(y={value:await b()},y.value)}catch(w){return await c(w,p,y)}}function S2(e,r,a,o,i){let c=y2({key:"middleware",route:o.route,manifest:r,mapRouteProperties:e}),d=N_(o.route,Wt(a.method)?"action":"loader",r,e,i);return{middleware:c,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function tp(e,r,a,o,i,c,d,f,h,p=null,x){let y=!1,b=S2(e,r,a,c,d);return{...c,_lazyPromises:b,shouldLoad:h,shouldRevalidateArgs:p,shouldCallHandler(w){return y=!0,p?typeof x=="boolean"?li(c,{...p,defaultShouldRevalidate:x}):typeof w=="boolean"?li(c,{...p,defaultShouldRevalidate:w}):li(c,p):h},resolve(w){let{lazy:S,loader:N,middleware:k}=c.route,C=y||h||w&&!Wt(a.method)&&(S||N),E=k&&k.length>0&&!N&&!S;return C&&(Wt(a.method)||!E)?R_({request:a,path:o,pattern:i,match:c,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:w,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function _s(e,r,a,o,i,c,d,f,h=null){return i.map(p=>p.route.id!==c.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:h,shouldCallHandler:()=>!1,_lazyPromises:S2(e,r,a,p,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:tp(e,r,a,o,bi(i),p,d,f,!0,h))}async function E_(e,r,a,o,i,c,d){o.some(x=>x._lazyPromises?.middleware)&&await Promise.all(o.map(x=>x._lazyPromises?.middleware));let f={request:r,url:j2(r,a),pattern:bi(o),params:o[0].params,context:c,matches:o},p=await e({...f,fetcherKey:i,runClientMiddleware:x=>{let y=f;return b2(y,()=>x({...y,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(x=>[x._lazyPromises?.handler,x._lazyPromises?.route]))}catch{}return p}async function R_({request:e,path:r,pattern:a,match:o,lazyHandlerPromise:i,lazyRoutePromise:c,handlerOverride:d,scopedContext:f}){let h,p,x=Wt(e.method),y=x?"action":"loader",b=w=>{let S,N=new Promise((E,T)=>S=T);p=()=>S(),e.signal.addEventListener("abort",p);let k=E=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${o.route.id}]`)):w({request:e,url:j2(e,r),pattern:a,params:o.params,context:f},...E!==void 0?[E]:[]),C=(async()=>{try{return{type:"data",result:await(d?d(T=>k(T)):k())}}catch(E){return{type:"error",result:E}}})();return Promise.race([C,N])};try{let w=x?o.route.action:o.route.loader;if(i||c)if(w){let S,[N]=await Promise.all([b(w).catch(k=>{S=k}),i,c]);if(S!==void 0)throw S;h=N}else{await i;let S=x?o.route.action:o.route.loader;if(S)[h]=await Promise.all([b(S),c]);else if(y==="action"){let N=new URL(e.url),k=N.pathname+N.search;throw Hn(405,{method:e.method,pathname:k,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(w)h=await b(w);else{let S=new URL(e.url),N=S.pathname+S.search;throw Hn(404,{pathname:N})}}catch(w){return{type:"error",result:w}}finally{p&&e.signal.removeEventListener("abort",p)}return h}async function T_(e){let r=e.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?e.body==null?null:e.json():e.text()}async function __(e){let{result:r,type:a}=e;if(Hp(r)){let o;try{o=await T_(r)}catch(i){return{type:"error",error:i}}return a==="error"?{type:"error",error:new yi(r.status,r.statusText,o),statusCode:r.status,headers:r.headers}:{type:"data",data:o,statusCode:r.status,headers:r.headers}}return a==="error"?Rb(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:z_(r),statusCode:ui(r)?r.status:void 0,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:ui(r)?r.status:void 0}:Rb(r)?{type:"data",data:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function M_(e,r,a,o,i){let c=e.headers.get("Location");if(Be(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!Pp(c)){let d=o.slice(0,o.findIndex(f=>f.route.id===a)+1);c=ep(new URL(r.url),d,i,c),e.headers.set("Location",c)}return e}var A_=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function np(e){try{return A_.includes(new URL(e).protocol)}catch{return!1}}function jb(e,r,a,o){if(Pp(e)){let i=e,c=Lp.test(i)?new URL(t2(i,r.protocol)):new URL(i);if(np(c.toString()))throw new Error("Invalid redirect location");let d=Vn(c.pathname,a)!=null;if(c.origin===r.origin&&d)return Up(c.pathname)+c.search+c.hash}try{let i=o.createURL(e);if(np(i.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Cs(e,r,a,o){let i=e.createURL(N2(r)).toString(),c={signal:a};if(o&&Wt(o.formMethod)){let{formMethod:d,formEncType:f}=o;c.method=d.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(o.json)):f==="text/plain"?c.body=o.text:f==="application/x-www-form-urlencoded"&&o.formData?c.body=rp(o.formData):c.body=o.formData}return new Request(i,c)}function j2(e,r){let a=new URL(e.url),o=typeof r=="string"?vr(r):r;if(a.pathname=o.pathname||"/",o.search){let i=new URLSearchParams(o.search),c=i.getAll("index");i.delete("index");for(let d of c.filter(Boolean))i.append("index",d);a.search=i.size?`?${i.toString()}`:""}else a.search="";return a.hash=o.hash||"",a}function rp(e){let r=new URLSearchParams;for(let[a,o]of e.entries())r.append(a,typeof o=="string"?o:o.name);return r}function Nb(e){let r=new FormData;for(let[a,o]of e.entries())r.append(a,o);return r}function D_(e,r,a,o=!1,i=!1){let c={},d=null,f,h=!1,p={},x=a&&kn(a[1])?a[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in r))return;let b=y.route.id,w=r[b];if(Be(!vo(w),"Cannot handle redirect results in processLoaderData"),kn(w)){let S=w.error;if(x!==void 0&&(S=x,x=void 0),d=d||{},i)d[b]=S;else{let N=za(e,b);d[N.route.id]==null&&(d[N.route.id]=S)}o||(c[b]=g2),h||(h=!0,f=ui(w.error)?w.error.status:500),w.headers&&(p[b]=w.headers)}else c[b]=w.data,w.statusCode&&w.statusCode!==200&&!h&&(f=w.statusCode),w.headers&&(p[b]=w.headers)}),x!==void 0&&a&&(d={[a[0]]:x},a[2]&&(c[a[2]]=void 0)),{loaderData:c,errors:d,statusCode:f||200,loaderHeaders:p}}function kb(e,r,a,o,i,c,d){let{loaderData:f,errors:h}=D_(r,a,o);return i.filter(p=>!p.matches||p.matches.some(x=>x.shouldLoad)).forEach(p=>{let{key:x,match:y,controller:b}=p;if(b&&b.signal.aborted)return;let w=c[x];if(Be(w,"Did not find corresponding fetcher result"),kn(w)){let S=za(e.matches,y?.route.id);h&&h[S.route.id]||(h={...h,[S.route.id]:w.error}),d.delete(x)}else if(vo(w))Be(!1,"Unhandled fetcher revalidation redirect");else{let S=fr(w.data);d.set(x,S)}}),{loaderData:f,errors:h}}function Cb(e,r,a,o){let i=Object.entries(r).filter(([,c])=>c!==g2).reduce((c,[d,f])=>(c[d]=f,c),{});for(let c of a){let d=c.route.id;if(!r.hasOwnProperty(d)&&e.hasOwnProperty(d)&&c.route.loader&&(i[d]=e[d]),o&&o.hasOwnProperty(d))break}return i}function Eb(e){return e?kn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function za(e,r){return(r?e.slice(0,e.findIndex(o=>o.route.id===r)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function ru(e){let r=e.length===1?e[0]:e.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function Hn(e,{pathname:r,routeId:a,method:o,type:i,message:c}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(d="Bad Request",o&&r&&a?f=`You made a ${o} request to "${r}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:i==="invalid-body"&&(f="Unable to encode submission body")):e===403?(d="Forbidden",f=`Route "${a}" does not match URL "${r}"`):e===404?(d="Not Found",f=`No route matches URL "${r}"`):e===405&&(d="Method Not Allowed",o&&r&&a?f=`You made a ${o.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:o&&(f=`Invalid request method "${o.toUpperCase()}"`)),new yi(e||500,d,new Error(f),!0)}function au(e){let r=Object.entries(e);for(let a=r.length-1;a>=0;a--){let[o,i]=r[a];if(vo(i))return{key:o,result:i}}}function N2(e){let r=typeof e=="string"?vr(e):e;return pr({...r,hash:""})}function O_(e,r){return e.pathname!==r.pathname||e.search!==r.search?!1:e.hash===""?r.hash!=="":e.hash===r.hash?!0:r.hash!==""}function z_(e){return new yi(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function L_(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([r,a])=>typeof r=="string"&&P_(a))}function P_(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function I_(e){return Hp(e.result)&&h2.has(e.result.status)}function kn(e){return e.type==="error"}function vo(e){return(e&&e.type)==="redirect"}function Rb(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Hp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function U_(e){return h2.has(e)}function B_(e){return Hp(e)&&U_(e.status)&&e.headers.has("Location")}function H_(e){return p_.has(e.toUpperCase())}function Wt(e){return m_.has(e.toUpperCase())}function Fp(e){return new URLSearchParams(e).getAll("index").some(r=>r==="")}function yu(e,r){let a=typeof r=="string"?vr(r).search:r.search;if(e[e.length-1].route.index&&Fp(a||""))return e[e.length-1];let o=c2(e);return o[o.length-1]}function Tb(e){let{formMethod:r,formAction:a,formEncType:o,text:i,formData:c,json:d}=e;if(!(!r||!a||!o)){if(i!=null)return{formMethod:r,formAction:a,formEncType:o,formData:void 0,json:void 0,text:i};if(c!=null)return{formMethod:r,formAction:a,formEncType:o,formData:c,json:void 0,text:void 0};if(d!==void 0)return{formMethod:r,formAction:a,formEncType:o,formData:void 0,json:d,text:void 0}}}function ah(e,r,a,o){return o?{state:"loading",location:e,matches:r,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:e,matches:r,historyAction:a,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function F_(e,r,a,o){return{state:"submitting",location:e,matches:r,historyAction:a,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function Kl(e,r){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function $_(e,r){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r?r.data:void 0}}function fr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function V_(e,r){try{let a=e.sessionStorage.getItem(p2);if(a){let o=JSON.parse(a);for(let[i,c]of Object.entries(o||{}))c&&Array.isArray(c)&&r.set(i,new Set(c||[]))}}catch{}}function q_(e,r){if(r.size>0){let a={};for(let[o,i]of r)a[o]=[...i];try{e.sessionStorage.setItem(p2,JSON.stringify(a))}catch(o){Pt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function _b(){let e,r,a=new Promise((o,i)=>{e=async c=>{o(c);try{await a}catch{}},r=async c=>{i(c);try{await a}catch{}}});return{promise:a,resolve:e,reject:r}}var Eo=m.createContext(null);Eo.displayName="DataRouter";var wi=m.createContext(null);wi.displayName="DataRouterState";var k2=m.createContext(!1);function C2(){return m.useContext(k2)}var $p=m.createContext({isTransitioning:!1});$p.displayName="ViewTransition";var E2=m.createContext(new Map);E2.displayName="Fetchers";var G_=m.createContext(null);G_.displayName="Await";var qn=m.createContext(null);qn.displayName="Navigation";var Ku=m.createContext(null);Ku.displayName="Location";var yr=m.createContext({outlet:null,matches:[],isDataRoute:!1});yr.displayName="Route";var Vp=m.createContext(null);Vp.displayName="RouteError";var R2="REACT_ROUTER_ERROR",Y_="REDIRECT",K_="ROUTE_ERROR_RESPONSE";function X_(e){if(e.startsWith(`${R2}:${Y_}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function W_(e){if(e.startsWith(`${R2}:${K_}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new yi(r.status,r.statusText,r.data)}catch{}}function Z_(e,{relative:r}={}){Be(Si(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:o}=m.useContext(qn),{hash:i,pathname:c,search:d}=ji(e,{relative:r}),f=c;return a!=="/"&&(f=c==="/"?a:Fn([a,c])),o.createHref({pathname:f,search:d,hash:i})}function Si(){return m.useContext(Ku)!=null}function br(){return Be(Si(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Ku).location}var T2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _2(e){m.useContext(qn).static||m.useLayoutEffect(e)}function M2(){let{isDataRoute:e}=m.useContext(yr);return e?d4():Q_()}function Q_(){Be(Si(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Eo),{basename:r,navigator:a}=m.useContext(qn),{matches:o}=m.useContext(yr),{pathname:i}=br(),c=JSON.stringify(Ip(o)),d=m.useRef(!1);return _2(()=>{d.current=!0}),m.useCallback((h,p={})=>{if(Pt(d.current,T2),!d.current)return;if(typeof h=="number"){a.go(h);return}let x=Yu(h,JSON.parse(c),i,p.relative==="path");e==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:Fn([r,x.pathname])),(p.replace?a.replace:a.push)(x,p.state,p)},[r,a,c,i,e])}var J_=m.createContext(null);function e4(e){let r=m.useContext(yr).outlet;return m.useMemo(()=>r&&m.createElement(J_.Provider,{value:e},r),[r,e])}function ji(e,{relative:r}={}){let{matches:a}=m.useContext(yr),{pathname:o}=br(),i=JSON.stringify(Ip(a));return m.useMemo(()=>Yu(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function t4(e,r,a){Be(Si(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=m.useContext(qn),{matches:i}=m.useContext(yr),c=i[i.length-1],d=c?c.params:{},f=c?c.pathname:"/",h=c?c.pathnameBase:"/",p=c&&c.route;{let k=p&&p.path||"";z2(f,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
-
|
|
12
|
-
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let x=br(),y;y=x;let b=y.pathname||"/",w=b;if(h!=="/"){let k=h.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(k.length).join("/")}let S=a&&a.state.matches.length?a.state.matches.map(k=>Object.assign(k,{route:a.manifest[k.route.id]||k.route})):r2(e,{pathname:w});return Pt(p||S!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Pt(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),s4(S&&S.map(k=>Object.assign({},k,{params:Object.assign({},d,k.params),pathname:Fn([h,o.encodeLocation?o.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?h:Fn([h,o.encodeLocation?o.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),i,a)}function n4(){let e=O2(),r=ui(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:c},"ErrorBoundary")," or"," ",m.createElement("code",{style:c},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},r),a?m.createElement("pre",{style:i},a):null,d)}var r4=m.createElement(n4,null),A2=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=W_(e.digest);a&&(e=a)}let r=e!==void 0?m.createElement(yr.Provider,{value:this.props.routeContext},m.createElement(Vp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(a4,{error:e},r):r}};A2.contextType=k2;var oh=new WeakMap;function a4({children:e,error:r}){let{basename:a}=m.useContext(qn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=X_(r.digest);if(o){let i=oh.get(r);if(i)throw i;let c=d2(o.location,a),d=c.absoluteURL||c.to;if(np(d))throw new Error("Invalid redirect location");if(u2&&!oh.get(r))if(c.isExternal||o.reloadDocument)window.location.href=d;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:o.replace}));throw oh.set(r,f),f}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function o4({routeContext:e,match:r,children:a}){let o=m.useContext(Eo);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(yr.Provider,{value:e},a)}function s4(e,r=[],a){let o=a?.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,c=o?.errors;if(c!=null){let x=i.findIndex(y=>y.route.id&&c?.[y.route.id]!==void 0);Be(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),i=i.slice(0,Math.min(i.length,x+1))}let d=!1,f=-1;if(a&&o){d=o.renderFallback;for(let x=0;x<i.length;x++){let y=i[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=x),y.route.id){let{loaderData:b,errors:w}=o,S=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!w||w[y.route.id]===void 0);if(y.route.lazy||S){a.isStatic&&(d=!0),f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}}let h=a?.onError,p=o&&h?(x,y)=>{h(x,{location:o.location,params:o.matches?.[0]?.params??{},pattern:bi(o.matches),errorInfo:y})}:void 0;return i.reduceRight((x,y,b)=>{let w,S=!1,N=null,k=null;o&&(w=c&&y.route.id?c[y.route.id]:void 0,N=y.route.errorElement||r4,d&&(f<0&&b===0?(z2("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,k=null):f===b&&(S=!0,k=y.route.hydrateFallbackElement||null)));let C=r.concat(i.slice(0,b+1)),E=()=>{let T;return w?T=N:S?T=k:y.route.Component?T=m.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=x,m.createElement(o4,{match:y,routeContext:{outlet:x,matches:C,isDataRoute:o!=null},children:T})};return o&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?m.createElement(A2,{location:o.location,revalidation:o.revalidation,component:N,error:w,children:E(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:p}):E()},null)}function qp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l4(e){let r=m.useContext(Eo);return Be(r,qp(e)),r}function D2(e){let r=m.useContext(wi);return Be(r,qp(e)),r}function i4(e){let r=m.useContext(yr);return Be(r,qp(e)),r}function Gp(e){let r=i4(e),a=r.matches[r.matches.length-1];return Be(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function c4(){return Gp("useRouteId")}function u4(){let{matches:e,loaderData:r}=D2("useMatches");return m.useMemo(()=>e.map(a=>a2(a,r)),[e,r])}function O2(){let e=m.useContext(Vp),r=D2("useRouteError"),a=Gp("useRouteError");return e!==void 0?e:r.errors?.[a]}function d4(){let{router:e}=l4("useNavigate"),r=Gp("useNavigate"),a=m.useRef(!1);return _2(()=>{a.current=!0}),m.useCallback(async(i,c={})=>{Pt(a.current,T2),a.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:r,...c}))},[e,r])}var Mb={};function z2(e,r,a){!r&&!Mb[e]&&(Mb[e]=!0,Pt(!1,a))}var Ab={};function Db(e,r){!e&&!Ab[r]&&(Ab[r]=!0,console.warn(r))}var f4="useOptimistic",Ob=vi[f4],m4=()=>{};function h4(e){return Ob?Ob(e):[e,m4]}function p4(e){let r={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Pt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:m.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Pt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:m.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Pt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),r}var g4=["HydrateFallback","hydrateFallbackElement"],x4=class{constructor(){this.status="pending",this.promise=new Promise((e,r)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",e(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",r(a))}})}};function v4({router:e,flushSync:r,onError:a,useTransitions:o}){o=C2()||o;let[c,d]=m.useState(e.state),[f,h]=h4(c),[p,x]=m.useState(),[y,b]=m.useState({isTransitioning:!1}),[w,S]=m.useState(),[N,k]=m.useState(),[C,E]=m.useState(),T=m.useRef(new Map),M=m.useCallback((A,{deletedFetchers:oe,newErrors:q,flushSync:W,viewTransitionOpts:ee})=>{q&&a&&Object.values(q).forEach(te=>a(te,{location:A.location,params:A.matches[0]?.params??{},pattern:bi(A.matches)})),A.fetchers.forEach((te,Z)=>{te.data!==void 0&&T.current.set(Z,te.data)}),oe.forEach(te=>T.current.delete(te)),Db(W===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let re=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Db(ee==null||re,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ee||!re){r&&W?r(()=>d(A)):o===!1?d(A):m.startTransition(()=>{o===!0&&h(te=>zb(te,A)),d(A)});return}if(r&&W){r(()=>{N&&(w?.resolve(),N.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let te=e.window.document.startViewTransition(()=>{r(()=>d(A))});te.finished.finally(()=>{r(()=>{S(void 0),k(void 0),x(void 0),b({isTransitioning:!1})})}),r(()=>k(te));return}N?(w?.resolve(),N.skipTransition(),E({state:A,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(x(A),b({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[e.window,r,N,w,o,h,a]);m.useLayoutEffect(()=>e.subscribe(M),[e,M]),m.useEffect(()=>{y.isTransitioning&&!y.flushSync&&S(new x4)},[y]),m.useEffect(()=>{if(w&&p&&e.window){let A=p,oe=w.promise,q=e.window.document.startViewTransition(async()=>{o===!1?d(A):m.startTransition(()=>{o===!0&&h(W=>zb(W,A)),d(A)}),await oe});q.finished.finally(()=>{S(void 0),k(void 0),x(void 0),b({isTransitioning:!1})}),k(q)}},[p,w,e.window,o,h]),m.useEffect(()=>{w&&p&&f.location.key===p.location.key&&w.resolve()},[w,N,f.location,p]),m.useEffect(()=>{!y.isTransitioning&&C&&(x(C.state),b({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),E(void 0))},[y.isTransitioning,C]);let _=m.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,oe,q)=>e.navigate(A,{state:oe,preventScrollReset:q?.preventScrollReset}),replace:(A,oe,q)=>e.navigate(A,{replace:!0,state:oe,preventScrollReset:q?.preventScrollReset})}),[e]),L=e.basename||"/",B=m.useMemo(()=>({router:e,navigator:_,static:!1,basename:L,onError:a}),[e,_,L,a]);return m.createElement(m.Fragment,null,m.createElement(Eo.Provider,{value:B},m.createElement(wi.Provider,{value:f},m.createElement(E2.Provider,{value:T.current},m.createElement($p.Provider,{value:y},m.createElement(S4,{basename:L,location:f.location,navigationType:f.historyAction,navigator:_,useTransitions:o},m.createElement(y4,{routes:e.routes,manifest:e.manifest,future:e.future,state:f,isStatic:!1,onError:a})))))),null)}function zb(e,r){return{...e,navigation:r.navigation.state!=="idle"?r.navigation:e.navigation,revalidation:r.revalidation!=="idle"?r.revalidation:e.revalidation,actionData:r.navigation.state!=="submitting"?r.actionData:e.actionData,fetchers:r.fetchers}}var y4=m.memo(b4);function b4({routes:e,manifest:r,future:a,state:o,isStatic:i,onError:c}){return t4(e,void 0,{manifest:r,state:o,isStatic:i,onError:c})}function w4(e){return e4(e.context)}function S4({basename:e="/",children:r=null,location:a,navigationType:o="POP",navigator:i,static:c=!1,useTransitions:d}){Be(!Si(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=m.useMemo(()=>({basename:f,navigator:i,static:c,useTransitions:d,future:{}}),[f,i,c,d]);typeof a=="string"&&(a=vr(a));let{pathname:p="/",search:x="",hash:y="",state:b=null,key:w="default",mask:S}=a,N=m.useMemo(()=>{let k=Vn(p,f);return k==null?null:{location:{pathname:k,search:x,hash:y,state:b,key:w,mask:S},navigationType:o}},[f,p,x,y,b,w,o,S]);return Pt(N!=null,`<Router basename="${f}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:m.createElement(qn.Provider,{value:h},m.createElement(Ku.Provider,{children:r,value:N}))}var bu="get",wu="application/x-www-form-urlencoded";function Xu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function j4(e){return Xu(e)&&e.tagName.toLowerCase()==="button"}function N4(e){return Xu(e)&&e.tagName.toLowerCase()==="form"}function k4(e){return Xu(e)&&e.tagName.toLowerCase()==="input"}function C4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function E4(e,r){return e.button===0&&(!r||r==="_self")&&!C4(e)}var ou=null;function R4(){if(ou===null)try{new FormData(document.createElement("form"),0),ou=!1}catch{ou=!0}return ou}var T4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sh(e){return e!=null&&!T4.has(e)?(Pt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wu}"`),null):e}function _4(e,r){let a,o,i,c,d;if(N4(e)){let f=e.getAttribute("action");o=f?Vn(f,r):null,a=e.getAttribute("method")||bu,i=sh(e.getAttribute("enctype"))||wu,c=new FormData(e)}else if(j4(e)||k4(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(o=h?Vn(h,r):null,a=e.getAttribute("formmethod")||f.getAttribute("method")||bu,i=sh(e.getAttribute("formenctype"))||sh(f.getAttribute("enctype"))||wu,c=new FormData(f,e),!R4()){let{name:p,type:x,value:y}=e;if(x==="image"){let b=p?`${p}.`:"";c.append(`${b}x`,"0"),c.append(`${b}y`,"0")}else p&&c.append(p,y)}}else{if(Xu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=bu,o=null,i=wu,d=e}return c&&i==="text/plain"&&(d=c,c=void 0),{action:o,method:a.toLowerCase(),encType:i,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yp(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function L2(e,r,a,o){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:r&&Vn(i.pathname,r)==="/"?i.pathname=`${Tu(r)}/_root.${o}`:i.pathname=`${Tu(i.pathname)}.${o}`,i}async function M4(e,r){if(e.id in r)return r[e.id];try{let a=await import(e.module);return r[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function A4(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function D4(e,r,a){let o=await Promise.all(e.map(async i=>{let c=r.routes[i.route.id];if(c){let d=await M4(c,a);return d.links?d.links():[]}return[]}));return P4(o.flat(1).filter(A4).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Lb(e,r,a,o,i,c){let d=(h,p)=>a[p]?h.route.id!==a[p].route.id:!0,f=(h,p)=>a[p].pathname!==h.pathname||a[p].route.path?.endsWith("*")&&a[p].params["*"]!==h.params["*"];return c==="assets"?r.filter((h,p)=>d(h,p)||f(h,p)):c==="data"?r.filter((h,p)=>{let x=o.routes[h.route.id];if(!x||!x.hasLoader)return!1;if(d(h,p)||f(h,p))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function O4(e,r,{includeHydrateFallback:a}={}){return z4(e.map(o=>{let i=r.routes[o.route.id];if(!i)return[];let c=[i.module];return i.clientActionModule&&(c=c.concat(i.clientActionModule)),i.clientLoaderModule&&(c=c.concat(i.clientLoaderModule)),a&&i.hydrateFallbackModule&&(c=c.concat(i.hydrateFallbackModule)),i.imports&&(c=c.concat(i.imports)),c}).flat(1))}function z4(e){return[...new Set(e)]}function L4(e){let r={},a=Object.keys(e).sort();for(let o of a)r[o]=e[o];return r}function P4(e,r){let a=new Set;return new Set(r),e.reduce((o,i)=>{let c=JSON.stringify(L4(i));return a.has(c)||(a.add(c),o.push({key:c,link:i})),o},[])}function Kp(){let e=m.useContext(Eo);return Yp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function I4(){let e=m.useContext(wi);return Yp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xp=m.createContext(void 0);Xp.displayName="FrameworkContext";function Wu(){let e=m.useContext(Xp);return Yp(e,"You must render this element inside a <HydratedRouter> element"),e}function U4(e,r){let a=m.useContext(Xp),[o,i]=m.useState(!1),[c,d]=m.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=r,b=m.useRef(null);m.useEffect(()=>{if(e==="render"&&d(!0),e==="viewport"){let N=C=>{C.forEach(E=>{d(E.isIntersecting)})},k=new IntersectionObserver(N,{threshold:.5});return b.current&&k.observe(b.current),()=>{k.disconnect()}}},[e]),m.useEffect(()=>{if(o){let N=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(N)}}},[o]);let w=()=>{i(!0)},S=()=>{i(!1),d(!1)};return a?e!=="intent"?[c,b,{}]:[c,b,{onFocus:Xl(f,w),onBlur:Xl(h,S),onMouseEnter:Xl(p,w),onMouseLeave:Xl(x,S),onTouchStart:Xl(y,w)}]:[!1,b,{}]}function Xl(e,r){return a=>{e&&e(a),a.defaultPrevented||r(a)}}function B4({page:e,...r}){let a=C2(),{nonce:o}=Wu(),{router:i}=Kp(),c=m.useMemo(()=>r2(i.routes,e,i.basename),[i.routes,e,i.basename]);return c?(r.nonce==null&&o&&(r={...r,nonce:o}),a?m.createElement(F4,{page:e,matches:c,...r}):m.createElement($4,{page:e,matches:c,...r})):null}function H4(e){let{manifest:r,routeModules:a}=Wu(),[o,i]=m.useState([]);return m.useEffect(()=>{let c=!1;return D4(e,r,a).then(d=>{c||i(d)}),()=>{c=!0}},[e,r,a]),o}function F4({page:e,matches:r,...a}){let o=br(),{future:i}=Wu(),{basename:c}=Kp(),d=m.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let f=L2(e,c,i.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,p=[];for(let x of r)typeof x.route.shouldRevalidate=="function"?h=!0:p.push(x.route.id);return h&&p.length>0&&f.searchParams.set("_routes",p.join(",")),[f.pathname+f.search]},[c,i.v8_trailingSlashAwareDataRequests,e,o,r]);return m.createElement(m.Fragment,null,d.map(f=>m.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...a})))}function $4({page:e,matches:r,...a}){let o=br(),{future:i,manifest:c,routeModules:d}=Wu(),{basename:f}=Kp(),{loaderData:h,matches:p}=I4(),x=m.useMemo(()=>Lb(e,r,p,c,o,"data"),[e,r,p,c,o]),y=m.useMemo(()=>Lb(e,r,p,c,o,"assets"),[e,r,p,c,o]),b=m.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let N=new Set,k=!1;if(r.forEach(E=>{let T=c.routes[E.route.id];!T||!T.hasLoader||(!x.some(M=>M.route.id===E.route.id)&&E.route.id in h&&d[E.route.id]?.shouldRevalidate||T.hasClientLoader?k=!0:N.add(E.route.id))}),N.size===0)return[];let C=L2(e,f,i.v8_trailingSlashAwareDataRequests,"data");return k&&N.size>0&&C.searchParams.set("_routes",r.filter(E=>N.has(E.route.id)).map(E=>E.route.id).join(",")),[C.pathname+C.search]},[f,i.v8_trailingSlashAwareDataRequests,h,o,c,x,r,e,d]),w=m.useMemo(()=>O4(y,c),[y,c]),S=H4(y);return m.createElement(m.Fragment,null,b.map(N=>m.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...a})),w.map(N=>m.createElement("link",{key:N,rel:"modulepreload",href:N,...a})),S.map(({key:N,link:k})=>m.createElement("link",{key:N,nonce:a.nonce,...k,crossOrigin:k.crossOrigin??a.crossOrigin})))}function V4(...e){return r=>{e.forEach(a=>{typeof a=="function"?a(r):a!=null&&(a.current=r)})}}var q4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{q4&&(window.__reactRouterVersion="7.18.1")}catch{}function G4(e,r){return b_({basename:r?.basename,getContext:r?.getContext,future:r?.future,history:LT({window:r?.window}),hydrationData:Y4(),routes:e,mapRouteProperties:p4,hydrationRouteProperties:g4,dataStrategy:r?.dataStrategy,patchRoutesOnNavigation:r?.patchRoutesOnNavigation,window:r?.window,instrumentations:r?.instrumentations}).initialize()}function Y4(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:K4(e.errors)}),e}function K4(e){if(!e)return null;let r=Object.entries(e),a={};for(let[o,i]of r)if(i&&i.__type==="RouteErrorResponse")a[o]=new yi(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(typeof i.__subType=="string"&&s_.includes(i.__subType)){let c=window[i.__subType];if(typeof c=="function")try{let d=new c(i.message);d.stack="",a[o]=d}catch{}}if(a[o]==null){let c=new Error(i.message);c.stack="",a[o]=c}}else a[o]=i;return a}var Zu=m.forwardRef(function({onClick:r,discover:a="render",prefetch:o="none",relative:i,reloadDocument:c,replace:d,mask:f,state:h,target:p,to:x,preventScrollReset:y,viewTransition:b,defaultShouldRevalidate:w,...S},N){let{basename:k,navigator:C,useTransitions:E}=m.useContext(qn),T=typeof x=="string"&&Gu.test(x),M=d2(x,k);x=M.to;let _=Z_(x,{relative:i}),L=br(),B=null;if(f){let Z=Yu(f,[],L.mask?L.mask.pathname:"/",!0);k!=="/"&&(Z.pathname=Z.pathname==="/"?k:Fn([k,Z.pathname])),B=C.createHref(Z)}let[A,oe,q]=U4(o,S),W=Q4(x,{replace:d,mask:f,state:h,target:p,preventScrollReset:y,relative:i,viewTransition:b,defaultShouldRevalidate:w,useTransitions:E});function ee(Z){r&&r(Z),Z.defaultPrevented||W(Z)}let re=!(M.isExternal||c),te=m.createElement("a",{...S,...q,href:(re?B:void 0)||M.absoluteURL||_,onClick:re?ee:r,ref:V4(N,oe),target:p,"data-discover":!T&&a==="render"?"true":void 0});return A&&!T?m.createElement(m.Fragment,null,te,m.createElement(B4,{page:_})):te});Zu.displayName="Link";var X4=m.forwardRef(function({"aria-current":r="page",caseSensitive:a=!1,className:o="",end:i=!1,style:c,to:d,viewTransition:f,children:h,...p},x){let y=ji(d,{relative:p.relative}),b=br(),w=m.useContext(wi),{navigator:S,basename:N}=m.useContext(qn),k=w!=null&&r5(y)&&f===!0,C=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,E=b.pathname,T=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;a||(E=E.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&N&&(T=Vn(T,N)||T);const M=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let _=E===C||!i&&E.startsWith(C)&&E.charAt(M)==="/",L=T!=null&&(T===C||!i&&T.startsWith(C)&&T.charAt(C.length)==="/"),B={isActive:_,isPending:L,isTransitioning:k},A=_?r:void 0,oe;typeof o=="function"?oe=o(B):oe=[o,_?"active":null,L?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let q=typeof c=="function"?c(B):c;return m.createElement(Zu,{...p,"aria-current":A,className:oe,ref:x,style:q,to:d,viewTransition:f},typeof h=="function"?h(B):h)});X4.displayName="NavLink";var W4=m.forwardRef(({discover:e="render",fetcherKey:r,navigate:a,reloadDocument:o,replace:i,state:c,method:d=bu,action:f,onSubmit:h,relative:p,preventScrollReset:x,viewTransition:y,defaultShouldRevalidate:b,...w},S)=>{let{useTransitions:N}=m.useContext(qn),k=t5(),C=n5(f,{relative:p}),E=d.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&Gu.test(f),M=_=>{if(h&&h(_),_.defaultPrevented)return;_.preventDefault();let L=_.nativeEvent.submitter,B=L?.getAttribute("formmethod")||d,A=()=>k(L||_.currentTarget,{fetcherKey:r,method:B,navigate:a,replace:i,state:c,relative:p,preventScrollReset:x,viewTransition:y,defaultShouldRevalidate:b});N&&a!==!1?m.startTransition(()=>A()):A()};return m.createElement("form",{ref:S,method:E,action:C,onSubmit:o?h:M,...w,"data-discover":!T&&e==="render"?"true":void 0})});W4.displayName="Form";function Z4(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function P2(e){let r=m.useContext(Eo);return Be(r,Z4(e)),r}function Q4(e,{target:r,replace:a,mask:o,state:i,preventScrollReset:c,relative:d,viewTransition:f,defaultShouldRevalidate:h,useTransitions:p}={}){let x=M2(),y=br(),b=ji(e,{relative:d});return m.useCallback(w=>{if(E4(w,r)){w.preventDefault();let S=a!==void 0?a:pr(y)===pr(b),N=()=>x(e,{replace:S,mask:o,state:i,preventScrollReset:c,relative:d,viewTransition:f,defaultShouldRevalidate:h});p?m.startTransition(()=>N()):N()}},[y,x,b,a,o,i,r,e,c,d,f,h,p])}var J4=0,e5=()=>`__${String(++J4)}__`;function t5(){let{router:e}=P2("useSubmit"),{basename:r}=m.useContext(qn),a=c4(),o=e.fetch,i=e.navigate;return m.useCallback(async(c,d={})=>{let{action:f,method:h,encType:p,formData:x,body:y}=_4(c,r);if(d.navigate===!1){let b=d.fetcherKey||e5();await o(b,a,d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||h,formEncType:d.encType||p,flushSync:d.flushSync})}else await i(d.action||f,{defaultShouldRevalidate:d.defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:x,body:y,formMethod:d.method||h,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,i,r,a])}function n5(e,{relative:r}={}){let{basename:a}=m.useContext(qn),o=m.useContext(yr);Be(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),c={...ji(e||".",{relative:r})},d=br();if(e==null){c.search=d.search;let f=new URLSearchParams(c.search),h=f.getAll("index");if(h.some(x=>x==="")){f.delete("index"),h.filter(y=>y).forEach(y=>f.append("index",y));let x=f.toString();c.search=x?`?${x}`:""}}return(!e||e===".")&&i.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:Fn([a,c.pathname])),pr(c)}function r5(e,{relative:r}={}){let a=m.useContext($p);Be(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=P2("useViewTransitionState"),i=ji(e,{relative:r});if(!a.isTransitioning)return!1;let c=Vn(a.currentLocation.pathname,o)||a.currentLocation.pathname,d=Vn(a.nextLocation.pathname,o)||a.nextLocation.pathname;return Ru(i.pathname,d)!=null||Ru(i.pathname,c)!=null}function I2(e){var r,a,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(a=I2(e[r]))&&(o&&(o+=" "),o+=a)}else for(a in e)e[a]&&(o&&(o+=" "),o+=a);return o}function Wp(){for(var e,r,a=0,o="",i=arguments.length;a<i;a++)(e=arguments[a])&&(r=I2(e))&&(o&&(o+=" "),o+=r);return o}const Zp="-",a5=e=>{const r=s5(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{const f=d.split(Zp);return f[0]===""&&f.length!==1&&f.shift(),U2(f,r)||o5(d)},getConflictingClassGroupIds:(d,f)=>{const h=a[d]||[];return f&&o[d]?[...h,...o[d]]:h}}},U2=(e,r)=>{if(e.length===0)return r.classGroupId;const a=e[0],o=r.nextPart.get(a),i=o?U2(e.slice(1),o):void 0;if(i)return i;if(r.validators.length===0)return;const c=e.join(Zp);return r.validators.find(({validator:d})=>d(c))?.classGroupId},Pb=/^\[(.+)\]$/,o5=e=>{if(Pb.test(e)){const r=Pb.exec(e)[1],a=r?.substring(0,r.indexOf(":"));if(a)return"arbitrary.."+a}},s5=e=>{const{theme:r,prefix:a}=e,o={nextPart:new Map,validators:[]};return i5(Object.entries(e.classGroups),a).forEach(([c,d])=>{ap(d,o,c,r)}),o},ap=(e,r,a,o)=>{e.forEach(i=>{if(typeof i=="string"){const c=i===""?r:Ib(r,i);c.classGroupId=a;return}if(typeof i=="function"){if(l5(i)){ap(i(o),r,a,o);return}r.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([c,d])=>{ap(d,Ib(r,c),a,o)})})},Ib=(e,r)=>{let a=e;return r.split(Zp).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},l5=e=>e.isThemeGetter,i5=(e,r)=>r?e.map(([a,o])=>{const i=o.map(c=>typeof c=="string"?r+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(([d,f])=>[r+d,f])):c);return[a,i]}):e,c5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,a=new Map,o=new Map;const i=(c,d)=>{a.set(c,d),r++,r>e&&(r=0,o=a,a=new Map)};return{get(c){let d=a.get(c);if(d!==void 0)return d;if((d=o.get(c))!==void 0)return i(c,d),d},set(c,d){a.has(c)?a.set(c,d):i(c,d)}}},B2="!",u5=e=>{const{separator:r,experimentalParseClassName:a}=e,o=r.length===1,i=r[0],c=r.length,d=f=>{const h=[];let p=0,x=0,y;for(let k=0;k<f.length;k++){let C=f[k];if(p===0){if(C===i&&(o||f.slice(k,k+c)===r)){h.push(f.slice(x,k)),x=k+c;continue}if(C==="/"){y=k;continue}}C==="["?p++:C==="]"&&p--}const b=h.length===0?f:f.substring(x),w=b.startsWith(B2),S=w?b.substring(1):b,N=y&&y>x?y-x:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:N}};return a?f=>a({className:f,parseClassName:d}):d},d5=e=>{if(e.length<=1)return e;const r=[];let a=[];return e.forEach(o=>{o[0]==="["?(r.push(...a.sort(),o),a=[]):a.push(o)}),r.push(...a.sort()),r},f5=e=>({cache:c5(e.cacheSize),parseClassName:u5(e),...a5(e)}),m5=/\s+/,h5=(e,r)=>{const{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=r,c=[],d=e.trim().split(m5);let f="";for(let h=d.length-1;h>=0;h-=1){const p=d[h],{modifiers:x,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:w}=a(p);let S=!!w,N=o(S?b.substring(0,w):b);if(!N){if(!S){f=p+(f.length>0?" "+f:f);continue}if(N=o(b),!N){f=p+(f.length>0?" "+f:f);continue}S=!1}const k=d5(x).join(":"),C=y?k+B2:k,E=C+N;if(c.includes(E))continue;c.push(E);const T=i(N,S);for(let M=0;M<T.length;++M){const _=T[M];c.push(C+_)}f=p+(f.length>0?" "+f:f)}return f};function p5(){let e=0,r,a,o="";for(;e<arguments.length;)(r=arguments[e++])&&(a=H2(r))&&(o&&(o+=" "),o+=a);return o}const H2=e=>{if(typeof e=="string")return e;let r,a="";for(let o=0;o<e.length;o++)e[o]&&(r=H2(e[o]))&&(a&&(a+=" "),a+=r);return a};function Ub(e,...r){let a,o,i,c=d;function d(h){const p=r.reduce((x,y)=>y(x),e());return a=f5(p),o=a.cache.get,i=a.cache.set,c=f,f(h)}function f(h){const p=o(h);if(p)return p;const x=h5(h,a);return i(h,x),x}return function(){return c(p5.apply(null,arguments))}}const wt=e=>{const r=a=>a[e]||[];return r.isThemeGetter=!0,r},F2=/^\[(?:([a-z-]+):)?(.+)\]$/i,g5=/^\d+\/\d+$/,x5=new Set(["px","full","screen"]),v5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,b5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yr=e=>Ms(e)||x5.has(e)||g5.test(e),Ma=e=>$s(e,"length",_5),Ms=e=>!!e&&!Number.isNaN(Number(e)),lh=e=>$s(e,"number",Ms),Wl=e=>!!e&&Number.isInteger(Number(e)),j5=e=>e.endsWith("%")&&Ms(e.slice(0,-1)),Ue=e=>F2.test(e),Aa=e=>v5.test(e),N5=new Set(["length","size","percentage"]),k5=e=>$s(e,N5,$2),C5=e=>$s(e,"position",$2),E5=new Set(["image","url"]),R5=e=>$s(e,E5,A5),T5=e=>$s(e,"",M5),Zl=()=>!0,$s=(e,r,a)=>{const o=F2.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):a(o[2]):!1},_5=e=>y5.test(e)&&!b5.test(e),$2=()=>!1,M5=e=>w5.test(e),A5=e=>S5.test(e),Bb=()=>{const e=wt("colors"),r=wt("spacing"),a=wt("blur"),o=wt("brightness"),i=wt("borderColor"),c=wt("borderRadius"),d=wt("borderSpacing"),f=wt("borderWidth"),h=wt("contrast"),p=wt("grayscale"),x=wt("hueRotate"),y=wt("invert"),b=wt("gap"),w=wt("gradientColorStops"),S=wt("gradientColorStopPositions"),N=wt("inset"),k=wt("margin"),C=wt("opacity"),E=wt("padding"),T=wt("saturate"),M=wt("scale"),_=wt("sepia"),L=wt("skew"),B=wt("space"),A=wt("translate"),oe=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",Ue,r],ee=()=>[Ue,r],re=()=>["",Yr,Ma],te=()=>["auto",Ms,Ue],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["start","end","center","between","around","evenly","stretch"],Q=()=>["","0",Ue],xe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[Ms,Ue];return{cacheSize:500,separator:":",theme:{colors:[Zl],spacing:[Yr,Ma],blur:["none","",Aa,Ue],brightness:O(),borderColor:[e],borderRadius:["none","","full",Aa,Ue],borderSpacing:ee(),borderWidth:re(),contrast:O(),grayscale:Q(),hueRotate:O(),invert:Q(),gap:ee(),gradientColorStops:[e],gradientColorStopPositions:[j5,Ma],inset:W(),margin:W(),opacity:O(),padding:ee(),saturate:O(),scale:O(),sepia:Q(),skew:O(),space:ee(),translate:ee()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],container:["container"],columns:[{columns:[Aa]}],"break-after":[{"break-after":xe()}],"break-before":[{"break-before":xe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),Ue]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:oe()}],"overscroll-x":[{"overscroll-x":oe()}],"overscroll-y":[{"overscroll-y":oe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[N]}],"inset-x":[{"inset-x":[N]}],"inset-y":[{"inset-y":[N]}],start:[{start:[N]}],end:[{end:[N]}],top:[{top:[N]}],right:[{right:[N]}],bottom:[{bottom:[N]}],left:[{left:[N]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Wl,Ue]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",Wl,Ue]}],"grid-cols":[{"grid-cols":[Zl]}],"col-start-end":[{col:["auto",{span:["full",Wl,Ue]},Ue]}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":[Zl]}],"row-start-end":[{row:["auto",{span:[Wl,Ue]},Ue]}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...ae()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ae(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ae(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ue,r]}],"min-w":[{"min-w":[Ue,r,"min","max","fit"]}],"max-w":[{"max-w":[Ue,r,"none","full","min","max","fit","prose",{screen:[Aa]},Aa]}],h:[{h:[Ue,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ue,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ue,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ue,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Aa,Ma]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lh]}],"font-family":[{font:[Zl]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ue]}],"line-clamp":[{"line-clamp":["none",Ms,lh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yr,Ue]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yr,Ma]}],"underline-offset":[{"underline-offset":["auto",Yr,Ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:ee()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),C5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k5]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},R5]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[c]}],"rounded-s":[{"rounded-s":[c]}],"rounded-e":[{"rounded-e":[c]}],"rounded-t":[{"rounded-t":[c]}],"rounded-r":[{"rounded-r":[c]}],"rounded-b":[{"rounded-b":[c]}],"rounded-l":[{"rounded-l":[c]}],"rounded-ss":[{"rounded-ss":[c]}],"rounded-se":[{"rounded-se":[c]}],"rounded-ee":[{"rounded-ee":[c]}],"rounded-es":[{"rounded-es":[c]}],"rounded-tl":[{"rounded-tl":[c]}],"rounded-tr":[{"rounded-tr":[c]}],"rounded-br":[{"rounded-br":[c]}],"rounded-bl":[{"rounded-bl":[c]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Yr,Ue]}],"outline-w":[{outline:[Yr,Ma]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[Yr,Ma]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Aa,T5]}],"shadow-color":[{shadow:[Zl]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Aa,Ue]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[y]}],saturate:[{saturate:[T]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ue]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Wl,Ue]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":ee()}],"scroll-mx":[{"scroll-mx":ee()}],"scroll-my":[{"scroll-my":ee()}],"scroll-ms":[{"scroll-ms":ee()}],"scroll-me":[{"scroll-me":ee()}],"scroll-mt":[{"scroll-mt":ee()}],"scroll-mr":[{"scroll-mr":ee()}],"scroll-mb":[{"scroll-mb":ee()}],"scroll-ml":[{"scroll-ml":ee()}],"scroll-p":[{"scroll-p":ee()}],"scroll-px":[{"scroll-px":ee()}],"scroll-py":[{"scroll-py":ee()}],"scroll-ps":[{"scroll-ps":ee()}],"scroll-pe":[{"scroll-pe":ee()}],"scroll-pt":[{"scroll-pt":ee()}],"scroll-pr":[{"scroll-pr":ee()}],"scroll-pb":[{"scroll-pb":ee()}],"scroll-pl":[{"scroll-pl":ee()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Yr,Ma,lh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},D5=(e,{cacheSize:r,prefix:a,separator:o,experimentalParseClassName:i,extend:c={},override:d={}})=>{ai(e,"cacheSize",r),ai(e,"prefix",a),ai(e,"separator",o),ai(e,"experimentalParseClassName",i);for(const f in d)O5(e[f],d[f]);for(const f in c)z5(e[f],c[f]);return e},ai=(e,r,a)=>{a!==void 0&&(e[r]=a)},O5=(e,r)=>{if(r)for(const a in r)ai(e,a,r[a])},z5=(e,r)=>{if(r)for(const a in r){const o=r[a];o!==void 0&&(e[a]=(e[a]||[]).concat(o))}},V2=(e,...r)=>typeof e=="function"?Ub(Bb,e,...r):Ub(()=>D5(Bb(),e),...r);var L5=V2({extend:{classGroups:{"font-size":[{text:["display-2xl","display-xl","display-lg","display-md"]},{text:["headline","title-lg","title-md"]},{text:["body-lg","body-md","body-sm"]},{text:["label","label-caps"]},{text:["code-md","code-sm"]}]}}});function gt(...e){return L5(Wp(e))}function Hb(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Ls(...e){return r=>{let a=!1;const o=e.map(i=>{const c=Hb(i,r);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let i=0;i<o.length;i++){const c=o[i];typeof c=="function"?c():Hb(e[i],null)}}}}function _e(...e){return m.useCallback(Ls(...e),e)}function bo(e){const r=m.forwardRef((a,o)=>{let{children:i,...c}=a,d=null,f=!1;const h=[];Fb(i)&&typeof su=="function"&&(i=su(i._payload)),m.Children.forEach(i,b=>{if(H5(b)){f=!0;const w=b;let S="child"in w.props?w.props.child:w.props.children;Fb(S)&&typeof su=="function"&&(S=su(S._payload)),d=I5(w,S),h.push(d?.props?.children)}else h.push(b)}),d?d=m.cloneElement(d,void 0,h):!f&&m.Children.count(i)===1&&m.isValidElement(i)&&(d=i);const p=d?B5(d):void 0,x=_e(o,p);if(!d){if(i||i===0)throw new Error(f?q5(e):V5(e));return i}const y=U5(c,d.props??{});return d.type!==m.Fragment&&(y.ref=o?x:p),m.cloneElement(d,y)});return r.displayName=`${e}.Slot`,r}var Qp=bo("Slot"),q2=Symbol.for("radix.slottable");function P5(e){const r=a=>"child"in a?a.children(a.child):a.children;return r.displayName=`${e}.Slottable`,r.__radixId=q2,r}var I5=(e,r)=>{if("child"in e.props){const a=e.props.child;return m.isValidElement(a)?m.cloneElement(a,void 0,e.props.children(a.props.children)):null}return m.isValidElement(r)?r:null};function U5(e,r){const a={...r};for(const o in r){const i=e[o],c=r[o];/^on[A-Z]/.test(o)?i&&c?a[o]=(...f)=>{const h=c(...f);return i(...f),h}:i&&(a[o]=i):o==="style"?a[o]={...i,...c}:o==="className"&&(a[o]=[i,c].filter(Boolean).join(" "))}return{...e,...a}}function B5(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}function H5(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===q2}var F5=Symbol.for("react.lazy");function Fb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===F5&&"_payload"in e&&$5(e._payload)}function $5(e){return typeof e=="object"&&e!==null&&"then"in e}var V5=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,q5=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,su=vi[" use ".trim().toString()];const $b=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vb=Wp,wr=(e,r)=>a=>{var o;if(r?.variants==null)return Vb(e,a?.class,a?.className);const{variants:i,defaultVariants:c}=r,d=Object.keys(i).map(p=>{const x=a?.[p],y=c?.[p];if(x===null)return null;const b=$b(x)||$b(y);return i[p][b]}),f=a&&Object.entries(a).reduce((p,x)=>{let[y,b]=x;return b===void 0||(p[y]=b),p},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((p,x)=>{let{class:y,className:b,...w}=x;return Object.entries(w).every(S=>{let[N,k]=S;return Array.isArray(k)?k.includes({...c,...f}[N]):{...c,...f}[N]===k})?[...p,y,b]:p},[]);return Vb(e,d,h,a?.class,a?.className)};const G5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),G2=(...e)=>e.filter((r,a,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===a).join(" ").trim();var Y5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const K5=m.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:o,className:i="",children:c,iconNode:d,...f},h)=>m.createElement("svg",{ref:h,...Y5,width:r,height:r,stroke:e,strokeWidth:o?Number(a)*24/Number(r):a,className:G2("lucide",i),...f},[...d.map(([p,x])=>m.createElement(p,x)),...Array.isArray(c)?c:[c]]));const he=(e,r)=>{const a=m.forwardRef(({className:o,...i},c)=>m.createElement(K5,{ref:c,iconNode:r,className:G2(`lucide-${G5(e)}`,o),...i}));return a.displayName=`${e}`,a};const X5=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],op=he("Activity",X5);const W5=[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]],Z5=he("ArrowDownLeft",W5);const Q5=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Fa=he("ArrowLeft",Q5);const J5=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],eM=he("ArrowUpRight",J5);const tM=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Y2=he("ArrowUp",tM);const nM=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]],rM=he("BookOpenText",nM);const aM=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],oM=he("BookOpen",aM);const sM=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Vs=he("Bot",sM);const lM=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],_u=he("Boxes",lM);const iM=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],cM=he("Braces",iM);const uM=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],dM=he("BrainCircuit",uM);const fM=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],mM=he("Brain",fM);const hM=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],pM=he("Bug",hM);const gM=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],xM=he("ChartColumn",gM);const vM=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Rn=he("Check",vM);const yM=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qr=he("ChevronDown",yM);const bM=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],wM=he("ChevronLeft",bM);const SM=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jr=he("ChevronRight",SM);const jM=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],K2=he("ChevronUp",jM);const NM=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],kM=he("ChevronsLeft",NM);const CM=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],EM=he("ChevronsRight",CM);const RM=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],TM=he("ChevronsUpDown",RM);const _M=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ni=he("CircleAlert",_M);const MM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],AM=he("CircleArrowUp",MM);const DM=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],OM=he("CircleCheckBig",DM);const zM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],X2=he("CircleCheck",zM);const LM=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],PM=he("CircleDashed",LM);const IM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],W2=he("Circle",IM);const UM=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],BM=he("ClipboardCheck",UM);const HM=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Jp=he("Clock",HM);const FM=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],$M=he("Cloud",FM);const VM=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],qM=he("Code",VM);const GM=[["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"}]],Qu=he("Copy",GM);const YM=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Z2=he("Cpu",YM);const KM=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Q2=he("Database",KM);const XM=[["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"}]],J2=he("Ellipsis",XM);const WM=[["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"}]],ew=he("ExternalLink",WM);const ZM=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],QM=he("EyeOff",ZM);const JM=[["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"}]],e3=he("Eye",JM);const t3=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],n3=he("FileCode",t3);const r3=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],a3=he("FileSpreadsheet",r3);const o3=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],sp=he("FileText",o3);const s3=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],l3=he("File",s3);const i3=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],c3=he("Filter",i3);const u3=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Mu=he("FlaskConical",u3);const d3=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],lp=he("FolderKanban",d3);const f3=[["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"}]],tw=he("FolderOpen",f3);const m3=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]],h3=he("FolderPlus",m3);const p3=[["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"}]],ip=he("Folder",p3);const g3=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],nw=he("Gauge",g3);const x3=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],v3=he("GitBranch",x3);const y3=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],ki=he("GitCommitHorizontal",y3);const b3=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],rw=he("GitPullRequest",b3);const w3=[["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"}]],S3=he("Globe",w3);const j3=[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]],N3=he("Hammer",j3);const k3=[["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"}]],C3=he("Hand",k3);const E3=[["path",{d:"M21 16V8a2 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:"yt0hxn"}]],R3=he("Hexagon",E3);const T3=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],_3=he("History",T3);const M3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],A3=he("Image",M3);const D3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cp=he("Info",D3);const O3=[["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"}]],ih=he("LayoutGrid",O3);const z3=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],L3=he("LayoutTemplate",z3);const P3=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],I3=he("ListChecks",P3);const U3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qs=he("LoaderCircle",U3);const B3=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],H3=he("Loader",B3);const F3=[["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"}]],$3=he("Lock",F3);const V3=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]],aw=he("MessageSquareText",V3);const q3=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]],G3=he("Mic",q3);const Y3=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ju=he("Minus",Y3);const K3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],X3=he("PanelLeftClose",K3);const W3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Z3=he("PanelLeftOpen",W3);const Q3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],J3=he("PanelRightClose",Q3);const eA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]],tA=he("PanelRightOpen",eA);const nA=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],rA=he("Pin",nA);const aA=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],eg=he("Play",aA);const oA=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]],sA=he("Plug",oA);const lA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ps=he("Plus",lA);const iA=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ow=he("RefreshCw",iA);const cA=[["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"}]],uA=he("RotateCcw",cA);const dA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],fA=he("Save",dA);const mA=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],qb=he("ScrollText",mA);const hA=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ed=he("Search",hA);const pA=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],gA=he("SendHorizontal",pA);const xA=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],tg=he("Server",xA);const vA=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],yA=he("Settings",vA);const bA=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],wA=he("Share2",bA);const SA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],sw=he("ShieldCheck",SA);const jA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]],NA=he("ShieldX",jA);const kA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],ch=he("Shield",kA);const CA=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],EA=he("Sparkles",CA);const RA=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],lw=he("SquarePen",RA);const TA=[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]],_A=he("Telescope",TA);const MA=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],AA=he("Terminal",MA);const DA=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],iw=he("Trash2",DA);const OA=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],ng=he("TrendingDown",OA);const zA=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],rg=he("TrendingUp",zA);const LA=[["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"}]],cw=he("TriangleAlert",LA);const PA=[["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"}]],IA=he("Undo2",PA);const UA=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],BA=he("Users",UA);const HA=[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]],FA=he("Waypoints",HA);const $A=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],VA=he("Webhook",$A);const qA=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ag=he("Workflow",qA);const GA=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Is=he("Wrench",GA);const YA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gn=he("X",YA);var Gb=1,KA=.9,XA=.8,WA=.17,uh=.1,dh=.999,ZA=.9999,QA=.99,JA=/[\\\/_+.#"@\[\(\{&]/,e6=/[\\\/_+.#"@\[\(\{&]/g,t6=/[\s-]/,uw=/[\s-]/g;function up(e,r,a,o,i,c,d){if(c===r.length)return i===e.length?Gb:QA;var f=`${i},${c}`;if(d[f]!==void 0)return d[f];for(var h=o.charAt(c),p=a.indexOf(h,i),x=0,y,b,w,S;p>=0;)y=up(e,r,a,o,p+1,c+1,d),y>x&&(p===i?y*=Gb:JA.test(e.charAt(p-1))?(y*=XA,w=e.slice(i,p-1).match(e6),w&&i>0&&(y*=Math.pow(dh,w.length))):t6.test(e.charAt(p-1))?(y*=KA,S=e.slice(i,p-1).match(uw),S&&i>0&&(y*=Math.pow(dh,S.length))):(y*=WA,i>0&&(y*=Math.pow(dh,p-i))),e.charAt(p)!==r.charAt(c)&&(y*=ZA)),(y<uh&&a.charAt(p-1)===o.charAt(c+1)||o.charAt(c+1)===o.charAt(c)&&a.charAt(p-1)!==o.charAt(c))&&(b=up(e,r,a,o,p+1,c+2,d),b*uh>y&&(y=b*uh)),y>x&&(x=y),p=a.indexOf(h,p+1);return d[f]=x,x}function Yb(e){return e.toLowerCase().replace(uw," ")}function n6(e,r,a){return e=a&&a.length>0?`${e+" "+a.join(" ")}`:e,up(e,r,Yb(e),Yb(r),0,0,{})}function pe(e,r,{checkForDefaultPrevented:a=!0}={}){return function(i){if(e?.(i),a===!1||!i||!i.defaultPrevented)return r?.(i)}}function Yt(e,r=[]){let a=[];function o(c,d){const f=m.createContext(d);f.displayName=c+"Context";const h=a.length;a=[...a,d];const p=y=>{const{scope:b,children:w,...S}=y,N=b?.[e]?.[h]||f,k=m.useMemo(()=>S,Object.values(S));return l.jsx(N.Provider,{value:k,children:w})};p.displayName=c+"Provider";function x(y,b,w={}){const{optional:S=!1}=w,N=b?.[e]?.[h]||f,k=m.useContext(N);if(k)return k;if(d!==void 0)return d;if(!S)throw new Error(`\`${y}\` must be used within \`${c}\``)}return[p,x]}const i=()=>{const c=a.map(d=>m.createContext(d));return function(f){const h=f?.[e]||c;return m.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return i.scopeName=e,[o,r6(i,...r)]}function r6(...e){const r=e[0];if(e.length===1)return r;const a=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const d=o.reduce((f,{useScope:h,scopeName:p})=>{const y=h(c)[`__scope${p}`];return{...f,...y}},{});return m.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return a.scopeName=r.scopeName,a}var Ct=globalThis?.document?m.useLayoutEffect:()=>{},a6=vi[" useId ".trim().toString()]||(()=>{}),o6=0;function Ut(e){const[r,a]=m.useState(a6());return Ct(()=>{a(o=>o??String(o6++))},[e]),r?`radix-${r}`:""}var s6=vi[" useInsertionEffect ".trim().toString()]||Ct;function Cn({prop:e,defaultProp:r,onChange:a=()=>{},caller:o}){const[i,c,d]=l6({defaultProp:r,onChange:a}),f=e!==void 0,h=f?e:i;{const x=m.useRef(e!==void 0);m.useEffect(()=>{const y=x.current;y!==f&&console.warn(`${o} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=f},[f,o])}const p=m.useCallback(x=>{if(f){const y=i6(x)?x(e):x;y!==e&&d.current?.(y)}else c(x)},[f,e,c,d]);return[h,p]}function l6({defaultProp:e,onChange:r}){const[a,o]=m.useState(e),i=m.useRef(a),c=m.useRef(r);return s6(()=>{c.current=r},[r]),m.useEffect(()=>{i.current!==a&&(c.current?.(a),i.current=a)},[a,i]),[a,o,c]}function i6(e){return typeof e=="function"}var Ro=Q1(),c6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ve=c6.reduce((e,r)=>{const a=bo(`Primitive.${r}`),o=m.forwardRef((i,c)=>{const{asChild:d,...f}=i,h=d?a:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(h,{...f,ref:c})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});function og(e,r){e&&Ro.flushSync(()=>e.dispatchEvent(r))}function St(e){const r=m.useRef(e);return m.useEffect(()=>{r.current=e}),m.useMemo(()=>((...a)=>r.current?.(...a)),[])}var u6="DismissableLayer",dp="dismissableLayer.update",d6="dismissableLayer.pointerDownOutside",f6="dismissableLayer.focusOutside",Kb,sg=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Gs=m.forwardRef((e,r)=>{const{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:h,...p}=e,x=m.useContext(sg),[y,b]=m.useState(null),w=y?.ownerDocument??globalThis?.document,[,S]=m.useState({}),N=_e(r,b),k=Array.from(x.layers),[C]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),E=C?k.indexOf(C):-1,T=y?k.indexOf(y):-1,M=x.layersWithOutsidePointerEventsDisabled.size>0,_=T>=E,L=m.useRef(!1),B=g6(W=>{c?.(W),f?.(W),W.defaultPrevented||h?.()},{ownerDocument:w,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:x.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(W=>{if(!(W instanceof Node))return!1;const ee=[...x.branches].some(re=>re.contains(W));return _&&!ee},[x.branches,_])}),A=x6(W=>{if(o&&L.current)return;const ee=W.target;[...x.branches].some(te=>te.contains(ee))||(d?.(W),f?.(W),W.defaultPrevented||h?.())},w),oe=y?T===k.length-1:!1,q=St(W=>{W.key==="Escape"&&(i?.(W),!W.defaultPrevented&&h&&(W.preventDefault(),h()))});return m.useEffect(()=>{if(oe)return w.addEventListener("keydown",q,{capture:!0}),()=>w.removeEventListener("keydown",q,{capture:!0})},[w,oe,q]),m.useEffect(()=>{if(y)return a&&(x.layersWithOutsidePointerEventsDisabled.size===0&&(Kb=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(y)),x.layers.add(y),Xb(),()=>{a&&(x.layersWithOutsidePointerEventsDisabled.delete(y),x.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=Kb))}},[y,w,a,x]),m.useEffect(()=>()=>{y&&(x.layers.delete(y),x.layersWithOutsidePointerEventsDisabled.delete(y),Xb())},[y,x]),m.useEffect(()=>{const W=()=>S({});return document.addEventListener(dp,W),()=>document.removeEventListener(dp,W)},[]),l.jsx(ve.div,{...p,ref:N,style:{pointerEvents:M?_?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,A.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,B.onPointerDownCapture)})});Gs.displayName=u6;var m6="DismissableLayerBranch",dw=m.forwardRef((e,r)=>{const a=m.useContext(sg),o=m.useRef(null),i=_e(r,o);return m.useEffect(()=>{const c=o.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),l.jsx(ve.div,{...e,ref:i})});dw.displayName=m6;function h6(){const e=m.useContext(sg),[r,a]=m.useState(null);return m.useEffect(()=>{if(r)return e.dismissableSurfaces.add(r),()=>{e.dismissableSurfaces.delete(r)}},[r,e.dismissableSurfaces]),a}var p6=()=>!0;function g6(e,r){const{ownerDocument:a=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:c,shouldHandlePointerDownOutside:d=p6}=r,f=St(e),h=m.useRef(!1),p=m.useRef(!1),x=m.useRef(new Map),y=m.useRef(()=>{});return m.useEffect(()=>{function b(){p.current=!1,i.current=!1,x.current.clear()}function w(){return Array.from(x.current.values()).some(Boolean)}function S(T){if(!p.current)return;const M=T.target;M instanceof Node&&[...c].some(L=>L.contains(M))||x.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{p.current&&y.current()},0)}function N(T){p.current&&x.current.set(T.type,!1)}const k=T=>{if(T.target&&!h.current){let M=function(){a.removeEventListener("click",y.current);const L=w();b(),L||fw(d6,f,_,{discrete:!0})};if(!d(T.target)){a.removeEventListener("click",y.current),b(),h.current=!1;return}const _={originalEvent:T};p.current=!0,i.current=o&&T.button===0,x.current.clear(),!o||T.button!==0?M():(a.removeEventListener("click",y.current),y.current=M,a.addEventListener("click",y.current,{once:!0}))}else a.removeEventListener("click",y.current),b();h.current=!1},C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of C)a.addEventListener(T,S,!0),a.addEventListener(T,N);const E=window.setTimeout(()=>{a.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(E),a.removeEventListener("pointerdown",k),a.removeEventListener("click",y.current);for(const T of C)a.removeEventListener(T,S,!0),a.removeEventListener(T,N)}},[a,f,o,i,c,d]),{onPointerDownCapture:()=>h.current=!0}}function x6(e,r=globalThis?.document){const a=St(e),o=m.useRef(!1);return m.useEffect(()=>{const i=c=>{c.target&&!o.current&&fw(f6,a,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",i),()=>r.removeEventListener("focusin",i)},[r,a]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Xb(){const e=new CustomEvent(dp);document.dispatchEvent(e)}function fw(e,r,a,{discrete:o}){const i=a.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});r&&i.addEventListener(e,r,{once:!0}),o?og(i,c):i.dispatchEvent(c)}var v6=Gs,y6=dw,fh="focusScope.autoFocusOnMount",mh="focusScope.autoFocusOnUnmount",Wb={bubbles:!1,cancelable:!0},b6="FocusScope",td=m.forwardRef((e,r)=>{const{loop:a=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...d}=e,[f,h]=m.useState(null),p=St(i),x=St(c),y=m.useRef(null),b=_e(r,h),w=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let N=function(T){if(w.paused||!f)return;const M=T.target;f.contains(M)?y.current=M:Oa(y.current,{select:!0})},k=function(T){if(w.paused||!f)return;const M=T.relatedTarget;M!==null&&(f.contains(M)||Oa(y.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const _ of T)_.removedNodes.length>0&&Oa(f)};document.addEventListener("focusin",N),document.addEventListener("focusout",k);const E=new MutationObserver(C);return f&&E.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",k),E.disconnect()}}},[o,f,w.paused]),m.useEffect(()=>{if(f){Qb.add(w);const N=document.activeElement;if(!f.contains(N)){const C=new CustomEvent(fh,Wb);f.addEventListener(fh,p),f.dispatchEvent(C),C.defaultPrevented||(w6(C6(mw(f)),{select:!0}),document.activeElement===N&&Oa(f))}return()=>{f.removeEventListener(fh,p),setTimeout(()=>{const C=new CustomEvent(mh,Wb);f.addEventListener(mh,x),f.dispatchEvent(C),C.defaultPrevented||Oa(N??document.body,{select:!0}),f.removeEventListener(mh,x),Qb.remove(w)},0)}}},[f,p,x,w]);const S=m.useCallback(N=>{if(!a&&!o||w.paused)return;const k=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,C=document.activeElement;if(k&&C){const E=N.currentTarget,[T,M]=S6(E);T&&M?!N.shiftKey&&C===M?(N.preventDefault(),a&&Oa(T,{select:!0})):N.shiftKey&&C===T&&(N.preventDefault(),a&&Oa(M,{select:!0})):C===E&&N.preventDefault()}},[a,o,w.paused]);return l.jsx(ve.div,{tabIndex:-1,...d,ref:b,onKeyDown:S})});td.displayName=b6;function w6(e,{select:r=!1}={}){const a=document.activeElement;for(const o of e)if(Oa(o,{select:r}),document.activeElement!==a)return}function S6(e){const r=mw(e),a=Zb(r,e),o=Zb(r.reverse(),e);return[a,o]}function mw(e){const r=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function Zb(e,r){const a=typeof r.checkVisibility=="function"&&r.checkVisibility({checkVisibilityCSS:!0});for(const o of e)if(!(a?!o.checkVisibility({checkVisibilityCSS:!0}):j6(o,{upTo:r})))return o}function j6(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function N6(e){return e instanceof HTMLInputElement&&"select"in e}function Oa(e,{select:r=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&N6(e)&&r&&e.select()}}var Qb=k6();function k6(){let e=[];return{add(r){const a=e[0];r!==a&&a?.pause(),e=Jb(e,r),e.unshift(r)},remove(r){e=Jb(e,r),e[0]?.resume()}}}function Jb(e,r){const a=[...e],o=a.indexOf(r);return o!==-1&&a.splice(o,1),a}function C6(e){return e.filter(r=>r.tagName!=="A")}var E6="Portal",Ys=m.forwardRef((e,r)=>{const{container:a,...o}=e,[i,c]=m.useState(!1);Ct(()=>c(!0),[]);const d=a||i&&globalThis?.document?.body;return d?Ro.createPortal(l.jsx(ve.div,{...o,ref:r}),d):null});Ys.displayName=E6;function R6(e,r){return m.useReducer((a,o)=>r[a][o]??a,e)}var Bt=e=>{const{present:r,children:a}=e,o=T6(r),i=typeof a=="function"?a({present:o.isPresent}):m.Children.only(a),c=_6(o.ref,M6(i));return typeof a=="function"||o.isPresent?m.cloneElement(i,{ref:c}):null};Bt.displayName="Presence";function T6(e){const[r,a]=m.useState(),o=m.useRef(null),i=m.useRef(e),c=m.useRef("none"),d=m.useRef(void 0),f=e?"mounted":"unmounted",[h,p]=R6(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{h==="mounted"?(c.current=d.current??Ql(o.current),d.current=void 0):c.current="none"},[h]),Ct(()=>{const x=o.current,y=i.current;if(y!==e){const w=c.current,S=Ql(x);e?(d.current=S,p("MOUNT")):S==="none"||x?.display==="none"?p("UNMOUNT"):p(y&&w!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),Ct(()=>{if(r){let x;const y=r.ownerDocument.defaultView??window,b=S=>{const k=Ql(o.current).includes(CSS.escape(S.animationName));if(S.target===r&&k&&(p("ANIMATION_END"),!i.current)){const C=r.style.animationFillMode;r.style.animationFillMode="forwards",x=y.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=C)})}},w=S=>{S.target===r&&(c.current=Ql(o.current))};return r.addEventListener("animationstart",w),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{y.clearTimeout(x),r.removeEventListener("animationstart",w),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else p("ANIMATION_END")},[r,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(x=>{if(x){const y=getComputedStyle(x);o.current=y,d.current=Ql(y)}else o.current=null;a(x)},[])}}function e1(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function _6(...e){const r=m.useRef(e);return r.current=e,m.useCallback(a=>{const o=r.current;let i=!1;const c=o.map(d=>{const f=e1(d,a);return!i&&typeof f=="function"&&(i=!0),f});if(i)return()=>{for(let d=0;d<c.length;d++){const f=c[d];typeof f=="function"?f():e1(o[d],null)}}},[])}function Ql(e){return e?.animationName||"none"}function M6(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var lu=0,xs=null;function lg(){m.useEffect(()=>{xs||(xs={start:t1(),end:t1()});const{start:e,end:r}=xs;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==r&&document.body.insertAdjacentElement("beforeend",r),lu++,()=>{lu===1&&(xs?.start.remove(),xs?.end.remove(),xs=null),lu=Math.max(0,lu-1)}},[])}function t1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mr=function(){return mr=Object.assign||function(r){for(var a,o=1,i=arguments.length;o<i;o++){a=arguments[o];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(r[c]=a[c])}return r},mr.apply(this,arguments)};function hw(e,r){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(a[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)r.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(a[o[i]]=e[o[i]]);return a}function A6(e,r,a){if(a||arguments.length===2)for(var o=0,i=r.length,c;o<i;o++)(c||!(o in r))&&(c||(c=Array.prototype.slice.call(r,0,o)),c[o]=r[o]);return e.concat(c||Array.prototype.slice.call(r))}var Su="right-scroll-bar-position",ju="width-before-scroll-bar",D6="with-scroll-bars-hidden",O6="--removed-body-scroll-bar-size";function hh(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function z6(e,r){var a=m.useState(function(){return{value:e,callback:r,facade:{get current(){return a.value},set current(o){var i=a.value;i!==o&&(a.value=o,a.callback(o,i))}}}})[0];return a.callback=r,a.facade}var L6=typeof window<"u"?m.useLayoutEffect:m.useEffect,n1=new WeakMap;function P6(e,r){var a=z6(null,function(o){return e.forEach(function(i){return hh(i,o)})});return L6(function(){var o=n1.get(a);if(o){var i=new Set(o),c=new Set(e),d=a.current;i.forEach(function(f){c.has(f)||hh(f,null)}),c.forEach(function(f){i.has(f)||hh(f,d)})}n1.set(a,e)},[e]),a}function I6(e){return e}function U6(e,r){r===void 0&&(r=I6);var a=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(c){var d=r(c,o);return a.push(d),function(){a=a.filter(function(f){return f!==d})}},assignSyncMedium:function(c){for(o=!0;a.length;){var d=a;a=[],d.forEach(c)}a={push:function(f){return c(f)},filter:function(){return a}}},assignMedium:function(c){o=!0;var d=[];if(a.length){var f=a;a=[],f.forEach(c),d=a}var h=function(){var x=d;d=[],x.forEach(c)},p=function(){return Promise.resolve().then(h)};p(),a={push:function(x){d.push(x),p()},filter:function(x){return d=d.filter(x),a}}}};return i}function B6(e){e===void 0&&(e={});var r=U6(null);return r.options=mr({async:!0,ssr:!1},e),r}var pw=function(e){var r=e.sideCar,a=hw(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,mr({},a))};pw.isSideCarExport=!0;function H6(e,r){return e.useMedium(r),pw}var gw=B6(),ph=function(){},nd=m.forwardRef(function(e,r){var a=m.useRef(null),o=m.useState({onScrollCapture:ph,onWheelCapture:ph,onTouchMoveCapture:ph}),i=o[0],c=o[1],d=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,x=e.enabled,y=e.shards,b=e.sideCar,w=e.noRelative,S=e.noIsolation,N=e.inert,k=e.allowPinchZoom,C=e.as,E=C===void 0?"div":C,T=e.gapMode,M=hw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=b,L=P6([a,r]),B=mr(mr({},M),i);return m.createElement(m.Fragment,null,x&&m.createElement(_,{sideCar:gw,removeScrollBar:p,shards:y,noRelative:w,noIsolation:S,inert:N,setCallbacks:c,allowPinchZoom:!!k,lockRef:a,gapMode:T}),d?m.cloneElement(m.Children.only(f),mr(mr({},B),{ref:L})):m.createElement(E,mr({},B,{className:h,ref:L}),f))});nd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nd.classNames={fullWidth:ju,zeroRight:Su};var F6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=F6();return r&&e.setAttribute("nonce",r),e}function V6(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function q6(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var G6=function(){var e=0,r=null;return{add:function(a){e==0&&(r=$6())&&(V6(r,a),q6(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Y6=function(){var e=G6();return function(r,a){m.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&a])}},xw=function(){var e=Y6(),r=function(a){var o=a.styles,i=a.dynamic;return e(o,i),null};return r},K6={left:0,top:0,right:0,gap:0},gh=function(e){return parseInt(e||"",10)||0},X6=function(e){var r=window.getComputedStyle(document.body),a=r[e==="padding"?"paddingLeft":"marginLeft"],o=r[e==="padding"?"paddingTop":"marginTop"],i=r[e==="padding"?"paddingRight":"marginRight"];return[gh(a),gh(o),gh(i)]},W6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return K6;var r=X6(e),a=document.documentElement.clientWidth,o=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,o-a+r[2]-r[0])}},Z6=xw(),As="data-scroll-locked",Q6=function(e,r,a,o){var i=e.left,c=e.top,d=e.right,f=e.gap;return a===void 0&&(a="margin"),`
|
|
13
|
-
.`.concat(D6,` {
|
|
14
|
-
overflow: hidden `).concat(o,`;
|
|
15
|
-
padding-right: `).concat(f,"px ").concat(o,`;
|
|
16
|
-
}
|
|
17
|
-
body[`).concat(As,`] {
|
|
18
|
-
overflow: hidden `).concat(o,`;
|
|
19
|
-
overscroll-behavior: contain;
|
|
20
|
-
`).concat([r&&"position: relative ".concat(o,";"),a==="margin"&&`
|
|
21
|
-
padding-left: `.concat(i,`px;
|
|
22
|
-
padding-top: `).concat(c,`px;
|
|
23
|
-
padding-right: `).concat(d,`px;
|
|
24
|
-
margin-left:0;
|
|
25
|
-
margin-top:0;
|
|
26
|
-
margin-right: `).concat(f,"px ").concat(o,`;
|
|
27
|
-
`),a==="padding"&&"padding-right: ".concat(f,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.`).concat(Su,` {
|
|
31
|
-
right: `).concat(f,"px ").concat(o,`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.`).concat(ju,` {
|
|
35
|
-
margin-right: `).concat(f,"px ").concat(o,`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.`).concat(Su," .").concat(Su,` {
|
|
39
|
-
right: 0 `).concat(o,`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.`).concat(ju," .").concat(ju,` {
|
|
43
|
-
margin-right: 0 `).concat(o,`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
body[`).concat(As,`] {
|
|
47
|
-
`).concat(O6,": ").concat(f,`px;
|
|
48
|
-
}
|
|
49
|
-
`)},r1=function(){var e=parseInt(document.body.getAttribute(As)||"0",10);return isFinite(e)?e:0},J6=function(){m.useEffect(function(){return document.body.setAttribute(As,(r1()+1).toString()),function(){var e=r1()-1;e<=0?document.body.removeAttribute(As):document.body.setAttribute(As,e.toString())}},[])},eD=function(e){var r=e.noRelative,a=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;J6();var c=m.useMemo(function(){return W6(i)},[i]);return m.createElement(Z6,{styles:Q6(c,!r,i,a?"":"!important")})},fp=!1;if(typeof window<"u")try{var iu=Object.defineProperty({},"passive",{get:function(){return fp=!0,!0}});window.addEventListener("test",iu,iu),window.removeEventListener("test",iu,iu)}catch{fp=!1}var vs=fp?{passive:!1}:!1,tD=function(e){return e.tagName==="TEXTAREA"},vw=function(e,r){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[r]!=="hidden"&&!(a.overflowY===a.overflowX&&!tD(e)&&a[r]==="visible")},nD=function(e){return vw(e,"overflowY")},rD=function(e){return vw(e,"overflowX")},a1=function(e,r){var a=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=yw(e,o);if(i){var c=bw(e,o),d=c[1],f=c[2];if(d>f)return!0}o=o.parentNode}while(o&&o!==a.body);return!1},aD=function(e){var r=e.scrollTop,a=e.scrollHeight,o=e.clientHeight;return[r,a,o]},oD=function(e){var r=e.scrollLeft,a=e.scrollWidth,o=e.clientWidth;return[r,a,o]},yw=function(e,r){return e==="v"?nD(r):rD(r)},bw=function(e,r){return e==="v"?aD(r):oD(r)},sD=function(e,r){return e==="h"&&r==="rtl"?-1:1},lD=function(e,r,a,o,i){var c=sD(e,window.getComputedStyle(r).direction),d=c*o,f=a.target,h=r.contains(f),p=!1,x=d>0,y=0,b=0;do{if(!f)break;var w=bw(e,f),S=w[0],N=w[1],k=w[2],C=N-k-c*S;(S||C)&&yw(e,f)&&(y+=C,b+=S);var E=f.parentNode;f=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!h&&f!==document.body||h&&(r.contains(f)||r===f));return(x&&Math.abs(y)<1||!x&&Math.abs(b)<1)&&(p=!0),p},cu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},o1=function(e){return[e.deltaX,e.deltaY]},s1=function(e){return e&&"current"in e?e.current:e},iD=function(e,r){return e[0]===r[0]&&e[1]===r[1]},cD=function(e){return`
|
|
50
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
51
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
52
|
-
`)},uD=0,ys=[];function dD(e){var r=m.useRef([]),a=m.useRef([0,0]),o=m.useRef(),i=m.useState(uD++)[0],c=m.useState(xw)[0],d=m.useRef(e);m.useEffect(function(){d.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var N=A6([e.lockRef.current],(e.shards||[]).map(s1),!0).filter(Boolean);return N.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),N.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=m.useCallback(function(N,k){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!d.current.allowPinchZoom;var C=cu(N),E=a.current,T="deltaX"in N?N.deltaX:E[0]-C[0],M="deltaY"in N?N.deltaY:E[1]-C[1],_,L=N.target,B=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in N&&B==="h"&&L.type==="range")return!1;var A=window.getSelection(),oe=A&&A.anchorNode,q=oe?oe===L||oe.contains(L):!1;if(q)return!1;var W=a1(B,L);if(!W)return!0;if(W?_=B:(_=B==="v"?"h":"v",W=a1(B,L)),!W)return!1;if(!o.current&&"changedTouches"in N&&(T||M)&&(o.current=_),!_)return!0;var ee=o.current||_;return lD(ee,k,N,ee==="h"?T:M)},[]),h=m.useCallback(function(N){var k=N;if(!(!ys.length||ys[ys.length-1]!==c)){var C="deltaY"in k?o1(k):cu(k),E=r.current.filter(function(_){return _.name===k.type&&(_.target===k.target||k.target===_.shadowParent)&&iD(_.delta,C)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var T=(d.current.shards||[]).map(s1).filter(Boolean).filter(function(_){return _.contains(k.target)}),M=T.length>0?f(k,T[0]):!d.current.noIsolation;M&&k.cancelable&&k.preventDefault()}}},[]),p=m.useCallback(function(N,k,C,E){var T={name:N,delta:k,target:C,should:E,shadowParent:fD(C)};r.current.push(T),setTimeout(function(){r.current=r.current.filter(function(M){return M!==T})},1)},[]),x=m.useCallback(function(N){a.current=cu(N),o.current=void 0},[]),y=m.useCallback(function(N){p(N.type,o1(N),N.target,f(N,e.lockRef.current))},[]),b=m.useCallback(function(N){p(N.type,cu(N),N.target,f(N,e.lockRef.current))},[]);m.useEffect(function(){return ys.push(c),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:b}),document.addEventListener("wheel",h,vs),document.addEventListener("touchmove",h,vs),document.addEventListener("touchstart",x,vs),function(){ys=ys.filter(function(N){return N!==c}),document.removeEventListener("wheel",h,vs),document.removeEventListener("touchmove",h,vs),document.removeEventListener("touchstart",x,vs)}},[]);var w=e.removeScrollBar,S=e.inert;return m.createElement(m.Fragment,null,S?m.createElement(c,{styles:cD(i)}):null,w?m.createElement(eD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fD(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const mD=H6(gw,dD);var rd=m.forwardRef(function(e,r){return m.createElement(nd,mr({},e,{ref:r,sideCar:mD}))});rd.classNames=nd.classNames;var hD=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},bs=new WeakMap,uu=new WeakMap,du={},xh=0,ww=function(e){return e&&(e.host||ww(e.parentNode))},pD=function(e,r){return r.map(function(a){if(e.contains(a))return a;var o=ww(a);return o&&e.contains(o)?o:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},gD=function(e,r,a,o){var i=pD(r,Array.isArray(e)?e:[e]);du[a]||(du[a]=new WeakMap);var c=du[a],d=[],f=new Set,h=new Set(i),p=function(y){!y||f.has(y)||(f.add(y),p(y.parentNode))};i.forEach(p);var x=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(b){if(f.has(b))x(b);else try{var w=b.getAttribute(o),S=w!==null&&w!=="false",N=(bs.get(b)||0)+1,k=(c.get(b)||0)+1;bs.set(b,N),c.set(b,k),d.push(b),N===1&&S&&uu.set(b,!0),k===1&&b.setAttribute(a,"true"),S||b.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",b,C)}})};return x(r),f.clear(),xh++,function(){d.forEach(function(y){var b=bs.get(y)-1,w=c.get(y)-1;bs.set(y,b),c.set(y,w),b||(uu.has(y)||y.removeAttribute(o),uu.delete(y)),w||y.removeAttribute(a)}),xh--,xh||(bs=new WeakMap,bs=new WeakMap,uu=new WeakMap,du={})}},ig=function(e,r,a){a===void 0&&(a="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=hD(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),gD(o,i,a,"aria-hidden")):function(){return null}},ad="Dialog",[Sw]=Yt(ad),[xD,ar]=Sw(ad),od=e=>{const{__scopeDialog:r,children:a,open:o,defaultOpen:i,onOpenChange:c,modal:d=!0}=e,f=m.useRef(null),h=m.useRef(null),[p,x]=Cn({prop:o,defaultProp:i??!1,onChange:c,caller:ad});return l.jsx(xD,{scope:r,triggerRef:f,contentRef:h,contentId:Ut(),titleId:Ut(),descriptionId:Ut(),open:p,onOpenChange:x,onOpenToggle:m.useCallback(()=>x(y=>!y),[x]),modal:d,children:a})};od.displayName=ad;var jw="DialogTrigger",cg=m.forwardRef((e,r)=>{const{__scopeDialog:a,...o}=e,i=ar(jw,a),c=_e(r,i.triggerRef);return l.jsx(ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":mg(i.open),...o,ref:c,onClick:pe(e.onClick,i.onOpenToggle)})});cg.displayName=jw;var ug="DialogPortal",[vD,Nw]=Sw(ug,{forceMount:void 0}),sd=e=>{const{__scopeDialog:r,forceMount:a,children:o,container:i}=e,c=ar(ug,r);return l.jsx(vD,{scope:r,forceMount:a,children:m.Children.map(o,d=>l.jsx(Bt,{present:a||c.open,children:l.jsx(Ys,{asChild:!0,container:i,children:d})}))})};sd.displayName=ug;var Au="DialogOverlay",ld=m.forwardRef((e,r)=>{const a=Nw(Au,e.__scopeDialog),{forceMount:o=a.forceMount,...i}=e,c=ar(Au,e.__scopeDialog);return c.modal?l.jsx(Bt,{present:o||c.open,children:l.jsx(bD,{...i,ref:r})}):null});ld.displayName=Au;var yD=bo("DialogOverlay.RemoveScroll"),bD=m.forwardRef((e,r)=>{const{__scopeDialog:a,...o}=e,i=ar(Au,a),c=h6(),d=_e(r,c);return l.jsx(rd,{as:yD,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(ve.div,{"data-state":mg(i.open),...o,ref:d,style:{pointerEvents:"auto",...o.style}})})}),Us="DialogContent",id=m.forwardRef((e,r)=>{const a=Nw(Us,e.__scopeDialog),{forceMount:o=a.forceMount,...i}=e,c=ar(Us,e.__scopeDialog);return l.jsx(Bt,{present:o||c.open,children:c.modal?l.jsx(wD,{...i,ref:r}):l.jsx(SD,{...i,ref:r})})});id.displayName=Us;var wD=m.forwardRef((e,r)=>{const a=ar(Us,e.__scopeDialog),o=m.useRef(null),i=_e(r,a.contentRef,o);return m.useEffect(()=>{const c=o.current;if(c)return ig(c)},[]),l.jsx(kw,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,onCloseAutoFocus:pe(e.onCloseAutoFocus,c=>{c.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0;(d.button===2||f)&&c.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,c=>c.preventDefault())})}),SD=m.forwardRef((e,r)=>{const a=ar(Us,e.__scopeDialog),o=m.useRef(!1),i=m.useRef(!1);return l.jsx(kw,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||a.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const d=c.target;a.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),kw=m.forwardRef((e,r)=>{const{__scopeDialog:a,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:c,...d}=e,f=ar(Us,a);return lg(),l.jsx(l.Fragment,{children:l.jsx(td,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:c,children:l.jsx(Gs,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":mg(f.open),...d,ref:r,deferPointerDownOutside:!0,onDismiss:()=>f.onOpenChange(!1)})})})}),Cw="DialogTitle",dg=m.forwardRef((e,r)=>{const{__scopeDialog:a,...o}=e,i=ar(Cw,a);return l.jsx(ve.h2,{id:i.titleId,...o,ref:r})});dg.displayName=Cw;var Ew="DialogDescription",fg=m.forwardRef((e,r)=>{const{__scopeDialog:a,...o}=e,i=ar(Ew,a);return l.jsx(ve.p,{id:i.descriptionId,...o,ref:r})});fg.displayName=Ew;var Rw="DialogClose",Ci=m.forwardRef((e,r)=>{const{__scopeDialog:a,...o}=e,i=ar(Rw,a);return l.jsx(ve.button,{type:"button",...o,ref:r,onClick:pe(e.onClick,()=>i.onOpenChange(!1))})});Ci.displayName=Rw;function mg(e){return e?"open":"closed"}var Jl='[cmdk-group=""]',vh='[cmdk-group-items=""]',jD='[cmdk-group-heading=""]',Tw='[cmdk-item=""]',l1=`${Tw}:not([aria-disabled="true"])`,mp="cmdk-item-select",Es="data-value",ND=(e,r,a)=>n6(e,r,a),_w=m.createContext(void 0),Ei=()=>m.useContext(_w),Mw=m.createContext(void 0),hg=()=>m.useContext(Mw),Aw=m.createContext(void 0),Dw=m.forwardRef((e,r)=>{let a=Rs(()=>{var z,G;return{search:"",value:(G=(z=e.value)!=null?z:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Rs(()=>new Set),i=Rs(()=>new Map),c=Rs(()=>new Map),d=Rs(()=>new Set),f=Ow(e),{label:h,children:p,value:x,onValueChange:y,filter:b,shouldFilter:w,loop:S,disablePointerSelection:N=!1,vimBindings:k=!0,...C}=e,E=Ut(),T=Ut(),M=Ut(),_=m.useRef(null),L=zD();wo(()=>{if(x!==void 0){let z=x.trim();a.current.value=z,B.emit()}},[x]),wo(()=>{L(6,re)},[]);let B=m.useMemo(()=>({subscribe:z=>(d.current.add(z),()=>d.current.delete(z)),snapshot:()=>a.current,setState:(z,G,se)=>{var ue,ge,ce,Ne;if(!Object.is(a.current[z],G)){if(a.current[z]=G,z==="search")ee(),q(),L(1,W);else if(z==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ce=document.getElementById(M);Ce?Ce.focus():(ue=document.getElementById(E))==null||ue.focus()}if(L(7,()=>{var Ce;a.current.selectedItemId=(Ce=te())==null?void 0:Ce.id,B.emit()}),se||L(5,re),((ge=f.current)==null?void 0:ge.value)!==void 0){let Ce=G??"";(Ne=(ce=f.current).onValueChange)==null||Ne.call(ce,Ce);return}}B.emit()}},emit:()=>{d.current.forEach(z=>z())}}),[]),A=m.useMemo(()=>({value:(z,G,se)=>{var ue;G!==((ue=c.current.get(z))==null?void 0:ue.value)&&(c.current.set(z,{value:G,keywords:se}),a.current.filtered.items.set(z,oe(G,se)),L(2,()=>{q(),B.emit()}))},item:(z,G)=>(o.current.add(z),G&&(i.current.has(G)?i.current.get(G).add(z):i.current.set(G,new Set([z]))),L(3,()=>{ee(),q(),a.current.value||W(),B.emit()}),()=>{c.current.delete(z),o.current.delete(z),a.current.filtered.items.delete(z);let se=te();L(4,()=>{ee(),se?.getAttribute("id")===z&&W(),B.emit()})}),group:z=>(i.current.has(z)||i.current.set(z,new Set),()=>{c.current.delete(z),i.current.delete(z)}),filter:()=>f.current.shouldFilter,label:h||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:E,inputId:M,labelId:T,listInnerRef:_}),[]);function oe(z,G){var se,ue;let ge=(ue=(se=f.current)==null?void 0:se.filter)!=null?ue:ND;return z?ge(z,a.current.search,G):0}function q(){if(!a.current.search||f.current.shouldFilter===!1)return;let z=a.current.filtered.items,G=[];a.current.filtered.groups.forEach(ue=>{let ge=i.current.get(ue),ce=0;ge.forEach(Ne=>{let Ce=z.get(Ne);ce=Math.max(Ce,ce)}),G.push([ue,ce])});let se=_.current;Z().sort((ue,ge)=>{var ce,Ne;let Ce=ue.getAttribute("id"),Fe=ge.getAttribute("id");return((ce=z.get(Fe))!=null?ce:0)-((Ne=z.get(Ce))!=null?Ne:0)}).forEach(ue=>{let ge=ue.closest(vh);ge?ge.appendChild(ue.parentElement===ge?ue:ue.closest(`${vh} > *`)):se.appendChild(ue.parentElement===se?ue:ue.closest(`${vh} > *`))}),G.sort((ue,ge)=>ge[1]-ue[1]).forEach(ue=>{var ge;let ce=(ge=_.current)==null?void 0:ge.querySelector(`${Jl}[${Es}="${encodeURIComponent(ue[0])}"]`);ce?.parentElement.appendChild(ce)})}function W(){let z=Z().find(se=>se.getAttribute("aria-disabled")!=="true"),G=z?.getAttribute(Es);B.setState("value",G||void 0)}function ee(){var z,G,se,ue;if(!a.current.search||f.current.shouldFilter===!1){a.current.filtered.count=o.current.size;return}a.current.filtered.groups=new Set;let ge=0;for(let ce of o.current){let Ne=(G=(z=c.current.get(ce))==null?void 0:z.value)!=null?G:"",Ce=(ue=(se=c.current.get(ce))==null?void 0:se.keywords)!=null?ue:[],Fe=oe(Ne,Ce);a.current.filtered.items.set(ce,Fe),Fe>0&&ge++}for(let[ce,Ne]of i.current)for(let Ce of Ne)if(a.current.filtered.items.get(Ce)>0){a.current.filtered.groups.add(ce);break}a.current.filtered.count=ge}function re(){var z,G,se;let ue=te();ue&&(((z=ue.parentElement)==null?void 0:z.firstChild)===ue&&((se=(G=ue.closest(Jl))==null?void 0:G.querySelector(jD))==null||se.scrollIntoView({block:"nearest"})),ue.scrollIntoView({block:"nearest"}))}function te(){var z;return(z=_.current)==null?void 0:z.querySelector(`${Tw}[aria-selected="true"]`)}function Z(){var z;return Array.from(((z=_.current)==null?void 0:z.querySelectorAll(l1))||[])}function D(z){let G=Z()[z];G&&B.setState("value",G.getAttribute(Es))}function V(z){var G;let se=te(),ue=Z(),ge=ue.findIndex(Ne=>Ne===se),ce=ue[ge+z];(G=f.current)!=null&&G.loop&&(ce=ge+z<0?ue[ue.length-1]:ge+z===ue.length?ue[0]:ue[ge+z]),ce&&B.setState("value",ce.getAttribute(Es))}function ae(z){let G=te(),se=G?.closest(Jl),ue;for(;se&&!ue;)se=z>0?DD(se,Jl):OD(se,Jl),ue=se?.querySelector(l1);ue?B.setState("value",ue.getAttribute(Es)):V(z)}let Q=()=>D(Z().length-1),xe=z=>{z.preventDefault(),z.metaKey?Q():z.altKey?ae(1):V(1)},O=z=>{z.preventDefault(),z.metaKey?D(0):z.altKey?ae(-1):V(-1)};return m.createElement(ve.div,{ref:r,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:z=>{var G;(G=C.onKeyDown)==null||G.call(C,z);let se=z.nativeEvent.isComposing||z.keyCode===229;if(!(z.defaultPrevented||se))switch(z.key){case"n":case"j":{k&&z.ctrlKey&&xe(z);break}case"ArrowDown":{xe(z);break}case"p":case"k":{k&&z.ctrlKey&&O(z);break}case"ArrowUp":{O(z);break}case"Home":{z.preventDefault(),D(0);break}case"End":{z.preventDefault(),Q();break}case"Enter":{z.preventDefault();let ue=te();if(ue){let ge=new Event(mp);ue.dispatchEvent(ge)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:A.inputId,id:A.labelId,style:PD},h),cd(e,z=>m.createElement(Mw.Provider,{value:B},m.createElement(_w.Provider,{value:A},z))))}),kD=m.forwardRef((e,r)=>{var a,o;let i=Ut(),c=m.useRef(null),d=m.useContext(Aw),f=Ei(),h=Ow(e),p=(o=(a=h.current)==null?void 0:a.forceMount)!=null?o:d?.forceMount;wo(()=>{if(!p)return f.item(i,d?.id)},[p]);let x=zw(i,c,[e.value,e.children,c],e.keywords),y=hg(),b=Wr(L=>L.value&&L.value===x.current),w=Wr(L=>p||f.filter()===!1?!0:L.search?L.filtered.items.get(i)>0:!0);m.useEffect(()=>{let L=c.current;if(!(!L||e.disabled))return L.addEventListener(mp,S),()=>L.removeEventListener(mp,S)},[w,e.onSelect,e.disabled]);function S(){var L,B;N(),(B=(L=h.current).onSelect)==null||B.call(L,x.current)}function N(){y.setState("value",x.current,!0)}if(!w)return null;let{disabled:k,value:C,onSelect:E,forceMount:T,keywords:M,..._}=e;return m.createElement(ve.div,{ref:Ls(c,r),..._,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!b,"data-disabled":!!k,"data-selected":!!b,onPointerMove:k||f.getDisablePointerSelection()?void 0:N,onClick:k?void 0:S},e.children)}),CD=m.forwardRef((e,r)=>{let{heading:a,children:o,forceMount:i,...c}=e,d=Ut(),f=m.useRef(null),h=m.useRef(null),p=Ut(),x=Ei(),y=Wr(w=>i||x.filter()===!1?!0:w.search?w.filtered.groups.has(d):!0);wo(()=>x.group(d),[]),zw(d,f,[e.value,e.heading,h]);let b=m.useMemo(()=>({id:d,forceMount:i}),[i]);return m.createElement(ve.div,{ref:Ls(f,r),...c,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},a&&m.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:p},a),cd(e,w=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?p:void 0},m.createElement(Aw.Provider,{value:b},w))))}),ED=m.forwardRef((e,r)=>{let{alwaysRender:a,...o}=e,i=m.useRef(null),c=Wr(d=>!d.search);return!a&&!c?null:m.createElement(ve.div,{ref:Ls(i,r),...o,"cmdk-separator":"",role:"separator"})}),RD=m.forwardRef((e,r)=>{let{onValueChange:a,...o}=e,i=e.value!=null,c=hg(),d=Wr(p=>p.search),f=Wr(p=>p.selectedItemId),h=Ei();return m.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),m.createElement(ve.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":f,id:h.inputId,type:"text",value:i?e.value:d,onChange:p=>{i||c.setState("search",p.target.value),a?.(p.target.value)}})}),TD=m.forwardRef((e,r)=>{let{children:a,label:o="Suggestions",...i}=e,c=m.useRef(null),d=m.useRef(null),f=Wr(p=>p.selectedItemId),h=Ei();return m.useEffect(()=>{if(d.current&&c.current){let p=d.current,x=c.current,y,b=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let w=p.offsetHeight;x.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return b.observe(p),()=>{cancelAnimationFrame(y),b.unobserve(p)}}},[]),m.createElement(ve.div,{ref:Ls(c,r),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":o,id:h.listId},cd(e,p=>m.createElement("div",{ref:Ls(d,h.listInnerRef),"cmdk-list-sizer":""},p)))}),_D=m.forwardRef((e,r)=>{let{open:a,onOpenChange:o,overlayClassName:i,contentClassName:c,container:d,...f}=e;return m.createElement(od,{open:a,onOpenChange:o},m.createElement(sd,{container:d},m.createElement(ld,{"cmdk-overlay":"",className:i}),m.createElement(id,{"aria-label":e.label,"cmdk-dialog":"",className:c},m.createElement(Dw,{ref:r,...f}))))}),MD=m.forwardRef((e,r)=>Wr(a=>a.filtered.count===0)?m.createElement(ve.div,{ref:r,...e,"cmdk-empty":"",role:"presentation"}):null),AD=m.forwardRef((e,r)=>{let{progress:a,children:o,label:i="Loading...",...c}=e;return m.createElement(ve.div,{ref:r,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},cd(e,d=>m.createElement("div",{"aria-hidden":!0},d)))}),Ri=Object.assign(Dw,{List:TD,Item:kD,Input:RD,Group:CD,Separator:ED,Dialog:_D,Empty:MD,Loading:AD});function DD(e,r){let a=e.nextElementSibling;for(;a;){if(a.matches(r))return a;a=a.nextElementSibling}}function OD(e,r){let a=e.previousElementSibling;for(;a;){if(a.matches(r))return a;a=a.previousElementSibling}}function Ow(e){let r=m.useRef(e);return wo(()=>{r.current=e}),r}var wo=typeof window>"u"?m.useEffect:m.useLayoutEffect;function Rs(e){let r=m.useRef();return r.current===void 0&&(r.current=e()),r}function Wr(e){let r=hg(),a=()=>e(r.snapshot());return m.useSyncExternalStore(r.subscribe,a,a)}function zw(e,r,a,o=[]){let i=m.useRef(),c=Ei();return wo(()=>{var d;let f=(()=>{var p;for(let x of a){if(typeof x=="string")return x.trim();if(typeof x=="object"&&"current"in x)return x.current?(p=x.current.textContent)==null?void 0:p.trim():i.current}})(),h=o.map(p=>p.trim());c.value(e,f,h),(d=r.current)==null||d.setAttribute(Es,f),i.current=f}),i}var zD=()=>{let[e,r]=m.useState(),a=Rs(()=>new Map);return wo(()=>{a.current.forEach(o=>o()),a.current=new Map},[e]),(o,i)=>{a.current.set(o,i),r({})}};function LD(e){let r=e.type;return typeof r=="function"?r(e.props):"render"in r?r.render(e.props):e}function cd({asChild:e,children:r},a){return e&&m.isValidElement(r)?m.cloneElement(LD(r),{ref:r.ref},a(r.props.children)):a(r)}var PD={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function di(e,[r,a]){return Math.min(a,Math.max(r,e))}var ID=m.createContext(void 0);function To(e){const r=m.useContext(ID);return e||r||"ltr"}function Ti(e){const r=m.useRef({value:e,previous:e});return m.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}function _i(e){const[r,a]=m.useState(void 0);return Ct(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let d,f;if("borderBoxSize"in c){const h=c.borderBoxSize,p=Array.isArray(h)?h[0]:h;d=p.inlineSize,f=p.blockSize}else d=e.offsetWidth,f=e.offsetHeight;a({width:d,height:f})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else a(void 0)},[e]),r}function Mi(e){const r=e+"CollectionProvider",[a,o]=Yt(r),[i,c]=a(r,{collectionRef:{current:null},itemMap:new Map}),d=N=>{const{scope:k,children:C}=N,E=m.useRef(null),T=m.useRef(new Map).current;return l.jsx(i,{scope:k,itemMap:T,collectionRef:E,children:C})};d.displayName=r;const f=e+"CollectionSlot",h=bo(f),p=m.forwardRef((N,k)=>{const{scope:C,children:E}=N,T=c(f,C),M=_e(k,T.collectionRef);return l.jsx(h,{ref:M,children:E})});p.displayName=f;const x=e+"CollectionItemSlot",y="data-radix-collection-item",b=bo(x),w=m.forwardRef((N,k)=>{const{scope:C,children:E,...T}=N,M=m.useRef(null),_=_e(k,M),L=c(x,C);return m.useEffect(()=>(L.itemMap.set(M,{ref:M,...T}),()=>{L.itemMap.delete(M)})),l.jsx(b,{[y]:"",ref:_,children:E})});w.displayName=x;function S(N){const k=c(e+"CollectionConsumer",N);return m.useCallback(()=>{const E=k.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${y}]`));return Array.from(k.itemMap.values()).sort((L,B)=>T.indexOf(L.ref.current)-T.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:d,Slot:p,ItemSlot:w},S,o]}var Lw=["PageUp","PageDown"],Pw=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Iw={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ks="Slider",[hp,UD,BD]=Mi(Ks),[pg]=Yt(Ks,[BD]),[HD,Ai]=pg(Ks),Uw=m.forwardRef((e,r)=>{const{name:a,min:o=0,max:i=100,step:c=1,orientation:d="horizontal",disabled:f=!1,minStepsBetweenThumbs:h=0,defaultValue:p=[o],value:x,onValueChange:y=()=>{},onValueCommit:b=()=>{},inverted:w=!1,form:S,...N}=e,k=m.useRef(new Set),C=m.useRef(0),E=m.useRef(!1),M=d==="horizontal"?FD:$D,[_,L]=m.useState(null),B=_e(r,L),[A=[],oe]=Cn({prop:x,defaultProp:p,onChange:D=>{[...k.current][C.current]?.focus({preventScroll:!0,focusVisible:E.current}),E.current=!1,y(D)}}),q=m.useRef(A),W=m.useRef(A);m.useEffect(()=>{const D=S?_?.ownerDocument.getElementById(S):_?.closest("form");if(D instanceof HTMLFormElement){const V=()=>oe(W.current);return D.addEventListener("reset",V),()=>D.removeEventListener("reset",V)}},[_,S,oe]);function ee(D){const V=YD(A,D);Z(D,V)}function re(D){Z(D,C.current)}function te(){const D=q.current[C.current];A[C.current]!==D&&b(A)}function Z(D,V,{commit:ae}={commit:!1}){const Q=tS(c),xe=ku(Math.round((D-o)/c)*c+o,Q),O=di(xe,[o,i]);oe((z=[])=>{const G=qD(z,O,V);if(WD(G,h*c)){C.current=G.indexOf(O);const se=String(G)!==String(z);return se&&ae&&b(G),se?G:z}else return z})}return l.jsx(HD,{scope:e.__scopeSlider,name:a,disabled:f,min:o,max:i,valueIndexToChangeRef:C,thumbs:k.current,values:A,orientation:d,form:S,children:l.jsx(hp.Provider,{scope:e.__scopeSlider,children:l.jsx(hp.Slot,{scope:e.__scopeSlider,children:l.jsx(M,{"aria-disabled":f,"data-disabled":f?"":void 0,...N,ref:B,onPointerDown:pe(N.onPointerDown,()=>{f||(q.current=A,E.current=!1)}),min:o,max:i,inverted:w,onSlideStart:f?void 0:ee,onSlideMove:f?void 0:re,onSlideEnd:f?void 0:te,onHomeKeyDown:()=>{f||(E.current=!0,Z(o,0,{commit:!0}))},onEndKeyDown:()=>{f||(E.current=!0,Z(i,A.length-1,{commit:!0}))},onStepKeyDown:({event:D,direction:V})=>{if(!f){E.current=!0;const xe=Lw.includes(D.key)||D.shiftKey&&Pw.includes(D.key)?10:1,O=C.current,z=A[O],G=ZD(z,{min:o,step:c,direction:V,multiplier:xe});Z(G,O,{commit:!0})}}})})})})});Uw.displayName=Ks;var[Bw,Hw]=pg(Ks,{startEdge:"left",endEdge:"right",size:"width",direction:1}),FD=m.forwardRef((e,r)=>{const{min:a,max:o,dir:i,inverted:c,onSlideStart:d,onSlideMove:f,onSlideEnd:h,onStepKeyDown:p,...x}=e,[y,b]=m.useState(null),w=_e(r,b),S=m.useRef(void 0),N=To(i),k=N==="ltr",C=k&&!c||!k&&c;function E(T){const M=S.current||y.getBoundingClientRect(),_=[0,M.width],B=gg(_,C?[a,o]:[o,a]);return S.current=M,B(T-M.left)}return l.jsx(Bw,{scope:e.__scopeSlider,startEdge:C?"left":"right",endEdge:C?"right":"left",direction:C?1:-1,size:"width",children:l.jsx(Fw,{dir:N,"data-orientation":"horizontal",...x,ref:w,style:{...x.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:T=>{const M=E(T.clientX);d?.(M)},onSlideMove:T=>{const M=E(T.clientX);f?.(M)},onSlideEnd:()=>{S.current=void 0,h?.()},onStepKeyDown:T=>{const _=Iw[C?"from-left":"from-right"].includes(T.key);p?.({event:T,direction:_?-1:1})}})})}),$D=m.forwardRef((e,r)=>{const{min:a,max:o,inverted:i,onSlideStart:c,onSlideMove:d,onSlideEnd:f,onStepKeyDown:h,...p}=e,x=m.useRef(null),y=_e(r,x),b=m.useRef(void 0),w=!i;function S(N){const k=b.current||x.current.getBoundingClientRect(),C=[0,k.height],T=gg(C,w?[o,a]:[a,o]);return b.current=k,T(N-k.top)}return l.jsx(Bw,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:l.jsx(Fw,{"data-orientation":"vertical",...p,ref:y,style:{...p.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:N=>{const k=S(N.clientY);c?.(k)},onSlideMove:N=>{const k=S(N.clientY);d?.(k)},onSlideEnd:()=>{b.current=void 0,f?.()},onStepKeyDown:N=>{const C=Iw[w?"from-bottom":"from-top"].includes(N.key);h?.({event:N,direction:C?-1:1})}})})}),Fw=m.forwardRef((e,r)=>{const{__scopeSlider:a,onSlideStart:o,onSlideMove:i,onSlideEnd:c,onHomeKeyDown:d,onEndKeyDown:f,onStepKeyDown:h,...p}=e,x=Ai(Ks,a);return l.jsx(ve.span,{...p,ref:r,onKeyDown:pe(e.onKeyDown,y=>{y.key==="Home"?(d(y),y.preventDefault()):y.key==="End"?(f(y),y.preventDefault()):Lw.concat(Pw).includes(y.key)&&(h(y),y.preventDefault())}),onPointerDown:pe(e.onPointerDown,y=>{const b=y.target;b.setPointerCapture(y.pointerId),y.preventDefault(),x.thumbs.has(b)?b.focus({preventScroll:!0,focusVisible:!1}):o(y)}),onPointerMove:pe(e.onPointerMove,y=>{y.target.hasPointerCapture(y.pointerId)&&i(y)}),onPointerUp:pe(e.onPointerUp,y=>{const b=y.target;b.hasPointerCapture(y.pointerId)&&(b.releasePointerCapture(y.pointerId),c(y))})})}),$w="SliderTrack",Vw=m.forwardRef((e,r)=>{const{__scopeSlider:a,...o}=e,i=Ai($w,a);return l.jsx(ve.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...o,ref:r})});Vw.displayName=$w;var pp="SliderRange",qw=m.forwardRef((e,r)=>{const{__scopeSlider:a,...o}=e,i=Ai(pp,a),c=Hw(pp,a),d=m.useRef(null),f=_e(r,d),h=i.values.length,p=i.values.map(b=>eS(b,i.min,i.max)),x=h>1?Math.min(...p):0,y=100-Math.max(...p);return l.jsx(ve.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:f,style:{...e.style,[c.startEdge]:x+"%",[c.endEdge]:y+"%"}})});qw.displayName=pp;var Gw="SliderThumb",[VD,Yw]=pg(Gw),Kw="SliderThumbProvider";function Xw(e){const{__scopeSlider:r,name:a,children:o,internal_do_not_use_render:i}=e,c=Ai(Kw,r),d=UD(r),[f,h]=m.useState(null),p=m.useMemo(()=>f?d().findIndex(k=>k.ref.current===f):-1,[d,f]),x=_i(f),y=f?!!c.form||!!f.closest("form"):!0,b=c.values[p],w=a??(c.name?c.name+(c.values.length>1?"[]":""):void 0),S=b===void 0?0:eS(b,c.min,c.max);m.useEffect(()=>{if(f)return c.thumbs.add(f),()=>{c.thumbs.delete(f)}},[f,c.thumbs]);const N={value:b,name:w,form:c.form,isFormControl:y,index:p,thumb:f,onThumbChange:h,percent:S,size:x};return l.jsx(VD,{scope:r,...N,children:QD(i)?i(N):o})}Xw.displayName=Kw;var Nu="SliderThumbTrigger",Ww=m.forwardRef((e,r)=>{const{__scopeSlider:a,...o}=e,i=Ai(Nu,a),c=Hw(Nu,a),{index:d,value:f,percent:h,size:p,onThumbChange:x}=Yw(Nu,a),y=_e(r,x),b=GD(d,i.values.length),w=p?.[c.size],S=w?KD(w,h,c.direction):0;return l.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${S}px)`},children:l.jsx(hp.ItemSlot,{scope:a,children:l.jsx(ve.span,{role:"slider","aria-label":e["aria-label"]||b,"aria-valuemin":i.min,"aria-valuenow":f,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...o,ref:y,style:f===void 0?{display:"none"}:e.style,onFocus:pe(e.onFocus,()=>{i.valueIndexToChangeRef.current=d})})})})});Ww.displayName=Nu;var Zw=m.forwardRef((e,r)=>{const{__scopeSlider:a,name:o,...i}=e;return l.jsx(Xw,{__scopeSlider:a,name:o,internal_do_not_use_render:({index:c,isFormControl:d})=>l.jsxs(l.Fragment,{children:[l.jsx(Ww,{...i,ref:r,__scopeSlider:a}),d?l.jsx(Jw,{__scopeSlider:a},c):null]})})});Zw.displayName=Gw;var Qw="SliderBubbleInput",Jw=m.forwardRef(({__scopeSlider:e,...r},a)=>{const{value:o,name:i,form:c}=Yw(Qw,e),d=m.useRef(null),f=_e(d,a),h=Ti(o);return m.useEffect(()=>{const p=d.current;if(!p)return;const x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"value").set;if(h!==o&&b){const w=new Event("input",{bubbles:!0});b.call(p,o),p.dispatchEvent(w)}},[h,o]),l.jsx(ve.input,{style:{display:"none"},name:i,form:c,...r,ref:f,defaultValue:o})});Jw.displayName=Qw;function qD(e=[],r,a){const o=[...e];return o[a]=r,o.sort((i,c)=>i-c)}function eS(e,r,a){const c=100/(a-r)*(e-r);return di(c,[0,100])}function GD(e,r){return r>2?`Value ${e+1} of ${r}`:r===2?["Minimum","Maximum"][e]:void 0}function YD(e,r){if(e.length===1)return 0;const a=e.map(i=>Math.abs(i-r)),o=Math.min(...a);return a.indexOf(o)}function KD(e,r,a){const o=e/2,c=gg([0,50],[0,o]);return(o-c(r)*a)*a}function XD(e){return e.slice(0,-1).map((r,a)=>e[a+1]-r)}function WD(e,r){if(r>0){const a=XD(e);return Math.min(...a)>=r}return!0}function gg(e,r){return a=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const o=(r[1]-r[0])/(e[1]-e[0]);return r[0]+o*(a-e[0])}}function tS(e){if(!Number.isFinite(e))return 0;const r=e.toString();if(r.includes("e")){const[o,i]=r.split("e"),c=o.split(".")[1]||"",d=Number(i);return Math.max(0,c.length-d)}const a=r.split(".")[1];return a?a.length:0}function ku(e,r){const a=Math.pow(10,r);return Math.round(e*a)/a}function ZD(e,{min:r,step:a,direction:o,multiplier:i}){const c=tS(a),d=(e-r)/a,f=Math.round(d),h=ku(f*a+r,c)===ku(e,c);let p;return h?p=f+i*o:o>0?p=Math.ceil(d):p=Math.floor(d),ku(p*a+r,c)}function QD(e){return typeof e=="function"}var yh=!1;function JD(){const[e,r]=m.useState(yh);return m.useEffect(()=>{yh||(yh=!0,r(!0))},[]),e}var nS=vi[" useSyncExternalStore ".trim().toString()];function eO(){return()=>{}}function tO(){return nS(eO,()=>!0,()=>!1)}var nO=typeof nS=="function"?tO:JD,bh="rovingFocusGroup.onEntryFocus",rO={bubbles:!1,cancelable:!0},Di="RovingFocusGroup",[gp,rS,aO]=Mi(Di),[oO,Xs]=Yt(Di,[aO]),[sO,lO]=oO(Di),aS=m.forwardRef((e,r)=>l.jsx(gp.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(gp.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(iO,{...e,ref:r})})}));aS.displayName=Di;var iO=m.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:a,orientation:o,loop:i=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:p,preventScrollOnEntryFocus:x=!1,...y}=e,b=m.useRef(null),w=_e(r,b),S=To(c),[N,k]=Cn({prop:d,defaultProp:f??null,onChange:h,caller:Di}),[C,E]=m.useState(!1),T=St(p),M=rS(a),_=m.useRef(!1),[L,B]=m.useState(0);return m.useEffect(()=>{const A=b.current;if(A)return A.addEventListener(bh,T),()=>A.removeEventListener(bh,T)},[T]),l.jsx(sO,{scope:a,orientation:o,dir:S,loop:i,currentTabStopId:N,onItemFocus:m.useCallback(A=>k(A),[k]),onItemShiftTab:m.useCallback(()=>E(!0),[]),onFocusableItemAdd:m.useCallback(()=>B(A=>A+1),[]),onFocusableItemRemove:m.useCallback(()=>B(A=>A-1),[]),children:l.jsx(ve.div,{tabIndex:C||L===0?-1:0,"data-orientation":o,...y,ref:w,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{_.current=!0}),onFocus:pe(e.onFocus,A=>{const oe=!_.current;if(A.target===A.currentTarget&&oe&&!C){const q=new CustomEvent(bh,rO);if(A.currentTarget.dispatchEvent(q),!q.defaultPrevented){const W=M().filter(D=>D.focusable),ee=W.find(D=>D.active),re=W.find(D=>D.id===N),Z=[ee,re,...W].filter(Boolean).map(D=>D.ref.current);lS(Z,x)}}_.current=!1}),onBlur:pe(e.onBlur,()=>E(!1))})})}),oS="RovingFocusGroupItem",sS=m.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:a,focusable:o=!0,active:i=!1,tabStopId:c,children:d,...f}=e,h=Ut(),p=c||h,x=lO(oS,a),y=x.currentTabStopId===p,b=rS(a),{onFocusableItemAdd:w,onFocusableItemRemove:S,currentTabStopId:N}=x,k=nO();return Ct(()=>{if(!(!k||!o))return w(),()=>S()},[k,o,w,S]),m.useEffect(()=>{if(!(k||!o))return w(),()=>S()},[k,o,w,S]),l.jsx(gp.ItemSlot,{scope:a,id:p,focusable:o,active:i,children:l.jsx(ve.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...f,ref:r,onMouseDown:pe(e.onMouseDown,C=>{o?x.onItemFocus(p):C.preventDefault()}),onFocus:pe(e.onFocus,()=>x.onItemFocus(p)),onKeyDown:pe(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){x.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const E=dO(C,x.orientation,x.dir);if(E!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let M=b().filter(_=>_.focusable).map(_=>_.ref.current);if(E==="last")M.reverse();else if(E==="prev"||E==="next"){E==="prev"&&M.reverse();const _=M.indexOf(C.currentTarget);M=x.loop?fO(M,_+1):M.slice(_+1)}setTimeout(()=>lS(M))}}),children:typeof d=="function"?d({isCurrentTabStop:y,hasTabStop:N!=null}):d})})});sS.displayName=oS;var cO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uO(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dO(e,r,a){const o=uO(e.key,a);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return cO[o]}function lS(e,r=!1){const a=document.activeElement;for(const o of e)if(o===a||(o.focus({preventScroll:r}),document.activeElement!==a))return}function fO(e,r){return e.map((a,o)=>e[(r+o)%e.length])}var xg=aS,vg=sS,ud="Tabs",[mO]=Yt(ud,[Xs]),iS=Xs(),[hO,yg]=mO(ud),pO=m.forwardRef((e,r)=>{const{__scopeTabs:a,value:o,onValueChange:i,defaultValue:c,orientation:d="horizontal",dir:f,activationMode:h="automatic",...p}=e,x=To(f),[y,b]=Cn({prop:o,onChange:i,defaultProp:c??"",caller:ud});return l.jsx(hO,{scope:a,baseId:Ut(),value:y,onValueChange:b,orientation:d,dir:x,activationMode:h,children:l.jsx(ve.div,{dir:x,"data-orientation":d,...p,ref:r})})});pO.displayName=ud;var cS="TabsList",uS=m.forwardRef((e,r)=>{const{__scopeTabs:a,loop:o=!0,...i}=e,c=yg(cS,a),d=iS(a);return l.jsx(xg,{asChild:!0,...d,orientation:c.orientation,dir:c.dir,loop:o,children:l.jsx(ve.div,{role:"tablist","aria-orientation":c.orientation,...i,ref:r})})});uS.displayName=cS;var dS="TabsTrigger",fS=m.forwardRef((e,r)=>{const{__scopeTabs:a,value:o,disabled:i=!1,...c}=e,d=yg(dS,a),f=iS(a),h=pS(d.baseId,o),p=gS(d.baseId,o),x=o===d.value;return l.jsx(vg,{asChild:!0,...f,focusable:!i,active:x,children:l.jsx(ve.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":p,"data-state":x?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:h,...c,ref:r,onMouseDown:pe(e.onMouseDown,y=>{!i&&y.button===0&&y.ctrlKey===!1?d.onValueChange(o):y.preventDefault()}),onKeyDown:pe(e.onKeyDown,y=>{i||y.target!==y.currentTarget||[" ","Enter"].includes(y.key)&&d.onValueChange(o)}),onFocus:pe(e.onFocus,()=>{const y=d.activationMode!=="manual";!x&&!i&&y&&d.onValueChange(o)})})})});fS.displayName=dS;var mS="TabsContent",hS=m.forwardRef((e,r)=>{const{__scopeTabs:a,value:o,forceMount:i,children:c,...d}=e,f=yg(mS,a),h=pS(f.baseId,o),p=gS(f.baseId,o),x=o===f.value,y=m.useRef(x);return m.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),l.jsx(Bt,{present:i||x,children:({present:b})=>l.jsx(ve.div,{"data-state":x?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":h,hidden:!b,id:p,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:y.current?"0s":void 0},children:b&&c})})});hS.displayName=mS;function pS(e,r){return`${e}-trigger-${r}`}function gS(e,r){return`${e}-content-${r}`}var gO=uS,xO=fS,vO=hS;const yO=["top","right","bottom","left"],Ua=Math.min,Kr=Math.max,Du=Math.round,fu=Math.floor,Xr=e=>({x:e,y:e}),bO={left:"right",right:"left",bottom:"top",top:"bottom"};function xS(e,r,a){return Kr(e,Ua(r,a))}function Zr(e,r){return typeof e=="function"?e(r):e}function Ba(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function bg(e){return e==="x"?"y":"x"}function wg(e){return e==="y"?"height":"width"}function hr(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function Sg(e){return bg(hr(e))}function wO(e,r,a){a===void 0&&(a=!1);const o=Ws(e),i=Sg(e),c=wg(i);let d=i==="x"?o===(a?"end":"start")?"right":"left":o==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(d=Ou(d)),[d,Ou(d)]}function SO(e){const r=Ou(e);return[xp(e),r,xp(r)]}function xp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const i1=["left","right"],c1=["right","left"],jO=["top","bottom"],NO=["bottom","top"];function kO(e,r,a){switch(e){case"top":case"bottom":return a?r?c1:i1:r?i1:c1;case"left":case"right":return r?jO:NO;default:return[]}}function CO(e,r,a,o){const i=Ws(e);let c=kO(Ba(e),a==="start",o);return i&&(c=c.map(d=>d+"-"+i),r&&(c=c.concat(c.map(xp)))),c}function Ou(e){const r=Ba(e);return bO[r]+e.slice(r.length)}function EO(e){var r,a,o,i;return{top:(r=e.top)!=null?r:0,right:(a=e.right)!=null?a:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function vS(e){return typeof e!="number"?EO(e):{top:e,right:e,bottom:e,left:e}}function zu(e){const{x:r,y:a,width:o,height:i}=e;return{width:o,height:i,top:a,left:r,right:r+o,bottom:a+i,x:r,y:a}}function u1(e,r,a){let{reference:o,floating:i}=e;const c=hr(r),d=Sg(r),f=wg(d),h=Ba(r),p=c==="y",x=o.x+o.width/2-i.width/2,y=o.y+o.height/2-i.height/2,b=o[f]/2-i[f]/2;let w;switch(h){case"top":w={x,y:o.y-i.height};break;case"bottom":w={x,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y};break;case"left":w={x:o.x-i.width,y};break;default:w={x:o.x,y:o.y}}const S=Ws(r);return S&&(w[d]+=b*(S==="end"?1:-1)*(a&&p?-1:1)),w}async function RO(e,r){var a;r===void 0&&(r={});const{x:o,y:i,platform:c,rects:d,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:b=!1,padding:w=0}=Zr(r,e),S=vS(w),k=f[b?y==="floating"?"reference":"floating":y],C=zu(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(k)))==null||a?k:k.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:p,rootBoundary:x,strategy:h})),E=y==="floating"?{x:o,y:i,width:d.floating.width,height:d.floating.height}:d.reference,T=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),M=await(c.isElement==null?void 0:c.isElement(T))&&await(c.getScale==null?void 0:c.getScale(T))||{x:1,y:1},_=zu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:T,strategy:h}):E);return{top:(C.top-_.top+S.top)/M.y,bottom:(_.bottom-C.bottom+S.bottom)/M.y,left:(C.left-_.left+S.left)/M.x,right:(_.right-C.right+S.right)/M.x}}const TO=50,_O=async(e,r,a)=>{const{placement:o="bottom",strategy:i="absolute",middleware:c=[],platform:d}=a,f=d.detectOverflow?d:{...d,detectOverflow:RO},h=await(d.isRTL==null?void 0:d.isRTL(r));let p=await d.getElementRects({reference:e,floating:r,strategy:i}),{x,y}=u1(p,o,h),b=o,w=0;const S={};for(let N=0;N<c.length;N++){const k=c[N];if(!k)continue;const{name:C,fn:E}=k,{x:T,y:M,data:_,reset:L}=await E({x,y,initialPlacement:o,placement:b,strategy:i,middlewareData:S,rects:p,platform:f,elements:{reference:e,floating:r}});x=T??x,y=M??y,S[C]={...S[C],..._},L&&w<TO&&(w++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(p=L.rects===!0?await d.getElementRects({reference:e,floating:r,strategy:i}):L.rects),{x,y}=u1(p,b,h)),N=-1)}return{x,y,placement:b,strategy:i,middlewareData:S}},MO=e=>({name:"arrow",options:e,async fn(r){const{x:a,y:o,placement:i,rects:c,platform:d,elements:f,middlewareData:h}=r,{element:p,padding:x=0}=Zr(e,r)||{};if(p==null)return{};const y=vS(x),b={x:a,y:o},w=Sg(i),S=wg(w),N=await d.getDimensions(p),k=w==="y",C=k?"top":"left",E=k?"bottom":"right",T=k?"clientHeight":"clientWidth",M=c.reference[S]+c.reference[w]-b[w]-c.floating[S],_=b[w]-c.reference[w],L=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let B=L?L[T]:0;(!B||!await(d.isElement==null?void 0:d.isElement(L)))&&(B=f.floating[T]||c.floating[S]);const A=M/2-_/2,oe=B/2-N[S]/2-1,q=Ua(y[C],oe),W=Ua(y[E],oe),ee=B-N[S]-W,re=B/2-N[S]/2+A,te=xS(q,re,ee),Z=!h.arrow&&Ws(i)!=null&&re!==te&&c.reference[S]/2-(re<q?q:W)-N[S]/2<0,D=Z?re<q?re-q:re-ee:0;return{[w]:b[w]+D,data:{[w]:te,centerOffset:re-te-D,...Z&&{alignmentOffset:D}},reset:Z}}}),AO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var a,o;const{placement:i,middlewareData:c,rects:d,initialPlacement:f,platform:h,elements:p}=r,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:N=!0,...k}=Zr(e,r);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=Ba(i),E=hr(f),T=Ba(f)===f,M=await(h.isRTL==null?void 0:h.isRTL(p.floating)),_=b||(T||!N?[Ou(f)]:SO(f)),L=S!=="none";!b&&L&&_.push(...CO(f,N,S,M));const B=[f,..._],A=await h.detectOverflow(r,k),oe=[];let q=((o=c.flip)==null?void 0:o.overflows)||[];if(x&&oe.push(A[C]),y){const te=wO(i,d,M);oe.push(A[te[0]],A[te[1]])}if(q=[...q,{placement:i,overflows:oe}],!oe.every(te=>te<=0)){var W,ee;const te=(((W=c.flip)==null?void 0:W.index)||0)+1,Z=B[te];if(Z&&(!(y==="alignment"?E!==hr(Z):!1)||q.every(ae=>hr(ae.placement)===E?ae.overflows[0]>0:!0)))return{data:{index:te,overflows:q},reset:{placement:Z}};let D=(ee=q.filter(V=>V.overflows[0]<=0).sort((V,ae)=>V.overflows[1]-ae.overflows[1])[0])==null?void 0:ee.placement;if(!D)switch(w){case"bestFit":{var re;const V=(re=q.filter(ae=>{if(L){const Q=hr(ae.placement);return Q===E||Q==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(Q=>Q>0).reduce((Q,xe)=>Q+xe,0)]).sort((ae,Q)=>ae[1]-Q[1])[0])==null?void 0:re[0];V&&(D=V);break}case"initialPlacement":D=f;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function d1(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function f1(e){return yO.some(r=>e[r]>=0)}const DO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:a,platform:o}=r,{strategy:i="referenceHidden",...c}=Zr(e,r);switch(i){case"referenceHidden":{const d=await o.detectOverflow(r,{...c,elementContext:"reference"}),f=d1(d,a.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:f1(f)}}}case"escaped":{const d=await o.detectOverflow(r,{...c,altBoundary:!0}),f=d1(d,a.floating);return{data:{escapedOffsets:f,escaped:f1(f)}}}default:return{}}}}},yS=new Set(["left","top"]);async function OO(e,r){const{placement:a,platform:o,elements:i}=e,c=await(o.isRTL==null?void 0:o.isRTL(i.floating)),d=Ba(a),f=Ws(a),h=hr(a)==="y",p=yS.has(d)?-1:1,x=c&&h?-1:1,y=Zr(r,e);let{mainAxis:b,crossAxis:w,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(w=f==="end"?S*-1:S),h?{x:w*x,y:b*p}:{x:b*p,y:w*x}}const zO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var a,o;const{x:i,y:c,placement:d,middlewareData:f}=r,h=await OO(r,e);return d===((a=f.offset)==null?void 0:a.placement)&&(o=f.arrow)!=null&&o.alignmentOffset?{}:{x:i+h.x,y:c+h.y,data:{...h,placement:d}}}}},LO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:a,y:o,placement:i,platform:c}=r,{mainAxis:d=!0,crossAxis:f=!1,limiter:h={fn:E=>{let{x:T,y:M}=E;return{x:T,y:M}}},...p}=Zr(e,r),x={x:a,y:o},y=await c.detectOverflow(r,p),b=hr(i),w=bg(b);let S=x[w],N=x[b];const k=(E,T)=>xS(T+y[E==="y"?"top":"left"],T,T-y[E==="y"?"bottom":"right"]);d&&(S=k(w,S)),f&&(N=k(b,N));const C=h.fn({...r,[w]:S,[b]:N});return{...C,data:{x:C.x-a,y:C.y-o,enabled:{[w]:d,[b]:f}}}}}},PO=function(e){return e===void 0&&(e={}),{options:e,fn(r){var a,o;const{x:i,y:c,placement:d,rects:f,middlewareData:h}=r,{offset:p=0,mainAxis:x=!0,crossAxis:y=!0}=Zr(e,r),b={x:i,y:c},w=hr(d),S=bg(w);let N=b[S],k=b[w];const C=Zr(p,r),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(a=C.mainAxis)!=null?a:0,crossAxis:(o=C.crossAxis)!=null?o:0};if(x){const _=S==="y"?"height":"width",L=f.reference[S]-f.floating[_]+E.mainAxis,B=f.reference[S]+f.reference[_]-E.mainAxis;N<L?N=L:N>B&&(N=B)}if(y){var T,M;const _=S==="y"?"width":"height",L=yS.has(Ba(d)),B=f.reference[w]-f.floating[_]+(L&&((T=h.offset)==null?void 0:T[w])||0)+(L?0:E.crossAxis),A=f.reference[w]+f.reference[_]+(L?0:((M=h.offset)==null?void 0:M[w])||0)-(L?E.crossAxis:0);k<B?k=B:k>A&&(k=A)}return{[S]:N,[w]:k}}}},IO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){const{placement:a,rects:o,platform:i,elements:c}=r,{apply:d=()=>{},...f}=Zr(e,r),h=await i.detectOverflow(r,f),p=Ba(a),x=Ws(a),y=hr(a)==="y",{width:b,height:w}=o.floating;let S,N;p==="top"||p==="bottom"?(S=p,N=x===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(N=p,S=x==="end"?"top":"bottom");const k=w-h.top-h.bottom,C=b-h.left-h.right,E=Ua(w-h[S],k),T=Ua(b-h[N],C),M=r.middlewareData.shift,_=!M;let L=E,B=T;M!=null&&M.enabled.x&&(B=C),M!=null&&M.enabled.y&&(L=k),_&&!x&&(y?B=b-2*Kr(h.left,h.right):L=w-2*Kr(h.top,h.bottom)),await d({...r,availableWidth:B,availableHeight:L});const A=await i.getDimensions(c.floating);return b!==A.width||w!==A.height?{reset:{rects:!0}}:{}}}};function dd(){return typeof window<"u"}function Zs(e){return bS(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function ea(e){var r;return(r=(bS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function bS(e){return dd()?e instanceof Node||e instanceof hn(e).Node:!1}function gr(e){return dd()?e instanceof Element||e instanceof hn(e).Element:!1}function $a(e){return dd()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function m1(e){return!dd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}function fd(e){const{overflow:r,overflowX:a,overflowY:o,display:i}=xr(e);return/auto|scroll|overlay|hidden|clip/.test(r+o+a)&&i!=="inline"&&i!=="contents"}function UO(e){return/^(table|td|th)$/.test(Zs(e))}function md(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const BO=/transform|translate|scale|rotate|perspective|filter/,HO=/paint|layout|strict|content/,mo=e=>!!e&&e!=="none";let wh;function jg(e){const r=gr(e)?xr(e):e;return mo(r.transform)||mo(r.translate)||mo(r.scale)||mo(r.rotate)||mo(r.perspective)||!Ng()&&(mo(r.backdropFilter)||mo(r.filter))||BO.test(r.willChange||"")||HO.test(r.contain||"")}function FO(e){let r=So(e);for(;$a(r)&&!fi(r);){if(jg(r))return r;if(md(r))return null;r=So(r)}return null}function Ng(){return wh==null&&(wh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wh}function fi(e){return/^(html|body|#document)$/.test(Zs(e))}function xr(e){return hn(e).getComputedStyle(e)}function hd(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function So(e){if(Zs(e)==="html")return e;const r=e.assignedSlot||e.parentNode||m1(e)&&e.host||ea(e);return m1(r)?r.host:r}function wS(e){const r=So(e);return fi(r)?(e.ownerDocument||e).body:$a(r)&&fd(r)?r:wS(r)}function mi(e,r,a){var o;r===void 0&&(r=[]),a===void 0&&(a=!0);const i=wS(e),c=i===((o=e.ownerDocument)==null?void 0:o.body),d=hn(i);if(c){const f=vp(d);return r.concat(d,d.visualViewport||[],fd(i)?i:[],f&&a?mi(f):[])}else return r.concat(i,mi(i,[],a))}function vp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SS(e){const r=xr(e);let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0;const i=$a(e),c=i?e.offsetWidth:a,d=i?e.offsetHeight:o,f=Du(a)!==c||Du(o)!==d;return f&&(a=c,o=d),{width:a,height:o,$:f}}function kg(e){return gr(e)?e:e.contextElement}function Ds(e){const r=kg(e);if(!$a(r))return Xr(1);const a=r.getBoundingClientRect(),{width:o,height:i,$:c}=SS(r);let d=(c?Du(a.width):a.width)/o,f=(c?Du(a.height):a.height)/i;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const $O=Xr(0);function jS(e){const r=hn(e);return!Ng()||!r.visualViewport?$O:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function VO(e,r,a){return r===void 0&&(r=!1),!!a&&r&&a===hn(e)}function jo(e,r,a,o){r===void 0&&(r=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),c=kg(e);let d=Xr(1);r&&(o?gr(o)&&(d=Ds(o)):d=Ds(e));const f=VO(c,a,o)?jS(c):Xr(0);let h=(i.left+f.x)/d.x,p=(i.top+f.y)/d.y,x=i.width/d.x,y=i.height/d.y;if(c&&o){const b=hn(c),w=gr(o)?hn(o):o;let S=b,N=vp(S);for(;N&&w!==S;){const k=Ds(N),C=N.getBoundingClientRect(),E=xr(N),T=C.left+(N.clientLeft+parseFloat(E.paddingLeft))*k.x,M=C.top+(N.clientTop+parseFloat(E.paddingTop))*k.y;h*=k.x,p*=k.y,x*=k.x,y*=k.y,h+=T,p+=M,S=hn(N),N=vp(S)}}return zu({width:x,height:y,x:h,y:p})}function pd(e,r){const a=hd(e).scrollLeft;return r?r.left+a:jo(ea(e)).left+a}function NS(e,r){const a=e.getBoundingClientRect(),o=a.left+r.scrollLeft-pd(e,a),i=a.top+r.scrollTop;return{x:o,y:i}}function qO(e){let{elements:r,rect:a,offsetParent:o,strategy:i}=e;const c=i==="fixed",d=ea(o),f=r?md(r.floating):!1;if(o===d||f&&c)return a;let h={scrollLeft:0,scrollTop:0},p=Xr(1);const x=Xr(0),y=$a(o);if((y||!c)&&((Zs(o)!=="body"||fd(d))&&(h=hd(o)),y)){const w=jo(o);p=Ds(o),x.x=w.x+o.clientLeft,x.y=w.y+o.clientTop}const b=d&&!y&&!c?NS(d,h):Xr(0);return{width:a.width*p.x,height:a.height*p.y,x:a.x*p.x-h.scrollLeft*p.x+x.x+b.x,y:a.y*p.y-h.scrollTop*p.y+x.y+b.y}}function GO(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function YO(e){const r=hd(e),a=e.ownerDocument.body,o=Kr(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth),i=Kr(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let c=-r.scrollLeft+pd(e);const d=-r.scrollTop;return xr(a).direction==="rtl"&&(c+=Kr(e.clientWidth,a.clientWidth)-o),{width:o,height:i,x:c,y:d}}const KO=25;function XO(e,r,a){a===void 0&&(a="viewport");const o=a==="layoutViewport",i=hn(e),c=ea(e),d=i.visualViewport;let f=c.clientWidth,h=c.clientHeight,p=0,x=0;if(d){const b=!Ng()||r==="fixed";o?b||(p=-d.offsetLeft,x=-d.offsetTop):(f=d.width,h=d.height,b&&(p=d.offsetLeft,x=d.offsetTop))}if(pd(c)<=0){const b=c.ownerDocument,w=b.body,S=getComputedStyle(w),N=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,k=Math.abs(c.clientWidth-w.clientWidth-N),C=getComputedStyle(c).scrollbarGutter==="stable both-edges"?k/2:k;C<=KO&&(f-=C)}return{width:f,height:h,x:p,y:x}}function WO(e,r){const a=jo(e,!0,r==="fixed"),o=a.top+e.clientTop,i=a.left+e.clientLeft,c=Ds(e),d=e.clientWidth*c.x,f=e.clientHeight*c.y,h=i*c.x,p=o*c.y;return{width:d,height:f,x:h,y:p}}function h1(e,r,a){let o;if(r==="viewport"||r==="layoutViewport")o=XO(e,a,r);else if(r==="document")o=YO(ea(e));else if(gr(r))o=WO(r,a);else{const i=jS(e);o={x:r.x-i.x,y:r.y-i.y,width:r.width,height:r.height}}return zu(o)}function ZO(e,r){const a=r.get(e);if(a)return a;let o=mi(e,[],!1).filter(f=>gr(f)&&Zs(f)!=="body"),i=null;const c=xr(e).position==="fixed";let d=c?So(e):e;for(;gr(d)&&!fi(d);){const f=xr(d),h=jg(d),p=i?i.position:c?"fixed":"";!h&&(p==="fixed"||p==="absolute"&&f.position==="static")?o=o.filter(y=>y!==d):i=f,d=So(d)}return r.set(e,o),o}function QO(e){let{element:r,boundary:a,rootBoundary:o,strategy:i}=e;const d=[...a==="clippingAncestors"?md(r)?[]:ZO(r,this._c):[].concat(a),o],f=h1(r,d[0],i);let h=f.top,p=f.right,x=f.bottom,y=f.left;for(let b=1;b<d.length;b++){const w=h1(r,d[b],i);h=Kr(w.top,h),p=Ua(w.right,p),x=Ua(w.bottom,x),y=Kr(w.left,y)}return{width:p-y,height:x-h,x:y,y:h}}function JO(e){const{width:r,height:a}=SS(e);return{width:r,height:a}}function ez(e,r,a){const o=$a(r),i=ea(r),c=a==="fixed",d=jo(e,!0,c,r);let f={scrollLeft:0,scrollTop:0};const h=Xr(0);if((o||!c)&&((Zs(r)!=="body"||fd(i))&&(f=hd(r)),o)){const b=jo(r,!0,c,r);h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}!o&&i&&(h.x=pd(i));const p=i&&!o&&!c?NS(i,f):Xr(0),x=d.left+f.scrollLeft-h.x-p.x,y=d.top+f.scrollTop-h.y-p.y;return{x,y,width:d.width,height:d.height}}function Sh(e){return xr(e).position==="static"}function p1(e,r){if(!$a(e)||xr(e).position==="fixed")return null;if(r)return r(e);let a=e.offsetParent;return ea(e)===a&&(a=a.ownerDocument.body),a}function kS(e,r){const a=hn(e);if(md(e))return a;if(!$a(e)){let i=So(e);for(;i&&!fi(i);){if(gr(i)&&!Sh(i))return i;i=So(i)}return a}let o=p1(e,r);for(;o&&UO(o)&&Sh(o);)o=p1(o,r);return o&&fi(o)&&Sh(o)&&!jg(o)?a:o||FO(e)||a}const tz=async function(e){const r=this.getOffsetParent||kS,a=this.getDimensions,o=await a(e.floating);return{reference:ez(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function nz(e){return xr(e).direction==="rtl"}const rz={convertOffsetParentRelativeRectToViewportRelativeRect:qO,getDocumentElement:ea,getClippingRect:QO,getOffsetParent:kS,getElementRects:tz,getClientRects:GO,getDimensions:JO,getScale:Ds,isElement:gr,isRTL:nz};function CS(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function az(e,r,a){let o=null,i;const c=ea(e);function d(){var x;clearTimeout(i),(x=o)==null||x.disconnect(),o=null}function f(x,y){x===void 0&&(x=!1),y===void 0&&(y=1),d();const b=e.getBoundingClientRect(),{left:w,top:S,width:N,height:k}=b;if(x||r(),!N||!k)return;const C=fu(S),E=fu(c.clientWidth-(w+N)),T=fu(c.clientHeight-(S+k)),M=fu(w),L={rootMargin:-C+"px "+-E+"px "+-T+"px "+-M+"px",threshold:Kr(0,Ua(1,y))||1};let B=!0;function A(oe){const q=oe[0].intersectionRatio;if(!CS(b,e.getBoundingClientRect()))return f();if(q!==y){if(!B)return f();q?f(!1,q):i=setTimeout(()=>{f(!1,1e-7)},1e3)}B=!1}try{o=new IntersectionObserver(A,{...L,root:c.ownerDocument})}catch{o=new IntersectionObserver(A,L)}o.observe(e)}const h=hn(e),p=()=>f(a);return h.addEventListener("resize",p),f(!0),()=>{h.removeEventListener("resize",p),d()}}function oz(e,r,a,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=o,p=kg(e),x=i||c?[...p?mi(p):[],...r?mi(r):[]]:[];x.forEach(C=>{i&&C.addEventListener("scroll",a),c&&C.addEventListener("resize",a)});const y=p&&f?az(p,a,c):null;let b=-1,w=null;d&&(w=new ResizeObserver(C=>{let[E]=C;E&&E.target===p&&w&&r&&(w.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var T;(T=w)==null||T.observe(r)})),a()}),p&&!h&&w.observe(p),r&&w.observe(r));let S,N=h?jo(e):null;h&&k();function k(){const C=jo(e);N&&!CS(N,C)&&a(),N=C,S=requestAnimationFrame(k)}return a(),()=>{var C;x.forEach(E=>{i&&E.removeEventListener("scroll",a),c&&E.removeEventListener("resize",a)}),y?.(),(C=w)==null||C.disconnect(),w=null,h&&cancelAnimationFrame(S)}}const sz=zO,lz=LO,iz=AO,cz=IO,uz=DO,g1=MO,dz=PO,fz=(e,r,a)=>{const o=new Map,i=a??{},c={...rz,...i.platform,_c:o};return _O(e,r,{...i,platform:c})};var mz=typeof document<"u",hz=function(){},Cu=mz?m.useLayoutEffect:hz;function Lu(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let a,o,i;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==r.length)return!1;for(o=a;o--!==0;)if(!Lu(e[o],r[o]))return!1;return!0}if(i=Object.keys(e),a=i.length,a!==Object.keys(r).length)return!1;for(o=a;o--!==0;)if(!{}.hasOwnProperty.call(r,i[o]))return!1;for(o=a;o--!==0;){const c=i[o];if(!(c==="_owner"&&e.$$typeof)&&!Lu(e[c],r[c]))return!1}return!0}return e!==e&&r!==r}function ES(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function x1(e,r){const a=ES(e);return Math.round(r*a)/a}function jh(e){const r=m.useRef(e);return Cu(()=>{r.current=e}),r}function pz(e){e===void 0&&(e={});const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i,elements:{reference:c,floating:d}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[x,y]=m.useState({x:0,y:0,strategy:a,placement:r,middlewareData:{},isPositioned:!1}),[b,w]=m.useState(o);Lu(b,o)||w(o);const[S,N]=m.useState(null),[k,C]=m.useState(null),E=m.useCallback(ae=>{ae!==L.current&&(L.current=ae,N(ae))},[]),T=m.useCallback(ae=>{ae!==B.current&&(B.current=ae,C(ae))},[]),M=c||S,_=d||k,L=m.useRef(null),B=m.useRef(null),A=m.useRef(x),oe=h!=null,q=jh(h),W=jh(i),ee=jh(p),re=m.useCallback(()=>{if(!L.current||!B.current)return;const ae={placement:r,strategy:a,middleware:b};W.current&&(ae.platform=W.current),fz(L.current,B.current,ae).then(Q=>{const xe={...Q,isPositioned:ee.current!==!1};te.current&&!Lu(A.current,xe)&&(A.current=xe,Ro.flushSync(()=>{y(xe)}))})},[b,r,a,W,ee]);Cu(()=>{p===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,y(ae=>({...ae,isPositioned:!1})))},[p]);const te=m.useRef(!1);Cu(()=>(te.current=!0,()=>{te.current=!1}),[]),Cu(()=>{if(M&&(L.current=M),_&&(B.current=_),M&&_){if(q.current)return q.current(M,_,re);re()}},[M,_,re,q,oe]);const Z=m.useMemo(()=>({reference:L,floating:B,setReference:E,setFloating:T}),[E,T]),D=m.useMemo(()=>({reference:M,floating:_}),[M,_]),V=m.useMemo(()=>{const ae={position:a,left:0,top:0};if(!D.floating)return ae;const Q=x1(D.floating,x.x),xe=x1(D.floating,x.y);return f?{...ae,transform:"translate("+Q+"px, "+xe+"px)",...ES(D.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Q,top:xe}},[a,f,D.floating,x.x,x.y]);return m.useMemo(()=>({...x,update:re,refs:Z,elements:D,floatingStyles:V}),[x,re,Z,D,V])}const gz=e=>{function r(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:o,padding:i}=typeof e=="function"?e(a):e;return o&&r(o)?o.current!=null?g1({element:o.current,padding:i}).fn(a):{}:o?g1({element:o,padding:i}).fn(a):{}}}},xz=(e,r)=>{const a=sz(e);return{name:a.name,fn:a.fn,options:[e,r]}},vz=(e,r)=>{const a=lz(e);return{name:a.name,fn:a.fn,options:[e,r]}},yz=(e,r)=>({fn:dz(e).fn,options:[e,r]}),bz=(e,r)=>{const a=iz(e);return{name:a.name,fn:a.fn,options:[e,r]}},wz=(e,r)=>{const a=cz(e);return{name:a.name,fn:a.fn,options:[e,r]}},Sz=(e,r)=>{const a=uz(e);return{name:a.name,fn:a.fn,options:[e,r]}},jz=(e,r)=>{const a=gz(e);return{name:a.name,fn:a.fn,options:[e,r]}};var Nz="Arrow",RS=m.forwardRef((e,r)=>{const{children:a,width:o=10,height:i=5,...c}=e;return l.jsx(ve.svg,{...c,ref:r,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});RS.displayName=Nz;var kz=RS,Cg="Popper",[TS,Qs]=Yt(Cg),[Cz,_S]=TS(Cg),MS=e=>{const{__scopePopper:r,children:a}=e,[o,i]=m.useState(null),[c,d]=m.useState(void 0);return l.jsx(Cz,{scope:r,anchor:o,onAnchorChange:i,placementState:c,setPlacementState:d,children:a})};MS.displayName=Cg;var AS="PopperAnchor",DS=m.forwardRef((e,r)=>{const{__scopePopper:a,virtualRef:o,...i}=e,c=_S(AS,a),d=m.useRef(null),f=c.onAnchorChange,h=m.useCallback(S=>{d.current=S,S&&f(S)},[f]),p=_e(r,h),x=m.useRef(null);m.useEffect(()=>{if(!o)return;const S=x.current;x.current=o.current,S!==x.current&&f(x.current)});const y=c.placementState&&Rg(c.placementState),b=y?.[0],w=y?.[1];return o?null:l.jsx(ve.div,{"data-radix-popper-side":b,"data-radix-popper-align":w,...i,ref:p})});DS.displayName=AS;var Eg="PopperContent",[Ez,Rz]=TS(Eg),OS=m.forwardRef((e,r)=>{const{__scopePopper:a,side:o="bottom",sideOffset:i=0,align:c="center",alignOffset:d=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:S,...N}=e,k=_S(Eg,a),[C,E]=m.useState(null),T=_e(r,E),[M,_]=m.useState(null),L=_i(M),B=L?.width??0,A=L?.height??0,oe=o+(c!=="center"?"-"+c:""),q=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},W=Array.isArray(p)?p:[p],ee=W.length>0,re={padding:q,boundary:W.filter(_z),altBoundary:ee},{refs:te,floatingStyles:Z,placement:D,isPositioned:V,middlewareData:ae}=pz({strategy:"fixed",placement:oe,whileElementsMounted:(...Ne)=>oz(...Ne,{animationFrame:w==="always"}),elements:{reference:k.anchor},middleware:[xz({mainAxis:i+A,alignmentAxis:d}),h&&vz({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?yz():void 0,...re}),h&&bz({...re}),wz({...re,apply:({elements:Ne,rects:Ce,availableWidth:Fe,availableHeight:rt})=>{const{width:xt,height:st}=Ce.reference,mt=Ne.floating.style;mt.setProperty("--radix-popper-available-width",`${Fe}px`),mt.setProperty("--radix-popper-available-height",`${rt}px`),mt.setProperty("--radix-popper-anchor-width",`${xt}px`),mt.setProperty("--radix-popper-anchor-height",`${st}px`)}}),M&&jz({element:M,padding:f}),Mz({arrowWidth:B,arrowHeight:A}),b&&Sz({strategy:"referenceHidden",...re,boundary:ee?re.boundary:void 0})]}),Q=k.setPlacementState;Ct(()=>(Q(D),()=>{Q(void 0)}),[D,Q]);const[xe,O]=Rg(D),z=St(S);Ct(()=>{V&&z?.()},[V,z]);const G=ae.arrow?.x,se=ae.arrow?.y,ue=ae.arrow?.centerOffset!==0,[ge,ce]=m.useState();return Ct(()=>{C&&ce(window.getComputedStyle(C).zIndex)},[C]),l.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:V?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(" "),...ae.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Ez,{scope:a,placedSide:xe,placedAlign:O,onArrowChange:_,arrowX:G,arrowY:se,shouldHideArrow:ue,children:l.jsx(ve.div,{"data-side":xe,"data-align":O,...N,ref:T,style:{...N.style,animation:V?void 0:"none"}})})})});OS.displayName=Eg;var zS="PopperArrow",Tz={top:"bottom",right:"left",bottom:"top",left:"right"},LS=m.forwardRef(function(r,a){const{__scopePopper:o,...i}=r,c=Rz(zS,o),d=Tz[c.placedSide];return l.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:l.jsx(kz,{...i,ref:a,style:{...i.style,display:"block"}})})});LS.displayName=zS;function _z(e){return e!==null}var Mz=e=>({name:"transformOrigin",options:e,fn(r){const{placement:a,rects:o,middlewareData:i}=r,d=i.arrow?.centerOffset!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[p,x]=Rg(a),y={start:"0%",center:"50%",end:"100%"}[x],b=(i.arrow?.x??0)+f/2,w=(i.arrow?.y??0)+h/2;let S="",N="";return p==="bottom"?(S=d?y:`${b}px`,N=`${-h}px`):p==="top"?(S=d?y:`${b}px`,N=`${o.floating.height+h}px`):p==="right"?(S=`${-h}px`,N=d?y:`${w}px`):p==="left"&&(S=`${o.floating.width+h}px`,N=d?y:`${w}px`),{data:{x:S,y:N}}}});function Rg(e){const[r,a="center"]=e.split("-");return[r,a]}var gd=MS,Tg=DS,_g=OS,Mg=LS,PS=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"}),Az="VisuallyHidden",xd=m.forwardRef((e,r)=>l.jsx(ve.span,{...e,ref:r,style:{...PS,...e.style}}));xd.displayName=Az;var Dz=xd,[vd]=Yt("Tooltip",[Qs]),yd=Qs(),IS="TooltipProvider",Oz=700,yp="tooltip.open",[zz,Ag]=vd(IS),Lz=e=>{const{__scopeTooltip:r,delayDuration:a=Oz,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:c}=e,d=m.useRef(!0),f=m.useRef(!1),h=m.useRef(0);return m.useEffect(()=>{const p=h.current;return()=>window.clearTimeout(p)},[]),l.jsx(zz,{scope:r,isOpenDelayedRef:d,delayDuration:a,onOpen:m.useCallback(()=>{o<=0||(window.clearTimeout(h.current),d.current=!1)},[o]),onClose:m.useCallback(()=>{o<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,o))},[o]),isPointerInTransitRef:f,onPointerInTransitChange:m.useCallback(p=>{f.current=p},[]),disableHoverableContent:i,children:c})};Lz.displayName=IS;var hi="Tooltip",[Pz,Oi]=vd(hi),Iz=e=>{const{__scopeTooltip:r,children:a,open:o,defaultOpen:i,onOpenChange:c,disableHoverableContent:d,delayDuration:f}=e,h=Ag(hi,e.__scopeTooltip),p=yd(r),[x,y]=m.useState(null),b=Ut(),w=m.useRef(0),S=d??h.disableHoverableContent,N=f??h.delayDuration,k=m.useRef(!1),[C,E]=Cn({prop:o,defaultProp:i??!1,onChange:B=>{B?(h.onOpen(),document.dispatchEvent(new CustomEvent(yp))):h.onClose(),c?.(B)},caller:hi}),T=m.useMemo(()=>C?k.current?"delayed-open":"instant-open":"closed",[C]),M=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,k.current=!1,E(!0)},[E]),_=m.useCallback(()=>{window.clearTimeout(w.current),w.current=0,E(!1)},[E]),L=m.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{k.current=!0,E(!0),w.current=0},N)},[N,E]);return m.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),l.jsx(gd,{...p,children:l.jsx(Pz,{scope:r,contentId:b,open:C,stateAttribute:T,trigger:x,onTriggerChange:y,onTriggerEnter:m.useCallback(()=>{h.isOpenDelayedRef.current?L():M()},[h.isOpenDelayedRef,L,M]),onTriggerLeave:m.useCallback(()=>{S?_():(window.clearTimeout(w.current),w.current=0)},[_,S]),onOpen:M,onClose:_,disableHoverableContent:S,children:a})})};Iz.displayName=hi;var bp="TooltipTrigger",Uz=m.forwardRef((e,r)=>{const{__scopeTooltip:a,...o}=e,i=Oi(bp,a),c=Ag(bp,a),d=yd(a),f=m.useRef(null),h=_e(r,f,i.onTriggerChange),p=m.useRef(!1),x=m.useRef(!1),y=m.useCallback(()=>p.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),l.jsx(Tg,{asChild:!0,...d,children:l.jsx(ve.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:h,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(i.onTriggerEnter(),x.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{i.onTriggerLeave(),x.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{i.open&&i.onClose(),p.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:pe(e.onFocus,()=>{p.current||i.onOpen()}),onBlur:pe(e.onBlur,i.onClose),onClick:pe(e.onClick,i.onClose)})})});Uz.displayName=bp;var Dg="TooltipPortal",[Bz,Hz]=vd(Dg,{forceMount:void 0}),US=e=>{const{__scopeTooltip:r,forceMount:a,children:o,container:i}=e,c=Oi(Dg,r);return l.jsx(Bz,{scope:r,forceMount:a,children:l.jsx(Bt,{present:a||c.open,children:l.jsx(Ys,{asChild:!0,container:i,children:o})})})};US.displayName=Dg;var Bs="TooltipContent",BS=m.forwardRef((e,r)=>{const a=Hz(Bs,e.__scopeTooltip),{forceMount:o=a.forceMount,side:i="top",...c}=e,d=Oi(Bs,e.__scopeTooltip);return l.jsx(Bt,{present:o||d.open,children:d.disableHoverableContent?l.jsx(HS,{side:i,...c,ref:r}):l.jsx(Fz,{side:i,...c,ref:r})})}),Fz=m.forwardRef((e,r)=>{const a=Oi(Bs,e.__scopeTooltip),o=Ag(Bs,e.__scopeTooltip),i=m.useRef(null),c=_e(r,i),[d,f]=m.useState(null),{trigger:h,onClose:p}=a,x=i.current,{onPointerInTransitChange:y}=o,b=m.useCallback(()=>{f(null),y(!1)},[y]),w=m.useCallback((S,N)=>{const k=S.currentTarget,C={x:S.clientX,y:S.clientY},E=Yz(C,k.getBoundingClientRect()),T=Kz(C,E),M=Xz(N.getBoundingClientRect()),_=Zz([...T,...M]);f(_),y(!0)},[y]);return m.useEffect(()=>()=>b(),[b]),m.useEffect(()=>{if(h&&x){const S=k=>w(k,x),N=k=>w(k,h);return h.addEventListener("pointerleave",S),x.addEventListener("pointerleave",N),()=>{h.removeEventListener("pointerleave",S),x.removeEventListener("pointerleave",N)}}},[h,x,w,b]),m.useEffect(()=>{if(d){const S=N=>{const k=N.target,C={x:N.clientX,y:N.clientY},E=h?.contains(k)||x?.contains(k),T=!Wz(C,d);E?b():T&&(b(),p())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[h,x,d,p,b]),l.jsx(HS,{...e,ref:c})}),[$z,Vz]=vd(hi,{isInside:!1}),qz=P5("TooltipContent"),HS=m.forwardRef((e,r)=>{const{__scopeTooltip:a,children:o,"aria-label":i,onEscapeKeyDown:c,onPointerDownOutside:d,...f}=e,h=Oi(Bs,a),p=yd(a),{onClose:x}=h;return m.useEffect(()=>(document.addEventListener(yp,x),()=>document.removeEventListener(yp,x)),[x]),m.useEffect(()=>{if(h.trigger){const y=b=>{b.target instanceof Node&&b.target.contains(h.trigger)&&x()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[h.trigger,x]),l.jsx(Gs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:y=>y.preventDefault(),onDismiss:x,children:l.jsxs(_g,{"data-state":h.stateAttribute,...p,...f,ref:r,style:{...f.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:[l.jsx(qz,{children:o}),l.jsx($z,{scope:a,isInside:!0,children:l.jsx(Dz,{id:h.contentId,role:"tooltip",children:i||o})})]})})});BS.displayName=Bs;var FS="TooltipArrow",Gz=m.forwardRef((e,r)=>{const{__scopeTooltip:a,...o}=e,i=yd(a);return Vz(FS,a).isInside?null:l.jsx(Mg,{...i,...o,ref:r})});Gz.displayName=FS;function Yz(e,r){const a=Math.abs(r.top-e.y),o=Math.abs(r.bottom-e.y),i=Math.abs(r.right-e.x),c=Math.abs(r.left-e.x);switch(Math.min(a,o,i,c)){case c:return"left";case i:return"right";case a:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Kz(e,r,a=5){const o=[];switch(r){case"top":o.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":o.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":o.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":o.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return o}function Xz(e){const{top:r,right:a,bottom:o,left:i}=e;return[{x:i,y:r},{x:a,y:r},{x:a,y:o},{x:i,y:o}]}function Wz(e,r){const{x:a,y:o}=e;let i=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const f=r[c],h=r[d],p=f.x,x=f.y,y=h.x,b=h.y;x>o!=b>o&&a<(y-p)*(o-x)/(b-x)+p&&(i=!i)}return i}function Zz(e){const r=e.slice();return r.sort((a,o)=>a.x<o.x?-1:a.x>o.x?1:a.y<o.y?-1:a.y>o.y?1:0),Qz(r)}function Qz(e){if(e.length<=1)return e.slice();const r=[];for(let o=0;o<e.length;o++){const i=e[o];for(;r.length>=2;){const c=r[r.length-1],d=r[r.length-2];if((c.x-d.x)*(i.y-d.y)>=(c.y-d.y)*(i.x-d.x))r.pop();else break}r.push(i)}r.pop();const a=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;a.length>=2;){const c=a[a.length-1],d=a[a.length-2];if((c.x-d.x)*(i.y-d.y)>=(c.y-d.y)*(i.x-d.x))a.pop();else break}a.push(i)}return a.pop(),r.length===1&&a.length===1&&r[0].x===a[0].x&&r[0].y===a[0].y?r:r.concat(a)}var Jz=US,e7=BS;function t7(e,r){return m.useReducer((a,o)=>r[a][o]??a,e)}var Og="ScrollArea",[$S]=Yt(Og),[n7,Yn]=$S(Og),VS=m.forwardRef((e,r)=>{const{__scopeScrollArea:a,type:o="hover",dir:i,scrollHideDelay:c=600,...d}=e,[f,h]=m.useState(null),[p,x]=m.useState(null),[y,b]=m.useState(null),[w,S]=m.useState(null),[N,k]=m.useState(null),[C,E]=m.useState(0),[T,M]=m.useState(0),[_,L]=m.useState(!1),[B,A]=m.useState(!1),oe=_e(r,h),q=To(i);return l.jsx(n7,{scope:a,type:o,dir:q,scrollHideDelay:c,scrollArea:f,viewport:p,onViewportChange:x,content:y,onContentChange:b,scrollbarX:w,onScrollbarXChange:S,scrollbarXEnabled:_,onScrollbarXEnabledChange:L,scrollbarY:N,onScrollbarYChange:k,scrollbarYEnabled:B,onScrollbarYEnabledChange:A,onCornerWidthChange:E,onCornerHeightChange:M,children:l.jsx(ve.div,{dir:q,...d,ref:oe,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});VS.displayName=Og;var qS="ScrollAreaViewport",GS=m.forwardRef((e,r)=>{const{__scopeScrollArea:a,children:o,nonce:i,...c}=e,d=Yn(qS,a),f=m.useRef(null),h=_e(r,f,d.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx(r7,{nonce:i}),l.jsx(ve.div,{"data-radix-scroll-area-viewport":"",...c,ref:h,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...e.style},children:l.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});GS.displayName=qS;var r7=m.memo(({nonce:e})=>l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,r)=>e.nonce===r.nonce),Sr="ScrollAreaScrollbar",YS=m.forwardRef((e,r)=>{const{forceMount:a,...o}=e,i=Yn(Sr,e.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:d}=i,f=e.orientation==="horizontal";return m.useEffect(()=>(f?c(!0):d(!0),()=>{f?c(!1):d(!1)}),[f,c,d]),i.type==="hover"?l.jsx(a7,{...o,ref:r,forceMount:a}):i.type==="scroll"?l.jsx(o7,{...o,ref:r,forceMount:a}):i.type==="auto"?l.jsx(KS,{...o,ref:r,forceMount:a}):i.type==="always"?l.jsx(zg,{...o,ref:r,"data-state":"visible"}):null});YS.displayName=Sr;var a7=m.forwardRef((e,r)=>{const{forceMount:a,...o}=e,i=Yn(Sr,e.__scopeScrollArea),[c,d]=m.useState(!1);return m.useEffect(()=>{const f=i.scrollArea;let h=0;if(f){const p=()=>{window.clearTimeout(h),d(!0)},x=()=>{h=window.setTimeout(()=>d(!1),i.scrollHideDelay)};return f.addEventListener("pointerenter",p),f.addEventListener("pointerleave",x),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",p),f.removeEventListener("pointerleave",x)}}},[i.scrollArea,i.scrollHideDelay]),l.jsx(Bt,{present:a||c,children:l.jsx(KS,{"data-state":c?"visible":"hidden",...o,ref:r})})}),o7=m.forwardRef((e,r)=>{const{forceMount:a,...o}=e,i=Yn(Sr,e.__scopeScrollArea),c=e.orientation==="horizontal",d=wd(()=>h("SCROLL_END"),100),[f,h]=t7("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(f==="idle"){const p=window.setTimeout(()=>h("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[f,i.scrollHideDelay,h]),m.useEffect(()=>{const p=i.viewport,x=c?"scrollLeft":"scrollTop";if(p){let y=p[x];const b=()=>{const w=p[x];y!==w&&(h("SCROLL"),d()),y=w};return p.addEventListener("scroll",b),()=>p.removeEventListener("scroll",b)}},[i.viewport,c,h,d]),l.jsx(Bt,{present:a||f!=="hidden",children:l.jsx(zg,{"data-state":f==="hidden"?"hidden":"visible",...o,ref:r,onPointerEnter:pe(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:pe(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),KS=m.forwardRef((e,r)=>{const a=Yn(Sr,e.__scopeScrollArea),{forceMount:o,...i}=e,[c,d]=m.useState(!1),f=e.orientation==="horizontal",h=wd(()=>{if(a.viewport){const p=a.viewport.offsetWidth<a.viewport.scrollWidth,x=a.viewport.offsetHeight<a.viewport.scrollHeight;d(f?p:x)}},10);return Hs(a.viewport,h),Hs(a.content,h),l.jsx(Bt,{present:o||c,children:l.jsx(zg,{"data-state":c?"visible":"hidden",...i,ref:r})})}),zg=m.forwardRef((e,r)=>{const{orientation:a="vertical",...o}=e,i=Yn(Sr,e.__scopeScrollArea),c=m.useRef(null),d=m.useRef(0),[f,h]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=JS(f.viewport,f.content),x={...o,sizes:f,onSizesChange:h,hasThumb:p>0&&p<1,onThumbChange:b=>c.current=b,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:b=>d.current=b};function y(b,w){return d7(b,d.current,f,w)}return a==="horizontal"?l.jsx(s7,{...x,ref:r,onThumbPositionChange:()=>{if(i.viewport&&c.current){const b=i.viewport.scrollLeft,w=v1(b,f,i.dir);c.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{i.viewport&&(i.viewport.scrollLeft=b)},onDragScroll:b=>{i.viewport&&(i.viewport.scrollLeft=y(b,i.dir))}}):a==="vertical"?l.jsx(l7,{...x,ref:r,onThumbPositionChange:()=>{if(i.viewport&&c.current){const b=i.viewport.scrollTop,w=v1(b,f);c.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{i.viewport&&(i.viewport.scrollTop=b)},onDragScroll:b=>{i.viewport&&(i.viewport.scrollTop=y(b))}}):null}),s7=m.forwardRef((e,r)=>{const{sizes:a,onSizesChange:o,...i}=e,c=Yn(Sr,e.__scopeScrollArea),[d,f]=m.useState(),h=m.useRef(null),p=_e(r,h,c.onScrollbarXChange);return m.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),l.jsx(WS,{"data-orientation":"horizontal",...i,ref:p,sizes:a,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bd(a)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.x),onDragScroll:x=>e.onDragScroll(x.x),onWheelScroll:(x,y)=>{if(c.viewport){const b=c.viewport.scrollLeft+x.deltaX;e.onWheelScroll(b),tj(b,y)&&x.preventDefault()}},onResize:()=>{h.current&&c.viewport&&d&&o({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Iu(d.paddingLeft),paddingEnd:Iu(d.paddingRight)}})}})}),l7=m.forwardRef((e,r)=>{const{sizes:a,onSizesChange:o,...i}=e,c=Yn(Sr,e.__scopeScrollArea),[d,f]=m.useState(),h=m.useRef(null),p=_e(r,h,c.onScrollbarYChange);return m.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),l.jsx(WS,{"data-orientation":"vertical",...i,ref:p,sizes:a,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bd(a)+"px",...e.style},onThumbPointerDown:x=>e.onThumbPointerDown(x.y),onDragScroll:x=>e.onDragScroll(x.y),onWheelScroll:(x,y)=>{if(c.viewport){const b=c.viewport.scrollTop+x.deltaY;e.onWheelScroll(b),tj(b,y)&&x.preventDefault()}},onResize:()=>{h.current&&c.viewport&&d&&o({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Iu(d.paddingTop),paddingEnd:Iu(d.paddingBottom)}})}})}),[i7,XS]=$S(Sr),WS=m.forwardRef((e,r)=>{const{__scopeScrollArea:a,sizes:o,hasThumb:i,onThumbChange:c,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:x,onResize:y,...b}=e,w=Yn(Sr,a),[S,N]=m.useState(null),k=_e(r,N),C=m.useRef(null),E=m.useRef(""),T=w.viewport,M=o.content-o.viewport,_=St(x),L=St(h),B=wd(y,10);function A(oe){if(C.current){const q=oe.clientX-C.current.left,W=oe.clientY-C.current.top;p({x:q,y:W})}}return m.useEffect(()=>{const oe=q=>{const W=q.target;S?.contains(W)&&_(q,M)};return document.addEventListener("wheel",oe,{passive:!1}),()=>document.removeEventListener("wheel",oe,{passive:!1})},[T,S,M,_]),m.useEffect(L,[o,L]),Hs(S,B),Hs(w.content,B),l.jsx(i7,{scope:a,scrollbar:S,hasThumb:i,onThumbChange:St(c),onThumbPointerUp:St(d),onThumbPositionChange:L,onThumbPointerDown:St(f),children:l.jsx(ve.div,{...b,ref:k,style:{position:"absolute",...b.style},onPointerDown:pe(e.onPointerDown,oe=>{oe.button===0&&(oe.target.setPointerCapture(oe.pointerId),C.current=S.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),A(oe))}),onPointerMove:pe(e.onPointerMove,A),onPointerUp:pe(e.onPointerUp,oe=>{const q=oe.target;q.hasPointerCapture(oe.pointerId)&&q.releasePointerCapture(oe.pointerId),document.body.style.webkitUserSelect=E.current,w.viewport&&(w.viewport.style.scrollBehavior=""),C.current=null})})})}),Pu="ScrollAreaThumb",ZS=m.forwardRef((e,r)=>{const{forceMount:a,...o}=e,i=XS(Pu,e.__scopeScrollArea);return l.jsx(Bt,{present:a||i.hasThumb,children:l.jsx(c7,{ref:r,...o})})}),c7=m.forwardRef((e,r)=>{const{__scopeScrollArea:a,style:o,...i}=e,c=Yn(Pu,a),d=XS(Pu,a),{onThumbPositionChange:f}=d,h=_e(r,d.onThumbChange),p=m.useRef(void 0),x=wd(()=>{p.current&&(p.current(),p.current=void 0)},100);return m.useEffect(()=>{const y=c.viewport;if(y){const b=()=>{if(x(),!p.current){const w=f7(y,f);p.current=w,f()}};return f(),y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[c.viewport,x,f]),l.jsx(ve.div,{"data-state":d.hasThumb?"visible":"hidden",...i,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:pe(e.onPointerDownCapture,y=>{const w=y.target.getBoundingClientRect(),S=y.clientX-w.left,N=y.clientY-w.top;d.onThumbPointerDown({x:S,y:N})}),onPointerUp:pe(e.onPointerUp,d.onThumbPointerUp)})});ZS.displayName=Pu;var Lg="ScrollAreaCorner",QS=m.forwardRef((e,r)=>{const a=Yn(Lg,e.__scopeScrollArea),o=!!(a.scrollbarX&&a.scrollbarY);return a.type!=="scroll"&&o?l.jsx(u7,{...e,ref:r}):null});QS.displayName=Lg;var u7=m.forwardRef((e,r)=>{const{__scopeScrollArea:a,...o}=e,i=Yn(Lg,a),[c,d]=m.useState(0),[f,h]=m.useState(0),p=!!(c&&f),{onCornerWidthChange:x,onCornerHeightChange:y}=i;return Hs(i.scrollbarX,()=>{const b=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(b),h(b)}),Hs(i.scrollbarY,()=>{const b=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(b),d(b)}),m.useEffect(()=>()=>{x(0),y(0)},[x,y]),p?l.jsx(ve.div,{...o,ref:r,style:{width:c,height:f,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Iu(e){return e?parseInt(e,10):0}function JS(e,r){const a=e/r;return isNaN(a)?0:a}function bd(e){const r=JS(e.viewport,e.content),a=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-a)*r;return Math.max(o,18)}function d7(e,r,a,o="ltr"){const i=bd(a),c=i/2,d=r||c,f=i-d,h=a.scrollbar.paddingStart+d,p=a.scrollbar.size-a.scrollbar.paddingEnd-f,x=a.content-a.viewport,y=o==="ltr"?[0,x]:[x*-1,0];return ej([h,p],y)(e)}function v1(e,r,a="ltr"){const o=bd(r),i=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,c=r.scrollbar.size-i,d=r.content-r.viewport,f=c-o,h=a==="ltr"?[0,d]:[d*-1,0],p=di(e,h);return ej([0,d],[0,f])(p)}function ej(e,r){return a=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const o=(r[1]-r[0])/(e[1]-e[0]);return r[0]+o*(a-e[0])}}function tj(e,r){return e>0&&e<r}var f7=(e,r=()=>{})=>{let a={left:e.scrollLeft,top:e.scrollTop},o=0;return(function i(){const c={left:e.scrollLeft,top:e.scrollTop},d=a.left!==c.left,f=a.top!==c.top;(d||f)&&r(),a=c,o=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(o)};function wd(e,r){const a=St(e),o=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(o.current),[]),m.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(a,r)},[a,r])}function Hs(e,r){const a=St(r);Ct(()=>{let o=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(a)});return i.observe(e),()=>{window.cancelAnimationFrame(o),i.unobserve(e)}}},[e,a])}var m7=VS,h7=GS,p7=QS,Pg="ToastProvider",[Ig,g7,x7]=Mi("Toast"),[nj]=Yt("Toast",[x7]),[v7,Sd]=nj(Pg),rj=e=>{const{__scopeToast:r,label:a="Notification",duration:o=5e3,swipeDirection:i="right",swipeThreshold:c=50,announcerContainer:d,children:f}=e,[h,p]=m.useState(null),[x,y]=m.useState(0),b=m.useRef(!1),w=m.useRef(!1);return a.trim()||console.error(`Invalid prop \`label\` supplied to \`${Pg}\`. Expected non-empty \`string\`.`),l.jsx(Ig.Provider,{scope:r,children:l.jsx(v7,{scope:r,label:a,duration:o,swipeDirection:i,swipeThreshold:c,toastCount:x,viewport:h,onViewportChange:p,onToastAdd:m.useCallback(()=>y(S=>S+1),[]),onToastRemove:m.useCallback(()=>y(S=>S-1),[]),isFocusedToastEscapeKeyDownRef:b,isClosePausedRef:w,announcerContainer:d,children:f})})};rj.displayName=Pg;var aj="ToastViewport",y7=["F8"],wp="toast.viewportPause",Sp="toast.viewportResume",oj=m.forwardRef((e,r)=>{const{__scopeToast:a,hotkey:o=y7,label:i="Notifications ({hotkey})",...c}=e,d=Sd(aj,a),f=g7(a),h=m.useRef(null),p=m.useRef(null),x=m.useRef(null),y=m.useRef(null),b=_e(r,y,d.onViewportChange),w=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=d.toastCount>0;m.useEffect(()=>{const k=C=>{o.length!==0&&o.every(T=>C[T]||C.code===T)&&y.current?.focus()};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[o]),m.useEffect(()=>{const k=h.current,C=y.current;if(S&&k&&C){const E=()=>{if(!d.isClosePausedRef.current){const L=new CustomEvent(wp);C.dispatchEvent(L),d.isClosePausedRef.current=!0}},T=()=>{if(d.isClosePausedRef.current){const L=new CustomEvent(Sp);C.dispatchEvent(L),d.isClosePausedRef.current=!1}},M=L=>{!k.contains(L.relatedTarget)&&T()},_=()=>{k.contains(document.activeElement)||T()};return k.addEventListener("focusin",E),k.addEventListener("focusout",M),k.addEventListener("pointermove",E),k.addEventListener("pointerleave",_),window.addEventListener("blur",E),window.addEventListener("focus",T),()=>{k.removeEventListener("focusin",E),k.removeEventListener("focusout",M),k.removeEventListener("pointermove",E),k.removeEventListener("pointerleave",_),window.removeEventListener("blur",E),window.removeEventListener("focus",T)}}},[S,d.isClosePausedRef]);const N=m.useCallback(({tabbingDirection:k})=>{const E=f().map(T=>{const M=T.ref.current,_=[M,...A7(M)];return k==="forwards"?_:_.reverse()});return(k==="forwards"?E.reverse():E).flat()},[f]);return m.useEffect(()=>{const k=y.current;if(k){const C=E=>{const T=E.altKey||E.ctrlKey||E.metaKey;if(E.key==="Tab"&&!T){const _=document.activeElement,L=E.shiftKey;if(E.target===k&&L){p.current?.focus();return}const oe=N({tabbingDirection:L?"backwards":"forwards"}),q=oe.findIndex(W=>W===_);Nh(oe.slice(q+1))?E.preventDefault():L?p.current?.focus():x.current?.focus()}};return k.addEventListener("keydown",C),()=>k.removeEventListener("keydown",C)}},[f,N]),l.jsxs(y6,{ref:h,role:"region","aria-label":i.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&l.jsx(jp,{ref:p,onFocusFromOutsideViewport:()=>{const k=N({tabbingDirection:"forwards"});Nh(k)}}),l.jsx(Ig.Slot,{scope:a,children:l.jsx(ve.ol,{tabIndex:-1,...c,ref:b})}),S&&l.jsx(jp,{ref:x,onFocusFromOutsideViewport:()=>{const k=N({tabbingDirection:"backwards"});Nh(k)}})]})});oj.displayName=aj;var sj="ToastFocusProxy",jp=m.forwardRef((e,r)=>{const{__scopeToast:a,onFocusFromOutsideViewport:o,...i}=e,c=Sd(sj,a);return l.jsx(xd,{tabIndex:0,...i,ref:r,style:{position:"fixed"},onFocus:d=>{const f=d.relatedTarget;!c.viewport?.contains(f)&&o()}})});jp.displayName=sj;var zi="Toast",b7="toast.swipeStart",w7="toast.swipeMove",S7="toast.swipeCancel",j7="toast.swipeEnd",lj=m.forwardRef((e,r)=>{const{forceMount:a,open:o,defaultOpen:i,onOpenChange:c,...d}=e,[f,h]=Cn({prop:o,defaultProp:i??!0,onChange:c,caller:zi});return l.jsx(Bt,{present:a||f,children:l.jsx(C7,{open:f,...d,ref:r,onClose:()=>h(!1),onPause:St(e.onPause),onResume:St(e.onResume),onSwipeStart:pe(e.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:pe(e.onSwipeMove,p=>{const{x,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:pe(e.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:pe(e.onSwipeEnd,p=>{const{x,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${x}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),h(!1)})})})});lj.displayName=zi;var[N7,k7]=nj(zi,{onClose(){}}),C7=m.forwardRef((e,r)=>{const{__scopeToast:a,type:o="foreground",duration:i,open:c,onClose:d,onEscapeKeyDown:f,onPause:h,onResume:p,onSwipeStart:x,onSwipeMove:y,onSwipeCancel:b,onSwipeEnd:w,...S}=e,N=Sd(zi,a),[k,C]=m.useState(null),E=_e(r,C),T=m.useRef(null),M=m.useRef(null),_=i||N.duration,L=m.useRef(0),B=m.useRef(_),A=m.useRef(0),{onToastAdd:oe,onToastRemove:q}=N,W=St(()=>{k?.contains(document.activeElement)&&N.viewport?.focus(),d()}),ee=m.useCallback(te=>{!te||te===1/0||(window.clearTimeout(A.current),L.current=new Date().getTime(),A.current=window.setTimeout(W,te))},[W]);m.useEffect(()=>{const te=N.viewport;if(te){const Z=()=>{ee(B.current),p?.()},D=()=>{const V=new Date().getTime()-L.current;B.current=B.current-V,window.clearTimeout(A.current),h?.()};return te.addEventListener(wp,D),te.addEventListener(Sp,Z),()=>{te.removeEventListener(wp,D),te.removeEventListener(Sp,Z)}}},[N.viewport,_,h,p,ee]),m.useEffect(()=>{c&&!N.isClosePausedRef.current&&ee(_)},[c,_,N.isClosePausedRef,ee]),m.useEffect(()=>()=>{window.clearTimeout(A.current)},[]),m.useEffect(()=>(oe(),()=>q()),[oe,q]);const re=m.useMemo(()=>k?hj(k):null,[k]);return N.viewport?l.jsxs(l.Fragment,{children:[re&&l.jsx(E7,{__scopeToast:a,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:re}),l.jsx(N7,{scope:a,onClose:W,children:Ro.createPortal(l.jsx(Ig.ItemSlot,{scope:a,children:l.jsx(v6,{asChild:!0,onEscapeKeyDown:pe(f,()=>{N.isFocusedToastEscapeKeyDownRef.current||W(),N.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(ve.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":N.swipeDirection,...S,ref:E,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:pe(e.onKeyDown,te=>{te.key==="Escape"&&(f?.(te.nativeEvent),te.nativeEvent.defaultPrevented||(N.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:pe(e.onPointerDown,te=>{te.button===0&&(T.current={x:te.clientX,y:te.clientY})}),onPointerMove:pe(e.onPointerMove,te=>{if(!T.current)return;const Z=te.clientX-T.current.x,D=te.clientY-T.current.y,V=!!M.current,ae=["left","right"].includes(N.swipeDirection),Q=["left","up"].includes(N.swipeDirection)?Math.min:Math.max,xe=ae?Q(0,Z):0,O=ae?0:Q(0,D),z=te.pointerType==="touch"?10:2,G={x:xe,y:O},se={originalEvent:te,delta:G};V?(M.current=G,mu(w7,y,se,{discrete:!1})):y1(G,N.swipeDirection,z)?(M.current=G,mu(b7,x,se,{discrete:!1}),te.target.setPointerCapture(te.pointerId)):(Math.abs(Z)>z||Math.abs(D)>z)&&(T.current=null)}),onPointerUp:pe(e.onPointerUp,te=>{const Z=M.current,D=te.target;if(D.hasPointerCapture(te.pointerId)&&D.releasePointerCapture(te.pointerId),M.current=null,T.current=null,Z){const V=te.currentTarget,ae={originalEvent:te,delta:Z};y1(Z,N.swipeDirection,N.swipeThreshold)?mu(j7,w,ae,{discrete:!0}):mu(S7,b,ae,{discrete:!0}),V.addEventListener("click",Q=>Q.preventDefault(),{once:!0})}})})})}),N.viewport)})]}):null}),E7=e=>{const{__scopeToast:r,children:a,...o}=e,i=Sd(zi,r),[c,d]=m.useState(!1),[f,h]=m.useState(!1);return _7(()=>d(!0)),m.useEffect(()=>{const p=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(p)},[]),f?null:l.jsx(Ys,{asChild:!0,container:i.announcerContainer||void 0,children:l.jsx(xd,{...o,children:c&&l.jsxs(l.Fragment,{children:[i.label," ",a]})})})},R7="ToastTitle",ij=m.forwardRef((e,r)=>{const{__scopeToast:a,...o}=e;return l.jsx(ve.div,{...o,ref:r})});ij.displayName=R7;var T7="ToastDescription",cj=m.forwardRef((e,r)=>{const{__scopeToast:a,...o}=e;return l.jsx(ve.div,{...o,ref:r})});cj.displayName=T7;var uj="ToastAction",dj=m.forwardRef((e,r)=>{const{altText:a,...o}=e;return a.trim()?l.jsx(mj,{altText:a,asChild:!0,children:l.jsx(Ug,{...o,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${uj}\`. Expected non-empty \`string\`.`),null)});dj.displayName=uj;var fj="ToastClose",Ug=m.forwardRef((e,r)=>{const{__scopeToast:a,...o}=e,i=k7(fj,a);return l.jsx(mj,{asChild:!0,children:l.jsx(ve.button,{type:"button",...o,ref:r,onClick:pe(e.onClick,i.onClose)})})});Ug.displayName=fj;var mj=m.forwardRef((e,r)=>{const{__scopeToast:a,altText:o,...i}=e;return l.jsx(ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...i,ref:r})});function hj(e){const r=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&r.push(o.textContent),M7(o)){const i=o.ariaHidden||o.hidden||o.style.display==="none",c=o.dataset.radixToastAnnounceExclude==="";if(!i)if(c){const d=o.dataset.radixToastAnnounceAlt;d&&r.push(d)}else r.push(...hj(o))}}),r}function mu(e,r,a,{discrete:o}){const i=a.originalEvent.currentTarget,c=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:a});r&&i.addEventListener(e,r,{once:!0}),o?og(i,c):i.dispatchEvent(c)}var y1=(e,r,a=0)=>{const o=Math.abs(e.x),i=Math.abs(e.y),c=o>i;return r==="left"||r==="right"?c&&o>a:!c&&i>a};function _7(e=()=>{}){const r=St(e);Ct(()=>{let a=0,o=0;return a=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(a),window.cancelAnimationFrame(o)}},[r])}function M7(e){return e.nodeType===e.ELEMENT_NODE}function A7(e){const r=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)r.push(a.currentNode);return r}function Nh(e){const r=document.activeElement;return e.some(a=>a===r?!0:(a.focus(),document.activeElement!==r))}var D7=rj,O7=oj,z7=lj,L7=ij,P7=cj,I7=dj,U7=Ug,Bg="Avatar",[B7]=Yt(Bg),H7=[0,()=>{}],[F7,pj]=B7(Bg),gj=m.forwardRef((e,r)=>{const{__scopeAvatar:a,...o}=e,[i,c]=m.useState("idle"),[d,f]=V7();return l.jsx(F7,{scope:a,imageLoadingStatus:i,setImageLoadingStatus:c,imageCount:d,setImageCount:f,children:l.jsx(ve.span,{...o,ref:r})})});gj.displayName=Bg;var xj="AvatarImage",vj=m.forwardRef((e,r)=>{const{__scopeAvatar:a,src:o,onLoadingStatusChange:i,...c}=e,d=pj(xj,a);q7(d.setImageCount);const f=$7(o,{referrerPolicy:c.referrerPolicy,crossOrigin:c.crossOrigin,loadingStatus:d.imageLoadingStatus,setLoadingStatus:d.setImageLoadingStatus}),h=St(x=>{i?.(x)}),p=m.useRef(f);return Ct(()=>{const x=p.current;p.current=f,f!==x&&h(f)},[f,h]),f==="loaded"?l.jsx(ve.img,{...c,ref:r,src:o}):null});vj.displayName=xj;var yj="AvatarFallback",bj=m.forwardRef((e,r)=>{const{__scopeAvatar:a,delayMs:o,...i}=e,c=pj(yj,a),[d,f]=m.useState(o===void 0);return m.useEffect(()=>{if(o!==void 0){const h=window.setTimeout(()=>f(!0),o);return()=>window.clearTimeout(h)}},[o]),d&&c.imageLoadingStatus!=="loaded"?l.jsx(ve.span,{...i,ref:r}):null});bj.displayName=yj;function $7(e,{loadingStatus:r,setLoadingStatus:a,referrerPolicy:o,crossOrigin:i}){return Ct(()=>{if(!e){a("error");return}const c=new window.Image,d=h=>{const p=h.currentTarget;a(b1(p))},f=()=>a("error");return c.addEventListener("load",d),c.addEventListener("error",f),o&&(c.referrerPolicy=o),c.crossOrigin=i??null,c.src=e,a(b1(c)),()=>{c.removeEventListener("load",d),c.removeEventListener("error",f),a("idle")}},[e,i,o,a]),r}function b1(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function V7(){let e=H7;{e=m.useState(0);const[r]=e,a=m.useRef(!1);m.useEffect(()=>{r>1&&!a.current&&(a.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[r])}return e}function q7(e){m.useEffect(()=>(e(r=>r+1),()=>{e(r=>r-1)}),[e])}var G7="Label",wj=m.forwardRef((e,r)=>l.jsx(ve.label,{...e,ref:r,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));wj.displayName=G7;var Sj=wj,Y7=[" ","Enter","ArrowUp","ArrowDown"],K7=[" ","Enter"],No="Select",[jd,Nd,X7]=Mi(No),[_o]=Yt(No,[X7,Qs]),kd=Qs(),[W7,Va]=_o(No),[Z7,Q7]=_o(No),J7="SelectProvider";function jj(e){const{__scopeSelect:r,children:a,open:o,defaultOpen:i,onOpenChange:c,value:d,defaultValue:f,onValueChange:h,dir:p,name:x,autoComplete:y,disabled:b,required:w,form:S,internal_do_not_use_render:N}=e,k=kd(r),[C,E]=m.useState(null),[T,M]=m.useState(null),[_,L]=m.useState(!1),B=To(p),[A,oe]=Cn({prop:o,defaultProp:i??!1,onChange:c,caller:No}),[q,W]=Cn({prop:d,defaultProp:f,onChange:h,caller:No}),ee=m.useRef(null),re=m.useRef(q);m.useEffect(()=>{const z=S?C?.ownerDocument.getElementById(S):C?.form;if(z instanceof HTMLFormElement){const G=()=>W(re.current);return z.addEventListener("reset",G),()=>z.removeEventListener("reset",G)}},[S,C,W]);const te=C?!!S||!!C.closest("form"):!0,[Z,D]=m.useState(new Set),V=Ut(),ae=Array.from(Z).map(z=>z.props.value).join(";"),Q=m.useCallback(z=>{D(G=>new Set(G).add(z))},[]),xe=m.useCallback(z=>{D(G=>{const se=new Set(G);return se.delete(z),se})},[]),O={required:w,trigger:C,onTriggerChange:E,valueNode:T,onValueNodeChange:M,valueNodeHasChildren:_,onValueNodeHasChildrenChange:L,contentId:V,value:q,onValueChange:W,open:A,onOpenChange:oe,dir:B,triggerPointerDownPosRef:ee,disabled:b,name:x,autoComplete:y,form:S,nativeOptions:Z,nativeSelectKey:ae,isFormControl:te};return l.jsx(gd,{...k,children:l.jsx(W7,{scope:r,...O,children:l.jsx(jd.Provider,{scope:r,children:l.jsx(Z7,{scope:r,onNativeOptionAdd:Q,onNativeOptionRemove:xe,children:m8(N)?N(O):a})})})})}jj.displayName=J7;var Nj=e=>{const{__scopeSelect:r,children:a,...o}=e;return l.jsx(jj,{__scopeSelect:r,...o,internal_do_not_use_render:({isFormControl:i})=>l.jsxs(l.Fragment,{children:[a,i?l.jsx(Jj,{__scopeSelect:r}):null]})})};Nj.displayName=No;var kj="SelectTrigger",Cj=m.forwardRef((e,r)=>{const{__scopeSelect:a,disabled:o=!1,...i}=e,c=kd(a),d=Va(kj,a),f=d.disabled||o,h=_e(r,d.onTriggerChange),p=Nd(a),x=m.useRef("touch"),[y,b,w]=eN(N=>{const k=p().filter(T=>!T.disabled),C=k.find(T=>T.value===d.value),E=tN(k,N,C);E!==void 0&&d.onValueChange(E.value)}),S=N=>{f||(d.onOpenChange(!0),w()),N&&(d.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})};return l.jsx(Tg,{asChild:!0,...c,children:l.jsx(ve.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":Cd(d.value)?"":void 0,...i,ref:h,onClick:pe(i.onClick,N=>{N.currentTarget.focus(),x.current!=="mouse"&&S(N)}),onPointerDown:pe(i.onPointerDown,N=>{x.current=N.pointerType;const k=N.target;k.hasPointerCapture(N.pointerId)&&k.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(S(N),N.preventDefault())}),onKeyDown:pe(i.onKeyDown,N=>{const k=y.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&b(N.key),!(k&&N.key===" ")&&Y7.includes(N.key)&&(S(),N.preventDefault())})})})});Cj.displayName=kj;var Ej="SelectValue",Rj=m.forwardRef((e,r)=>{const{__scopeSelect:a,className:o,style:i,children:c,placeholder:d="",...f}=e,h=Va(Ej,a),{onValueNodeHasChildrenChange:p}=h,x=c!==void 0,y=_e(r,h.onValueNodeChange);Ct(()=>{p(x)},[p,x]);const b=Cd(h.value);return l.jsx(ve.span,{...f,asChild:b?!1:f.asChild,ref:y,style:{pointerEvents:"none"},children:l.jsx(m.Fragment,{children:b?d:c},b?"placeholder":"value")})});Rj.displayName=Ej;var e8="SelectIcon",Tj=m.forwardRef((e,r)=>{const{__scopeSelect:a,children:o,...i}=e;return l.jsx(ve.span,{"aria-hidden":!0,...i,ref:r,children:o||"▼"})});Tj.displayName=e8;var _j="SelectPortal",[t8,n8]=_o(_j,{forceMount:void 0}),Mj=e=>{const{__scopeSelect:r,forceMount:a,...o}=e;return l.jsx(t8,{scope:e.__scopeSelect,forceMount:a,children:l.jsx(Ys,{asChild:!0,...o})})};Mj.displayName=_j;var Ha="SelectContent",Aj=m.forwardRef((e,r)=>{const a=n8(Ha,e.__scopeSelect),{forceMount:o=a.forceMount,...i}=e,c=Va(Ha,e.__scopeSelect),[d,f]=m.useState();return Ct(()=>{f(new DocumentFragment)},[]),l.jsx(Bt,{present:o||c.open,children:({present:h})=>h?l.jsx(zj,{...i,ref:r}):l.jsx(Dj,{...i,fragment:d})})});Aj.displayName=Ha;var Dj=m.forwardRef((e,r)=>{const{__scopeSelect:a,children:o,fragment:i}=e;return i?Ro.createPortal(l.jsx(Oj,{scope:a,children:l.jsx(jd.Slot,{scope:a,children:l.jsx("div",{ref:r,children:o})})}),i):null});Dj.displayName="SelectContentFragment";var rr=10,[Oj,qa]=_o(Ha),r8="SelectContentImpl",a8=bo("SelectContent.RemoveScroll"),zj=m.forwardRef((e,r)=>{const{__scopeSelect:a}=e,{position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:d,side:f,sideOffset:h,align:p,alignOffset:x,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:N,avoidCollisions:k,...C}=e,E=Va(Ha,a),[T,M]=m.useState(null),[_,L]=m.useState(null),B=_e(r,M),[A,oe]=m.useState(null),[q,W]=m.useState(null),ee=Nd(a),[re,te]=m.useState(!1),Z=m.useRef(!1);m.useEffect(()=>{if(T)return ig(T)},[T]),lg();const D=m.useCallback(ce=>{const[Ne,...Ce]=ee().map(xt=>xt.ref.current),[Fe]=Ce.slice(-1),rt=document.activeElement;for(const xt of ce)if(xt===rt||(xt?.scrollIntoView({block:"nearest"}),xt===Ne&&_&&(_.scrollTop=0),xt===Fe&&_&&(_.scrollTop=_.scrollHeight),xt?.focus(),document.activeElement!==rt))return},[ee,_]),V=m.useCallback(()=>D([A,T]),[D,A,T]);m.useEffect(()=>{re&&V()},[re,V]);const{onOpenChange:ae,triggerPointerDownPosRef:Q}=E;m.useEffect(()=>{if(T){let ce={x:0,y:0};const Ne=Fe=>{ce={x:Math.abs(Math.round(Fe.pageX)-(Q.current?.x??0)),y:Math.abs(Math.round(Fe.pageY)-(Q.current?.y??0))}},Ce=Fe=>{ce.x<=10&&ce.y<=10?Fe.preventDefault():Fe.composedPath().includes(T)||ae(!1),document.removeEventListener("pointermove",Ne),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",Ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",Ce,{capture:!0})}}},[T,ae,Q]),m.useEffect(()=>{const ce=()=>ae(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[ae]);const[xe,O]=eN(ce=>{const Ne=ee().filter(rt=>!rt.disabled),Ce=Ne.find(rt=>rt.ref.current===document.activeElement),Fe=tN(Ne,ce,Ce);Fe&&setTimeout(()=>Fe.ref.current?.focus())}),z=m.useCallback((ce,Ne,Ce)=>{const Fe=!Z.current&&!Ce;(E.value!==void 0&&E.value===Ne||Fe)&&(oe(ce),Fe&&(Z.current=!0))},[E.value]),G=m.useCallback(()=>T?.focus(),[T]),se=m.useCallback((ce,Ne,Ce)=>{const Fe=!Z.current&&!Ce;(E.value!==void 0&&E.value===Ne||Fe)&&W(ce)},[E.value]),ue=o==="popper"?Np:Lj,ge=ue===Np?{side:f,sideOffset:h,align:p,alignOffset:x,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:N,avoidCollisions:k}:{};return l.jsx(Oj,{scope:a,content:T,viewport:_,onViewportChange:L,itemRefCallback:z,selectedItem:A,onItemLeave:G,itemTextRefCallback:se,focusSelectedItem:V,selectedItemText:q,position:o,isPositioned:re,searchRef:xe,children:l.jsx(rd,{as:a8,allowPinchZoom:!0,children:l.jsx(td,{asChild:!0,trapped:E.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:pe(i,ce=>{E.trigger?.focus({preventScroll:!0}),ce.preventDefault()}),children:l.jsx(Gs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:l.jsx(ue,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:ce=>ce.preventDefault(),...C,...ge,onPlaced:()=>te(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:pe(C.onKeyDown,ce=>{const Ne=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!Ne&&ce.key.length===1&&O(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let Fe=ee().filter(rt=>!rt.disabled).map(rt=>rt.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(Fe=Fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const rt=ce.target,xt=Fe.indexOf(rt);Fe=Fe.slice(xt+1)}setTimeout(()=>D(Fe)),ce.preventDefault()}})})})})})})});zj.displayName=r8;var o8="SelectItemAlignedPosition",Lj=m.forwardRef((e,r)=>{const{__scopeSelect:a,onPlaced:o,...i}=e,c=Va(Ha,a),d=qa(Ha,a),[f,h]=m.useState(null),[p,x]=m.useState(null),y=_e(r,x),b=Nd(a),w=m.useRef(!1),S=m.useRef(!0),{viewport:N,selectedItem:k,selectedItemText:C,focusSelectedItem:E}=d,T=m.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&p&&N&&k&&C){const B=c.trigger.getBoundingClientRect(),A=p.getBoundingClientRect(),oe=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const rt=q.left-A.left,xt=oe.left-rt,st=B.left-xt,mt=B.width+st,or=Math.max(mt,A.width),jr=window.innerWidth-rr,pn=di(xt,[rr,Math.max(rr,jr-or)]);f.style.minWidth=mt+"px",f.style.left=pn+"px"}else{const rt=A.right-q.right,xt=window.innerWidth-oe.right-rt,st=window.innerWidth-B.right-xt,mt=B.width+st,or=Math.max(mt,A.width),jr=window.innerWidth-rr,pn=di(xt,[rr,Math.max(rr,jr-or)]);f.style.minWidth=mt+"px",f.style.right=pn+"px"}const W=b(),ee=window.innerHeight-rr*2,re=N.scrollHeight,te=window.getComputedStyle(p),Z=parseInt(te.borderTopWidth,10),D=parseInt(te.paddingTop,10),V=parseInt(te.borderBottomWidth,10),ae=parseInt(te.paddingBottom,10),Q=Z+D+re+ae+V,xe=Math.min(k.offsetHeight*5,Q),O=window.getComputedStyle(N),z=parseInt(O.paddingTop,10),G=parseInt(O.paddingBottom,10),se=B.top+B.height/2-rr,ue=ee-se,ge=k.offsetHeight/2,ce=k.offsetTop+ge,Ne=Z+D+ce,Ce=Q-Ne;if(Ne<=se){const rt=W.length>0&&k===W[W.length-1].ref.current;f.style.bottom="0px";const xt=p.clientHeight-N.offsetTop-N.offsetHeight,st=Math.max(ue,ge+(rt?G:0)+xt+V),mt=Ne+st;f.style.height=mt+"px"}else{const rt=W.length>0&&k===W[0].ref.current;f.style.top="0px";const st=Math.max(se,Z+N.offsetTop+(rt?z:0)+ge)+Ce;f.style.height=st+"px",N.scrollTop=Ne-se+N.offsetTop}f.style.margin=`${rr}px 0`,f.style.minHeight=xe+"px",f.style.maxHeight=ee+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,f,p,N,k,C,c.dir,o]);Ct(()=>T(),[T]);const[M,_]=m.useState();Ct(()=>{p&&_(window.getComputedStyle(p).zIndex)},[p]);const L=m.useCallback(B=>{B&&S.current===!0&&(T(),E?.(),S.current=!1)},[T,E]);return l.jsx(l8,{scope:a,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:L,children:l.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:l.jsx(ve.div,{...i,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Lj.displayName=o8;var s8="SelectPopperPosition",Np=m.forwardRef((e,r)=>{const{__scopeSelect:a,align:o="start",collisionPadding:i=rr,...c}=e,d=kd(a);return l.jsx(_g,{...d,...c,ref:r,align:o,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Np.displayName=s8;var[l8,Hg]=_o(Ha,{}),kp="SelectViewport",Pj=m.forwardRef((e,r)=>{const{__scopeSelect:a,nonce:o,...i}=e,c=qa(kp,a),d=Hg(kp,a),f=_e(r,c.onViewportChange),h=m.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),l.jsx(jd.Slot,{scope:a,children:l.jsx(ve.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:pe(i.onScroll,p=>{const x=p.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=d;if(b?.current&&y){const w=Math.abs(h.current-x.scrollTop);if(w>0){const S=window.innerHeight-rr*2,N=parseFloat(y.style.minHeight),k=parseFloat(y.style.height),C=Math.max(N,k);if(C<S){const E=C+w,T=Math.min(S,E),M=E-T;y.style.height=T+"px",y.style.bottom==="0px"&&(x.scrollTop=M>0?M:0,y.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});Pj.displayName=kp;var Ij="SelectGroup",[i8,c8]=_o(Ij),Uj=m.forwardRef((e,r)=>{const{__scopeSelect:a,...o}=e,i=Ut();return l.jsx(i8,{scope:a,id:i,children:l.jsx(ve.div,{role:"group","aria-labelledby":i,...o,ref:r})})});Uj.displayName=Ij;var Bj="SelectLabel",Hj=m.forwardRef((e,r)=>{const{__scopeSelect:a,...o}=e,i=c8(Bj,a);return l.jsx(ve.div,{id:i.id,...o,ref:r})});Hj.displayName=Bj;var Uu="SelectItem",[u8,Fj]=_o(Uu),$j=m.forwardRef((e,r)=>{const{__scopeSelect:a,value:o,disabled:i=!1,textValue:c,...d}=e,f=Va(Uu,a),h=qa(Uu,a),p=f.value===o,[x,y]=m.useState(c??""),[b,w]=m.useState(!1),S=St(T=>h.itemRefCallback?.(T,o,i)),N=_e(r,S),k=Ut(),C=m.useRef("touch"),E=()=>{i||(f.onValueChange(o),f.onOpenChange(!1))};return l.jsx(u8,{scope:a,value:o,disabled:i,textId:k,isSelected:p,onItemTextChange:m.useCallback(T=>{y(M=>M||(T?.textContent??"").trim())},[]),children:l.jsx(jd.ItemSlot,{scope:a,value:o,disabled:i,textValue:x,children:l.jsx(ve.div,{role:"option","aria-labelledby":k,"data-highlighted":b?"":void 0,"aria-selected":p&&b,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...d,ref:N,onFocus:pe(d.onFocus,()=>w(!0)),onBlur:pe(d.onBlur,()=>w(!1)),onClick:pe(d.onClick,()=>{C.current!=="mouse"&&E()}),onPointerUp:pe(d.onPointerUp,()=>{C.current==="mouse"&&E()}),onPointerDown:pe(d.onPointerDown,T=>{C.current=T.pointerType}),onPointerMove:pe(d.onPointerMove,T=>{C.current=T.pointerType,i?h.onItemLeave?.():C.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(d.onPointerLeave,T=>{T.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:pe(d.onKeyDown,T=>{i||T.target!==T.currentTarget||h.searchRef?.current!==""&&T.key===" "||(K7.includes(T.key)&&E(),T.key===" "&&T.preventDefault())})})})})});$j.displayName=Uu;var oi="SelectItemText",Vj=m.forwardRef((e,r)=>{const{__scopeSelect:a,className:o,style:i,...c}=e,d=Va(oi,a),f=qa(oi,a),h=Fj(oi,a),p=Q7(oi,a),[x,y]=m.useState(null),b=St(E=>f.itemTextRefCallback?.(E,h.value,h.disabled)),w=_e(r,y,h.onItemTextChange,b),S=x?.textContent,N=m.useMemo(()=>l.jsx("option",{value:h.value,disabled:h.disabled,children:S},h.value),[h.disabled,h.value,S]),{onNativeOptionAdd:k,onNativeOptionRemove:C}=p;return Ct(()=>(k(N),()=>C(N)),[k,C,N]),l.jsxs(l.Fragment,{children:[l.jsx(ve.span,{id:h.textId,...c,ref:w}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!Cd(d.value)?Ro.createPortal(c.children,d.valueNode):null]})});Vj.displayName=oi;var qj="SelectItemIndicator",Gj=m.forwardRef((e,r)=>{const{__scopeSelect:a,...o}=e;return Fj(qj,a).isSelected?l.jsx(ve.span,{"aria-hidden":!0,...o,ref:r}):null});Gj.displayName=qj;var Cp="SelectScrollUpButton",Yj=m.forwardRef((e,r)=>{const a=qa(Cp,e.__scopeSelect),o=Hg(Cp,e.__scopeSelect),[i,c]=m.useState(!1),d=_e(r,o.onScrollButtonChange);return Ct(()=>{if(a.viewport&&a.isPositioned){let f=function(){const p=h.scrollTop>0;c(p)};const h=a.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[a.viewport,a.isPositioned]),i?l.jsx(Xj,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=a;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});Yj.displayName=Cp;var Ep="SelectScrollDownButton",Kj=m.forwardRef((e,r)=>{const a=qa(Ep,e.__scopeSelect),o=Hg(Ep,e.__scopeSelect),[i,c]=m.useState(!1),d=_e(r,o.onScrollButtonChange);return Ct(()=>{if(a.viewport&&a.isPositioned){let f=function(){const p=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<p;c(x)};const h=a.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[a.viewport,a.isPositioned]),i?l.jsx(Xj,{...e,ref:d,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=a;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});Kj.displayName=Ep;var Xj=m.forwardRef((e,r)=>{const{__scopeSelect:a,onAutoScroll:o,...i}=e,c=qa("SelectScrollButton",a),d=m.useRef(null),f=Nd(a),h=m.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return m.useEffect(()=>()=>h(),[h]),Ct(()=>{f().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),l.jsx(ve.div,{"aria-hidden":!0,...i,ref:r,style:{flexShrink:0,...i.style},onPointerDown:pe(i.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(o,50))}),onPointerMove:pe(i.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(o,50))}),onPointerLeave:pe(i.onPointerLeave,()=>{h()})})}),d8="SelectSeparator",Wj=m.forwardRef((e,r)=>{const{__scopeSelect:a,...o}=e;return l.jsx(ve.div,{"aria-hidden":!0,...o,ref:r})});Wj.displayName=d8;var Zj="SelectArrow",f8=m.forwardRef((e,r)=>{const{__scopeSelect:a,...o}=e,i=kd(a);return qa(Zj,a).position==="popper"?l.jsx(Mg,{...i,...o,ref:r}):null});f8.displayName=Zj;var Qj="SelectBubbleInput",Jj=m.forwardRef(({__scopeSelect:e,...r},a)=>{const o=Va(Qj,e),{value:i,onValueChange:c,required:d,disabled:f,name:h,autoComplete:p,form:x}=o,{nativeOptions:y,nativeSelectKey:b}=o,w=m.useRef(null),S=_e(a,w),N=i??"",k=Ti(N),C=Array.from(y).some(E=>(E.props.value??"")==="");return m.useEffect(()=>{const E=w.current;if(!E)return;const T=window.HTMLSelectElement.prototype,_=Object.getOwnPropertyDescriptor(T,"value").set;if(k!==N&&_){const L=new Event("change",{bubbles:!0});_.call(E,N),E.dispatchEvent(L)}},[k,N]),l.jsxs(ve.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:h,autoComplete:p,disabled:f,form:x,onChange:E=>c(E.target.value),...r,style:{...PS,...r.style},ref:S,defaultValue:N,children:[Cd(i)&&!C?l.jsx("option",{value:""}):null,Array.from(y)]},b)});Jj.displayName=Qj;function m8(e){return typeof e=="function"}function Cd(e){return e===""||e===void 0}function eN(e){const r=St(e),a=m.useRef(""),o=m.useRef(0),i=m.useCallback(d=>{const f=a.current+d;r(f),(function h(p){a.current=p,window.clearTimeout(o.current),p!==""&&(o.current=window.setTimeout(()=>h(""),1e3))})(f)},[r]),c=m.useCallback(()=>{a.current="",window.clearTimeout(o.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(o.current),[]),[a,i,c]}function tN(e,r,a){const i=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=a?e.indexOf(a):-1;let d=h8(e,Math.max(c,0));i.length===1&&(d=d.filter(p=>p!==a));const h=d.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==a?h:void 0}function h8(e,r){return e.map((a,o)=>e[(r+o)%e.length])}var Ed="Checkbox",[p8]=Yt(Ed),[g8,Fg]=p8(Ed);function x8(e){const{__scopeCheckbox:r,checked:a,children:o,defaultChecked:i,disabled:c,form:d,name:f,onCheckedChange:h,required:p,value:x="on",internal_do_not_use_render:y}=e,[b,w]=Cn({prop:a,defaultProp:i??!1,onChange:h,caller:Ed}),[S,N]=m.useState(null),[k,C]=m.useState(null),E=m.useRef(!1),T=S?!!d||!!S.closest("form"):!0,M={checked:b,disabled:c,setChecked:w,control:S,setControl:N,name:f,form:d,value:x,hasConsumerStoppedPropagationRef:E,required:p,defaultChecked:Ia(i)?!1:i,isFormControl:T,bubbleInput:k,setBubbleInput:C};return l.jsx(g8,{scope:r,...M,children:v8(y)?y(M):o})}var nN="CheckboxTrigger",rN=m.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:a,...o},i)=>{const{control:c,value:d,disabled:f,checked:h,required:p,setControl:x,setChecked:y,hasConsumerStoppedPropagationRef:b,isFormControl:w,bubbleInput:S}=Fg(nN,e),N=_e(i,x),k=m.useRef(h);return m.useEffect(()=>{const C=c?.form;if(C){const E=()=>y(k.current);return C.addEventListener("reset",E),()=>C.removeEventListener("reset",E)}},[c,y]),l.jsx(ve.button,{type:"button",role:"checkbox","aria-checked":Ia(h)?"mixed":h,"aria-required":p,"data-state":cN(h),"data-disabled":f?"":void 0,disabled:f,value:d,...o,ref:N,onKeyDown:pe(r,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:pe(a,C=>{y(E=>Ia(E)?!0:!E),S&&w&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})})});rN.displayName=nN;var aN=m.forwardRef((e,r)=>{const{__scopeCheckbox:a,name:o,checked:i,defaultChecked:c,required:d,disabled:f,value:h,onCheckedChange:p,form:x,...y}=e;return l.jsx(x8,{__scopeCheckbox:a,checked:i,defaultChecked:c,disabled:f,required:d,onCheckedChange:p,name:o,form:x,value:h,internal_do_not_use_render:({isFormControl:b})=>l.jsxs(l.Fragment,{children:[l.jsx(rN,{...y,ref:r,__scopeCheckbox:a}),b&&l.jsx(iN,{__scopeCheckbox:a})]})})});aN.displayName=Ed;var oN="CheckboxIndicator",sN=m.forwardRef((e,r)=>{const{__scopeCheckbox:a,forceMount:o,...i}=e,c=Fg(oN,a);return l.jsx(Bt,{present:o||Ia(c.checked)||c.checked===!0,children:l.jsx(ve.span,{"data-state":cN(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})});sN.displayName=oN;var lN="CheckboxBubbleInput",iN=m.forwardRef(({__scopeCheckbox:e,...r},a)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:d,required:f,disabled:h,name:p,value:x,form:y,bubbleInput:b,setBubbleInput:w}=Fg(lN,e),S=_e(a,w),N=Ti(c),k=_i(o);m.useEffect(()=>{const E=b;if(!E)return;const T=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(T,"checked").set,L=!i.current;if(N!==c&&_){const B=new Event("click",{bubbles:L});E.indeterminate=Ia(c),_.call(E,Ia(c)?!1:c),E.dispatchEvent(B)}},[b,N,c,i]);const C=m.useRef(Ia(c)?!1:c);return l.jsx(ve.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??C.current,required:f,disabled:h,name:p,value:x,form:y,...r,tabIndex:-1,ref:S,style:{...r.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});iN.displayName=lN;function v8(e){return typeof e=="function"}function Ia(e){return e==="indeterminate"}function cN(e){return Ia(e)?"indeterminate":e?"checked":"unchecked"}var $g="Radio",[y8,uN]=Yt($g),[b8,Rd]=y8($g);function dN(e){const{__scopeRadio:r,checked:a=!1,children:o,disabled:i,form:c,name:d,onCheck:f,required:h,value:p="on",internal_do_not_use_render:x}=e,[y,b]=m.useState(null),[w,S]=m.useState(null),N=m.useRef(!1),k=y?!!c||!!y.closest("form"):!0,C={checked:a,disabled:i,required:h,name:d,form:c,value:p,control:y,setControl:b,hasConsumerStoppedPropagationRef:N,isFormControl:k,bubbleInput:w,setBubbleInput:S,onCheck:()=>f?.()};return l.jsx(b8,{scope:r,...C,children:S8(x)?x(C):o})}var fN="RadioTrigger",Vg=m.forwardRef(({__scopeRadio:e,onClick:r,...a},o)=>{const{checked:i,disabled:c,value:d,setControl:f,onCheck:h,hasConsumerStoppedPropagationRef:p,isFormControl:x,bubbleInput:y}=Rd(fN,e),b=_e(o,f);return l.jsx(ve.button,{type:"button",role:"radio","aria-checked":i,"data-state":gN(i),"data-disabled":c?"":void 0,disabled:c,value:d,...a,ref:b,onClick:pe(r,w=>{i||h(),y&&x&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});Vg.displayName=fN;var w8=m.forwardRef((e,r)=>{const{__scopeRadio:a,name:o,checked:i,required:c,disabled:d,value:f,onCheck:h,form:p,...x}=e;return l.jsx(dN,{__scopeRadio:a,checked:i,disabled:d,required:c,onCheck:h,name:o,form:p,value:f,internal_do_not_use_render:({isFormControl:y})=>l.jsxs(l.Fragment,{children:[l.jsx(Vg,{...x,ref:r,__scopeRadio:a}),y&&l.jsx(qg,{__scopeRadio:a})]})})});w8.displayName=$g;var mN="RadioIndicator",hN=m.forwardRef((e,r)=>{const{__scopeRadio:a,forceMount:o,...i}=e,c=Rd(mN,a);return l.jsx(Bt,{present:o||c.checked,children:l.jsx(ve.span,{"data-state":gN(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:r})})});hN.displayName=mN;var pN="RadioBubbleInput",qg=m.forwardRef(({__scopeRadio:e,...r},a)=>{const{control:o,checked:i,required:c,disabled:d,name:f,value:h,form:p,bubbleInput:x,setBubbleInput:y,hasConsumerStoppedPropagationRef:b}=Rd(pN,e),w=_e(a,y),S=Ti(i),N=_i(o);m.useEffect(()=>{const C=x;if(!C)return;const E=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(E,"checked").set,_=!b.current;if(S!==i&&M){const L=new Event("click",{bubbles:_});M.call(C,i),C.dispatchEvent(L)}},[x,S,i,b]);const k=m.useRef(i);return l.jsx(ve.input,{type:"radio","aria-hidden":!0,defaultChecked:k.current,required:c,disabled:d,name:f,value:h,form:p,...r,tabIndex:-1,ref:w,style:{...r.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qg.displayName=pN;function S8(e){return typeof e=="function"}function gN(e){return e?"checked":"unchecked"}var j8=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Td="RadioGroup",[N8]=Yt(Td,[Xs,uN]),xN=Xs(),_d=uN(),[k8,C8]=N8(Td),vN=m.forwardRef((e,r)=>{const{__scopeRadioGroup:a,name:o,form:i,defaultValue:c,value:d,required:f=!1,disabled:h=!1,orientation:p,dir:x,loop:y=!0,onValueChange:b,...w}=e,S=xN(a),N=To(x),[k,C]=Cn({prop:d,defaultProp:c??null,onChange:b,caller:Td}),[E,T]=m.useState(null),M=_e(r,T),_=m.useRef(k);return m.useEffect(()=>{const L=i?E?.ownerDocument.getElementById(i):E?.closest("form");if(L instanceof HTMLFormElement){const B=()=>C(_.current);return L.addEventListener("reset",B),()=>L.removeEventListener("reset",B)}},[E,i,C]),l.jsx(k8,{scope:a,name:o,form:i,required:f,disabled:h,value:k,onValueChange:C,children:l.jsx(xg,{asChild:!0,...S,orientation:p,dir:N,loop:y,children:l.jsx(ve.div,{role:"radiogroup","aria-required":f,"aria-orientation":p,"data-disabled":h?"":void 0,dir:N,...w,ref:M})})})});vN.displayName=Td;var E8="RadioGroupItem",R8="RadioGroupItemProvider",yN="RadioGroupItemTrigger",T8="RadioGroupItemBubbleInput";function _8(e){const{__scopeRadioGroup:r,value:a,disabled:o,children:i,internal_do_not_use_render:c}=e,d=C8(R8,r),f=_d(r),h=d.disabled||o;return l.jsx(dN,{...f,checked:d.value===a,disabled:h,required:d.required,name:d.name,form:d.form,value:a,onCheck:()=>d.onValueChange(a),internal_do_not_use_render:c,children:i})}var bN=m.forwardRef((e,r)=>{const{__scopeRadioGroup:a,...o}=e,i=xN(a),c=_d(a),{checked:d,disabled:f}=Rd(yN,c.__scopeRadio),h=m.useRef(null),p=_e(r,h),x=m.useRef(!1);return m.useEffect(()=>{const y=w=>{j8.includes(w.key)&&(x.current=!0)},b=()=>x.current=!1;return document.addEventListener("keydown",y),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",y),document.removeEventListener("keyup",b)}},[]),l.jsx(vg,{asChild:!0,...i,focusable:!f,active:d,children:l.jsx(Vg,{...c,...o,ref:p,onKeyDown:pe(o.onKeyDown,y=>{y.key==="Enter"&&y.preventDefault()}),onFocus:pe(o.onFocus,()=>{x.current&&h.current?.click()})})})});bN.displayName=yN;var wN=m.forwardRef((e,r)=>{const{__scopeRadioGroup:a,value:o,disabled:i,...c}=e;return l.jsx(_8,{__scopeRadioGroup:a,value:o,disabled:i,internal_do_not_use_render:({isFormControl:d})=>l.jsxs(l.Fragment,{children:[l.jsx(bN,{...c,ref:r,__scopeRadioGroup:a}),d&&l.jsx(SN,{__scopeRadioGroup:a})]})})});wN.displayName=E8;var SN=m.forwardRef((e,r)=>{const{__scopeRadioGroup:a,...o}=e,i=_d(a);return l.jsx(qg,{...i,...o,ref:r})});SN.displayName=T8;var M8="RadioGroupIndicator",jN=m.forwardRef((e,r)=>{const{__scopeRadioGroup:a,...o}=e,i=_d(a);return l.jsx(hN,{...i,...o,ref:r})});jN.displayName=M8;var Md="Switch",[A8]=Yt(Md),[D8,Gg]=A8(Md);function O8(e){const{__scopeSwitch:r,checked:a,children:o,defaultChecked:i,disabled:c,form:d,name:f,onCheckedChange:h,required:p,value:x="on",internal_do_not_use_render:y}=e,[b,w]=Cn({prop:a,defaultProp:i??!1,onChange:h,caller:Md}),[S,N]=m.useState(null),[k,C]=m.useState(null),E=m.useRef(!1),T=S?!!d||!!S.closest("form"):!0,M={checked:b,setChecked:w,disabled:c,control:S,setControl:N,name:f,form:d,value:x,hasConsumerStoppedPropagationRef:E,required:p,defaultChecked:i,isFormControl:T,bubbleInput:k,setBubbleInput:C};return l.jsx(D8,{scope:r,...M,children:z8(y)?y(M):o})}var NN="SwitchTrigger",kN=m.forwardRef(({__scopeSwitch:e,onClick:r,...a},o)=>{const{control:i,form:c,value:d,disabled:f,checked:h,required:p,setControl:x,setChecked:y,hasConsumerStoppedPropagationRef:b,isFormControl:w,bubbleInput:S}=Gg(NN,e),N=_e(o,x),k=m.useRef(h);return m.useEffect(()=>{const C=c?i?.ownerDocument.getElementById(c):i?.form;if(C instanceof HTMLFormElement){const E=()=>y(k.current);return C.addEventListener("reset",E),()=>C.removeEventListener("reset",E)}},[i,c,y]),l.jsx(ve.button,{type:"button",role:"switch","aria-checked":h,"aria-required":p,"data-state":MN(h),"data-disabled":f?"":void 0,disabled:f,value:d,...a,ref:N,onClick:pe(r,C=>{y(E=>!E),S&&w&&(b.current=C.isPropagationStopped(),b.current||C.stopPropagation())})})});kN.displayName=NN;var CN=m.forwardRef((e,r)=>{const{__scopeSwitch:a,name:o,checked:i,defaultChecked:c,required:d,disabled:f,value:h,onCheckedChange:p,form:x,...y}=e;return l.jsx(O8,{__scopeSwitch:a,checked:i,defaultChecked:c,disabled:f,required:d,onCheckedChange:p,name:o,form:x,value:h,internal_do_not_use_render:({isFormControl:b})=>l.jsxs(l.Fragment,{children:[l.jsx(kN,{...y,ref:r,__scopeSwitch:a}),b&&l.jsx(_N,{__scopeSwitch:a})]})})});CN.displayName=Md;var EN="SwitchThumb",RN=m.forwardRef((e,r)=>{const{__scopeSwitch:a,...o}=e,i=Gg(EN,a);return l.jsx(ve.span,{"data-state":MN(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:r})});RN.displayName=EN;var TN="SwitchBubbleInput",_N=m.forwardRef(({__scopeSwitch:e,...r},a)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:d,required:f,disabled:h,name:p,value:x,form:y,bubbleInput:b,setBubbleInput:w}=Gg(TN,e),S=_e(a,w),N=Ti(c),k=_i(o);m.useEffect(()=>{const E=b;if(!E)return;const T=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(T,"checked").set,L=!i.current;if(N!==c&&_){const B=new Event("click",{bubbles:L});_.call(E,c),E.dispatchEvent(B)}},[b,N,c,i]);const C=m.useRef(c);return l.jsx(ve.input,{type:"checkbox","aria-hidden":!0,defaultChecked:d??C.current,required:f,disabled:h,name:p,value:x,form:y,...r,tabIndex:-1,ref:S,style:{...r.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});_N.displayName=TN;function z8(e){return typeof e=="function"}function MN(e){return e?"checked":"unchecked"}var Rp=["Enter"," "],L8=["ArrowDown","PageUp","Home"],AN=["ArrowUp","PageDown","End"],P8=[...L8,...AN],I8={ltr:[...Rp,"ArrowRight"],rtl:[...Rp,"ArrowLeft"]},U8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Li="Menu",[pi,B8,H8]=Mi(Li),[Mo,DN]=Yt(Li,[H8,Qs,Xs]),Pi=Qs(),ON=Xs(),[zN,Ga]=Mo(Li),[F8,Ii]=Mo(Li),LN=e=>{const{__scopeMenu:r,open:a=!1,children:o,dir:i,onOpenChange:c,modal:d=!0}=e,f=Pi(r),[h,p]=m.useState(null),x=m.useRef(!1),y=St(c),b=To(i);return m.useEffect(()=>{const w=()=>{x.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>x.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),m.useEffect(()=>{if(!a)return;const w=()=>y(!1);return window.addEventListener("blur",w),()=>window.removeEventListener("blur",w)},[a,y]),l.jsx(gd,{...f,children:l.jsx(zN,{scope:r,open:a,onOpenChange:y,content:h,onContentChange:p,children:l.jsx(F8,{scope:r,onClose:m.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:b,modal:d,children:o})})})};LN.displayName=Li;var $8="MenuAnchor",Yg=m.forwardRef((e,r)=>{const{__scopeMenu:a,...o}=e,i=Pi(a);return l.jsx(Tg,{...i,...o,ref:r})});Yg.displayName=$8;var Kg="MenuPortal",[V8,PN]=Mo(Kg,{forceMount:void 0}),IN=e=>{const{__scopeMenu:r,forceMount:a,children:o,container:i}=e,c=Ga(Kg,r);return l.jsx(V8,{scope:r,forceMount:a,children:l.jsx(Bt,{present:a||c.open,children:l.jsx(Ys,{asChild:!0,container:i,children:o})})})};IN.displayName=Kg;var $n="MenuContent",[q8,Xg]=Mo($n),UN=m.forwardRef((e,r)=>{const a=PN($n,e.__scopeMenu),{forceMount:o=a.forceMount,...i}=e,c=Ga($n,e.__scopeMenu),d=Ii($n,e.__scopeMenu);return l.jsx(pi.Provider,{scope:e.__scopeMenu,children:l.jsx(Bt,{present:o||c.open,children:l.jsx(pi.Slot,{scope:e.__scopeMenu,children:d.modal?l.jsx(G8,{...i,ref:r}):l.jsx(Y8,{...i,ref:r})})})})}),G8=m.forwardRef((e,r)=>{const a=Ga($n,e.__scopeMenu),o=m.useRef(null),i=_e(r,o);return m.useEffect(()=>{const c=o.current;if(c)return ig(c)},[]),l.jsx(Wg,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),Y8=m.forwardRef((e,r)=>{const a=Ga($n,e.__scopeMenu);return l.jsx(Wg,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),K8=bo("MenuContent.ScrollLock"),Wg=m.forwardRef((e,r)=>{const{__scopeMenu:a,loop:o=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:b,onDismiss:w,disableOutsideScroll:S,...N}=e,k=Ga($n,a),C=Ii($n,a),E=Pi(a),T=ON(a),M=B8(a),[_,L]=m.useState(null),B=m.useRef(null),A=_e(r,B,k.onContentChange),oe=m.useRef(0),q=m.useRef(""),W=m.useRef(0),ee=m.useRef(null),re=m.useRef("right"),te=m.useRef(0),Z=S?rd:m.Fragment,D=S?{as:K8,allowPinchZoom:!0}:void 0,V=Q=>{const xe=q.current+Q,O=M().filter(ce=>!ce.disabled),z=document.activeElement,G=O.find(ce=>ce.ref.current===z)?.textValue,se=O.map(ce=>ce.textValue),ue=s9(se,xe,G),ge=O.find(ce=>ce.textValue===ue)?.ref.current;(function ce(Ne){q.current=Ne,window.clearTimeout(oe.current),Ne!==""&&(oe.current=window.setTimeout(()=>ce(""),1e3))})(xe),ge&&setTimeout(()=>ge.focus())};m.useEffect(()=>()=>window.clearTimeout(oe.current),[]),lg();const ae=m.useCallback(Q=>re.current===ee.current?.side&&i9(Q,ee.current?.area),[]);return l.jsx(q8,{scope:a,searchRef:q,onItemEnter:m.useCallback(Q=>{ae(Q)&&Q.preventDefault()},[ae]),onItemLeave:m.useCallback(Q=>{ae(Q)||(B.current?.focus(),L(null))},[ae]),onTriggerLeave:m.useCallback(Q=>{ae(Q)&&Q.preventDefault()},[ae]),pointerGraceTimerRef:W,onPointerGraceIntentChange:m.useCallback(Q=>{ee.current=Q},[]),children:l.jsx(Z,{...D,children:l.jsx(td,{asChild:!0,trapped:i,onMountAutoFocus:pe(c,Q=>{Q.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:l.jsx(Gs,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:b,onDismiss:w,children:l.jsx(xg,{asChild:!0,...T,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:L,onEntryFocus:pe(h,Q=>{C.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(_g,{role:"menu","aria-orientation":"vertical","data-state":nk(k.open),"data-radix-menu-content":"",dir:C.dir,...E,...N,ref:A,style:{outline:"none",...N.style},onKeyDown:pe(N.onKeyDown,Q=>{const O=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,z=Q.ctrlKey||Q.altKey||Q.metaKey,G=Q.key.length===1;O&&(Q.key==="Tab"&&Q.preventDefault(),!z&&G&&V(Q.key));const se=B.current;if(Q.target!==se||!P8.includes(Q.key))return;Q.preventDefault();const ge=M().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);AN.includes(Q.key)&&ge.reverse(),a9(ge)}),onBlur:pe(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(oe.current),q.current="")}),onPointerMove:pe(e.onPointerMove,gi(Q=>{const xe=Q.target,O=te.current!==Q.clientX;if(Q.currentTarget.contains(xe)&&O){const z=Q.clientX>te.current?"right":"left";re.current=z,te.current=Q.clientX}}))})})})})})})});UN.displayName=$n;var X8="MenuGroup",Zg=m.forwardRef((e,r)=>{const{__scopeMenu:a,...o}=e;return l.jsx(ve.div,{role:"group",...o,ref:r})});Zg.displayName=X8;var W8="MenuLabel",BN=m.forwardRef((e,r)=>{const{__scopeMenu:a,...o}=e;return l.jsx(ve.div,{...o,ref:r})});BN.displayName=W8;var Bu="MenuItem",w1="menu.itemSelect",Ad=m.forwardRef((e,r)=>{const{disabled:a=!1,onSelect:o,...i}=e,c=m.useRef(null),d=Ii(Bu,e.__scopeMenu),f=Xg(Bu,e.__scopeMenu),h=_e(r,c),p=m.useRef(!1),x=()=>{const y=c.current;if(!a&&y){const b=new CustomEvent(w1,{bubbles:!0,cancelable:!0});y.addEventListener(w1,w=>o?.(w),{once:!0}),og(y,b),b.defaultPrevented?p.current=!1:d.onClose()}};return l.jsx(HN,{...i,ref:h,disabled:a,onClick:pe(e.onClick,x),onPointerDown:y=>{e.onPointerDown?.(y),p.current=!0},onPointerUp:pe(e.onPointerUp,y=>{p.current||y.currentTarget?.click()}),onKeyDown:pe(e.onKeyDown,y=>{a||y.target!==y.currentTarget||f.searchRef.current!==""&&y.key===" "||Rp.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Ad.displayName=Bu;var HN=m.forwardRef((e,r)=>{const{__scopeMenu:a,disabled:o=!1,textValue:i,...c}=e,d=Xg(Bu,a),f=ON(a),h=m.useRef(null),p=_e(r,h),[x,y]=m.useState(!1),[b,w]=m.useState("");return m.useEffect(()=>{const S=h.current;S&&w((S.textContent??"").trim())},[c.children]),l.jsx(pi.ItemSlot,{scope:a,disabled:o,textValue:i??b,children:l.jsx(vg,{asChild:!0,...f,focusable:!o,children:l.jsx(ve.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:p,onPointerMove:pe(e.onPointerMove,gi(S=>{o?d.onItemLeave(S):(d.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,gi(S=>d.onItemLeave(S))),onFocus:pe(e.onFocus,()=>y(!0)),onBlur:pe(e.onBlur,()=>y(!1))})})})}),Z8="MenuCheckboxItem",FN=m.forwardRef((e,r)=>{const{checked:a=!1,onCheckedChange:o,...i}=e;return l.jsx(YN,{scope:e.__scopeMenu,checked:a,children:l.jsx(Ad,{role:"menuitemcheckbox","aria-checked":Hu(a)?"mixed":a,...i,ref:r,"data-state":e0(a),onSelect:pe(i.onSelect,()=>o?.(Hu(a)?!0:!a),{checkForDefaultPrevented:!1})})})});FN.displayName=Z8;var $N="MenuRadioGroup",[Q8,J8]=Mo($N,{value:void 0,onValueChange:()=>{}}),VN=m.forwardRef((e,r)=>{const{value:a,onValueChange:o,...i}=e,c=St(o);return l.jsx(Q8,{scope:e.__scopeMenu,value:a,onValueChange:c,children:l.jsx(Zg,{...i,ref:r})})});VN.displayName=$N;var qN="MenuRadioItem",GN=m.forwardRef((e,r)=>{const{value:a,...o}=e,i=J8(qN,e.__scopeMenu),c=a===i.value;return l.jsx(YN,{scope:e.__scopeMenu,checked:c,children:l.jsx(Ad,{role:"menuitemradio","aria-checked":c,...o,ref:r,"data-state":e0(c),onSelect:pe(o.onSelect,()=>i.onValueChange?.(a),{checkForDefaultPrevented:!1})})})});GN.displayName=qN;var Qg="MenuItemIndicator",[YN,e9]=Mo(Qg,{checked:!1}),KN=m.forwardRef((e,r)=>{const{__scopeMenu:a,forceMount:o,...i}=e,c=e9(Qg,a);return l.jsx(Bt,{present:o||Hu(c.checked)||c.checked===!0,children:l.jsx(ve.span,{...i,ref:r,"data-state":e0(c.checked)})})});KN.displayName=Qg;var t9="MenuSeparator",XN=m.forwardRef((e,r)=>{const{__scopeMenu:a,...o}=e;return l.jsx(ve.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});XN.displayName=t9;var n9="MenuArrow",WN=m.forwardRef((e,r)=>{const{__scopeMenu:a,...o}=e,i=Pi(a);return l.jsx(Mg,{...i,...o,ref:r})});WN.displayName=n9;var Jg="MenuSub",[r9,ZN]=Mo(Jg),QN=e=>{const{__scopeMenu:r,children:a,open:o=!1,onOpenChange:i}=e,c=Ga(Jg,r),d=Pi(r),[f,h]=m.useState(null),[p,x]=m.useState(null),y=St(i);return m.useEffect(()=>(c.open===!1&&y(!1),()=>y(!1)),[c.open,y]),l.jsx(gd,{...d,children:l.jsx(zN,{scope:r,open:o,onOpenChange:y,content:p,onContentChange:x,children:l.jsx(r9,{scope:r,contentId:Ut(),triggerId:Ut(),trigger:f,onTriggerChange:h,children:a})})})};QN.displayName=Jg;var si="MenuSubTrigger",JN=m.forwardRef((e,r)=>{const a=Ga(si,e.__scopeMenu),o=Ii(si,e.__scopeMenu),i=ZN(si,e.__scopeMenu),c=Xg(si,e.__scopeMenu),d=m.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=c,p={__scopeMenu:e.__scopeMenu},x=m.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);m.useEffect(()=>x,[x]),m.useEffect(()=>{const b=f.current;return()=>{window.clearTimeout(b),h(null)}},[f,h]);const y=_e(r,i.onTriggerChange);return l.jsx(Yg,{asChild:!0,...p,children:l.jsx(HN,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?i.contentId:void 0,"data-state":nk(a.open),...e,ref:y,onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,gi(b=>{c.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!a.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{a.onOpenChange(!0),x()},100))})),onPointerLeave:pe(e.onPointerLeave,gi(b=>{x();const w=a.content?.getBoundingClientRect();if(w){const S=a.content?.dataset.side,N=S==="right",k=N?-5:5,C=w[N?"left":"right"],E=w[N?"right":"left"];c.onPointerGraceIntentChange({area:[{x:b.clientX+k,y:b.clientY},{x:C,y:w.top},{x:E,y:w.top},{x:E,y:w.bottom},{x:C,y:w.bottom}],side:S}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(b),b.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,b=>{e.disabled||b.target!==b.currentTarget||c.searchRef.current!==""&&b.key===" "||I8[o.dir].includes(b.key)&&(a.onOpenChange(!0),a.content?.focus(),b.preventDefault())})})})});JN.displayName=si;var ek="MenuSubContent",tk=m.forwardRef((e,r)=>{const a=PN($n,e.__scopeMenu),{forceMount:o=a.forceMount,align:i="start",...c}=e,d=Ga($n,e.__scopeMenu),f=Ii($n,e.__scopeMenu),h=ZN(ek,e.__scopeMenu),p=m.useRef(null),x=_e(r,p);return l.jsx(pi.Provider,{scope:e.__scopeMenu,children:l.jsx(Bt,{present:o||d.open,children:l.jsx(pi.Slot,{scope:e.__scopeMenu,children:l.jsx(Wg,{id:h.contentId,"aria-labelledby":h.triggerId,...c,ref:x,align:i,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{f.isUsingKeyboardRef.current&&p.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:pe(e.onFocusOutside,y=>{y.target!==h.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,y=>{f.onClose(),y.preventDefault()}),onKeyDown:pe(e.onKeyDown,y=>{const b=y.currentTarget.contains(y.target),w=U8[f.dir].includes(y.key);b&&w&&(d.onOpenChange(!1),h.trigger?.focus(),y.preventDefault())})})})})})});tk.displayName=ek;function nk(e){return e?"open":"closed"}function Hu(e){return e==="indeterminate"}function e0(e){return Hu(e)?"indeterminate":e?"checked":"unchecked"}function a9(e){const r=document.activeElement;for(const a of e)if(a===r||(a.focus(),document.activeElement!==r))return}function o9(e,r){return e.map((a,o)=>e[(r+o)%e.length])}function s9(e,r,a){const i=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,c=a?e.indexOf(a):-1;let d=o9(e,Math.max(c,0));i.length===1&&(d=d.filter(p=>p!==a));const h=d.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return h!==a?h:void 0}function l9(e,r){const{x:a,y:o}=e;let i=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const f=r[c],h=r[d],p=f.x,x=f.y,y=h.x,b=h.y;x>o!=b>o&&a<(y-p)*(o-x)/(b-x)+p&&(i=!i)}return i}function i9(e,r){if(!r)return!1;const a={x:e.clientX,y:e.clientY};return l9(a,r)}function gi(e){return r=>r.pointerType==="mouse"?e(r):void 0}var c9=LN,u9=Yg,d9=IN,f9=UN,m9=Zg,h9=BN,p9=Ad,g9=FN,x9=VN,v9=GN,y9=KN,b9=XN,w9=WN,S9=QN,j9=JN,N9=tk,Dd="DropdownMenu",[k9]=Yt(Dd,[DN]),Zt=DN(),[C9,rk]=k9(Dd),ak=e=>{const{__scopeDropdownMenu:r,children:a,dir:o,open:i,defaultOpen:c,onOpenChange:d,modal:f=!0}=e,h=Zt(r),p=m.useRef(null),[x,y]=Cn({prop:i,defaultProp:c??!1,onChange:d,caller:Dd});return l.jsx(C9,{scope:r,triggerId:Ut(),triggerRef:p,contentId:Ut(),open:x,onOpenChange:y,onOpenToggle:m.useCallback(()=>y(b=>!b),[y]),modal:f,children:l.jsx(c9,{...h,open:x,onOpenChange:y,dir:o,modal:f,children:a})})};ak.displayName=Dd;var ok="DropdownMenuTrigger",sk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,disabled:o=!1,...i}=e,c=rk(ok,a),d=Zt(a),f=_e(r,c.triggerRef);return l.jsx(u9,{asChild:!0,...d,children:l.jsx(ve.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:f,onPointerDown:pe(e.onPointerDown,h=>{!o&&h.button===0&&h.ctrlKey===!1&&(c.onOpenToggle(),c.open||h.preventDefault())}),onKeyDown:pe(e.onKeyDown,h=>{o||(["Enter"," "].includes(h.key)&&c.onOpenToggle(),h.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})});sk.displayName=ok;var E9="DropdownMenuPortal",lk=e=>{const{__scopeDropdownMenu:r,...a}=e,o=Zt(r);return l.jsx(d9,{...o,...a})};lk.displayName=E9;var ik="DropdownMenuContent",ck=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=rk(ik,a),c=Zt(a),d=m.useRef(!1);return l.jsx(f9,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...o,ref:r,onCloseAutoFocus:pe(e.onCloseAutoFocus,f=>{d.current||i.triggerRef.current?.focus(),d.current=!1,f.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,x=h.button===2||p;(!i.modal||x)&&(d.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)"}})});ck.displayName=ik;var R9="DropdownMenuGroup",uk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(m9,{...i,...o,ref:r})});uk.displayName=R9;var T9="DropdownMenuLabel",dk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(h9,{...i,...o,ref:r})});dk.displayName=T9;var _9="DropdownMenuItem",fk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(p9,{...i,...o,ref:r})});fk.displayName=_9;var M9="DropdownMenuCheckboxItem",mk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(g9,{...i,...o,ref:r})});mk.displayName=M9;var A9="DropdownMenuRadioGroup",hk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(x9,{...i,...o,ref:r})});hk.displayName=A9;var D9="DropdownMenuRadioItem",pk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(v9,{...i,...o,ref:r})});pk.displayName=D9;var O9="DropdownMenuItemIndicator",gk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(y9,{...i,...o,ref:r})});gk.displayName=O9;var z9="DropdownMenuSeparator",xk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(b9,{...i,...o,ref:r})});xk.displayName=z9;var L9="DropdownMenuArrow",P9=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(w9,{...i,...o,ref:r})});P9.displayName=L9;var I9=e=>{const{__scopeDropdownMenu:r,children:a,open:o,onOpenChange:i,defaultOpen:c}=e,d=Zt(r),[f,h]=Cn({prop:o,defaultProp:c??!1,onChange:i,caller:"DropdownMenuSub"});return l.jsx(S9,{...d,open:f,onOpenChange:h,children:a})},U9="DropdownMenuSubTrigger",vk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(j9,{...i,...o,ref:r})});vk.displayName=U9;var B9="DropdownMenuSubContent",yk=m.forwardRef((e,r)=>{const{__scopeDropdownMenu:a,...o}=e,i=Zt(a);return l.jsx(N9,{...i,...o,ref:r,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)"}})});yk.displayName=B9;var H9=ak,F9=sk,bk=lk,$9=ck,V9=uk,q9=dk,G9=fk,Y9=mk,K9=hk,X9=pk,wk=gk,W9=xk,Z9=I9,Q9=vk,J9=yk;function eL(e,r,a){const o=new Array(e);return new Proxy(o,{get(i,c,d){if(typeof c=="string"){const f=c.charCodeAt(0);if(f>=48&&f<=57){const h=+c;if(Number.isInteger(h)&&h>=0&&h<e){let p=i[h];if(!p){const x=r[h*2];p=i[h]={index:h,key:a(h),start:x,size:r[h*2+1],end:x+r[h*2+1],lane:0}}return p}}if(c==="length")return e}return Reflect.get(i,c,d)}})}function ws(e,r,a){let o=a.initialDeps??[],i,c=!0;function d(){const f=e();return(f.length!==o.length||f.some((p,x)=>o[x]!==p))&&(o=f,i=r(...f),a?.onChange&&!(c&&a.skipInitialOnChange)&&a.onChange(i),c=!1),i}return d.updateDeps=f=>{o=f},d}function S1(e,r){if(e===void 0)throw new Error("Unexpected undefined");return e}const tL=(e,r)=>Math.abs(e-r)<1.01,nL=(e,r,a)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>r.apply(this,i),a)}};let ei;const kh=()=>{if(ei!==void 0)return ei;if(typeof navigator>"u")return ei=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return ei=!0;const e=navigator.maxTouchPoints;return ei=navigator.platform==="MacIntel"&&e!==void 0&&e>0},j1=e=>{const{offsetWidth:r,offsetHeight:a}=e;return{width:r,height:a}},rL=e=>e,aL=e=>{const r=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1)-r+1,i=new Array(o);for(let c=0;c<o;c++)i[c]=r+c;return i},oL=(e,r)=>{const a=e.scrollElement;if(!a)return;const o=e.targetWindow;if(!o)return;const i=d=>{const{width:f,height:h}=d;r({width:Math.round(f),height:Math.round(h)})};if(i(j1(a)),!o.ResizeObserver)return()=>{};const c=new o.ResizeObserver(d=>{const f=()=>{const h=d[0];if(h?.borderBoxSize){const p=h.borderBoxSize[0];if(p){i({width:p.inlineSize,height:p.blockSize});return}}i(j1(a))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(f):f()});return c.observe(a,{box:"border-box"}),()=>{c.unobserve(a)}},Fu={passive:!0},sL=typeof window>"u"?!0:"onscrollend"in window,lL=(e,r,a)=>{const o=e.scrollElement;if(!o)return;const i=e.targetWindow;if(!i)return;const c=e.options.useScrollendEvent&&sL;let d=0;const f=c?null:nL(i,()=>r(d,!1),e.options.isScrollingResetDelay),h=y=>()=>{d=a(o),f?.(),r(d,y)},p=h(!0),x=h(!1);return o.addEventListener("scroll",p,Fu),c&&o.addEventListener("scrollend",x,Fu),()=>{o.removeEventListener("scroll",p),c&&o.removeEventListener("scrollend",x)}},iL=(e,r)=>lL(e,r,a=>{const{horizontal:o,isRtl:i}=e.options;return o?a.scrollLeft*(i&&-1||1):a.scrollTop}),cL=(e,r,a)=>{if(a.options.useCachedMeasurements){const o=a.indexFromElement(e),i=a.options.getItemKey(o);return a.itemSizeCache.get(i)??a.options.estimateSize(o)}if(r?.borderBoxSize){const o=r.borderBoxSize[0];if(o)return Math.round(o[a.options.horizontal?"inlineSize":"blockSize"])}if(!r){const o=a.indexFromElement(e),i=a.options.getItemKey(o),c=a.itemSizeCache.get(i);if(c!==void 0)return c}return e[a.options.horizontal?"offsetWidth":"offsetHeight"]},uL=(e,{adjustments:r=0,behavior:a},o)=>{var i,c;(c=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||c.call(i,{[o.options.horizontal?"left":"top"]:e+r,behavior:a})},dL=uL;class fL{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var a,o,i;return((i=(o=(a=this.targetWindow)==null?void 0:a.performance)==null?void 0:o.now)==null?void 0:i.call(o))??Date.now()},this.observer=(()=>{let a=null;const o=()=>a||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:a=new this.targetWindow.ResizeObserver(i=>{i.forEach(c=>{const d=()=>{const f=c.target,h=this.indexFromElement(f);if(!f.isConnected){this.observer.unobserve(f);for(const[p,x]of this.elementsCache)if(x===f){this.elementsCache.delete(p);break}return}this.shouldMeasureDuringScroll(h)&&this.resizeItem(h,this.options.measureElement(f,c,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(d):d()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),a=null},observe:i=>{var c;return(c=o())==null?void 0:c.observe(i,{box:"border-box"})},unobserve:i=>{var c;return(c=o())==null?void 0:c.unobserve(i)}}})(),this.range=null,this.setOptions=a=>{var o,i;const c={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rL,rangeExtractor:aL,onChange:()=>{},measureElement:cL,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const b in a){const w=a[b];w!==void 0&&(c[b]=w)}const d=this.options;let f=null,h=null,p=!1;if(d!==void 0&&d.enabled&&c.enabled&&c.anchorTo==="end"&&this.scrollElement!==null){const b=d.count,w=c.count,S=this.getMeasurements(),N=b>0?((o=S[0])==null?void 0:o.key)??d.getItemKey(0):null,k=b>0?((i=S[b-1])==null?void 0:i.key)??d.getItemKey(b-1):null;if(w!==b||b>0&&w>0&&(c.getItemKey(0)!==N||c.getItemKey(w-1)!==k)){p=!0;const T=b>0?this.getVirtualItemForOffset(this.getScrollOffset())??S[0]:null;T&&(f=[T.key,this.getScrollOffset()-T.start]);const M=c.followOnAppend===!0?"auto":c.followOnAppend||null;M&&w>b&&this.isAtEnd(d.scrollEndThreshold)&&(b===0||c.getItemKey(w-1)!==k)&&(h=M)}}this.options=c,p&&(this.pendingMin=0,this.itemSizeCacheVersion++);let x=!1,y=0;if(f&&this.scrollOffset!==null){const[b,w]=f,S=this.getMeasurements(),{count:N,getItemKey:k}=this.options;let C=0;for(;C<N&&k(C)!==b;)C++;if(C<N){const E=S[C];if(E){const T=E.start+w;T!==this.scrollOffset&&(y=T-this.scrollOffset,this.scrollOffset=T,x=!0)}}}(x||h)&&(this.pendingScrollAnchor=[x?f[0]:null,x?f[1]:0,h,y])},this.notify=a=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,a)},this.maybeNotify=ws(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),a=>{this.notify(a)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(a=>a()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var a;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}if(this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((a=this.scrollElement)==null?void 0:a.window)??null,this.elementsCache.forEach(c=>{this.observer.observe(c)}),this.unsubs.push(this.options.observeElementRect(this,c=>{this.scrollRect=c,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(c,d)=>{if(d&&this._intendedScrollOffset===null&&c===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(c-this._intendedScrollOffset)<1.5&&(c=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const f=this.getScrollOffset();this.scrollDirection=d?f===c?this.scrollDirection:f<c?"forward":"backward":null,this.scrollOffset=c,this.isScrolling=d,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const c=this.scrollElement,d=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},f=()=>{this._iosTouching=!1,!(!kh()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};c.addEventListener("touchstart",d,Fu),c.addEventListener("touchend",f,Fu),this.unsubs.push(()=>{c.removeEventListener("touchstart",d),c.removeEventListener("touchend",f),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const i=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled){const[c,d,f,h]=i;c!==null&&!f&&(kh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?h!==0&&(this._iosDeferredAdjustment+=h):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),f&&this.scrollToEnd({behavior:f})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const a=this.getScrollOffset(),o=this.getMaxScrollOffset();if(a<0||a>o)return;const i=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(a,{adjustments:this.scrollAdjustments+=i,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ws(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(a,o,i,c,d,f,h,p)=>(this.prevLanes!==void 0&&this.prevLanes!==f&&(this.lanesChangedFlag=!0),this.prevLanes=f,this.pendingMin=null,{count:a,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:d,lanes:f,laneAssignmentMode:h,gap:p}),{key:!1}),this.getMeasurements=ws(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:a,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:d,lanes:f,laneAssignmentMode:h,gap:p},x)=>{const y=this.itemSizeCache;if(!d)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>a)for(const C of this.laneAssignments.keys())C>=a&&this.laneAssignments.delete(C);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(C=>{this.itemSizeCache.set(C.key,C.size)}));const b=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===a&&(this.lanesSettling=!1),f===1){const C=a*2;let E=this._flatMeasurements;if(!E||E.length<C){const _=new Float64Array(C);E&&b>0&&_.set(E.subarray(0,b*2)),E=_,this._flatMeasurements=E}let T;if(b===0)T=o+i;else{const _=b-1;T=E[_*2]+E[_*2+1]+p}for(let _=b;_<a;_++){const L=c(_),B=y.get(L),A=typeof B=="number"?B:this.options.estimateSize(_);E[_*2]=T,E[_*2+1]=A,T+=A+p}const M=eL(a,E,c);return this.measurementsCache=M,M}const w=this.measurementsCache.slice(0,b),S=new Array(f).fill(void 0),N=new Float64Array(f);let k=0;for(let C=0;C<b;C++){const E=w[C];E&&(S[E.lane]===void 0&&k++,S[E.lane]=C,N[E.lane]=E.end)}for(let C=b;C<a;C++){const E=c(C),T=this.laneAssignments.get(C);let M,_;const L=h==="estimate"||y.has(E);if(T!==void 0&&this.options.lanes>1){M=T;const q=S[M],W=q!==void 0?w[q]:void 0;_=W?W.end+p:o+i}else if(k===f){let q=0,W=N[0],ee=S[0];for(let re=1;re<f;re++){const te=N[re];(te<W||te===W&&S[re]<ee)&&(q=re,W=te,ee=S[re])}M=q,_=W+p,L&&this.laneAssignments.set(C,M)}else M=C%this.options.lanes,_=o+i,L&&this.laneAssignments.set(C,M);const B=y.get(E),A=typeof B=="number"?B:this.options.estimateSize(C),oe=_+A;w[C]={index:C,start:_,size:A,end:oe,key:E,lane:M},S[M]===void 0&&k++,S[M]=C,N[M]=oe}return this.measurementsCache=w,w},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ws(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(a,o,i,c)=>a.length===0||o===0?(this.range=null,null):(this.range=hL(a,o,i,c,c===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ws(()=>{let a=null,o=null;const i=this.calculateRange();return i&&(a=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,a,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,a,o]},(a,o,i,c,d)=>c===null||d===null?[]:a({startIndex:c,endIndex:d,overscan:o,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=a=>{const o=this.options.indexAttribute,i=a.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=a=>{var o;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((o=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:o.index);if(i!==void 0&&this.range){const c=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),d=Math.max(0,i-c),f=Math.min(this.options.count-1,i+c);return a>=d&&a<=f}return!0},this.measureElement=a=>{if(!a){this.elementsCache.forEach((d,f)=>{d.isConnected||(this.observer.unobserve(d),this.elementsCache.delete(f))});return}const o=this.indexFromElement(a),i=this.options.getItemKey(o),c=this.elementsCache.get(i);c!==a&&(c&&this.observer.unobserve(c),this.observer.observe(a),this.elementsCache.set(i,a)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(o)&&this.resizeItem(o,this.options.measureElement(a,void 0,this))},this.resizeItem=(a,o)=>{var i,c;if(a<0||a>=this.options.count)return;let d,f,h;const p=this._flatMeasurements;if(this.options.lanes===1&&p!==null)h=this.options.getItemKey(a),f=p[a*2],d=p[a*2+1];else{const b=this.measurementsCache[a];if(!b)return;h=b.key,f=b.start,d=b.size}const x=this.itemSizeCache.get(h)??d,y=o-x;if(y!==0){const b=this.options.anchorTo==="end"&&((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,w=b?this.getTotalSize():0,S=((c=this.scrollState)==null?void 0:c.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[a]??{index:a,key:h,start:f,size:d,end:f+d,lane:0},y,this):f<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(h)||this.scrollDirection!=="backward"));(this.pendingMin===null||a<this.pendingMin)&&(this.pendingMin=a),this.itemSizeCache.set(h,o),this.itemSizeCacheVersion++,b?this.applyScrollAdjustment(this.getTotalSize()-w):S&&this.applyScrollAdjustment(y),this.notify(!1)}},this.getVirtualItems=ws(()=>[this.getVirtualIndexes(),this.getMeasurements()],(a,o)=>{const i=[];for(let c=0,d=a.length;c<d;c++){const f=a[c],h=o[f];i.push(h)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=a=>{const o=this.getMeasurements();if(o.length===0)return;const i=this._flatMeasurements,c=this.options.lanes===1&&i!=null,d=Sk(0,o.length-1,c?f=>i[f*2]:f=>S1(o[f]).start,a);return S1(o[d])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const a=this.scrollElement.document.documentElement;return this.options.horizontal?a.scrollWidth-this.scrollElement.innerWidth:a.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(a=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=a,this.getOffsetForAlignment=(a,o,i=0)=>{if(!this.scrollElement)return 0;const c=this.getSize(),d=this.getScrollOffset();o==="auto"&&(o=a>=d+c?"end":"start"),o==="center"?a+=(i-c)/2:o==="end"&&(a-=c);const f=this.getMaxScrollOffset();return Math.max(Math.min(f,a),0)},this.getOffsetForIndex=(a,o="auto")=>{a=Math.max(0,Math.min(a,this.options.count-1));const i=this.getSize(),c=this.getScrollOffset(),d=this.measurementsCache[a];if(!d)return;if(o==="auto")if(d.end>=c+i-this.options.scrollPaddingEnd)o="end";else if(d.start<=c+this.options.scrollPaddingStart)o="start";else return[c,o];if(o==="end"&&a===this.options.count-1)return[this.getMaxScrollOffset(),o];const f=o==="end"?d.end+this.options.scrollPaddingEnd:d.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(f,o,d.size),o]},this.scrollToOffset=(a,{align:o="start",behavior:i="auto"}={})=>{const c=this.getOffsetForAlignment(a,o),d=this.now();this.scrollState={index:null,align:o,behavior:i,startedAt:d,lastTargetOffset:c,stableFrames:0},this._scrollToOffset(c,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(a,{align:o="auto",behavior:i="auto"}={})=>{a=Math.max(0,Math.min(a,this.options.count-1));const c=this.getOffsetForIndex(a,o);if(!c)return;const[d,f]=c,h=this.now();this.scrollState={index:a,align:f,behavior:i,startedAt:h,lastTargetOffset:d,stableFrames:0},this._scrollToOffset(d,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(a,{behavior:o="auto"}={})=>{const i=this.getScrollOffset()+a,c=this.now();this.scrollState={index:null,align:"start",behavior:o,startedAt:c,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:a="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:a});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:a})},this.getTotalSize=()=>{var a;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1){const c=o.length-1,d=this._flatMeasurements;d!=null?i=d[c*2]+d[c*2+1]:i=((a=o[c])==null?void 0:a.end)??0}else{const c=Array(this.options.lanes).fill(null);let d=o.length-1;for(;d>=0&&c.some(f=>f===null);){const f=o[d];c[f.lane]===null&&(c[f.lane]=f.end),d--}i=Math.max(...c.filter(f=>f!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const a=[];if(this.itemSizeCache.size===0)return a;const o=this.getMeasurements();for(const i of o)i&&this.itemSizeCache.has(i.key)&&a.push({index:i.index,key:i.key,start:i.start,size:i.size,end:i.end,lane:i.lane});return a},this._scrollToOffset=(a,{adjustments:o,behavior:i})=>{this._intendedScrollOffset=a+(o??0),this.options.scrollToFn(a,{behavior:i,adjustments:o},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(r)}applyScrollAdjustment(r,a){r!==0&&(kh()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=r:(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:a}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollAdjustments=0)))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const o=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=o?o[0]:this.scrollState.lastTargetOffset,c=1,d=i!==this.scrollState.lastTargetOffset;if(!d&&tL(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=c){this.getScrollOffset()!==i&&this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,d){const f=this.getSize()||600,h=Math.abs(i-this.getScrollOffset()),p=this.scrollState.behavior==="smooth"&&h>f;this.scrollState.lastTargetOffset=i,p||(this.scrollState.behavior="auto"),this._scrollToOffset(i,{adjustments:void 0,behavior:p?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Sk=(e,r,a,o)=>{for(;e<=r;){const i=(e+r)/2|0,c=a(i);if(c<o)e=i+1;else if(c>o)r=i-1;else return i}return e>0?e-1:0};function mL(e,r,a){let o=0;for(;o<=r;){const i=(o+r)/2|0,c=e[i*2];if(c<a)o=i+1;else if(c>a)r=i-1;else return i}return o>0?o-1:0}function hL(e,r,a,o,i){const c=e.length-1;if(e.length<=o)return{startIndex:0,endIndex:c};if(o===1&&i!==null){const p=mL(i,c,a);let x=p;const y=a+r;for(;x<c&&i[x*2]+i[x*2+1]<y;)x++;return{startIndex:p,endIndex:x}}let f=Sk(0,c,p=>e[p].start,a),h=f;if(o===1)for(;h<c&&e[h].end<a+r;)h++;else if(o>1){const p=Array(o).fill(0);for(;h<c&&p.some(y=>y<a+r);){const y=e[h];p[y.lane]=y.end,h++}const x=Array(o).fill(a+r);for(;f>=0&&x.some(y=>y>=a);){const y=e[f];x[y.lane]=y.start,f--}f=Math.max(0,f-f%o),h=Math.min(c,h+(o-1-h%o))}return{startIndex:f,endIndex:h}}const Ch=typeof document<"u"?m.useLayoutEffect:m.useEffect;function pL({useFlushSync:e=!0,directDomUpdates:r=!1,directDomUpdatesMode:a="transform",...o}){const i=m.useReducer(p=>p+1,0)[1],c=m.useRef({enabled:r,mode:a,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});c.current.enabled=r,c.current.mode=a;const d=p=>{const x=c.current;if(!x.enabled||!x.container)return;const y=p.getTotalSize();if(y!==x.lastSize){x.lastSize=y;const C=p.options.horizontal?"width":"height";x.container.style[C]=`${y}px`}const b=!!p.options.horizontal,w=x.mode==="transform",S=b?"left":"top",N=p.options.scrollMargin,k=p.getVirtualItems();for(const C of k){const E=C.start-N,T=p.elementsCache.get(C.key);T&&x.lastPositions.get(T)!==E&&(x.lastPositions.set(T,E),w?T.style.transform=b?`translate3d(${E}px, 0, 0)`:`translate3d(0, ${E}px, 0)`:T.style[S]=`${E}px`)}},f={...o,onChange:(p,x)=>{var y;const b=c.current;let w=!0;if(b.enabled){d(p);const S=p.range,N=b.prevRange;w=!N||N.isScrolling!==p.isScrolling||N.startIndex!==S?.startIndex||N.endIndex!==S?.endIndex,w&&(b.prevRange=S?{startIndex:S.startIndex,endIndex:S.endIndex,isScrolling:p.isScrolling}:null)}w&&(e&&x?Ro.flushSync(i):i()),(y=o.onChange)==null||y.call(o,p,x)}},[h]=m.useState(()=>{const p=new fL(f);return Object.assign(p,{containerRef:x=>{const y=c.current;if(y.container=x,y.lastSize=null,x&&y.enabled){const b=p.getTotalSize();y.lastSize=b;const w=p.options.horizontal?"width":"height";x.style[w]=`${b}px`}}})});return h.setOptions(f),Ch(()=>h._didMount(),[]),Ch(()=>h._willUpdate()),Ch(()=>{d(h)}),h}function gL(e){return pL({observeElementRect:oL,observeElementOffset:iL,scrollToFn:dL,...e})}var xL=V2({extend:{classGroups:{"font-size":[{text:["display-2xl","display-xl","display-lg","display-md"]},{text:["headline","title-lg","title-md"]},{text:["body-lg","body-md","body-sm"]},{text:["label","label-caps"]},{text:["code-md","code-sm"]}]}}});function F(...e){return xL(Wp(e))}var vL=wr(["inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg","font-medium font-sans tracking-tight","transition-[box-shadow,background-color,color,transform] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","cursor-pointer disabled:cursor-default aria-disabled:cursor-default","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"],{variants:{variant:{primary:["bg-primary text-primary-foreground","hover:bg-primary hover:shadow-glow","active:scale-[0.98] active:bg-primary-deep active:shadow-none"],secondary:["border border-border bg-secondary text-secondary-foreground","hover:bg-muted","active:scale-[0.98]"],accent:["bg-accent text-accent-foreground","hover:bg-accent-deep","active:scale-[0.98]"],ghost:["bg-transparent text-foreground","hover:bg-muted","active:scale-[0.98] active:bg-secondary"],link:["bg-transparent text-primary underline-offset-4","hover:text-primary-deep hover:underline","h-auto p-0"],destructive:["bg-destructive text-destructive-foreground","hover:bg-destructive/90","active:scale-[0.98]"]},size:{sm:"h-8 px-3 text-body-sm",md:"h-[var(--theo-control-h,2.25rem)] px-[var(--theo-control-px,0.875rem)] text-body-sm",lg:"h-11 px-4 text-body-md",icon:"h-[var(--theo-control-h,2.25rem)] w-[var(--theo-control-h,2.25rem)] p-0"}},defaultVariants:{variant:"primary",size:"md"}}),He=m.forwardRef(({className:e,variant:r,size:a,asChild:o=!1,type:i,...c},d)=>{const f=o?Qp:"button";return l.jsx(f,{"data-slot":"button","data-variant":r,"data-size":a,ref:d,type:o?void 0:i??"button",className:F(vL({variant:r,size:a}),e),...c})});He.displayName="Button";var yL=wr(["inline-flex items-center gap-1.5 rounded-full border","font-sans uppercase tracking-wider","transition-colors"],{variants:{variant:{default:"border-border/40 bg-muted text-muted-foreground",primary:"border-primary/30 bg-primary/10 text-primary",accent:"border-accent/40 bg-accent/15 text-accent",success:"border-success/40 bg-success/15 text-success",warning:"border-warning/40 bg-warning/15 text-warning",destructive:"border-destructive/40 bg-destructive/15 text-destructive",outline:"border-border bg-transparent text-foreground"},size:{sm:"px-2 py-0.5 text-label-caps",md:"px-2.5 py-0.5 text-label",lg:"px-3 py-1 text-body-md"}},defaultVariants:{variant:"default",size:"md"}}),jk=m.forwardRef(({className:e,variant:r,size:a,...o},i)=>l.jsx("span",{"data-slot":"badge","data-variant":r,"data-size":a,ref:i,className:F(yL({variant:r,size:a}),e),...o}));jk.displayName="Badge";var bL={primary:"bg-primary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive",muted:"bg-muted-foreground"},Nk=m.forwardRef(({className:e,pulse:r=!1,tone:a="success",...o},i)=>l.jsx("span",{"data-slot":"badge-dot",ref:i,"aria-hidden":"true",className:F("inline-block size-1.5 rounded-full",bL[a],r&&"animate-pulse-glow",e),...o}));Nk.displayName="Badge.Dot";var nt=jk;nt.Dot=Nk;var wL=[/^javascript:/i,/^vbscript:/i,/^data:text\/html/i];function t0(e){if(e==null)return;const r=e.trim();if(r.length!==0){for(const a of wL)if(a.test(r))return;return e}}function Ui(e,r,a,o,i,c){const d=m.forwardRef(({className:f,children:h,...p},x)=>m.createElement(e,{"data-slot":r,ref:x,...i,className:F(o,f),...p},h??c));return d.displayName=a,d}var kk=m.forwardRef((e,r)=>l.jsx("nav",{"data-slot":"breadcrumb",ref:r,"aria-label":"breadcrumb",...e}));kk.displayName="Breadcrumb";var SL=Ui("ol","breadcrumb-list","Breadcrumb.List","flex flex-wrap items-center gap-1.5 break-words text-body-sm text-muted-foreground sm:gap-2.5"),jL=Ui("li","breadcrumb-item","Breadcrumb.Item","inline-flex items-center gap-1.5"),Ck=m.forwardRef(({asChild:e,className:r,href:a,...o},i)=>{const c=e?Qp:"a";return l.jsx(c,{"data-slot":"breadcrumb-link",ref:i,className:F("transition-colors hover:text-foreground",r),href:e?a:t0(a),...o})});Ck.displayName="Breadcrumb.Link";var NL=Ui("span","breadcrumb-page","Breadcrumb.Page","font-normal text-foreground",{role:"link","aria-disabled":"true","aria-current":"page"}),kL=Ui("li","breadcrumb-separator","Breadcrumb.Separator","[&>svg]:size-3.5",{role:"presentation","aria-hidden":"true"},l.jsx(Jr,{})),CL=Ui("span","breadcrumb-ellipsis","Breadcrumb.Ellipsis","flex size-9 items-center justify-center",{role:"presentation","aria-hidden":"true"},l.jsxs(l.Fragment,{children:[l.jsx(J2,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"More"})]})),Ss=Object.assign(kk,{List:SL,Item:jL,Link:Ck,Page:NL,Separator:kL,Ellipsis:CL});function n0(e,r,a,o){const i=m.forwardRef(({className:c,children:d,...f},h)=>m.createElement(e,{"data-slot":r,ref:h,className:F(o,c),...f},d));return i.displayName=a,i}var Ek=m.forwardRef(({className:e,layout:r="vertical",dense:a,...o},i)=>l.jsx("dl",{"data-slot":"description-list","data-layout":r,"data-dense":a?"true":void 0,ref:i,className:F("text-body-sm",r==="vertical"&&(a?"grid gap-2":"grid gap-4"),r==="horizontal"&&"grid grid-cols-[max-content_1fr] items-baseline [&>div]:contents [&_dd]:col-start-2",r==="horizontal"&&(a?"gap-x-4 gap-y-1.5":"gap-x-6 gap-y-3"),e),...o}));Ek.displayName="DescriptionList";var EL=n0("div","description-list-item","DescriptionList.Item","grid gap-1"),RL=n0("dt","description-list-term","DescriptionList.Term","font-medium text-muted-foreground"),TL=n0("dd","description-list-detail","DescriptionList.Detail","m-0 text-foreground"),ho=Object.assign(Ek,{Item:EL,Term:RL,Detail:TL}),_L={ghost:"hover:bg-muted",outline:"border border-border/60 rounded-md"},ML={sm:"px-2 py-1 text-label",md:"px-2.5 py-1.5 text-body-sm"},r0=m.forwardRef(({className:e,value:r,label:a,variant:o="ghost",size:i="sm",onCopied:c,feedbackDuration:d=1500,...f},h)=>{const[p,x]=m.useState("idle"),y=m.useRef(null);m.useEffect(()=>()=>{y.current!==null&&clearTimeout(y.current)},[]);const b=m.useCallback(()=>{y.current!==null&&clearTimeout(y.current),y.current=setTimeout(()=>{x("idle"),y.current=null},d)},[d]),w=m.useCallback(()=>{if(p==="idle"){if(typeof navigator>"u"||!navigator.clipboard?.writeText){x("failed"),b();return}navigator.clipboard.writeText(r).then(()=>{x("copied"),c?.(r),b()},()=>{x("failed"),b()})}},[p,r,c,b]),S=p==="copied"?Rn:p==="failed"?Gn:Qu,N=p==="copied"?"Copied to clipboard":p==="failed"?"Copy failed":"",k=a!==void 0?p==="copied"?"Copied!":p==="failed"?"Failed":a:null;return l.jsxs("button",{"data-slot":"copy-button",ref:h,type:"button",onClick:w,"data-state":p,className:F("inline-flex items-center gap-1.5","font-sans transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",_L[o],ML[i],e),...f,children:[l.jsx(S,{"aria-hidden":"true",className:F("size-3.5 shrink-0 transition-opacity duration-200",p==="copied"&&"text-success",p==="failed"&&"text-destructive")}),k!==null?l.jsx("span",{children:k}):null,l.jsx("span",{className:"sr-only","aria-live":"polite",children:N})]})});r0.displayName="CopyButton";var AL="",DL={has:()=>!1};function Eh(e){return typeof e=="object"&&e!==null&&!(e instanceof Date)}function OL(e){const r=new WeakSet;return JSON.stringify(e,(a,o)=>{if(typeof o=="bigint")return`${o}n`;if(typeof o=="object"&&o!==null){if(r.has(o))return"[Circular]";r.add(o)}return o},2)}function zL(e,r){return r===!0?!1:typeof r=="number"?e<r:!0}function LL({value:e,shortenAfter:r}){const[a,o]=m.useState(!1);if(typeof e=="string"){const d=!a&&e.length>r,f=d?`${e.slice(0,r)}…`:`"${e}"`;return l.jsx("span",{"data-slot":"json-viewer-value","data-type":"string",className:F("text-success",d&&"cursor-pointer underline decoration-dotted"),onClick:d?()=>o(!0):void 0,onKeyDown:d?h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o(!0))}:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:f})}let i,c=typeof e;return typeof e=="bigint"?i=`${e}n`:e===null?(i="null",c="null"):e===void 0?i="undefined":typeof e=="function"?i="ƒ":e instanceof Date?(i=e.toISOString(),c="date"):i=String(e),l.jsx("span",{"data-slot":"json-viewer-value","data-type":c,className:"text-info",children:i})}function Rk(e){const{nodeKey:r,value:a,path:o,depth:i,ancestors:c,viewer:d,expandedOverrides:f,onToggle:h}=e,p=m.useMemo(()=>d.enableCopy&&Eh(a)?OL(a):"",[a,d.enableCopy]),x=r!==void 0?l.jsxs("span",{className:"text-muted-foreground",children:[l.jsx("span",{"data-slot":"json-viewer-key",children:r===""?'""':r}),":"]}):null;if(Eh(a)&&c.has(a))return l.jsxs("li",{"data-slot":"json-viewer-node",className:"flex items-baseline gap-1.5",children:[x,l.jsx("span",{"data-slot":"json-viewer-value","data-type":"circular",className:"text-warning",children:"[Circular]"})]});if(!Eh(a))return l.jsxs("li",{"data-slot":"json-viewer-node",className:"flex items-baseline gap-1.5",children:[x,l.jsx(LL,{value:a,shortenAfter:d.shortenTextAfterLength})]});const y=Array.isArray(a),b=y?a.map((N,k)=>[String(k),N]):Object.entries(a);if(b.length===0)return l.jsxs("li",{"data-slot":"json-viewer-node",className:"flex items-baseline gap-1.5",children:[x,l.jsx("span",{"data-slot":"json-viewer-value","data-type":y?"array":"object",children:y?"[]":"{}"})]});const w=f.get(o)??zL(i,d.collapsed),S=y?`[${b.length}]`:`{${b.length}}`;return l.jsxs("li",{"data-slot":"json-viewer-node",children:[l.jsxs("span",{className:"group/node flex items-baseline gap-1.5",children:[l.jsx("button",{type:"button","data-slot":"json-viewer-toggle","aria-expanded":w,"aria-label":`Toggle ${r??"root"}`,onClick:()=>h(o,!w),className:"inline-flex size-4 shrink-0 translate-y-0.5 items-center justify-center rounded text-muted-foreground hover:text-foreground",children:l.jsx(Jr,{"aria-hidden":!0,className:F("size-3.5 transition-transform",w&&"rotate-90")})}),x,!w&&l.jsx("span",{className:"text-muted-foreground",children:S}),d.enableCopy&&l.jsx("span",{"data-slot":"json-viewer-copy",className:"opacity-0 transition-opacity group-focus-within/node:opacity-100 group-hover/node:opacity-100",children:l.jsx(r0,{value:p,"aria-label":`Copy ${r??"JSON"}`})})]}),w&&l.jsx("ul",{className:"m-0 grid list-none gap-0.5 border-border/40 border-l pl-4",children:b.map(([N,k])=>l.jsx(Rk,{nodeKey:N,value:k,path:o+AL+N,depth:i+1,ancestors:{has:C=>C===a||c.has(C)},viewer:d,expandedOverrides:f,onToggle:h},N))})]})}var Tk=m.forwardRef(({value:e,collapsed:r,shortenTextAfterLength:a=60,enableCopy:o=!1,className:i,...c},d)=>{const[f,h]=m.useState(new Map),p=(x,y)=>{h(b=>new Map(b).set(x,y))};return l.jsx("div",{"data-slot":"json-viewer",ref:d,className:F("font-mono text-code-sm",i),...c,children:l.jsx("ul",{className:"m-0 grid list-none gap-0.5 p-0",children:l.jsx(Rk,{value:e,path:"$",depth:0,ancestors:DL,viewer:{collapsed:r,shortenTextAfterLength:a,enableCopy:o},expandedOverrides:f,onToggle:p})})})});Tk.displayName="JsonViewer";var _k=wr(["flex w-full rounded-md border border-input bg-card","text-foreground placeholder:text-muted-foreground","transition-[box-shadow,border-color] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","focus-visible:border-primary","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium file:text-body-sm"],{variants:{size:{sm:"h-8 px-2.5 py-1 text-body-sm",md:"h-[var(--theo-control-h,2.25rem)] px-[var(--theo-control-px,0.875rem)] py-1.5 text-body-sm",lg:"h-11 px-4 py-2.5 text-body-md"}},defaultVariants:{size:"md"}}),ko=m.forwardRef(({className:e,type:r="text",size:a,...o},i)=>l.jsx("input",{"data-slot":"input","data-size":a,ref:i,type:r,className:F(_k({size:a}),e),...o}));ko.displayName="Input";var Mk=m.createContext(null);function Ak(e,r){return a=>{e.current=a,typeof r=="function"?r(a):r&&(r.current=a)}}function a0(e){const r=m.useContext(Mk);if(!r)throw new Error(`<Combobox.${e}> must be used inside <Combobox>`);return r}var Dk=m.forwardRef(({className:e,children:r,value:a,onValueChange:o,open:i,defaultOpen:c=!1,onOpenChange:d,shouldFilter:f=!0,"aria-label":h,...p},x)=>{const[y,b]=m.useState(c),w=i??y,S=m.useRef(null),N=m.useId(),k=m.useCallback(E=>{b(E),d?.(E)},[d]),C=m.useCallback(E=>{o?.(E),k(!1)},[o,k]);return m.useEffect(()=>{if(!w)return;const E=T=>{S.current&&!S.current.contains(T.target)&&k(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[w,k]),l.jsx(Mk.Provider,{value:{open:w,setOpen:k,value:a,select:C,listId:N},children:l.jsx("div",{"data-slot":"combobox",ref:Ak(S,x),className:F("relative w-full",e),...p,children:l.jsx(Ri,{label:h,shouldFilter:f,children:r})})})});Dk.displayName="Combobox";var Ok=m.forwardRef(({className:e,onFocus:r,onKeyDown:a,onValueChange:o,...i},c)=>{const{open:d,setOpen:f,listId:h}=a0("Input"),p=m.useRef(null);return m.useEffect(()=>{const x=p.current;x&&(x.setAttribute("aria-expanded",String(d)),d?x.setAttribute("aria-controls",h):x.removeAttribute("aria-controls"))}),l.jsx(Ri.Input,{"data-slot":"combobox-input",ref:Ak(p,c),className:F(_k({size:"md"}),e),onFocus:x=>{f(!0),r?.(x)},onKeyDown:x=>{x.key==="Escape"&&f(!1),a?.(x)},onValueChange:x=>{d||f(!0),o?.(x)},...i})});Ok.displayName="Combobox.Input";var zk=m.forwardRef(({className:e,children:r,loading:a,...o},i)=>{const{open:c,listId:d}=a0("Content"),f=Wr(p=>p.filtered.count),h=m.useRef(null);return m.useEffect(()=>{const p=h.current;p&&(p.setAttribute("id",d),f===0?(p.setAttribute("role","presentation"),p.removeAttribute("aria-label")):(p.setAttribute("role","listbox"),p.getAttribute("aria-label")||p.setAttribute("aria-label","Suggestions")))}),c?l.jsx("div",{"data-slot":"combobox-content",ref:i,className:F("absolute top-full z-50 mt-1 w-full rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-md",e),...o,children:a?l.jsxs("div",{"data-slot":"combobox-loading",id:d,"aria-busy":"true",className:"flex items-center justify-center gap-2 px-3 py-6 text-body-sm text-muted-foreground",children:[l.jsx(qs,{"aria-hidden":!0,className:"size-4 animate-spin"}),"Loading…"]}):l.jsx(Ri.List,{ref:h,className:"max-h-64 overflow-y-auto",children:r})}):null});zk.displayName="Combobox.Content";var Lk=m.forwardRef(({className:e,children:r,value:a,onSelect:o,...i},c)=>{const d=a0("Item"),f=a!==void 0&&d.value===a;return l.jsxs(Ri.Item,{"data-slot":"combobox-item","data-selected-value":f?"true":void 0,ref:c,value:a,onSelect:h=>{d.select(h),o?.(h)},className:F("flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-body-sm","data-[selected=true]:bg-accent/10 data-[selected=true]:text-foreground",e),...i,children:[r,l.jsx(Rn,{"aria-hidden":!0,className:F("ml-auto size-4",f?"opacity-100":"opacity-0")})]})});Lk.displayName="Combobox.Item";var Pk=m.forwardRef(({className:e,...r},a)=>l.jsx(Ri.Empty,{"data-slot":"combobox-empty",ref:a,className:F("px-3 py-6 text-center text-body-sm text-muted-foreground",e),...r}));Pk.displayName="Combobox.Empty";var hu=Object.assign(Dk,{Input:Ok,Content:zk,Item:Lk,Empty:Pk}),Tp=m.forwardRef(({className:e,defaultValue:r,value:a,min:o=0,max:i=100,marks:c,disabled:d,onValueChange:f,"aria-label":h,"aria-labelledby":p,...x},y)=>{const b=M=>M?.map(_=>Math.min(Math.max(_,o),i)),[w,S]=m.useState(b(r)),N=b(a)??w,k=m.useMemo(()=>Array.isArray(a)?a.length:Array.isArray(r)?r.length:1,[a,r]),C=i-o||1,E=(c??[]).filter(M=>M.value>=o&&M.value<=i),T=k>1;return l.jsxs("div",{"data-slot":"slider",className:F("relative w-full",E.length>0&&"pb-5"),children:[l.jsxs(Uw,{ref:y,"data-slot":"slider-root",value:N,min:o,max:i,disabled:d,onValueChange:M=>{a===void 0&&S(M),f?.(M)},className:F("relative flex w-full touch-none select-none items-center","data-[disabled]:opacity-50","data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...x,children:[l.jsx(Vw,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-1.5",children:l.jsx(qw,{"data-slot":"slider-range",className:"absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"})}),Array.from({length:k},(M,_)=>l.jsx(Zw,{"aria-label":T&&h?`${h} (${_+1} of ${k})`:h,"aria-labelledby":p,"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm transition-[box-shadow] hover:ring-4 hover:ring-ring/50 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50"},_))]}),E.map(M=>l.jsx("button",{type:"button","data-slot":"slider-mark",disabled:d,tabIndex:-1,"aria-hidden":"true",style:{left:`${(M.value-o)/C*100}%`},className:"-translate-x-1/2 absolute top-4 cursor-pointer text-body-sm text-muted-foreground disabled:cursor-default",onClick:()=>{d||T||(a===void 0&&S([M.value]),f?.([M.value]))},children:M.label??M.value},M.value))]})});Tp.displayName="Slider";var PL=m.forwardRef(({currentVersion:e,latestVersion:r,onUpdate:a,onDismiss:o,severity:i="info",className:c,"data-testid":d,...f},h)=>l.jsxs("div",{"data-slot":"update-banner",ref:h,role:"alert","aria-live":"polite",className:F("flex items-center justify-between gap-3 border-b px-4 py-2 text-sm",i==="warn"?"border-warning/40 bg-warning/10 text-warning":"border-primary/40 bg-primary/10 text-primary",c),"data-testid":d??"update-banner","data-severity":i,...f,children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(AM,{className:"size-4","aria-hidden":!0}),l.jsxs("span",{children:["Update available: ",l.jsxs("strong",{"data-testid":"update-banner-latest",children:["v",r]})," ","(running ",l.jsxs("span",{"data-testid":"update-banner-current",children:["v",e]}),")."]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:a,className:"rounded-md border border-current px-2 py-1 font-medium text-xs hover:bg-current/10","data-testid":"update-banner-update-button",children:"Update now"}),o!==void 0&&l.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1 hover:bg-current/10","aria-label":"Dismiss update banner","data-testid":"update-banner-dismiss",children:l.jsx(Gn,{className:"size-4","aria-hidden":!0})})]})]}));PL.displayName="UpdateBanner";var Ik=m.createContext({size:"md"}),Od=()=>m.useContext(Ik).size,Uk=m.forwardRef(({className:e,size:r="md",...a},o)=>l.jsx(Ik.Provider,{value:{size:r},children:l.jsx("div",{"data-slot":"card",ref:o,className:F("rounded-xl border border-border bg-card text-card-foreground shadow-md","transition-shadow duration-base ease-out-soft",e),...a})}));Uk.displayName="Card";var IL={sm:"gap-1 p-3 pb-1.5",md:"gap-1.5 p-5 pb-2.5",lg:"gap-2 p-6 pb-3"},Bk=m.forwardRef(({className:e,...r},a)=>{const o=Od();return l.jsx("div",{"data-slot":"card-header",ref:a,className:F("flex flex-col",IL[o],e),...r})});Bk.displayName="Card.Header";var UL={sm:"text-title-md",md:"text-title-lg",lg:"text-headline"},Hk=m.forwardRef(({className:e,asChild:r=!1,...a},o)=>{const i=r?Qp:"h3",c=Od();return l.jsx(i,{"data-slot":"card-title",ref:o,className:F("font-display text-foreground tracking-tight",UL[c],e),...a})});Hk.displayName="Card.Title";var Fk=m.forwardRef(({className:e,...r},a)=>l.jsx("p",{"data-slot":"card-description",ref:a,className:F("text-body-sm text-muted-foreground",e),...r}));Fk.displayName="Card.Description";var BL={sm:"p-3 pt-1.5",md:"p-5 pt-2.5",lg:"p-6 pt-3"},$k=m.forwardRef(({className:e,...r},a)=>{const o=Od();return l.jsx("div",{"data-slot":"card-body",ref:a,className:F(BL[o],e),...r})});$k.displayName="Card.Body";var HL={sm:"gap-2 p-3 pt-2",md:"gap-3 p-5 pt-3",lg:"gap-4 p-6 pt-4"},Vk=m.forwardRef(({className:e,...r},a)=>{const o=Od();return l.jsx("div",{"data-slot":"card-footer",ref:a,className:F("flex items-center border-border/40 border-t",HL[o],e),...r})});Vk.displayName="Card.Footer";var _p=Object.assign(Uk,{Header:Bk,Title:Hk,Description:Fk,Body:$k,Footer:Vk}),o0=m.forwardRef(({className:e,...r},a)=>l.jsx(ld,{"data-slot":"dialog-overlay",ref:a,className:F("fixed inset-0 z-50 bg-background/80","data-[state=open]:fade-in-0 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:animate-out",e),...r}));o0.displayName="Dialog.Overlay";var qk=m.forwardRef(({className:e,children:r,hideCloseButton:a,...o},i)=>l.jsxs(sd,{children:[l.jsx(o0,{}),l.jsxs(id,{"data-slot":"dialog-content",ref:i,className:F("-translate-x-1/2 -translate-y-1/2 fixed top-1/2 left-1/2 z-50 w-full max-w-lg","rounded-2xl border border-border bg-card text-card-foreground shadow-lg","data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out","duration-base",e),...o,children:[r,a?null:l.jsxs(Ci,{className:F("absolute top-4 right-4 rounded-md p-1 opacity-70","transition-opacity hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","disabled:pointer-events-none"),children:[l.jsx(Gn,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));qk.displayName="Dialog.Content";var Gk=({className:e,...r})=>l.jsx("div",{className:F("flex flex-col gap-1.5 p-6 pb-3 text-left",e),...r});Gk.displayName="Dialog.Header";var Yk=({className:e,...r})=>l.jsx("div",{className:F("px-6 pb-6 text-body-md text-muted-foreground",e),...r});Yk.displayName="Dialog.Body";var Kk=({className:e,...r})=>l.jsx("div",{className:F("flex flex-col-reverse gap-2 p-6 pt-3 sm:flex-row sm:justify-end",e),...r});Kk.displayName="Dialog.Footer";var Xk=m.forwardRef(({className:e,...r},a)=>l.jsx(dg,{"data-slot":"dialog-title",ref:a,className:F("font-display text-foreground text-title-lg tracking-tight",e),...r}));Xk.displayName="Dialog.Title";var Wk=m.forwardRef(({className:e,...r},a)=>l.jsx(fg,{"data-slot":"dialog-description",ref:a,className:F("text-body-sm text-muted-foreground",e),...r}));Wk.displayName="Dialog.Description";var po=Object.assign(od,{Trigger:cg,Close:Ci,Content:qk,Overlay:o0,Header:Gk,Body:Yk,Footer:Kk,Title:Xk,Description:Wk}),FL=m.forwardRef(({className:e,...r},a)=>l.jsx(gO,{"data-slot":"tabs-list",ref:a,className:F("inline-flex h-10 items-center border-border/40 border-b text-muted-foreground",e),...r}));FL.displayName="Tabs.List";var $L=m.forwardRef(({className:e,...r},a)=>l.jsx(xO,{"data-slot":"tabs-trigger",ref:a,className:F("relative inline-flex h-10 items-center justify-center whitespace-nowrap px-4","font-medium font-sans text-body-sm text-muted-foreground","transition-colors duration-base ease-out-soft","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:text-foreground","data-[state=active]:shadow-[inset_0_-2px_0_0_hsl(var(--primary))]",e),...r}));$L.displayName="Tabs.Trigger";var VL=m.forwardRef(({className:e,...r},a)=>l.jsx(vO,{"data-slot":"tabs-content",ref:a,className:F("mt-4 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...r}));VL.displayName="Tabs.Content";var qL=m.forwardRef(({className:e,sideOffset:r=6,...a},o)=>l.jsx(Jz,{children:l.jsx(e7,{"data-slot":"tooltip-content",ref:o,sideOffset:r,className:F("z-50 overflow-hidden rounded-md border border-border/40 bg-foreground px-2.5 py-1.5","text-background text-body-sm shadow-md","data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out","data-[side=top]:slide-in-from-bottom-1 data-[side=bottom]:slide-in-from-top-1","data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1",e),...a})}));qL.displayName="Tooltip.Content";var GL=m.forwardRef(({className:e,children:r,orientation:a="vertical",size:o="thin",type:i="hover",...c},d)=>l.jsxs(m7,{"data-slot":"scroll-area",ref:d,type:i,className:F("relative overflow-hidden",e),...c,children:[l.jsx(h7,{className:F("h-full w-full rounded-[inherit]","[&>div]:!block"),children:r}),a==="vertical"||a==="both"?l.jsx(Mp,{orientation:"vertical",size:o}):null,a==="horizontal"||a==="both"?l.jsx(Mp,{orientation:"horizontal",size:o}):null,l.jsx(p7,{className:"bg-transparent"})]}));GL.displayName="ScrollArea";var Mp=m.forwardRef(({className:e,orientation:r="vertical",size:a="thin",...o},i)=>l.jsx(YS,{"data-slot":"scroll-area-bar",ref:i,orientation:r,className:F("z-10 flex touch-none select-none p-0.5 transition-[width,height,background-color] duration-base ease-out-soft","hover:bg-primary/5",r==="vertical"&&(a==="thin"?"h-full w-2.5 border-l border-l-transparent":"h-full w-3 border-l border-l-transparent"),r==="horizontal"&&(a==="thin"?"h-2.5 w-full flex-col border-t border-t-transparent":"h-3 w-full flex-col border-t border-t-transparent"),e),...o,children:l.jsx(ZS,{className:F("relative flex-1 rounded-full bg-primary/30","transition-[background-color,box-shadow] duration-fast ease-out-soft","hover:bg-primary/55 hover:shadow-[0_0_8px_hsl(var(--primary)/0.35)]","active:bg-primary/75 data-[state=visible]:bg-primary/45")})}));Mp.displayName="ScrollArea.Bar";var YL=wr(["group pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-lg border pr-10 shadow-md","data-[state=open]:slide-in-from-top-full data-[state=open]:fade-in-0 data-[state=open]:animate-in","data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=closed]:animate-out","data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]","data-[swipe=end]:animate-out data-[swipe=cancel]:transition-[transform_var(--duration-base)] data-[swipe=move]:transition-none"],{variants:{variant:{default:"border-border/40 bg-popover text-popover-foreground",info:"border-primary/40 bg-popover text-popover-foreground",success:"border-success/40 bg-popover text-popover-foreground",warning:"border-warning/40 bg-popover text-popover-foreground",destructive:"border-destructive/50 bg-popover text-popover-foreground"},size:{sm:"p-3 text-body-sm",md:"p-4 text-body-md",lg:"p-5 text-body-lg"}},defaultVariants:{variant:"default",size:"md"}}),KL={default:l.jsx(cp,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),info:l.jsx(cp,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"}),success:l.jsx(X2,{className:"size-4 shrink-0 text-success","aria-hidden":"true"}),warning:l.jsx(cw,{className:"size-4 shrink-0 text-warning","aria-hidden":"true"}),destructive:l.jsx(Ni,{className:"size-4 shrink-0 text-destructive","aria-hidden":"true"})},Zk=m.forwardRef(({className:e,variant:r="default",size:a,children:o,...i},c)=>l.jsxs(z7,{"data-slot":"toast","data-variant":r,"data-size":a,ref:c,className:F(YL({variant:r,size:a}),e),...i,children:[l.jsx("span",{"aria-hidden":"true",children:KL[r]}),l.jsx("div",{className:"min-w-0 flex-1",children:o})]}));Zk.displayName="Toast";var Qk=m.forwardRef(({className:e,...r},a)=>l.jsx(L7,{"data-slot":"toast-title",ref:a,className:F("font-medium text-body-sm text-foreground",e),...r}));Qk.displayName="Toast.Title";var Jk=m.forwardRef(({className:e,...r},a)=>l.jsx(P7,{"data-slot":"toast-description",ref:a,className:F("mt-0.5 text-body-sm text-muted-foreground",e),...r}));Jk.displayName="Toast.Description";var eC=m.forwardRef(({className:e,...r},a)=>l.jsxs(U7,{"data-slot":"toast-close",ref:a,className:F("absolute top-2 right-2 rounded-md p-1 text-muted-foreground opacity-70 transition-opacity hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),"toast-close":"",...r,children:[l.jsx(Gn,{className:"size-3.5"}),l.jsx("span",{className:"sr-only",children:"Close"})]}));eC.displayName="Toast.Close";var tC=m.forwardRef(({className:e,...r},a)=>l.jsx(I7,{"data-slot":"toast-action",ref:a,className:F("mt-2 inline-flex h-7 items-center rounded-md border border-border/60 bg-card px-2 font-sans text-foreground text-label","transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...r}));tC.displayName="Toast.Action";var go=Object.assign(Zk,{Title:Qk,Description:Jk,Close:eC,Action:tC,Provider:D7,Viewport:O7}),XL=m.createContext(void 0),WL={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4"};function ZL({children:e,position:r="bottom-right",className:a}){const[o,i]=m.useState([]),c=m.useCallback(h=>{i(p=>p.filter(x=>x.id!==h))},[]),d=m.useCallback(h=>{const p=`t-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return i(x=>[...x,{id:p,...h}]),p},[]),f=m.useMemo(()=>({toast:d,dismiss:c}),[d,c]);return l.jsx(XL.Provider,{"data-slot":"toaster",value:f,children:l.jsxs(go.Provider,{swipeDirection:"right",duration:5e3,children:[e,o.map(h=>l.jsxs(go,{variant:h.variant??"default",duration:h.duration===null?Number.POSITIVE_INFINITY:h.duration??5e3,onOpenChange:p=>{p||c(h.id)},children:[h.title?l.jsx(go.Title,{children:h.title}):null,h.description?l.jsx(go.Description,{children:h.description}):null,h.action?l.jsx(go.Action,{altText:String(h.action.label),onClick:h.action.onClick,children:h.action.label}):null,l.jsx(go.Close,{})]},h.id)),l.jsx(go.Viewport,{className:F("fixed z-50 flex max-h-screen w-full max-w-sm flex-col gap-2 outline-none",WL[r],a)})]})})}var nC=m.createContext(!1);nC.Provider;function QL(){return m.useContext(nC)}var s0=m.forwardRef(({className:e,...r},a)=>{const o=QL();return l.jsx("div",{"data-slot":"skeleton",ref:a,role:o?void 0:"status","aria-live":o?void 0:"polite","aria-label":o?void 0:"Loading",className:F("animate-pulse rounded-md bg-muted",e),...r})});s0.displayName="Skeleton";var JL=wr(["relative inline-flex shrink-0 overflow-hidden rounded-full","border border-border/40 bg-muted text-foreground"],{variants:{size:{xs:"size-6 text-label",sm:"size-7 text-label",md:"size-9 text-body-sm",lg:"size-12 text-body-md",xl:"size-16 text-title-md"},tone:{muted:"bg-muted text-foreground",primary:"bg-primary text-primary-foreground",accent:"bg-accent text-accent-foreground"}},defaultVariants:{size:"md",tone:"muted"}}),rC=m.forwardRef(({className:e,size:r,tone:a,...o},i)=>l.jsx(gj,{"data-slot":"avatar","data-size":r,ref:i,className:F(JL({size:r,tone:a}),e),...o}));rC.displayName="Avatar";var aC=m.forwardRef(({className:e,...r},a)=>l.jsx(vj,{"data-slot":"avatar-image",ref:a,className:F("aspect-square size-full object-cover",e),...r}));aC.displayName="Avatar.Image";var oC=m.forwardRef(({className:e,...r},a)=>l.jsx(bj,{"data-slot":"avatar-fallback",ref:a,className:F("flex h-full w-full items-center justify-center font-medium leading-none",e),delayMs:300,...r}));oC.displayName="Avatar.Fallback";var Rh=Object.assign(rC,{Image:aC,Fallback:oC}),eP=m.forwardRef(({className:e,required:r,children:a,...o},i)=>l.jsxs(Sj,{"data-slot":"label",ref:i,className:F("inline-flex items-center gap-1 font-medium font-sans text-body-sm text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-60",e),...o,children:[a,r?l.jsx("span",{className:"text-destructive","aria-hidden":"true",children:"*"}):null]}));eP.displayName="Label";var sC=m.createContext(null);function zd(){const e=m.useContext(sC);if(!e)throw new Error("FormField subcomponents must be inside <FormField>.");return e}var tP={sm:"gap-1",md:"gap-1.5",lg:"gap-2"},nP=m.forwardRef(({className:e,id:r,invalid:a,size:o="md",...i},c)=>{const d=m.useId(),f=r??`field-${d}`,h={fieldId:f,hintId:`${f}-hint`,errorId:`${f}-error`,hasError:!!a,size:o};return l.jsx(sC.Provider,{value:h,children:l.jsx("div",{"data-slot":"form-field",ref:c,className:F("grid",tP[o],e),...i})})});nP.displayName="FormField";var rP={sm:"text-label-caps",md:"text-body-sm",lg:"text-body-md"},lC={sm:"text-label-caps",md:"text-body-sm",lg:"text-body-md"},aP=m.forwardRef(({className:e,required:r,children:a,...o},i)=>{const{fieldId:c,size:d}=zd();return l.jsxs(Sj,{"data-slot":"form-field-label",ref:i,htmlFor:c,className:F("inline-flex items-center gap-1 font-medium font-sans text-foreground",rP[d],"peer-disabled:cursor-not-allowed peer-disabled:opacity-60",e),...o,children:[a,r?l.jsx("span",{className:"text-destructive","aria-hidden":"true",children:"*"}):null]})});aP.displayName="FormField.Label";var oP=m.forwardRef(({children:e,...r},a)=>{const{fieldId:o,hintId:i,errorId:c,hasError:d}=zd(),f=d?c:i,h=m.Children.only(e),p=m.isValidElement(h)?m.cloneElement(h,{id:o,"aria-describedby":f,"aria-invalid":d||void 0}):h;return l.jsx("div",{"data-slot":"form-field-control",ref:a,...r,children:p})});oP.displayName="FormField.Control";var sP=m.forwardRef(({className:e,children:r,...a},o)=>{const{hintId:i,hasError:c,size:d}=zd();return c?null:l.jsx("p",{"data-slot":"form-field-hint",ref:o,id:i,className:F("text-muted-foreground",lC[d],e),...a,children:r})});sP.displayName="FormField.Hint";var lP=m.forwardRef(({className:e,children:r,...a},o)=>{const{errorId:i,hasError:c,size:d}=zd();return c?l.jsxs("p",{"data-slot":"form-field-error",ref:o,id:i,role:"alert",className:F("flex items-center gap-1 text-destructive",lC[d],e),...a,children:[l.jsx(Ni,{className:"size-3.5 shrink-0","aria-hidden":"true"}),r]}):null});lP.displayName="FormField.Error";var rn=m.forwardRef(({className:e,icon:r,title:a,description:o,action:i,eyebrow:c,dashed:d=!0,...f},h)=>l.jsxs("div",{"data-slot":"empty-state",ref:h,className:F("grid place-items-center gap-3 rounded-2xl border border-border bg-card px-6 py-12 text-center",d?"border-border/60 border-dashed":"border-border/40",e),...f,children:[r?l.jsx("span",{className:"grid size-12 place-items-center rounded-2xl bg-primary/10 text-primary",children:l.jsx(r,{className:"size-6","aria-hidden":"true"})}):null,c?l.jsx("p",{className:"font-mono text-label-caps text-muted-foreground uppercase",children:c}):null,l.jsx("h3",{className:"font-display text-foreground text-title-md",children:a}),o?l.jsx("p",{className:"max-w-md text-body-sm text-muted-foreground",children:o}):null,i?l.jsx("div",{className:"mt-2",children:i}):null]}));rn.displayName="EmptyState";var iP=wr(["flex w-full items-center justify-between gap-2 rounded-md border border-input bg-card","text-foreground placeholder:text-muted-foreground","transition-[border-color,box-shadow] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","focus-visible:border-primary","data-[placeholder]:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50","[&>span]:line-clamp-1"],{variants:{size:{sm:"h-8 px-2.5 py-1 text-body-sm",md:"h-[var(--theo-control-h,2.25rem)] px-[var(--theo-control-px,0.875rem)] py-1.5 text-body-sm",lg:"h-11 px-4 py-2.5 text-body-md"}},defaultVariants:{size:"md"}}),iC=m.forwardRef(({className:e,children:r,size:a,...o},i)=>l.jsxs(Cj,{"data-slot":"select-trigger","data-size":a,ref:i,className:F(iP({size:a}),e),...o,children:[r,l.jsx(Tj,{asChild:!0,children:l.jsx(Qr,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"})})]}));iC.displayName="Select.Trigger";var cC=m.forwardRef(({className:e,...r},a)=>l.jsx(Yj,{"data-slot":"select-scroll-up-button",ref:a,className:F("flex cursor-default items-center justify-center py-1",e),...r,children:l.jsx(K2,{className:"size-4"})}));cC.displayName="Select.ScrollUpButton";var uC=m.forwardRef(({className:e,...r},a)=>l.jsx(Kj,{"data-slot":"select-scroll-down-button",ref:a,className:F("flex cursor-default items-center justify-center py-1",e),...r,children:l.jsx(Qr,{className:"size-4"})}));uC.displayName="Select.ScrollDownButton";var dC=m.forwardRef(({className:e,children:r,position:a="popper",...o},i)=>l.jsx(Mj,{children:l.jsxs(Aj,{"data-slot":"select-content",ref:i,position:a,className:F("relative z-50 min-w-[8rem] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-md","data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out",a==="popper"&&"data-[side=top]:-translate-y-1 data-[side=bottom]:translate-y-1",e),...o,children:[l.jsx(cC,{}),l.jsx(Pj,{className:F("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),l.jsx(uC,{})]})}));dC.displayName="Select.Content";var fC=m.forwardRef(({className:e,...r},a)=>l.jsx(Hj,{"data-slot":"select-label",ref:a,className:F("px-2 py-1.5 font-mono text-label-caps text-muted-foreground uppercase tracking-wider",e),...r}));fC.displayName="Select.Label";var mC=m.forwardRef(({className:e,children:r,...a},o)=>l.jsxs($j,{"data-slot":"select-item",ref:o,className:F("relative flex w-full cursor-default select-none items-center gap-2 rounded-md py-1.5 pr-2 pl-7","text-body-sm outline-none","focus:bg-muted focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[l.jsx("span",{className:"absolute left-1.5 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Gj,{children:l.jsx(Rn,{className:"size-3.5 text-primary","aria-hidden":"true"})})}),l.jsx(Vj,{children:r})]}));mC.displayName="Select.Item";var hC=m.forwardRef(({className:e,...r},a)=>l.jsx(Wj,{"data-slot":"select-separator",ref:a,className:F("-mx-1 my-1 h-px bg-border/40",e),...r}));hC.displayName="Select.Separator";var De=Nj;De.Trigger=iC;De.Value=Rj;De.Content=dC;De.Group=Uj;De.Label=fC;De.Item=mC;De.Separator=hC;var cP=wr(["peer relative shrink-0 rounded-sm border border-border bg-card","transition-[background-color,border-color,box-shadow] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground","data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"size-3.5 before:absolute before:inset-[-5px] before:content-['']",md:"size-4",lg:"size-5"}},defaultVariants:{size:"md"}}),uP={sm:"size-2.5",md:"size-3.5",lg:"size-3.5"},dP=m.forwardRef(({className:e,size:r,...a},o)=>{const i=uP[r??"md"];return l.jsx(aN,{"data-slot":"checkbox","data-size":r,ref:o,className:F(cP({size:r}),e),...a,children:l.jsx(sN,{className:"flex items-center justify-center text-current",children:a.checked==="indeterminate"?l.jsx(Ju,{className:i,"aria-hidden":"true",strokeWidth:3}):l.jsx(Rn,{className:i,"aria-hidden":"true",strokeWidth:3})})})});dP.displayName="Checkbox";var fP=m.forwardRef(({className:e,...r},a)=>l.jsx(vN,{"data-slot":"radio-group",ref:a,className:F("grid gap-3",e),...r}));fP.displayName="RadioGroup";var mP=m.forwardRef(({className:e,...r},a)=>l.jsx(wN,{"data-slot":"radio-group-item",ref:a,className:F("aspect-square size-4 rounded-full border border-border bg-card text-primary","transition-[border-color,box-shadow] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:border-primary","disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:l.jsx(jN,{className:"flex items-center justify-center",children:l.jsx(W2,{className:"size-2 fill-primary text-primary","aria-hidden":"true"})})}));mP.displayName="RadioGroup.Item";var hP=wr(["peer inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent","transition-[background-color,box-shadow] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","data-[state=checked]:bg-primary data-[state=checked]:shadow-[0_0_8px_hsl(var(--primary)/0.35)]","data-[state=unchecked]:bg-muted","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),pP={sm:"size-3 data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0.5",md:"size-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0.5",lg:"size-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0.5"},gP=m.forwardRef(({className:e,size:r,...a},o)=>l.jsx(CN,{"data-slot":"switch","data-size":r,ref:o,className:F(hP({size:r}),e),...a,children:l.jsx(RN,{className:F("pointer-events-none block rounded-full bg-card shadow-sm","transition-transform duration-base ease-out-soft",pP[r??"md"])})}));gP.displayName="Switch";var xP=wr(["flex w-full resize-y rounded-md border border-input bg-card","text-foreground placeholder:text-muted-foreground","transition-[box-shadow,border-color] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","focus-visible:border-primary","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"min-h-[64px] px-2.5 py-1.5 text-body-sm",md:"min-h-[6rem] px-[var(--theo-control-px,0.875rem)] py-1.5 text-body-sm",lg:"min-h-[128px] px-4 py-2.5 text-body-md"}},defaultVariants:{size:"md"}}),Co=m.forwardRef(({className:e,rows:r=3,size:a,...o},i)=>l.jsx("textarea",{"data-slot":"textarea","data-size":a,ref:i,rows:r,className:F(xP({size:a}),e),...o}));Co.displayName="Textarea";var pC=m.forwardRef(({className:e,...r},a)=>l.jsx("aside",{"data-slot":"sidebar",ref:a,className:F("flex h-full w-64 flex-col border-border/40 border-r bg-card text-card-foreground",e),...r}));pC.displayName="Sidebar";var gC=m.forwardRef(({className:e,...r},a)=>l.jsx("div",{"data-slot":"sidebar-header",ref:a,className:F("flex h-16 items-center gap-3 border-border/40 border-b px-5",e),...r}));gC.displayName="Sidebar.Header";var xC=m.forwardRef(({className:e,title:r,children:a,...o},i)=>l.jsxs("div",{"data-slot":"sidebar-section",ref:i,className:F("flex flex-col gap-1 px-3 py-4",e),...o,children:[r?l.jsx("p",{className:"px-2 pb-1 font-sans text-label-caps text-muted-foreground uppercase",children:r}):null,a]}));xC.displayName="Sidebar.Section";var vC=m.forwardRef(({className:e,icon:r,active:a,count:o,as:i="button",href:c,children:d,...f},h)=>{const p=F("group flex w-full items-center gap-3 rounded-lg px-2 py-2","font-medium font-sans text-body-sm","transition-colors duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card",a?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground",e),x=l.jsxs(l.Fragment,{children:[r?l.jsx(r,{className:F("size-4 shrink-0",a?"text-primary":"text-muted-foreground group-hover:text-foreground")}):null,l.jsx("span",{className:"flex-1 truncate text-left",children:d}),o!==void 0?l.jsx("span",{className:F("ml-auto rounded-full px-1.5 py-0.5 font-mono text-label",a?"bg-primary text-primary-foreground":"bg-muted-foreground/15"),children:o}):null]});return i==="a"?l.jsx("a",{"data-slot":"sidebar-item",ref:h,href:c,className:p,"aria-current":a?"page":void 0,...f,children:x}):l.jsx("button",{"data-slot":"sidebar-item",ref:h,type:"button",className:p,"aria-pressed":a?"true":void 0,...f,children:x})});vC.displayName="Sidebar.Item";var yC=m.forwardRef(({className:e,...r},a)=>l.jsx("div",{"data-slot":"sidebar-footer",ref:a,className:F("mt-auto border-border/40 border-t px-5 py-4",e),...r}));yC.displayName="Sidebar.Footer";var js=Object.assign(pC,{Header:gC,Section:xC,Item:vC,Footer:yC}),vP=m.forwardRef(({className:e,...r},a)=>l.jsx("header",{"data-slot":"top-nav",ref:a,className:F("flex h-16 items-center justify-between gap-4 border-border/40 border-b bg-card px-6",e),...r}));vP.displayName="TopNav";var yP=m.forwardRef(({className:e,...r},a)=>l.jsx("div",{"data-slot":"top-nav-left",ref:a,className:F("flex flex-1 items-center gap-3",e),...r}));yP.displayName="TopNav.Left";var bP=m.forwardRef(({className:e,...r},a)=>l.jsx("div",{"data-slot":"top-nav-center",ref:a,className:F("hidden flex-1 justify-center md:flex",e),...r}));bP.displayName="TopNav.Center";var wP=m.forwardRef(({className:e,...r},a)=>l.jsx("div",{"data-slot":"top-nav-right",ref:a,className:F("flex flex-1 items-center justify-end gap-2",e),...r}));wP.displayName="TopNav.Right";var SP=m.forwardRef(({className:e,items:r,...a},o)=>l.jsx("nav",{"data-slot":"top-nav-breadcrumbs",ref:o,"aria-label":"Breadcrumb",className:F("flex items-center gap-1.5 text-body-sm",e),...a,children:r.map((i,c)=>{const d=c===r.length-1,f=typeof i.label=="string"?i.label:c;return l.jsxs(m.Fragment,{children:[i.href&&!d?l.jsx("a",{href:i.href,className:"font-sans text-muted-foreground transition-colors hover:text-foreground",children:i.label}):l.jsx("span",{className:F("font-sans",d?"font-medium text-foreground":"text-muted-foreground"),"aria-current":d?"page":void 0,children:i.label}),d?null:l.jsx(Jr,{className:"size-3.5 text-muted-foreground","aria-hidden":"true"})]},f)})}));SP.displayName="TopNav.Breadcrumbs";var jP=m.forwardRef(({className:e,value:r,options:a,onChange:o,ariaLabel:i="Mode",...c},d)=>{const f=h=>{if(!o||a.length===0)return;const p=a.findIndex(w=>w.value===r),x=p>=0?p:0;let y=null;if(h.key==="ArrowRight"||h.key==="ArrowDown"?y=(x+1)%a.length:h.key==="ArrowLeft"||h.key==="ArrowUp"?y=(x-1+a.length)%a.length:h.key==="Home"?y=0:h.key==="End"&&(y=a.length-1),y===null)return;h.preventDefault();const b=a[y];b&&o(b.value)};return l.jsx("div",{"data-slot":"top-nav-mode-switcher",ref:d,role:"radiogroup","aria-label":i,onKeyDown:f,className:F("inline-flex items-center rounded-lg border border-border/60 bg-muted p-1",e),...c,children:a.map(h=>{const p=h.value===r;return l.jsx("button",{type:"button",role:"radio","aria-checked":p,tabIndex:p?0:-1,onClick:()=>o?.(h.value),className:F("rounded-md px-3 py-1.5 font-medium font-sans text-body-sm","transition-all duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",p?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:h.label},h.value)})})});jP.displayName="TopNav.ModeSwitcher";var l0=m.forwardRef(({className:e,...r},a)=>l.jsx(ld,{"data-slot":"sheet-overlay",ref:a,className:F("fixed inset-0 z-50 bg-background/80","data-[state=open]:fade-in-0 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:animate-out",e),...r}));l0.displayName="Sheet.Overlay";var NP=wr(["fixed z-50 flex flex-col gap-3 border-border/40 bg-card text-card-foreground shadow-lg","transition duration-base ease-out-soft","data-[state=closed]:animate-out data-[state=open]:animate-in"],{variants:{side:{right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 max-w-md border-l",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 max-w-md border-r",top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 h-auto max-h-[80vh] border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 h-auto max-h-[80vh] border-t"}},defaultVariants:{side:"right"}}),bC=m.forwardRef(({className:e,children:r,hideCloseButton:a,side:o="right",...i},c)=>l.jsxs(sd,{children:[l.jsx(l0,{}),l.jsxs(id,{"data-slot":"sheet-content",ref:c,className:F(NP({side:o}),e),...i,children:[r,a?null:l.jsxs(Ci,{className:F("absolute top-4 right-4 rounded-md p-1 opacity-70","transition-opacity hover:opacity-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card","disabled:pointer-events-none"),children:[l.jsx(Gn,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bC.displayName="Sheet.Content";var wC=({className:e,...r})=>l.jsx("div",{className:F("flex flex-col gap-1.5 border-border/40 border-b px-6 py-5 text-left",e),...r});wC.displayName="Sheet.Header";var SC=({className:e,...r})=>l.jsx("div",{className:F("flex-1 overflow-y-auto px-6 py-4 text-body-md",e),...r});SC.displayName="Sheet.Body";var jC=({className:e,...r})=>l.jsx("div",{className:F("flex flex-col-reverse gap-2 border-border/40 border-t px-6 py-4 sm:flex-row sm:justify-end",e),...r});jC.displayName="Sheet.Footer";var NC=m.forwardRef(({className:e,...r},a)=>l.jsx(dg,{"data-slot":"sheet-title",ref:a,className:F("font-display text-foreground text-title-lg tracking-tight",e),...r}));NC.displayName="Sheet.Title";var kC=m.forwardRef(({className:e,...r},a)=>l.jsx(fg,{"data-slot":"sheet-description",ref:a,className:F("text-body-sm text-muted-foreground",e),...r}));kC.displayName="Sheet.Description";var ta=od;ta.Trigger=cg;ta.Close=Ci;ta.Content=bC;ta.Overlay=l0;ta.Header=wC;ta.Body=SC;ta.Footer=jC;ta.Title=NC;ta.Description=kC;var kP={default:"bg-primary",success:"bg-success",warning:"bg-warning",destructive:"bg-destructive"},CP=m.forwardRef(({className:e,value:r=0,max:a=100,intent:o="default",height:i="h-1",indeterminate:c=!1,...d},f)=>{const h=Math.max(0,a),p=Math.min(h,Math.max(0,r)),x=h>0?p/h*100:0,y=kP[o];return l.jsx("div",{"data-slot":"progress",ref:f,role:"progressbar","aria-valuemin":0,"aria-valuemax":h,"aria-valuenow":c?void 0:p,"aria-busy":c?!0:void 0,className:F("relative w-full overflow-hidden rounded-full bg-muted",i,e),...d,children:c?l.jsx("div",{className:F("absolute inset-y-0 left-0 w-1/3 rounded-full","animate-[progress-indeterminate_1.4s_ease-in-out_infinite] motion-reduce:animate-none","motion-reduce:w-full motion-reduce:opacity-50",y)}):l.jsx("div",{className:F("h-full rounded-full transition-[width] duration-base ease-out-soft","motion-reduce:transition-none",y),style:{width:`${x}%`}})})});CP.displayName="Progress";var N1={free:"bg-muted/40 border-muted-foreground/20 text-muted-foreground",hobby:"bg-warning/10 border-warning/30 text-warning",pro:"bg-primary/10 border-primary/30 text-primary",team:"bg-success/10 border-success/30 text-success",enterprise:"bg-foreground/5 border-foreground/20 text-foreground"},EP={sm:"px-1.5 py-0 text-label-caps",md:"px-2 py-0.5 text-label"};function RP(e){return e.charAt(0).toUpperCase()+e.slice(1)}var CC=m.forwardRef(({className:e,plan:r,label:a,size:o="md",...i},c)=>{const d=N1[r]??N1.free,f=a??RP(r);return l.jsx("span",{"data-slot":"plan-badge",ref:c,className:F("inline-flex items-center rounded-md border","font-mono uppercase tabular-nums tracking-wider",d,EP[o],e),"data-plan":r,...i,children:f})});CC.displayName="PlanBadge";var EC=/^(?:https?:\/\/|\/)/;function TP(e,r){return r&&!EC.test(r)&&r.length<=2?r.toUpperCase():typeof e=="string"&&e.length>0?e.charAt(0).toUpperCase():"?"}var _P=m.forwardRef(({className:e,name:r,avatar:a,plan:o,secondary:i,onClick:c,...d},f)=>{const h=typeof c=="function",p=TP(r,a),x=a!==void 0&&EC.test(a),y=typeof r=="string"?r:"account",b=l.jsxs(l.Fragment,{children:[l.jsxs(Rh,{size:"sm",children:[x?l.jsx(Rh.Image,{src:a,alt:y}):null,l.jsx(Rh.Fallback,{delayMs:0,children:p})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("span",{className:"truncate font-medium text-body-sm text-foreground",children:r}),o?l.jsx(CC,{plan:o,size:"sm"}):null]}),i?l.jsx("span",{className:"truncate text-label text-muted-foreground",children:i}):null]}),h?l.jsx(TM,{className:"size-3 shrink-0 text-muted-foreground","aria-hidden":"true"}):null]}),w=F("flex w-full items-center gap-3 px-3 py-2",h&&F("rounded-md text-left transition-colors","hover:bg-muted/40","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),e);if(h){const{...S}=d;return l.jsx("button",{"data-slot":"account-menu",ref:f,type:"button",className:w,onClick:c,...S,children:b})}return l.jsx("div",{"data-slot":"account-menu",ref:f,className:w,...d,children:b})});_P.displayName="AccountMenu";var RC=m.createContext("default"),TC={left:"text-left",center:"text-center",right:"text-right"},_C=m.forwardRef(({className:e,density:r="default",children:a,...o},i)=>l.jsx(RC.Provider,{value:r,children:l.jsx("table",{"data-slot":"table",ref:i,className:F("w-full border-collapse font-sans text-body-sm",e),...o,children:a})}));_C.displayName="Table";var MC=m.forwardRef(({className:e,...r},a)=>l.jsx("thead",{"data-slot":"table-header",ref:a,className:F("border-border/40 border-b text-label-caps text-muted-foreground uppercase tracking-wider",e),...r}));MC.displayName="Table.Header";var AC=m.forwardRef(({className:e,...r},a)=>l.jsx("tbody",{"data-slot":"table-body",ref:a,className:F("text-foreground",e),...r}));AC.displayName="Table.Body";var DC=m.forwardRef(({className:e,...r},a)=>l.jsx("tr",{"data-slot":"table-row",ref:a,className:F("border-border/20 border-b transition-colors last:border-0 hover:bg-muted/40",e),...r}));DC.displayName="Table.Row";var OC=m.forwardRef(({className:e,align:r="left",numeric:a,children:o,...i},c)=>{const d=m.useContext(RC);return l.jsx("td",{"data-slot":"table-cell",ref:c,className:F("px-3",d==="compact"?"py-1.5":"py-3",TC[r],a&&"font-mono tabular-nums",e),...i,children:o})});OC.displayName="Table.Cell";var zC=m.forwardRef(({className:e,align:r="left",onSort:a,sortDirection:o="none",children:i,...c},d)=>{const f=a!==void 0?l.jsxs("span",{className:"ml-1 inline-flex flex-col",children:[l.jsx(K2,{"aria-hidden":"true",className:F("-mb-1 size-3",o==="asc"?"opacity-100":"opacity-30")}),l.jsx(Qr,{"aria-hidden":"true",className:F("size-3",o==="desc"?"opacity-100":"opacity-30")})]}):null,h=a===void 0?void 0:o==="asc"?"ascending":o==="desc"?"descending":"none";return l.jsx("th",{"data-slot":"table-header-cell",ref:d,scope:"col","aria-sort":h,className:F("px-3 py-2.5 font-medium",TC[r],r==="right"&&"[&_button]:justify-end",e),...c,children:a!==void 0?l.jsxs("button",{type:"button",onClick:a,className:F("inline-flex items-center gap-1","text-label-caps uppercase tracking-wider","transition-colors hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[i,f]}):i})});zC.displayName="Table.HeaderCell";var Mt=Object.assign(_C,{Header:MC,Body:AC,Row:DC,Cell:OC,HeaderCell:zC}),MP={live:"bg-success",building:"bg-warning",failed:"bg-destructive",idle:"bg-muted-foreground/40",warning:"bg-warning"},AP={live:"text-success",building:"text-warning",failed:"text-destructive",idle:"text-muted-foreground",warning:"text-warning"},DP={xs:"size-1.5",sm:"size-2",md:"size-2.5"},OP=m.forwardRef(({className:e,status:r,label:a,size:o="sm",pulse:i,"aria-label":c,...d},f)=>{const h=i??r==="building",p=a!=null,x=c??(p?void 0:r);m.useEffect(()=>{},[p,c,r]);const y=l.jsx("span",{"aria-hidden":p?"true":void 0,className:F("inline-block shrink-0 rounded-full",DP[o],MP[r],h&&"animate-pulse")});return p?l.jsxs("span",{"data-slot":"status-dot",ref:f,"aria-label":x,className:F("inline-flex items-center gap-1.5 font-mono text-label",AP[r],e),...d,children:[y,l.jsx("span",{children:a})]}):l.jsx("span",{"data-slot":"status-dot",ref:f,role:"status","aria-label":x,className:F("inline-flex items-center",e),...d,children:y})});OP.displayName="StatusDot";function zP(e){const r=e instanceof Date?e:new Date(e);return Number.isNaN(r.getTime())?null:r}var LP=10080*60*1e3,PP=[{unit:"year",ms:365*24*60*60*1e3},{unit:"month",ms:720*60*60*1e3},{unit:"day",ms:1440*60*1e3},{unit:"hour",ms:3600*1e3},{unit:"minute",ms:60*1e3}];function IP(e){try{return new Intl.RelativeTimeFormat(e,{numeric:"auto"})}catch{try{return new Intl.RelativeTimeFormat(void 0,{numeric:"auto"})}catch{return null}}}function k1(e,r,a){try{return e.toLocaleDateString(r,{month:"short",day:"numeric",...a?{year:"numeric"}:{}})}catch{return e.toLocaleDateString(void 0,{month:"short",day:"numeric",...a?{year:"numeric"}:{}})}}function UP(e,r,a){const o=e.getTime()-r.getTime(),i=Math.abs(o);if(i<6e4)return"just now";if(o<0&&i>LP){const d=e.getFullYear()===r.getFullYear();return k1(e,a,!d)}const c=IP(a);if(c===null)return k1(e,a,e.getFullYear()!==r.getFullYear());for(const{unit:d,ms:f}of PP)if(i>=f)return c.format(Math.round(o/f),d);return"just now"}function BP(e,r){try{return e.toLocaleString(r,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}}var HP=m.forwardRef(({className:e,value:r,format:a="relative",refreshInterval:o=6e4,locale:i,noTooltip:c,...d},f)=>{const h=zP(r),[p,x]=m.useState(()=>new Date);if(m.useEffect(()=>{if(a!=="relative"||o===0||h===null)return;const N=setInterval(()=>x(new Date),o);return()=>clearInterval(N)},[a,o,h]),h===null)return l.jsx("time",{"data-slot":"timestamp",ref:f,className:F(e),suppressHydrationWarning:!0,...d});const y=h.toISOString(),b=BP(h,i),w=UP(h,p,i),S=a==="absolute"?b:a==="both"?`${b} (${w})`:w;return l.jsx("time",{"data-slot":"timestamp",ref:f,dateTime:y,title:c?void 0:b,"aria-label":b,suppressHydrationWarning:!0,className:F(e),...d,children:S})});HP.displayName="Timestamp";var C1={up:{icon:rg,color:"text-success"},down:{icon:ng,color:"text-destructive"},flat:{icon:Ju,color:"text-muted-foreground"}},FP=m.forwardRef(({className:e,value:r,label:a,icon:o,delta:i,onClick:c,...d},f)=>{const h=c!==void 0,p=i!==void 0?C1[i.trend].icon:null,x=i!==void 0?C1[i.trend].color:"",y=l.jsxs(l.Fragment,{children:[(o!==void 0||h)&&l.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[o!==void 0?l.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg border border-border/40 bg-muted/40",children:l.jsx(o,{"aria-hidden":"true",className:"size-4 text-muted-foreground"})}):l.jsx("div",{}),h?l.jsx(eM,{"aria-hidden":"true",className:"size-3.5 text-muted-foreground transition-colors group-hover:text-foreground"}):null]}),l.jsx("div",{className:"whitespace-nowrap font-bold font-display text-display-md text-foreground tabular-nums leading-none tracking-tight",children:r}),l.jsx("div",{className:"mt-1 font-sans text-body-sm text-muted-foreground",children:a}),i!==void 0&&p!==null?l.jsxs("div",{className:F("mt-2 inline-flex items-center gap-1 font-mono text-label",x),children:[l.jsx(p,{"aria-hidden":"true",className:"size-3"}),l.jsx("span",{children:i.value})]}):null]});return h?l.jsx("button",{"data-slot":"stat-tile",ref:f,type:"button",onClick:c,className:F("group block w-full rounded-xl border border-border/40 bg-card p-5 text-left","cursor-pointer transition-colors hover:border-primary/30","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",e),...d,children:y}):l.jsx("div",{"data-slot":"stat-tile",ref:f,className:F("rounded-xl border border-border/40 bg-card p-5",e),children:y})});FP.displayName="StatTile";var LC=m.forwardRef(({className:e,title:r="Danger Zone",children:a,...o},i)=>l.jsxs("section",{"data-slot":"danger-zone",ref:i,"aria-label":typeof r=="string"?r:"Danger Zone",className:F("rounded-xl border border-destructive/30 bg-destructive/[0.02]",e),...o,children:[l.jsx("div",{className:"border-destructive/20 border-b px-5 py-3 font-sans text-destructive text-label-caps uppercase tracking-wider",children:r}),a]}));LC.displayName="DangerZone";var PC=m.forwardRef(({className:e,title:r,description:a,action:o,...i},c)=>l.jsxs("div",{"data-slot":"danger-zone-action",ref:c,className:F("flex items-center justify-between gap-4 border-destructive/10 border-b px-5 py-4 last:border-b-0",e),...i,children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"font-medium font-sans text-body-sm text-foreground",children:r}),l.jsx("span",{className:"mt-0.5 font-sans text-label text-muted-foreground",children:a})]}),l.jsx("div",{className:"shrink-0",children:o})]}));PC.displayName="DangerZone.Action";Object.assign(LC,{Action:PC});var $P=m.forwardRef(({open:e,onOpenChange:r,title:a,description:o,confirmLabel:i="Confirm",cancelLabel:c="Cancel",intent:d="default",confirmationPhrase:f,onConfirm:h,loading:p},x)=>{const[y,b]=m.useState(""),[w,S]=m.useState(!1),N=m.useRef(null),k=!!f,C=k?y===f:!0,E=p===!0||w,T=C&&!E;m.useEffect(()=>{e||b("")},[e]),m.useEffect(()=>{if(e){const L=window.setTimeout(()=>N.current?.focus(),0);return()=>window.clearTimeout(L)}},[e]);async function M(){if(T){S(!0);try{await h(),r(!1)}catch{}finally{S(!1)}}}function _(L){L.key==="Enter"&&T&&(L.preventDefault(),M())}return l.jsx(po,{open:e,onOpenChange:r,children:l.jsxs(po.Content,{"data-slot":"confirm-dialog",ref:x,children:[l.jsxs(po.Header,{children:[l.jsx(po.Title,{children:a}),l.jsx(po.Description,{children:o})]}),k?l.jsxs(po.Body,{children:[l.jsxs("p",{className:"mb-2 text-body-sm text-muted-foreground",children:["Type"," ",l.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-foreground",children:f})," ","to confirm"]}),l.jsx(ko,{value:y,onChange:L=>b(L.target.value),onKeyDown:_,autoComplete:"off","aria-label":"Confirmation phrase"})]}):null,l.jsxs(po.Footer,{children:[l.jsx(He,{ref:N,variant:"secondary",onClick:()=>r(!1),disabled:E,children:c}),l.jsxs(He,{variant:d==="destructive"?"destructive":"primary",onClick:()=>{M()},disabled:!T,"data-confirm":!0,children:[E?l.jsx(qs,{"aria-hidden":"true",className:"size-4 animate-spin"}):null,i]})]})]})})});$P.displayName="ConfirmDialog";var IC=m.forwardRef(({className:e,code:r,language:a,terminal:o,copyable:i,caption:c,...d},f)=>{const h=r.split(/\r?\n/);return l.jsxs("div",{"data-slot":"code-block",ref:f,className:F("relative rounded-lg border border-border/40 bg-muted/40 font-mono text-body-sm",e),...d,children:[c!==void 0?l.jsx("div",{className:"border-border/40 border-b px-3 py-1.5 font-sans text-label text-muted-foreground",children:c}):null,i?l.jsx(r0,{value:r,"aria-label":"Copy code",className:"absolute top-2 right-2"}):null,l.jsx("pre",{className:"overflow-x-auto p-3 text-foreground",children:o?l.jsx("code",{children:h.map((p,x)=>l.jsxs("span",{className:"block whitespace-pre",children:[l.jsx("span",{className:"select-none text-muted-foreground",children:"$ "}),p]},x))}):l.jsx("code",{children:r})})]})});IC.displayName="CodeBlock";var VP={online:"bg-status-online",offline:"bg-status-offline",degraded:"bg-status-degraded",info:"bg-status-info"},qP={online:"text-foreground",offline:"text-foreground",degraded:"text-foreground",info:"text-foreground"},GP={online:"Online",offline:"Offline",degraded:"Degraded",info:"Information"},YP={sm:"size-2",md:"size-2.5"},KP=m.forwardRef(({status:e,label:r,size:a="sm",pulse:o=!1,className:i,"aria-label":c,...d},f)=>{const h=r??c??GP[e];return l.jsxs("span",{"data-slot":"status-indicator",ref:f,role:"img","aria-label":h,className:F("inline-flex items-center gap-2 font-medium text-xs",i),"data-status":e,...d,children:[l.jsx("span",{className:F("inline-block rounded-full",YP[a],VP[e],o&&"animate-pulse"),"aria-hidden":!0}),r!==void 0&&l.jsx("span",{className:qP[e],children:r})]})});KP.displayName="StatusIndicator";function XP(e,r){return e==="neutral"?"text-muted-foreground":(r?e==="down":e==="up")?"text-success":"text-destructive"}function WP({trend:e,className:r}){return e==="up"?l.jsx(rg,{className:F("size-3.5",r),"aria-hidden":!0}):e==="down"?l.jsx(ng,{className:F("size-3.5",r),"aria-hidden":!0}):l.jsx(Ju,{className:F("size-3.5",r),"aria-hidden":!0})}var ZP=m.forwardRef(({title:e,value:r,delta:a,hint:o,icon:i,invertTrend:c=!1,className:d,...f},h)=>l.jsxs(_p,{"data-slot":"metric-card",ref:h,className:F("@container/metric-card flex w-full flex-col gap-2 p-4",d),"data-testid":"metric-card",...f,children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsx("span",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:e}),i!==void 0&&l.jsx("span",{className:"text-muted-foreground","aria-hidden":!0,children:i})]}),l.jsx("div",{className:"font-semibold @sm/metric-card:text-3xl text-2xl text-foreground tracking-tight",children:r}),(a!==void 0||o!==void 0)&&l.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a!==void 0&&l.jsxs("span",{className:F("inline-flex items-center gap-1 font-medium",XP(a.trend,c)),"data-trend":a.trend,children:[l.jsx(WP,{trend:a.trend}),a.value]}),o!==void 0&&l.jsx("span",{className:"text-muted-foreground",children:o})]})]}));ZP.displayName="MetricCard";var QP={info:{icon:cp,border:"border-primary/30",bg:"bg-primary/[0.04]",iconColor:"text-primary"},success:{icon:X2,border:"border-success/30",bg:"bg-success/[0.04]",iconColor:"text-success"},warning:{icon:cw,border:"border-warning/30",bg:"bg-warning/[0.04]",iconColor:"text-warning"},destructive:{icon:Ni,border:"border-destructive/30",bg:"bg-destructive/[0.04]",iconColor:"text-destructive"}},JP=m.forwardRef(({className:e,intent:r="info",title:a,description:o,action:i,onDismiss:c,...d},f)=>{const h=QP[r],p=h.icon,x=a!=null,y=o!=null,b=r==="destructive"?"alert":"status";return l.jsx("div",{"data-slot":"alert",ref:f,role:b,className:F("rounded-lg border",h.border,h.bg,x&&y?"p-4":"p-3",e),...d,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(p,{"aria-hidden":"true",className:F("mt-0.5 size-4 shrink-0",h.iconColor)}),l.jsxs("div",{className:"min-w-0 flex-1",children:[x?l.jsx("div",{className:"font-medium font-sans text-body-sm text-foreground",children:a}):null,y?l.jsx("div",{className:F("font-sans text-body-sm text-muted-foreground",x&&"mt-0.5"),children:o}):null]}),i!==void 0?l.jsx("div",{className:"ml-auto shrink-0",children:i}):null,c!==void 0?l.jsx("button",{type:"button",onClick:c,"aria-label":"Dismiss",className:F("shrink-0 rounded p-0.5 text-muted-foreground transition-colors","hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:l.jsx(Gn,{"aria-hidden":"true",className:"size-4"})}):null]})})});JP.displayName="Alert";function eI(e,r,a=1){if(r<=1)return[];const i=a*2+3+2;if(r<=i)return Array.from({length:r},(x,y)=>y+1);const c=Math.max(e-a,1),d=Math.min(e+a,r),f=c>2,h=d<r-1;if(!f&&h){const x=1+(a*2+2);return[...Array.from({length:x},(b,w)=>w+1),"ellipsis-end",r]}if(f&&!h){const x=r-(a*2+2);return[1,"ellipsis-start",...Array.from({length:r-x+1},(b,w)=>x+w)]}return[1,"ellipsis-start",...Array.from({length:d-c+1},(x,y)=>c+y),"ellipsis-end",r]}var tI={sm:"size-7 text-label",md:"size-8 text-body-sm"},nI={sm:"size-3",md:"size-3.5"},UC=m.forwardRef(({className:e,currentPage:r,totalPages:a,onPageChange:o,siblingCount:i=1,showJumpButtons:c=!0,size:d="md",...f},h)=>{if(a<=1)return null;const p=eI(r,a,i),x=r<=1,y=r>=a,b=tI[d],w=nI[d],S=F("inline-flex items-center justify-center rounded-md font-mono tabular-nums","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",b);function N(C){const E=Math.max(1,Math.min(a,C));E!==r&&o(E)}function k(C){C.key==="ArrowLeft"?(C.preventDefault(),N(r-1)):C.key==="ArrowRight"?(C.preventDefault(),N(r+1)):C.key==="Home"?(C.preventDefault(),N(1)):C.key==="End"&&(C.preventDefault(),N(a))}return l.jsxs("nav",{"data-slot":"pagination",ref:h,"aria-label":"Pagination",onKeyDown:k,className:F("flex items-center gap-1",e),...f,children:[c?l.jsx("button",{type:"button",onClick:()=>N(1),disabled:x,"aria-label":"Go to first page","aria-disabled":x||void 0,className:F(S,"text-foreground hover:bg-muted",x&&"cursor-not-allowed opacity-40 hover:bg-transparent"),children:l.jsx(kM,{"aria-hidden":"true",className:w})}):null,l.jsx("button",{type:"button",onClick:()=>N(r-1),disabled:x,"aria-label":"Go to previous page","aria-disabled":x||void 0,className:F(S,"text-foreground hover:bg-muted",x&&"cursor-not-allowed opacity-40 hover:bg-transparent"),children:l.jsx(wM,{"aria-hidden":"true",className:w})}),p.map(C=>{if(C==="ellipsis-start"||C==="ellipsis-end")return l.jsx("span",{"aria-hidden":"true",className:F("inline-flex items-center justify-center text-muted-foreground",b),children:"…"},C);const E=C===r;return l.jsx("button",{type:"button",onClick:()=>N(C),"aria-label":`Go to page ${C}`,"aria-current":E?"page":void 0,className:F(S,E?"bg-primary text-primary-foreground hover:bg-primary":"text-foreground hover:bg-muted"),children:C},C)}),l.jsx("button",{type:"button",onClick:()=>N(r+1),disabled:y,"aria-label":"Go to next page","aria-disabled":y||void 0,className:F(S,"text-foreground hover:bg-muted",y&&"cursor-not-allowed opacity-40 hover:bg-transparent"),children:l.jsx(Jr,{"aria-hidden":"true",className:w})}),c?l.jsx("button",{type:"button",onClick:()=>N(a),disabled:y,"aria-label":"Go to last page","aria-disabled":y||void 0,className:F(S,"text-foreground hover:bg-muted",y&&"cursor-not-allowed opacity-40 hover:bg-transparent"),children:l.jsx(EM,{"aria-hidden":"true",className:w})}):null]})});UC.displayName="Pagination";var rI=F9,aI=bk,oI=V9,sI=Z9,lI=K9,BC=m.forwardRef(({className:e,sideOffset:r=4,...a},o)=>l.jsx(bk,{children:l.jsx($9,{"data-slot":"dropdown-menu-content",ref:o,sideOffset:r,className:F("z-50 min-w-32 overflow-hidden rounded-lg border border-border/40 bg-card p-1","text-card-foreground shadow-md","data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out",e),...a})}));BC.displayName="DropdownMenu.Content";var HC=m.forwardRef(({className:e,inset:r,...a},o)=>l.jsx(G9,{"data-slot":"dropdown-menu-item",ref:o,className:F("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5","font-sans text-body-sm text-foreground outline-none","transition-colors","focus:bg-muted focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r&&"pl-8",e),...a}));HC.displayName="DropdownMenu.Item";var FC=m.forwardRef(({className:e,children:r,checked:a,...o},i)=>l.jsxs(Y9,{"data-slot":"dropdown-menu-checkbox-item",ref:i,checked:a,className:F("relative flex cursor-default select-none items-center rounded-md py-1.5 pr-2 pl-8","font-sans text-body-sm text-foreground outline-none","transition-colors focus:bg-muted focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[l.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(wk,{children:l.jsx(Rn,{"aria-hidden":"true",className:"size-4"})})}),r]}));FC.displayName="DropdownMenu.CheckboxItem";var $C=m.forwardRef(({className:e,children:r,...a},o)=>l.jsxs(X9,{"data-slot":"dropdown-menu-radio-item",ref:o,className:F("relative flex cursor-default select-none items-center rounded-md py-1.5 pr-2 pl-8","font-sans text-body-sm text-foreground outline-none","transition-colors focus:bg-muted focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[l.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(wk,{children:l.jsx(W2,{"aria-hidden":"true",className:"size-2 fill-current"})})}),r]}));$C.displayName="DropdownMenu.RadioItem";var VC=m.forwardRef(({className:e,inset:r,...a},o)=>l.jsx(q9,{"data-slot":"dropdown-menu-label",ref:o,className:F("px-2 py-1.5 font-medium font-sans text-label-caps text-muted-foreground uppercase tracking-wider",r&&"pl-8",e),...a}));VC.displayName="DropdownMenu.Label";var qC=m.forwardRef(({className:e,...r},a)=>l.jsx(W9,{"data-slot":"dropdown-menu-separator",ref:a,className:F("-mx-1 my-1 h-px bg-border/40",e),...r}));qC.displayName="DropdownMenu.Separator";var GC=({className:e,...r})=>l.jsx("span",{className:F("ml-auto font-mono text-label text-muted-foreground",e),...r});GC.displayName="DropdownMenu.Shortcut";var YC=m.forwardRef(({className:e,inset:r,children:a,...o},i)=>l.jsxs(Q9,{"data-slot":"dropdown-menu-sub-trigger",ref:i,className:F("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5","font-sans text-body-sm text-foreground outline-none","focus:bg-muted data-[state=open]:bg-muted",r&&"pl-8",e),...o,children:[a,l.jsx(Jr,{"aria-hidden":"true",className:"ml-auto size-3.5"})]}));YC.displayName="DropdownMenu.SubTrigger";var KC=m.forwardRef(({className:e,...r},a)=>l.jsx(J9,{"data-slot":"dropdown-menu-sub-content",ref:a,className:F("z-50 min-w-32 overflow-hidden rounded-lg border border-border/40 bg-card p-1","text-card-foreground shadow-md","data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out",e),...r}));KC.displayName="DropdownMenu.SubContent";var Nn=Object.assign(H9,{Trigger:rI,Portal:aI,Content:BC,Item:HC,CheckboxItem:FC,RadioItem:$C,Label:VC,Separator:qC,Shortcut:GC,Group:oI,Sub:sI,SubTrigger:YC,SubContent:KC,RadioGroup:lI}),XC=m.forwardRef(({className:e,search:r,primaryAction:a,onFilterClick:o,...i},c)=>{if(!r&&!a&&!o)return null;const d=a?.icon,f=a?.loading===!0;return l.jsxs("div",{"data-slot":"action-bar",ref:c,className:F("flex w-full items-center gap-2",e),...i,children:[r?l.jsxs("div",{className:"relative flex-1",children:[l.jsx(ed,{"aria-hidden":"true",className:"-translate-y-1/2 absolute top-1/2 left-3 size-4 text-muted-foreground"}),l.jsx("input",{type:"search","aria-label":r["aria-label"]??r.placeholder.replace(/(\.{3}|…)\s*$/,""),placeholder:r.placeholder,value:r.value,onChange:h=>r.onChange(h.target.value),className:F("w-full rounded-md border border-border/40 bg-card py-2 pr-3 pl-9","font-sans text-body-sm text-foreground placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring")})]}):null,o!==void 0?l.jsx("button",{type:"button",onClick:o,"aria-label":"Filter",className:F("inline-flex size-9 items-center justify-center rounded-md border border-border/40","text-muted-foreground transition-colors","hover:bg-muted hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:l.jsx(c3,{"aria-hidden":"true",className:"size-4"})}):null,a!==void 0?l.jsxs("button",{type:"button",onClick:a.onClick,disabled:f,className:F("ml-auto inline-flex items-center gap-2 rounded-md bg-primary px-3 py-2","font-medium font-sans text-body-sm text-primary-foreground","transition-colors hover:bg-primary-deep","disabled:cursor-not-allowed disabled:opacity-60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[f?l.jsx(qs,{"aria-hidden":"true",className:"size-4 animate-spin"}):d?l.jsx(d,{"aria-hidden":"true",className:"size-4"}):null,a.label]}):null]})});XC.displayName="ActionBar";var iI={sm:"size-8 text-body-sm",md:"size-10 text-body-md",lg:"size-12 text-title-sm"};function Th(e,r){const a=e.replace(/\s/g,"");return r==="numeric"?a.replace(/\D/g,""):a.toUpperCase().replace(/[^A-Z0-9]/g,"")}var cI=m.forwardRef(({className:e,length:r=6,value:a="",onChange:o,onComplete:i,inputMode:c="numeric",size:d="md",disabled:f=!1,error:h=!1,autoFocus:p=!1,mask:x=!1,"aria-label":y,...b},w)=>{const S=m.useRef([]),N=m.useRef(a.length===r);m.useEffect(()=>{p&&(typeof window>"u"||S.current[0]?.focus())},[p]),m.useEffect(()=>{const _=a.length===r&&a.length>0;_&&!N.current&&i?.(a),N.current=_},[a,r,i]);function k(_){const L=Th(_,c).slice(0,r);o?.(L)}function C(_,L){const B=Th(L,c);if(B.length===0){const q=`${a.slice(0,_)}${a.slice(_+1)}`;k(q);return}const A=B[B.length-1]??"",oe=`${a.slice(0,_)}${A}${a.slice(_+1)}`;k(oe),_<r-1&&S.current[_+1]?.focus()}function E(_,L){if(f)return;const B=a[_]??"";if(L.key==="Backspace"){if(B==="")_>0&&S.current[_-1]?.focus();else{const A=`${a.slice(0,_)}${a.slice(_+1)}`;k(A)}L.preventDefault()}else L.key==="ArrowLeft"?(_>0&&S.current[_-1]?.focus(),L.preventDefault()):L.key==="ArrowRight"&&(_<r-1&&S.current[_+1]?.focus(),L.preventDefault())}function T(_,L){if(f)return;L.preventDefault();const B=L.clipboardData.getData("text/plain"),A=Th(B,c);if(A.length===0)return;const oe=Array.from({length:r},(te,Z)=>a[Z]??""),q=r-_,W=A.slice(0,q);for(let te=0;te<W.length;te++)oe[_+te]=W[te]??"";const ee=oe.join("");k(ee);const re=Math.min(_+W.length,r-1);requestAnimationFrame(()=>S.current[re]?.focus())}const M=Array.from({length:r},(_,L)=>L);return l.jsx("div",{"data-slot":"pin-input",ref:w,role:"group","aria-label":y,className:F("inline-flex items-center gap-2",e),...b,children:M.map(_=>{const L=a[_]??"",B=x&&L!==""?"•":L;return l.jsx("input",{ref:A=>{S.current[_]=A},type:"text",inputMode:c==="numeric"?"numeric":"text",pattern:c==="numeric"?"[0-9]*":void 0,maxLength:1,autoComplete:_===0?"one-time-code":"off",disabled:f,value:B,onChange:A=>C(_,A.target.value),onKeyDown:A=>E(_,A),onPaste:A=>T(_,A),"aria-label":`Digit ${_+1} of ${r}`,className:F("rounded-md border border-border bg-card text-center font-medium font-mono","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",iI[d],h?"border-destructive":"border-border/60 hover:border-border")},_)})})});cI.displayName="PinInput";function i0(e){const{columns:r,sort:a,onSortClick:o,hasExpandColumn:i=!1,hasActionsColumn:c=!1}=e;return l.jsxs(Mt.Row,{children:[i?l.jsx(Mt.HeaderCell,{children:l.jsx("span",{className:"sr-only",children:"Expand"})}):null,r.map(d=>{const f=d.sortable===!0,h=a?.key===d.key;return l.jsx(Mt.HeaderCell,{align:d.align,onSort:f?()=>o(d.key):void 0,sortDirection:f?h?a?.direction:"none":void 0,style:d.width?{width:d.width}:void 0,children:d.label},d.key)}),c?l.jsx(Mt.HeaderCell,{children:l.jsx("span",{className:"sr-only",children:"Actions"})}):null]})}function WC(e){return l.jsx(Mt.Cell,{align:"right",children:l.jsxs(Nn,{children:[l.jsx(Nn.Trigger,{"aria-label":"Row actions",className:F("inline-flex size-7 items-center justify-center rounded-md","text-muted-foreground hover:bg-muted hover:text-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:l.jsx(J2,{"aria-hidden":"true",className:"size-4"})}),l.jsx(Nn.Content,{align:"end",children:e.children})]})})}function ZC(e,r){return r.render?r.render(e):String(e[r.key]??"")}function QC(e){const{columns:r,hasExpandColumn:a,hasActionsColumn:o,stickyHeader:i,className:c}=e,d=r.length+(a?1:0)+(o?1:0);return l.jsx("div",{"data-slot":"data-table",className:F("w-full",c),children:l.jsxs(Mt,{children:[l.jsx(Mt.Header,{className:i?"sticky top-0 bg-card":void 0,children:l.jsx(i0,{columns:r.map(f=>({...f,sortable:!1})),sort:null,onSortClick:()=>{},hasExpandColumn:a,hasActionsColumn:o})}),l.jsx(Mt.Body,{children:Array.from({length:5},(f,h)=>l.jsx(Mt.Row,{children:Array.from({length:d},(p,x)=>l.jsx(Mt.Cell,{children:l.jsx(s0,{className:"h-4 w-full"})},`s-${h}-${x}`))},`skeleton-${h}`))})]})})}function uI(e,r){return e===r?0:e==null?-1:r==null?1:typeof e=="number"&&typeof r=="number"?e-r:String(e).localeCompare(String(r))}function JC(e){const{data:r,columns:a,defaultSort:o,sort:i,onSortChange:c}=e,d=c!==void 0,[f,h]=m.useState(o??null),p=d?i??null:f;function x(b){let w;p?.key!==b?w={key:b,direction:"asc"}:p.direction==="asc"?w={key:b,direction:"desc"}:w=null,d?c?.(w):(h(w),e.onUncontrolledSortChange?.())}const y=m.useMemo(()=>{if(d||p===null)return r;const b=a.find(S=>S.key===p.key);return b?[...r].sort((S,N)=>{const k=b.render?null:S[p.key],C=b.render?null:N[p.key],E=uI(k,C);return p.direction==="asc"?E:-E}):r},[r,p,d,a]);return{sort:p,handleSort:x,sortedData:y}}function E1(e){return e.height<=0?null:l.jsx("tr",{"data-slot":`data-table-virtual-spacer-${e.slot}`,role:"presentation",style:{height:`${e.height}px`},children:l.jsx("td",{colSpan:e.colSpan,style:{padding:0}})})}function dI(e){const{data:r,columns:a,rowKey:o,virtualized:i,rowActions:c,defaultSort:d,sort:f,onSortChange:h,loading:p=!1,emptyState:x,className:y}=e,b=Math.max(1,i.rowHeight),w=m.useRef(null),{sort:S,handleSort:N,sortedData:k}=JC({data:r,columns:a,defaultSort:d,sort:f,onSortChange:h}),C=gL({...i.virtualizerOptions,count:k.length,getScrollElement:()=>w.current,estimateSize:()=>b,overscan:i.overscan??5});if(p)return l.jsx(QC,{columns:a,hasExpandColumn:!1,hasActionsColumn:c!==void 0,stickyHeader:!0,className:y});if(k.length===0)return l.jsx("div",{className:F("w-full",y),children:x??l.jsx(rn,{title:"No data",description:"There's nothing here yet."})});const E=C.getVirtualItems(),T=C.getTotalSize(),M=E[0],_=E[E.length-1],L=M?M.start:0,B=_?T-_.end:T,A=a.length+(c?1:0);return l.jsx("div",{"data-slot":"data-table-virtual-body",className:F("w-full",y),children:l.jsx("section",{ref:w,"aria-label":"Table scroll area",tabIndex:0,className:"overflow-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",style:{height:i.height},"data-slot":"data-table-virtual-scroll",children:l.jsxs(Mt,{"aria-rowcount":k.length+1,children:[l.jsx(Mt.Header,{className:"sticky top-0 z-10 bg-card",children:l.jsx(i0,{columns:a,sort:S,onSortClick:N,hasActionsColumn:c!==void 0})}),l.jsxs(Mt.Body,{children:[l.jsx(E1,{slot:"top",height:L,colSpan:A}),E.map(oe=>{const q=k[oe.index];return l.jsxs(Mt.Row,{"aria-rowindex":oe.index+2,style:{height:`${b}px`},children:[a.map(W=>l.jsx(Mt.Cell,{align:W.align,className:F("overflow-hidden py-1.5",W.className),children:ZC(q,W)},W.key)),c?l.jsx(WC,{children:c(q)}):null]},o(q))}),l.jsx(E1,{slot:"bottom",height:B,colSpan:A})]})]})})})}function fI(e){return e.virtualized?l.jsx(dI,{...e,virtualized:e.virtualized}):l.jsx(mI,{...e})}function mI(e){const{data:r,columns:a,rowKey:o,stickyHeader:i=!0,expandable:c,expandMode:d="multiple",rowActions:f,pagination:h,defaultSort:p,sort:x,onSortChange:y,loading:b=!1,emptyState:w,className:S}=e,N=h?.controlledPage!==void 0,[k,C]=m.useState(0),E=N?h?.controlledPage??0:k,T=Math.max(1,h?.pageSize??10),[M,_]=m.useState(new Set),{sort:L,handleSort:B,sortedData:A}=JC({data:r,columns:a,defaultSort:p,sort:x,onSortChange:y,onUncontrolledSortChange:()=>{N||C(0)}});function oe(Z){const D=Z-1;N?h?.onPageChange?.(D):C(D)}function q(Z){_(d==="single"?D=>D.has(Z)?new Set:new Set([Z]):D=>{const V=new Set(D);return V.has(Z)?V.delete(Z):V.add(Z),V})}const W=m.useMemo(()=>{if(!h||N)return A;const Z=E*T;return A.slice(Z,Z+T)},[A,h,N,E,T]),ee=(c?1:0)+(f?1:0),re=a.length+ee;if(b)return l.jsx(QC,{columns:a,hasExpandColumn:c!==void 0,hasActionsColumn:f!==void 0,stickyHeader:i,className:S});if(A.length===0)return l.jsx("div",{className:F("w-full",S),children:w??l.jsx(rn,{title:"No data",description:"There's nothing here yet."})});const te=h?Math.ceil(A.length/T):1;return l.jsxs("div",{className:F("w-full",S),children:[l.jsxs(Mt,{children:[l.jsx(Mt.Header,{className:i?"sticky top-0 z-10 bg-card":void 0,children:l.jsx(i0,{columns:a,sort:L,onSortClick:B,hasExpandColumn:c!==void 0,hasActionsColumn:f!==void 0})}),l.jsx(Mt.Body,{children:W.map(Z=>{const D=o(Z),V=c?c(Z):null,ae=V!=null,Q=M.has(D);return l.jsxs(m.Fragment,{children:[l.jsxs(Mt.Row,{children:[c?l.jsx(Mt.Cell,{children:ae?l.jsx("button",{type:"button",onClick:()=>q(D),"aria-expanded":Q,"aria-controls":`expanded-${D}`,"aria-label":Q?"Collapse row":"Expand row",className:"inline-flex items-center justify-center rounded-md p-0.5 hover:bg-muted",children:Q?l.jsx(Qr,{"aria-hidden":"true",className:"size-4"}):l.jsx(Jr,{"aria-hidden":"true",className:"size-4"})}):null}):null,a.map(xe=>l.jsx(Mt.Cell,{align:xe.align,className:xe.className,children:ZC(Z,xe)},xe.key)),f?l.jsx(WC,{children:f(Z)}):null]}),Q&&ae?l.jsx("tr",{id:`expanded-${D}`,children:l.jsx("td",{colSpan:re,className:"bg-muted/30 p-4",children:V})}):null]},D)})})]}),h&&te>1?l.jsx("div",{className:"mt-4 flex items-center justify-end",children:l.jsx(UC,{currentPage:E+1,totalPages:te,onPageChange:oe})}):null]})}var hI=m.forwardRef(({title:e,description:r,onTitleChange:a,primaryAction:o,search:i,onFilterClick:c,loading:d=!1,loadingNode:f,error:h,empty:p,children:x,className:y},b)=>{m.useEffect(()=>{a?.(e)},[e,a]);const w=i!==void 0||o!==void 0||c!==void 0;let S;if(d)S=f??l.jsxs(_p,{className:"flex items-center justify-center gap-3 p-12 text-muted-foreground",children:[l.jsx(qs,{"aria-hidden":"true",className:"size-5 animate-spin"}),l.jsx("span",{className:"font-sans text-body-sm",children:"Loading…"})]});else if(h)S=l.jsxs(_p,{className:"flex flex-col items-center gap-3 p-8 text-center",children:[l.jsx(Ni,{"aria-hidden":"true",className:"size-8 text-destructive"}),l.jsx("p",{className:"font-sans text-body-sm text-foreground",children:h.message}),l.jsxs("div",{className:"flex items-center gap-3",children:[h.onRetry?l.jsx("button",{type:"button",onClick:h.onRetry,className:F("inline-flex items-center rounded-md border border-border/40 px-3 py-1.5","font-sans text-body-sm text-foreground","transition-colors hover:bg-muted"),children:"Retry"}):null,h.docsHref?l.jsx("a",{href:h.docsHref,className:"font-sans text-body-sm text-primary hover:underline",children:"View docs"}):null]})]});else if(p){const N=p.action;S=l.jsx(rn,{icon:p.icon,title:p.title,description:p.description,action:N?l.jsx("button",{type:"button",onClick:N.onClick,className:F("inline-flex items-center rounded-md bg-primary px-3 py-1.5","font-medium font-sans text-body-sm text-primary-foreground","transition-colors hover:bg-primary-deep"),children:N.label}):void 0})}else S=x;return l.jsxs("main",{"data-slot":"page-shell",ref:b,"aria-busy":d||void 0,className:F("flex flex-col gap-6",y),children:[l.jsxs("header",{className:"flex flex-col gap-1",children:[l.jsx("h1",{className:"font-display font-semibold text-display-sm text-foreground tracking-tight",children:e}),r?l.jsx("p",{className:"font-sans text-body-md text-muted-foreground",children:r}):null]}),w?l.jsx(XC,{search:i,primaryAction:o,onFilterClick:c}):null,l.jsx("div",{className:"flex flex-col gap-6",children:S})]})});hI.displayName="PageShell";function R1(e,r){const[a,o]=e,[i,c]=r,d=o-a;return f=>d===0?i:i+(f-a)/d*(c-i)}function pI(e){const r=Math.max(0,...e.filter(o=>Number.isFinite(o)));if(r<=0)return 0;const a=10**Math.floor(Math.log10(r));return Math.ceil(r/a)*a}function gI(e,r,a){const o=e.filter(i=>Number.isFinite(i.y));return o.length===0?"":o.map((i,c)=>`${c===0?"M":"L"}${r(i.x).toFixed(2)},${a(i.y).toFixed(2)}`).join(" ")}var pu=600,fn={top:8,right:8,bottom:4,left:40},xI=5,vI=m.forwardRef(({title:e,series:r,height:a=180,valueFormatter:o=f=>String(f),className:i,...c},d)=>{const f=r.flatMap(C=>C.points);if(!f.some(C=>Number.isFinite(C.y)))return l.jsxs("figure",{"data-slot":"trend-chart",ref:d,className:F("space-y-1",i),"aria-label":`${e} — no data`,...c,children:[l.jsx("figcaption",{className:"font-semibold text-label-caps text-muted-foreground uppercase",children:e}),l.jsx("div",{"data-slot":"trend-chart-empty",className:"flex items-center justify-center rounded-md border border-dashed text-body-sm text-muted-foreground",style:{height:a},children:"No data in this time range."})]});const p=f.map(C=>C.x),x=Math.min(...p),y=Math.max(...p),b=pI(f.map(C=>C.y))||1,w=Array.from(new Set(f.map(C=>C.x))).sort((C,E)=>C-E),S=r.map(C=>new Map(C.points.map(E=>[E.x,E.y]))),N=R1([x,y],[fn.left,pu-fn.right]),k=R1([0,b],[a-fn.bottom,fn.top]);return l.jsxs("figure",{"data-slot":"trend-chart",ref:d,className:F("space-y-1",i),...c,children:[l.jsx("figcaption",{className:"font-semibold text-label-caps text-muted-foreground uppercase",children:e}),l.jsxs("svg",{viewBox:`0 0 ${pu} ${a}`,preserveAspectRatio:"none",role:"img","aria-label":`${e} trend`,className:"w-full",style:{height:a},children:[l.jsx("line",{x1:fn.left,y1:a-fn.bottom,x2:pu-fn.right,y2:a-fn.bottom,className:"stroke-border",strokeWidth:1}),l.jsx("line",{x1:fn.left,y1:fn.top,x2:pu-fn.right,y2:fn.top,className:"stroke-border/50",strokeWidth:1,strokeDasharray:"2 3"}),l.jsx("text",{x:4,y:fn.top+8,className:"fill-muted-foreground text-[10px]",children:o(b)}),l.jsx("text",{x:4,y:a-fn.bottom,className:"fill-muted-foreground text-[10px]",children:"0"}),r.map(C=>l.jsxs("g",{children:[l.jsx("path",{"data-slot":"trend-chart-line","data-series":C.name,d:gI(C.points,N,k),fill:"none",stroke:C.color,strokeWidth:1.5,children:l.jsx("title",{children:C.name})}),C.points.length<xI?C.points.filter(E=>Number.isFinite(E.y)).map((E,T)=>l.jsx("circle",{"data-slot":"trend-chart-dot",cx:N(E.x),cy:k(E.y),r:2.5,fill:C.color,children:l.jsx("title",{children:C.name})},`${C.name}-${E.x}-${T}`)):null]},C.name))]}),l.jsx("ul",{"data-slot":"trend-chart-legend",className:"flex flex-wrap gap-3 text-body-sm text-muted-foreground",children:r.map(C=>l.jsxs("li",{className:"flex items-center gap-1",children:[l.jsx("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:C.color}}),C.name]},C.name))}),l.jsxs("table",{"data-slot":"trend-chart-table",className:"sr-only",children:[l.jsxs("caption",{children:[e," — data table"]}),l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Point"}),r.map(C=>l.jsx("th",{children:C.name},C.name))]})}),l.jsx("tbody",{children:w.map((C,E)=>l.jsxs("tr",{children:[l.jsx("td",{children:E+1}),r.map((T,M)=>{const _=S[M]?.get(C);return l.jsx("td",{children:_!==void 0&&Number.isFinite(_)?o(_):"—"},T.name)})]},C))})]})]})});vI.displayName="TrendChart";var T1={done:Rn,active:qs,failed:Gn,pending:PM},yI={done:"text-success",active:"animate-spin text-primary",failed:"text-destructive",pending:"text-muted-foreground"},bI={done:"font-medium text-foreground",active:"font-semibold text-primary",failed:"font-semibold text-destructive",pending:"font-medium text-muted-foreground"},_1={done:" — completed",active:null,failed:" — failed",pending:" — not started"},wI=m.forwardRef(({label:e,steps:r,orientation:a="vertical",className:o,...i},c)=>l.jsx("ol",{"data-slot":"stepper","data-orientation":a,ref:c,"aria-label":e,className:F(a==="horizontal"?"flex flex-wrap gap-x-6 gap-y-3":"space-y-3",o),...i,children:r.map(d=>{const f=Object.hasOwn(T1,d.status)?d.status:"pending",h=T1[f];return l.jsxs("li",{"data-slot":"stepper-step","data-state":f,"aria-current":f==="active"?"step":void 0,className:"flex items-start gap-3",children:[l.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full border border-border","data-slot":"stepper-icon",children:l.jsx(h,{className:F("size-3",yI[f])})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("p",{"data-slot":"stepper-label",title:d.label,className:F("truncate text-body-sm",bI[f]),children:[d.label,_1[f]&&l.jsx("span",{className:"sr-only",children:_1[f]})]}),d.description&&l.jsx("p",{className:"text-label text-muted-foreground",children:d.description}),d.timestamp&&l.jsx("p",{"data-slot":"stepper-timestamp",className:"text-label text-muted-foreground",children:d.timestamp}),f==="failed"&&d.retry&&l.jsx("div",{"data-slot":"stepper-retry",className:"mt-1",children:d.retry})]})]},d.id)})}));wI.displayName="Stepper";function eE(e,r){const a=Object.entries(r??{});if(a.length===0)return!0;if(e.type===""){const o=a.flatMap(([,i])=>i);return o.length===0?!0:o.some(i=>e.name.toLowerCase().endsWith(i.toLowerCase()))}return a.some(([o,i])=>o===e.type||o.endsWith("/*")&&e.type.startsWith(o.slice(0,-1))?!0:i.some(c=>e.name.toLowerCase().endsWith(c.toLowerCase())))}function SI(e){const r=Object.values(e).flat();return r.length>0?r.join(", "):Object.keys(e).join(", ")}function jI(e,r={}){const{accept:a,maxSize:o,minSize:i,maxFiles:c,multiple:d=!0,validator:f}=r,h=[],p=[];for(const y of e){const b=[];a&&!eE(y,a)&&b.push({code:"file-invalid-type",message:`File type must be one of ${SI(a)}`}),o!==void 0&&y.size>o&&b.push({code:"file-too-large",message:`File is larger than ${o} bytes`}),i!==void 0&&y.size<i&&b.push({code:"file-too-small",message:`File is smaller than ${i} bytes`});const w=f?.(y);w&&b.push(...Array.isArray(w)?w:[w]),b.length>0?p.push({file:y,errors:b}):h.push(y)}if(!d&&h.length>1||c!==void 0&&c>=1&&h.length>c){const y=d?c:1;for(const b of h)p.push({file:b,errors:[{code:"too-many-files",message:`Too many files — at most ${y} allowed`}]});h.length=0}return{accepted:h,rejections:p}}function M1(e){return Array.from(e.dataTransfer?.types??[]).includes("Files")}var NI=m.forwardRef(({label:e,disabled:r=!1,accept:a,maxSize:o,minSize:i,maxFiles:c,multiple:d=!0,validator:f,onFilesAccepted:h,onFilesRejected:p,instructions:x,className:y,...b},w)=>{const S=m.useRef([]),N=m.useRef(null),[k,C]=m.useState("idle"),[E,T]=m.useState([]),M={accept:a,maxSize:o,minSize:i,maxFiles:c,multiple:d,validator:f},_=re=>{if(re.length===0)return;const te=jI(re,M);T(te.rejections),te.accepted.length>0&&h?.(te.accepted),te.rejections.length>0&&p?.(te.rejections)},L=()=>{const re=N.current;!re||r||(re.value="",re.click())},B=re=>{re.target===re.currentTarget&&(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),L())},A=re=>{if(re.preventDefault(),r||!M1(re))return;S.current=[...S.current,re.target];const te=Array.from(re.dataTransfer?.items??[]).filter(D=>D.kind==="file"),Z=a!==void 0&&te.length>0&&te.some(D=>D.type!==""&&!eE(new File([],D.getAsFile?.()?.name??"",{type:D.type}),a));C(Z?"drag-reject":"drag-over")},oe=re=>{if(re.preventDefault(),re.dataTransfer)try{re.dataTransfer.dropEffect="copy"}catch{}},q=re=>{re.preventDefault();const te=re.currentTarget,Z=S.current.filter(V=>te.contains(V)),D=Z.indexOf(re.target);D!==-1&&Z.splice(D,1),S.current=Z,Z.length===0&&C("idle")},W=re=>{re.preventDefault(),S.current=[],C("idle"),!(r||!M1(re))&&_(Array.from(re.dataTransfer?.files??[]))},ee=r?"disabled":k;return l.jsxs("div",{className:"space-y-2",children:[l.jsx("div",{"data-slot":"file-dropzone","data-state":ee,ref:w,role:"button","aria-label":e,"aria-disabled":r||void 0,tabIndex:r?void 0:0,onClick:()=>L(),onKeyDown:B,onDragEnter:A,onDragOver:oe,onDragLeave:q,onDrop:W,className:F("flex min-h-24 cursor-pointer flex-col items-center justify-center gap-1 rounded-md border border-border border-dashed p-4 text-center",ee==="drag-over"&&"border-primary bg-primary/5",ee==="drag-reject"&&"border-destructive bg-destructive/5",ee==="disabled"&&"cursor-not-allowed opacity-50",y),...b,children:l.jsx("div",{"data-slot":"file-dropzone-instructions",className:"text-body-sm text-muted-foreground",children:x??"Drag files here or click to browse."})}),l.jsx("input",{"data-slot":"file-dropzone-input",ref:N,type:"file","aria-hidden":"true",tabIndex:-1,multiple:d,accept:a?Object.entries(a).flatMap(([re,te])=>[re,...te]).join(","):void 0,disabled:r,className:"sr-only",onChange:re=>_(Array.from(re.target.files??[]))}),E.length>0&&l.jsx("ul",{"data-slot":"file-dropzone-rejections",className:"space-y-0.5 text-destructive text-label",children:E.map(re=>l.jsxs("li",{children:[re.file.name," — ",re.errors.map(te=>te.message).join("; ")]},re.file.name))})]})});NI.displayName="FileDropzone";var kI=m.forwardRef(({className:e,title:r,description:a,metrics:o,columns:i,...c},d)=>l.jsxs("div",{"data-slot":"metrics-panel",ref:d,className:F("rounded-xl border border-border bg-card p-5 shadow-sm",e),...c,children:[r||a?l.jsxs("header",{className:"mb-4 grid gap-0.5",children:[r?l.jsx("h3",{className:"font-display text-title-md tracking-tight",children:r}):null,a?l.jsx("p",{className:"text-body-sm text-muted-foreground",children:a}):null]}):null,l.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:i?`repeat(${i}, minmax(0, 1fr))`:"repeat(auto-fit, minmax(180px, 1fr))"},children:o.map(f=>l.jsx(CI,{metric:f},f.label))})]}));kI.displayName="MetricsPanel";function CI({metric:e}){const r=e.onClick!==void 0,a=r?"button":"div",o=r?e.actionLabel??`View ${e.label} details`:void 0;return l.jsxs(a,{type:r?"button":void 0,onClick:e.onClick,"aria-label":o,className:F("flex flex-col gap-2 rounded-lg border border-border/30 bg-muted/30 p-4 text-left","transition-colors duration-base ease-out-soft",r&&"hover:border-primary/40 hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),children:[l.jsx("span",{className:"font-sans text-label-caps text-muted-foreground uppercase",children:e.label}),l.jsxs("div",{className:"flex items-baseline gap-1.5",children:[l.jsx("span",{className:"font-bold font-display text-display-md tabular-nums leading-none",children:e.value}),e.unit?l.jsx("span",{className:"font-mono text-body-sm text-muted-foreground",children:e.unit}):null]}),l.jsxs("div",{className:"flex items-center gap-2",children:[e.delta?l.jsx(EI,{metric:e}):null,e.sparkline&&e.sparkline.length>0?l.jsx(RI,{values:e.sparkline}):null]})]})}function EI({metric:e}){const r=e.deltaGood===void 0?"text-muted-foreground":e.deltaGood?"text-success":"text-destructive",a=e.deltaGood===!1?ng:rg;return l.jsxs("span",{className:F("inline-flex items-center gap-1 font-mono text-body-sm",r),children:[l.jsx(a,{className:"size-3"})," ",e.delta]})}function RI({values:e}){const r=e.map(a=>Math.max(0,Math.min(1,a)));return l.jsx("span",{className:"ml-auto flex h-6 items-end gap-[2px]","aria-hidden":"true",children:r.map((a,o)=>l.jsx("span",{className:"w-[3px] rounded-sm bg-primary/60",style:{height:`${Math.max(8,a*100)}%`}},o))})}var TI=m.forwardRef(({className:e,providers:r,onSelect:a,vertical:o,...i},c)=>l.jsx("div",{"data-slot":"social-auth-row",ref:c,className:F("grid gap-2",o?"grid-cols-1":`grid-cols-${Math.min(r.length,4)}`,e),style:o?void 0:{gridTemplateColumns:`repeat(${r.length}, minmax(0, 1fr))`},...i,children:r.map(d=>{const f=d.icon;return l.jsxs("button",{type:"button",onClick:()=>a?.(d.id),className:F("inline-flex h-10 items-center justify-center gap-2 rounded-lg border border-border bg-card","px-4 font-medium font-sans text-body-sm text-foreground","transition-colors duration-base ease-out-soft","hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:[l.jsx(f,{className:"size-4","aria-hidden":"true"}),d.label]},d.id)})}));TI.displayName="SocialAuthRow";var _I=m.forwardRef(({className:e,left:r,right:a,footer:o,reverse:i,...c},d)=>l.jsxs("div",{"data-slot":"login-split",ref:d,className:F("flex min-h-screen flex-col bg-background",e),...c,children:[l.jsxs("div",{className:F("grid flex-1 grid-cols-1 lg:grid-cols-2",i&&"lg:[&>*:first-child]:order-2"),children:[l.jsx("div",{className:"flex items-center justify-center px-6 py-12 lg:px-12",children:l.jsx("div",{className:"w-full max-w-md",children:r})}),l.jsx("div",{className:F("relative flex items-center justify-center px-6 py-12 lg:px-12","bg-dotted-violet bg-muted/60"),children:l.jsx("div",{className:"w-full max-w-lg",children:a})})]}),o?l.jsx("footer",{className:"border-border/40 border-t px-6 py-3 text-center text-body-sm text-muted-foreground",children:o}):null]}));_I.displayName="LoginSplit";var MI={idle:"default",permission_required:"warning",starting:"primary",running:"primary",verifying:"primary",completed:"success",failed:"destructive"},AI={idle:"muted",permission_required:"warning",starting:"primary",running:"primary",verifying:"primary",completed:"success",failed:"destructive"},DI={idle:"Idle",permission_required:"Permission required",starting:"Starting up",running:"Running",verifying:"Verifying",completed:"Completed",failed:"Failed"},OI=m.forwardRef(({className:e,title:r,status:a,onToggle:o,actions:i,...c},d)=>l.jsxs("header",{"data-slot":"task-header",ref:d,className:F("flex items-center justify-between gap-3 rounded-xl border border-border/40 bg-card px-4 py-3",e),...c,children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx("h2",{className:"truncate font-display text-title-lg tracking-tight",children:r}),o?l.jsx("button",{type:"button",onClick:o,"aria-label":"Toggle task details",className:"rounded-md p-1 text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:l.jsx(Qr,{className:"size-4"})}):null]}),l.jsxs("div",{className:"flex items-center gap-2",children:[a?l.jsxs(nt,{variant:MI[a],children:[l.jsx(nt.Dot,{tone:AI[a],pulse:a==="running"||a==="starting"||a==="verifying"}),DI[a]]}):null,i]})]}));OI.displayName="TaskHeader";var zI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"default",idle:"default"},LI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"muted",idle:"muted"},PI={queued:"Queued",building:"Building",deploying:"Deploying",live:"Live",failed:"Failed",cancelled:"Cancelled",idle:"Idle"},II=e=>e==="building"||e==="deploying"||e==="queued",UI=m.forwardRef(({className:e,deployment:r,actions:a,...o},i)=>{const c=zI[r.status],d=LI[r.status];return l.jsxs("div",{"data-slot":"deployment-row",ref:i,className:F("grid grid-cols-[auto_1fr_auto] items-center gap-4 border-border/40 border-b px-4 py-3","last:border-b-0","transition-colors hover:bg-muted/40",e),...o,children:[l.jsxs(nt,{variant:c,className:"min-w-[88px] justify-center",children:[l.jsx(nt.Dot,{tone:d,pulse:II(r.status)}),PI[r.status]]}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate font-medium text-body-sm text-foreground",children:r.commitMessage}),l.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-2 text-body-sm text-muted-foreground",children:[l.jsx("span",{className:"font-mono text-code-sm",children:r.environment}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{className:"inline-flex items-center gap-1 font-mono text-code-sm",children:[l.jsx(ki,{className:"size-3"})," ",r.commitSha.slice(0,7)]}),l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{className:"font-mono text-code-sm",children:r.branch}),r.author?l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:["by ",r.author.name]})]}):null,r.duration?l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{className:"font-mono text-code-sm",children:r.duration})]}):null,l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:r.timeAgo})]})]}),a?l.jsx("div",{className:"flex items-center gap-1",children:a}):null]})});UI.displayName="DeploymentRow";var BI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"default",idle:"default"},HI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"muted",idle:"muted"},FI=m.forwardRef(({className:e,project:r,href:a,actions:o,detailed:i=!0,...c},d)=>{const f=t0(a),h=f!==void 0,p=h?"a":"div",x=r.status==="building"||r.status==="deploying"||r.status==="queued",y=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"truncate font-display text-title-md tracking-tight",children:r.name}),r.framework?l.jsx("p",{className:"mt-0.5 font-mono text-label-caps text-muted-foreground uppercase",children:r.framework}):null]}),l.jsxs(nt,{variant:BI[r.status],children:[l.jsx(nt.Dot,{tone:HI[r.status],pulse:x}),r.status==="live"?"Live":r.status==="building"?"Building":r.status==="deploying"?"Deploying":r.status==="queued"?"Queued":r.status==="failed"?"Failed":r.status==="idle"?"Idle":"Cancelled"]})]}),i&&r.description?l.jsx("p",{className:"line-clamp-2 text-body-sm text-muted-foreground",children:r.description}):null,i&&r.commitMessage?l.jsx("p",{className:"line-clamp-1 font-mono text-code-sm text-foreground/80",children:r.commitMessage}):null,l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-code-sm text-muted-foreground",children:[l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(v3,{className:"size-3"})," ",r.branch]}),l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(ki,{className:"size-3"})," ",r.commitSha.slice(0,7)]}),r.region?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(op,{className:"size-3"})," ",r.region]}):null,l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsx("span",{children:r.lastDeployedAt})]}),o?l.jsx("div",{className:"flex items-center gap-2 pt-2",children:o}):null]});return l.jsx(p,{"data-slot":"project-card",ref:d,href:f,className:F("group relative flex flex-col gap-3 rounded-xl border border-border bg-card p-5 shadow-sm","transition-[box-shadow,transform,border-color] duration-base ease-out-soft","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",h&&"hover:-translate-y-px cursor-pointer hover:border-primary/50 hover:shadow-md",e),...c,children:y})});FI.displayName="ProjectCard";var $I=["production","staging","preview","all"],VI=m.forwardRef(({className:e,vars:r,onAdd:a,onRemove:o,scopeOptions:i=$I,...c},d)=>{const[f,h]=m.useState(""),[p,x]=m.useState(""),[y,b]=m.useState(i[0]??"production"),w=()=>{const S=f.trim();S&&(a?.({key:S,value:p,scope:y,masked:!0}),h(""),x(""))};return l.jsxs("div",{"data-slot":"env-var-editor",ref:d,className:F("rounded-xl border border-border bg-card p-5 shadow-sm",e),...c,children:[l.jsx("header",{className:"mb-4 flex items-baseline justify-between gap-3",children:l.jsxs("div",{children:[l.jsx("h3",{className:"font-display text-title-md tracking-tight",children:"Environment variables"}),l.jsxs("p",{className:"text-body-sm text-muted-foreground",children:[r.length," ",r.length===1?"variable":"variables"]})]})}),a?l.jsxs("form",{className:"mb-4 grid grid-cols-[2fr_3fr_auto_auto] gap-2",onSubmit:S=>{S.preventDefault(),w()},children:[l.jsx(ko,{placeholder:"DATABASE_URL",value:f,onChange:S=>h(S.target.value),className:"font-mono","aria-label":"Variable name"}),l.jsx(ko,{placeholder:"postgresql://…",value:p,onChange:S=>x(S.target.value),className:"font-mono","aria-label":"Variable value"}),l.jsx("select",{value:y,onChange:S=>b(S.target.value),"aria-label":"Variable scope",className:F("h-10 rounded-md border border-input bg-card px-3","font-sans text-body-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card"),children:i.map(S=>l.jsx("option",{value:S,children:S},S))}),l.jsxs(He,{type:"submit",children:[l.jsx(Ps,{})," Add"]})]}):null,l.jsxs("ul",{className:"divide-y divide-border/30",children:[r.map(S=>l.jsx(qI,{entry:S,...o?{onRemove:o}:{}},S.id)),r.length===0?l.jsx("li",{className:"py-8 text-center text-body-sm text-muted-foreground",children:"No environment variables yet."}):null]})]})});VI.displayName="EnvVarEditor";function qI({entry:e,onRemove:r}){const[a,o]=m.useState(!e.masked),i=a?e.value:"•".repeat(Math.min(e.value.length,12)||8),c=()=>{typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(e.value).catch(d=>{})};return l.jsxs("li",{className:"grid grid-cols-[2fr_3fr_auto_auto] items-center gap-3 py-3",children:[l.jsx("span",{className:"truncate font-mono text-code-sm text-foreground",children:e.key}),l.jsxs("span",{className:"flex items-center gap-2 truncate font-mono text-code-sm text-muted-foreground",children:[e.readonly?l.jsx($3,{className:"size-3","aria-hidden":"true"}):null,i]}),l.jsx(nt,{variant:e.scope==="production"?"primary":"default",children:e.scope??"all"}),l.jsxs("div",{className:"flex items-center gap-0.5",children:[e.masked?l.jsx(He,{size:"icon",variant:"ghost",onClick:()=>o(d=>!d),"aria-label":a?"Hide value":"Reveal value",children:a?l.jsx(QM,{}):l.jsx(e3,{})}):null,l.jsx(He,{size:"icon",variant:"ghost",onClick:c,"aria-label":"Copy value",children:l.jsx(Qu,{})}),r&&!e.readonly?l.jsx(He,{size:"icon",variant:"ghost",onClick:()=>r(e.id),"aria-label":`Remove ${e.key}`,children:l.jsx(iw,{})}):null]})]})}var GI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"default",idle:"default"},YI={queued:"warning",building:"primary",deploying:"primary",live:"success",failed:"destructive",cancelled:"muted",idle:"muted"},KI={queued:"Queued",building:"Building",deploying:"Deploying",live:"Live",failed:"Failed",cancelled:"Cancelled",idle:"Idle"},XI=m.forwardRef(({className:e,env:r,actions:a,...o},i)=>l.jsxs("article",{"data-slot":"preview-env-card",ref:i,className:F("rounded-xl border border-border bg-card p-5 shadow-sm","transition-[border-color,box-shadow] duration-base ease-out-soft","hover:border-primary/40",e),...o,children:[l.jsxs("header",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("p",{className:"flex items-center gap-2 font-mono text-label-caps text-muted-foreground uppercase",children:[l.jsx(rw,{className:"size-3"})," PR #",r.prNumber]}),l.jsx("h3",{className:"mt-1 truncate font-display text-title-md tracking-tight",children:r.prTitle}),l.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-body-sm text-muted-foreground",children:[l.jsx("span",{className:"font-mono text-code-sm",children:r.branch}),r.author?l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:["by ",r.author.name]})]}):null,l.jsx("span",{"aria-hidden":"true",children:"·"}),l.jsxs("span",{children:["opened ",r.createdAt]})]})]}),l.jsxs(nt,{variant:"primary",children:[l.jsx(tg,{className:"size-3"})," ",r.services.length," service",r.services.length===1?"":"s"]})]}),l.jsx("ul",{className:"mt-4 divide-y divide-border/30 rounded-lg border border-border/30",children:r.services.map(c=>{const d=t0(c.url);return l.jsxs("li",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[l.jsx("span",{className:"font-mono text-code-sm text-foreground",children:c.name}),l.jsxs("div",{className:"flex items-center gap-2",children:[d?l.jsxs("a",{href:d,className:"inline-flex items-center gap-1 font-mono text-code-sm text-primary hover:underline",target:"_blank",rel:"noreferrer",children:[d.replace(/^https?:\/\//,""),l.jsx(ew,{className:"size-3"})]}):l.jsx("span",{className:"font-mono text-code-sm text-muted-foreground",children:"internal"}),l.jsxs(nt,{variant:GI[c.status],children:[l.jsx(nt.Dot,{tone:YI[c.status],pulse:c.status==="building"||c.status==="deploying"||c.status==="queued"}),KI[c.status]]})]})]},c.name)})}),a?l.jsx("div",{className:"mt-4 flex items-center gap-2",children:a}):null]}));XI.displayName="PreviewEnvCard";var WI={verified:"success",pending:"warning",invalid:"destructive"},ZI={verified:"success",pending:"warning",invalid:"destructive"},QI={verified:"Verified",pending:"Pending DNS",invalid:"Invalid"},JI=m.forwardRef(({className:e,domains:r,onAdd:a,onRemove:o,onSetPrimary:i,...c},d)=>{const[f,h]=m.useState("");return l.jsxs("div",{"data-slot":"domain-config",ref:d,className:F("rounded-xl border border-border bg-card p-5 shadow-sm",e),...c,children:[l.jsx("header",{className:"mb-4 flex items-baseline justify-between gap-3",children:l.jsxs("div",{children:[l.jsx("h3",{className:"font-display text-title-md tracking-tight",children:"Domains"}),l.jsxs("p",{className:"text-body-sm text-muted-foreground",children:[r.length," configured"]})]})}),a?l.jsxs("form",{className:"mb-4 grid grid-cols-[1fr_auto] gap-2",onSubmit:p=>{p.preventDefault();const x=f.trim();x&&(a(x),h(""))},children:[l.jsx(ko,{placeholder:"api.acme.com",value:f,onChange:p=>h(p.target.value),"aria-label":"Hostname",className:"font-mono"}),l.jsxs(He,{type:"submit",children:[l.jsx(Ps,{})," Add domain"]})]}):null,l.jsxs("ul",{className:"grid gap-3",children:[r.map(p=>l.jsxs("li",{className:"grid gap-3 rounded-lg border border-border/40 p-4",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx(S3,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:"font-mono text-code-md text-foreground",children:p.hostname}),l.jsxs(nt,{variant:WI[p.status],children:[l.jsx(nt.Dot,{tone:ZI[p.status],pulse:p.status==="pending"}),QI[p.status]]}),p.tls===!0?l.jsxs(nt,{variant:"primary",children:[l.jsx(sw,{className:"size-3"})," TLS"]}):p.tls===!1?l.jsxs(nt,{variant:"destructive",children:[l.jsx(NA,{className:"size-3"})," No TLS"]}):null,p.primary?l.jsxs(nt,{variant:"accent",children:[l.jsx(Rn,{className:"size-3"})," Primary"]}):null,l.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[!p.primary&&i?l.jsx(He,{size:"sm",variant:"ghost",onClick:()=>i(p.id),children:"Set primary"}):null,o?l.jsx(He,{size:"icon",variant:"ghost",onClick:()=>o(p.id),"aria-label":`Remove ${p.hostname}`,children:l.jsx(iw,{})}):null]})]}),p.status==="pending"&&p.verificationRecord?l.jsxs("div",{className:"rounded-md border border-border/60 border-dashed bg-muted/30 p-3 font-mono text-code-sm",children:[l.jsx("p",{className:"mb-2 font-sans text-label-caps text-muted-foreground uppercase",children:"Add this DNS record to verify"}),l.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1",children:[l.jsx("span",{className:"text-muted-foreground",children:"type"}),l.jsx("span",{children:p.verificationRecord.type}),l.jsx("span",{className:"text-muted-foreground",children:"name"}),l.jsx("span",{children:p.verificationRecord.name}),l.jsx("span",{className:"text-muted-foreground",children:"value"}),l.jsx("span",{className:"break-all",children:p.verificationRecord.value})]})]}):null]},p.id)),r.length===0?l.jsx("li",{className:"rounded-lg border border-border/40 border-dashed p-8 text-center text-body-sm text-muted-foreground",children:"No domains yet. Add one to route traffic to this project."}):null]})]})});JI.displayName="DomainConfig";var eU=m.forwardRef(({className:e,history:r,onRollback:a,...o},i)=>{const[c,d]=m.useState(null),[f,h]=m.useState(null),p=async x=>{h(x);try{await a?.(x)}finally{h(null),d(null)}};return l.jsxs("div",{"data-slot":"rollback-ui",ref:i,className:F("rounded-xl border border-border bg-card p-5 shadow-sm",e),...o,children:[l.jsx("header",{className:"mb-4 flex items-baseline justify-between gap-3",children:l.jsxs("div",{children:[l.jsx("h3",{className:"font-display text-title-md tracking-tight",children:"Rollback"}),l.jsx("p",{className:"text-body-sm text-muted-foreground",children:"Instant rollback to a previous version. Verified in under 5 seconds."})]})}),l.jsx("ol",{className:"grid gap-2",children:r.map((x,y)=>{const b=x.isCurrent??y===0,w=c===x.id,S=f===x.id;return l.jsxs("li",{className:F("grid grid-cols-[auto_1fr_auto] items-center gap-3 rounded-lg border p-3",b?"border-primary/40 bg-primary/5":"border-border/40 bg-card"),children:[l.jsx("span",{className:F("grid size-8 place-items-center rounded-md",b?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),"aria-hidden":"true",children:b?l.jsx(Jp,{className:"size-4"}):l.jsx(ki,{className:"size-4"})}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("span",{className:"font-mono text-code-sm text-foreground",children:x.version}),b?l.jsx(nt,{variant:"success",children:"Current"}):null,x.duration?l.jsxs("span",{className:"font-mono text-code-sm text-muted-foreground",children:["· ",x.duration]}):null]}),l.jsxs("p",{className:"mt-0.5 truncate text-body-sm text-muted-foreground",children:[l.jsx("span",{className:"font-mono",children:x.commitSha.slice(0,7)})," ·"," ",x.commitMessage," · ",x.deployedAt]})]}),l.jsx("div",{children:b?null:w?l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(He,{size:"sm",variant:"ghost",onClick:()=>d(null),disabled:S,children:"Cancel"}),l.jsxs(He,{size:"sm",onClick:()=>p(x.id),disabled:S,children:[l.jsx(uA,{})," Confirm rollback"]})]}):l.jsxs(He,{size:"sm",variant:"secondary",onClick:()=>d(x.id),children:[l.jsx(Z5,{})," Roll back"]})})]},x.id)})})]})});eU.displayName="RollbackUI";var tE=m.createContext(!1);tE.Provider;function tU(){return m.useContext(tE)}var nU={command:"text-foreground",stdout:"text-muted-foreground",stderr:"text-destructive",ok:"text-success",prompt:"text-primary"},nE=m.forwardRef(({className:e,title:r="Terminal",lines:a,promptPrefix:o="$",live:i="off",...c},d)=>{const h=tU()?"off":i;return l.jsxs("div",{"data-slot":"terminal-panel",ref:d,className:gt("overflow-hidden rounded-xl border border-border bg-card",e),...c,children:[l.jsxs("header",{className:"flex items-center gap-2 border-border/40 border-b px-3 py-2",children:[l.jsx(AA,{className:"size-3.5 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:"font-sans text-label-caps text-muted-foreground uppercase tracking-wider",children:r})]}),l.jsx("ol",{className:"grid gap-0.5 px-3 py-2 font-mono text-code-sm","aria-live":h,"aria-atomic":"false",children:a.map(p=>{const x=p.kind??"stdout";return l.jsx("li",{className:gt("whitespace-pre-wrap",nU[x]),children:x==="command"?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"select-none text-primary",children:[o," "]}),p.content]}):x==="prompt"?l.jsx("span",{className:"motion-safe:animate-pulse",children:p.content}):p.content},p.id)})})]})});nE.displayName="TerminalPanel";var rU={added:"bg-success/10",removed:"bg-destructive/10",unchanged:"",meta:"bg-muted/60 text-primary"},aU={added:"+",removed:"-",unchanged:" ",meta:"@"},rE=m.forwardRef(({className:e,path:r,stats:a,hunks:o,...i},c)=>l.jsxs("div",{"data-slot":"diff-viewer",ref:c,className:gt("overflow-hidden rounded-xl border border-border bg-card font-mono",e),...i,children:[l.jsxs("header",{className:"flex items-center justify-between gap-3 border-border/40 border-b bg-muted/30 px-3 py-2",children:[l.jsx("span",{className:"truncate text-code-sm text-foreground",children:r}),a?l.jsxs("span",{className:"font-mono text-code-sm",children:[l.jsxs("span",{className:"text-success",children:["+",a.added]})," ",l.jsxs("span",{className:"text-destructive",children:["-",a.removed]})]}):null]}),l.jsx("ol",{className:"text-code-sm",children:o.map(d=>l.jsx("li",{children:d.collapsed?l.jsxs("div",{className:"px-3 py-1 text-muted-foreground italic",children:[d.lines.length," unmodified lines"]}):l.jsxs(l.Fragment,{children:[d.header?l.jsx("div",{className:"bg-muted/60 px-3 py-1 text-primary",children:d.header}):null,l.jsx("table",{className:"w-full border-collapse","aria-label":`Diff hunk for ${r}`,children:l.jsx("tbody",{children:d.lines.map((f,h)=>l.jsxs("tr",{className:rU[f.kind],children:[l.jsx("td",{className:"select-none px-2 text-right text-muted-foreground/60 tabular-nums",children:f.oldNumber??""}),l.jsx("td",{className:"select-none px-2 text-right text-muted-foreground/60 tabular-nums",children:f.newNumber??""}),l.jsx("td",{className:gt("select-none pr-1 pl-2",f.kind==="added"&&"text-success",f.kind==="removed"&&"text-destructive",f.kind==="meta"&&"text-primary"),children:aU[f.kind]}),l.jsx("td",{className:gt("w-full whitespace-pre",f.kind==="added"&&"text-success",f.kind==="removed"&&"text-destructive"),children:f.content})]},`${d.id}-${h}`))})})]})},d.id))})]}));rE.displayName="DiffViewer";var aE=m.forwardRef(({className:e,title:r="Files created",files:a,cta:o,...i},c)=>l.jsxs("section",{"data-slot":"created-files-card",ref:c,className:gt("rounded-xl border border-primary/40 bg-primary/5 p-4",e),...i,children:[l.jsxs("header",{className:"mb-3 flex items-center gap-2",children:[l.jsx($M,{className:"size-4 text-primary","aria-hidden":"true"}),l.jsx("h3",{className:"font-display text-title-md tracking-tight",children:r})]}),l.jsx("ul",{className:"grid gap-2",children:a.map(d=>{const f=d.icon??a3,h=d.href?"a":"div";return l.jsx("li",{children:l.jsxs(h,{href:d.href,target:d.href?"_blank":void 0,rel:d.href?"noreferrer":void 0,className:gt("flex items-center gap-3 rounded-md border border-border/40 bg-card px-3 py-2",d.href&&"transition-colors hover:border-primary/40 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[l.jsx(f,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate font-mono text-code-md text-foreground",children:d.name}),d.destination?l.jsxs("p",{className:"flex items-center gap-1 truncate text-body-sm text-muted-foreground",children:[l.jsx(ip,{className:"size-3 shrink-0","aria-hidden":"true"})," ",d.destination]}):null]}),d.size?l.jsx("span",{className:"font-mono text-code-sm text-muted-foreground",children:d.size}):null]})},d.id)})}),o?l.jsx("div",{className:"mt-3 flex justify-end",children:o}):null]}));aE.displayName="CreatedFilesCard";function oU(e){return e.toolName?e.toolName:e.type==="dynamic-tool"?"dynamic-tool":e.type.slice(5)}function sU(e){switch(e){case"input-streaming":return{icon:l.jsx(H3,{className:"size-3.5 animate-spin","aria-hidden":"true"}),label:"Streaming input",tone:"text-muted-foreground"};case"input-available":return{icon:l.jsx(Is,{className:"size-3.5","aria-hidden":"true"}),label:"Ready to call",tone:"text-primary"};case"approval-requested":return{icon:l.jsx(ch,{className:"size-3.5","aria-hidden":"true"}),label:"Awaiting approval",tone:"text-warning"};case"approval-responded":return{icon:l.jsx(ch,{className:"size-3.5","aria-hidden":"true"}),label:"Approval responded",tone:"text-primary"};case"output-available":return{icon:l.jsx(OM,{className:"size-3.5","aria-hidden":"true"}),label:"Completed",tone:"text-success"};case"output-error":return{icon:l.jsx(Ni,{className:"size-3.5","aria-hidden":"true"}),label:"Error",tone:"text-destructive"};case"output-denied":return{icon:l.jsx(ch,{className:"size-3.5","aria-hidden":"true"}),label:"Denied",tone:"text-destructive"};default:return{icon:l.jsx(Is,{className:"size-3.5","aria-hidden":"true"}),label:"Unknown",tone:"text-muted-foreground"}}}function A1(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Eu({part:e}){const r=oU(e),a=sU(e.state),o=A1(e.input),i=e.state==="output-available"?A1(e.output):e.errorText??"";return l.jsxs("div",{"data-slot":"tool-call-part",className:gt("my-3 overflow-hidden rounded-lg border border-border bg-card","shadow-sm"),"data-theo-tool-call":e.state,children:[l.jsxs("header",{className:"flex items-center justify-between gap-3 border-border border-b bg-muted/30 px-3 py-1.5",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[l.jsx(Is,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:"truncate font-mono text-foreground text-label",children:r})]}),l.jsxs("span",{className:gt("inline-flex items-center gap-1 text-label-caps uppercase tracking-wider",a.tone),children:[a.icon,l.jsx("span",{children:a.label})]})]}),o?l.jsxs("details",{className:"border-border border-b",open:e.state==="input-streaming",children:[l.jsx("summary",{className:"cursor-pointer px-3 py-1.5 font-mono text-label-caps text-muted-foreground uppercase tracking-wider hover:text-foreground",children:"Input"}),l.jsx("pre",{className:"overflow-x-auto bg-muted/20 px-3 py-2 text-code-sm",children:l.jsx("code",{children:o})})]}):null,i?l.jsxs("details",{open:e.state==="output-error"||e.state==="output-available",children:[l.jsx("summary",{className:gt("cursor-pointer px-3 py-1.5 font-mono text-label-caps uppercase tracking-wider hover:text-foreground",e.state==="output-error"?"text-destructive":"text-muted-foreground"),children:e.state==="output-error"?"Error":"Output"}),l.jsx("pre",{className:gt("overflow-x-auto px-3 py-2 text-code-sm",e.state==="output-error"?"bg-destructive/5":"bg-muted/20"),children:l.jsx("code",{children:i})})]}):null]})}function lU(e){return e.toolName?e.toolName:e.type==="dynamic-tool"?"dynamic-tool":e.type.slice(5)}var iU=[["diff",["diff","patch"]],["created-files",["edit_file","write_file","create_file","created_file"]],["terminal",["shell","bash","exec","run_","command","vitest","pytest"]],["data-table",["list_dir","glob","list_","search","grep","find"]],["code",["read_file","cat_file","code","read"]]];function cU(e){const r=lU(e).toLowerCase();for(const[a,o]of iU)if(o.some(i=>r.includes(i)))return a}function uU(e,r,a){const o=r(a);return o?e[o]:void 0}function $u(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Vu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function dU(e){return Vu(e)&&typeof e.path=="string"&&Array.isArray(e.hunks)}function fU(e){return Vu(e)&&Array.isArray(e.files)&&e.files.every(r=>Vu(r)&&typeof r.id=="string"&&typeof r.name=="string")}function mU(e){return Array.isArray(e)&&e.length>0&&e.every(Vu)}function hU(e){return $u(e).split(/\r?\n/).map((r,a)=>({id:`line-${a}`,kind:"stdout",content:r}))}function pU(e){const r=Object.keys(e[0]??{}).map(a=>({key:a,label:a,render:o=>$u(o[a])}));return l.jsx(fI,{data:e,columns:r,rowKey:a=>$u(a)})}var gU={code:e=>l.jsx(IC,{code:$u(e.output),copyable:!0}),terminal:e=>l.jsx(nE,{lines:hU(e.output)}),diff:e=>dU(e.output)?l.jsx(rE,{path:e.output.path,stats:e.output.stats,hunks:e.output.hunks}):l.jsx(Eu,{part:e}),"created-files":e=>fU(e.output)?l.jsx(aE,{files:e.output.files,title:e.output.title}):l.jsx(Eu,{part:e}),"data-table":e=>mU(e.output)?pU(e.output):l.jsx(Eu,{part:e})};function oE({part:e,toolRenderers:r=gU,classifyTool:a=cU}){const o=e.state==="output-available"?uU(r,a,e):void 0;return l.jsx("div",{"data-slot":"agent-tool-renderer",className:"contents",children:o?o(e):l.jsx(Eu,{part:e})})}oE.displayName="AgentToolRenderer";function xU(e){return e.type==="text"}function vU(e){return e.type==="reasoning"}function yU(e){return e.type==="file"}function bU(e){return e.type==="reasoning-file"}function wU(e){return e.type==="source-url"}function SU(e){return e.type==="source-document"}function jU(e){return e.type==="step-start"}function NU(e){return e.type==="dynamic-tool"||e.type.startsWith("tool-")}function kU(e){return e.type.startsWith("data-")}function CU(e){return e.type.slice(5)}function EU({part:e,renderers:r}){const a=CU(e),o=r?.[e.type]??r?.[a];return o?o(e.data,e):l.jsxs("details",{className:gt("my-2 rounded-md border border-border bg-muted/20 px-3 py-1.5 text-body-sm"),"data-theo-data":a,children:[l.jsxs("summary",{className:"flex cursor-pointer items-center gap-1.5 font-mono text-label-caps text-muted-foreground uppercase tracking-wider",children:[l.jsx(qM,{className:"size-3","aria-hidden":"true"}),l.jsxs("span",{children:["data-",a]})]}),l.jsx("pre",{className:"mt-2 overflow-x-auto border-border border-t pt-2 text-code-sm",children:l.jsx("code",{children:RU(e.data)})})]})}function RU(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}var TU=[/^javascript:/i,/^vbscript:/i,/^data:text\/html/i];function c0(e){if(e==null)return;const r=e.trim();if(r.length!==0){for(const a of TU)if(a.test(r))return;return e}}function _U(e){return e.startsWith("image/")||e==="image"}function MU({part:e}){const r=c0(e.url),a=e.filename??e.url.split("/").pop()??"file";return _U(e.mediaType)?r?l.jsxs("figure",{className:"my-3 overflow-hidden rounded-lg border border-border","data-theo-file":"image",children:[l.jsx("img",{src:r,alt:a,className:"block max-w-full",loading:"lazy"}),e.filename?l.jsx("figcaption",{className:"border-border border-t bg-muted/30 px-3 py-1.5 font-mono text-label-caps text-muted-foreground uppercase tracking-wider",children:e.filename}):null]}):l.jsxs("div",{"data-slot":"file-part",className:gt("my-2 inline-flex items-center gap-2 rounded-md border border-border bg-muted/30 px-3 py-2","text-body-sm text-muted-foreground"),children:[l.jsx(A3,{className:"size-4","aria-hidden":"true"}),l.jsx("span",{children:a}),l.jsx("span",{className:"text-destructive",children:"(blocked)"})]}):l.jsxs("div",{className:gt("my-2 inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-2","text-body-sm"),"data-theo-file":"generic",children:[l.jsx(l3,{className:"size-4 text-muted-foreground","aria-hidden":"true"}),r?l.jsx("a",{href:r,className:"text-primary hover:text-primary-deep hover:underline",children:a}):l.jsx("span",{children:a}),l.jsx("span",{className:"font-mono text-label-caps text-muted-foreground uppercase tracking-wider",children:e.mediaType})]})}var AU={light:"github-light",dark:"github-dark"},gu=null,D1=!1;async function DU(e){if(gu)return gu;if(D1)return null;try{return gu=await(await Pa(()=>import("./ui_false-D2OIiKrG.js"),[])).createHighlighter({themes:[e.light,e.dark],langs:["ts","tsx","js","jsx","python","go","rust","java","json","yaml","bash","shell","html","css","sql","markdown"]}),gu}catch{return D1=!0,null}}function OU({code:e,language:r,themes:a,className:o}){const[i,c]=m.useState(null),[d,f]=m.useState(!1),h=a??AU;m.useEffect(()=>{let x=!1;if(r)return DU(h).then(y=>{if(!(x||!y))try{const b=y.codeToHtml(e,{lang:r,themes:{light:h.light,dark:h.dark},defaultColor:"light"});c(b)}catch{}}).catch(()=>{}),()=>{x=!0}},[e,r,h.light,h.dark,h]);const p=async()=>{try{await navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),2e3)}catch{}};return l.jsxs("div",{className:gt("group relative my-4 overflow-hidden rounded-lg border border-border bg-muted/30",o),"data-theo-code-block":"",children:[l.jsxs("div",{className:"flex items-center justify-between border-border border-b bg-muted/50 px-3 py-1.5",children:[l.jsx("span",{className:"font-mono text-label-caps text-muted-foreground uppercase tracking-wider",children:r||"text"}),l.jsx("button",{type:"button",onClick:p,className:gt("inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-label","text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground","focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring"),"aria-label":d?"Copied":"Copy code",children:d?l.jsxs(l.Fragment,{children:[l.jsx(Rn,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{children:"Copied"})]}):l.jsxs(l.Fragment,{children:[l.jsx(Qu,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{children:"Copy"})]})})]}),i?l.jsx("div",{className:"[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0 overflow-x-auto p-3 text-code-sm",dangerouslySetInnerHTML:{__html:i}}):l.jsx("pre",{className:"overflow-x-auto p-3 text-code-sm",children:l.jsx("code",{className:r?`language-${r}`:void 0,children:e})})]})}function zU({className:e,children:r,...a}){return l.jsx("code",{className:gt("rounded bg-muted px-1.5 py-0.5 font-mono text-code-sm text-foreground",e),...a,children:r})}function LU(e,r=!0){if(!r)return e;let a=e;if(PU(a)%2===1)return a=`${a.endsWith(`
|
|
53
|
-
`)?a:`${a}
|
|
54
|
-
`}\`\`\``,a;if(UU(a,"$$")%2===1)return a=`${a}$$`,a;IU(a)%2===1&&(a=`${a}\``),BU(a)%2===1&&(a=`${a}$`);for(const f of["**","__","*","_"])HU(a,f)%2===1&&(a=`${a}${f}`);return a=FU(a),a}function PU(e){let r=0,a=0;for(;a<e.length;)e[a]==="`"&&e[a+1]==="`"&&e[a+2]==="`"?(r++,a+=3):a++;return r}function IU(e){let r=0,a=0;for(;a<e.length;){if(e[a]==="`"){if(e[a+1]==="`"&&e[a+2]==="`"){a+=3;continue}r++}a++}return r}function UU(e,r){if(r.length===0)return 0;let a=0,o=e.indexOf(r);for(;o!==-1;)a++,o=e.indexOf(r,o+r.length);return a}function BU(e){let r=0,a=0;for(;a<e.length;){if(e[a]==="$"){if(e[a+1]==="$"){a+=2;continue}if(a>0&&e[a-1]==="\\"){a++;continue}r++}a++}return r}function HU(e,r){if(r.length===0)return 0;if(r.length===1){let i=0,c=0;for(;c<e.length;){if(e[c]===r){if(e[c+1]===r){c+=2;continue}if(c>0&&e[c-1]==="\\"){c++;continue}i++}c++}return i}let a=0,o=0;for(;o<=e.length-r.length;)e.substring(o,o+r.length)===r?(a++,o+=r.length):o++;return a}function FU(e){const r=e.lastIndexOf("("),a=e.lastIndexOf(")");if(r===-1||r<=a||e[r-1]!=="]")return e;const o=r-1;return e.lastIndexOf("[",o-1)===-1?e:`${e})`}async function $U(e){const[{fromMarkdown:r},{gfmFromMarkdown:a},{gfm:o}]=await Promise.all([Pa(()=>import("./ui_false-C86dpdOS.js"),[]),Pa(()=>import("./ui_false-DXBDqAI8.js"),[]),Pa(()=>import("./ui_false-bdnHF6UP.js"),[])]);return r(e,{extensions:[o()],mdastExtensions:[a()]})}async function VU(e){const{toHast:r}=await Pa(async()=>{const{toHast:o}=await import("./ui_false-B1n26OIN.js");return{toHast:o}},[]),a=r(e,{allowDangerousHtml:!1});return!a||a.type!=="root"?{type:"root",children:a?[a]:[]}:a}async function qU(e){const{sanitize:r,defaultSchema:a}=await Pa(async()=>{const{sanitize:c,defaultSchema:d}=await import("./ui_false-CmAnmupH.js");return{sanitize:c,defaultSchema:d}},[]),o={...a,attributes:{...a.attributes??{},code:[...a.attributes?.code??[],["className",/^language-./]],pre:[...a.attributes?.pre??[],["className",/./]],span:[...a.attributes?.span??[],["className",/./],["style"]]}},i=r(e,o);return i.type==="root"?i:{type:"root",children:[i]}}async function GU(e,r){const{Fragment:a,jsx:o,jsxs:i}=await Pa(async()=>{const{Fragment:d,jsx:f,jsxs:h}=await Promise.resolve().then(()=>ET);return{Fragment:d,jsx:f,jsxs:h}},void 0),{toJsxRuntime:c}=await Pa(async()=>{const{toJsxRuntime:d}=await import("./ui_false-D-OXQOOV.js");return{toJsxRuntime:d}},[]);return c(e,{Fragment:a,jsx:o,jsxs:i,components:r})}async function YU(e,r={}){const a=LU(e,r.isStreaming??!1),o=await $U(a),i=await VU(o),c=await qU(i);return GU(c,r.components)}async function KU(e,r={}){try{return await YU(e,r)}catch{return m.createElement("span",{className:"whitespace-pre-wrap"},e)}}function XU(e){const r=e.className;return typeof r=="string"?r.startsWith("language-"):Array.isArray(r)?r.some(a=>typeof a=="string"&&a.startsWith("language-")):!1}function WU(e){const r=e.className,a=typeof r=="string"?[r]:Array.isArray(r)?r:[];for(const o of a)if(typeof o=="string"&&o.startsWith("language-"))return o.slice(9)}function Ap(e){return typeof e=="string"?e:Array.isArray(e)?e.map(Ap).join(""):e&&typeof e=="object"&&"props"in e&&e.props?Ap(e.props.children):""}var ZU={code:e=>{if(XU(e)){const r=WU(e),a=Ap(e.children);return l.jsx(OU,{code:a,language:r})}return l.jsx(zU,{...e,children:e.children})},pre:({children:e})=>l.jsx(l.Fragment,{children:e})};function QU({text:e,isStreaming:r=!1,className:a}){const[o,i]=m.useState(null);return m.useEffect(()=>{let c=!1;return KU(e,{isStreaming:r,components:ZU}).then(d=>{c||i(d)}),()=>{c=!0}},[e,r]),l.jsx("div",{"data-slot":"chat-message-response-impl",className:gt("prose-theo max-w-none text-body-md text-foreground leading-relaxed","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0","[&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:font-semibold [&_h1]:text-title-lg","[&_h2]:mt-3 [&_h2]:mb-2 [&_h2]:font-semibold [&_h2]:text-title-md","[&_h3]:mt-3 [&_h3]:mb-1.5 [&_h3]:font-semibold [&_h3]:text-body-lg","[&_p]:my-2","[&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-5","[&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-5","[&_li]:my-0.5","[&_blockquote]:my-2 [&_blockquote]:border-primary/40 [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_a:hover]:text-primary-deep [&_a]:text-primary [&_a]:underline","[&_table]:my-3 [&_table]:w-full [&_table]:border-collapse","[&_th]:border [&_th]:border-border [&_th]:bg-muted/40 [&_th]:px-3 [&_th]:py-1.5 [&_th]:text-left","[&_td]:border [&_td]:border-border [&_td]:px-3 [&_td]:py-1.5","[&_hr]:my-4 [&_hr]:border-border",a),"data-theo-chat-response":"",children:o})}var u0=m.memo(QU,(e,r)=>e.text===r.text&&e.isStreaming===r.isStreaming);u0.displayName="ChatMessageResponse";function JU({part:e,defaultOpen:r}){const a=e.state==="streaming",o=r??a;return l.jsxs("details",{"data-slot":"reasoning-part",className:gt("my-2 rounded-md border border-border bg-muted/20 px-3 py-2","[&[open]]:bg-muted/40"),open:o,"data-theo-reasoning":"",children:[l.jsxs("summary",{className:gt("cursor-pointer list-none font-mono text-label-caps text-muted-foreground uppercase tracking-wider","flex items-center gap-1.5 marker:hidden","transition-colors hover:text-foreground"),children:[l.jsx(dM,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{children:"Reasoning"}),a?l.jsx("span",{className:"text-primary/80",children:"…"}):null]}),l.jsx("div",{className:"mt-2 border-border border-t pt-2",children:l.jsx(u0,{text:e.text,isStreaming:a})})]})}function eB({part:e}){const r=c0(e.url),a=e.title||e.url;return l.jsxs("span",{"data-slot":"source-url-part",className:gt("my-1 inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1","align-middle font-mono text-label"),"data-theo-source":"url",children:[l.jsx(ew,{className:"size-3 text-muted-foreground","aria-hidden":"true"}),r?l.jsx("a",{href:r,className:"truncate text-primary hover:text-primary-deep hover:underline",rel:"noopener noreferrer",target:"_blank",children:a}):l.jsx("span",{className:"truncate text-muted-foreground",children:a})]})}function tB({part:e}){return l.jsxs("span",{"data-slot":"source-document-part",className:gt("my-1 inline-flex max-w-full items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1","align-middle font-mono text-label"),"data-theo-source":"document",children:[l.jsx(sp,{className:"size-3 text-muted-foreground","aria-hidden":"true"}),l.jsx("span",{className:"truncate text-foreground",children:e.title}),l.jsx("span",{className:"text-muted-foreground",children:"·"}),l.jsx("span",{className:"text-muted-foreground",children:e.mediaType})]})}function nB({part:e}){return l.jsx(u0,{"data-slot":"text-part",text:e.text,isStreaming:e.state==="streaming"})}var xi=m.forwardRef(({className:e,from:r,children:a,...o},i)=>l.jsx("div",{"data-slot":"chat-message-root",ref:i,className:gt("group flex w-full max-w-[95%] flex-col gap-2",r==="user"?"is-user ml-auto justify-end":r==="assistant"?"is-assistant":"is-system",e),"data-theo-chat-message":r,...o,children:a}));xi.displayName="ChatMessageRoot";var qu=m.forwardRef(({className:e,variant:r,children:a,...o},i)=>l.jsx("div",{"data-slot":"chat-message-content",ref:i,className:gt("flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-body-md","group-[.is-user]:ml-auto",r!=="flat"&&"group-[.is-user]:rounded-2xl group-[.is-user]:rounded-tr-md group-[.is-user]:border group-[.is-user]:border-border/40 group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3",r==="contained"&&"group-[.is-assistant]:rounded-2xl group-[.is-assistant]:rounded-tl-md group-[.is-assistant]:border group-[.is-assistant]:border-border/40 group-[.is-assistant]:border-l-2 group-[.is-assistant]:border-l-primary group-[.is-assistant]:bg-card group-[.is-assistant]:px-5 group-[.is-assistant]:py-4 group-[.is-assistant]:shadow-sm","group-[.is-system]:rounded-lg group-[.is-system]:border group-[.is-system]:border-accent-deep/40 group-[.is-system]:border-l-4 group-[.is-system]:bg-accent/10 group-[.is-system]:px-4 group-[.is-system]:py-2 group-[.is-system]:text-body-sm","group-[.is-assistant]:text-foreground group-[.is-user]:text-secondary-foreground",e),"data-theo-chat-content":"",...o,children:a}));qu.displayName="ChatMessageContent";function rB(e,r={}){const a=r.partRenderers??{};return xU(e)?a.text?.(e)??l.jsx(nB,{part:e}):vU(e)?a.reasoning?.(e)??l.jsx(JU,{part:e}):bU(e)?a["reasoning-file"]?.(e)??null:yU(e)?a.file?.(e)??l.jsx(MU,{part:e}):wU(e)?a["source-url"]?.(e)??l.jsx(eB,{part:e}):SU(e)?a["source-document"]?.(e)??l.jsx(tB,{part:e}):NU(e)?a.tool?a.tool(e):l.jsx(oE,{part:e,toolRenderers:r.toolRenderers,classifyTool:r.classifyTool}):kU(e)?a.data?.(e)??l.jsx(EU,{part:e,renderers:r.dataRenderers}):jU(e)?a["step-start"]?.()??l.jsx("hr",{className:"my-3 border-border","aria-label":"Step boundary"}):null}var aB=m.forwardRef(({message:e,avatar:r,actions:a,variant:o,partRenderers:i,dataRenderers:c,toolRenderers:d,classifyTool:f,className:h,...p},x)=>{const y=l.jsxs(qu,{variant:o??(e.role==="assistant"?"contained":void 0),children:[e.parts.map((b,w)=>l.jsx("div",{children:rB(b,{dataRenderers:c,partRenderers:i,toolRenderers:d,classifyTool:f})},`${b.type}-${w}`)),a]});return e.role==="user"?l.jsxs(xi,{"data-slot":"chat-message",ref:x,from:"user",className:h,...p,children:[y,r?l.jsx("div",{className:"shrink-0",children:r}):null]}):l.jsxs(xi,{"data-slot":"chat-message",ref:x,from:e.role,className:h,...p,children:[r?l.jsx("div",{className:"shrink-0",children:r}):null,y]})});aB.displayName="ChatMessage";m.createContext(null);var oB={running:l.jsx(qs,{className:"size-3.5 animate-spin text-primary","aria-hidden":"true"}),success:l.jsx(Rn,{className:"size-3.5 text-success","aria-hidden":"true"}),failed:l.jsx(Gn,{className:"size-3.5 text-destructive","aria-hidden":"true"}),queued:l.jsx("span",{className:"size-2 rounded-full bg-warning","aria-hidden":"true"}),skipped:l.jsx("span",{className:"size-2 rounded-full bg-muted-foreground","aria-hidden":"true"})},sB={running:"Running",success:"Completed",failed:"Failed",queued:"Queued",skipped:"Skipped"};function lB({className:e,tool:r,icon:a,target:o,status:i,output:c,defaultExpanded:d=!1,timestamp:f,...h}){const[p,x]=m.useState(d),y=!!c;return l.jsxs("article",{"data-slot":"tool-call-card",className:gt("overflow-hidden rounded-lg border border-border/40 bg-card/40 text-card-foreground",e),...h,children:[l.jsxs("div",{className:gt("flex items-center gap-2 px-3 py-2"),children:[y?l.jsx("button",{type:"button",onClick:()=>x(b=>!b),"aria-expanded":p,"aria-label":p?`Collapse ${r} details`:`Expand ${r} details`,className:"-m-1 inline-flex size-6 shrink-0 items-center justify-center rounded-md p-1 text-muted-foreground hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:l.jsx(Jr,{className:gt("size-3.5 transition-transform duration-base",p&&"rotate-90"),"aria-hidden":"true"})}):null,a?l.jsx(a,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}):null,l.jsx("span",{className:"shrink-0 font-medium font-mono text-code-sm text-foreground",children:r}),o?l.jsx("span",{className:"truncate font-mono text-code-sm text-muted-foreground",children:o}):null,l.jsx("span",{role:"img","aria-label":sB[i],className:"ml-auto inline-flex shrink-0 items-center gap-1.5",children:oB[i]}),f?l.jsx("span",{className:"shrink-0 font-mono text-label text-muted-foreground tabular-nums",children:f}):null]}),y&&p?l.jsx("div",{className:"border-border/40 border-t bg-muted/20 px-3 py-2 font-mono text-code-sm",children:c}):null]})}const iB={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function sE(e){return iB}let cB;function uB(e){return cB?.get(e)}let dB;function fB(e){return dB?.get(e)}let mB;function hB(e,r){return mB?.get(e)?.get(r)}function pB(e){const r=typeof e;return r==="string"?`"${e}"`:r==="number"||r==="bigint"||r==="boolean"?`${e}`:r==="object"||r==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":r}function Fs(e,r,a,o,i){const c=i&&"input"in i?i.input:a.value,d=i?.expected??e.expects??null,f=i?.received??pB(c),h={kind:e.kind,type:e.type,input:c,expected:d,received:f,message:`Invalid ${r}: ${d?`Expected ${d} but r`:"R"}eceived ${f}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:o.lang,abortEarly:o.abortEarly,abortPipeEarly:o.abortPipeEarly},p=e.kind==="schema",x=i?.message??e.message??hB(e.reference,h.lang)??(p?fB(h.lang):null)??o.message??uB(h.lang);x!==void 0&&(h.message=typeof x=="function"?x(h):x),p&&(a.typed=!1),a.issues?a.issues.push(h):a.issues=[h]}const O1=new WeakMap;function Bi(e){let r=O1.get(e);return r||(r={version:1,vendor:"valibot",validate(a){return e["~run"]({value:a},sE())}},O1.set(e,r)),r}function Hi(e,r){return{kind:"validation",type:"check",reference:Hi,async:!1,expects:null,requirement:e,message:r,"~run"(a,o){return a.typed&&!this.requirement(a.value)&&Fs(this,"input",a,o),a}}}function lE(e){return{kind:"validation",type:"url",reference:lE,async:!1,expects:null,requirement(r){try{return new URL(r),!0}catch{return!1}},message:e,"~run"(r,a){return r.typed&&!this.requirement(r.value)&&Fs(this,"URL",r,a),r}}}function gB(e,r,a){return typeof e.fallback=="function"?e.fallback(r,a):e.fallback}function iE(e,r,a){return typeof e.default=="function"?e.default(r,a):e.default}function cE(e,r){return{kind:"schema",type:"array",reference:cE,expects:"Array",async:!1,item:e,message:r,get"~standard"(){return Bi(this)},"~run"(a,o){const i=a.value;if(Array.isArray(i)){a.typed=!0,a.value=[];for(let c=0;c<i.length;c++){const d=i[c],f=this.item["~run"]({value:d},o);if(f.issues){const h={type:"array",origin:"value",input:i,key:c,value:d};for(const p of f.issues)p.path?p.path.unshift(h):p.path=[h],a.issues?.push(p);if(a.issues||(a.issues=f.issues),o.abortEarly){a.typed=!1;break}}f.typed||(a.typed=!1),a.value.push(f.value)}}else Fs(this,"type",a,o);return a}}}function Ld(e,r){return{kind:"schema",type:"object",reference:Ld,expects:"Object",async:!1,entries:e,message:r,get"~standard"(){return Bi(this)},"~run"(a,o){const i=a.value;if(i&&typeof i=="object"){a.typed=!0,a.value={};for(const c in this.entries){const d=this.entries[c];if(c in i||(d.type==="exact_optional"||d.type==="optional"||d.type==="nullish")&&d.default!==void 0){const f=c in i?i[c]:iE(d),h=d["~run"]({value:f},o);if(h.issues){const p={type:"object",origin:"value",input:i,key:c,value:f};for(const x of h.issues)x.path?x.path.unshift(p):x.path=[p],a.issues?.push(x);if(a.issues||(a.issues=h.issues),o.abortEarly){a.typed=!1;break}}h.typed||(a.typed=!1),a.value[c]=h.value}else if(d.fallback!==void 0)a.value[c]=gB(d);else if(d.type!=="exact_optional"&&d.type!=="optional"&&d.type!=="nullish"&&(Fs(this,"key",a,o,{input:void 0,expected:`"${c}"`,path:[{type:"object",origin:"key",input:i,key:c,value:i[c]}]}),o.abortEarly))break}}else Fs(this,"type",a,o);return a}}}function Os(e,r){return{kind:"schema",type:"optional",reference:Os,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:r,get"~standard"(){return Bi(this)},"~run"(a,o){return a.value===void 0&&(this.default!==void 0&&(a.value=iE(this,a,o)),a.value===void 0)?(a.typed=!0,a):this.wrapped["~run"](a,o)}}}function yo(e){return{kind:"schema",type:"string",reference:yo,expects:"string",async:!1,message:e,get"~standard"(){return Bi(this)},"~run"(r,a){return typeof r.value=="string"?r.typed=!0:Fs(this,"type",r,a),r}}}function Pd(...e){return{...e[0],pipe:e,get"~standard"(){return Bi(this)},"~run"(r,a){for(const o of e)if(o.kind!=="metadata"){if(r.issues&&(o.kind==="schema"||o.kind==="transformation")){r.typed=!1;break}(!r.issues||!a.abortEarly&&!a.abortPipeEarly)&&(r=o["~run"](r,a))}return r}}}function xB(e,r,a){const o=e["~run"]({value:r},sE());return{typed:o.typed,success:!o.issues,output:o.value,issues:o.issues}}var vB=String.raw`(?:oklch|oklab)\(\s*`+String.raw`(?:from\s+var\(--[a-zA-Z0-9-]+\)\s+)?`+String.raw`(?:max\([^(){}]*(?:\([^(){}]*\))?[^(){}]*\)|min\([^(){}]*(?:\([^(){}]*\))?[^(){}]*\)|calc\([^();{}]+\)|[a-z]|-?\d+(?:\.\d+)?%?|none|\/|\s)+`+String.raw`\)`,yB=String.raw`(?:rgb|rgba|hsl|hsla|lab|lch|color)\(\s*[\d.\s%,/+\-]+\s*\)`,bB=String.raw`#[0-9a-fA-F]{3,8}`,wB=String.raw`-?\d+(?:\.\d+)?%?(?:\s+-?\d+(?:\.\d+)?%?){1,3}`,SB=String.raw`var\(--[a-zA-Z0-9-]+(?:\s*,\s*[^();{}]+)?\)`,jB=String.raw`transparent|currentColor|inherit|initial|unset`,uE=new RegExp(`^(${bB}|${vB}|${yB}|${wB}|${SB}|${jB})$`),NB=m.createContext(void 0),z1="theo-ui-density-vars",kB=`[data-density="compact"] { --theo-control-h: 2rem; --theo-control-px: 0.75rem; }
|
|
55
|
-
[data-density="comfortable"] { --theo-control-h: 2.25rem; --theo-control-px: 0.875rem; }
|
|
56
|
-
[data-density="spacious"] { --theo-control-h: 2.75rem; --theo-control-px: 1rem; }
|
|
57
|
-
`;function CB(){if(typeof document>"u"||document.getElementById(z1))return!1;const e=document.createElement("style");return e.id=z1,e.textContent=kB,document.head.appendChild(e),!0}var EB=/^[a-z][a-z0-9-]*$/,RB=/^[\w\s,"'\-.]+$/,Ke=Pd(yo(),Hi(e=>uE.test(e),"color value did not match the allowed format (hex, oklch, hsl, rgb, var(), HSL split, or CSS keyword)")),TB=Pd(yo(),Hi(e=>EB.test(e),"theme name must match /^[a-z][a-z0-9-]*$/ (lowercase + digits + hyphens, starts with a letter)")),_h=Pd(yo(),Hi(e=>RB.test(e),"font family contains disallowed characters (parens, semicolons, etc.)")),_B=Ld({display:_h,body:_h,mono:_h}),L1=Ld({background:Ke,foreground:Ke,card:Ke,"card-foreground":Ke,popover:Ke,"popover-foreground":Ke,primary:Ke,"primary-deep":Os(Ke),"primary-glow":Os(Ke),"primary-foreground":Ke,secondary:Ke,"secondary-foreground":Ke,accent:Ke,"accent-deep":Os(Ke),"accent-foreground":Ke,muted:Ke,"muted-foreground":Ke,border:Ke,input:Ke,ring:Ke,success:Ke,"success-foreground":Ke,warning:Ke,"warning-foreground":Ke,destructive:Ke,"destructive-foreground":Ke,info:Ke,"info-foreground":Ke,"status-online":Ke,"status-online-foreground":Ke,"status-offline":Ke,"status-offline-foreground":Ke,"status-degraded":Ke,"status-degraded-foreground":Ke,"status-info":Ke,"status-info-foreground":Ke}),MB=Ld({name:TB,label:yo(),description:Os(yo()),fonts:_B,light:L1,dark:L1,fontUrls:Os(cE(Pd(yo(),lE(),Hi(e=>/^https?:\/\//i.test(e),"fontUrls must use http(s) protocol (javascript:, data:, etc. are rejected)"))))});function AB(e){const r=xB(MB,e);return r.success?{success:!0}:{success:!1,issues:r.issues}}function DB(e,r){const a=[`[@theokit/ui] theme '${e}' failed validation:`];for(const o of r){const i=(o.path??[]).map(c=>typeof c.key=="string"?c.key:String(c.key)).join(".");a.push(` - ${i||"(root)"}: ${o.message}`)}return a.join(`
|
|
58
|
-
`)}var OB=m.createContext(void 0),P1="theo-ui-theme-vars",zB=/^[\w\s,"'\-.]+$/,LB=/^[a-z][a-z0-9-]*$/;function d0(e,r,a){return a}function Dp(e,r){return uE.test(r)?r:d0(`color "${e}"`,r,"transparent")}function zs(e,r){return zB.test(r)?r:d0(`fontFamily "${e}"`,r,"inherit")}function f0(e){return LB.test(e)?e:d0("theme.name",e,"invalid-theme")}function I1(e,r,a){const o=f0(e),i=r==="light"?`[data-theme="${o}"]`:`[data-theme="${o}"].dark, [data-theme="${o}"][data-mode="dark"]`,c=Object.entries(a).map(([d,f])=>` --${d}: ${Dp(d,f)};`).join(`
|
|
59
|
-
`);return`${i} {
|
|
60
|
-
${c}
|
|
61
|
-
}`}function PB(e,r){const a=f0(e),o=zs("display",r.display),i=zs("body",r.body),c=zs("mono",r.mono);return`[data-theme="${a}"] {
|
|
62
|
-
--font-display: ${o};
|
|
63
|
-
--font-body: ${i};
|
|
64
|
-
--font-mono: ${c};
|
|
65
|
-
}`}function IB(e){if(typeof document>"u")return;let r=document.getElementById(P1);r||(r=document.createElement("style"),r.id=P1,document.head.appendChild(r));const a=[];for(const o of e)a.push(PB(o.name,o.fonts)),a.push(I1(o.name,"light",o.light)),a.push(I1(o.name,"dark",o.dark));r.textContent=a.join(`
|
|
66
|
-
|
|
67
|
-
`)}function UB(e){if(!(typeof document>"u")&&e.fontUrls)for(const r of e.fontUrls){const a=c0(r);if(!a||document.head.querySelector(`link[rel="stylesheet"][href="${CSS.escape(a)}"]`))continue;const o=document.createElement("link");o.rel="stylesheet",o.href=a,document.head.appendChild(o)}}function BB(e){console.warn(e)}function HB({children:e,defaultTheme:r="violet-forge",defaultMode:a="dark",themes:o,storageKey:i="theo-ui:theme",defaultDensity:c="comfortable",respectSystemMode:d=!0}){if(!o||o.length===0)throw new Error("<ThemeProvider> requires the `themes` prop with at least one Theme. Pass `themes={builtinThemes}` for the Violet Forge defaults (importable via the package barrel), or use <TheoUIProvider> which sets this for you.");const f=m.useMemo(()=>{for(const W of o){const ee=AB(W);if(!ee.success){const re=DB(W.name??"(unnamed)",ee.issues??[]);BB(re)}}for(const W of o){f0(W.name),zs("display",W.fonts.display),zs("body",W.fonts.body),zs("mono",W.fonts.mono);for(const[ee,re]of Object.entries(W.light))Dp(ee,re);for(const[ee,re]of Object.entries(W.dark))Dp(ee,re)}const q=new Map;for(const W of o)q.set(W.name,W);return Array.from(q.values())},[o]),[h,p]=m.useState(f);m.useEffect(()=>{p(f)},[f]);const[x,y]=m.useState(r),[b,w]=m.useState(a),[S,N]=m.useState(c),k=m.useRef(!1),C=m.useRef(!0);m.useEffect(()=>{if(!(typeof window>"u"||!i))try{const q=window.localStorage.getItem(`${i}:name`),W=window.localStorage.getItem(`${i}:mode`),ee=window.localStorage.getItem(`${i}:density`);q&&y(q),(W==="dark"||W==="light")&&(w(W),k.current=!0),(ee==="compact"||ee==="comfortable"||ee==="spacious")&&N(ee)}catch{}},[i]),m.useEffect(()=>{if(!d||typeof window>"u"||typeof window.matchMedia!="function")return;const q=window.matchMedia("(prefers-color-scheme: dark)");k.current||w(q.matches?"dark":"light");const W=ee=>{k.current||w(ee.matches?"dark":"light")};return q.addEventListener("change",W),()=>{q.removeEventListener("change",W)}},[d]),m.useEffect(()=>{IB(h)},[h]),m.useEffect(()=>{if(typeof document>"u")return;const q=h.find(W=>W.name===x)??h[0];q&&(document.documentElement.setAttribute("data-theme",q.name),document.documentElement.setAttribute("data-mode",b),document.documentElement.setAttribute("data-density",S),document.documentElement.classList.toggle("dark",b==="dark"),UB(q),CB())},[x,b,S,h]),m.useEffect(()=>{if(C.current){C.current=!1;return}if(!(typeof window>"u"||!i))try{window.localStorage.setItem(`${i}:name`,x),window.localStorage.setItem(`${i}:mode`,b),window.localStorage.setItem(`${i}:density`,S)}catch{}},[x,b,S,i]);const E=m.useCallback(q=>y(q),[]),T=m.useCallback(q=>{k.current=!0,w(q)},[]),M=m.useCallback(()=>{k.current=!0,w(q=>q==="light"?"dark":"light")},[]),_=m.useCallback(q=>N(q),[]),L=m.useCallback(q=>{p(W=>{const ee=W.findIndex(re=>re.name===q.name);if(ee>=0){const re=W.slice();return re[ee]=q,re}return[...W,q]})},[]),B=h.find(q=>q.name===x)??h[0],A=m.useMemo(()=>({theme:B,mode:b,themes:h,setTheme:E,setMode:T,toggleMode:M,registerTheme:L}),[B,b,h,E,T,M,L]),oe=m.useMemo(()=>({density:S,setDensity:_}),[S,_]);return l.jsx(OB.Provider,{value:A,children:l.jsx(NB.Provider,{value:oe,children:e})})}var FB={name:"violet-forge",label:"Violet Forge",description:"Theo default — violet primary, burnt sienna accent, Geist Sans + Geist Mono.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(1 0 0)",foreground:"oklch(0.146 0 0)",card:"oklch(1 0 0)","card-foreground":"oklch(0.146 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.146 0 0)",primary:"oklch(0.628 0.225 296)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.97 0 0)","secondary-foreground":"oklch(0.146 0 0)",accent:"oklch(0.621 0.132 39)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.97 0 0)","muted-foreground":"oklch(0.555 0 0)",border:"oklch(0.931 0 0)",input:"oklch(0.931 0 0)",ring:"oklch(0.628 0.225 296)",success:"oklch(0.611 0.161 149.7)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.67 0.154 60.6)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.579 0.214 27.2)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.626 0.186 259.6)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.611 0.161 149.7)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.579 0.214 27.2)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.67 0.154 60.6)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.626 0.186 259.6)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.146 0 0)",foreground:"oklch(0.97 0 0)",card:"oklch(0.182 0 0)","card-foreground":"oklch(0.97 0 0)",popover:"oklch(0.204 0 0)","popover-foreground":"oklch(0.97 0 0)",primary:"oklch(0.628 0.225 296)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.227 0 0)","secondary-foreground":"oklch(0.97 0 0)",accent:"oklch(0.621 0.132 39)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.227 0 0)","muted-foreground":"oklch(0.683 0 0)",border:"oklch(0.28 0 0)",input:"oklch(0.227 0 0)",ring:"oklch(0.628 0.225 296)",success:"oklch(0.814 0.192 155.7)","success-foreground":"oklch(0.146 0 0)",warning:"oklch(0.77 0.165 70.6)","warning-foreground":"oklch(0.146 0 0)",destructive:"oklch(0.677 0.213 15.6)","destructive-foreground":"oklch(0.146 0 0)",info:"oklch(0.732 0.142 254.4)","info-foreground":"oklch(0.146 0 0)","status-online":"oklch(0.814 0.192 155.7)","status-online-foreground":"oklch(0.146 0 0)","status-offline":"oklch(0.677 0.213 15.6)","status-offline-foreground":"oklch(0.146 0 0)","status-degraded":"oklch(0.77 0.165 70.6)","status-degraded-foreground":"oklch(0.146 0 0)","status-info":"oklch(0.732 0.142 254.4)","status-info-foreground":"oklch(0.146 0 0)"}},$B={name:"classic-paper",label:"Classic Paper",description:"Inter + paper background. Maximum legibility, conservative.",fonts:{display:'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',body:'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',mono:'"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap"],light:{background:"oklch(0.95 0.025 80)",foreground:"oklch(0.206 0.039 265.5)",card:"oklch(0.97 0.012 80)","card-foreground":"oklch(0.206 0.039 265.5)",popover:"oklch(0.98 0.008 80)","popover-foreground":"oklch(0.206 0.039 265.5)",primary:"oklch(0.545 0.215 262.7)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.93 0.02 80)","secondary-foreground":"oklch(0.206 0.039 265.5)",accent:"oklch(0.647 0.139 69)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.93 0.02 80)","muted-foreground":"oklch(0.45 0.03 80)",border:"oklch(0.88 0.025 80)",input:"oklch(0.92 0.02 80)",ring:"oklch(0.545 0.215 262.7)",success:"oklch(0.611 0.161 149.7)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.67 0.154 60.6)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.579 0.214 27.2)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.626 0.186 259.6)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.611 0.161 149.7)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.579 0.214 27.2)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.67 0.154 60.6)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.626 0.186 259.6)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.177 0.029 265.8)",foreground:"oklch(0.984 0.003 247.9)",card:"oklch(0.206 0.039 265.5)","card-foreground":"oklch(0.984 0.003 247.9)",popover:"oklch(0.206 0.039 265.5)","popover-foreground":"oklch(0.984 0.003 247.9)",primary:"oklch(0.626 0.186 259.6)","primary-foreground":"oklch(0.206 0.039 265.5)",secondary:"oklch(0.291 0.022 259.9)","secondary-foreground":"oklch(0.984 0.003 247.9)",accent:"oklch(0.803 0.15 74.7)","accent-foreground":"oklch(0.206 0.039 265.5)",muted:"oklch(0.291 0.022 259.9)","muted-foreground":"oklch(0.71 0.035 256.8)",border:"oklch(0.329 0.026 259.9)",input:"oklch(0.291 0.022 259.9)",ring:"oklch(0.626 0.186 259.6)",success:"oklch(0.814 0.192 155.7)","success-foreground":"oklch(0.206 0.039 265.5)",warning:"oklch(0.77 0.165 70.6)","warning-foreground":"oklch(0.206 0.039 265.5)",destructive:"oklch(0.677 0.213 15.6)","destructive-foreground":"oklch(0.206 0.039 265.5)",info:"oklch(0.732 0.142 254.4)","info-foreground":"oklch(0.206 0.039 265.5)","status-online":"oklch(0.814 0.192 155.7)","status-online-foreground":"oklch(0.206 0.039 265.5)","status-offline":"oklch(0.677 0.213 15.6)","status-offline-foreground":"oklch(0.206 0.039 265.5)","status-degraded":"oklch(0.77 0.165 70.6)","status-degraded-foreground":"oklch(0.206 0.039 265.5)","status-info":"oklch(0.732 0.142 254.4)","status-info-foreground":"oklch(0.206 0.039 265.5)"}},VB={name:"aurora-terminal",label:"Aurora Terminal",description:"Dark sci-fi developer console — cyan-aurora + Geist Mono body.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(0.966 0.006 264.5)",foreground:"oklch(0.206 0.039 265.5)",card:"oklch(1 0 0)","card-foreground":"oklch(0.206 0.039 265.5)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.206 0.039 265.5)",primary:"oklch(0.714 0.12 191)","primary-foreground":"oklch(0.206 0.039 265.5)",secondary:"oklch(0.968 0.007 247.9)","secondary-foreground":"oklch(0.206 0.039 265.5)",accent:"oklch(0.646 0.206 4.9)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.926 0.013 255)","muted-foreground":"oklch(0.556 0.04 256.8)",border:"oklch(0.926 0.013 255)",input:"oklch(0.926 0.013 255)",ring:"oklch(0.714 0.12 191)",success:"oklch(0.711 0.171 155.2)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.67 0.154 60.6)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.579 0.214 27.2)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.626 0.186 259.6)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.711 0.171 155.2)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.579 0.214 27.2)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.67 0.154 60.6)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.626 0.186 259.6)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.169 0.021 268.7)",foreground:"oklch(0.966 0.006 264.5)",card:"oklch(0.199 0.027 268.5)","card-foreground":"oklch(0.966 0.006 264.5)",popover:"oklch(0.199 0.027 268.5)","popover-foreground":"oklch(0.966 0.006 264.5)",primary:"oklch(0.834 0.122 191.9)","primary-foreground":"oklch(0.169 0.021 268.7)",secondary:"oklch(0.242 0.03 266.3)","secondary-foreground":"oklch(0.966 0.006 264.5)",accent:"oklch(0.68 0.2 3.6)","accent-foreground":"oklch(0.169 0.021 268.7)",muted:"oklch(0.242 0.03 266.3)","muted-foreground":"oklch(0.71 0.035 256.8)",border:"oklch(0.281 0.035 266.3)",input:"oklch(0.242 0.03 266.3)",ring:"oklch(0.834 0.122 191.9)",success:"oklch(0.814 0.192 155.7)","success-foreground":"oklch(0.169 0.021 268.7)",warning:"oklch(0.77 0.165 70.6)","warning-foreground":"oklch(0.169 0.021 268.7)",destructive:"oklch(0.677 0.213 15.6)","destructive-foreground":"oklch(0.169 0.021 268.7)",info:"oklch(0.732 0.142 254.4)","info-foreground":"oklch(0.169 0.021 268.7)","status-online":"oklch(0.814 0.192 155.7)","status-online-foreground":"oklch(0.169 0.021 268.7)","status-offline":"oklch(0.677 0.213 15.6)","status-offline-foreground":"oklch(0.169 0.021 268.7)","status-degraded":"oklch(0.77 0.165 70.6)","status-degraded-foreground":"oklch(0.169 0.021 268.7)","status-info":"oklch(0.732 0.142 254.4)","status-info-foreground":"oklch(0.169 0.021 268.7)"}},qB={name:"vercel-mono",label:"Vercel Mono",description:"Inspired by, not affiliated with Vercel. Monochrome canvas + signature blue.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(1 0 0)",foreground:"oklch(0 0 0)",card:"oklch(1 0 0)","card-foreground":"oklch(0 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0 0 0)",primary:"oklch(0.57 0.211 257.9)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.97 0 0)","secondary-foreground":"oklch(0 0 0)",accent:"oklch(0.57 0.211 257.9)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.97 0 0)","muted-foreground":"oklch(0.51 0 0)",border:"oklch(0.939 0 0)",input:"oklch(0.939 0 0)",ring:"oklch(0.57 0.211 257.9)",success:"oklch(0.687 0.127 174)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.687 0.155 62.5)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.531 0.218 29.2)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.57 0.211 257.9)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.687 0.127 174)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.531 0.218 29.2)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.687 0.155 62.5)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.57 0.211 257.9)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.146 0 0)",foreground:"oklch(0.947 0 0)",card:"oklch(0.182 0 0)","card-foreground":"oklch(0.947 0 0)",popover:"oklch(0.182 0 0)","popover-foreground":"oklch(0.947 0 0)",primary:"oklch(0.627 0.203 256.2)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.248 0 0)","secondary-foreground":"oklch(0.947 0 0)",accent:"oklch(0.661 0.184 254.7)","accent-foreground":"oklch(0 0 0)",muted:"oklch(0.248 0 0)","muted-foreground":"oklch(0.683 0 0)",border:"oklch(0.321 0 0)",input:"oklch(0.321 0 0)",ring:"oklch(0.627 0.203 256.2)",success:"oklch(0.837 0.237 148.6)","success-foreground":"oklch(0 0 0)",warning:"oklch(0.81 0.136 70.9)","warning-foreground":"oklch(0 0 0)",destructive:"oklch(0.634 0.251 28.5)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.627 0.203 256.2)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.837 0.237 148.6)","status-online-foreground":"oklch(0 0 0)","status-offline":"oklch(0.634 0.251 28.5)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.81 0.136 70.9)","status-degraded-foreground":"oklch(0 0 0)","status-info":"oklch(0.627 0.203 256.2)","status-info-foreground":"oklch(1 0 0)"}},GB={name:"github-dark",label:"GitHub Dark",description:"GitHub's default dark theme. Primer Primitives tokens.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(1 0 0)",foreground:"oklch(0.276 0.013 253.5)",card:"oklch(0.976 0.004 247.9)","card-foreground":"oklch(0.276 0.013 253.5)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.276 0.013 253.5)",primary:"oklch(0.539 0.187 257.1)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.976 0.004 247.9)","secondary-foreground":"oklch(0.276 0.013 253.5)",accent:"oklch(0.592 0.19 256.7)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.976 0.004 247.9)","muted-foreground":"oklch(0.531 0.018 253.4)",border:"oklch(0.874 0.01 247.9)",input:"oklch(0.874 0.01 247.9)",ring:"oklch(0.539 0.187 257.1)",success:"oklch(0.524 0.14 147.9)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.556 0.116 76.9)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.549 0.203 23.7)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.539 0.187 257.1)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.524 0.14 147.9)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.549 0.203 23.7)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.556 0.116 76.9)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.539 0.187 257.1)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.176 0.014 256.8)",foreground:"oklch(0.966 0.012 247.9)",card:"oklch(0.221 0.015 256.8)","card-foreground":"oklch(0.966 0.012 247.9)",popover:"oklch(0.221 0.015 256.8)","popover-foreground":"oklch(0.966 0.012 247.9)",primary:"oklch(0.637 0.182 254.9)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.252 0.019 256.8)","secondary-foreground":"oklch(0.966 0.012 247.9)",accent:"oklch(0.66 0.17 255.2)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.252 0.019 256.8)","muted-foreground":"oklch(0.668 0.018 253.4)",border:"oklch(0.326 0.016 253.5)",input:"oklch(0.326 0.016 253.5)",ring:"oklch(0.637 0.182 254.9)",success:"oklch(0.712 0.18 147.9)","success-foreground":"oklch(0 0 0)",warning:"oklch(0.726 0.142 80.6)","warning-foreground":"oklch(0 0 0)",destructive:"oklch(0.653 0.209 25.9)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.637 0.182 254.9)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.712 0.18 147.9)","status-online-foreground":"oklch(0 0 0)","status-offline":"oklch(0.653 0.209 25.9)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.726 0.142 80.6)","status-degraded-foreground":"oklch(0 0 0)","status-info":"oklch(0.637 0.182 254.9)","status-info-foreground":"oklch(1 0 0)"}},YB={name:"dracula",label:"Dracula",description:"Cult OSS theme (draculatheme.com, MIT). Light mode is Theo-adapted for WCAG AA.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(0.977 0.008 106.5)",foreground:"oklch(0.284 0.022 277.1)",card:"oklch(1 0 0)","card-foreground":"oklch(0.284 0.022 277.1)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.284 0.022 277.1)",primary:"oklch(0.489 0.227 305.4)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.949 0.011 106.6)","secondary-foreground":"oklch(0.284 0.022 277.1)",accent:"oklch(0.438 0.191 302.4)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.949 0.011 106.6)","muted-foreground":"oklch(0.478 0.051 270.1)",border:"oklch(0.919 0.012 106.6)",input:"oklch(0.919 0.012 106.6)",ring:"oklch(0.489 0.227 305.4)",success:"oklch(0.515 0.1 147.3)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.549 0.111 82.7)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.504 0.187 27.2)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.533 0.093 217.1)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.515 0.1 147.3)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.504 0.187 27.2)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.549 0.111 82.7)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.533 0.093 217.1)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.284 0.022 277.1)",foreground:"oklch(0.977 0.008 106.5)",card:"oklch(0.322 0.024 278.1)","card-foreground":"oklch(0.977 0.008 106.5)",popover:"oklch(0.322 0.024 278.1)","popover-foreground":"oklch(0.977 0.008 106.5)",primary:"oklch(0.756 0.181 347.2)","primary-foreground":"oklch(0.284 0.022 277.1)",secondary:"oklch(0.376 0.03 278)","secondary-foreground":"oklch(0.977 0.008 106.5)",accent:"oklch(0.747 0.146 302.2)","accent-foreground":"oklch(0.284 0.022 277.1)",muted:"oklch(0.376 0.03 278)","muted-foreground":"oklch(0.688 0.055 270.5)",border:"oklch(0.403 0.032 278)",input:"oklch(0.403 0.032 278)",ring:"oklch(0.756 0.181 347.2)",success:"oklch(0.871 0.218 148)","success-foreground":"oklch(0.284 0.022 277.1)",warning:"oklch(0.955 0.137 112.9)","warning-foreground":"oklch(0.284 0.022 277.1)",destructive:"oklch(0.684 0.205 24.3)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.882 0.093 213.7)","info-foreground":"oklch(0.284 0.022 277.1)","status-online":"oklch(0.871 0.218 148)","status-online-foreground":"oklch(0.284 0.022 277.1)","status-offline":"oklch(0.684 0.205 24.3)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.955 0.137 112.9)","status-degraded-foreground":"oklch(0.284 0.022 277.1)","status-info":"oklch(0.882 0.093 213.7)","status-info-foreground":"oklch(0.284 0.022 277.1)"}},KB={name:"one-dark",label:"One Dark",description:"Atom's One Dark + One Light syntax theme (MIT). Iconic IDE look.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(0.985 0 0)",foreground:"oklch(0.35 0.014 276.7)",card:"oklch(1 0 0)","card-foreground":"oklch(0.35 0.014 276.7)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.35 0.014 276.7)",primary:"oklch(0.529 0.235 262.3)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.962 0 0)","secondary-foreground":"oklch(0.35 0.014 276.7)",accent:"oklch(0.522 0.209 328.8)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.962 0 0)","muted-foreground":"oklch(0.588 0.013 276.9)",border:"oklch(0.923 0 0)",input:"oklch(0.923 0 0)",ring:"oklch(0.529 0.235 262.3)",success:"oklch(0.515 0.111 143.4)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.555 0.116 77)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.544 0.194 29.8)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.499 0.108 236.7)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.515 0.111 143.4)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.544 0.194 29.8)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.555 0.116 77)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.499 0.108 236.7)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.292 0.016 264.3)",foreground:"oklch(0.761 0.021 264.4)",card:"oklch(0.262 0.013 264.3)","card-foreground":"oklch(0.761 0.021 264.4)",popover:"oklch(0.262 0.013 264.3)","popover-foreground":"oklch(0.761 0.021 264.4)",primary:"oklch(0.732 0.121 245.2)","primary-foreground":"oklch(0.292 0.016 264.3)",secondary:"oklch(0.34 0.019 264.3)","secondary-foreground":"oklch(0.761 0.021 264.4)",accent:"oklch(0.694 0.163 318)","accent-foreground":"oklch(0.292 0.016 264.3)",muted:"oklch(0.34 0.019 264.3)","muted-foreground":"oklch(0.63 0.02 264.4)",border:"oklch(0.387 0.023 264.3)",input:"oklch(0.387 0.023 264.3)",ring:"oklch(0.732 0.121 245.2)",success:"oklch(0.768 0.11 133.1)","success-foreground":"oklch(0.292 0.016 264.3)",warning:"oklch(0.727 0.095 63.5)","warning-foreground":"oklch(0.292 0.016 264.3)",destructive:"oklch(0.67 0.145 16.7)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.722 0.091 206.9)","info-foreground":"oklch(0.292 0.016 264.3)","status-online":"oklch(0.768 0.11 133.1)","status-online-foreground":"oklch(0.292 0.016 264.3)","status-offline":"oklch(0.67 0.145 16.7)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.727 0.095 63.5)","status-degraded-foreground":"oklch(0.292 0.016 264.3)","status-info":"oklch(0.722 0.091 206.9)","status-info-foreground":"oklch(0.292 0.016 264.3)"}},XB={name:"anthropic-style",label:"Anthropic-style",description:"Inspired by, not affiliated with Anthropic. Warm cream + burnt sienna editorial feel.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(0.982 0.005 106.5)",foreground:"oklch(0.216 0 0)",card:"oklch(1 0 0)","card-foreground":"oklch(0.216 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.216 0 0)",primary:"oklch(0.555 0.13 38.8)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.946 0.009 91.5)","secondary-foreground":"oklch(0.216 0 0)",accent:"oklch(0.522 0.075 57.6)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.946 0.009 91.5)","muted-foreground":"oklch(0.501 0 0)",border:"oklch(0.911 0.015 91.5)",input:"oklch(0.911 0.015 91.5)",ring:"oklch(0.555 0.13 38.8)",success:"oklch(0.518 0.107 146.3)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.539 0.102 70.9)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.487 0.15 28.9)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.492 0.078 233.2)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.518 0.107 146.3)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.487 0.15 28.9)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.539 0.102 70.9)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.492 0.078 233.2)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.216 0 0)",foreground:"oklch(0.951 0.009 78.3)",card:"oklch(0.27 0 0)","card-foreground":"oklch(0.951 0.009 78.3)",popover:"oklch(0.27 0 0)","popover-foreground":"oklch(0.951 0.009 78.3)",primary:"oklch(0.679 0.125 40.5)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.301 0 0)","secondary-foreground":"oklch(0.951 0.009 78.3)",accent:"oklch(0.645 0.072 49.3)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.301 0 0)","muted-foreground":"oklch(0.719 0.01 67.7)",border:"oklch(0.371 0 0)",input:"oklch(0.371 0 0)",ring:"oklch(0.679 0.125 40.5)",success:"oklch(0.805 0.186 151.6)","success-foreground":"oklch(0.216 0 0)",warning:"oklch(0.874 0.15 90.2)","warning-foreground":"oklch(0.216 0 0)",destructive:"oklch(0.636 0.208 25.4)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.722 0.113 233.1)","info-foreground":"oklch(0.216 0 0)","status-online":"oklch(0.805 0.186 151.6)","status-online-foreground":"oklch(0.216 0 0)","status-offline":"oklch(0.636 0.208 25.4)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.874 0.15 90.2)","status-degraded-foreground":"oklch(0.216 0 0)","status-info":"oklch(0.722 0.113 233.1)","status-info-foreground":"oklch(0.216 0 0)"}},WB={name:"openai-style",label:"OpenAI-style",description:"Inspired by, not affiliated with OpenAI. Minimal canvas + ChatGPT green.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(1 0 0)",foreground:"oklch(0.248 0 0)",card:"oklch(0.976 0.001 286.4)","card-foreground":"oklch(0.248 0 0)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.248 0 0)",primary:"oklch(0.636 0.124 169.1)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.968 0.001 286.4)","secondary-foreground":"oklch(0.248 0 0)",accent:"oklch(0.636 0.124 169.1)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.968 0.001 286.4)","muted-foreground":"oklch(0.549 0.026 285.5)",border:"oklch(0.923 0 0)",input:"oklch(0.923 0 0)",ring:"oklch(0.636 0.124 169.1)",success:"oklch(0.636 0.124 169.1)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.651 0.158 55.2)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.576 0.218 27.6)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.57 0.211 257.9)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.636 0.124 169.1)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.576 0.218 27.6)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.651 0.158 55.2)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.57 0.211 257.9)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.248 0 0)",foreground:"oklch(0.947 0 0)",card:"oklch(0.301 0 0)","card-foreground":"oklch(0.947 0 0)",popover:"oklch(0.301 0 0)","popover-foreground":"oklch(0.947 0 0)",primary:"oklch(0.555 0.125 158.4)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.321 0 0)","secondary-foreground":"oklch(0.947 0 0)",accent:"oklch(0.808 0.186 157.7)","accent-foreground":"oklch(0.248 0 0)",muted:"oklch(0.321 0 0)","muted-foreground":"oklch(0.691 0 0)",border:"oklch(0.38 0 0)",input:"oklch(0.38 0 0)",ring:"oklch(0.722 0.165 157.9)",success:"oklch(0.722 0.165 157.9)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.77 0.165 70.6)","warning-foreground":"oklch(0.248 0 0)",destructive:"oklch(0.636 0.208 25.4)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.627 0.203 256.2)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.722 0.165 157.9)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.636 0.208 25.4)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.77 0.165 70.6)","status-degraded-foreground":"oklch(0.248 0 0)","status-info":"oklch(0.627 0.203 256.2)","status-info-foreground":"oklch(1 0 0)"}},ZB={name:"linear-glass",label:"Linear Glass",description:"Inspired by, not affiliated with Linear. Refined indigo on glassy surfaces.",fonts:{display:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',body:'"Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',mono:'"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace'},fontUrls:["https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap"],light:{background:"oklch(1 0 0)",foreground:"oklch(0.232 0.006 285.9)",card:"oklch(0.983 0.002 264.5)","card-foreground":"oklch(0.232 0.006 285.9)",popover:"oklch(1 0 0)","popover-foreground":"oklch(0.232 0.006 285.9)",primary:"oklch(0.523 0.175 273.1)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.967 0.002 286.4)","secondary-foreground":"oklch(0.232 0.006 285.9)",accent:"oklch(0.55 0.181 282.4)","accent-foreground":"oklch(1 0 0)",muted:"oklch(0.967 0.002 286.4)","muted-foreground":"oklch(0.533 0.014 285.9)",border:"oklch(0.943 0.004 286.3)",input:"oklch(0.943 0.004 286.3)",ring:"oklch(0.523 0.175 273.1)",success:"oklch(0.583 0.12 160.3)","success-foreground":"oklch(1 0 0)",warning:"oklch(0.665 0.138 68.3)","warning-foreground":"oklch(1 0 0)",destructive:"oklch(0.579 0.221 26.6)","destructive-foreground":"oklch(1 0 0)",info:"oklch(0.523 0.175 273.1)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.583 0.12 160.3)","status-online-foreground":"oklch(1 0 0)","status-offline":"oklch(0.579 0.221 26.6)","status-offline-foreground":"oklch(1 0 0)","status-degraded":"oklch(0.665 0.138 68.3)","status-degraded-foreground":"oklch(1 0 0)","status-info":"oklch(0.523 0.175 273.1)","status-info-foreground":"oklch(1 0 0)"},dark:{background:"oklch(0.165 0.006 285.8)",foreground:"oklch(0.923 0 0)",card:"oklch(0.219 0.009 285.7)","card-foreground":"oklch(0.923 0 0)",popover:"oklch(0.219 0.009 285.7)","popover-foreground":"oklch(0.923 0 0)",primary:"oklch(0.627 0.149 285.1)","primary-foreground":"oklch(1 0 0)",secondary:"oklch(0.25 0.011 285.6)","secondary-foreground":"oklch(0.923 0 0)",accent:"oklch(0.718 0.16 291.8)","accent-foreground":"oklch(0.165 0.006 285.8)",muted:"oklch(0.25 0.011 285.6)","muted-foreground":"oklch(0.73 0.012 286.1)",border:"oklch(0.282 0.009 285.8)",input:"oklch(0.282 0.009 285.8)",ring:"oklch(0.627 0.149 285.1)",success:"oklch(0.73 0.142 156)","success-foreground":"oklch(0.165 0.006 285.8)",warning:"oklch(0.813 0.143 66.8)","warning-foreground":"oklch(0.165 0.006 285.8)",destructive:"oklch(0.706 0.187 20.3)","destructive-foreground":"oklch(0.165 0.006 285.8)",info:"oklch(0.627 0.149 285.1)","info-foreground":"oklch(1 0 0)","status-online":"oklch(0.73 0.142 156)","status-online-foreground":"oklch(0.165 0.006 285.8)","status-offline":"oklch(0.706 0.187 20.3)","status-offline-foreground":"oklch(0.165 0.006 285.8)","status-degraded":"oklch(0.813 0.143 66.8)","status-degraded-foreground":"oklch(0.165 0.006 285.8)","status-info":"oklch(0.627 0.149 285.1)","status-info-foreground":"oklch(1 0 0)"}},QB=[FB,$B,VB,qB,GB,YB,KB,XB,WB,ZB];function dE({children:e,theme:r,toaster:a}){const{themes:o,...i}=r??{};return l.jsx(HB,{themes:o??QB,...i,children:l.jsx(ZL,{...a,children:e})})}dE.displayName="TheoUIProvider";const fE=m.createContext(null);function JB({children:e,initialEvents:r=[]}){const[a,o]=m.useState(r),i=m.useCallback(f=>{o(h=>[...h,f])},[]),c=m.useCallback(()=>{o([])},[]),d=m.useMemo(()=>({events:a,append:i,startRun:c}),[a,i,c]);return l.jsx(fE.Provider,{value:d,children:e})}function mE(){return m.useContext(fE)}function eH(){const e=mE();if(!e)throw new Error("useRunLog: no RunLogProvider mounted — wrap the tree at the composition root");return e}function tH({router:e}){return l.jsx(dE,{theme:{defaultTheme:"violet-forge",defaultMode:"dark"},children:l.jsx(JB,{children:l.jsx(v4,{router:e})})})}function Et(e){const r=hE.find(a=>a.path===e);if(!r)throw new Error(`Unknown surface: ${e}`);return r}const hE=Object.freeze([{path:"/agents",label:"Agents",icon:Vs,description:"Chat with any registered agent and watch the typed event stream live."},{path:"/builder",label:"Agent Builder",icon:N3,description:"Build and refine agents with a specialized code assistant."},{path:"/prompts",label:"Prompts",icon:aw,description:"Reusable, versioned prompt blocks referenced by your agents."},{path:"/workflows",label:"Workflows",icon:ag,description:"Inspect registered workflows and step through their runs."},{path:"/processors",label:"Processors",icon:Z2,description:"Input and output processors that shape every agent turn."},{path:"/mcp-servers",label:"MCP Servers",icon:tg,description:"MCP servers exposed to your agents and the tools they provide."},{path:"/tools",label:"Tools",icon:Is,description:"Registered tools with their schemas and a direct invocation playground."},{path:"/workspaces",label:"Workspaces",icon:lp,description:"Workspaces group agents, tools and data per project."},{path:"/request-context",label:"Request Context",icon:cM,description:"Inspect the request context propagated through every run."},{path:"/evaluation",label:"Overview",icon:ih,description:"Evaluation at a glance: scorers, datasets and experiments."},{path:"/evaluation/scorers",label:"Scorers",icon:nw,description:"Scorers grade agent outputs against your quality criteria."},{path:"/evaluation/datasets",label:"Datasets",icon:Q2,description:"Datasets of prompts and expected outputs used by experiments."},{path:"/evaluation/experiments",label:"Experiments",icon:Mu,description:"Experiments run scorers over datasets across agent versions."},{path:"/observability/events",label:"Events",icon:op,description:"Raw timeline of the typed Run.stream() events from the last run."},{path:"/observability/metrics",label:"Metrics",icon:xM,description:"Runtime metrics from the dev loop: runs, tokens and latency."},{path:"/observability/traces",label:"Traces",icon:FA,description:"Durable traces via theo-lens — the embed lands in M2."},{path:"/observability/logs",label:"Logs",icon:qb,description:"Structured logs emitted by agents and services."},{path:"/memory",label:"Overview",icon:ih,description:"Memory at a glance: scopes, entities and recent activity."},{path:"/memory/memories",label:"Memories",icon:I3,description:"Scoped memories from theo-memory: what the agent remembers."},{path:"/memory/episodes",label:"Episodes",icon:_3,description:"Bi-temporal event timeline over the subject's memories."},{path:"/memory/playground",label:"Playground",icon:Mu,description:"Live remember / recall / reflect surface against theo-memory."},{path:"/memory/entities",label:"Entities",icon:BA,description:"Entities extracted from memories and their attributes."},{path:"/memory/graph",label:"Graph",icon:wA,description:"Entity relation graph view over the memory store."},{path:"/memory/skills",label:"Skills",icon:_u,description:"Read-only skill library learned from memories."},{path:"/memory/exports",label:"Exports",icon:oM,description:"Export memory snapshots for backup or analysis."},{path:"/memory/webhooks",label:"Webhooks",icon:VA,description:"Webhooks fired on memory writes and reflections."},{path:"/knowledge",label:"Overview",icon:ih,description:"Knowledge base at a glance: collections, documents and retrieval."},{path:"/knowledge/collections",label:"Collections",icon:_u,description:"Collections, documents and the theo-rag retrieval playground."},{path:"/knowledge/connectors",label:"Connectors",icon:sA,description:"Connectors that ingest external sources into collections."},{path:"/knowledge/documents",label:"Documents",icon:qb,description:"All documents across collections with chunking details."},{path:"/knowledge/ask",label:"Ask",icon:ed,description:"Ask questions against the knowledge base and inspect answers."},{path:"/knowledge/analytics",label:"Analytics",icon:op,description:"Retrieval quality and usage analytics for the knowledge base."},{path:"/settings",label:"Settings",icon:yA,description:"Studio preferences and dev-server configuration."}]),Qe=e=>{const r=Et(e);return{label:r.label,path:r.path,icon:r.icon}},Op={main:{id:"main",title:"TheoKit Studio",groups:[{items:[Qe("/agents"),Qe("/builder"),Qe("/prompts"),Qe("/workflows"),Qe("/processors"),Qe("/mcp-servers"),Qe("/tools"),Qe("/workspaces"),Qe("/request-context")]},{items:[{label:"Evaluation",path:"/evaluation",icon:BM,drillsInto:"evaluation"},{label:"Observability",path:"/observability/events",icon:_A,drillsInto:"observability"}]},{title:"Data",items:[{label:"Memory",path:"/memory/memories",icon:mM,drillsInto:"memory"},{label:"Knowledge Base",path:"/knowledge/collections",icon:rM,drillsInto:"knowledge"}]},{items:[Qe("/settings")]}]},evaluation:{id:"evaluation",title:"Evaluation",parent:"main",groups:[{items:[Qe("/evaluation"),Qe("/evaluation/scorers"),Qe("/evaluation/datasets"),Qe("/evaluation/experiments")]}]},observability:{id:"observability",title:"Observability",parent:"main",groups:[{items:[Qe("/observability/events"),Qe("/observability/metrics"),Qe("/observability/traces"),Qe("/observability/logs")]}]},memory:{id:"memory",title:"Memory",parent:"main",groups:[{items:[Qe("/memory"),Qe("/memory/memories"),Qe("/memory/episodes"),Qe("/memory/playground"),Qe("/memory/entities"),Qe("/memory/graph"),Qe("/memory/skills"),Qe("/memory/exports"),Qe("/memory/webhooks")]}]},knowledge:{id:"knowledge",title:"Knowledge Base",parent:"main",groups:[{items:[Qe("/knowledge"),Qe("/knowledge/collections"),Qe("/knowledge/connectors"),Qe("/knowledge/documents"),Qe("/knowledge/ask"),Qe("/knowledge/analytics")]}]}};function nH(e){const r=Op[e];if(!r)throw new Error(`Unknown menu: ${e}`);return r}function rH(e){return e.startsWith("/evaluation")?"evaluation":e.startsWith("/observability")?"observability":e.startsWith("/memory")?"memory":e.startsWith("/knowledge")?"knowledge":"main"}function At({icon:e,title:r,description:a,actions:o}){return l.jsxs("header",{className:"flex items-start justify-between gap-4 border-border/40 border-b px-8 py-6",children:[l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl border border-primary/20 bg-primary/10 text-primary shadow-[0_0_24px_-6px] shadow-primary/40",children:l.jsx(e,{className:"size-5","aria-hidden":!0})}),l.jsxs("div",{children:[l.jsx("h1",{className:"font-display font-semibold text-foreground text-xl tracking-tight",children:r}),l.jsx("p",{className:"mt-1 max-w-xl text-muted-foreground text-sm",children:a})]})]}),o&&l.jsx("div",{className:"flex shrink-0 items-center gap-2",children:o})]})}const pE=m.createContext(null),aH=pE.Provider;function Ya(){const e=m.useContext(pE);if(!e)throw new Error("useDataSource: no StudioDataSource injected — wrap the tree in <DataSourceProvider value={...}> at the composition root");return e}function En(e){const r=Ya(),[a,o]=m.useState([]),[i,c]=m.useState(null),[d,f]=m.useState(0),h=m.useRef(e);return h.current=e,m.useEffect(()=>{let p=!1;return h.current(r).then(x=>{p||o(x)}).catch(x=>{p||c(x instanceof Error?x.message:String(x))}),()=>{p=!0}},[r,d]),{items:a,loadError:i,reload:()=>f(p=>p+1)}}const Mh=[{id:"claude-fable-5",name:"Fable 5",blurb:"Deepest reasoning for complex builds"},{id:"claude-opus-4-8",name:"Opus 4.8",blurb:"Strong all-round builder"},{id:"claude-sonnet-4-6",name:"Sonnet 4.6",blurb:"Fast and balanced"},{id:"claude-haiku-4-5",name:"Haiku 4.5",blurb:"Snappy for quick edits"}],oH=["Low","Medium","High"];function sH({model:e,effort:r,onModelChange:a,onEffortChange:o}){const i=Mh.find(c=>c.id===e)??Mh[0];return l.jsxs(Nn,{children:[l.jsxs(Nn.Trigger,{"aria-label":`Model picker — ${i.name}, ${r} effort`,className:"group flex items-center gap-1.5 rounded-lg border border-border/60 bg-background px-2 py-1 text-xs transition-colors hover:border-primary/40",children:[l.jsx("span",{className:"flex size-4 items-center justify-center rounded bg-primary/15 text-primary",children:l.jsx(EA,{className:"size-3","aria-hidden":!0})}),l.jsx("span",{className:"font-medium text-foreground",children:i.name}),l.jsx("span",{className:"text-muted-foreground/60","aria-hidden":!0,children:"·"}),l.jsx("span",{className:"text-muted-foreground",children:r}),l.jsx(Qr,{className:"size-3 text-muted-foreground transition-transform group-data-[state=open]:rotate-180","aria-hidden":!0})]}),l.jsxs(Nn.Content,{align:"end",sideOffset:6,className:"w-72",children:[l.jsx(Nn.Label,{className:"text-muted-foreground text-xs uppercase tracking-wide",children:"Model"}),l.jsx(Nn.RadioGroup,{value:e,onValueChange:a,children:Mh.map(c=>l.jsx(Nn.RadioItem,{value:c.id,className:"items-start py-2",children:l.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[l.jsx("span",{className:"font-medium text-foreground text-sm leading-none",children:c.name}),l.jsx("span",{className:"text-muted-foreground text-xs",children:c.blurb}),l.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/60",children:c.id})]})},c.id))}),l.jsx(Nn.Separator,{}),l.jsx(Nn.Label,{className:"text-muted-foreground text-xs uppercase tracking-wide",children:"Reasoning effort"}),l.jsx(Nn.RadioGroup,{value:r,onValueChange:o,children:oH.map(c=>l.jsx(Nn.RadioItem,{value:c,children:c},c))})]})]})}function lH(e){const r=[];let a=1,o=1;for(const i of e.split(`
|
|
68
|
-
`)){if(i.startsWith("+++")||i.startsWith("---")){r.push({kind:"meta",text:i});continue}if(i.startsWith("+")){r.push({kind:"add",newNo:o++,text:i});continue}if(i.startsWith("-")){r.push({kind:"del",oldNo:a++,text:i});continue}r.push({kind:"ctx",oldNo:a++,newNo:o++,text:i})}return r}const iH={add:"bg-emerald-500/10 text-emerald-300",del:"bg-red-500/10 text-red-300",ctx:"text-foreground",meta:"text-muted-foreground"};function cH({file:e}){return l.jsxs("div",{className:"overflow-hidden rounded-xl border border-border/40","data-testid":"review-file-diff","data-path":e.path,children:[l.jsxs("div",{className:"flex items-center gap-2 border-border/40 border-b bg-card/80 px-3 py-1.5 font-mono text-xs",children:[l.jsx("span",{className:"truncate text-foreground",children:e.path}),l.jsxs("span",{className:"ml-auto shrink-0 text-emerald-400",children:["+",e.additions]}),l.jsxs("span",{className:"shrink-0 text-red-400",children:["-",e.deletions]})]}),l.jsx("pre",{className:"overflow-auto font-mono text-xs leading-relaxed",children:lH(e.diff).map(r=>l.jsxs("span",{"data-testid":`diff-line-${r.kind}`,className:`flex ${iH[r.kind]}`,children:[l.jsx("span",{className:"w-10 shrink-0 select-none border-border/30 border-r px-1 text-right text-muted-foreground/60",children:r.kind==="meta"?"":r.newNo??r.oldNo}),l.jsx("span",{className:"min-w-0 flex-1 whitespace-pre px-2",children:r.text||" "})]},`${r.kind}:${r.oldNo??""}:${r.newNo??""}:${r.text}`))})]})}function uH({files:e,selectedPath:r,onSelect:a,onClose:o}){const i=e.reduce((f,h)=>f+h.additions,0),c=e.reduce((f,h)=>f+h.deletions,0),d=r?e.filter(f=>f.path===r):e;return l.jsxs("div",{className:"flex min-h-0 w-full flex-col overflow-hidden rounded-xl border border-border/40","data-testid":"builder-review",children:[l.jsxs("div",{className:"flex items-center gap-1 border-border/40 border-b bg-card/80 px-3 py-2",children:[l.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-muted/50 px-3 py-0.5 font-medium text-foreground text-xs",children:["Review",l.jsx("button",{type:"button","aria-label":"Close review",onClick:o,className:"text-muted-foreground transition-colors hover:text-foreground",children:l.jsx(Gn,{className:"size-3","aria-hidden":!0})})]}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-xs",children:[l.jsxs("span",{className:"text-muted-foreground",children:["Unstaged ",l.jsxs("span",{className:"text-emerald-400",children:["+",i]})," ",l.jsxs("span",{className:"text-red-400",children:["-",c]})]}),l.jsxs(He,{size:"sm",variant:"secondary",disabled:!0,title:"Commits land when Studio attaches to a real registry",className:"h-6 gap-1 px-2 text-xs",children:[l.jsx(ki,{className:"size-3.5","aria-hidden":!0}),"Commit"]})]})]}),l.jsxs("div",{className:"flex min-h-0 flex-1",children:[l.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3 overflow-auto p-3",children:d.map(f=>l.jsx(cH,{file:f},f.path))}),l.jsxs("div",{className:"w-36 shrink-0 overflow-auto border-border/40 border-l px-2 py-2.5",children:[l.jsxs("button",{type:"button",onClick:()=>a(""),className:`flex w-full items-center gap-1 rounded-md px-1.5 py-1 text-left text-xs transition-colors hover:bg-muted/40 ${r===null?"text-foreground":"text-muted-foreground"}`,children:[l.jsx(Qr,{className:"size-3","aria-hidden":!0}),"All files"]}),l.jsx("ul",{className:"mt-1 space-y-0.5",children:e.map(f=>{const h=f.path.split("/").at(-1)??f.path,p=r===f.path;return l.jsx("li",{children:l.jsx("button",{type:"button","data-testid":"review-tree-file",onClick:()=>a(f.path),className:`w-full truncate rounded-md px-1.5 py-1 text-left font-mono text-xs transition-colors hover:bg-muted/40 ${p?"bg-muted/50 text-foreground":"text-muted-foreground"}`,title:f.path,children:h})},f.path)})})]})]})]})}function dH({files:e,onOpenReview:r,focusOnMount:a=!1}){const o=m.useRef(null);m.useEffect(()=>{a&&o.current?.focus()},[a]);const i=e.reduce((d,f)=>d+f.additions,0),c=e.reduce((d,f)=>d+f.deletions,0);return l.jsxs("div",{className:"flex min-h-0 w-full flex-col gap-4 overflow-auto rounded-xl border border-border/40 bg-card/40 p-4","data-testid":"builder-details",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Branch details"}),l.jsxs("ul",{className:"mt-2 space-y-1",children:[l.jsx("li",{children:l.jsxs("button",{type:"button",ref:o,onClick:()=>r(null),className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/40",children:[l.jsx(lw,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"flex-1 text-foreground",children:"Changes"}),l.jsxs("span",{className:"font-mono text-emerald-400 text-xs",children:["+",i]}),l.jsxs("span",{className:"font-mono text-red-400 text-xs",children:["-",c]})]})}),l.jsx("li",{children:l.jsxs("button",{type:"button",disabled:!0,title:"Git actions land when Studio attaches to a real registry",className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm disabled:cursor-not-allowed disabled:opacity-60",children:[l.jsx(ki,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"flex-1 text-foreground",children:"Git actions"})]})}),l.jsxs("li",{className:"flex items-center gap-2 px-2 py-1.5 text-muted-foreground text-sm",children:[l.jsx(rw,{className:"size-4 shrink-0","aria-hidden":!0}),"Pull request status unavailable"]})]})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Artifacts"}),l.jsxs("ul",{className:"mt-2 space-y-1",children:[e.map(d=>{const f=d.path.split("/").at(-1)??d.path;return l.jsx("li",{children:l.jsxs("button",{type:"button","data-testid":"builder-artifact-item",onClick:()=>r(d.path),className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/40",children:[l.jsx(n3,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-foreground text-xs",children:f})]})},d.path)}),e.length===0&&l.jsx("li",{className:"px-2 py-1.5 text-muted-foreground text-xs",children:"No artifacts yet."})]})]})]})}function fH({workedFor:e,steps:r}){const[a,o]=m.useState(!1);return l.jsxs("div",{children:[l.jsxs("button",{type:"button",onClick:()=>o(!a),className:"flex items-center gap-1 text-muted-foreground text-xs transition-colors hover:text-foreground","aria-expanded":a,children:[l.jsx(Jp,{className:"size-3.5","aria-hidden":!0}),"Worked for ",e,a?l.jsx(Qr,{className:"size-3.5","aria-hidden":!0}):l.jsx(Jr,{className:"size-3.5","aria-hidden":!0})]}),a&&l.jsx("ul",{className:"mt-2 space-y-1 border-border/40 border-l pl-3","data-testid":"builder-worklog",children:r.map(i=>l.jsx("li",{className:"text-muted-foreground text-xs",children:i},i))})]})}function mH({files:e,onReview:r}){const a=e.reduce((i,c)=>i+c.additions,0),o=e.reduce((i,c)=>i+c.deletions,0);return l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-3","data-testid":"builder-edited-files",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(lw,{className:"size-4 shrink-0 text-primary","aria-hidden":!0}),l.jsxs("span",{className:"font-medium text-foreground text-sm",children:["Edited ",e.length," file",e.length===1?"":"s"]}),l.jsxs("span",{className:"font-mono text-emerald-400 text-xs",children:["+",a]}),l.jsxs("span",{className:"font-mono text-red-400 text-xs",children:["-",o]}),l.jsxs("span",{className:"ml-auto flex items-center gap-1.5",children:[l.jsxs(He,{size:"sm",variant:"ghost",disabled:!0,title:"Undo lands when Studio attaches to a real registry",className:"h-7 gap-1 px-2 text-xs",children:[l.jsx(IA,{className:"size-3.5","aria-hidden":!0}),"Undo"]}),l.jsx(He,{size:"sm",variant:"secondary",onClick:r,className:"h-7 px-2 text-xs",children:"Review"})]})]}),l.jsx("ul",{className:"mt-2 space-y-1 border-border/40 border-t pt-2",children:e.map(i=>l.jsxs("li",{className:"flex items-center gap-2 font-mono text-xs",children:[l.jsx("span",{className:"truncate text-muted-foreground",children:i.path}),l.jsxs("span",{className:"ml-auto shrink-0 text-emerald-400",children:["+",i.additions]}),l.jsxs("span",{className:"shrink-0 text-red-400",children:["-",i.deletions]})]},i.path))})]})}function hH({session:e,onSend:r}){const[a,o]=m.useState(""),[i,c]=m.useState(null),[d,f]=m.useState("details"),[h,p]=m.useState(!1),[x,y]=m.useState(54),[b,w]=m.useState("none"),S=e.files.length>0,N=b!=="chat",k=S&&b!=="panel",C=m.useRef(null),E=_=>Math.min(75,Math.max(25,_)),T=_=>{_.preventDefault();const L=C.current;if(!L)return;const B=L.getBoundingClientRect(),A=q=>{y(E((q.clientX-B.left)/B.width*100))},oe=()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",oe)};window.addEventListener("pointermove",A),window.addEventListener("pointerup",oe)},M=_=>{_.preventDefault(),a.trim().length!==0&&(r(a),o(""))};return l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col px-6 py-5","data-testid":"builder-session-view",children:[l.jsxs("div",{className:"flex items-center gap-2 pb-3",children:[l.jsx("span",{className:"truncate font-medium text-foreground text-sm",children:e.title}),l.jsx(nt,{variant:"outline",className:"shrink-0",children:"Simulated session"}),l.jsx("span",{className:"ml-auto shrink-0 font-mono text-muted-foreground text-xs",children:e.agentId??"new agent"}),S&&l.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[l.jsx("button",{type:"button","aria-label":b==="chat"?"Restore chat":"Minimize chat","aria-pressed":b==="chat",title:b==="chat"?"Restore chat":"Minimize chat",onClick:()=>w(_=>_==="chat"?"none":"chat"),className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground",children:b==="chat"?l.jsx(Z3,{className:"size-4","aria-hidden":!0}):l.jsx(X3,{className:"size-4","aria-hidden":!0})}),l.jsx("button",{type:"button","aria-label":b==="panel"?"Restore side panel":"Minimize side panel","aria-pressed":b==="panel",title:b==="panel"?"Restore side panel":"Minimize side panel",onClick:()=>w(_=>_==="panel"?"none":"panel"),className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground",children:b==="panel"?l.jsx(tA,{className:"size-4","aria-hidden":!0}):l.jsx(J3,{className:"size-4","aria-hidden":!0})})]})]}),l.jsxs("div",{ref:C,className:"flex min-h-0 flex-1",children:[N&&l.jsxs("div",{className:"flex min-w-0 flex-col",style:k?{width:`${x}%`}:{width:"100%"},"data-testid":"builder-chat-pane",children:[l.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto pr-1",children:e.messages.map((_,L)=>_.role==="user"?l.jsx("div",{"data-testid":"builder-message",className:"max-w-[85%] self-end rounded-2xl bg-primary/15 px-4 py-2.5 text-foreground text-sm",children:_.text},L):l.jsxs("div",{className:"flex flex-col gap-2.5",children:[L===1&&l.jsx(fH,{workedFor:e.workedFor,steps:e.workLog}),l.jsx("div",{"data-testid":"builder-message",className:"text-foreground text-sm leading-relaxed",children:_.text}),L===e.messages.length-1&&e.files.length>0&&l.jsx(mH,{files:e.files,onReview:()=>f("review")})]},L))}),l.jsx("form",{onSubmit:M,className:"mt-3",children:l.jsxs("div",{className:"flex items-end gap-2 rounded-2xl border border-border/60 bg-card p-2 transition-colors focus-within:border-primary/50",children:[l.jsx(Co,{"aria-label":"Session message",className:"min-h-[40px] flex-1 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0",rows:1,value:a,onChange:_=>o(_.target.value),placeholder:"Do anything — @ to reference skills"}),l.jsx(He,{type:"submit",size:"sm","aria-label":"Send message",className:"size-8 rounded-full p-0",children:l.jsx(Y2,{className:"size-4","aria-hidden":!0})})]})})]}),N&&k&&l.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize chat","aria-valuenow":Math.round(x),"aria-valuemin":25,"aria-valuemax":75,tabIndex:0,onPointerDown:T,onKeyDown:_=>{_.key==="ArrowLeft"&&(_.preventDefault(),y(L=>E(L-4))),_.key==="ArrowRight"&&(_.preventDefault(),y(L=>E(L+4)))},className:"mx-1.5 w-1.5 shrink-0 cursor-col-resize rounded-full bg-border/40 transition-colors hover:bg-primary/50 focus-visible:bg-primary/60 focus-visible:outline-none"}),k&&l.jsx("div",{className:"flex min-h-0 min-w-0 flex-1",children:d==="review"?l.jsx(uH,{files:e.files,selectedPath:i,onSelect:_=>c(_===""?null:_),onClose:()=>{f("details"),p(!0)}}):l.jsx(dH,{files:e.files,focusOnMount:h,onOpenReview:_=>{c(_),f("review")}})})]})]})}const Ah=Et("/builder"),pH=[{id:"new-agent",label:"Create a new agent from scratch",starter:"Create a new agent that ",icon:Vs,tile:"bg-sky-500/15 text-sky-400"},{id:"add-tools",label:"Add tools to an existing agent",starter:"Add a tool to the Support Agent that ",icon:Is,tile:"bg-violet-500/15 text-violet-400"},{id:"tune-guardrails",label:"Tune instructions and guardrails",starter:"Tighten the guardrails so the agent never ",icon:sw,tile:"bg-emerald-500/15 text-emerald-400"},{id:"diagnose-run",label:"Diagnose a failing run",starter:"Diagnose why the last run of ",icon:pM,tile:"bg-amber-500/15 text-amber-400"}],gH={role:"assistant",text:"Applied — the review panel on the right reflects the change. Anything else to adjust?"};function xH(){const{items:e,loadError:r}=En(a=>a.listSkills());return l.jsxs("div",{className:"mx-auto w-full max-w-2xl px-8 py-6","data-testid":"builder-skills-view",children:[l.jsx("h2",{className:"font-display font-semibold text-foreground text-lg",children:"Skills"}),l.jsx("p",{className:"mt-1 text-muted-foreground text-sm",children:"Registered skills the assistant can reference in build sessions with @."}),r&&l.jsx("p",{role:"alert",className:"mt-3 text-red-400 text-sm",children:r}),l.jsx("ul",{className:"mt-4 space-y-2",children:e.map(a=>l.jsxs("li",{"data-testid":"builder-skill",className:"flex items-start gap-3 rounded-xl border border-border/40 bg-card/60 px-4 py-3",children:[l.jsx(_u,{className:"mt-0.5 size-4 shrink-0 text-primary","aria-hidden":!0}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"font-medium font-mono text-foreground text-sm",children:a.name}),l.jsx("p",{className:"mt-0.5 text-muted-foreground text-xs",children:a.description})]})]},a.id))})]})}function vH(){return l.jsx("div",{className:"mx-auto w-full max-w-2xl px-8 py-16","data-testid":"builder-scheduled-view",children:l.jsx(rn,{title:"No scheduled sessions",description:"Recurring build sessions land when Studio attaches to a real registry."})})}function yH(){return l.jsx("div",{className:"mx-auto w-full max-w-2xl px-8 py-16","data-testid":"builder-templates-view",children:l.jsx(rn,{title:"No templates yet",description:"Agent templates land when Studio attaches to a real registry."})})}function bH(){const e=Ya(),{items:r,loadError:a}=En(Z=>Z.listBuilderSessions()),{items:o}=En(Z=>Z.listAgents()),[i,c]=m.useState("new"),[d,f]=m.useState(""),[h,p]=m.useState("ask"),[x,y]=m.useState("claude-fable-5"),[b,w]=m.useState("Medium"),[S,N]=m.useState("demo-workspace"),[k,C]=m.useState(""),[E,T]=m.useState({kind:"home"}),[M,_]=m.useState(null),L=m.useRef(null);m.useEffect(()=>{const Z=D=>{(D.metaKey||D.ctrlKey)&&(D.key.toLowerCase()==="k"&&(D.preventDefault(),L.current?.focus()),D.key.toLowerCase()==="n"&&(D.preventDefault(),T({kind:"home"}),f("")))};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[]);const B=k.trim().toLowerCase(),A=r.filter(Z=>B===""||Z.title.toLowerCase().includes(B)),oe=A.filter(Z=>Z.pinned),q=A.filter(Z=>!Z.pinned),W=Z=>{_(null),e.getBuilderSession(Z).then(D=>T({kind:"session",session:D})).catch(D=>_(D instanceof Error?D.message:String(D)))},ee=Z=>{Z.preventDefault(),d.trim().length!==0&&(_(null),e.startBuilderSession(d,i==="new"?void 0:i).then(D=>{T({kind:"session",session:D}),f("")}).catch(D=>_(D instanceof Error?D.message:String(D))))},re=Z=>{T(D=>D.kind==="session"?{kind:"session",session:{...D.session,messages:[...D.session.messages,{role:"user",text:Z},{...gH}]}}:D)},te=(Z,D,V)=>{const ae=D,Q=E.kind===V;return l.jsxs("button",{type:"button",onClick:()=>T({kind:V}),"aria-current":Q?"page":void 0,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm transition-colors hover:bg-muted/40 ${Q?"bg-muted/50 text-foreground":"text-foreground"}`,children:[l.jsx(ae,{className:"size-4 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"flex-1 text-left",children:Z})]})};return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:Ah.icon,title:Ah.label,description:Ah.description}),(a||M)&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:a??M}),l.jsxs("div",{className:"flex min-h-0 flex-1",children:[l.jsxs("aside",{className:"hidden w-72 shrink-0 flex-col gap-3 overflow-auto border-border/40 border-r px-4 py-5 md:flex",children:[l.jsxs("button",{type:"button",className:"flex items-center gap-1 px-1 font-semibold text-foreground text-sm tracking-tight",title:"Assistant switcher lands with the real registry",disabled:!0,children:["Agent Builder",l.jsx(Qr,{className:"size-3.5 text-muted-foreground","aria-hidden":!0})]}),l.jsxs("button",{type:"button",onClick:()=>{T({kind:"home"}),f("")},className:"flex w-full items-center gap-2 rounded-lg bg-muted/40 px-2.5 py-1.5 text-foreground text-sm transition-colors hover:bg-muted/60",children:[l.jsx(Ps,{className:"size-4","aria-hidden":!0}),l.jsx("span",{className:"flex-1 text-left",children:"New session"}),l.jsx("kbd",{className:"font-mono text-[10px] text-muted-foreground",children:"⌘N"})]}),l.jsxs("div",{className:"relative",children:[l.jsx(ed,{className:"-translate-y-1/2 absolute top-1/2 left-2.5 size-3.5 text-muted-foreground","aria-hidden":!0}),l.jsx("input",{ref:L,type:"search","aria-label":"Search sessions",className:"h-8 w-full rounded-lg border border-border/60 bg-card pr-10 pl-8 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:"Search",value:k,onChange:Z=>C(Z.target.value)}),l.jsx("kbd",{className:"-translate-y-1/2 absolute top-1/2 right-2.5 font-mono text-[10px] text-muted-foreground",children:"⌘K"})]}),l.jsxs("nav",{"aria-label":"Builder views",className:"space-y-0.5",children:[te("Skills",_u,"skills"),te("Scheduled",Jp,"scheduled"),te("Templates",L3,"templates")]}),oe.length>0&&l.jsxs("section",{children:[l.jsx("h2",{className:"mb-1.5 font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Pinned"}),l.jsx("ul",{className:"space-y-0.5",children:oe.map(Z=>l.jsx("li",{children:l.jsxs("button",{type:"button","data-testid":"builder-session",onClick:()=>W(Z.id),className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/40",children:[l.jsx(rA,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:Z.title}),l.jsx("span",{className:"shrink-0 text-muted-foreground text-xs",children:Z.lastActivity})]})},Z.id))})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-1.5 font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Projects"}),l.jsx("ul",{className:"space-y-0.5",children:l.jsxs("li",{className:"flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm",children:[l.jsx(lp,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:"Demo Workspace"})]})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"mb-1.5 font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Tasks"}),l.jsxs("ul",{className:"space-y-0.5",children:[q.map(Z=>l.jsx("li",{children:l.jsxs("button",{type:"button","data-testid":"builder-session",onClick:()=>W(Z.id),className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/40",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate text-foreground",children:Z.title}),l.jsx("span",{className:"shrink-0 text-muted-foreground text-xs",children:Z.lastActivity})]})},Z.id)),q.length===0&&l.jsx("li",{className:"px-2 py-1.5 text-muted-foreground text-xs",children:"No matching sessions."})]})]})]}),E.kind==="session"?l.jsx(hH,{session:E.session,onSend:re},E.session.id):E.kind==="skills"?l.jsx(xH,{}):E.kind==="scheduled"?l.jsx(vH,{}):E.kind==="templates"?l.jsx(yH,{}):l.jsx("div",{className:"flex min-w-0 flex-1 items-center justify-center overflow-auto px-8 py-6",children:l.jsxs("div",{className:"w-full max-w-2xl",children:[l.jsx("h2",{className:"text-center font-display font-semibold text-2xl text-foreground tracking-tight",children:"What should we build?"}),l.jsx("div",{className:"mt-6 grid grid-cols-2 gap-3 sm:grid-cols-4",children:pH.map(Z=>{const D=Z.icon;return l.jsxs("button",{type:"button","data-testid":"builder-intent",onClick:()=>f(Z.starter),className:"flex min-h-24 flex-col justify-between rounded-xl border border-border/40 bg-card/60 p-3 text-left transition-colors hover:border-primary/40",children:[l.jsx("span",{className:`flex size-7 items-center justify-center rounded-lg ${Z.tile}`,children:l.jsx(D,{className:"size-4","aria-hidden":!0})}),l.jsx("span",{className:"mt-3 font-medium text-foreground text-xs leading-snug",children:Z.label})]},Z.id)})}),l.jsxs("form",{onSubmit:ee,className:"mt-6",children:[l.jsxs("div",{className:"relative rounded-2xl border border-border/60 bg-card p-3 shadow-black/20 shadow-lg transition-colors focus-within:border-primary/50",children:[l.jsx(Co,{"aria-label":"Build instructions",className:"min-h-[56px] w-full resize-none border-0 bg-transparent shadow-none focus-visible:ring-0",rows:2,value:d,onChange:Z=>f(Z.target.value),placeholder:"Do anything — @ to reference skills"}),l.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[l.jsx("button",{type:"button","aria-label":"Add attachment",disabled:!0,title:"Attachments land with the real registry",className:"flex size-7 items-center justify-center rounded-full border border-border/60 text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",children:l.jsx(Ps,{className:"size-4","aria-hidden":!0})}),l.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground text-xs",children:[l.jsx(C3,{className:"size-3.5","aria-hidden":!0}),l.jsxs(De,{value:h,onValueChange:p,children:[l.jsx(De.Trigger,{"aria-label":"Approval mode",size:"sm",className:"h-6 border-0 bg-transparent px-1 text-xs shadow-none",children:l.jsx(De.Value,{})}),l.jsxs(De.Content,{children:[l.jsx(De.Item,{value:"ask",children:"Ask for approval"}),l.jsx(De.Item,{value:"auto-edits",children:"Auto-approve edits"}),l.jsx(De.Item,{value:"readonly",children:"Read-only"})]})]})]}),l.jsxs("span",{className:"ml-auto flex items-center gap-1.5",children:[l.jsx(sH,{model:x,effort:b,onModelChange:y,onEffortChange:w}),l.jsx("button",{type:"button","aria-label":"Voice input",disabled:!0,title:"Voice input lands with the real registry",className:"flex size-7 items-center justify-center rounded-full text-muted-foreground disabled:cursor-not-allowed disabled:opacity-60",children:l.jsx(G3,{className:"size-4","aria-hidden":!0})}),l.jsx(He,{type:"submit",size:"sm","aria-label":"Start build session",className:"size-8 rounded-full p-0",children:l.jsx(Y2,{className:"size-4","aria-hidden":!0})})]})]})]}),l.jsxs("div",{className:"mt-2 flex items-center gap-4 px-3 text-muted-foreground text-xs",children:[l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(lp,{className:"size-3.5","aria-hidden":!0}),l.jsxs(De,{value:S,onValueChange:N,children:[l.jsx(De.Trigger,{"aria-label":"Project",size:"sm",className:"h-6 border-0 bg-transparent px-1 text-xs shadow-none",children:l.jsx(De.Value,{})}),l.jsxs(De.Content,{children:[l.jsx(De.Item,{value:"demo-workspace",children:"Demo Workspace"}),l.jsx(De.Item,{value:"new-project",children:"New project"})]})]})]}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx(Vs,{className:"size-3.5","aria-hidden":!0}),l.jsxs(De,{value:i,onValueChange:c,children:[l.jsx(De.Trigger,{"aria-label":"Target agent",size:"sm",className:"h-6 border-0 bg-transparent px-1 text-xs shadow-none",children:l.jsx(De.Value,{})}),l.jsxs(De.Content,{children:[l.jsx(De.Item,{value:"new",children:"New agent"}),o.map(Z=>l.jsx(De.Item,{value:Z.id,children:Z.name},Z.id))]})]})]})]}),l.jsx("p",{className:"mt-3 text-center text-muted-foreground text-xs",children:"Build sessions are scripted fixtures in this milestone — the live assistant attaches when Studio connects to a real registry."})]})]})})]})]})}function na({items:e,columns:r,gridClassName:a,filterPlaceholder:o,filterLabel:i,matches:c,rowKey:d,rowTestId:f="entity-row",onRowClick:h,emptyText:p,noItemsText:x}){const[y,b]=m.useState(""),w=y.trim().toLowerCase(),S=w.length===0?[...e]:e.filter(k=>c(k,w)),N=`grid w-full ${a} items-center gap-4 px-4 py-3 text-left`;return l.jsxs("div",{className:"px-8 py-6",children:[l.jsxs("div",{className:"relative max-w-md",children:[l.jsx(ed,{className:"-translate-y-1/2 absolute top-1/2 left-3 size-4 text-muted-foreground","aria-hidden":!0}),l.jsx("input",{type:"search","aria-label":i,className:"h-9 w-full rounded-lg border border-border/60 bg-card pr-3 pl-9 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:o,value:y,onChange:k=>b(k.target.value)})]}),l.jsxs("div",{className:"mt-4 overflow-hidden rounded-xl border border-border/40",children:[l.jsx("div",{className:`grid ${a} gap-4 border-border/40 border-b bg-card/80 px-4 py-2.5 font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:r.map(k=>l.jsx("span",{children:k.header},k.header))}),l.jsxs("ul",{children:[S.map(k=>l.jsx("li",{className:"border-border/30 border-b last:border-b-0",children:h?l.jsx("button",{type:"button","data-testid":f,className:`${N} transition-colors hover:bg-card`,onClick:()=>h(k),children:r.map(C=>l.jsx("span",{className:"min-w-0",children:C.render(k)},C.header))}):l.jsx("div",{"data-testid":f,className:N,children:r.map(C=>l.jsx("span",{className:"min-w-0",children:C.render(k)},C.header))})},d(k))),S.length===0&&l.jsx("li",{className:"px-4 py-8 text-center text-muted-foreground text-sm",children:e.length===0?x??p:p})]})]})]})}const Dh=Et("/evaluation"),Oh=Et("/evaluation/scorers"),zh=Et("/evaluation/datasets"),Lh=Et("/evaluation/experiments"),gE={month:"short",day:"numeric",hour:"numeric",minute:"2-digit"};function wH(){const e=Ya(),[r,a]=m.useState({scorers:0,datasets:0,experiments:0}),[o,i]=m.useState(null);m.useEffect(()=>{let d=!1;return Promise.all([e.listScorers(),e.listDatasets(),e.listExperiments()]).then(([f,h,p])=>{d||a({scorers:f.length,datasets:h.length,experiments:p.length})}).catch(f=>{d||i(f instanceof Error?f.message:String(f))}),()=>{d=!0}},[e]);const c=[{label:"Scorers",count:r.scorers,to:"/evaluation/scorers",icon:nw},{label:"Datasets",count:r.datasets,to:"/evaluation/datasets",icon:Q2},{label:"Experiments",count:r.experiments,to:"/evaluation/experiments",icon:Mu}];return l.jsxs("section",{children:[l.jsx(At,{icon:Dh.icon,title:Dh.label,description:Dh.description}),o&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:o}),l.jsx("div",{className:"grid max-w-3xl grid-cols-3 gap-4 px-8 py-6",children:c.map(d=>{const f=d.icon;return l.jsxs(Zu,{to:d.to,"data-testid":"evaluation-card",className:"rounded-xl border border-border/40 bg-card/60 p-4 transition-colors hover:border-primary/40",children:[l.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[l.jsx(f,{className:"size-4 text-primary","aria-hidden":!0}),d.label]}),l.jsx("span",{className:"mt-2 block font-display font-semibold text-2xl text-foreground",children:d.count})]},d.label)})})]})}function SH(){const{items:e,loadError:r}=En(a=>a.listScorers());return l.jsxs("section",{children:[l.jsx(At,{icon:Oh.icon,title:Oh.label,description:Oh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_90px_90px]",filterPlaceholder:"Filter by scorer name…",filterLabel:"Filter scorers",matches:(a,o)=>a.name.toLowerCase().includes(o),rowKey:a=>a.id,rowTestId:"scorer-row",emptyText:"No scorers match your filter.",noItemsText:"No scorers registered yet.",columns:[{header:"Name",render:a=>l.jsx("span",{className:"font-medium text-foreground text-sm",children:a.name})},{header:"Description",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.description})},{header:"Source",render:a=>l.jsx(nt,{variant:"outline",children:a.source.toUpperCase()})},{header:"Agents",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.agents})}]})]})}function jH(){const{items:e,loadError:r}=En(a=>a.listDatasets());return l.jsxs("section",{children:[l.jsx(At,{icon:zh.icon,title:zh.label,description:zh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),l.jsx(na,{items:e,gridClassName:"grid-cols-[200px_1fr_70px_140px_150px_120px]",filterPlaceholder:"Filter by dataset name…",filterLabel:"Filter datasets",matches:(a,o)=>a.name.toLowerCase().includes(o),rowKey:a=>a.id,rowTestId:"dataset-row",emptyText:"No datasets match your filter.",noItemsText:"No datasets registered yet.",columns:[{header:"Name",render:a=>l.jsx("span",{className:"font-medium text-foreground text-sm",children:a.name})},{header:"Description",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.description})},{header:"Version",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.version})},{header:"Target",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.target})},{header:"Last updated",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:new Date(a.updatedAt).toLocaleString("en-US",gE)})},{header:"Experiments",render:a=>l.jsxs(nt,{variant:"success",children:[a.experiments," (",Math.round(a.successRate*100),"%)"]})}]})]})}const NH={completed:"success",running:"outline",failed:"destructive"};function kH(){const{items:e,loadError:r}=En(a=>a.listExperiments());return l.jsxs("section",{children:[l.jsx(At,{icon:Lh.icon,title:Lh.label,description:Lh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),l.jsx(na,{items:e,gridClassName:"grid-cols-[110px_1fr_170px_110px_60px_100px_60px_130px]",filterPlaceholder:"Filter by experiment, dataset, or target…",filterLabel:"Filter experiments",matches:(a,o)=>a.id.toLowerCase().includes(o)||a.dataset.toLowerCase().includes(o)||a.target.toLowerCase().includes(o),rowKey:a=>a.id,rowTestId:"experiment-row",emptyText:"No experiments match your filter.",noItemsText:"No experiments registered yet.",columns:[{header:"Experiment",render:a=>l.jsx("span",{className:"font-mono text-foreground text-sm",children:a.id})},{header:"Dataset",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.dataset})},{header:"Target",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.target})},{header:"Status",render:a=>l.jsx(nt,{variant:NH[a.status],children:a.status})},{header:"Items",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.items})},{header:"Succeeded",render:a=>l.jsxs("span",{className:"text-emerald-400 text-sm",children:[a.succeeded," (",a.items===0?0:Math.round(a.succeeded/a.items*100),"%)"]})},{header:"Failed",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.failed})},{header:"Date",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:new Date(a.finishedAt).toLocaleString("en-US",gE)})}]})]})}const CH=Object.freeze(["text","tool","permission","rate-limit","task","lifecycle"]);function ti(e){return e.startsWith("text")?"text":e.startsWith("tool-call")||e==="partial-tool-call"||e==="tool_progress"?"tool":e==="permission_denied"?"permission":e==="rate_limit"?"rate-limit":e.startsWith("task_")?"task":"lifecycle"}const Ph=Et("/observability/events"),EH={text:"default",tool:"success",permission:"destructive","rate-limit":"warning",task:"outline",lifecycle:"outline"};function RH(){const{events:e}=eH(),[r,a]=m.useState("all"),i=e.map((d,f)=>({event:d,ordinal:f})).filter(({event:d})=>r==="all"||ti(d.type)===r),c=d=>e.filter(f=>ti(f.type)===d).length;return l.jsxs("section",{children:[l.jsx(At,{icon:Ph.icon,title:Ph.label,description:Ph.description}),l.jsx("div",{className:"px-8 py-6",children:e.length===0?l.jsx("div",{className:"mx-auto max-w-2xl",children:l.jsx(rn,{title:"No events yet",description:l.jsxs(l.Fragment,{children:["Run an agent in ",l.jsx(Zu,{to:"/agents",children:"Agents"})," to see the typed event stream here."]})})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:["Category",l.jsxs(De,{value:r,onValueChange:d=>a(d),children:[l.jsx(De.Trigger,{"aria-label":"Category",size:"sm",className:"min-w-36",children:l.jsx(De.Value,{})}),l.jsxs(De.Content,{children:[l.jsxs(De.Item,{value:"all",children:["all (",e.length,")"]}),CH.map(d=>l.jsxs(De.Item,{value:d,children:[d," (",c(d),")"]},d))]})]})]}),i.length===0?l.jsx("p",{className:"mt-6 text-muted-foreground",children:"No events match this category."}):l.jsx("ol",{className:"mt-4 space-y-1.5",children:i.map(({event:d,ordinal:f})=>l.jsxs("li",{"data-testid":"event-row",className:"rounded-xl border border-border/40 bg-card/60 px-4 py-2.5 transition-colors hover:border-border",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"w-8 text-right font-mono text-muted-foreground/60 text-xs",children:f+1}),l.jsx(nt,{"data-testid":"event-category",variant:EH[ti(d.type)],children:ti(d.type)}),l.jsx("code",{className:"font-mono text-foreground text-sm",children:d.type})]}),l.jsxs("details",{className:"mt-1.5 pl-11",children:[l.jsx("summary",{className:"cursor-pointer text-muted-foreground text-xs hover:text-foreground",children:"payload"}),l.jsxs("div",{className:"mt-1.5 rounded-lg border border-border/40 bg-background/80 p-3",children:[l.jsxs(ho,{layout:"horizontal",dense:!0,children:[l.jsxs(ho.Item,{children:[l.jsx(ho.Term,{children:"type"}),l.jsx(ho.Detail,{children:l.jsx("code",{className:"font-mono text-xs",children:d.type})})]}),l.jsxs(ho.Item,{children:[l.jsx(ho.Term,{children:"category"}),l.jsx(ho.Detail,{children:ti(d.type)})]})]}),l.jsx("div",{className:"mt-2",children:l.jsx(Tk,{value:d,collapsed:1})})]})]})]},f))})]})})]})}const xE=()=>({datasource_calls_total:{},stream_events_played_total:{},health_errors_total:{},unknown_events_total:{}});let Ih=xE();const mn={increment(e,r="total"){const a=Ih[e];a[r]=(a[r]??0)+1},snapshot(){return structuredClone(Ih)},reset(){Ih=xE()}},U1={memory:"theo-memory",lens:"theo-lens",rag:"theo-rag"};function TH({service:e}){return l.jsx(rn,{"data-testid":"service-offline",eyebrow:U1[e],title:`${U1[e]} is offline`,description:l.jsxs(l.Fragment,{children:["Bring the data stack up with ",l.jsx("code",{children:"theokit studio up"})," to enable this tab. Studio stays functional without Docker (graceful degradation)."]})})}function _H(e){const r=Ya(),[a,o]=m.useState("pending");return m.useEffect(()=>{let i=!1;return r.health().then(c=>{i||o(c[e].status)}).catch(()=>{mn.increment("health_errors_total"),i||o("offline")}),()=>{i=!0}},[r,e]),a}function m0({service:e,children:r}){const a=_H(e);return a==="pending"?l.jsx(s0,{"data-testid":"service-skeleton",className:"m-6 h-32"}):a==="offline"?l.jsx(TH,{service:e}):l.jsx(l.Fragment,{children:r})}function MH(){const e=Ya(),[r,a]=m.useState([]),[o,i]=m.useState(null),[c,d]=m.useState(null),[f,h]=m.useState(null),[p,x]=m.useState(""),[y,b]=m.useState(null),[w,S]=m.useState(null),[N,k]=m.useState(null),C=M=>{S(M instanceof Error?M.message:String(M))};m.useEffect(()=>{let M=!1;return e.listCollections().then(_=>{M||a(_)}).catch(_=>{M||S(_ instanceof Error?_.message:String(_))}),()=>{M=!0}},[e]);const E=async M=>{i(M),h(null),k(null),S(null);try{d(await e.listDocuments(M.id))}catch(_){C(_)}},T=async M=>{if(M.preventDefault(),!!o){if(p.trim().length===0){b("Query is empty — type something to search.");return}b(null);try{k(await e.query(o.id,p))}catch(_){C(_)}}};return l.jsxs("div",{className:"mt-4 grid grid-cols-[240px_1fr] gap-6",children:[w&&l.jsx("p",{role:"alert",className:"col-span-2 text-sm text-red-400",children:w}),l.jsx("nav",{"aria-label":"collections",children:l.jsx("ul",{className:"space-y-1",children:r.map(M=>l.jsx("li",{children:l.jsxs("button",{type:"button",className:`group flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-colors ${o?.id===M.id?"border border-primary/30 bg-primary/10 text-foreground":"border border-transparent text-muted-foreground hover:bg-card hover:text-foreground"}`,onClick:()=>{E(M)},children:[l.jsx(tw,{className:`size-4 shrink-0 ${o?.id===M.id?"text-primary":"text-muted-foreground/70"}`,"aria-hidden":!0}),l.jsxs("span",{className:"min-w-0",children:[l.jsx("span",{className:"block truncate font-medium text-sm",children:M.name}),l.jsxs("span",{className:"block text-muted-foreground text-xs",children:[M.documentCount," docs · ",M.strategy]})]})]})},M.id))})}),l.jsx("div",{children:o===null?l.jsx(rn,{title:"Pick a collection",description:"Browse documents and chunks, or run a retrieval query."}):l.jsxs(l.Fragment,{children:[l.jsxs("form",{onSubmit:T,className:"flex items-end gap-2",children:[l.jsx(ko,{type:"search","aria-label":"Query",placeholder:`Search ${o.name}…`,value:p,onChange:M=>x(M.target.value)}),l.jsx(He,{type:"submit",children:"Retrieve"})]}),y&&l.jsx("p",{role:"alert",className:"mt-2 text-sm text-red-400",children:y}),N&&l.jsx("ol",{className:"mt-4 space-y-2",children:N.map(M=>l.jsxs("li",{"data-testid":"retrieval-result",className:"rounded border border-white/10 p-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(nt,{children:["score ",l.jsx("span",{"data-testid":"score",children:M.score.toFixed(2)})]}),l.jsx("span",{className:"text-xs opacity-60",children:M.strategy})]}),l.jsx("p",{className:"mt-2 text-sm",children:M.excerpt})]},M.chunkId))}),l.jsx("div",{className:"mt-6",children:c!==null&&c.length===0?l.jsx(rn,{title:"No documents in this collection",description:"Ingest documents through theo-rag to see them here."}):l.jsx("ul",{className:"space-y-1",children:(c??[]).map(M=>l.jsxs("li",{children:[l.jsxs("button",{type:"button",className:"w-full rounded-lg border border-border/40 bg-card/60 px-3 py-2 text-left transition-colors hover:border-border",onClick:()=>h(M),children:[M.name,l.jsxs("span",{className:"ml-2 text-xs opacity-60",children:[M.chunks.length," chunks"]})]}),f?.id===M.id&&l.jsx("ol",{className:"mt-1 ml-4 space-y-1",children:M.chunks.map(_=>l.jsx("li",{"data-testid":"chunk-row",className:"rounded border border-white/10 p-2 text-sm opacity-90",children:_.text},_.id))})]},M.id))})})]})})]})}const Uh=Et("/knowledge/collections");function AH(){return l.jsxs("section",{children:[l.jsx(At,{icon:Uh.icon,title:Uh.label,description:Uh.description}),l.jsx("div",{className:"px-8 py-6",children:l.jsx(m0,{service:"rag",children:l.jsx(MH,{})})})]})}const Bh=Et("/observability/logs");function DH(){return l.jsxs("section",{children:[l.jsx(At,{icon:Bh.icon,title:Bh.label,description:Bh.description}),l.jsx("div",{className:"mx-auto max-w-2xl px-8 py-16",children:l.jsx(rn,{title:"No logs in fixtures mode",description:"Runtime logs stream from the theokit dev server once Studio is mounted inside it (roadmap M2). Nothing is simulated here by design.","data-testid":"logs-empty"})})]})}const Hh=Et("/mcp-servers"),vE={tool:Is,agent:Vs,workflow:ag};function OH(e){return[{tag:"HTTP",title:"Regular HTTP Endpoint",hint:"Use for stateless HTTP transport with streamable responses.",value:e.httpUrl},{tag:"SSE",title:"Server-Sent Events",hint:"Use for real-time communication via SSE.",value:e.url},{tag:"CLI",title:"Command Line",hint:"Use for local command-line access via npx and mcp-remote.",value:`npx -y mcp-remote ${e.url}`}]}function zH({value:e}){const[r,a]=m.useState("idle"),o=async()=>{try{await navigator.clipboard.writeText(e),a("copied")}catch{a("failed")}setTimeout(()=>a("idle"),1500)};return l.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[l.jsx("code",{className:"block flex-1 truncate rounded-lg border border-border/50 bg-background px-3 py-2 font-mono text-foreground text-xs",children:e}),r==="failed"&&l.jsx("span",{role:"status",className:"shrink-0 text-red-400 text-xs",children:"Copy failed"}),l.jsx(He,{variant:"ghost",size:"sm",onClick:o,"aria-label":`Copy: ${e}`,className:"shrink-0",children:r==="copied"?l.jsx(Rn,{className:"size-4 text-emerald-400","aria-hidden":!0}):l.jsx(Qu,{className:"size-4","aria-hidden":!0})})]})}function LH({tool:e,onOpen:r}){const a=vE[e.kind];return l.jsx("li",{children:l.jsxs("button",{type:"button","data-testid":"mcp-exposed-tool",onClick:r,className:"flex w-full items-start gap-3 rounded-xl border border-border/40 bg-card/60 px-4 py-3 text-left transition-colors hover:border-primary/40",children:[l.jsx(a,{className:"mt-0.5 size-4 shrink-0 text-primary","aria-hidden":!0}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"font-medium font-mono text-foreground text-sm",children:e.name}),l.jsx("p",{className:"mt-0.5 text-muted-foreground text-xs",children:e.description})]})]})})}function PH({server:e,tool:r,onBack:a}){const o=vE[r.kind];return l.jsxs("div",{className:"flex min-h-0 flex-1 gap-6 px-8 py-6","data-testid":"mcp-tool-detail",children:[l.jsxs("div",{className:"flex w-96 shrink-0 flex-col gap-4",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsxs("p",{className:"flex items-center gap-2 text-sm",children:[l.jsx(o,{className:"size-4 shrink-0 text-primary","aria-hidden":!0}),l.jsx("span",{className:"font-medium font-mono text-foreground",children:r.name})]}),l.jsx("p",{className:"mt-1.5 text-muted-foreground text-xs",children:r.description})]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:"Input Data"}),l.jsx("div",{className:"mt-3 space-y-3",children:r.inputFields.map(i=>l.jsxs("div",{children:[l.jsxs("label",{className:"block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:`tool-input-${i.name}`,children:[i.label,i.required&&l.jsx("span",{className:"ml-0.5 text-red-400","aria-hidden":!0,children:"*"})]}),l.jsx("input",{id:`tool-input-${i.name}`,className:"mt-1.5 h-9 w-full rounded-lg border border-border/60 bg-background px-3 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:i.label})]},i.name))}),l.jsxs(He,{className:"mt-4 w-full gap-1.5",disabled:!0,title:"Invocations land with the real registry",children:[l.jsx(eg,{className:"size-4","aria-hidden":!0}),"Submit"]}),l.jsx("p",{className:"mt-2 text-muted-foreground text-xs",children:"Tool invocations are disabled in fixtures mode — they land when Studio attaches to a real registry."})]}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:a,className:"w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),e.name]})]}),l.jsxs("div",{className:"flex-1 overflow-auto rounded-xl border border-border/40 bg-card/40 p-4",children:[l.jsx("p",{className:"text-muted-foreground text-xs uppercase tracking-wide",children:"Output"}),l.jsx("pre",{className:"mt-2 font-mono text-muted-foreground text-sm",children:"{}"})]})]})}function IH({server:e,onBack:r}){const[a,o]=m.useState(null);return a?l.jsx(PH,{server:e,tool:a,onBack:()=>o(null)}):l.jsxs("div",{className:"flex min-h-0 flex-1 gap-6 px-8 py-6",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("h2",{className:"font-display font-semibold text-foreground text-lg",children:e.name}),l.jsxs(nt,{variant:"outline",children:["Version ",e.version]})]}),l.jsx("p",{className:"mt-2 max-w-prose text-muted-foreground text-sm",children:"This MCP server can be reached through multiple transport methods — pick the one that fits your client."}),l.jsx("div",{className:"mt-5 space-y-4",children:OH(e).map(i=>l.jsxs("div",{"data-testid":"mcp-transport",className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsxs("p",{className:"flex items-center gap-2 text-sm",children:[l.jsx("span",{className:"font-mono text-emerald-400 text-xs",children:i.tag}),l.jsx("span",{className:"font-medium text-foreground",children:i.title})]}),l.jsx("p",{className:"mt-1 text-muted-foreground text-xs",children:i.hint}),l.jsx(zH,{value:i.value})]},i.tag))}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:r,className:"mt-6 w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All MCP servers"]})]}),l.jsxs("div",{className:"w-96 shrink-0",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:"Available Tools"}),l.jsx("ul",{className:"mt-3 space-y-2.5",children:e.availableTools.map(i=>l.jsx(LH,{tool:i,onOpen:()=>o(i)},i.name))})]})]})}function UH(){const{items:e,loadError:r}=En(i=>i.listMcpServers()),[a,o]=m.useState(null);return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:Hh.icon,title:Hh.label,description:Hh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),a===null?l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_repeat(3,90px)]",filterPlaceholder:"Filter by name…",filterLabel:"Filter MCP servers",matches:(i,c)=>i.name.toLowerCase().includes(c),rowKey:i=>i.id,rowTestId:"mcp-server-row",onRowClick:o,emptyText:"No MCP servers match your filter.",noItemsText:"No MCP servers registered yet.",columns:[{header:"Name",render:i=>l.jsx("span",{className:"font-medium text-foreground text-sm",children:i.name})},{header:"URL",render:i=>l.jsx("span",{className:"block truncate font-mono text-muted-foreground text-xs",children:i.url})},{header:"Agents",render:i=>l.jsx("span",{className:"text-muted-foreground text-sm",children:i.agents})},{header:"Tools",render:i=>l.jsx("span",{className:"text-muted-foreground text-sm",children:i.tools})},{header:"Workflows",render:i=>l.jsx("span",{className:"text-muted-foreground text-sm",children:i.workflows})}]}):l.jsx(IH,{server:a,onBack:()=>o(null)})]})}function BH(e,r,a){const o=a.trim().toLowerCase();return e.filter(i=>(r==="all"||i.scope===r)&&(o.length===0||i.content.toLowerCase().includes(o)||i.entities.some(c=>c.toLowerCase().includes(o))))}function HH(){const e=Ya(),[r,a]=m.useState(null),[o,i]=m.useState("all"),[c,d]=m.useState(""),[f,h]=m.useState(null);if(m.useEffect(()=>{let x=!1;return e.getMemories().then(y=>{x||a(y)}).catch(y=>{x||h(y instanceof Error?y.message:String(y))}),()=>{x=!0}},[e]),f)return l.jsx("p",{role:"alert",className:"text-sm text-red-400",children:f});if(r===null)return l.jsx("p",{className:"opacity-70",children:"Loading…"});if(r.length===0)return l.jsx(rn,{title:"No memories yet",description:"Wire memory into your agent with the @usetheo/memory/theokit binding and chat in the Playground."});const p=BH(r,o,c);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mt-4 flex items-end gap-3",children:[l.jsx(ko,{type:"search","aria-label":"Search",placeholder:"Search content or entities…",value:c,onChange:x=>d(x.target.value)}),l.jsxs(De,{value:o,onValueChange:x=>i(x),children:[l.jsx(De.Trigger,{"aria-label":"Scope",size:"sm",className:"min-w-32",children:l.jsx(De.Value,{})}),l.jsxs(De.Content,{children:[l.jsx(De.Item,{value:"all",children:"all scopes"}),l.jsx(De.Item,{value:"user",children:"user"}),l.jsx(De.Item,{value:"session",children:"session"}),l.jsx(De.Item,{value:"agent",children:"agent"})]})]})]}),p.length===0?l.jsx("p",{className:"mt-6 opacity-70",children:"No memories match your search."}):l.jsx("ol",{className:"mt-4 space-y-2",children:p.map(x=>l.jsxs("li",{"data-testid":"memory-row",className:"rounded-xl border border-border/40 bg-card/60 p-4 transition-colors hover:border-border",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(nt,{children:x.scope}),l.jsx("span",{className:"font-mono text-muted-foreground text-xs",children:x.createdAt})]}),l.jsx("p",{className:"mt-2",children:x.content}),l.jsx("div",{className:"mt-2 flex gap-2 text-muted-foreground text-xs",children:x.entities.map(y=>l.jsx("code",{children:y},y))})]},x.id))})]})}const Fh=Et("/memory/memories");function FH(){return l.jsxs("section",{children:[l.jsx(At,{icon:Fh.icon,title:Fh.label,description:Fh.description}),l.jsx("div",{className:"px-8 py-6",children:l.jsx(m0,{service:"memory",children:l.jsx(HH,{})})})]})}const $h=Et("/observability/metrics");function B1(){return Object.entries(mn.snapshot()).flatMap(([e,r])=>Object.entries(r).map(([a,o])=>({metric:e,label:a,value:o})))}function $H(){const[e,r]=m.useState(B1);return l.jsxs("section",{children:[l.jsx(At,{icon:$h.icon,title:$h.label,description:$h.description,actions:l.jsxs(He,{variant:"ghost",size:"sm",className:"gap-1.5",onClick:()=>r(B1()),children:[l.jsx(ow,{className:"size-4","aria-hidden":!0}),"Refresh"]})}),l.jsxs("div",{className:"px-8 py-6",children:[e.length===0?l.jsx("div",{className:"mx-auto max-w-2xl py-10",children:l.jsx(rn,{title:"No metrics recorded yet",description:"Run an agent or browse the data tabs — every datasource call and stream event is counted here.","data-testid":"metrics-empty"})}):l.jsxs("div",{className:"max-w-3xl overflow-hidden rounded-xl border border-border/40",children:[l.jsxs("div",{className:"grid grid-cols-[1fr_1fr_100px] gap-4 border-border/40 border-b bg-card/80 px-4 py-2.5 font-medium text-muted-foreground text-xs uppercase tracking-wide",children:[l.jsx("span",{children:"Metric"}),l.jsx("span",{children:"Label"}),l.jsx("span",{className:"text-right",children:"Value"})]}),l.jsx("ul",{children:e.map(a=>l.jsxs("li",{"data-testid":"metric-row",className:"grid grid-cols-[1fr_1fr_100px] items-center gap-4 border-border/30 border-b px-4 py-2.5 last:border-b-0",children:[l.jsx("span",{className:"truncate font-mono text-foreground text-sm",children:a.metric}),l.jsx("span",{className:"truncate font-mono text-muted-foreground text-sm",children:a.label}),l.jsx("span",{className:"text-right font-mono text-foreground text-sm",children:a.value})]},`${a.metric}:${a.label}`))})]}),l.jsxs("p",{className:"mt-4 max-w-prose text-muted-foreground text-xs",children:["In-memory dev metrics from this session (also available as"," ",l.jsx("code",{className:"font-mono",children:"window.__STUDIO_METRICS__"}),"). Durable metrics ship with the theo-lens integration (roadmap M2)."]})]})]})}function VH({path:e}){const r=Et(e);return l.jsxs("section",{children:[l.jsx(At,{icon:r.icon,title:r.label,description:r.description,actions:l.jsx(nt,{variant:"outline",children:"Planned"})}),l.jsx("div",{className:"px-8 py-6",children:l.jsx("p",{className:"max-w-prose text-muted-foreground text-sm","data-testid":"planned-surface",children:"This surface is part of the Studio information architecture but is not implemented in the M5 fixtures-only phase. It lands in a later milestone — nothing is simulated here by design."})})]})}const qH={parts:[],isRunning:!1,nextSeq:0},GH=(e,r)=>{const a=e.parts.at(-1);return a?.kind==="text"?{...e,parts:[...e.parts.slice(0,-1),{...a,text:a.text+r}]}:{...e,nextSeq:e.nextSeq+1,parts:[...e.parts,{seq:e.nextSeq,kind:"text",text:r}]}},H1=(e,r,a)=>{const o=e.parts.findIndex(d=>d.kind==="tool"&&d.callId===r);if(o===-1)return{...e,nextSeq:e.nextSeq+1,parts:[...e.parts,{seq:e.nextSeq,kind:"tool",callId:r,...a}]};const i=e.parts[o],c=[...e.parts];return c[o]={...i,...a},{...e,parts:c}},Vh=(e,r)=>({...e,nextSeq:e.nextSeq+1,parts:[...e.parts,{seq:e.nextSeq,...r}]});function YH(e,r){switch(r.type){case"text-delta":return GH(e,r.text);case"tool-call-started":case"partial-tool-call":return H1(e,r.callId,{name:r.toolCall.name,args:r.toolCall.args,done:!1});case"tool-call-completed":return H1(e,r.callId,{name:r.toolCall.name,args:r.toolCall.args,result:r.toolCall.result,done:!0});case"permission_denied":return Vh(e,{kind:"notice",notice:"permission-denied",detail:`${r.toolName}: ${r.message}`});case"rate_limit":return Vh(e,{kind:"notice",notice:"rate-limit",detail:`rate limited (attempt ${r.attempt}${r.retryAfterMs!==void 0?`, retry in ${r.retryAfterMs}ms`:""})`});case"tripwire":return Vh(e,{kind:"notice",notice:"tripwire",detail:"processor tripwire"});case"turn-ended":return{...e,isRunning:!1};case"thinking-delta":case"thinking-completed":case"token-delta":case"step-started":case"step-completed":case"user-message-appended":case"summary":case"summary-started":case"summary-completed":case"shell-output-delta":case"tool_progress":case"task_started":case"task_updated":case"task_completed":case"compact_boundary":case"completion_check":return e;default:return mn.increment("unknown_events_total"),{...e,nextSeq:e.nextSeq+1,parts:[...e.parts,{seq:e.nextSeq,kind:"unknown",type:r.type??"?"}]}}}function KH(){const e=Ya(),r=mE(),[a,o]=m.useState(qH),i=m.useRef(null);m.useEffect(()=>()=>{i.current?.abort()},[]);const c=m.useCallback((d,f,h)=>{if(d.length===0||f.trim().length===0)return;i.current?.abort();const p=new AbortController;i.current=p,o({parts:[{seq:0,kind:"user",text:f}],isRunning:!0,nextSeq:1}),r?.startRun(),(async()=>{try{for await(const x of e.runAgent(d,f,p.signal,h)){if(p.signal.aborted)return;o(y=>YH(y,x)),r?.append(x)}}catch(x){if(!p.signal.aborted){const y=x instanceof Error?x.message:String(x);o(b=>({...b,nextSeq:b.nextSeq+1,parts:[...b.parts,{seq:b.nextSeq,kind:"notice",notice:"stream-error",detail:y}]}))}}finally{p.signal.aborted||o(x=>({...x,isRunning:!1}))}})()},[e,r]);return{state:a,send:c}}const qh=Et("/agents");function XH({part:e}){switch(e.kind){case"user":return l.jsx(xi,{from:"user",children:l.jsx(qu,{children:e.text})});case"text":return l.jsx(xi,{from:"assistant",children:l.jsx(qu,{children:e.text})});case"tool":return l.jsx(lB,{tool:e.name,target:JSON.stringify(e.args??{}),status:e.done?"success":"running",output:e.done?l.jsx("pre",{children:JSON.stringify(e.result,null,2)}):void 0});case"notice":return l.jsxs("div",{role:"status",className:"my-1 flex items-center gap-2",children:[l.jsx(nt,{variant:e.notice==="rate-limit"?"warning":"destructive",children:e.notice}),l.jsx("span",{className:"text-muted-foreground text-sm",children:e.detail})]});case"unknown":return l.jsxs("div",{role:"note",className:"my-1 text-muted-foreground text-sm",children:["unknown event: ",e.type]})}}function WH({agents:e,onPick:r}){return l.jsx(na,{items:e,gridClassName:"grid-cols-[200px_1fr_180px]",filterPlaceholder:"Filter by name or description…",filterLabel:"Filter agents",matches:(a,o)=>a.name.toLowerCase().includes(o)||a.description.toLowerCase().includes(o),rowKey:a=>a.id,rowTestId:"agent-row",onRowClick:r,emptyText:"No agents match your filter.",noItemsText:"No agents registered yet.",columns:[{header:"Name",render:a=>l.jsxs("span",{className:"flex items-center gap-2 font-medium text-foreground text-sm",children:[l.jsx("span",{className:"flex size-6 items-center justify-center rounded-md border border-primary/20 bg-primary/10 text-primary",children:l.jsx(Vs,{className:"size-3.5","aria-hidden":!0})}),a.name]})},{header:"Description",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.description})},{header:"Model",render:a=>l.jsx("span",{className:"block truncate font-mono text-muted-foreground text-xs",children:a.model??"—"})}]})}const ZH=["Chat","Editor","Evaluate","Review","Traces"];function QH({agent:e,onBack:r}){const[a,o]=m.useState(""),[i,c]=m.useState({model:e.model??"claude-sonnet-4-6",temperature:.7,topP:1}),{state:d,send:f}=KH(),h=p=>{p.preventDefault(),f(e.id,a,i),a.trim()&&o("")};return l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[l.jsxs("div",{className:"flex items-center gap-3 border-border/40 border-b px-8 py-3",children:[l.jsxs(He,{variant:"ghost",size:"sm",onClick:r,className:"gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All agents"]}),l.jsx("span",{className:"h-4 w-px bg-border/60","aria-hidden":!0}),l.jsx("span",{className:"flex size-7 items-center justify-center rounded-lg border border-primary/20 bg-primary/10 text-primary",children:l.jsx(Vs,{className:"size-4","aria-hidden":!0})}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("span",{className:"block font-medium text-foreground text-sm",children:e.name}),(i.model??e.model)&&l.jsx("span",{className:"block font-mono text-muted-foreground text-xs",children:i.model??e.model})]}),l.jsx("div",{role:"tablist","aria-label":"Agent views",className:"ml-6 flex items-center gap-1",children:ZH.map(p=>l.jsx("button",{type:"button",role:"tab","aria-selected":p==="Chat",disabled:p!=="Chat",title:p==="Chat"?void 0:"Lands in a later milestone",className:p==="Chat"?"rounded-full bg-card px-3 py-1 font-medium text-foreground text-xs":"rounded-full px-3 py-1 text-muted-foreground text-xs disabled:cursor-not-allowed disabled:opacity-60",children:p},p))})]}),l.jsxs("div",{className:"flex min-h-0 flex-1",children:[l.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-border/40 border-r px-4 py-6 md:flex",children:[l.jsxs("div",{className:"mb-4 rounded-xl border border-border/40 bg-card/60 p-4","data-testid":"chat-params-panel",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:"Parameters"}),l.jsx("p",{className:"mt-3 text-muted-foreground text-xs",children:"Model"}),l.jsxs(hu,{"aria-label":"Model",value:i.model??"",onValueChange:p=>c(x=>({...x,model:p})),children:[l.jsx(hu.Input,{placeholder:"Model"}),l.jsx(hu.Content,{children:[e.model??"claude-sonnet-4-6","claude-opus-4-8","claude-haiku-4-5"].filter((p,x,y)=>y.indexOf(p)===x).map(p=>l.jsx(hu.Item,{value:p,children:p},p))})]}),l.jsxs("p",{className:"mt-3 flex justify-between text-muted-foreground text-xs",children:[l.jsx("span",{children:"Temperature"}),l.jsx("span",{className:"font-mono",children:i.temperature?.toFixed(2)})]}),l.jsx(Tp,{"aria-label":"Temperature",min:0,max:1,step:.01,value:[i.temperature??.7],onValueChange:([p])=>c(x=>({...x,temperature:p}))}),l.jsxs("p",{className:"mt-3 flex justify-between text-muted-foreground text-xs",children:[l.jsx("span",{children:"Top-p"}),l.jsx("span",{className:"font-mono",children:i.topP?.toFixed(2)})]}),l.jsx(Tp,{"aria-label":"Top-p",min:0,max:1,step:.01,value:[i.topP??1],onValueChange:([p])=>c(x=>({...x,topP:p}))})]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4 text-center","data-testid":"chat-memory-notice",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:"Memory not enabled"}),l.jsx("p",{className:"mt-1.5 text-muted-foreground text-xs",children:"Conversations are saved as threads once the agent has memory attached — the theo-memory wiring lands with the real registry (M1)."})]})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.jsx("div",{className:"flex-1 overflow-auto px-8 py-6","data-testid":"chat-thread",children:l.jsxs("div",{className:"mx-auto flex max-w-3xl flex-col gap-3",children:[d.parts.length===0&&l.jsxs("div",{className:"flex flex-col items-center gap-3 py-20 text-center",children:[l.jsx("span",{"aria-hidden":!0,className:"flex size-10 items-center justify-center rounded-full border border-primary/20 bg-primary/10 font-medium text-primary text-sm",children:e.name.charAt(0)}),l.jsx("p",{className:"font-medium text-foreground text-sm",children:"How can I help you today?"}),l.jsx("p",{className:"text-muted-foreground text-xs",children:"The typed event stream shows up here and in the Event Inspector."})]}),d.parts.map(p=>l.jsx(XH,{part:p},p.seq))]})}),l.jsx("div",{className:"border-border/40 border-t bg-background/80 px-8 py-4 backdrop-blur",children:l.jsx("form",{onSubmit:h,className:"mx-auto max-w-3xl",children:l.jsxs("div",{className:"flex items-end gap-2 rounded-2xl border border-border/60 bg-card p-2 shadow-black/20 shadow-lg transition-colors focus-within:border-primary/50",children:[e.model&&l.jsx("span",{className:"mb-1.5 ml-1 shrink-0 rounded-md border border-border/60 bg-background px-2 py-1 font-mono text-muted-foreground text-xs",children:e.model}),l.jsx(Co,{"aria-label":"Prompt",className:"min-h-[44px] flex-1 resize-none border-0 bg-transparent shadow-none focus-visible:ring-0",rows:1,value:a,onChange:p=>o(p.target.value),placeholder:"Enter your message…"}),l.jsxs(He,{type:"submit",size:"sm",className:"gap-1.5",children:["Send",l.jsx(gA,{className:"size-4","aria-hidden":!0})]})]})})})]})]})]})}function JH(){const{items:e,loadError:r}=En(i=>i.listAgents()),[a,o]=m.useState(null);return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:qh.icon,title:qh.label,description:qh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),a===null?l.jsx(WH,{agents:e,onPick:o}):l.jsx(QH,{agent:a,onBack:()=>o(null)})]})}const Gh=Et("/processors");function xu({on:e}){return e?l.jsx(Rn,{className:"size-4 text-emerald-400","aria-label":"yes"}):l.jsx(Ju,{className:"size-4 text-muted-foreground/50","aria-label":"no"})}const eF={input:"Input — process input messages before the model (once at start)",step:"Step — process each intermediate step of the run",stream:"Stream — process streamed chunks as they are produced",result:"Result — process the final result before it returns"};function tF(e){return Object.keys(e.hooks).filter(r=>e.hooks[r])}function nF({processor:e,onBack:r}){const a=tF(e),[o,i]=m.useState(a[0]??"input"),[c,d]=m.useState("Hello, this is a test message.");return l.jsxs("div",{className:"flex min-h-0 flex-1 gap-6 px-8 py-6",children:[l.jsxs("div",{className:"flex w-80 shrink-0 flex-col gap-4",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsxs("span",{className:"flex items-center gap-2 font-medium text-foreground text-sm",children:[l.jsx(Z2,{className:"size-4 text-primary","aria-hidden":!0}),e.name]}),l.jsx("p",{className:"mt-1 font-mono text-muted-foreground text-xs",children:e.id}),l.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:a.map(f=>l.jsx(nt,{variant:"outline",children:f},f))}),l.jsxs("p",{className:"mt-3 text-muted-foreground text-xs",children:["Attached to ",e.usedBy," agent",e.usedBy===1?"":"s"]})]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("label",{className:"block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:"processor-phase",children:"Phase"}),l.jsx("div",{className:"mt-1.5",children:l.jsxs(De,{value:o,onValueChange:f=>i(f),children:[l.jsx(De.Trigger,{id:"processor-phase","aria-label":"Phase",size:"sm",className:"w-full",children:l.jsx(De.Value,{})}),l.jsx(De.Content,{children:a.map(f=>l.jsx(De.Item,{value:f,children:f},f))})]})}),l.jsx("p",{className:"mt-2 text-muted-foreground text-xs",children:eF[o]}),l.jsx("label",{className:"mt-4 block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:"processor-test-message",children:"Test Message"}),l.jsx(Co,{id:"processor-test-message",className:"mt-1.5 min-h-24",value:c,onChange:f=>d(f.target.value)}),l.jsxs(He,{className:"mt-3 w-full gap-1.5",disabled:!0,title:"Processor runs land with the real registry",children:[l.jsx(eg,{className:"size-4","aria-hidden":!0}),"Run Processor"]}),l.jsx("p",{className:"mt-2 text-muted-foreground text-xs",children:"Processor runs are disabled in fixtures mode — they land when Studio attaches to a real registry."})]}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:r,className:"w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All processors"]})]}),l.jsxs("div",{className:"flex-1 overflow-auto rounded-xl border border-border/40 bg-card/40 p-4","data-testid":"processor-output",children:[l.jsx("p",{className:"text-muted-foreground text-xs uppercase tracking-wide",children:"Output"}),l.jsx("pre",{className:"mt-2 font-mono text-muted-foreground text-sm",children:"{}"})]})]})}function rF(){const{items:e,loadError:r}=En(i=>i.listProcessors()),[a,o]=m.useState(null);return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:Gh.icon,title:Gh.label,description:Gh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),a===null?l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_repeat(4,70px)_80px]",filterPlaceholder:"Filter by name…",filterLabel:"Filter processors",matches:(i,c)=>i.name.toLowerCase().includes(c),rowKey:i=>i.id,rowTestId:"processor-row",onRowClick:o,emptyText:"No processors match your filter.",noItemsText:"No processors registered yet.",columns:[{header:"Name",render:i=>l.jsx("span",{className:"font-medium text-foreground text-sm",children:i.name})},{header:"Description",render:i=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:i.description??"—"})},{header:"Input",render:i=>l.jsx(xu,{on:i.hooks.input})},{header:"Step",render:i=>l.jsx(xu,{on:i.hooks.step})},{header:"Stream",render:i=>l.jsx(xu,{on:i.hooks.stream})},{header:"Result",render:i=>l.jsx(xu,{on:i.hooks.result})},{header:"Used by",render:i=>l.jsx("span",{className:"text-muted-foreground text-sm",children:i.usedBy})}]}):l.jsx(nF,{processor:a,onBack:()=>o(null)})]})}const Yh=Et("/prompts");function aF({onBack:e}){const[r,a]=m.useState(""),[o,i]=m.useState(""),[c,d]=m.useState(""),[f,h]=m.useState([]),[p,x]=m.useState(""),[y,b]=m.useState(null),w=()=>{const S=p.trim();if(S.length===0){b("Variable name must not be blank");return}if(f.includes(S)){b(`Variable '${S}' is already defined`);return}h([...f,S]),x(""),b(null)};return l.jsxs("div",{className:"flex min-h-0 flex-1 gap-6 px-8 py-6","data-testid":"prompt-create",children:[l.jsxs("div",{className:"flex w-96 shrink-0 flex-col gap-4",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("p",{className:"font-display font-semibold text-foreground text-lg",children:"Configuration"}),l.jsx("p",{className:"mt-1 text-muted-foreground text-xs",children:"Define your prompt block's name and description."}),l.jsxs("label",{className:"mt-4 block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:"prompt-name",children:["Name",l.jsx("span",{className:"ml-0.5 text-red-400","aria-hidden":!0,children:"*"})]}),l.jsx("input",{id:"prompt-name",className:"mt-1.5 h-9 w-full rounded-lg border border-border/60 bg-background px-3 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:"my-prompt-block",value:r,onChange:S=>a(S.target.value)}),l.jsx("label",{className:"mt-4 block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:"prompt-description",children:"Description"}),l.jsx(Co,{id:"prompt-description",className:"mt-1.5 min-h-20",placeholder:"Describe what this prompt block does",value:o,onChange:S=>i(S.target.value)})]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("p",{className:"font-display font-semibold text-foreground text-lg",children:"Variables"}),l.jsxs("p",{className:"mt-1 text-muted-foreground text-xs",children:["Define variables for this prompt block. Use"," ",l.jsx("code",{className:"font-mono text-emerald-400",children:"{{variableName}}"})," syntax in your content."]}),f.length>0&&l.jsx("ul",{className:"mt-3 flex flex-wrap gap-1.5",children:f.map(S=>l.jsx("li",{children:l.jsxs("span",{"data-testid":"prompt-variable",className:"inline-flex items-center gap-1 rounded-md border border-border/60 bg-background px-2 py-1 font-mono text-foreground text-xs",children:[`{{${S}}}`,l.jsx("button",{type:"button","aria-label":`Remove variable ${S}`,onClick:()=>h(f.filter(N=>N!==S)),className:"text-muted-foreground hover:text-foreground",children:l.jsx(Gn,{className:"size-3","aria-hidden":!0})})]})},S))}),l.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[l.jsx("input",{"aria-label":"Variable name",className:"h-8 flex-1 rounded-lg border border-border/60 bg-background px-3 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:"variableName",value:p,onChange:S=>x(S.target.value)}),l.jsxs(He,{variant:"secondary",size:"sm",onClick:w,className:"gap-1",children:[l.jsx(Ps,{className:"size-3.5","aria-hidden":!0}),"Add variable"]})]}),y&&l.jsx("p",{role:"alert",className:"mt-2 text-red-400 text-xs",children:y})]}),l.jsxs(He,{className:"w-full gap-1.5",disabled:!0,title:"Prompt creation lands with the real registry",children:[l.jsx(Rn,{className:"size-4","aria-hidden":!0}),"Create prompt block"]}),l.jsx("p",{className:"text-muted-foreground text-xs",children:"Creation is disabled in fixtures mode — it lands when Studio attaches to a real registry."}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:e,className:"w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All prompts"]})]}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col rounded-xl border border-border/40 bg-card/40 p-4",children:[l.jsx("p",{className:"font-display font-semibold text-foreground text-lg",children:"Content"}),l.jsxs("p",{className:"mt-1 text-muted-foreground text-xs",children:["Write the prompt block content. Use"," ",l.jsx("code",{className:"font-mono text-emerald-400",children:"{{variableName}}"})," for template variables."]}),l.jsx(Co,{"aria-label":"Prompt block content",className:"mt-3 min-h-64 flex-1 resize-none font-mono",placeholder:"Enter prompt block content…",value:c,onChange:S=>d(S.target.value)})]})]})}function oF({prompt:e,onBack:r}){return l.jsxs("div",{className:"mx-auto w-full max-w-3xl px-8 py-6","data-testid":"prompt-detail",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("p",{className:"flex items-center gap-2 text-sm",children:[l.jsx(aw,{className:"size-4 shrink-0 text-primary","aria-hidden":!0}),l.jsx("span",{className:"font-medium font-mono text-foreground",children:e.name})]}),l.jsx(nt,{variant:"outline",children:e.version})]}),l.jsx("p",{className:"mt-1.5 text-muted-foreground text-sm",children:e.description}),l.jsxs("p",{className:"mt-2 text-muted-foreground text-xs",children:["Referenced by ",e.usedBy," agent",e.usedBy===1?"":"s"]})]}),l.jsxs("div",{className:"mt-4 rounded-xl border border-border/40 bg-card/40 p-4",children:[l.jsxs("p",{className:"text-muted-foreground text-xs uppercase tracking-wide",children:["Published content (",e.version,")"]}),l.jsx("pre",{className:"mt-2 whitespace-pre-wrap font-mono text-foreground text-sm",children:e.content})]}),l.jsx("p",{className:"mt-3 text-muted-foreground text-xs",children:"Editing and versioning land when Studio attaches to a real registry — the block is read-only in fixtures mode."}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:r,className:"mt-4 w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All prompts"]})]})}function sF(){const{items:e,loadError:r}=En(d=>d.listPrompts()),[a,o]=m.useState(null),[i,c]=m.useState(!1);return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:Yh.icon,title:Yh.label,description:Yh.description,actions:!i&&l.jsxs(He,{className:"gap-1.5",onClick:()=>c(!0),children:[l.jsx(Ps,{className:"size-4","aria-hidden":!0}),"Create Prompt"]})}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),i?l.jsx(aF,{onBack:()=>{c(!1)}}):a===null?l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_90px_90px]",filterPlaceholder:"Filter by name or description…",filterLabel:"Filter prompts",matches:(d,f)=>d.name.toLowerCase().includes(f)||d.description.toLowerCase().includes(f),rowKey:d=>d.id,rowTestId:"prompt-row",onRowClick:o,emptyText:"No prompts match your filter.",noItemsText:"No prompts yet — create a reusable prompt block and reference it in your agent instructions.",columns:[{header:"Name",render:d=>l.jsx("span",{className:"font-medium font-mono text-foreground text-sm",children:d.name})},{header:"Description",render:d=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:d.description})},{header:"Version",render:d=>l.jsx(nt,{variant:"outline",children:d.version})},{header:"Used by",render:d=>l.jsx("span",{className:"text-muted-foreground text-sm",children:d.usedBy})}]}):l.jsx(oF,{prompt:a,onBack:()=>o(null)})]})}const Kh=Et("/request-context");let F1="{}";function lF(){const[e,r]=m.useState(F1),[a,o]=m.useState(null),[i,c]=m.useState(null),d=()=>{try{JSON.parse(e)}catch(f){o(`Request context must be valid JSON — ${f instanceof Error?f.message:String(f)}`),c(null);return}F1=e,o(null),c(new Date().toLocaleTimeString())};return l.jsxs("section",{children:[l.jsx(At,{icon:Kh.icon,title:Kh.label,description:Kh.description}),l.jsxs("div",{className:"mx-auto max-w-3xl px-8 py-6",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("p",{className:"font-medium text-foreground text-sm uppercase tracking-wide",children:"Request Context"}),l.jsx("p",{className:"mt-2 text-muted-foreground text-sm",children:"Request context is a set of runtime variables injected into every agent run — configure agents and tools once and vary their behavior per request instead of duplicating near-identical agents."})]}),l.jsxs("div",{className:"mt-6",children:[l.jsx("label",{className:"text-muted-foreground text-sm",htmlFor:"request-context-editor",children:"Request Context (JSON)"}),l.jsx("textarea",{id:"request-context-editor","aria-label":"Request Context JSON",className:"mt-2 min-h-64 w-full rounded-xl border border-border/60 bg-card p-4 font-mono text-foreground text-sm outline-none focus:border-primary/50",value:e,onChange:f=>r(f.target.value),spellCheck:!1})]}),a&&l.jsx("p",{role:"alert",className:"mt-2 text-red-400 text-sm",children:a}),i&&!a&&l.jsxs("p",{role:"status",className:"mt-2 text-emerald-400 text-sm",children:["Saved at ",i," for this session — runs consume it once Studio attaches to a real registry."]}),l.jsx("div",{className:"mt-4 flex justify-end",children:l.jsxs(He,{onClick:d,className:"gap-1.5",children:[l.jsx(fA,{className:"size-4","aria-hidden":!0}),"Save"]})})]})]})}const Xh=Et("/settings"),iF=[{label:"Data source",value:"Fixtures (M5 · simulated data)"},{label:"theo-memory",value:"http://localhost:8080"},{label:"theo-lens (OTLP)",value:"http://localhost:4318"},{label:"theo-rag",value:"http://localhost:8787"},{label:"Postgres",value:"localhost:5432 (themem · theolens · therag)"}];function $1({title:e,description:r,children:a}){return l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60",children:[l.jsxs("div",{className:"border-border/40 border-b px-5 py-4",children:[l.jsx("p",{className:"font-display font-semibold text-foreground text-lg",children:e}),l.jsx("p",{className:"mt-1 text-muted-foreground text-sm",children:r})]}),l.jsx("div",{className:"px-5 py-4",children:a})]})}function cF(){return l.jsxs("section",{children:[l.jsx(At,{icon:Xh.icon,title:Xh.label,description:Xh.description}),l.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 px-8 py-6",children:[l.jsx($1,{title:"Theme",description:"Appearance of the Studio.",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-medium text-foreground text-sm",children:"Theme mode"}),l.jsx(nt,{variant:"outline",children:"Dark"})]})}),l.jsx($1,{title:"Stack connection",description:"Service endpoints Studio talks to through the theokit dev proxy. Read-only in fixtures mode — editing lands with the real config seam.",children:l.jsx("ul",{className:"space-y-2.5",children:iF.map(e=>l.jsxs("li",{"data-testid":"settings-row",className:"flex items-center justify-between gap-4",children:[l.jsx("span",{className:"text-muted-foreground text-sm",children:e.label}),l.jsx("span",{className:"truncate font-mono text-foreground text-sm",children:e.value})]},e.label))})})]})]})}const Wh=Et("/tools");function uF(){const{items:e,loadError:r}=En(a=>a.listTools());return l.jsxs("section",{children:[l.jsx(At,{icon:Wh.icon,title:Wh.label,description:Wh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_90px]",filterPlaceholder:"Filter by name or description…",filterLabel:"Filter tools",matches:(a,o)=>a.name.toLowerCase().includes(o)||a.description.toLowerCase().includes(o),rowKey:a=>a.id,rowTestId:"tool-row",emptyText:"No tools match your filter.",noItemsText:"No tools registered yet.",columns:[{header:"Name",render:a=>l.jsx("span",{className:"font-mono font-medium text-foreground text-sm",children:a.name})},{header:"Description",render:a=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:a.description})},{header:"Used by",render:a=>l.jsx("span",{className:"text-muted-foreground text-sm",children:a.usedBy??0})}]})]})}const Zh=Et("/observability/traces");function dF(){return l.jsxs("section",{children:[l.jsx(At,{icon:Zh.icon,title:Zh.label,description:Zh.description}),l.jsxs("div",{className:"px-8 py-6",children:[l.jsxs("p",{className:"max-w-prose text-muted-foreground text-sm",children:["Trace visualization belongs to ",l.jsx("strong",{className:"text-foreground",children:"theo-lens"})," — Studio embeds the lens UI in this tab once the data stack is up (roadmap M2). Nothing is rebuilt here by design."]}),l.jsx("div",{className:"mx-auto mt-8 max-w-2xl",children:l.jsx(m0,{service:"lens",children:l.jsx("p",{"data-testid":"lens-embed-slot",children:"lens-web embed (M2)"})})})]})]})}const Qh=Et("/workflows");function fF({step:e}){return l.jsxs("div",{className:"w-72 rounded-xl border border-border/50 bg-card px-4 py-3",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:e.name}),l.jsx("p",{className:"mt-1 text-muted-foreground text-xs",children:e.description})]})}function V1({label:e}){return l.jsx("div",{className:"flex size-14 items-center justify-center rounded-full border border-border/50 bg-card text-foreground text-xs",children:e})}function q1(){return l.jsx("div",{className:"h-10 w-px border-border/70 border-l border-dashed","aria-hidden":!0})}function mF({workflow:e,onBack:r}){return l.jsxs("div",{className:"flex min-h-0 flex-1 gap-6 px-8 py-6",children:[l.jsxs("div",{className:"flex w-80 shrink-0 flex-col gap-4",children:[l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"flex items-center gap-2 font-medium text-foreground text-sm",children:[l.jsx(ag,{className:"size-4 text-primary","aria-hidden":!0}),e.name]}),l.jsxs(nt,{variant:"outline",children:[e.steps.length," steps"]})]}),l.jsxs("div",{className:"mt-4",children:[l.jsx("label",{className:"block text-muted-foreground text-xs uppercase tracking-wide",htmlFor:"workflow-run-input",children:e.inputLabel}),l.jsx("input",{id:"workflow-run-input",className:"mt-1.5 h-9 w-full rounded-lg border border-border/60 bg-background px-3 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:e.inputLabel})]}),l.jsxs(He,{className:"mt-3 w-full gap-1.5",disabled:!0,title:"Runs land with the real registry",children:[l.jsx(eg,{className:"size-4","aria-hidden":!0}),"Run"]}),l.jsx("p",{className:"mt-2 text-muted-foreground text-xs",children:"Workflow runs are disabled in fixtures mode — they land when Studio attaches to a real registry."})]}),l.jsxs("div",{className:"rounded-xl border border-border/40 bg-card/60 p-4",children:[l.jsx("p",{className:"font-medium text-foreground text-sm",children:"Recent runs"}),l.jsx("ul",{className:"mt-2 space-y-1.5",children:e.recentRuns.map(a=>l.jsxs("li",{"data-testid":"workflow-run",className:"flex items-center gap-2 text-sm",children:[a.status==="success"?l.jsx(Rn,{className:"size-3.5 text-emerald-400","aria-hidden":!0}):l.jsx(Gn,{className:"size-3.5 text-red-400","aria-hidden":!0}),l.jsx("span",{className:"sr-only",children:a.status}),l.jsx("span",{className:"truncate font-mono text-muted-foreground text-xs",children:a.id}),l.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground text-xs",children:new Date(a.finishedAt).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]},a.id))})]}),l.jsxs(He,{variant:"ghost",size:"sm",onClick:r,className:"w-fit gap-1.5",children:[l.jsx(Fa,{className:"size-4","aria-hidden":!0}),"All workflows"]})]}),l.jsxs("div",{className:"flex flex-1 flex-col items-center overflow-auto rounded-xl border border-border/40 py-8 [background-image:radial-gradient(oklch(0.35_0.02_296/0.5)_1px,transparent_1px)] [background-size:20px_20px]","data-testid":"workflow-graph",children:[l.jsx(V1,{label:"Start"}),e.steps.map(a=>l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx(q1,{}),l.jsx(fF,{step:a})]},a.id)),l.jsx(q1,{}),l.jsx(V1,{label:"End"})]})]})}function hF(){const{items:e,loadError:r}=En(i=>i.listWorkflows()),[a,o]=m.useState(null);return l.jsxs("section",{className:"flex h-full flex-col",children:[l.jsx(At,{icon:Qh.icon,title:Qh.label,description:Qh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),a===null?l.jsx(na,{items:e,gridClassName:"grid-cols-[220px_1fr_140px]",filterPlaceholder:"Filter by name or description…",filterLabel:"Filter workflows",matches:(i,c)=>i.name.toLowerCase().includes(c)||i.description.toLowerCase().includes(c),rowKey:i=>i.id,rowTestId:"workflow-row",onRowClick:o,emptyText:"No workflows match your filter.",noItemsText:"No workflows registered yet.",columns:[{header:"Name",render:i=>l.jsx("span",{className:"font-medium text-foreground text-sm",children:i.name})},{header:"Description",render:i=>l.jsx("span",{className:"block truncate text-muted-foreground text-sm",children:i.description})},{header:"Number of steps",render:i=>l.jsx("span",{className:"text-muted-foreground text-sm",children:i.steps.length})}]}):l.jsx(mF,{workflow:a,onBack:()=>o(null)})]})}const Jh=Et("/workspaces");function pF(e){const r=new TextEncoder().encode(e).length;return r<1024?`${r} B`:`${(r/1024).toFixed(1)} KB`}function gF(e,r){const a=r===""?"":`${r}/`;return e.filter(o=>!o.path.startsWith(a)||o.path===r?!1:!o.path.slice(a.length).includes("/")).sort((o,i)=>o.kind===i.kind?o.path.localeCompare(i.path):o.kind==="dir"?-1:1)}function xF({workspace:e,onRefresh:r}){const a=Ya(),[o,i]=m.useState(""),[c,d]=m.useState(null),[f,h]=m.useState(!1),[p,x]=m.useState(""),[y,b]=m.useState(null),w=m.useRef(null),S=m.useRef(null),N=gF(e.files,o),k=o===""?[]:o.split("/"),C=T=>{if(b(null),T.kind==="dir"){i(T.path);return}a.readWorkspaceFile(e.id,T.path).then(M=>d({path:T.path,content:M})).catch(M=>b(M instanceof Error?M.message:String(M)))},E=()=>{const T=p.trim();if(T.includes("/")){b("Folder name must not contain '/'");return}const M=o===""?T:`${o}/${T}`;a.createWorkspaceFolder(e.id,M).then(()=>{x(""),h(!1),b(null),r()}).catch(_=>b(_ instanceof Error?_.message:String(_)))};return l.jsxs("div",{children:[l.jsxs("p",{className:"flex items-center gap-2 font-medium text-foreground text-sm",children:[l.jsx(tg,{className:"size-4 text-primary","aria-hidden":!0}),e.name]}),l.jsxs("div",{className:"mt-3 flex items-start gap-6",children:[l.jsxs("div",{className:"w-full max-w-2xl overflow-hidden rounded-xl border border-border/40",children:[l.jsxs("div",{className:"flex items-center gap-1 border-border/40 border-b bg-card/80 px-3 py-2",children:[l.jsx("button",{type:"button","aria-label":"Go to workspace root",onClick:()=>i(""),className:"rounded-md p-1 text-muted-foreground hover:bg-muted/40 hover:text-foreground",children:l.jsx(tw,{className:"size-4","aria-hidden":!0})}),k.map((T,M)=>{const _=k.slice(0,M+1).join("/");return l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx("span",{className:"text-muted-foreground/50 text-xs",children:"/"}),l.jsx("button",{type:"button",onClick:()=>i(_),className:"rounded px-1 py-0.5 text-foreground text-sm hover:bg-muted/40",children:T})]},_)}),l.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[l.jsx("button",{type:"button",ref:S,"aria-label":"Refresh files",onClick:r,className:"rounded-md p-1 text-muted-foreground hover:bg-muted/40 hover:text-foreground",children:l.jsx(ow,{className:"size-4","aria-hidden":!0})}),l.jsx("button",{type:"button",ref:w,"aria-label":"New folder",onClick:()=>{h(!0),b(null)},className:"rounded-md p-1 text-muted-foreground hover:bg-muted/40 hover:text-foreground",children:l.jsx(h3,{className:"size-4","aria-hidden":!0})})]})]}),f&&l.jsxs("div",{className:"flex items-center gap-2 border-border/40 border-b bg-card/40 px-3 py-2",children:[l.jsx(ip,{className:"size-4 shrink-0 text-amber-400","aria-hidden":!0}),l.jsx("input",{"aria-label":"Folder name",className:"h-8 flex-1 rounded-lg border border-border/60 bg-background px-3 text-foreground text-sm outline-none placeholder:text-muted-foreground focus:border-primary/50",placeholder:"folder-name",value:p,onChange:T=>x(T.target.value),onKeyDown:T=>{T.key==="Enter"&&E()}}),l.jsx(He,{size:"sm",onClick:E,children:"Create folder"}),l.jsx(He,{size:"sm",variant:"ghost",onClick:()=>{h(!1),x(""),b(null),w.current?.focus()},children:"Cancel"})]}),l.jsxs("ul",{children:[N.map(T=>{const M=T.path.split("/").at(-1)??T.path;return l.jsx("li",{className:"border-border/30 border-b last:border-b-0",children:l.jsxs("button",{type:"button","data-testid":"workspace-file",onClick:()=>C(T),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-card",children:[T.kind==="dir"?l.jsx(ip,{className:"size-4 shrink-0 text-amber-400","aria-hidden":!0}):l.jsx(sp,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"text-foreground text-sm",children:M}),T.kind==="file"&&T.content!==void 0&&l.jsx("span",{className:"ml-auto text-muted-foreground text-xs",children:pF(T.content)})]})},T.path)}),N.length===0&&l.jsx("li",{className:"px-4 py-6 text-center text-muted-foreground text-sm",children:"Empty folder."})]})]}),c&&l.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden rounded-xl border border-border/40","data-testid":"workspace-file-viewer",children:[l.jsxs("div",{className:"flex items-center gap-2 border-border/40 border-b bg-card/80 px-4 py-2",children:[l.jsx(sp,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":!0}),l.jsx("span",{className:"truncate font-medium text-foreground text-sm",children:c.path}),l.jsxs(He,{size:"sm",variant:"ghost",className:"ml-auto gap-1",onClick:()=>{d(null),S.current?.focus()},children:[l.jsx(Gn,{className:"size-3.5","aria-hidden":!0}),"Close"]})]}),l.jsx("pre",{className:"max-h-96 overflow-auto whitespace-pre-wrap p-4 font-mono text-foreground text-sm",children:c.content})]})]}),y&&l.jsx("p",{role:"alert",className:"mt-2 text-red-400 text-sm",children:y}),l.jsx("p",{className:"mt-3 text-muted-foreground text-xs",children:"Session-only workspace — folder changes reset on reload; the real workspace lands with the dev server."})]})}function vF(){const{items:e,loadError:r,reload:a}=En(o=>o.listWorkspaces());return l.jsxs("section",{children:[l.jsx(At,{icon:Jh.icon,title:Jh.label,description:Jh.description}),r&&l.jsx("p",{role:"alert",className:"mx-8 mt-4 text-red-400 text-sm",children:r}),l.jsxs("div",{className:"space-y-6 px-8 py-6",children:[e.length===0&&l.jsx("div",{className:"mx-auto max-w-2xl py-10",children:l.jsx(rn,{title:"No workspaces yet",description:"Workspaces appear here once the registry declares them.","data-testid":"workspaces-empty"})}),e.map(o=>l.jsx(xF,{workspace:o,onRefresh:a},o.id))]})]})}function G1(){const e=O2(),r=e instanceof Error?e.message:String(e);return l.jsxs("section",{role:"alert",className:"p-6",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Something went wrong"}),l.jsx("p",{className:"mt-2 opacity-80",children:"This page hit an error — every other surface keeps working."}),l.jsx("pre",{className:"mt-4 overflow-auto rounded bg-black/30 p-3 text-sm",children:r})]})}function yF(){const r=u4().map(a=>a.handle?.label).filter(a=>!!a);return l.jsx(Ss,{className:"text-sm",children:l.jsxs(Ss.List,{children:[l.jsx(Ss.Item,{children:l.jsx("span",{className:"text-muted-foreground",children:"Studio"})}),r.map((a,o)=>l.jsxs(m.Fragment,{children:[l.jsx(Ss.Separator,{children:l.jsx("span",{className:"text-muted-foreground/50",children:"/"})}),l.jsx(Ss.Item,{children:o===r.length-1?l.jsx(Ss.Page,{className:"font-medium",children:a}):l.jsx("span",{className:"text-muted-foreground",children:a})})]},a))]})})}function bF({title:e}){return l.jsxs("section",{className:"p-8",children:[l.jsx("h1",{className:"font-semibold text-xl",children:e}),l.jsx("p",{className:"mt-2 text-muted-foreground",children:"Surface under construction in this M5 phase."})]})}function wF(){return l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("div",{className:"relative flex size-8 items-center justify-center rounded-lg bg-gradient-to-br from-primary via-primary-deep to-primary/60 shadow-[0_0_20px_-4px] shadow-primary/60",children:l.jsx(R3,{className:"size-4 text-primary-foreground","aria-hidden":!0})}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("span",{className:"sr-only",children:"TheoKit Studio"}),l.jsx("span",{"aria-hidden":!0,className:"block font-display font-semibold text-foreground text-sm tracking-tight",children:"TheoKit"}),l.jsx("span",{"aria-hidden":!0,className:"block text-[11px] text-muted-foreground tracking-widest uppercase",children:"Studio"})]})]})}function SF(){const e=M2(),r=br(),a=rH(r.pathname),o=nH(a),i=m.useRef(a),[c,d]=m.useState("none");m.useEffect(()=>{const x=i.current;if(x===a)return;const y=Op[x]?.parent?1:0,b=o.parent?1:0;d(b>y?"push":"pop"),i.current=a;const w=setTimeout(()=>d("none"),200);return()=>clearTimeout(w)},[a,o.parent]);const f=x=>o.parent?r.pathname===x:r.pathname.startsWith(x),h=x=>l.jsxs(l.Fragment,{children:[x.parent?l.jsx(js.Header,{className:"px-3 py-3",children:l.jsxs("div",{className:"flex w-full flex-col",children:[l.jsxs("button",{type:"button",onClick:()=>e("/"),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 font-medium text-muted-foreground text-sm transition-colors hover:bg-muted/40 hover:text-foreground","aria-label":`Back to ${Op[x.parent]?.title??"main menu"}`,children:[l.jsx(Fa,{className:"size-4 shrink-0","aria-hidden":!0}),l.jsx("span",{children:"Back"})]}),l.jsx("p",{className:"truncate px-2 pt-2 text-[11px] text-muted-foreground uppercase tracking-widest",children:x.title})]})}):l.jsx(js.Header,{className:"px-4 py-4",children:l.jsx(wF,{})}),x.groups.map(y=>l.jsx(js.Section,{title:y.title,children:y.items.map(b=>{const w=b.icon;return l.jsx(js.Item,{icon:w,active:f(b.path),"aria-current":f(b.path)?"page":void 0,onClick:()=>e(b.path),title:b.label,children:l.jsxs("span",{className:"flex w-full items-center justify-between gap-2",children:[l.jsx("span",{className:"truncate",children:b.label}),b.drillsInto&&l.jsx(Jr,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0})]})},b.path)})},y.title??y.items[0]?.path))]}),p=c==="push"?"animate-[slidein-right_180ms_ease-out]":c==="pop"?"animate-[slidein-left_180ms_ease-out]":"";return l.jsxs("div",{"data-testid":"studio-smoke",className:"flex h-screen overflow-hidden bg-background",children:[l.jsx("style",{children:`
|
|
69
|
-
@keyframes slidein-right {
|
|
70
|
-
from { transform: translateX(12%); opacity: 0; }
|
|
71
|
-
to { transform: translateX(0); opacity: 1; }
|
|
72
|
-
}
|
|
73
|
-
@keyframes slidein-left {
|
|
74
|
-
from { transform: translateX(-12%); opacity: 0; }
|
|
75
|
-
to { transform: translateX(0); opacity: 1; }
|
|
76
|
-
}
|
|
77
|
-
`}),l.jsx(js,{className:"w-60 shrink-0",children:l.jsxs("div",{className:`flex h-full flex-col ${p}`,children:[h(o),l.jsx(js.Footer,{className:"mt-auto px-4 py-3",children:l.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border/40 bg-card/60 px-3 py-2",children:[l.jsx(Mu,{className:"size-3.5 text-amber-400","aria-hidden":!0}),l.jsxs("div",{className:"leading-tight",children:[l.jsx("span",{className:"block font-medium text-foreground text-xs",children:"Fixtures mode"}),l.jsx("span",{className:"block text-[11px] text-muted-foreground",children:"M5 · simulated data"})]})]})})]},a)}),l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-border/40 border-b bg-background/80 px-8 backdrop-blur",children:[l.jsx(yF,{}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-card px-3 py-1 text-muted-foreground text-xs",children:[l.jsx("span",{className:"size-1.5 rounded-full bg-emerald-400","aria-hidden":!0}),"dev server"]})})]}),l.jsxs("main",{className:"relative flex-1 overflow-auto",children:[l.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-80 [background:radial-gradient(600px_240px_at_65%_-40%,oklch(0.45_0.18_296/0.28),transparent_70%)]"}),l.jsx("div",{className:"relative",children:l.jsx(w4,{})})]})]})]})}function jF(){return l.jsx(rn,{title:"Page not found",description:"This route does not exist in Studio.","data-testid":"not-found"})}const NF={"/agents":l.jsx(JH,{}),"/builder":l.jsx(bH,{}),"/prompts":l.jsx(sF,{}),"/workflows":l.jsx(hF,{}),"/processors":l.jsx(rF,{}),"/mcp-servers":l.jsx(UH,{}),"/tools":l.jsx(uF,{}),"/workspaces":l.jsx(vF,{}),"/request-context":l.jsx(lF,{}),"/evaluation":l.jsx(wH,{}),"/evaluation/scorers":l.jsx(SH,{}),"/evaluation/datasets":l.jsx(jH,{}),"/evaluation/experiments":l.jsx(kH,{}),"/observability/events":l.jsx(RH,{}),"/observability/metrics":l.jsx($H,{}),"/observability/traces":l.jsx(dF,{}),"/observability/logs":l.jsx(DH,{}),"/memory/memories":l.jsx(FH,{}),"/knowledge/collections":l.jsx(AH,{}),"/settings":l.jsx(cF,{})},kF={playground:"/agents",events:"/observability/events",traces:"/observability/traces"};function CF(e=[]){return[{path:"/",element:l.jsx(SF,{}),hydrateFallbackElement:l.jsx(bF,{title:"Loading"}),children:[{index:!0,loader:()=>hb("/agents"),element:null},...Object.entries(kF).map(([r,a])=>({path:r,loader:()=>hb(a),element:null})),...hE.map(r=>({path:r.path.slice(1),element:NF[r.path]??l.jsx(VH,{path:r.path}),errorElement:l.jsx(G1,{}),handle:{label:r.label}})),...e.map(r=>({errorElement:l.jsx(G1,{}),...r})),{path:"*",element:l.jsx(jF,{})}]}]}const EF=CF(),RF=Object.freeze([{id:"relevancy",name:"Relevancy Scorer",description:"Scores how relevant the agent answer is to the user question",source:"code",agents:1},{id:"toxicity",name:"Toxicity Scorer",description:"Flags unsafe or toxic content in agent outputs",source:"code",agents:2}]),TF=Object.freeze([{id:"support-questions",name:"support-questions",description:"Support questions used to evaluate the Support Agent",version:"v1",target:"Support Agent",updatedAt:"2026-07-14T17:39:00Z",experiments:2,successRate:1}]),_F=Object.freeze([{id:"2c78e0cf",dataset:"support-questions",target:"agent support-agent",status:"completed",items:5,succeeded:5,failed:0,finishedAt:"2026-07-14T18:10:00Z"},{id:"e3b51f02",dataset:"support-questions",target:"agent support-agent",status:"completed",items:5,succeeded:5,failed:0,finishedAt:"2026-07-14T17:53:00Z"}]),MF=Object.freeze([{id:"docs",name:"Product Docs",documentCount:2,strategy:"hybrid"},{id:"faqs",name:"Support FAQs",documentCount:1,strategy:"semantic"},{id:"changelog",name:"Release Notes",documentCount:0,strategy:"semantic"}]),Y1=Object.freeze({docs:[{id:"doc-getting-started",name:"getting-started.md",chunks:[{id:"gs-1",text:"Install the CLI with pnpm add -g theokit and run theokit dev."},{id:"gs-2",text:"Studio opens at /_studio inside the dev server."},{id:"gs-3",text:"Agents are registered in the @theokit/sdk registry, in code."}]},{id:"doc-memory-guide",name:"memory-guide.md",chunks:[{id:"mg-1",text:"theo-memory stores memories scoped as user/session/agent."},{id:"mg-2",text:"The @usetheo/memory/theokit binding wires memory into the agent."}]}],faqs:[{id:"doc-faq-billing",name:"billing-faq.md",chunks:[{id:"fb-1",text:"Refunds above $500 require human approval."},{id:"fb-2",text:"Plan upgrades are applied immediately."}]}],changelog:[]}),AF=Object.freeze([{chunkId:"mg-1",documentId:"doc-memory-guide",score:.92,excerpt:"theo-memory stores memories scoped as user/session/agent.",strategy:"hybrid"},{chunkId:"gs-3",documentId:"doc-getting-started",score:.81,excerpt:"Agents are registered in the @theokit/sdk registry, in code.",strategy:"hybrid"},{chunkId:"fb-1",documentId:"doc-faq-billing",score:.64,excerpt:"Refunds above $500 require human approval.",strategy:"hybrid"}]),DF=Object.freeze([{id:"mem-001",scope:"user",content:"Prefers replies in Portuguese; timezone America/Sao_Paulo",createdAt:"2026-07-10T14:22:00Z",entities:["language","timezone"]},{id:"mem-002",scope:"user",content:"Pro plan customer since 2026-03; opened 4 billing tickets so far",createdAt:"2026-07-11T09:10:00Z",entities:["plan","billing"]},{id:"mem-003",scope:"session",content:"In this session they are debugging the payment webhook",createdAt:"2026-07-14T11:02:00Z",entities:["webhook","payment"]},{id:"mem-004",scope:"agent",content:"refundOrder tool requires human approval above $500",createdAt:"2026-06-30T16:45:00Z",entities:["refundOrder","approval"]}]),OF=Object.freeze([{id:"support-agent",name:"Support Agent",description:"Answers support tickets with access to the knowledge base",model:"claude-sonnet-4-6"},{id:"research-agent",name:"Research Agent",description:"Researches topics in depth with search tools",model:"claude-opus-4-8"},{id:"coding-agent",name:"Coding Agent",description:"Writes and reviews code with repository access",model:"claude-fable-5"}]),zF=Object.freeze([{id:"web-search",name:"webSearch",description:"Web search with allowlist",usedBy:2},{id:"read-file",name:"readFile",description:"Reads workspace files",usedBy:1},{id:"write-file",name:"writeFile",description:"Writes workspace files",usedBy:1},...Array.from({length:52},(e,r)=>({id:`mcp-tool-${r+1}`,name:`mcpTool${r+1}`,description:`Tool ${r+1} exposed by a sample MCP server`,usedBy:r%3===0?1:0}))]),LF=Object.freeze([{id:"refine-support-tone",title:"Refine Support Agent tone",agentId:"support-agent",lastActivity:"2m",pinned:!0},{id:"refund-approvals",title:"Add refundOrder approvals to Support Agent",agentId:"support-agent",lastActivity:"1h",pinned:!1},{id:"scaffold-triage",title:"Scaffold a billing triage agent",lastActivity:"3h",pinned:!1},{id:"wire-websearch",title:"Wire webSearch into Research Agent",agentId:"research-agent",lastActivity:"1d",pinned:!1}]),PF=Object.freeze({"refine-support-tone":{id:"refine-support-tone",title:"Refine Support Agent tone",agentId:"support-agent",lastActivity:"2m",pinned:!0,workedFor:"2m 30s",workLog:["Read agents/support-agent.ts and the current instructions","Rewrote the instructions with a warmer, more concise tone","Kept the $500 refund approval guardrail","Updated the welcome copy in prompts/support-tone.md to match","Ran the agent smoke test locally — replies read warmer and shorter"],messages:[{role:"user",text:"The Support Agent sounds robotic. Make the tone warmer and more concise, and keep the refund guardrail."},{role:"assistant",text:"Done — I rewrote the instructions with a warmer greeting and shorter sentences, kept the documentation citations, and preserved the $500 refund approval guardrail. I also aligned the shared tone prompt block so both stay consistent."}],files:[{path:"agents/support-agent.ts",additions:4,deletions:1,diff:`--- agents/support-agent.ts
|
|
78
|
-
+++ agents/support-agent.ts
|
|
79
|
-
export const supportAgent = defineAgent({
|
|
80
|
-
id: "support-agent",
|
|
81
|
-
model: "claude-sonnet-4-6",
|
|
82
|
-
- instructions: "Answer support tickets.",
|
|
83
|
-
+ instructions:
|
|
84
|
-
+ "Answer support tickets with a warm, concise tone. " +
|
|
85
|
-
+ "Cite documentation when it exists. Never promise refunds " +
|
|
86
|
-
+ "above $500 without human approval.",
|
|
87
|
-
tools: [lookupOrder, refundOrder, searchDocs],
|
|
88
|
-
});`},{path:"prompts/support-tone.md",additions:2,deletions:2,diff:`--- prompts/support-tone.md
|
|
89
|
-
+++ prompts/support-tone.md
|
|
90
|
-
# support-tone
|
|
91
|
-
-Reply formally.
|
|
92
|
-
-Keep answers complete.
|
|
93
|
-
+Reply warmly and get to the point.
|
|
94
|
-
+Prefer short sentences; link docs when they exist.`}]},"refund-approvals":{id:"refund-approvals",title:"Add refundOrder approvals to Support Agent",agentId:"support-agent",lastActivity:"1h",pinned:!1,workedFor:"1m 12s",workLog:["Inspected tools/refund-order.ts","Added an approval hook for amounts above $500","Verified the run pauses and waits for a human decision"],messages:[{role:"user",text:"Require human approval on refundOrder above $500."},{role:"assistant",text:"Added an approval hook to refundOrder: amounts above $500 now pause the run and wait for a human decision."}],files:[{path:"tools/refund-order.ts",additions:1,deletions:0,diff:`--- tools/refund-order.ts
|
|
95
|
-
+++ tools/refund-order.ts
|
|
96
|
-
export const refundOrder = defineTool({
|
|
97
|
-
id: "refundOrder",
|
|
98
|
-
+ approval: { required: (input) => input.amount > 500 },
|
|
99
|
-
run: async (input) => processRefund(input),
|
|
100
|
-
});`}]},"scaffold-triage":{id:"scaffold-triage",title:"Scaffold a billing triage agent",lastActivity:"3h",pinned:!1,workedFor:"3m 05s",workLog:["Scaffolded agents/triage-agent.ts","Added a severity classifier and the human handoff tool","Registered the agent in the registry index"],messages:[{role:"user",text:"Scaffold an agent that triages billing tickets by severity."},{role:"assistant",text:"Scaffolded triage-agent with a severity classifier and a handoff to the human queue for critical tickets."}],files:[{path:"agents/triage-agent.ts",additions:6,deletions:0,diff:`+++ agents/triage-agent.ts
|
|
101
|
-
+export const triageAgent = defineAgent({
|
|
102
|
-
+ id: "triage-agent",
|
|
103
|
-
+ model: "claude-haiku-4-5",
|
|
104
|
-
+ instructions: "Classify billing tickets by severity and route critical ones to a human.",
|
|
105
|
-
+ tools: [classifySeverity, handoffToHuman],
|
|
106
|
-
+});`}]},"wire-websearch":{id:"wire-websearch",title:"Wire webSearch into Research Agent",agentId:"research-agent",lastActivity:"1d",pinned:!1,workedFor:"58s",workLog:["Opened agents/research-agent.ts","Added webSearch with the domain allowlist enforced at the tool boundary"],messages:[{role:"user",text:"Give the Research Agent access to webSearch with the allowlist."},{role:"assistant",text:"Wired webSearch into research-agent with the domain allowlist enforced at the tool boundary."}],files:[{path:"agents/research-agent.ts",additions:1,deletions:1,diff:`--- agents/research-agent.ts
|
|
107
|
-
+++ agents/research-agent.ts
|
|
108
|
-
export const researchAgent = defineAgent({
|
|
109
|
-
id: "research-agent",
|
|
110
|
-
model: "claude-opus-4-8",
|
|
111
|
-
- tools: [readFile],
|
|
112
|
-
+ tools: [readFile, webSearch],
|
|
113
|
-
});`}]}}),IF=Object.freeze({role:"assistant",text:"Here is a first pass — I scaffolded the agent definition on the right. Tell me what to adjust (tools, guardrails, model) and I will iterate."}),UF=Object.freeze([{path:"agents/new-agent.ts",additions:6,deletions:0,diff:`+++ agents/new-agent.ts
|
|
114
|
-
+export const newAgent = defineAgent({
|
|
115
|
-
+ id: "new-agent",
|
|
116
|
-
+ model: "claude-fable-5",
|
|
117
|
-
+ instructions: "Describe the agent behavior here.",
|
|
118
|
-
+ tools: [],
|
|
119
|
-
+});`}]),K1=Object.freeze({workedFor:"45s",steps:["Scaffolded agents/new-agent.ts from the registry template","Left instructions and tools as editable placeholders"]}),BF=Object.freeze([{id:"support-tone",name:"support-tone",description:"Shared tone-of-voice block for support-facing agents",version:"v3",usedBy:2,content:"You are speaking with a TheoKit customer. Be concise, cite documentation when it exists, and never promise refunds above $500 without human approval."},{id:"safety-guardrails",name:"safety-guardrails",description:"Baseline safety rules referenced by every agent",version:"v1",usedBy:3,content:"Never reveal internal system details. Refuse requests for credentials or secrets. Escalate destructive actions to a human operator."},{id:"research-citations",name:"research-citations",description:"Citation discipline for research outputs",version:"v2",usedBy:1,content:"Every claim must cite at least two independent sources. Mark uncertain findings explicitly instead of guessing."}]),HF=Object.freeze([{id:"summarize",name:"summarize",description:"Summarizes long documents"},{id:"triage",name:"triage",description:"Classifies and prioritizes tickets"}]),FF=Object.freeze([{id:"onboarding",name:"customer-onboarding",description:"Customer onboarding flow from signup to first value",inputLabel:"Customer email",steps:[{id:"verify-account",name:"verify-account",description:"Verify the new account"},{id:"provision-workspace",name:"provision-workspace",description:"Provision the customer workspace"},{id:"send-welcome",name:"send-welcome",description:"Send the welcome sequence"},{id:"schedule-checkin",name:"schedule-checkin",description:"Schedule the first check-in"}],recentRuns:[{id:"3f2a9c1d-run",status:"success",finishedAt:"2026-07-14T17:39:00Z"},{id:"8b1e4f7a-run",status:"success",finishedAt:"2026-07-14T16:02:00Z"},{id:"c9d02e5b-run",status:"failed",finishedAt:"2026-07-13T22:14:00Z"}]},{id:"escalation",name:"ticket-escalation",description:"Escalates unresolved tickets to a human queue",inputLabel:"Ticket ID",steps:[{id:"classify",name:"classify",description:"Classify severity and topic"},{id:"attempt-answer",name:"attempt-answer",description:"Try an automated answer"},{id:"handoff",name:"handoff",description:"Hand off to the on-call human"}],recentRuns:[{id:"77aa01bc-run",status:"success",finishedAt:"2026-07-14T12:30:00Z"}]}]),$F=Object.freeze([{id:"unicode-normalizer",name:"Unicode Normalizer",hooks:{input:!0,step:!1,stream:!1,result:!1},usedBy:1},{id:"moderation",name:"Moderation",hooks:{input:!0,step:!1,stream:!0,result:!0},usedBy:1}]),VF=Object.freeze([{id:"demo-mcp-server",name:"Demo MCP Server",version:"1.0.0",url:"http://localhost:8787/mcp/demo-mcp-server/sse",httpUrl:"http://localhost:8787/mcp/demo-mcp-server/mcp",agents:1,tools:5,workflows:1,availableTools:[{name:"lookupOrder",description:"Look up an order by its ID",kind:"tool",inputFields:[{name:"orderId",label:"Order ID",required:!0}]},{name:"refundOrder",description:"Refund an order (requires human approval above $500)",kind:"tool",inputFields:[{name:"orderId",label:"Order ID",required:!0},{name:"amount",label:"Amount (USD)",required:!0}]},{name:"searchDocs",description:"Search the product documentation",kind:"tool",inputFields:[{name:"query",label:"Query",required:!0}]},{name:"ask_supportAgent",description:"Ask agent 'Support Agent' a question. Agent description: Answers support tickets with access to the knowledge base",kind:"agent",inputFields:[{name:"question",label:"Question",required:!0}]},{name:"run_customerOnboarding",description:"Run workflow 'customer-onboarding'. Workflow description: Customer onboarding flow from signup to first value",kind:"workflow",inputFields:[{name:"customerEmail",label:"Customer email",required:!0}]}]}]),Bn=(e,r)=>({at:e,event:r}),qF=Object.freeze([Bn(0,{type:"step-started",stepId:0}),Bn(40,{type:"text-delta",text:"Hi! Let me check "}),Bn(80,{type:"text-delta",text:"the status of your order."}),Bn(120,{type:"tool-call-started",callId:"tc-1",modelCallId:"mc-1",toolCall:{callId:"tc-1",name:"lookupOrder",args:{orderId:"ORD-1234"}}}),Bn(300,{type:"tool-call-completed",callId:"tc-1",modelCallId:"mc-1",toolCall:{callId:"tc-1",name:"lookupOrder",args:{orderId:"ORD-1234"},result:{status:"shipped",eta:"2026-07-16"}}}),Bn(340,{type:"permission_denied",toolName:"refundOrder",toolCallId:"tc-2",source:"plugin",message:"Refunds above $500 require human approval"}),Bn(380,{type:"rate_limit",attempt:1,retryAfterMs:1200}),Bn(520,{type:"text-delta",text:" Your order has shipped — it arrives on the 16th."}),Bn(560,{type:"turn-ended",usage:{inputTokens:812,outputTokens:96,cacheReadTokens:512,cacheWriteTokens:0}})]);Object.freeze([Bn(0,{type:"step-started",stepId:0}),...Array.from({length:110},(e,r)=>Bn(10*(r+1),{type:"text-delta",text:`token-${r+1} `})),Bn(1200,{type:"turn-ended"})]);const GF=Object.freeze([{id:"demo-workspace",name:"Demo Workspace",files:[{path:"data",kind:"dir"},{path:"data/orders.csv",kind:"file",content:`order_id,status,total_usd
|
|
120
|
-
ORD-1001,shipped,129.90
|
|
121
|
-
ORD-1002,processing,54.00
|
|
122
|
-
`},{path:"notes",kind:"dir"},{path:"notes/todo.md",kind:"file",content:`# TODO
|
|
123
|
-
|
|
124
|
-
- Review the refund policy above $500
|
|
125
|
-
- Expand the knowledge base with billing FAQs
|
|
126
|
-
`},{path:"README.md",kind:"file",content:`# Demo Workspace
|
|
127
|
-
|
|
128
|
-
Demonstration workspace for TheoKit Studio.
|
|
129
|
-
|
|
130
|
-
- \`notes/\` — operating notes
|
|
131
|
-
- \`data/\` — reference data used by the agents
|
|
132
|
-
`}]}]),YF=e=>e<=0?Promise.resolve():new Promise(r=>setTimeout(r,e));async function*KF(e,r={}){const{delayMs:a,signal:o}=r;if(o?.aborted)return;let i=0;for(const c of e){const d=Math.max(0,a??c.at-i);if(i=c.at,await YF(d),o?.aborted)return;yield c.event}}class XF extends Error{constructor(){super("Retrieval query must not be blank — type something to search"),this.name="EmptyQueryError"}}class X1 extends Error{constructor(r){super(`Knowledge collection '${r}' does not exist`),this.name="UnknownCollectionError"}}class W1 extends Error{constructor(r){super(`Workspace '${r}' does not exist`),this.name="UnknownWorkspaceError"}}class WF extends Error{constructor(r){super(`Workspace path '${r}' does not exist or is not a file`),this.name="UnknownWorkspacePathError"}}class ZF extends Error{constructor(r){super(`Workspace path '${r}' already exists`),this.name="DuplicateWorkspacePathError"}}class QF extends Error{constructor(){super("Build prompt must not be blank — describe what to build"),this.name="BlankBuildPromptError"}}class JF extends Error{constructor(r){super(`Builder session '${r}' does not exist`),this.name="UnknownBuilderSessionError"}}class e$ extends Error{constructor(){super("Folder name must not be blank"),this.name="BlankFolderNameError"}}const t$={default:{memory:{status:"online"},rag:{status:"online"},lens:{status:"offline",hint:"theokit studio up"}},empty:{memory:{status:"online"},rag:{status:"online"},lens:{status:"offline",hint:"theokit studio up"}},offline:{memory:{status:"offline",hint:"theokit studio up"},rag:{status:"offline",hint:"theokit studio up"},lens:{status:"offline",hint:"theokit studio up"}}};function n$(e){const{scenario:r,overrides:a,streamDelayMs:o=0,runScript:i=qF}=e,c=r==="empty",d=c?[]:structuredClone([...GF]);let f=0;const h=(p,x)=>(mn.increment("datasource_calls_total",p),Promise.resolve(structuredClone(x)));return{listAgents:()=>h("listAgents",c?[]:[...OF]),listTools:()=>h("listTools",c?[]:[...zF]),listSkills:()=>h("listSkills",c?[]:[...HF]),listPrompts:()=>h("listPrompts",c?[]:[...BF]),listBuilderSessions:()=>h("listBuilderSessions",c?[]:[...LF]),startBuilderSession:(p,x)=>{mn.increment("datasource_calls_total","startBuilderSession");const y=p.trim();return y.length===0?Promise.reject(new QF):(f+=1,Promise.resolve({id:`draft-session-${f}`,title:y.length>48?`${y.slice(0,48)}…`:y,agentId:x,lastActivity:"now",pinned:!1,workedFor:K1.workedFor,workLog:[...K1.steps],messages:[{role:"user",text:y},{...IF}],files:structuredClone([...UF])}))},getBuilderSession:p=>{mn.increment("datasource_calls_total","getBuilderSession");const x=PF[p];return!x||c?Promise.reject(new JF(p)):Promise.resolve(structuredClone(x))},listWorkflows:()=>h("listWorkflows",c?[]:[...FF]),listProcessors:()=>h("listProcessors",c?[]:[...$F]),listMcpServers:()=>h("listMcpServers",c?[]:[...VF]),listScorers:()=>h("listScorers",c?[]:[...RF]),listDatasets:()=>h("listDatasets",c?[]:[...TF]),listExperiments:()=>h("listExperiments",c?[]:[..._F]),listWorkspaces:()=>h("listWorkspaces",d),readWorkspaceFile:(p,x)=>{mn.increment("datasource_calls_total","readWorkspaceFile");const y=d.find(w=>w.id===p);if(!y)return Promise.reject(new W1(p));const b=y.files.find(w=>w.path===x&&w.kind==="file");return!b||b.content===void 0?Promise.reject(new WF(x)):Promise.resolve(b.content)},createWorkspaceFolder:(p,x)=>{mn.increment("datasource_calls_total","createWorkspaceFolder");const y=d.find(w=>w.id===p);return y?(x.split("/").at(-1)??"").trim().length===0?Promise.reject(new e$):y.files.some(w=>w.path===x)?Promise.reject(new ZF(x)):(y.files.push({path:x,kind:"dir"}),Promise.resolve()):Promise.reject(new W1(p))},async*runAgent(p,x,y,b){mn.increment("datasource_calls_total","runAgent");for await(const w of KF(i,{delayMs:o,signal:y}))mn.increment("stream_events_played_total"),yield w},getMemories:p=>h("getMemories",c?[]:DF.filter(x=>p?x.scope===p:!0)),listCollections:()=>h("listCollections",c?[]:[...MF]),listDocuments:p=>{mn.increment("datasource_calls_total","listDocuments");const x=Y1[p];return x===void 0?Promise.reject(new X1(p)):Promise.resolve(c?[]:structuredClone([...x]))},query:(p,x)=>{if(mn.increment("datasource_calls_total","query"),x.trim().length===0)return Promise.reject(new XF);if(Y1[p]===void 0)return Promise.reject(new X1(p));const y=[...AF].sort((b,w)=>w.score-b.score);return Promise.resolve(c?[]:structuredClone(y))},health:()=>a?.health?(mn.increment("datasource_calls_total","health"),a.health()):h("health",t$[r])}}function a$(e,r){const a=n$({scenario:r.scenario,streamDelayMs:40});window.__STUDIO_METRICS__={snapshot:()=>mn.snapshot()};const o=G4(EF);OT.createRoot(e).render(l.jsx(aH,{value:a,children:l.jsx(tH,{router:o})}))}export{a$ as mount};
|