@goodfish/jarvy 0.7.0 → 0.8.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.
@@ -0,0 +1,594 @@
1
+ var Kk=Object.defineProperty;var yy=e=>{throw TypeError(e)};var Qk=(e,a,i)=>a in e?Kk(e,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[a]=i;var oc=(e,a,i)=>Qk(e,typeof a!="symbol"?a+"":a,i),xy=(e,a,i)=>a.has(e)||yy("Cannot "+i);var Bn=(e,a,i)=>(xy(e,a,"read from private field"),i?i.call(e):a.get(e)),by=(e,a,i)=>a.has(e)?yy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(e):a.set(e,i),Rm=(e,a,i,r)=>(xy(e,a,"write to private field"),r?r.call(e,i):a.set(e,i),i);function Zk(e,a){for(var i=0;i<a.length;i++){const r=a[i];if(typeof r!="string"&&!Array.isArray(r)){for(const c in r)if(c!=="default"&&!(c in e)){const u=Object.getOwnPropertyDescriptor(r,c);u&&Object.defineProperty(e,c,u.get?u:{enumerable:!0,get:()=>r[c]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}})();function h0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dm={exports:{}},sc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var jy;function Jk(){if(jy)return sc;jy=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(r,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var f in c)f!=="key"&&(u[f]=c[f])}else u=c;return c=u.ref,{$$typeof:e,type:r,key:d,ref:c!==void 0?c:null,props:u}}return sc.Fragment=a,sc.jsx=i,sc.jsxs=i,sc}var wy;function Wk(){return wy||(wy=1,Dm.exports=Jk()),Dm.exports}var o=Wk(),Om={exports:{}},Ge={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Sy;function e8(){if(Sy)return Ge;Sy=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),j=Symbol.iterator;function S(G){return G===null||typeof G!="object"?null:(G=j&&G[j]||G["@@iterator"],typeof G=="function"?G:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function M(G,fe,xe){this.props=G,this.context=fe,this.refs=E,this.updater=xe||k}M.prototype.isReactComponent={},M.prototype.setState=function(G,fe){if(typeof G!="object"&&typeof G!="function"&&G!=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,G,fe,"setState")},M.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function T(){}T.prototype=M.prototype;function _(G,fe,xe){this.props=G,this.context=fe,this.refs=E,this.updater=xe||k}var L=_.prototype=new T;L.constructor=_,C(L,M.prototype),L.isPureReactComponent=!0;var A=Array.isArray;function H(){}var I={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function D(G,fe,xe){var je=xe.ref;return{$$typeof:e,type:G,key:fe,ref:je!==void 0?je:null,props:xe}}function $(G,fe){return D(G.type,fe,G.props)}function F(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function W(G){var fe={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(xe){return fe[xe]})}var Y=/\/+/g;function P(G,fe){return typeof G=="object"&&G!==null&&G.key!=null?W(""+G.key):fe.toString(36)}function K(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(H,H):(G.status="pending",G.then(function(fe){G.status==="pending"&&(G.status="fulfilled",G.value=fe)},function(fe){G.status==="pending"&&(G.status="rejected",G.reason=fe)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function R(G,fe,xe,je,ue){var be=typeof G;(be==="undefined"||be==="boolean")&&(G=null);var le=!1;if(G===null)le=!0;else switch(be){case"bigint":case"string":case"number":le=!0;break;case"object":switch(G.$$typeof){case e:case a:le=!0;break;case y:return le=G._init,R(le(G._payload),fe,xe,je,ue)}}if(le)return ue=ue(G),le=je===""?"."+P(G,0):je,A(ue)?(xe="",le!=null&&(xe=le.replace(Y,"$&/")+"/"),R(ue,fe,xe,"",function(Te){return Te})):ue!=null&&(F(ue)&&(ue=$(ue,xe+(ue.key==null||G&&G.key===ue.key?"":(""+ue.key).replace(Y,"$&/")+"/")+le)),fe.push(ue)),1;le=0;var se=je===""?".":je+":";if(A(G))for(var me=0;me<G.length;me++)je=G[me],be=se+P(je,me),le+=R(je,fe,xe,be,ue);else if(me=S(G),typeof me=="function")for(G=me.call(G),me=0;!(je=G.next()).done;)je=je.value,be=se+P(je,me++),le+=R(je,fe,xe,be,ue);else if(be==="object"){if(typeof G.then=="function")return R(K(G),fe,xe,je,ue);throw fe=String(G),Error("Objects are not valid as a React child (found: "+(fe==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":fe)+"). If you meant to render a collection of children, use an array instead.")}return le}function V(G,fe,xe){if(G==null)return G;var je=[],ue=0;return R(G,je,"","",function(be){return fe.call(xe,be,ue++)}),je}function ne(G){if(G._status===-1){var fe=G._result,xe=fe();xe.then(function(je){(G._status===0||G._status===-1)&&(G._status=1,G._result=je,xe.status===void 0&&(xe.status="fulfilled",xe.value=je))},function(je){(G._status===0||G._status===-1)&&(G._status=2,G._result=je,xe.status===void 0&&(xe.status="rejected",xe.reason=je))}),G._status===-1&&(G._status=0,G._result=xe)}if(G._status===1)return G._result.default;throw G._result}var z=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var fe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(fe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)};function J(G){var fe=I.T,xe={};xe.types=fe!==null?fe.types:null,I.T=xe;try{var je=G(),ue=I.S;ue!==null&&ue(xe,je),typeof je=="object"&&je!==null&&typeof je.then=="function"&&je.then(H,z)}catch(be){z(be)}finally{fe!==null&&xe.types!==null&&(fe.types=xe.types),I.T=fe}}function ee(G){var fe=I.T;if(fe!==null){var xe=fe.types;xe===null?fe.types=[G]:xe.indexOf(G)===-1&&xe.push(G)}else J(ee.bind(null,G))}var U={map:V,forEach:function(G,fe,xe){V(G,function(){fe.apply(this,arguments)},xe)},count:function(G){var fe=0;return V(G,function(){fe++}),fe},toArray:function(G){return V(G,function(fe){return fe})||[]},only:function(G){if(!F(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return Ge.Activity=p,Ge.Children=U,Ge.Component=M,Ge.Fragment=i,Ge.Profiler=c,Ge.PureComponent=_,Ge.StrictMode=r,Ge.Suspense=m,Ge.ViewTransition=b,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(G){return I.H.useMemoCache(G)}},Ge.addTransitionType=ee,Ge.cache=function(G){return function(){return G.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(G,fe,xe){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var je=C({},G.props),ue=G.key;if(fe!=null)for(be in fe.key!==void 0&&(ue=""+fe.key),fe)!q.call(fe,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&fe.ref===void 0||(je[be]=fe[be]);var be=arguments.length-2;if(be===1)je.children=xe;else if(1<be){for(var le=Array(be),se=0;se<be;se++)le[se]=arguments[se+2];je.children=le}return D(G.type,ue,je)},Ge.createContext=function(G){return G={$$typeof:d,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:u,_context:G},G},Ge.createElement=function(G,fe,xe){var je,ue={},be=null;if(fe!=null)for(je in fe.key!==void 0&&(be=""+fe.key),fe)q.call(fe,je)&&je!=="key"&&je!=="__self"&&je!=="__source"&&(ue[je]=fe[je]);var le=arguments.length-2;if(le===1)ue.children=xe;else if(1<le){for(var se=Array(le),me=0;me<le;me++)se[me]=arguments[me+2];ue.children=se}if(G&&G.defaultProps)for(je in le=G.defaultProps,le)ue[je]===void 0&&(ue[je]=le[je]);return D(G,be,ue)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(G){return{$$typeof:f,render:G}},Ge.isValidElement=F,Ge.lazy=function(G){return{$$typeof:y,_payload:{_status:-1,_result:G},_init:ne}},Ge.memo=function(G,fe){return{$$typeof:v,type:G,compare:fe===void 0?null:fe}},Ge.startTransition=J,Ge.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ge.use=function(G){return I.H.use(G)},Ge.useActionState=function(G,fe,xe){return I.H.useActionState(G,fe,xe)},Ge.useCallback=function(G,fe){return I.H.useCallback(G,fe)},Ge.useContext=function(G){return I.H.useContext(G)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(G,fe){return I.H.useDeferredValue(G,fe)},Ge.useEffect=function(G,fe){return I.H.useEffect(G,fe)},Ge.useEffectEvent=function(G){return I.H.useEffectEvent(G)},Ge.useId=function(){return I.H.useId()},Ge.useImperativeHandle=function(G,fe,xe){return I.H.useImperativeHandle(G,fe,xe)},Ge.useInsertionEffect=function(G,fe){return I.H.useInsertionEffect(G,fe)},Ge.useLayoutEffect=function(G,fe){return I.H.useLayoutEffect(G,fe)},Ge.useMemo=function(G,fe){return I.H.useMemo(G,fe)},Ge.useOptimistic=function(G,fe){return I.H.useOptimistic(G,fe)},Ge.useReducer=function(G,fe,xe){return I.H.useReducer(G,fe,xe)},Ge.useRef=function(G){return I.H.useRef(G)},Ge.useState=function(G){return I.H.useState(G)},Ge.useSyncExternalStore=function(G,fe,xe){return I.H.useSyncExternalStore(G,fe,xe)},Ge.useTransition=function(){return I.H.useTransition()},Ge.version="19.3.0",Ge}var ky;function m0(){return ky||(ky=1,Om.exports=e8()),Om.exports}var w=m0();const t8=h0(w),Nc=Zk({__proto__:null,default:t8},[w]);var zm={exports:{}},cc={},Lm={exports:{}},Bm={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Cy;function n8(){return Cy||(Cy=1,(function(e){function a(K,R){var V=K.length;K.push(R);e:for(;0<V;){var ne=V-1>>>1,z=K[ne];if(0<c(z,R))K[ne]=R,K[V]=z,V=ne;else break e}}function i(K){return K.length===0?null:K[0]}function r(K){if(K.length===0)return null;var R=K[0],V=K.pop();if(V!==R){K[0]=V;e:for(var ne=0,z=K.length,J=z>>>1;ne<J;){var ee=2*(ne+1)-1,U=K[ee],G=ee+1,fe=K[G];if(0>c(U,V))G<z&&0>c(fe,U)?(K[ne]=fe,K[G]=V,ne=G):(K[ne]=U,K[ee]=V,ne=ee);else if(G<z&&0>c(fe,V))K[ne]=fe,K[G]=V,ne=G;else break e}}return R}function c(K,R){var V=K.sortIndex-R.sortIndex;return V!==0?V:K.id-R.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],v=[],y=1,p=null,b=3,j=!1,S=!1,k=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function _(K){for(var R=i(v);R!==null;){if(R.callback===null)r(v);else if(R.startTime<=K)r(v),R.sortIndex=R.expirationTime,a(m,R);else break;R=i(v)}}function L(K){if(k=!1,_(K),!S)if(i(m)!==null)S=!0,A||(A=!0,F());else{var R=i(v);R!==null&&P(L,R.startTime-K)}}var A=!1,H=-1,I=5,q=-1;function D(){return C?!0:!(e.unstable_now()-q<I)}function $(){if(C=!1,A){var K=e.unstable_now();q=K;var R=!0;try{e:{S=!1,k&&(k=!1,M(H),H=-1),j=!0;var V=b;try{t:{for(_(K),p=i(m);p!==null&&!(p.expirationTime>K&&D());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,b=p.priorityLevel;var z=ne(p.expirationTime<=K);if(K=e.unstable_now(),typeof z=="function"){p.callback=z,_(K),R=!0;break t}p===i(m)&&r(m),_(K)}else r(m);p=i(m)}if(p!==null)R=!0;else{var J=i(v);J!==null&&P(L,J.startTime-K),R=!1}}break e}finally{p=null,b=V,j=!1}R=void 0}}finally{R?F():A=!1}}}var F;if(typeof T=="function")F=function(){T($)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Y=W.port2;W.port1.onmessage=$,F=function(){Y.postMessage(null)}}else F=function(){E($,0)};function P(K,R){H=E(function(){K(e.unstable_now())},R)}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(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(K){switch(b){case 1:case 2:case 3:var R=3;break;default:R=b}var V=b;b=R;try{return K()}finally{b=V}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(K,R){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var V=b;b=K;try{return R()}finally{b=V}},e.unstable_scheduleCallback=function(K,R,V){var ne=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,K){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=V+z,K={id:y++,callback:R,priorityLevel:K,startTime:V,expirationTime:z,sortIndex:-1},V>ne?(K.sortIndex=V,a(v,K),i(m)===null&&K===i(v)&&(k?(M(H),H=-1):k=!0,P(L,V-ne))):(K.sortIndex=z,a(m,K),S||j||(S=!0,A||(A=!0,F()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var R=b;return function(){var V=b;b=R;try{return K.apply(this,arguments)}finally{b=V}}}})(Bm)),Bm}var Ny;function a8(){return Ny||(Ny=1,Lm.exports=n8()),Lm.exports}var Im={exports:{}},An={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Ey;function i8(){if(Ey)return An;Ey=1;var e=m0();function a(y){var p="https://react.dev/errors/"+y;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(y,p,b){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:j==null?null:j===d?d:""+j,children:y,containerInfo:p,implementation:b}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,p){if(y==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,An.browser=function(y){return{$$typeof:u,_reason:y}},An.createPortal=function(y,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return f(y,p,null,b)},An.flushSync=function(y){var p=m.T,b=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=p,r.p=b,r.d.f()}},An.preconnect=function(y,p){typeof y=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(y,p))},An.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},An.preinit=function(y,p){if(typeof y=="string"&&p&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,k=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(y,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:j,integrity:S,fetchPriority:k}):b==="script"&&r.d.X(y,{crossOrigin:j,integrity:S,fetchPriority:k,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},An.preinitModule=function(y,p){if(typeof y=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=v(p.as,p.crossOrigin);r.d.M(y,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}}else p==null&&r.d.M(y)},An.preload=function(y,p){if(typeof y=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,j=v(b,p.crossOrigin);r.d.L(y,b,{crossOrigin:j,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})}},An.preloadModule=function(y,p){if(typeof y=="string")if(p){var b=v(p.as,p.crossOrigin);r.d.m(y,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0})}else r.d.m(y)},An.requestFormReset=function(y){r.d.r(y)},An.unstable_batchedUpdates=function(y,p){return y(p)},An.useFormState=function(y,p,b){return m.H.useFormState(y,p,b)},An.useFormStatus=function(){return m.H.useHostTransitionStatus()},An.version="19.3.0",An}var Ty;function Vb(){if(Ty)return Im.exports;Ty=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(a){console.error(a)}}return e(),Im.exports=i8(),Im.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Ay;function r8(){if(Ay)return cc;Ay=1;var e=a8(),a=m0(),i=Vb();function r(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var n=t,l=n;l&&!l.alternate;)n=l,(n.flags&4098)!==0&&(t=n.return),l=n.return;for(;n.return;)n=n.return;return n.tag===3?t: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 m(t){if(u(t)!==t)throw Error(r(188))}function v(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(r(188));return n!==t?null:t}for(var l=t,s=n;;){var h=l.return;if(h===null)break;var g=h.alternate;if(g===null){if(s=h.return,s!==null){l=s;continue}break}if(h.child===g.child){for(g=h.child;g;){if(g===l)return m(h),t;if(g===s)return m(h),n;g=g.sibling}throw Error(r(188))}if(l.return!==s.return)l=h,s=g;else{for(var N=!1,O=h.child;O;){if(O===l){N=!0,l=h,s=g;break}if(O===s){N=!0,s=h,l=g;break}O=O.sibling}if(!N){for(O=g.child;O;){if(O===l){N=!0,l=g,s=h;break}if(O===s){N=!0,s=g,l=h;break}O=O.sibling}if(!N)throw Error(r(189))}}if(l.alternate!==s)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:n}function y(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=y(t),n!==null)return n;t=t.sibling}return null}function p(t,n,l,s,h,g){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,s,h,g)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&p(t.child,n,l,s,h,g))return!0;t=t.sibling}return!1}function b(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function j(t){var n=!1;for(t=t.return;t!==null&&(t.tag===4&&(n=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return n}function S(t){var n=[null,null],l=b(t);return l===null||k(n,t,l.child,{foundSelf:!1}),n}function k(t,n,l,s){for(;l!==null;){if(l===n)s.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(s.foundSelf)return t[1]=l,!0;t[0]=l}else if((l.tag!==22||l.memoizedState===null)&&k(t,n,l.child,s))return!0;l=l.sibling}return!1}function C(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(r(559))}}var E=null,M=null;function T(t,n,l){return t===l?!0:t===n?(E=t,!0):!1}function _(t,n,l){return t===l?(M=t,!1):t===n?(M!==null&&(E=t),!0):!1}function L(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function A(t,n,l){for(var s=0,h=t;h;h=l(h))s++;h=0;for(var g=n;g;g=l(g))h++;for(;0<s-h;)t=l(t),s--;for(;0<h-s;)n=l(n),h--;for(;s--;){if(t===n||n!==null&&t===n.alternate)return t;t=l(t),n=l(n)}return null}var H=Object.assign,I=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),P=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),ee=Symbol.for("react.legacy_hidden"),U=Symbol.for("react.memo_cache_sentinel"),G=Symbol.for("react.view_transition"),fe=Symbol.for("react.recoverable"),xe=Symbol.iterator;function je(t){return t===null||typeof t!="object"?null:(t=xe&&t[xe]||t["@@iterator"],typeof t=="function"?t:null)}var ue=Symbol.for("react.client.reference");function be(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ue?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case $:return"Fragment";case W:return"Profiler";case F:return"StrictMode";case R:return"Suspense";case V:return"SuspenseList";case J:return"Activity";case G:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case D:return"Portal";case P:return t.displayName||"Context";case Y:return(t._context.displayName||"Context")+".Consumer";case K:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ne:return n=t.displayName||null,n!==null?n:be(t.type)||"Memo";case z:n=t._payload,t=t._init;try{return be(t(n))}catch{}}return null}var le=Array.isArray,se=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te={pending:!1,data:null,method:null,action:null},Le=[],Ve=-1;function pt(t){return{current:t}}function tt(t){0>Ve||(t.current=Le[Ve],Le[Ve]=null,Ve--)}function We(t,n){Ve++,Le[Ve]=t.current,t.current=n}var Vt=pt(null),vn=pt(null),yn=pt(null),Pn=pt(null);function ha(t,n){switch(We(yn,n),We(vn,t),We(Vt,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?E2(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=E2(n),t=T2(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}tt(Vt),We(Vt,t)}function rn(){tt(Vt),tt(vn),tt(yn)}function Xa(t){var n=t.memoizedState;n!==null&&(Yo._currentValue=n.memoizedState,We(Pn,t)),n=Vt.current;var l=T2(n,t.type);n!==l&&(We(vn,t),We(Vt,l))}function pe(t){vn.current===t&&(tt(Vt),tt(vn)),Pn.current===t&&(tt(Pn),Yo._currentValue=Te)}var Ce,He;function qe(t){if(Ce===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Ce=n&&n[1]||"",He=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Ce+t+He}var et=!1;function Pt(t,n){if(!t||et)return"";et=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(Ne){var te=Ne}Reflect.construct(t,[],ye)}else{try{ye.call()}catch(Ne){te=Ne}ye=!1;try{var oe=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ye=!0,new t}finally{ye&&(oe!==void 0?Object.defineProperty(t.prototype,"props",oe):delete t.prototype.props)}}}else{try{throw Error()}catch(Ne){te=Ne}(ye=t())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(Ne){if(Ne&&te&&typeof Ne.stack=="string")return[Ne.stack,te.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),N=g[0],O=g[1];if(N&&O){var X=N.split(`
44
+ `),ie=O.split(`
45
+ `);for(h=s=0;s<X.length&&!X[s].includes("DetermineComponentFrameRoot");)s++;for(;h<ie.length&&!ie[h].includes("DetermineComponentFrameRoot");)h++;if(s===X.length||h===ie.length)for(s=X.length-1,h=ie.length-1;1<=s&&0<=h&&X[s]!==ie[h];)h--;for(;1<=s&&0<=h;s--,h--)if(X[s]!==ie[h]){if(s!==1||h!==1)do if(s--,h--,0>h||X[s]!==ie[h]){var de=`
46
+ `+X[s].replace(" at new "," at ");return t.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",t.displayName)),de}while(1<=s&&0<=h);break}}}finally{et=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?qe(l):""}function xn(t,n){switch(t.tag){case 26:case 27:case 5:return qe(t.type);case 16:return qe("Lazy");case 13:return t.child!==n&&n!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return Pt(t.type,!1);case 11:return Pt(t.type.render,!1);case 1:return Pt(t.type,!0);case 31:return qe("Activity");case 30:return qe("ViewTransition");default:return""}}function Ut(t){try{var n="",l=null;do n+=xn(t,l),l=t,t=t.return;while(t);return n}catch(s){return`
47
+ Error generating stack: `+s.message+`
48
+ `+s.stack}}var Rn=Object.prototype.hasOwnProperty,Un=e.unstable_scheduleCallback,Dt=e.unstable_cancelCallback,Dn=e.unstable_shouldYield,Ye=e.unstable_requestPaint,Xt=e.unstable_now,fl=e.unstable_getCurrentPriorityLevel,ui=e.unstable_ImmediatePriority,di=e.unstable_UserBlockingPriority,bn=e.unstable_NormalPriority,ma=e.unstable_LowPriority,hl=e.unstable_IdlePriority,pa=e.log,co=e.unstable_setDisableYieldValue,Ka=null,cn=null;function Lt(t){if(typeof pa=="function"&&co(t),cn&&typeof cn.setStrictMode=="function")try{cn.setStrictMode(Ka,t)}catch{}}var $t=Math.clz32?Math.clz32:Qa,fi=Math.log,hi=Math.LN2;function Qa(t){return t>>>=0,t===0?32:31-(fi(t)/hi|0)|0}var Za=256,Da=262144,Qn=4194304;function Ja(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&-t;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 ga(t,n,l){var s=t.pendingLanes;if(s===0)return 0;var h=0,g=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var O=s&134217727;return O!==0?(s=O&~g,s!==0?h=Ja(s):(N&=O,N!==0?h=Ja(N):l||(l=O&~t,l!==0&&(h=Ja(l))))):(O=s&~g,O!==0?h=Ja(O):N!==0?h=Ja(N):l||(l=s&~t,l!==0&&(h=Ja(l)))),h===0?0:n!==0&&n!==h&&(n&g)===0&&(g=h&-h,l=n&-n,g>=l||g===32&&(l&4194048)!==0)?n:h}function va(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function mi(t,n){(n&8)!==0&&(n|=n&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=n;0<l;){var s=31-$t(l),h=1<<s;n|=t[s],l&=~h}return n}function ml(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 ya(){var t=Qn;return Qn<<=1,(Qn&62914560)===0&&(Qn=4194304),t}function Sr(t){for(var n=[],l=0;31>l;l++)n.push(t);return n}function Zn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function pi(t,n,l,s,h,g){var N=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var O=t.entanglements,X=t.expirationTimes,ie=t.hiddenUpdates;for(l=N&~l;0<l;){var de=31-$t(l),ye=1<<de;O[de]=0,X[de]=-1;var te=ie[de];if(te!==null)for(ie[de]=null,de=0;de<te.length;de++){var oe=te[de];oe!==null&&(oe.lane&=-536870913)}l&=~ye}s!==0&&Jn(t,s,0),g!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=g&~(N&~n))}function Jn(t,n,l){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-$t(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|l&261930}function ln(t,n){var l=t.entangledLanes|=n;for(t=t.entanglements;l;){var s=31-$t(l),h=1<<s;h&n|t[s]&n&&(t[s]|=n),l&=~h}}function un(t,n){var l=n&-n;return l=(l&42)!==0?1:gi(l),(l&(t.suspendedLanes|n))!==0?0:l}function gi(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 Wn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ea(){var t=me.p;return t!==0?t:(t=window.event,t===void 0?32:dy(t.type))}function On(t,n){var l=me.p;try{return me.p=t,n()}finally{me.p=l}}var Bt=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Bt,Gt="__reactProps$"+Bt,jn="__reactContainer$"+Bt,pl="__reactEvents$"+Bt,kr="__reactListeners$"+Bt,Cr="__reactHandles$"+Bt,vi="__reactResources$"+Bt,yi="__reactMarker$"+Bt,Yi="__reactLoad$"+Bt;function Xi(t){delete t[Mt],delete t[Gt],delete t[kr],delete t[Cr]}function ta(t){var n;if(n=t[Mt])return n;for(var l=t.parentNode;l;){if(n=l[jn]||l[Mt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(t=$2(t);t!==null;){if(l=t[Mt])return l;t=$2(t)}return n}t=l,l=t.parentNode}return null}function xi(t){if(t=t[Mt]||t[jn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ce(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(r(33))}function B(t){var n=t[vi];return n||(n=t[vi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Q(t){t[yi]=!0}function he(t){t[Yi]=void 0}var Ae=new Set,ke={};function Me(t,n){Be(t,n),Be(t+"Capture",n)}function Be(t,n){for(ke[t]=n,t=0;t<n.length;t++)Ae.add(n[t])}var Ke=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]*$"),Re={},$e={};function ut(t){return Rn.call($e,t)?!0:Rn.call(Re,t)?!1:Ke.test(t)?$e[t]=!0:(Re[t]=!0,!1)}var Pe=!1;function on(){var t=Pe;return Pe=!1,t}function It(t,n,l){if(ut(n))if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,l)}}function xa(t,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,l)}}function Kt(t,n,l,s){if(s===null)t.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(n,l,s)}}function Qt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function uo(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function gs(t,n,l){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var h=s.get,g=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(N){l=""+N,g.call(this,N)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Ki(t){if(!t._valueTracker){var n=uo(t)?"checked":"value";t._valueTracker=gs(t,n,""+t[n])}}function fo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return t&&(s=uo(t)?t.checked?"true":"false":t.value),t=s,t!==l?(n.setValue(t),!0):!1}var Hc=/[\n"\\]/g;function Rt(t){return t.replace(Hc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function zn(t,n,l,s,h,g,N,O){t.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?t.type=N:t.removeAttribute("type"),n!=null?N==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Qt(n)):t.value!==""+Qt(n)&&(t.value=""+Qt(n)):N!=="submit"&&N!=="reset"||t.removeAttribute("value"),n!=null?N==="number"&&t.value==n?ho(t,Qt(t.value)):ho(t,Qt(n)):l!=null?ho(t,Qt(l)):s!=null&&t.removeAttribute("value"),h==null&&g!=null&&(t.defaultChecked=!!g),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?t.name=""+Qt(O):t.removeAttribute("name")}function Nr(t,n,l,s,h,g,N,O){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||l!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Ki(t);return}l=l!=null?""+Qt(l):"",n=n!=null?""+Qt(n):l,O||n===t.value||(t.value=n),t.defaultValue=n}s=s??h,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=O?t.checked:!!s,t.defaultChecked=!!s,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Ki(t)}function ho(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function na(t,n,l,s){if(t=t.options,n){n={};for(var h=0;h<l.length;h++)n["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=n.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&s&&(t[l].defaultSelected=!0)}else{for(l=""+Qt(l),n=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,s&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function mo(t,n,l){if(n!=null&&(n=""+Qt(n),n!==t.value&&(t.value=n),l==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=l!=null?""+Qt(l):""}function ba(t,n,l,s){if(n==null){if(s!=null){if(l!=null)throw Error(r(92));if(le(s)){if(1<s.length)throw Error(r(93));s=s[0]}l=s}l==null&&(l=""),n=l}l=Qt(n),t.defaultValue=l,s=t.textContent,s===l&&s!==""&&s!==null&&(t.value=s),Ki(t)}function qn(t,n){if(n){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=n;return}}t.textContent=n}var Er=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 vs(t,n,l){var s=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,l):typeof l!="number"||l===0||Er.has(n)?n==="float"?t.cssFloat=l:t[n]=(""+l).trim():t[n]=l+"px"}function ja(t,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(t=t.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="",Pe=!0);for(var h in n)s=n[h],n.hasOwnProperty(h)&&l[h]!==s&&(vs(t,h,s),Pe=!0)}else for(var g in n)n.hasOwnProperty(g)&&vs(t,g,n[g])}function gl(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 ys=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),xs=/^[\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 wn(t){return xs.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fn(){}var vl=null;function yl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ft=null,dn=null;function Oa(t){var n=xi(t);if(n&&(t=n.stateNode)){var l=t[Gt]||null;e:switch(t=n.stateNode,n.type){case"input":if(zn(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==t&&s.form===t.form){var h=s[Gt]||null;if(!h)throw Error(r(90));zn(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<l.length;n++)s=l[n],s.form===t.form&&fo(s)}break e;case"textarea":mo(t,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&na(t,!!l.multiple,n,!1)}}}var wa=!1;function xl(t,n,l){if(wa)return t(n,l);wa=!0;try{var s=t(n);return s}finally{if(wa=!1,(ft!==null||dn!==null)&&(Hu(),ft&&(n=ft,t=dn,dn=ft=null,Oa(n),t)))for(n=0;n<t.length;n++)Oa(t[n])}}function Qi(t,n){var l=t.stateNode;if(l===null)return null;var s=l[Gt]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bl=!1;if(Sn)try{var bs={};Object.defineProperty(bs,"passive",{get:function(){bl=!0}}),window.addEventListener("test",bs,bs),window.removeEventListener("test",bs,bs)}catch{bl=!1}var Tr=null,gf=null,Pc=null;function Sg(){if(Pc)return Pc;var t,n=gf,l=n.length,s,h="value"in Tr?Tr.value:Tr.textContent,g=h.length;for(t=0;t<l&&n[t]===h[t];t++);var N=l-t;for(s=1;s<=N&&n[l-s]===h[g-s];s++);return Pc=h.slice(t,1<s?1-s:void 0)}function Uc(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 qc(){return!0}function kg(){return!1}function Vn(t){function n(l,s,h,g,N){this._reactName=l,this._targetInst=h,this.type=s,this.nativeEvent=g,this.target=N,this.currentTarget=null;for(var O in t)t.hasOwnProperty(O)&&(l=t[O],this[O]=l?l(g):g[O]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?qc:kg,this.isPropagationStopped=kg,this}return H(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=qc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qc)},persist:function(){},isPersistent:qc}),n}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fc=Vn(Ar),js=H({},Ar,{view:0,detail:0}),b5=Vn(js),vf,yf,ws,Vc=H({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bf,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!==ws&&(ws&&t.type==="mousemove"?(vf=t.screenX-ws.screenX,yf=t.screenY-ws.screenY):yf=vf=0,ws=t),vf)},movementY:function(t){return"movementY"in t?t.movementY:yf}}),Cg=Vn(Vc),j5=H({},Vc,{dataTransfer:0}),w5=Vn(j5),S5=H({},js,{relatedTarget:0}),xf=Vn(S5),k5=H({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),C5=Vn(k5),N5=H({},Ar,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),E5=Vn(N5),T5=H({},Ar,{data:0}),Ng=Vn(T5),A5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_5={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"},M5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function R5(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=M5[t])?!!n[t]:!1}function bf(){return R5}var D5=H({},js,{key:function(t){if(t.key){var n=A5[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Uc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?_5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bf,charCode:function(t){return t.type==="keypress"?Uc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Uc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),O5=Vn(D5),z5=H({},Vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eg=Vn(z5),L5=H({},Ar,{submitter:0}),B5=Vn(L5),I5=H({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bf}),H5=Vn(I5),P5=H({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),U5=Vn(P5),q5=H({},Vc,{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}),F5=Vn(q5),V5=H({},Ar,{newState:0,oldState:0,source:0}),$5=Vn(V5),G5=[9,13,27,32],jf=Sn&&"CompositionEvent"in window,Ss=null;Sn&&"documentMode"in document&&(Ss=document.documentMode);var Y5=Sn&&"TextEvent"in window&&!Ss,Tg=Sn&&(!jf||Ss&&8<Ss&&11>=Ss),Ag=" ",_g=!1;function Mg(t,n){switch(t){case"keyup":return G5.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var po=!1;function X5(t,n){switch(t){case"compositionend":return Rg(n);case"keypress":return n.which!==32?null:(_g=!0,Ag);case"textInput":return t=n.data,t===Ag&&_g?null:t;default:return null}}function K5(t,n){if(po)return t==="compositionend"||!jf&&Mg(t,n)?(t=Sg(),Pc=gf=Tr=null,po=!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 Tg&&n.locale!=="ko"?null:n.data;default:return null}}var Q5={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 Dg(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Q5[t.type]:n==="textarea"}function Og(t,n,l,s){ft?dn?dn.push(s):dn=[s]:ft=s,n=$u(n,"onChange"),0<n.length&&(l=new Fc("onChange","change",null,l,s),t.push({event:l,listeners:n}))}var ks=null,Cs=null;function Z5(t){j2(t,0)}function $c(t){var n=ce(t);if(fo(n))return t}function zg(t,n){if(t==="change")return n}var Lg=!1;if(Sn){var wf;if(Sn){var Sf="oninput"in document;if(!Sf){var Bg=document.createElement("div");Bg.setAttribute("oninput","return;"),Sf=typeof Bg.oninput=="function"}wf=Sf}else wf=!1;Lg=wf&&(!document.documentMode||9<document.documentMode)}function Ig(){ks&&(ks.detachEvent("onpropertychange",Hg),Cs=ks=null)}function Hg(t){if(t.propertyName==="value"&&$c(Cs)){var n=[];Og(n,Cs,t,yl(t)),xl(Z5,n)}}function J5(t,n,l){t==="focusin"?(Ig(),ks=n,Cs=l,ks.attachEvent("onpropertychange",Hg)):t==="focusout"&&Ig()}function W5(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return $c(Cs)}function e6(t,n){if(t==="click")return $c(n)}function t6(t,n){if(t==="input"||t==="change")return $c(n)}function n6(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Sa=typeof Object.is=="function"?Object.is:n6;function Ns(t,n){if(Sa(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var l=Object.keys(t),s=Object.keys(n);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var h=l[s];if(!Rn.call(n,h)||!Sa(t[h],n[h]))return!1}return!0}function kf(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}}function Pg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ug(t,n){var l=Pg(t);t=0;for(var s;l;){if(l.nodeType===3){if(s=t+l.textContent.length,t<=n&&s>=n)return{node:l,offset:n-t};t=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Pg(l)}}function qg(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?qg(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Fg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=kf(t.document);n instanceof t.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)t=n.contentWindow;else break;n=kf(t.document)}return n}function Cf(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 a6=Sn&&"documentMode"in document&&11>=document.documentMode,go=null,Nf=null,Es=null,Ef=!1;function Vg(t,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ef||go==null||go!==kf(s)||(s=go,"selectionStart"in s&&Cf(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Es&&Ns(Es,s)||(Es=s,s=$u(Nf,"onSelect"),0<s.length&&(n=new Fc("onSelect","select",null,n,l),t.push({event:n,listeners:s}),n.target=go)))}function jl(t,n){var l={};return l[t.toLowerCase()]=n.toLowerCase(),l["Webkit"+t]="webkit"+n,l["Moz"+t]="moz"+n,l}var vo={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},Tf={},$g={};Sn&&($g=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 wl(t){if(Tf[t])return Tf[t];if(!vo[t])return t;var n=vo[t],l;for(l in n)if(n.hasOwnProperty(l)&&l in $g)return Tf[t]=n[l];return t}var Gg=wl("animationend"),Yg=wl("animationiteration"),Xg=wl("animationstart"),i6=wl("transitionrun"),r6=wl("transitionstart"),l6=wl("transitioncancel"),Kg=wl("transitionend"),Qg=new Map,Af="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Af.push("scrollEnd");function Wa(t,n){Qg.set(t,n),Me(n,[t])}var o6=0;function Zi(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=ai.identifierPrefix;var l=o6++;return t="_"+t+"t_"+l.toString(32)+"_",n.autoName=t}function Zg(t){if(t==null||typeof t=="string")return t;var n=null,l=Bo;if(l!==null)for(var s=0;s<l.length;s++){var h=t[l[s]];if(h!=null){if(h==="none")return"none";n=n==null?h:n+(" "+h)}}return n??t.default}function Ji(t,n){return t=Zg(t),n=Zg(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var Gc=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)},za=[],yo=0,_f=0;function Yc(){for(var t=yo,n=_f=yo=0;n<t;){var l=za[n];za[n++]=null;var s=za[n];za[n++]=null;var h=za[n];za[n++]=null;var g=za[n];if(za[n++]=null,s!==null&&h!==null){var N=s.pending;N===null?h.next=h:(h.next=N.next,N.next=h),s.pending=h}g!==0&&Jg(l,h,g)}}function Xc(t,n,l,s){za[yo++]=t,za[yo++]=n,za[yo++]=l,za[yo++]=s,_f|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Mf(t,n,l,s){return Xc(t,n,l,s),Kc(t)}function Sl(t,n){return Xc(t,null,null,n),Kc(t)}function Jg(t,n,l){t.lanes|=l;var s=t.alternate;s!==null&&(s.lanes|=l);for(var h=!1,g=t.return;g!==null;)g.childLanes|=l,s=g.alternate,s!==null&&(s.childLanes|=l),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(h=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,h&&n!==null&&(h=31-$t(l),t=g.hiddenUpdates,s=t[h],s===null?t[h]=[n]:s.push(n),n.lane=l|536870912),g):null}function Kc(t){if(50<Ks)throw Ks=0,Iu=null,Error(r(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var xo={};function s6(t,n,l,s){this.tag=t,this.key=l,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function aa(t,n,l,s){return new s6(t,n,l,s)}function Rf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Wi(t,n){var l=t.alternate;return l===null?(l=aa(t.tag,n,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=n,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&1206910976,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,n=t.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Wg(t,n){t.flags&=1206910978;var l=t.alternate;return l===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=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,n=l.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Qc(t,n,l,s,h,g){var N=0;if(s=t,typeof s=="function")Rf(s)&&(N=1);else if(typeof s=="string")N=Lk(t,l,Vt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(s){case J:return t=aa(31,l,n,h),t.elementType=J,t.lanes=g,t;case $:return kl(l.children,h,g,n);case F:N=8,h|=24;break;case W:return t=aa(12,l,n,h|2),t.elementType=W,t.lanes=g,t;case R:return t=aa(13,l,n,h),t.elementType=R,t.lanes=g,t;case V:return t=aa(19,l,n,h),t.elementType=V,t.lanes=g,t;case ee:case G:return t=h|32,t=aa(30,l,n,t),t.elementType=G,t.lanes=g,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case P:N=10;break e;case Y:N=9;break e;case K:N=11;break e;case ne:N=14;break e;case z:N=16,s=null;break e}N=29,l=Error(r(130,t===null?"null":typeof t,"")),s=null}return n=aa(N,l,n,h),n.elementType=t,n.type=s,n.lanes=g,n}function kl(t,n,l,s){return t=aa(7,t,s,n),t.lanes=l,t}function Df(t,n,l){return t=aa(6,t,null,n),t.lanes=l,t}function e1(t){var n=aa(18,null,null,0);return n.stateNode=t,n}function Of(t,n,l){return n=aa(4,t.children!==null?t.children:[],t.key,n),n.lanes=l,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var t1=new WeakMap;function La(t,n){if(typeof t=="object"&&t!==null){var l=t1.get(t);return l!==void 0?l:(n={value:t,source:n,stack:Ut(n)},t1.set(t,n),n)}return{value:t,source:n,stack:Ut(n)}}var bo=[],jo=0,Zc=null,Ts=0,Ba=[],Ia=0,_r=null,bi=1,ji="";function er(t,n){bo[jo++]=Ts,bo[jo++]=Zc,Zc=t,Ts=n}function n1(t,n,l){Ba[Ia++]=bi,Ba[Ia++]=ji,Ba[Ia++]=_r,_r=t;var s=bi;t=ji;var h=32-$t(s)-1;s&=~(1<<h),l+=1;var g=32-$t(n)+h;if(30<g){var N=h-h%5;g=(s&(1<<N)-1).toString(32),s>>=N,h-=N,bi=1<<32-$t(n)+h|l<<h|s,ji=g+t}else bi=1<<g|l<<h|s,ji=t}function Jc(t){t.return!==null&&(er(t,1),n1(t,1,0))}function zf(t){for(;t===Zc;)Zc=bo[--jo],bo[jo]=null,Ts=bo[--jo],bo[jo]=null;for(;t===_r;)_r=Ba[--Ia],Ba[Ia]=null,ji=Ba[--Ia],Ba[Ia]=null,bi=Ba[--Ia],Ba[Ia]=null}function a1(t,n){Ba[Ia++]=bi,Ba[Ia++]=ji,Ba[Ia++]=_r,bi=n.id,ji=n.overflow,_r=t}var fn=null,At=null,nt=!1,Mr=null,Ha=!1,Lf=Error(r(519));function Rr(t){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw As(La(n,t)),Lf}function i1(t){var n=t.stateNode,l=t.type,s=t.memoizedProps;switch(n[Mt]=t,n[Gt]=s,l){case"dialog":rt("cancel",n),rt("close",n);break;case"iframe":case"object":case"embed":rt("load",n);break;case"video":case"audio":for(l=0;l<Zs.length;l++)rt(Zs[l],n);break;case"source":rt("error",n);break;case"img":case"image":case"link":rt("error",n),rt("load",n);break;case"details":rt("toggle",n);break;case"input":rt("invalid",n),Nr(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":rt("invalid",n);break;case"textarea":rt("invalid",n),ba(n,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||s.suppressHydrationWarning===!0||C2(n.textContent,l)?(s.popover!=null&&(rt("beforetoggle",n),rt("toggle",n)),s.onScroll!=null&&rt("scroll",n),s.onScrollEnd!=null&&rt("scrollend",n),s.onClick!=null&&(n.onclick=Fn),n=!0):n=!1,n||Rr(t,!0)}function Wc(t){for(fn=t.return;fn;)switch(fn.tag){case 5:case 31:case 13:Ha=!1;return;case 27:case 3:Ha=!0;return;default:fn=fn.return}}function wo(t){if(t!==fn)return!1;if(!nt)return Wc(t),nt=!0,!1;var n=t.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||fm(t.type,t.memoizedProps)),l=!l),l&&At&&Rr(t),Wc(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));At=V2(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));At=V2(t)}else n===27?(n=At,Xr(t.type)?(t=jm,jm=null,At=t):At=n):At=fn?Ua(t.stateNode.nextSibling):null;return!0}function Cl(){At=fn=null,nt=!1}function Bf(){var t=Mr;return t!==null&&(la===null?la=t:la.push.apply(la,t),Mr=null),t}function As(t){Mr===null?Mr=[t]:Mr.push(t)}var If=pt(null),Nl=null,tr=null;function Dr(t,n,l){We(If,n._currentValue),n._currentValue=l}function nr(t){t._currentValue=If.current,tt(If)}function eu(t,n,l){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===l)break;t=t.return}}function Hf(t,n,l,s){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var g=h.dependencies;if(g!==null){var N=h.child;g=g.firstContext;e:for(;g!==null;){var O=g;g=h;for(var X=0;X<n.length;X++)if(O.context===n[X]){g.lanes|=l,O=g.alternate,O!==null&&(O.lanes|=l),eu(g.return,l,t),s||(N=null);break e}g=O.next}}else if(h.tag===18){if(N=h.return,N===null)throw Error(r(341));N.lanes|=l,g=N.alternate,g!==null&&(g.lanes|=l),eu(N,l,t),N=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=l,N=h.alternate,N!==null&&(N.lanes|=l),eu(h.return,l,t),N=h.child,N=N!==null?N.sibling:null):N=h.child;if(N!==null)N.return=h;else for(N=h;N!==null;){if(N===t){N=null;break}if(h=N.sibling,h!==null){h.return=N.return,N=h;break}N=N.return}h=N}}function El(t,n,l,s){t=null;for(var h=n,g=!1;h!==null;){if(!g){if((h.flags&524288)!==0)g=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var N=h.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var O=h.type;Sa(h.pendingProps.value,N.value)||(t!==null?t.push(O):t=[O])}}else if(h===Pn.current){if(N=h.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Yo):t=[Yo])}h=h.return}return t!==null&&Hf(n,t,l,s),n.flags|=262144,t!==null}function tu(t){for(t=t.firstContext;t!==null;){if(!Sa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Tl(t){Nl=t,tr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function kn(t){return r1(Nl,t)}function nu(t,n){return Nl===null&&Tl(t),r1(t,n)}function r1(t,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},tr===null){if(t===null)throw Error(r(308));tr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else tr=tr.next=n;return l}var c6=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(l,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(l){return l()})}},u6=e.unstable_scheduleCallback,d6=e.unstable_NormalPriority,Zt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pf(){return{controller:new c6,data:new Map,refCount:0}}function _s(t){t.refCount--,t.refCount===0&&u6(d6,function(){t.controller.abort()})}function l1(t,n){if((t.pendingLanes&4194048)!==0){var l=t.transitionTypes;for(l===null&&(l=t.transitionTypes=[]),t=0;t<n.length;t++){var s=n[t];l.indexOf(s)===-1&&l.push(s)}}}var Ms=null;function f6(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var Rs=null,Uf=0,Al=0,So=null;function h6(t,n){if(Rs===null){var l=Rs=[];Uf=0,Al=am(),So={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Uf++,n.then(o1,o1),n}function o1(){if(--Uf===0&&(Ms=null,Rs!==null)){So!==null&&(So.status="fulfilled");var t=Rs;Rs=null,Al=0,So=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function m6(t,n){var l=[],s={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var h=0;h<l.length;h++)(0,l[h])(n)},function(h){for(s.status="rejected",s.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),s}var s1=se.S;se.S=function(t,n){if(e2=Xt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&h6(t,n),Ms!==null)for(var l=Uo;l!==null;)l1(l,Ms),l=l.next;if(l=t.types,l!==null){for(var s=Uo;s!==null;)l1(s,l),s=s.next;if(Al!==0){s=Ms,s===null&&(s=Ms=[]);for(var h=0;h<l.length;h++){var g=l[h];s.indexOf(g)===-1&&s.push(g)}}}s1!==null&&s1(t,n)};var _l=pt(null);function qf(){var t=_l.current;return t!==null?t:Nt.pooledCache}function au(t,n){n===null?We(_l,_l.current):We(_l,n.pool)}function c1(){var t=qf();return t===null?null:{parent:Zt._currentValue,pool:t}}var ko=Error(r(460)),Ff=Error(r(474)),iu=Error(r(542)),ru={then:function(){}};function u1(t){return t=t.status,t==="fulfilled"||t==="rejected"}function d1(t,n,l){switch(l=t[l],l===void 0?t.push(n):l!==n&&(n.then(Fn,Fn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,h1(t),t===void 0&&!("reason"in n)?Error(r(600)):t;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(t=Nt,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=s}},function(s){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,h1(t),t}throw Rl=n,ko}}function Ml(t){try{var n=t._init;return n(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Rl=l,ko):l}}var Rl=null;function f1(){if(Rl===null)throw Error(r(459));var t=Rl;return Rl=null,t}function h1(t){if(t===ko||t===iu)throw Error(r(483))}var Co=null,Ds=0;function lu(t){var n=Ds;return Ds+=1,Co===null&&(Co=[]),d1(Co,t,n)}function Or(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function ou(t,n){throw n.$$typeof===I?Error(r(525)):(t=Object.prototype.toString.call(n),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function m1(t){function n(ae,Z){if(t){var re=ae.deletions;re===null?(ae.deletions=[Z],ae.flags|=16):re.push(Z)}}function l(ae,Z){if(!t)return null;for(;Z!==null;)n(ae,Z),Z=Z.sibling;return null}function s(ae){for(var Z=new Map;ae!==null;)ae.key===null?Z.set(ae.index,ae):Z.set(ae.key,ae),ae=ae.sibling;return Z}function h(ae,Z){return ae=Wi(ae,Z),ae.index=0,ae.sibling=null,ae}function g(ae,Z,re){return ae.index=re,t?(re=ae.alternate,re!==null?(re=re.index,re<Z?(ae.flags|=2,Z):re):(ae.flags|=134217730,Z)):(ae.flags|=1048576,Z)}function N(ae){return t&&ae.alternate===null&&(ae.flags|=134217730),ae}function O(ae,Z,re,ve){return Z===null||Z.tag!==6?(Z=Df(re,ae.mode,ve),Z.return=ae,Z):(Z=h(Z,re),Z.return=ae,Z)}function X(ae,Z,re,ve){var De=re.type;return De===$?(ae=de(ae,Z,re.props.children,ve,re.key),Or(ae,re),ae):Z!==null&&(Z.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===z&&Ml(De)===Z.type)?(Z=h(Z,re.props),Or(Z,re),Z.return=ae,Z):(Z=Qc(re.type,re.key,re.props,null,ae.mode,ve),Or(Z,re),Z.return=ae,Z)}function ie(ae,Z,re,ve){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==re.containerInfo||Z.stateNode.implementation!==re.implementation?(Z=Of(re,ae.mode,ve),Z.return=ae,Z):(Z=h(Z,re.children||[]),Z.return=ae,Z)}function de(ae,Z,re,ve,De){return Z===null||Z.tag!==7?(Z=kl(re,ae.mode,ve,De),Z.return=ae,Z):(Z=h(Z,re),Z.return=ae,Z)}function ye(ae,Z,re){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Df(""+Z,ae.mode,re),Z.return=ae,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case q:return re=Qc(Z.type,Z.key,Z.props,null,ae.mode,re),Or(re,Z),re.return=ae,re;case D:return Z=Of(Z,ae.mode,re),Z.return=ae,Z;case z:return Z=Ml(Z),ye(ae,Z,re)}if(le(Z)||je(Z))return Z=kl(Z,ae.mode,re,null),Z.return=ae,Z;if(typeof Z.then=="function")return ye(ae,lu(Z),re);if(Z.$$typeof===P)return ye(ae,nu(ae,Z),re);ou(ae,Z)}return null}function te(ae,Z,re,ve){var De=Z!==null?Z.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return De!==null?null:O(ae,Z,""+re,ve);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case q:return re.key===De?X(ae,Z,re,ve):null;case D:return re.key===De?ie(ae,Z,re,ve):null;case z:return re=Ml(re),te(ae,Z,re,ve)}if(le(re)||je(re))return De!==null?null:de(ae,Z,re,ve,null);if(typeof re.then=="function")return te(ae,Z,lu(re),ve);if(re.$$typeof===P)return te(ae,Z,nu(ae,re),ve);ou(ae,re)}return null}function oe(ae,Z,re,ve,De){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return ae=ae.get(re)||null,O(Z,ae,""+ve,De);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case q:return ae=ae.get(ve.key===null?re:ve.key)||null,X(Z,ae,ve,De);case D:return ae=ae.get(ve.key===null?re:ve.key)||null,ie(Z,ae,ve,De);case z:return ve=Ml(ve),oe(ae,Z,re,ve,De)}if(le(ve)||je(ve))return ae=ae.get(re)||null,de(Z,ae,ve,De,null);if(typeof ve.then=="function")return oe(ae,Z,re,lu(ve),De);if(ve.$$typeof===P)return oe(ae,Z,re,nu(Z,ve),De);ou(Z,ve)}return null}function Ne(ae,Z,re,ve){for(var De=null,ct=null,Ie=Z,Fe=Z=0,en=null;Ie!==null&&Fe<re.length;Fe++){Ie.index>Fe?(en=Ie,Ie=null):en=Ie.sibling;var ht=te(ae,Ie,re[Fe],ve);if(ht===null){Ie===null&&(Ie=en);break}t&&Ie&&ht.alternate===null&&n(ae,Ie),Z=g(ht,Z,Fe),ct===null?De=ht:ct.sibling=ht,ct=ht,Ie=en}if(Fe===re.length)return l(ae,Ie),nt&&er(ae,Fe),De;if(Ie===null){for(;Fe<re.length;Fe++)Ie=ye(ae,re[Fe],ve),Ie!==null&&(Z=g(Ie,Z,Fe),ct===null?De=Ie:ct.sibling=Ie,ct=Ie);return nt&&er(ae,Fe),De}for(Ie=s(Ie);Fe<re.length;Fe++)en=oe(Ie,ae,Fe,re[Fe],ve),en!==null&&(t&&(ht=en.alternate,ht!==null&&Ie.delete(ht.key===null?Fe:ht.key)),Z=g(en,Z,Fe),ct===null?De=en:ct.sibling=en,ct=en);return t&&Ie.forEach(function(Wr){return n(ae,Wr)}),nt&&er(ae,Fe),De}function Oe(ae,Z,re,ve){if(re==null)throw Error(r(151));for(var De=null,ct=null,Ie=Z,Fe=Z=0,en=null,ht=re.next();Ie!==null&&!ht.done;Fe++,ht=re.next()){Ie.index>Fe?(en=Ie,Ie=null):en=Ie.sibling;var Wr=te(ae,Ie,ht.value,ve);if(Wr===null){Ie===null&&(Ie=en);break}t&&Ie&&Wr.alternate===null&&n(ae,Ie),Z=g(Wr,Z,Fe),ct===null?De=Wr:ct.sibling=Wr,ct=Wr,Ie=en}if(ht.done)return l(ae,Ie),nt&&er(ae,Fe),De;if(Ie===null){for(;!ht.done;Fe++,ht=re.next())ht=ye(ae,ht.value,ve),ht!==null&&(Z=g(ht,Z,Fe),ct===null?De=ht:ct.sibling=ht,ct=ht);return nt&&er(ae,Fe),De}for(Ie=s(Ie);!ht.done;Fe++,ht=re.next())ht=oe(Ie,ae,Fe,ht.value,ve),ht!==null&&(t&&(en=ht.alternate,en!==null&&Ie.delete(en.key===null?Fe:en.key)),Z=g(ht,Z,Fe),ct===null?De=ht:ct.sibling=ht,ct=ht);return t&&Ie.forEach(function(Xk){return n(ae,Xk)}),nt&&er(ae,Fe),De}function Je(ae,Z,re,ve){if(typeof re=="object"&&re!==null&&re.type===$&&re.key===null&&re.props.ref===void 0&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case q:e:{for(var De=re.key;Z!==null;){if(Z.key===De){if(De=re.type,De===$){if(Z.tag===7){l(ae,Z.sibling),ve=h(Z,re.props.children),Or(ve,re),ve.return=ae,ae=ve;break e}}else if(Z.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===z&&Ml(De)===Z.type){l(ae,Z.sibling),ve=h(Z,re.props),Or(ve,re),ve.return=ae,ae=ve;break e}l(ae,Z);break}else n(ae,Z);Z=Z.sibling}re.type===$?(ve=kl(re.props.children,ae.mode,ve,re.key),Or(ve,re),ve.return=ae,ae=ve):(ve=Qc(re.type,re.key,re.props,null,ae.mode,ve),Or(ve,re),ve.return=ae,ae=ve)}return N(ae);case D:e:{for(De=re.key;Z!==null;){if(Z.key===De)if(Z.tag===4&&Z.stateNode.containerInfo===re.containerInfo&&Z.stateNode.implementation===re.implementation){l(ae,Z.sibling),ve=h(Z,re.children||[]),ve.return=ae,ae=ve;break e}else{l(ae,Z);break}else n(ae,Z);Z=Z.sibling}ve=Of(re,ae.mode,ve),ve.return=ae,ae=ve}return N(ae);case z:return re=Ml(re),Je(ae,Z,re,ve)}if(le(re))return Ne(ae,Z,re,ve);if(je(re)){if(De=je(re),typeof De!="function")throw Error(r(150));return re=De.call(re),Oe(ae,Z,re,ve)}if(typeof re.then=="function")return Je(ae,Z,lu(re),ve);if(re.$$typeof===P)return Je(ae,Z,nu(ae,re),ve);ou(ae,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Z!==null&&Z.tag===6?(l(ae,Z.sibling),ve=h(Z,re),ve.return=ae,ae=ve):(l(ae,Z),ve=Df(re,ae.mode,ve),ve.return=ae,ae=ve),N(ae)):l(ae,Z)}return function(ae,Z,re,ve){try{Ds=0;var De=Je(ae,Z,re,ve);return Co=null,De}catch(Ie){if(Ie===ko||Ie===iu)throw Ie;var ct=aa(29,Ie,null,ae.mode);return ct.lanes=ve,ct.return=ae,ct}finally{}}}var Dl=m1(!0),p1=m1(!1),zr=!1;function Vf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $f(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 Lr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Br(t,n,l){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(yt&2)!==0){var h=s.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),s.pending=n,n=Kc(t),Jg(t,null,l),n}return Xc(t,s,n,l),Kc(t)}function Os(t,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,l|=s,n.lanes=l,ln(t,l)}}function Gf(t,n){var l=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var h=null,g=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};g===null?h=g=N:g=g.next=N,l=l.next}while(l!==null);g===null?h=g=n:g=g.next=n}else h=g=n;l={baseState:s.baseState,firstBaseUpdate:h,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=n:t.next=n,l.lastBaseUpdate=n}var Yf=!1;function zs(){if(Yf){var t=So;if(t!==null)throw t}}function Ls(t,n,l,s){Yf=!1;var h=t.updateQueue;zr=!1;var g=h.firstBaseUpdate,N=h.lastBaseUpdate,O=h.shared.pending;if(O!==null){h.shared.pending=null;var X=O,ie=X.next;X.next=null,N===null?g=ie:N.next=ie,N=X;var de=t.alternate;de!==null&&(de=de.updateQueue,O=de.lastBaseUpdate,O!==N&&(O===null?de.firstBaseUpdate=ie:O.next=ie,de.lastBaseUpdate=X))}if(g!==null){var ye=h.baseState;N=0,de=ie=X=null,O=g;do{var te=O.lane&-536870913,oe=te!==O.lane;if(oe?(st&te)===te:(s&te)===te){te!==0&&te===Al&&(Yf=!0),de!==null&&(de=de.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var Ne=t,Oe=O;te=n;var Je=l;switch(Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){ye=Ne.call(Je,ye,te);break e}ye=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,te=typeof Ne=="function"?Ne.call(Je,ye,te):Ne,te==null)break e;ye=H({},ye,te);break e;case 2:zr=!0}}te=O.callback,te!==null&&(t.flags|=64,oe&&(t.flags|=8192),oe=h.callbacks,oe===null?h.callbacks=[te]:oe.push(te))}else oe={lane:te,tag:O.tag,payload:O.payload,callback:O.callback,next:null},de===null?(ie=de=oe,X=ye):de=de.next=oe,N|=te;if(O=O.next,O===null){if(O=h.shared.pending,O===null)break;oe=O,O=oe.next,oe.next=null,h.lastBaseUpdate=oe,h.shared.pending=null}}while(!0);de===null&&(X=ye),h.baseState=X,h.firstBaseUpdate=ie,h.lastBaseUpdate=de,g===null&&(h.shared.lanes=0),Vr|=N,t.lanes=N,t.memoizedState=ye}}function g1(t,n){if(typeof t!="function")throw Error(r(191,t));t.call(n)}function v1(t,n){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)g1(l[t],n)}var Ir=pt(null),su=pt(0);function y1(t,n){t=or,We(su,t),We(Ir,n),or=t|n.baseLanes}function Xf(){We(su,or),We(Ir,Ir.current)}function Kf(){or=su.current,tt(Ir),tt(su)}var Cn=pt(null),Ln=null;function Hr(t){var n=t.alternate;We(Nn,Nn.current&1),We(Cn,t),Ln===null&&(n===null||Ir.current!==null||n.memoizedState!==null)&&(Ln=t)}function Qf(t){We(Nn,Nn.current),We(Cn,t),Ln===null&&(Ln=t)}function x1(t){t.tag===22?(We(Nn,Nn.current),We(Cn,t),Ln===null&&(Ln=t)):Pr()}function Pr(){We(Nn,Nn.current),We(Cn,Cn.current)}function ka(t){tt(Cn),Ln===t&&(Ln=null),tt(Nn)}var Nn=pt(0);function Bs(t,n){We(Cn,Cn.current),We(Nn,n)}function Zf(t){tt(Nn),tt(Cn),Ln===t&&(Ln=null)}function cu(t){for(var n=t;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||xm(l)||bm(l)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!=="independent"){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 ar=0,Ze=null,kt=null,Jt=null,uu=!1,No=!1,Ol=!1,du=0,Is=0,Eo=null,p6=0;function qt(){throw Error(r(321))}function Jf(t,n){if(n===null)return!1;for(var l=0;l<n.length&&l<t.length;l++)if(!Sa(t[l],n[l]))return!1;return!0}function Wf(t,n,l,s,h,g){return ar=g,Ze=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,se.H=t===null||t.memoizedState===null?nv:av,Ol=!1,g=l(s,h),Ol=!1,No&&(g=j1(n,l,s,h)),b1(t),g}function b1(t){se.H=yu;var n=kt!==null&&kt.next!==null;if(ar=0,Jt=kt=Ze=null,uu=!1,Is=0,Eo=null,n)throw Error(r(300));t===null||Wt||(t=t.dependencies,t!==null&&tu(t)&&(Wt=!0))}function j1(t,n,l,s){Ze=t;var h=0;do{if(No&&(Eo=null),Is=0,No=!1,25<=h)throw Error(r(301));if(h+=1,Jt=kt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}se.H=S6,g=n(l,s)}while(No);return g}function g6(){var t=se.H,n=t.useState()[0];return n=typeof n.then=="function"?Hs(n):n,t=t.useState()[0],(kt!==null?kt.memoizedState:null)!==t&&(Ze.flags|=1024),n}function eh(){var t=du!==0;return du=0,t}function th(t,n,l){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~l}function nh(t){if(uu){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}uu=!1}ar=0,Jt=kt=Ze=null,No=!1,Is=du=0,Eo=null}function $n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Ze.memoizedState=Jt=t:Jt=Jt.next=t,Jt}function Yt(){if(kt===null){var t=Ze.alternate;t=t!==null?t.memoizedState:null}else t=kt.next;var n=Jt===null?Ze.memoizedState:Jt.next;if(n!==null)Jt=n,kt=t;else{if(t===null)throw Ze.alternate===null?Error(r(467)):Error(r(310));kt=t,t={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},Jt===null?Ze.memoizedState=Jt=t:Jt=Jt.next=t}return Jt}function fu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hs(t){var n=Is;return Is+=1,Eo===null&&(Eo=[]),t=d1(Eo,t,n),n=Ze,(Jt===null?n.memoizedState:Jt.next)===null&&(n=n.alternate,se.H=n===null||n.memoizedState===null?nv:av),t}function hu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Hs(t);if(t.$$typeof===fe)return;if(t.$$typeof===P)return kn(t)}throw Error(r(438,String(t)))}function ah(t){var n=null,l=Ze.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var s=Ze.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=fu(),Ze.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(t),s=0;s<t;s++)l[s]=U;return n.index++,l}function ir(t,n){return typeof n=="function"?n(t):n}function mu(t){var n=Yt();return ih(n,kt,t)}function ih(t,n,l){var s=t.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=l;var h=t.baseQueue,g=s.pending;if(g!==null){if(h!==null){var N=h.next;h.next=g.next,g.next=N}n.baseQueue=h=g,s.pending=null}if(g=t.baseState,h===null)t.memoizedState=g;else{n=h.next;var O=N=null,X=null,ie=n,de=!1;do{var ye=ie.lane&-536870913;if(ye!==ie.lane?(st&ye)===ye:(ar&ye)===ye){var te=ie.revertLane;if(te===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ye===Al&&(de=!0);else if((ar&te)===te){ie=ie.next,te===Al&&(de=!0);continue}else ye={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(O=X=ye,N=g):X=X.next=ye,Ze.lanes|=te,Vr|=te;ye=ie.action,Ol&&l(g,ye),g=ie.hasEagerState?ie.eagerState:l(g,ye)}else te={lane:ye,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},X===null?(O=X=te,N=g):X=X.next=te,Ze.lanes|=ye,Vr|=ye;ie=ie.next}while(ie!==null&&ie!==n);if(X===null?N=g:X.next=O,!Sa(g,t.memoizedState)&&(Wt=!0,de&&(l=So,l!==null)))throw l;t.memoizedState=g,t.baseState=N,t.baseQueue=X,s.lastRenderedState=g}return h===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function rh(t){var n=Yt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var s=l.dispatch,h=l.pending,g=n.memoizedState;if(h!==null){l.pending=null;var N=h=h.next;do g=t(g,N.action),N=N.next;while(N!==h);Sa(g,n.memoizedState)||(Wt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),l.lastRenderedState=g}return[g,s]}function w1(t,n,l){var s=Ze,h=Yt(),g=nt;if(g){if(l===void 0)throw Error(r(407));l=l()}else l=n();var N=!Sa((kt||h).memoizedState,l);if(N&&(h.memoizedState=l,Wt=!0),h=h.queue,sh(C1.bind(null,s,h,t),[t]),t=h.getSnapshot!==n||N||Jt!==null&&(Jt.memoizedState.tag&1)!==0,To(t?9:8,{destroy:void 0},k1.bind(null,s,h,l,n),null),t){if(s.flags|=2048,Nt===null)throw Error(r(349));g||(ar&127)!==0||S1(s,n,l)}return l}function S1(t,n,l){t.flags|=16384,t={getSnapshot:n,value:l},n=Ze.updateQueue,n===null?(n=fu(),Ze.updateQueue=n,n.stores=[t]):(l=n.stores,l===null?n.stores=[t]:l.push(t))}function k1(t,n,l,s){n.value=l,n.getSnapshot=s,N1(n)&&E1(t)}function C1(t,n,l){return l(function(){N1(n)&&E1(t)})}function N1(t){var n=t.getSnapshot;t=t.value;try{var l=n();return!Sa(t,l)}catch{return!0}}function E1(t){var n=Sl(t,2);n!==null&&oa(n,t,2)}function lh(t){var n=$n();if(typeof t=="function"){var l=t;if(t=l(),Ol){Lt(!0);try{l()}finally{Lt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:t},n}function T1(t,n,l,s){return t.baseState=l,ih(t,kt,typeof s=="function"?s:ir)}function v6(t,n,l,s,h){if(vu(t))throw Error(r(485));if(t=n.action,t!==null){var g={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){g.listeners.push(N)}};se.T!==null?l(!0):g.isTransition=!1,s(g),l=n.pending,l===null?(g.next=n.pending=g,A1(n,g)):(g.next=l.next,n.pending=l.next=g)}}function A1(t,n){var l=n.action,s=n.payload,h=t.state;if(n.isTransition){var g=se.T,N={};N.types=g!==null?g.types:null,se.T=N;try{var O=l(h,s),X=se.S;X!==null&&X(N,O),_1(t,n,O)}catch(ie){oh(t,n,ie)}finally{g!==null&&N.types!==null&&(g.types=N.types),se.T=g}}else try{g=l(h,s),_1(t,n,g)}catch(ie){oh(t,n,ie)}}function _1(t,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){M1(t,n,s)},function(s){return oh(t,n,s)}):M1(t,n,l)}function M1(t,n,l){n.status="fulfilled",n.value=l,R1(n),t.state=l,n=t.pending,n!==null&&(l=n.next,l===n?t.pending=null:(l=l.next,n.next=l,A1(t,l)))}function oh(t,n,l){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=l,R1(n),n=n.next;while(n!==s)}t.action=null}function R1(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function D1(t,n){return n}function O1(t,n){if(nt){var l=Nt.formState;if(l!==null){e:{var s=Ze;if(nt){if(At){t:{for(var h=At,g=Ha;h.nodeType!==8;){if(!g){h=null;break t}if(h=Ua(h.nextSibling),h===null){h=null;break t}}g=h.data,h=g==="F!"||g==="F"?h:null}if(h){At=Ua(h.nextSibling),s=h.data==="F!";break e}}Rr(s)}s=!1}s&&(n=l[0])}}return l=$n(),l.memoizedState=l.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:D1,lastRenderedState:n},l.queue=s,l=W1.bind(null,Ze,s),s.dispatch=l,s=lh(!1),g=hh.bind(null,Ze,!1,s.queue),s=$n(),h={state:n,dispatch:null,action:t,pending:null},s.queue=h,l=v6.bind(null,Ze,h,g,l),h.dispatch=l,s.memoizedState=t,[n,l,!1]}function z1(t){var n=Yt();return L1(n,kt,t)}function L1(t,n,l){if(n=ih(t,n,D1)[0],t=mu(ir)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=Hs(n)}catch(N){throw N===ko?iu:N}else s=n;n=Yt();var h=n.queue,g=h.dispatch;return l!==n.memoizedState&&(Ze.flags|=2048,To(9,{destroy:void 0},y6.bind(null,h,l),null)),[s,g,t]}function y6(t,n){t.action=n}function B1(t){var n=Yt(),l=kt;if(l!==null)return L1(n,l,t);Yt(),n=n.memoizedState,l=Yt();var s=l.queue.dispatch;return l.memoizedState=t,[n,s,!1]}function To(t,n,l,s){return t={tag:t,create:l,deps:s,inst:n,next:null},n=Ze.updateQueue,n===null&&(n=fu(),Ze.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=t.next=t:(s=l.next,l.next=t,t.next=s,n.lastEffect=t),t}function I1(){return Yt().memoizedState}function pu(t,n,l,s){var h=$n();Ze.flags|=t,h.memoizedState=To(1|n,{destroy:void 0},l,s===void 0?null:s)}function gu(t,n,l,s){var h=Yt();s=s===void 0?null:s;var g=h.memoizedState.inst;kt!==null&&s!==null&&Jf(s,kt.memoizedState.deps)?h.memoizedState=To(n,g,l,s):(Ze.flags|=t,h.memoizedState=To(1|n,g,l,s))}function H1(t,n){pu(8390656,8,t,n)}function sh(t,n){gu(2048,8,t,n)}function x6(t){Ze.flags|=4;var n=Ze.updateQueue;if(n===null)n=fu(),Ze.updateQueue=n,n.events=[t];else{var l=n.events;l===null?n.events=[t]:l.push(t)}}function P1(t){var n=Yt().memoizedState;return x6({ref:n,nextImpl:t}),function(){if((yt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function U1(t,n){return gu(4,2,t,n)}function q1(t,n){return gu(4,4,t,n)}function F1(t,n){if(typeof n=="function"){t=t();var l=n(t);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function V1(t,n,l){l=l!=null?l.concat([t]):null,gu(4,4,F1.bind(null,n,t),l)}function ch(){}function $1(t,n){var l=Yt();n=n===void 0?null:n;var s=l.memoizedState;return n!==null&&Jf(n,s[1])?s[0]:(l.memoizedState=[t,n],t)}function G1(t,n){var l=Yt();n=n===void 0?null:n;var s=l.memoizedState;if(n!==null&&Jf(n,s[1]))return s[0];if(s=t(),Ol){Lt(!0);try{t()}finally{Lt(!1)}}return l.memoizedState=[s,n],s}function uh(t,n,l){return l===void 0||(ar&1073741824)!==0&&(st&261930)===0?t.memoizedState=n:(t.memoizedState=l,t=n2(),Ze.lanes|=t,Vr|=t,l)}function Y1(t,n,l,s){return Sa(l,n)?l:Ir.current!==null?(t=uh(t,l,s),Sa(t,n)||(Wt=!0),t):(ar&106)===0||(ar&1073741824)!==0&&(st&261930)===0?(Wt=!0,t.memoizedState=l):(t=n2(),Ze.lanes|=t,Vr|=t,n)}function X1(t,n,l,s,h){var g=me.p;me.p=g!==0&&8>g?g:8;var N=se.T,O={};O.types=N!==null?N.types:null,se.T=O,hh(t,!1,n,l);try{var X=h(),ie=se.S;if(ie!==null&&ie(O,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=m6(X,s);Ps(t,n,de,Ta(t))}else Ps(t,n,s,Ta(t))}catch(ye){Ps(t,n,{then:function(){},status:"rejected",reason:ye},Ta())}finally{me.p=g,N!==null&&O.types!==null&&(N.types=O.types),se.T=N}}function b6(){}function dh(t,n,l,s){if(t.tag!==5)throw Error(r(476));var h=K1(t).queue;X1(t,h,n,Te,l===null?b6:function(){return Q1(t),l(s)})}function K1(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Te,baseState:Te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:Te},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ir,lastRenderedState:l},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Q1(t){var n=K1(t);n.next===null&&(n=t.alternate.memoizedState),Ps(t,n.next.queue,{},Ta())}function fh(){return kn(Yo)}function Z1(){return Yt().memoizedState}function J1(){return Yt().memoizedState}function j6(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var l=Ta();t=Lr(l);var s=Br(n,t,l);s!==null&&(oa(s,n,l),Os(s,n,l)),n={cache:Pf()},t.payload=n;return}n=n.return}}function w6(t,n,l){var s=Ta();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},vu(t)?ev(n,l):(l=Mf(t,n,l,s),l!==null&&(oa(l,t,s),tv(l,n,s)))}function W1(t,n,l){var s=Ta();Ps(t,n,l,s)}function Ps(t,n,l,s){var h={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(vu(t))ev(n,h);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var N=n.lastRenderedState,O=g(N,l);if(h.hasEagerState=!0,h.eagerState=O,Sa(O,N))return Xc(t,n,h,0),Nt===null&&Yc(),!1}catch{}finally{}if(l=Mf(t,n,h,s),l!==null)return oa(l,t,s),tv(l,n,s),!0}return!1}function hh(t,n,l,s){if(s={lane:2,revertLane:am(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},vu(t)){if(n)throw Error(r(479))}else n=Mf(t,l,s,2),n!==null&&oa(n,t,2)}function vu(t){var n=t.alternate;return t===Ze||n!==null&&n===Ze}function ev(t,n){No=uu=!0;var l=t.pending;l===null?n.next=n:(n.next=l.next,l.next=n),t.pending=n}function tv(t,n,l){if((l&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,l|=s,n.lanes=l,ln(t,l)}}var yu={readContext:kn,use:hu,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useLayoutEffect:qt,useInsertionEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useSyncExternalStore:qt,useId:qt,useHostTransitionStatus:qt,useFormState:qt,useActionState:qt,useOptimistic:qt,useMemoCache:qt,useCacheRefresh:qt,useEffectEvent:qt},nv={readContext:kn,use:hu,useCallback:function(t,n){return $n().memoizedState=[t,n===void 0?null:n],t},useContext:kn,useEffect:H1,useImperativeHandle:function(t,n,l){l=l!=null?l.concat([t]):null,pu(4194308,4,F1.bind(null,n,t),l)},useLayoutEffect:function(t,n){return pu(4194308,4,t,n)},useInsertionEffect:function(t,n){pu(4,2,t,n)},useMemo:function(t,n){var l=$n();n=n===void 0?null:n;var s=t();if(Ol){Lt(!0);try{t()}finally{Lt(!1)}}return l.memoizedState=[s,n],s},useReducer:function(t,n,l){var s=$n();if(l!==void 0){var h=l(n);if(Ol){Lt(!0);try{l(n)}finally{Lt(!1)}}}else h=n;return s.memoizedState=s.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},s.queue=t,t=t.dispatch=w6.bind(null,Ze,t),[s.memoizedState,t]},useRef:function(t){var n=$n();return t={current:t},n.memoizedState=t},useState:function(t){t=lh(t);var n=t.queue,l=W1.bind(null,Ze,n);return n.dispatch=l,[t.memoizedState,l]},useDebugValue:ch,useDeferredValue:function(t,n){var l=$n();return uh(l,t,n)},useTransition:function(){var t=lh(!1);return t=X1.bind(null,Ze,t.queue,!0,!1),$n().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,l){var s=Ze,h=$n();if(nt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Nt===null)throw Error(r(349));(st&127)!==0||S1(s,n,l)}h.memoizedState=l;var g={value:l,getSnapshot:n};return h.queue=g,H1(C1.bind(null,s,g,t),[t]),s.flags|=2048,To(9,{destroy:void 0},k1.bind(null,s,g,l,n),null),l},useId:function(){var t=$n(),n=Nt.identifierPrefix;if(nt){var l=ji,s=bi;l=(s&~(1<<32-$t(s)-1)).toString(32)+l,n="_"+n+"R_"+l,l=du++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=p6++,n="_"+n+"r_"+l.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:fh,useFormState:O1,useActionState:O1,useOptimistic:function(t){var n=$n();n.memoizedState=n.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=hh.bind(null,Ze,!0,l),l.dispatch=n,[t,n]},useMemoCache:ah,useCacheRefresh:function(){return $n().memoizedState=j6.bind(null,Ze)},useEffectEvent:function(t){var n=$n(),l={impl:t};return n.memoizedState=l,function(){if((yt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},av={readContext:kn,use:hu,useCallback:$1,useContext:kn,useEffect:sh,useImperativeHandle:V1,useInsertionEffect:U1,useLayoutEffect:q1,useMemo:G1,useReducer:mu,useRef:I1,useState:function(){return mu(ir)},useDebugValue:ch,useDeferredValue:function(t,n){var l=Yt();return Y1(l,kt.memoizedState,t,n)},useTransition:function(){var t=mu(ir)[0],n=Yt().memoizedState;return[typeof t=="boolean"?t:Hs(t),n]},useSyncExternalStore:w1,useId:Z1,useHostTransitionStatus:fh,useFormState:z1,useActionState:z1,useOptimistic:function(t,n){var l=Yt();return T1(l,kt,t,n)},useMemoCache:ah,useCacheRefresh:J1,useEffectEvent:P1},S6={readContext:kn,use:hu,useCallback:$1,useContext:kn,useEffect:sh,useImperativeHandle:V1,useInsertionEffect:U1,useLayoutEffect:q1,useMemo:G1,useReducer:rh,useRef:I1,useState:function(){return rh(ir)},useDebugValue:ch,useDeferredValue:function(t,n){var l=Yt();return kt===null?uh(l,t,n):Y1(l,kt.memoizedState,t,n)},useTransition:function(){var t=rh(ir)[0],n=Yt().memoizedState;return[typeof t=="boolean"?t:Hs(t),n]},useSyncExternalStore:w1,useId:Z1,useHostTransitionStatus:fh,useFormState:B1,useActionState:B1,useOptimistic:function(t,n){var l=Yt();return kt!==null?T1(l,kt,t,n):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:ah,useCacheRefresh:J1,useEffectEvent:P1};function mh(t,n,l,s){n=t.memoizedState,l=l(s,n),l=l==null?n:H({},n,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var ph={enqueueSetState:function(t,n,l){t=t._reactInternals;var s=Ta(),h=Lr(s);h.payload=n,l!=null&&(h.callback=l),n=Br(t,h,s),n!==null&&(oa(n,t,s),Os(n,t,s))},enqueueReplaceState:function(t,n,l){t=t._reactInternals;var s=Ta(),h=Lr(s);h.tag=1,h.payload=n,l!=null&&(h.callback=l),n=Br(t,h,s),n!==null&&(oa(n,t,s),Os(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var l=Ta(),s=Lr(l);s.tag=2,n!=null&&(s.callback=n),n=Br(t,s,l),n!==null&&(oa(n,t,l),Os(n,t,l))}};function iv(t,n,l,s,h,g,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,g,N):n.prototype&&n.prototype.isPureReactComponent?!Ns(l,s)||!Ns(h,g):!0}function rv(t,n,l,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,s),n.state!==t&&ph.enqueueReplaceState(n,n.state,null)}function zl(t,n){var l=n;if("ref"in n){l={};for(var s in n)s!=="ref"&&(l[s]=n[s])}if(t=t.defaultProps){l===n&&(l=H({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function lv(t){Gc(t)}function ov(t){console.error(t)}function sv(t){Gc(t)}function xu(t,n){try{var l=t.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function cv(t,n,l){try{var s=t.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function gh(t,n,l){return l=Lr(l),l.tag=3,l.payload={element:null},l.callback=function(){xu(t,n)},l}function uv(t){return t=Lr(t),t.tag=3,t}function dv(t,n,l,s){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;t.payload=function(){return h(g)},t.callback=function(){cv(n,l,s)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){cv(n,l,s),typeof h!="function"&&($r===null?$r=new Set([this]):$r.add(this));var O=s.stack;this.componentDidCatch(s.value,{componentStack:O!==null?O:""})})}function k6(t,n,l,s,h){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=l.alternate,n!==null&&El(n,l,h,!0),l=Cn.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Ln===null?Pu():l.alternate===null&&Ft===0&&(Ft=3),l.flags&=-257,l.flags|=65536,l.lanes=h,s===ru?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([s]):n.add(s),em(t,s,h)),!1;case 22:return l.flags|=65536,s===ru?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([s]):l.add(s)),em(t,s,h)),!1}throw Error(r(435,l.tag))}return em(t,s,h),Pu(),!1}if(nt)return n=Cn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,s!==Lf&&(t=Error(r(422),{cause:s}),As(La(t,l)))):(s!==Lf&&(n=Error(r(423),{cause:s}),As(La(n,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,s=La(s,l),h=gh(t.stateNode,s,h),Gf(t,h),Ft!==4&&(Ft=2)),!1;var g=Error(r(520),{cause:s});if(g=La(g,l),Xs===null?Xs=[g]:Xs.push(g),Ft!==4&&(Ft=2),n===null)return!0;s=La(s,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=gh(l.stateNode,s,t),Gf(l,t),!1;case 1:if(n=l.type,g=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&($r===null||!$r.has(g))))return l.flags|=65536,h&=-h,l.lanes|=h,h=uv(h),dv(h,t,l,s),Gf(l,h),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var vh=Error(r(461)),Wt=!1;function sn(t,n,l,s){n.child=t===null?p1(n,null,l,s):Dl(n,t.child,l,s)}function fv(t,n,l,s,h){l=l.render;var g=n.ref;if("ref"in s){var N={};for(var O in s)O!=="ref"&&(N[O]=s[O])}else N=s;return Tl(n),s=Wf(t,n,l,N,g,h),O=eh(),t!==null&&!Wt?(th(t,n,h),rr(t,n,h)):(nt&&O&&Jc(n),n.flags|=1,sn(t,n,s,h),n.child)}function hv(t,n,l,s,h){if(t===null){var g=l.type;return typeof g=="function"&&!Rf(g)&&g.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=g,mv(t,n,g,s,h)):(t=Qc(l.type,null,s,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Ch(t,h)){var N=g.memoizedProps;if(l=l.compare,l=l!==null?l:Ns,l(N,s)&&t.ref===n.ref)return rr(t,n,h)}return n.flags|=1,t=Wi(g,s),t.ref=n.ref,t.return=n,n.child=t}function mv(t,n,l,s,h){if(t!==null){var g=t.memoizedProps;if(Ns(g,s)&&t.ref===n.ref)if(Wt=!1,n.pendingProps=s=g,Ch(t,h))(t.flags&131072)!==0&&(Wt=!0);else return n.lanes=t.lanes,rr(t,n,h)}return yh(t,n,l,s,h)}function pv(t,n,l,s){var h=s.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|l:l,t!==null){for(s=n.child=t.child,h=0;s!==null;)h=h|s.lanes|s.childLanes,s=s.sibling;s=h&~g}else s=0,n.child=null;return gv(t,n,g,l,s)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&au(n,g!==null?g.cachePool:null),g!==null?y1(n,g):Xf(),x1(n);else return s=n.lanes=536870912,gv(t,n,g!==null?g.baseLanes|l:l,l,s)}else g!==null?(au(n,g.cachePool),y1(n,g),Pr(),n.memoizedState=null):(t!==null&&au(n,null),Xf(),Pr());return sn(t,n,h,l),n.child}function Us(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function gv(t,n,l,s,h){var g=qf();return g=g===null?null:{parent:Zt._currentValue,pool:g},n.memoizedState={baseLanes:l,cachePool:g},t!==null&&au(n,null),Xf(),x1(n),t!==null&&El(t,n,s,!0),n.childLanes=h,null}function bu(t,n){return n=ju({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function vv(t,n,l){return Dl(n,t.child,null,l),t=bu(n,n.pendingProps),t.flags|=2,ka(n),n.memoizedState=null,t}function C6(t,n,l){var s=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(nt){if(s.mode==="hidden")return t=bu(n,s),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Us(null,t);if(Qf(n),(t=At)?(t=F2(t,Ha),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:_r!==null?{id:bi,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},l=e1(t),l.return=n,n.child=l,fn=n,At=null)):t=null,t===null)throw Rr(n);return n.lanes=536870912,null}return bu(n,s)}var g=t.memoizedState;if(g!==null){var N=g.dehydrated;if(Qf(n),h)if(n.flags&256)n.flags&=-257,n=vv(t,n,l);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(r(558));else if(Wt||El(t,n,l,!1),h=(l&t.childLanes)!==0,Wt||h){if(Ir.current===null){if(s=Nt,s!==null&&(N=un(s,l),N!==0&&N!==g.retryLane))throw g.retryLane=N,Sl(t,N),oa(s,t,N),vh;Pu()}n=vv(t,n,l)}else t=g.treeContext,At=Ua(N.nextSibling),fn=n,nt=!0,Mr=null,Ha=!1,t!==null&&a1(n,t),n=bu(n,s),n.flags|=134221824;return n}return t=Wi(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Ao(t,n){var l=n.ref;if(l===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(n.flags|=4194816)}}function yh(t,n,l,s,h){return Tl(n),l=Wf(t,n,l,s,void 0,h),s=eh(),t!==null&&!Wt?(th(t,n,h),rr(t,n,h)):(nt&&s&&Jc(n),n.flags|=1,sn(t,n,l,h),n.child)}function yv(t,n,l,s,h,g){return Tl(n),n.updateQueue=null,l=j1(n,s,l,h),b1(t),s=eh(),t!==null&&!Wt?(th(t,n,g),rr(t,n,g)):(nt&&s&&Jc(n),n.flags|=1,sn(t,n,l,g),n.child)}function xv(t,n,l,s,h){if(Tl(n),n.stateNode===null){var g=xo,N=l.contextType;typeof N=="object"&&N!==null&&(g=kn(N)),g=new l(s,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=ph,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=s,g.state=n.memoizedState,g.refs={},Vf(n),N=l.contextType,g.context=typeof N=="object"&&N!==null?kn(N):xo,g.state=n.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(mh(n,l,N,s),g.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(N=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),N!==g.state&&ph.enqueueReplaceState(g,g.state,null),Ls(n,s,g,h),zs(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){g=n.stateNode;var O=n.memoizedProps,X=zl(l,O);g.props=X;var ie=g.context,de=l.contextType;N=xo,typeof de=="object"&&de!==null&&(N=kn(de));var ye=l.getDerivedStateFromProps;de=typeof ye=="function"||typeof g.getSnapshotBeforeUpdate=="function",O=n.pendingProps!==O,de||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(O||ie!==N)&&rv(n,g,s,N),zr=!1;var te=n.memoizedState;g.state=te,Ls(n,s,g,h),zs(),ie=n.memoizedState,O||te!==ie||zr?(typeof ye=="function"&&(mh(n,l,ye,s),ie=n.memoizedState),(X=zr||iv(n,l,X,s,te,ie,N))?(de||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=ie),g.props=s,g.state=ie,g.context=N,s=X):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{g=n.stateNode,$f(t,n),N=n.memoizedProps,de=zl(l,N),g.props=de,ye=n.pendingProps,te=g.context,ie=l.contextType,X=xo,typeof ie=="object"&&ie!==null&&(X=kn(ie)),O=l.getDerivedStateFromProps,(ie=typeof O=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(N!==ye||te!==X)&&rv(n,g,s,X),zr=!1,te=n.memoizedState,g.state=te,Ls(n,s,g,h),zs();var oe=n.memoizedState;N!==ye||te!==oe||zr||t!==null&&t.dependencies!==null&&tu(t.dependencies)?(typeof O=="function"&&(mh(n,l,O,s),oe=n.memoizedState),(de=zr||iv(n,l,de,s,te,oe,X)||t!==null&&t.dependencies!==null&&tu(t.dependencies))?(ie||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,oe,X),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,oe,X)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=oe),g.props=s,g.state=oe,g.context=X,s=de):(typeof g.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),s=!1)}return g=s,Ao(t,n),s=(n.flags&128)!==0,g||s?(g=n.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&s?(n.child=Dl(n,t.child,null,h),n.child=Dl(n,null,l,h)):sn(t,n,l,h),n.memoizedState=g.state,t=n.child):t=rr(t,n,h),t}function bv(t,n,l,s){return Cl(),n.flags|=256,sn(t,n,l,s),n.child}var xh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bh(t){return{baseLanes:t,cachePool:c1()}}function jh(t,n,l){return t=t!==null?t.childLanes&~l:0,n&&(t|=Ea),t}function jv(t,n,l){var s=n.pendingProps,h=!1,g=(n.flags&128)!==0,N;if((N=g)||(N=t!==null&&t.memoizedState===null?!1:(Nn.current&2)!==0),N&&(h=!0,n.flags&=-129),N=(n.flags&32)!==0,n.flags&=-33,t===null){if(nt){if(h?Hr(n):Pr(),(t=At)?(t=F2(t,Ha),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:_r!==null?{id:bi,overflow:ji}:null,retryLane:536870912,hydrationErrors:null},l=e1(t),l.return=n,n.child=l,fn=n,At=null)):t=null,t===null)throw Rr(n);return bm(t)?n.lanes=32:n.lanes=536870912,null}return g=s.children,s=s.fallback,h?(Pr(),h=n.mode,g=ju({mode:"hidden",children:g},h),s=kl(s,h,l,null),g.return=n,s.return=n,g.sibling=s,n.child=g,s=n.child,s.memoizedState=bh(l),s.childLanes=jh(t,N,l),n.memoizedState=xh,Us(null,s)):(Hr(n),wh(n,g))}var O=t.memoizedState;if(O!==null){var X=O.dehydrated;if(X!==null)return N6(t,n,g,N,s,X,O,l)}return h?(Pr(),h=s.fallback,g=n.mode,O=t.child,X=O.sibling,s=Wi(O,{mode:"hidden",children:s.children}),s.subtreeFlags=O.subtreeFlags&1206910976,X!==null?h=Wi(X,h):(h=kl(h,g,l,null),h.flags|=2),h.return=n,s.return=n,s.sibling=h,n.child=s,Us(null,s),s=n.child,h=t.child.memoizedState,h===null?h=bh(l):(g=h.cachePool,g!==null?(O=Zt._currentValue,g=g.parent!==O?{parent:O,pool:O}:g):g=c1(),h={baseLanes:h.baseLanes|l,cachePool:g}),s.memoizedState=h,s.childLanes=jh(t,N,l),n.memoizedState=xh,Us(t.child,s)):(Hr(n),l=t.child,t=l.sibling,l=Wi(l,{mode:"visible",children:s.children}),l.return=n,l.sibling=null,t!==null&&(N=n.deletions,N===null?(n.deletions=[t],n.flags|=16):N.push(t)),n.child=l,n.memoizedState=null,l)}function wh(t,n){return n=ju({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function ju(t,n){return t=aa(22,t,null,n),t.lanes=0,t}function wu(t,n,l){return Dl(n,t.child,null,l),t=wh(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function N6(t,n,l,s,h,g,N,O){if(l)return n.flags&256?(Hr(n),n.flags&=-257,wu(t,n,O)):n.memoizedState!==null?(Pr(),n.child=t.child,n.flags|=128,null):(Pr(),g=h.fallback,N=n.mode,h=ju({mode:"visible",children:h.children},N),g=kl(g,N,O,null),g.flags|=2,h.return=n,g.return=n,h.sibling=g,n.child=h,Dl(n,t.child,null,O),h=n.child,h.memoizedState=bh(O),h.childLanes=jh(t,s,O),n.memoizedState=xh,Us(null,h));if(Hr(n),bm(g)){if(s=g.nextSibling&&g.nextSibling.dataset,s)var X=s.dgst;return s=X,s!==""&&(h=Error(r(419)),h.stack="",h.digest=s,As({value:h,source:null,stack:null})),wu(t,n,O)}if(Wt||El(t,n,O,!1),s=(O&t.childLanes)!==0,Wt||s){if(Ir.current!==null)return wu(t,n,O);if(s=Nt,s!==null&&(h=un(s,O),h!==0&&h!==N.retryLane))throw N.retryLane=h,Sl(t,h),oa(s,t,h),vh;return xm(g)||Pu(),wu(t,n,O)}return xm(g)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,At=Ua(g.nextSibling),fn=n,nt=!0,Mr=null,Ha=!1,t!==null&&a1(n,t),n=wh(n,h.children),n.flags|=134221824,n)}function wv(t,n,l){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),eu(t.return,n,l)}function Sv(t){for(var n=null;t!==null;){var l=t.alternate;l!==null&&cu(l)===null&&(n=t),t=t.sibling}return n}function Su(t,n,l,s,h,g){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:h,treeForkCount:g}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=s,N.tail=l,N.tailMode=h,N.treeForkCount=g)}function Sh(t){var n=t.child;for(t.child=null;n!==null;){var l=n.sibling;n.sibling=t.child,t.child=n,n=l}}function kh(t,n,l){var s=n.pendingProps,h=s.revealOrder,g=s.tail;s=s.children;var N=Nn.current;if(n.flags&128)return Bs(n,N),null;var O=(N&2)!==0;if(O?(N=N&1|2,n.flags|=128):N&=1,Bs(n,N),h==="backwards"&&t!==null?(Sh(t),sn(t,n,s,l),Sh(t)):sn(t,n,s,l),s=nt?Ts:0,!O&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&wv(t,l,n);else if(t.tag===19)wv(t,l,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(h){case"backwards":l=Sv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null,Sh(n)),Su(n,!0,h,null,g,s);break;case"unstable_legacy-backwards":for(l=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&cu(t)===null){n.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Su(n,!0,l,null,g,s);break;case"together":Su(n,!1,null,null,void 0,s);break;case"independent":n.memoizedState=null;break;default:l=Sv(n.child),l===null?(h=n.child,n.child=null):(h=l.sibling,l.sibling=null),Su(n,!1,h,l,g,s)}return n.child}function kv(t,n,l){var s=n.pendingProps;return Dr(n,n.type,s.value),sn(t,n,s.children,l),n.child}function rr(t,n,l){if(t!==null&&(n.dependencies=t.dependencies),Vr|=n.lanes,(l&n.childLanes)===0)if(t!==null){if(El(t,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(r(153));if(n.child!==null){for(t=n.child,l=Wi(t,t.pendingProps),n.child=l,l.return=n;t.sibling!==null;)t=t.sibling,l=l.sibling=Wi(t,t.pendingProps),l.return=n;l.sibling=null}return n.child}function Ch(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&tu(t)))}function E6(t,n,l){switch(n.tag){case 3:ha(n,n.stateNode.containerInfo),Dr(n,Zt,t.memoizedState.cache),Cl();break;case 27:case 5:Xa(n);break;case 4:ha(n,n.stateNode.containerInfo);break;case 10:Dr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Qf(n),null;break;case 13:var s=n.memoizedState;if(s!==null){if(s.dehydrated!==null)return Hr(n),n.flags|=128,null;s=El(t,n,l,!1);var h=n.child.childLanes;return s||(l&h)!==0?jv(t,n,l):(Hr(n),t=rr(t,n,l),t!==null?t.sibling:null)}Hr(n);break;case 19:if(n.flags&128)return kh(t,n,l);if(h=(t.flags&128)!==0,s=(l&n.childLanes)!==0,s||(El(t,n,l,!1),s=(l&n.childLanes)!==0),h){if(s)return kh(t,n,l);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Bs(n,Nn.current),s)break;return null;case 22:return n.lanes=0,pv(t,n,l,n.pendingProps);case 24:Dr(n,Zt,t.memoizedState.cache)}return rr(t,n,l)}function Cv(t,n,l){if(t!==null)if(t.memoizedProps!==n.pendingProps)Wt=!0;else{if(!Ch(t,l)&&(n.flags&128)===0)return Wt=!1,E6(t,n,l);Wt=(t.flags&131072)!==0}else Wt=!1,nt&&(n.flags&1048576)!==0&&n1(n,Ts,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=Ml(n.elementType),n.type=t,typeof t=="function")Rf(t)?(s=zl(t,s),n.tag=1,n=xv(null,n,t,s,l)):(n.tag=0,n=yh(null,n,t,s,l));else{if(t!=null){var h=t.$$typeof;if(h===K){n.tag=11,n=fv(null,n,t,s,l);break e}else if(h===ne){n.tag=14,n=hv(null,n,t,s,l);break e}else if(h===P){n.tag=10,n.type=t,n=kv(null,n,l);break e}}throw n=be(t)||t,Error(r(306,n,""))}}return n;case 0:return yh(t,n,n.type,n.pendingProps,l);case 1:return s=n.type,h=zl(s,n.pendingProps),xv(t,n,s,h,l);case 3:e:{if(ha(n,n.stateNode.containerInfo),t===null)throw Error(r(387));s=n.pendingProps;var g=n.memoizedState;h=g.element,$f(t,n),Ls(n,s,null,l);var N=n.memoizedState;if(s=N.cache,Dr(n,Zt,s),s!==g.cache&&Hf(n,[Zt],l,!0),zs(),s=N.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=bv(t,n,s,l);break e}else if(s!==h){h=La(Error(r(424)),n),As(h),n=bv(t,n,s,l);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(At=Ua(t.firstChild),fn=n,nt=!0,Mr=null,Ha=!0,l=p1(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Cl(),s===h){n=rr(t,n,l);break e}sn(t,n,s,l)}n=n.child}return n;case 26:return Ao(t,n),t===null?(l=Q2(n.type,null,n.pendingProps,null))?n.memoizedState=l:nt||(n.stateNode=A2(n.type,n.pendingProps,yn.current,n)):n.memoizedState=Q2(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Xa(n),t===null&&nt&&(s=n.stateNode=G2(n.type,n.pendingProps,yn.current),fn=n,Ha=!0,h=At,Xr(n.type)?(jm=h,At=Ua(s.firstChild)):At=h),sn(t,n,n.pendingProps.children,l),Ao(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&nt&&((h=s=At)&&(s=jk(s,n.type,n.pendingProps,Ha),s!==null?(n.stateNode=s,fn=n,At=Ua(s.firstChild),Ha=!1,h=!0):h=!1),h||Rr(n)),Xa(n),h=n.type,g=n.pendingProps,N=t!==null?t.memoizedProps:null,s=g.children,fm(h,g)?s=null:N!==null&&fm(h,N)&&(n.flags|=32),n.memoizedState!==null&&(h=Wf(t,n,g6,null,null,l),Yo._currentValue=h),Ao(t,n),sn(t,n,s,l),n.child;case 6:return t===null&&nt&&((t=l=At)&&(l=wk(l,n.pendingProps,Ha),l!==null?(n.stateNode=l,fn=n,At=null,t=!0):t=!1),t||Rr(n)),null;case 13:return jv(t,n,l);case 4:return ha(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Dl(n,null,s,l):sn(t,n,s,l),n.child;case 11:return fv(t,n,n.type,n.pendingProps,l);case 7:return s=n.pendingProps,Ao(t,n),sn(t,n,s,l),n.child;case 8:return sn(t,n,n.pendingProps.children,l),n.child;case 12:return sn(t,n,n.pendingProps.children,l),n.child;case 10:return kv(t,n,l);case 9:return h=n.type._context,s=n.pendingProps.children,Tl(n),h=kn(h),s=s(h),n.flags|=1,sn(t,n,s,l),n.child;case 14:return hv(t,n,n.type,n.pendingProps,l);case 15:return mv(t,n,n.type,n.pendingProps,l);case 19:return kh(t,n,l);case 31:return C6(t,n,l);case 22:return pv(t,n,l,n.pendingProps);case 24:return Tl(n),s=kn(Zt),t===null?(h=qf(),h===null&&(h=Nt,g=Pf(),h.pooledCache=g,g.refCount++,g!==null&&(h.pooledCacheLanes|=l),h=g),n.memoizedState={parent:s,cache:h},Vf(n),Dr(n,Zt,h)):((t.lanes&l)!==0&&($f(t,n),Ls(n,null,null,l),zs()),h=t.memoizedState,g=n.memoizedState,h.parent!==s?(h={parent:s,cache:s},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Dr(n,Zt,s)):(s=g.cache,Dr(n,Zt,s),s!==h.cache&&Hf(n,[Zt],l,!0))),sn(t,n,n.pendingProps.children,l),n.child;case 30:return n.stateNode===null&&(n.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=n.pendingProps,s.name!=null&&s.name!=="auto"?n.flags|=t===null?18882560:18874368:nt&&Jc(n),t!==null&&t.memoizedProps.name!==s.name?n.flags|=4194816:Ao(t,n),sn(t,n,s.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function lr(t){t.flags|=4}function Nh(t,n,l,s,h){var g;if((g=(t.mode&32)!==0)&&(g=l===null?ey(n,s):ey(n,s)&&(s.src!==l.src||s.srcSet!==l.srcSet)),g){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(l2())t.flags|=8192;else throw Rl=ru,Ff}else t.flags&=-16777217}function Nv(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!ty(n))if(l2())t.flags|=8192;else throw Rl=ru,Ff}function ku(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?ya():536870912,t.lanes|=n,Oo|=n)}function qs(t,n){if(!nt)switch(t.tailMode){case"visible":break;case"collapsed":for(var l=t.tail,s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null;break;default:for(n=t.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t.tail=null:l.sibling=null}}function _t(t){var n=t.alternate!==null&&t.alternate.child===t.child,l=0,s=0;if(n)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,s|=h.subtreeFlags&1206910976,s|=h.flags&1206910976,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,s|=h.subtreeFlags,s|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=s,t.childLanes=l,n}function T6(t,n,l){var s=n.pendingProps;switch(zf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(n),null;case 1:return _t(n),null;case 3:return l=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),nr(Zt),rn(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(wo(n)?lr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Bf())),_t(n),null;case 26:var h=n.type,g=n.memoizedState;return t===null?(lr(n),g!==null?(_t(n),Nv(n,g)):(_t(n),Nh(n,h,null,s,l))):g?g!==t.memoizedState?(lr(n),_t(n),Nv(n,g)):(_t(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&lr(n),_t(n),Nh(n,h,t,s,l)),null;case 27:if(pe(n),l=yn.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&lr(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return _t(n),n.subtreeFlags&=-33554433,null}t=Vt.current,wo(n)?i1(n):(t=G2(h,s,l),n.stateNode=t,lr(n))}return _t(n),n.subtreeFlags&=-33554433,null;case 5:if(pe(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&lr(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return _t(n),n.subtreeFlags&=-33554433,null}if(g=Vt.current,wo(n))i1(n);else{var N=Ws(yn.current);switch(g){case 1:g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":g=N.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":g=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":g=N.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?N.createElement("select",{is:s.is}):N.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?N.createElement(h,{is:s.is}):N.createElement(h)}}g[Mt]=n,g[Gt]=s;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)g.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===n)break e;for(;N.sibling===null;){if(N.return===null||N.return===n)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}n.stateNode=g;e:switch(Tn(g,h,s),h){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&lr(n)}}return _t(n),n.subtreeFlags&=-33554433,Nh(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,l),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&lr(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(t=yn.current,wo(n)){if(t=n.stateNode,l=n.memoizedProps,s=null,h=fn,h!==null)switch(h.tag){case 27:case 5:s=h.memoizedProps}t[Mt]=n,t=!!(t.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||C2(t.nodeValue,l)),t||Rr(n,!0)}else t=Ws(t).createTextNode(s),t[Mt]=n,n.stateNode=t}return _t(n),null;case 31:if(l=n.memoizedState,t===null||t.memoizedState!==null){if(s=wo(n),l!==null){if(t===null){if(!s)throw Error(r(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Mt]=n}else Cl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;_t(n),t=!1}else l=Bf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return n.flags&256?(ka(n),n):(ka(n),null);if((n.flags&128)!==0)throw Error(r(558))}return _t(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=wo(n),s!==null&&s.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[Mt]=n}else Cl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;_t(n),h=!1}else h=Bf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(ka(n),n):(ka(n),null)}return ka(n),(n.flags&128)!==0?(n.lanes=l,n):(l=s!==null,t=t!==null&&t.memoizedState!==null,l&&(s=n.child,h=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(h=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==h&&(s.flags|=2048)),l!==t&&l&&(n.child.flags|=8192),ku(n,n.updateQueue),_t(n),null);case 4:return rn(),t===null&&om(n.stateNode.containerInfo),n.flags|=67108864,_t(n),null;case 10:return nr(n.type),_t(n),null;case 19:if(Zf(n),s=n.memoizedState,s===null)return _t(n),null;if(h=(n.flags&128)!==0,g=s.rendering,g===null)if(h)qs(s,!1);else{if(Ft!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=cu(t),g!==null){for(n.flags|=128,qs(s,!1),t=g.updateQueue,n.updateQueue=t,ku(n,t),n.subtreeFlags=0,t=l,l=n.child;l!==null;)Wg(l,t),l=l.sibling;return Bs(n,Nn.current&1|2),nt&&er(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&Xt()>Lu&&(n.flags|=128,h=!0,qs(s,!1),n.lanes=4194304)}else{if(!h)if(t=cu(g),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,ku(n,t),qs(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!g.alternate&&!nt)return _t(n),null}else 2*Xt()-s.renderingStartTime>Lu&&l!==536870912&&(n.flags|=128,h=!0,qs(s,!1),n.lanes=4194304);s.isBackwards?(g.sibling=n.child,n.child=g):(t=s.last,t!==null?t.sibling=g:n.child=g,s.last=g)}if(s.tail!==null){t=s.tail;e:{for(l=t;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xt(),t.sibling=null,g=Nn.current,g=h?g&1|2:g&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!l||nt?Bs(n,g):(l=g,We(Cn,n),We(Nn,l),Ln===null&&(Ln=n)),nt&&er(n,s.treeForkCount),t}return _t(n),null;case 22:case 23:return ka(n),Kf(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(l&536870912)!==0&&(n.flags&128)===0&&(_t(n),n.subtreeFlags&6&&(n.flags|=8192)):_t(n),l=n.updateQueue,l!==null&&ku(n,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048),t!==null&&tt(_l),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),nr(Zt),_t(n),null;case 25:return null;case 30:return n.flags|=33554432,_t(n),null}throw Error(r(156,n.tag))}function A6(t,n){switch(zf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return nr(Zt),rn(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return pe(n),null;case 31:if(n.memoizedState!==null){if(ka(n),n.alternate===null)throw Error(r(340));Cl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(ka(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Cl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Zf(n),t=n.flags,t&65536?(n.flags=t&-65537|128,t=n.memoizedState,t!==null&&(t.rendering=null,t.tail=null),n.flags|=4,n):null;case 4:return rn(),null;case 10:return nr(n.type),null;case 22:case 23:return ka(n),Kf(),t!==null&&tt(_l),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return nr(Zt),null;case 25:return null;default:return null}}function Ev(t,n){switch(zf(n),n.tag){case 3:nr(Zt),rn();break;case 26:case 27:case 5:pe(n);break;case 4:rn();break;case 31:n.memoizedState!==null&&ka(n);break;case 13:ka(n);break;case 19:Zf(n);break;case 10:nr(n.type);break;case 22:case 23:ka(n),Kf(),t!==null&&tt(_l);break;case 24:nr(Zt)}}function Fs(t,n){try{var l=n.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var h=s.next;l=h;do{if((l.tag&t)===t){s=void 0;var g=l.create,N=l.inst;s=g(),N.destroy=s}l=l.next}while(l!==h)}}catch(O){jt(n,n.return,O)}}function Ur(t,n,l){try{var s=n.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var g=h.next;s=g;do{if((s.tag&t)===t){var N=s.inst,O=N.destroy;if(O!==void 0){N.destroy=void 0,h=n;var X=l,ie=O;try{ie()}catch(de){jt(h,X,de)}}}s=s.next}while(s!==g)}}catch(de){jt(n,n.return,de)}}function Tv(t){var n=t.updateQueue;if(n!==null){var l=t.stateNode;try{v1(n,l)}catch(s){jt(t,t.return,s)}}}function Av(t,n,l){l.props=zl(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(s){jt(t,n,s)}}function wi(t,n){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:var h=t.stateNode,g=Zi(t.memoizedProps,h);(h.ref===null||h.ref.name!==g)&&(h.ref=L2(g)),s=h.ref;break;case 7:if(t.stateNode===null){var N=new Aa(t);p(t.child,!1,xk,N,void 0,void 0),t.stateNode=N}s=t.stateNode;break;default:s=t.stateNode}typeof l=="function"?t.refCleanup=l(s):l.current=s}}catch(O){jt(t,n,O)}}function En(t,n){var l=t.ref,s=t.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(h){jt(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){jt(t,n,h)}else l.current=null}function Cu(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var l=0;l<n.length;l++)q2(t.stateNode,n[l])}function _v(t){for(var n=t.return;n!==null&&(Th(n)&&q2(t.stateNode,n.stateNode),!Eh(n));)n=n.return}function Vs(t){for(var n=t.return;n!==null&&(Th(n)&&bk(t.stateNode,n.stateNode),!Eh(n));)n=n.return}function Eh(t){return t.tag===5||t.tag===3||t.tag===27}function Th(t){return t&&t.tag===7&&t.stateNode!==null}function Ah(t){var n=t.type,l=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(h){jt(t,t.return,h)}}function _h(t,n,l){try{var s=t.stateNode;tk(s,t.type,l,n),s[Gt]=n}catch(h){jt(t,t.return,h)}}function Mv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Xr(t.type)||t.tag===4}function Mh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Mv(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&&Xr(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 Rh(t,n,l,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(h,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(h),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Fn)),Cu(t,s),Pe=!0;else if(h!==4&&(h===27&&(Cu(t,s),s=null,Xr(t.type)&&(l=t.stateNode,n=null)),t=t.child,t!==null))for(Rh(t,n,l,s),t=t.sibling;t!==null;)Rh(t,n,l,s),t=t.sibling}function Nu(t,n,l,s){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?l.insertBefore(h,n):l.appendChild(h),Cu(t,s),Pe=!0;else if(h!==4&&(h===27&&(Cu(t,s),s=null,Xr(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Nu(t,n,l,s),t=t.sibling;t!==null;)Nu(t,n,l,s),t=t.sibling}function Rv(t){var n=t.stateNode,l=t.memoizedProps;try{for(var s=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Tn(n,s,l),n[Mt]=t,n[Gt]=l}catch(g){jt(t,t.return,g)}}var Eu=!1,Ca=null;function Dv(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Eu=!0)}var Si=null;function Ov(){var t=Si;return Si=null,t}var ia=0;function _o(t,n,l,s,h){return ia=0,zv(t.child,n,l,s,h)}function zv(t,n,l,s,h){for(var g=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(s!==null){var O=pm(N);s.push(O),O.view&&(g=!0)}else g||pm(N).view&&(g=!0);Eu=!0,O2(N,ia===0?n:n+"_"+ia,l),ia++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h||zv(t.child,n,l,s,h)&&(g=!0));t=t.sibling}return g}function ki(t,n){for(;t!==null;)t.tag===5?z2(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||ki(t.child,n)),t=t.sibling}function Tu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Tu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var n=t.memoizedProps;if(n.name==null||n.name==="auto")throw Error(r(544));var l=n.name;n=Ji(n.default,n.share),n!=="none"&&(_o(t,l,n,null,!1)||ki(t.child,!1))}t=t.sibling}}function Dh(t,n){if(t.tag===30){var l=t.stateNode,s=t.memoizedProps,h=Zi(s,l),g=Ji(s.default,l.paired?s.share:s.enter);g!=="none"?_o(t,h,g,null,!1)?(Tu(t),l.paired||n||Io(t,s.onEnter)):ki(t.child,!1):Tu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Dh(t,n),t=t.sibling;else Tu(t)}function Oh(t){if(Ca!==null&&Ca.size!==0){var n=Ca;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var l=t.memoizedProps,s=l.name;if(s!=null&&s!=="auto"){var h=n.get(s);if(h!==void 0){var g=Ji(l.default,l.share);if(g!=="none"&&(_o(t,s,g,null,!1)?(g=t.stateNode,h.paired=g,g.paired=h,Io(t,l.onShare)):ki(t.child,!1)),n.delete(s),n.size===0)break}}}Oh(t)}t=t.sibling}}}function zh(t){if(t.tag===30){var n=t.memoizedProps,l=Zi(n,t.stateNode),s=Ca!==null?Ca.get(l):void 0,h=Ji(n.default,s!==void 0?n.share:n.exit);h!=="none"&&(_o(t,l,h,null,!1)?s!==void 0?(h=t.stateNode,s.paired=h,h.paired=s,Ca.delete(l),Io(t,n.onShare)):Io(t,n.onExit):ki(t.child,!1)),Ca!==null&&Oh(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)zh(t),t=t.sibling;else Ca!==null&&Oh(t)}function Lv(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,l=Zi(n,t.stateNode);n=Ji(n.default,n.update),t.flags&=-5,n!=="none"&&_o(t,l,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Lv(t);t=t.sibling}}function Lh(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var n=t.stateNode;n.paired!==null&&(n.paired=null,ki(t.child,!1))}Lh(t)}t=t.sibling}}function Au(t){if(t.tag===30)t.stateNode.paired=null,ki(t.child,!1),Lh(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Au(t),t=t.sibling;else Lh(t)}function Bv(t){for(t=t.child;t!==null;)t.tag===30?ki(t.child,!1):(t.subtreeFlags&33554432)!==0&&Bv(t),t=t.sibling}function Bh(t,n,l,s,h,g,N){for(var O=!1;n!==null;){if(n.tag===5){var X=n.stateNode;if(g!==null&&ia<g.length){var ie=g[ia],de=pm(X);(ie.view||de.view)&&(O=!0);var ye;if(ye=(t.flags&4)===0)if(de.clip)ye=!0;else{ye=ie.rect;var te=de.rect;ye=ye.y!==te.y||ye.x!==te.x||ye.height!==te.height||ye.width!==te.width}ye&&(t.flags|=4),de.abs?de=!ie.abs:(ie=ie.rect,de=de.rect,de=ie.height!==de.height||ie.width!==de.width),de&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&O2(X,ia===0?l:l+"_"+ia,h),O&&(t.flags&4)!==0||(Si===null&&(Si=[]),Si.push(X,ia===0?s:s+"_"+ia,n.memoizedProps)),ia++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&N?t.flags|=n.flags&32:Bh(t,n.child,l,s,h,g,N)&&(O=!0));n=n.sibling}return O}function Iv(t,n){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,s=t.stateNode,h=Zi(l,s),g=Ji(l.default,l.update),N;N=t.memoizedState,t.memoizedState=null,s=t;var O=t.child;ia=0,h=Bh(s,O,h,h,g,N,!1),(t.flags&4)!==0&&h&&Io(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Iv(t);t=t.sibling}}var hn=!1,xt=!1,Ci=!1,Ih=!1,Hv=typeof WeakSet=="function"?WeakSet:Set,mn=null,Ni=!1,$s=!1,_u=!1,Hh=!1;function _6(t,n,l){if(t=t.containerInfo,um=Xo,t=Fg(t),Cf(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var h=s.getSelection&&s.getSelection();if(h&&h.rangeCount!==0){s=h.anchorNode;var g=h.anchorOffset,N=h.focusNode;h=h.focusOffset;try{s.nodeType,N.nodeType}catch{s=null;break e}var O=0,X=-1,ie=-1,de=0,ye=0,te=t,oe=null;t:for(;;){for(var Ne;te!==s||g!==0&&te.nodeType!==3||(X=O+g),te!==N||h!==0&&te.nodeType!==3||(ie=O+h),te.nodeType===3&&(O+=te.nodeValue.length),(Ne=te.firstChild)!==null;)oe=te,te=Ne;for(;;){if(te===t)break t;if(oe===s&&++de===g&&(X=O),oe===N&&++ye===h&&(ie=O),(Ne=te.nextSibling)!==null)break;te=oe,oe=te.parentNode}te=Ne}s=X===-1||ie===-1?null:{start:X,end:ie}}else s=null}s=s||{start:0,end:0}}else s=null;for(dm={focusedElem:t,selectionRange:s},Xo=!1,l=(l&335544064)===l,mn=n,n=l?9270:1024;mn!==null;){if(t=mn,l&&(s=t.deletions,s!==null))for(g=0;g<s.length;g++)l&&zh(s[g]);if(t.alternate===null&&(t.flags&2)!==0)l&&Dv(t),Mu(l);else{if(t.tag===22){if(s=t.alternate,t.memoizedState!==null){s!==null&&s.memoizedState===null&&l&&zh(s),Mu(l);continue}else if(s!==null&&s.memoizedState!==null){l&&Dv(t),Mu(l);continue}}s=t.child,(t.subtreeFlags&n)!==0&&s!==null?(s.return=t,mn=s):(l&&Lv(t),Mu(l))}}Ca=null}function Mu(t){for(;mn!==null;){var n=mn,l=t,s=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&s!==null){l=void 0,h=s.memoizedProps,s=s.memoizedState;var g=n.stateNode;try{var N=zl(n.type,h);l=g.getSnapshotBeforeUpdate(N,s),g.__reactInternalSnapshotBeforeUpdate=l}catch(O){jt(n,n.return,O)}}break;case 3:if((h&1024)!==0){if(s=n.stateNode.containerInfo,l=s.nodeType,l===9)ym(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":ym(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&s!==null&&(l=Zi(s.memoizedProps,s.stateNode),h=n.memoizedProps,h=Ji(h.default,h.update),h!=="none"&&_o(s,l,h,s.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(r(163))}if(s=n.sibling,s!==null){s.return=n.return,mn=s;break}mn=n.return}}function Pv(t,n,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:Ei(t,l),s&4&&Fs(5,l);break;case 1:if(Ei(t,l),s&4)if(t=l.stateNode,n===null)try{t.componentDidMount()}catch(N){jt(l,l.return,N)}else{var h=zl(l.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){jt(l,l.return,N)}}s&64&&Tv(l),s&512&&wi(l,l.return);break;case 3:if(Ei(t,l),s&64&&(t=l.updateQueue,t!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{v1(t,n)}catch(N){jt(l,l.return,N)}}break;case 27:n===null&&s&4&&Rv(l);case 26:case 5:Ei(t,l),n===null&&s&4&&Ah(l),s&512&&wi(l,l.return);break;case 12:Ei(t,l);break;case 31:Ei(t,l),s&4&&Vv(t,l);break;case 13:Ei(t,l),s&4&&$v(t,l),s&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=q6.bind(null,l),Sk(t,l))));break;case 22:if(s=l.memoizedState!==null||hn,!s){var g=n!==null&&n.memoizedState!==null||xt;n=hn,h=xt,hn=s,(xt=g)&&!h?(s=2,(l.subtreeFlags&8772)!==0&&(s|=1),ni(t,l,s)):Ei(t,l),hn=n,xt=h}break;case 30:Ei(t,l),s&512&&wi(l,l.return);break;case 7:s&512&&wi(l,l.return);default:Ei(t,l)}}function Ph(t,n){for(t=t.child;t!==null;)Uv(t,n),t=t.sibling}function Uv(t,n){switch(t.tag){case 5:case 26:try{var l=t.stateNode;if(n){var s=l.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var h=t.stateNode,g=t.memoizedProps.style,N=g!=null&&g.hasOwnProperty("display")?g.display:null;h.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(X){jt(t,t.return,X)}Uh(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,Pe=!0}catch(X){jt(t,t.return,X)}break;case 18:try{var O=t.stateNode;n?D2(O,!0):D2(t.stateNode,!1)}catch(X){jt(t,t.return,X)}break;case 22:case 23:t.memoizedState===null&&Ph(t,n);break;default:Ph(t,n)}}function Uh(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var l=t,s=n;switch(l.tag){case 4:Uv(l,s);break e;case 22:l.memoizedState===null&&Uh(l,s);break e;default:Uh(l,s)}}t=t.sibling}}function qv(t){var n=t.alternate;n!==null&&(t.alternate=null,qv(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Xi(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 Ot=null,ra=!1;function ei(t,n,l){for(l=l.child;l!==null;)Fv(t,n,l),l=l.sibling}function Fv(t,n,l){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Ka,l)}catch{}switch(l.tag){case 26:xt||En(l,n),ei(t,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!xt&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:xt||En(l,n),Vs(l);var s=Ot,h=ra;Xr(l.type)&&(Ot=l.stateNode,ra=!1),ei(t,n,l),Y2(l.stateNode,l.type,l.memoizedProps),Ot=s,ra=h;break;case 5:xt||En(l,n),Vs(l);case 6:if(l.tag===6&&Vs(l),s=Ot,h=ra,Ot=null,ei(t,n,l),Ot=s,ra=h,Ot!==null)if(ra)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(l.stateNode),Pe=!0}catch(g){jt(l,n,g)}else try{Ot.removeChild(l.stateNode),Pe=!0}catch(g){jt(l,n,g)}break;case 18:Ot!==null&&(ra?(t=Ot,R2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Ko(t)):R2(Ot,l.stateNode));break;case 4:s=Ot,h=ra,Ot=l.stateNode.containerInfo,ra=!0,ei(t,n,l),Ot=s,ra=h;break;case 0:case 11:case 14:case 15:Ur(2,l,n),xt||Ur(4,l,n),ei(t,n,l);break;case 1:xt||(En(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"&&Av(l,n,s)),ei(t,n,l);break;case 21:ei(t,n,l);break;case 22:xt=(s=xt)||l.memoizedState!==null,ei(t,n,l),xt=s;break;case 30:En(l,n),ei(t,n,l);break;case 7:xt||En(l,n),ei(t,n,l);break;default:ei(t,n,l)}}function Vv(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ko(t)}catch(l){jt(n,n.return,l)}}}function $v(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ko(t)}catch(l){jt(n,n.return,l)}}function M6(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Hv),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Hv),n;default:throw Error(r(435,t.tag))}}function Ru(t,n){var l=M6(t);n.forEach(function(s){if(!l.has(s)){l.add(s);var h=F6.bind(null,t,s);s.then(h,h)}})}function Gn(t,n,l){var s=n.deletions;if(s!==null)for(var h=0;h<s.length;h++){var g=s[h],N=t,O=n,X=O;e:for(;X!==null;){switch(X.tag){case 27:if(Xr(X.type)){Ot=X.stateNode,ra=!1;break e}break;case 5:Ot=X.stateNode,ra=!1;break e;case 3:case 4:Ot=X.stateNode.containerInfo,ra=!0;break e}X=X.return}if(Ot===null)throw Error(r(160));Fv(N,O,g),Ot=null,ra=!1,N=g.alternate,N!==null&&(N.return=null),g.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Gv(n,t,l),n=n.sibling}var ti=null;function Gv(t,n,l){var s=t.alternate,h=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(h&4&&(s=t.updateQueue,s=s!==null?s.events:null,s!==null))for(var g=0;g<s.length;g++){var N=s[g];N.ref.impl=N.nextImpl}Gn(n,t,l),Yn(t),h&4&&(Ur(3,t,t.return),Fs(3,t),Ur(5,t,t.return));break;case 1:Gn(n,t,l),Yn(t),h&512&&(xt||s===null||En(s,s.return)),h&64&&hn&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:if(g=ti,Gn(n,t,l),Yn(t),h&512&&(xt||s===null||En(s,s.return)),h&4)if(h=s!==null?s.memoizedState:null,l=t.memoizedState,s===null)if(l===null)if(t.stateNode===null)if(hn)t.stateNode=A2(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,l=t.memoizedProps,h=g.ownerDocument||g;t:switch(n){case"title":s=h.getElementsByTagName("title")[0],(!s||s[yi]||s[Mt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=h.createElement(n),h.head.insertBefore(s,h.querySelector("head > title"))),Tn(s,n,l),s[Mt]=t,Q(s),n=s;break e;case"link":if(g=W2("link","href",h).get(n+(l.href||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,l),h.head.appendChild(s);break;case"meta":if(g=W2("meta","content",h).get(n+(l.content||""))){for(N=0;N<g.length;N++)if(s=g[N],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){g.splice(N,1);break t}}s=h.createElement(n),Tn(s,n,l),h.head.appendChild(s);break;default:throw Error(r(468,n))}s[Mt]=t,Q(s),n=s}t.stateNode=n}else hn||Cm(g,t.type,t.stateNode);else t.stateNode=J2(g,l,t.memoizedProps);else h!==l?(h===null?(n=s.stateNode,n===null||xt||n.parentNode.removeChild(n)):h.count--,l===null?hn||Cm(g,t.type,t.stateNode):J2(g,l,t.memoizedProps)):l===null&&t.stateNode!==null&&_h(t,t.memoizedProps,s.memoizedProps);break;case 27:Gn(n,t,l),Yn(t),h&512&&(xt||s===null||En(s,s.return)),s!==null&&h&4&&_h(t,t.memoizedProps,s.memoizedProps);break;case 5:if(g=Ci,Ci=!1,Gn(n,t,l),Ci=g,Yn(t),h&512&&(xt||s===null||En(s,s.return)),t.flags&32){n=t.stateNode;try{qn(n,""),Pe=!0}catch(de){jt(t,t.return,de)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,_h(t,n,s!==null?s.memoizedProps:n)),h&1024&&(Ih=!0);break;case 6:if(Gn(n,t,l),Yn(t),h&4){if(t.stateNode===null)throw Error(r(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n,Pe=!0}catch(de){jt(t,t.return,de)}}break;case 3:if(Pe=!1,Yu=null,g=ti,ti=ec(n.containerInfo),Gn(n,t,l),ti=g,Yn(t),h&4&&s!==null&&s.memoizedState.isDehydrated)try{Ko(n.containerInfo)}catch(de){jt(t,t.return,de)}Ih&&(Ih=!1,Yv(t)),Pe=!1;break;case 4:h=Ci,Ci=hn,s=on(),g=ti,ti=ec(t.stateNode.containerInfo),Gn(n,t,l),Yn(t),ti=g,Pe&&$s&&(_u=!0),Pe=s,Ci=h;break;case 12:Gn(n,t,l),Yn(t);break;case 31:Gn(n,t,l),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Ru(t,n)));break;case 13:Gn(n,t,l),Yn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(zu=Xt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Ru(t,n)));break;case 22:g=t.memoizedState!==null,N=s!==null&&s.memoizedState!==null;var O=hn,X=xt,ie=Ci;hn=O||g,Ci=ie||g,xt=X||N,Gn(n,t,l),xt=X,Ci=ie,hn=O,Yn(t),h&8192&&(n=t.stateNode,n._visibility=g?n._visibility&-2:n._visibility|1,!g||s===null||N||hn||xt||(n=N||xt,l=hn,s=xt,hn=g||hn,xt=n,qr(t,2),hn=l,xt=s),!g&&Ci||Ph(t,g)),h&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Ru(t,l))));break;case 19:Gn(n,t,l),Yn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Ru(t,n)));break;case 30:h&512&&(xt||s===null||En(s,s.return)),h=on(),g=$s,N=(l&335544064)===l,O=t.memoizedProps,$s=N&&Ji(O.default,O.update)!=="none",Gn(n,t,l),Yn(t),N&&s!==null&&Pe&&(t.flags|=4),$s=g,Pe=h;break;case 21:break;case 7:h&512&&(xt||s===null||En(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=t);default:Gn(n,t,l),Yn(t)}}function Yn(t){var n=t.flags;if(n&2){try{for(var l,s=t.return;s!==null;){if(Mv(s)){l=s;break}s=s.return}s=null;for(var h=t.return;h!==null;){if(Th(h)){var g=h.stateNode;s===null?s=[g]:s.push(g)}if(Eh(h))break;h=h.return}var N=s;if(l==null)throw Error(r(160));switch(l.tag){case 27:var O=l.stateNode,X=Mh(t);Nu(t,X,O,N);break;case 5:var ie=l.stateNode;l.flags&32&&(qn(ie,""),l.flags&=-33);var de=Mh(t);Nu(t,de,ie,N);break;case 3:case 4:var ye=l.stateNode.containerInfo,te=Mh(t);Rh(t,te,ye,N);break;default:throw Error(r(161))}}catch(oe){jt(t,t.return,oe)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Yv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Yv(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,Xo=!0,n.reset(),Xo=!1),t=t.sibling}}function Mo(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)Xv(n,t),n=n.sibling;else Iv(n)}function Xv(t,n){var l=t.alternate;if(l===null)Dh(t,!1);else switch(t.tag){case 3:if(Hh=Ni=!1,Ov(),Mo(n,t),!Ni&&!_u){if(t=Si,t!==null)for(var s=0;s<t.length;s+=3){l=t[s];var h=t[s+1];z2(l,t[s+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+h+")"})}t=n.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Hh=!0}Si=null;break;case 5:Mo(n,t);break;case 4:s=Ni,Ni=!1,Mo(n,t),Ni&&(_u=!0),Ni=s;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Dh(t,!1):Mo(n,t));break;case 30:s=Ni,h=Ov(),Ni=!1,Mo(n,t),Ni&&(t.flags|=4);var g=t.memoizedProps,N=t.stateNode;n=Zi(g,N),N=Zi(l.memoizedProps,N);var O=Ji(g.default,g.update);O==="none"?n=!1:(g=l.memoizedState,l.memoizedState=null,l=t.child,ia=0,n=Bh(t,l,n,N,O,g,!0),ia!==(g===null?0:g.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Io(t,t.memoizedProps.onUpdate),Si=h):h!==null&&(h.push.apply(h,Si),Si=h),Ni=(t.flags&32)!==0?!0:s;break;default:Mo(n,t)}}function Ei(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Pv(t,n.alternate,n),n=n.sibling}function qr(t,n){for(t=t.child;t!==null;){var l=t,s=n;switch(l.tag){case 0:case 11:case 14:case 15:Ur(4,l,l.return),qr(l,s);break;case 1:En(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&Av(l,l.return,h),qr(l,s);break;case 27:(s&2)!==0&&Y2(l.stateNode,l.type,l.memoizedProps);case 5:En(l,l.return),l.tag!==5&&l.tag!==27||Vs(l),qr(l,s);break;case 6:Vs(l);break;case 26:En(l,l.return),h=l.stateNode,l.memoizedState!==null||h===null||xt||h.parentNode.removeChild(h),qr(l,s);break;case 22:l.memoizedState===null&&qr(l,s);break;case 30:En(l,l.return),qr(l,s);break;case 7:En(l,l.return);default:qr(l,s)}t=t.sibling}}function ni(t,n,l){for(l=(n.subtreeFlags&8772)!==0?l:l&-2,n=n.child;n!==null;){var s=n.alternate,h=t,g=n,N=g.flags,O=(l&1)!==0;switch(g.tag){case 0:case 11:case 15:ni(h,g,l),Fs(4,g);break;case 1:if(ni(h,g,l),s=g,h=s.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(de){jt(s,s.return,de)}if(s=g,h=s.updateQueue,h!==null){var X=s.stateNode;try{var ie=h.shared.hiddenCallbacks;if(ie!==null)for(h.shared.hiddenCallbacks=null,h=0;h<ie.length;h++)g1(ie[h],X)}catch(de){jt(s,s.return,de)}}O&&N&64&&Tv(g),wi(g,g.return);break;case 27:(l&2)!==0&&Rv(g);case 5:g.tag!==5&&g.tag!==27||_v(g),ni(h,g,l),O&&s===null&&N&4&&Ah(g),wi(g,g.return);break;case 6:_v(g);break;case 26:X=g.stateNode,g.memoizedState!==null||X===null||hn||Cm(ec(X.ownerDocument),g.type,X),ni(h,g,l),O&&s===null&&N&4&&Ah(g),wi(g,g.return);break;case 12:ni(h,g,l);break;case 31:ni(h,g,l),O&&N&4&&Vv(h,g);break;case 13:ni(h,g,l),O&&N&4&&$v(h,g);break;case 22:g.memoizedState===null&&ni(h,g,l),wi(g,g.return);break;case 30:ni(h,g,l),wi(g,g.return);break;case 7:wi(g,g.return);default:ni(h,g,l)}n=n.sibling}}function qh(t,n){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&_s(l))}function Fh(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&_s(t))}function Pa(t,n,l,s){var h=(l&335544064)===l;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)Kv(t,n,l,s),n=n.sibling;else h&&Bv(n)}function Kv(t,n,l,s){var h=(l&335544064)===l;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Au(n);var g=n.flags;switch(n.tag){case 0:case 11:case 15:Pa(t,n,l,s),g&2048&&Fs(9,n);break;case 1:Pa(t,n,l,s);break;case 3:Pa(t,n,l,s),h&&Hh&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),g&2048&&(g=null,n.alternate!==null&&(g=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==g&&(n.refCount++,g!=null&&_s(g)));break;case 12:if(g&2048){Pa(t,n,l,s),g=n.stateNode;try{var N=n.memoizedProps,O=N.id,X=N.onPostCommit;typeof X=="function"&&X(O,n.alternate===null?"mount":"update",g.passiveEffectDuration,-0)}catch(ie){jt(n,n.return,ie)}}else Pa(t,n,l,s);break;case 31:Pa(t,n,l,s);break;case 13:Pa(t,n,l,s);break;case 23:break;case 22:N=n.stateNode,O=n.alternate,n.memoizedState!==null?(h&&O!==null&&O.memoizedState===null&&Au(O),N._visibility&2?Pa(t,n,l,s):Gs(t,n)):(h&&O!==null&&O.memoizedState!==null&&Au(n),N._visibility&2?Pa(t,n,l,s):(N._visibility|=2,Ro(t,n,l,s,(n.subtreeFlags&10256)!==0||!1))),g&2048&&qh(O,n);break;case 24:Pa(t,n,l,s),g&2048&&Fh(n.alternate,n);break;case 30:h&&(g=n.alternate,g!==null&&(ki(g.child,!0),ki(n.child,!0))),Pa(t,n,l,s);break;default:Pa(t,n,l,s)}}function Ro(t,n,l,s,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,N=n,O=l,X=s,ie=N.flags;switch(N.tag){case 0:case 11:case 15:Ro(g,N,O,X,h),Fs(8,N);break;case 23:break;case 22:var de=N.stateNode;N.memoizedState!==null?de._visibility&2?Ro(g,N,O,X,h):Gs(g,N):(de._visibility|=2,Ro(g,N,O,X,h)),h&&ie&2048&&qh(N.alternate,N);break;case 24:Ro(g,N,O,X,h),h&&ie&2048&&Fh(N.alternate,N);break;default:Ro(g,N,O,X,h)}n=n.sibling}}function Gs(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=t,s=n,h=s.flags;switch(s.tag){case 22:Gs(l,s),h&2048&&qh(s.alternate,s);break;case 24:Gs(l,s),h&2048&&Fh(s.alternate,s);break;default:Gs(l,s)}n=n.sibling}}var Ll=8192;function Bl(t,n,l){if(t.subtreeFlags&Ll)for(t=t.child;t!==null;)Qv(t,n,l),t=t.sibling}function Qv(t,n,l){switch(t.tag){case 26:Bl(t,n,l),t.flags&Ll&&(t.memoizedState!==null?Bk(l,ti,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&ay(l,t)));break;case 5:Bl(t,n,l),t.flags&Ll&&(t=t.stateNode,(n&335544128)===n&&ay(l,t));break;case 3:case 4:var s=ti;ti=ec(t.stateNode.containerInfo),Bl(t,n,l),ti=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=Ll,Ll=16777216,Bl(t,n,l),Ll=s):Bl(t,n,l));break;case 30:if((t.flags&Ll)!==0&&(s=t.memoizedProps.name,s!=null&&s!=="auto")){var h=t.stateNode;h.paired=null,Ca===null&&(Ca=new Map),Ca.set(s,h)}Bl(t,n,l);break;default:Bl(t,n,l)}}function Zv(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 Ys(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];mn=s,Wv(s,t)}Zv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jv(t),t=t.sibling}function Jv(t){switch(t.tag){case 0:case 11:case 15:Ys(t),t.flags&2048&&Ur(9,t,t.return);break;case 3:Ys(t);break;case 12:Ys(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Du(t)):Ys(t);break;default:Ys(t)}}function Du(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];mn=s,Wv(s,t)}Zv(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Ur(8,n,n.return),Du(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Du(n));break;default:Du(n)}t=t.sibling}}function Wv(t,n){for(;mn!==null;){var l=mn;switch(l.tag){case 0:case 11:case 15:Ur(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:_s(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,mn=s;else e:for(l=t;mn!==null;){s=mn;var h=s.sibling,g=s.return;if(qv(s),s===l){mn=null;break e}if(h!==null){h.return=g,mn=h;break e}mn=g}}}var R6={getCacheForType:function(t){var n=kn(Zt),l=n.data.get(t);return l===void 0&&(l=t(),n.data.set(t,l)),l},cacheSignal:function(){return kn(Zt).controller.signal}},D6=typeof WeakMap=="function"?WeakMap:Map,yt=0,Nt=null,it=null,st=0,bt=0,Na=null,Fr=!1,Do=!1,Vh=!1,or=0,Ft=0,Vr=0,Il=0,Ou=0,Ea=0,Oo=0,Xs=null,la=null,$h=!1,zu=0,e2=0,Lu=1/0,Bu=null,$r=null,Ht=0,ai=null,Hl=null,Ti=0,Gh=0,Yh=null,t2=null,zo=null,Lo=null,Bo=null,Ks=0,Iu=null;function Ta(){return(yt&2)!==0&&st!==0?st&-st:se.T!==null?am():ea()}function n2(){if(Ea===0)if((st&536870912)===0||nt){var t=Da;Da<<=1,(Da&3932160)===0&&(Da=262144),Ea=t}else Ea=536870912;return t=Cn.current,t!==null&&(t.flags|=32),Ea}function Io(t,n){if(n!=null){var l=t.stateNode,s=l.ref;s===null&&(s=l.ref=L2(Zi(t.memoizedProps,l))),Lo===null&&(Lo=[]),Lo.push(n.bind(null,s))}}function oa(t,n,l){(t===Nt&&(bt===2||bt===9)||t.cancelPendingCommit!==null)&&(Ho(t,0),Gr(t,st,Ea,!1)),Zn(t,l),((yt&2)===0||t!==Nt)&&(t===Nt&&((yt&2)===0&&(Il|=l),Ft===4&&Gr(t,st,Ea,!1)),Ai(t))}function a2(t,n,l){if((yt&6)!==0)throw Error(r(327));var s=!l&&(n&127)===0&&(n&t.expiredLanes)===0||va(t,n),h=s?L6(t,n):Kh(t,n,!0),g=s;do{if(h===0){Do&&!s&&Gr(t,n,0,!1);break}else{if(l=t.current.alternate,g&&!O6(l)){h=Kh(t,n,!1),g=!1;continue}if(h===2){if(g=n,t.errorRecoveryDisabledLanes&g)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var O=t;h=Xs;var X=O.current.memoizedState.isDehydrated;if(X&&(Ho(O,N).flags|=256),N=Kh(O,N,!1),N!==2&&N!==6){if(Vh&&!X){O.errorRecoveryDisabledLanes|=g,Il|=g,h=4;break e}g=la,la=h,g!==null&&(la===null?la=g:la.push.apply(la,g))}h=N}if(g=!1,h!==2)continue}}if(h===1){Ho(t,0),Gr(t,n,0,!0);break}e:{switch(s=t,g=h,g){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Gr(s,n,Ea,!Fr);break e;case 2:la=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(h=zu+300-Xt(),10<h)){if(Gr(s,n,Ea,!Fr),ga(s,0,!0)!==0)break e;Ti=n,s.timeoutHandle=mm(i2.bind(null,s,l,la,Bu,$h,n,Ea,Il,Oo,Fr,g,"Throttled",-0,0),h);break e}i2(s,l,la,Bu,$h,n,Ea,Il,Oo,Fr,g,null,-0,0)}}break}while(!0);Ai(t)}function i2(t,n,l,s,h,g,N,O,X,ie,de,ye,te,oe){t.timeoutHandle=-1;var Ne=n.subtreeFlags,Oe=(g&335544064)===g;if(ye=null,(Oe||Ne&8192||(Ne&16785408)===16785408)&&(ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Ca=null,Qv(n,g,ye),Oe&&(Ne=ye,Oe=t.containerInfo,Oe=(Oe.nodeType===9?Oe:Oe.ownerDocument).__reactViewTransition,Oe!=null&&(Ne.count++,Ne.waitingForViewTransition=!0,Ne=ac.bind(Ne),Oe.finished.then(Ne,Ne))),Ne=(g&62914560)===g?zu-Xt():(g&4194048)===g?e2-Xt():0,Ne=Ik(ye,Ne),Ne!==null)){Ti=g,t.cancelPendingCommit=Ne(f2.bind(null,t,n,g,l,s,h,N,O,X,ie,de,ye,null,te,oe)),Gr(t,g,N,!ie);return}f2(t,n,g,l,s,h,N,O,X,ie,de,ye)}function O6(t){for(var n=t;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var h=l[s],g=h.getSnapshot;h=h.value;try{if(!Sa(g(),h))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 Gr(t,n,l,s){n=mi(t,n),n&=~Ou,n&=~Il,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var h=n;0<h;){var g=31-$t(h),N=1<<g;s[g]=-1,h&=~N}l!==0&&Jn(t,l,n)}function Hu(){return(yt&6)===0?(Qs(0),!1):!0}function Xh(){if(it!==null){if(bt===0)var t=it.return;else t=it,tr=Nl=null,nh(t),Co=null,Ds=0,t=it;for(;t!==null;)Ev(t.alternate,t),t=t.return;it=null}}function Ho(t,n){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,ik(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Ti=0,Xh(),Nt=t,it=l=Wi(t.current,null),st=n,bt=0,Na=null,Fr=!1,Do=va(t,n),Vh=!1,Oo=Ea=Ou=Il=Vr=Ft=0,la=Xs=null,$h=!1,or=mi(t,n),Yc(),l}function r2(t,n){Ze=null,se.H=yu,n===ko||n===iu?(n=f1(),bt=3):n===Ff?(n=f1(),bt=4):bt=n===vh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Na=n,it===null&&(Ft=1,xu(t,La(n,t.current)))}function l2(){var t=Cn.current;return t===null?!0:(st&4194048)===st?Ln===null:(st&62914560)===st||(st&536870912)!==0?t===Ln:!1}function o2(){var t=se.H;return se.H=yu,t===null?yu:t}function s2(){var t=se.A;return se.A=R6,t}function Pu(){Ft=4,Fr||(st&4194048)!==st&&Cn.current!==null||(Do=!0),(Vr&134217727)===0&&(Il&134217727)===0||Nt===null||Gr(Nt,st,Ea,!1)}function Kh(t,n,l){var s=yt;yt|=2;var h=o2(),g=s2();(Nt!==t||st!==n)&&(Bu=null,Ho(t,n)),n=!1;var N=Ft;e:do try{if(bt!==0&&it!==null){var O=it,X=Na;switch(bt){case 8:Xh(),N=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(n=!0);var ie=bt;if(bt=0,Na=null,Po(t,O,X,ie),l&&Do){N=0;break e}break;default:ie=bt,bt=0,Na=null,Po(t,O,X,ie)}}z6(),N=Ft;break}catch(de){r2(t,de)}while(!0);return n&&t.shellSuspendCounter++,tr=Nl=null,yt=s,se.H=h,se.A=g,it===null&&(Nt=null,st=0,Yc()),N}function z6(){for(;it!==null;)c2(it)}function L6(t,n){var l=yt;yt|=2;var s=o2(),h=s2();Nt!==t||st!==n?(Bu=null,Lu=Xt()+500,Ho(t,n)):Do=va(t,n);e:do try{if(bt!==0&&it!==null){n=it;var g=Na;t:switch(bt){case 1:bt=0,Na=null,Po(t,n,g,1);break;case 2:case 9:if(u1(g)){bt=0,Na=null,u2(n);break}n=function(){bt!==2&&bt!==9||Nt!==t||(bt=7),Ai(t)},g.then(n,n);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:u1(g)?(bt=0,Na=null,u2(n)):(bt=0,Na=null,Po(t,n,g,7));break;case 5:var N=null;switch(it.tag){case 26:N=it.memoizedState;case 5:case 27:var O=it;if(N?ty(N):O.stateNode.complete){bt=0,Na=null;var X=O.sibling;if(X!==null)it=X;else{var ie=O.return;ie!==null?(it=ie,Uu(ie)):it=null}break t}}bt=0,Na=null,Po(t,n,g,5);break;case 6:bt=0,Na=null,Po(t,n,g,6);break;case 8:Xh(),Ft=6;break e;default:throw Error(r(462))}}B6();break}catch(de){r2(t,de)}while(!0);return tr=Nl=null,se.H=s,se.A=h,yt=l,it!==null?0:(Nt=null,st=0,Yc(),Ft)}function B6(){for(;it!==null&&!Dn();)c2(it)}function c2(t){var n=Cv(t.alternate,t,or);t.memoizedProps=t.pendingProps,n===null?Uu(t):it=n}function u2(t){var n=t,l=n.alternate;switch(n.tag){case 15:case 0:n=yv(l,n,n.pendingProps,n.type,void 0,st);break;case 11:n=yv(l,n,n.pendingProps,n.type.render,n.ref,st);break;case 5:nh(n);var s=n;s===fn&&(nt?(Wc(s),s.tag===5&&s.stateNode!=null&&(At=s.stateNode)):(Wc(s),nt=!0));default:Ev(l,n),n=it=Wg(n,or),n=Cv(l,n,or)}t.memoizedProps=t.pendingProps,n===null?Uu(t):it=n}function Po(t,n,l,s){tr=Nl=null,nh(n),Co=null,Ds=0;var h=n.return;try{if(k6(t,h,n,l,st)){Ft=1,xu(t,La(l,t.current)),it=null;return}}catch(g){if(h!==null)throw it=h,g;Ft=1,xu(t,La(l,t.current)),it=null;return}n.flags&32768?(nt||s===1?t=!0:Do||(st&536870912)!==0?t=!1:(Fr=t=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),d2(n,t)):Uu(n)}function Uu(t){var n=t;do{if((n.flags&32768)!==0){d2(n,Fr);return}t=n.return;var l=T6(n.alternate,n,or);if(l!==null){it=l;return}if(n=n.sibling,n!==null){it=n;return}it=n=t}while(n!==null);Ft===0&&(Ft=5)}function d2(t,n){do{var l=A6(t.alternate,t);if(l!==null){l.flags&=32767,it=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(t=t.sibling,t!==null)){it=t;return}it=t=l}while(t!==null);Ft=6,it=null}function f2(t,n,l,s,h,g,N,O,X,ie,de,ye){t.cancelPendingCommit=null;do qu();while(Ht!==0);if((yt&6)!==0)throw Error(r(327));if(n!==null){if(n===t.current)throw Error(r(177));t===Nt&&(it=Nt=null,st=0),Hl=n,ai=t,Ti=l,Yh=h,t2=s,I6(t,n,l,N,O,X,ye)}}function I6(t,n,l,s,h,g,N){var O=n.lanes|n.childLanes;if(Gh=O,O|=_f,pi(t,l,O,s,h,g),Lo=null,(l&335544064)===l?(Bo=f6(t),s=10262):(Bo=null,s=10256),(n.subtreeFlags&s)!==0||(n.flags&s)!==0?(t.callbackNode=null,t.callbackPriority=0,V6(bn,function(){return Wh(),null})):(t.callbackNode=null,t.callbackPriority=0),Eu=!1,s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=se.T,se.T=null,h=me.p,me.p=2,g=yt,yt|=4;try{_6(t,n,l)}finally{yt=g,me.p=h,se.T=s}}Ht=1,Eu?zo=uk(N,t.containerInfo,Bo,Qh,Zh,P6,Jh,Wh,H6):(Qh(),Zh(),Jh())}function H6(t){if(Ht!==0){var n=ai.onRecoverableError;n(t,{componentStack:null})}}function P6(){Ht===3&&(Ht=0,Xv(Hl,ai),Ht=4)}function Qh(){if(Ht===1){Ht=0;var t=ai,n=Hl,l=Ti,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=se.T,se.T=null;var h=me.p;me.p=2;var g=yt;yt|=4;try{$s=_u=!1,Gv(n,t,l),l=dm;var N=Fg(t.containerInfo),O=l.focusedElem,X=l.selectionRange;if(N!==O&&O&&O.ownerDocument&&qg(O.ownerDocument.documentElement,O)){if(X!==null&&Cf(O)){var ie=X.start,de=X.end;if(de===void 0&&(de=ie),"selectionStart"in O)O.selectionStart=ie,O.selectionEnd=Math.min(de,O.value.length);else{var ye=O.ownerDocument||document,te=ye&&ye.defaultView||window;if(te.getSelection){var oe=te.getSelection(),Ne=O.textContent.length,Oe=Math.min(X.start,Ne),Je=X.end===void 0?Oe:Math.min(X.end,Ne);!oe.extend&&Oe>Je&&(N=Je,Je=Oe,Oe=N);var ae=Ug(O,Oe),Z=Ug(O,Je);if(ae&&Z&&(oe.rangeCount!==1||oe.anchorNode!==ae.node||oe.anchorOffset!==ae.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var re=ye.createRange();re.setStart(ae.node,ae.offset),oe.removeAllRanges(),Oe>Je?(oe.addRange(re),oe.extend(Z.node,Z.offset)):(re.setEnd(Z.node,Z.offset),oe.addRange(re))}}}}for(ye=[],oe=O;oe=oe.parentNode;)oe.nodeType===1&&ye.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ye.length;O++){var ve=ye[O];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}Xo=!!um,dm=um=null}finally{yt=g,me.p=h,se.T=s}}t.current=n,Ht=2}}function Zh(){if(Ht===2){Ht=0;var t=ai,n=Hl,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=se.T,se.T=null;var s=me.p;me.p=2;var h=yt;yt|=4;try{Pv(t,n.alternate,n)}finally{yt=h,me.p=s,se.T=l}}Ht=3}}function Jh(){if(Ht===4||Ht===3){Ht=0;var t=zo;zo=null,Ye();var n=ai,l=Hl,s=Ti,h=t2,g=(s&335544064)===s?10262:10256;if((l.subtreeFlags&g)!==0||(l.flags&g)!==0?Ht=5:(Ht=0,Hl=ai=null,h2(n,n.pendingLanes)),g=n.pendingLanes,g===0&&($r=null),Wn(s),l=l.stateNode,cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(Ka,l,void 0,(l.current.flags&128)===128)}catch{}if(h!==null){l=se.T,g=me.p,me.p=2,se.T=null;try{for(var N=n.onRecoverableError,O=0;O<h.length;O++){var X=h[O];N(X.value,{componentStack:X.stack})}}finally{se.T=l,me.p=g}}if(h=Lo,N=Bo,Bo=null,h!==null&&(Lo=null,N===null&&(N=[]),t!==null))for(X=0;X<h.length;X++)l=(0,h[X])(N),l!==void 0&&t.finished.finally(l);(Ti&3)!==0&&qu(),Ai(n),g=n.pendingLanes,(s&261930)!==0&&(g&42)!==0?n===Iu?Ks++:(Ks=0,Iu=n):(Ks=0,Iu=null),Qs(0)}}function h2(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,_s(n)))}function qu(){return zo!==null&&(zo.skipTransition(),zo=null),Qh(),Zh(),Jh(),Wh()}function Wh(){if(Ht!==5)return!1;var t=ai,n=Gh;Gh=0;var l=Wn(Ti),s=se.T,h=me.p;try{me.p=32>l?32:l,se.T=null,l=Yh,Yh=null;var g=ai,N=Ti;if(Ht=0,Hl=ai=null,Ti=0,(yt&6)!==0)throw Error(r(331));var O=yt;if(yt|=4,Jv(g.current),Kv(g,g.current,N,l),yt=O,Qs(0,!1),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(Ka,g)}catch{}return!0}finally{me.p=h,se.T=s,h2(t,n)}}function m2(t,n,l){n=La(l,n),n=gh(t.stateNode,n,2),t=Br(t,n,2),t!==null&&(Zn(t,2),Ai(t))}function jt(t,n,l){if(t.tag===3)m2(t,t,l);else for(;n!==null;){if(n.tag===3){m2(n,t,l);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&($r===null||!$r.has(s))){t=La(l,t),l=uv(2),s=Br(n,l,2),s!==null&&(dv(l,s,n,t),Zn(s,2),Ai(s));break}}n=n.return}}function em(t,n,l){var s=t.pingCache;if(s===null){s=t.pingCache=new D6;var h=new Set;s.set(n,h)}else h=s.get(n),h===void 0&&(h=new Set,s.set(n,h));h.has(l)||(Vh=!0,h.add(l),t=U6.bind(null,t,n,l),n.then(t,t))}function U6(t,n,l){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Nt===t&&(st&l)===l&&((Ft===4||Ft===3&&(st&62914560)===st&&300>Xt()-zu)&&(yt&2)===0?Ho(t,0):Ou|=l,Oo===st&&(Oo=0)),Ai(t)}function p2(t,n){n===0&&(n=ya()),t=Sl(t,n),t!==null&&(Zn(t,n),Ai(t))}function q6(t){var n=t.memoizedState,l=0;n!==null&&(l=n.retryLane),p2(t,l)}function F6(t,n){var l=0;switch(t.tag){case 31:case 13:var s=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),p2(t,l)}function V6(t,n){return Un(t,n)}var Uo=null,qo=null,tm=!1,Fu=!1,nm=!1,Yr=0;function Ai(t){t!==qo&&t.next===null&&(qo===null?Uo=qo=t:qo=qo.next=t),Fu=!0,tm||(tm=!0,G6())}function Qs(t,n){if(!nm&&Fu){nm=!0;do for(var l=!1,s=Uo;s!==null;){if(t!==0){var h=s.pendingLanes;if(h===0)var g=0;else{var N=s.suspendedLanes,O=s.pingedLanes;g=(1<<31-$t(42|t)+1)-1,g&=h&~(N&~O),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(l=!0,x2(s,g))}else g=st,g=ga(s,s===Nt?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||va(s,g)||(l=!0,x2(s,g));s=s.next}while(l);nm=!1}}function $6(){g2()}function g2(){Fu=tm=!1;var t=0;Yr!==0&&ak()&&(t=Yr);for(var n=Xt(),l=null,s=Uo;s!==null;){var h=s.next,g=v2(s,n);g===0?(s.next=null,l===null?Uo=h:l.next=h,h===null&&(qo=l)):(l=s,(t!==0||(g&3)!==0)&&(Fu=!0)),s=h}Ht!==0&&Ht!==5||Qs(t),Yr!==0&&(Yr=0)}function v2(t,n){for(var l=t.suspendedLanes,s=t.pingedLanes,h=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var N=31-$t(g),O=1<<N,X=h[N];X===-1?((O&l)===0||(O&s)!==0)&&(h[N]=ml(O,n)):X<=n&&(t.expiredLanes|=O),g&=~O}if(n=Nt,l=st,l=ga(t,t===n?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,l===0||t===n&&(bt===2||bt===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Dt(s),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||va(t,l)){if(n=l&-l,n===t.callbackPriority)return n;switch(s!==null&&Dt(s),Wn(l)){case 2:case 8:l=di;break;case 32:l=bn;break;case 268435456:l=hl;break;default:l=bn}return s=y2.bind(null,t),l=Un(l,s),t.callbackPriority=n,t.callbackNode=l,n}return s!==null&&s!==null&&Dt(s),t.callbackPriority=2,t.callbackNode=null,2}function y2(t,n){if(Ht!==0&&Ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(qu()&&t.callbackNode!==l)return null;var s=st;return s=ga(t,t===Nt?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(a2(t,s,n),v2(t,Xt()),t.callbackNode!=null&&t.callbackNode===l?y2.bind(null,t):null)}function x2(t,n){if(qu())return null;a2(t,n,!0)}function G6(){rk(function(){(yt&6)!==0?Un(ui,$6):g2()})}function am(){if(Yr===0){var t=Al;t===0&&(t=Za,Za<<=1,(Za&261888)===0&&(Za=256)),Yr=t}return Yr}function b2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:wn(t)}function Y6(t,n,l,s,h){if(n==="submit"&&l&&l.stateNode===h){var g=b2((h[Gt]||null).action),N=s.submitter;N&&(n=(n=N[Gt]||null)?b2(n.formAction):N.getAttribute("formAction"),n!==null&&(g=n,N=null));var O=new Fc("action","action",null,s,h);t.push({event:O,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Yr!==0){var X=new FormData(h,N);dh(l,{pending:!0,data:X,method:h.method,action:g},null,X)}}else typeof g=="function"&&(O.preventDefault(),X=new FormData(h,N),dh(l,{pending:!0,data:X,method:h.method,action:g},g,X))},currentTarget:h}]})}}for(var im=0;im<Af.length;im++){var rm=Af[im],X6=rm.toLowerCase(),K6=rm[0].toUpperCase()+rm.slice(1);Wa(X6,"on"+K6)}Wa(Gg,"onAnimationEnd"),Wa(Yg,"onAnimationIteration"),Wa(Xg,"onAnimationStart"),Wa("dblclick","onDoubleClick"),Wa("focusin","onFocus"),Wa("focusout","onBlur"),Wa(i6,"onTransitionRun"),Wa(r6,"onTransitionStart"),Wa(l6,"onTransitionCancel"),Wa(Kg,"onTransitionEnd"),Be("onMouseEnter",["mouseout","mouseover"]),Be("onMouseLeave",["mouseout","mouseover"]),Be("onPointerEnter",["pointerout","pointerover"]),Be("onPointerLeave",["pointerout","pointerover"]),Me("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Me("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Me("onBeforeInput",["compositionend","keypress","textInput","paste"]),Me("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Me("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Me("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zs="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(" "),Q6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zs));function j2(t,n){n=(n&4)!==0;for(var l=0;l<t.length;l++){var s=t[l],h=s.event;s=s.listeners;e:{var g=void 0;if(n)for(var N=s.length-1;0<=N;N--){var O=s[N],X=O.instance,ie=O.currentTarget;if(O=O.listener,X!==g&&h.isPropagationStopped())break e;g=O,h.currentTarget=ie;try{g(h)}catch(de){Gc(de)}h.currentTarget=null,g=X}else for(N=0;N<s.length;N++){if(O=s[N],X=O.instance,ie=O.currentTarget,O=O.listener,X!==g&&h.isPropagationStopped())break e;g=O,h.currentTarget=ie;try{g(h)}catch(de){Gc(de)}h.currentTarget=null,g=X}}}}function rt(t,n){var l=n[pl];l===void 0&&(l=n[pl]=new Set);var s=t+"__bubble";l.has(s)||(w2(n,t,2,!1),l.add(s))}function lm(t,n,l){var s=0;n&&(s|=4),w2(l,t,s,n)}var Vu="_reactListening"+Math.random().toString(36).slice(2);function om(t){if(!t[Vu]){t[Vu]=!0,Ae.forEach(function(l){l!=="selectionchange"&&(Q6.has(l)||lm(l,!1,t),lm(l,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Vu]||(n[Vu]=!0,lm("selectionchange",!1,n))}}function w2(t,n,l,s){switch(dy(n)){case 2:var h=qk;break;case 8:h=Fk;break;default:h=Em}l=h.bind(null,n,l,t),h=void 0,!bl||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),s?h!==void 0?t.addEventListener(n,l,{capture:!0,passive:h}):t.addEventListener(n,l,!0):h!==void 0?t.addEventListener(n,l,{passive:h}):t.addEventListener(n,l,!1)}function sm(t,n,l,s,h){var g=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var N=s.tag;if(N===3||N===4){var O=s.stateNode.containerInfo;if(O===h)break;if(N===4)for(N=s.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===h)return;N=N.return}for(;O!==null;){if(N=ta(O),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){s=g=N;continue e}O=O.parentNode}}s=s.return}xl(function(){var ie=g,de=yl(l),ye=[];e:{var te=Qg.get(t);if(te!==void 0){var oe=Fc,Ne=t;switch(t){case"keypress":if(Uc(l)===0)break e;case"keydown":case"keyup":oe=O5;break;case"focusin":Ne="focus",oe=xf;break;case"focusout":Ne="blur",oe=xf;break;case"beforeblur":case"afterblur":oe=xf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=Cg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=w5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=H5;break;case Gg:case Yg:case Xg:oe=C5;break;case Kg:oe=U5;break;case"scroll":case"scrollend":oe=b5;break;case"wheel":oe=F5;break;case"copy":case"cut":case"paste":oe=E5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Eg;break;case"submit":oe=B5;break;case"toggle":case"beforetoggle":oe=$5}var Oe=(n&4)!==0,Je=!Oe&&(t==="scroll"||t==="scrollend"),ae=Oe?te!==null?te+"Capture":null:te;Oe=[];for(var Z=ie,re;Z!==null;){var ve=Z;if(re=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||re===null||ae===null||(ve=Qi(Z,ae),ve!=null&&Oe.push(Js(Z,ve,re))),Je)break;Z=Z.return}0<Oe.length&&(te=new oe(te,Ne,null,l,de),ye.push({event:te,listeners:Oe}))}}if((n&7)===0){e:{if(oe=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",oe&&l!==vl&&(Ne=l.relatedTarget||l.fromElement)&&(ta(Ne)||Ne[jn]))break e;(te||oe)&&(Ne=de.window===de?de:(oe=de.ownerDocument)?oe.defaultView||oe.parentWindow:window,te?(oe=l.relatedTarget||l.toElement,te=ie,oe=oe?ta(oe):null,oe!==null&&(Je=u(oe),Oe=oe.tag,oe!==Je||Oe!==5&&Oe!==27&&Oe!==6)&&(oe=null)):(te=null,oe=ie),te!==oe&&(Oe=Cg,ve="onMouseLeave",ae="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(Oe=Eg,ve="onPointerLeave",ae="onPointerEnter",Z="pointer"),Je=te==null?Ne:ce(te),re=oe==null?Ne:ce(oe),Ne=new Oe(ve,Z+"leave",te,l,de),Ne.target=Je,Ne.relatedTarget=re,ve=null,ta(de)===ie&&(Oe=new Oe(ae,Z+"enter",oe,l,de),Oe.target=re,Oe.relatedTarget=Je,ve=Oe),Je=ve,Oe=te&&oe?A(te,oe,Z6):null,te!==null&&S2(ye,Ne,te,Oe,!1),oe!==null&&Je!==null&&S2(ye,Je,oe,Oe,!0)))}e:{if(te=ie?ce(ie):window,oe=te.nodeName&&te.nodeName.toLowerCase(),oe==="select"||oe==="input"&&te.type==="file")var De=zg;else if(Dg(te))if(Lg)De=t6;else{De=W5;var ct=J5}else oe=te.nodeName,!oe||oe.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ie&&gl(ie.elementType)&&(De=zg):De=e6;if(De&&(De=De(t,ie))){Og(ye,De,l,de);break e}ct&&ct(t,te,ie)}switch(ct=ie?ce(ie):window,t){case"focusin":(Dg(ct)||ct.contentEditable==="true")&&(go=ct,Nf=ie,Es=null);break;case"focusout":Es=Nf=go=null;break;case"mousedown":Ef=!0;break;case"contextmenu":case"mouseup":case"dragend":Ef=!1,Vg(ye,l,de);break;case"selectionchange":if(a6)break;case"keydown":case"keyup":Vg(ye,l,de)}var Ie;if(jf)e:{switch(t){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else po?Mg(t,l)&&(Fe="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Fe="onCompositionStart");Fe&&(Tg&&l.locale!=="ko"&&(po||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&po&&(Ie=Sg()):(Tr=de,gf="value"in Tr?Tr.value:Tr.textContent,po=!0)),ct=$u(ie,Fe),0<ct.length&&(Fe=new Ng(Fe,t,null,l,de),ye.push({event:Fe,listeners:ct}),Ie?Fe.data=Ie:(Ie=Rg(l),Ie!==null&&(Fe.data=Ie)))),(Ie=Y5?X5(t,l):K5(t,l))&&(Fe=$u(ie,"onBeforeInput"),0<Fe.length&&(ct=new Ng("onBeforeInput","beforeinput",null,l,de),ye.push({event:ct,listeners:Fe}),ct.data=Ie)),Y6(ye,t,ie,l,de)}j2(ye,n)})}function Js(t,n,l){return{instance:t,listener:n,currentTarget:l}}function $u(t,n){for(var l=n+"Capture",s=[];t!==null;){var h=t,g=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||g===null||(h=Qi(t,l),h!=null&&s.unshift(Js(t,h,g)),h=Qi(t,n),h!=null&&s.push(Js(t,h,g))),t.tag===3)return s;t=t.return}return[]}function Z6(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function S2(t,n,l,s,h){for(var g=n._reactName,N=[];l!==null&&l!==s;){var O=l,X=O.alternate,ie=O.stateNode;if(O=O.tag,X!==null&&X===s)break;O!==5&&O!==26&&O!==27||ie===null||(X=ie,h?(ie=Qi(l,g),ie!=null&&N.unshift(Js(l,ie,X))):h||(ie=Qi(l,g),ie!=null&&N.push(Js(l,ie,X)))),l=l.return}N.length!==0&&t.push({event:n,listeners:N})}var J6=/\r\n?/g,W6=/\u0000|\uFFFD/g;function k2(t){return(typeof t=="string"?t:""+t).replace(J6,`
49
+ `).replace(W6,"")}function C2(t,n){return n=k2(n),k2(t)===n}function wt(t,n,l,s,h,g){switch(l){case"children":if(typeof s=="string")n==="body"||n==="textarea"&&s===""||qn(t,s);else if(typeof s=="number"||typeof s=="bigint")n!=="body"&&qn(t,""+s);else return;break;case"className":xa(t,"class",s);break;case"tabIndex":xa(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":xa(t,l,s);break;case"style":ja(t,s,g);return;case"data":if(n!=="object"){xa(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||l!=="href")){t.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=wn(s),t.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(l,"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 g=="function"&&(l==="formAction"?(n!=="input"&&wt(t,n,"name",h.name,h,null),wt(t,n,"formEncType",h.formEncType,h,null),wt(t,n,"formMethod",h.formMethod,h,null),wt(t,n,"formTarget",h.formTarget,h,null)):(wt(t,n,"encType",h.encType,h,null),wt(t,n,"method",h.method,h,null),wt(t,n,"target",h.target,h,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(l);break}s=wn(s),t.setAttribute(l,s);break;case"onClick":s!=null&&(t.onclick=Fn);return;case"onScroll":s!=null&&rt("scroll",t);return;case"onScrollEnd":s!=null&&rt("scrollend",t);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(h.children!=null)throw Error(r(60));(g!=null?g.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}l=wn(s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,s):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":s===!0?t.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(l,s):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(l,s):t.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(l):t.setAttribute(l,s);break;case"popover":rt("beforetoggle",t),rt("toggle",t),It(t,"popover",s);break;case"xlinkActuate":Kt(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Kt(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Kt(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Kt(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Kt(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Kt(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Kt(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":It(t,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=ys.get(l)||l,It(t,l,s);else return}Pe=!0}function cm(t,n,l,s,h,g){switch(l){case"style":ja(t,s,g);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(h.children!=null)throw Error(r(60));(g!=null?g.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof s=="string")qn(t,s);else if(typeof s=="number"||typeof s=="bigint")qn(t,""+s);else return;break;case"onScroll":s!=null&&rt("scroll",t);return;case"onScrollEnd":s!=null&&rt("scrollend",t);return;case"onClick":s!=null&&(t.onclick=Fn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ke.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),g=l.slice(2,h?l.length-7:void 0),n=t[Gt]||null,n=n!=null?n[l]:null,typeof n=="function"&&t.removeEventListener(g,n,h),typeof s=="function")){typeof n!="function"&&n!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(g,s,h);break e}Pe=!0,l in t?t[l]=s:s===!0?t.setAttribute(l,""):It(t,l,s)}return}Pe=!0}function Tn(t,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",t),rt("load",t);var s=!1,h=!1,g;for(g in l)if(l.hasOwnProperty(g)){var N=l[g];if(N!=null)switch(g){case"src":s=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:wt(t,n,g,N,l,null)}}h&&wt(t,n,"srcSet",l.srcSet,l,null),s&&wt(t,n,"src",l.src,l,null);return;case"input":rt("invalid",t);var O=g=N=h=null,X=null,ie=null;for(s in l)if(l.hasOwnProperty(s)){var de=l[s];if(de!=null)switch(s){case"name":h=de;break;case"type":N=de;break;case"checked":X=de;break;case"defaultChecked":ie=de;break;case"value":g=de;break;case"defaultValue":O=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,n));break;default:wt(t,n,s,de,l,null)}}Nr(t,g,O,X,ie,N,h,!1);return;case"select":rt("invalid",t),s=N=g=null;for(h in l)if(l.hasOwnProperty(h)&&(O=l[h],O!=null))switch(h){case"value":g=O;break;case"defaultValue":N=O;break;case"multiple":s=O;default:wt(t,n,h,O,l,null)}n=g,l=N,t.multiple=!!s,n!=null?na(t,!!s,n,!1):l!=null&&na(t,!!s,l,!0);return;case"textarea":rt("invalid",t),g=h=s=null;for(N in l)if(l.hasOwnProperty(N)&&(O=l[N],O!=null))switch(N){case"value":s=O;break;case"defaultValue":h=O;break;case"children":g=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:wt(t,n,N,O,l,null)}ba(t,s,h,g);return;case"option":for(X in l)if(l.hasOwnProperty(X)&&(s=l[X],s!=null))switch(X){case"selected":t.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:wt(t,n,X,s,l,null)}return;case"dialog":rt("beforetoggle",t),rt("toggle",t),rt("cancel",t),rt("close",t);break;case"iframe":case"object":rt("load",t);break;case"video":case"audio":for(s=0;s<Zs.length;s++)rt(Zs[s],t);break;case"image":rt("error",t),rt("load",t);break;case"details":rt("toggle",t);break;case"embed":case"source":case"link":rt("error",t),rt("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(ie in l)if(l.hasOwnProperty(ie)&&(s=l[ie],s!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:wt(t,n,ie,s,l,null)}return;default:if(gl(n)){for(de in l)l.hasOwnProperty(de)&&(s=l[de],s!==void 0&&cm(t,n,de,s,l,void 0));return}}for(O in l)l.hasOwnProperty(O)&&(s=l[O],s!=null&&wt(t,n,O,s,l,null))}var ek={};function tk(t,n,l,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,g=null,N=null,O=null,X=null,ie=null,de=null;for(oe in l){var ye=l[oe];if(l.hasOwnProperty(oe)&&ye!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=ye;default:s.hasOwnProperty(oe)||wt(t,n,oe,null,s,ye)}}for(var te in s){var oe=s[te];if(ye=l[te],s.hasOwnProperty(te)&&(oe!=null||ye!=null))switch(te){case"type":oe!==ye&&(Pe=!0),g=oe;break;case"name":oe!==ye&&(Pe=!0),h=oe;break;case"checked":oe!==ye&&(Pe=!0),ie=oe;break;case"defaultChecked":oe!==ye&&(Pe=!0),de=oe;break;case"value":oe!==ye&&(Pe=!0),N=oe;break;case"defaultValue":oe!==ye&&(Pe=!0),O=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,n));break;default:oe!==ye&&wt(t,n,te,oe,s,ye)}}zn(t,N,O,X,ie,de,g,h);return;case"select":oe=N=O=te=null;for(g in l)if(X=l[g],l.hasOwnProperty(g)&&X!=null)switch(g){case"value":break;case"multiple":oe=X;default:s.hasOwnProperty(g)||wt(t,n,g,null,s,X)}for(h in s)if(g=s[h],X=l[h],s.hasOwnProperty(h)&&(g!=null||X!=null))switch(h){case"value":g!==X&&(Pe=!0),te=g;break;case"defaultValue":g!==X&&(Pe=!0),O=g;break;case"multiple":g!==X&&(Pe=!0),N=g;default:g!==X&&wt(t,n,h,g,s,X)}n=O,l=N,s=oe,te!=null?na(t,!!l,te,!1):!!s!=!!l&&(n!=null?na(t,!!l,n,!0):na(t,!!l,l?[]:"",!1));return;case"textarea":oe=te=null;for(O in l)if(h=l[O],l.hasOwnProperty(O)&&h!=null&&!s.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:wt(t,n,O,null,s,h)}for(N in s)if(h=s[N],g=l[N],s.hasOwnProperty(N)&&(h!=null||g!=null))switch(N){case"value":h!==g&&(Pe=!0),te=h;break;case"defaultValue":h!==g&&(Pe=!0),oe=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==g&&wt(t,n,N,h,s,g)}mo(t,te,oe);return;case"option":for(var Ne in l)if(te=l[Ne],l.hasOwnProperty(Ne)&&te!=null&&!s.hasOwnProperty(Ne))switch(Ne){case"selected":t.selected=!1;break;default:wt(t,n,Ne,null,s,te)}for(X in s)if(te=s[X],oe=l[X],s.hasOwnProperty(X)&&te!==oe&&(te!=null||oe!=null))switch(X){case"selected":te!==oe&&(Pe=!0),t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:wt(t,n,X,te,s,oe)}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 Oe in l)te=l[Oe],l.hasOwnProperty(Oe)&&te!=null&&!s.hasOwnProperty(Oe)&&wt(t,n,Oe,null,s,te);for(ie in s)if(te=s[ie],oe=l[ie],s.hasOwnProperty(ie)&&te!==oe&&(te!=null||oe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,n));break;default:wt(t,n,ie,te,s,oe)}return;default:if(gl(n)){for(var Je in l)te=l[Je],l.hasOwnProperty(Je)&&te!==void 0&&!s.hasOwnProperty(Je)&&cm(t,n,Je,void 0,s,te);for(de in s)te=s[de],oe=l[de],!s.hasOwnProperty(de)||te===oe||te===void 0&&oe===void 0||cm(t,n,de,te,s,oe);return}}for(var ae in l)te=l[ae],l.hasOwnProperty(ae)&&te!=null&&!s.hasOwnProperty(ae)&&wt(t,n,ae,null,s,te);for(ye in s)te=s[ye],oe=l[ye],!s.hasOwnProperty(ye)||te===oe||te==null&&oe==null||wt(t,n,ye,te,s,oe)}function N2(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var h=l[s],g=h.transferSize,N=h.initiatorType,O=h.duration;if(g&&O&&N2(N)){for(N=0,O=h.responseEnd,s+=1;s<l.length;s++){var X=l[s],ie=X.startTime;if(ie>O)break;var de=X.transferSize,ye=X.initiatorType;de&&N2(ye)&&(X=X.responseEnd,N+=de*(X<O?1:(O-ie)/(X-ie)))}if(--s,n+=8*(g+N)/(h.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 um=null,dm=null;function Ws(t){return t.nodeType===9?t:t.ownerDocument}function E2(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 T2(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 A2(t,n,l,s){return l=Ws(l).createElement(t),l[Mt]=s,l[Gt]=n,Tn(l,t,n),Q(l),l}function fm(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 hm=null;function ak(){var t=window.event;return t&&t.type==="popstate"?t===hm?!1:(hm=t,!0):(hm=null,!1)}var mm=typeof setTimeout=="function"?setTimeout:void 0,ik=typeof clearTimeout=="function"?clearTimeout:void 0,_2=typeof Promise=="function"?Promise:void 0,M2=typeof requestAnimationFrame=="function"?requestAnimationFrame:mm,rk=typeof queueMicrotask=="function"?queueMicrotask:typeof _2<"u"?function(t){return _2.resolve(null).then(t).catch(lk)}:mm;function lk(t){setTimeout(function(){throw t})}function Xr(t){return t==="head"}function R2(t,n){var l=n,s=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(s===0){t.removeChild(h),Ko(n);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")wm(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,wm(l);for(var g=l.firstChild;g;){var N=g.nextSibling,O=g.nodeName;g[yi]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&g.rel.toLowerCase()==="stylesheet"||l.removeChild(g),g=N}}else l==="body"&&wm(t.ownerDocument.body);l=h}while(l);Ko(n)}function D2(t,n){var l=t;t=0;do{var s=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=s}while(l)}function O2(t,n,l){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,t.style.viewTransitionName=n,l!=null&&(t.style.viewTransitionClass=l),l=getComputedStyle(t),l.display==="inline"){if(n=t.getClientRects(),n.length===1)var s=1;else for(var h=s=0;h<n.length;h++){var g=n[h];0<g.width&&0<g.height&&s++}s===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function z2(t,n){t=t.style,n=n.style;var l=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;t.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,t.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),t.display==="inline-block"&&(n==null?t.display=t.margin="":(l=n.display,t.display=l==null||typeof l=="boolean"?"":l,l=n.margin,l!=null?t.margin=l:(l=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],t.marginTop=l==null||typeof l=="boolean"?"":l,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],t.marginBottom=n==null||typeof n=="boolean"?"":n)))}function ok(t,n,l){return l=l.ownerDocument.defaultView,{rect:t,abs:n.position==="absolute"||n.position==="fixed",clip:n.clipPath!=="none"||n.overflow!=="visible"||n.filter!=="none"||n.mask!=="none"||n.mask!=="none"||n.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=l.innerHeight&&t.left<=l.innerWidth}}function pm(t){var n=t.getBoundingClientRect(),l=getComputedStyle(t);return ok(n,l,t)}function sk(t){return t.documentElement.clientHeight}function ck(t){this.addEventListener("load",t),this.addEventListener("error",t)}function uk(t,n,l,s,h,g,N,O,X){var ie=n.nodeType===9?n:n.ownerDocument;try{var de=ie.startViewTransition({update:function(){var te=ie.defaultView,oe=te.navigation&&te.navigation.transition,Ne=ie.fonts.status;s();var Oe=[];if(Ne==="loaded"&&(sk(ie),ie.fonts.status==="loading"&&Oe.push(ie.fonts.ready)),Ne=Oe.length,t!==null)for(var Je=t.suspenseyImages,ae=0,Z=0;Z<Je.length;Z++){var re=Je[Z];if(!re.complete){var ve=re.getBoundingClientRect();if(0<ve.bottom&&0<ve.right&&ve.top<te.innerHeight&&ve.left<te.innerWidth){if(ae+=ny(re),ae>Xu){Oe.length=Ne;break}re=new Promise(ck.bind(re)),Oe.push(re)}}}if(0<Oe.length)return te=Promise.race([Promise.all(Oe),new Promise(function(De){return setTimeout(De,500)})]).then(h,h),(oe?Promise.allSettled([oe.finished,te]):te).then(g,g);if(h(),oe)return oe.finished.then(g,g);g()},types:l});ie.__reactViewTransition=de;var ye=[];return de.ready.then(function(){for(var te=ie.documentElement.getAnimations({subtree:!0}),oe=0;oe<te.length;oe++){var Ne=te[oe],Oe=Ne.effect,Je=Oe.pseudoElement;if(Je!=null&&Je.startsWith("::view-transition")){ye.push(Ne),Ne=Oe.getKeyframes();for(var ae=Je=void 0,Z=!0,re=0;re<Ne.length;re++){var ve=Ne[re],De=ve.width;if(Je===void 0)Je=De;else if(Je!==De){Z=!1;break}if(De=ve.height,ae===void 0)ae=De;else if(ae!==De){Z=!1;break}delete ve.width,delete ve.height,ve.transform==="none"&&delete ve.transform}Z&&Je!==void 0&&ae!==void 0&&(Oe.setKeyframes(Ne),Z=getComputedStyle(Oe.target,Oe.pseudoElement),Z.width!==Je||Z.height!==ae)&&(Z=Ne[0],Z.width=Je,Z.height=ae,Z=Ne[Ne.length-1],Z.width=Je,Z.height=ae,Oe.setKeyframes(Ne))}}N()},function(te){ie.__reactViewTransition===de&&(ie.__reactViewTransition=null);try{if(typeof te=="object"&&te!==null)switch(te.name){case"InvalidStateError":(te.message==="View transition was skipped because document visibility state is hidden."||te.message==="Skipping view transition because document visibility state has become hidden."||te.message==="Skipping view transition because viewport size changed."||te.message==="Transition was aborted because of invalid state")&&(te=null)}te!==null&&X(te)}finally{s(),h(),N()}}),de.finished.finally(function(){for(var te=0;te<ye.length;te++)ye[te].cancel();ie.__reactViewTransition===de&&(ie.__reactViewTransition=null),O()}),de}catch{return s(),h(),N(),null}}function Pl(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}Pl.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:H({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},Pl.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,l=t.getAnimations({subtree:!0}),s=[],h=0;h<l.length;h++){var g=l[h].effect;g!==null&&g.target===t&&g.pseudoElement===n&&s.push(l[h])}return s},Pl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function L2(t){return{name:t,group:new Pl("group",t),imagePair:new Pl("image-pair",t),old:new Pl("old",t),new:new Pl("new",t)}}function Aa(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Aa.prototype.addEventListener=function(t,n,l){var s=null,h=null;if(!(l!=null&&typeof l!="boolean"&&(s=l.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var g=this._eventListeners;if(I2(g,t,n,l)===-1){var N=this,O=n;l!=null&&typeof l!="boolean"&&l.once===!0&&(O=function(X){N.removeEventListener(t,n,l),typeof n=="function"?n.call(this,X):n.handleEvent(X)}),s!==null&&(h=N.removeEventListener.bind(N,t,n,l),s.addEventListener("abort",h,{once:!0}),h=s.removeEventListener.bind(s,"abort",h)),s=Fo(l),g.push({type:t,listener:n,optionsOrUseCapture:l,attachedListener:O,cleanup:h}),p(this._fragmentFiber.child,!1,dk,t,O,s)}this._eventListeners=g}};function dk(t,n,l,s){return C(t).addEventListener(n,l,s),!1}Aa.prototype.removeEventListener=function(t,n,l){var s=this._eventListeners;if(s!==null&&(n=I2(s,t,n,l),n!==-1)){var h=s[n];l=h.attachedListener;var g=h.cleanup;h=Fo(h.optionsOrUseCapture),p(this._fragmentFiber.child,!1,fk,t,l,h),s.splice(n,1),g!==null&&g()}};function fk(t,n,l,s){return C(t).removeEventListener(n,l,s),!1}function Fo(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function B2(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function I2(t,n,l,s){if(t.length===0)return-1;s=B2(s);for(var h=0;h<t.length;h++){var g=t[h];if(g.type===n&&g.listener===l&&B2(g.optionsOrUseCapture)===s)return h}return-1}Aa.prototype.dispatchEvent=function(t){var n=b(this._fragmentFiber);if(n===null)return!0;n=C(n);var l=this._eventListeners;if(l!==null&&0<l.length||!t.bubbles){var s=n.nodeType===9?n.createComment(""):document.createTextNode("");if(l)for(var h=0;h<l.length;h++){var g=l[h];s.addEventListener(g.type,g.attachedListener,Fo(g.optionsOrUseCapture))}if(n.appendChild(s),t=s.dispatchEvent(t),l)for(h=0;h<l.length;h++)g=l[h],s.removeEventListener(g.type,g.attachedListener,Fo(g.optionsOrUseCapture));return n.removeChild(s),t}return n.dispatchEvent(t)},Aa.prototype.focus=function(t){p(this._fragmentFiber.child,!0,H2,t,void 0,void 0)};function H2(t,n){return t.tag===6?!1:(t=C(t),kk(t,n))}Aa.prototype.focusLast=function(t){var n=[];p(this._fragmentFiber.child,!0,gm,n,void 0,void 0);for(var l=n.length-1;0<=l&&!H2(n[l],t);l--);};function gm(t,n){return n.push(t),!1}Aa.prototype.blur=function(){var t=b(this._fragmentFiber);t!==null&&(t=C(t),t=Ws(t).activeElement,t!==null&&p(this._fragmentFiber.child,!1,hk,t,void 0,void 0))};function hk(t,n){return t.tag===6?!1:(t=C(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Aa.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),p(this._fragmentFiber.child,!1,mk,t,void 0,void 0)};function mk(t,n){return t.tag===6||(t=C(t),n.observe(t)),!1}Aa.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),p(this._fragmentFiber.child,!1,pk,t,void 0,void 0);for(var l=n=0;l<ii.length;l++){var s=ii[l];s.fragmentInstance===this&&s.observer===t?t.unobserve(s.instance):ii[n++]=s}ii.length=n}};function pk(t,n){return t.tag===6||(t=C(t),n.unobserve(t)),!1}var ii=[],vm=!1;function gk(t,n,l){ii.push({fragmentInstance:t,observer:n,instance:l}),vm||(vm=!0,Ck(function(){vm=!1;var s=ii;ii=[];for(var h=0;h<s.length;h++){var g=s[h];g.observer.unobserve(g.instance)}}))}Aa.prototype.getClientRects=function(){var t=[];return p(this._fragmentFiber.child,!1,vk,t,void 0,void 0),t};function vk(t,n){if(t.tag===6){t=t.stateNode;var l=t.ownerDocument.createRange();l.selectNodeContents(t),n.push.apply(n,l.getClientRects())}else t=C(t),n.push.apply(n,t.getClientRects());return!1}Aa.prototype.getRootNode=function(t){var n=b(this._fragmentFiber);return n===null?this:C(n).getRootNode(t)},Aa.prototype.compareDocumentPosition=function(t){var n=b(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];p(this._fragmentFiber.child,!1,gm,l,void 0,void 0);var s=C(n);if(l.length===0){if(l=s,j(this._fragmentFiber)){e:{for(n=this._fragmentFiber.return;n!==null;){if(n.tag===4){n=n.stateNode.containerInfo;break e}if(n.tag===3||n.tag===5||n.tag===27)break;n=n.return}n=null}n!=null&&(l=n)}n=this._fragmentFiber;var h=s=l.compareDocumentPosition(t);return l===t?h=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=S(n)[1],l===null?h=Node.DOCUMENT_POSITION_PRECEDING:(t=C(l).compareDocumentPosition(t),h=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),h|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}n=C(l[0]),h=C(l[l.length-1]);var g=j(this._fragmentFiber)?n.parentElement:s;if(g==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=g.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,g=g.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),O=h.compareDocumentPosition(t),X=N&Node.DOCUMENT_POSITION_CONTAINED_BY||O&Node.DOCUMENT_POSITION_CONTAINED_BY;return O=s&&g&&N&Node.DOCUMENT_POSITION_FOLLOWING&&O&Node.DOCUMENT_POSITION_PRECEDING,n=s&&n===t||g&&h===t||X||O?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&n===t||!g&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||yk(n,this._fragmentFiber,l[0],l[l.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function yk(t,n,l,s,h){var g=ta(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!g)e:{for(;g!==null;){if(g.tag===7&&(g===n||g.alternate===n)){l=!0;break e}g=g.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(g===null)return g=h.ownerDocument,h===g||h===g.documentElement||h===g.body;e:{for(g=n,n=b(n);g!==null;){if(!(g.tag!==5&&g.tag!==3&&g.tag!==27||g!==n&&g.alternate!==n)){g=!0;break e}g=g.return}g=!1}return g}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!g)&&!(n=g===l)&&(n=A(l,g,L),n===null?n=!1:(p(n,!0,T,g,l),g=E,E=null,n=g!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!g)&&!(n=g===s)&&(n=A(s,g,L),n===null?n=!1:(p(n,!0,_,g,s),g=E,M=E=null,n=g!==null)),n):!1}function P2(t,n){var l=t.ownerDocument.createRange();l.selectNodeContents(t),t=l.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,n?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Aa.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(r(566));var n=[];p(this._fragmentFiber.child,!1,gm,n,void 0,void 0);var l=t!==!1;if(n.length===0){var s=S(this._fragmentFiber);if(s=l?s[1]||s[0]||b(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){t=C(s),P2(t,l);return}if(s=C(s),s.nodeType!==9){if(s.nodeType===11){l="host"in s?s.host:null,l!==null&&l.scrollIntoView(t);return}s.scrollIntoView(t)}}for(s=l?n.length-1:0;s!==(l?-1:n.length);){var h=n[s];h.tag===6?(h=C(h),P2(h,l)):C(h).scrollIntoView(t),s+=l?-1:1}};function xk(t,n){return t=C(t),U2(t,n),!1}function U2(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function q2(t,n){var l=n._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var h=l[s];t.addEventListener(h.type,h.attachedListener,Fo(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(g){for(var N=0,O=0;O<ii.length;O++){var X=ii[O];(X.fragmentInstance!==n||X.observer!==g||X.instance!==t)&&(ii[N++]=X)}ii.length=N,g.observe(t)}),U2(t,n))}function bk(t,n){var l=n._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var h=l[s];t.removeEventListener(h.type,h.attachedListener,Fo(h.optionsOrUseCapture))}t.nodeType!==3&&(l=n._observers,l!==null&&l.forEach(function(g){typeof g.rootMargin=="string"?gk(n,g,t):g.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function ym(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ym(l),Xi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function jk(t,n,l,s){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[yi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Ua(t.nextSibling),t===null)break}return null}function wk(t,n,l){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ua(t.nextSibling),t===null))return null;return t}function F2(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ua(t.nextSibling),t===null))return null;return t}function xm(t){return t.data==="$?"||t.data==="$~"}function bm(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Sk(t,n){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||l.readyState!=="loading")n();else{var s=function(){n(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ua(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 jm=null;function V2(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(n===0)return Ua(t.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}t=t.nextSibling}return null}function $2(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return t;n--}else l!=="/$"&&l!=="/&"||n++}t=t.previousSibling}return null}function kk(t,n){function l(){s=!0}if(t.ownerDocument.activeElement===t)return!0;var s=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return s}function Ck(t){M2(function(){M2(function(n){return t(n)})})}function G2(t,n,l){switch(n=Ws(l),t){case"html":if(t=n.documentElement,!t)throw Error(r(452));return t;case"head":if(t=n.head,!t)throw Error(r(453));return t;case"body":if(t=n.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Y2(t,n,l){for(var s in l){var h=l[s];l.hasOwnProperty(s)&&h!=null&&wt(t,n,s,null,ek,h)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Fn&&(t.onclick=null),Xi(t)}function wm(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Xi(t)}var qa=new Map,X2=new Set;function ec(t){if(typeof t.getRootNode=="function"){var n=t.getRootNode();if(n.nodeType===9||n.nodeType===11)return n}return t.nodeType===9?t:t.ownerDocument}var sr=me.d;me.d={f:Nk,r:Ek,D:Tk,C:Ak,L:_k,m:Mk,X:Dk,S:Rk,M:Ok};function Nk(){var t=sr.f(),n=Hu();return t||n}function Ek(t){var n=xi(t);n!==null&&n.tag===5&&n.type==="form"?Q1(n):sr.r(t)}var Vo=typeof document>"u"?null:document;function K2(t,n,l){var s=Vo;if(s&&typeof n=="string"&&n){var h=Rt(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),X2.has(h)||(X2.add(h),t={rel:t,crossOrigin:l,href:n},s.querySelector(h)===null&&(n=s.createElement("link"),Tn(n,"link",t),Q(n),s.head.appendChild(n)))}}function Tk(t){sr.D(t),K2("dns-prefetch",t,null)}function Ak(t,n){sr.C(t,n),K2("preconnect",t,n)}function _k(t,n,l){sr.L(t,n,l);var s=Vo;if(s&&t&&n){var h='link[rel="preload"][as="'+Rt(n)+'"]';n==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Rt(l.imageSizes)+'"]')):h+='[href="'+Rt(t)+'"]';var g=h;switch(n){case"style":g=$o(t);break;case"script":g=Go(t)}if(!(qa.has(g)||(t=H({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:t,as:n},l),qa.set(g,t),s.querySelector(h)!==null||n==="style"&&s.querySelector(tc(g))||n==="script"&&s.querySelector(nc(g))))){var N=s.createElement("link");Tn(N,"link",t),n==="style"&&(N[Yi]=!0,N.onload=N.onerror=function(){he(N)}),Q(N),s.head.appendChild(N)}}}function Mk(t,n){sr.m(t,n);var l=Vo;if(l&&t){var s=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Rt(s)+'"][href="'+Rt(t)+'"]',g=h;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Go(t)}if(!qa.has(g)&&(t=H({rel:"modulepreload",href:t},n),qa.set(g,t),l.querySelector(h)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(nc(g)))return}s=l.createElement("link"),Tn(s,"link",t),Q(s),l.head.appendChild(s)}}}function Rk(t,n,l){sr.S(t,n,l);var s=Vo;if(s&&t){var h=B(s).hoistableStyles,g=$o(t);n=n||"default";var N=h.get(g);if(!N){var O={loading:0,preload:null};if(N=s.querySelector(tc(g)))O.loading=5;else{t=H({rel:"stylesheet",href:t,"data-precedence":n},l),(l=qa.get(g))&&Sm(t,l);var X=N=s.createElement("link");Q(X),Tn(X,"link",t),X._p=new Promise(function(ie,de){X.onload=ie,X.onerror=de}),X.addEventListener("load",function(){O.loading|=1}),X.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Gu(N,n,s)}N={type:"stylesheet",instance:N,count:1,state:O},h.set(g,N)}}}function Dk(t,n){sr.X(t,n);var l=Vo;if(l&&t){var s=B(l).hoistableScripts,h=Go(t),g=s.get(h);g||(g=l.querySelector(nc(h)),g||(t=H({src:t,async:!0},n),(n=qa.get(h))&&km(t,n),g=l.createElement("script"),Q(g),Tn(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function Ok(t,n){sr.M(t,n);var l=Vo;if(l&&t){var s=B(l).hoistableScripts,h=Go(t),g=s.get(h);g||(g=l.querySelector(nc(h)),g||(t=H({src:t,async:!0,type:"module"},n),(n=qa.get(h))&&km(t,n),g=l.createElement("script"),Q(g),Tn(g,"link",t),l.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(h,g))}}function Q2(t,n,l,s){var h=(h=yn.current)?ec(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=$o(l.href),n=B(h).hoistableStyles,s=n.get(l),s||(s={type:"style",instance:null,count:0,state:null},n.set(l,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=$o(l.href);var g=B(h).hoistableStyles,N=g.get(t);if(N||(h=h.ownerDocument||h,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,N),(g=h.querySelector(tc(t)))?g._p||(N.instance=g,N.state.loading=5):(g=qa.get(t),g||(g={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},qa.set(t,g)),zk(h,t,g,N.state))),n&&s===null)throw Error(r(528,""));return N}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(l=Go(l),n=B(h).hoistableScripts,s=n.get(l),s||(s={type:"script",instance:null,count:0,state:null},n.set(l,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function $o(t){return'href="'+Rt(t)+'"'}function tc(t){return'link[rel="stylesheet"]['+t+"]"}function Z2(t){return H({},t,{"data-precedence":t.precedence,precedence:null})}function zk(t,n,l,s){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Yi]!==!0){s.loading=1;return}}else n=t.createElement("link"),n[Yi]=!0,n.onload=n.onerror=he.bind(null,n),Tn(n,"link",l),Q(n),t.head.appendChild(n);s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2})}function Go(t){return'[src="'+Rt(t)+'"]'}function nc(t){return"script[async]"+t}function J2(t,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(s)return n.instance=s,Q(s),s;var h=H({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Q(s),Tn(s,"style",h),Gu(s,l.precedence,t),n.instance=s;case"stylesheet":h=$o(l.href);var g=t.querySelector(tc(h));if(g)return n.state.loading|=4,n.instance=g,Q(g),g;s=Z2(l),(h=qa.get(h))&&Sm(s,h),g=(t.ownerDocument||t).createElement("link"),Q(g);var N=g;return N._p=new Promise(function(O,X){N.onload=O,N.onerror=X}),Tn(g,"link",s),n.state.loading|=4,Gu(g,l.precedence,t),n.instance=g;case"script":return g=Go(l.src),(h=t.querySelector(nc(g)))?(n.instance=h,Q(h),h):(s=l,(h=qa.get(g))&&(s=H({},l),km(s,h)),t=t.ownerDocument||t,h=t.createElement("script"),Q(h),Tn(h,"link",s),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,Gu(s,l.precedence,t));return n.instance}function Gu(t,n,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=s.length?s[s.length-1]:null,g=h,N=0;N<s.length;N++){var O=s[N];if(O.dataset.precedence===n)g=O;else if(g!==h)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(t,n.firstChild))}function Sm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function km(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var Yu=null;function W2(t,n,l){if(Yu===null){var s=new Map,h=Yu=new Map;h.set(l,s)}else h=Yu,s=h.get(l),s||(s=new Map,h.set(l,s));if(s.has(t))return s;for(s.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var g=l[h];if(!(g[yi]||g[Mt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var N=g.getAttribute(n)||"";N=t+N;var O=s.get(N);O?O.push(g):s.set(N,[g])}}return s}function Cm(t,n,l){t=t.ownerDocument||t,t.head.insertBefore(l,n==="title"?t.querySelector("head > title"):null)}function Lk(t,n,l){if(l===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;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!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 ey(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function ty(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function ny(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function ay(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=ny(n),t.suspenseyImages.push(n)),t=Hk.bind(t),n.decode().then(t,t))}function Bk(t,n,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=$o(s.href),g=n.querySelector(tc(h));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=ac.bind(t),n.then(t,t)),l.state.loading|=4,l.instance=g,Q(g);return}g=n.ownerDocument||n,s=Z2(s),(h=qa.get(h))&&Sm(s,h),g=g.createElement("link"),Q(g);var N=g;N._p=new Promise(function(O,X){N.onload=O,N.onerror=X}),Tn(g,"link",s),l.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=ac.bind(t),n.addEventListener("load",l),n.addEventListener("error",l))}}var Xu=0;function Ik(t,n){return t.stylesheets&&t.count===0&&Qu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var s=setTimeout(function(){if(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Xu===0&&(Xu=62500*nk());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Xu?50:800)+n);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(h)}}:null}function iy(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Qu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function ac(){this.count--,iy(this)}function Hk(){this.imgCount--,iy(this)}var Ku=null;function Qu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ku=new Map,n.forEach(Pk,t),Ku=null,ac.call(t))}function Pk(t,n){if(!(n.state.loading&4)){var l=Ku.get(t);if(l)var s=l.get(null);else{l=new Map,Ku.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<h.length;g++){var N=h[g];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),s=N)}s&&l.set(null,s)}h=n.instance,N=h.getAttribute("data-precedence"),g=l.get(N)||s,g===s&&l.set(null,h),l.set(N,h),this.count++,s=ac.bind(this),h.addEventListener("load",s),h.addEventListener("error",s),g?g.parentNode.insertBefore(h,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Yo={$$typeof:P,Provider:null,Consumer:null,_currentValue:Te,_currentValue2:Te,_threadCount:0};function Uk(t,n,l,s,h,g,N,O,X){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=Sr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sr(0),this.hiddenUpdates=Sr(null),this.identifierPrefix=s,this.onUncaughtError=h,this.onCaughtError=g,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function ry(t,n,l,s,h,g,N,O,X,ie,de,ye){return t=new Uk(t,n,l,N,X,ie,de,ye,O),n=1,g===!0&&(n|=24),g=aa(3,null,null,n),t.current=g,g.stateNode=t,n=Pf(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:s,isDehydrated:l,cache:n},Vf(g),t}function ly(t){return t?(t=xo,t):xo}function oy(t,n,l,s,h,g){h=ly(h),s.context===null?s.context=h:s.pendingContext=h,s=Lr(n),s.payload={element:l},g=g===void 0?null:g,g!==null&&(s.callback=g),l=Br(t,s,n),l!==null&&(oa(l,t,n),Os(l,t,n))}function sy(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<n?l:n}}function Nm(t,n){sy(t,n),(t=t.alternate)&&sy(t,n)}function cy(t){if(t.tag===13||t.tag===31){var n=Sl(t,67108864);n!==null&&oa(n,t,67108864),Nm(t,67108864)}}function uy(t){if(t.tag===13||t.tag===31){var n=Ta();n=gi(n);var l=Sl(t,n);l!==null&&oa(l,t,n),Nm(t,n)}}var Xo=!0;function qk(t,n,l,s){var h=se.T;se.T=null;var g=me.p;try{me.p=2,Em(t,n,l,s)}finally{me.p=g,se.T=h}}function Fk(t,n,l,s){var h=se.T;se.T=null;var g=me.p;try{me.p=8,Em(t,n,l,s)}finally{me.p=g,se.T=h}}function Em(t,n,l,s){if(Xo){var h=Tm(s);if(h===null)sm(t,n,s,Zu,l),fy(t,s);else if($k(h,t,n,l,s))s.stopPropagation();else if(fy(t,s),n&4&&-1<Vk.indexOf(t)){for(;h!==null;){var g=xi(h);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var N=Ja(g.pendingLanes);if(N!==0){var O=g;for(O.pendingLanes|=2,O.entangledLanes|=2;N;){var X=1<<31-$t(N);O.entanglements[1]|=X,N&=~X}Ai(g),(yt&6)===0&&(Lu=Xt()+500,Qs(0))}}break;case 31:case 13:O=Sl(g,2),O!==null&&oa(O,g,2),Hu(),Nm(g,2)}if(g=Tm(s),g===null&&sm(t,n,s,Zu,l),g===h)break;h=g}h!==null&&s.stopPropagation()}else sm(t,n,s,null,l)}}function Tm(t){return t=yl(t),Am(t)}var Zu=null;function Am(t){if(Zu=null,t=ta(t),t!==null){var n=u(t);if(n===null)t=null;else{var l=n.tag;if(l===13){if(t=d(n),t!==null)return t;t=null}else if(l===31){if(t=f(n),t!==null)return t;t=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Zu=t,null}function dy(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"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fl()){case ui:return 2;case di:return 8;case bn:case ma:return 32;case hl:return 268435456;default:return 32}default:return 32}}var _m=!1,Kr=null,Qr=null,Zr=null,ic=new Map,rc=new Map,Jr=[],Vk="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 fy(t,n){switch(t){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Qr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":ic.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(n.pointerId)}}function lc(t,n,l,s,h,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:l,eventSystemFlags:s,nativeEvent:g,targetContainers:[h]},n!==null&&(n=xi(n),n!==null&&cy(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function $k(t,n,l,s,h){switch(n){case"focusin":return Kr=lc(Kr,t,n,l,s,h),!0;case"dragenter":return Qr=lc(Qr,t,n,l,s,h),!0;case"mouseover":return Zr=lc(Zr,t,n,l,s,h),!0;case"pointerover":var g=h.pointerId;return ic.set(g,lc(ic.get(g)||null,t,n,l,s,h)),!0;case"gotpointercapture":return g=h.pointerId,rc.set(g,lc(rc.get(g)||null,t,n,l,s,h)),!0}return!1}function hy(t){var n=ta(t.target);if(n!==null){var l=u(n);if(l!==null){if(n=l.tag,n===13){if(n=d(l),n!==null){t.blockedOn=n,On(t.priority,function(){uy(l)});return}}else if(n===31){if(n=f(l),n!==null){t.blockedOn=n,On(t.priority,function(){uy(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ju(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var l=Tm(t.nativeEvent);if(l===null){l=t.nativeEvent;var s=new l.constructor(l.type,l);vl=s,l.target.dispatchEvent(s),vl=null}else return n=xi(l),n!==null&&cy(n),t.blockedOn=l,!1;n.shift()}return!0}function my(t,n,l){Ju(t)&&l.delete(n)}function Gk(){_m=!1,Kr!==null&&Ju(Kr)&&(Kr=null),Qr!==null&&Ju(Qr)&&(Qr=null),Zr!==null&&Ju(Zr)&&(Zr=null),ic.forEach(my),rc.forEach(my)}function Wu(t,n){t.blockedOn===n&&(t.blockedOn=null,_m||(_m=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Gk)))}var ed=null;function py(t){ed!==t&&(ed=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ed===t&&(ed=null);for(var n=0;n<t.length;n+=3){var l=t[n],s=t[n+1],h=t[n+2];if(typeof s!="function"){if(Am(s||l)===null)continue;break}var g=xi(l);g!==null&&(t.splice(n,3),n-=3,dh(g,{pending:!0,data:h,method:l.method,action:s},s,h))}}))}function Ko(t){function n(X){return Wu(X,t)}Kr!==null&&Wu(Kr,t),Qr!==null&&Wu(Qr,t),Zr!==null&&Wu(Zr,t),ic.forEach(n),rc.forEach(n);for(var l=0;l<Jr.length;l++){var s=Jr[l];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Jr.length&&(l=Jr[0],l.blockedOn===null);)hy(l),l.blockedOn===null&&Jr.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var h=l[s],g=l[s+1],N=h[Gt]||null;if(typeof g=="function")N||py(l);else if(N){var O=null;if(g&&g.hasAttribute("formAction")){if(h=g,N=g[Gt]||null)O=N.formAction;else if(Am(h)!==null)continue}else O=N.action;typeof O=="function"?l[s+1]=O:(l.splice(s,3),s-=3),py(l)}}}function gy(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(N){return h=N})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function Mm(t){this._internalRoot=t}td.prototype.render=Mm.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,s=Ta();oy(l,s,t,n,null,null)},td.prototype.unmount=Mm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;oy(t.current,2,null,t,null,null),Hu(),n[jn]=null}};function td(t){this._internalRoot=t}td.prototype.unstable_scheduleHydration=function(t){if(t){var n=ea();t={blockedOn:null,target:t,priority:n};for(var l=0;l<Jr.length&&n!==0&&n<Jr[l].priority;l++);Jr.splice(l,0,t),l===0&&hy(t)}};var vy=a.version;if(vy!=="19.3.0")throw Error(r(527,vy,"19.3.0"));me.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=v(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var Yk={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:se,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nd.isDisabled&&nd.supportsFiber)try{Ka=nd.inject(Yk),cn=nd}catch{}}return cc.createRoot=function(t,n){if(!c(t))throw Error(r(299));var l=!1,s="",h=lv,g=ov,N=sv;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=ry(t,1,!1,null,null,l,s,null,h,g,N,gy),t[jn]=n.current,om(t),new Mm(n)},cc.hydrateRoot=function(t,n,l){if(!c(t))throw Error(r(299));var s=!1,h="",g=lv,N=ov,O=sv,X=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(O=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),n=ry(t,1,!0,n,l??null,s,h,X,g,N,O,gy),n.context=ly(null),l=n.current,s=Ta(),s=gi(s),h=Lr(s),h.callback=null,Br(l,h,s),l=s,n.current.lanes=l,Zn(n,l),Ai(n),t[jn]=n.current,om(t),new td(n)},cc.version="19.3.0",cc}var _y;function l8(){if(_y)return zm.exports;_y=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(a){console.error(a)}}return e(),zm.exports=r8(),zm.exports}var o8=l8();const s8={"locale.name":"English","locale.short":"EN","common.close":"Close","common.continue":"Continue","common.failed":"Something went wrong. Please try again.","common.listSeparator":", ","login.subtitle":"Sign in to continue","login.form":"Sign in","login.username":"Username","login.password":"Password","login.showPassword":"Show password","login.hidePassword":"Hide password","login.submit":"Sign in","login.submitting":"Signing in…","login.wrong":"Wrong username or password.","login.tooMany":"Too many attempts. Please try again later.","login.offline":"Can't connect to Jarvy. Check your network and try again.","login.themeLight":"Switch to the light theme","login.themeDark":"Switch to the dark theme","general.language":"Language","general.theme":"Theme","general.light":"Light","general.dark":"Dark","about.tagline":"A group chat where you and your AI Bots work side by side, running entirely on your own machine.","about.version":"Version {version}","about.source":"Source","about.package":"npm package","about.license":"License","about.notices":"Third-party notices","status.signedIn":"Signed in","status.signedOut":"Signed out","status.configured":"Ready","status.notConfigured":"Not set up","account.menu":"Account menu","account.menuFor":"Account menu for {name}","account.toggleTheme":"Switch theme","account.signOut":"Sign out","entry.menu":"Chat actions","entry.pin":"Pin","entry.unpin":"Unpin","entry.mute":"Mute","entry.unmute":"Unmute","entry.botInfo":"Bot info","entry.channelInfo":"Channel info","entry.deleteBot":"Delete Bot","entry.deleteChannel":"Delete channel","hint.reaction":"{actor} reacted {emoji} to your message","hint.reactionInThread":"{actor} reacted {emoji} to your message in “{title}”","hint.threadSummary":"{actor} updated the summary of “{title}”","hint.summary":"{actor} updated the thread summary","hint.notice":"{actor} updated the notice","app.connecting":"Connecting to Jarvy…","app.channelDeleted":"Channel deleted","app.botDeleted":"{name} deleted","app.notInChannel":{one:"{names} isn't in this channel, so wasn't notified",other:"{names} aren't in this channel, so weren't notified"},"app.memberAdded":"{name} joined #{channel}","app.sourceGone":"The original message no longer exists","ui.closeNamed":"Close {name}","ui.copied":"Copied","ui.copyFailed":"Couldn't copy","ui.copyCode":"Copy code","ui.image":"[Image: {alt}]","ui.imageHidden":"external image hidden","app.deleteChannelTitle":"Delete channel #{name}","app.deleteChannelBody":"Its messages, threads and attachments will be deleted. This can't be undone.","app.resizePane":"Drag to resize the side panel","common.cancel":"Cancel","common.save":"Save","common.create":"Create","common.delete":"Delete","common.retry":"Retry","common.back":"Back","common.add":"Add","common.saveFailed":"Couldn't save","common.openNav":"Open the chat list","common.you":"You","common.member":"Member","common.noMatch":"No matching members","common.searchMembers":"Search members","common.attachment":"[Attachment]","actions.reply":"Reply to this message","actions.react":"Add a reaction","actions.pickEmoji":"Pick an emoji","actions.more":"More","dialogs.candidates":"Members you can add","dialogs.allInside":"Everyone is already in this channel","dialogs.addCount":"Add ({count})","dialogs.addFailed":"Couldn't add members","dialogs.optional":"Optional","dialogs.deleteSection":"Delete the group “{name}”? Its channels move under Channels.","dialogs.deleteFailed":"Couldn't delete. Please try again.","dialogs.editSection":"Edit channel group","dialogs.sectionName":"Group name","dialogs.newSection":"New group","api.offline":"Can't connect to Jarvy. Check your network and try again.","api.historyFailed":"Couldn't load the messages. Please try again.","error.autoconfigModel":"Enter the model ID.","error.autoconfigSource":"The selected setup source isn't valid. Choose another one.","error.botMissing":"Can't find this Bot. It may have been deleted.","error.agentUndeletable":"The agent Bot can't be deleted. You can rename or stop it.","error.chatAccessChanged":"Your access to this chat has changed. Refresh and try again.","error.computerFailed":"The sandbox couldn't start.","error.computerMissing":"This Bot has no sandbox.","error.dockerUnavailable":"Docker isn't available on the computer running Jarvy.","error.connectionMissing":"Can't find this model connection. It may have been deleted.","error.credentialChanged":"The credential changed. Please try again.","error.credentialScope":"The credential belongs to another connection.","error.credentialsMissing":"Set up this connection's credential first.","error.dataLocked":"Jarvy is already running, or another program is using its data directory.","error.discoveryFormat":"This address didn't return a model list for the selected protocol. Check the API URL and protocol.","error.discoveryHttp":"Couldn't fetch the models: HTTP {status}.","error.discoveryKey":"Enter the API key.","error.discoveryProtocol":"The selected protocol can't list models. Add models manually.","error.discoveryUrl":"The API URL isn't valid.","error.discoveryUrlMissing":"Enter the API URL.","error.historyMissing":"Can't find this History record.","error.invalidCredential":"The credential format isn't valid.","error.invalidRun":"The Bot's state just changed. Refresh and try again.","error.loginInput":"Enter the authorization code or the redirect URL.","error.loginOption":"Pick a sign-in method.","error.loginStep":"The sign-in step has changed. Please start again.","error.loginFailed":"Sign-in failed. Refresh and try again.","error.messageMissing":"Can't find this message. It may have been deleted.","error.modelIncomplete":"Fill in the model's context window and max output.","error.modelMissing":"Can't find this model. It may have been removed.","error.modelRequestFailed":"Model request failed: {detail}","error.modelRequired":"Pick a model for the Bot first.","error.modelSwitchUncertain":"The model switch didn't finish. Pick the model again.","error.nameTaken":"Another member already has this name.","error.providerNameTaken":"A provider with this name already exists.","error.connectionInUse":"In use by {bots}. Switch to another model before deleting this provider.","error.questionClosed":"This question is already settled.","error.questionExpired":"This question was ignored. The Bot is no longer waiting for an answer.","error.runtimeFailed":"The Bot's run failed. Check its model settings and try again.","error.sessionCorrupt":"The Bot couldn't start (the session file can't be read).","error.sessionMismatch":"The Bot couldn't start (the session file doesn't match).","error.sessionMissing":"The Bot couldn't start (the session file is missing).","error.sessionPath":"The Bot couldn't start (the session file path isn't valid).","error.stopping":"Jarvy is shutting down. Try again later.","error.thinkingFormat":"This thinking format isn't supported.","error.toolsMissing":"Couldn't load the Bot's tools. Restart the Bot and try again.","error.unsafeReplay":"The Bot may have already taken actions before it was interrupted, so it won't retry automatically to avoid doing them twice.","error.discoveryUnreachable":"Couldn't reach {host}. Check the API URL.","color.gray":"Gray","color.blue":"Blue","color.green":"Green","color.amber":"Amber","color.rose":"Pink","color.violet":"Purple","avatar.working":"Working","avatar.openInfo":"Open {name}'s Bot info"},c8={"settings.title":"Settings","settings.sections":"Settings sections","settings.general":"General","settings.models":"Models","settings.network":"Network","settings.secrets":"Secrets","settings.about":"About","group.custom":"Custom API","group.subscription":"Subscription","group.apiKey":"API key","models.intro":"Connect model services; each Bot picks its model from these.","models.add":"Add a provider","models.empty":"No model connection yet","models.emptyHint":"Add a provider, then a Bot can pick one of its models.","models.count":{one:"{count} model",other:"{count} models"},"models.none":"No models yet","picker.intro":"Pick the kind of service; next you enter its credentials and models.","picker.back":"Back to the model page","picker.search":"Search providers","picker.searchPlaceholder":"Search providers…","picker.customHint":"Any OpenAI / Anthropic / Gemini compatible endpoint","picker.oauthHint":"Sign in with your account","picker.keyHint":{one:"API key · {count} model",other:"API key · {count} models"},"picker.loading":"Loading providers…","picker.retry":"Try again","picker.noMatch":"No provider matches","picker.noMatchHint":"Try another word.","editor.back":"Back to the provider list","editor.delete":"Delete this provider","editor.connection":"Connection","editor.providerName":"Provider name","editor.name":"Connection name","editor.protocol":"API protocol","editor.url":"API URL","editor.defaultUrl":"The provider's own address","editor.key":"API key","editor.keyPlaceholder":"Enter the API key","editor.keySaved":"Saved. Leave empty to keep it.","editor.settings":"Connection settings","editor.models":"Model list","editor.selected":"{selected} of {total} selected","editor.fetch":"Get the model list","editor.fetching":"Getting…","editor.fetched":{one:"Got {count} model",other:"Got {count} models"},"editor.noneReturned":"This endpoint returned no models","editor.fetchFailed":"Couldn't get the model list","editor.loadingCatalog":"Loading the model catalog…","editor.autoSelected":"Autoconfigure selected","editor.addManually":"Add manually","editor.filter":"Filter models","editor.filterPlaceholder":"Filter models…","editor.selectVisible":"Select everything shown","editor.empty":"No models yet","editor.emptyCustom":"Get the model list, or add a model by hand.","editor.emptyBuiltin":"You can add a model by hand.","editor.autoSummary":"{parts}; saved with the form","editor.autoMatched":{one:"{count} configured",other:"{count} configured"},"editor.autoChoose":{one:"{count} needs a source",other:"{count} need a source"},"editor.autoNone":{one:"{count} not in the catalog",other:"{count} not in the catalog"},"editor.autoFailed":{one:"{count} failed",other:"{count} failed"},"editor.confirmDelete":'Delete "{name}" and its models?',"editor.deleteFailed":"Could not delete","editor.saveFailed":"Could not save","editor.saved":"Saved","editor.saving":"Saving…","editor.save":"Save","editor.footer":"Ticked models appear in the Bots' model menu once saved.","card.defaultProtocol":"The provider's own protocol","card.modelId":"Model ID","card.modelName":"Model name","card.optional":"Optional","card.newModel":"New model","card.enterId":"Enter the model ID","card.use":"Use {name}","card.remove":"Remove {name}","card.image":"Image","card.reasoning":"Thinking","card.capabilities":"Capabilities","card.reasoningThinking":"Thinking / reasoning","card.imageInput":"Image input","card.specs":"Model specs","card.hidePrices":"Hide prices","card.editPrices":"Edit prices","card.context":"Context window · tokens","card.maxOutput":"Maximum output · tokens","card.costTitle":"Price per million tokens","card.costInput":"Input","card.costOutput":"Output","card.costCacheRead":"Cache read","card.costCacheWrite":"Cache write","card.notProvided":"Not given","card.advanced":"Advanced","card.apiOverride":"API protocol","card.headers":"Headers","card.headerSaved":"Saved. Leave empty to keep it.","card.addHeader":"Add a header","card.removeHeader":"Remove this header","card.compat":"Compat flags","card.jsonObject":"Enter a JSON object","auto.run":"Autoconfigure","auto.pending":"Configuring…","auto.failed":"Autoconfigure failed","auto.tagChoose":"Pick a source","auto.tagNone":"Not in the catalog","auto.official":"Official","auto.matched":"Filled in from {source}{note}{suffix}","auto.reseller":" (a reseller's catalog, not the vendor's)","auto.applied":"; it takes effect once saved.","auto.apiMismatch":"The catalog has this model on the {api} protocol, not the one chosen here, so the thinking format and compat flags were left alone.","auto.changeSource":"Change the source","auto.multiple":"Several official sources share this model name; pick one:","auto.similar":"The catalog has no {modelId}; similar models:","auto.notFound":"The catalog has no such model. Fill it in by hand.","thinking.title":"Thinking","thinking.format":"Thinking format","thinking.protocolDefault":"The protocol's default","thinking.onlyCompletions":"Only used by the OpenAI Chat Completions protocol","thinking.levels":"Thinking levels","thinking.level.off":"Off","thinking.level.minimal":"Minimal","thinking.level.low":"Low","thinking.level.medium":"Medium","thinking.level.high":"High","thinking.level.xhigh":"Extra high","thinking.level.max":"Maximum","thinking.levelName":"{level} level","thinking.levelValue":"Value sent for the {level} level","thinking.supportedDefault":"Supported (default)","thinking.unsupported":"Not supported","thinking.supportedCustom":"Supported, send this value","thinking.supported":"Levels in use: {levels}","auth.title":"Account authorization","auth.running":"Authorizing","auth.openPage":"Open the authorization page","auth.code":"Code: {code}","auth.browser":"Sign in with the browser (OAuth)","auth.deviceCode":"Sign in with a device code","auth.redirectFull":"The full redirect URL","auth.redirectOrCode":"Code or redirect URL","auth.manualNote":"If the browser does not come back on its own, paste the redirect URL here.","auth.waiting":"Waiting for authorization…","auth.cancel":"Cancel authorization","auth.configureCredential":"Set up the credential","auth.signInAgain":"Sign in again","auth.signIn":"Sign in","auth.removeCredential":"Remove the credential","auth.signOut":"Sign out","auth.statusFailed":"Couldn't get the sign-in status","auth.refresh":"Refresh the state","picker.loadFailed":"Couldn't load the providers"},u8={"sidebar.label":"Chats","sidebar.create":"Create","sidebar.createMenu":"Create menu","sidebar.newChannel":"New channel","sidebar.newSection":"New channel group","sidebar.newBot":"New Bot","sidebar.alerts":"{count} unread for you","sidebar.unread":"{count} unread","sidebar.said":"{name}: {text}","sidebar.atMe":"[Mentioned you]","sidebar.more":"More actions for {name}","sidebar.asking":"(waiting for your answer)","sidebar.working":"(working)","sidebar.pinned":"Pinned","sidebar.muted":"Muted","sidebar.hasUnread":"Unread","sidebar.editSection":"Edit group: {name}","sidebar.search":"Search chats and messages","sidebar.results":"Search results","sidebar.chats":"Chats","sidebar.nav":"Channels and DMs","sidebar.followed":"Followed threads","sidebar.channels":"Channels","sidebar.dms":"DMs","sidebar.noDms":"No DMs yet","search.title":"Search","search.paneLabel":"Search in this chat","search.inThread":"This thread","search.inDm":"This DM","search.close":"Close search","search.placeholder":"Search messages","search.channelPlaceholder":"Search this channel and its threads","search.prompt":"Type what you're looking for","search.searching":"Searching…","search.noMessages":"No messages found","search.count":{one:"{count} message, newest first",other:"{count} messages, newest first"},"search.countLatest":"Showing the latest {count}","search.showAll":"Show all {count}","search.threads":"Threads","search.channels":"Channels (topics and notices)","search.messages":"Messages","search.channel":"Channel","member.unknown":"Unknown member","member.deleted":"{name} (deleted)","members.view":"View {name}","members.remove":"Remove {name}","members.count":{one:"{count} member",other:"{count} members"},"members.people":"People","members.removeTitle":"Remove {name} from #{channel}","members.removeBody":"They won't get this channel's messages anymore.","members.removeConfirm":"Remove","chat.area":"Conversation","chat.botDms":"{name}'s DMs with other Bots","chat.botStatus":"Bot status","chat.transcript":"Messages","chat.loading":"Loading…","chat.empty":"No messages yet","chat.start":"Start a conversation with {name}","chat.loadingOlder":"Loading earlier messages…","chat.toLatest":"Jump to the latest","chat.unseen":{one:"{count} new message",other:"{count} new messages"},"chat.toChannel":"Message #{name}","chat.toBot":"Message {name}…","chat.pickModel":"Choose a model for this Bot to start messaging","chat.pick":"Pick a chat","channel.infoFor":"Channel info: {name}","channel.membersCount":{one:"{count} member",other:"{count} members"},"channel.members":"Members","channel.search":"Search channel messages (Ctrl+F)","channel.threads":"Threads","notice.title":"Notice","notice.edit":"Edit the notice","notice.content":"Notice text","notice.none":"No notice yet","notice.version":"v{version}","chat.newBelow":"New messages","channel.echo":"Replied in “{title}”","channel.replies":{one:"{count} reply",other:"{count} replies"},"channel.threadDone":"Done","channel.lastReply":"Last reply {time}","channel.replyInThread":"Reply in thread","info.edit":"Edit {name}","info.memberList":"Member list","info.back":"Back to channel info","info.addMembers":"Add members","info.name":"Name","info.newChannel":"New channel","info.topic":"Topic","info.noTopic":"No topic yet","info.section":"Group","info.menu":"Channel","info.noSection":"None","mention.menu":"Mention a member","mention.outside":"Not in this channel","mention.outsideList":"Members not in this channel","mention.searchOutside":"Search members not in this channel","mention.invites":"Choosing someone adds them to this channel","quote.inline":"“{text}”","quote.by":"{name}:","quote.remove":"Remove quote: {text}","quote.tooMany":"A message can quote up to {count} passages","quote.selection":"Selected text","quote.copy":"Copy","quote.quote":"Quote in reply","composer.busy":"Still uploading. Add more once it's done.","composer.tooMany":"A message can have up to {count} attachments.","composer.size":"Attachments can't be empty or larger than 10 MB.","composer.pasted":"pasted-image","composer.removeFile":"Remove attachment: {name}","composer.uploading":"Uploading: {name}","composer.replying":"Replying to","composer.cancelReply":"Cancel reply","composer.drop":"Drop to attach","composer.attach":"Attach files","composer.input":"Message","composer.send":"Send","files.preview":"Preview {name}","files.download":"Download {name}","files.gone":"This attachment doesn't exist or was deleted","files.readFailed":"Couldn't open the file ({status})","files.readError":"Couldn't open the file","files.kindImage":"Image","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"Text","files.kindFile":"File","files.downloadFile":"Download","files.showPreview":"Preview","files.showSource":"Source","files.showText":"Plain text","files.openTab":"Open in a new tab (isolated)","files.narrow":"Shrink the preview","files.widen":"Widen the preview","files.closePreview":"Close the preview","files.running":"Scripts are running in isolation: they can reach the network but can't read Jarvy's data.","files.scripts":{one:"This HTML has {count} script{hosts}. It isn't running. Once run, it can reach the network but can't read Jarvy's data.",other:"This HTML has {count} scripts{hosts}. They aren't running. Once run, they can reach the network but can't read Jarvy's data."},"files.scriptHosts":" (loading {hosts})","files.andMore":" and more","files.stop":"Stop scripts","files.run":"Run scripts","files.downloadToView":"Download this file to view it","files.tooLarge":"This file is over 1 MB, too large to preview here.","files.unsupported":"This file can't be previewed here.","files.reading":"Reading the file…","files.runningTitle":"{name} (running)","files.previous":"Previous attachment","files.choose":"Pick a file to preview","files.next":"Next attachment","question.failed":"Couldn't send the answer","question.dismissed":"Dismissed","question.chose":"Chose: {answer}","question.dismissLabel":"Close the question without answering","question.dismiss":"Skip","question.multiple":"Pick one or more","question.note":"Add a note (optional)","question.own":"Or write your own…","question.ownLabel":"Your own answer","question.confirmCount":"OK ({count})","question.confirm":"OK","question.send":"Send","directs.back":"Back to the list","directs.between":"{name} and {other}","directs.readOnly":"Read only","files.kindVideo":"Video","files.kindAudio":"Audio","files.cantPlay":"This browser can't play it","files.cantPlayHint":"Download it and open it in a player."},d8={"threadSort.title":"Sort","threadSort.current":"Sort: {order}","threadSort.updated":"Last updated","threadSort.created":"Created","threadSort.status":"Status","threads.list":"Thread list","threads.closeList":"Close the thread list","threads.byStatus":"Filter by status","threads.openCount":"Open {count}","threads.doneCount":"Done {count}","threads.all":"All","threads.loading":"Loading…","threads.none":"No threads yet","threads.following":"Following","threads.filter":"Filter","threads.unreadCount":"Unread {count}","threads.unread":"Unread","threads.noneUnread":"No unread threads","threads.noneOpen":"No open threads","threads.noneDone":"No finished threads","threads.notFollowing":"Not following","threads.pick":"Pick a thread","threads.open":"Open","thread.rename":"Rename","thread.title":"Thread title","thread.toggleStatus":"Switch status","thread.summary":"Summary","thread.editSummary":"Edit the summary","thread.conclude":"Mark done and post the summary to #{channel}","thread.addSummary":"Add a summary","thread.sourceElsewhere":"The original message isn't in this thread","thread.label":"Thread","thread.backToList":"Back to the thread list","thread.inChannel":"View in channel","thread.search":"Search thread messages (Ctrl+F)","thread.followingHint":"New replies count as unread","thread.notFollowingHint":"New replies don't count as unread","thread.follow":"Follow","thread.expand":"Expand","thread.collapse":"Back to the side panel","thread.close":"Close the thread panel","thread.conclusion":"Conclusion:","thread.concluded":"Marked done; the summary was posted to #{channel}","thread.noReplies":"No replies yet","thread.toLatest":"Jump to the latest reply","thread.reply":"Reply in thread"},f8={"usage.title":"Usage","usage.back":"Back to Bot info","usage.range":"Time range","usage.today":"Today","usage.days":"{count} days","usage.all":"All","usage.refresh":"Refresh","usage.refreshLabel":"Refresh usage","usage.retry":"Retry","usage.loading":"Loading usage…","usage.loadFailed":"Could not load usage","usage.empty":"No model calls in this period","usage.model":"Model","usage.calls":"Calls","usage.input":"Input","usage.output":"Output","usage.cacheRead":"Cache read","usage.cacheWrite":"Cache write","usage.cost":"Cost","usage.total":"Total","usage.unpriced":"No price set","usage.note":"Input, output and cache are counted in tokens.","usage.notePartial":"Input, output and cache are counted in tokens; the total cost leaves out models with no price set.","activity.error":"Error","activity.running":"Running","activity.reasoning":"Thinking","activity.texting":"Replying","activity.toolCalling":"Using tools","activity.asking":"Waiting for your answer","activity.noModel":"No model","activity.idle":"Idle","activity.stopped":"Not running","bot.saved":"Saved","bot.changeFailed":"Couldn't change it","bot.noDescription":"No description yet","bot.color":"Avatar color","bot.contextHint":"Context in use, as the model reported it with the Bot's last reply","bot.contextStale":"The latest model request failed. This is the context usage from the last successful request.","bot.context":"Context","bot.unknown":"Unknown","bot.tokens":"{used} / {window} tokens","bot.profile":"Profile","bot.description":"Description","bot.descriptionPlaceholder":"What can this Bot do for you?","bot.personaPlaceholder":"The Bot's personality, duties and habits","bot.personaHint":"Goes into the Bot's system prompt and applies from the next time it starts working.","bot.unsaved":"Unsaved changes","bot.saving":"Saving…","bot.runtime":"Runtime","agent.title":"Agent Bot","agent.intro":"{name} is your agent Bot: it helps you run Jarvy itself. Ask it in a DM or a channel to:","agent.create":"Create Bots and change their name, description and persona","agent.model":"Give Bots a model and a thinking level","agent.run":"Start or stop Bots, and see their usage","agent.delete":"Delete Bots, channels and channel groups, or remove members from a channel, always after you confirm on a card","agent.note":"The agent Bot can't be deleted, but you can rename or stop it. Model connections and keys stay with you, in Settings.","bot.status":"Status","bot.statusHint":"Stopping keeps the conversation; once started, the Bot works when a new message arrives","bot.aborting":"Interrupting…","bot.abort":"Interrupt the current task","bot.starting":"Starting…","bot.stopping":"Stopping…","bot.start":"Start","bot.stop":"Stop","bot.workspace":"Workspace","bot.copyWorkspace":"Copy the workspace path","bot.activity":"Activity","bot.activityHint":"Messages and History records","bot.usageHint":"Tokens and cost per model","bot.subscriptions":"Subscriptions","bot.noSubscriptions":"No subscriptions","bot.threadIn":"Thread · #{channel}","botModel.auto":"Default level","botModel.off":"Off","botModel.minimal":"Minimal","botModel.low":"Low","botModel.medium":"Medium","botModel.high":"High","botModel.xhigh":"Extra high","botModel.max":"Maximum","botModel.loadFailed":"Couldn't load the model list","botModel.switchFailed":"Couldn't switch the model","botModel.pick":"Pick the Bot's model","botModel.broken":"This model isn't available anymore. Choose another one.","botModel.choose":"Pick a model","botModel.filter":"Filter the Bot's models","botModel.filterPlaceholder":"Filter models…","botModel.list":"Bot models","botModel.noMatch":"No matching models","botModel.none":"No models yet. Add one in Settings.","botModel.manage":"Manage models","botModel.thinking":"Thinking","botModel.pickThinking":"Pick the thinking level","botModel.loading":"Loading models…","botModel.switching":"Switching…","botModel.pickFor":"Pick a model for {name}","deleteBot.title":"Delete {name}","deleteBot.after":"Once deleted:","deleteBot.chats":{one:"Its {count} DM, channel memberships and subscriptions are deleted.",other:"Its {count} DMs, channel memberships and subscriptions are deleted."},"deleteBot.messages":"Its messages in channels and threads stay, shown as from “{name}”; the name can be used again.","deleteBot.history":"Its session history and unfinished tasks are cleared.","deleteBot.files":"Also delete the workspace folder","deleteBot.filesHint":"The workspace may hold files it made. It's kept unless you tick this.","deleteBot.deleting":"Deleting…","deleteBot.working":"Working…","history.reasoning":"Thinking","history.text":"Text","history.empty":"(empty)","history.image":"Image in History","history.toolCall":"Tool call","history.toolResult":"Tool result","history.error":"Error","history.related":"View related record #{id}","history.result":"Result","history.call":"Call","history.details":"Structured result","history.view":"Record view","history.content":"Content","history.json":"Raw JSON","history.contentLabel":"Record content","history.tools":"Tool definitions","history.toolsRemoved":"Removed tools","history.stopReason":"Stop reason","activity.detailFailed":"Couldn't load the record","activity.detailLoading":"Loading the record…","activity.openChat":"Open the chat","activity.sentBy":"Sent by call #{id}","activity.roleSystem":"System","activity.roleUser":"Input","activity.roleAssistant":"Assistant","activity.timeline":"Bot activity timeline","activity.chatMessage":"Chat message {id}","activity.viewMessage":"View message {sequence} · {chat}","activity.attachmentOnly":"Attachments only","activity.attachments":{one:"{count} attachment",other:"{count} attachments"},"activity.viewSentBy":"View call #{id}, which sent it","activity.historyRecord":"History record #{id}","activity.viewHistory":"View History #{id} · {role}","activity.emptyMessage":"(empty message)","activity.loadFailed":"Couldn't load the activity","activity.backToTimeline":"Back to the timeline","activity.chatRecord":"Chat message","activity.newestFirst":"Newest first","activity.refresh":"Refresh the activity","activity.reading":"Loading…","activity.columnChat":"Chat","activity.columnTime":"Time","activity.loading":"Loading the activity…","activity.empty":"No activity yet","activity.emptyHint":"Chat messages and History show up here","activity.newer":"Newer","activity.page":"Page {page}","activity.older":"Older","activity.historyDetail":"History record details","activity.chatDetail":"Chat message details","activity.toolCall":"Called {name}","activity.toolResult":"{name} · result","activity.toolFailed":"{name} · failed","activity.images":{one:"{count} image",other:"{count} images"},"bot.newName":"New Bot","bot.newNameN":"New Bot {n}"},h8={"npc.toolbar":"NPC prototype","npc.replay":"Replay the turn","npc.mood":"Base mood","npc.mood.normal":"Normal","npc.mood.happy":"Happy","npc.mood.sad":"Sad","npc.mood.angry":"Angry","npc.mood.dizzy":"Dizzy","npc.poses":"Animations","npc.pose.sleep":"Sleeping","npc.pose.idle":"Idle","npc.pose.think":"Thinking","npc.pose.mutter":"Talking to itself","npc.pose.say":"Talking to you","npc.pose.ask":"Waiting for you","npc.pose.read":"Reading a file","npc.pose.work":"Editing, running","npc.pose.compact":"Compacting","npc.pose.busy":"Retrying","npc.pose.failed":"Failed","npc.pose.done":"Done","npc.pose.groom":"Grooming","npc.expand":"Show every step","npc.collapse":"Collapse","npc.panel":"This turn","npc.state.running":"Running","npc.state.ok":"Done","npc.state.failed":"Failed","npc.duration":"{value}s","npc.done":"Done · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"Thinking","npc.step.mutter":"Talked to itself","npc.step.read.running":"Reading {target}","npc.step.read.ok":"Read {target}","npc.step.write.running":"Editing {target}","npc.step.write.ok":"Edited {target}","npc.step.run.running":"Running {target}","npc.step.run.ok":"Ran {target}","npc.step.run.failed":"{target} failed","npc.step.compact.running":"Tidying up the context","npc.step.compact.ok":"Tidied up the context","npc.step.ask.running":"Waiting for your answer","npc.step.ask.ok":"You chose “{answer}”","npc.step.say.running":"Replying to you","npc.step.say.ok":"Replied to you","npc.step.post.running":"Posting to {chat}","npc.step.post.ok":"Posted to {chat}","npc.demo.think1":"fish says the thread pane jumps when it opens. The scroll may run at the wrong moment. Let me first see how ThreadPane scrolls.","npc.demo.think2":"It scrolls before the replies have their height. Scrolling after layout should fix it. The reply count belongs in the dependencies too.","npc.demo.mutter1":"Edited. Let me run the build first.","npc.demo.mutter2":"Hmm… the types don't pass; the ref can be null.","npc.demo.channel":"dev","npc.demo.post":"The thread pane no longer jumps when it opens, and the build passes. Waiting for fish to confirm.","npc.demo.question":"Fixed. Should I also update the screenshots in the docs?","npc.demo.yes":"Yes, update them","npc.demo.no":"Not now","npc.demo.replyYes":"Done: the thread pane now opens at the newest reply without jumping, and the screenshots in the docs are new. The build passes.","npc.demo.replyNo":"Done: the thread pane now opens at the newest reply without jumping. The build passes; I left the screenshots as they are.","npc.live.omitted":"… {count} characters left out …","npc.live.tokens":"Context: {before} → {after} tokens","npc.live.compact.running":"Tidying up the context","npc.live.compact.ok":"Tidied up the context","npc.live.compact.failed":"Couldn't tidy up the context","npc.live.retry.running":"Retrying ({attempt}/{max})","npc.live.retry.ok":"Retried","npc.live.retry.failed":"Retrying failed","npc.live.read.running":"Reading {target}","npc.live.read.ok":"Read {target}","npc.live.read.failed":"Couldn't read {target}","npc.live.edit.running":"Editing {target}","npc.live.edit.ok":"Edited {target}","npc.live.edit.failed":"Couldn't edit {target}","npc.live.write.running":"Writing {target}","npc.live.write.ok":"Wrote {target}","npc.live.write.failed":"Couldn't write {target}","npc.live.run.running":"Running {target}","npc.live.run.ok":"Ran {target}","npc.live.run.failed":"{target} failed","npc.live.script.running":"Running a script","npc.live.script.ok":"Ran a script","npc.live.script.failed":"The script failed","npc.live.tool.running":"Using {tool}","npc.live.tool.ok":"Used {tool}","npc.live.tool.failed":"{tool} failed","npc.live.sendFailed":"The message didn't go out","npc.live.switch.running":"Switching work environment","npc.live.switch.ok":"Switched work environment","npc.live.switch.failed":"Couldn't switch work environment","npc.live.askFailed":"The question didn't go out","npc.live.askClosed":"The question was closed","npc.live.answerBelow":"Answer on the card below","npc.live.answerIn":"Answer in {chat}","npc.live.browse.running":"Looking through {chat}","npc.live.browse.ok":"Looked through {chat}","npc.live.browseAll.running":"Looking through the chats","npc.live.browseAll.ok":"Looked through the chats","npc.done.interrupted":"Interrupted · {duration}","npc.done.failed":"The turn failed · {duration}"},m8={"environment.title":"Work environment","environment.computer":"Sandbox","environment.computerHint":"A Linux container that Jarvy makes and manages, used only by this Bot, with its workspace inside. Recommended.","environment.noDocker":"Needs Docker on the computer running Jarvy.","environment.host":"Your computer","environment.hostHint":"The computer running Jarvy, where it can access your files.","environment.default":"Default","environment.defaultHint":"Where it runs commands and works on files.","environment.awayHost":"Now on your computer (the Bot switched there itself).","environment.awayComputer":"Now in its sandbox (the Bot switched there itself).","environment.details":"Sandbox details","environment.sandboxAbout":"A Linux container only this Bot uses, with its workspace as its home directory.","environment.external":"External environments it may use","environment.hostAbout":"The computer running Jarvy","environment.externalHint":"When on, the Bot can switch there itself when it needs to. Turning it off while the Bot is there switches it back to its default environment.","environment.accessFailed":"Couldn't change the environments it may use","environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Error","environment.state.unavailable":"No Docker","environment.hint.preparing":"Creating the first sandbox takes a few minutes while the image is built on this machine.","environment.hint.running":"Keeps running until you stop it.","environment.hint.stopped":"Starts automatically when the Bot needs it.","environment.hint.failed":"Couldn't start. Please try again.","environment.hint.unavailable":"Docker isn't available on the computer running Jarvy.","environment.start":"Start","environment.starting":"Starting…","environment.stop":"Stop","environment.stopping":"Stopping…","environment.stopTitle":"Stop {name}'s sandbox?","environment.stopBody":"Programs running in the sandbox, such as background services, will be closed. Installed software and workspace files are kept, and it starts automatically when next needed.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in the sandbox will be removed, returning it to its initial state. Workspace files are kept.","environment.resetConfirm":"Reset","environment.changeFailed":"Couldn't change the work environment"},p8={"connection.lan":"LAN access","connection.localOnly":"This computer only","connection.localOnlyHint":"Jarvy accepts connections from this computer only. To use it from other devices on your network, restart it with {flag}.","connection.lanHint":"Other devices on your local network can open Jarvy at these addresses.","connection.addresses":"Addresses","connection.copy":"Copy address","connection.root":"Security certificate","connection.rootHint":"Install it on your other devices so their browsers trust Jarvy without security warnings.","connection.download":"Download certificate","connection.fingerprint":"SHA-256 fingerprint","connection.fingerprintSha1":"SHA-1 fingerprint","connection.howTo":"Installation instructions","connection.howMac":"Mac: Open the certificate to add it to Keychain Access, double-click it, then under Trust set When using this certificate to Always Trust.","connection.howWindows":"Windows: Open the certificate, click Install Certificate, choose Place all certificates in the following store, then pick Trusted Root Certification Authorities. The Thumbprint on the certificate's Details tab is the SHA-1 fingerprint above.","connection.howIos":"iPhone and iPad: Download it in Safari, install it in Settings › General › VPN & Device Management, then turn on full trust in Settings › General › About › Certificate Trust Settings.","connection.howAndroid":"Android: Download it, then search Settings for CA certificate and install it. Where it lives varies by phone, usually under Security or Encryption & credentials.","connection.howRestart":"After installing, quit the browser completely and open it again so it picks up the certificate.","connection.allowHttp":"Allow HTTP access","connection.allowHttpHint":"Lets other devices connect over unencrypted HTTP. Passwords and conversations travel in plain text and others on the same network could see them, so turn this on only on a network you trust.","connection.insecure":"This connection isn't encrypted. Others on the same network could see passwords and conversations.","connection.useHttps":"Switch to HTTPS"},g8={"secrets.intro":"Tokens and passwords your Bots need for their work. Values are encrypted and aren't shown again after saving. A Bot you grant a secret uses it through a placeholder and never sees the value.","secrets.add":"Add secret","secrets.empty":"No secrets yet","secrets.emptyHint":"Add a token or password, then choose which Bots can use it.","secrets.name":"Name","secrets.nameHint":"Capital letters, digits and underscores, starting with a letter. Bots refer to the secret by this name.","secrets.description":"Description","secrets.descriptionPlaceholder":"Optional, such as what it's for","secrets.value":"Value","secrets.newValue":"New value","secrets.newValuePlaceholder":"Leave empty to keep the current value","secrets.showValue":"Show value","secrets.hideValue":"Hide value","secrets.shortValue":"This value is shorter than 8 characters and may not be hidden when it appears in what Bots see.","secrets.noDescription":"No description","secrets.grantCount":{one:"{count} Bot",other:"{count} Bots"},"secrets.notGranted":"Not granted","secrets.unreadable":"Can't decrypt","secrets.unreadableHint":"This value was encrypted with a different master key and can't be read. Enter it again.","secrets.fingerprint":"Fingerprint","secrets.updated":"Updated {time}","secrets.usedCount":{one:"Used {count} time",other:"Used {count} times"},"secrets.neverUsed":"Never used","secrets.grants":"Bots that can use it","secrets.noBots":"No Bots yet.","secrets.addBots":"Add Bots","secrets.noGrants":"No Bot can use it yet.","secrets.searchBots":"Search Bots","secrets.noMatch":"No matching Bots","secrets.allGranted":"Every Bot can already use it.","secrets.revoke":"Remove {name}","secrets.onceTag":"This time only","secrets.edit":"Edit secret","secrets.uses":"Recent uses","secrets.noUses":"No uses yet.","secrets.deletedBot":"Deleted Bot","secrets.useCommand":"Command","secrets.useSsh":"SSH signature","secrets.delete":"Delete secret","secrets.deleteTitle":"Delete {name}?","secrets.deleteBody":"Bots that were granted it can no longer use it. Its use history is kept.","secrets.deleteConfirm":"Delete","secrets.masterKey":"Master key","secrets.keyFile":"Location","secrets.keyHint":"Secrets, model API keys and the HTTPS certificate are encrypted with the master key. It isn't in the data directory, so copy this file too when you back up or move Jarvy. Without it, secrets and API keys must be entered again, and a new HTTPS certificate is made that your other devices need to install again.","secretCard.title":"Request to use the secret {name}","secretCard.valuePlaceholder":"Paste or type the value","secretCard.insecure":"This connection isn't encrypted, so others on the same network could see the value. Switch to HTTPS before entering it.","secretCard.exists":"This secret is already saved in Settings › Secrets.","secretCard.replace":"Replace value","secretCard.keepValue":"Use the saved value","secretCard.unreadable":"The saved value can't be decrypted. Enter it again.","secretCard.value":"Value","secretCard.valueHint":"It's saved encrypted in Settings › Secrets and never shown in the chat.","secretCard.scope":"How long the Bot can use it","secretCard.always":"Always allow","secretCard.alwaysHint":"Until you remove it in Settings › Secrets","secretCard.once":"This time only","secretCard.onceHint":"Ends when the Bot finishes its current task","secretCard.allow":"Allow","secretCard.saveAllow":"Save and allow","secretCard.decline":"Decline","secretCard.allowedAlways":"Allowed {name}. You can remove it in Settings › Secrets","secretCard.allowedOnce":"Allowed {name} this time only","secretCard.declined":"Declined {name}","secretCard.ignored":"Ignored the request for {name}","error.secretNameInvalid":"Use capital letters, digits and underscores, starting with a letter.","error.secretNameTaken":"Another secret already has this name.","error.secretValueMissing":"Enter a value.","error.secretValueTooLong":"The value is too long. The limit is 16 KB.","error.secretDescriptionInvalid":"The description must be a single line of up to 200 characters.","error.secretMissing":"Can't find this secret. It may have been deleted.","error.credentialUnreadable":"The saved API key can't be decrypted. Enter it again in Settings › Models."},v8={"settings.machines":"Environments","machines.intro":"Machines added over SSH. A Bot you allow can switch to one and run commands and edit files there.","machines.add":"Add machine","machines.empty":"No machines yet","machines.emptyHint":"Add one, then choose which Bots may use it.","machines.host":"Host","machines.hostPlaceholder":"192.168.1.20 or dev.example.com","machines.port":"Port","machines.user":"User","machines.name":"Name","machines.directory":"Start directory","machines.directoryPlaceholder":"Home","machines.next":"Next","machines.scanning":"Connecting…","machines.fingerprint":"Host fingerprint","machines.fingerprintHint":"Check it against ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub on that machine before going on.","machines.password":"Password","machines.passwordHint":"Used once to install the key Jarvy makes for this machine. It isn't saved.","machines.connect":"Connect and add","machines.connecting":"Adding…","machines.back":"Back","machines.check":"Check fingerprint","machines.checking":"Checking…","machines.unchanged":"The fingerprint hasn't changed.","machines.changed":"The machine now shows a different fingerprint. If it was reinstalled or replaced, check the new one and accept it; otherwise something may be posing as it.","machines.trust":"Accept new fingerprint","machines.delete":"Delete machine","machines.deleteTitle":"Delete {name}?","machines.deleteBody":"Jarvy's key is removed from the machine first. Bots working there go back to their default environment.","machines.deleteConfirm":"Delete","machines.forceTitle":"Can't reach {name}","machines.forceBody":"Jarvy's key stays in ~/.ssh/authorized_keys there, on the line ending in {comment}; you can remove it later. Delete anyway?","machines.forceConfirm":"Delete anyway","machineCard.title":"Request to add {name}","machineCard.existing":"This machine is already in Settings › Environments.","machineCard.add":"Connect and add","machineCard.allow":"Allow","machineCard.decline":"Decline","machineCard.added":"Added {name}","machineCard.granted":"Allowed {name}","machineCard.declined":"Declined to add {name}","machineCard.ignored":"Ignored the request for {name}","environment.awayMachine":"Now on {name} (the Bot switched there itself).","error.machineMissing":"This machine wasn't found. It may have been deleted.","error.machineNameTaken":"Another machine already has this name.","error.sshPasswordMissing":"Enter the password.","error.sshKeyUnreadable":"This machine's key can't be decrypted with the current master key. Delete the machine and add it again.","error.sshBadHost":"The host must be a host name or an IP address.","error.sshBadUser":"Enter a user name on that machine.","error.sshBadPort":"The port must be 1–65535.","error.sshBadDirectory":"The start directory must be an absolute path or start with ~/.","error.sshAuthFailed":"The login was refused. Check the user name and password.","error.sshUnreachable":"Can't reach this machine. Check the host, port and network.","error.sshHostKeyChanged":"The machine shows a different fingerprint from the accepted one, so Jarvy didn't connect.","error.sshUnsupported":"Only Linux and macOS are supported for now.","error.sshFailed":"SSH failed: {detail}"},y8={"tasks.title":"Scheduled tasks","tasks.empty":"No scheduled tasks","tasks.add":"New task","tasks.edit":"Edit","tasks.delete":"Delete","tasks.deleteTitle":"Delete “{name}”?","tasks.deleteBody":"It won't run again. To stop it for a while, turn it off instead.","tasks.toggle":"Turn {name} on or off","tasks.next":"Next {time}","tasks.paused":"Off","tasks.done":"Done","tasks.newTitle":"New task","tasks.editTitle":"Edit task","tasks.name":"Name","tasks.namePlaceholder":"Morning news","tasks.instruction":"What to do","tasks.instructionPlaceholder":"Read the front pages of the news sites I follow and send me the three stories worth reading, with a line on each.","tasks.when":"When","tasks.kind.once":"Once","tasks.kind.every":"Repeat","tasks.kind.daily":"Daily","tasks.kind.weekly":"Weekly","tasks.at":"Date and time","tasks.everyCount":"Every","tasks.unit.minutes":"minutes","tasks.unit.hours":"hours","tasks.time":"Time","tasks.weekday":"Day","tasks.minimum":"5 minutes at the least.","tasks.saveFailed":"Couldn't save the task","tasks.changeFailed":"Couldn't change the task","tasks.loadFailed":"Couldn't load the tasks","tasks.schedule.once":"Once, {time}","tasks.schedule.minutes":{one:"Every minute",other:"Every {count} minutes"},"tasks.schedule.hours":{one:"Every hour",other:"Every {count} hours"},"tasks.schedule.daily":"Daily at {time}","tasks.schedule.weekly":"Every {day} at {time}","error.taskTimePast":"That time has already passed. Pick a time in the future.","error.taskScheduleInvalid":"Check the schedule: every 5 minutes at the least, and a valid time of day.","error.taskInvalid":"Give the task a name and say what to do."},x8={...s8,...c8,...u8,...d8,...f8,...h8,...m8,...p8,...g8,...v8,...y8},b8={"locale.name":"中文","locale.short":"中","common.close":"关闭","common.continue":"继续","common.failed":"操作失败,请重试。","common.listSeparator":",","login.subtitle":"登录以继续","login.form":"登录","login.username":"用户名","login.password":"密码","login.showPassword":"显示密码","login.hidePassword":"隐藏密码","login.submit":"登录","login.submitting":"正在登录…","login.wrong":"用户名或密码不正确。","login.tooMany":"尝试次数过多,请稍后再试。","login.offline":"无法连接到 Jarvy,请检查网络后重试。","login.themeLight":"切换为浅色主题","login.themeDark":"切换为深色主题","general.language":"语言","general.theme":"主题","general.light":"浅色","general.dark":"深色","about.tagline":"你和 AI Bot 一起工作的群聊,完整运行在你自己的电脑上。","about.version":"版本 {version}","about.source":"源代码","about.package":"npm 包","about.license":"许可证","about.notices":"第三方声明","status.signedIn":"已登录","status.signedOut":"未登录","status.configured":"已配置","status.notConfigured":"未配置","account.menu":"账户菜单","account.menuFor":"{name} 的账户菜单","account.toggleTheme":"切换主题","account.signOut":"退出登录","entry.menu":"会话操作","entry.pin":"置顶","entry.unpin":"取消置顶","entry.mute":"免打扰","entry.unmute":"取消免打扰","entry.botInfo":"Bot 信息","entry.channelInfo":"频道信息","entry.deleteBot":"删除 Bot","entry.deleteChannel":"删除频道","hint.reaction":"{actor} 用 {emoji} 回应了你的消息","hint.reactionInThread":"{actor} 用 {emoji} 回应了你在「{title}」中的消息","hint.threadSummary":"{actor} 更新了线程「{title}」的摘要","hint.summary":"{actor} 更新了线程摘要","hint.notice":"{actor} 更新了公告","app.connecting":"正在连接 Jarvy…","app.channelDeleted":"频道已删除","app.botDeleted":"{name} 已删除","app.notInChannel":{one:"{names} 不在本频道,没有收到通知",other:"{names} 不在本频道,没有收到通知"},"app.memberAdded":"{name} 已加入 #{channel}","app.sourceGone":"原消息已不存在","ui.closeNamed":"关闭{name}","ui.copied":"已复制","ui.copyFailed":"复制失败","ui.copyCode":"复制代码","ui.image":"[图片:{alt}]","ui.imageHidden":"外部图片已隐藏","app.deleteChannelTitle":"删除频道 #{name}","app.deleteChannelBody":"频道里的消息、线程和附件都会被删除,且无法恢复。","app.resizePane":"拖动调整侧栏宽度","common.cancel":"取消","common.save":"保存","common.create":"创建","common.delete":"删除","common.retry":"重试","common.back":"返回","common.add":"添加","common.saveFailed":"保存失败","common.openNav":"打开会话列表","common.you":"你","common.member":"成员","common.noMatch":"没有匹配的成员","common.searchMembers":"搜索成员","common.attachment":"[附件]","actions.reply":"回复这条消息","actions.react":"添加表情回应","actions.pickEmoji":"选择表情","actions.more":"更多","dialogs.candidates":"可添加的成员","dialogs.allInside":"所有成员都已在频道中","dialogs.addCount":"添加({count})","dialogs.addFailed":"添加成员失败","dialogs.optional":"可选","dialogs.deleteSection":"删除分组「{name}」?其中的频道会移到「频道」下。","dialogs.deleteFailed":"删除失败,请重试","dialogs.editSection":"编辑频道分组","dialogs.sectionName":"分组名称","dialogs.newSection":"新分组","api.offline":"无法连接到 Jarvy,请检查网络后重试。","api.historyFailed":"无法加载聊天记录,请重试。","error.autoconfigModel":"请填写模型 ID。","error.autoconfigSource":"所选的配置来源无效,请重新选择。","error.botMissing":"找不到这个 Bot,它可能已被删除。","error.agentUndeletable":"主 Bot 不能删除,但可以改名或停止。","error.chatAccessChanged":"你在这个聊天中的权限已变化,请刷新后重试。","error.computerFailed":"沙箱启动失败。","error.computerMissing":"这个 Bot 没有沙箱。","error.dockerUnavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","error.connectionMissing":"找不到这个模型连接,它可能已被删除。","error.credentialChanged":"凭证已更改,请重试。","error.credentialScope":"凭证连接不匹配。","error.credentialsMissing":"请先配置此模型连接的凭证。","error.dataLocked":"Jarvy 已经在运行,或数据目录被其他程序占用。","error.discoveryFormat":"这个地址返回的不是所选协议的模型列表,请检查 API URL 和协议。","error.discoveryHttp":"获取模型失败:HTTP {status}。","error.discoveryKey":"请填写 API Key。","error.discoveryProtocol":"所选协议不支持获取模型列表,请手动添加模型。","error.discoveryUrl":"API URL 无效。","error.discoveryUrlMissing":"请填写 API URL。","error.historyMissing":"找不到这条 History 记录。","error.invalidCredential":"凭证格式无效。","error.invalidRun":"Bot 的状态刚刚变化,请刷新后重试。","error.loginInput":"请填写授权码或回调地址。","error.loginOption":"请选择登录方式。","error.loginStep":"登录步骤已变化,请重新开始。","error.loginFailed":"登录操作失败,请刷新后重试。","error.messageMissing":"找不到这条消息,它可能已被删除。","error.modelIncomplete":"请补全模型的上下文窗口和最大输出。","error.modelMissing":"找不到这个模型,它可能已被移除。","error.modelRequestFailed":"模型请求失败:{detail}","error.modelRequired":"请先为 Bot 选择模型。","error.modelSwitchUncertain":"模型切换未完成,请重新选择模型。","error.nameTaken":"名称已被其他成员使用。","error.providerNameTaken":"已有同名的 Provider。","error.connectionInUse":"{bots} 正在使用这个 Provider 的模型,请先换成其他模型再删除。","error.questionClosed":"问题已结束。","error.questionExpired":"这个问题已忽略,Bot 不再等待回答。","error.runtimeFailed":"Bot 运行失败,请检查它的模型设置后重试。","error.sessionCorrupt":"Bot 启动失败(会话文件无法读取)。","error.sessionMismatch":"Bot 启动失败(会话文件不匹配)。","error.sessionMissing":"Bot 启动失败(会话文件缺失)。","error.sessionPath":"Bot 启动失败(会话文件路径无效)。","error.stopping":"Jarvy 正在关闭,请稍后再试。","error.thinkingFormat":"不支持此思考格式。","error.toolsMissing":"Bot 的工具加载失败,请重启 Bot 后重试。","error.unsafeReplay":"上次中断时 Bot 可能已经执行了操作,为避免重复,不会自动重试。","error.discoveryUnreachable":"无法连接 {host},请检查 API URL。","color.gray":"灰","color.blue":"蓝","color.green":"绿","color.amber":"琥珀","color.rose":"粉","color.violet":"紫","avatar.working":"工作中","avatar.openInfo":"查看 {name} 的 Bot 信息"},j8={"settings.title":"设置","settings.sections":"设置分类","settings.general":"通用","settings.models":"模型","settings.network":"网络","settings.secrets":"密钥","settings.about":"关于","group.custom":"自定义 API","group.subscription":"订阅服务","group.apiKey":"API Key","models.intro":"连接模型服务,Bot 从这里选择模型。","models.add":"添加 Provider","models.empty":"还没有模型连接","models.emptyHint":"添加一个 Provider 后,就能为 Bot 选择模型。","models.count":{one:"{count} 个模型",other:"{count} 个模型"},"models.none":"尚未添加模型","picker.intro":"选择服务类型,下一步填写凭证与模型。","picker.back":"返回模型页面","picker.search":"搜索 Provider","picker.searchPlaceholder":"搜索 Provider…","picker.customHint":"任意 OpenAI / Anthropic / Gemini 兼容端点","picker.oauthHint":"账号登录","picker.keyHint":{one:"API Key · {count} 个模型",other:"API Key · {count} 个模型"},"picker.loading":"正在加载 Provider…","picker.retry":"重试","picker.noMatch":"没有匹配的 Provider","picker.noMatchHint":"换个关键词试试。","editor.back":"返回 Provider 列表","editor.delete":"删除 Provider","editor.connection":"连接","editor.providerName":"Provider 名称","editor.name":"连接名称","editor.protocol":"API 协议","editor.url":"API URL","editor.defaultUrl":"使用 Provider 默认地址","editor.key":"API Key","editor.keyPlaceholder":"输入 API Key","editor.keySaved":"已保存,留空则不修改","editor.settings":"连接设置","editor.models":"模型列表","editor.selected":"已选 {selected} / {total}","editor.fetch":"获取模型列表","editor.fetching":"正在获取…","editor.fetched":{one:"获取到 {count} 个模型",other:"获取到 {count} 个模型"},"editor.noneReturned":"此端点没有返回模型","editor.fetchFailed":"获取模型列表失败","editor.loadingCatalog":"正在加载模型目录…","editor.autoSelected":"自动配置已选","editor.addManually":"手动添加","editor.filter":"筛选模型","editor.filterPlaceholder":"筛选模型…","editor.selectVisible":"全选当前结果","editor.empty":"还没有模型","editor.emptyCustom":"获取模型列表,或手动添加模型。","editor.emptyBuiltin":"可以手动添加模型。","editor.autoSummary":"{parts};保存后生效","editor.autoMatched":{one:"已配置 {count} 个",other:"已配置 {count} 个"},"editor.autoChoose":{one:"{count} 个需选择来源",other:"{count} 个需选择来源"},"editor.autoNone":{one:"{count} 个在目录中未找到",other:"{count} 个在目录中未找到"},"editor.autoFailed":{one:"{count} 个失败",other:"{count} 个失败"},"editor.confirmDelete":"删除「{name}」及其模型?","editor.deleteFailed":"删除失败","editor.saveFailed":"保存未完成","editor.saved":"已保存","editor.saving":"正在保存…","editor.save":"保存","editor.footer":"勾选的模型会在保存后出现在 Bot 的模型列表中。","card.defaultProtocol":"使用 Provider 默认协议","card.modelId":"模型 ID","card.modelName":"模型名称","card.optional":"可选","card.newModel":"新模型","card.enterId":"填写模型 ID","card.use":"使用 {name}","card.remove":"移除 {name}","card.image":"图片","card.reasoning":"推理","card.capabilities":"能力","card.reasoningThinking":"推理 / 思考","card.imageInput":"图片输入","card.specs":"模型规格","card.hidePrices":"收起价格","card.editPrices":"编辑价格","card.context":"上下文窗口 · tokens","card.maxOutput":"最大输出 · tokens","card.costTitle":"每百万 tokens 价格","card.costInput":"输入","card.costOutput":"输出","card.costCacheRead":"缓存读取","card.costCacheWrite":"缓存写入","card.notProvided":"未提供","card.advanced":"高级设置","card.apiOverride":"指定 API 协议","card.headers":"请求头","card.headerSaved":"已保存,留空则不修改","card.addHeader":"添加请求头","card.removeHeader":"移除请求头","card.compat":"兼容参数 · compat","card.jsonObject":"请输入 JSON 对象","auto.run":"自动配置","auto.pending":"正在配置…","auto.failed":"自动配置失败","auto.tagChoose":"需选择配置来源","auto.tagNone":"目录中未找到","auto.official":"原厂","auto.matched":"已按 {source}{note} 填入配置{suffix}","auto.reseller":"(来自转售目录,非原厂)","auto.applied":";保存后生效。","auto.apiMismatch":"目录中此模型使用 {api} 协议,与当前协议不同,思考格式和兼容参数未填入。","auto.changeSource":"更换来源","auto.multiple":"同名模型有多个原厂来源,请选择:","auto.similar":"目录中没有 {modelId},以下是相似模型:","auto.notFound":"目录中没有找到此模型,请手动填写。","thinking.title":"思考","thinking.format":"思考格式","thinking.protocolDefault":"协议默认","thinking.onlyCompletions":"仅 OpenAI Chat Completions 协议使用","thinking.levels":"思考档位","thinking.level.off":"关闭","thinking.level.minimal":"极低","thinking.level.low":"低","thinking.level.medium":"中","thinking.level.high":"高","thinking.level.xhigh":"超高","thinking.level.max":"最高","thinking.levelName":"{level}档位","thinking.levelValue":"{level}档位发送值","thinking.supportedDefault":"支持(默认值)","thinking.unsupported":"不支持","thinking.supportedCustom":"支持,发送指定值","thinking.supported":"可选档位:{levels}","auth.title":"账户授权","auth.running":"正在授权","auth.openPage":"打开授权页面","auth.code":"验证码:{code}","auth.browser":"浏览器登录(OAuth)","auth.deviceCode":"设备码登录","auth.redirectFull":"完整回调地址","auth.redirectOrCode":"授权码或回调地址","auth.manualNote":"完成授权后若未自动返回,请粘贴回调地址。","auth.waiting":"等待授权完成…","auth.cancel":"取消授权","auth.configureCredential":"配置凭证","auth.signInAgain":"重新登录","auth.signIn":"登录账户","auth.removeCredential":"移除凭证","auth.signOut":"退出登录","auth.statusFailed":"无法获取登录状态","auth.refresh":"刷新状态","picker.loadFailed":"无法加载 Provider 列表"},w8={"sidebar.label":"会话列表","sidebar.create":"打开新建菜单","sidebar.createMenu":"新建菜单","sidebar.newChannel":"新建频道","sidebar.newSection":"新建频道分组","sidebar.newBot":"新建 Bot","sidebar.alerts":"{count} 条发给你的未读","sidebar.unread":"{count} 条未读","sidebar.said":"{name}:{text}","sidebar.atMe":"[有人@我]","sidebar.more":"{name} 的更多操作","sidebar.asking":"(等你回答)","sidebar.working":"(工作中)","sidebar.pinned":"已置顶","sidebar.muted":"免打扰","sidebar.hasUnread":"有未读","sidebar.editSection":"编辑分组:{name}","sidebar.search":"搜索会话和消息","sidebar.results":"搜索结果","sidebar.chats":"会话","sidebar.nav":"频道与私信","sidebar.followed":"我关注的线程","sidebar.channels":"频道","sidebar.dms":"私信","sidebar.noDms":"暂无私信","search.title":"搜索","search.paneLabel":"聊天内搜索","search.inThread":"本线程","search.inDm":"本私信","search.close":"关闭搜索","search.placeholder":"搜索消息","search.channelPlaceholder":"搜索本频道及其线程中的消息","search.prompt":"输入关键词","search.searching":"正在搜索…","search.noMessages":"没有找到消息","search.count":{one:"{count} 条,最新在前",other:"{count} 条,最新在前"},"search.countLatest":"显示最近 {count} 条","search.showAll":"查看全部 {count} 条","search.threads":"线程","search.channels":"频道(主题与公告)","search.messages":"消息","search.channel":"频道","member.unknown":"未知成员","member.deleted":"{name}(已删除)","members.view":"查看 {name}","members.remove":"移出 {name}","members.count":{one:"{count} 位成员",other:"{count} 位成员"},"members.people":"用户","members.removeTitle":"把 {name} 移出 #{channel}","members.removeBody":"移出后,对方将无法再收到此频道的消息。","members.removeConfirm":"移出","chat.area":"对话区域","chat.botDms":"{name} 与其他 Bot 的私信","chat.botStatus":"Bot 状态","chat.transcript":"聊天记录","chat.loading":"正在加载…","chat.empty":"暂无消息","chat.start":"与 {name} 开始对话","chat.loadingOlder":"正在加载更早的消息…","chat.toLatest":"回到最新消息","chat.unseen":{one:"{count} 条新消息",other:"{count} 条新消息"},"chat.toChannel":"发消息到 #{name}","chat.toBot":"发消息给 {name}…","chat.pickModel":"为这个 Bot 选择模型后才能发消息","chat.pick":"选择一个会话","channel.infoFor":"频道信息:{name}","channel.membersCount":{one:"成员 {count}",other:"成员 {count}"},"channel.members":"成员","channel.search":"搜索频道消息(Ctrl+F)","channel.threads":"线程","notice.title":"公告","notice.edit":"编辑公告","notice.content":"公告内容","notice.none":"暂无公告","notice.version":"第 {version} 版","chat.newBelow":"以下为新消息","channel.echo":"回复了线程「{title}」","channel.replies":{one:"{count} 条回复",other:"{count} 条回复"},"channel.threadDone":"已完成","channel.lastReply":"最后回复 {time}","channel.replyInThread":"在线程中回复","info.edit":"编辑{name}","info.memberList":"成员列表","info.back":"返回频道信息","info.addMembers":"添加成员","info.name":"名称","info.newChannel":"新频道","info.topic":"主题","info.noTopic":"暂无主题","info.section":"分组","info.menu":"频道","info.noSection":"无","mention.menu":"提及成员","mention.outside":"不在本频道中","mention.outsideList":"不在本频道中的成员","mention.searchOutside":"搜索不在本频道中的成员","mention.invites":"选择后会把对方加入本频道","quote.inline":"「{text}」","quote.by":"{name}:","quote.remove":"移除引用:{text}","quote.tooMany":"一条消息最多引用 {count} 段","quote.selection":"选中的文字","quote.copy":"复制","quote.quote":"在回复中引用","composer.busy":"附件上传中,请稍后再添加。","composer.tooMany":"每条消息最多添加 {count} 个附件。","composer.size":"附件不能为空,也不能超过 10 MB。","composer.pasted":"粘贴图片","composer.removeFile":"移除附件:{name}","composer.uploading":"正在上传:{name}","composer.replying":"回复","composer.cancelReply":"取消回复","composer.drop":"松开以添加附件","composer.attach":"添加附件","composer.input":"输入消息","composer.send":"发送消息","files.preview":"预览 {name}","files.download":"下载 {name}","files.gone":"附件不存在或已被删除","files.readFailed":"无法打开文件({status})","files.readError":"无法打开文件","files.kindImage":"图片","files.kindSvg":"SVG","files.kindHtml":"HTML","files.kindMarkdown":"Markdown","files.kindText":"文本","files.kindFile":"文件","files.downloadFile":"下载文件","files.showPreview":"预览","files.showSource":"源码","files.showText":"原文","files.openTab":"在新标签页中打开(隔离运行)","files.narrow":"收起预览","files.widen":"扩大预览","files.closePreview":"关闭附件预览","files.running":"脚本正在隔离环境中运行:可以联网,但无法读取 Jarvy 的数据。","files.scripts":{one:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。",other:"这个 HTML 含有 {count} 段脚本{hosts},当前未运行。运行后脚本可以联网,但无法读取 Jarvy 的数据。"},"files.scriptHosts":"(引用 {hosts})","files.andMore":" 等","files.stop":"停止脚本","files.run":"运行脚本","files.downloadToView":"此文件请下载后查看","files.tooLarge":"文件超过 1 MB,无法在页面内预览。","files.unsupported":"此文件不支持在页面内预览。","files.reading":"正在读取文件…","files.runningTitle":"{name}(运行中)","files.previous":"上一个附件","files.choose":"选择预览文件","files.next":"下一个附件","question.failed":"提交失败","question.dismissed":"已忽略","question.chose":"已选:{answer}","question.dismissLabel":"关闭问题,不回答","question.dismiss":"跳过","question.multiple":"可多选","question.note":"补充说明(可选)","question.own":"或者自己填写…","question.ownLabel":"自己填写回答","question.confirmCount":"确定({count})","question.confirm":"确定","question.send":"发送","directs.back":"返回列表","directs.between":"{name} 与 {other}","directs.readOnly":"只读","files.kindVideo":"视频","files.kindAudio":"音频","files.cantPlay":"当前浏览器无法播放","files.cantPlayHint":"下载后用播放器打开。"},S8={"threadSort.title":"排序","threadSort.current":"排序:{order}","threadSort.updated":"最近更新","threadSort.created":"创建时间","threadSort.status":"状态","threads.list":"线程列表","threads.closeList":"关闭线程列表","threads.byStatus":"按状态筛选","threads.openCount":"进行中 {count}","threads.doneCount":"已完成 {count}","threads.all":"全部","threads.loading":"正在加载…","threads.none":"暂无线程","threads.following":"已关注","threads.filter":"筛选","threads.unreadCount":"未读 {count}","threads.unread":"未读","threads.noneUnread":"暂无未读线程","threads.noneOpen":"暂无进行中的线程","threads.noneDone":"暂无已完成的线程","threads.notFollowing":"未关注","threads.pick":"选择一个线程","threads.open":"进行中","thread.rename":"修改标题","thread.title":"线程标题","thread.toggleStatus":"切换状态","thread.summary":"摘要","thread.editSummary":"编辑摘要","thread.conclude":"完成并把摘要发到 #{channel}","thread.addSummary":"添加摘要","thread.sourceElsewhere":"原消息不在这个线程里","thread.label":"线程","thread.backToList":"返回线程列表","thread.inChannel":"在频道中查看","thread.search":"搜索线程消息(Ctrl+F)","thread.followingHint":"新回复会计入未读","thread.notFollowingHint":"新回复不会计入未读","thread.follow":"关注","thread.expand":"展开","thread.collapse":"收起到侧栏","thread.close":"关闭线程","thread.conclusion":"结论:","thread.concluded":"已完成,摘要已发到 #{channel}","thread.noReplies":"暂无回复","thread.toLatest":"回到最新回复","thread.reply":"回复线程"},k8={"usage.title":"用量","usage.back":"返回 Bot 信息","usage.range":"时间范围","usage.today":"今天","usage.days":"{count} 天","usage.all":"全部","usage.refresh":"刷新","usage.refreshLabel":"刷新用量","usage.retry":"重试","usage.loading":"正在加载用量…","usage.loadFailed":"用量加载失败","usage.empty":"这段时间没有模型调用","usage.model":"模型","usage.calls":"调用","usage.input":"输入","usage.output":"输出","usage.cacheRead":"缓存读取","usage.cacheWrite":"缓存写入","usage.cost":"费用","usage.total":"合计","usage.unpriced":"未设置价格","usage.note":"输入、输出和缓存均以 token 计。","usage.notePartial":"输入、输出和缓存均以 token 计;合计费用不含未设置价格的模型。","activity.error":"运行出错","activity.running":"运行中","activity.reasoning":"思考中","activity.texting":"回复中","activity.toolCalling":"使用工具","activity.asking":"等你回答","activity.noModel":"未设置模型","activity.idle":"空闲","activity.stopped":"未运行","bot.saved":"已保存","bot.changeFailed":"修改失败","bot.noDescription":"还没有描述","bot.color":"形象颜色","bot.contextHint":"截至 Bot 上次回复时,模型报告的上下文占用","bot.contextStale":"最近一次模型请求异常,当前显示的是上一次请求成功时的上下文占用。","bot.context":"上下文","bot.unknown":"未知","bot.tokens":"{used} / {window} tokens","bot.profile":"个人设定","bot.description":"描述","bot.descriptionPlaceholder":"这个 Bot 能帮你做什么?","bot.personaPlaceholder":"Bot 的性格、职责与行为偏好","bot.personaHint":"会写进 Bot 的系统提示词,从它下一次开始工作时生效。","bot.unsaved":"有未保存的修改","bot.saving":"正在保存…","bot.runtime":"运行","agent.title":"主 Bot","agent.intro":"{name} 是你的主 Bot,替你打理 Jarvy 本身。在私信或频道里跟它说一声,它就能:","agent.create":"新建 Bot,修改它们的名字、描述和 Persona","agent.model":"给 Bot 选模型和思考强度","agent.run":"启动、停止 Bot,查看用量","agent.delete":"删除 Bot、频道、频道分组,或把成员移出频道,每次都先弹卡片请你确认","agent.note":"主 Bot 不能删除,但可以改名或停止。模型连接和密钥仍由你在设置里添加。","bot.status":"状态","bot.statusHint":"停止后对话记录会保留;启动后,Bot 收到新消息才会开始工作","bot.aborting":"正在中断…","bot.abort":"中断当前任务","bot.starting":"正在启动…","bot.stopping":"正在停止…","bot.start":"启动","bot.stop":"停止","bot.workspace":"工作区","bot.copyWorkspace":"复制工作区路径","bot.activity":"活动历史","bot.activityHint":"消息和 History 记录","bot.usageHint":"按模型统计 token 和费用","bot.subscriptions":"订阅","bot.noSubscriptions":"暂无订阅","bot.threadIn":"线程 · #{channel}","botModel.auto":"使用默认强度","botModel.off":"关闭思考","botModel.minimal":"最少思考","botModel.low":"少量思考","botModel.medium":"适中思考","botModel.high":"更多思考","botModel.xhigh":"高强度思考","botModel.max":"最高强度思考","botModel.loadFailed":"无法加载模型列表","botModel.switchFailed":"切换模型失败","botModel.pick":"选择 Bot 模型","botModel.broken":"这个模型已不可用,请重新选择","botModel.choose":"选择模型","botModel.filter":"筛选 Bot 模型","botModel.filterPlaceholder":"筛选模型…","botModel.list":"Bot 模型","botModel.noMatch":"没有匹配的模型","botModel.none":"暂无模型,请先在设置中添加","botModel.manage":"管理模型","botModel.thinking":"思考强度","botModel.pickThinking":"选择思考强度","botModel.loading":"正在加载模型…","botModel.switching":"正在切换…","botModel.pickFor":"为 {name} 选择模型","deleteBot.title":"删除 {name}","deleteBot.after":"删除后:","deleteBot.chats":{one:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。",other:"它的 {count} 个私信、频道成员身份和订阅都会被删掉。"},"deleteBot.messages":"它在频道和线程里发过的消息会保留,发送者显示为「{name}」,名字可以重新使用。","deleteBot.history":"它的会话历史和未完成的任务都会被清除。","deleteBot.files":"同时删除工作区文件夹","deleteBot.filesHint":"工作区里可能有它生成的文件,不勾选则保留。","deleteBot.deleting":"正在删除…","deleteBot.working":"正在处理…","history.reasoning":"思考","history.text":"正文","history.empty":"(空)","history.image":"History 中的图片","history.toolCall":"工具调用","history.toolResult":"工具结果","history.error":"出错","history.related":"查看关联记录 #{id}","history.result":"结果","history.call":"调用","history.details":"结构化结果","history.view":"记录显示方式","history.content":"内容","history.json":"原始 JSON","history.contentLabel":"记录内容","history.tools":"工具定义","history.toolsRemoved":"移除的工具","history.stopReason":"结束原因","activity.detailFailed":"无法加载记录","activity.detailLoading":"正在加载记录…","activity.openChat":"打开聊天","activity.sentBy":"发送调用 #{id}","activity.roleSystem":"系统","activity.roleUser":"输入","activity.roleAssistant":"助手","activity.timeline":"Bot 活动时间线","activity.chatMessage":"聊天发言 {id}","activity.viewMessage":"查看聊天消息 {sequence} · {chat}","activity.attachmentOnly":"附件消息","activity.attachments":{one:"{count} 个附件",other:"{count} 个附件"},"activity.viewSentBy":"查看发送调用 #{id}","activity.historyRecord":"History 记录 #{id}","activity.viewHistory":"查看 History #{id} · {role}","activity.emptyMessage":"(空消息)","activity.loadFailed":"活动记录加载失败","activity.backToTimeline":"返回时间线","activity.chatRecord":"聊天记录","activity.newestFirst":"最新记录在前","activity.refresh":"刷新活动历史","activity.reading":"正在加载…","activity.columnChat":"聊天","activity.columnTime":"时间","activity.loading":"正在加载活动记录…","activity.empty":"还没有活动记录","activity.emptyHint":"聊天发言与 History 会显示在这里","activity.newer":"较新","activity.page":"第 {page} 页","activity.older":"较早","activity.historyDetail":"History 记录详情","activity.chatDetail":"聊天记录详情","activity.toolCall":"调用 {name}","activity.toolResult":"{name} · 执行结果","activity.toolFailed":"{name} · 执行出错","activity.images":{one:"{count} 张图片",other:"{count} 张图片"},"bot.newName":"新 Bot","bot.newNameN":"新 Bot {n}"},C8={"npc.toolbar":"NPC 原型","npc.replay":"重播","npc.mood":"基础心情","npc.mood.normal":"普通","npc.mood.happy":"开心","npc.mood.sad":"难过","npc.mood.angry":"生气","npc.mood.dizzy":"晕","npc.poses":"动作","npc.pose.sleep":"睡觉","npc.pose.idle":"空闲","npc.pose.think":"思考","npc.pose.mutter":"自言自语","npc.pose.say":"对你说话","npc.pose.ask":"等你回答","npc.pose.read":"读文件","npc.pose.work":"改文件、跑命令","npc.pose.compact":"压缩上下文","npc.pose.busy":"重试","npc.pose.failed":"报错","npc.pose.done":"做完了","npc.pose.groom":"舔爪子","npc.expand":"展开过程","npc.collapse":"收起","npc.panel":"这一轮","npc.state.running":"进行中","npc.state.ok":"成功","npc.state.failed":"失败","npc.duration":"{value} 秒","npc.done":"做完了 · {duration}","npc.mutter":"({text})","npc.to":"→ {chat}","npc.step.think":"思考","npc.step.mutter":"自言自语","npc.step.read.running":"在读 {target}","npc.step.read.ok":"读了 {target}","npc.step.write.running":"在改 {target}","npc.step.write.ok":"改好了 {target}","npc.step.run.running":"在跑 {target}","npc.step.run.ok":"跑完了 {target}","npc.step.run.failed":"{target} 失败了","npc.step.compact.running":"在整理上下文","npc.step.compact.ok":"整理好了上下文","npc.step.ask.running":"在等你回答","npc.step.ask.ok":"你选了「{answer}」","npc.step.say.running":"在回复你","npc.step.say.ok":"回复了你","npc.step.post.running":"在发到 {chat}","npc.step.post.ok":"发到了 {chat}","npc.demo.think1":"fish 说线程面板打开时会跳一下。可能是滚动的时机不对。先看看 ThreadPane 是怎么滚动的。","npc.demo.think2":"它在回复还没量好高度时就滚了。改成布局之后再滚应该就好。回复数也要算进依赖里。","npc.demo.mutter1":"改好了,先跑一遍构建看看。","npc.demo.mutter2":"嗯……类型没过,ref 可能是空的。","npc.demo.channel":"研发","npc.demo.post":"线程面板打开时跳一下的问题修好了,构建通过,等 fish 确认。","npc.demo.question":"修好了。要不要顺便更新文档里的截图?","npc.demo.yes":"要,一起更新","npc.demo.no":"先不用","npc.demo.replyYes":"好了:线程面板现在打开就停在最新回复,不会再跳;文档里的截图也换成了新的。构建通过。","npc.demo.replyNo":"好了:线程面板现在打开就停在最新回复,不会再跳。构建通过,截图先没动。","npc.live.omitted":"……省略 {count} 字……","npc.live.tokens":"上下文:{before} → {after} tokens","npc.live.compact.running":"在整理上下文","npc.live.compact.ok":"整理好了上下文","npc.live.compact.failed":"整理上下文失败了","npc.live.retry.running":"在重试(第 {attempt}/{max} 次)","npc.live.retry.ok":"重试成功","npc.live.retry.failed":"重试失败了","npc.live.read.running":"在读 {target}","npc.live.read.ok":"读了 {target}","npc.live.read.failed":"没读到 {target}","npc.live.edit.running":"在改 {target}","npc.live.edit.ok":"改好了 {target}","npc.live.edit.failed":"没改成 {target}","npc.live.write.running":"在写 {target}","npc.live.write.ok":"写好了 {target}","npc.live.write.failed":"没写成 {target}","npc.live.run.running":"在跑 {target}","npc.live.run.ok":"跑完了 {target}","npc.live.run.failed":"{target} 失败了","npc.live.script.running":"在跑一段脚本","npc.live.script.ok":"跑完了一段脚本","npc.live.script.failed":"脚本出错了","npc.live.tool.running":"在用 {tool}","npc.live.tool.ok":"用了 {tool}","npc.live.tool.failed":"{tool} 出错了","npc.live.sendFailed":"消息没发出去","npc.live.switch.running":"在切换工作环境","npc.live.switch.ok":"切换了工作环境","npc.live.switch.failed":"没能切换工作环境","npc.live.askFailed":"问题没发出去","npc.live.askClosed":"问题关掉了","npc.live.answerBelow":"在下面的卡片里回答","npc.live.answerIn":"去 {chat} 里回答","npc.live.browse.running":"在翻看 {chat}","npc.live.browse.ok":"翻看了 {chat}","npc.live.browseAll.running":"在翻看聊天","npc.live.browseAll.ok":"翻看了聊天","npc.done.interrupted":"被打断了 · {duration}","npc.done.failed":"这一轮失败了 · {duration}"},N8={"environment.title":"工作环境","environment.computer":"沙箱","environment.computerHint":"由 Jarvy 创建和管理、只供这个 Bot 使用的 Linux 容器,工作区就在其中。推荐。","environment.noDocker":"需要运行 Jarvy 的电脑装有 Docker。","environment.host":"你的电脑","environment.hostHint":"运行 Jarvy 的这台电脑,可以访问你的文件。","environment.default":"默认环境","environment.defaultHint":"它平时在这里运行命令、读写文件。","environment.awayHost":"当前在你的电脑上(由 Bot 自行切换)。","environment.awayComputer":"当前在它的沙箱里(由 Bot 自行切换)。","environment.details":"沙箱详情","environment.sandboxAbout":"只供这个 Bot 使用的 Linux 容器,工作区是它在其中的主目录。","environment.external":"可以使用的外部环境","environment.hostAbout":"运行 Jarvy 的这台电脑","environment.externalHint":"开启后,Bot 可以在需要时自行切换过去;关闭时如果它正在使用,会被切回默认环境。","environment.accessFailed":"无法修改可使用的环境","environment.state.preparing":"准备中","environment.state.running":"运行中","environment.state.stopped":"已停止","environment.state.failed":"出错","environment.state.unavailable":"没有 Docker","environment.hint.preparing":"首次创建沙箱需要几分钟,用于在本机构建镜像。","environment.hint.running":"会一直运行,直到你停止。","environment.hint.stopped":"Bot 需要时会自动启动。","environment.hint.failed":"启动失败,请重试。","environment.hint.unavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","environment.start":"启动","environment.starting":"正在启动…","environment.stop":"停止","environment.stopping":"正在停止…","environment.stopTitle":"停止 {name} 的沙箱?","environment.stopBody":"沙箱里正在运行的程序(如后台服务)会被关闭。已安装的软件和工作区文件都会保留,下次需要时会自动启动。","environment.stopConfirm":"停止","environment.reset":"重置…","environment.resetTitle":"重置 {name} 的沙箱?","environment.resetBody":"沙箱里安装的软件会被清除,恢复到初始状态。工作区文件会保留。","environment.resetConfirm":"重置","environment.changeFailed":"无法切换工作环境"},E8={"connection.lan":"局域网访问","connection.localOnly":"仅限本机","connection.localOnlyHint":"Jarvy 目前只接受这台电脑上的访问。如需在局域网内的其他设备上使用,请用 {flag} 重新启动 Jarvy。","connection.lanHint":"局域网内的其他设备可以通过以下地址访问 Jarvy。","connection.addresses":"访问地址","connection.copy":"复制地址","connection.root":"安全证书","connection.rootHint":"在其他设备上安装后,浏览器会信任与 Jarvy 的连接,不再显示安全警告。","connection.download":"下载证书","connection.fingerprint":"SHA-256 指纹","connection.fingerprintSha1":"SHA-1 指纹","connection.howTo":"安装说明","connection.howMac":"Mac:打开证书将它添加到「钥匙串访问」,双击该证书,在「信任」中将「使用此证书时」设为「始终信任」。","connection.howWindows":"Windows:打开证书,点「安装证书」,选择「将所有的证书都放入下列存储」,再选「受信任的根证书颁发机构」。证书「详细信息」中的「指纹」就是上面的 SHA-1 指纹。","connection.howIos":"iPhone 和 iPad:在 Safari 中下载证书,前往「设置 › 通用 › VPN与设备管理」安装,再在「设置 › 通用 › 关于本机 › 证书信任设置」中针对它启用完全信任。","connection.howAndroid":"Android:下载证书后,在「设置」中搜索「CA 证书」并安装。不同手机的位置不同,通常在「安全」或「加密与凭据」里。","connection.howRestart":"装好后,完全退出浏览器再重新打开,新证书才会生效。","connection.allowHttp":"允许 HTTP 访问","connection.allowHttpHint":"允许其他设备通过未加密的 HTTP 访问。密码和对话内容会以明文传输,可能被同一网络中的他人看到,只建议在可信的网络中开启。","connection.insecure":"当前连接未加密,密码和对话内容可能被同一网络中的他人看到。","connection.useHttps":"切换到 HTTPS"},T8={"secrets.intro":"Bot 工作时需要的 token 和密码。值经过加密保存,保存后不再显示。获得授权的 Bot 通过占位符使用,看不到明文。","secrets.add":"添加密钥","secrets.empty":"还没有密钥","secrets.emptyHint":"添加 token 或密码后,再选择哪些 Bot 可以使用。","secrets.name":"名称","secrets.nameHint":"大写字母、数字和下划线,以字母开头。Bot 通过这个名称引用它。","secrets.description":"说明","secrets.descriptionPlaceholder":"可选,例如用途","secrets.value":"值","secrets.newValue":"新值","secrets.newValuePlaceholder":"留空则不修改","secrets.showValue":"显示值","secrets.hideValue":"隐藏值","secrets.shortValue":"这个值少于 8 个字符,出现在 Bot 能看到的内容里时可能不会被隐藏。","secrets.noDescription":"无说明","secrets.grantCount":{one:"{count} 个 Bot",other:"{count} 个 Bot"},"secrets.notGranted":"未授权","secrets.unreadable":"无法解密","secrets.unreadableHint":"这个值是用另一个主密钥加密的,无法读取,请重新输入。","secrets.fingerprint":"指纹","secrets.updated":"更新于 {time}","secrets.usedCount":{one:"已使用 {count} 次",other:"已使用 {count} 次"},"secrets.neverUsed":"从未使用","secrets.grants":"可以使用的 Bot","secrets.noBots":"还没有 Bot。","secrets.addBots":"添加 Bot","secrets.noGrants":"还没有 Bot 可以使用它。","secrets.searchBots":"搜索 Bot","secrets.noMatch":"没有匹配的 Bot","secrets.allGranted":"所有 Bot 都已经可以使用它。","secrets.revoke":"移除 {name}","secrets.onceTag":"仅限本次","secrets.edit":"修改密钥","secrets.uses":"使用记录","secrets.noUses":"暂无使用记录。","secrets.deletedBot":"已删除的 Bot","secrets.useCommand":"命令","secrets.useSsh":"SSH 签名","secrets.delete":"删除密钥","secrets.deleteTitle":"删除 {name}?","secrets.deleteBody":"已授权的 Bot 将无法再使用它,使用记录会保留。","secrets.deleteConfirm":"删除","secrets.masterKey":"主密钥","secrets.keyFile":"保存位置","secrets.keyHint":"密钥、模型 API key 和 HTTPS 证书都用主密钥加密。它不在数据目录里,备份或迁移 Jarvy 时请把这个文件一起复制。丢失后,密钥和 API key 需要重新输入,HTTPS 证书会重新生成,其他设备上要重新安装。","secretCard.title":"请求使用密钥 {name}","secretCard.valuePlaceholder":"粘贴或输入值","secretCard.insecure":"当前连接未加密,填写的值可能被同一网络中的他人看到。建议先切换到 HTTPS 再填写。","secretCard.exists":"这个密钥已保存在「设置 › 密钥」中。","secretCard.replace":"更换值","secretCard.keepValue":"使用已保存的值","secretCard.unreadable":"已保存的值无法解密,请重新输入。","secretCard.value":"值","secretCard.valueHint":"会加密保存到「设置 › 密钥」,不会出现在聊天里。","secretCard.scope":"Bot 可以使用多久","secretCard.always":"始终允许","secretCard.alwaysHint":"直到你在「设置 › 密钥」里移除","secretCard.once":"仅限本次","secretCard.onceHint":"Bot 当前的任务结束后失效","secretCard.allow":"允许","secretCard.saveAllow":"保存并允许","secretCard.decline":"拒绝","secretCard.allowedAlways":"已允许使用 {name},可以在「设置 › 密钥」中移除","secretCard.allowedOnce":"已允许本次使用 {name}","secretCard.declined":"已拒绝提供 {name}","secretCard.ignored":"已忽略 {name} 的请求","error.secretNameInvalid":"名称只能包含大写字母、数字和下划线,且以字母开头。","error.secretNameTaken":"已有同名的密钥。","error.secretValueMissing":"请输入值。","error.secretValueTooLong":"值太长,最多 16 KB。","error.secretDescriptionInvalid":"说明只能有一行,最多 200 个字符。","error.secretMissing":"找不到这个密钥,它可能已被删除。","error.credentialUnreadable":"已保存的 API key 无法解密,请在「设置 › 模型」中重新输入。"},A8={"settings.machines":"工作环境","machines.intro":"通过 SSH 添加的机器。获得授权的 Bot 可以切换过去,运行命令、读写文件。","machines.add":"添加机器","machines.empty":"还没有机器","machines.emptyHint":"添加后,再选择哪些 Bot 可以使用。","machines.host":"地址","machines.hostPlaceholder":"192.168.1.20 或 dev.example.com","machines.port":"端口","machines.user":"用户名","machines.name":"名称","machines.directory":"起始目录","machines.directoryPlaceholder":"用户主目录","machines.next":"下一步","machines.scanning":"正在连接…","machines.fingerprint":"主机指纹","machines.fingerprintHint":"继续之前,请在这台机器上运行 ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub 核对。","machines.password":"登录密码","machines.passwordHint":"只用这一次,用来装上 Jarvy 为这台机器生成的密钥,不会保存。","machines.connect":"连接并添加","machines.connecting":"正在添加…","machines.back":"上一步","machines.check":"检查指纹","machines.checking":"正在检查…","machines.unchanged":"指纹没有变化。","machines.changed":"这台机器现在出示的指纹和之前接受的不同。如果它重装过系统或换了机器,核对后可以接受新指纹;否则可能有人在冒充它。","machines.trust":"接受新指纹","machines.delete":"删除机器","machines.deleteTitle":"删除 {name}?","machines.deleteBody":"会先从这台机器上移除 Jarvy 的密钥。正在使用它的 Bot 会回到默认环境。","machines.deleteConfirm":"删除","machines.forceTitle":"无法连接 {name}","machines.forceBody":"Jarvy 的密钥会留在这台机器的 ~/.ssh/authorized_keys 里(以 {comment} 结尾的那一行),之后可以手动移除。仍要删除吗?","machines.forceConfirm":"仍然删除","machineCard.title":"请求添加机器 {name}","machineCard.existing":"这台机器已在「设置 › 工作环境」中。","machineCard.add":"连接并添加","machineCard.allow":"允许","machineCard.decline":"拒绝","machineCard.added":"已添加 {name}","machineCard.granted":"已允许使用 {name}","machineCard.declined":"已拒绝添加 {name}","machineCard.ignored":"已忽略 {name} 的请求","environment.awayMachine":"当前在 {name} 上(由 Bot 自行切换)。","error.machineMissing":"找不到这台机器,它可能已被删除。","error.machineNameTaken":"已有同名的机器。","error.sshPasswordMissing":"请输入密码。","error.sshKeyUnreadable":"这台机器的密钥无法用当前主密钥解密,请删除后重新添加。","error.sshBadHost":"地址需要是主机名或 IP 地址。","error.sshBadUser":"请填写这台机器上的用户名。","error.sshBadPort":"端口需要在 1–65535 之间。","error.sshBadDirectory":"起始目录需要是绝对路径,或以 ~/ 开头。","error.sshAuthFailed":"登录被拒绝,请检查用户名和密码。","error.sshUnreachable":"连接不上这台机器,请检查地址、端口和网络。","error.sshHostKeyChanged":"这台机器出示的指纹和之前接受的不同,已停止连接。","error.sshUnsupported":"目前只支持 Linux 和 macOS。","error.sshFailed":"SSH 连接失败:{detail}"},_8={"tasks.title":"定时任务","tasks.empty":"暂无定时任务","tasks.add":"新建任务","tasks.edit":"编辑","tasks.delete":"删除","tasks.deleteTitle":"删除「{name}」?","tasks.deleteBody":"删除后不会再运行。只想停一阵子的话,把它关掉就行。","tasks.toggle":"开启或关闭{name}","tasks.next":"下次 {time}","tasks.paused":"已关闭","tasks.done":"已完成","tasks.newTitle":"新建任务","tasks.editTitle":"编辑任务","tasks.name":"名称","tasks.namePlaceholder":"早间新闻","tasks.instruction":"要做什么","tasks.instructionPlaceholder":"看一遍我关注的新闻网站首页,挑三条值得看的发给我,每条附一句话。","tasks.when":"时间","tasks.kind.once":"一次","tasks.kind.every":"间隔","tasks.kind.daily":"每天","tasks.kind.weekly":"每周","tasks.at":"日期和时间","tasks.everyCount":"每隔","tasks.unit.minutes":"分钟","tasks.unit.hours":"小时","tasks.time":"时间","tasks.weekday":"星期","tasks.minimum":"最短 5 分钟。","tasks.saveFailed":"任务保存失败","tasks.changeFailed":"任务修改失败","tasks.loadFailed":"任务加载失败","tasks.schedule.once":"一次,{time}","tasks.schedule.minutes":{one:"每分钟",other:"每 {count} 分钟"},"tasks.schedule.hours":{one:"每小时",other:"每 {count} 小时"},"tasks.schedule.daily":"每天 {time}","tasks.schedule.weekly":"每{day} {time}","error.taskTimePast":"这个时间已经过了,请选一个以后的时间。","error.taskScheduleInvalid":"检查一下周期:最短每 5 分钟,时间要是有效的。","error.taskInvalid":"给任务起个名字,写上要做什么。"},M8={...b8,...j8,...w8,...S8,...k8,...C8,...N8,...E8,...T8,...A8,..._8},$b=["en","zh"],Gb={en:x8,zh:M8},Ec={en:"en",zh:"zh-CN"},Yb="jarvy-locale";function R8(){var i;const e=localStorage.getItem(Yb);if(e==="en"||e==="zh")return e;const a=((i=navigator.languages)!=null&&i.length?navigator.languages:[navigator.language]).map(r=>r.toLowerCase()).find(r=>/^(en|zh)\b/.test(r));return a!=null&&a.startsWith("zh")?"zh":"en"}let Bi=R8();document.documentElement.lang=Ec[Bi];const Ep=new Set,$d=()=>Bi;function Xb(e){if(e!==Bi){Bi=e,localStorage.setItem(Yb,e),document.documentElement.lang=Ec[e];for(const a of Ep)a()}}function Kb(){return w.useSyncExternalStore(e=>(Ep.add(e),()=>{Ep.delete(e)}),$d)}const Tp=(e,a)=>Gb[e][a==="name"?"locale.name":"locale.short"];function Qb(e,a){const i=Gb[Bi][e];return typeof i=="string"?i:new Intl.PluralRules(Ec[Bi]).select(Number(a))==="one"?i.one:i.other}function x(e,a){const i=Qb(e,a==null?void 0:a.count);return a?i.replace(/\{(\w+)\}/g,(r,c)=>c in a?String(a[c]):r):i}const Ga=(e,a)=>new Date(e).toLocaleString(Ec[Bi],a),Ql=e=>Ga(e,{hour:Bi==="zh"?"2-digit":"numeric",minute:"2-digit"}),Zb=e=>{const a=new Date(e).getFullYear()===new Date().getFullYear();return Ga(e,{year:a?void 0:"numeric",month:Bi==="zh"?"numeric":"short",day:"numeric"})},Ii=(e,a)=>new Intl.NumberFormat(Ec[Bi],a).format(e);function p0(e,a){return Qb(e,a.count).split(/\{(\w+)\}/).map((i,r)=>o.jsx(w.Fragment,{children:r%2?a[i]??`{${i}}`:i},r))}class Wl extends Error{constructor(a,i,r,c){super(i),this.status=a,this.code=r,this.params=c}}async function we(e,a={}){let i;try{i=await fetch(`/api${e}`,{...a,credentials:"same-origin",headers:{...a.body&&!(a.body instanceof Blob)?{"Content-Type":"application/json"}:{},...a.headers}})}catch{throw new Error(x("api.offline"))}const r=await i.json().catch(()=>({}));if(!i.ok)throw Jb(i.status,r);return r}const Jb=(e,a)=>{const i=typeof a=="object"&&a!==null?a:{};return new Wl(e,i.error===void 0?`HTTP ${e}`:String(i.error),typeof i.code=="string"?i.code:void 0,i.params)};function D8(e,a,i){return new Promise((r,c)=>{const u=new XMLHttpRequest;u.open("POST",`/api/chats/${e}/attachments`),u.setRequestHeader("Content-Type",a.type||"application/octet-stream"),u.setRequestHeader("X-File-Name",encodeURIComponent(a.name)),u.upload.onprogress=d=>{d.lengthComputable&&(i==null||i(d.loaded/d.total))},u.onerror=()=>c(new Error(x("api.offline"))),u.onload=()=>{let d={};try{d=JSON.parse(u.responseText)}catch{}u.status>=200&&u.status<300?r(d):c(Jb(u.status,d))},u.send(a)})}async function O8(e,a=0){const i=[];let r=a;for(;;){const c=await we(`/chats/${e}/messages?after=${r}&limit=1000`);if(i.push(...c.messages),!c.hasMore)return{messages:i};if(c.nextSequence<=r)throw new Error(x("api.historyFailed"));r=c.nextSequence}}const Qe=e=>JSON.stringify(e),ge={me:()=>we("/me"),search:(e,a)=>we(`/search?q=${encodeURIComponent(e)}${a?`&in=${a}`:""}&limit=60`),login:(e,a)=>we("/login",{method:"POST",body:Qe({username:e,password:a})}),logout:()=>we("/logout",{method:"POST"}),bots:()=>we("/bots"),createBot:e=>we("/bots",{method:"POST",body:Qe({name:e})}),saveBot:(e,a)=>we(`/bots/${e}`,{method:"PUT",body:Qe(a)}),modelOptions:()=>we("/model-options"),selectBotModel:(e,a,i,r,c)=>we(`/bots/${e}/model`,{method:"PUT",body:Qe({connectionId:a,modelId:i,thinkingLevel:r,language:c})}),answerQuestion:(e,a,i)=>we(`/chats/${e}/questions/${a}`,{method:"POST",body:Qe(i)}),setBotColor:(e,a)=>we(`/bots/${e}/color`,{method:"PUT",body:Qe({color:a})}),chats:()=>we("/chats"),createChat:e=>we("/chats",{method:"POST",body:Qe({botId:e})}),deleteChat:e=>we(`/chats/${e}`,{method:"DELETE"}),members:()=>we("/members"),sections:()=>we("/sections"),createSection:e=>we("/sections",{method:"POST",body:Qe(e)}),updateSection:(e,a)=>we(`/sections/${e}`,{method:"PATCH",body:Qe(a)}),deleteSection:e=>we(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>we("/channels",{method:"POST",body:Qe(e)}),updateChannel:(e,a)=>we(`/chats/${e}`,{method:"PATCH",body:Qe(a)}),addMember:(e,a)=>we(`/chats/${e}/members`,{method:"POST",body:Qe({memberId:a})}),removeMember:(e,a)=>we(`/chats/${e}/members/${a}`,{method:"DELETE"}),setNote:(e,a)=>we(`/chats/${e}/note`,{method:"PUT",body:Qe({text:a})}),markRead:(e,a)=>we(`/chats/${e}/read`,{method:"POST",body:Qe({sequence:a})}),messages:O8,latestMessages:(e,a)=>we(`/chats/${e}/messages?tail=${a}`),olderMessages:(e,a,i)=>we(`/chats/${e}/messages?before=${a}&limit=${i}`),send:(e,a,i,r,c=!1,u,d=[])=>we(`/chats/${e}/messages`,{method:"POST",body:Qe({content:a,attachmentIds:i,clientMessageId:r,...c?{alsoToChannel:c}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),react:(e,a,i)=>we(`/messages/${e}/reaction`,{method:"PUT",body:Qe({emoji:a,on:i})}),pin:(e,a)=>we(`/chats/${e}/pin`,{method:"PUT",body:Qe({pinned:a})}),mute:(e,a)=>we(`/chats/${e}/mute`,{method:"PUT",body:Qe({muted:a})}),deleteBot:(e,a)=>we(`/bots/${e}${a?"?files=delete":""}`,{method:"DELETE"}),chat:e=>we(`/chats/${e}`),message:e=>we(`/messages/${e}`),openThread:e=>we(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>we(`/chats/${e}/threads`),followedThreads:()=>we("/threads"),updateThread:(e,a)=>we(`/chats/${e}`,{method:"PATCH",body:Qe(a)}),follow:(e,a)=>we(`/chats/${e}/follow`,{method:"PUT",body:Qe({following:a})}),botDirects:e=>we(`/members/${e}/dms`),tasks:e=>we(`/bots/${e}/tasks`),createTask:(e,a)=>we(`/bots/${e}/tasks`,{method:"POST",body:Qe(a)}),updateTask:(e,a,i)=>we(`/bots/${e}/tasks/${a}`,{method:"PUT",body:Qe(i)}),setTaskOn:(e,a,i)=>we(`/bots/${e}/tasks/${a}/${i?"resume":"pause"}`,{method:"POST"}),deleteTask:(e,a)=>we(`/bots/${e}/tasks/${a}`,{method:"DELETE"}),botSubscriptions:e=>we(`/members/${e}/subscriptions`),controlBot:(e,a)=>we(`/bots/${e}/${a}`,{method:"POST"}),setBotEnvironment:(e,a)=>we(`/bots/${e}/environment`,{method:"PUT",body:Qe({home:a})}),grantHost:(e,a)=>we(`/bots/${e}/environment`,{method:"PUT",body:Qe({hostGranted:a})}),grantBotMachine:(e,a,i)=>we(`/bots/${e}/environment`,{method:"PUT",body:Qe({machineId:a,granted:i})}),machines:()=>we("/environments"),scanMachine:e=>we("/environments/scan",{method:"POST",body:Qe(e)}),addMachine:e=>we("/environments",{method:"POST",body:Qe(e)}),updateMachine:(e,a)=>we(`/environments/${e}`,{method:"PUT",body:Qe(a)}),checkMachine:e=>we(`/environments/${e}/check`,{method:"POST"}),trustMachine:(e,a)=>we(`/environments/${e}/trust`,{method:"POST",body:Qe({fingerprints:a})}),deleteMachine:(e,a=!1)=>we(`/environments/${e}${a?"?force=1":""}`,{method:"DELETE"}),grantMachine:(e,a,i)=>we(`/environments/${e}/grants/${a}`,{method:"PUT",body:Qe({granted:i})}),fulfilMachine:(e,a,i)=>we(`/environments/requests/${e}/${a}`,{method:"POST",body:Qe({password:i})}),computer:(e,a)=>we(`/bots/${e}/computer/${a}`,{method:"POST"}),connection:()=>we("/connection"),setConnection:e=>we("/connection",{method:"PUT",body:Qe({allowHttp:e})}),secrets:()=>we("/secrets"),createSecret:e=>we("/secrets",{method:"POST",body:Qe(e)}),updateSecret:(e,a)=>we(`/secrets/${e}`,{method:"PUT",body:Qe(a)}),deleteSecret:e=>we(`/secrets/${e}`,{method:"DELETE"}),grantSecret:(e,a,i)=>we(`/secrets/${e}/grants/${a}`,{method:"PUT",body:Qe({granted:i})}),secretUses:e=>we(`/secrets/${e}/uses`),fulfilSecret:(e,a,i)=>we(`/secrets/requests/${e}/${a}`,{method:"POST",body:Qe(i)}),botStatus:e=>we(`/bots/${e}/status`),uploadAttachment:D8,removeAttachment:e=>we(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>we(`/model-connections/${e}/auth`),authStart:e=>we(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>we(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,a,i)=>we(`/model-connections/${e}/auth/input`,{method:"POST",body:Qe({promptId:a,value:i})}),authLogout:e=>we(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>we(`/model-connections/${e}/catalog`),providerModels:e=>we(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>we("/model-providers"),autoconfigModel:e=>we("/model-autoconfig",{method:"POST",body:Qe(e)}),discoverModels:e=>we("/model-discovery",{method:"POST",body:Qe(e)}),modelConnections:()=>we("/model-connections"),createModelConnection:e=>we("/model-connections",{method:"POST",body:Qe(e)}),updateModelConnection:(e,a)=>we(`/model-connections/${e}`,{method:"PUT",body:Qe(a)}),deleteModelConnection:e=>we(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,a,i=!1)=>we(`/model-connections/${e}/credential`,{method:"PUT",body:Qe({apiKey:a,remove:i})}),saveConnectionModel:(e,a,i)=>we(`/model-connections/${e}/models`,{method:i?"PUT":"POST",body:Qe({model:a,originalId:i})}),deleteConnectionModel:(e,a)=>we(`/model-connections/${e}/models`,{method:"DELETE",body:Qe({modelId:a})})};/**
50
+ * @license lucide-react v1.47.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const z8=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
55
+ * @license lucide-react v1.47.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */function L8(e,a,i=[]){if(a==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:z8(e),size:24,node:a,...i.length>0?{aliases:i}:{}}}/**
60
+ * @license lucide-react v1.47.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const B8=e=>{let a="",i=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){i=a.length>0;continue}a.length===0?a+=r.toLowerCase():a+=i?r.toUpperCase():r,i=!1}return a};/**
65
+ * @license lucide-react v1.47.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const I8=e=>{const a=B8(e);return a.charAt(0).toUpperCase()+a.slice(1)};/**
70
+ * @license lucide-react v1.47.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const Ap=(...e)=>e.filter((a,i,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===i).join(" ").trim();/**
75
+ * @license lucide-react v1.47.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const Ul={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
80
+ * @license lucide-react v1.47.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */function Hm(e){return e!=null}function H8(e,a={}){var b,j;const i=a.attributeNames??{},r=S=>i[S]??S,c=e.size??e.width??Ul.width,u=e.size??e.height??Ul.height,d=((b=e.aliases)==null?void 0:b.filter(S=>typeof S=="string"&&S.trim()!=="").map(S=>`lucide-${S}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((j=a.className)==null?void 0:j.split(" ").filter(Boolean))??[],v=a.includeDefaultClasses===!1?Ap(...m):Ap("lucide",...f,...m),y=a.absoluteStrokeWidth?Number(a.strokeWidth??Ul["stroke-width"])*Number(e.size??e.width??Ul.width)/Number(a.size??a.width??Ul.width):a.strokeWidth??Ul["stroke-width"];return["svg",{...Object.entries(Ul).reduce((S,[k,C])=>(S[r(k)]=C,S),{}),..."color"in a&&a.color&&{[r("stroke")]:a.color},..."size"in a&&Hm(a.size)&&{[r("width")]:a.size,[r("height")]:a.size},..."width"in a&&Hm(a.width)&&{[r("width")]:a.width},..."height"in a&&Hm(a.height)&&{[r("height")]:a.height},[r("stroke-width")]:y,...v&&{[r("class")]:v},[r("viewBox")]:`0 0 ${c} ${u}`,...a.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in a&&a.attributes},e.node.map(S=>{const[k,C,E]=S,M=a.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...C}:C;return E?[k,M,E]:[k,M]})]}/**
85
+ * @license lucide-react v1.47.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */function P8(e,a={}){return H8(e,{...a,attributeNames:{...a.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
90
+ * @license lucide-react v1.47.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const U8=e=>{for(const a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},q8=w.createContext({}),F8=()=>w.useContext(q8),V8=w.forwardRef(({color:e,size:a,width:i,height:r,strokeWidth:c,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...p},b)=>{const{size:j=24,strokeWidth:S=2,absoluteStrokeWidth:k=!1,nonScalingStroke:C=!1,color:E="currentColor",className:M=""}=F8()??{},T=!!m||U8(p),[_,L,A=[]]=P8(y,{color:e??E,width:i??a??j,height:r??a??j,strokeWidth:c??S,absoluteStrokeWidth:u??k,nonScalingStroke:d??C,className:Ap(M,f),hasA11yProp:T,attributes:p});return w.createElement(_,{ref:b,...L},[...A.map(([H,I])=>w.createElement(H,I)),...Array.isArray(m)?m:[m]])});/**
95
+ * @license lucide-react v1.47.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */function _e(e,a=[],i=[]){const r=typeof e=="string"?L8(e,a,i):e,c=w.forwardRef(({className:u,...d},f)=>w.createElement(V8,{ref:f,icon:r,className:u,...d}));return r.name&&(c.displayName=I8(r.name)),c}/**
100
+ * @license lucide-react v1.47.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const Wb={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};Wb.node;const $8=_e(Wb);/**
105
+ * @license lucide-react v1.47.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const ej={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};ej.node;const G8=_e(ej);/**
110
+ * @license lucide-react v1.47.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const tj={name:"arrow-down-up",size:24,node:[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]};tj.node;const Y8=_e(tj);/**
115
+ * @license lucide-react v1.47.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const nj={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};nj.node;const Gd=_e(nj);/**
120
+ * @license lucide-react v1.47.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const aj={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};aj.node;const _p=_e(aj);/**
125
+ * @license lucide-react v1.47.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const ij={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};ij.node;const X8=_e(ij);/**
130
+ * @license lucide-react v1.47.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const rj={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};rj.node;const K8=_e(rj);/**
135
+ * @license lucide-react v1.47.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const lj={name:"bell",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]};lj.node;const Q8=_e(lj);/**
140
+ * @license lucide-react v1.47.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const oj={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};oj.node;const Z8=_e(oj);/**
145
+ * @license lucide-react v1.47.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const sj={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};sj.node;const J8=_e(sj);/**
150
+ * @license lucide-react v1.47.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const cj={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};cj.node;const da=_e(cj);/**
155
+ * @license lucide-react v1.47.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const uj={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};uj.node;const Hi=_e(uj);/**
160
+ * @license lucide-react v1.47.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const dj={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};dj.node;const fj=_e(dj);/**
165
+ * @license lucide-react v1.47.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const hj={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};hj.node;const tl=_e(hj);/**
170
+ * @license lucide-react v1.47.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const mj={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};mj.node;const W8=_e(mj);/**
175
+ * @license lucide-react v1.47.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const pj={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};pj.node;const g0=_e(pj);/**
180
+ * @license lucide-react v1.47.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const gj={name:"database",size:24,node:[["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"}]]};gj.node;const eC=_e(gj);/**
185
+ * @license lucide-react v1.47.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const vj={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};vj.node;const v0=_e(vj);/**
190
+ * @license lucide-react v1.47.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const yj={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};yj.node;const My=_e(yj);/**
195
+ * @license lucide-react v1.47.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const xj={name:"expand",size:24,node:[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16v5h-5",key:"1ck2sf"}],["path",{d:"M21 8V3h-5",key:"1qoq8a"}],["path",{d:"M3 16v5h5",key:"1t08am"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 8V3h5",key:"1ln10m"}],["path",{d:"M9 9 3 3",key:"v551iv"}]]};xj.node;const tC=_e(xj);/**
200
+ * @license lucide-react v1.47.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const bj={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};bj.node;const nC=_e(bj);/**
205
+ * @license lucide-react v1.47.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const jj={name:"eye-off",size:24,node:[["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"}]]};jj.node;const Yd=_e(jj);/**
210
+ * @license lucide-react v1.47.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const wj={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};wj.node;const Xd=_e(wj);/**
215
+ * @license lucide-react v1.47.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const Sj={name:"face-slightly-smiling-plus",size:24,node:[["path",{d:"M13.267 2.08a10 10 0 108.653 8.653",key:"1wbpyh"}],["path",{d:"M15 10V9",key:"4dkmfx"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M16.472 15a6 6 0 01-8.943 0",key:"7qomzy"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M9 10V9",key:"1lazqi"}]],aliases:["smile-plus"]};Sj.node;const aC=_e(Sj);/**
220
+ * @license lucide-react v1.47.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const kj={name:"file-headphone",size:24,node:[["path",{d:"M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343",key:"1vfytu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0",key:"1etmh7"}]],aliases:["file-audio","file-audio-2"]};kj.node;const iC=_e(kj);/**
225
+ * @license lucide-react v1.47.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Cj={name:"file-play",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]],aliases:["file-video"]};Cj.node;const rC=_e(Cj);/**
230
+ * @license lucide-react v1.47.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const Nj={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Nj.node;const lC=_e(Nj);/**
235
+ * @license lucide-react v1.47.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const Ej={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};Ej.node;const oC=_e(Ej);/**
240
+ * @license lucide-react v1.47.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const Tj={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Tj.node;const sC=_e(Tj);/**
245
+ * @license lucide-react v1.47.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const Aj={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};Aj.node;const cC=_e(Aj);/**
250
+ * @license lucide-react v1.47.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const _j={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};_j.node;const uC=_e(_j);/**
255
+ * @license lucide-react v1.47.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const Mj={name:"image",size:24,node:[["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"}]]};Mj.node;const dC=_e(Mj);/**
260
+ * @license lucide-react v1.47.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const Rj={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};Rj.node;const y0=_e(Rj);/**
265
+ * @license lucide-react v1.47.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const Dj={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};Dj.node;const Oj=_e(Dj);/**
270
+ * @license lucide-react v1.47.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const zj={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};zj.node;const fC=_e(zj);/**
275
+ * @license lucide-react v1.47.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const Lj={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Lj.node;const Bj=_e(Lj);/**
280
+ * @license lucide-react v1.47.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const Ij={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};Ij.node;const hC=_e(Ij);/**
285
+ * @license lucide-react v1.47.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const Hj={name:"megaphone",size:24,node:[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]]};Hj.node;const mC=_e(Hj);/**
290
+ * @license lucide-react v1.47.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const Pj={name:"message-circle-question-mark",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["message-circle-question"]};Pj.node;const Uj=_e(Pj);/**
295
+ * @license lucide-react v1.47.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const qj={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};qj.node;const pC=_e(qj);/**
300
+ * @license lucide-react v1.47.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const Fj={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};Fj.node;const gC=_e(Fj);/**
305
+ * @license lucide-react v1.47.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const Vj={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};Vj.node;const vC=_e(Vj);/**
310
+ * @license lucide-react v1.47.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const $j={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};$j.node;const Gj=_e($j);/**
315
+ * @license lucide-react v1.47.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const Yj={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};Yj.node;const yC=_e(Yj);/**
320
+ * @license lucide-react v1.47.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const Xj={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Xj.node;const x0=_e(Xj);/**
325
+ * @license lucide-react v1.47.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const Kj={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};Kj.node;const xC=_e(Kj);/**
330
+ * @license lucide-react v1.47.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const Qj={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};Qj.node;const bC=_e(Qj);/**
335
+ * @license lucide-react v1.47.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const Zj={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};Zj.node;const b0=_e(Zj);/**
340
+ * @license lucide-react v1.47.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const Jj={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};Jj.node;const jC=_e(Jj);/**
345
+ * @license lucide-react v1.47.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const Wj={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};Wj.node;const wC=_e(Wj);/**
350
+ * @license lucide-react v1.47.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const e4={name:"pin",size:24,node:[["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"}]]};e4.node;const Mp=_e(e4);/**
355
+ * @license lucide-react v1.47.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const t4={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};t4.node;const ll=_e(t4);/**
360
+ * @license lucide-react v1.47.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const n4={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};n4.node;const SC=_e(n4);/**
365
+ * @license lucide-react v1.47.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const a4={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};a4.node;const j0=_e(a4);/**
370
+ * @license lucide-react v1.47.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const i4={name:"reply",size:24,node:[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]};i4.node;const kC=_e(i4);/**
375
+ * @license lucide-react v1.47.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const r4={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};r4.node;const CC=_e(r4);/**
380
+ * @license lucide-react v1.47.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const l4={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};l4.node;const NC=_e(l4);/**
385
+ * @license lucide-react v1.47.0 - ISC
386
+ *
387
+ * This source code is licensed under the ISC license.
388
+ * See the LICENSE file in the root directory of this source tree.
389
+ */const o4={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};o4.node;const Tc=_e(o4);/**
390
+ * @license lucide-react v1.47.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */const s4={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};s4.node;const c4=_e(s4);/**
395
+ * @license lucide-react v1.47.0 - ISC
396
+ *
397
+ * This source code is licensed under the ISC license.
398
+ * See the LICENSE file in the root directory of this source tree.
399
+ */const u4={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};u4.node;const EC=_e(u4);/**
400
+ * @license lucide-react v1.47.0 - ISC
401
+ *
402
+ * This source code is licensed under the ISC license.
403
+ * See the LICENSE file in the root directory of this source tree.
404
+ */const d4={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};d4.node;const TC=_e(d4);/**
405
+ * @license lucide-react v1.47.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */const f4={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};f4.node;const AC=_e(f4);/**
410
+ * @license lucide-react v1.47.0 - ISC
411
+ *
412
+ * This source code is licensed under the ISC license.
413
+ * See the LICENSE file in the root directory of this source tree.
414
+ */const h4={name:"shrink",size:24,node:[["path",{d:"m15 15 6 6m-6-6v4.8m0-4.8h4.8",key:"17vawe"}],["path",{d:"M9 19.8V15m0 0H4.2M9 15l-6 6",key:"chjx8e"}],["path",{d:"M15 4.2V9m0 0h4.8M15 9l6-6",key:"lav6yq"}],["path",{d:"M9 4.2V9m0 0H4.2M9 9 3 3",key:"1pxi2q"}]]};h4.node;const _C=_e(h4);/**
415
+ * @license lucide-react v1.47.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ */const m4={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};m4.node;const MC=_e(m4);/**
420
+ * @license lucide-react v1.47.0 - ISC
421
+ *
422
+ * This source code is licensed under the ISC license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */const p4={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};p4.node;const g4=_e(p4);/**
425
+ * @license lucide-react v1.47.0 - ISC
426
+ *
427
+ * This source code is licensed under the ISC license.
428
+ * See the LICENSE file in the root directory of this source tree.
429
+ */const v4={name:"speech",size:24,node:[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]};v4.node;const RC=_e(v4);/**
430
+ * @license lucide-react v1.47.0 - ISC
431
+ *
432
+ * This source code is licensed under the ISC license.
433
+ * See the LICENSE file in the root directory of this source tree.
434
+ */const y4={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};y4.node;const DC=_e(y4);/**
435
+ * @license lucide-react v1.47.0 - ISC
436
+ *
437
+ * This source code is licensed under the ISC license.
438
+ * See the LICENSE file in the root directory of this source tree.
439
+ */const x4={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};x4.node;const OC=_e(x4);/**
440
+ * @license lucide-react v1.47.0 - ISC
441
+ *
442
+ * This source code is licensed under the ISC license.
443
+ * See the LICENSE file in the root directory of this source tree.
444
+ */const b4={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};b4.node;const Ad=_e(b4);/**
445
+ * @license lucide-react v1.47.0 - ISC
446
+ *
447
+ * This source code is licensed under the ISC license.
448
+ * See the LICENSE file in the root directory of this source tree.
449
+ */const j4={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};j4.node;const w0=_e(j4);/**
450
+ * @license lucide-react v1.47.0 - ISC
451
+ *
452
+ * This source code is licensed under the ISC license.
453
+ * See the LICENSE file in the root directory of this source tree.
454
+ */const w4={name:"user-plus",size:24,node:[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};w4.node;const zC=_e(w4);/**
455
+ * @license lucide-react v1.47.0 - ISC
456
+ *
457
+ * This source code is licensed under the ISC license.
458
+ * See the LICENSE file in the root directory of this source tree.
459
+ */const S4={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};S4.node;const LC=_e(S4);/**
460
+ * @license lucide-react v1.47.0 - ISC
461
+ *
462
+ * This source code is licensed under the ISC license.
463
+ * See the LICENSE file in the root directory of this source tree.
464
+ */const k4={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};k4.node;const BC=_e(k4);/**
465
+ * @license lucide-react v1.47.0 - ISC
466
+ *
467
+ * This source code is licensed under the ISC license.
468
+ * See the LICENSE file in the root directory of this source tree.
469
+ */const C4={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};C4.node;const cs=_e(C4),N4={list:(e,a)=>we(`/bots/${e}/activity${a===void 0?"":`?before=${encodeURIComponent(a)}`}`),message:(e,a)=>we(`/bots/${e}/activity/messages/${a}`)};function E4(e){var a,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(a=0;a<c;a++)e[a]&&(i=E4(e[a]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function IC(){for(var e,a,i=0,r="",c=arguments.length;i<c;i++)(e=arguments[i])&&(a=E4(e))&&(r&&(r+=" "),r+=a);return r}const Ry=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dy=IC,S0=(e,a)=>i=>{var r;if((a==null?void 0:a.variants)==null)return Dy(e,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:u}=a,d=Object.keys(c).map(v=>{const y=i==null?void 0:i[v],p=u==null?void 0:u[v];if(y===null)return null;const b=Ry(y)||Ry(p);return c[v][b]}),f=i&&Object.entries(i).reduce((v,y)=>{let[p,b]=y;return b===void 0||(v[p]=b),v},{}),m=a==null||(r=a.compoundVariants)===null||r===void 0?void 0:r.reduce((v,y)=>{let{class:p,className:b,...j}=y;return Object.entries(j).every(S=>{let[k,C]=S;return Array.isArray(C)?C.includes({...u,...f}[k]):{...u,...f}[k]===C})?[...v,p,b]:v},[]);return Dy(e,d,m,i==null?void 0:i.class,i==null?void 0:i.className)},T4=48,Vi=(e,a=0)=>{const i=new Int32Array(e.length);for(let r=0;r<e.length;r++)i[r]=e.charCodeAt(r)-T4-a;return i},Kd=e=>{const a=new Int32Array(e.length+1);for(let i=0;i<e.length;i++)a[i+1]=a[i]+e[i];return a},al=e=>{const a=new Int32Array(e.length);let i=0;for(let r=0;r<e.length;r++){const c=e.charCodeAt(r)-T4;i+=c>>>1^-(c&1),a[r]=i}return a},HC=384,PC=[],Gl=Kd(Vi("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),UC=Kd(Vi(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),qC="@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom",FC=(()=>{const e=Gl.length-1,a=new Int32Array(e);for(let c=e-1;c>=0;c--){let u=1,d=c+1;for(let f=Gl[c];f<Gl[c+1];f++)u+=a[d],d+=a[d];a[c]=u}const i=new Int32Array(Gl[e]);let r=0;for(let c=0;c<e;c++){let u=c+1;for(let d=Gl[c];d<Gl[c+1];d++)i[r++]=u,u+=a[u]}return i})(),VC=Vi("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),$C=Kd(Vi("123333359346463635126536711576")),GC=Vi("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),YC=Vi("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),XC=al("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),KC=(()=>{const e=new Int32Array(319).fill(-1),a=al("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),i=al("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let r=0;r<a.length;r++)e[a[r]]=i[r];return e})(),QC="container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split("|").map(e=>{const a=e.split(" "),i=a.shift();for(let r=0;r<a.length;r++)a[r]=i+a[r];return a}),Oy=al("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),ZC=al("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622"),JC=al("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~‚22…ˆ‡:22|22222222222G000q†OVI00000}š2›>40000ŒB00000I¨©000¬00000000000000021M®­00°“000000000000000000000–222›HGHa1º222¿2À2222ÉÌ000­°2±"),A4=new Int32Array(995),_4=new Int32Array(995),M4=new Int32Array(995);let Rp="";const Dp=new Int32Array(1038);{const e=new Map;let a=0,i=0;for(let r=0;r<Oy.length;r++)for(const c of QC[JC[r]]){let u=e.get(c);u===void 0&&(u=a++,e.set(c,u),Dp[u*2]=Rp.length,Dp[u*2+1]=c.length,Rp+=c),A4[i]=Oy[r],_4[i]=ZC[r],M4[i]=u,i++}}const WC=al("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),e7=Kd(Vi("1::24444432:442:44:44>222222:44:4421322511111311111114")),t7=al("2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222"),n7=Vi("ij"),a7=Vi("—"),i7=Vi("1"),r7="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var l7={GROUP_COUNT:HC,customValidatorNames:PC,edgeStart:Gl,labelStart:UC,labelText:qC,edgeTarget:FC,nodeGroup:VC,nodeVlist:KC,vlistPat:$C,vlistOps:GC,vlistRef:YC,vlistGroup:XC,litAnchor:A4,litGroup:_4,litPool:M4,poolOffsets:Dp,poolText:Rp,adjGid:WC,adjStart:e7,adjTgt:t7,patGid:n7,patTgt:a7,postfixLookupGroups:i7,orderSensitiveModifiers:r7};const o7="line"in new Error,_i=-1,ql=-1,Pm=(e,a,i)=>{let r=2166136261;for(let c=a;c<i;c++)r=Math.imul(r^e.charCodeAt(c),16777619);return r},jd=(e,a,i)=>{const r=i-a;let c=Math.imul(r,2654435761)^e.charCodeAt(a);if(r>3){const u=r>>2,d=r>>1;c=Math.imul(c^e.charCodeAt(a+1)<<8^e.charCodeAt(a+2)<<16^e.charCodeAt(a+u),2246822507),c=Math.imul(c^e.charCodeAt(a+d)<<8^e.charCodeAt(a+d+u)<<16^e.charCodeAt(i-3),3266489909),c^=e.charCodeAt(i-2)<<8^e.charCodeAt(i-1)<<16;for(let f=a+3,m=i-4;f<a+8&&f<m;f++,m--)c=Math.imul(c^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return c^c>>>15|0},s7=(e,a,i={})=>{const{GROUP_COUNT:r,edgeStart:c,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:p,vlistRef:b,vlistGroup:j,litAnchor:S,litGroup:k,litPool:C,poolOffsets:E,poolText:M,adjGid:T,adjStart:_,adjTgt:L,patGid:A,patTgt:H,postfixLookupGroups:I,customValidatorNames:q,orderSensitiveModifiers:D}=e,$=new Int32Array(r).fill(-1);for(let ce=0;ce<T.length;ce++)$[T[ce]]=ce;let F=0;for(let ce=0;ce+1<_.length;ce++){const B=_[ce+1]-_[ce];B>F&&(F=B)}let W=32;for(;W<2*(1+F+A.length);)W<<=1;const Y=new Int32Array(b.length+1);for(let ce=0;ce<b.length;ce++)Y[ce+1]=Y[ce]+y[b[ce]+1]-y[b[ce]];const P=new Uint8Array(r);for(let ce=0;ce<I.length;ce++)P[I[ce]]=1;const K=c.length-1,R=new Uint8Array(K);let V=0,ne=!0;for(let ce=0;ce<S.length;ce++){R[S[ce]]=1;const B=E[C[ce]*2+1];B>V&&(V=B);const Q=M.charCodeAt(E[C[ce]*2]);(Q===91||Q===40)&&(ne=!1)}let z=1;for(;z<S.length*2;)z<<=1;const J=new Int32Array(z).fill(-1);for(let ce=0;ce<S.length;ce++){const B=E[C[ce]*2];let Q=(Pm(M,B,B+E[C[ce]*2+1])^Math.imul(S[ce],2654435761)|0)&z-1;for(;J[Q]!==-1;)Q=Q+1&z-1;J[Q]=ce}const ee=(ce,B,Q,he)=>{let Ae=(Pm(B,Q,he)^Math.imul(ce,2654435761)|0)&z-1;const ke=he-Q;for(;;){const Me=J[Ae];if(Me===-1)return-1;if(S[Me]===ce&&E[C[Me]*2+1]===ke){const Be=E[C[Me]*2];let Ke=!0;for(let Re=0;Re<ke;Re++)if(M.charCodeAt(Be+Re)!==B.charCodeAt(Q+Re)){Ke=!1;break}if(Ke)return k[Me]}Ae=Ae+1&z-1}},U=i.cacheSize??8192,G=i.prefix??e.prefix??"",fe=G===""?"":G+":",xe=fe.length,je=(q??[]).map(ce=>{throw new Error("cn: missing validator "+ce)}),ue=/\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$/,be=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,le=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let me=0,Te=-1,Le=-1,Ve=-1,pt=-1;const tt=ce=>ce>=97&&ce<=122||ce>=65&&ce<=90||ce>=48&&ce<=57||ce===95,We=ce=>/\s/.test(String.fromCharCode(ce)),Vt=(ce,B,Q)=>{if(me=0,Te=-1,Q-B<3)return;const he=ce.charCodeAt(B),Ae=ce.charCodeAt(Q-1);if(he===91&&Ae===93)me=1;else if(he===40&&Ae===41)me=2;else return;Ve=B+1,pt=Q-1;let ke=B+1;if(tt(ce.charCodeAt(ke))){for(ke++;ke<Q-1;){const Me=ce.charCodeAt(ke);if(!tt(Me)&&Me!==45)break;ke++}ke<Q-2&&ce.charCodeAt(ke)===58&&(Te=B+1,Le=ke,Ve=ke+1)}},vn=(ce,B,Q,he)=>{if(Q-B!==he.length)return!1;for(let Ae=0;Ae<he.length;Ae++)if(ce.charCodeAt(B+Ae)!==he.charCodeAt(Ae))return!1;return!0},yn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ha=ce=>!!ce&&!Number.isNaN(Number(ce)),rn=(ce,B,Q)=>{if(Q-B<11||!vn(ce,B,B+10,"@container"))return!1;if(ce.charCodeAt(B+10)===47)return Q-B>=12;const he=ce.charCodeAt(B+11);return he===115&&Q-B>=17&&vn(ce,B+10,B+16,"-size/")||he===110&&Q-B>=19&&vn(ce,B+10,B+18,"-normal/")},Xa=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],pe="length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight".split("|").map(ce=>ce.split(" ")),Ce=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],He=(ce,B,Q,he)=>{if(ce>=10){if(ce>=25)return je[ce-25](B.slice(Q,he));const Ae=ce-10;if(me!==Xa[Ae])return!1;if(Te>=0){for(const ke of pe[Ae])if(vn(B,Te,Le,ke))return!0;return!1}switch(Ce[Ae]){case 0:return!1;case 1:return!0;case 2:{const ke=B.slice(Ve,pt);return ue.test(ke)&&!be.test(ke)}case 3:return ha(B.slice(Ve,pt));case 4:return se.test(B.slice(Ve,pt));default:return le.test(B.slice(Ve,pt))}}switch(ce){case 0:return!0;case 1:return me===0;case 2:return me===1;case 3:return me===2;case 4:return yn.test(B.slice(Q,he));case 5:return ha(B.slice(Q,he));case 6:{const Ae=B.slice(Q,he);return!!Ae&&Number.isInteger(Number(Ae))}case 7:return he>Q&&B.charCodeAt(he-1)===37&&ha(B.slice(Q,he-1));case 8:return Pn.test(B.slice(Q,he));default:return rn(B,Q,he)}},qe=new Set(typeof D=="string"?D.split(" "):D),et=(ce,B,Q,he,Ae,ke)=>{const Me=Pm(B,Q,he)^(Ae?2654435769:0)|0;let Be=ce.get(Me);if(Be!==void 0)e:for(let $e=0;$e<Be.length;$e++){const ut=Be[$e];if(!(ut.imp!==Ae||ut.k.length!==he-Q)){for(let Pe=0;Pe<ut.k.length;Pe++)if(ut.k.charCodeAt(Pe)!==B.charCodeAt(Q+Pe))continue e;return ut.id}}else ce.set(Me,Be=[]);const Ke=B.slice(Q,he),Re=ke(Ke);return Be.push({k:Ke,imp:Ae,id:Re}),Re};let Pt=new Map,xn=new Map,Ut=2;const Rn=4096,Un=(ce,B)=>{const Q=[];let he=0,Ae=0,ke=0;for(let Re=0;Re<ce.length;Re++){const $e=ce.charCodeAt(Re);he===0&&Ae===0&&$e===58?(Q.push(ce.slice(ke,Re)),ke=Re+1):$e===91?he++:$e===93?he--:$e===40?Ae++:$e===41&&Ae--}Q.push(ce.slice(ke));let Me=Q[0];if(Q.length>1){const Re=[];let $e=[];for(const ut of Q)ut.charCodeAt(0)===91||qe.has(ut)?($e.length&&(Re.push(...$e.sort()),$e=[]),Re.push(ut)):$e.push(ut);$e.length&&Re.push(...$e.sort()),Me=Re.join(":")}const Be=B?Me+" !":Me;let Ke=xn.get(Be);return Ke===void 0&&xn.set(Be,Ke=Ut++),Ke};let Dt=new Map,Dn=r;const Ye=r+4096,Xt=()=>Dn++,fl=2097152,ui=8192,di=new Int32Array(ui),bn=new Array(ui).fill(null),ma=new Int32Array(ui),hl=new Int32Array(ui),pa=new Uint8Array(ui);let co=0;const Ka=(ce,B,Q,he,Ae,ke,Me,Be)=>{let Ke=ce;if(bn[ce]!==null)if(bn[ce|1]===null)Ke=ce|1;else if((co++&3)===0)Ke=ce|co>>2&1;else return;bn[Ke]=B.slice(Q,he),di[Ke]=Ae,ma[Ke]=ke,hl[Ke]=Me,pa[Ke]=Be},cn=()=>bn.fill(null);let Lt=256,$t=[new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt)],[fi,hi,Qa,Za]=$t,Da=new Uint8Array(Lt),Qn=new Uint8Array(Lt);const Ja=()=>{Lt*=2,$t=$t.map(B=>{const Q=new Int32Array(Lt);return Q.set(B),Q}),[fi,hi,Qa,Za]=$t;const ce=new Uint8Array(Lt);ce.set(Da),Da=ce,Qn=new Uint8Array(Lt)};let ga=64,va=new Int32Array(ga),mi=new Int32Array(ga);const ml=new Int32Array(r);let ya=2048,Sr=21,Zn=new Float64Array(ya),pi=new Int32Array(ya),Jn=0;const ln=(ce,B)=>{if(ce===0&&B<r)return ml[B]===Jn?1:(ml[B]=Jn,0);const Q=ce*2097152+B+1;let he=Math.imul(Q,2654435761)>>>Sr;for(;pi[he]===Jn;){if(Zn[he]===Q)return 1;he=he+1&ya-1}return Zn[he]=Q,pi[he]=Jn,0},un=(ce,B,Q,he,Ae)=>{if(Q-B>=2&&ce.charCodeAt(B)===91&&ce.charCodeAt(Q-1)===93){let ke=-1;for(let Me=B+1;Me<Q-1;Me++)if(ce.charCodeAt(Me)===58){ke=Me;break}return ke===-1||ke===B+1?_i:et(Dt,ce,B+1,ke,0,Xt)}if(he>=0&&m[he]>=0)return m[he];for(let ke=Ae-1;ke>=0;ke--){const Me=mi[ke];if(Me>Q)continue;const Be=va[ke],Ke=Q-Me;if(R[Be]===1&&Ke>0&&Ke<=V){const It=ce.charCodeAt(Me);if(ne===!1||It!==91&&It!==40){const xa=ee(Be,ce,Me,Q);if(xa>=0)return xa}}const Re=v[Be];if(Re<0)continue;const $e=b[Re],ut=y[$e],Pe=y[$e+1];if(ut===Pe)continue;Vt(ce,Me,Q);const on=Y[Re]-ut;for(let It=ut;It<Pe;It++)if(He(p[It],ce,Me,Q))return j[on+It]}return _i},gi=ce=>{const B=ce.length;let Q=0,he=0,Ae=!1;(Ut>Rn||Pt.size>Rn)&&(Pt=new Map,xn=new Map,Ut=2,cn()),Dn>Ye&&(Dt=new Map,Dn=r,cn());let ke=0;for(;ke<B;){let Re=ce.charCodeAt(ke);if(Re===32||Re>=9&&Re<=13||Re>=160&&We(Re)){Re!==32&&(Ae=!0),ke++;continue}const $e=ke;let ut=0;for(;ke<B;){if(Re=ce.charCodeAt(ke),Re<=32){if(Re===32)break;if(Re>=9&&Re<=13){Ae=!0;break}}else if(Re>=160&&We(Re)){Ae=!0;break}ut=Math.imul(ut^Re,16777619),ke++}const Pe=ke,on=Pe-$e;Q===Lt&&Ja();const It=Q++;fi[It]=$e,hi[It]=Pe,he+=on,ut^=Math.imul(on,2654435761);const xa=ut^ut>>>15|0,Kt=xa&8190;{let ft=-1;if(di[Kt]===xa&&bn[Kt]!==null&&bn[Kt].length===on?ft=Kt:di[Kt|1]===xa&&bn[Kt|1]!==null&&bn[Kt|1].length===on&&(ft=Kt|1),ft>=0){const dn=bn[ft];let Oa=!0;for(let wa=0;wa<on;wa++)if(dn.charCodeAt(wa)!==ce.charCodeAt($e+wa)){Oa=!1;break}if(Oa){Qa[It]=ma[ft],Za[It]=hl[ft],Da[It]=pa[ft];continue}}}let Qt=$e;if(xe!==0){if(Pe-$e<=xe||!ce.startsWith(fe,$e)){Qa[It]=_i,Ka(Kt,ce,$e,Pe,xa,_i,0,0);continue}Qt=$e+xe}let uo=0,gs=0,Ki=-1,fo=-1;for(let ft=Qt;ft<Pe;ft++){const dn=ce.charCodeAt(ft);if(uo===0&&gs===0){if(dn===58){Ki=ft;continue}if(dn===47){fo=ft;continue}}dn===91?uo++:dn===93?uo--:dn===40?gs++:dn===41&&gs--}const Hc=Ki>=Qt?Ki+1:Qt;let Rt=Hc,zn=Pe,Nr=!1,ho=0;zn>Rt&&ce.charCodeAt(zn-1)===33?(Nr=!0,zn--):zn>Rt&&ce.charCodeAt(Rt)===33&&(Nr=!0,Rt++,ho=1);let na=-1;fo>Hc&&(na=fo+ho,na>=zn&&(na=-1));let mo=Rt;zn-Rt>1&&ce.charCodeAt(Rt)===45&&(mo=Rt+1);let ba=0,qn=0,Er=0,vs=-1,ja=0;(v[0]>=0||R[0]===1)&&(va[0]=0,mi[0]=mo,ja=1);let gl=ql,ys=0;for(let ft=mo;ft<zn;ft++)if(ft===na&&(gl=qn<Er?ql:ba,ys=ja),ba!==ql){const dn=ce.charCodeAt(ft);let Oa=-1;if(qn<Er)d.charCodeAt(qn)===dn?(qn++,qn===Er&&(Oa=ba=vs)):ba=ql;else{const wa=c[ba],xl=c[ba+1];let Qi=ql;for(let Sn=wa;Sn<xl;Sn++){const bl=u[Sn];if(d.charCodeAt(bl)===dn){u[Sn+1]-bl===1?Oa=Qi=f[Sn]:(qn=bl+1,Er=u[Sn+1],vs=f[Sn],Qi=ba);break}}ba=Qi}if(Oa>=0&&(v[Oa]>=0||R[Oa]===1)&&ft+1<zn&&ce.charCodeAt(ft+1)===45){if(ja===ga){ga*=2;const wa=new Int32Array(ga);wa.set(va),va=wa;const xl=new Int32Array(ga);xl.set(mi),mi=xl}va[ja]=Oa,mi[ja]=ft+2,ja++}}na===zn&&(gl=qn<Er?ql:ba,ys=ja);const xs=qn<Er?ql:ba;let wn,Fn=!1;if(na>=0)if(Fn=!0,wn=un(ce,Rt,na,gl,ys),wn!==_i&&wn<r&&P[wn]){const ft=un(ce,Rt,zn,xs,ja);ft!==_i&&ft!==wn&&(wn=ft,Fn=!1)}else wn===_i&&(wn=un(ce,Rt,zn,xs,ja),Fn=!1);else wn=un(ce,Rt,zn,xs,ja);let vl=0,yl=0;wn===_i?Qa[It]=_i:(yl=Fn?1:0,vl=Qt>=Ki?Nr?1:0:et(Pt,ce,Qt,Ki,Nr?1:0,ft=>Un(ft,Nr)),Qa[It]=wn,Da[It]=yl,Za[It]=vl),Ka(Kt,ce,$e,Pe,xa,wn,vl,yl)}if(Q===0)return"";if(Q===1)return fi[0]===0&&hi[0]===B?ce:ce.slice(fi[0],hi[0]);if(Q*W>ya){for(;Q*W>ya;)ya<<=1,Sr--;Zn=new Float64Array(ya),pi=new Int32Array(ya)}if(Ut>=fl||Dn>=fl)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(ml.fill(0),pi.fill(0),Jn=1);let Me=!1;for(let Re=Q-1;Re>=0;Re--){const $e=Qa[Re];if($e===_i){Qn[Re]=1;continue}const ut=Za[Re];if(ln(ut,$e)===1){Qn[Re]=0,Me=!0;continue}if(Qn[Re]=1,$e<r){const Pe=$[$e];if(Pe>=0)for(let on=_[Pe];on<_[Pe+1];on++)ln(ut,L[on]);if(Da[Re]&1)for(let on=0;on<A.length;on++)A[on]===$e&&ln(ut,H[on])}}if(!Me&&!Ae&&B===he+Q-1)return ce;let Be="",Ke=0;for(;Ke<Q;){if(!Qn[Ke]){Ke++;continue}const Re=fi[Ke];let $e=hi[Ke],ut=Ke+1;for(;ut<Q&&Qn[ut]&&fi[ut]===$e+1&&ce.charCodeAt($e)===32;)$e=hi[ut],ut++;Be.length>0&&(Be+=" "),Be+=ce.slice(Re,$e),Ke=ut}return Be},Wn=16384,ea=new Int32Array(Wn*2);let On=0,Bt=1,Mt=Object.create(null),Gt=Object.create(null),jn=new Map,pl=new Map,kr=0,Cr=0;const vi=()=>{On^=Wn,Bt=Bt+1|0,Cr=0},yi=ce=>{let B=Mt[ce];if(B!==void 0)return B;const Q=jd(ce,0,ce.length),he=(Q&16383)+On,Ae=ea[he]===(Q^Bt)||ea[he^Wn]===(Q^Bt-1);return Ae&&(B=Gt[ce],B!==void 0)?(Mt[ce]=B,B):(B=gi(ce),Ae?(Mt[ce]=B,++kr>U&&(kr=0,Gt=Mt,Mt=Object.create(null),vi())):(ea[he]=Q^Bt,++Cr>Wn&&vi()),B)},Yi=ce=>{let B=jn.get(ce);if(B!==void 0)return B;const Q=jd(ce,0,ce.length),he=(Q&16383)+On,Ae=ea[he]===(Q^Bt)||ea[he^Wn]===(Q^Bt-1);return Ae&&(B=pl.get(ce),B!==void 0)?(jn.set(ce,B),B):(B=gi(ce),Ae?(jn.set(ce,B),++kr>U&&(kr=0,pl=jn,jn=new Map,vi())):(ea[he]=Q^Bt,++Cr>Wn&&vi()),B)},Xi=ce=>{const B=jd(ce,0,ce.length),Q=(B&16383)+On;return ea[Q]===(B^Bt)||ea[Q^Wn]===(B^Bt-1)?!0:(ea[Q]=B^Bt,++Cr>Wn&&vi(),!1)},ta=U===0?gi:o7?ce=>{const B=jn.get(ce);return B!==void 0?B:Yi(ce)}:yi;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ta(arguments[0]):ta(u7.apply(null,arguments))},mergeString:ta,seenBefore:U===0?()=>!1:Xi,mergeUncached:gi}},_d=(e,a)=>{if(!e)return"";if(typeof e=="string")return e;let i="";if(typeof e.length=="number"&&(!a||Array.isArray(e))){const r=e;for(let c=0;c<r.length;c++){const u=r[c];if(!u)continue;const d=typeof u=="string"?u:_d(u,a);d&&(i&&(i+=" "),i+=d)}return i}if(a){if(typeof e=="number")return""+e;if(typeof e=="object")for(const r in e)e[r]&&(i&&(i+=" "),i+=r)}return i},c7=(e,a)=>{let i="";for(let r=0;r<e.length;r++){const c=e[r];if(!c)continue;const u=typeof c=="string"?c:_d(c,a);u&&(i&&(i+=" "),i+=u)}return i},u7=function(){return c7(arguments,!1)},d7=256,zy=16,f7=1024,Um=4096,h7=(e,a)=>{const i=a===void 0?()=>!0:a.seenBefore,r=a===void 0?e:a.mergeUncached;let c=new Map,u=new Map,d=0,f=null,m=null,v=[],y=[],p=0;const b=(E,M,T)=>{m===null&&(m=new Array(Um).fill(""),v=new Array(Um).fill(""),y=new Array(Um).fill(""));const _=jd(E,0,E.length)&4094;if(m[_]===E&&v[_]===M)return y[_];if(m[_|1]===E&&v[_|1]===M)return y[_|1];const L=e(T?M+" "+E:E),A=m[_]===""?_:_|(m[_|1]===""?1:p++&1);return m[A]=E,v[A]=M,y[A]=L,L},j=(E,M,T,_)=>{let L=0;if(M){if(M!==E.a0)return!1;L=1}if(T){if(T!==(L===0?E.a0:E.a1))return!1;L++}if(_){if(_!==(L===0?E.a0:L===1?E.a1:E.a2))return!1;L++}return L===E.t},S=(E,M)=>{const T=E.a;let _=0;for(let L=0;L<M.length;L++){const A=M[L];if(A){if(A!==T[_])return!1;_++}}return _===E.t},k=(E,M)=>{const T=E.length,_=f===null?null:f.n;if(!M){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let L="",A=-1,H=0,I=!1;for(let $=0;$<T;$++){let F=E[$];if(F){if(typeof F!="string"){if(F=E[$]=_d(F,!0),!F)continue;I=!0}A<0&&(L=F,A=$),H++}}if(H===0)return"";if(H===1)return e(L);if(I){if(_!==null&&S(_,E))return f=_,_.r;if(f!==null&&f!==_&&S(f,E))return f.r}let q=c.get(L);q===void 0&&(q=u.get(L),q!==void 0&&c.set(L,q));let D=null;if(q!==void 0){if(q.skip>0){q.skip--,f=null;let F=L;for(let W=A+1;W<T;W++){const Y=E[W];Y&&(F+=" "+Y)}return b(F,"",!1)}const $=q.e;e:for(let F=0;F<$.length;F++){const W=$[F];if(W.t!==H)continue;const Y=W.a;let P=1;for(let K=A+1;K<T;K++){const R=E[K];if(R&&R!==Y[P++])continue e}D=W;break}D!==null&&(q.miss=0)}if(D===null){let $=L;const F=[L];for(let Y=A+1;Y<T;Y++){const P=E[Y];P&&($+=" "+P,F.push(P))}if(!i($))return r($);D={r:e($),t:F.length,a0:F[0],a1:F[1],a2:F[2]??"",a:F,n:null},q===void 0?c.set(L,q={e:[],miss:0,skip:0,at:0}):++q.miss>zy&&(q.miss=zy,q.skip=f7,q.e.length=0,q.at=0);const W=q.e;W.length<d7?W.push(D):(W[q.at]=D,q.at=q.at+1&255),++d>1e3&&(d=0,u=c,c=new Map)}return f!==null&&f!==D&&(f.n=D),f=D,D.r},C=E=>Array.isArray(E)?k(E.slice(),!1):e(_d(E,!0));return function(E,M,T){const _=arguments.length;if((_|1)===3){const H=f;if(H!==null){const I=H.n;if(I!==null&&j(I,E,M,T))return f=I,I.r;if(H!==I&&j(H,E,M,T))return H.r}if(_===2&&typeof M=="string"&&M!==""){const I=c.get(E);if(I!==void 0&&I.skip>0)return I.skip--,f=null,b(M,E,!0)}return k([E,M,T],!0)}if(_===1)return typeof E=="string"?e(E):C(E);const L=f;if(L!==null){const H=L.n;if(H!==null){const I=H.a;let q=0,D=!0;for(let $=0;$<_;$++){const F=arguments[$];if(F){if(F!==I[q]){D=!1;break}q++}}if(D&&q===H.t)return f=H,H.r}if(L!==H){const I=L.a;let q=0,D=!0;for(let $=0;$<_;$++){const F=arguments[$];if(F){if(F!==I[q]){D=!1;break}q++}}if(D&&q===L.t)return L.r}}const A=[];for(let H=0;H<_;H++)A.push(arguments[H]);return k(A,!0)}},Ly=s7(l7),an=h7(Ly.mergeString,Ly);var lo=Vb(),m7=Object.defineProperty,k0=(e,a)=>m7(e,"name",{value:a,configurable:!0});function Op(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}k0(Op,"setRef");function R4(...e){return a=>{let i=!1;const r=e.map(c=>{const u=Op(c,a);return!i&&typeof u=="function"&&(i=!0),u});if(i)return()=>{for(let c=0;c<r.length;c++){const u=r[c];typeof u=="function"?u():Op(e[c],null)}}}}k0(R4,"composeRefs");function St(...e){return w.useCallback(R4(...e),e)}k0(St,"useComposedRefs");var p7=Object.defineProperty,si=(e,a)=>p7(e,"name",{value:a,configurable:!0});function Pi(e){const a=w.forwardRef((i,r)=>{let{children:c,...u}=i,d=null,f=!1;const m=[];zp(c)&&typeof ad=="function"&&(c=ad(c._payload)),w.Children.forEach(c,b=>{var j;if(L4(b)){f=!0;const S=b;let k="child"in S.props?S.props.child:S.props.children;zp(k)&&typeof ad=="function"&&(k=ad(k._payload)),d=y7(S,k),m.push((j=d==null?void 0:d.props)==null?void 0:j.children)}else m.push(b)}),d?d=w.cloneElement(d,void 0,m):!f&&w.Children.count(c)===1&&w.isValidElement(c)&&(d=c);const v=d?z4(d):void 0,y=St(r,v);if(!d){if(c||c===0)throw new Error(f?j7(e):b7(e));return c}const p=O4(u,d.props??{});return d.type!==w.Fragment&&(p.ref=r?y:v),w.cloneElement(d,p)});return a.displayName=`${e}.Slot`,a}si(Pi,"createSlot");var g7=Pi("Slot"),D4=Symbol.for("radix.slottable");function v7(e){const a=si(i=>"child"in i?i.children(i.child):i.children,"Slottable");return a.displayName=`${e}.Slottable`,a.__radixId=D4,a}si(v7,"createSlottable");var y7=si((e,a)=>{if("child"in e.props){const i=e.props.child;return w.isValidElement(i)?w.cloneElement(i,void 0,e.props.children(i.props.children)):null}return w.isValidElement(a)?a:null},"getSlottableElementFromSlottable");function O4(e,a){const i={...a};for(const r in a){const c=e[r],u=a[r];/^on[A-Z]/.test(r)?c&&u?i[r]=(...f)=>{const m=u(...f);return c(...f),m}:c&&(i[r]=c):r==="style"?i[r]={...c,...u}:r==="className"&&(i[r]=[c,u].filter(Boolean).join(" "))}return{...e,...i}}si(O4,"mergeProps");function z4(e){var r,c;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?e.ref:(a=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}si(z4,"getElementRef");function L4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===D4}si(L4,"isSlottable");var x7=Symbol.for("react.lazy");function zp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===x7&&"_payload"in e&&B4(e._payload)}si(zp,"isLazyComponent");function B4(e){return typeof e=="object"&&e!==null&&"then"in e}si(B4,"isPromiseLike");var b7=si(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),j7=si(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ad=Nc[" use ".trim().toString()],w7=Object.defineProperty,S7=(e,a)=>w7(e,"name",{value:a,configurable:!0}),k7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=k7.reduce((e,a)=>{const i=Pi(`Primitive.${a}`),r=w.forwardRef((c,u)=>{const{asChild:d,...f}=c,m=d?i:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(m,{...f,ref:u})});return r.displayName=`Primitive.${a}`,{...e,[a]:r}},{});function I4(e,a){e&&lo.flushSync(()=>e.dispatchEvent(a))}S7(I4,"dispatchDiscreteCustomEvent");var C7=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"}),N7=Object.defineProperty,Va=(e,a)=>N7(e,"name",{value:a,configurable:!0});function E7(e,a){const i=w.createContext(a);i.displayName=e+"Context";const r=Va(u=>{const{children:d,...f}=u,m=w.useMemo(()=>f,Object.values(f));return o.jsx(i.Provider,{value:m,children:d})},"Provider");r.displayName=e+"Provider";function c(u,d={}){const{optional:f=!1}=d,m=w.useContext(i);if(m)return m;if(a!==void 0)return a;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return Va(c,"useContext"),[r,c]}Va(E7,"createContext");function ol(e,a=[]){let i=[];function r(u,d){const f=w.createContext(d);f.displayName=u+"Context";const m=i.length;i=[...i,d];const v=Va(p=>{var E;const{scope:b,children:j,...S}=p,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useMemo(()=>S,Object.values(S));return o.jsx(k.Provider,{value:C,children:j})},"Provider");v.displayName=u+"Provider";function y(p,b,j={}){var E;const{optional:S=!1}=j,k=((E=b==null?void 0:b[e])==null?void 0:E[m])||f,C=w.useContext(k);if(C)return C;if(d!==void 0)return d;if(!S)throw new Error(`\`${p}\` must be used within \`${u}\``)}return Va(y,"useContext"),[v,y]}Va(r,"createContext");const c=Va(()=>{const u=i.map(d=>w.createContext(d));return Va(function(f){const m=(f==null?void 0:f[e])||u;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return c.scopeName=e,[r,H4(c,...a)]}Va(ol,"createContextScope");function H4(...e){const a=e[0];if(e.length===1)return a;const i=Va(()=>{const r=e.map(c=>({useScope:c(),scopeName:c.scopeName}));return Va(function(u){const d=r.reduce((f,{useScope:m,scopeName:v})=>{const p=m(u)[`__scope${v}`];return{...f,...p}},{});return w.useMemo(()=>({[`__scope${a.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return i.scopeName=a.scopeName,i}Va(H4,"composeContextScopes");var T7=Object.defineProperty,gn=(e,a)=>T7(e,"name",{value:a,configurable:!0});function P4(e){const a=e+"CollectionProvider",[i,r]=ol(a),[c,u]=i(a,{collectionRef:{current:null},itemMap:new Map}),d=gn(k=>{const{scope:C,children:E}=k,M=w.useRef(null),T=w.useRef(new Map).current;return o.jsx(c,{scope:C,itemMap:T,collectionRef:M,children:E})},"CollectionProvider");d.displayName=a;const f=e+"CollectionSlot",m=Pi(f),v=w.forwardRef((k,C)=>{const{scope:E,children:M}=k,T=u(f,E),_=St(C,T.collectionRef);return o.jsx(m,{ref:_,children:M})});v.displayName=f;const y=e+"CollectionItemSlot",p="data-radix-collection-item",b=Pi(y),j=w.forwardRef((k,C)=>{const{scope:E,children:M,...T}=k,_=w.useRef(null),L=St(C,_),A=u(y,E);return w.useEffect(()=>(A.itemMap.set(_,{ref:_,...T}),()=>void A.itemMap.delete(_))),o.jsx(b,{[p]:"",ref:L,children:M})});j.displayName=y;function S(k){const C=u(e+"CollectionConsumer",k);return w.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const T=Array.from(M.querySelectorAll(`[${p}]`));return Array.from(C.itemMap.values()).sort((A,H)=>T.indexOf(A.ref.current)-T.indexOf(H.ref.current))},[C.collectionRef,C.itemMap])}return gn(S,"useCollection"),[{Provider:d,Slot:v,ItemSlot:j},S,r]}gn(P4,"createCollection");var By=new WeakMap,tn,Ma,qm=(Ma=class extends Map{constructor(i){super(i);by(this,tn);Rm(this,tn,[...super.keys()]),By.set(this,!0)}set(i,r){return By.get(this)&&(this.has(i)?Bn(this,tn)[Bn(this,tn).indexOf(i)]=i:Bn(this,tn).push(i)),super.set(i,r),this}insert(i,r,c){const u=this.has(r),d=Bn(this,tn).length,f=C0(i);let m=f>=0?f:d+f;const v=m<0||m>=d?-1:m;if(v===this.size||u&&v===this.size-1||v===-1)return this.set(r,c),this;const y=this.size+(u?0:1);f<0&&m++;const p=[...Bn(this,tn)];let b,j=!1;for(let S=m;S<y;S++)if(m===S){let k=p[S];p[S]===r&&(k=p[S+1]),u&&this.delete(r),b=this.get(k),this.set(r,c)}else{!j&&p[S-1]===r&&(j=!0);const k=p[j?S:S-1],C=b;b=this.get(k),this.delete(k),this.set(k,C)}return this}with(i,r,c){const u=new Ma(this);return u.insert(i,r,c),u}before(i){const r=Bn(this,tn).indexOf(i)-1;if(!(r<0))return this.entryAt(r)}setBefore(i,r,c){const u=Bn(this,tn).indexOf(i);return u===-1?this:this.insert(u,r,c)}after(i){let r=Bn(this,tn).indexOf(i);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(i,r,c){const u=Bn(this,tn).indexOf(i);return u===-1?this:this.insert(u+1,r,c)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Rm(this,tn,[]),super.clear()}delete(i){const r=super.delete(i);return r&&Bn(this,tn).splice(Bn(this,tn).indexOf(i),1),r}deleteAt(i){const r=this.keyAt(i);return r!==void 0?this.delete(r):!1}at(i){const r=wd(Bn(this,tn),i);if(r!==void 0)return this.get(r)}entryAt(i){const r=wd(Bn(this,tn),i);if(r!==void 0)return[r,this.get(r)]}indexOf(i){return Bn(this,tn).indexOf(i)}keyAt(i){return wd(Bn(this,tn),i)}from(i,r){const c=this.indexOf(i);if(c===-1)return;let u=c+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(i,r){const c=this.indexOf(i);if(c===-1)return;let u=c+r;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return u;c++}}findIndex(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return c;c++}return-1}filter(i,r){const c=[];let u=0;for(const d of this)Reflect.apply(i,r,[d,u,this])&&c.push(d),u++;return new Ma(c)}map(i,r){const c=[];let u=0;for(const d of this)c.push([d[0],Reflect.apply(i,r,[d,u,this])]),u++;return new Ma(c)}reduce(...i){const[r,c]=i;let u=0,d=c??this.at(0);for(const f of this)u===0&&i.length===1?d=f:d=Reflect.apply(r,this,[d,f,u,this]),u++;return d}reduceRight(...i){const[r,c]=i;let u=c??this.at(-1);for(let d=this.size-1;d>=0;d--){const f=this.at(d);d===this.size-1&&i.length===1?u=f:u=Reflect.apply(r,this,[u,f,d,this])}return u}toSorted(i){const r=[...this.entries()].sort(i);return new Ma(r)}toReversed(){const i=new Ma;for(let r=this.size-1;r>=0;r--){const c=this.keyAt(r),u=this.get(c);i.set(c,u)}return i}toSpliced(...i){const r=[...this.entries()];return r.splice(...i),new Ma(r)}slice(i,r){const c=new Ma;let u=this.size-1;if(i===void 0)return c;i<0&&(i=i+this.size),r!==void 0&&r>0&&(u=r-1);for(let d=i;d<=u;d++){const f=this.keyAt(d),m=this.get(f);c.set(f,m)}return c}every(i,r){let c=0;for(const u of this){if(!Reflect.apply(i,r,[u,c,this]))return!1;c++}return!0}some(i,r){let c=0;for(const u of this){if(Reflect.apply(i,r,[u,c,this]))return!0;c++}return!1}},tn=new WeakMap,gn(Ma,"OrderedDict"),Ma);function wd(e,a){if("at"in Array.prototype)return Array.prototype.at.call(e,a);const i=U4(e,a);return i===-1?void 0:e[i]}gn(wd,"at");function U4(e,a){const i=e.length,r=C0(a),c=r>=0?r:i+r;return c<0||c>=i?-1:c}gn(U4,"toSafeIndex");function C0(e){return e!==e||e===0?0:Math.trunc(e)}gn(C0,"toSafeInteger");function A7(e){const a=e+"CollectionProvider",[i,r]=ol(a),[c,u]=i(a,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new qm,setItemMap:gn(()=>{},"setItemMap")}),d=gn(({state:T,..._})=>T?o.jsx(m,{..._,state:T}):o.jsx(f,{..._}),"CollectionProvider");d.displayName=a;const f=gn(T=>{const _=C();return o.jsx(m,{...T,state:_})},"CollectionInit");f.displayName=a+"Init";const m=gn(T=>{const{scope:_,children:L,state:A}=T,H=w.useRef(null),[I,q]=w.useState(null),D=St(H,q),[$,F]=A;return w.useEffect(()=>{if(!I)return;const W=V4(()=>{});return W.observe(I,{childList:!0,subtree:!0}),()=>{W.disconnect()}},[I]),o.jsx(c,{scope:_,itemMap:$,setItemMap:F,collectionRef:D,collectionRefObject:H,collectionElement:I,children:L})},"CollectionProviderImpl");m.displayName=a+"Impl";const v=e+"CollectionSlot",y=Pi(v),p=w.forwardRef((T,_)=>{const{scope:L,children:A}=T,H=u(v,L),I=St(_,H.collectionRef);return o.jsx(y,{ref:I,children:A})});p.displayName=v;const b=e+"CollectionItemSlot",j="data-radix-collection-item",S=Pi(b),k=w.forwardRef((T,_)=>{const{scope:L,children:A,...H}=T,I=w.useRef(null),[q,D]=w.useState(null),$=St(_,I,D),F=u(b,L),{setItemMap:W}=F,Y=w.useRef(H);q4(Y.current,H)||(Y.current=H);const P=Y.current;return w.useEffect(()=>{const K=P;return W(R=>q?R.has(q)?R.set(q,{...K,element:q}).toSorted(Lp):(R.set(q,{...K,element:q}),R.toSorted(Lp)):R),()=>{W(R=>!q||!R.has(q)?R:(R.delete(q),new qm(R)))}},[q,P,W]),o.jsx(S,{[j]:"",ref:$,children:A})});k.displayName=b;function C(){return w.useState(new qm)}gn(C,"useInitCollection");function E(T){const{itemMap:_}=u(e+"CollectionConsumer",T);return _}return gn(E,"useCollection"),[{Provider:d,Slot:p,ItemSlot:k},{createCollectionScope:r,useCollection:E,useInitCollection:C}]}gn(A7,"createCollection");function q4(e,a){if(e===a)return!0;if(typeof e!="object"||typeof a!="object"||e==null||a==null)return!1;const i=Object.keys(e),r=Object.keys(a);if(i.length!==r.length)return!1;for(const c of i)if(!Object.prototype.hasOwnProperty.call(a,c)||e[c]!==a[c])return!1;return!0}gn(q4,"shallowEqual");function F4(e,a){return!!(a.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}gn(F4,"isElementPreceding");function Lp(e,a){return!e[1].element||!a[1].element?0:F4(e[1].element,a[1].element)?-1:1}gn(Lp,"sortByDocumentPosition");function V4(e){return new MutationObserver(i=>{for(const r of i)if(r.type==="childList"){e();return}})}gn(V4,"getChildListObserver");var _7=Object.defineProperty,us=(e,a)=>_7(e,"name",{value:a,configurable:!0}),$4=!!(typeof window<"u"&&window.document&&window.document.createElement);function gt(e,a,{checkForDefaultPrevented:i=!0}={}){return us(function(c){if(e==null||e(c),i===!1||!c||!c.defaultPrevented)return a==null?void 0:a(c)},"handleEvent")}us(gt,"composeEventHandlers");function M7(e){var a;if(!$4)throw new Error("Cannot access window outside of the DOM");return((a=e==null?void 0:e.ownerDocument)==null?void 0:a.defaultView)??window}us(M7,"getOwnerWindow");function Bp(e){if(!$4)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}us(Bp,"getOwnerDocument");function G4(e,a=!1){const{activeElement:i}=Bp(e);if(!(i!=null&&i.nodeName))return null;if(Y4(i)&&i.contentDocument)return G4(i.contentDocument.body,a);if(a){const r=i.getAttribute("aria-activedescendant");if(r){const c=Bp(i).getElementById(r);if(c)return c}}return i}us(G4,"getActiveElement");function Y4(e){return e.tagName==="IFRAME"}us(Y4,"isFrame");var Mn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},R7=Object.defineProperty,D7=(e,a)=>R7(e,"name",{value:a,configurable:!0}),Iy=Nc[" useEffectEvent ".trim().toString()],Hy=Nc[" useInsertionEffect ".trim().toString()];function X4(e){if(typeof Iy=="function")return Iy(e);const a=w.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Hy=="function"?Hy(()=>{a.current=e}):Mn(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}D7(X4,"useEffectEvent");var O7=Object.defineProperty,Ac=(e,a)=>O7(e,"name",{value:a,configurable:!0}),z7=Nc[" useInsertionEffect ".trim().toString()]||Mn;function yc({prop:e,defaultProp:a,onChange:i=Ac(()=>{},"onChange"),caller:r}){const[c,u,d]=K4({defaultProp:a,onChange:i}),f=e!==void 0,m=f?e:c,v=w.useCallback(y=>{var p;if(f){const b=Q4(y)?y(e):y;b!==e&&((p=d.current)==null||p.call(d,b))}else u(y)},[f,e,u,d]);return[m,v]}Ac(yc,"useControllableState");function K4({defaultProp:e,onChange:a}){const[i,r]=w.useState(e),c=w.useRef(i),u=w.useRef(a);return z7(()=>{u.current=a},[a]),w.useEffect(()=>{var d;c.current!==i&&((d=u.current)==null||d.call(u,i),c.current=i)},[i,c]),[i,r,u]}Ac(K4,"useUncontrolledState");function Q4(e){return typeof e=="function"}Ac(Q4,"isFunction");var Py=Symbol("RADIX:SYNC_STATE");function L7(e,a,i,r){const{prop:c,defaultProp:u,onChange:d,caller:f}=a,m=c!==void 0,v=X4(d),y=[{...i,state:u}];r&&y.push(r);const[p,b]=w.useReducer((C,E)=>{if(E.type===Py)return{...C,state:E.state};const M=e(C,E);return m&&!Object.is(M.state,C.state)&&v(M.state),M},...y),j=p.state,S=w.useRef(j);w.useEffect(()=>{S.current!==j&&(S.current=j,m||v(j))},[j,S,m]);const k=w.useMemo(()=>c!==void 0?{...p,state:c}:p,[p,c]);return w.useEffect(()=>{m&&!Object.is(c,p.state)&&b({type:Py,state:c})},[c,p.state,m]),[k,b]}Ac(L7,"useControllableStateReducer");var B7=Object.defineProperty,fr=(e,a)=>B7(e,"name",{value:a,configurable:!0});function Z4(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}fr(Z4,"useStateMachine");var $i=fr(e=>{const{present:a,children:i}=e,r=J4(a),c=typeof i=="function"?i({present:r.isPresent}):w.Children.only(i),u=W4(r.ref,ew(c));return typeof i=="function"||r.isPresent?w.cloneElement(c,{ref:u}):null},"Presence");function J4(e){const[a,i]=w.useState(),r=w.useRef(null),c=w.useRef(e),u=w.useRef("none"),d=w.useRef(void 0),f=e?"mounted":"unmounted",[m,v]=Z4(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{m==="mounted"?(u.current=d.current??ts(r.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=r.current,p=c.current;if(p!==e){const j=u.current,S=ts(y);e?(d.current=S,v("MOUNT")):S==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(p&&j!==S?"ANIMATION_OUT":"UNMOUNT"),c.current=e}},[e,v]),Mn(()=>{if(a){let y;const p=a.ownerDocument.defaultView??window,b=fr(S=>{const C=ts(r.current).includes(CSS.escape(S.animationName));if(S.target===a&&C&&(v("ANIMATION_END"),!c.current)){const E=a.style.animationFillMode;a.style.animationFillMode="forwards",y=p.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=E)})}},"handleAnimationEnd"),j=fr(S=>{S.target===a&&(u.current=ts(r.current))},"handleAnimationStart");return a.addEventListener("animationstart",j),a.addEventListener("animationcancel",b),a.addEventListener("animationend",b),()=>{p.clearTimeout(y),a.removeEventListener("animationstart",j),a.removeEventListener("animationcancel",b),a.removeEventListener("animationend",b)}}else v("ANIMATION_END")},[a,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{if(y){const p=getComputedStyle(y);r.current=p,d.current=ts(p)}else r.current=null;i(y)},[])}}fr(J4,"usePresence");function Ip(e,a){if(typeof e=="function")return e(a);e!=null&&(e.current=a)}fr(Ip,"setRef");function W4(...e){const a=w.useRef(e);return a.current=e,w.useCallback(i=>{const r=a.current;let c=!1;const u=r.map(d=>{const f=Ip(d,i);return!c&&typeof f=="function"&&(c=!0),f});if(c)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():Ip(r[d],null)}}},[])}fr(W4,"useStableComposedRefs");function ts(e){return(e==null?void 0:e.animationName)||"none"}fr(ts,"getAnimationName");function ew(e){var r,c;let a=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?e.ref:(a=(c=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:c.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}fr(ew,"getElementRef");var I7=Object.defineProperty,H7=(e,a)=>I7(e,"name",{value:a,configurable:!0}),P7=Nc[" useId ".trim().toString()]||(()=>{}),U7=0;function Zl(e){const[a,i]=w.useState(P7());return Mn(()=>{e||i(r=>r??String(U7++))},[e]),e||(a?`radix-${a}`:"")}H7(Zl,"useId");var q7=Object.defineProperty,F7=(e,a)=>q7(e,"name",{value:a,configurable:!0}),V7=w.createContext(void 0);function N0(e){const a=w.useContext(V7);return e||a||"ltr"}F7(N0,"useDirection");var $7=Object.defineProperty,G7=(e,a)=>$7(e,"name",{value:a,configurable:!0});function _n(e){const a=w.useRef(e);return w.useEffect(()=>{a.current=e}),w.useMemo(()=>((...i)=>{var r;return(r=a.current)==null?void 0:r.call(a,...i)}),[])}G7(_n,"useCallbackRef");var Y7=Object.defineProperty,pn=(e,a)=>Y7(e,"name",{value:a,configurable:!0}),Hp="dismissableLayer.update",X7="dismissableLayer.pointerDownOutside",K7="dismissableLayer.focusOutside",Uy,tw=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),E0=w.forwardRef(pn(function(a,i){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,...y}=a,p=w.useContext(tw),[b,j]=w.useState(null),S=(b==null?void 0:b.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=w.useState({}),C=St(i,j),E=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),T=M?E.indexOf(M):-1,_=b?E.indexOf(b):-1,L=p.layersWithOutsidePointerEventsDisabled.size>0,A=_>=T,H=w.useRef(!1),I=aw(F=>{d==null||d(F),m==null||m(F),F.defaultPrevented||v==null||v()},{ownerDocument:S,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:H,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(F=>{if(!(F instanceof Node))return!1;const W=[...p.branches].some(Y=>Y.contains(F));return A&&!W},[p.branches,A])}),q=iw(F=>{if(c&&H.current)return;const W=F.target;[...p.branches].some(P=>P.contains(W))||(f==null||f(F),m==null||m(F),F.defaultPrevented||v==null||v())},S),D=b?_===E.length-1:!1,$=_n(F=>{F.key==="Escape"&&(u==null||u(F),!F.defaultPrevented&&v&&(F.preventDefault(),v()))});return w.useEffect(()=>{if(D)return S.addEventListener("keydown",$,{capture:!0}),()=>S.removeEventListener("keydown",$,{capture:!0})},[S,D,$]),w.useEffect(()=>{if(b)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Uy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),Pp(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(b),p.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Uy))}},[b,S,r,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),Pp())},[b,p]),w.useEffect(()=>{const F=pn(()=>k({}),"handleUpdate");return document.addEventListener(Hp,F),()=>document.removeEventListener(Hp,F)},[]),o.jsx(zt.div,{...y,ref:C,style:{pointerEvents:L?A?"auto":"none":void 0,...a.style},onFocusCapture:gt(a.onFocusCapture,q.onFocusCapture),onBlurCapture:gt(a.onBlurCapture,q.onBlurCapture),onPointerDownCapture:gt(a.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function nw(){const e=w.useContext(tw),[a,i]=w.useState(null);return w.useEffect(()=>{if(a)return e.dismissableSurfaces.add(a),()=>{e.dismissableSurfaces.delete(a)}},[a,e.dismissableSurfaces]),i}pn(nw,"useDismissableLayerSurface");var Q7=pn(()=>!0,"IS_TRUE");function aw(e,a){const{ownerDocument:i=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:c,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=Q7}=a,f=_n(e),m=w.useRef(!1),v=w.useRef(!1),y=w.useRef(new Map),p=w.useRef(()=>{});return w.useEffect(()=>{function b(){v.current=!1,c.current=!1,y.current.clear()}pn(b,"resetOutsideInteraction");function j(){return Array.from(y.current.values()).some(Boolean)}pn(j,"isOutsideInteractionIntercepted");function S(T){if(!v.current)return;const _=T.target;_ instanceof Node&&[...u].some(A=>A.contains(_))||y.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{v.current&&p.current()},0)}pn(S,"handleInteractionCapture");function k(T){v.current&&y.current.set(T.type,!1)}pn(k,"handleInteractionBubble");const C=pn(T=>{if(T.target&&!m.current){let _=function(){i.removeEventListener("click",p.current);const A=j();b(),A||T0(X7,f,L,{discrete:!0})};if(pn(_,"handleAndDispatchPointerDownOutsideEvent"),!d(T.target)){i.removeEventListener("click",p.current),b(),m.current=!1;return}const L={originalEvent:T};v.current=!0,c.current=r&&T.button===0,y.current.clear(),!r||T.button!==0?_():(i.removeEventListener("click",p.current),p.current=_,i.addEventListener("click",p.current,{once:!0}))}else i.removeEventListener("click",p.current),b();m.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of E)i.addEventListener(T,S,!0),i.addEventListener(T,k);const M=window.setTimeout(()=>{i.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),i.removeEventListener("pointerdown",C),i.removeEventListener("click",p.current);for(const T of E)i.removeEventListener(T,S,!0),i.removeEventListener(T,k)}},[i,f,r,c,u,d]),{onPointerDownCapture:pn(()=>m.current=!0,"onPointerDownCapture")}}pn(aw,"usePointerDownOutside");function iw(e,a=globalThis==null?void 0:globalThis.document){const i=_n(e),r=w.useRef(!1);return w.useEffect(()=>{const c=pn(u=>{u.target&&!r.current&&T0(K7,i,{originalEvent:u},{discrete:!1})},"handleFocus");return a.addEventListener("focusin",c),()=>a.removeEventListener("focusin",c)},[a,i]),{onFocusCapture:pn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:pn(()=>r.current=!1,"onBlurCapture")}}pn(iw,"useFocusOutside");function Pp(){const e=new CustomEvent(Hp);document.dispatchEvent(e)}pn(Pp,"dispatchUpdate");function T0(e,a,i,{discrete:r}){const c=i.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});a&&c.addEventListener(e,a,{once:!0}),r?I4(c,u):c.dispatchEvent(u)}pn(T0,"handleAndDispatchCustomEvent");var Z7=Object.defineProperty,Kn=(e,a)=>Z7(e,"name",{value:a,configurable:!0}),Fm="focusScope.autoFocusOnMount",Vm="focusScope.autoFocusOnUnmount",qy={bubbles:!1,cancelable:!0},A0=w.forwardRef(Kn(function(a,i){const{loop:r=!1,trapped:c=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=a,[m,v]=w.useState(null),y=_n(u),p=_n(d),b=w.useRef(null),j=St(i,v),S=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(c){let C=function(_){if(S.paused||!m)return;const L=_.target;m.contains(L)?b.current=L:cr(b.current,{select:!0})},E=function(_){if(S.paused||!m)return;const L=_.relatedTarget;L!==null&&(m.contains(L)||cr(b.current,{select:!0}))},M=function(_){if(document.activeElement===document.body)for(const A of _)A.removedNodes.length>0&&cr(m)};Kn(C,"handleFocusIn"),Kn(E,"handleFocusOut"),Kn(M,"handleMutations"),document.addEventListener("focusin",C),document.addEventListener("focusout",E);const T=new MutationObserver(M);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",E),T.disconnect()}}},[c,m,S.paused]),w.useEffect(()=>{if(m){Fy.add(S);const C=document.activeElement;if(!m.contains(C)){const M=new CustomEvent(Fm,qy);m.addEventListener(Fm,y),m.dispatchEvent(M),M.defaultPrevented||(rw(uw(_0(m)),{select:!0}),document.activeElement===C&&cr(m))}return()=>{m.removeEventListener(Fm,y),setTimeout(()=>{const M=new CustomEvent(Vm,qy);m.addEventListener(Vm,p),m.dispatchEvent(M),M.defaultPrevented||cr(C??document.body,{select:!0}),m.removeEventListener(Vm,p),Fy.remove(S)},0)}}},[m,y,p,S]);const k=w.useCallback(C=>{if(!r&&!c||S.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(E&&M){const T=C.currentTarget,[_,L]=lw(T);_&&L?!C.shiftKey&&M===L?(C.preventDefault(),r&&cr(_,{select:!0})):C.shiftKey&&M===_&&(C.preventDefault(),r&&cr(L,{select:!0})):M===T&&C.preventDefault()}},[r,c,S.paused]);return o.jsx(zt.div,{tabIndex:-1,...f,ref:j,onKeyDown:k})},"FocusScope"));function rw(e,{select:a=!1}={}){const i=document.activeElement;for(const r of e)if(cr(r,{select:a}),document.activeElement!==i)return}Kn(rw,"focusFirst");function lw(e){const a=_0(e),i=Up(a,e),r=Up(a.reverse(),e);return[i,r]}Kn(lw,"getTabbableEdges");function _0(e){const a=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Kn(r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)a.push(i.currentNode);return a}Kn(_0,"getTabbableCandidates");function Up(e,a){const i=typeof a.checkVisibility=="function"&&a.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(i?!r.checkVisibility({checkVisibilityCSS:!0}):ow(r,{upTo:a})))return r}Kn(Up,"findVisible");function ow(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Kn(ow,"isHidden");function sw(e){return e instanceof HTMLInputElement&&"select"in e}Kn(sw,"isSelectableInput");function cr(e,{select:a=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&sw(e)&&a&&e.select()}}Kn(cr,"focus");var Fy=cw();function cw(){let e=[];return{add(a){const i=e[0];a!==i&&(i==null||i.pause()),e=qp(e,a),e.unshift(a)},remove(a){var i;e=qp(e,a),(i=e[0])==null||i.resume()}}}Kn(cw,"createFocusScopesStack");function qp(e,a){const i=[...e],r=i.indexOf(a);return r!==-1&&i.splice(r,1),i}Kn(qp,"arrayRemove");function uw(e){return e.filter(a=>a.tagName!=="A")}Kn(uw,"removeLinks");var J7=Object.defineProperty,W7=(e,a)=>J7(e,"name",{value:a,configurable:!0}),M0=w.forwardRef(W7(function(a,i){var m;const{container:r,...c}=a,[u,d]=w.useState(!1);Mn(()=>d(!0),[]);const f=r||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?lo.createPortal(o.jsx(zt.div,{...c,ref:i}),f):null},"Portal")),e9=Object.defineProperty,R0=(e,a)=>e9(e,"name",{value:a,configurable:!0}),id=0,Mi=null;function t9(e){return _c(),e.children}R0(t9,"FocusGuards");function _c(){w.useEffect(()=>{Mi||(Mi={start:Fp(),end:Fp()});const{start:e,end:a}=Mi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==a&&document.body.insertAdjacentElement("beforeend",a),id++,()=>{id===1&&(Mi==null||Mi.start.remove(),Mi==null||Mi.end.remove(),Mi=null),id=Math.max(0,id-1)}},[])}R0(_c,"useFocusGuards");function Fp(){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}R0(Fp,"createFocusGuard");var Oi=function(){return Oi=Object.assign||function(a){for(var i,r=1,c=arguments.length;r<c;r++){i=arguments[r];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(a[u]=i[u])}return a},Oi.apply(this,arguments)};function dw(e,a){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(e);c<r.length;c++)a.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(e,r[c])&&(i[r[c]]=e[r[c]]);return i}function n9(e,a,i){if(i||arguments.length===2)for(var r=0,c=a.length,u;r<c;r++)(u||!(r in a))&&(u||(u=Array.prototype.slice.call(a,0,r)),u[r]=a[r]);return e.concat(u||Array.prototype.slice.call(a))}var Sd="right-scroll-bar-position",kd="width-before-scroll-bar",a9="with-scroll-bars-hidden",i9="--removed-body-scroll-bar-size";function $m(e,a){return typeof e=="function"?e(a):e&&(e.current=a),e}function r9(e,a){var i=w.useState(function(){return{value:e,callback:a,facade:{get current(){return i.value},set current(r){var c=i.value;c!==r&&(i.value=r,i.callback(r,c))}}}})[0];return i.callback=a,i.facade}var l9=typeof window<"u"?w.useLayoutEffect:w.useEffect,Vy=new WeakMap;function o9(e,a){var i=r9(null,function(r){return e.forEach(function(c){return $m(c,r)})});return l9(function(){var r=Vy.get(i);if(r){var c=new Set(r),u=new Set(e),d=i.current;c.forEach(function(f){u.has(f)||$m(f,null)}),u.forEach(function(f){c.has(f)||$m(f,d)})}Vy.set(i,e)},[e]),i}function s9(e){return e}function c9(e,a){a===void 0&&(a=s9);var i=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(u){var d=a(u,r);return i.push(d),function(){i=i.filter(function(f){return f!==d})}},assignSyncMedium:function(u){for(r=!0;i.length;){var d=i;i=[],d.forEach(u)}i={push:function(f){return u(f)},filter:function(){return i}}},assignMedium:function(u){r=!0;var d=[];if(i.length){var f=i;i=[],f.forEach(u),d=i}var m=function(){var y=d;d=[],y.forEach(u)},v=function(){return Promise.resolve().then(m)};v(),i={push:function(y){d.push(y),v()},filter:function(y){return d=d.filter(y),i}}}};return c}function u9(e){e===void 0&&(e={});var a=c9(null);return a.options=Oi({async:!0,ssr:!1},e),a}var fw=function(e){var a=e.sideCar,i=dw(e,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=a.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Oi({},i))};fw.isSideCarExport=!0;function d9(e,a){return e.useMedium(a),fw}var hw=u9(),Gm=function(){},Qd=w.forwardRef(function(e,a){var i=w.useRef(null),r=w.useState({onScrollCapture:Gm,onWheelCapture:Gm,onTouchMoveCapture:Gm}),c=r[0],u=r[1],d=e.forwardProps,f=e.children,m=e.className,v=e.removeScrollBar,y=e.enabled,p=e.shards,b=e.sideCar,j=e.noRelative,S=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,T=e.gapMode,_=dw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=b,A=o9([i,a]),H=Oi(Oi({},_),c);return w.createElement(w.Fragment,null,y&&w.createElement(L,{sideCar:hw,removeScrollBar:v,shards:p,noRelative:j,noIsolation:S,inert:k,setCallbacks:u,allowPinchZoom:!!C,lockRef:i,gapMode:T}),d?w.cloneElement(w.Children.only(f),Oi(Oi({},H),{ref:A})):w.createElement(M,Oi({},H,{className:m,ref:A}),f))});Qd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qd.classNames={fullWidth:kd,zeroRight:Sd};var f9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function h9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var a=f9();return a&&e.setAttribute("nonce",a),e}function m9(e,a){e.styleSheet?e.styleSheet.cssText=a:e.appendChild(document.createTextNode(a))}function p9(e){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(e)}var g9=function(){var e=0,a=null;return{add:function(i){e==0&&(a=h9())&&(m9(a,i),p9(a)),e++},remove:function(){e--,!e&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},v9=function(){var e=g9();return function(a,i){w.useEffect(function(){return e.add(a),function(){e.remove()}},[a&&i])}},mw=function(){var e=v9(),a=function(i){var r=i.styles,c=i.dynamic;return e(r,c),null};return a},y9={left:0,top:0,right:0,gap:0},Ym=function(e){return parseInt(e||"",10)||0},x9=function(e){var a=window.getComputedStyle(document.body),i=a[e==="padding"?"paddingLeft":"marginLeft"],r=a[e==="padding"?"paddingTop":"marginTop"],c=a[e==="padding"?"paddingRight":"marginRight"];return[Ym(i),Ym(r),Ym(c)]},b9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return y9;var a=x9(e),i=document.documentElement.clientWidth,r=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,r-i+a[2]-a[0])}},j9=mw(),is="data-scroll-locked",w9=function(e,a,i,r){var c=e.left,u=e.top,d=e.right,f=e.gap;return i===void 0&&(i="margin"),`
470
+ .`.concat(a9,` {
471
+ overflow: hidden `).concat(r,`;
472
+ padding-right: `).concat(f,"px ").concat(r,`;
473
+ }
474
+ body[`).concat(is,`] {
475
+ overflow: hidden `).concat(r,`;
476
+ overscroll-behavior: contain;
477
+ `).concat([a&&"position: relative ".concat(r,";"),i==="margin"&&`
478
+ padding-left: `.concat(c,`px;
479
+ padding-top: `).concat(u,`px;
480
+ padding-right: `).concat(d,`px;
481
+ margin-left:0;
482
+ margin-top:0;
483
+ margin-right: `).concat(f,"px ").concat(r,`;
484
+ `),i==="padding"&&"padding-right: ".concat(f,"px ").concat(r,";")].filter(Boolean).join(""),`
485
+ }
486
+
487
+ .`).concat(Sd,` {
488
+ right: `).concat(f,"px ").concat(r,`;
489
+ }
490
+
491
+ .`).concat(kd,` {
492
+ margin-right: `).concat(f,"px ").concat(r,`;
493
+ }
494
+
495
+ .`).concat(Sd," .").concat(Sd,` {
496
+ right: 0 `).concat(r,`;
497
+ }
498
+
499
+ .`).concat(kd," .").concat(kd,` {
500
+ margin-right: 0 `).concat(r,`;
501
+ }
502
+
503
+ body[`).concat(is,`] {
504
+ `).concat(i9,": ").concat(f,`px;
505
+ }
506
+ `)},$y=function(){var e=parseInt(document.body.getAttribute(is)||"0",10);return isFinite(e)?e:0},S9=function(){w.useEffect(function(){return document.body.setAttribute(is,($y()+1).toString()),function(){var e=$y()-1;e<=0?document.body.removeAttribute(is):document.body.setAttribute(is,e.toString())}},[])},k9=function(e){var a=e.noRelative,i=e.noImportant,r=e.gapMode,c=r===void 0?"margin":r;S9();var u=w.useMemo(function(){return b9(c)},[c]);return w.createElement(j9,{styles:w9(u,!a,c,i?"":"!important")})},Vp=!1;if(typeof window<"u")try{var rd=Object.defineProperty({},"passive",{get:function(){return Vp=!0,!0}});window.addEventListener("test",rd,rd),window.removeEventListener("test",rd,rd)}catch{Vp=!1}var Qo=Vp?{passive:!1}:!1,C9=function(e){return e.tagName==="TEXTAREA"},pw=function(e,a){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[a]!=="hidden"&&!(i.overflowY===i.overflowX&&!C9(e)&&i[a]==="visible")},N9=function(e){return pw(e,"overflowY")},E9=function(e){return pw(e,"overflowX")},Gy=function(e,a){var i=a.ownerDocument,r=a;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var c=gw(e,r);if(c){var u=vw(e,r),d=u[1],f=u[2];if(d>f)return!0}r=r.parentNode}while(r&&r!==i.body);return!1},T9=function(e){var a=e.scrollTop,i=e.scrollHeight,r=e.clientHeight;return[a,i,r]},A9=function(e){var a=e.scrollLeft,i=e.scrollWidth,r=e.clientWidth;return[a,i,r]},gw=function(e,a){return e==="v"?N9(a):E9(a)},vw=function(e,a){return e==="v"?T9(a):A9(a)},_9=function(e,a){return e==="h"&&a==="rtl"?-1:1},M9=function(e,a,i,r,c){var u=_9(e,window.getComputedStyle(a).direction),d=u*r,f=i.target,m=a.contains(f),v=!1,y=d>0,p=0,b=0;do{if(!f)break;var j=vw(e,f),S=j[0],k=j[1],C=j[2],E=k-C-u*S;(S||E)&&gw(e,f)&&(p+=E,b+=S);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&f!==document.body||m&&(a.contains(f)||a===f));return(y&&Math.abs(p)<1||!y&&Math.abs(b)<1)&&(v=!0),v},ld=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yy=function(e){return[e.deltaX,e.deltaY]},Xy=function(e){return e&&"current"in e?e.current:e},R9=function(e,a){return e[0]===a[0]&&e[1]===a[1]},D9=function(e){return`
507
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
508
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
509
+ `)},O9=0,Zo=[];function z9(e){var a=w.useRef([]),i=w.useRef([0,0]),r=w.useRef(),c=w.useState(O9++)[0],u=w.useState(mw)[0],d=w.useRef(e);w.useEffect(function(){d.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(c));var k=n9([e.lockRef.current],(e.shards||[]).map(Xy),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(c))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var E=ld(k),M=i.current,T="deltaX"in k?k.deltaX:M[0]-E[0],_="deltaY"in k?k.deltaY:M[1]-E[1],L,A=k.target,H=Math.abs(T)>Math.abs(_)?"h":"v";if("touches"in k&&H==="h"&&A.type==="range")return!1;var I=window.getSelection(),q=I&&I.anchorNode,D=q?q===A||q.contains(A):!1;if(D)return!1;var $=Gy(H,A);if(!$)return!0;if($?L=H:(L=H==="v"?"h":"v",$=Gy(H,A)),!$)return!1;if(!r.current&&"changedTouches"in k&&(T||_)&&(r.current=L),!L)return!0;var F=r.current||L;return M9(F,C,k,F==="h"?T:_)},[]),m=w.useCallback(function(k){var C=k;if(!(!Zo.length||Zo[Zo.length-1]!==u)){var E="deltaY"in C?Yy(C):ld(C),M=a.current.filter(function(L){return L.name===C.type&&(L.target===C.target||C.target===L.shadowParent)&&R9(L.delta,E)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var T=(d.current.shards||[]).map(Xy).filter(Boolean).filter(function(L){return L.contains(C.target)}),_=T.length>0?f(C,T[0]):!d.current.noIsolation;_&&C.cancelable&&C.preventDefault()}}},[]),v=w.useCallback(function(k,C,E,M){var T={name:k,delta:C,target:E,should:M,shadowParent:L9(E)};a.current.push(T),setTimeout(function(){a.current=a.current.filter(function(_){return _!==T})},1)},[]),y=w.useCallback(function(k){i.current=ld(k),r.current=void 0},[]),p=w.useCallback(function(k){v(k.type,Yy(k),k.target,f(k,e.lockRef.current))},[]),b=w.useCallback(function(k){v(k.type,ld(k),k.target,f(k,e.lockRef.current))},[]);w.useEffect(function(){return Zo.push(u),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",m,Qo),document.addEventListener("touchmove",m,Qo),document.addEventListener("touchstart",y,Qo),function(){Zo=Zo.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,Qo),document.removeEventListener("touchmove",m,Qo),document.removeEventListener("touchstart",y,Qo)}},[]);var j=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(u,{styles:D9(c)}):null,j?w.createElement(k9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function L9(e){for(var a=null;e!==null;)e instanceof ShadowRoot&&(a=e.host,e=e.host),e=e.parentNode;return a}const B9=d9(hw,z9);var Zd=w.forwardRef(function(e,a){return w.createElement(Qd,Oi({},e,{ref:a,sideCar:B9}))});Zd.classNames=Qd.classNames;var I9=function(e){if(typeof document>"u")return null;var a=Array.isArray(e)?e[0]:e;return a.ownerDocument.body},Jo=new WeakMap,od=new WeakMap,sd={},Xm=0,yw=function(e){return e&&(e.host||yw(e.parentNode))},H9=function(e,a){return a.map(function(i){if(e.contains(i))return i;var r=yw(i);return r&&e.contains(r)?r:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},P9=function(e,a,i,r){var c=H9(a,Array.isArray(e)?e:[e]);sd[i]||(sd[i]=new WeakMap);var u=sd[i],d=[],f=new Set,m=new Set(c),v=function(p){!p||f.has(p)||(f.add(p),v(p.parentNode))};c.forEach(v);var y=function(p){!p||m.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))y(b);else try{var j=b.getAttribute(r),S=j!==null&&j!=="false",k=(Jo.get(b)||0)+1,C=(u.get(b)||0)+1;Jo.set(b,k),u.set(b,C),d.push(b),k===1&&S&&od.set(b,!0),C===1&&b.setAttribute(i,"true"),S||b.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",b,E)}})};return y(a),f.clear(),Xm++,function(){d.forEach(function(p){var b=Jo.get(p)-1,j=u.get(p)-1;Jo.set(p,b),u.set(p,j),b||(od.has(p)||p.removeAttribute(r),od.delete(p)),j||p.removeAttribute(i)}),Xm--,Xm||(Jo=new WeakMap,Jo=new WeakMap,od=new WeakMap,sd={})}},D0=function(e,a,i){i===void 0&&(i="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),c=I9(e);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),P9(r,c,i,"aria-hidden")):function(){return null}},U9=Object.defineProperty,ci=(e,a)=>U9(e,"name",{value:a,configurable:!0}),O0="Dialog",[xw,aH]=ol(O0),[q9,yr]=xw(O0),F9=ci(e=>{const{__scopeDialog:a,children:i,open:r,defaultOpen:c,onOpenChange:u,modal:d=!0}=e,f=w.useRef(null),m=w.useRef(null),[v,y]=yc({prop:r,defaultProp:c??!1,onChange:u,caller:O0}),[p,b]=w.useState(0),[j,S]=w.useState(0);return o.jsx(q9,{scope:a,triggerRef:f,contentRef:m,contentId:Zl(),titleId:Zl(),descriptionId:Zl(),titlePresent:p>0,descriptionPresent:j>0,setTitleCount:b,setDescriptionCount:S,open:v,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(k=>!k),[y]),modal:d,children:i})},"Dialog"),bw="DialogPortal",[V9,jw]=xw(bw,{forceMount:void 0}),$9=ci(e=>{const{__scopeDialog:a,forceMount:i,children:r,container:c}=e,u=yr(bw,a);return o.jsx(V9,{scope:a,forceMount:i,children:w.Children.map(r,d=>o.jsx($i,{present:i||u.open,children:o.jsx(M0,{asChild:!0,container:c,children:d})}))})},"DialogPortal"),$p="DialogOverlay",G9=w.forwardRef(ci(function(a,i){const r=jw($p,a.__scopeDialog),{forceMount:c=r.forceMount,...u}=a,d=yr($p,a.__scopeDialog);return d.modal?o.jsx($i,{present:c||d.open,children:o.jsx(X9,{...u,ref:i})}):null},"DialogOverlay")),Y9=Pi("DialogOverlay.RemoveScroll"),X9=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=yr($p,r),d=nw(),f=St(i,d);return o.jsx(Zd,{as:Y9,allowPinchZoom:!0,shards:[u.contentRef],children:o.jsx(zt.div,{"data-state":z0(u.open),...c,ref:f,style:{pointerEvents:"auto",...c.style}})})},"DialogOverlayImpl")),xc="DialogContent",K9=w.forwardRef(ci(function(a,i){const r=jw(xc,a.__scopeDialog),{forceMount:c=r.forceMount,...u}=a,d=yr(xc,a.__scopeDialog);return o.jsx($i,{present:c||d.open,children:d.modal?o.jsx(Q9,{...u,ref:i}):o.jsx(Z9,{...u,ref:i})})},"DialogContent")),Q9=w.forwardRef(ci(function(a,i){const r=yr(xc,a.__scopeDialog),c=w.useRef(null),u=St(i,r.contentRef,c);return w.useEffect(()=>{const d=c.current;if(d)return D0(d)},[]),o.jsx(ww,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:gt(a.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:gt(a.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),Z9=w.forwardRef(ci(function(a,i){const r=yr(xc,a.__scopeDialog),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(ww,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(c.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=r.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"DialogContentNonModal")),ww=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=a,m=yr(xc,r);return _c(),o.jsx(o.Fragment,{children:o.jsx(A0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(E0,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":z0(m.open),...f,ref:i,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),J9="DialogTitle",W9=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=yr(J9,r),{setTitleCount:d}=u;return Mn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),o.jsx(zt.h2,{id:u.titleId,...c,ref:i})},"DialogTitle")),eN="DialogClose",tN=w.forwardRef(ci(function(a,i){const{__scopeDialog:r,...c}=a,u=yr(eN,r);return o.jsx(zt.button,{type:"button",...c,ref:i,onClick:gt(a.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function z0(e){return e?"open":"closed"}ci(z0,"getState");var nN=Object.defineProperty,aN=(e,a)=>nN(e,"name",{value:a,configurable:!0});function Sw(e){const[a,i]=w.useState(void 0);return Mn(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,f;if("borderBoxSize"in u){const m=u.borderBoxSize,v=Array.isArray(m)?m[0]:m;d=v.inlineSize,f=v.blockSize}else d=e.offsetWidth,f=e.offsetHeight;i({width:d,height:f})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else i(void 0)},[e]),a}aN(Sw,"useSize");const iN=["top","right","bottom","left"],il=Math.min,ur=Math.max,Md=Math.round,cd=Math.floor,dr=e=>({x:e,y:e}),rN={left:"right",right:"left",bottom:"top",top:"bottom"};function kw(e,a,i){return ur(e,il(a,i))}function hr(e,a){return typeof e=="function"?e(a):e}function rl(e){return e.split("-")[0]}function ds(e){return e.split("-")[1]}function L0(e){return e==="x"?"y":"x"}function B0(e){return e==="y"?"height":"width"}function Li(e){const a=e[0];return a==="t"||a==="b"?"y":"x"}function I0(e){return L0(Li(e))}function lN(e,a,i){i===void 0&&(i=!1);const r=ds(e),c=I0(e),u=B0(c);let d=c==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(d=Rd(d)),[d,Rd(d)]}function oN(e){const a=Rd(e);return[Gp(e),a,Gp(a)]}function Gp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ky=["left","right"],Qy=["right","left"],sN=["top","bottom"],cN=["bottom","top"];function uN(e,a,i){switch(e){case"top":case"bottom":return i?a?Qy:Ky:a?Ky:Qy;case"left":case"right":return a?sN:cN;default:return[]}}function dN(e,a,i,r){const c=ds(e);let u=uN(rl(e),i==="start",r);return c&&(u=u.map(d=>d+"-"+c),a&&(u=u.concat(u.map(Gp)))),u}function Rd(e){const a=rl(e);return rN[a]+e.slice(a.length)}function fN(e){var a,i,r,c;return{top:(a=e.top)!=null?a:0,right:(i=e.right)!=null?i:0,bottom:(r=e.bottom)!=null?r:0,left:(c=e.left)!=null?c:0}}function Cw(e){return typeof e!="number"?fN(e):{top:e,right:e,bottom:e,left:e}}function Dd(e){const{x:a,y:i,width:r,height:c}=e;return{width:r,height:c,top:i,left:a,right:a+r,bottom:i+c,x:a,y:i}}function Zy(e,a,i){let{reference:r,floating:c}=e;const u=Li(a),d=I0(a),f=B0(d),m=rl(a),v=u==="y",y=r.x+r.width/2-c.width/2,p=r.y+r.height/2-c.height/2,b=r[f]/2-c[f]/2;let j;switch(m){case"top":j={x:y,y:r.y-c.height};break;case"bottom":j={x:y,y:r.y+r.height};break;case"right":j={x:r.x+r.width,y:p};break;case"left":j={x:r.x-c.width,y:p};break;default:j={x:r.x,y:r.y}}const S=ds(a);return S&&(j[d]+=b*(S==="end"?1:-1)*(i&&v?-1:1)),j}async function hN(e,a){var i;a===void 0&&(a={});const{x:r,y:c,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:p="floating",altBoundary:b=!1,padding:j=0}=hr(a,e),S=Cw(j),C=f[b?p==="floating"?"reference":"floating":p],E=Dd(await u.getClippingRect({element:(i=await(u.isElement==null?void 0:u.isElement(C)))==null||i?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:v,rootBoundary:y,strategy:m})),M=p==="floating"?{x:r,y:c,width:d.floating.width,height:d.floating.height}:d.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),_=await(u.isElement==null?void 0:u.isElement(T))&&await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1},L=Dd(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:T,strategy:m}):M);return{top:(E.top-L.top+S.top)/_.y,bottom:(L.bottom-E.bottom+S.bottom)/_.y,left:(E.left-L.left+S.left)/_.x,right:(L.right-E.right+S.right)/_.x}}const mN=50,pN=async(e,a,i)=>{const{placement:r="bottom",strategy:c="absolute",middleware:u=[],platform:d}=i,f=d.detectOverflow?d:{...d,detectOverflow:hN},m=await(d.isRTL==null?void 0:d.isRTL(a));let v=await d.getElementRects({reference:e,floating:a,strategy:c}),{x:y,y:p}=Zy(v,r,m),b=r,j=0;const S={};for(let k=0;k<u.length;k++){const C=u[k];if(!C)continue;const{name:E,fn:M}=C,{x:T,y:_,data:L,reset:A}=await M({x:y,y:p,initialPlacement:r,placement:b,strategy:c,middlewareData:S,rects:v,platform:f,elements:{reference:e,floating:a}});y=T??y,p=_??p,S[E]={...S[E],...L},A&&j<mN&&(j++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(v=A.rects===!0?await d.getElementRects({reference:e,floating:a,strategy:c}):A.rects),{x:y,y:p}=Zy(v,b,m)),k=-1)}return{x:y,y:p,placement:b,strategy:c,middlewareData:S}},gN=e=>({name:"arrow",options:e,async fn(a){const{x:i,y:r,placement:c,rects:u,platform:d,elements:f,middlewareData:m}=a,{element:v,padding:y=0}=hr(e,a)||{};if(v==null)return{};const p=Cw(y),b={x:i,y:r},j=I0(c),S=B0(j),k=await d.getDimensions(v),C=j==="y",E=C?"top":"left",M=C?"bottom":"right",T=C?"clientHeight":"clientWidth",_=u.reference[S]+u.reference[j]-b[j]-u.floating[S],L=b[j]-u.reference[j],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let H=A?A[T]:0;(!H||!await(d.isElement==null?void 0:d.isElement(A)))&&(H=f.floating[T]||u.floating[S]);const I=_/2-L/2,q=H/2-k[S]/2-1,D=il(p[E],q),$=il(p[M],q),F=H-k[S]-$,W=H/2-k[S]/2+I,Y=kw(D,W,F),P=!m.arrow&&ds(c)!=null&&W!==Y&&u.reference[S]/2-(W<D?D:$)-k[S]/2<0,K=P?W<D?W-D:W-F:0;return{[j]:b[j]+K,data:{[j]:Y,centerOffset:W-Y-K,...P&&{alignmentOffset:K}},reset:P}}}),vN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var i,r;const{placement:c,middlewareData:u,rects:d,initialPlacement:f,platform:m,elements:v}=a,{mainAxis:y=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...C}=hr(e,a);if((i=u.arrow)!=null&&i.alignmentOffset)return{};const E=rl(c),M=Li(f),T=rl(f)===f,_=await(m.isRTL==null?void 0:m.isRTL(v.floating)),L=b||(T||!k?[Rd(f)]:oN(f)),A=S!=="none";!b&&A&&L.push(...dN(f,k,S,_));const H=[f,...L],I=await m.detectOverflow(a,C),q=[];let D=((r=u.flip)==null?void 0:r.overflows)||[];if(y&&q.push(I[E]),p){const Y=lN(c,d,_);q.push(I[Y[0]],I[Y[1]])}if(D=[...D,{placement:c,overflows:q}],!q.every(Y=>Y<=0)){var $,F;const Y=((($=u.flip)==null?void 0:$.index)||0)+1,P=H[Y];if(P&&(!(p==="alignment"?M!==Li(P):!1)||D.every(V=>Li(V.placement)===M?V.overflows[0]>0:!0)))return{data:{index:Y,overflows:D},reset:{placement:P}};let K=(F=D.filter(R=>R.overflows[0]<=0).sort((R,V)=>R.overflows[1]-V.overflows[1])[0])==null?void 0:F.placement;if(!K)switch(j){case"bestFit":{var W;const R=(W=D.filter(V=>{if(A){const ne=Li(V.placement);return ne===M||ne==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ne=>ne>0).reduce((ne,z)=>ne+z,0)]).sort((V,ne)=>V[1]-ne[1])[0])==null?void 0:W[0];R&&(K=R);break}case"initialPlacement":K=f;break}if(c!==K)return{reset:{placement:K}}}return{}}}};function Jy(e,a){return{top:e.top-a.height,right:e.right-a.width,bottom:e.bottom-a.height,left:e.left-a.width}}function Wy(e){return iN.some(a=>e[a]>=0)}const yN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(a){const{rects:i,platform:r}=a,{strategy:c="referenceHidden",...u}=hr(e,a);switch(c){case"referenceHidden":{const d=await r.detectOverflow(a,{...u,elementContext:"reference"}),f=Jy(d,i.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Wy(f)}}}case"escaped":{const d=await r.detectOverflow(a,{...u,altBoundary:!0}),f=Jy(d,i.floating);return{data:{escapedOffsets:f,escaped:Wy(f)}}}default:return{}}}}},Nw=new Set(["left","top"]);async function xN(e,a){const{placement:i,platform:r,elements:c}=e,u=await(r.isRTL==null?void 0:r.isRTL(c.floating)),d=rl(i),f=ds(i),m=Li(i)==="y",v=Nw.has(d)?-1:1,y=u&&m?-1:1,p=hr(a,e);let{mainAxis:b,crossAxis:j,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof S=="number"&&(j=f==="end"?S*-1:S),m?{x:j*y,y:b*v}:{x:b*v,y:j*y}}const bN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var i,r;const{x:c,y:u,placement:d,middlewareData:f}=a,m=await xN(a,e);return d===((i=f.offset)==null?void 0:i.placement)&&(r=f.arrow)!=null&&r.alignmentOffset?{}:{x:c+m.x,y:u+m.y,data:{...m,placement:d}}}}},jN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){const{x:i,y:r,placement:c,platform:u}=a,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:T,y:_}=M;return{x:T,y:_}}},...v}=hr(e,a),y={x:i,y:r},p=await u.detectOverflow(a,v),b=Li(c),j=L0(b);let S=y[j],k=y[b];const C=(M,T)=>kw(T+p[M==="y"?"top":"left"],T,T-p[M==="y"?"bottom":"right"]);d&&(S=C(j,S)),f&&(k=C(b,k));const E=m.fn({...a,[j]:S,[b]:k});return{...E,data:{x:E.x-i,y:E.y-r,enabled:{[j]:d,[b]:f}}}}}},wN=function(e){return e===void 0&&(e={}),{options:e,fn(a){var i,r;const{x:c,y:u,placement:d,rects:f,middlewareData:m}=a,{offset:v=0,mainAxis:y=!0,crossAxis:p=!0}=hr(e,a),b={x:c,y:u},j=Li(d),S=L0(j);let k=b[S],C=b[j];const E=hr(v,a),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(i=E.mainAxis)!=null?i:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(y){const L=S==="y"?"height":"width",A=f.reference[S]-f.floating[L]+M.mainAxis,H=f.reference[S]+f.reference[L]-M.mainAxis;k<A?k=A:k>H&&(k=H)}if(p){var T,_;const L=S==="y"?"width":"height",A=Nw.has(rl(d)),H=f.reference[j]-f.floating[L]+(A&&((T=m.offset)==null?void 0:T[j])||0)+(A?0:M.crossAxis),I=f.reference[j]+f.reference[L]+(A?0:((_=m.offset)==null?void 0:_[j])||0)-(A?M.crossAxis:0);C<H?C=H:C>I&&(C=I)}return{[S]:k,[j]:C}}}},SN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(a){const{placement:i,rects:r,platform:c,elements:u}=a,{apply:d=()=>{},...f}=hr(e,a),m=await c.detectOverflow(a,f),v=rl(i),y=ds(i),p=Li(i)==="y",{width:b,height:j}=r.floating;let S,k;v==="top"||v==="bottom"?(S=v,k=y===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,S=y==="end"?"top":"bottom");const C=j-m.top-m.bottom,E=b-m.left-m.right,M=il(j-m[S],C),T=il(b-m[k],E),_=a.middlewareData.shift,L=!_;let A=M,H=T;_!=null&&_.enabled.x&&(H=E),_!=null&&_.enabled.y&&(A=C),L&&!y&&(p?H=b-2*ur(m.left,m.right):A=j-2*ur(m.top,m.bottom)),await d({...a,availableWidth:H,availableHeight:A});const I=await c.getDimensions(u.floating);return b!==I.width||j!==I.height?{reset:{rects:!0}}:{}}}};function Jd(){return typeof window<"u"}function fs(e){return Ew(e)?(e.nodeName||"").toLowerCase():"#document"}function ua(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function xr(e){var a;return(a=(Ew(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function Ew(e){return Jd()?e instanceof Node||e instanceof ua(e).Node:!1}function Ui(e){return Jd()?e instanceof Element||e instanceof ua(e).Element:!1}function sl(e){return Jd()?e instanceof HTMLElement||e instanceof ua(e).HTMLElement:!1}function ex(e){return!Jd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ua(e).ShadowRoot}function Wd(e){const{overflow:a,overflowX:i,overflowY:r,display:c}=qi(e);return/auto|scroll|overlay|hidden|clip/.test(a+r+i)&&c!=="inline"&&c!=="contents"}function kN(e){return/^(table|td|th)$/.test(fs(e))}function ef(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const CN=/transform|translate|scale|rotate|perspective|filter/,NN=/paint|layout|strict|content/,Fl=e=>!!e&&e!=="none";let Km;function H0(e){const a=Ui(e)?qi(e):e;return Fl(a.transform)||Fl(a.translate)||Fl(a.scale)||Fl(a.rotate)||Fl(a.perspective)||!P0()&&(Fl(a.backdropFilter)||Fl(a.filter))||CN.test(a.willChange||"")||NN.test(a.contain||"")}function EN(e){let a=eo(e);for(;sl(a)&&!bc(a);){if(H0(a))return a;if(ef(a))return null;a=eo(a)}return null}function P0(){return Km==null&&(Km=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Km}function bc(e){return/^(html|body|#document)$/.test(fs(e))}function qi(e){return ua(e).getComputedStyle(e)}function tf(e){return Ui(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eo(e){if(fs(e)==="html")return e;const a=e.assignedSlot||e.parentNode||ex(e)&&e.host||xr(e);return ex(a)?a.host:a}function Tw(e){const a=eo(e);return bc(a)?(e.ownerDocument||e).body:sl(a)&&Wd(a)?a:Tw(a)}function jc(e,a,i){var r;a===void 0&&(a=[]),i===void 0&&(i=!0);const c=Tw(e),u=c===((r=e.ownerDocument)==null?void 0:r.body),d=ua(c);if(u){const f=Yp(d);return a.concat(d,d.visualViewport||[],Wd(c)?c:[],f&&i?jc(f):[])}else return a.concat(c,jc(c,[],i))}function Yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Aw(e){const a=qi(e);let i=parseFloat(a.width)||0,r=parseFloat(a.height)||0;const c=sl(e),u=c?e.offsetWidth:i,d=c?e.offsetHeight:r,f=Md(i)!==u||Md(r)!==d;return f&&(i=u,r=d),{width:i,height:r,$:f}}function U0(e){return Ui(e)?e:e.contextElement}function rs(e){const a=U0(e);if(!sl(a))return dr(1);const i=a.getBoundingClientRect(),{width:r,height:c,$:u}=Aw(a);let d=(u?Md(i.width):i.width)/r,f=(u?Md(i.height):i.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const TN=dr(0);function _w(e){const a=ua(e);return!P0()||!a.visualViewport?TN:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function AN(e,a,i){return a===void 0&&(a=!1),!!i&&a&&i===ua(e)}function to(e,a,i,r){a===void 0&&(a=!1),i===void 0&&(i=!1);const c=e.getBoundingClientRect(),u=U0(e);let d=dr(1);a&&(r?Ui(r)&&(d=rs(r)):d=rs(e));const f=AN(u,i,r)?_w(u):dr(0);let m=(c.left+f.x)/d.x,v=(c.top+f.y)/d.y,y=c.width/d.x,p=c.height/d.y;if(u&&r){const b=ua(u),j=Ui(r)?ua(r):r;let S=b,k=Yp(S);for(;k&&j!==S;){const C=rs(k),E=k.getBoundingClientRect(),M=qi(k),T=E.left+(k.clientLeft+parseFloat(M.paddingLeft))*C.x,_=E.top+(k.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,v*=C.y,y*=C.x,p*=C.y,m+=T,v+=_,S=ua(k),k=Yp(S)}}return Dd({width:y,height:p,x:m,y:v})}function nf(e,a){const i=tf(e).scrollLeft;return a?a.left+i:to(xr(e)).left+i}function Mw(e,a){const i=e.getBoundingClientRect(),r=i.left+a.scrollLeft-nf(e,i),c=i.top+a.scrollTop;return{x:r,y:c}}function _N(e){let{elements:a,rect:i,offsetParent:r,strategy:c}=e;const u=c==="fixed",d=xr(r),f=a?ef(a.floating):!1;if(r===d||f&&u)return i;let m={scrollLeft:0,scrollTop:0},v=dr(1);const y=dr(0),p=sl(r);if((p||!u)&&((fs(r)!=="body"||Wd(d))&&(m=tf(r)),p)){const j=to(r);v=rs(r),y.x=j.x+r.clientLeft,y.y=j.y+r.clientTop}const b=d&&!p&&!u?Mw(d,m):dr(0);return{width:i.width*v.x,height:i.height*v.y,x:i.x*v.x-m.scrollLeft*v.x+y.x+b.x,y:i.y*v.y-m.scrollTop*v.y+y.y+b.y}}function MN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function RN(e){const a=tf(e),i=e.ownerDocument.body,r=ur(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),c=ur(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-a.scrollLeft+nf(e);const d=-a.scrollTop;return qi(i).direction==="rtl"&&(u+=ur(e.clientWidth,i.clientWidth)-r),{width:r,height:c,x:u,y:d}}const DN=25;function ON(e,a,i){i===void 0&&(i="viewport");const r=i==="layoutViewport",c=ua(e),u=xr(e),d=c.visualViewport;let f=u.clientWidth,m=u.clientHeight,v=0,y=0;if(d){const b=!P0()||a==="fixed";r?b||(v=-d.offsetLeft,y=-d.offsetTop):(f=d.width,m=d.height,b&&(v=d.offsetLeft,y=d.offsetTop))}if(nf(u)<=0){const b=u.ownerDocument,j=b.body,S=getComputedStyle(j),k=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(u.clientWidth-j.clientWidth-k),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?C/2:C;E<=DN&&(f-=E)}return{width:f,height:m,x:v,y}}function zN(e,a){const i=to(e,!0,a==="fixed"),r=i.top+e.clientTop,c=i.left+e.clientLeft,u=rs(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=c*u.x,v=r*u.y;return{width:d,height:f,x:m,y:v}}function tx(e,a,i){let r;if(a==="viewport"||a==="layoutViewport")r=ON(e,i,a);else if(a==="document")r=RN(xr(e));else if(Ui(a))r=zN(a,i);else{const c=_w(e);r={x:a.x-c.x,y:a.y-c.y,width:a.width,height:a.height}}return Dd(r)}function LN(e,a){const i=a.get(e);if(i)return i;let r=jc(e,[],!1).filter(f=>Ui(f)&&fs(f)!=="body"),c=null;const u=qi(e).position==="fixed";let d=u?eo(e):e;for(;Ui(d)&&!bc(d);){const f=qi(d),m=H0(d),v=c?c.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&f.position==="static")?r=r.filter(p=>p!==d):c=f,d=eo(d)}return a.set(e,r),r}function BN(e){let{element:a,boundary:i,rootBoundary:r,strategy:c}=e;const d=[...i==="clippingAncestors"?ef(a)?[]:LN(a,this._c):[].concat(i),r],f=tx(a,d[0],c);let m=f.top,v=f.right,y=f.bottom,p=f.left;for(let b=1;b<d.length;b++){const j=tx(a,d[b],c);m=ur(j.top,m),v=il(j.right,v),y=il(j.bottom,y),p=ur(j.left,p)}return{width:v-p,height:y-m,x:p,y:m}}function IN(e){const{width:a,height:i}=Aw(e);return{width:a,height:i}}function HN(e,a,i){const r=sl(a),c=xr(a),u=i==="fixed",d=to(e,!0,u,a);let f={scrollLeft:0,scrollTop:0};const m=dr(0);if((r||!u)&&((fs(a)!=="body"||Wd(c))&&(f=tf(a)),r)){const b=to(a,!0,u,a);m.x=b.x+a.clientLeft,m.y=b.y+a.clientTop}!r&&c&&(m.x=nf(c));const v=c&&!r&&!u?Mw(c,f):dr(0),y=d.left+f.scrollLeft-m.x-v.x,p=d.top+f.scrollTop-m.y-v.y;return{x:y,y:p,width:d.width,height:d.height}}function Qm(e){return qi(e).position==="static"}function nx(e,a){if(!sl(e)||qi(e).position==="fixed")return null;if(a)return a(e);let i=e.offsetParent;return xr(e)===i&&(i=i.ownerDocument.body),i}function Rw(e,a){const i=ua(e);if(ef(e))return i;if(!sl(e)){let c=eo(e);for(;c&&!bc(c);){if(Ui(c)&&!Qm(c))return c;c=eo(c)}return i}let r=nx(e,a);for(;r&&kN(r)&&Qm(r);)r=nx(r,a);return r&&bc(r)&&Qm(r)&&!H0(r)?i:r||EN(e)||i}const PN=async function(e){const a=this.getOffsetParent||Rw,i=this.getDimensions,r=await i(e.floating);return{reference:HN(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UN(e){return qi(e).direction==="rtl"}const qN={convertOffsetParentRelativeRectToViewportRelativeRect:_N,getDocumentElement:xr,getClippingRect:BN,getOffsetParent:Rw,getElementRects:PN,getClientRects:MN,getDimensions:IN,getScale:rs,isElement:Ui,isRTL:UN};function Dw(e,a){return e.x===a.x&&e.y===a.y&&e.width===a.width&&e.height===a.height}function FN(e,a,i){let r=null,c;const u=xr(e);function d(){var y;clearTimeout(c),(y=r)==null||y.disconnect(),r=null}function f(y,p){y===void 0&&(y=!1),p===void 0&&(p=1),d();const b=e.getBoundingClientRect(),{left:j,top:S,width:k,height:C}=b;if(y||a(),!k||!C)return;const E=cd(S),M=cd(u.clientWidth-(j+k)),T=cd(u.clientHeight-(S+C)),_=cd(j),A={rootMargin:-E+"px "+-M+"px "+-T+"px "+-_+"px",threshold:ur(0,il(1,p))||1};let H=!0;function I(q){const D=q[0].intersectionRatio;if(!Dw(b,e.getBoundingClientRect()))return f();if(D!==p){if(!H)return f();D?f(!1,D):c=setTimeout(()=>{f(!1,1e-7)},1e3)}H=!1}try{r=new IntersectionObserver(I,{...A,root:u.ownerDocument})}catch{r=new IntersectionObserver(I,A)}r.observe(e)}const m=ua(e),v=()=>f(i);return m.addEventListener("resize",v),f(!0),()=>{m.removeEventListener("resize",v),d()}}function VN(e,a,i,r){r===void 0&&(r={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,v=U0(e),y=c||u?[...v?jc(v):[],...a?jc(a):[]]:[];y.forEach(E=>{c&&E.addEventListener("scroll",i),u&&E.addEventListener("resize",i)});const p=v&&f?FN(v,i,u):null;let b=-1,j=null;d&&(j=new ResizeObserver(E=>{let[M]=E;M&&M.target===v&&j&&a&&(j.unobserve(a),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var T;(T=j)==null||T.observe(a)})),i()}),v&&!m&&j.observe(v),a&&j.observe(a));let S,k=m?to(e):null;m&&C();function C(){const E=to(e);k&&!Dw(k,E)&&i(),k=E,S=requestAnimationFrame(C)}return i(),()=>{var E;y.forEach(M=>{c&&M.removeEventListener("scroll",i),u&&M.removeEventListener("resize",i)}),p==null||p(),(E=j)==null||E.disconnect(),j=null,m&&cancelAnimationFrame(S)}}const $N=bN,GN=jN,YN=vN,XN=SN,KN=yN,ax=gN,QN=wN,ZN=(e,a,i)=>{const r=new Map,c=i??{},u={...qN,...c.platform,_c:r};return pN(e,a,{...c,platform:u})};var JN=typeof document<"u",WN=function(){},Cd=JN?w.useLayoutEffect:WN;function Od(e,a){if(e===a)return!0;if(typeof e!=typeof a)return!1;if(typeof e=="function"&&e.toString()===a.toString())return!0;let i,r,c;if(e&&a&&typeof e=="object"){if(Array.isArray(e)){if(i=e.length,i!==a.length)return!1;for(r=i;r--!==0;)if(!Od(e[r],a[r]))return!1;return!0}if(c=Object.keys(e),i=c.length,i!==Object.keys(a).length)return!1;for(r=i;r--!==0;)if(!{}.hasOwnProperty.call(a,c[r]))return!1;for(r=i;r--!==0;){const u=c[r];if(!(u==="_owner"&&e.$$typeof)&&!Od(e[u],a[u]))return!1}return!0}return e!==e&&a!==a}function Ow(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ix(e,a){const i=Ow(e);return Math.round(a*i)/i}function Zm(e){const a=w.useRef(e);return Cd(()=>{a.current=e}),a}function eE(e){e===void 0&&(e={});const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:c,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:m,open:v}=e,[y,p]=w.useState({x:0,y:0,strategy:i,placement:a,middlewareData:{},isPositioned:!1}),[b,j]=w.useState(r);Od(b,r)||j(r);const[S,k]=w.useState(null),[C,E]=w.useState(null),M=w.useCallback(V=>{V!==A.current&&(A.current=V,k(V))},[]),T=w.useCallback(V=>{V!==H.current&&(H.current=V,E(V))},[]),_=u||S,L=d||C,A=w.useRef(null),H=w.useRef(null),I=w.useRef(y),q=m!=null,D=Zm(m),$=Zm(c),F=Zm(v),W=w.useCallback(()=>{if(!A.current||!H.current)return;const V={placement:a,strategy:i,middleware:b};$.current&&(V.platform=$.current),ZN(A.current,H.current,V).then(ne=>{const z={...ne,isPositioned:F.current!==!1};Y.current&&!Od(I.current,z)&&(I.current=z,lo.flushSync(()=>{p(z)}))})},[b,a,i,$,F]);Cd(()=>{v===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[v]);const Y=w.useRef(!1);Cd(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Cd(()=>{if(_&&(A.current=_),L&&(H.current=L),_&&L){if(D.current)return D.current(_,L,W);W()}},[_,L,W,D,q]);const P=w.useMemo(()=>({reference:A,floating:H,setReference:M,setFloating:T}),[M,T]),K=w.useMemo(()=>({reference:_,floating:L}),[_,L]),R=w.useMemo(()=>{const V={position:i,left:0,top:0};if(!K.floating)return V;const ne=ix(K.floating,y.x),z=ix(K.floating,y.y);return f?{...V,transform:"translate("+ne+"px, "+z+"px)",...Ow(K.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:ne,top:z}},[i,f,K.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:W,refs:P,elements:K,floatingStyles:R}),[y,W,P,K,R])}const tE=e=>{function a(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){const{element:r,padding:c}=typeof e=="function"?e(i):e;return r&&a(r)?r.current!=null?ax({element:r.current,padding:c}).fn(i):{}:r?ax({element:r,padding:c}).fn(i):{}}}},nE=(e,a)=>{const i=$N(e);return{name:i.name,fn:i.fn,options:[e,a]}},aE=(e,a)=>{const i=GN(e);return{name:i.name,fn:i.fn,options:[e,a]}},iE=(e,a)=>({fn:QN(e).fn,options:[e,a]}),rE=(e,a)=>{const i=YN(e);return{name:i.name,fn:i.fn,options:[e,a]}},lE=(e,a)=>{const i=XN(e);return{name:i.name,fn:i.fn,options:[e,a]}},oE=(e,a)=>{const i=KN(e);return{name:i.name,fn:i.fn,options:[e,a]}},sE=(e,a)=>{const i=tE(e);return{name:i.name,fn:i.fn,options:[e,a]}};var cE=Object.defineProperty,nl=(e,a)=>cE(e,"name",{value:a,configurable:!0}),zw="Popper",[Lw,af]=ol(zw),[uE,Bw]=Lw(zw),dE=nl(e=>{const{__scopePopper:a,children:i}=e,[r,c]=w.useState(null),[u,d]=w.useState(void 0);return o.jsx(uE,{scope:a,anchor:r,onAnchorChange:c,placementState:u,setPlacementState:d,children:i})},"Popper"),fE="PopperAnchor",hE=w.forwardRef(nl(function(a,i){const{__scopePopper:r,virtualRef:c,...u}=a,d=Bw(fE,r),f=w.useRef(null),m=d.onAnchorChange,v=w.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=St(i,v),p=w.useRef(null);w.useEffect(()=>{if(!c)return;const k=p.current;p.current=c.current,k!==p.current&&m(p.current)});const b=d.placementState&&rf(d.placementState),j=b==null?void 0:b[0],S=b==null?void 0:b[1];return c?null:o.jsx(zt.div,{"data-radix-popper-side":j,"data-radix-popper-align":S,...u,ref:y})},"PopperAnchor")),Iw="PopperContent",[mE,iH]=Lw(Iw),pE=w.forwardRef(nl(function(a,i){var be,le,se,me,Te,Le,Ve;const{__scopePopper:r,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:p=0,sticky:b="partial",hideWhenDetached:j=!1,updatePositionStrategy:S="optimized",onPlaced:k,...C}=a,E=Bw(Iw,r),[M,T]=w.useState(null),_=St(i,T),[L,A]=w.useState(null),H=Sw(L),I=(H==null?void 0:H.width)??0,q=(H==null?void 0:H.height)??0,D=c+(d!=="center"?"-"+d:""),$=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(y)?y:[y],W=F.length>0,Y={padding:$,boundary:F.filter(Hw),altBoundary:W},{refs:P,floatingStyles:K,placement:R,isPositioned:V,middlewareData:ne}=eE({strategy:"fixed",placement:D,whileElementsMounted:nl((...pt)=>VN(...pt,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[nE({mainAxis:u+q,alignmentAxis:f}),v&&aE({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?iE():void 0,...Y}),v&&rE({...Y}),lE({...Y,apply:nl(({elements:pt,rects:tt,availableWidth:We,availableHeight:Vt})=>{const{width:vn,height:yn}=tt.reference,Pn=pt.floating.style;Pn.setProperty("--radix-popper-available-width",`${We}px`),Pn.setProperty("--radix-popper-available-height",`${Vt}px`),Pn.setProperty("--radix-popper-anchor-width",`${vn}px`),Pn.setProperty("--radix-popper-anchor-height",`${yn}px`)},"apply")}),L&&sE({element:L,padding:m}),gE({arrowWidth:I,arrowHeight:q}),j&&oE({strategy:"referenceHidden",...Y,boundary:W?Y.boundary:void 0})]}),z=E.setPlacementState;Mn(()=>(z(R),()=>{z(void 0)}),[R,z]);const[J,ee]=rf(R),U=_n(k);Mn(()=>{V&&(U==null||U())},[V,U]);const G=(be=ne.arrow)==null?void 0:be.x,fe=(le=ne.arrow)==null?void 0:le.y,xe=((se=ne.arrow)==null?void 0:se.centerOffset)!==0,[je,ue]=w.useState();return Mn(()=>{M&&ue(window.getComputedStyle(M).zIndex)},[M]),o.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:V?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(me=ne.transformOrigin)==null?void 0:me.x,(Te=ne.transformOrigin)==null?void 0:Te.y].join(" "),...((Le=ne.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:a.dir,children:o.jsx(mE,{scope:r,placedSide:J,placedAlign:ee,onArrowChange:A,arrowX:G,arrowY:fe,shouldHideArrow:xe,children:o.jsx(zt.div,{"data-side":J,"data-align":ee,...C,ref:_,style:{...C.style,animation:V?(Ve=C.style)==null?void 0:Ve.animation:"none"}})})})},"PopperContent"));function Hw(e){return e!==null}nl(Hw,"isNotNull");var gE=nl(e=>({name:"transformOrigin",options:e,fn(a){var C,E,M;const{placement:i,rects:r,middlewareData:c}=a,d=((C=c.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[v,y]=rf(i),p={start:"0%",center:"50%",end:"100%"}[y],b=(((E=c.arrow)==null?void 0:E.x)??0)+f/2,j=(((M=c.arrow)==null?void 0:M.y)??0)+m/2;let S="",k="";return v==="bottom"?(S=d?p:`${b}px`,k=`${-m}px`):v==="top"?(S=d?p:`${b}px`,k=`${r.floating.height+m}px`):v==="right"?(S=`${-m}px`,k=d?p:`${j}px`):v==="left"&&(S=`${r.floating.width+m}px`,k=d?p:`${j}px`),{data:{x:S,y:k}}}}),"transformOrigin");function rf(e){const[a,i="center"]=e.split("-");return[a,i]}nl(rf,"getSideAndAlignFromPlacement");var Pw=dE,Uw=hE,qw=pE,vE=Object.defineProperty,yE=(e,a)=>vE(e,"name",{value:a,configurable:!0}),xE=w.forwardRef(yE(function(a,i){return o.jsx(zt.label,{...a,ref:i,onMouseDown:r=>{var u;r.target.closest("button, input, select, textarea")||((u=a.onMouseDown)==null||u.call(a,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),bE=xE,jE=Object.defineProperty,wE=(e,a)=>jE(e,"name",{value:a,configurable:!0});function Fw(e){const a=w.useRef({value:e,previous:e});return w.useMemo(()=>(a.current.value!==e&&(a.current.previous=a.current.value,a.current.value=e),a.current.previous),[e])}wE(Fw,"usePrevious");var SE=Object.defineProperty,kE=(e,a)=>SE(e,"name",{value:a,configurable:!0});function zd(e,[a,i]){return Math.min(i,Math.max(a,e))}kE(zd,"clamp");var CE=Object.defineProperty,cl=(e,a)=>CE(e,"name",{value:a,configurable:!0}),q0="Popover",[Vw,rH]=ol(q0,[af]),F0=af(),[NE,hs]=Vw(q0),EE=cl(e=>{const{__scopePopover:a,children:i,open:r,defaultOpen:c,onOpenChange:u,modal:d=!1}=e,f=F0(a),m=w.useRef(null),[v,y]=w.useState(!1),[p,b]=yc({prop:r,defaultProp:c??!1,onChange:u,caller:q0});return o.jsx(Pw,{...f,children:o.jsx(NE,{scope:a,contentId:Zl(),triggerRef:m,open:p,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(j=>!j),[b]),hasCustomAnchor:v,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:d,children:i})})},"Popover"),TE="PopoverTrigger",AE=w.forwardRef(cl(function(a,i){const{__scopePopover:r,...c}=a,u=hs(TE,r),d=F0(r),f=St(i,u.triggerRef),m=o.jsx(zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":V0(u.open),...c,ref:f,onClick:gt(a.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:o.jsx(Uw,{asChild:!0,...d,children:m})},"PopoverTrigger")),$w="PopoverPortal",[_E,ME]=Vw($w,{forceMount:void 0}),RE=cl(e=>{const{__scopePopover:a,forceMount:i,children:r,container:c}=e,u=hs($w,a);return o.jsx(_E,{scope:a,forceMount:i,children:o.jsx($i,{present:i||u.open,children:o.jsx(M0,{asChild:!0,container:c,children:r})})})},"PopoverPortal"),wc="PopoverContent",DE=w.forwardRef(cl(function(a,i){const r=ME(wc,a.__scopePopover),{forceMount:c=r.forceMount,...u}=a,d=hs(wc,a.__scopePopover);return o.jsx($i,{present:c||d.open,children:d.modal?o.jsx(zE,{...u,ref:i}):o.jsx(LE,{...u,ref:i})})},"PopoverContent")),OE=Pi("PopoverContent.RemoveScroll"),zE=w.forwardRef(cl(function(a,i){const r=hs(wc,a.__scopePopover),c=w.useRef(null),u=St(i,c),d=w.useRef(!1);return w.useEffect(()=>{const f=c.current;if(f)return D0(f)},[]),o.jsx(Zd,{as:OE,allowPinchZoom:!0,children:o.jsx(Gw,{...a,ref:u,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(a.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=r.triggerRef.current)==null||m.focus()}),onPointerDownOutside:gt(a.onPointerDownOutside,f=>{const m=f.detail.originalEvent,v=m.button===0&&m.ctrlKey===!0,y=m.button===2||v;d.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:gt(a.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),LE=w.forwardRef(cl(function(a,i){const r=hs(wc,a.__scopePopover),c=w.useRef(!1),u=w.useRef(!1);return o.jsx(Gw,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=a.onCloseAutoFocus)==null||f.call(a,d),d.defaultPrevented||(c.current||(m=r.triggerRef.current)==null||m.focus(),d.preventDefault()),c.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=a.onInteractOutside)==null||v.call(a,d),d.defaultPrevented||(c.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=r.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"PopoverContentNonModal")),Gw=w.forwardRef(cl(function(a,i){const{__scopePopover:r,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:p,...b}=a,j=hs(wc,r),S=F0(r);return _c(),o.jsx(A0,{asChild:!0,loop:!0,trapped:c,onMountAutoFocus:u,onUnmountAutoFocus:d,children:o.jsx(E0,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>j.onOpenChange(!1),deferPointerDownOutside:!0,children:o.jsx(qw,{"data-state":V0(j.open),role:"dialog",id:j.contentId,...S,...b,ref:i,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function V0(e){return e?"open":"closed"}cl(V0,"getState");var Yw=EE,Xw=AE,Kw=RE,Qw=DE,BE=Object.defineProperty,ot=(e,a)=>BE(e,"name",{value:a,configurable:!0});function Zw(e,a){return w.useReducer((i,r)=>a[i][r]??i,e)}ot(Zw,"useStateMachine");var Jw="ScrollArea",[Ww,lH]=ol(Jw),[IE,Ya]=Ww(Jw),HE=w.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,type:c="hover",dir:u,scrollHideDelay:d=600,...f}=a,[m,v]=w.useState(null),[y,p]=w.useState(null),[b,j]=w.useState(null),[S,k]=w.useState(null),[C,E]=w.useState(null),[M,T]=w.useState(0),[_,L]=w.useState(0),[A,H]=w.useState(!1),[I,q]=w.useState(!1),D=St(i,v),$=N0(u);return o.jsx(IE,{scope:r,type:c,dir:$,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:p,content:b,onContentChange:j,scrollbarX:S,onScrollbarXChange:k,scrollbarXEnabled:A,onScrollbarXEnabledChange:H,scrollbarY:C,onScrollbarYChange:E,scrollbarYEnabled:I,onScrollbarYEnabledChange:q,onCornerWidthChange:T,onCornerHeightChange:L,children:o.jsx(zt.div,{dir:$,...f,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":_+"px",...a.style}})})},"ScrollArea")),PE="ScrollAreaViewport",UE=w.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,children:c,nonce:u,...d}=a,f=Ya(PE,r),m=w.useRef(null),v=St(i,m,f.onViewportChange);return o.jsxs(o.Fragment,{children:[o.jsx(qE,{nonce:u}),o.jsx(zt.div,{"data-radix-scroll-area-viewport":"",...d,ref:v,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...a.style},children:o.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:c})})]})},"ScrollAreaViewport")),qE=w.memo(ot(function({nonce:a}){return o.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:a})},"ScrollAreaViewportStyle"),(e,a)=>e.nonce===a.nonce),br="ScrollAreaScrollbar",FE=w.forwardRef(ot(function(a,i){const{forceMount:r,...c}=a,u=Ya(br,a.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=a.orientation==="horizontal";return w.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?o.jsx(VE,{...c,ref:i,forceMount:r}):u.type==="scroll"?o.jsx($E,{...c,ref:i,forceMount:r}):u.type==="auto"?o.jsx(e3,{...c,ref:i,forceMount:r}):u.type==="always"?o.jsx($0,{...c,ref:i,"data-state":"visible"}):null},"ScrollAreaScrollbar")),VE=w.forwardRef(ot(function(a,i){const{forceMount:r,...c}=a,u=Ya(br,a.__scopeScrollArea),[d,f]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=ot(()=>{window.clearTimeout(v),f(!0)},"handlePointerEnter"),p=ot(()=>{v=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",p),()=>{window.clearTimeout(v),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",p)}}},[u.scrollArea,u.scrollHideDelay]),o.jsx($i,{present:r||d,children:o.jsx(e3,{"data-state":d?"visible":"hidden",...c,ref:i})})},"ScrollAreaScrollbarHover")),$E=w.forwardRef(ot(function(a,i){const{forceMount:r,...c}=a,u=Ya(br,a.__scopeScrollArea),d=a.orientation==="horizontal",f=Rc(()=>v("SCROLL_END"),100),[m,v]=Zw("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 w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),w.useEffect(()=>{const y=u.viewport,p=d?"scrollLeft":"scrollTop";if(y){let b=y[p];const j=ot(()=>{const S=y[p];b!==S&&(v("SCROLL"),f()),b=S},"handleScroll");return y.addEventListener("scroll",j),()=>y.removeEventListener("scroll",j)}},[u.viewport,d,v,f]),o.jsx($i,{present:r||m!=="hidden",children:o.jsx($0,{"data-state":m==="hidden"?"hidden":"visible",...c,ref:i,onPointerEnter:gt(a.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:gt(a.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),e3=w.forwardRef(ot(function(a,i){const r=Ya(br,a.__scopeScrollArea),{forceMount:c,...u}=a,[d,f]=w.useState(!1),m=a.orientation==="horizontal",v=Rc(()=>{if(r.viewport){const y=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;f(m?y:p)}},10);return no(r.viewport,v),no(r.content,v),o.jsx($i,{present:c||d,children:o.jsx($0,{"data-state":d?"visible":"hidden",...u,ref:i})})},"ScrollAreaScrollbarAuto")),$0=w.forwardRef(ot(function(a,i){const{orientation:r="vertical",...c}=a,u=Ya(br,a.__scopeScrollArea),d=w.useRef(null),f=w.useRef(0),[m,v]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=G0(m.viewport,m.content),p={...c,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:ot(j=>d.current=j,"onThumbChange"),onThumbPointerUp:ot(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:ot(j=>f.current=j,"onThumbPointerDown")};function b(j,S){return i3(j,f.current,m,S)}return ot(b,"getScrollPosition"),r==="horizontal"?o.jsx(GE,{...p,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollLeft,S=Kp(j,m,u.dir);d.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollLeft=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollLeft=b(j,u.dir))}}):r==="vertical"?o.jsx(YE,{...p,ref:i,onThumbPositionChange:()=>{if(u.viewport&&d.current){const j=u.viewport.scrollTop,S=Kp(j,m);d.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:j=>{u.viewport&&(u.viewport.scrollTop=j)},onDragScroll:j=>{u.viewport&&(u.viewport.scrollTop=b(j))}}):null},"ScrollAreaScrollbarVisible")),GE=w.forwardRef(ot(function(a,i){const{sizes:r,onSizesChange:c,...u}=a,d=Ya(br,a.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=St(i,v,d.onScrollbarXChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(n3,{"data-orientation":"horizontal",...u,ref:y,sizes:r,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mc(r)+"px",...a.style},onThumbPointerDown:p=>a.onThumbPointerDown(p.x),onDragScroll:p=>a.onDragScroll(p.x),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollLeft+p.deltaX;a.onWheelScroll(j),X0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:Sc(f.paddingLeft),paddingEnd:Sc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),YE=w.forwardRef(ot(function(a,i){const{sizes:r,onSizesChange:c,...u}=a,d=Ya(br,a.__scopeScrollArea),[f,m]=w.useState(),v=w.useRef(null),y=St(i,v,d.onScrollbarYChange);return w.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),o.jsx(n3,{"data-orientation":"vertical",...u,ref:y,sizes:r,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mc(r)+"px",...a.style},onThumbPointerDown:p=>a.onThumbPointerDown(p.y),onDragScroll:p=>a.onDragScroll(p.y),onWheelScroll:(p,b)=>{if(d.viewport){const j=d.viewport.scrollTop+p.deltaY;a.onWheelScroll(j),X0(j,b)&&p.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&c({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:Sc(f.paddingTop),paddingEnd:Sc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[XE,t3]=Ww(br),n3=w.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,sizes:c,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:p,onResize:b,...j}=a,S=Ya(br,r),[k,C]=w.useState(null),E=St(i,C),M=w.useRef(null),T=w.useRef(""),_=S.viewport,L=c.content-c.viewport,A=_n(p),H=_n(v),I=Rc(b,10);function q(D){if(M.current){const $=D.clientX-M.current.left,F=D.clientY-M.current.top;y({x:$,y:F})}}return ot(q,"handleDragScroll"),w.useEffect(()=>{const D=ot($=>{const F=$.target;(k==null?void 0:k.contains(F))&&A($,L)},"handleWheel");return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[_,k,L,A]),w.useEffect(H,[c,H]),no(k,I),no(S.content,I),o.jsx(XE,{scope:r,scrollbar:k,hasThumb:u,onThumbChange:_n(d),onThumbPointerUp:_n(f),onThumbPositionChange:H,onThumbPointerDown:_n(m),children:o.jsx(zt.div,{...j,ref:E,style:{position:"absolute",...j.style},onPointerDown:gt(a.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),M.current=k.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),q(D))}),onPointerMove:gt(a.onPointerMove,q),onPointerUp:gt(a.onPointerUp,D=>{const $=D.target;$.hasPointerCapture(D.pointerId)&&$.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=T.current,S.viewport&&(S.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),Xp="ScrollAreaThumb",KE=w.forwardRef(ot(function(a,i){const{forceMount:r,...c}=a,u=t3(Xp,a.__scopeScrollArea);return o.jsx($i,{present:r||u.hasThumb,children:o.jsx(QE,{ref:i,...c})})},"ScrollAreaThumb")),QE=w.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,style:c,...u}=a,d=Ya(Xp,r),f=t3(Xp,r),{onThumbPositionChange:m}=f,v=St(i,f.onThumbChange),y=w.useRef(void 0),p=Rc(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const b=d.viewport;if(b){const j=ot(()=>{if(p(),!y.current){const S=WE(b,m);y.current=S,m()}},"handleScroll");return m(),b.addEventListener("scroll",j),()=>b.removeEventListener("scroll",j)}},[d.viewport,p,m]),o.jsx(zt.div,{"data-state":f.hasThumb?"visible":"hidden",...u,ref:v,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...c},onPointerDownCapture:gt(a.onPointerDownCapture,b=>{const S=b.target.getBoundingClientRect(),k=b.clientX-S.left,C=b.clientY-S.top;f.onThumbPointerDown({x:k,y:C})}),onPointerUp:gt(a.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),a3="ScrollAreaCorner",ZE=w.forwardRef(ot(function(a,i){const r=Ya(a3,a.__scopeScrollArea),c=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&c?o.jsx(JE,{...a,ref:i}):null},"ScrollAreaCorner")),JE=w.forwardRef(ot(function(a,i){const{__scopeScrollArea:r,...c}=a,u=Ya(a3,r),[d,f]=w.useState(0),[m,v]=w.useState(0),y=!!(d&&m),{onCornerWidthChange:p,onCornerHeightChange:b}=u;return no(u.scrollbarX,()=>{var S;const j=((S=u.scrollbarX)==null?void 0:S.offsetHeight)||0;u.onCornerHeightChange(j),v(j)}),no(u.scrollbarY,()=>{var S;const j=((S=u.scrollbarY)==null?void 0:S.offsetWidth)||0;u.onCornerWidthChange(j),f(j)}),w.useEffect(()=>()=>{p(0),b(0)},[p,b]),y?o.jsx(zt.div,{...c,ref:i,style:{width:d,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...a.style}}):null},"ScrollAreaCornerImpl"));function Sc(e){return e?parseInt(e,10):0}ot(Sc,"toInt");function G0(e,a){const i=e/a;return isNaN(i)?0:i}ot(G0,"getThumbRatio");function Mc(e){const a=G0(e.viewport,e.content),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-i)*a;return Math.max(r,18)}ot(Mc,"getThumbSize");function i3(e,a,i,r="ltr"){const c=Mc(i),u=c/2,d=a||u,f=c-d,m=i.scrollbar.paddingStart+d,v=i.scrollbar.size-i.scrollbar.paddingEnd-f,y=i.content-i.viewport,p=r==="ltr"?[0,y]:[y*-1,0];return Y0([m,v],p)(e)}ot(i3,"getScrollPositionFromPointer");function Kp(e,a,i="ltr"){const r=Mc(a),c=a.scrollbar.paddingStart+a.scrollbar.paddingEnd,u=a.scrollbar.size-c,d=a.content-a.viewport,f=u-r,m=i==="ltr"?[0,d]:[d*-1,0],v=zd(e,m);return Y0([0,d],[0,f])(v)}ot(Kp,"getThumbOffsetFromScroll");function Y0(e,a){return i=>{if(e[0]===e[1]||a[0]===a[1])return a[0];const r=(a[1]-a[0])/(e[1]-e[0]);return a[0]+r*(i-e[0])}}ot(Y0,"linearScale");function X0(e,a){return e>0&&e<a}ot(X0,"isScrollingWithinScrollbarBounds");var WE=ot((e,a=()=>{})=>{let i={left:e.scrollLeft,top:e.scrollTop},r=0;return ot((function c(){const u={left:e.scrollLeft,top:e.scrollTop},d=i.left!==u.left,f=i.top!==u.top;(d||f)&&a(),i=u,r=window.requestAnimationFrame(c)}),"loop")(),()=>window.cancelAnimationFrame(r)},"addUnlinkedScrollListener");function Rc(e,a){const i=_n(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(i,a)},[i,a])}ot(Rc,"useDebounceCallback");function no(e,a){const i=_n(a);Mn(()=>{let r=0;if(e){const c=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(i)});return c.observe(e),()=>{window.cancelAnimationFrame(r),c.unobserve(e)}}},[e,i])}ot(no,"useResizeObserver");var eT=HE,tT=UE,nT=ZE,aT=Object.defineProperty,Ct=(e,a)=>aT(e,"name",{value:a,configurable:!0}),iT=[" ","Enter","ArrowUp","ArrowDown"],rT=[" ","Enter"],ls="Select",[lf,K0,lT]=P4(ls),[oo,oH]=ol(ls,[lT,af]),Q0=af(),[oT,ul]=oo(ls),[sT,cT]=oo(ls);function r3(e){const{__scopeSelect:a,children:i,open:r,defaultOpen:c,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:v,name:y,autoComplete:p,disabled:b,required:j,form:S,internal_do_not_use_render:k}=e,C=Q0(a),[E,M]=w.useState(null),[T,_]=w.useState(null),[L,A]=w.useState(!1),H=N0(v),[I,q]=yc({prop:r,defaultProp:c??!1,onChange:u,caller:ls}),[D,$]=yc({prop:d,defaultProp:f,onChange:m,caller:ls}),F=w.useRef(null),W=w.useRef(D);w.useEffect(()=>{const ee=S?E==null?void 0:E.ownerDocument.getElementById(S):E==null?void 0:E.form;if(ee instanceof HTMLFormElement){const U=Ct(()=>$(W.current),"reset");return ee.addEventListener("reset",U),()=>ee.removeEventListener("reset",U)}},[S,E,$]);const Y=E?!!S||!!E.closest("form"):!0,[P,K]=w.useState(new Set),R=Zl(),V=Array.from(P).map(ee=>ee.props.value).join(";"),ne=w.useCallback(ee=>{K(U=>new Set(U).add(ee))},[]),z=w.useCallback(ee=>{K(U=>{const G=new Set(U);return G.delete(ee),G})},[]),J={required:j,trigger:E,onTriggerChange:M,valueNode:T,onValueNodeChange:_,valueNodeHasChildren:L,onValueNodeHasChildrenChange:A,contentId:R,value:D,onValueChange:$,open:I,onOpenChange:q,dir:H,triggerPointerDownPosRef:F,disabled:b,name:y,autoComplete:p,form:S,nativeOptions:P,nativeSelectKey:V,isFormControl:Y};return o.jsx(Pw,{...C,children:o.jsx(oT,{scope:a,...J,children:o.jsx(lf.Provider,{scope:a,children:o.jsx(sT,{scope:a,onNativeOptionAdd:ne,onNativeOptionRemove:z,children:s3(k)?k(J):i})})})})}Ct(r3,"SelectProvider");var uT=Ct(e=>{const{__scopeSelect:a,children:i,...r}=e;return o.jsx(r3,{__scopeSelect:a,...r,internal_do_not_use_render:({isFormControl:c})=>o.jsxs(o.Fragment,{children:[i,c?o.jsx(zT,{__scopeSelect:a}):null]})})},"Select"),dT="SelectTrigger",fT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,disabled:c=!1,...u}=a,d=Q0(r),f=ul(dT,r),m=f.disabled||c,v=St(i,f.onTriggerChange),y=K0(r),p=w.useRef("touch"),[b,j,S]=Z0(C=>{const E=y().filter(_=>!_.disabled),M=E.find(_=>_.value===f.value),T=J0(E,C,M);T!==void 0&&f.onValueChange(T.value)}),k=Ct(C=>{m||(f.onOpenChange(!0),S()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return o.jsx(Uw,{asChild:!0,...d,children:o.jsx(zt.button,{type:"button",role:"combobox","aria-controls":f.open?f.contentId:void 0,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Dc(f.value)?"":void 0,...u,ref:v,onClick:gt(u.onClick,C=>{C.currentTarget.focus(),p.current!=="mouse"&&k(C)}),onPointerDown:gt(u.onPointerDown,C=>{p.current=C.pointerType;const E=C.target;E.hasPointerCapture(C.pointerId)&&E.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(k(C),C.preventDefault())}),onKeyDown:gt(u.onKeyDown,C=>{const E=b.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&j(C.key),!(E&&C.key===" ")&&iT.includes(C.key)&&(k(),C.preventDefault())})})})},"SelectTrigger")),hT="SelectValue",mT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,className:c,style:u,children:d,placeholder:f="",...m}=a,v=ul(hT,r),{onValueNodeHasChildrenChange:y}=v,p=d!==void 0,b=St(i,v.onValueNodeChange);Mn(()=>{y(p)},[y,p]);const j=Dc(v.value);return o.jsx(zt.span,{...m,asChild:j?!1:m.asChild,ref:b,style:{pointerEvents:"none"},children:o.jsx(w.Fragment,{children:j?f:d},j?"placeholder":"value")})},"SelectValue")),pT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,children:c,...u}=a;return o.jsx(zt.span,{"aria-hidden":!0,...u,ref:i,children:c||"▼"})},"SelectIcon")),gT="SelectPortal",[vT,yT]=oo(gT,{forceMount:void 0}),xT=Ct(e=>{const{__scopeSelect:a,forceMount:i,...r}=e;return o.jsx(vT,{scope:e.__scopeSelect,forceMount:i,children:o.jsx(M0,{asChild:!0,...r})})},"SelectPortal"),ao="SelectContent",bT=w.forwardRef(Ct(function(a,i){const r=yT(ao,a.__scopeSelect),{forceMount:c=r.forceMount,...u}=a,d=ul(ao,a.__scopeSelect),[f,m]=w.useState();return Mn(()=>{m(new DocumentFragment)},[]),o.jsx($i,{present:c||d.open,children:({present:v})=>v?o.jsx(ST,{...u,ref:i}):o.jsx(jT,{...u,fragment:f})})},"SelectContent")),jT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,children:c,fragment:u}=a;return u?lo.createPortal(o.jsx(l3,{scope:r,children:o.jsx(lf.Slot,{scope:r,children:o.jsx("div",{ref:i,children:c})})}),u):null},"SelectContentFragment")),ri=10,[l3,of]=oo(ao),wT=Pi("SelectContent.RemoveScroll"),ST=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r}=a,{position:c="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E,...M}=a,T=ul(ao,r),[_,L]=w.useState(null),[A,H]=w.useState(null),I=St(i,L),[q,D]=w.useState(null),[$,F]=w.useState(null),W=K0(r),[Y,P]=w.useState(!1),K=w.useRef(!1);w.useEffect(()=>{if(_)return D0(_)},[_]),_c();const R=w.useCallback(ue=>{const[be,...le]=W().map(Te=>Te.ref.current),[se]=le.slice(-1),me=document.activeElement;for(const Te of ue)if(Te===me||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===be&&A&&(A.scrollTop=0),Te===se&&A&&(A.scrollTop=A.scrollHeight),Te==null||Te.focus(),document.activeElement!==me))return},[W,A]),V=w.useCallback(()=>R([q,_]),[R,q,_]);w.useEffect(()=>{Y&&V()},[Y,V]);const{onOpenChange:ne,triggerPointerDownPosRef:z}=T;w.useEffect(()=>{if(_){let ue={x:0,y:0};const be=Ct(se=>{var me,Te;ue={x:Math.abs(Math.round(se.pageX)-(((me=z.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(se.pageY)-(((Te=z.current)==null?void 0:Te.y)??0))}},"handlePointerMove"),le=Ct(se=>{ue.x<=10&&ue.y<=10?se.preventDefault():se.composedPath().includes(_)||ne(!1),document.removeEventListener("pointermove",be),z.current=null},"handlePointerUp");return z.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",le,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",le,{capture:!0})}}},[_,ne,z]),w.useEffect(()=>{const ue=Ct(()=>ne(!1),"close");return window.addEventListener("blur",ue),window.addEventListener("resize",ue),()=>{window.removeEventListener("blur",ue),window.removeEventListener("resize",ue)}},[ne]);const[J,ee]=Z0(ue=>{const be=W().filter(me=>!me.disabled),le=be.find(me=>me.ref.current===document.activeElement),se=J0(be,ue,le);se&&setTimeout(()=>{var me;return(me=se.ref.current)==null?void 0:me.focus()})}),U=w.useCallback((ue,be,le)=>{const se=!K.current&&!le;(T.value!==void 0&&T.value===be||se)&&(D(ue),se&&(K.current=!0))},[T.value]),G=w.useCallback(()=>_==null?void 0:_.focus(),[_]),fe=w.useCallback((ue,be,le)=>{const se=!K.current&&!le;(T.value!==void 0&&T.value===be||se)&&F(ue)},[T.value]),xe=c==="popper"?rx:kT,je=xe===rx?{side:m,sideOffset:v,align:y,alignOffset:p,arrowPadding:b,collisionBoundary:j,collisionPadding:S,sticky:k,hideWhenDetached:C,avoidCollisions:E}:{};return o.jsx(l3,{scope:r,content:_,viewport:A,onViewportChange:H,itemRefCallback:U,selectedItem:q,onItemLeave:G,itemTextRefCallback:fe,focusSelectedItem:V,selectedItemText:$,position:c,isPositioned:Y,searchRef:J,children:o.jsx(Zd,{as:wT,allowPinchZoom:!0,children:o.jsx(A0,{asChild:!0,trapped:T.open,onMountAutoFocus:ue=>{ue.preventDefault()},onUnmountAutoFocus:gt(u,ue=>{var be;(be=T.trigger)==null||be.focus({preventScroll:!0}),ue.preventDefault()}),children:o.jsx(E0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ue=>ue.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:o.jsx(xe,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ue=>ue.preventDefault(),...M,...je,onPlaced:()=>P(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:gt(M.onKeyDown,ue=>{const be=ue.ctrlKey||ue.altKey||ue.metaKey;if(ue.key==="Tab"&&ue.preventDefault(),!be&&ue.key.length===1&&ee(ue.key),["ArrowUp","ArrowDown","Home","End"].includes(ue.key)){let se=W().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ue.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ue.key)){const me=ue.target,Te=se.indexOf(me);se=se.slice(Te+1)}setTimeout(()=>R(se)),ue.preventDefault()}})})})})})})},"SelectContentImpl")),kT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,onPlaced:c,...u}=a,d=ul(ao,r),f=of(ao,r),[m,v]=w.useState(null),[y,p]=w.useState(null),b=St(i,p),j=K0(r),S=w.useRef(!1),k=w.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:M,focusSelectedItem:T}=f,_=w.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&C&&E&&M){const I=d.trigger.getBoundingClientRect(),q=y.getBoundingClientRect(),D=d.valueNode.getBoundingClientRect(),$=M.getBoundingClientRect();if(d.dir!=="rtl"){const me=$.left-q.left,Te=D.left-me,Le=I.left-Te,Ve=I.width+Le,pt=Math.max(Ve,q.width),tt=window.innerWidth-ri,We=zd(Te,[ri,Math.max(ri,tt-pt)]);m.style.minWidth=Ve+"px",m.style.left=We+"px"}else{const me=q.right-$.right,Te=window.innerWidth-D.right-me,Le=window.innerWidth-I.right-Te,Ve=I.width+Le,pt=Math.max(Ve,q.width),tt=window.innerWidth-ri,We=zd(Te,[ri,Math.max(ri,tt-pt)]);m.style.minWidth=Ve+"px",m.style.right=We+"px"}const F=j(),W=window.innerHeight-ri*2,Y=C.scrollHeight,P=window.getComputedStyle(y),K=parseInt(P.borderTopWidth,10),R=parseInt(P.paddingTop,10),V=parseInt(P.borderBottomWidth,10),ne=parseInt(P.paddingBottom,10),z=K+R+Y+ne+V,J=Math.min(E.offsetHeight*5,z),ee=window.getComputedStyle(C),U=parseInt(ee.paddingTop,10),G=parseInt(ee.paddingBottom,10),fe=I.top+I.height/2-ri,xe=W-fe,je=E.offsetHeight/2,ue=E.offsetTop+je,be=K+R+ue,le=z-be;if(be<=fe){const me=F.length>0&&E===F[F.length-1].ref.current;m.style.bottom="0px";const Te=y.clientHeight-C.offsetTop-C.offsetHeight,Le=Math.max(xe,je+(me?G:0)+Te+V),Ve=be+Le;m.style.height=Ve+"px"}else{const me=F.length>0&&E===F[0].ref.current;m.style.top="0px";const Le=Math.max(fe,K+C.offsetTop+(me?U:0)+je)+le;m.style.height=Le+"px",C.scrollTop=be-fe+C.offsetTop}m.style.margin=`${ri}px 0`,m.style.minHeight=J+"px",m.style.maxHeight=W+"px",c==null||c(),requestAnimationFrame(()=>S.current=!0)}},[j,d.trigger,d.valueNode,m,y,C,E,M,d.dir,c]);Mn(()=>_(),[_]);const[L,A]=w.useState();Mn(()=>{y&&A(window.getComputedStyle(y).zIndex)},[y]);const H=w.useCallback(I=>{I&&k.current===!0&&(_(),T==null||T(),k.current=!1)},[_,T]);return o.jsx(CT,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:H,children:o.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:o.jsx(zt.div,{...u,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),rx=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,align:c="start",collisionPadding:u=ri,...d}=a,f=Q0(r);return o.jsx(qw,{...f,...d,ref:i,align:c,collisionPadding:u,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[CT,NT]=oo(ao,{}),lx="SelectViewport",ET=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,nonce:c,...u}=a,d=of(lx,r),f=NT(lx,r),m=St(i,d.onViewportChange),v=w.useRef(0);return o.jsxs(o.Fragment,{children:[o.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:c}),o.jsx(lf.Slot,{scope:r,children:o.jsx(zt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:gt(u.onScroll,y=>{const p=y.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:j}=f;if(j!=null&&j.current&&b){const S=Math.abs(v.current-p.scrollTop);if(S>0){const k=window.innerHeight-ri*2,C=parseFloat(b.style.minHeight),E=parseFloat(b.style.height),M=Math.max(C,E);if(M<k){const T=M+S,_=Math.min(k,T),L=T-_;b.style.height=_+"px",b.style.bottom==="0px"&&(p.scrollTop=L>0?L:0,b.style.justifyContent="flex-end")}}}v.current=p.scrollTop})})})]})},"SelectViewport")),TT="SelectGroup",[sH,cH]=oo(TT),Qp="SelectItem",[AT,o3]=oo(Qp),_T=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,value:c,disabled:u=!1,textValue:d,...f}=a,m=ul(Qp,r),v=of(Qp,r),y=m.value===c,[p,b]=w.useState(d??""),[j,S]=w.useState(!1),k=_n(_=>{var L;return(L=v.itemRefCallback)==null?void 0:L.call(v,_,c,u)}),C=St(i,k),E=Zl(),M=w.useRef("touch"),T=Ct(()=>{u||(m.onValueChange(c),m.onOpenChange(!1))},"handleSelect");return o.jsx(AT,{scope:r,value:c,disabled:u,textId:E,isSelected:y,onItemTextChange:w.useCallback(_=>{b(L=>L||((_==null?void 0:_.textContent)??"").trim())},[]),children:o.jsx(lf.ItemSlot,{scope:r,value:c,disabled:u,textValue:p,children:o.jsx(zt.div,{role:"option","aria-labelledby":E,"data-highlighted":j?"":void 0,"aria-selected":y&&j,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:C,onFocus:gt(f.onFocus,()=>S(!0)),onBlur:gt(f.onBlur,()=>S(!1)),onClick:gt(f.onClick,()=>{M.current!=="mouse"&&T()}),onPointerUp:gt(f.onPointerUp,()=>{M.current==="mouse"&&T()}),onPointerDown:gt(f.onPointerDown,_=>{M.current=_.pointerType}),onPointerMove:gt(f.onPointerMove,_=>{var L;M.current=_.pointerType,u?(L=v.onItemLeave)==null||L.call(v):M.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:gt(f.onPointerLeave,_=>{var L;_.currentTarget===document.activeElement&&((L=v.onItemLeave)==null||L.call(v))}),onKeyDown:gt(f.onKeyDown,_=>{var A;u||_.target!==_.currentTarget||((A=v.searchRef)==null?void 0:A.current)!==""&&_.key===" "||(rT.includes(_.key)&&T(),_.key===" "&&_.preventDefault())})})})})},"SelectItem")),ud="SelectItemText",MT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,className:c,style:u,...d}=a,f=ul(ud,r),m=of(ud,r),v=o3(ud,r),y=cT(ud,r),[p,b]=w.useState(null),j=_n(T=>{var _;return(_=m.itemTextRefCallback)==null?void 0:_.call(m,T,v.value,v.disabled)}),S=St(i,b,v.onItemTextChange,j),k=p==null?void 0:p.textContent,C=w.useMemo(()=>o.jsx("option",{value:v.value,disabled:v.disabled,children:k},v.value),[v.disabled,v.value,k]),{onNativeOptionAdd:E,onNativeOptionRemove:M}=y;return Mn(()=>(E(C),()=>M(C)),[E,M,C]),o.jsxs(o.Fragment,{children:[o.jsx(zt.span,{id:v.textId,...d,ref:S}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Dc(f.value)?lo.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),RT="SelectItemIndicator",DT=w.forwardRef(Ct(function(a,i){const{__scopeSelect:r,...c}=a;return o3(RT,r).isSelected?o.jsx(zt.span,{"aria-hidden":!0,...c,ref:i}):null},"SelectItemIndicator")),OT="SelectBubbleInput",zT=w.forwardRef(Ct(function({__scopeSelect:a,...i},r){const c=ul(OT,a),{value:u,onValueChange:d,required:f,disabled:m,name:v,autoComplete:y,form:p}=c,{nativeOptions:b,nativeSelectKey:j}=c,S=w.useRef(null),k=St(r,S),C=u??"",E=Fw(C),M=Array.from(b).some(T=>(T.props.value??"")==="");return w.useEffect(()=>{const T=S.current;if(!T)return;const _=window.HTMLSelectElement.prototype,A=Object.getOwnPropertyDescriptor(_,"value").set;if(E!==C&&A){const H=new Event("change",{bubbles:!0});A.call(T,C),T.dispatchEvent(H)}},[E,C]),o.jsxs(zt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:p,onChange:T=>d(T.target.value),...i,style:{...C7,...i.style},ref:k,defaultValue:C,children:[Dc(u)&&!M?o.jsx("option",{value:""}):null,Array.from(b)]},j)},"SelectBubbleInput"));function s3(e){return typeof e=="function"}Ct(s3,"isFunction");function Dc(e){return e===""||e===void 0}Ct(Dc,"shouldShowPlaceholder");function Z0(e){const a=_n(e),i=w.useRef(""),r=w.useRef(0),c=w.useCallback(d=>{const f=i.current+d;a(f),Ct((function m(v){i.current=v,window.clearTimeout(r.current),v!==""&&(r.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[a]),u=w.useCallback(()=>{i.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[i,c,u]}Ct(Z0,"useTypeaheadSearch");function J0(e,a,i){const c=a.length>1&&Array.from(a).every(v=>v===a[0])?a[0]:a,u=i?e.indexOf(i):-1;let d=c3(e,Math.max(u,0));c.length===1&&(d=d.filter(v=>v!==i));const m=d.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return m!==i?m:void 0}Ct(J0,"findNextItem");function c3(e,a){return e.map((i,r)=>e[(a+r)%e.length])}Ct(c3,"wrapArray");const LT=S0("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ee({className:e,variant:a="default",size:i="default",asChild:r=!1,...c}){const u=r?g7:"button";return o.jsx(u,{"data-slot":"button","data-variant":a,"data-size":i,className:an(LT({variant:a,size:i,className:e})),...c})}const W0=e=>Ga(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function Xl({value:e}){return o.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function u3({blocks:e,links:a,onSelect:i}){return o.jsx(o.Fragment,{children:e.map((r,c)=>{if(r.type==="text"||r.type==="reasoning")return o.jsxs("section",{className:"jv-history-block",children:[o.jsx("h4",{children:x(r.type==="reasoning"?"history.reasoning":"history.text")}),o.jsx("pre",{className:"jv-history-text",children:r.text||x("history.empty")})]},c);if(r.type==="image")return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x("files.kindImage")," · ",r.mime_type]}),o.jsx("img",{className:"jv-history-image",src:`data:${r.mime_type};base64,${r.data}`,alt:x("history.image")})]},c);if(r.type==="tool_call"||r.type==="tool_result"){const u=a.filter(d=>d.tool_call_id===r.tool_call_id);return o.jsxs("section",{className:"jv-history-block",children:[o.jsxs("h4",{children:[x(r.type==="tool_call"?"history.toolCall":"history.toolResult")," · ",o.jsx("strong",{children:r.name}),r.type==="tool_result"&&r.is_error&&o.jsx("span",{className:"jv-history-error-tag",children:x("history.error")})]}),o.jsxs("div",{className:"jv-history-call",children:[o.jsx("code",{children:r.tool_call_id}),u.map(d=>o.jsxs("button",{type:"button",onClick:()=>i(d.id),"aria-label":x("history.related",{id:d.id}),children:[x(d.role==="tool"?"history.result":"history.call")," #",d.id]},d.id))]}),r.type==="tool_call"?o.jsx(Xl,{value:r.arguments}):o.jsxs(o.Fragment,{children:[o.jsx(u3,{blocks:r.result.content,links:[],onSelect:i}),r.result.details!==void 0&&o.jsxs("details",{children:[o.jsx("summary",{children:x("history.details")}),o.jsx(Xl,{value:r.result.details})]})]})]},c)}})})}function BT({detail:e,onSelect:a}){const[i,r]=w.useState("content"),{record:c,links:u}=e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-history-detail-head",children:[o.jsxs("div",{children:[o.jsxs("h3",{children:["#",c.id," ",o.jsx("span",{children:c.role})]}),o.jsx("p",{children:W0(c.timestamp)})]}),o.jsxs("div",{role:"tablist","aria-label":x("history.view"),children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="content",onClick:()=>r("content"),children:x("history.content")}),o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":i==="json",onClick:()=>r("json"),children:x("history.json")})]})]}),o.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":x(i==="content"?"history.contentLabel":"history.json"),children:i==="json"?o.jsx(Xl,{value:c}):o.jsxs(o.Fragment,{children:[c.model&&o.jsxs("div",{className:"jv-history-model",children:[o.jsx("span",{children:x("usage.model")}),o.jsx("strong",{children:c.model.id}),o.jsx("small",{children:c.model.provider})]}),o.jsx(u3,{blocks:c.message.content,links:u,onSelect:a}),c.message.tools&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsxs("summary",{children:[x("history.tools")," · ",c.message.tools.length]}),o.jsx(Xl,{value:c.message.tools})]}),c.message.tools_removed!==void 0&&o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:x("history.toolsRemoved")}),o.jsx(Xl,{value:c.message.tools_removed})]}),c.message.stop_reason&&o.jsxs("p",{className:"jv-history-note",children:[x("history.stopReason")," · ",c.message.stop_reason]}),c.message.error&&o.jsx("pre",{className:"jv-history-failure",children:c.message.error}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Usage"}),o.jsx(Xl,{value:c.usage})]}),o.jsxs("details",{className:"jv-history-fold",children:[o.jsx("summary",{children:"Extra"}),o.jsx(Xl,{value:c.extra})]})]})})]})}const ox={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},sx=e=>Ga(e,{year:"numeric",month:"long",day:"numeric"}),IT=e=>[e.preview,...e.tools.map(a=>x(a.kind==="call"?"activity.toolCall":a.error?"activity.toolFailed":"activity.toolResult",{name:a.name})),e.images?x("activity.images",{count:e.images}):""].filter(Boolean).join(" "),HT=e=>Ga(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function PT({items:e,onSelect:a}){return o.jsx("ol",{className:"jv-activity-timeline","aria-label":x("activity.timeline"),children:e.map((i,r)=>{const{record:c}=i,u=sx(c.timestamp);return o.jsxs(w.Fragment,{children:[(r===0||sx(e[r-1].record.timestamp)!==u)&&o.jsx("li",{className:"jv-activity-day",children:o.jsx("span",{children:u})}),o.jsxs("li",{className:`jv-activity-row is-${i.kind}`,"data-kind":i.kind,children:[o.jsxs("div",{className:"jv-activity-time",children:[o.jsx("time",{dateTime:new Date(c.timestamp).toISOString(),title:`${W0(c.timestamp)}.${String(c.timestamp%1e3).padStart(3,"0")}`,children:HT(c.timestamp)}),o.jsx("span",{className:"jv-activity-dot"})]}),i.kind==="chat"?o.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":x("activity.chatMessage",{id:i.record.id}),children:[o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>a({kind:"chat",id:i.record.id}),"aria-label":x("activity.viewMessage",{sequence:i.record.sequence,chat:i.record.chatTitle}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx(vC,{}),o.jsx("strong",{title:i.record.chatTitle,children:i.record.chatTitle}),o.jsxs("span",{children:["#",i.record.sequence]})]}),o.jsx("span",{className:"jv-activity-preview",children:i.record.preview||x("activity.attachmentOnly")}),i.record.attachmentCount>0&&o.jsxs("span",{className:"jv-activity-attachment",children:[o.jsx(b0,{}),x("activity.attachments",{count:i.record.attachmentCount})]})]}),i.record.source&&o.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>a({kind:"history",id:i.record.source.historyId}),"aria-label":x("activity.viewSentBy",{id:i.record.source.historyId}),children:[x("activity.sentBy",{id:i.record.source.historyId}),o.jsx(_p,{})]})]}):o.jsx("article",{className:"jv-activity-card jv-activity-history","aria-label":x("activity.historyRecord",{id:i.record.id}),children:o.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>a({kind:"history",id:i.record.id}),"aria-label":x("activity.viewHistory",{id:i.record.id,role:i.record.role}),children:[o.jsxs("span",{className:"jv-activity-card-head",children:[o.jsx("strong",{children:ox[i.record.role]?x(ox[i.record.role]):i.record.role}),o.jsxs("span",{children:["#",i.record.id]})]}),o.jsx("span",{className:"jv-activity-preview",children:IT(i.record)||x("activity.emptyMessage")})]})})]})]},`${i.kind}:${c.id}`)})})}const UT={read:(e,a)=>we(`/bots/${e}/history/${a}`)};function qT(e,a){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const FT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$T={};function cx(e,a){return($T.jsx?VT:FT).test(e)}const GT=/[ \t\n\f\r]/g;function YT(e){return typeof e=="object"?e.type==="text"?ux(e.value):!1:ux(e)}function ux(e){return e.replace(GT,"")===""}class Oc{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Oc.prototype.normal={};Oc.prototype.property={};Oc.prototype.space=void 0;function d3(e,a){const i={},r={};for(const c of e)Object.assign(i,c.property),Object.assign(r,c.normal);return new Oc(i,r,a)}function Zp(e){return e.toLowerCase()}class fa{constructor(a,i){this.attribute=i,this.property=a}}fa.prototype.attribute="";fa.prototype.booleanish=!1;fa.prototype.boolean=!1;fa.prototype.commaOrSpaceSeparated=!1;fa.prototype.commaSeparated=!1;fa.prototype.defined=!1;fa.prototype.mustUseProperty=!1;fa.prototype.number=!1;fa.prototype.overloadedBoolean=!1;fa.prototype.property="";fa.prototype.spaceSeparated=!1;fa.prototype.space=void 0;let XT=0;const Xe=so(),nn=so(),Jp=so(),Se=so(),Et=so(),Jl=so(),_a=so();function so(){return 2**++XT}const Wp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:nn,commaOrSpaceSeparated:_a,commaSeparated:Jl,number:Se,overloadedBoolean:Jp,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),Jm=Object.keys(Wp);class eg extends fa{constructor(a,i,r,c){let u=-1;if(super(a,i),dx(this,"space",c),typeof r=="number")for(;++u<Jm.length;){const d=Jm[u];dx(this,Jm[u],(r&Wp[d])===Wp[d])}}}eg.prototype.defined=!0;function dx(e,a,i){i&&(e[a]=i)}function ms(e){const a={},i={};for(const[r,c]of Object.entries(e.properties)){const u=new eg(r,e.transform(e.attributes||{},r),c,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[Zp(r)]=r,i[Zp(u.attribute)]=r}return new Oc(a,i,e.space)}const f3=ms({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Et,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:Se,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Et,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:nn,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function h3(e,a){return a in e?e[a]:a}function m3(e,a){return h3(e,a.toLowerCase())}const KT=ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jl,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alpha:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Et,autoFocus:Xe,autoPlay:Xe,blocking:Et,capture:null,charSet:null,checked:Xe,cite:null,className:Et,closedBy:null,colorSpace:null,cols:Se,colSpan:Se,command:null,commandFor:null,content:null,contentEditable:nn,controls:Xe,controlsList:Et,coords:Se|Jl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Jp,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Et,height:Se,hidden:Jp,high:Se,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Et,itemRef:Et,itemScope:Xe,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xe,optimum:Se,pattern:null,ping:Et,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Et,required:Xe,reversed:Xe,rows:Se,rowSpan:Se,sandbox:Et,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootCustomElementRegistry:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shadowRootSerializable:Xe,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:nn,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Xe,disablePictureInPicture:Xe,disableRemotePlayback:Xe,exportParts:Jl,part:Et,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:m3}),QT=ms({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:_a,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Et,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jl,g2:Jl,glyphName:Jl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:_a,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_a,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_a,rev:_a,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_a,requiredFeatures:_a,requiredFonts:_a,requiredFormats:_a,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:_a,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_a,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_a,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:h3}),p3=ms({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,a){return"xlink:"+a.slice(5).toLowerCase()}}),g3=ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:m3}),v3=ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,a){return"xml:"+a.slice(3).toLowerCase()}}),ZT={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JT=/[A-Z]/g,fx=/-[a-z]/g,WT=/^data[-\w.:]+$/i;function eA(e,a){const i=Zp(a);let r=a,c=fa;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&WT.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(fx,nA);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!fx.test(u)){let d=u.replace(JT,tA);d.charAt(0)!=="-"&&(d="-"+d),a="data"+d}}c=eg}return new c(r,a)}function tA(e){return"-"+e.toLowerCase()}function nA(e){return e.charAt(1).toUpperCase()}const aA=d3([f3,KT,p3,g3,v3],"html"),tg=d3([f3,QT,p3,g3,v3],"svg");function iA(e){return e.join(" ").trim()}var Wo={},Wm,hx;function rA(){if(hx)return Wm;hx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
510
+ `,v="/",y="*",p="",b="comment",j="declaration";function S(C,E){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];E=E||{};var M=1,T=1;function _(Y){var P=Y.match(a);P&&(M+=P.length);var K=Y.lastIndexOf(m);T=~K?Y.length-K:T+Y.length}function L(){var Y={line:M,column:T};return function(P){return P.position=new A(Y),q(),P}}function A(Y){this.start=Y,this.end={line:M,column:T},this.source=E.source}A.prototype.content=C;function H(Y){var P=new Error(E.source+":"+M+":"+T+": "+Y);if(P.reason=Y,P.filename=E.source,P.line=M,P.column=T,P.source=C,!E.silent)throw P}function I(Y){var P=Y.exec(C);if(P){var K=P[0];return _(K),C=C.slice(K.length),P}}function q(){I(i)}function D(Y){var P;for(Y=Y||[];P=$();)P!==!1&&Y.push(P);return Y}function $(){var Y=L();if(!(v!=C.charAt(0)||y!=C.charAt(1))){for(var P=2;p!=C.charAt(P)&&(y!=C.charAt(P)||v!=C.charAt(P+1));)++P;if(P+=2,p===C.charAt(P-1))return H("End of comment missing");var K=C.slice(2,P-2);return T+=2,_(K),C=C.slice(P),T+=2,Y({type:b,comment:K})}}function F(){var Y=L(),P=I(r);if(P){if($(),!I(c))return H("property missing ':'");var K=I(u),R=Y({type:j,property:k(P[0].replace(e,p)),value:K?k(K[0].replace(e,p)):p});return I(d),R}}function W(){var Y=[];D(Y);for(var P;P=F();)P!==!1&&(Y.push(P),D(Y));return Y}return q(),W()}function k(C){return C?C.replace(f,p):p}return Wm=S,Wm}var mx;function lA(){if(mx)return Wo;mx=1;var e=Wo&&Wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.default=i;const a=e(rA());function i(r,c){let u=null;if(!r||typeof r!="string")return u;const d=(0,a.default)(r),f=typeof c=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;f?c(v,y,m):y&&(u=u||{},u[v]=y)}),u}return Wo}var uc={},px;function oA(){if(px)return uc;px=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,u=function(v){return!v||i.test(v)||e.test(v)},d=function(v,y){return y.toUpperCase()},f=function(v,y){return"".concat(y,"-")},m=function(v,y){return y===void 0&&(y={}),u(v)?v:(v=v.toLowerCase(),y.reactCompat?v=v.replace(c,f):v=v.replace(r,f),v.replace(a,d))};return uc.camelCase=m,uc}var dc,gx;function sA(){if(gx)return dc;gx=1;var e=dc&&dc.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},a=e(lA()),i=oA();function r(c,u){var d={};return!c||typeof c!="string"||(0,a.default)(c,function(f,m){f&&m&&(d[(0,i.camelCase)(f,u)]=m)}),d}return r.default=r,dc=r,dc}var cA=sA();const uA=h0(cA),y3=x3("end"),ng=x3("start");function x3(e){return a;function a(i){const r=i&&i.position&&i.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dA(e){const a=ng(e),i=y3(e);if(a&&i)return{start:a,end:i}}function mc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vx(e.position):"start"in e||"end"in e?vx(e):"line"in e||"column"in e?e0(e):""}function e0(e){return yx(e&&e.line)+":"+yx(e&&e.column)}function vx(e){return e0(e&&e.start)+"-"+e0(e&&e.end)}function yx(e){return e&&typeof e=="number"?e:1}class Hn extends Error{constructor(a,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let c="",u={},d=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof a=="string"?c=a:!u.cause&&a&&(d=!0,c=a.message,u.cause=a),!u.ruleId&&!u.source&&typeof r=="string"){const m=r.indexOf(":");m===-1?u.ruleId=r:(u.source=r.slice(0,m),u.ruleId=r.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=f?f.line:void 0,this.name=mc(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=d&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Hn.prototype.file="";Hn.prototype.name="";Hn.prototype.reason="";Hn.prototype.message="";Hn.prototype.stack="";Hn.prototype.column=void 0;Hn.prototype.line=void 0;Hn.prototype.ancestors=void 0;Hn.prototype.cause=void 0;Hn.prototype.fatal=void 0;Hn.prototype.place=void 0;Hn.prototype.ruleId=void 0;Hn.prototype.source=void 0;const ag={}.hasOwnProperty,fA=new Map,hA=/[A-Z]/g,mA=new Set(["table","tbody","thead","tfoot","tr"]),pA=new Set(["td","th"]),b3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function gA(e,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=a.filePath||void 0;let r;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=kA(i,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=SA(i,a.jsx,a.jsxs)}const c={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:r,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?tg:aA,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=j3(c,e,void 0);return u&&typeof u!="string"?u:c.create(e,c.Fragment,{children:u||void 0},void 0)}function j3(e,a,i){if(a.type==="element")return vA(e,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return yA(e,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return bA(e,a,i);if(a.type==="mdxjsEsm")return xA(e,a);if(a.type==="root")return jA(e,a,i);if(a.type==="text")return wA(e,a)}function vA(e,a,i){const r=e.schema;let c=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(c=tg,e.schema=c),e.ancestors.push(a);const u=S3(e,a.tagName,!1),d=CA(e,a);let f=rg(e,a);return mA.has(a.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!YT(m):!0})),w3(e,d,u,a),ig(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function yA(e,a){if(a.data&&a.data.estree&&e.evaluater){const r=a.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}kc(e,a.position)}function xA(e,a){if(a.data&&a.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(a.data.estree);kc(e,a.position)}function bA(e,a,i){const r=e.schema;let c=r;a.name==="svg"&&r.space==="html"&&(c=tg,e.schema=c),e.ancestors.push(a);const u=a.name===null?e.Fragment:S3(e,a.name,!0),d=NA(e,a),f=rg(e,a);return w3(e,d,u,a),ig(d,f),e.ancestors.pop(),e.schema=r,e.create(a,u,d,i)}function jA(e,a,i){const r={};return ig(r,rg(e,a)),e.create(a,e.Fragment,r,i)}function wA(e,a){return a.value}function w3(e,a,i,r){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(a.node=r)}function ig(e,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(e.children=i)}}function SA(e,a,i){return r;function r(c,u,d,f){const v=Array.isArray(d.children)?i:a;return f?v(u,d,f):v(u,d)}}function kA(e,a){return i;function i(r,c,u,d){const f=Array.isArray(u.children),m=ng(r);return a(c,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function CA(e,a){const i={};let r,c;for(c in a.properties)if(c!=="children"&&ag.call(a.properties,c)){const u=EA(e,c,a.properties[c]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&pA.has(a.tagName)?r=f:i[d]=f}}if(r){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function NA(e,a){const i={};for(const r of a.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const u=r.data.estree.body[0];u.type;const d=u.expression;d.type;const f=d.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else kc(e,a.position);else{const c=r.name;let u;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else kc(e,a.position);else u=r.value===null?!0:r.value;i[c]=u}return i}function rg(e,a){const i=[];let r=-1;const c=e.passKeys?new Map:fA;for(;++r<a.children.length;){const u=a.children[r];let d;if(e.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const v=c.get(m)||0;d=m+"-"+v,c.set(m,v+1)}}const f=j3(e,u,d);f!==void 0&&i.push(f)}return i}function EA(e,a,i){const r=eA(e.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?qT(i):iA(i)),r.property==="style"){let c=typeof i=="object"?i:TA(e,String(i));return e.stylePropertyNameCase==="css"&&(c=AA(c)),["style",c]}return[e.elementAttributeNameCase==="react"&&r.space?ZT[r.property]||r.property:r.attribute,i]}}function TA(e,a){try{return uA(a,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,c=new Hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=e.filePath||void 0,c.url=b3+"#cannot-parse-style-attribute",c}}function S3(e,a,i){let r;if(!i)r={type:"Literal",value:a};else if(a.includes(".")){const c=a.split(".");let u=-1,d;for(;++u<c.length;){const f=cx(c[u])?{type:"Identifier",name:c[u]}:{type:"Literal",value:c[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}r=d}else r=cx(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const c=r.value;return ag.call(e.components,c)?e.components[c]:c}if(e.evaluater)return e.evaluater.evaluateExpression(r);kc(e)}function kc(e,a){const i=new Hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=b3+"#cannot-handle-mdx-estrees-without-createevaluater",i}function AA(e){const a={};let i;for(i in e)ag.call(e,i)&&(a[_A(i)]=e[i]);return a}function _A(e){let a=e.replace(hA,MA);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function MA(e){return"-"+e.toLowerCase()}const ep={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},RA={};function lg(e,a){const i=RA,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,c=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return k3(e,r,c)}function k3(e,a,i){if(DA(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(a&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xx(e.children,a,i)}return Array.isArray(e)?xx(e,a,i):""}function xx(e,a,i){const r=[];let c=-1;for(;++c<e.length;)r[c]=k3(e[c],a,i);return r.join("")}function DA(e){return!!(e&&typeof e=="object")}const bx=document.createElement("i");function og(e){const a="&"+e+";";bx.innerHTML=a;const i=bx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===a?!1:i}function Ra(e,a,i,r){const c=e.length;let u=0,d;if(a<0?a=-a>c?0:c+a:a=a>c?c:a,i=i>0?i:0,r.length<1e4)d=Array.from(r),d.unshift(a,i),e.splice(...d);else for(i&&e.splice(a,i);u<r.length;)d=r.slice(u,u+1e4),d.unshift(a,0),e.splice(...d),u+=1e4,a+=1e4}function Fa(e,a){return e.length>0?(Ra(e,e.length,0,a),e):a}const jx={}.hasOwnProperty;function C3(e){const a={};let i=-1;for(;++i<e.length;)OA(a,e[i]);return a}function OA(e,a){let i;for(i in a){const c=(jx.call(e,i)?e[i]:void 0)||(e[i]={}),u=a[i];let d;if(u)for(d in u){jx.call(c,d)||(c[d]=[]);const f=u[d];zA(c[d],Array.isArray(f)?f:f?[f]:[])}}}function zA(e,a){let i=-1;const r=[];for(;++i<a.length;)(a[i].add==="after"?e:r).push(a[i]);Ra(e,0,0,r)}function N3(e,a){const i=Number.parseInt(e,a);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function li(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=dl(/[A-Za-z]/),In=dl(/[\dA-Za-z]/),LA=dl(/[#-'*+\--9=?A-Z^-~]/);function Ld(e){return e!==null&&(e<32||e===127)}const t0=dl(/\d/),BA=dl(/[\dA-Fa-f]/),IA=dl(/[!-/:-@[-`{-~]/);function Ue(e){return e!==null&&e<-2}function Tt(e){return e!==null&&(e<0||e===32)}function lt(e){return e===-2||e===-1||e===32}const sf=dl(new RegExp("\\p{P}|\\p{S}","u")),io=dl(/\s/);function dl(e){return a;function a(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function ps(e){const a=[];let i=-1,r=0,c=0;for(;++i<e.length;){const u=e.charCodeAt(i);let d="";if(u===37&&In(e.charCodeAt(i+1))&&In(e.charCodeAt(i+2)))c=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(d=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(d=String.fromCharCode(u,f),c=1):d="�"}else d=String.fromCharCode(u);d&&(a.push(e.slice(r,i),encodeURIComponent(d)),r=i+c+1,d=""),c&&(i+=c,c=0)}return a.join("")+e.slice(r)}function mt(e,a,i,r){const c=r?r-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return lt(m)?(e.enter(i),f(m)):a(m)}function f(m){return lt(m)&&u++<c?(e.consume(m),f):(e.exit(i),a(m))}}const HA={tokenize:PA};function PA(e){const a=e.attempt(this.parser.constructs.contentInitial,r,c);let i;return a;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),mt(e,a,"linePrefix")}function c(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ue(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const UA={tokenize:qA},wx={tokenize:FA};function qA(e){const a=this,i=[];let r=0,c,u,d;return f;function f(T){if(r<i.length){const _=i[r];return a.containerState=_[1],e.attempt(_[0].continuation,m,v)(T)}return v(T)}function m(T){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,c&&M();const _=a.events.length;let L=_,A;for(;L--;)if(a.events[L][0]==="exit"&&a.events[L][1].type==="chunkFlow"){A=a.events[L][1].end;break}E(r);let H=_;for(;H<a.events.length;)a.events[H][1].end={...A},H++;return Ra(a.events,L+1,0,a.events.slice(_)),a.events.length=H,v(T)}return f(T)}function v(T){if(r===i.length){if(!c)return b(T);if(c.currentConstruct&&c.currentConstruct.concrete)return S(T);a.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(wx,y,p)(T)}function y(T){return c&&M(),E(r),b(T)}function p(T){return a.parser.lazy[a.now().line]=r!==i.length,d=a.now().offset,S(T)}function b(T){return a.containerState={},e.attempt(wx,j,S)(T)}function j(T){return r++,i.push([a.currentConstruct,a.containerState]),b(T)}function S(T){if(T===null){c&&M(),E(0),e.consume(T);return}return c=c||a.parser.flow(a.now()),e.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return Ue(T)?(e.consume(T),C(e.exit("chunkFlow")),r=0,a.interrupt=void 0,f):(e.consume(T),k)}function C(T,_){const L=a.sliceStream(T);if(_&&L.push(null),T.previous=u,u&&(u.next=T),u=T,c.defineSkip(T.start),c.write(L),a.parser.lazy[T.start.line]){let A=c.events.length;for(;A--;)if(c.events[A][1].start.offset<d&&(!c.events[A][1].end||c.events[A][1].end.offset>d))return;const H=a.events.length;let I=H,q,D;for(;I--;)if(a.events[I][0]==="exit"&&a.events[I][1].type==="chunkFlow"){if(q){D=a.events[I][1].end;break}q=!0}for(E(r),A=H;A<a.events.length;)a.events[A][1].end={...D},A++;Ra(a.events,I+1,0,a.events.slice(H)),a.events.length=A}}function E(T){let _=i.length;for(;_-- >T;){const L=i[_];a.containerState=L[1],L[0].exit.call(a,e)}i.length=T}function M(){c.write([null]),u=void 0,c=void 0,a.containerState._closeFlow=void 0}}function FA(e,a,i){return mt(e,e.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function os(e){if(e===null||Tt(e)||io(e))return 1;if(sf(e))return 2}function cf(e,a,i){const r=[];let c=-1;for(;++c<e.length;){const u=e[c].resolveAll;u&&!r.includes(u)&&(a=u(a,i),r.push(u))}return a}const n0={name:"attention",resolveAll:VA,tokenize:$A};function VA(e,a){let i=-1,r,c,u,d,f,m,v,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(r=i;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&a.sliceSerialize(e[r][1]).charCodeAt(0)===a.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[r][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;m=e[r][1].end.offset-e[r][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[i][1].start};Sx(p,-m),Sx(b,m),d={type:m>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:b},u={type:m>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[i][1].start}},c={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[r][1].end={...d.start},e[i][1].start={...f.end},v=[],e[r][1].end.offset-e[r][1].start.offset&&(v=Fa(v,[["enter",e[r][1],a],["exit",e[r][1],a]])),v=Fa(v,[["enter",c,a],["enter",d,a],["exit",d,a],["enter",u,a]]),v=Fa(v,cf(a.parser.constructs.insideSpan.null,e.slice(r+1,i),a)),v=Fa(v,[["exit",u,a],["enter",f,a],["exit",f,a],["exit",c,a]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,v=Fa(v,[["enter",e[i][1],a],["exit",e[i][1],a]])):y=0,Ra(e,r-1,i-r+3,v),i=r+v.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function $A(e,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,c=os(r);let u;return d;function d(m){return u=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===u)return e.consume(m),f;const v=e.exit("attentionSequence"),y=os(m),p=!y||y===2&&c||i.includes(m),b=!c||c===2&&y||i.includes(r);return v._open=!!(u===42?p:p&&(c||!b)),v._close=!!(u===42?b:b&&(y||!p)),a(m)}}function Sx(e,a){e.column+=a,e.offset+=a,e._bufferIndex+=a}const GA={name:"autolink",tokenize:YA};function YA(e,a,i){let r=0;return c;function c(j){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(j){return Xn(j)?(e.consume(j),d):j===64?i(j):v(j)}function d(j){return j===43||j===45||j===46||In(j)?(r=1,f(j)):v(j)}function f(j){return j===58?(e.consume(j),r=0,m):(j===43||j===45||j===46||In(j))&&r++<32?(e.consume(j),f):(r=0,v(j))}function m(j){return j===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),a):j===null||j===32||j===60||Ld(j)?i(j):(e.consume(j),m)}function v(j){return j===64?(e.consume(j),y):LA(j)?(e.consume(j),v):i(j)}function y(j){return In(j)?p(j):i(j)}function p(j){return j===46?(e.consume(j),r=0,y):j===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(j),e.exit("autolinkMarker"),e.exit("autolink"),a):b(j)}function b(j){if((j===45||In(j))&&r++<63){const S=j===45?b:p;return e.consume(j),S}return i(j)}}const zc={partial:!0,tokenize:XA};function XA(e,a,i){return r;function r(u){return lt(u)?mt(e,c,"linePrefix")(u):c(u)}function c(u){return u===null||Ue(u)?a(u):i(u)}}const E3={continuation:{tokenize:QA},exit:ZA,name:"blockQuote",tokenize:KA};function KA(e,a,i){const r=this;return c;function c(d){if(d===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(d),e.exit("blockQuoteMarker"),u}return i(d)}function u(d){return lt(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),a):(e.exit("blockQuotePrefix"),a(d))}}function QA(e,a,i){const r=this;return c;function c(d){return lt(d)?mt(e,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(E3,a,i)(d)}}function ZA(e){e.exit("blockQuote")}const T3={name:"characterEscape",tokenize:JA};function JA(e,a,i){return r;function r(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),c}function c(u){return IA(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),a):i(u)}}const A3={name:"characterReference",tokenize:WA};function WA(e,a,i){const r=this;let c=0,u,d;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),m}function m(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),v):(e.enter("characterReferenceValue"),u=31,d=In,y(p))}function v(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=BA,y):(e.enter("characterReferenceValue"),u=7,d=t0,y(p))}function y(p){if(p===59&&c){const b=e.exit("characterReferenceValue");return d===In&&!og(r.sliceSerialize(b))?i(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),a)}return d(p)&&c++<u?(e.consume(p),y):i(p)}}const kx={partial:!0,tokenize:t_},Cx={concrete:!0,name:"codeFenced",tokenize:e_};function e_(e,a,i){const r=this,c={partial:!0,tokenize:L};let u=0,d=0,f;return m;function m(A){return v(A)}function v(A){const H=r.events[r.events.length-1];return u=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,f=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(A)}function y(A){return A===f?(d++,e.consume(A),y):d<3?i(A):(e.exit("codeFencedFenceSequence"),lt(A)?mt(e,p,"whitespace")(A):p(A))}function p(A){return A===null||Ue(A)?(e.exit("codeFencedFence"),r.interrupt?a(A):e.check(kx,k,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):lt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mt(e,j,"whitespace")(A)):A===96&&A===f?i(A):(e.consume(A),b)}function j(A){return A===null||Ue(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||Ue(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===f?i(A):(e.consume(A),S)}function k(A){return e.attempt(c,_,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return u>0&&lt(A)?mt(e,M,"linePrefix",u+1)(A):M(A)}function M(A){return A===null||Ue(A)?e.check(kx,k,_)(A):(e.enter("codeFlowValue"),T(A))}function T(A){return A===null||Ue(A)?(e.exit("codeFlowValue"),M(A)):(e.consume(A),T)}function _(A){return e.exit("codeFenced"),a(A)}function L(A,H,I){let q=0;return D;function D(P){return A.enter("lineEnding"),A.consume(P),A.exit("lineEnding"),$}function $(P){return A.enter("codeFencedFence"),lt(P)?mt(A,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):F(P)}function F(P){return P===f?(A.enter("codeFencedFenceSequence"),W(P)):I(P)}function W(P){return P===f?(q++,A.consume(P),W):q>=d?(A.exit("codeFencedFenceSequence"),lt(P)?mt(A,Y,"whitespace")(P):Y(P)):I(P)}function Y(P){return P===null||Ue(P)?(A.exit("codeFencedFence"),H(P)):I(P)}}}function t_(e,a,i){const r=this;return c;function c(d){return d===null?i(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u)}function u(d){return r.parser.lazy[r.now().line]?i(d):a(d)}}const tp={name:"codeIndented",tokenize:a_},n_={partial:!0,tokenize:i_};function a_(e,a,i){const r=this;return c;function c(v){return e.enter("codeIndented"),mt(e,u,"linePrefix",5)(v)}function u(v){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(v):i(v)}function d(v){return v===null?m(v):Ue(v)?e.attempt(n_,d,m)(v):(e.enter("codeFlowValue"),f(v))}function f(v){return v===null||Ue(v)?(e.exit("codeFlowValue"),d(v)):(e.consume(v),f)}function m(v){return e.exit("codeIndented"),a(v)}}function i_(e,a,i){const r=this;return c;function c(d){return r.parser.lazy[r.now().line]?i(d):Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):mt(e,u,"linePrefix",5)(d)}function u(d){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):Ue(d)?c(d):i(d)}}const r_={name:"codeText",previous:o_,resolve:l_,tokenize:s_};function l_(e){let a=e.length-4,i=3,r,c;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[a][1].type==="lineEnding"||e[a][1].type==="space")){for(r=i;++r<a;)if(e[r][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[a][1].type="codeTextPadding",i+=2,a-=2;break}}for(r=i-1,a++;++r<=a;)c===void 0?r!==a&&e[r][1].type!=="lineEnding"&&(c=r):(r===a||e[r][1].type==="lineEnding")&&(e[c][1].type="codeTextData",r!==c+2&&(e[c][1].end=e[r-1][1].end,e.splice(c+2,r-c-2),a-=r-c-2,r=c+2),c=void 0);return e}function o_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function s_(e,a,i){let r=0,c,u;return d;function d(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),r++,f):(e.exit("codeTextSequence"),m(p))}function m(p){return p===null?i(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),m):p===96?(u=e.enter("codeTextSequence"),c=0,y(p)):Ue(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("codeTextData"),v(p))}function v(p){return p===null||p===32||p===96||Ue(p)?(e.exit("codeTextData"),m(p)):(e.consume(p),v)}function y(p){return p===96?(e.consume(p),c++,y):c===r?(e.exit("codeTextSequence"),e.exit("codeText"),a(p)):(u.type="codeTextData",v(p))}}class c_{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(a,r):a>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(a,i,r){const c=i||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return r&&fc(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),fc(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),fc(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const i=this.left.splice(a,Number.POSITIVE_INFINITY);fc(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);fc(this.left,i.reverse())}}}function fc(e,a){let i=0;if(a.length<1e4)e.push(...a);else for(;i<a.length;)e.push(...a.slice(i,i+1e4)),i+=1e4}function _3(e){const a={};let i=-1,r,c,u,d,f,m,v;const y=new c_(e);for(;++i<y.length;){for(;i in a;)i=a[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=r[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(a,u_(y,i)),i=a[i],v=!0);else if(r[1]._container){for(u=i,c=void 0;u--;)if(d=y.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(c&&(y.get(c)[1].type="lineEndingBlank"),d[1].type="lineEnding",c=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;c&&(r[1].end={...y.get(c)[1].start},f=y.slice(c,i),f.unshift(r),y.splice(c,i-c+1,f))}}return Ra(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function u_(e,a){const i=e.get(a)[1],r=e.get(a)[2];let c=a-1;const u=[];let d=i._tokenizer;d||(d=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],v={};let y,p,b=-1,j=i,S=0,k=0;const C=[k];for(;j;){for(;e.get(++c)[1]!==j;);u.push(c),j._tokenizer||(y=r.sliceStream(j),j.next||y.push(null),p&&d.defineSkip(j.start),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),j._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),p=j,j=j.next}for(j=i;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(k=b+1,C.push(k),j._tokenizer=void 0,j.previous=void 0,j=j.next);for(d.events=[],j?(j._tokenizer=void 0,j.previous=void 0):C.pop(),b=C.length;b--;){const E=f.slice(C[b],C[b+1]),M=u.pop();m.push([M,M+E.length-1]),e.splice(M,2,E)}for(m.reverse(),b=-1;++b<m.length;)v[S+m[b][0]]=S+m[b][1],S+=m[b][1]-m[b][0]-1;return v}const d_={resolve:h_,tokenize:m_},f_={partial:!0,tokenize:p_};function h_(e){return _3(e),e}function m_(e,a){let i;return r;function r(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),c(f)}function c(f){return f===null?u(f):Ue(f)?e.check(f_,d,u)(f):(e.consume(f),c)}function u(f){return e.exit("chunkContent"),e.exit("content"),a(f)}function d(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,c}}function p_(e,a,i){const r=this;return c;function c(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),mt(e,u,"linePrefix")}function u(d){if(d===null||Ue(d))return i(d);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(d):e.interrupt(r.parser.constructs.flow,i,a)(d)}}function M3(e,a,i,r,c,u,d,f,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return p;function p(E){return E===60?(e.enter(r),e.enter(c),e.enter(u),e.consume(E),e.exit(u),b):E===null||E===32||E===41||Ld(E)?i(E):(e.enter(r),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function b(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(c),e.exit(r),a):(e.enter(f),e.enter("chunkString",{contentType:"string"}),j(E))}function j(E){return E===62?(e.exit("chunkString"),e.exit(f),b(E)):E===null||E===60||Ue(E)?i(E):(e.consume(E),E===92?S:j)}function S(E){return E===60||E===62||E===92?(e.consume(E),j):j(E)}function k(E){return!y&&(E===null||E===41||Tt(E))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(r),a(E)):y<v&&E===40?(e.consume(E),y++,k):E===41?(e.consume(E),y--,k):E===null||E===32||E===40||Ld(E)?i(E):(e.consume(E),E===92?C:k)}function C(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function R3(e,a,i,r,c,u){const d=this;let f=0,m;return v;function v(j){return e.enter(r),e.enter(c),e.consume(j),e.exit(c),e.enter(u),y}function y(j){return f>999||j===null||j===91||j===93&&!m||j===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?i(j):j===93?(e.exit(u),e.enter(c),e.consume(j),e.exit(c),e.exit(r),a):Ue(j)?(e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),p(j))}function p(j){return j===null||j===91||j===93||Ue(j)||f++>999?(e.exit("chunkString"),y(j)):(e.consume(j),m||(m=!lt(j)),j===92?b:p)}function b(j){return j===91||j===92||j===93?(e.consume(j),f++,p):p(j)}}function D3(e,a,i,r,c,u){let d;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(c),e.consume(b),e.exit(c),d=b===40?41:b,m):i(b)}function m(b){return b===d?(e.enter(c),e.consume(b),e.exit(c),e.exit(r),a):(e.enter(u),v(b))}function v(b){return b===d?(e.exit(u),m(d)):b===null?i(b):Ue(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),mt(e,v,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===d||b===null||Ue(b)?(e.exit("chunkString"),v(b)):(e.consume(b),b===92?p:y)}function p(b){return b===d||b===92?(e.consume(b),y):y(b)}}function pc(e,a){let i;return r;function r(c){return Ue(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i=!0,r):lt(c)?mt(e,r,i?"linePrefix":"lineSuffix")(c):a(c)}}const g_={name:"definition",tokenize:y_},v_={partial:!0,tokenize:x_};function y_(e,a,i){const r=this;let c;return u;function u(j){return e.enter("definition"),d(j)}function d(j){return R3.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(j)}function f(j){return c=li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),j===58?(e.enter("definitionMarker"),e.consume(j),e.exit("definitionMarker"),m):i(j)}function m(j){return Tt(j)?pc(e,v)(j):v(j)}function v(j){return M3(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(j)}function y(j){return e.attempt(v_,p,p)(j)}function p(j){return lt(j)?mt(e,b,"whitespace")(j):b(j)}function b(j){return j===null||Ue(j)?(e.exit("definition"),r.parser.defined.push(c),a(j)):i(j)}}function x_(e,a,i){return r;function r(f){return Tt(f)?pc(e,c)(f):i(f)}function c(f){return D3(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return lt(f)?mt(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Ue(f)?a(f):i(f)}}const b_={name:"hardBreakEscape",tokenize:j_};function j_(e,a,i){return r;function r(u){return e.enter("hardBreakEscape"),e.consume(u),c}function c(u){return Ue(u)?(e.exit("hardBreakEscape"),a(u)):i(u)}}const w_={name:"headingAtx",resolve:S_,tokenize:k_};function S_(e,a){let i=e.length-2,r=3,c,u;return e[r][1].type==="whitespace"&&(r+=2),i-2>r&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&e[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(c={type:"atxHeadingText",start:e[r][1].start,end:e[i][1].end},u={type:"chunkText",start:e[r][1].start,end:e[i][1].end,contentType:"text"},Ra(e,r,i-r+1,[["enter",c,a],["enter",u,a],["exit",u,a],["exit",c,a]])),e}function k_(e,a,i){let r=0;return c;function c(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&r++<6?(e.consume(y),d):y===null||Tt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||Ue(y)?(e.exit("atxHeading"),a(y)):lt(y)?mt(e,f,"whitespace")(y):(e.enter("atxHeadingText"),v(y))}function m(y){return y===35?(e.consume(y),m):(e.exit("atxHeadingSequence"),f(y))}function v(y){return y===null||y===35||Tt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),v)}}const C_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Nx=["pre","script","style","textarea"],N_={concrete:!0,name:"htmlFlow",resolveTo:A_,tokenize:__},E_={partial:!0,tokenize:R_},T_={partial:!0,tokenize:M_};function A_(e){let a=e.length;for(;a--&&!(e[a][0]==="enter"&&e[a][1].type==="htmlFlow"););return a>1&&e[a-2][1].type==="linePrefix"&&(e[a][1].start=e[a-2][1].start,e[a+1][1].start=e[a-2][1].start,e.splice(a-2,2)),e}function __(e,a,i){const r=this;let c,u,d,f,m;return v;function v(U){return y(U)}function y(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),p}function p(U){return U===33?(e.consume(U),b):U===47?(e.consume(U),u=!0,k):U===63?(e.consume(U),c=3,r.interrupt?a:z):Xn(U)?(e.consume(U),d=String.fromCharCode(U),C):i(U)}function b(U){return U===45?(e.consume(U),c=2,j):U===91?(e.consume(U),c=5,f=0,S):Xn(U)?(e.consume(U),c=4,r.interrupt?a:z):i(U)}function j(U){return U===45?(e.consume(U),r.interrupt?a:z):i(U)}function S(U){const G="CDATA[";return U===G.charCodeAt(f++)?(e.consume(U),f===G.length?r.interrupt?a:F:S):i(U)}function k(U){return Xn(U)?(e.consume(U),d=String.fromCharCode(U),C):i(U)}function C(U){if(U===null||U===47||U===62||Tt(U)){const G=U===47,fe=d.toLowerCase();return!G&&!u&&Nx.includes(fe)?(c=1,r.interrupt?a(U):F(U)):C_.includes(d.toLowerCase())?(c=6,G?(e.consume(U),E):r.interrupt?a(U):F(U)):(c=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(U):u?M(U):T(U))}return U===45||In(U)?(e.consume(U),d+=String.fromCharCode(U),C):i(U)}function E(U){return U===62?(e.consume(U),r.interrupt?a:F):i(U)}function M(U){return lt(U)?(e.consume(U),M):D(U)}function T(U){return U===47?(e.consume(U),D):U===58||U===95||Xn(U)?(e.consume(U),_):lt(U)?(e.consume(U),T):D(U)}function _(U){return U===45||U===46||U===58||U===95||In(U)?(e.consume(U),_):L(U)}function L(U){return U===61?(e.consume(U),A):lt(U)?(e.consume(U),L):T(U)}function A(U){return U===null||U===60||U===61||U===62||U===96?i(U):U===34||U===39?(e.consume(U),m=U,H):lt(U)?(e.consume(U),A):I(U)}function H(U){return U===m?(e.consume(U),m=null,q):U===null||Ue(U)?i(U):(e.consume(U),H)}function I(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Tt(U)?L(U):(e.consume(U),I)}function q(U){return U===47||U===62||lt(U)?T(U):i(U)}function D(U){return U===62?(e.consume(U),$):i(U)}function $(U){return U===null||Ue(U)?F(U):lt(U)?(e.consume(U),$):i(U)}function F(U){return U===45&&c===2?(e.consume(U),K):U===60&&c===1?(e.consume(U),R):U===62&&c===4?(e.consume(U),J):U===63&&c===3?(e.consume(U),z):U===93&&c===5?(e.consume(U),ne):Ue(U)&&(c===6||c===7)?(e.exit("htmlFlowData"),e.check(E_,ee,W)(U)):U===null||Ue(U)?(e.exit("htmlFlowData"),W(U)):(e.consume(U),F)}function W(U){return e.check(T_,Y,ee)(U)}function Y(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),P}function P(U){return U===null||Ue(U)?W(U):(e.enter("htmlFlowData"),F(U))}function K(U){return U===45?(e.consume(U),z):F(U)}function R(U){return U===47?(e.consume(U),d="",V):F(U)}function V(U){if(U===62){const G=d.toLowerCase();return Nx.includes(G)?(e.consume(U),J):F(U)}return Xn(U)&&d.length<8?(e.consume(U),d+=String.fromCharCode(U),V):F(U)}function ne(U){return U===93?(e.consume(U),z):F(U)}function z(U){return U===62?(e.consume(U),J):U===45&&c===2?(e.consume(U),z):F(U)}function J(U){return U===null||Ue(U)?(e.exit("htmlFlowData"),ee(U)):(e.consume(U),J)}function ee(U){return e.exit("htmlFlow"),a(U)}}function M_(e,a,i){const r=this;return c;function c(d){return Ue(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):i(d)}function u(d){return r.parser.lazy[r.now().line]?i(d):a(d)}}function R_(e,a,i){return r;function r(c){return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),e.attempt(zc,a,i)}}const D_={name:"htmlText",tokenize:O_};function O_(e,a,i){const r=this;let c,u,d;return f;function f(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),m}function m(z){return z===33?(e.consume(z),v):z===47?(e.consume(z),L):z===63?(e.consume(z),T):Xn(z)?(e.consume(z),I):i(z)}function v(z){return z===45?(e.consume(z),y):z===91?(e.consume(z),u=0,S):Xn(z)?(e.consume(z),M):i(z)}function y(z){return z===45?(e.consume(z),j):i(z)}function p(z){return z===null?i(z):z===45?(e.consume(z),b):Ue(z)?(d=p,R(z)):(e.consume(z),p)}function b(z){return z===45?(e.consume(z),j):p(z)}function j(z){return z===62?K(z):z===45?b(z):p(z)}function S(z){const J="CDATA[";return z===J.charCodeAt(u++)?(e.consume(z),u===J.length?k:S):i(z)}function k(z){return z===null?i(z):z===93?(e.consume(z),C):Ue(z)?(d=k,R(z)):(e.consume(z),k)}function C(z){return z===93?(e.consume(z),E):k(z)}function E(z){return z===62?K(z):z===93?(e.consume(z),E):k(z)}function M(z){return z===null||z===62?K(z):Ue(z)?(d=M,R(z)):(e.consume(z),M)}function T(z){return z===null?i(z):z===63?(e.consume(z),_):Ue(z)?(d=T,R(z)):(e.consume(z),T)}function _(z){return z===62?K(z):T(z)}function L(z){return Xn(z)?(e.consume(z),A):i(z)}function A(z){return z===45||In(z)?(e.consume(z),A):H(z)}function H(z){return Ue(z)?(d=H,R(z)):lt(z)?(e.consume(z),H):K(z)}function I(z){return z===45||In(z)?(e.consume(z),I):z===47||z===62||Tt(z)?q(z):i(z)}function q(z){return z===47?(e.consume(z),K):z===58||z===95||Xn(z)?(e.consume(z),D):Ue(z)?(d=q,R(z)):lt(z)?(e.consume(z),q):K(z)}function D(z){return z===45||z===46||z===58||z===95||In(z)?(e.consume(z),D):$(z)}function $(z){return z===61?(e.consume(z),F):Ue(z)?(d=$,R(z)):lt(z)?(e.consume(z),$):q(z)}function F(z){return z===null||z===60||z===61||z===62||z===96?i(z):z===34||z===39?(e.consume(z),c=z,W):Ue(z)?(d=F,R(z)):lt(z)?(e.consume(z),F):(e.consume(z),Y)}function W(z){return z===c?(e.consume(z),c=void 0,P):z===null?i(z):Ue(z)?(d=W,R(z)):(e.consume(z),W)}function Y(z){return z===null||z===34||z===39||z===60||z===61||z===96?i(z):z===47||z===62||Tt(z)?q(z):(e.consume(z),Y)}function P(z){return z===47||z===62||Tt(z)?q(z):i(z)}function K(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),a):i(z)}function R(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),V}function V(z){return lt(z)?mt(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):ne(z)}function ne(z){return e.enter("htmlTextData"),d(z)}}const sg={name:"labelEnd",resolveAll:I_,resolveTo:H_,tokenize:P_},z_={tokenize:U_},L_={tokenize:q_},B_={tokenize:F_};function I_(e){let a=-1;const i=[];for(;++a<e.length;){const r=e[a][1];if(i.push(e[a]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const c=r.type==="labelImage"?4:2;r.type="data",a+=c}}return e.length!==i.length&&Ra(e,0,e.length,i),e}function H_(e,a){let i=e.length,r=0,c,u,d,f;for(;i--;)if(c=e[i][1],u){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[i][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(d){if(e[i][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(u=i,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(d=i);const m={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},v={type:"label",start:{...e[u][1].start},end:{...e[d][1].end}},y={type:"labelText",start:{...e[u+r+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,a],["enter",v,a]],f=Fa(f,e.slice(u+1,u+r+3)),f=Fa(f,[["enter",y,a]]),f=Fa(f,cf(a.parser.constructs.insideSpan.null,e.slice(u+r+4,d-3),a)),f=Fa(f,[["exit",y,a],e[d-2],e[d-1],["exit",v,a]]),f=Fa(f,e.slice(d+1)),f=Fa(f,[["exit",m,a]]),Ra(e,u,e.length,f),e}function P_(e,a,i){const r=this;let c=r.events.length,u,d;for(;c--;)if((r.events[c][1].type==="labelImage"||r.events[c][1].type==="labelLink")&&!r.events[c][1]._balanced){u=r.events[c][1];break}return f;function f(b){return u?u._inactive?p(b):(d=r.parser.defined.includes(li(r.sliceSerialize({start:u.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),m):i(b)}function m(b){return b===40?e.attempt(z_,y,d?y:p)(b):b===91?e.attempt(L_,y,d?v:p)(b):d?y(b):p(b)}function v(b){return e.attempt(B_,y,p)(b)}function y(b){return a(b)}function p(b){return u._balanced=!0,i(b)}}function U_(e,a,i){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),c}function c(p){return Tt(p)?pc(e,u)(p):u(p)}function u(p){return p===41?y(p):M3(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function d(p){return Tt(p)?pc(e,m)(p):y(p)}function f(p){return i(p)}function m(p){return p===34||p===39||p===40?D3(e,v,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):y(p)}function v(p){return Tt(p)?pc(e,y)(p):y(p)}function y(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),a):i(p)}}function q_(e,a,i){const r=this;return c;function c(f){return R3.call(r,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return r.parser.defined.includes(li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(f):i(f)}function d(f){return i(f)}}function F_(e,a,i){return r;function r(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),c}function c(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),a):i(u)}}const V_={name:"labelStartImage",resolveAll:sg.resolveAll,tokenize:$_};function $_(e,a,i){const r=this;return c;function c(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),d):i(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):a(f)}}const G_={name:"labelStartLink",resolveAll:sg.resolveAll,tokenize:Y_};function Y_(e,a,i){const r=this;return c;function c(d){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelLink"),u}function u(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(d):a(d)}}const np={name:"lineEnding",tokenize:X_};function X_(e,a){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),mt(e,a,"linePrefix")}}const Nd={name:"thematicBreak",tokenize:K_};function K_(e,a,i){let r=0,c;return u;function u(v){return e.enter("thematicBreak"),d(v)}function d(v){return c=v,f(v)}function f(v){return v===c?(e.enter("thematicBreakSequence"),m(v)):r>=3&&(v===null||Ue(v))?(e.exit("thematicBreak"),a(v)):i(v)}function m(v){return v===c?(e.consume(v),r++,m):(e.exit("thematicBreakSequence"),lt(v)?mt(e,f,"whitespace")(v):f(v))}}const sa={continuation:{tokenize:W_},exit:tM,name:"list",tokenize:J_},Q_={partial:!0,tokenize:nM},Z_={partial:!0,tokenize:eM};function J_(e,a,i){const r=this,c=r.events[r.events.length-1];let u=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,d=0;return f;function f(j){const S=r.containerState.type||(j===42||j===43||j===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||j===r.containerState.marker:t0(j)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),j===42||j===45?e.check(Nd,i,v)(j):v(j);if(!r.interrupt||j===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(j)}return i(j)}function m(j){return t0(j)&&++d<10?(e.consume(j),m):(!r.interrupt||d<2)&&(r.containerState.marker?j===r.containerState.marker:j===41||j===46)?(e.exit("listItemValue"),v(j)):i(j)}function v(j){return e.enter("listItemMarker"),e.consume(j),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||j,e.check(zc,r.interrupt?i:y,e.attempt(Q_,b,p))}function y(j){return r.containerState.initialBlankLine=!0,u++,b(j)}function p(j){return lt(j)?(e.enter("listItemPrefixWhitespace"),e.consume(j),e.exit("listItemPrefixWhitespace"),b):i(j)}function b(j){return r.containerState.size=u+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,a(j)}}function W_(e,a,i){const r=this;return r.containerState._closeFlow=void 0,e.check(zc,c,u);function c(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mt(e,a,"listItemIndent",r.containerState.size+1)(f)}function u(f){return r.containerState.furtherBlankLines||!lt(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,d(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Z_,a,d)(f))}function d(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,mt(e,e.attempt(sa,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function eM(e,a,i){const r=this;return mt(e,c,"listItemIndent",r.containerState.size+1);function c(u){const d=r.events[r.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===r.containerState.size?a(u):i(u)}}function tM(e){e.exit(this.containerState.type)}function nM(e,a,i){const r=this;return mt(e,c,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(u){const d=r.events[r.events.length-1];return!lt(u)&&d&&d[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const Ex={name:"setextUnderline",resolveTo:aM,tokenize:iM};function aM(e,a){let i=e.length,r,c,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(c=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const d={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[c][1].type="setextHeadingText",u?(e.splice(c,0,["enter",d,a]),e.splice(u+1,0,["exit",e[r][1],a]),e[r][1].end={...e[u][1].end}):e[r][1]=d,e.push(["exit",d,a]),e}function iM(e,a,i){const r=this;let c;return u;function u(v){let y=r.events.length,p;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){p=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),c=v,d(v)):i(v)}function d(v){return e.enter("setextHeadingLineSequence"),f(v)}function f(v){return v===c?(e.consume(v),f):(e.exit("setextHeadingLineSequence"),lt(v)?mt(e,m,"lineSuffix")(v):m(v))}function m(v){return v===null||Ue(v)?(e.exit("setextHeadingLine"),a(v)):i(v)}}const rM={tokenize:lM};function lM(e){const a=this,i=e.attempt(zc,r,e.attempt(this.parser.constructs.flowInitial,c,mt(e,e.attempt(this.parser.constructs.flow,c,e.attempt(d_,c)),"linePrefix")));return i;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),a.currentConstruct=void 0,i}function c(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a.currentConstruct=void 0,i}}const oM={resolveAll:z3()},sM=O3("string"),cM=O3("text");function O3(e){return{resolveAll:z3(e==="text"?uM:void 0),tokenize:a};function a(i){const r=this,c=this.parser.constructs[e],u=i.attempt(c,d,f);return d;function d(y){return v(y)?u(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return v(y)?(i.exit("data"),u(y)):(i.consume(y),m)}function v(y){if(y===null)return!0;const p=c[y];let b=-1;if(p)for(;++b<p.length;){const j=p[b];if(!j.previous||j.previous.call(r,r.previous))return!0}return!1}}}function z3(e){return a;function a(i,r){let c=-1,u;for(;++c<=i.length;)u===void 0?i[c]&&i[c][1].type==="data"&&(u=c,c++):(!i[c]||i[c][1].type!=="data")&&(c!==u+2&&(i[u][1].end=i[c-1][1].end,i.splice(u+2,c-u-2),c=u+2),u=void 0);return e?e(i,r):i}}function uM(e,a){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const r=e[i-1][1],c=a.sliceStream(r);let u=c.length,d=-1,f=0,m;for(;u--;){const v=c[u];if(typeof v=="string"){for(d=v.length;v.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(v===-2)m=!0,f++;else if(v!==-1){u++;break}}if(a._contentTypeTextTrailing&&i===e.length&&(f=0),f){const v={type:i===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?d:r.start._bufferIndex+d,_index:r.start._index+u,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...v.start},r.start.offset===r.end.offset?Object.assign(r,v):(e.splice(i,0,["enter",v,a],["exit",v,a]),i+=2)}i++}return e}const dM={42:sa,43:sa,45:sa,48:sa,49:sa,50:sa,51:sa,52:sa,53:sa,54:sa,55:sa,56:sa,57:sa,62:E3},fM={91:g_},hM={[-2]:tp,[-1]:tp,32:tp},mM={35:w_,42:Nd,45:[Ex,Nd],60:N_,61:Ex,95:Nd,96:Cx,126:Cx},pM={38:A3,92:T3},gM={[-5]:np,[-4]:np,[-3]:np,33:V_,38:A3,42:n0,60:[GA,D_],91:G_,92:[b_,T3],93:sg,95:n0,96:r_},vM={null:[n0,oM]},yM={null:[42,95]},xM={null:[]},bM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:yM,contentInitial:fM,disable:xM,document:dM,flow:mM,flowInitial:hM,insideSpan:vM,string:pM,text:gM},Symbol.toStringTag,{value:"Module"}));function jM(e,a,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const c={},u=[];let d=[],f=[];const m={attempt:H(L),check:H(A),consume:M,enter:T,exit:_,interrupt:H(A,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:j,write:p};let y=a.tokenize.call(v,m);return a.resolveAll&&u.push(a),v;function p($){return d=Fa(d,$),C(),d[d.length-1]!==null?[]:(I(a,0),v.events=cf(u,v.events,v),v.events)}function b($,F){return SM(j($),F)}function j($){return wM(d,$)}function S(){const{_bufferIndex:$,_index:F,line:W,column:Y,offset:P}=r;return{_bufferIndex:$,_index:F,line:W,column:Y,offset:P}}function k($){c[$.line]=$.column,D()}function C(){let $;for(;r._index<d.length;){const F=d[r._index];if(typeof F=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<F.length;)E(F.charCodeAt(r._bufferIndex));else E(F)}}function E($){y=y($)}function M($){Ue($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,D()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===d[r._index].length&&(r._bufferIndex=-1,r._index++)),v.previous=$}function T($,F){const W=F||{};return W.type=$,W.start=S(),v.events.push(["enter",W,v]),f.push(W),W}function _($){const F=f.pop();return F.end=S(),v.events.push(["exit",F,v]),F}function L($,F){I($,F.from)}function A($,F){F.restore()}function H($,F){return W;function W(Y,P,K){let R,V,ne,z;return Array.isArray(Y)?ee(Y):"tokenize"in Y?ee([Y]):J(Y);function J(xe){return je;function je(ue){const be=ue!==null&&xe[ue],le=ue!==null&&xe.null,se=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(le)?le:le?[le]:[]];return ee(se)(ue)}}function ee(xe){return R=xe,V=0,xe.length===0?K:U(xe[V])}function U(xe){return je;function je(ue){return z=q(),ne=xe,xe.partial||(v.currentConstruct=xe),xe.name&&v.parser.constructs.disable.null.includes(xe.name)?fe():xe.tokenize.call(F?Object.assign(Object.create(v),F):v,m,G,fe)(ue)}}function G(xe){return $(ne,z),P}function fe(xe){return z.restore(),++V<R.length?U(R[V]):K}}}function I($,F){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&Ra(v.events,F,v.events.length-F,$.resolve(v.events.slice(F),v)),$.resolveTo&&(v.events=$.resolveTo(v.events,v))}function q(){const $=S(),F=v.previous,W=v.currentConstruct,Y=v.events.length,P=Array.from(f);return{from:Y,restore:K};function K(){r=$,v.previous=F,v.currentConstruct=W,v.events.length=Y,f=P,D()}}function D(){r.line in c&&r.column<2&&(r.column=c[r.line],r.offset+=c[r.line]-1)}}function wM(e,a){const i=a.start._index,r=a.start._bufferIndex,c=a.end._index,u=a.end._bufferIndex;let d;if(i===c)d=[e[i].slice(r,u)];else{if(d=e.slice(i,c),r>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(r):d.shift()}u>0&&d.push(e[c].slice(0,u))}return d}function SM(e,a){let i=-1;const r=[];let c;for(;++i<e.length;){const u=e[i];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
511
+ `;break}case-3:{d=`\r
512
+ `;break}case-2:{d=a?" ":" ";break}case-1:{if(!a&&c)continue;d=" ";break}default:d=String.fromCharCode(u)}c=u===-2,r.push(d)}return r.join("")}function kM(e){const r={constructs:C3([bM,...(e||{}).extensions||[]]),content:c(HA),defined:[],document:c(UA),flow:c(rM),lazy:{},string:c(sM),text:c(cM)};return r;function c(u){return d;function d(f){return jM(r,u,f)}}}function CM(e){for(;!_3(e););return e}const Tx=/[\0\t\n\r]/g;function NM(){let e=1,a="",i=!0,r;return c;function c(u,d,f){const m=[];let v,y,p,b,j;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),p=0,a="",i&&(u.charCodeAt(0)===65279&&p++,i=void 0);p<u.length;){if(Tx.lastIndex=p,v=Tx.exec(u),b=v&&v.index!==void 0?v.index:u.length,j=u.charCodeAt(b),!v){a=u.slice(p);break}if(j===10&&p===b&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),p<b&&(m.push(u.slice(p,b)),e+=b-p),j){case 0:{m.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,m.push(-2);e++<y;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return f&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const EM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TM(e){return e.replace(EM,AM)}function AM(e,a,i){if(a)return a;if(i.charCodeAt(0)===35){const c=i.charCodeAt(1),u=c===120||c===88;return N3(i.slice(u?2:1),u?16:10)}return og(i)||e}const L3={}.hasOwnProperty;function _M(e,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),MM(i)(CM(kM(i).document().write(NM()(e,a,!0))))}function MM(e){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Vt),autolinkProtocol:q,autolinkEmail:q,atxHeading:u(Ve),blockQuote:u(le),characterEscape:q,characterReference:q,codeFenced:u(se),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(se,d),codeText:u(me,d),codeTextData:q,data:q,codeFlowValue:q,definition:u(Te),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(Le),hardBreakEscape:u(pt),hardBreakTrailing:u(pt),htmlFlow:u(tt,d),htmlFlowData:q,htmlText:u(tt,d),htmlTextData:q,image:u(We),label:d,link:u(Vt),listItem:u(yn),listItemValue:b,listOrdered:u(vn,p),listUnordered:u(vn),paragraph:u(Pn),reference:U,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Ve),strong:u(ha),thematicBreak:u(Xa)},exit:{atxHeading:m(),atxHeadingSequence:L,autolink:m(),autolinkEmail:be,autolinkProtocol:ue,blockQuote:m(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:xe,characterReference:je,codeFenced:m(C),codeFencedFence:k,codeFencedFenceInfo:j,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:m(E),codeText:m(P),codeTextData:D,data:D,definition:m(),definitionDestinationString:_,definitionLabelString:M,definitionTitleString:T,emphasis:m(),hardBreakEscape:m(F),hardBreakTrailing:m(F),htmlFlow:m(W),htmlFlowData:D,htmlText:m(Y),htmlTextData:D,image:m(R),label:ne,labelText:V,lineEnding:$,link:m(K),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:G,resourceDestinationString:z,resourceTitleString:J,resource:ee,setextHeading:m(I),setextHeadingLineSequence:H,setextHeadingText:A,strong:m(),thematicBreak:m()}};B3(a,(e||{}).mdastExtensions||[]);const i={};return r;function r(pe){let Ce={type:"root",children:[]};const He={stack:[Ce],tokenStack:[],config:a,enter:f,exit:v,buffer:d,resume:y,data:i},qe=[];let et=-1;for(;++et<pe.length;)if(pe[et][1].type==="listOrdered"||pe[et][1].type==="listUnordered")if(pe[et][0]==="enter")qe.push(et);else{const Pt=qe.pop();et=c(pe,Pt,et)}for(et=-1;++et<pe.length;){const Pt=a[pe[et][0]];L3.call(Pt,pe[et][1].type)&&Pt[pe[et][1].type].call(Object.assign({sliceSerialize:pe[et][2].sliceSerialize},He),pe[et][1])}if(He.tokenStack.length>0){const Pt=He.tokenStack[He.tokenStack.length-1];(Pt[1]||Ax).call(He,void 0,Pt[0])}for(Ce.position={start:el(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:el(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<a.transforms.length;)Ce=a.transforms[et](Ce)||Ce;return Ce}function c(pe,Ce,He){let qe=Ce-1,et=-1,Pt=!1,xn,Ut,Rn,Un;for(;++qe<=He;){const Dt=pe[qe];switch(Dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Dt[0]==="enter"?et++:et--,Un=void 0;break}case"lineEndingBlank":{Dt[0]==="enter"&&(xn&&!Un&&!et&&!Rn&&(Rn=qe),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!et&&Dt[0]==="enter"&&Dt[1].type==="listItemPrefix"||et===-1&&Dt[0]==="exit"&&(Dt[1].type==="listUnordered"||Dt[1].type==="listOrdered")){if(xn){let Dn=qe;for(Ut=void 0;Dn--;){const Ye=pe[Dn];if(Ye[1].type==="lineEnding"||Ye[1].type==="lineEndingBlank"){if(Ye[0]==="exit")continue;Ut&&(pe[Ut][1].type="lineEndingBlank",Pt=!0),Ye[1].type="lineEnding",Ut=Dn}else if(!(Ye[1].type==="linePrefix"||Ye[1].type==="blockQuotePrefix"||Ye[1].type==="blockQuotePrefixWhitespace"||Ye[1].type==="blockQuoteMarker"||Ye[1].type==="listItemIndent"))break}Rn&&(!Ut||Rn<Ut)&&(xn._spread=!0),xn.end=Object.assign({},Ut?pe[Ut][1].start:Dt[1].end),pe.splice(Ut||qe,0,["exit",xn,Dt[2]]),qe++,He++}if(Dt[1].type==="listItemPrefix"){const Dn={type:"listItem",_spread:!1,start:Object.assign({},Dt[1].start),end:void 0};xn=Dn,pe.splice(qe,0,["enter",Dn,Dt[2]]),qe++,He++,Rn=void 0,Un=!0}}}return pe[Ce][1]._spread=Pt,He}function u(pe,Ce){return He;function He(qe){f.call(this,pe(qe),qe),Ce&&Ce.call(this,qe)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(pe,Ce,He){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([Ce,He||void 0]),pe.position={start:el(Ce.start),end:void 0}}function m(pe){return Ce;function Ce(He){pe&&pe.call(this,He),v.call(this,He)}}function v(pe,Ce){const He=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==pe.type&&(Ce?Ce.call(this,pe,qe[0]):(qe[1]||Ax).call(this,pe,qe[0]));else throw new Error("Cannot close `"+pe.type+"` ("+mc({start:pe.start,end:pe.end})+"): it’s not open");He.position.end=el(pe.end)}function y(){return lg(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(pe){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function j(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=pe}function S(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=pe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=pe.replace(/(\r?\n|\r)$/g,"")}function M(pe){const Ce=this.resume(),He=this.stack[this.stack.length-1];He.label=Ce,He.identifier=li(this.sliceSerialize(pe)).toLowerCase()}function T(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=pe}function _(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=pe}function L(pe){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const He=this.sliceSerialize(pe).length;Ce.depth=He}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function H(pe){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function q(pe){const He=this.stack[this.stack.length-1].children;let qe=He[He.length-1];(!qe||qe.type!=="text")&&(qe=rn(),qe.position={start:el(pe.start),end:void 0},He.push(qe)),this.stack.push(qe)}function D(pe){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(pe),Ce.position.end=el(pe.end)}function $(pe){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=Ce.children[Ce.children.length-1];He.position.end=el(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(Ce.type)&&(q.call(this,pe),D.call(this,pe))}function F(){this.data.atHardBreak=!0}function W(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=pe}function Y(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=pe}function P(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=pe}function K(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=Ce,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function R(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=Ce,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function V(pe){const Ce=this.sliceSerialize(pe),He=this.stack[this.stack.length-2];He.label=TM(Ce),He.identifier=li(Ce).toLowerCase()}function ne(){const pe=this.stack[this.stack.length-1],Ce=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const qe=pe.children;He.children=qe}else He.alt=Ce}function z(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=pe}function J(){const pe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=pe}function ee(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function G(pe){const Ce=this.resume(),He=this.stack[this.stack.length-1];He.label=Ce,He.identifier=li(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function fe(pe){this.data.characterReferenceType=pe.type}function xe(pe){const Ce=this.sliceSerialize(pe),He=this.data.characterReferenceType;let qe;He?(qe=N3(Ce,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=og(Ce);const et=this.stack[this.stack.length-1];et.value+=qe}function je(pe){const Ce=this.stack.pop();Ce.position.end=el(pe.end)}function ue(pe){D.call(this,pe);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(pe)}function be(pe){D.call(this,pe);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(pe)}function le(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function me(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Le(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function pt(){return{type:"break"}}function tt(){return{type:"html",value:""}}function We(){return{type:"image",title:null,url:"",alt:null}}function Vt(){return{type:"link",title:null,url:"",children:[]}}function vn(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function yn(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function Pn(){return{type:"paragraph",children:[]}}function ha(){return{type:"strong",children:[]}}function rn(){return{type:"text",value:""}}function Xa(){return{type:"thematicBreak"}}}function el(e){return{line:e.line,column:e.column,offset:e.offset}}function B3(e,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?B3(e,r):RM(e,r)}}function RM(e,a){let i;for(i in a)if(L3.call(a,i))switch(i){case"canContainEols":{const r=a[i];r&&e[i].push(...r);break}case"transforms":{const r=a[i];r&&e[i].push(...r);break}case"enter":case"exit":{const r=a[i];r&&Object.assign(e[i],r);break}}}function Ax(e,a){throw e?new Error("Cannot close `"+e.type+"` ("+mc({start:e.start,end:e.end})+"): a different token (`"+a.type+"`, "+mc({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+mc({start:a.start,end:a.end})+") is still open")}function DM(e){const a=this;a.parser=i;function i(r){return _M(r,{...a.data("settings"),...e,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function OM(e,a){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(a),!0)};return e.patch(a,i),e.applyData(a,i)}function zM(e,a){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(a,i),[e.applyData(a,i),{type:"text",value:`
513
+ `}]}function LM(e,a){const i=a.value?a.value+`
514
+ `:"",r={},c=a.lang?a.lang.split(/\s+/):[];c.length>0&&(r.className=["language-"+c[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return a.meta&&(u.data={meta:a.meta}),e.patch(a,u),u=e.applyData(a,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(a,u),u}function BM(e,a){const i={type:"element",tagName:"del",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function IM(e,a){const i={type:"element",tagName:"em",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function HM(e,a){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),c=ps(r.toLowerCase()),u=e.footnoteOrder.indexOf(r);let d,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),d=e.footnoteOrder.length):d=u+1,f+=1,e.footnoteCounts.set(r,f);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+c,id:i+"fnref-"+c+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(a,m);const v={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(a,v),e.applyData(a,v)}function PM(e,a){const i={type:"element",tagName:"h"+a.depth,properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function UM(e,a){if(e.options.allowDangerousHtml){const i={type:"raw",value:a.value};return e.patch(a,i),e.applyData(a,i)}}function I3(e,a){const i=a.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+r}];const c=e.all(a),u=c[0];u&&u.type==="text"?u.value="["+u.value:c.unshift({type:"text",value:"["});const d=c[c.length-1];return d&&d.type==="text"?d.value+=r:c.push({type:"text",value:r}),c}function qM(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return I3(e,a);const c={src:ps(r.url||""),alt:a.alt};r.title!==null&&r.title!==void 0&&(c.title=r.title);const u={type:"element",tagName:"img",properties:c,children:[]};return e.patch(a,u),e.applyData(a,u)}function FM(e,a){const i={src:ps(a.url)};a.alt!==null&&a.alt!==void 0&&(i.alt=a.alt),a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(a,r),e.applyData(a,r)}function VM(e,a){const i={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};e.patch(a,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(a,r),e.applyData(a,r)}function $M(e,a){const i=String(a.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return I3(e,a);const c={href:ps(r.url||"")};r.title!==null&&r.title!==void 0&&(c.title=r.title);const u={type:"element",tagName:"a",properties:c,children:e.all(a)};return e.patch(a,u),e.applyData(a,u)}function GM(e,a){const i={href:ps(a.url)};a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"a",properties:i,children:e.all(a)};return e.patch(a,r),e.applyData(a,r)}function YM(e,a,i){const r=e.all(a),c=i?XM(i):H3(a),u={},d=[];if(typeof a.checked=="boolean"){const y=r[0];let p;y&&y.type==="element"&&y.tagName==="p"?p=y:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const y=r[f];(c||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
515
+ `}),y.type==="element"&&y.tagName==="p"&&!c?d.push(...y.children):d.push(y)}const m=r[r.length-1];m&&(c||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
516
+ `});const v={type:"element",tagName:"li",properties:u,children:d};return e.patch(a,v),e.applyData(a,v)}function XM(e){let a=!1;if(e.type==="list"){a=e.spread||!1;const i=e.children;let r=-1;for(;!a&&++r<i.length;)a=H3(i[r])}return a}function H3(e){const a=e.spread;return a??e.children.length>1}function KM(e,a){const i={},r=e.all(a);let c=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++c<r.length;){const d=r[c];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:a.ordered?"ol":"ul",properties:i,children:e.wrap(r,!0)};return e.patch(a,u),e.applyData(a,u)}function QM(e,a){const i={type:"element",tagName:"p",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function ZM(e,a){const i={type:"root",children:e.wrap(e.all(a))};return e.patch(a,i),e.applyData(a,i)}function JM(e,a){const i={type:"element",tagName:"strong",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}function WM(e,a){const i=e.all(a),r=i.shift(),c=[];if(r){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(a.children[0],d),c.push(d)}if(i.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=ng(a.children[1]),m=y3(a.children[a.children.length-1]);f&&m&&(d.position={start:f,end:m}),c.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(c,!0)};return e.patch(a,u),e.applyData(a,u)}function eR(e,a,i){const r=i?i.children:void 0,u=(r?r.indexOf(a):1)===0?"th":"td",d=i&&i.type==="table"?i.align:void 0,f=d?d.length:a.children.length;let m=-1;const v=[];for(;++m<f;){const p=a.children[m],b={},j=d?d[m]:void 0;j&&(b.align=j);let S={type:"element",tagName:u,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),v.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(v,!0)};return e.patch(a,y),e.applyData(a,y)}function tR(e,a){const i={type:"element",tagName:"td",properties:{},children:e.all(a)};return e.patch(a,i),e.applyData(a,i)}const _x=9,Mx=32;function nR(e){const a=String(e),i=/\r?\n|\r/g;let r=i.exec(a),c=0;const u=[];for(;r;)u.push(Rx(a.slice(c,r.index),c>0,!0),r[0]),c=r.index+r[0].length,r=i.exec(a);return u.push(Rx(a.slice(c),c>0,!1)),u.join("")}function Rx(e,a,i){let r=0,c=e.length;if(a){let u=e.codePointAt(r);for(;u===_x||u===Mx;)r++,u=e.codePointAt(r)}if(i){let u=e.codePointAt(c-1);for(;u===_x||u===Mx;)c--,u=e.codePointAt(c-1)}return c>r?e.slice(r,c):""}function aR(e,a){const i={type:"text",value:nR(String(a.value))};return e.patch(a,i),e.applyData(a,i)}function iR(e,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(a,i),e.applyData(a,i)}const rR={blockquote:OM,break:zM,code:LM,delete:BM,emphasis:IM,footnoteReference:HM,heading:PM,html:UM,imageReference:qM,image:FM,inlineCode:VM,linkReference:$M,link:GM,listItem:YM,list:KM,paragraph:QM,root:ZM,strong:JM,table:WM,tableCell:tR,tableRow:eR,text:aR,thematicBreak:iR,toml:dd,yaml:dd,definition:dd,footnoteDefinition:dd};function dd(){}const P3=-1,uf=0,gc=1,Bd=2,cg=3,ug=4,dg=5,fg=6,U3=7,q3=8,{defineProperty:lR}=Object,F3=typeof self=="object"?self:globalThis,Dx=(e,a)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new F3[e](a)},oR=(e,a)=>{const i=(c,u)=>(e.set(u,c),c),r=c=>{if(e.has(c))return e.get(c);const[u,d]=a[c];switch(u){case uf:case P3:return i(d,c);case gc:{const f=i([],c);for(const m of d)f.push(r(m));return f}case Bd:{const f=i({},c);for(const[m,v]of d){const y=r(m),p=r(v);y==="__proto__"?lR(f,y,{value:p,configurable:!0,enumerable:!0,writable:!0}):f[y]=p}return f}case cg:return i(new Date(d),c);case ug:{const{source:f,flags:m}=d;return i(new RegExp(f,m),c)}case dg:{const f=i(new Map,c);for(const[m,v]of d)f.set(r(m),r(v));return f}case fg:{const f=i(new Set,c);for(const m of d)f.add(r(m));return f}case U3:{const{name:f,message:m}=d;return i(typeof F3[f]=="function"?Dx(f,m):new Error(m),c)}case q3:return i(BigInt(d),c);case"BigInt":return i(Object(BigInt(d)),c);case"ArrayBuffer":return i(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return i(new DataView(f),d)}case"-0":return-0}return i(Dx(u,d),c)};return r},Ox=e=>oR(new Map,e)(0),Yl="",{toString:sR}={},{keys:cR,is:uR}=Object,hc=e=>{const a=typeof e;if(a!=="object"||!e)return[uf,a];const i=sR.call(e).slice(8,-1);switch(i){case"Array":return[gc,Yl];case"Object":return[Bd,Yl];case"Date":return[cg,Yl];case"RegExp":return[ug,Yl];case"Map":return[dg,Yl];case"Set":return[fg,Yl];case"DataView":return[gc,i]}return i.includes("Array")?[gc,i]:e instanceof Error?[U3,e.name||"Error"]:[Bd,i]},fd=([e,a])=>e===uf&&(a==="function"||a==="symbol"),dR=(e,a,i,r)=>{const c=(d,f)=>{const m=r.push(d)-1;return i.set(f,m),m},u=d=>{if(i.has(d))return i.get(d);let[f,m]=hc(d);switch(f){case uf:{let y=d;switch(m){case"bigint":f=q3,y=d.toString();break;case"number":if(!d&&uR(d,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return c([P3],d)}return c([f,y],d)}case gc:{if(m){let b=d;return m==="DataView"?b=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(b=new Uint8Array(d)),c([m,[...b]],d)}const y=[],p=c([f,y],d);for(const b of d)y.push(u(b));return p}case Bd:{if(m)switch(m){case"BigInt":return c([m,d.toString()],d);case"Boolean":case"Number":case"String":return c([m,d.valueOf()],d)}if(a&&"toJSON"in d)return u(d.toJSON());const y=[],p=c([f,y],d);for(const b of cR(d))(e||!fd(hc(d[b])))&&y.push([u(b),u(d[b])]);return p}case cg:return c([f,isNaN(d.getTime())?Yl:d.toISOString()],d);case ug:{const{source:y,flags:p}=d;return c([f,{source:y,flags:p}],d)}case dg:{const y=[],p=c([f,y],d);for(const[b,j]of d)(e||!(fd(hc(b))||fd(hc(j))))&&y.push([u(b),u(j)]);return p}case fg:{const y=[],p=c([f,y],d);for(const b of d)(e||!fd(hc(b)))&&y.push(u(b));return p}}const{message:v}=d;return c([f,{name:m,message:v}],d)};return u},zx=(e,{json:a,lossy:i}={})=>{const r=[];return dR(!(a||i),!!a,new Map,r)(e),r},Id=typeof structuredClone=="function"?(e,a)=>a&&("json"in a||"lossy"in a)?Ox(zx(e,a)):structuredClone(e):(e,a)=>Ox(zx(e,a));function fR(e,a){const i=[{type:"text",value:"↩"}];return a>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),i}function hR(e,a){return"Back to reference "+(e+1)+(a>1?"-"+a:"")}function mR(e){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||fR,r=e.options.footnoteBackLabel||hR,c=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",d=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const v=e.footnoteById.get(e.footnoteOrder[m]);if(!v)continue;const y=e.all(v),p=String(v.identifier).toUpperCase(),b=ps(p.toLowerCase());let j=0;const S=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++j<=k;){S.length>0&&S.push({type:"text",value:" "});let M=typeof i=="string"?i:i(m,j);typeof M=="string"&&(M={type:"text",value:M}),S.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+b+(j>1?"-"+j:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(m,j),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=y[y.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...S)}else y.push(...S);const E={type:"element",tagName:"li",properties:{id:a+"fn-"+b},children:e.wrap(y,!0)};e.patch(v,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Id(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
517
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
518
+ `}]}}const df=(function(e){if(e==null)return yR;if(typeof e=="function")return ff(e);if(typeof e=="object")return Array.isArray(e)?pR(e):gR(e);if(typeof e=="string")return vR(e);throw new Error("Expected function, string, or object as test")});function pR(e){const a=[];let i=-1;for(;++i<e.length;)a[i]=df(e[i]);return ff(r);function r(...c){let u=-1;for(;++u<a.length;)if(a[u].apply(this,c))return!0;return!1}}function gR(e){const a=e;return ff(i);function i(r){const c=r;let u;for(u in e)if(c[u]!==a[u])return!1;return!0}}function vR(e){return ff(a);function a(i){return i&&i.type===e}}function ff(e){return a;function a(i,r,c){return!!(xR(i)&&e.call(this,i,typeof r=="number"?r:void 0,c||void 0))}}function yR(){return!0}function xR(e){return e!==null&&typeof e=="object"&&"type"in e}const V3=[],bR=!0,a0=!1,jR="skip";function $3(e,a,i,r){let c;typeof a=="function"&&typeof i!="function"?(r=i,i=a):c=a;const u=df(c),d=r?-1:1;f(e,void 0,[])();function f(m,v,y){const p=m&&typeof m=="object"?m:{};if(typeof p.type=="string"){const j=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(m.type+(j?"<"+j+">":""))+")"})}return b;function b(){let j=V3,S,k,C;if((!a||u(m,v,y[y.length-1]||void 0))&&(j=wR(i(m,y)),j[0]===a0))return j;if("children"in m&&m.children){const E=m;if(E.children&&j[0]!==jR)for(k=(r?E.children.length:-1)+d,C=y.concat(E);k>-1&&k<E.children.length;){const M=E.children[k];if(S=f(M,k,C)(),S[0]===a0)return S;k=typeof S[1]=="number"?S[1]:k+d}}return j}}}function wR(e){return Array.isArray(e)?e:typeof e=="number"?[bR,e]:e==null?V3:[e]}function hg(e,a,i,r){let c,u,d;typeof a=="function"&&typeof i!="function"?(u=void 0,d=a,c=i):(u=a,d=i,c=r),$3(e,u,f,c);function f(m,v){const y=v[v.length-1],p=y?y.children.indexOf(m):void 0;return d(m,p,y)}}const i0={}.hasOwnProperty,SR={};function kR(e,a){const i=a||SR,r=new Map,c=new Map,u=new Map,d={...rR,...i.handlers},f={all:v,applyData:NR,definitionById:r,footnoteById:c,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:i,patch:CR,wrap:TR};return hg(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const p=y.type==="definition"?r:c,b=String(y.identifier).toUpperCase();p.has(b)||p.set(b,y)}}),f;function m(y,p){const b=y.type,j=f.handlers[b];if(i0.call(f.handlers,b)&&j)return j(f,y,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in y){const{children:k,...C}=y,E=Id(C);return E.children=f.all(y),E}return Id(y)}return(f.options.unknownHandler||ER)(f,y,p)}function v(y){const p=[];if("children"in y){const b=y.children;let j=-1;for(;++j<b.length;){const S=f.one(b[j],y);if(S){if(j&&b[j-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Lx(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=Lx(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function CR(e,a){e.position&&(a.position=dA(e))}function NR(e,a){let i=a;if(e&&e.data){const r=e.data.hName,c=e.data.hChildren,u=e.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const d="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:d}}i.type==="element"&&u&&Object.assign(i.properties,Id(u)),"children"in i&&i.children&&c!==null&&c!==void 0&&(i.children=c)}return i}function ER(e,a){const i=a.data||{},r="value"in a&&!(i0.call(i,"hProperties")||i0.call(i,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:e.all(a)};return e.patch(a,r),e.applyData(a,r)}function TR(e,a){const i=[];let r=-1;for(a&&i.push({type:"text",value:`
519
+ `});++r<e.length;)r&&i.push({type:"text",value:`
520
+ `}),i.push(e[r]);return a&&e.length>0&&i.push({type:"text",value:`
521
+ `}),i}function Lx(e){let a=0,i=e.charCodeAt(a);for(;i===9||i===32;)a++,i=e.charCodeAt(a);return e.slice(a)}function Bx(e,a){const i=kR(e,a),r=i.one(e,void 0),c=mR(i),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return c&&u.children.push({type:"text",value:`
522
+ `},c),u}function AR(e,a){return e&&"run"in e?async function(i,r){const c=Bx(i,{file:r,...a});await e.run(c,r)}:function(i,r){return Bx(i,{file:r,...e||a})}}function Ix(e){if(e)throw e}var ap,Hx;function _R(){if(Hx)return ap;Hx=1;var e=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,c=function(v){return typeof Array.isArray=="function"?Array.isArray(v):a.call(v)==="[object Array]"},u=function(v){if(!v||a.call(v)!=="[object Object]")return!1;var y=e.call(v,"constructor"),p=v.constructor&&v.constructor.prototype&&e.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!p)return!1;var b;for(b in v);return typeof b>"u"||e.call(v,b)},d=function(v,y){i&&y.name==="__proto__"?i(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},f=function(v,y){if(y==="__proto__")if(e.call(v,y)){if(r)return r(v,y).value}else return;return v[y]};return ap=function m(){var v,y,p,b,j,S,k=arguments[0],C=1,E=arguments.length,M=!1;for(typeof k=="boolean"&&(M=k,k=arguments[1]||{},C=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});C<E;++C)if(v=arguments[C],v!=null)for(y in v)p=f(k,y),b=f(v,y),k!==b&&(M&&b&&(u(b)||(j=c(b)))?(j?(j=!1,S=p&&c(p)?p:[]):S=p&&u(p)?p:{},d(k,{name:y,newValue:m(M,S,b)})):typeof b<"u"&&d(k,{name:y,newValue:b}));return k},ap}var MR=_R();const ip=h0(MR);function r0(e){if(typeof e!="object"||e===null)return!1;const a=Object.getPrototypeOf(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function RR(){const e=[],a={run:i,use:r};return a;function i(...c){let u=-1;const d=c.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...c);function f(m,...v){const y=e[++u];let p=-1;if(m){d(m);return}for(;++p<c.length;)(v[p]===null||v[p]===void 0)&&(v[p]=c[p]);c=v,y?DR(y,f)(...v):d(null,...v)}}function r(c){if(typeof c!="function")throw new TypeError("Expected `middelware` to be a function, not "+c);return e.push(c),a}}function DR(e,a){let i;return r;function r(...d){const f=e.length>d.length;let m;f&&d.push(c);try{m=e.apply(this,d)}catch(v){const y=v;if(f&&i)throw y;return c(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,c):m instanceof Error?c(m):u(m))}function c(d,...f){i||(i=!0,a(d,...f))}function u(d){c(null,d)}}const Ri={basename:OR,dirname:zR,extname:LR,join:BR,sep:"/"};function OR(e,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Lc(e);let i=0,r=-1,c=e.length,u;if(a===void 0||a.length===0||a.length>e.length){for(;c--;)if(e.codePointAt(c)===47){if(u){i=c+1;break}}else r<0&&(u=!0,r=c+1);return r<0?"":e.slice(i,r)}if(a===e)return"";let d=-1,f=a.length-1;for(;c--;)if(e.codePointAt(c)===47){if(u){i=c+1;break}}else d<0&&(u=!0,d=c+1),f>-1&&(e.codePointAt(c)===a.codePointAt(f--)?f<0&&(r=c):(f=-1,r=d));return i===r?r=d:r<0&&(r=e.length),e.slice(i,r)}function zR(e){if(Lc(e),e.length===0)return".";let a=-1,i=e.length,r;for(;--i;)if(e.codePointAt(i)===47){if(r){a=i;break}}else r||(r=!0);return a<0?e.codePointAt(0)===47?"/":".":a===1&&e.codePointAt(0)===47?"//":e.slice(0,a)}function LR(e){Lc(e);let a=e.length,i=-1,r=0,c=-1,u=0,d;for(;a--;){const f=e.codePointAt(a);if(f===47){if(d){r=a+1;break}continue}i<0&&(d=!0,i=a+1),f===46?c<0?c=a:u!==1&&(u=1):c>-1&&(u=-1)}return c<0||i<0||u===0||u===1&&c===i-1&&c===r+1?"":e.slice(c,i)}function BR(...e){let a=-1,i;for(;++a<e.length;)Lc(e[a]),e[a]&&(i=i===void 0?e[a]:i+"/"+e[a]);return i===void 0?".":IR(i)}function IR(e){Lc(e);const a=e.codePointAt(0)===47;let i=HR(e,!a);return i.length===0&&!a&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),a?"/"+i:i}function HR(e,a){let i="",r=0,c=-1,u=0,d=-1,f,m;for(;++d<=e.length;){if(d<e.length)f=e.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(c===d-1||u===1))if(c!==d-1&&u===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",r=0):(i=i.slice(0,m),r=i.length-1-i.lastIndexOf("/")),c=d,u=0;continue}}else if(i.length>0){i="",r=0,c=d,u=0;continue}}a&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+e.slice(c+1,d):i=e.slice(c+1,d),r=d-c-1;c=d,u=0}else f===46&&u>-1?u++:u=-1}return i}function Lc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const PR={cwd:UR};function UR(){return"/"}function l0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qR(e){if(typeof e=="string")e=new URL(e);else if(!l0(e)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(e.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return FR(e)}function FR(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const a=e.pathname;let i=-1;for(;++i<a.length;)if(a.codePointAt(i)===37&&a.codePointAt(i+1)===50){const r=a.codePointAt(i+2);if(r===70||r===102){const c=new TypeError("File URL path must not include encoded / characters");throw c.code="ERR_INVALID_FILE_URL_PATH",c}}return decodeURIComponent(a)}const rp=["history","path","basename","stem","extname","dirname"];class G3{constructor(a){let i;a?l0(a)?i={path:a}:typeof a=="string"||VR(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":PR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rp.length;){const u=rp[r];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let c;for(c in i)rp.includes(c)||(this[c]=i[c])}get basename(){return typeof this.path=="string"?Ri.basename(this.path):void 0}set basename(a){op(a,"basename"),lp(a,"basename"),this.path=Ri.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?Ri.dirname(this.path):void 0}set dirname(a){Px(this.basename,"dirname"),this.path=Ri.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?Ri.extname(this.path):void 0}set extname(a){if(lp(a,"extname"),Px(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ri.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){l0(a)&&(a=qR(a)),op(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?Ri.basename(this.path,this.extname):void 0}set stem(a){op(a,"stem"),lp(a,"stem"),this.path=Ri.join(this.dirname||"",a+(this.extname||""))}fail(a,i,r){const c=this.message(a,i,r);throw c.fatal=!0,c}info(a,i,r){const c=this.message(a,i,r);return c.fatal=void 0,c}message(a,i,r){const c=new Hn(a,i,r);return this.path&&(c.name=this.path+":"+c.name,c.file=this.path),c.fatal=!1,this.messages.push(c),c}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function lp(e,a){if(e&&e.includes(Ri.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+Ri.sep+"`")}function op(e,a){if(!e)throw new Error("`"+a+"` cannot be empty")}function Px(e,a){if(!e)throw new Error("Setting `"+a+"` requires `path` to be set too")}function VR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $R=(function(e){const r=this.constructor.prototype,c=r[e],u=function(){return c.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),GR={}.hasOwnProperty;class mg extends $R{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=RR()}copy(){const a=new mg;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(ip(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(up("data",this.frozen),this.namespace[a]=i,this):GR.call(this.namespace,a)&&this.namespace[a]||void 0:a?(up("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const c=i.call(a,...r);typeof c=="function"&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=hd(a),r=this.parser||this.Parser;return sp("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),sp("process",this.parser||this.Parser),cp("process",this.compiler||this.Compiler),i?c(void 0,i):new Promise(c);function c(u,d){const f=hd(a),m=r.parse(f);r.run(m,f,function(y,p,b){if(y||!p||!b)return v(y);const j=p,S=r.stringify(j,b);KR(S)?b.value=S:b.result=S,v(y,b)});function v(y,p){y||!p?d(y):u?u(p):i(void 0,p)}}}processSync(a){let i=!1,r;return this.freeze(),sp("processSync",this.parser||this.Parser),cp("processSync",this.compiler||this.Compiler),this.process(a,c),qx("processSync","process",i),r;function c(u,d){i=!0,Ix(u),r=d}}run(a,i,r){Ux(a),this.freeze();const c=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?u(void 0,r):new Promise(u);function u(d,f){const m=hd(i);c.run(a,m,v);function v(y,p,b){const j=p||a;y?f(y):d?d(j):r(void 0,j,b)}}}runSync(a,i){let r=!1,c;return this.run(a,i,u),qx("runSync","run",r),c;function u(d,f){Ix(d),c=f,r=!0}}stringify(a,i){this.freeze();const r=hd(i),c=this.compiler||this.Compiler;return cp("stringify",c),Ux(a),c(a,r)}use(a,...i){const r=this.attachers,c=this.namespace;if(up("use",this.frozen),a!=null)if(typeof a=="function")m(a,i);else if(typeof a=="object")Array.isArray(a)?f(a):d(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function u(v){if(typeof v=="function")m(v,[]);else if(typeof v=="object")if(Array.isArray(v)){const[y,...p]=v;m(y,p)}else d(v);else throw new TypeError("Expected usable value, not `"+v+"`")}function d(v){if(!("plugins"in v)&&!("settings"in v))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(v.plugins),v.settings&&(c.settings=ip(!0,c.settings,v.settings))}function f(v){let y=-1;if(v!=null)if(Array.isArray(v))for(;++y<v.length;){const p=v[y];u(p)}else throw new TypeError("Expected a list of plugins, not `"+v+"`")}function m(v,y){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===v){b=p;break}if(b===-1)r.push([v,...y]);else if(y.length>0){let[j,...S]=y;const k=r[b][1];r0(k)&&r0(j)&&(j=ip(!0,k,j)),r[b]=[v,j,...S]}}}}const YR=new mg().freeze();function sp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cp(e,a){if(typeof a!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function up(e,a){if(a)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ux(e){if(!r0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qx(e,a,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+a+"` instead")}function hd(e){return XR(e)?e:new G3(e)}function XR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function KR(e){return typeof e=="string"||QR(e)}function QR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ZR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Fx=[],Vx={allowDangerousHtml:!0},JR=/^(https?|ircs?|mailto|xmpp)$/i,WR=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function eD(e){const a=tD(e),i=nD(e);return aD(a.runSync(a.parse(i),i),e)}function tD(e){const a=e.rehypePlugins||Fx,i=e.remarkPlugins||Fx,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Vx}:Vx;return YR().use(DM).use(i).use(AR,r).use(a)}function nD(e){const a=e.children||"",i=new G3;return typeof a=="string"&&(i.value=a),i}function aD(e,a){const i=a.allowedElements,r=a.allowElement,c=a.components,u=a.disallowedElements,d=a.skipHtml,f=a.unwrapDisallowed,m=a.urlTransform||iD;for(const y of WR)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+ZR+y.id,void 0);return hg(e,v),gA(e,{Fragment:o.Fragment,components:c,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function v(y,p,b){if(y.type==="raw"&&b&&typeof p=="number")return d?b.children.splice(p,1):b.children[p]={type:"text",value:y.value},p;if(y.type==="element"){let j;for(j in ep)if(Object.hasOwn(ep,j)&&Object.hasOwn(y.properties,j)){const S=y.properties[j],k=ep[j];(k===null||k.includes(y.tagName))&&(y.properties[j]=m(String(S||""),j,y))}}if(y.type==="element"){let j=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!j&&r&&typeof p=="number"&&(j=!r(y,p,b)),j&&b&&typeof p=="number")return f&&y.children?b.children.splice(p,1,...y.children):b.children.splice(p,1),p}}}function iD(e){const a=e.indexOf(":"),i=e.indexOf("?"),r=e.indexOf("#"),c=e.indexOf("/");return a===-1||c!==-1&&a>c||i!==-1&&a>i||r!==-1&&a>r||JR.test(e.slice(0,a))?e:""}function rD(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Y3(e,a,i){const c=df((i||{}).ignore||[]),u=lD(a);let d=-1;for(;++d<u.length;)$3(e,"text",f);function f(v,y){let p=-1,b;for(;++p<y.length;){const j=y[p],S=b?b.children:void 0;if(c(j,S?S.indexOf(j):void 0,b))return;b=j}if(b)return m(v,y)}function m(v,y){const p=y[y.length-1],b=u[d][0],j=u[d][1];let S=0;const C=p.children.indexOf(v);let E=!1,M=[];b.lastIndex=0;let T=b.exec(v.value);for(;T;){const _=T.index,L={index:T.index,input:T.input,stack:[...y,v]};let A=j(...T,L);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(S!==_&&M.push({type:"text",value:v.value.slice(S,_)}),Array.isArray(A)?M.push(...A):A&&M.push(A),S=_+T[0].length,E=!0),!b.global)break;T=b.exec(v.value)}return E?(S<v.value.length&&M.push({type:"text",value:v.value.slice(S)}),p.children.splice(C,1,...M)):M=[v],C+M.length}}function lD(e){const a=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<i.length;){const c=i[r];a.push([oD(c[0]),sD(c[1])])}return a}function oD(e){return typeof e=="string"?new RegExp(rD(e),"g"):e}function sD(e){return typeof e=="function"?e:function(){return e}}function cD(e){Y3(e,[/\r?\n|\r/g,uD])}function uD(){return{type:"break"}}function dD(){return function(e){cD(e)}}const fD=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,hD=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function mD(e){var r;const a=((r=e.children)==null?void 0:r.length)===1?e.children[0]:void 0;if((a==null?void 0:a.type)!=="text"||!a.value)return;const i=a.value;return e.url===i||e.url===`http://${i}`||e.url===`mailto:${i}`?i:void 0}function X3(e,a){return{type:"link",url:e,children:[{type:"text",value:a}]}}function pD(e){const a=[];let i=0;for(const r of e.matchAll(hD))r.index>i&&a.push({type:"text",value:e.slice(i,r.index)}),a.push(X3(r[0],r[0])),i=r.index+r[0].length;return i<e.length&&a.push({type:"text",value:e.slice(i)}),a}function K3(e){const a=e.children;if(a)for(let i=0;i<a.length;i++){const r=a[i];if(r.type!=="link"){K3(r);continue}const c=mD(r),u=c===void 0?-1:c.search(fD);if(c===void 0||u<=0)continue;const d=c.slice(0,u),f=r.url.slice(0,r.url.length-c.length),m=pD(c.slice(u));a.splice(i,1,X3(f+d,d),...m),i+=m.length}}function gD(){return e=>K3(e)}function $x(e,a){const i=String(e);if(typeof a!="string")throw new TypeError("Expected character");let r=0,c=i.indexOf(a);for(;c!==-1;)r++,c=i.indexOf(a,c+a.length);return r}const dp="phrasing",fp=["autolink","link","image","label"];function vD(){return{transforms:[kD],enter:{literalAutolink:xD,literalAutolinkEmail:hp,literalAutolinkHttp:hp,literalAutolinkWww:hp},exit:{literalAutolink:SD,literalAutolinkEmail:wD,literalAutolinkHttp:bD,literalAutolinkWww:jD}}}function yD(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dp,notInConstruct:fp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dp,notInConstruct:fp},{character:":",before:"[ps]",after:"\\/",inConstruct:dp,notInConstruct:fp}]}}function xD(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hp(e){this.config.enter.autolinkProtocol.call(this,e)}function bD(e){this.config.exit.autolinkProtocol.call(this,e)}function jD(e){this.config.exit.data.call(this,e);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(e)}function wD(e){this.config.exit.autolinkEmail.call(this,e)}function SD(e){this.exit(e)}function kD(e){Y3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CD],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ND]],{ignore:["link","linkReference"]})}function CD(e,a,i,r,c){let u="";if(!Q3(c)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!ED(i)))return!1;const d=TD(i+r);if(!d[0])return!1;const f={type:"link",title:null,url:u+a+d[0],children:[{type:"text",value:a+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function ND(e,a,i,r){return!Q3(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function ED(e){const a=e.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function TD(e){const a=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!a)return[e,void 0];e=e.slice(0,a.index);let i=a[0],r=i.indexOf(")");const c=$x(e,"(");let u=$x(e,")");for(;r!==-1&&c>u;)e+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),u++;return[e,i]}function Q3(e,a){const i=e.input.charCodeAt(e.index-1);return(e.index===0||io(i)||sf(i))&&(!a||i!==47)}Z3.peek=BD;function AD(){this.buffer()}function _D(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function MD(){this.buffer()}function RD(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DD(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=li(this.sliceSerialize(e)).toLowerCase(),i.label=a}function OD(e){this.exit(e)}function zD(e){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=li(this.sliceSerialize(e)).toLowerCase(),i.label=a}function LD(e){this.exit(e)}function BD(){return"["}function Z3(e,a,i,r){const c=i.createTracker(r);let u=c.move("[^");const d=i.enter("footnoteReference"),f=i.enter("reference");return u+=c.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),d(),u+=c.move("]"),u}function ID(){return{enter:{gfmFootnoteCallString:AD,gfmFootnoteCall:_D,gfmFootnoteDefinitionLabelString:MD,gfmFootnoteDefinition:RD},exit:{gfmFootnoteCallString:DD,gfmFootnoteCall:OD,gfmFootnoteDefinitionLabelString:zD,gfmFootnoteDefinition:LD}}}function HD(e){let a=!1;return e&&e.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:Z3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,c,u,d){const f=u.createTracker(d);let m=f.move("[^");const v=u.enter("footnoteDefinition"),y=u.enter("label");return m+=f.move(u.safe(u.associationId(r),{before:m,after:"]"})),y(),m+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),m+=f.move((a?`
523
+ `:" ")+u.indentLines(u.containerFlow(r,f.current()),a?J3:PD))),v(),m}}function PD(e,a,i){return a===0?e:J3(e,a,i)}function J3(e,a,i){return(i?"":" ")+e}const UD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];W3.peek=GD;function qD(){return{canContainEols:["delete"],enter:{strikethrough:VD},exit:{strikethrough:$D}}}function FD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:UD}],handlers:{delete:W3}}}function VD(e){this.enter({type:"delete",children:[]},e)}function $D(e){this.exit(e)}function W3(e,a,i,r){const c=i.createTracker(r),u=i.enter("strikethrough");let d=c.move("~~");return d+=i.containerPhrasing(e,{...c.current(),before:d,after:"~"}),d+=c.move("~~"),u(),d}function GD(){return"~"}function YD(e){return e.length}function XD(e,a){const i=a||{},r=(i.align||[]).concat(),c=i.stringLength||YD,u=[],d=[],f=[],m=[];let v=0,y=-1;for(;++y<e.length;){const k=[],C=[];let E=-1;for(e[y].length>v&&(v=e[y].length);++E<e[y].length;){const M=KD(e[y][E]);if(i.alignDelimiters!==!1){const T=c(M);C[E]=T,(m[E]===void 0||T>m[E])&&(m[E]=T)}k.push(M)}d[y]=k,f[y]=C}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<v;)u[p]=Gx(r[p]);else{const k=Gx(r);for(;++p<v;)u[p]=k}p=-1;const b=[],j=[];for(;++p<v;){const k=u[p];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let M=i.alignDelimiters===!1?1:Math.max(1,m[p]-C.length-E.length);const T=C+"-".repeat(M)+E;i.alignDelimiters!==!1&&(M=C.length+M+E.length,M>m[p]&&(m[p]=M),j[p]=M),b[p]=T}d.splice(1,0,b),f.splice(1,0,j),y=-1;const S=[];for(;++y<d.length;){const k=d[y],C=f[y];p=-1;const E=[];for(;++p<v;){const M=k[p]||"";let T="",_="";if(i.alignDelimiters!==!1){const L=m[p]-(C[p]||0),A=u[p];A===114?T=" ".repeat(L):A===99?L%2?(T=" ".repeat(L/2+.5),_=" ".repeat(L/2-.5)):(T=" ".repeat(L/2),_=T):_=" ".repeat(L)}i.delimiterStart!==!1&&!p&&E.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&M==="")&&(i.delimiterStart!==!1||p)&&E.push(" "),i.alignDelimiters!==!1&&E.push(T),E.push(M),i.alignDelimiters!==!1&&E.push(_),i.padding!==!1&&E.push(" "),(i.delimiterEnd!==!1||p!==v-1)&&E.push("|")}S.push(i.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
524
+ `)}function KD(e){return e==null?"":String(e)}function Gx(e){const a=typeof e=="string"?e.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function QD(e,a,i,r){const c=i.enter("blockquote"),u=i.createTracker(r);u.move("> "),u.shift(2);const d=i.indentLines(i.containerFlow(e,u.current()),ZD);return c(),d}function ZD(e,a,i){return">"+(i?"":" ")+e}function JD(e,a){return Yx(e,a.inConstruct,!0)&&!Yx(e,a.notInConstruct,!1)}function Yx(e,a,i){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return i;let r=-1;for(;++r<a.length;)if(e.includes(a[r]))return!0;return!1}function Xx(e,a,i,r){let c=-1;for(;++c<i.unsafe.length;)if(i.unsafe[c].character===`
525
+ `&&JD(i.stack,i.unsafe[c]))return/[ \t]/.test(r.before)?"":" ";return`\\
526
+ `}function WD(e,a){const i=String(e);let r=i.indexOf(a),c=r,u=0,d=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===c?++u>d&&(d=u):u=1,c=r+a.length,r=i.indexOf(a,c);return d}function eO(e,a){return!!(a.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function tO(e){const a=e.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function nO(e,a,i,r){const c=tO(i),u=e.value||"",d=c==="`"?"GraveAccent":"Tilde";if(eO(e,i)){const p=i.enter("codeIndented"),b=i.indentLines(u,aO);return p(),b}const f=i.createTracker(r),m=c.repeat(Math.max(WD(u,c)+1,3)),v=i.enter("codeFenced");let y=f.move(m);if(e.lang){const p=i.enter(`codeFencedLang${d}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=i.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
527
+ `,encode:["`"],...f.current()})),p()}return y+=f.move(`
528
+ `),u&&(y+=f.move(u+`
529
+ `)),y+=f.move(m),v(),y}function aO(e,a,i){return(i?"":" ")+e}function pg(e){const a=e.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function iO(e,a,i,r){const c=pg(i),u=c==='"'?"Quote":"Apostrophe",d=i.enter("definition");let f=i.enter("label");const m=i.createTracker(r);let v=m.move("[");return v+=m.move(i.safe(i.associationId(e),{before:v,after:"]",...m.current()})),v+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(i.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=i.enter("destinationRaw"),v+=m.move(i.safe(e.url,{before:v,after:e.title?" ":`
530
+ `,...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(i.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),d(),v}function rO(e){const a=e.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Cc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Hd(e,a,i){const r=os(e),c=os(a);return r===void 0?c===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:c===void 0?{inside:!1,outside:!1}:c===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}eS.peek=lO;function eS(e,a,i,r){const c=rO(i),u=i.enter("emphasis"),d=i.createTracker(r),f=d.move(c);let m=d.move(i.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=Hd(r.before.charCodeAt(r.before.length-1),v,c);y.inside&&(m=Cc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=Hd(r.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+Cc(p));const j=d.move(c);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function lO(e,a,i){return i.options.emphasis||"*"}function oO(e,a){let i=!1;return hg(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,a0}),!!((!e.depth||e.depth<3)&&lg(e)&&(a.options.setext||i))}function sO(e,a,i,r){const c=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(r);if(oO(e,i)){const y=i.enter("headingSetext"),p=i.enter("phrasing"),b=i.containerPhrasing(e,{...u.current(),before:`
531
+ `,after:`
532
+ `});return p(),y(),b+`
533
+ `+(c===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
534
+ `))+1))}const d="#".repeat(c),f=i.enter("headingAtx"),m=i.enter("phrasing");u.move(d+" ");let v=i.containerPhrasing(e,{before:"# ",after:`
535
+ `,...u.current()});return/^[\t ]/.test(v)&&(v=Cc(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,i.options.closeAtx&&(v+=" "+d),m(),f(),v}tS.peek=cO;function tS(e){return e.value||""}function cO(){return"<"}nS.peek=uO;function nS(e,a,i,r){const c=pg(i),u=c==='"'?"Quote":"Apostrophe",d=i.enter("image");let f=i.enter("label");const m=i.createTracker(r);let v=m.move("![");return v+=m.move(i.safe(e.alt,{before:v,after:"]",...m.current()})),v+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(i.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=i.enter("destinationRaw"),v+=m.move(i.safe(e.url,{before:v,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=i.enter(`title${u}`),v+=m.move(" "+c),v+=m.move(i.safe(e.title,{before:v,after:c,...m.current()})),v+=m.move(c),f()),v+=m.move(")"),d(),v}function uO(){return"!"}aS.peek=dO;function aS(e,a,i,r){const c=e.referenceType,u=i.enter("imageReference");let d=i.enter("label");const f=i.createTracker(r);let m=f.move("![");const v=i.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=i.stack;i.stack=[],d=i.enter("reference");const p=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function dO(){return"!"}iS.peek=fO;function iS(e,a,i){let r=e.value||"",c="`",u=-1;for(;new RegExp("(^|[^`])"+c+"([^`]|$)").test(r);)c+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<i.unsafe.length;){const d=i.unsafe[u],f=i.compilePattern(d);let m;if(d.atBreak)for(;m=f.exec(r);){let v=m.index;r.charCodeAt(v)===10&&r.charCodeAt(v-1)===13&&v--,r=r.slice(0,v)+" "+r.slice(m.index+1)}}return c+r+c}function fO(){return"`"}function rS(e,a){const i=lg(e);return!!(!a.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}lS.peek=hO;function lS(e,a,i,r){const c=pg(i),u=c==='"'?"Quote":"Apostrophe",d=i.createTracker(r);let f,m;if(rS(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let p=d.move("<");return p+=d.move(i.containerPhrasing(e,{before:p,after:">",...d.current()})),p+=d.move(">"),f(),i.stack=y,p}f=i.enter("link"),m=i.enter("label");let v=d.move("[");return v+=d.move(i.containerPhrasing(e,{before:v,after:"](",...d.current()})),v+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=i.enter("destinationLiteral"),v+=d.move("<"),v+=d.move(i.safe(e.url,{before:v,after:">",...d.current()})),v+=d.move(">")):(m=i.enter("destinationRaw"),v+=d.move(i.safe(e.url,{before:v,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=i.enter(`title${u}`),v+=d.move(" "+c),v+=d.move(i.safe(e.title,{before:v,after:c,...d.current()})),v+=d.move(c),m()),v+=d.move(")"),f(),v}function hO(e,a,i){return rS(e,i)?"<":"["}oS.peek=mO;function oS(e,a,i,r){const c=e.referenceType,u=i.enter("linkReference");let d=i.enter("label");const f=i.createTracker(r);let m=f.move("[");const v=i.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=i.stack;i.stack=[],d=i.enter("reference");const p=i.safe(i.associationId(e),{before:m,after:"]",...f.current()});return d(),i.stack=y,u(),c==="full"||!v||v!==p?m+=f.move(p+"]"):c==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function mO(){return"["}function gg(e){const a=e.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function pO(e){const a=gg(e),i=e.options.bulletOther;if(!i)return a==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+i+"`) to be different");return i}function gO(e){const a=e.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function sS(e){const a=e.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function vO(e,a,i,r){const c=i.enter("list"),u=i.bulletCurrent;let d=e.ordered?gO(i):gg(i);const f=e.ordered?d==="."?")":".":pO(i);let m=a&&i.bulletLastUsed?d===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(m=!0),sS(i)===d&&y){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=f),i.bulletCurrent=d;const v=i.containerFlow(e,r);return i.bulletLastUsed=d,i.bulletCurrent=u,c(),v}function yO(e){const a=e.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw new Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function xO(e,a,i,r){const c=yO(i);let u=i.bulletCurrent||gg(i);a&&a.type==="list"&&a.ordered&&(u=(typeof a.start=="number"&&a.start>-1?a.start:1)+(i.options.incrementListMarker===!1?0:a.children.indexOf(e))+u);let d=u.length+1;(c==="tab"||c==="mixed"&&(a&&a.type==="list"&&a.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=i.createTracker(r);f.move(u+" ".repeat(d-u.length)),f.shift(d);const m=i.enter("listItem"),v=i.indentLines(i.containerFlow(e,f.current()),y);return m(),v;function y(p,b,j){return b?(j?"":" ".repeat(d))+p:(j?u:u+" ".repeat(d-u.length))+p}}function bO(e,a,i,r){const c=i.enter("paragraph"),u=i.enter("phrasing"),d=i.containerPhrasing(e,r);return u(),c(),d}const jO=df(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wO(e,a,i,r){return(e.children.some(function(d){return jO(d)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function SO(e){const a=e.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}cS.peek=kO;function cS(e,a,i,r){const c=SO(i),u=i.enter("strong"),d=i.createTracker(r),f=d.move(c+c);let m=d.move(i.containerPhrasing(e,{after:c,before:f,...d.current()}));const v=m.charCodeAt(0),y=Hd(r.before.charCodeAt(r.before.length-1),v,c);y.inside&&(m=Cc(v)+m.slice(1));const p=m.charCodeAt(m.length-1),b=Hd(r.after.charCodeAt(0),p,c);b.inside&&(m=m.slice(0,-1)+Cc(p));const j=d.move(c+c);return u(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},f+m+j}function kO(e,a,i){return i.options.strong||"*"}function CO(e,a,i,r){return i.safe(e.value,r)}function NO(e){const a=e.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function EO(e,a,i){const r=(sS(i)+(i.options.ruleSpaces?" ":"")).repeat(NO(i));return i.options.ruleSpaces?r.slice(0,-1):r}const uS={blockquote:QD,break:Xx,code:nO,definition:iO,emphasis:eS,hardBreak:Xx,heading:sO,html:tS,image:nS,imageReference:aS,inlineCode:iS,link:lS,linkReference:oS,list:vO,listItem:xO,paragraph:bO,root:wO,strong:cS,text:CO,thematicBreak:EO};function TO(){return{enter:{table:AO,tableData:Kx,tableHeader:Kx,tableRow:MO},exit:{codeText:RO,table:_O,tableData:mp,tableHeader:mp,tableRow:mp}}}function AO(e){const a=e._align;this.enter({type:"table",align:a.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function _O(e){this.exit(e),this.data.inTable=void 0}function MO(e){this.enter({type:"tableRow",children:[]},e)}function mp(e){this.exit(e)}function Kx(e){this.enter({type:"tableCell",children:[]},e)}function RO(e){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,DO));const i=this.stack[this.stack.length-1];i.type,i.value=a,this.exit(e)}function DO(e,a){return a==="|"?a:e}function OO(e){const a=e||{},i=a.tableCellPadding,r=a.tablePipeAlign,c=a.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
536
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:d,tableCell:m,tableRow:f}};function d(j,S,k,C){return v(y(j,k,C),j.align)}function f(j,S,k,C){const E=p(j,k,C),M=v([E]);return M.slice(0,M.indexOf(`
537
+ `))}function m(j,S,k,C){const E=k.enter("tableCell"),M=k.enter("phrasing"),T=k.containerPhrasing(j,{...C,before:u,after:u});return M(),E(),T}function v(j,S){return XD(j,{align:S,alignDelimiters:r,padding:i,stringLength:c})}function y(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("table");for(;++E<C.length;)M[E]=p(C[E],S,k);return T(),M}function p(j,S,k){const C=j.children;let E=-1;const M=[],T=S.enter("tableRow");for(;++E<C.length;)M[E]=m(C[E],j,S,k);return T(),M}function b(j,S,k){let C=uS.inlineCode(j,S,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function zO(){return{exit:{taskListCheckValueChecked:Qx,taskListCheckValueUnchecked:Qx,paragraph:BO}}}function LO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:IO}}}function Qx(e){const a=this.stack[this.stack.length-2];a.type,a.checked=e.type==="taskListCheckValueChecked"}function BO(e){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const c=a.children;let u=-1,d;for(;++u<c.length;){const f=c[u];if(f.type==="paragraph"){d=f;break}}d===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function IO(e,a,i,r){const c=e.children[0],u=typeof e.checked=="boolean"&&c&&c.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=i.createTracker(r);u&&f.move(d);let m=uS.listItem(e,a,i,{...r,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,v)),m;function v(y){return y+d}}function HO(){return[vD(),ID(),qD(),TO(),zO()]}function PO(e){return{extensions:[yD(),HD(e),FD(),OO(e),LO()]}}const UO={tokenize:YO,partial:!0},dS={tokenize:XO,partial:!0},fS={tokenize:KO,partial:!0},hS={tokenize:QO,partial:!0},qO={tokenize:ZO,partial:!0},mS={name:"wwwAutolink",tokenize:$O,previous:gS},pS={name:"protocolAutolink",tokenize:GO,previous:vS},jr={name:"emailAutolink",tokenize:VO,previous:yS},Gi={};function FO(){return{text:Gi}}let Vl=48;for(;Vl<123;)Gi[Vl]=jr,Vl++,Vl===58?Vl=65:Vl===91&&(Vl=97);Gi[43]=jr;Gi[45]=jr;Gi[46]=jr;Gi[95]=jr;Gi[72]=[jr,pS];Gi[104]=[jr,pS];Gi[87]=[jr,mS];Gi[119]=[jr,mS];function VO(e,a,i){const r=this;let c,u;return d;function d(p){return!o0(p)||!yS.call(r,r.previous)||vg(r.events)?i(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return o0(p)?(e.consume(p),f):p===64?(e.consume(p),m):i(p)}function m(p){return p===46?e.check(qO,y,v)(p):p===45||p===95||In(p)?(u=!0,e.consume(p),m):y(p)}function v(p){return e.consume(p),c=!0,m}function y(p){return u&&c&&Xn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),a(p)):i(p)}}function $O(e,a,i){const r=this;return c;function c(d){return d!==87&&d!==119||!gS.call(r,r.previous)||vg(r.events)?i(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(UO,e.attempt(dS,e.attempt(fS,u),i),i)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),a(d)}}function GO(e,a,i){const r=this;let c="",u=!1;return d;function d(p){return(p===72||p===104)&&vS.call(r,r.previous)&&!vg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),c+=String.fromCodePoint(p),e.consume(p),f):i(p)}function f(p){if(Xn(p)&&c.length<5)return c+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=c.toLowerCase();if(b==="http"||b==="https")return e.consume(p),m}return i(p)}function m(p){return p===47?(e.consume(p),u?v:(u=!0,m)):i(p)}function v(p){return p===null||Ld(p)||Tt(p)||io(p)||sf(p)?i(p):e.attempt(dS,e.attempt(fS,y),i)(p)}function y(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),a(p)}}function YO(e,a,i){let r=0;return c;function c(d){return(d===87||d===119)&&r<3?(r++,e.consume(d),c):d===46&&r===3?(e.consume(d),u):i(d)}function u(d){return d===null?i(d):a(d)}}function XO(e,a,i){let r,c,u;return d;function d(v){return v===46||v===95?e.check(hS,m,f)(v):v===null||Tt(v)||io(v)||v!==45&&sf(v)?m(v):(u=!0,e.consume(v),d)}function f(v){return v===95?r=!0:(c=r,r=void 0),e.consume(v),d}function m(v){return c||r||!u?i(v):a(v)}}function KO(e,a){let i=0,r=0;return c;function c(d){return d===40?(i++,e.consume(d),c):d===41&&r<i?u(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?e.check(hS,a,u)(d):d===null||Tt(d)||io(d)?a(d):(e.consume(d),c)}function u(d){return d===41&&r++,e.consume(d),c}}function QO(e,a,i){return r;function r(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),r):f===38?(e.consume(f),u):f===93?(e.consume(f),c):f===60||f===null||Tt(f)||io(f)?a(f):i(f)}function c(f){return f===null||f===40||f===91||Tt(f)||io(f)?a(f):r(f)}function u(f){return Xn(f)?d(f):i(f)}function d(f){return f===59?(e.consume(f),r):Xn(f)?(e.consume(f),d):i(f)}}function ZO(e,a,i){return r;function r(u){return e.consume(u),c}function c(u){return In(u)?i(u):a(u)}}function gS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Tt(e)}function vS(e){return!Xn(e)}function yS(e){return!(e===47||o0(e))}function o0(e){return e===43||e===45||e===46||e===95||In(e)}function vg(e){let a=e.length,i=!1;for(;a--;){const r=e[a][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const JO={tokenize:lz,partial:!0};function WO(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:az,continuation:{tokenize:iz},exit:rz}},text:{91:{name:"gfmFootnoteCall",tokenize:nz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ez,resolveTo:tz}}}}function ez(e,a,i){const r=this;let c=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let d;for(;c--;){const m=r.events[c][1];if(m.type==="labelImage"){d=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!d||!d._balanced)return i(m);const v=li(r.sliceSerialize({start:d.end,end:r.now()}));return v.codePointAt(0)!==94||!u.includes(v.slice(1))?i(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),a(m))}}function tz(e,a){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};c.end.column++,c.end.offset++,c.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},c.end),end:Object.assign({},e[e.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",r,a],e[i+3],e[i+4],["enter",c,a],["exit",c,a],["enter",u,a],["enter",d,a],["exit",d,a],["exit",u,a],e[e.length-2],e[e.length-1],["exit",r,a]];return e.splice(i,e.length-i+1,...f),e}function nz(e,a,i){const r=this,c=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,d;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),m}function m(p){return p!==94?i(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",v)}function v(p){if(u>999||p===93&&!d||p===null||p===91||Tt(p))return i(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return c.includes(li(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),a):i(p)}return Tt(p)||(d=!0),u++,e.consume(p),p===92?y:v}function y(p){return p===91||p===92||p===93?(e.consume(p),u++,v):v(p)}}function az(e,a,i){const r=this,c=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(S)}function y(S){if(d>999||S===93&&!f||S===null||S===91||Tt(S))return i(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=li(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Tt(S)||(f=!0),d++,e.consume(S),S===92?p:y}function p(S){return S===91||S===92||S===93?(e.consume(S),d++,y):y(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),c.includes(u)||c.push(u),mt(e,j,"gfmFootnoteDefinitionWhitespace")):i(S)}function j(S){return a(S)}}function iz(e,a,i){return e.check(zc,a,e.attempt(JO,a,i))}function rz(e){e.exit("gfmFootnoteDefinition")}function lz(e,a,i){const r=this;return mt(e,c,"gfmFootnoteDefinitionIndent",5);function c(u){const d=r.events[r.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?a(u):i(u)}}function oz(e){let i=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:c};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function c(d,f){let m=-1;for(;++m<d.length;)if(d[m][0]==="enter"&&d[m][1].type==="strikethroughSequenceTemporary"&&d[m][1]._close){let v=m;for(;v--;)if(d[v][0]==="exit"&&d[v][1].type==="strikethroughSequenceTemporary"&&d[v][1]._open&&d[m][1].end.offset-d[m][1].start.offset===d[v][1].end.offset-d[v][1].start.offset){d[m][1].type="strikethroughSequence",d[v][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},d[v][1].start),end:Object.assign({},d[m][1].end)},p={type:"strikethroughText",start:Object.assign({},d[v][1].end),end:Object.assign({},d[m][1].start)},b=[["enter",y,f],["enter",d[v][1],f],["exit",d[v][1],f],["enter",p,f]],j=f.parser.constructs.insideSpan.null;j&&Ra(b,b.length,0,cf(j,d.slice(v+1,m),f)),Ra(b,b.length,0,[["exit",p,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",y,f]]),Ra(d,v-1,m-v+3,b),m=v+b.length-2;break}}for(m=-1;++m<d.length;)d[m][1].type==="strikethroughSequenceTemporary"&&(d[m][1].type="data");return d}function u(d,f,m){const v=this.previous,y=this.events;let p=0;return b;function b(S){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(S):(d.enter("strikethroughSequenceTemporary"),j(S))}function j(S){const k=os(v);if(S===126)return p>1?m(S):(d.consume(S),p++,j);if(p<2&&!i)return m(S);const C=d.exit("strikethroughSequenceTemporary"),E=os(S);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,f(S)}}}class sz{constructor(){this.map=[],this.index=new Map}add(a,i,r){cz(this,a,i,r)}consume(a){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(a.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),a.length=this.map[i][0];r.push(a.slice()),a.length=0;let c=r.pop();for(;c;){for(const u of c)a.push(u);c=r.pop()}this.map.length=0,this.index.clear()}}function cz(e,a,i,r){if(i===0&&r.length===0)return;const c=e.index.get(a);if(c){c[1]+=i,c[2].push(...r);return}const u=[a,i,r];e.map.push(u),e.index.set(a,u)}function uz(e,a){let i=!1;const r=[];for(;a<e.length;){const c=e[a];if(i){if(c[0]==="enter")c[1].type==="tableContent"&&r.push(e[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(c[1].type==="tableContent"){if(e[a-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(c[1].type==="tableDelimiterRow")break}else c[0]==="enter"&&c[1].type==="tableDelimiterRow"&&(i=!0);a+=1}return r}function dz(){return{flow:{null:{name:"table",tokenize:fz,resolveAll:hz}}}}function fz(e,a,i){const r=this;let c=0,u=0,d;return f;function f(D){let $=r.events.length-1;for(;$>-1;){const{type:Y}=r.events[$][1];if(Y==="lineEnding"||Y==="linePrefix")$--;else break}const F=$>-1?r.events[$][1].type:null,W=F==="tableHead"||F==="tableRow"?A:m;return W===A&&r.parser.lazy[r.now().line]?i(D):W(D)}function m(D){return e.enter("tableHead"),e.enter("tableRow"),v(D)}function v(D){return D===124||(d=!0,u+=1),y(D)}function y(D){return D===null?i(D):Ue(D)?u>1?(u=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),j):i(D):lt(D)?mt(e,y,"whitespace")(D):(u+=1,d&&(d=!1,c+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),p(D)))}function p(D){return D===null||D===124||Tt(D)?(e.exit("data"),y(D)):(e.consume(D),D===92?b:p)}function b(D){return D===92||D===124?(e.consume(D),p):p(D)}function j(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(D):(e.enter("tableDelimiterRow"),d=!1,lt(D)?mt(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?C(D):D===124?(d=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),k):L(D)}function k(D){return lt(D)?mt(e,C,"whitespace")(D):C(D)}function C(D){return D===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),E):D===45?(u+=1,E(D)):D===null||Ue(D)?_(D):L(D)}function E(D){return D===45?(e.enter("tableDelimiterFiller"),M(D)):L(D)}function M(D){return D===45?(e.consume(D),M):D===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(D))}function T(D){return lt(D)?mt(e,_,"whitespace")(D):_(D)}function _(D){return D===124?S(D):D===null||Ue(D)?!d||c!==u?L(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),a(D)):L(D)}function L(D){return i(D)}function A(D){return e.enter("tableRow"),H(D)}function H(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),H):D===null||Ue(D)?(e.exit("tableRow"),a(D)):lt(D)?mt(e,H,"whitespace")(D):(e.enter("data"),I(D))}function I(D){return D===null||D===124||Tt(D)?(e.exit("data"),H(D)):(e.consume(D),D===92?q:I)}function q(D){return D===92||D===124?(e.consume(D),I):I(D)}}function hz(e,a){let i=-1,r=!0,c=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,v,y,p;const b=new sz;for(;++i<e.length;){const j=e[i],S=j[1];j[0]==="enter"?S.type==="tableHead"?(f=!1,m!==0&&(Zx(b,a,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(i,0,[["enter",v,a]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,u=[0,0,0,0],d=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(i,0,[["enter",y,a]])),c=S.type==="tableDelimiterRow"?2:y?3:1):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],p=md(b,a,u,c,void 0,p),u=[0,0,0,0]),d[2]=i)):S.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(d[0]=d[1],p=md(b,a,u,c,void 0,p)),u=d,d=[u[1],i,0,0])):S.type==="tableHead"?(f=!0,m=i):S.type==="tableRow"||S.type==="tableDelimiterRow"?(m=i,u[1]!==0?(d[0]=d[1],p=md(b,a,u,c,i,p)):d[1]!==0&&(p=md(b,a,d,c,i,p)),c=0):c&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(d[3]=i)}for(m!==0&&Zx(b,a,m,v,y),b.consume(a.events),i=-1;++i<a.events.length;){const j=a.events[i];j[0]==="enter"&&j[1].type==="table"&&(j[1]._align=uz(a.events,i))}return e}function md(e,a,i,r,c,u){const d=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},ns(a.events,i[0])),e.add(i[0],0,[["exit",u,a]]));const m=ns(a.events,i[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},e.add(i[1],0,[["enter",u,a]]),i[2]!==0){const v=ns(a.events,i[2]),y=ns(a.events,i[3]),p={type:f,start:Object.assign({},v),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",p,a]]),r!==2){const b=a.events[i[2]],j=a.events[i[3]];if(b[1].end=Object.assign({},j[1].end),b[1].type="chunkText",b[1].contentType="text",i[3]>i[2]+1){const S=i[2]+1,k=i[3]-i[2]-1;e.add(S,k,[])}}e.add(i[3]+1,0,[["exit",p,a]])}return c!==void 0&&(u.end=Object.assign({},ns(a.events,c)),e.add(c,0,[["exit",u,a]]),u=void 0),u}function Zx(e,a,i,r,c){const u=[],d=ns(a.events,i);c&&(c.end=Object.assign({},d),u.push(["exit",c,a])),r.end=Object.assign({},d),u.push(["exit",r,a]),e.add(i+1,0,u)}function ns(e,a){const i=e[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const mz={name:"tasklistCheck",tokenize:gz};function pz(){return{text:{91:mz}}}function gz(e,a,i){const r=this;return c;function c(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return Tt(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),d):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),d):i(m)}function d(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(m)}function f(m){return Ue(m)?a(m):lt(m)?e.check({tokenize:vz},a,i)(m):i(m)}}function vz(e,a,i){return mt(e,r,"whitespace");function r(c){return c===null?i(c):a(c)}}function yz(e){return C3([FO(),WO(),oz(e),dz(),pz()])}const xz={};function bz(e){const a=this,i=e||xz,r=a.data(),c=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),d=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);c.push(yz(i)),u.push(HO()),d.push(PO(i))}function Pd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const jz={add:ll,"chat-bubble":pC,window:$8,close:cs,"chevron-left":fj,"chevron-right":tl,"chevron-down":Hi,gear:EC,"person-add":zC,"arrow-bracket-to-left":hC,"arrow-up":X8,copy:g0,check:da,"cloud-download":v0,bell:Q8,"bell-slash":K8,image:dC,paperclip:b0,"smiley-plus":aC,info:y0,people:LC,pencil:wC,file:oC,"file-video":rC,"file-audio":iC,folder:sC,"layout-sidebar-left":bC,sun:OC,moon:xC,"arrows-expand":tC,"arrows-contract":_C,"arrow-u-up-right":kC,"list-bullets":fC,eye:Xd,"eye-slash":Yd,pin:Mp,megaphone:mC,trash:Ad,search:Tc,quote:SC};function ze({name:e}){const a=jz[e]??y0;return o.jsx(a,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function dt({icon:e,label:a,className:i="",...r}){return o.jsx("button",{type:"button",className:`ui-iconbtn ${i}`,"aria-label":a,title:a,...r,children:o.jsx(ze,{name:e})})}function ss({title:e,onClose:a,children:i,className:r=""}){const c=w.useRef(null),u=w.useId();return w.useEffect(()=>{const d=c.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),lo.createPortal(o.jsxs("dialog",{ref:c,className:`ui-small-dialog ${r}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),a()},children:[o.jsx(dt,{icon:"close",label:x("ui.closeNamed",{name:e}),className:"ui-dialog-close",onClick:a}),o.jsxs("div",{className:"ui-dialog-body",children:[o.jsx("h1",{id:u,children:e}),i]})]}),document.body)}async function hf(e){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const a=document.createElement("textarea");a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.opacity="0",document.body.append(a),a.select();try{return document.execCommand("copy")}finally{a.remove()}}function wz({children:e}){const a=w.useRef(null),[i,r]=w.useState("idle");w.useEffect(()=>{if(i==="idle")return;const u=setTimeout(()=>r("idle"),1500);return()=>clearTimeout(u)},[i]);const c=async()=>{var u;return r(await hf((((u=a.current)==null?void 0:u.textContent)??"").replace(/\n$/,""))?"copied":"failed")};return o.jsxs("figure",{className:"ui-code-figure",children:[o.jsx("pre",{ref:a,children:e}),o.jsx(dt,{icon:i==="copied"?"check":"copy",label:x(i==="copied"?"ui.copied":i==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void c()})]})}const Sz=[bz,gD,dD],Bc=w.memo(function({text:a,renderQuote:i}){return Kb(),o.jsx(eD,{remarkPlugins:Sz,skipHtml:!0,components:{a:({href:r,children:c})=>r==="#mention"||r==="#mention-me"?o.jsx("span",{className:"jv-mention","data-me":r==="#mention-me"||void 0,children:c}):i&&(r!=null&&r.startsWith("#quote-"))?i(Number(r.slice(7))):o.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:c}),img:({alt:r})=>o.jsx("span",{children:x("ui.image",{alt:r||x("ui.imageHidden")})}),pre:({children:r})=>o.jsx(wz,{children:r})},children:a})}),kz={agent_undeletable:"error.agentUndeletable",autoconfig_model:"error.autoconfigModel",autoconfig_source:"error.autoconfigSource",bot_missing:"error.botMissing",chat_access_changed:"error.chatAccessChanged",computer_failed:"error.computerFailed",computer_missing:"error.computerMissing",docker_unavailable:"error.dockerUnavailable",connection_in_use:"error.connectionInUse",connection_missing:"error.connectionMissing",credential_changed:"error.credentialChanged",credential_unreadable:"error.credentialUnreadable",credential_scope:"error.credentialScope",credentials_missing:"error.credentialsMissing",data_locked:"error.dataLocked",discovery_format:"error.discoveryFormat",discovery_http:"error.discoveryHttp",discovery_key:"error.discoveryKey",discovery_protocol:"error.discoveryProtocol",discovery_url:"error.discoveryUrl",discovery_url_missing:"error.discoveryUrlMissing",discovery_unreachable:"error.discoveryUnreachable",machine_missing:"error.machineMissing",machine_name_taken:"error.machineNameTaken",ssh_auth_failed:"error.sshAuthFailed",ssh_bad_directory:"error.sshBadDirectory",ssh_bad_host:"error.sshBadHost",ssh_bad_port:"error.sshBadPort",ssh_bad_user:"error.sshBadUser",ssh_failed:"error.sshFailed",ssh_host_key_changed:"error.sshHostKeyChanged",ssh_key_unreadable:"error.sshKeyUnreadable",ssh_password_missing:"error.sshPasswordMissing",ssh_unreachable:"error.sshUnreachable",ssh_unsupported:"error.sshUnsupported",history_missing:"error.historyMissing",invalid_credential:"error.invalidCredential",invalid_run:"error.invalidRun",login_input:"error.loginInput",login_option:"error.loginOption",login_step:"error.loginStep",message_missing:"error.messageMissing",model_incomplete:"error.modelIncomplete",model_missing:"error.modelMissing",model_request_failed:"error.modelRequestFailed",model_required:"error.modelRequired",model_switch_uncertain:"error.modelSwitchUncertain",name_taken:"error.nameTaken",provider_name_taken:"error.providerNameTaken",question_closed:"error.questionClosed",question_expired:"error.questionExpired",secret_description_invalid:"error.secretDescriptionInvalid",secret_missing:"error.secretMissing",secret_name_invalid:"error.secretNameInvalid",secret_name_taken:"error.secretNameTaken",secret_value_missing:"error.secretValueMissing",secret_value_too_long:"error.secretValueTooLong",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",task_invalid:"error.taskInvalid",task_schedule_invalid:"error.taskScheduleInvalid",task_time_past:"error.taskTimePast",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay"},xS=(e,a)=>{const i=e?kz[e]:void 0;return i?x(i,a):null};function at(e,a="common.failed"){return e instanceof Wl?xS(e.code,e.params)??(e.status<500?e.message:x(a)):e instanceof Error&&e.message?e.message:x(a)}const Cz=e=>xS(e.errorCode,e.errorParams)??e.error??"";function Nz({botId:e,selected:a,onSelect:i,onOpenChat:r}){const[c,u]=w.useState(null),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0);if(w.useEffect(()=>{let S=!0;return f(!0),v(""),u(null),(a.kind==="history"?UT.read(e,a.id).then(C=>({kind:"history",data:C})):N4.message(e,a.id).then(C=>({kind:"chat",data:C}))).then(C=>{S&&u(C)}).catch(C=>{S&&v(at(C,"activity.detailFailed"))}).finally(()=>{S&&f(!1)}),()=>{S=!1}},[e,a.kind,a.id,y]),d)return o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.detailLoading")});if(m)return o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:m}),o.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>p(S=>S+1),children:x("common.retry")})]});if(!c)return null;if(c.kind==="history")return o.jsx(BT,{detail:c.data,onSelect:S=>i({kind:"history",id:S})},c.data.record.id);const{chat:b,message:j}=c.data;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-activity-message-head",children:[o.jsxs("div",{children:[o.jsx("h3",{children:b.title}),o.jsx("p",{children:W0(j.createdAt)})]}),o.jsxs(Ee,{variant:"ghost",size:"sm",onClick:()=>r(b.id),children:[x("activity.openChat"),o.jsx(_p,{})]})]}),o.jsxs("div",{className:"jv-activity-message-body",children:[j.content&&o.jsx(Bc,{text:j.content}),j.attachments.length>0&&o.jsx("div",{className:"jv-activity-message-files",children:j.attachments.map(S=>o.jsxs("a",{href:`/api/attachments/${S.id}`,download:S.name,children:[o.jsx(b0,{}),S.name]},S.id))}),j.source&&o.jsxs(Ee,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>i({kind:"history",id:j.source.historyId}),children:[x("activity.sentBy",{id:j.source.historyId}),o.jsx(_p,{})]})]})]})}const bS=F9;function jS({className:e,children:a,showCloseButton:i=!0,...r}){return o.jsxs($9,{children:[o.jsx(G9,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),o.jsxs(K9,{"data-slot":"dialog-content",className:an("fixed top-1/2 left-1/2 z-[81] flex max-h-[calc(100dvh-24px)] w-[min(720px,calc(100vw-24px))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border bg-background text-foreground shadow-lg outline-none",e),...r,children:[a,i&&o.jsx(tN,{className:"absolute top-4 right-4 rounded-sm p-1 text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring","aria-label":x("common.close"),children:o.jsx(cs,{className:"size-4"})})]})]})}function yg({className:e,...a}){return o.jsx("div",{"data-slot":"dialog-header",className:an("flex flex-col gap-2",e),...a})}function mf({className:e,...a}){return o.jsx(W9,{"data-slot":"dialog-title",className:an("text-lg font-semibold",e),...a})}function Ez({botId:e,botName:a,onBack:i,onOpenChat:r}){const[c,u]=w.useState([void 0]),d=c.at(-1),[f,m]=w.useState({items:[],nextBefore:null}),[v,y]=w.useState(!0),[p,b]=w.useState(""),[j,S]=w.useState(0),[k,C]=w.useState(null),E=w.useRef(null),M=w.useRef(0),T=w.useRef(null);w.useEffect(()=>{let A=!0;return y(!0),b(""),m({items:[],nextBefore:null}),E.current&&(E.current.scrollTop=0),N4.list(e,d).then(H=>{A&&m(H)}).catch(H=>{A&&b(at(H,"activity.loadFailed"))}).finally(()=>{A&&y(!1)}),()=>{A=!1}},[e,d,j]);const _=A=>{var H;k||(M.current=((H=E.current)==null?void 0:H.scrollTop)??0,T.current=document.activeElement),C(A)},L=()=>{if(!k){i();return}C(null),requestAnimationFrame(()=>{var A;E.current&&(E.current.scrollTop=M.current),(A=T.current)==null||A.focus({preventScroll:!0})})};return o.jsxs(o.Fragment,{children:[o.jsxs(yg,{className:"jv-bot-info-navigation",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(k?"activity.backToTimeline":"usage.back"),onClick:L,children:o.jsx(Gd,{})}),o.jsx(mf,{children:k?k.kind==="history"?"History":x("activity.chatRecord"):x("bot.activity")}),o.jsx("span",{className:"jv-bot-page-name",children:a})]}),o.jsxs("div",{className:"jv-activity",children:[o.jsxs("div",{className:"jv-activity-list",hidden:k!==null,children:[o.jsxs("div",{className:"jv-activity-toolbar",children:[o.jsx("span",{children:x("activity.newestFirst")}),o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),S(A=>A+1)},"aria-label":x("activity.refresh"),children:[o.jsx(j0,{}),x(v?"activity.reading":"usage.refresh")]})]}),o.jsxs("div",{className:"jv-activity-columns","aria-hidden":"true",children:[o.jsx("span",{children:x("activity.columnChat")}),o.jsx("span",{children:x("activity.columnTime")}),o.jsx("span",{children:"History"})]}),o.jsx("div",{className:"jv-activity-scroll",ref:E,children:v?o.jsx("p",{className:"jv-activity-state",role:"status",children:x("activity.loading")}):p?o.jsxs("div",{className:"jv-activity-state",children:[o.jsx("p",{role:"alert",children:p}),o.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>S(A=>A+1),children:x("common.retry")})]}):f.items.length?o.jsx(PT,{items:f.items,onSelect:_}):o.jsxs("div",{className:"jv-activity-state jv-activity-empty",children:[o.jsx("p",{children:x("activity.empty")}),o.jsx("span",{children:x("activity.emptyHint")})]})}),o.jsxs("div",{className:"jv-activity-pagination",children:[o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:v||c.length===1,onClick:()=>u(A=>A.slice(0,-1)),children:[o.jsx(fj,{}),x("activity.newer")]}),o.jsx("span",{children:x("activity.page",{page:c.length})}),o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:v||f.nextBefore===null,onClick:()=>u(A=>[...A,f.nextBefore]),children:[x("activity.older"),o.jsx(tl,{})]})]})]}),k&&o.jsx("section",{className:"jv-activity-detail","aria-label":x(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:o.jsx(Nz,{botId:e,selected:k,onSelect:_,onOpenChat:r})})]})]})}const Tz={list:(e,a)=>we(`/bots/${e}/usage?since=${a}`)},Az=["today","7d","30d","all"],_z=e=>e==="today"?x("usage.today"):e==="all"?x("usage.all"):x("usage.days",{count:e==="7d"?7:30}),pd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function Mz(e){if(e==="all")return 0;const a=new Date;return a.setHours(0,0,0,0),a.setDate(a.getDate()-(e==="7d"?6:e==="30d"?29:0)),a.getTime()}const Jx=e=>Ii(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),Wx=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function Rz({botId:e,botName:a,onBack:i}){const[r,c]=w.useState("today"),[u,d]=w.useState(null),[f,m]=w.useState(""),[v,y]=w.useState(0);w.useEffect(()=>{let S=!0;return d(null),m(""),Tz.list(e,Mz(r)).then(k=>{S&&d(k.models)}).catch(k=>{S&&m(at(k,"usage.loadFailed"))}),()=>{S=!1}},[e,r,v]);const p=(u==null?void 0:u.filter(S=>S.cost!==null))??[],b=u&&Object.fromEntries(pd.map(([S])=>[S,u.reduce((k,C)=>k+C[S],0)])),j=p.length?Wx(p.reduce((S,k)=>S+k.cost,0)):x("usage.unpriced");return o.jsxs(o.Fragment,{children:[o.jsxs(yg,{className:"jv-bot-info-navigation",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x("usage.back"),onClick:i,children:o.jsx(Gd,{})}),o.jsx(mf,{children:x("usage.title")}),o.jsx("span",{className:"jv-bot-page-name",children:a})]}),o.jsxs("div",{className:"jv-usage",children:[o.jsxs("div",{className:"jv-usage-toolbar",children:[o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("usage.range"),children:Az.map(S=>o.jsx("button",{type:"button",role:"tab","aria-selected":r===S,onClick:()=>c(S),children:_z(S)},S))}),o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(S=>S+1),"aria-label":x("usage.refreshLabel"),children:[o.jsx(j0,{}),x("usage.refresh")]})]}),o.jsx("div",{className:"jv-usage-scroll",children:f?o.jsxs("div",{className:"jv-usage-state",children:[o.jsx("p",{role:"alert",children:f}),o.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>y(S=>S+1),children:x("usage.retry")})]}):u?u.length?o.jsxs(o.Fragment,{children:[o.jsxs("table",{className:"jv-usage-table",children:[o.jsx("thead",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"col",children:x("usage.model")}),pd.map(([S,k])=>o.jsx("th",{scope:"col",children:x(k)},S)),o.jsx("th",{scope:"col",children:x("usage.cost")})]})}),o.jsx("tbody",{children:u.map(S=>o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsxs("span",{className:"jv-usage-model",children:[o.jsx("strong",{children:S.model}),o.jsx("span",{children:S.provider})]})}),pd.map(([k,C])=>o.jsx("td",{"data-label":x(C),title:Ii(S[k]),children:Jx(S[k])},k)),o.jsx("td",{"data-label":x("usage.cost"),className:S.cost===null?"jv-usage-unpriced":void 0,title:S.cost===null?void 0:`$${S.cost.toFixed(4)}`,children:S.cost===null?x("usage.unpriced"):Wx(S.cost)})]},`${S.provider}/${S.model}`))}),u.length>1&&b&&o.jsx("tfoot",{children:o.jsxs("tr",{children:[o.jsx("th",{scope:"row",children:o.jsx("strong",{children:x("usage.total")})}),pd.map(([S,k])=>o.jsx("td",{"data-label":x(k),title:Ii(b[S]),children:Jx(b[S])},S)),o.jsx("td",{"data-label":x("usage.cost"),className:p.length?void 0:"jv-usage-unpriced",children:j})]})})]}),o.jsx("p",{className:"jv-usage-note",children:x(p.length>0&&p.length<u.length?"usage.notePartial":"usage.note")})]}):o.jsx("div",{className:"jv-usage-state jv-usage-empty",children:o.jsx("p",{children:x("usage.empty")})}):o.jsx("p",{className:"jv-usage-state",role:"status",children:x("usage.loading")})})]})]})}const $a={gray:{hex:14079179,label:"color.gray"},blue:{hex:10470376,label:"color.blue"},green:{hex:11064750,label:"color.green"},amber:{hex:15778426,label:"color.amber"},rose:{hex:15642820,label:"color.rose"},violet:{hex:12759274,label:"color.violet"}},Dz=["normal","happy","sad","angry","dizzy"],wS=e=>{var a;return`#${(((a=$a[e])==null?void 0:a.hex)??$a.gray.hex).toString(16).padStart(6,"0")}`},Oz="modulepreload",zz=function(e){return"/"+e},eb={},Ud=function(a,i,r){let c=Promise.resolve();if(i&&i.length>0){let d=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));c=d(i.map(v=>{if(v=zz(v),v in eb)return;eb[v]=!0;const y=v.endsWith(".css"),p=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${p}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":Oz,y||(b.as="script"),b.crossOrigin="",b.href=v,m&&b.setAttribute("nonce",m),document.head.appendChild(b),y)return new Promise((j,S)=>{b.addEventListener("load",j),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${v}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return c.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return a().catch(u)})};let tb;const pp=new Map;let nb=Promise.resolve();function Lz(){return tb??(tb=Promise.all([Ud(()=>import("./three.module-BdMZo7zQ.js"),[]),Ud(()=>import("./figure-DQGUDG-4.js"),[])]).then(([e,a])=>{const i=new e.WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});a.configureRenderer(e,i);const{scene:r,camera:c,ground:u}=a.createStage(e),d=new a.CatFigure(e,$a.gray.hex);return r.add(d.root),a.frameCamera(c,1,3.3),{render(f,m,v,y,p){var b;return i.setSize(v,v,!1),d.setColor(((b=$a[f])==null?void 0:b.hex)??$a.gray.hex),d.setCrown(p),d.pose(m),u.visible=y,i.render(r,c),i.domElement.toDataURL("image/png")}}})),tb}function Bz(e,a,i,r=!1){const c=Math.round(i*Math.min(3,Math.max(1,window.devicePixelRatio||1))),u=`${e}:${a}:${c}:${r}`;let d=pp.get(u);return d||(d=nb.then(()=>Lz()).then(f=>f.render(e,a,c,i>=40,r)),nb=d.catch(()=>{}),pp.set(u,d),d.catch(()=>pp.delete(u))),d}function ro({color:e,mood:a="normal",size:i=36,badge:r,crown:c=!1}){const[u,d]=w.useState();return w.useEffect(()=>{let f=!0;return d(void 0),Bz(e,a,i,c).then(m=>{f&&d(m)}).catch(()=>{}),()=>{f=!1}},[e,a,i,c]),o.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${i}px`,"--jv-avatar-color":wS(e)},"aria-hidden":"true",children:[u?o.jsx("img",{src:u,alt:""}):o.jsx("span",{className:"jv-bot-avatar-tile"}),r==="working"&&o.jsxs("span",{className:"jv-typing",title:x("avatar.working"),children:[o.jsx("i",{}),o.jsx("i",{}),o.jsx("i",{})]}),r==="asking"&&o.jsx("span",{className:"jv-typing jv-asking",title:x("activity.asking"),children:"?"})]})}const mr=uT,pr=mT;function gr({className:e,children:a,...i}){return o.jsxs(fT,{"data-slot":"select-trigger",className:an("flex h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50",e),...i,children:[a,o.jsx(pT,{asChild:!0,children:o.jsx(Hi,{className:"size-4 opacity-50"})})]})}function vr({className:e,children:a,container:i,...r}){return o.jsx(xT,{container:i??void 0,children:o.jsx(bT,{"data-slot":"select-content",position:"popper",sideOffset:5,className:an("z-[100] max-h-[min(300px,70dvh)] min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-md border bg-popover bg-background p-1 text-foreground shadow-md",e),...r,children:o.jsx(ET,{children:a})})})}function ca({className:e,children:a,...i}){return o.jsxs(_T,{"data-slot":"select-item",className:an("relative flex cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50",e),...i,children:[o.jsx(MT,{children:a}),o.jsx(DT,{"data-slot":"select-indicator",className:"absolute right-2",children:o.jsx(da,{className:"size-4"})})]})}const ab={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},Iz=(e,a)=>JSON.stringify([e,a]);function SS({bot:e,connections:a,onSaved:i,onManage:r}){const[c,u]=w.useState([]),[d,f]=w.useState(!0),[m,v]=w.useState(""),[y,p]=w.useState(0),[b,j]=w.useState(!1),[S,k]=w.useState(""),[C,E]=w.useState(!1),[M,T]=w.useState(""),[_,L]=w.useState(-1),A=w.useRef(null),H=w.useRef(null),I=w.useId();w.useEffect(()=>{let J=!0;return f(!0),v(""),ge.modelOptions().then(ee=>{J&&u(ee.connections)}).catch(ee=>{J&&v(at(ee,"botModel.loadFailed"))}).finally(()=>{J&&f(!1)}),()=>{J=!1}},[a,y]);const q=c.flatMap(J=>J.models.map(ee=>({...ee,connectionId:J.id,connectionName:J.name,key:Iz(J.id,ee.id)}))).sort((J,ee)=>J.name.localeCompare(ee.name,void 0,{numeric:!0})),D=q.find(J=>J.connectionId===e.connectionId&&J.id===e.modelId),$=a.find(J=>J.id===e.connectionId),F=$==null?void 0:$.models.find(J=>J.id===e.modelId),W=q.filter(J=>`${J.name} ${J.id} ${J.connectionName}`.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase())),Y=c.map(J=>({...J,models:W.filter(ee=>ee.connectionId===J.id)})).filter(J=>J.models.length),P=Y.flatMap(J=>J.models),K=q.length>8,R=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function V(J){E(J),T(""),L(-1)}async function ne(J,ee,U){V(!1),j(!0),k("");try{i(await ge.selectBotModel(e.id,J,ee,U,$d()))}catch(G){k(at(G,"botModel.switchFailed"))}finally{j(!1)}}function z(J){var ee;if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const U=J.key==="ArrowDown"?Math.min(_+1,P.length-1):Math.max(_-1,0);L(U),(ee=document.getElementById(`${I}-${U}`))==null||ee.scrollIntoView({block:"nearest"})}else if(J.key==="Enter"&&P[_]){J.preventDefault();const U=P[_];ne(U.connectionId,U.id,e.thinkingLevel)}}return o.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":b||d,children:[o.jsxs("div",{className:"jv-bot-model-fields",children:[o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("usage.model")}),o.jsxs(Yw,{open:C,onOpenChange:V,children:[o.jsxs(Xw,{className:"jv-model-trigger","aria-label":x("botModel.pick"),"aria-haspopup":"listbox",disabled:b||d||!!m,children:[o.jsx("span",{children:(D==null?void 0:D.name)??(F==null?void 0:F.name)??x(e.connectionId?"botModel.broken":"botModel.choose")}),b?o.jsx(Bj,{className:"animate-spin"}):o.jsx(Hi,{})]}),o.jsx(Kw,{children:o.jsxs(Qw,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,onOpenAutoFocus:J=>{var ee;J.preventDefault(),(ee=K?A.current:H.current)==null||ee.focus()},onKeyDown:z,children:[K&&o.jsxs("div",{className:"jv-model-search",children:[o.jsx(Tc,{}),o.jsx("input",{ref:A,role:"combobox","aria-label":x("botModel.filter"),"aria-expanded":"true","aria-controls":I,"aria-activedescendant":_>=0?`${I}-${_}`:void 0,placeholder:x("botModel.filterPlaceholder"),value:M,onChange:J=>{T(J.target.value),L(-1)},autoComplete:"off",spellCheck:!1})]}),o.jsxs("div",{ref:H,id:I,role:"listbox","aria-label":x("botModel.list"),tabIndex:-1,"aria-activedescendant":_>=0?`${I}-${_}`:void 0,className:"jv-model-options",children:[Y.map(J=>o.jsxs("div",{role:"group","aria-label":J.name,children:[o.jsx("div",{className:"jv-model-group-label",children:J.name}),J.models.map(ee=>{const U=P.indexOf(ee),G=ee.connectionId===e.connectionId&&ee.id===e.modelId;return o.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${I}-${U}`,"aria-selected":G,"data-active":U===_||void 0,title:ee.id,onClick:()=>void ne(ee.connectionId,ee.id,e.thinkingLevel),children:[o.jsx("span",{className:"jv-option-check",children:G&&o.jsx(da,{})}),o.jsx("span",{children:ee.name})]},ee.key)})]},J.id)),!P.length&&o.jsx("p",{className:"jv-menu-empty",children:x(q.length?"botModel.noMatch":"botModel.none")})]}),o.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{V(!1),r()},children:x("botModel.manage")})]})})]}),(D||$)&&o.jsx("span",{className:"jv-field-note",children:(D==null?void 0:D.connectionName)??($==null?void 0:$.displayName)})]}),o.jsxs("div",{className:"jv-bot-model-field",children:[o.jsx("span",{className:"jv-field-label",children:x("botModel.thinking")}),o.jsxs(mr,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:b||d||!D||!!m,onValueChange:J=>{e.connectionId&&ne(e.connectionId,e.modelId,J)},children:[o.jsx(gr,{className:"jv-thinking-trigger","aria-label":x("botModel.pickThinking"),children:o.jsx(pr,{children:R})}),o.jsx(vr,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(D==null?void 0:D.thinking.levels)??[]].map(J=>{const ee=D==null?void 0:D.thinkingLevelMap[J],U=ee&&ee!==J?ee:J;return o.jsx(ca,{value:J,children:o.jsxs("span",{className:"jv-thinking-option",children:[o.jsxs("span",{children:[U,ee&&ee!==J&&o.jsxs("small",{children:[" (",J,")"]})]}),o.jsx("small",{children:ab[J]&&x(ab[J])})]})},J)})})]})]})]}),d&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.loading")}),b&&o.jsx("p",{className:"jv-field-note",role:"status",children:x("botModel.switching")}),m&&o.jsxs("p",{className:"jv-model-error",role:"alert",children:[m," ",o.jsx("button",{type:"button",onClick:()=>p(J=>J+1),children:x("common.retry")})]}),S&&o.jsx("p",{className:"jv-model-error",role:"alert",children:S})]})}const Hz={preparing:["environment.state.preparing","environment.hint.preparing"],running:["environment.state.running","environment.hint.running"],stopped:["environment.state.stopped","environment.hint.stopped"],failed:["environment.state.failed","environment.hint.failed"],unavailable:["environment.state.unavailable","environment.hint.unavailable"]};function Pz({bot:e,onSaved:a}){const[i,r]=w.useState(!1),[c,u]=w.useState(""),{home:d,docker:f}=e.environment;async function m(y){if(!(y===d||i)){r(!0),u("");try{a(await ge.setBotEnvironment(e.id,y))}catch(p){u(at(p,"environment.changeFailed"))}finally{r(!1)}}}const v=(y,p,b,j)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d===y,disabled:i||j,className:"jv-list-row jv-choice-row jv-env-option",onClick:()=>void m(y),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:p}),o.jsx("span",{children:b})]}),d===y&&o.jsx(da,{"aria-hidden":"true"})]},y);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-label":x("environment.title"),children:[v("computer",x("environment.computer"),x(f?"environment.computerHint":"environment.noDocker"),!f),v("host",x("environment.host"),x("environment.hostHint"),!1)]}),c&&o.jsx("p",{className:"jv-note-error",role:"alert",children:c})]})}function Uz({bot:e,onSaved:a}){const[i,r]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,v]=w.useState(""),y=w.useId(),{computer:p,home:b,current:j,currentName:S,hostGranted:k,docker:C,machines:E=[]}=e.environment;async function M(q,D,$){r(q),v("");try{a(await D())}catch(F){v(at(F,$))}finally{r(null)}}const T=q=>{q!==b&&!i&&M("move",()=>ge.setBotEnvironment(e.id,q),"environment.changeFailed")},_=q=>void M(q,()=>ge.computer(e.id,q),"common.failed"),L=p==null?void 0:p.state,[A,H]=L?Hz[L]:[null,null],I=j===b?null:j==="ssh"?x("environment.awayMachine",{name:S??""}):x(j==="host"?"environment.awayHost":"environment.awayComputer");return o.jsxs("section",{className:"jv-section","aria-label":x("environment.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("environment.title")}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("environment.default")}),o.jsx("span",{className:I?"jv-env-away":void 0,children:I??x("environment.defaultHint")})]}),o.jsx("div",{className:"jv-env-seg",role:"radiogroup","aria-label":x("environment.default"),children:["computer","host"].map(q=>o.jsx("button",{type:"button",role:"radio","aria-checked":b===q,disabled:!!i||q==="computer"&&!C,title:q==="computer"&&!C?x("environment.noDocker"):void 0,onClick:()=>T(q),children:x(q==="computer"?"environment.computer":"environment.host")},q))})]}),b==="computer"&&L&&A&&H&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-choice-row jv-env-disclosure","aria-expanded":c,"aria-controls":y,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("environment.details")})}),o.jsx("span",{className:"jv-status","data-ok":L==="running"||void 0,"data-busy":L==="preparing"||void 0,children:x(A)}),o.jsx(Hi,{"aria-hidden":"true"})]}),c&&o.jsxs("div",{id:y,className:"jv-list-row jv-static-row jv-env-details",children:[o.jsxs("p",{children:[x("environment.sandboxAbout"),x(H)]}),L!=="unavailable"&&!d&&o.jsxs("div",{className:"jv-env-actions",children:[o.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!i||L==="preparing",onClick:()=>L==="running"?f("stop"):_("start"),children:x(i==="start"?"environment.starting":i==="stop"?"environment.stopping":L==="running"?"environment.stop":"environment.start")}),o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!i||L==="preparing",onClick:()=>f("reset"),children:x("environment.reset")})]}),d&&o.jsxs("div",{className:"jv-env-confirm",role:"group","aria-label":x(`environment.${d}Title`,{name:e.name}),children:[o.jsx("strong",{children:x(`environment.${d}Title`,{name:e.name})}),o.jsx("p",{children:x(`environment.${d}Body`)}),o.jsxs("div",{className:"jv-env-confirm-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const q=d;f(null),_(q)},children:x(`environment.${d}Confirm`)})]})]})]})]})]}),(b==="computer"||E.length>0)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{className:"jv-env-heading",children:x("environment.external")}),o.jsxs("div",{className:"jv-list",role:"group","aria-label":x("environment.external"),children:[b==="computer"&&o.jsxs("button",{type:"button",role:"switch","aria-checked":k,disabled:!!i,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void M("grant",()=>ge.grantHost(e.id,!k),"environment.accessFailed"),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("environment.host")}),o.jsx("span",{children:x("environment.hostAbout")})]}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]}),E.map(q=>o.jsxs("button",{type:"button",role:"switch","aria-checked":q.granted,disabled:!!i,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void M("grant",()=>ge.grantBotMachine(e.id,q.id,!q.granted),"environment.accessFailed"),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:q.name})}),o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]},q.id))]}),o.jsx("p",{className:"jv-hint jv-env-note",children:x("environment.externalHint")})]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function vt({className:e,type:a,...i}){return o.jsx("input",{type:a,"data-slot":"input",className:an("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...i})}function qd({className:e,...a}){return o.jsx("textarea",{"data-slot":"textarea",className:an("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...a})}const ib=(e,a)=>Ql(new Date(2e3,0,1,e,a)),kS=e=>Ga(new Date(2023,0,1+e),{weekday:"long"}),CS=e=>`${Zb(e)} ${Ql(e)}`;function qz(e){switch(e.kind){case"once":return x("tasks.schedule.once",{time:CS(e.at)});case"every":return e.minutes%60===0?x("tasks.schedule.hours",{count:e.minutes/60}):x("tasks.schedule.minutes",{count:e.minutes});case"daily":return x("tasks.schedule.daily",{time:ib(e.hour,e.minute)});case"weekly":return x("tasks.schedule.weekly",{day:kS(e.weekday),time:ib(e.hour,e.minute)})}}const as=e=>String(e).padStart(2,"0"),rb=e=>{const a=new Date(e);return`${a.getFullYear()}-${as(a.getMonth()+1)}-${as(a.getDate())}T${as(a.getHours())}:${as(a.getMinutes())}`},Fz=(e,a)=>`${as(e)}:${as(a)}`,Vz=["once","every","daily","weekly"],NS=5;function $z(e){const a=Date.now()+36e5,i={at:rb(a-a%(300*1e3)),count:"30",unit:"minutes",time:"09:00",weekday:"1"};return e&&(e.kind==="once"&&(i.at=rb(e.at)),e.kind==="every"&&Object.assign(i,e.minutes%60===0?{count:String(e.minutes/60),unit:"hours"}:{count:String(e.minutes),unit:"minutes"}),(e.kind==="daily"||e.kind==="weekly")&&(i.time=Fz(e.hour,e.minute)),e.kind==="weekly"&&(i.weekday=String(e.weekday))),i}function Gz(e,a){const[i,r]=a.time.split(":").map(Number),c=Number.isInteger(i)&&Number.isInteger(r)?{hour:i,minute:r}:null;if(e==="once"){const u=new Date(a.at).getTime();return Number.isFinite(u)?{kind:e,at:u}:null}if(e==="every"){const u=Number(a.count)*(a.unit==="hours"?60:1);return Number.isInteger(u)&&u>=NS?{kind:e,minutes:u}:null}return c?e==="daily"?{kind:e,...c}:{kind:e,weekday:Number(a.weekday),...c}:null}function Yz({task:e,busy:a,error:i,onSave:r,onDelete:c,onCancel:u}){const[d,f]=w.useState((e==null?void 0:e.name)??""),[m,v]=w.useState((e==null?void 0:e.instruction)??""),[y,p]=w.useState((e==null?void 0:e.schedule.kind)??"daily"),[b,j]=w.useState(()=>$z(e==null?void 0:e.schedule)),[S,k]=w.useState(!1),C=Gz(y,b),E=T=>j(_=>({..._,...T}));function M(T){T.preventDefault(),C&&d.trim()&&m.trim()&&r({name:d.trim(),instruction:m.trim(),schedule:C})}return o.jsxs("form",{className:"jv-panel jv-task-editor",onSubmit:M,"aria-label":x(e?"tasks.editTitle":"tasks.newTitle"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.name")}),o.jsx(vt,{required:!0,maxLength:80,value:d,placeholder:x("tasks.namePlaceholder"),onChange:T=>f(T.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.instruction")}),o.jsx(qd,{required:!0,maxLength:8e3,rows:4,value:m,placeholder:x("tasks.instructionPlaceholder"),onChange:T=>v(T.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("tasks.when")}),o.jsx("div",{className:"jv-env-seg jv-task-kinds",role:"radiogroup","aria-label":x("tasks.when"),children:Vz.map(T=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===T,onClick:()=>p(T),children:x(`tasks.kind.${T}`)},T))}),o.jsxs("div",{className:"jv-task-when","data-kind":y,children:[y==="once"&&o.jsx(vt,{type:"datetime-local","aria-label":x("tasks.at"),value:b.at,onChange:T=>E({at:T.target.value})}),y==="every"&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"jv-task-label",children:x("tasks.everyCount")}),o.jsx(vt,{type:"number",min:b.unit==="hours"?1:NS,step:1,"aria-label":x("tasks.everyCount"),value:b.count,onChange:T=>E({count:T.target.value})}),o.jsxs(mr,{value:b.unit,onValueChange:T=>E({unit:T}),children:[o.jsx(gr,{"aria-label":x("tasks.everyCount"),children:o.jsx(pr,{})}),o.jsx(vr,{className:"jv-select-menu",children:["minutes","hours"].map(T=>o.jsx(ca,{value:T,children:x(`tasks.unit.${T}`)},T))})]})]}),y==="weekly"&&o.jsxs(mr,{value:b.weekday,onValueChange:T=>E({weekday:T}),children:[o.jsx(gr,{"aria-label":x("tasks.weekday"),children:o.jsx(pr,{})}),o.jsx(vr,{className:"jv-select-menu",children:[1,2,3,4,5,6,0].map(T=>o.jsx(ca,{value:String(T),children:kS(T)},T))})]}),(y==="daily"||y==="weekly")&&o.jsx(vt,{type:"time","aria-label":x("tasks.time"),value:b.time,onChange:T=>E({time:T.target.value})})]}),y==="every"&&!C&&o.jsx("small",{className:"jv-hint",children:x("tasks.minimum")})]}),i&&o.jsx("p",{className:"jv-note-error",role:"alert",children:i}),S&&c&&o.jsxs("div",{className:"jv-env-confirm jv-task-confirm",role:"group","aria-label":x("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""}),children:[o.jsx("strong",{children:x("tasks.deleteTitle",{name:d||(e==null?void 0:e.name)||""})}),o.jsx("p",{children:x("tasks.deleteBody")}),o.jsxs("div",{className:"jv-env-confirm-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(!1),children:x("common.cancel")}),o.jsx(Ee,{type:"button",variant:"ghost",className:"jv-task-delete",size:"sm",disabled:a,onClick:c,children:x("tasks.delete")})]})]}),o.jsxs("div",{className:"jv-form-footer",children:[o.jsx("div",{className:"jv-task-editor-actions",children:c&&o.jsx(Ee,{type:"button",variant:"ghost",className:"jv-task-delete",disabled:a,onClick:()=>k(!0),children:x("tasks.delete")})}),o.jsxs("div",{className:"jv-task-editor-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",onClick:u,children:x("common.cancel")}),o.jsx(Ee,{type:"submit",className:"jv-primary",disabled:a||!C||!d.trim()||!m.trim(),children:x("common.save")})]})]})]})}function Xz({bot:e,runs:a}){const[i,r]=w.useState(null),[c,u]=w.useState(null),[d,f]=w.useState(!1),[m,v]=w.useState(""),[y,p]=w.useState("");w.useEffect(()=>{let _=!0;return ge.tasks(e.id).then(L=>{_&&r(L.tasks)}).catch(L=>{_&&v(at(L,"tasks.loadFailed"))}),()=>{_=!1}},[e.id,a]);const b=_=>r(L=>(L??[]).some(A=>A.id===_.id)?L.map(A=>A.id===_.id?_:A):[...L??[],_]);function j(_){v(""),p(""),u(_)}async function S(_){f(!0),p("");try{b(c==="new"||!c?await ge.createTask(e.id,_):await ge.updateTask(e.id,c.id,_)),u(null)}catch(L){p(at(L,"tasks.saveFailed"))}finally{f(!1)}}async function k(_){f(!0),v("");try{await _()}catch(L){v(at(L,"tasks.changeFailed"))}finally{f(!1)}}const C=_=>k(async()=>b(await ge.setTaskOn(e.id,_.id,_.state!=="active"))),E=_=>k(async()=>{await ge.deleteTask(e.id,_.id),r(L=>(L==null?void 0:L.filter(A=>A.id!==_.id))??null),u(null)}),M=_=>_.state==="active"?_.schedule.kind==="once"||!_.nextRunAt?"":x("tasks.next",{time:CS(_.nextRunAt)}):x(_.state==="done"?"tasks.done":"tasks.paused"),T=_=>[qz(_.schedule),M(_)].filter(Boolean).join(" · ");return o.jsxs("section",{className:"jv-section","aria-label":x("tasks.title"),children:[o.jsxs("div",{className:"jv-task-head",children:[o.jsx("h3",{className:"jv-section-title",children:x("tasks.title")}),!c&&o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:d||i===null,onClick:()=>j("new"),children:[o.jsx(ll,{}),x("tasks.add")]})]}),c?o.jsx(Yz,{task:c==="new"?void 0:c,busy:d,error:y,onSave:_=>void S(_),onCancel:()=>u(null),...c==="new"?{}:{onDelete:()=>void E(c)}}):i&&o.jsx("div",{className:"jv-list",children:i.length===0?o.jsx("div",{className:"jv-list-row jv-static-row",children:o.jsx("span",{className:"jv-row-text",children:o.jsx("span",{children:x("tasks.empty")})})}):i.map(_=>o.jsxs("div",{className:"jv-task-row","data-state":_.state,children:[o.jsx("button",{type:"button",className:"jv-list-row jv-task-open","aria-label":_.name,onClick:()=>j(_),children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:_.name}),o.jsx("span",{children:T(_)})]})}),_.state!=="done"&&o.jsx("button",{type:"button",role:"switch","aria-checked":_.state==="active","aria-label":x("tasks.toggle",{name:_.name}),disabled:d,className:"jv-env-access jv-task-switch",onClick:()=>void C(_),children:o.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})})]},_.id))}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function Kz(){const[e,a]=w.useState(!1),i=r=>c=>{c.pointerType==="mouse"&&a(r)};return o.jsxs(Yw,{open:e,onOpenChange:a,children:[o.jsx(Xw,{className:"jv-context-stale",title:"","aria-label":x("bot.contextStale"),onPointerEnter:i(!0),onPointerLeave:i(!1),children:o.jsx(w0,{"aria-hidden":"true"})}),o.jsx(Kw,{children:o.jsx(Qw,{className:"jv-context-tip jv-ui",side:"top",align:"end",sideOffset:6,collisionPadding:12,onOpenAutoFocus:r=>r.preventDefault(),children:x("bot.contextStale")})})]})}const Qz={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function Zz({bot:e,status:a,connections:i,chats:r,onSaved:c,onManageModels:u,onClose:d,onOpenChat:f,onOpenSubscription:m}){const[v,y]=w.useState("info"),[p,b]=w.useState(e.name),[j,S]=w.useState(e.description),[k,C]=w.useState(e.systemPrompt),[E,M]=w.useState(!1),[T,_]=w.useState(null),[L,A]=w.useState(null),[H,I]=w.useState(null),[q,D]=w.useState(""),[$,F]=w.useState(!1),[W,Y]=w.useState(null);w.useEffect(()=>{let ee=!0;return ge.botSubscriptions(e.id).then(U=>{ee&&Y(U.chats)}).catch(()=>{}),()=>{ee=!1}},[e.id]),w.useEffect(()=>{if(!$)return;const ee=setTimeout(()=>F(!1),1500);return()=>clearTimeout(ee)},[$]);const P=p!==e.name||j!==e.description||k!==e.systemPrompt,K=(a==null?void 0:a.status)??"stop",R=a==null?void 0:a.context;async function V(ee){I(ee),D("");try{await ge.controlBot(e.id,ee)}catch(U){D(at(U,"common.failed"))}finally{I(null)}}async function ne(ee){ee.preventDefault(),M(!0),_(null);try{c(await ge.saveBot(e.id,{name:p,description:j,systemPrompt:k})),_({kind:"ok",text:x("bot.saved")})}catch(U){_({kind:"error",text:at(U,"common.saveFailed")})}finally{M(!1)}}async function z(ee){if(ee!==e.color){M(!0),A(null);try{c(await ge.setBotColor(e.id,ee))}catch(U){A({kind:"error",text:at(U,"bot.changeFailed")})}finally{M(!1)}}}const J=ee=>ee&&o.jsx("p",{className:ee.kind==="error"?"jv-note-error":"jv-note-ok",role:ee.kind==="error"?"alert":"status",children:ee.text});return o.jsx(bS,{open:!0,onOpenChange:ee=>{ee||d()},children:o.jsx(jS,{className:`jv-bot-info jv-ui ${v==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:v==="activity"?o.jsx(Ez,{botId:e.id,botName:e.name,onBack:()=>y("info"),onOpenChat:f}):v==="usage"?o.jsx(Rz,{botId:e.id,botName:e.name,onBack:()=>y("info")}):o.jsxs(o.Fragment,{children:[o.jsx(yg,{className:"jv-dialog-header",children:o.jsx(mf,{children:x("entry.botInfo")})}),o.jsxs("div",{className:"jv-bot-scroll",children:[o.jsxs("section",{className:"jv-bot-hero",children:[o.jsx(ro,{color:e.color,mood:e.mood,size:72,crown:e.agent}),o.jsxs("div",{className:"jv-bot-identity",children:[o.jsx("strong",{children:e.name}),o.jsx("span",{children:e.description||x("bot.noDescription")}),o.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":x("bot.color"),children:Object.keys($a).map(ee=>o.jsx("button",{type:"button",role:"radio","aria-checked":e.color===ee,"aria-label":x($a[ee].label),title:x($a[ee].label),disabled:E,style:{background:wS(ee)},onClick:()=>void z(ee)},ee))}),J(L)]})]}),e.agent&&o.jsxs("section",{className:"jv-section","aria-label":x("agent.title"),children:[o.jsx("h3",{className:"jv-section-title",children:x("agent.title")}),o.jsxs("div",{className:"jv-panel jv-agent-about",children:[o.jsx("p",{children:x("agent.intro",{name:e.name})}),o.jsx("ul",{children:["agent.create","agent.model","agent.run","agent.delete"].map(ee=>o.jsx("li",{children:x(ee)},ee))}),o.jsx("p",{className:"jv-hint",children:x("agent.note")})]})]}),o.jsxs("section",{className:"jv-section","aria-label":x("usage.model"),children:[o.jsx("h3",{className:"jv-section-title",children:x("usage.model")}),o.jsxs("div",{className:"jv-panel",children:[o.jsx(SS,{bot:e,connections:i,onSaved:c,onManage:u}),R&&o.jsxs("div",{className:"jv-context",title:x("bot.contextHint"),children:[o.jsxs("div",{className:"jv-context-label",children:[o.jsx("span",{children:x("bot.context")}),o.jsxs("span",{"data-stale":R.stale&&R.tokens!==null||void 0,children:[R.stale&&R.tokens!==null&&o.jsx(Kz,{}),R.tokens===null?x("bot.unknown"):x("bot.tokens",{used:Ii(R.tokens),window:Ii(R.contextWindow)})]})]}),R.tokens!==null&&o.jsx("div",{className:"jv-context-bar",children:o.jsx("span",{style:{width:`${Math.min(100,Math.max(1,R.tokens/R.contextWindow*100))}%`}})})]})]})]}),o.jsxs("section",{className:"jv-section","aria-label":x("bot.profile"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.profile")}),o.jsxs("form",{className:"jv-panel",onSubmit:ee=>void ne(ee),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("info.name")}),o.jsx(vt,{id:"jarvy-bot-name",required:!0,maxLength:80,value:p,onChange:ee=>b(ee.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("bot.description")}),o.jsx(qd,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:j,onChange:ee=>S(ee.target.value),placeholder:x("bot.descriptionPlaceholder")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:"Persona"}),o.jsx(qd,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:k,onChange:ee=>C(ee.target.value),placeholder:x("bot.personaPlaceholder")}),o.jsx("small",{className:"jv-hint",children:x("bot.personaHint")})]}),o.jsxs("div",{className:"jv-form-footer",children:[J((T==null?void 0:T.kind)==="error"||!P?T:null)??(P?o.jsx("p",{className:"jv-hint",children:x("bot.unsaved")}):o.jsx("span",{})),o.jsx(Ee,{type:"submit",className:"jv-primary",disabled:E||!P,children:x(E?"bot.saving":"common.save")})]})]})]}),o.jsx(Uz,{bot:e,onSaved:c}),o.jsx(Xz,{bot:e,runs:`${K}:${(a==null?void 0:a.runId)??""}`}),o.jsxs("section",{className:"jv-section","aria-label":x("bot.runtime"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.runtime")}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.status")}),o.jsx("span",{children:x("bot.statusHint")})]}),o.jsx("span",{className:"jv-status","data-ok":K!=="stop"||void 0,"data-busy":K==="running"||void 0,children:x(Qz[K])}),K==="running"&&o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!H,onClick:()=>void V("abort"),children:x(H==="abort"?"bot.aborting":"bot.abort")}),o.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!H||!e.connectionId,onClick:()=>void V(K==="stop"?"start":"stop"),children:x(H==="start"?"bot.starting":H==="stop"?"bot.stopping":K==="stop"?"bot.start":"bot.stop")})]}),o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.workspace")}),o.jsx("code",{title:e.workspacePath,children:e.workspacePath})]}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x($?"ui.copied":"bot.copyWorkspace"),onClick:()=>void hf(e.workspacePath).then(ee=>F(ee)),children:$?o.jsx(da,{}):o.jsx(g0,{})})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("activity"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(CC,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("bot.activity")}),o.jsx("span",{children:x("bot.activityHint")})]}),o.jsx(tl,{className:"jv-row-chevron"})]}),o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("usage"),children:[o.jsx("span",{className:"jv-row-icon",children:o.jsx(J8,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("usage.title")}),o.jsx("span",{children:x("bot.usageHint")})]}),o.jsx(tl,{className:"jv-row-chevron"})]})]}),q&&o.jsx("p",{className:"jv-note-error",role:"alert",children:q})]}),W&&o.jsxs("section",{className:"jv-section","aria-label":x("bot.subscriptions"),children:[o.jsx("h3",{className:"jv-section-title",children:x("bot.subscriptions")}),o.jsx("div",{className:"jv-list",children:W.length===0?o.jsx("div",{className:"jv-list-row jv-static-row",children:o.jsx("span",{className:"jv-row-text",children:o.jsx("span",{children:x("bot.noSubscriptions")})})}):W.map(ee=>{var U;return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>m(ee),children:[o.jsx("span",{className:"jv-row-icon",children:ee.type==="thread"?o.jsx(Gj,{}):o.jsx(uC,{})}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:ee.title}),o.jsx("span",{children:ee.type==="thread"?x("bot.threadIn",{channel:((U=r.find(G=>G.id===ee.parentId))==null?void 0:U.title)??""}):x("info.menu")})]}),o.jsx(tl,{className:"jv-row-chevron"})]},ee.id)})})]})]})]})})})}function ES({id:e,value:a,sections:i,onChange:r}){const[c,u]=w.useState(null);return o.jsxs(mr,{value:a??"none",onValueChange:d=>r(d==="none"?null:d),children:[o.jsx(gr,{id:e,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:o.jsx(pr,{})}),o.jsxs(vr,{className:"jv-select-menu",position:"popper",sideOffset:4,container:c,children:[o.jsx(ca,{value:"none",children:x("info.noSection")}),i.map(d=>o.jsx(ca,{value:d.id,children:d.name},d.id))]})]})}const Jz=1024*1024,Wz=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],Kl=e=>`/api/attachments/${e.id}`,TS=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function pf(e){const a=TS(e),i=e.mimeType.toLowerCase();return a==="svg"||i==="image/svg+xml"?"svg":i.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(a)?"image":i.startsWith("video/")?"video":i.startsWith("audio/")?"audio":["webm","mp4","mov"].includes(a)?"video":["mp3","wav","ogg"].includes(a)?"audio":["html","htm"].includes(a)||i==="text/html"?"html":["md","markdown"].includes(a)?"markdown":i.startsWith("text/")||Wz.includes(a)?"text":"download"}const vc=e=>e==="image"||e==="svg",AS=e=>e==="video"||e==="audio",_S={image:"files.kindImage",svg:"files.kindSvg",video:"files.kindVideo",audio:"files.kindAudio",html:"files.kindHtml",markdown:"files.kindMarkdown",text:"files.kindText",download:"files.kindFile"};function MS(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}async function RS(e,a){const i=await fetch(Kl(e),{signal:a,credentials:"same-origin"});if(!i.ok)throw new Error(i.status===404?x("files.gone"):x("files.readFailed",{status:i.status}));return i.text()}async function DS(e,a){return pf(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await RS(e,a))}`:Kl(e)}const lb=e=>`/api/attachments/${e.id}/run`;function eL(e){const a=new DOMParser().parseFromString(e,"text/html");let i=a.querySelectorAll("script").length;const r=new Set;return a.querySelectorAll("*").forEach(c=>{for(const u of[...c.attributes])if(u.name.startsWith("on"))i++;else if(/^\s*javascript:/i.test(u.value)&&["href","src","action","formaction","xlink:href"].includes(u.name))i++;else if(["src","href"].includes(u.name)&&c.tagName!=="A")try{const d=new URL(u.value);(d.protocol==="http:"||d.protocol==="https:")&&r.add(d.host)}catch{}}),i?{count:i,hosts:[...r]}:null}function tL(e){const a=new DOMParser().parseFromString(e,"text/html");return a.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(i=>i.remove()),a.querySelectorAll("*").forEach(i=>{for(const r of[...i.attributes])(r.name.startsWith("on")||["href","xlink:href","srcset","action","formaction","target","autofocus","contenteditable"].includes(r.name)||r.name==="src"&&!r.value.startsWith("data:image/"))&&i.removeAttribute(r.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(i.tagName)&&i.setAttribute("disabled","")}),`<!doctype html><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; form-action 'none'; base-uri 'none'"><meta charset="utf-8">${a.documentElement.outerHTML}`}function nL({file:e,onSize:a}){const[i,r]=w.useState(),[c,u]=w.useState(!1);return w.useEffect(()=>{const d=new AbortController;return u(!1),DS(e,d.signal).then(r).catch(()=>{d.signal.aborted||u(!0)}),()=>d.abort()},[e.id]),c?o.jsx("span",{className:"ui-broken-image",children:o.jsx(ze,{name:"image"})}):i?o.jsx("img",{src:i,alt:e.name,loading:"lazy",onError:()=>u(!0),onLoad:d=>{const{naturalWidth:f,naturalHeight:m}=d.currentTarget;f&&m&&a({width:f,height:m})}}):o.jsx(ze,{name:"image"})}function aL({file:e,onOpen:a}){const[i,r]=w.useState(),c=pf(e),u=vc(c),d=AS(c),f=TS(e).toUpperCase(),m=u&&i?{"--image-w":`${i.width}px`,"--image-ratio":`${i.width/i.height}`}:void 0;return o.jsxs("div",{className:`ui-message-file ${u?"ui-message-image":""}`,"data-sized":m?"":void 0,style:m,children:[o.jsxs("button",{type:"button",className:"ui-message-open",onClick:a,"aria-label":x("files.preview",{name:e.name}),children:[u?o.jsx("span",{className:"ui-image-frame",children:o.jsx(nL,{file:e,onSize:r})}):o.jsx("span",{className:"ui-file-icon","data-kind":d?c:void 0,children:o.jsx(ze,{name:d?`file-${c}`:"file"})}),o.jsxs("span",{className:"ui-file-copy",children:[o.jsx("strong",{title:e.name,children:e.name}),o.jsxs("small",{children:[d?`${x(_S[c])} · `:"",f?`${f} · `:"",MS(e.size)]})]})]}),o.jsx("a",{className:"ui-iconbtn",href:Kl(e),download:e.name,"aria-label":x("files.download",{name:e.name}),title:x("files.download",{name:e.name}),children:o.jsx(ze,{name:"cloud-download"})})]})}function OS({files:e,onOpen:a}){const i=e.some(r=>vc(pf(r)));return o.jsx("div",{className:`ui-message-files ${i?"ui-has-images":""}`,children:e.map((r,c)=>o.jsx(aL,{file:r,onOpen:()=>a(c)},r.id))})}function iL({message:e,onSettled:a}){var L;const i=e.question,r=i.secret,[c,u]=w.useState(""),[d,f]=w.useState(!1),[m,v]=w.useState(!1),[y,p]=w.useState("always"),[b,j]=w.useState(!1),[S,k]=w.useState("");if(i.state!=="pending"){const A=((L=i.answer)==null?void 0:L.selected[0])===1?"once":"always",H=i.state==="answered"?x(A==="once"?"secretCard.allowedOnce":"secretCard.allowedAlways",{name:r.name}):x(i.state==="dismissed"?"secretCard.declined":"secretCard.ignored",{name:r.name});return o.jsxs("p",{className:"jv-question-done","data-state":i.state,title:`${H}
538
+ ${r.purpose}`,children:[i.state==="answered"?o.jsx(da,{"aria-hidden":"true"}):o.jsx(x0,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:H}),o.jsx("span",{className:"jv-question-asked",children:r.purpose})]})}const C=r.needsValue||m,E=c.length>0&&c.length<8;async function M(A){if(!b){j(!0),k("");try{a(await A())}catch(H){k(at(H,"question.failed"))}finally{j(!1)}}}const T=()=>M(()=>ge.fulfilSecret(e.chatId,e.id,{scope:y,...C?{value:c}:{}})),_=()=>M(()=>ge.answerQuestion(e.chatId,e.id,{action:"dismiss"}));return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":x("secretCard.title",{name:r.name}),"aria-busy":b||void 0,onSubmit:A=>{A.preventDefault(),(!C||c)&&T()},children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(Oj,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:"jv-question-title jv-secret-request-name",children:r.name}),o.jsx("p",{className:"jv-question-detail",children:r.purpose})]})]}),o.jsxs("div",{className:"jv-question-body",children:[!window.isSecureContext&&o.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[o.jsx(w0,{"aria-hidden":"true"}),x("secretCard.insecure")]}),r.exists&&!r.needsValue&&o.jsxs("p",{className:"jv-secret-request-note",children:[x("secretCard.exists"),o.jsx("button",{type:"button",className:"jv-secret-request-link",onClick:()=>{v(!m),u("")},children:x(m?"secretCard.keepValue":"secretCard.replace")})]}),r.exists&&r.needsValue&&o.jsx("p",{className:"jv-secret-request-note",children:x("secretCard.unreadable")}),C&&o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:x("secretCard.value")}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:d?"text":"password",autoComplete:"new-password",spellCheck:!1,autoFocus:!0,placeholder:x("secretCard.valuePlaceholder"),value:c,disabled:b,onChange:A=>u(A.target.value)}),o.jsx("button",{type:"button","aria-label":x(d?"secrets.hideValue":"secrets.showValue"),onClick:()=>f(!d),children:d?o.jsx(Yd,{}):o.jsx(Xd,{})})]}),o.jsx("small",{"data-short":E||void 0,children:x(E?"secrets.shortValue":"secretCard.valueHint")})]}),o.jsxs("div",{className:"jv-secret-request-scope",children:[o.jsx("div",{className:"jv-secret-request-seg",role:"radiogroup","aria-label":x("secretCard.scope"),children:["always","once"].map(A=>o.jsx("button",{type:"button",role:"radio","aria-checked":y===A,disabled:b,onClick:()=>p(A),children:x(A==="always"?"secretCard.always":"secretCard.once")},A))}),o.jsx("small",{children:x(y==="always"?"secretCard.alwaysHint":"secretCard.onceHint")})]}),S&&o.jsx("p",{className:"jv-question-error",role:"alert",children:S})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:b,onClick:()=>void _(),children:x("secretCard.decline")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:b||C&&!c,children:x(C?"secretCard.saveAllow":"secretCard.allow")})]})]})}function rL({message:e,onSettled:a}){const i=e.question,r=i.machine,[c,u]=w.useState(""),[d,f]=w.useState(!1),[m,v]=w.useState(!1),[y,p]=w.useState(""),b=`${r.user}@${r.host}${r.port===22?"":`:${r.port}`}`;if(i.state!=="pending"){const E=x(i.state==="answered"?r.existing?"machineCard.granted":"machineCard.added":i.state==="dismissed"?"machineCard.declined":"machineCard.ignored",{name:r.name});return o.jsxs("p",{className:"jv-question-done","data-state":i.state,title:`${E}
539
+ ${r.purpose}`,children:[i.state==="answered"?o.jsx(da,{"aria-hidden":"true"}):o.jsx(x0,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:E}),o.jsx("span",{className:"jv-question-asked",children:r.purpose})]})}async function j(E){if(!m){v(!0),p("");try{a(await E())}catch(M){p(at(M,"question.failed"))}finally{v(!1)}}}const S=!r.existing,k=()=>j(()=>ge.fulfilMachine(e.chatId,e.id,c)),C=()=>j(()=>ge.answerQuestion(e.chatId,e.id,{action:"dismiss"}));return o.jsxs("form",{className:"jv-question jv-secret-request",autoComplete:"off","aria-label":x("machineCard.title",{name:r.name}),"aria-busy":m||void 0,onSubmit:E=>{E.preventDefault(),(!S||c)&&k()},children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(c4,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{className:"jv-question-title",children:r.name}),o.jsx("p",{className:"jv-question-detail",children:r.purpose})]})]}),o.jsxs("div",{className:"jv-question-body",children:[o.jsxs("p",{className:"jv-machine-where",children:[o.jsx("code",{children:b}),r.directory&&o.jsx("code",{children:r.directory})]}),r.existing?o.jsx("p",{className:"jv-secret-request-note",children:x("machineCard.existing")}):o.jsxs(o.Fragment,{children:[!window.isSecureContext&&o.jsxs("p",{className:"jv-secret-request-warning",role:"alert",children:[o.jsx(w0,{"aria-hidden":"true"}),x("secretCard.insecure")]}),o.jsxs("div",{className:"jv-machine-card-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:r.hostKeys.fingerprints.map(E=>o.jsx("code",{children:E},E))}),o.jsx("small",{children:x("machines.fingerprintHint")})]}),o.jsxs("label",{className:"ui-field jv-secret-request-value",children:[o.jsx("span",{children:x("machines.password")}),o.jsxs("span",{className:"jv-secret-request-field",children:[o.jsx("input",{type:d?"text":"password",autoComplete:"new-password",spellCheck:!1,value:c,disabled:m,onChange:E=>u(E.target.value)}),o.jsx("button",{type:"button","aria-label":x(d?"secrets.hideValue":"secrets.showValue"),onClick:()=>f(!d),children:d?o.jsx(Yd,{}):o.jsx(Xd,{})})]}),o.jsx("small",{children:x("machines.passwordHint")})]})]}),y&&o.jsx("p",{className:"jv-question-error",role:"alert",children:y})]}),o.jsxs("div",{className:"jv-question-foot",children:[o.jsx("button",{type:"button",className:"ui-button",disabled:m,onClick:()=>void C(),children:x("machineCard.decline")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:m||S&&!c,children:x(S?m?"machines.connecting":"machineCard.add":"machineCard.allow")})]})]})}const ob=e=>String.fromCharCode(65+e),sb=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function zS(e){const{message:a}=e,{secret:i,machine:r}=a.question;return i?o.jsx(iL,{message:{...a,question:{...a.question,secret:i}},onSettled:e.onSettled}):r?o.jsx(rL,{message:{...a,question:{...a.question,machine:r}},onSettled:e.onSettled}):o.jsx(lL,{...e})}function lL({message:e,keyboard:a,onSettled:i}){var M,T;const r=e.question,c=r.state==="pending",u=w.useId(),[d,f]=w.useState([]),[m,v]=w.useState(""),[y,p]=w.useState(!1),[b,j]=w.useState("");async function S(_){if(!(y||!c)){p(!0),j("");try{i(await ge.answerQuestion(e.chatId,e.id,_))}catch(L){j(at(L,"question.failed"))}finally{p(!1)}}}const k=_=>{if(!r.multiple){S({action:"answer",selected:[_]});return}f(L=>L.includes(_)?L.filter(A=>A!==_):[...L,_])},C=()=>void S({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),E=()=>{m.trim()&&(r.multiple?C():S({action:"answer",selected:[],custom:m.trim()}))};if(w.useEffect(()=>{if(!a||!c)return;const _=L=>{if(L.defaultPrevented||L.metaKey||L.ctrlKey||L.altKey||L.key.length!==1||sb(L.target)||sb(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const A=L.key.toUpperCase().charCodeAt(0)-65;A<0||A>=r.options.length||(L.preventDefault(),k(A))};return document.addEventListener("keydown",_,!0),()=>document.removeEventListener("keydown",_,!0)}),!c){const _=r.state==="answered"?[...(((M=r.answer)==null?void 0:M.selected)??[]).map(L=>{var A;return((A=r.options[L])==null?void 0:A.label)??""}),...(T=r.answer)!=null&&T.custom?[r.answer.custom]:[]].filter(Boolean).join(x("common.listSeparator")):null;return o.jsxs("p",{className:"jv-question-done","data-state":r.state,title:`${r.question}
540
+ ${_===null?x("question.dismissed"):x("question.chose",{answer:_})}`,children:[_===null?o.jsx(x0,{"aria-hidden":"true"}):o.jsx(da,{"aria-hidden":"true"}),o.jsx("span",{className:"jv-question-answer",children:_===null?x("question.dismissed"):p0("question.chose",{answer:o.jsx("strong",{children:_})})}),o.jsx("span",{className:"jv-question-asked",children:r.question})]})}return o.jsxs("div",{className:"jv-question",role:"group","aria-labelledby":u,"aria-busy":y||void 0,children:[o.jsxs("div",{className:"jv-question-head",children:[o.jsx("span",{className:"jv-question-icon",children:o.jsx(Uj,{"aria-hidden":"true"})}),o.jsxs("div",{className:"jv-question-heading",children:[o.jsx("p",{id:u,className:"jv-question-title",children:r.question}),r.detail&&o.jsx("p",{className:"jv-question-detail",children:r.detail})]}),o.jsx("button",{type:"button",className:"jv-question-dismiss","aria-label":x("question.dismissLabel"),title:x("question.dismiss"),disabled:y,onClick:()=>void S({action:"dismiss"}),children:o.jsx(cs,{"aria-hidden":"true"})})]}),o.jsxs("div",{className:"jv-question-body",children:[o.jsx("div",{className:"jv-question-options",role:r.multiple?"group":void 0,"aria-label":r.multiple?x("question.multiple"):void 0,children:r.options.map((_,L)=>{const A=d.includes(L);return o.jsxs("button",{type:"button",className:"jv-question-option","data-style":_.style,"data-on":A||void 0,"aria-pressed":r.multiple?A:void 0,"aria-keyshortcuts":a?ob(L).toLowerCase():void 0,disabled:y,onClick:()=>k(L),children:[o.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:A?o.jsx(da,{}):ob(L)}),o.jsxs("span",{className:"jv-question-copy",children:[o.jsx("strong",{children:_.label}),_.description&&o.jsx("small",{children:_.description})]})]},_.label)})}),b&&o.jsx("p",{className:"jv-question-error",role:"alert",children:b})]}),(r.allowCustom||r.multiple)&&o.jsxs("div",{className:"jv-question-foot",children:[r.allowCustom&&o.jsx("input",{className:"jv-question-custom",value:m,maxLength:2e3,placeholder:x(r.multiple?"question.note":"question.own"),"aria-label":x("question.ownLabel"),disabled:y,onChange:_=>v(_.target.value),onKeyDown:_=>{_.key==="Enter"&&!_.nativeEvent.isComposing&&(_.preventDefault(),E())}}),r.multiple?o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:C,children:d.length?x("question.confirmCount",{count:d.length}):x("question.confirm")}):o.jsx("button",{type:"button",className:"ui-button ui-primary jv-question-submit",disabled:y||!m.trim(),onClick:E,children:x("question.send")})]})]})}function Fi(e){return e?e.deleted?x("member.deleted",{name:e.name}):e.name:x("member.unknown")}const oL={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},LS=e=>x(oL[e??""]??"activity.running"),oi=e=>e.filter(a=>!a.deleted);function sL(e){const a=new Set(e.map(r=>r.toLowerCase()));let i=x("bot.newName");for(let r=2;a.has(i.toLowerCase());r++)i=x("bot.newNameN",{n:r});return i}const gp=/[\p{Script=Latin}\p{Nd}_]/u;function xg(e,a){const i=e.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),r=i.toLowerCase(),c=[...a].sort((d,f)=>f.name.length-d.name.length),u=[];for(let d=r.indexOf("@");d>=0;d=r.indexOf("@",d+1)){if(d>0&&gp.test(i[d-1]))continue;const f=c.find(m=>{const v=m.name.toLowerCase();if(!v||!r.startsWith(v,d+1))return!1;const y=i[d+1+v.length];return!(y&&gp.test(y)&&gp.test(v.at(-1)))});f&&(u.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return u}function cL(e,a,i){let r="",c=0;for(const u of xg(e,a))r+=e.slice(c,u.at)+`[${e.slice(u.at,u.at+u.length)}](${u.member.id===i?"#mention-me":"#mention"})`,c=u.at+u.length;return r+e.slice(c)}const BS=/\[\[q(\d+)\]\]/g,s0=(e,a=40)=>{const i=e.replace(/\s+/g," ").trim();return i.length>a?`${i.slice(0,a)}…`:i};function bg(e){return e.content.replace(BS,(a,i)=>{const r=e.quotes[Number(i)-1];return r?x("quote.inline",{text:r.text}):a})}function Ic(e){return bg(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||x("common.attachment")}function IS({message:e,members:a,me:i,onJump:r}){const c=cL(e.content,a.filter(d=>e.mentions.includes(d.id)),i).replace(BS,(d,f)=>e.quotes[Number(f)-1]?`[q${f}](#quote-${f})`:d),u=d=>{const f=e.quotes[d-1];if(!f)return null;const m=Fi(a.find(v=>v.id===f.senderId));return o.jsxs("button",{type:"button",className:"jv-quote-tag",title:x("sidebar.said",{name:m,text:f.text}),"data-gone":f.messageId?void 0:"",onClick:()=>r==null?void 0:r(f.messageId,f.text),children:[o.jsx(ze,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:m})}),o.jsx("span",{className:"jv-quote-text",children:s0(f.text,80)})]})};return o.jsx(Bc,{text:c,renderQuote:u})}function HS(e,a){var p;const i=a.replace(/\s+/g,"");if(!i||typeof CSS>"u"||!("highlights"in CSS))return!1;const r=e.querySelector(".ui-bubble")??e,c=document.createTreeWalker(r,NodeFilter.SHOW_TEXT),u=[];for(let b=c.nextNode();b;b=c.nextNode())if(!((p=b.parentElement)!=null&&p.closest(".jv-quote-tag, button")))for(let j=0;j<b.data.length;j++)/\s/.test(b.data[j])||u.push({node:b,offset:j});const d=u.map(b=>b.node.data[b.offset]).join(""),f=d.indexOf(i);if(f<0)return!1;const m=u[f],v=u[f+i.length-1],y=new Range;return y.setStart(m.node,m.offset),y.setEnd(v.node,v.offset+1),CSS.highlights.set("jv-passage",new Highlight(y)),setTimeout(()=>CSS.highlights.delete("jv-passage"),2400),!0}function PS(e,a){e.scrollIntoView({block:"center",behavior:"smooth"}),!(a&&HS(e,a))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function uL({quotes:e,onRemove:a}){return e.length?o.jsx("div",{className:"jv-compose-quotes",children:e.map((i,r)=>o.jsxs("span",{className:"jv-quote-tag",title:x("sidebar.said",{name:i.name,text:i.text}),children:[o.jsx(ze,{name:"quote"}),o.jsx("span",{className:"jv-quote-name",children:x("quote.by",{name:i.name})}),o.jsx("span",{className:"jv-quote-text",children:s0(i.text)}),o.jsx("button",{type:"button","aria-label":x("quote.remove",{text:s0(i.text,20)}),onClick:()=>a(r),children:"×"})]},r))}):null}function US({container:e,drafts:a,chatId:i,source:r,members:c,onNotice:u}){const d=(y,p)=>{const b=r(y);b&&!dL(a,i,b,c,p)&&u(x("quote.tooMany",{count:10}))},[f,m]=w.useState(null);if(w.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const p=E=>{var M;return(M=E instanceof Element?E:E==null?void 0:E.parentElement)==null?void 0:M.closest(".ui-bubble")},b=()=>{var A,H;const E=getSelection(),M=(E==null?void 0:E.toString())??"";if(!E||E.isCollapsed||!M.trim()){m(null);return}const T=p(E.anchorNode),_=T==null?void 0:T.closest("[data-message]");if(!T||!_||!y.contains(T)||p(E.focusNode)!==T||(H=(A=E.anchorNode)==null?void 0:A.parentElement)!=null&&H.closest(".jv-quote-tag, button")){m(null);return}const L=E.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(L.left+L.width/2,90),innerWidth-90),y:Math.max(L.top-8,48),messageId:_.getAttribute("data-message"),text:M.trim()})},j=()=>requestAnimationFrame(b),S=()=>m(null),k=E=>{E.key==="Escape"&&S()},C=()=>{var E;(E=getSelection())!=null&&E.isCollapsed&&S()};return y.addEventListener("mouseup",j),y.addEventListener("scroll",S,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",C),()=>{y.removeEventListener("mouseup",j),y.removeEventListener("scroll",S,!0),document.removeEventListener("keydown",k),document.removeEventListener("selectionchange",C)}},[e]),!f)return null;const v=()=>{var y;m(null),(y=getSelection())==null||y.removeAllRanges()};return o.jsxs("div",{className:"ui-popover jv-selection-menu",role:"menu","aria-label":x("quote.selection"),style:{left:f.x,top:f.y},onMouseDown:y=>y.preventDefault(),children:[o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{hf(f.text),v()},children:[o.jsx(ze,{name:"copy"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.copy")})]}),o.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{d(f.messageId,f.text),v()},children:[o.jsx(ze,{name:"quote"}),o.jsx("span",{className:"ui-menu-copy",children:x("quote.quote")})]})]})}function dL(e,a,i,r,c){if(e.get(a).passages.length>=10)return!1;const u={messageId:i.id,name:Fi(r.find(d=>d.id===i.senderId)),text:c};return e.update(a,d=>({passages:[...d.passages,u]})),!0}const fL=["👍","👎","✅","❌","😄","😂","😵‍💫","🤔"],cb=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵‍💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function qS({message:e,members:a,onJump:i}){if(!e.replyTo)return null;const r=a.find(c=>c.id===e.replyTo.senderId);return o.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>i(e.replyTo.id),children:[o.jsx("span",{className:"jv-reply-author",children:Fi(r)}),o.jsx("span",{className:"jv-reply-text",children:Ic(e.replyTo)})]})}function FS({message:e,me:a,members:i,onReact:r,onError:c}){return e.reactions.length?o.jsx("div",{className:"jv-reactions",children:e.reactions.map(u=>{const d=u.memberIds.includes(a);return o.jsxs("button",{type:"button",className:"jv-reaction","data-mine":d||void 0,title:u.memberIds.map(f=>Fi(i.find(m=>m.id===f))).join(x("common.listSeparator")),onClick:()=>{try{r(e,u.emoji,!d)}catch(f){c(f)}},children:[o.jsx("span",{className:"jv-reaction-emoji",children:u.emoji}),o.jsx("span",{className:"jv-reaction-count",children:u.memberIds.length})]},u.emoji)})}):null}function VS({message:e,me:a,onReply:i,onReact:r,onError:c}){const[u,d]=w.useState(!1),[f,m]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{if(!u)return;const b=j=>{var S;(S=v.current)!=null&&S.contains(j.target)||d(!1)};return document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)},[u]);const y=b=>{var S;const j=!((S=e.reactions.find(k=>k.emoji===b))!=null&&S.memberIds.includes(a));try{r(e,b,j)}catch(k){c(k)}d(!1)},p=()=>{var S,k,C;const b=(S=v.current)==null?void 0:S.getBoundingClientRect(),j=(C=(k=v.current)==null?void 0:k.closest(".ui-transcript, .ui-pane-body"))==null?void 0:C.getBoundingClientRect();m(!!b&&((j==null?void 0:j.bottom)??window.innerHeight)-b.bottom<240),d(!u)};return o.jsxs("div",{className:"jv-message-actions",ref:v,children:[i&&o.jsx(dt,{icon:"arrow-u-up-right",label:x("actions.reply"),onClick:()=>i(e)}),o.jsx(dt,{icon:"smiley-plus",label:x("actions.react"),"aria-expanded":u,onClick:p}),u&&o.jsxs("div",{className:"jv-emoji-menu",role:"menu","aria-label":x("actions.pickEmoji"),"data-up":f||void 0,children:[o.jsx("div",{className:"jv-emoji-quick",children:fL.map(b=>o.jsx("button",{type:"button",role:"menuitem",onClick:()=>y(b),children:b},b))}),o.jsxs("details",{className:"jv-emoji-more",children:[o.jsx("summary",{children:x("actions.more")}),o.jsx("div",{className:"jv-emoji-grid",children:cb.filter((b,j)=>cb.indexOf(b)===j).map(b=>o.jsx("button",{type:"button",onClick:()=>y(b),children:b},b))})]})]})]})}const $S="jarvy-notice-closed",hL=()=>{try{return JSON.parse(localStorage.getItem($S)??"[]")}catch{return[]}};function wr({member:e,bots:a,size:i,working:r=!1}){const c=(e==null?void 0:e.kind)==="bot"?a.find(u=>u.id===e.id):void 0;return c?o.jsx(ro,{color:c.color,mood:c.mood,size:i,badge:r?"working":void 0,crown:c.agent}):o.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:i,height:i,fontSize:Math.round(i*.38)},children:((e==null?void 0:e.name)??"?").slice(0,2).toUpperCase()})}function mL({chat:e,members:a,bots:i,infoOpen:r,membersOpen:c,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:v,onThreads:y,onSearch:p}){const b=a.filter(j=>e.memberIds.includes(j.id));return o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(dt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:f}),o.jsxs("button",{type:"button",className:"jv-channel-title","aria-label":x("channel.infoFor",{name:e.title}),"aria-pressed":r,onClick:m,children:[o.jsx("span",{className:"jv-hash",children:"#"}),e.title,o.jsx(ze,{name:"chevron-down"})]}),e.topic&&o.jsx("span",{className:"jv-channel-topic",children:e.topic})]}),o.jsxs("div",{className:"ui-header-actions",children:[o.jsxs("button",{type:"button",className:"jv-members-button","aria-label":x("channel.membersCount",{count:b.length}),"aria-pressed":c,title:x("channel.members"),onClick:v,children:[o.jsx("span",{className:"jv-stack",children:b.slice(0,3).map(j=>o.jsx("span",{className:"jv-stack-item",children:o.jsx(wr,{member:j,bots:i,size:22})},j.id))}),o.jsx("span",{className:"jv-members-count",children:b.length})]}),o.jsx(dt,{icon:"search",label:x("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:p}),o.jsx(dt,{icon:"chat-bubble",label:x("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function pL({chat:e,onSave:a}){var j;const[i,r]=w.useState(hL),[c,u]=w.useState(null),[d,f]=w.useState(!1);w.useEffect(()=>u(null),[e.id]);const m=!i.includes(e.id),v=e.note,y=()=>r(S=>{const k=m?[...S,e.id]:S.filter(C=>C!==e.id);return localStorage.setItem($S,JSON.stringify(k)),k}),p=async()=>{if(c!=null&&c.trim()){f(!0);try{await a(c.trim()),u(null)}finally{f(!1)}}};if(c!==null)return o.jsxs("div",{className:"jv-notice","data-editing":!0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsx(ze,{name:"megaphone"}),o.jsx("strong",{children:x("notice.edit")})]}),o.jsx("textarea",{className:"jv-notice-input",value:c,autoFocus:!0,"aria-label":x("notice.content"),onChange:S=>u(S.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>u(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!c.trim(),onClick:()=>void p(),children:x("common.save")})]})]});if(!v)return o.jsxs("div",{className:"jv-notice","data-empty":!0,children:[o.jsx(ze,{name:"megaphone"}),o.jsx("span",{className:"jv-muted",children:x("notice.none")}),o.jsx(dt,{icon:"pencil",label:x("notice.edit"),onClick:()=>u("")})]});const b=((j=v.text.split(`
541
+ `).find(S=>S.trim()&&!S.startsWith("#")))==null?void 0:j.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-notice","data-open":m||void 0,children:[o.jsxs("div",{className:"jv-notice-head",children:[o.jsxs("button",{type:"button",className:"jv-notice-toggle","aria-expanded":m,onClick:y,children:[o.jsx(ze,{name:"megaphone"}),o.jsx("strong",{children:x("notice.title")}),!m&&o.jsx("span",{className:"jv-notice-first",children:b}),o.jsx(ze,{name:m?"chevron-down":"chevron-right"})]}),o.jsxs("span",{className:"jv-muted jv-notice-meta",children:[v.updatedBy.name," · ",Ga(v.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",x("notice.version",{version:v.version})]}),o.jsx(dt,{icon:"pencil",label:x("notice.edit"),onClick:()=>u(v.text)})]}),m&&o.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:o.jsx(Bc,{text:v.text})})]})}function Fd({messages:e,members:a,bots:i,me:r,divider:c,activeQuestion:u,onSettled:d,onPreview:f,onReply:m,onOpenThread:v,onQuote:y,onReact:p,onJump:b,onError:j}){var k;const S=(k=e.find(C=>C.sequence>c&&C.senderId!==r))==null?void 0:k.id;return o.jsx(o.Fragment,{children:e.map((C,E)=>{const M=e[E-1],T=a.find(L=>L.id===C.senderId),_=!!M&&M.senderId===C.senderId&&C.createdAt-M.createdAt<5*6e4&&C.id!==S;return o.jsxs("div",{children:[C.id===S&&o.jsx("div",{className:"jv-divider",role:"separator",children:o.jsx("span",{children:x("chat.newBelow")})}),o.jsxs("div",{className:"jv-row",tabIndex:-1,"data-message":C.id,"data-folded":_||void 0,"data-mention":C.mentions.includes(r)||void 0,children:[o.jsx("div",{className:"jv-row-gutter",children:_?o.jsx("time",{className:"jv-row-time",children:Ql(C.createdAt)}):o.jsx(wr,{member:T,bots:i,size:32})}),o.jsxs("div",{className:"jv-row-body",children:[!_&&o.jsxs("div",{className:"jv-row-head",children:[o.jsx("strong",{children:Fi(T)}),(T==null?void 0:T.kind)==="bot"&&o.jsx("span",{className:"jv-role",children:"Bot"}),o.jsx("time",{children:Ql(C.createdAt)})]}),C.echoOf&&o.jsx("button",{type:"button",className:"jv-echo",onClick:()=>v==null?void 0:v(C.echoOf.id),children:x("channel.echo",{title:C.echoOf.title})}),C.replyTo&&o.jsx(qS,{message:C,members:a,onJump:L=>b==null?void 0:b(L)}),C.question?o.jsx(zS,{message:{...C,question:C.question},keyboard:C.id===u,onSettled:d}):o.jsxs("div",{className:"ui-bubble jv-flat",children:[C.content&&o.jsx(IS,{message:C,members:a,me:r,onJump:b}),C.attachments.length>0&&o.jsx(OS,{files:C.attachments,onOpen:L=>f(C.attachments,L)})]}),p&&o.jsx(FS,{message:C,me:r,members:a,onReact:p,onError:j??(()=>{})}),C.thread&&C.thread.replies>0&&o.jsxs("button",{type:"button",className:"jv-thread-link","data-done":C.thread.status==="done"||void 0,onClick:()=>v==null?void 0:v(C.thread.id),children:[x("channel.replies",{count:C.thread.replies}),C.thread.status==="done"&&` · ${x("channel.threadDone")}`,C.thread.lastReplyAt&&o.jsx("span",{className:"jv-muted",children:x("channel.lastReply",{time:Ql(C.thread.lastReplyAt)})})]})]}),o.jsxs("div",{className:"jv-row-actions",children:[m&&!C.echoOf&&o.jsx(dt,{icon:"chat-bubble",label:x("channel.replyInThread"),onClick:()=>m(C)}),p&&o.jsx(VS,{message:C,me:r,onReply:y,onReact:p,onError:j??(()=>{})})]})]})]},C.id)})})}function GS({candidates:e,bots:a,busy:i,onCancel:r,onConfirm:c}){const[u,d]=w.useState(""),[f,m]=w.useState([]),v=e.filter(p=>p.name.toLowerCase().includes(u.trim().toLowerCase())),y=p=>m(b=>b.includes(p)?b.filter(j=>j!==p):[...b,p]);return o.jsxs("div",{className:"jv-picker",children:[o.jsx("div",{className:"ui-field",children:o.jsx("input",{type:"search",value:u,autoFocus:!0,placeholder:x("common.searchMembers"),"aria-label":x("common.searchMembers"),onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),v.length===1&&y(v[0].id))}})}),o.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":x("dialogs.candidates"),children:[v.map(p=>o.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(p.id),className:"jv-member-option",onClick:()=>y(p.id),children:[o.jsx(wr,{member:p,bots:a,size:24}),o.jsx("span",{className:"jv-member-name",children:p.name}),o.jsx("span",{className:"jv-muted",children:p.kind==="bot"?"Bot":x("common.member")}),o.jsx("span",{className:"jv-check",children:f.includes(p.id)&&o.jsx(ze,{name:"check"})})]},p.id)),v.length===0&&o.jsx("p",{className:"jv-picker-empty",children:x(e.length?"common.noMatch":"dialogs.allInside")})]}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:r,children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:i||f.length===0,onClick:()=>c(f),children:f.length?x("dialogs.addCount",{count:f.length}):x("common.add")})]})]})}function gL({chat:e,members:a,bots:i,onClose:r,onChanged:c}){const[u,d]=w.useState(!1),[f,m]=w.useState("");async function v(y){d(!0),m("");try{let p=e;for(const b of y)p=await ge.addMember(e.id,b);c(p),r()}catch(p){m(at(p,"dialogs.addFailed"))}finally{d(!1)}}return o.jsxs(ss,{title:x("info.addMembers"),onClose:r,className:"jv-channel-dialog",children:[o.jsx(GS,{candidates:a.filter(y=>!e.memberIds.includes(y.id)),bots:i,busy:u,onCancel:r,onConfirm:y=>void v(y)}),f&&o.jsx("p",{className:"jv-form-error",role:"alert",children:f})]})}function vL({sections:e,members:a,bots:i,me:r,onClose:c,onSaved:u}){const d=w.useId(),[f,m]=w.useState(""),[v,y]=w.useState(""),[p,b]=w.useState(null),[j,S]=w.useState([r]),[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState("");async function L(H){if(H.preventDefault(),!(!f.trim()||E)){M(!0),_("");try{u(await ge.createChannel({name:f.trim(),topic:v.trim(),sectionId:p,memberIds:j.filter(I=>I!==r)}))}catch(I){_(at(I,"common.saveFailed"))}finally{M(!1)}}}const A=a.filter(H=>j.includes(H.id));return k?o.jsx(ss,{title:x("info.addMembers"),onClose:c,className:"jv-channel-dialog",children:o.jsx(GS,{candidates:a.filter(H=>!j.includes(H.id)),bots:i,busy:!1,onCancel:()=>C(!1),onConfirm:H=>{S(I=>[...I,...H]),C(!1)}})}):o.jsx(ss,{title:x("sidebar.newChannel"),onClose:c,className:"jv-channel-dialog",children:o.jsxs("form",{onSubmit:H=>void L(H),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-name`,children:x("info.name")}),o.jsx("input",{id:`${d}-name`,value:f,maxLength:80,autoFocus:!0,placeholder:x("info.newChannel"),onChange:H=>m(H.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-topic`,children:x("info.topic")}),o.jsx("input",{id:`${d}-topic`,value:v,maxLength:200,placeholder:x("dialogs.optional"),onChange:H=>y(H.target.value)})]}),o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${d}-section`,children:x("info.section")}),o.jsx(ES,{id:`${d}-section`,value:p,sections:e,onChange:b})]}),o.jsxs("div",{className:"jv-members",children:[o.jsxs("div",{className:"jv-members-head",children:[o.jsxs("span",{children:[x("channel.members")," · ",A.length]}),o.jsxs("button",{type:"button",className:"ui-button",onClick:()=>C(!0),children:[o.jsx(ze,{name:"person-add"}),x("info.addMembers")]})]}),A.map(H=>o.jsxs("div",{className:"jv-member-option",children:[o.jsx(wr,{member:H,bots:i,size:24}),o.jsx("span",{className:"jv-member-name",children:H.name}),o.jsx("span",{className:"jv-muted",children:H.id===r?x("common.you"):H.kind==="bot"?"Bot":x("common.member")}),H.id!==r&&o.jsx(dt,{icon:"close",label:x("members.remove",{name:H.name}),className:"jv-member-remove",onClick:()=>S(I=>I.filter(q=>q!==H.id))})]},H.id))]}),T&&o.jsx("p",{className:"jv-form-error",role:"alert",children:T}),o.jsxs("div",{className:"ui-dialog-actions",children:[o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:c,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:E||!f.trim(),children:x("common.create")})]})]})})}function yL({section:e,onClose:a,onSaved:i,onDeleted:r}){const c=w.useId(),[u,d]=w.useState((e==null?void 0:e.name)??""),[f,m]=w.useState(!1),[v,y]=w.useState("");async function p(j){if(j.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{i(e?await ge.updateSection(e.id,{name:u.trim()}):await ge.createSection({name:u.trim()}))}catch(S){y(at(S,"common.saveFailed")),m(!1)}}}async function b(){if(!(!e||!confirm(x("dialogs.deleteSection",{name:e.name})))){m(!0);try{await ge.deleteSection(e.id),r==null||r(e.id)}catch(j){y(at(j,"dialogs.deleteFailed")),m(!1)}}}return o.jsx(ss,{title:x(e?"dialogs.editSection":"sidebar.newSection"),onClose:a,children:o.jsxs("form",{onSubmit:j=>void p(j),children:[o.jsxs("div",{className:"ui-field",children:[o.jsx("label",{htmlFor:`${c}-name`,children:x("dialogs.sectionName")}),o.jsx("input",{id:`${c}-name`,value:u,maxLength:80,autoFocus:!0,placeholder:x("dialogs.newSection"),onChange:j=>d(j.target.value)})]}),v&&o.jsx("p",{className:"jv-form-error",role:"alert",children:v}),o.jsxs("div",{className:"ui-dialog-actions",children:[e&&o.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void b(),children:x("common.delete")}),o.jsx("span",{className:"jv-spacer"}),o.jsx("button",{type:"button",className:"ui-button",onClick:a,children:x("common.cancel")}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:f||!u.trim(),children:x(e?"common.save":"common.create")})]})]})})}function xL({bot:e,chats:a,onClose:i,onConfirm:r}){const[c,u]=w.useState(!1),[d,f]=w.useState(!1);return o.jsx(ss,{title:x("deleteBot.title",{name:e.name}),onClose:i,className:"jv-dialog",children:o.jsxs("div",{className:"jv-dialog-body",children:[o.jsx("p",{children:x("deleteBot.after")}),o.jsxs("ul",{className:"jv-dialog-list",children:[o.jsx("li",{children:x("deleteBot.chats",{count:a})}),o.jsx("li",{children:x("deleteBot.messages",{name:x("member.deleted",{name:e.name})})}),o.jsx("li",{children:x("deleteBot.history")})]}),o.jsxs("label",{className:"jv-checkline",children:[o.jsx("input",{type:"checkbox",checked:c,onChange:m=>u(m.target.checked)}),o.jsx("span",{children:x("deleteBot.files")})]}),o.jsx("p",{className:"jv-hint",children:x("deleteBot.filesHint")}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",onClick:i,children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),r(c).finally(()=>f(!1))},children:x(d?"deleteBot.deleting":"common.delete")})]})]})})}function YS({title:e,body:a,confirm:i,onClose:r,onConfirm:c}){const[u,d]=w.useState(!1);return o.jsx(ss,{title:e,onClose:r,className:"jv-dialog",children:o.jsxs("div",{className:"jv-dialog-body",children:[o.jsx("p",{children:a}),o.jsxs("div",{className:"jv-dialog-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",onClick:r,children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),c().finally(()=>d(!1))},children:u?x("deleteBot.working"):i})]})]})})}function bL({target:e,x:a,y:i,onClose:r,onOpenBot:c,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:v}){const y=w.useRef(null);w.useEffect(()=>{const j=k=>{var C;(C=y.current)!=null&&C.contains(k.target)||r()},S=k=>{k.key==="Escape"&&r()};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",S),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",S)}},[r]);const p=e.chat,b={left:Math.max(8,Math.min(a,window.innerWidth-200)),top:Math.max(8,Math.min(i,window.innerHeight-210))};return o.jsxs("div",{ref:y,className:"ui-popover jv-entry-menu",role:"menu","aria-label":x("entry.menu"),style:b,children:[p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(p,!p.pinned),r()},children:[o.jsx(ze,{name:"pin"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.pinned?"entry.unpin":"entry.pin")})]}),p&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(p,!p.muted),r()},children:[o.jsx(ze,{name:p.muted?"bell":"bell-slash"}),o.jsx("span",{className:"ui-menu-copy",children:x(p.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{c(e.bot),r()},children:[o.jsx(ze,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.botInfo")})]}):o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{u(e.chat),r()},children:[o.jsx(ze,{name:"info"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.channelInfo")})]}),!(e.kind==="dm"&&e.bot.agent)&&o.jsx("hr",{className:"ui-menu-divider"}),e.kind==="dm"?!e.bot.agent&&o.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{v(e.bot),r()},children:[o.jsx(ze,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteBot")})]}):o.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{m(e.chat),r()},children:[o.jsx(ze,{name:"close"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})}function jL({files:e,initialIndex:a=0,onClose:i}){const[r,c]=w.useState(a),[u,d]=w.useState("preview"),[f,m]=w.useState(!1),[v,y]=w.useState(""),[p,b]=w.useState(""),[j,S]=w.useState(""),[k,C]=w.useState(!0),[E,M]=w.useState(0),[T,_]=w.useState(!1),[L,A]=w.useState(!1),H=w.useRef(null),I=w.useRef(null),q=w.useRef(new Map),D=e[r],$=pf(D),F=AS($),W=!F&&D.size>Jz,Y=!F&&!W&&$!=="download";w.useEffect(()=>{const J=H.current,ee=document.activeElement;return J.showModal(),()=>{J.close(),ee!=null&&ee.isConnected&&ee.focus({preventScroll:!0})}},[]),w.useEffect(()=>{const J=new AbortController;return y(""),b(""),S(""),d("preview"),_(!1),A(!1),C(Y),Y&&(vc($)?DS(D,J.signal).then(b):RS(D,J.signal).then(y)).then(()=>C(!1)).catch(ee=>{J.signal.aborted||(S(at(ee,"files.readError")),C(!1))}),()=>J.abort()},[D.id,E]),w.useEffect(()=>{I.current&&(I.current.scrollTop=q.current.get(`${r}:${u}`)??0)},[r,u,k]);const P=()=>{var J;return q.current.set(`${r}:${u}`,((J=I.current)==null?void 0:J.scrollTop)??0)},K=J=>{P(),c(Math.max(0,Math.min(e.length-1,J)))},R=w.useMemo(()=>$==="html"&&v?eL(v):null,[$,v]),V=Y&&["markdown","html"].includes($)&&!k&&!j,ne=vc($)||F&&!L?"ui-image-view":$==="html"&&u==="preview"?"ui-html-view":$==="markdown"&&u==="preview"?"ui-document":"",z=o.jsxs("a",{className:"ui-button",href:Kl(D),download:D.name,children:[o.jsx(ze,{name:"cloud-download"}),x("files.downloadFile")]});return lo.createPortal(o.jsxs("dialog",{ref:H,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:J=>{J.preventDefault(),i()},onKeyDown:J=>{!["ArrowLeft","ArrowRight"].includes(J.key)||["SELECT","INPUT","TEXTAREA"].includes(J.target.tagName)||(J.preventDefault(),K(r+(J.key==="ArrowLeft"?-1:1)))},children:[o.jsxs("header",{className:"ui-preview-header",children:[o.jsxs("div",{className:"ui-preview-heading",children:[o.jsx("h1",{id:"jvPreviewTitle",children:D.name}),o.jsxs("small",{children:[x(_S[$])," · ",MS(D.size)]})]}),o.jsxs("div",{className:"ui-preview-actions",children:[V&&o.jsx("button",{type:"button",className:"ui-button",onClick:()=>{P(),d(u==="source"?"preview":"source")},children:x(u==="source"?"files.showPreview":$==="html"?"files.showSource":"files.showText")}),T&&o.jsx(dt,{icon:"window",label:x("files.openTab"),onClick:()=>window.open(lb(D),"_blank","noopener,noreferrer")}),o.jsx("a",{className:"ui-iconbtn",href:Kl(D),download:D.name,"aria-label":x("files.download",{name:D.name}),title:x("files.download",{name:D.name}),children:o.jsx(ze,{name:"cloud-download"})}),o.jsx(dt,{icon:f?"arrows-contract":"arrows-expand",label:x(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),o.jsx(dt,{icon:"close",label:x("files.closePreview"),"data-action":"ui-close",onClick:i})]})]}),R&&u==="preview"&&!k&&!j&&o.jsxs("div",{className:"jv-run-tip",role:"status",children:[o.jsx("p",{children:T?x("files.running"):x("files.scripts",{count:R.count,hosts:R.hosts.length?x("files.scriptHosts",{hosts:R.hosts.slice(0,3).join(x("common.listSeparator"))+(R.hosts.length>3?x("files.andMore"):"")}):""})}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>_(!T),children:x(T?"files.stop":"files.run")})]}),o.jsx("div",{className:`ui-preview-body ${ne}`,ref:I,tabIndex:-1,children:F?L?o.jsxs("div",{className:"ui-fallback",children:[o.jsx(ze,{name:`file-${$}`}),o.jsx("strong",{children:x("files.cantPlay")}),o.jsx("p",{children:x("files.cantPlayHint")}),z]}):$==="video"?o.jsx("video",{className:"ui-preview-video",src:Kl(D),controls:!0,preload:"metadata",playsInline:!0,onError:()=>A(!0)},D.id):o.jsx("audio",{className:"ui-preview-audio",src:Kl(D),controls:!0,preload:"metadata",onError:()=>A(!0)},D.id):Y?k?o.jsx("p",{className:"ui-unloaded",children:x("files.reading")}):j?o.jsxs("div",{className:"ui-error",role:"alert",children:[o.jsx("p",{children:j}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(J=>J+1),children:x("common.retry")})]}):vc($)?o.jsx("img",{className:"ui-preview-image",src:p,alt:D.name}):u==="source"||$==="text"?o.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):$==="html"?T?o.jsx("iframe",{title:x("files.runningTitle",{name:D.name}),sandbox:"allow-scripts",src:lb(D),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):o.jsx("iframe",{title:D.name,sandbox:"",srcDoc:tL(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):o.jsx("article",{className:"ui-prose",children:o.jsx(Bc,{text:v})}):o.jsxs("div",{className:"ui-fallback",children:[o.jsx(ze,{name:"file"}),o.jsx("strong",{children:x("files.downloadToView")}),o.jsx("p",{children:x(W?"files.tooLarge":"files.unsupported")}),z]})}),e.length>1&&o.jsxs("footer",{className:"ui-preview-nav",children:[o.jsx(dt,{icon:"chevron-left",label:x("files.previous"),disabled:r===0,onClick:()=>K(r-1)}),o.jsx("select",{id:"ui-preview-select","aria-label":x("files.choose"),value:r,onChange:J=>K(Number(J.target.value)),children:e.map((J,ee)=>o.jsx("option",{value:ee,children:J.name},J.id))}),o.jsxs("span",{children:[r+1," / ",e.length]}),o.jsx(dt,{icon:"chevron-right",label:x("files.next"),disabled:r===e.length-1,onClick:()=>K(r+1)})]})]}),document.body)}function wL({dialog:e,entryMenu:a,confirm:i,preview:r,infoBot:c,bots:u,statuses:d,chats:f,sections:m,members:v,connections:y,meId:p,onDialog:b,onEntryMenu:j,onConfirm:S,onPreview:k,onInfoBot:C,onSettings:E,onChannelInfo:M,onOpenChatId:T,chatSaved:_,openChat:L,onSectionSaved:A,onSectionDeleted:H,updateBot:I,openAnywhere:q,removeChannel:D,deleteBot:$,pinChat:F,muteChat:W}){return o.jsxs(o.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&o.jsx(vL,{sections:m,members:oi(v),bots:u,me:p,onClose:()=>b(null),onSaved:Y=>{_(Y),b(null),L(Y)}}),(e==null?void 0:e.kind)==="members"&&o.jsx(gL,{chat:f.find(Y=>Y.id===e.chat.id)??e.chat,members:oi(v),bots:u,onClose:()=>b(null),onChanged:_}),(e==null?void 0:e.kind)==="section"&&o.jsx(yL,{section:e.section,onClose:()=>b(null),onSaved:A,onDeleted:H}),a&&o.jsx(bL,{target:a.target,x:a.at.x,y:a.at.y,onClose:()=>j(null),onOpenBot:Y=>C(Y.id),onSettings:Y=>{Y.type==="channel"&&M(Y)},onPin:(Y,P)=>void F(Y,P),onMute:(Y,P)=>void W(Y,P),onDeleteChat:Y=>S({kind:"chat",chat:Y}),onDeleteBot:Y=>S({kind:"bot",bot:Y})}),(i==null?void 0:i.kind)==="chat"&&o.jsx(YS,{title:x("app.deleteChannelTitle",{name:i.chat.title}),confirm:x("common.delete"),onClose:()=>S(null),body:x("app.deleteChannelBody"),onConfirm:async()=>{await D(i.chat),S(null)}}),(i==null?void 0:i.kind)==="bot"&&o.jsx(xL,{bot:i.bot,chats:f.filter(Y=>Y.type==="dm"&&Y.botId===i.bot.id).length,onClose:()=>S(null),onConfirm:async Y=>{await $(i.bot,Y),S(null)}}),c&&o.jsx(Zz,{bot:c,status:d[c.id],connections:y,chats:f,onSaved:I,onOpenChat:Y=>{C(null),T(Y)},onOpenSubscription:q,onManageModels:()=>{C(null),E()},onClose:()=>C(null)},c.id),r&&o.jsx(jL,{files:r.files,initialIndex:r.index,onClose:()=>k(null)})]})}function XS(e,a,i){const[r,c]=w.useState(null),[u,d]=w.useState(!1);return w.useEffect(()=>{const f=e.trim();if(!f){c(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void ge.search(f,a).then(y=>{m&&c(y)}).catch(y=>{m&&i(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[e,a]),{result:r,loading:u}}function KS(e,a,i){var r;return e.type==="thread"?`#${((r=a.find(c=>c.id===e.parentId))==null?void 0:r.title)??x("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:Fi(i.find(c=>c.id===e.botId))}function QS({text:e,query:a,room:i=24}){const r=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),c=r.toLocaleLowerCase().indexOf(a.trim().toLocaleLowerCase());if(c<0||!a.trim())return o.jsx(o.Fragment,{children:r.slice(0,120)});const u=Math.max(0,c-i),d=c+a.trim().length;return o.jsxs(o.Fragment,{children:[u>0&&"…",r.slice(u,c),o.jsx("mark",{className:"jv-hit",children:r.slice(c,d)}),r.slice(d,d+120)]})}const SL=e=>new Date(e).toDateString()===new Date().toDateString()?Ql(e):Zb(e);function ZS({message:e,chat:a,chats:i,members:r,query:c,showPlace:u=!0,onOpen:d}){return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(a,e.id),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:Fi(r.find(f=>f.id===e.senderId))}),u&&o.jsx("span",{className:"jv-hit-place",children:KS(a,i,r)}),o.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:SL(e.createdAt)})]}),o.jsx("span",{className:"jv-hit-text",children:o.jsx(QS,{text:bg(e),query:c})})]})}const ub=5;function Ed({label:e,items:a,empty:i}){const[r,c]=w.useState(!1);return!a.length&&!i?null:o.jsxs("section",{className:"jv-result-group","aria-label":e,children:[o.jsxs("h3",{className:"jv-result-head",children:[e,o.jsx("span",{children:a.length})]}),a.length?r?a:a.slice(0,ub):o.jsx("p",{className:"jv-result-empty",children:i}),!r&&a.length>ub&&o.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>c(!0),children:[x("search.showAll",{count:a.length}),o.jsx(ze,{name:"chevron-down"})]})]})}function kL({query:e,shown:a,chats:i,members:r,onOpenChat:c,onOpenMessage:u,onError:d}){const{result:f,loading:m}=XS(e,void 0,d),v=((f==null?void 0:f.chats)??[]).filter(p=>!a.has(p.id)),y=p=>{var b,j;return o.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>c(p),children:[o.jsxs("span",{className:"jv-hit-head",children:[o.jsx("strong",{children:p.type==="thread"?p.title:`#${p.title}`}),p.type==="thread"&&o.jsx("span",{className:"jv-hit-place",children:KS(p,i,r).split(" › ")[0]})]}),(((b=p.note)==null?void 0:b.text)||p.topic)&&o.jsx("span",{className:"jv-hit-text",children:o.jsx(QS,{text:((j=p.note)==null?void 0:j.text)||p.topic,query:e})})]},p.id)};return o.jsxs("div",{className:"jv-results","aria-live":"polite",children:[o.jsx(Ed,{label:x("search.threads"),items:v.filter(p=>p.type==="thread").map(y)}),o.jsx(Ed,{label:x("search.channels"),items:v.filter(p=>p.type==="channel").map(y)}),f?o.jsx(Ed,{label:x("search.messages"),empty:x("search.noMessages"),items:f.messages.map(({message:p,chat:b})=>o.jsx(ZS,{message:p,chat:b,chats:i,members:r,query:e,onOpen:u},p.id))}):m&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")})]})}function CL({className:e,...a}){return o.jsx("div",{"data-slot":"input-group",role:"group",className:an("group/input-group relative flex w-full items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none dark:bg-input/30","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>input]:pl-2","has-[>[data-align=inline-end]]:[&>input]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50","has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",e),...a})}const NL=S0("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","block-start":"order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5 [.border-b]:pb-3","block-end":"order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5 [.border-t]:pt-3"}},defaultVariants:{align:"inline-start"}});function EL({className:e,align:a="inline-start",...i}){return o.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:an(NL({align:a}),e),onClick:r=>{var c,u;r.target.closest("button")||(u=(c=r.currentTarget.parentElement)==null?void 0:c.querySelector("input"))==null||u.focus()},...i})}function TL({className:e,...a}){return o.jsx(vt,{"data-slot":"input-group-control",className:an("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...a})}function AL({className:e,children:a,...i}){return o.jsxs(eT,{"data-slot":"scroll-area",className:an("relative",e),...i,children:[o.jsx(tT,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),o.jsx(_L,{}),o.jsx(nT,{})]})}function _L({className:e,orientation:a="vertical",...i}){return o.jsx(FE,{"data-slot":"scroll-area-scrollbar",orientation:a,className:an("flex touch-none p-px transition-colors select-none",a==="vertical"&&"h-full w-2.5 border-l border-l-transparent",a==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...i,children:o.jsx(KE,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const JS="jarvy-collapsed-sections",ML=()=>{try{return JSON.parse(localStorage.getItem(JS)??"[]")}catch{return[]}};function db({chat:e}){return e.alerts>0?o.jsx("span",{className:"jv-badge","aria-label":x("sidebar.alerts",{count:e.alerts}),children:e.alerts}):e.unread>0?o.jsx("span",{className:"jv-count","aria-label":x("sidebar.unread",{count:e.unread}),children:e.unread}):null}function WS(e){const a=e.hint;if(!a||a.createdAt<e.updatedAt-1e3)return null;const i=a.chatType==="thread"&&a.chatId!==e.id,r={actor:a.actor,emoji:a.detail,title:a.title.length>16?`${a.title.slice(0,16)}…`:a.title};return a.kind==="reaction"?x(i?"hint.reactionInThread":"hint.reaction",r):x(i?"hint.threadSummary":a.chatType==="thread"?"hint.summary":"hint.notice",r)}function RL(e){var a;return e.type==="channel"&&WS(e)&&((a=e.hint)==null?void 0:a.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function fb({chat:e,channel:a}){const i=WS(e),r=e.lastMessage&&Ic(e.lastMessage),c=i??(r?a&&e.lastSender?x("sidebar.said",{name:e.lastSender,text:r}):r:a?e.topic:"");return o.jsxs("span",{className:"jv-digest",children:[e.atMe&&o.jsx("span",{className:"jv-at-me",children:x("sidebar.atMe")}),o.jsx("span",{className:i?"jv-hint-line":void 0,children:c})]})}const hb=e=>{const a=e.getBoundingClientRect();return{x:a.right-168,y:a.bottom+4}};function DL({chats:e,sections:a,bots:i,members:r,onOpenMessage:c,onOpenFound:u,onError:d,working:f,asking:m,selected:v,filter:y,followed:p,followedOpen:b,onFilterChange:j,onSelect:S,onOpenBot:k,onOpenFollowed:C,onMenu:E,onEditSection:M}){const[T,_]=w.useState(ML),L=R=>_(V=>{const ne=V.includes(R)?V.filter(z=>z!==R):[...V,R];return localStorage.setItem(JS,JSON.stringify(ne)),ne}),A=y.toLocaleLowerCase(),H=e.filter(R=>{var V;return R.type!=="thread"&&`${R.title} ${R.topic} ${((V=i.find(ne=>ne.id===R.botId))==null?void 0:V.name)??""}`.toLocaleLowerCase().includes(A)}),I=p.reduce((R,V)=>R+V.unread,0),q=p.reduce((R,V)=>R+V.mentions,0),D=H.filter(R=>R.type==="channel").sort((R,V)=>Number(V.pinned)-Number(R.pinned)||R.title.localeCompare(V.title,"zh-CN")),$=i.map(R=>({bot:R,chat:e.find(V=>V.type==="dm"&&V.botId===R.id)})).filter(({bot:R})=>R.name.toLocaleLowerCase().includes(A)).sort((R,V)=>{var ne,z,J,ee;return Number(V.bot.agent)-Number(R.bot.agent)||+!!((ne=V.chat)!=null&&ne.pinned)-+!!((z=R.chat)!=null&&z.pinned)||(((J=V.chat)==null?void 0:J.updatedAt)??0)-(((ee=R.chat)==null?void 0:ee.updatedAt)??0)}),F=R=>o.jsxs("div",{className:"jv-side-wrap",onContextMenu:V=>{V.preventDefault(),E({kind:"channel",chat:R},{x:V.clientX,y:V.clientY})},children:[o.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===R.id||void 0,"data-unread":R.unread>0||void 0,"aria-current":v===R.id?"page":void 0,onClick:()=>S(R),children:[R.pinned?o.jsx(Mp,{className:"jv-side-pin","aria-label":x("sidebar.pinned")}):o.jsx("span",{className:"jv-hash","aria-hidden":"true",children:"#"}),o.jsxs("span",{className:"jv-side-text",children:[o.jsxs("span",{className:"jv-side-line",children:[o.jsx("span",{className:"jv-side-label",title:R.title,children:R.title}),R.muted&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(ze,{name:"bell-slash"})})]}),o.jsxs("span",{className:"jv-side-line",children:[o.jsx(fb,{chat:R,channel:!0}),o.jsx(db,{chat:R})]})]})]}),o.jsx("button",{type:"button",className:"jv-side-more","aria-label":x("sidebar.more",{name:R.title}),onClick:V=>E({kind:"channel",chat:R},hb(V.currentTarget)),children:o.jsx(My,{"aria-hidden":"true"})})]},R.id),W=({bot:R,chat:V})=>{const ne=m.has(R.id)?"asking":f.has(R.id)?"working":void 0,z=!!V&&v===V.id;return o.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:J=>{J.preventDefault(),E({kind:"dm",bot:R,chat:V},{x:J.clientX,y:J.clientY})},children:[o.jsxs(Ee,{type:"button",variant:"ghost","data-active":z,"aria-current":z?"page":void 0,className:"h-15 w-full justify-start gap-2.5 rounded-md px-2 text-left hover:bg-accent/70 data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",onClick:()=>V?S(V):k(R),children:[o.jsx(ro,{color:R.color,mood:R.mood,size:36,badge:ne,crown:R.agent}),ne&&o.jsx("span",{className:"sr-only",children:x(ne==="asking"?"sidebar.asking":"sidebar.working")}),o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${V!=null&&V.unread?"font-semibold":"font-medium"}`,title:R.name,children:R.name}),(V==null?void 0:V.muted)&&o.jsx("span",{className:"jv-side-muted","aria-label":x("sidebar.muted"),children:o.jsx(ze,{name:"bell-slash"})}),(V==null?void 0:V.pinned)&&o.jsx(Mp,{className:"jv-dm-pin shrink-0","aria-label":x("sidebar.pinned")}),V&&o.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(V.updatedAt).toISOString(),children:Ql(V.updatedAt)})]}),o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-normal text-muted-foreground",children:V?o.jsx(fb,{chat:V,channel:!1}):""}),V&&o.jsx(db,{chat:V})]})]})]}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-xs","aria-label":x("sidebar.more",{name:R.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:J=>E({kind:"dm",bot:R,chat:V},hb(J.currentTarget)),children:o.jsx(My,{"aria-hidden":"true"})})]},R.id)},Y=(R,V,ne,z,J)=>o.jsxs("div",{className:"jv-side-section-head",children:[o.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!ne,onClick:()=>L(R),children:[o.jsx("span",{className:"jv-side-chevron",children:o.jsx(ze,{name:ne?"chevron-right":"chevron-down"})}),o.jsxs("span",{className:"jv-side-section-name",children:[V,ne&&z&&o.jsx("span",{className:"jv-dot","aria-label":x("sidebar.hasUnread")})]})]}),J&&o.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":x("sidebar.editSection",{name:V}),onClick:()=>M(J),children:o.jsx(ze,{name:"pencil"})})]}),P=R=>!A&&T.includes(R),K=(R,V,ne,z)=>o.jsxs("div",{className:"jv-side-section",children:[Y(R,V,P(R),ne.some(J=>J.unread>0),z),!P(R)&&ne.map(F)]},R);return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:o.jsxs(CL,{className:"h-9 bg-background",children:[o.jsx(TL,{id:"jarvy-search",type:"search",value:y,onChange:R=>j(R.target.value),placeholder:x("sidebar.search"),"aria-label":x("sidebar.search"),onKeyDown:R=>{R.key==="Escape"&&y&&(R.preventDefault(),j(""))},className:"text-sm"}),o.jsx(EL,{align:"inline-start",children:o.jsx(Tc,{"aria-hidden":"true"})})]})}),o.jsx(AL,{className:"min-h-0 flex-1",type:"auto",children:A?o.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":x("sidebar.results"),children:[o.jsx(Ed,{label:x("sidebar.chats"),items:[...D.map(F),...$.map(W)]}),o.jsx(kL,{query:y,shown:new Set(D.map(R=>R.id)),chats:e,members:r,onOpenChat:u,onOpenMessage:c,onError:d})]}):o.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":x("sidebar.nav"),children:[p.length>0&&o.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":b||void 0,"data-unread":I>0||void 0,"aria-current":b?"page":void 0,onClick:C,children:[o.jsx(ze,{name:"chat-bubble"}),o.jsx("span",{className:"jv-side-label",children:x("sidebar.followed")}),q>0?o.jsx("span",{className:"jv-badge",children:q}):I>0&&o.jsx("span",{className:"jv-count",children:I})]}),a.map(R=>K(`s:${R.id}`,R.name,D.filter(V=>V.sectionId===R.id),R)),D.some(R=>!R.sectionId||!a.some(V=>V.id===R.sectionId))&&K("channels",x("sidebar.channels"),D.filter(R=>!R.sectionId||!a.some(V=>V.id===R.sectionId))),o.jsxs("div",{className:"jv-side-section",children:[Y("dms",x("sidebar.dms"),P("dms"),$.some(({chat:R})=>!!(R!=null&&R.unread))),!P("dms")&&o.jsx("div",{className:"space-y-1",children:$.map(W)}),!P("dms")&&$.length===0&&o.jsx("p",{className:"jv-side-empty",children:x("sidebar.noDms")})]})]})})]})}function OL({username:e,chats:a,sections:i,bots:r,members:c,followed:u,followedOpen:d,working:f,asking:m,selected:v,filter:y,creating:p,createMenu:b,accountMenu:j,onFilterChange:S,onOpenFollowed:k,onOpenChat:C,onOpenBot:E,onOpenMenu:M,onEditSection:T,onCreate:_,onFind:L,onOpenFound:A,onError:H,onToggleCreate:I,onToggleAccount:q,onSettings:D,onToggleTheme:$,onLogOut:F}){const W=w.useRef(null),Y=w.useRef(null);return w.useEffect(()=>{if(!j&&!b)return;const P=K=>{var R,V;j&&!((R=Y.current)!=null&&R.contains(K.target))&&q(!1),b&&!((V=W.current)!=null&&V.contains(K.target))&&I(!1)};return document.addEventListener("pointerdown",P),()=>document.removeEventListener("pointerdown",P)},[j,b]),o.jsxs(o.Fragment,{children:[o.jsxs("aside",{className:"ui-sidebar","aria-label":x("sidebar.label"),children:[o.jsx("header",{className:"ui-sidebar-header",children:o.jsxs("div",{className:"jarvy-sidebar-create",ref:W,children:[o.jsx(dt,{icon:"add",label:x("sidebar.create"),"aria-expanded":b,"aria-haspopup":"menu",disabled:p,onClick:()=>I(!b)}),b&&o.jsxs("div",{className:"ui-popover jarvy-create-menu",role:"menu","aria-label":x("sidebar.createMenu"),children:[o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("channel"),children:[o.jsx(ze,{name:"list-bullets"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newChannel")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("section"),children:[o.jsx(ze,{name:"folder"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newSection")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>_("bot"),children:[o.jsx(ze,{name:"person-add"}),o.jsx("span",{className:"ui-menu-copy",children:x("sidebar.newBot")})]})]})]})}),o.jsx(DL,{chats:a,sections:i,bots:r,members:c,onOpenMessage:L,onOpenFound:A,onError:H,working:f,asking:m,selected:v,filter:y,onFilterChange:S,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:C,onOpenBot:E,onMenu:M,onEditSection:T}),o.jsx("footer",{className:"ui-sidebar-footer",children:o.jsxs("button",{type:"button",className:"ui-footer-entry","aria-label":x("account.menuFor",{name:e}),"aria-expanded":j,onClick:()=>q(!j),children:[o.jsx("span",{className:"ui-user-avatar",children:e.slice(0,2).toUpperCase()}),o.jsx("span",{children:e}),o.jsx(ze,{name:"chevron-down"})]})})]}),j&&o.jsxs("div",{ref:Y,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":x("account.menu"),children:[o.jsx("div",{className:"ui-menu-note ui-small",children:e}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:D,children:[o.jsx(ze,{name:"gear"}),o.jsx("span",{className:"ui-menu-copy",children:x("settings.title")})]}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:$,children:[o.jsx(ze,{name:"moon"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.toggleTheme")})]}),o.jsx("hr",{className:"ui-menu-divider"}),o.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:F,children:[o.jsx(ze,{name:"arrow-bracket-to-left"}),o.jsx("span",{className:"ui-menu-copy",children:x("account.signOut")})]})]})]})}function zL({textarea:e,value:a,setValue:i,inside:r,outside:c,bots:u,onInvite:d}){const[f,m]=w.useState(null),[v,y]=w.useState(0),[p,b]=w.useState(null),j=w.useRef(null),S=w.useRef(null),k=w.useRef(null);w.useLayoutEffect(()=>{k.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(k.current,k.current),k.current=null)},[a,e]);const C=(P,K)=>P.name.toLowerCase().includes(K.toLowerCase()),E=f===null?[]:r.filter(P=>C(P,f)),M=f===null?[]:c.filter(P=>C(P,f)),T=p?c.filter(P=>C(P,p.search)):[],_=E.length+(M.length?1:0),L=()=>{m(null),b(null)};function A(P=a){const K=e.current,R=K?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(P.slice(0,K.selectionStart)):null;m(R?R[1]:null),y(0),b(null)}function H(P){const K=e.current;if(!K)return;r.some(ne=>ne.id===P.id)||d(P);const R=a.slice(0,K.selectionStart).replace(/@([^\s@]*)$/u,`@${P.name} `),V=R+a.slice(K.selectionStart);k.current=R.length,i(V),L()}function I(P){p||b({search:f??"",active:0}),P&&requestAnimationFrame(()=>{var K;return(K=S.current)==null?void 0:K.focus()})}function q(){var P;b(null),(P=e.current)==null||P.focus()}function D(P){if(!_||P.nativeEvent.isComposing)return!1;const K=v===E.length;return P.key==="ArrowDown"||P.key==="ArrowUp"?(P.preventDefault(),y((v+(P.key==="ArrowDown"?1:-1)+_)%_),b(null),!0):(P.key==="Enter"||P.key==="Tab")&&!K?(P.preventDefault(),H(E[v]),!0):(P.key==="Enter"||P.key==="Tab"||P.key==="ArrowRight")&&K?(P.preventDefault(),I(!0),!0):P.key==="Escape"?(P.preventDefault(),L(),!0):!1}function $(P){!p||P.nativeEvent.isComposing||((P.key==="ArrowDown"||P.key==="ArrowUp")&&T.length?(P.preventDefault(),b({...p,active:(p.active+(P.key==="ArrowDown"?1:-1)+T.length)%T.length})):P.key==="Enter"?(P.preventDefault(),T[p.active]&&H(T[p.active])):(P.key==="Escape"||P.key==="ArrowLeft"&&!p.search)&&(P.preventDefault(),q()))}const F=P=>{var R;const K=P.relatedTarget;(!K||!((R=j.current)!=null&&R.contains(K))&&K!==e.current)&&L()},W=(P,K)=>o.jsxs("button",{type:"button",role:"option","aria-selected":K,className:"ui-menu-item","data-active":K||void 0,onMouseDown:R=>{R.preventDefault(),H(P)},children:[o.jsx(wr,{member:P,bots:u,size:20}),o.jsx("span",{className:"ui-menu-copy",children:P.name}),o.jsx("span",{className:"jv-muted",children:P.kind==="bot"?"Bot":x("common.member")})]},P.id);return{menu:_>0?o.jsxs("div",{ref:j,className:"jv-mention-box","data-side":p?"":void 0,onBlur:F,children:[o.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":x("mention.menu"),children:[E.map((P,K)=>W(P,K===v)),M.length>0&&o.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!p,"data-active":v===E.length||void 0,onMouseEnter:()=>{y(E.length),I(!1)},onMouseDown:P=>{P.preventDefault(),y(E.length),I(!0)},children:[o.jsx("span",{className:"ui-menu-copy",children:x("mention.outside")}),o.jsx("span",{className:"jv-muted",children:M.length}),o.jsx(ze,{name:"chevron-right"})]})]}),p&&o.jsxs("div",{className:"ui-popover jv-mention-side",role:"listbox","aria-label":x("mention.outsideList"),children:[o.jsxs("div",{className:"jv-mention-side-head",children:[o.jsx("button",{type:"button",className:"jv-mention-back","aria-label":x("common.back"),onMouseDown:P=>{P.preventDefault(),q()},children:o.jsx(ze,{name:"chevron-left"})}),o.jsx("input",{ref:S,type:"search",value:p.search,placeholder:x("common.searchMembers"),"aria-label":x("mention.searchOutside"),onChange:P=>b({search:P.target.value,active:0}),onKeyDown:$})]}),o.jsx("div",{className:"jv-mention-side-list",children:T.length?T.map((P,K)=>W(P,K===p.active)):o.jsx("p",{className:"jv-mention-empty",children:x("common.noMatch")})}),o.jsx("p",{className:"ui-menu-note ui-small",children:x("mention.invites")})]})]}):null,track:A,onKeyDown:D,close:L,leaves:F}}const mb={text:null,files:[],quote:null,passages:[],key:null,signature:null,outgoing:null,sending:!1};function e5(e,a){var c;const i=((c=a.text)==null?void 0:c.trim())??"",r=e.text??"";return{text:r.trim()?i?`${i}
542
+
543
+ ${r}`:r:i||e.text,files:[...a.files.filter(u=>!e.files.some(d=>d.id===u.id)),...e.files],quote:e.quote??a.quote,passages:[...a.passages,...e.passages],outgoing:null}}class LL{constructor(a){oc(this,"drafts",new Map);oc(this,"listeners",new Set);oc(this,"timer",null);oc(this,"subscribe",a=>(this.listeners.add(a),()=>{this.listeners.delete(a)}));this.storageKey=a;try{const i=JSON.parse(localStorage.getItem(a)??"{}");for(const[r,c]of Object.entries(i)){const u={...mb,...c,sending:!1};this.drafts.set(r,u.outgoing?{...u,...e5(u,u.outgoing)}:u)}}catch{localStorage.removeItem(a)}}get(a){return this.drafts.get(a)??mb}update(a,i){const r=this.get(a),c=typeof i=="function"?i(r):i;this.drafts.set(a,{...r,...c}),this.listeners.forEach(d=>d());const u=Object.keys(c).every(d=>d==="text"||d==="sending");this.timer&&clearTimeout(this.timer),u?this.timer=setTimeout(()=>this.save(),300):this.save()}save(){var i;this.timer&&(clearTimeout(this.timer),this.timer=null);const a={};for(const[r,{sending:c,...u}]of this.drafts)((i=u.text)!=null&&i.trim()||u.files.length||u.quote||u.passages.length||u.outgoing)&&(a[r]=u);Object.keys(a).length?localStorage.setItem(this.storageKey,JSON.stringify(a)):localStorage.removeItem(this.storageKey)}async clear(a){this.timer&&(clearTimeout(this.timer),this.timer=null);const i=[...this.drafts.values()].flatMap(r=>{var c;return[...r.files,...((c=r.outgoing)==null?void 0:c.files)??[]]});await Promise.all(i.map(r=>a(r.id).catch(c=>console.warn(`Pending attachment ${r.id} was not deleted on log-out`,c)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(r=>r())}}const BL=e=>`jarvy-drafts:${e}`;function t5(e,a,i){e.update(a.chatId,{quote:{id:a.id,name:Fi(i.find(r=>r.id===a.senderId)),text:bg(a).replace(/\s+/g," ").slice(0,160)}})}function IL(e,a){return w.useSyncExternalStore(e.subscribe,()=>e.get(a))}const pb=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function n5({chatId:e,id:a,drafts:i,placeholder:r,disabled:c=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:v,onError:y,onNotice:p}){const b=IL(i,e),j=b.sending,[S,k]=w.useState([]),[C,E]=w.useState(!1),M=S.filter(R=>R.chatId===e),T=M.length>0,_=w.useRef(null),L=b.text??d??"",A=b.files,H=b.quote,I=R=>i.update(e,{text:R}),q=zL({textarea:_,value:L,setValue:I,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:R=>u==null?void 0:u.onInvite(R)});async function D(R){const V=e;if(!R.length)return;if(T){p(x("composer.busy"));return}if(A.length+R.length>5){p(x("composer.tooMany",{count:5}));return}if(R.some(ee=>ee.size===0||ee.size>10*1024*1024)){p(x("composer.size"));return}const ne=R.map(ee=>({key:pb(),chatId:V,name:ee.name,done:0})),z=ne.map(ee=>ee.key),J=(ee,U)=>k(G=>G.map(fe=>fe.key===ee?{...fe,done:U}:fe));k(ee=>[...ee,...ne]);try{for(const[ee,U]of R.entries()){const G=z[ee],fe=await ge.uploadAttachment(V,U,xe=>J(G,xe));i.update(V,xe=>({files:[...xe.files,fe]})),k(xe=>xe.filter(je=>je.key!==G))}}catch(ee){y(ee)}finally{k(ee=>ee.filter(U=>!z.includes(U.key)))}}async function $(R){const V=e;try{await ge.removeAttachment(R),i.update(V,ne=>({files:ne.files.filter(z=>z.id!==R)}))}catch(ne){y(ne)}}function F(R){const V=[...R.clipboardData.files];if(!V.length)return;R.preventDefault();const ne=new Date().toISOString().replace(/\D/g,"").slice(0,14);D(V.map((z,J)=>z.type.startsWith("image/")&&/^image\.\w+$/.test(z.name)?new File([z],`${x("composer.pasted")}-${ne}${V.length>1?`-${J+1}`:""}.${z.name.split(".").pop()}`,{type:z.type}):z))}const W=R=>R.dataTransfer.types.includes("Files");function Y(R){!W(R)||c||(R.preventDefault(),R.dataTransfer.dropEffect="copy",E(!0))}function P(R){W(R)&&(R.preventDefault(),E(!1),c||D([...R.dataTransfer.files]))}async function K(R){R==null||R.preventDefault();const V=e,ne=i.get(V),z=(ne.text??d??"").trim(),J=ne.files,ee=ne.quote,U=ne.passages,fe=[U.map((be,le)=>`[[q${le+1}]]`).join(`
544
+ `),z].filter(Boolean).join(`
545
+
546
+ `);if(!fe&&!J.length||ne.sending||T||c)return;const xe=JSON.stringify([fe,J.map(be=>be.id),(ee==null?void 0:ee.id)??null,U]),je=ne.signature===xe&&ne.key?ne.key:pb(),ue={text:z,files:J,quote:ee,passages:U};i.update(V,{text:"",files:[],quote:null,passages:[],key:je,signature:xe,outgoing:ue,sending:!0});try{await v(fe,J.map(be=>be.id),je,ee==null?void 0:ee.id,U.map(({messageId:be,text:le})=>({messageId:be,text:le}))),i.update(V,{key:null,signature:null,outgoing:null})}catch(be){i.update(V,le=>e5(le,ue)),y(be)}finally{i.update(V,{sending:!1})}}return w.useLayoutEffect(()=>{const R=()=>{const V=_.current,ne=m==null?void 0:m.current;if(!V)return;const z=ne==null?void 0:ne.scrollTop;V.style.height="auto",V.style.height=`${V.scrollHeight}px`,ne&&z!==void 0&&ne.scrollTop!==z&&ne.scrollTo({top:z,behavior:"instant"})};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[L,e,m]),o.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:R=>void K(R),onDragEnter:Y,onDragOver:Y,onDragLeave:R=>{R.currentTarget.contains(R.relatedTarget)||E(!1)},onDrop:P,children:[A.length+M.length>0&&o.jsxs("div",{className:"jarvy-pending-files",children:[A.map(R=>o.jsxs("span",{className:"jarvy-file-chip",children:[o.jsx(ze,{name:"paperclip"}),o.jsx("span",{title:R.name,children:R.name}),o.jsx("button",{type:"button","aria-label":x("composer.removeFile",{name:R.name}),onClick:()=>void $(R.id),children:"×"})]},R.id)),M.map(R=>o.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[o.jsx(ze,{name:"paperclip"}),o.jsx("span",{title:R.name,children:R.name}),o.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":x("composer.uploading",{name:R.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(R.done*100),children:o.jsx("span",{style:{width:`${R.done*100}%`}})})]},R.key))]}),H&&o.jsxs("div",{className:"jv-compose-quote",children:[o.jsx("span",{className:"jv-compose-quote-label",children:x("composer.replying")}),o.jsx("span",{className:"jv-reply-author",children:H.name}),o.jsx("span",{className:"jv-reply-text",children:H.text||x("common.attachment")}),o.jsx("button",{type:"button","aria-label":x("composer.cancelReply"),onClick:()=>i.update(e,{quote:null}),children:"×"})]}),o.jsx(uL,{quotes:b.passages,onRemove:R=>i.update(e,V=>({passages:V.passages.filter((ne,z)=>z!==R)}))}),o.jsxs("div",{className:"ui-composer jv-composer",children:[u&&q.menu,C&&o.jsx("span",{className:"jarvy-drop-hint",role:"status",children:x("composer.drop")}),o.jsxs("label",{className:"jarvy-attach-trigger",title:x("composer.attach"),children:[o.jsx(ze,{name:"add"}),o.jsx("input",{type:"file",multiple:!0,"aria-label":x("composer.attach"),disabled:j||T||c||A.length>=5,onChange:R=>{const V=[...R.target.files??[]];R.target.value="",D(V)}})]}),o.jsx("textarea",{ref:_,id:a,rows:1,maxLength:32e3,value:L,onPaste:F,placeholder:r,disabled:c,"aria-label":x("composer.input"),onChange:R=>{I(R.target.value),u&&q.track(R.target.value)},onKeyDown:R=>{u&&q.onKeyDown(R)||R.key==="Enter"&&!R.shiftKey&&!R.nativeEvent.isComposing&&(R.preventDefault(),K())},onClick:()=>{u&&q.track()},onBlur:u?q.leaves:void 0}),o.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":x("composer.send"),disabled:j||T||c||!L.trim()&&!A.length&&!b.passages.length,children:o.jsx(ze,{name:"arrow-up"})})]})]})}function HL({messages:e,members:a,me:i,activeQuestion:r,onSettled:c,onPreview:u,onQuote:d,onReact:f,onJump:m,onError:v,bot:y}){return o.jsx(o.Fragment,{children:e.map((p,b)=>{const j=e[b+1],S=p.role==="assistant"&&!!(j!=null&&j.question)&&j.senderId===p.senderId;return o.jsxs("div",{className:`ui-message-row ${p.role==="user"?"ui-user":""}`,"data-message":p.id,"data-asks":S||void 0,tabIndex:-1,children:[p.role==="assistant"&&o.jsx("span",{className:"jarvy-bubble-avatar",children:o.jsx(ro,{color:(y==null?void 0:y.color)??"gray",mood:y==null?void 0:y.mood,size:22,crown:y==null?void 0:y.agent})}),o.jsxs("div",{className:"jv-dm-stack",children:[p.replyTo&&o.jsx(qS,{message:p,members:a,onJump:m}),p.question?o.jsx(zS,{message:{...p,question:p.question},keyboard:p.id===r,onSettled:c}):o.jsxs("div",{className:"ui-bubble",children:[p.content&&o.jsx(IS,{message:p,members:a,me:i,onJump:m}),p.attachments.length>0&&o.jsx(OS,{files:p.attachments,onOpen:k=>u(p.attachments,k)})]}),o.jsx(FS,{message:p,me:i,members:a,onReact:f,onError:v})]}),o.jsx("div",{className:"jv-row-actions",children:o.jsx(VS,{message:p,me:i,onReply:d,onReact:f,onError:v})})]},p.id)})})}function PL(e,a,i,r,c,u=0){const v=a.offsetWidth,y=a.offsetLeft,p=a.offsetTop,b=Math.max(300,Math.round(i*.4));e.style.maxHeight="";const j=e.hasAttribute("data-fit"),S=e.offsetHeight,k=R=>R==="left"||R==="right",C=R=>R==="left"?y-10-8:R==="right"?i-y-v-10-8:R==="below"?r-p-v-10-8:p-10-8,E=y+v/2>i/2,M=R=>j?k(R)?Math.min(b,Math.max(160,C(R))):Math.min(b,E?y+v-8:i-y-8):e.offsetWidth,T=R=>k(R)?M(R)<=C(R):Math.min(120,S)<=C(R),_=u>.05?"right":u<-.05?"left":null,A=(_==="left"||_===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(T)??(C("below")>=C("above")?"below":"above"),H=e.dataset.side,q=H!==void 0&&H!==A&&k(H)===k(A)&&T(H)&&C(H)+40>=C(A)?H:A,D=j&&(q==="left"||!k(q)&&E),$=q==="left"?y-10:q==="right"?y+v+10:E?y+v:y;e.style.width="",e.style.maxWidth=j?`${M(q)}px`:"",D?(e.style.left="",e.style.right=`${i-$}px`):(e.style.right="",j&&(e.style.left=`${$}px`));const F=e.offsetWidth,W=j?D?$-F:$:q==="left"?y-10-F:q==="right"?y+v+10:Math.min(Math.max(8,y+v-F),Math.max(8,i-F-8)),Y=c&&W<c.right&&W+F>c.left?c.bottom+6:0,P=Math.min(Math.max(8,Y),Math.max(8,r-140));let K;q==="below"?(K=Math.max(8,Math.min(p+v+10,r-8-Math.min(S,120))),e.style.maxHeight=`${Math.max(40,r-K-8)}px`):q==="above"?(e.style.maxHeight=`${Math.max(40,p-10-P)}px`,K=Math.max(P,p-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,r-P-8)}px`,K=Math.min(Math.max(P,p+6),Math.max(P,r-e.offsetHeight-8))),j||(e.style.left=`${W}px`),e.style.top=`${K}px`,e.dataset.side=q,e.style.setProperty("--npc-tail",k(q)?`${Math.min(e.offsetHeight-18,Math.max(18,p+v/2-K))}px`:`${Math.min(F-18,Math.max(18,y+v/2-W))}px`)}const gb=.06,UL=matchMedia("(prefers-reduced-motion: reduce)");function gd({text:e,limit:a,streaming:i=!1}){const[,r]=w.useState(0),c=w.useRef({text:"",count:0,rate:gb,at:performance.now()}),u=performance.now(),d=c.current;d.count=Math.min(d.text.length,d.count+d.rate*(u-d.at)),d.at=u,e!==d.text&&(d.text=e,d.count=Math.min(d.count,e.length),d.rate=Math.max(gb,(e.length-d.count)/a));const f=!UL.matches&&d.count<e.length;w.useEffect(()=>{if(!f)return;const v=requestAnimationFrame(()=>r(y=>y+1));return()=>cancelAnimationFrame(v)});const m=f?e.slice(0,Math.floor(d.count)).replace(/[\uD800-\uDBFF]$/,""):e;return o.jsxs(o.Fragment,{children:[m,(f||i)&&o.jsx("i",{className:"jv-npc-caret"})]})}function qL({className:e,children:a,onReading:i}){const r=w.useRef(null),c=w.useRef(null),u=w.useRef(i),[d,f]=w.useState(!1);return u.current=i,w.useEffect(()=>{const m=r.current,v=c.current;if(!m||!v)return;let y=!0,p=0;const b=()=>{m.scrollTop=m.scrollHeight,p=m.scrollTop},j=()=>{y&&b(),f(m.scrollTop>1)},S=()=>{const C=m.scrollHeight-m.scrollTop-m.clientHeight<4;C&&!y?(y=!0,p=m.scrollTop,u.current(!1)):!C&&y&&(m.scrollTop<p-1?(y=!1,u.current(!0)):b()),f(m.scrollTop>1)},k=new ResizeObserver(j);return k.observe(v),k.observe(m),j(),m.addEventListener("scroll",S,{passive:!0}),()=>{k.disconnect(),m.removeEventListener("scroll",S),u.current(!1)}},[]),o.jsx("span",{ref:r,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:o.jsx("span",{ref:c,children:a})})}const a5={think:Z8,mutter:RC,read:lC,write:jC,run:DC,script:W8,compact:G8,retry:j0,ask:Uj,say:gC,chat:Gj,tool:BC},c0=e=>x("npc.duration",{value:Ii(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),FL={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function VL({view:e,name:a,cat:i,area:r,avoid:c,layout:u,facing:d,toolbar:f}){var $,F,W;const m=w.useRef(null),v=w.useRef(null),[y,p]=w.useState(!1),[,b]=w.useState(0);w.useLayoutEffect(()=>{u.current=()=>{var V;if(!m.current||!i.current||!r.current)return;const P=r.current.getBoundingClientRect(),K=c.current?c.current.getBoundingClientRect().top-P.top:P.height,R=(V=v.current)==null?void 0:V.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),PL(m.current,i.current,P.width,K,R?{left:R.left-P.left,right:R.right-P.left,bottom:R.bottom-P.top}:null,d())},u.current();const Y=new ResizeObserver(()=>{var P;return(P=u.current)==null?void 0:P.call(u)});for(const P of[m.current,v.current])P&&Y.observe(P);return()=>{Y.disconnect(),u.current=null}},[y]);const j=e.steps.some(Y=>Y.state==="running");w.useEffect(()=>{if(!y||!j)return;const Y=setInterval(()=>b(P=>P+1),200);return()=>clearInterval(Y)},[y,j]),w.useEffect(()=>{if(!y)return;const Y=P=>{P.key==="Escape"&&p(!1)};return addEventListener("keydown",Y),()=>removeEventListener("keydown",Y)},[y]);const S=($=e.steps[0])==null?void 0:$.id;w.useEffect(()=>{p(!1)},[S]);const[k,C]=w.useState(!1),[E,M]=w.useState(!1),[T,_]=w.useState(null),L=k||E;w.useEffect(()=>{var Y;_(L?((Y=e.shown)==null?void 0:Y.id)??null:null)},[L]);const A=T&&e.steps.find(Y=>Y.id===T)||e.shown,H=A?A.look:e.done?"action":null;let I=null;if((A==null?void 0:A.look)==="thought"||(A==null?void 0:A.look)==="mutter"){const Y=(A.line??"").replace(/\n\s*\n\s*/g,`
547
+
548
+ `).trim(),P=o.jsx(gd,{text:Y,limit:300,streaming:A.look==="thought"&&A.state==="running"},A.id),[K,R]=x("npc.mutter",{text:""}).split("");I=o.jsx(qL,{className:A.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:M,children:A.look==="thought"?P:o.jsxs(o.Fragment,{children:[K,P,R]})},A.id)}else if((A==null?void 0:A.look)==="speech")I=o.jsx("span",{className:"jv-npc-speech",children:o.jsx(gd,{text:A.line??"",limit:1500,streaming:A.state==="running"&&A.icon==="say"},A.id)});else if(A){const Y=a5[A.icon];I=o.jsxs("span",{className:"jv-npc-action","data-state":A.state,children:[o.jsx(Y,{}),o.jsx(gd,{text:A.title,limit:300},A.id),A.state==="running"&&o.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(I=o.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?o.jsx(da,{}):o.jsx(cs,{}),o.jsx(gd,{text:x(FL[e.done.outcome],{duration:c0(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const q=e.steps.length>0,D=(A==null?void 0:A.icon)==="ask"&&A.state==="running";return w.useEffect(()=>{I||C(!1)},[!I]),o.jsxs(o.Fragment,{children:[f==null?void 0:f(v,()=>p(!1)),o.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:H??void 0,"data-kind":A==null?void 0:A.icon,"data-fading":!y&&!A&&((F=e.done)==null?void 0:F.fading)||void 0,hidden:!y&&!I,onPointerEnter:Y=>{Y.pointerType==="mouse"&&C(!0)},onPointerLeave:()=>C(!1),children:y?o.jsxs("section",{className:"jv-npc-panel","aria-label":x("npc.panel"),children:[o.jsxs("header",{children:[o.jsx("strong",{children:x("npc.panel")}),e.startedAt>0&&o.jsx("span",{children:c0((e.endedAt??Date.now()+e.skew)-e.startedAt)}),o.jsx("button",{type:"button",onClick:()=>p(!1),"aria-label":x("npc.collapse"),title:x("npc.collapse"),children:o.jsx(yC,{})})]}),o.jsx("ol",{children:e.steps.map(Y=>o.jsx($L,{step:Y,skew:e.skew},Y.id))})]}):o.jsxs(o.Fragment,{children:[H==="speech"&&o.jsxs("span",{className:"jv-npc-name",children:[a,(A==null?void 0:A.to)&&o.jsx("em",{children:x("npc.to",{chat:A.to})})]}),q?o.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>p(!0),title:x("npc.expand"),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),p(!0))},children:I}):o.jsx("div",{className:"jv-npc-line",children:I}),D&&e.answer&&((W=A.options)==null?void 0:W.some(Y=>Y.value))&&o.jsx("div",{className:"jv-npc-options",children:A.options.map(Y=>o.jsx("button",{type:"button",onClick:()=>e.answer(Y.value),children:Y.label},Y.label))}),D&&!e.answer&&A.hint&&o.jsx("p",{className:"jv-npc-hint",children:A.hint})]})})]})}function $L({step:e,skew:a}){const[i,r]=w.useState(!1),c=a5[e.icon],u=e.detail;return o.jsxs("li",{"data-state":e.state,style:e.depth?{paddingLeft:`${e.depth*16}px`}:void 0,children:[o.jsxs("button",{type:"button","aria-expanded":u?i:void 0,disabled:!u,onClick:()=>r(d=>!d),children:[o.jsx(c,{className:"jv-npc-kind"}),o.jsx("span",{className:"jv-npc-title",children:e.title}),o.jsxs("span",{className:"jv-npc-state",children:[e.state==="running"?o.jsx(Bj,{}):e.state==="ok"?o.jsx(da,{}):o.jsx(cs,{}),x(`npc.state.${e.state}`)]}),o.jsx("span",{className:"jv-npc-time",children:c0((e.endedAt??Date.now()+a)-e.startedAt)}),u&&o.jsx(tl,{className:"jv-npc-chevron"})]}),i&&u&&o.jsx("pre",{"data-kind":e.icon,children:u})]})}const Td="src/web/thread/ThreadPane.tsx",Vd="npm run build",GL=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
549
+ `),YL=["> tsc -p tsconfig.web.json","src/web/thread/ThreadPane.tsx:58:41 - error TS2345: Argument of type","'HTMLDivElement | null' is not assignable to parameter of type 'HTMLDivElement'.","","Found 1 error."].join(`
550
+ `),i5={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},XL=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:Td,ms:2600,output:GL},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:Td,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
551
+ `)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:Vd,ms:3200,failed:!0,output:YL},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:Td,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:Vd,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
552
+ `)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...i5},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],u0=[{key:"sleep",label:"npc.pose.sleep",motion:"sleep"},{key:"idle",label:"npc.pose.idle",motion:"idle"},{key:"think",label:"npc.pose.think",motion:"think",step:{kind:"think",text:"npc.demo.think1"}},{key:"mutter",label:"npc.pose.mutter",motion:"work",step:{kind:"mutter",text:"npc.demo.mutter2"}},{key:"say",label:"npc.pose.say",motion:"turn",step:{kind:"say",text:"npc.demo.replyNo"}},{key:"ask",label:"npc.pose.ask",motion:"ask",step:{kind:"ask",...i5}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:Td}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:Vd}},{key:"compact",label:"npc.pose.compact",motion:"yawn",step:{kind:"compact"}},{key:"busy",label:"npc.pose.busy",motion:"busy"},{key:"failed",label:"npc.pose.failed",motion:"idle",mood:"dizzy",shake:!0,step:{kind:"run",target:Vd,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function KL({controls:e,onReplay:a,toolbar:i}){const[r,c]=w.useState(!1);return o.jsxs("div",{ref:i,className:"jv-npc-toolbar",role:"toolbar","aria-label":x("npc.toolbar"),children:[o.jsxs("div",{className:"jv-npc-toolbar-row",children:[o.jsx("span",{children:x("npc.toolbar")}),o.jsx("button",{type:"button",className:"jv-npc-icon",onClick:a,"aria-label":x("npc.replay"),title:x("npc.replay"),children:o.jsx(NC,{})}),o.jsxs(mr,{value:e.baseMood,onValueChange:u=>e.setBaseMood(u),children:[o.jsx(gr,{className:"jv-npc-mood","aria-label":x("npc.mood"),title:x("npc.mood"),children:o.jsx(pr,{})}),o.jsx(vr,{className:"jv-select-menu",position:"popper",sideOffset:4,children:Dz.map(u=>o.jsx(ca,{value:u,children:x(`npc.mood.${u}`)},u))})]}),o.jsxs("button",{type:"button",className:"jv-npc-toggle","aria-expanded":r,onClick:()=>c(u=>!u),children:[o.jsx(TC,{}),x("npc.poses")]})]}),r&&o.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":x("npc.poses"),children:u0.map(u=>{var d;return o.jsx("button",{type:"button","aria-pressed":((d=e.pose)==null?void 0:d.key)===u.key,onClick:()=>e.hold(u.key),children:x(u.label)},u.key)})})]})}const QL={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},vb=e=>e.text?[...x(e.text)].slice(0,e.typed).join(""):"";function ZL(e){var r;if(e.kind==="think"||e.kind==="mutter")return x(`npc.step.${e.kind}`);if(e.kind==="ask"&&e.answer)return x("npc.step.ask.ok",{answer:x(e.answer.label)});const a=e.state==="failed"&&e.kind==="run"?"failed":e.state==="running"?"running":"ok",i=e.kind==="say"&&e.to?"post":e.kind;return x(`npc.step.${i}.${a}`,{target:((r=e.target)==null?void 0:r.split("/").pop())??"",chat:e.to?`#${x(e.to)}`:""})}function yb(e){var r;const a=e.kind==="think"?"thought":e.kind==="mutter"?"mutter":e.kind==="say"||e.kind==="ask"?"speech":"action",i=e.kind==="ask"?x(e.question):vb(e);return{id:String(e.id),look:a,icon:QL[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:ZL(e),line:a==="action"?void 0:i,to:e.to?`#${x(e.to)}`:void 0,options:e.kind==="ask"&&e.state==="running"?(r=e.options)==null?void 0:r.map(c=>({label:x(c.label),value:c.value})):void 0,detail:e.kind==="ask"?x(e.question):e.text?vb(e):e.output}}const vp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},JL=40,xb=6e3,bb=500,WL={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class yp extends Error{}const eB=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...x(e.text)].length:0});function tB(e,a){const[i,r]=w.useState(vp),[c,u]=w.useState(a),[d,f]=w.useState(0),[m,v]=w.useState(null),[,y]=w.useState(0),p=w.useRef(null);w.useEffect(()=>{if(!e||m)return;let _=!0;const L=new Set,A=D=>new Promise(($,F)=>{const W=setTimeout(()=>{L.delete(W),_?$():F(new yp)},D);L.add(W)}),H=(D,$)=>r(F=>({...F,steps:F.steps.map(W=>W.id===D?{...W,...$}:W)})),I=(D,$)=>r(F=>({...F,flash:{mood:D,until:Date.now()+$}})),q=async(D,$,F)=>{const W=[...x($)].length,Y=F?Math.max(16,F/W):JL;for(let P=1;P<=W;P++)H(D,{typed:P}),await A(Y)};return(async()=>{r({...vp}),await A(700);const D=Date.now();let $="";r(W=>({...W,phase:"turn",startedAt:D}));for(const[W,Y]of XL.entries()){const{ms:P,failed:K,replies:R,...V}=Y,ne=R?R[$]:Y.text;if(r(z=>({...z,steps:[...z.steps,{...V,text:ne,id:W,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),Y.kind==="ask"){if($=await new Promise(z=>{p.current=z}),p.current=null,!_)throw new yp;H(W,{state:"ok",endedAt:Date.now(),answer:Y.options.find(z=>z.value===$)});continue}ne?await q(W,ne,Y.kind==="think"?P??null:null):await A(P??1e3),(Y.kind==="mutter"||Y.kind==="say")&&await A(1100),H(W,{state:K?"failed":"ok",endedAt:Date.now()}),K&&(r(z=>({...z,shake:z.shake+1})),I("dizzy",2600),await A(900))}const F=Date.now();for(r(W=>({...W,phase:"stretch",endedAt:F,recapUntil:F+xb})),F-D>2e4&&I("happy",3200),await A(2200);;)r(W=>({...W,phase:"idle"})),await A(9e3),r(W=>({...W,phase:"groom"})),await A(2800)})().catch(D=>{if(!(D instanceof yp))throw D}),()=>{var D;_=!1;for(const $ of L)clearTimeout($);(D=p.current)==null||D.call(p,"")}},[e,d,m]),w.useEffect(()=>{var H;const _=Date.now(),L=[((H=i.flash)==null?void 0:H.until)??0,i.recapUntil-bb,i.recapUntil].filter(I=>I>_);if(!L.length)return;const A=setTimeout(()=>y(I=>I+1),Math.min(...L)-_+20);return()=>clearTimeout(A)});const b=u0.find(_=>_.key===m)??null,j=Date.now(),S=b?null:i.phase==="turn"?[...i.steps].reverse().find(_=>_.state==="running")??null:null,k=b?b.motion:S?WL[S.kind]:i.phase==="stretch"?"stretch":i.phase==="groom"?"groom":i.phase==="turn"?"think":"idle",C=i.flash&&i.flash.until>j?i.flash.mood:null,E=i.endedAt!==null&&j<i.recapUntil,M=b?b.step?eB(b.step):null:S??(i.phase==="turn"?i.steps.at(-1)??null:null);return{...{view:{steps:i.steps.map(yb),shown:M?yb(M):null,startedAt:i.startedAt,endedAt:i.endedAt,skew:0,answer:_=>{var L;return(L=p.current)==null?void 0:L.call(p,_)},done:b!=null&&b.done?{ms:31400,outcome:"completed",fading:!1}:!b&&E?{ms:i.endedAt-i.startedAt,outcome:"completed",fading:j>=i.recapUntil-bb}:null},motion:k,fast:b?!!b.fast:(S==null?void 0:S.kind)==="write"||(S==null?void 0:S.kind)==="run",mood:(b==null?void 0:b.mood)??C??c,shake:i.shake,canRecap:!b&&i.endedAt!==null&&!E,showRecap:()=>r(_=>({..._,recapUntil:Date.now()+xb}))},controls:{pose:b,baseMood:c,setBaseMood:u,replay:()=>{v(null),f(_=>_+1)},hold:_=>{v(_),r(L=>{var A;return{...vp,shake:L.shake+((A=u0.find(H=>H.key===_))!=null&&A.shake?1:0)}})}}}}const nB=4e3,jb={turn:null,last:null,skew:0};function aB(e,a){const i=[...e.steps];let r=e.dropped;for(const c of a)if(c.op==="step"){const u=i.findIndex(d=>d.id===c.step.id);u>=0?i[u]=c.step:i.push(c.step)}else if(c.op==="text"){const u=i.findIndex(v=>v.id===c.id),d=i[u];if(!d)continue;const f=(d.text??"")+c.append,m=Math.max(0,f.length-nB);i[u]={...d,text:f.slice(m),omitted:(d.omitted??0)+m}}else{const u=i.findIndex(d=>d.id===c.id);u>=0&&(i.splice(u,1),r++)}return{...e,steps:i,dropped:r}}function iB(e){const[a,i]=w.useState(jb);return w.useEffect(()=>{if(i(jb),!e)return;const r=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),c=u=>JSON.parse(u.data);return r.addEventListener("snapshot",u=>{const d=c(u);i(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),r.addEventListener("start",u=>{const{turn:d}=c(u);i(f=>({...f,turn:d}))}),r.addEventListener("patch",u=>{const{patches:d}=c(u);i(f=>f.turn?{...f,turn:aB(f.turn,d)}:f)}),r.addEventListener("end",u=>{const{outcome:d,endedAt:f}=c(u);i(m=>m.turn?{...m,turn:null,last:{...m.turn,outcome:d,endedAt:f}}:m)}),()=>r.close()},[e]),a}const xp=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),Di=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",bp=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",rB=e=>{const a=(e??"").split(`
553
+ `)[0].trim();return a.length>40?`${a.slice(0,39)}…`:a},wb=e=>e.type==="channel"?`#${e.title}`:e.title;function jp(e){return e?e.omitted?`${e.head}
554
+ ${x("npc.live.omitted",{count:Ii(e.omitted)})}
555
+ ${e.tail}`:e.head+e.tail:""}const Sb=e=>e.omitted?`${x("npc.live.omitted",{count:Ii(e.omitted)})}
556
+ `:"";function wp(e){switch(e.icon){case"think":return{motion:"think",fast:!1};case"mutter":return{motion:"work",fast:!1};case"read":case"chat":return{motion:"read",fast:!1};case"say":return{motion:"turn",fast:!1};case"ask":return{motion:"ask",fast:!1};case"compact":return{motion:"yawn",fast:!1};case"retry":return{motion:"busy",fast:!1};default:return{motion:"work",fast:!0}}}function lB(e,a,i){const r={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:a},c=(m,v,y)=>({...r,look:"action",icon:m,title:v,detail:y});switch(e.kind){case"thinking":return{...r,look:"thought",icon:"think",title:x("npc.step.think"),line:e.text??"",detail:Sb(e)+(e.text??"")};case"text":return{...r,look:"mutter",icon:"mutter",title:x("npc.step.mutter"),line:e.text??"",detail:Sb(e)+(e.text??"")};case"compaction":return c("compact",x(`npc.live.compact.${Di(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?x("npc.live.tokens",{before:Ii(e.tokensBefore),after:Ii(e.tokensAfter)}):jp(e.output));case"retry":return c("retry",e.state==="running"?x("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):x(`npc.live.retry.${Di(e)}`),jp(e.output))}const u=e.input??{},d=jp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
557
+
558
+ `);switch(e.tool){case"read":return c("read",x(`npc.live.read.${Di(e)}`,{target:bp(u.path)}),f);case"edit":return c("write",x(`npc.live.edit.${Di(e)}`,{target:bp(u.path)}),f);case"write":return c("write",x(`npc.live.write.${Di(e)}`,{target:bp(u.path)}),f);case"bash":return c("run",x(`npc.live.run.${Di(e)}`,{target:rB(u.command)}),f);case"codemode":return c("script",x(`npc.live.script.${Di(e)}`),f);case"chat":return oB(e,r,i,d);default:return c("tool",x(`npc.live.tool.${Di(e)}`,{tool:e.tool??""}),f)}}function oB(e,a,i,r){const c=e.input??{},u=c.action??"",d=c.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==i)?wb(d):void 0;if(u==="messages.send")return{...a,look:"speech",icon:"say",to:f,line:c.text??"",detail:[c.text,e.state==="failed"?r:""].filter(Boolean).join(`
559
+
560
+ `),title:e.state==="failed"?x("npc.live.sendFailed"):f?x(`npc.step.post.${e.state==="running"?"running":"ok"}`,{chat:f}):x(`npc.step.say.${e.state==="running"?"running":"ok"}`)};if(u==="messages.ask"){const y=sB(e);return{...a,look:"speech",icon:"ask",to:f,line:c.text??"",options:(c.options??[]).map(p=>({label:p})),hint:f?x("npc.live.answerIn",{chat:f}):x("npc.live.answerBelow"),detail:[c.text,...(c.options??[]).map(p=>`· ${p}`),r].filter(Boolean).join(`
561
+ `),title:e.state==="running"?x("npc.step.ask.running"):y?x("npc.step.ask.ok",{answer:y}):x(e.state==="failed"?"npc.live.askFailed":"npc.live.askClosed")}}if(u==="environments.switch")return{...a,look:"action",icon:"tool",title:x(`npc.live.switch.${Di(e)}`),detail:r};const m=d?wb(d):"",v=xp.has(u)?m?x(`npc.live.browse.${e.state==="running"?"running":"ok"}`,{chat:m}):x(`npc.live.browseAll.${e.state==="running"?"running":"ok"}`):x(`npc.live.tool.${Di(e)}`,{tool:u||"chat"});return{...a,look:"action",icon:xp.has(u)?"chat":"tool",title:e.state==="failed"&&xp.has(u)?x("npc.live.tool.failed",{tool:u}):v,detail:r}}function sB(e){try{const a=JSON.parse(e.output?e.output.head+e.output.tail:"");return a.status!=="answered"?null:[...(a.selected??[]).map(i=>i.label??""),a.custom??""].filter(Boolean).join(x("common.listSeparator"))}catch{return null}}function kb(e,a){const i=new Map(e.steps.map(c=>[c.id,c.parentId])),r=c=>{let u=0,d=c.parentId;for(;d&&u<4;)u++,d=i.get(d)??null;return u};return e.steps.map(c=>lB(c,r(c),a))}function vd(e){var i;const a=((i=e.line)==null?void 0:i.length)??0;if(e.look==="speech"){const r=Math.min(7e3,Math.max(2500,1500+50*a))+Math.min(1500,a/.06);return{firm:r,light:r}}return e.look==="mutter"?{firm:1500,light:Math.min(3500,Math.max(1500,800+30*a))}:e.state==="failed"?{firm:2e3,light:2e3}:{firm:0,light:e.look==="action"?900:0}}const cB=4e3,Cb=1500;function Nb(e,a,i,r){var j;const c=S=>S-i;let u=null;for(const S of e)S.state==="running"&&(!u||S.startedAt>=u.startedAt)&&(u=S);const d=[];for(const S of e.filter(k=>k.state!=="running"&&k.endedAt!==null&&vd(k).firm).sort((k,C)=>k.endedAt-C.endedAt)){const k=c(S.endedAt),C=d.at(-1);C&&S.look==="speech"&&(C.end=Math.min(C.end,Math.max(C.start+Cb,k)));const E=Math.max(k,(C==null?void 0:C.end)??0);E-k>cB||d.push({step:S,start:E,end:E+vd(S).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const S=c(f.startedAt);for(let k=d.length-1;k>=0;k--){const C=d[k];C.start>=S&&C.start>a?d.splice(k,1):C.end>S&&(C.end=Math.max(C.start+Cb,S))}}let m=null;for(const S of e){if(S.state==="running"||S.endedAt===null||!vd(S).light)continue;const k=c(S.endedAt)+vd(S).light;k>a&&(!m||S.endedAt>=m.step.endedAt)&&(m={step:S,end:k})}const v=d.find(S=>S.start<=a&&a<S.end),y=(v==null?void 0:v.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),p=y??f??u??(r?e.at(-1)??null:null),b=[...d.flatMap(S=>[S.start,S.end]),(m==null?void 0:m.end)??0].filter(S=>S>a);return{shown:p,lingering:!!y,next:b.length?Math.min(...b):0,wordsEnd:((j=d.at(-1))==null?void 0:j.end)??0}}const Eb=6e3,Tb=500,Ab=2200,uB=2e4,dB=10*6e4,_b=3e4,fB=2e4,hB=2800;function mB(e,a,i,r,c){var $;const{turn:u,last:d,skew:f}=iB(e),[m,v]=w.useState(null),[y,p]=w.useState(0),[b,j]=w.useState(0),[,S]=w.useState(0),k=w.useRef(new Set),C=w.useRef(Date.now()),E=w.useMemo(()=>u?kb(u,a):d?kb(d,a):[],[u,d,a]);w.useEffect(()=>{for(const F of(u==null?void 0:u.steps)??[])F.state==="failed"&&!k.current.has(F.id)&&(k.current.add(F.id),p(W=>W+1),v({mood:"dizzy",until:Date.now()+2600}))},[u]),w.useEffect(()=>{d&&(k.current.clear(),C.current=Date.now(),j(Math.max(Date.now(),Nb(E,Date.now(),f,!1).wordsEnd)+Eb),d.outcome==="completed"&&d.endedAt-d.startedAt>uB&&v({mood:"happy",until:Date.now()+3200}))},[d]),w.useEffect(()=>{u&&(C.current=Date.now())},[u!==null]);const M=Date.now(),T=Nb(E,M,f,u!==null),_=T.shown,L=E.filter(F=>F.state==="running").sort((F,W)=>W.startedAt-F.startedAt)[0],A=!u&&(d==null?void 0:d.outcome)==="completed"&&M+f-d.endedAt<Ab,H=M-C.current,I=!u&&(i==null?void 0:i.status)==="idle"&&H>_b&&(H-_b)%fB<hB,q=L&&L.look!=="thought"?wp(L):T.lingering&&_?wp(_):L?wp(L):u?{motion:"think",fast:!1}:A?{motion:"stretch",fast:!1}:I?{motion:"groom",fast:!1}:c,D=!u&&!_&&d!==null&&M<b;return w.useEffect(()=>{const F=[(m==null?void 0:m.until)??0,b-Tb,b,((d==null?void 0:d.endedAt)??0)-f+Ab,T.next].filter(Y=>Y>Date.now()),W=setTimeout(()=>S(Y=>Y+1),F.length?Math.min(...F)-Date.now()+20:1e3);return()=>clearTimeout(W)}),{view:{steps:E,shown:_,skew:f,startedAt:(($=u??d)==null?void 0:$.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:D?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:M>=b-Tb}:null},motion:q.motion,fast:q.fast,mood:m&&m.until>M?m.mood:r,shake:y,canRecap:!u&&d!==null&&!D&&M+f-d.endedAt<dB,showRecap:()=>j(Date.now()+Eb)}}const r5="jarvy-floating-bot",es=10,pB=4,yd=new URLSearchParams(location.search).get("npc")==="demo";function gB(e){return!e||e.status==="stop"?{motion:"sleep",fast:!1}:e.status!=="running"||e.activity==="asking"?{motion:"idle",fast:!1}:["compacting","retrying","aborting"].includes(e.phase)?{motion:"busy",fast:!1}:e.activity==="tool_calling"||e.phase==="tool"?{motion:"work",fast:!0}:e.activity==="texting"||e.phase==="texting"?{motion:"work",fast:!1}:{motion:"think",fast:!1}}function vB(){try{const e=JSON.parse(localStorage.getItem(r5)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function yB({bot:e,chatId:a,status:i,area:r,avoid:c,onOpen:u}){const d=w.useRef(null),f=w.useRef(null),m=w.useRef(vB()),v=w.useRef(null),y=w.useRef(!1),p=w.useRef(null),b=w.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),j=w.useRef(null),[S,k]=w.useState(!1),C=w.useRef(null),E=tB(yd,e.mood),M=mB(yd?null:e.id,a,i,e.mood,gB(i)),T=yd?E:M;b.current.motion=T.motion,b.current.fast=T.fast,b.current.mood=T.mood;function _(){const I=r.current.getBoundingClientRect(),q=d.current.offsetWidth,D=c.current?c.current.getBoundingClientRect().top-I.top:I.height,$=Math.max(es,I.width-q-es),F=Math.max(es,D-q-es);return{minX:es,minY:es,maxX:$,maxY:F}}function L(){var $;const I=($=r.current)==null?void 0:$.getBoundingClientRect(),q=d.current;if(!I||!q)return 0;const D=I.width/2-q.offsetWidth/2;return D>0?Math.max(-1,Math.min(1,(D-q.offsetLeft)/D)):0}function A(){var D;if(!d.current||!r.current)return;const I=_(),q=d.current;q.style.left=`${I.minX+m.current.x*(I.maxX-I.minX)}px`,q.style.top=`${I.minY+m.current.y*(I.maxY-I.minY)}px`,(D=C.current)==null||D.call(C)}w.useLayoutEffect(()=>{A();const I=new ResizeObserver(A);for(const q of[r.current,c.current,d.current])q&&I.observe(q);return()=>I.disconnect()},[]),w.useEffect(()=>{var I;(I=j.current)==null||I.setColor(($a[e.color]??$a.gray).hex)},[e.color]),w.useEffect(()=>{var I;(I=j.current)==null||I.setCrown(e.agent)},[e.agent]);const H=i!=null&&i.error?`${i.runId??""}:${i.error}`:null;return w.useEffect(()=>{var I;H&&((I=j.current)==null||I.shake(performance.now()))},[H]),w.useEffect(()=>{var I;T.shake&&((I=j.current)==null||I.shake(performance.now()))},[T.shake]),w.useEffect(()=>{const I=$=>{($.pointerType==="mouse"||$.type==="pointerdown")&&(p.current={x:$.clientX,y:$.clientY})},q=$=>{$.relatedTarget||(p.current=null)},D=$=>{const F=$.target;if(F.id!=="jarvy-composer")return;const W=F.getBoundingClientRect();p.current={x:W.left+W.width/2,y:W.top+W.height/2}};return window.addEventListener("pointermove",I),window.addEventListener("pointerdown",I),document.addEventListener("pointerout",q),document.addEventListener("input",D),document.addEventListener("focusin",D),()=>{window.removeEventListener("pointermove",I),window.removeEventListener("pointerdown",I),document.removeEventListener("pointerout",q),document.removeEventListener("input",D),document.removeEventListener("focusin",D)}},[]),w.useEffect(()=>{let I=!0,q=0,D=()=>{};const $=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([Ud(()=>import("./three.module-BdMZo7zQ.js"),[]),Ud(()=>import("./figure-DQGUDG-4.js"),[])]).then(([F,W])=>{if(!I||!f.current)return;const Y=new F.WebGLRenderer({canvas:f.current,antialias:!0,alpha:!0});W.configureRenderer(F,Y);const{scene:P,camera:K}=W.createStage(F),R=new W.CatFigure(F,($a[e.color]??$a.gray).hex);R.setCrown(e.agent),R.pose(b.current.mood),P.add(R.root),W.frameCamera(K,1,3.3),j.current=R;let V=0;const ne=J=>{var U;const ee=d.current;if(ee){const G=Math.round(ee.offsetWidth*Math.min(2,devicePixelRatio||1));G!==V&&(V=G,Y.setSize(G,G,!1));const fe=ee.getBoundingClientRect(),xe=p.current;b.current.lookX=xe?Math.max(-1,Math.min(1,(xe.x-fe.left-fe.width/2)/320)):0,b.current.lookY=xe?Math.max(-1,Math.min(1,(xe.y-fe.top-fe.height/2)/320)):0,b.current.reduced=$.matches;const je=b.current.motion,ue=!!((U=v.current)!=null&&U.moved)&&(je==="idle"||je==="groom"||je==="stretch");(b.current.faceX===void 0||!(ue||je==="sleep"))&&(b.current.faceX=L()),R.frame(J,b.current),Y.render(P,K)}q=requestAnimationFrame(ne)},z=()=>{cancelAnimationFrame(q),document.hidden||(q=requestAnimationFrame(ne))};document.addEventListener("visibilitychange",z),z(),k(!0),D=()=>{document.removeEventListener("visibilitychange",z),cancelAnimationFrame(q),R.dispose(),Y.dispose(),Y.forceContextLoss(),j.current=null}}).catch(()=>{}),()=>{I=!1,D()}},[]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":S||void 0,"data-motion":T.motion,title:e.name,"aria-label":x("avatar.openInfo",{name:e.name}),onPointerDown:I=>{if(I.button!==0)return;const q=I.currentTarget;q.setPointerCapture(I.pointerId),v.current={id:I.pointerId,x:I.clientX,y:I.clientY,left:q.offsetLeft,top:q.offsetTop,moved:!1}},onPointerMove:I=>{const q=v.current;if(!q||q.id!==I.pointerId)return;const D=I.clientX-q.x,$=I.clientY-q.y;if(!q.moved&&Math.hypot(D,$)<pB)return;q.moved=!0;const F=_(),W=Math.min(F.maxX,Math.max(F.minX,q.left+D)),Y=Math.min(F.maxY,Math.max(F.minY,q.top+$));m.current={x:F.maxX>F.minX?(W-F.minX)/(F.maxX-F.minX):0,y:F.maxY>F.minY?(Y-F.minY)/(F.maxY-F.minY):0},A()},onPointerUp:I=>{const q=v.current;!q||q.id!==I.pointerId||(v.current=null,y.current=q.moved,q.moved&&localStorage.setItem(r5,JSON.stringify(m.current)))},onPointerCancel:()=>{v.current=null},onClick:()=>{if(y.current){y.current=!1;return}T.canRecap?T.showRecap():u()},style:{"--jv-avatar-size":"100%"},children:[o.jsx("canvas",{ref:f,"aria-hidden":"true"}),!S&&o.jsx(ro,{color:e.color,mood:e.mood,size:88,crown:e.agent})]}),o.jsx(VL,{view:T.view,name:e.name,cat:d,area:r,avoid:c,layout:C,facing:L,toolbar:yd?(I,q)=>o.jsx(KL,{controls:E.controls,toolbar:I,onReplay:()=>{q(),E.controls.replay()}}):void 0})]})}function xB({className:e,...a}){return o.jsx("div",{"data-slot":"card",className:an("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...a})}function bB({className:e,...a}){return o.jsx("div",{"data-slot":"card-header",className:an("grid gap-1 px-5",e),...a})}function jB({className:e,...a}){return o.jsx("div",{"data-slot":"card-title",className:an("font-semibold leading-none",e),...a})}function wB({className:e,...a}){return o.jsx("div",{"data-slot":"card-content",className:an("px-5",e),...a})}function SB({bot:e,connections:a,onSaved:i,onManage:r}){return o.jsxs(xB,{className:"jarvy-model-picker jv-ui",children:[o.jsx(bB,{children:o.jsx(jB,{children:x("botModel.pickFor",{name:e.name})})}),o.jsxs(wB,{children:[o.jsx(SS,{bot:e,connections:a,onSaved:i,onManage:r}),o.jsxs("div",{className:"jv-env-setup",children:[o.jsx("h4",{children:x("environment.title")}),o.jsx(Pz,{bot:e,onSaved:i})]})]})]})}function kB({chat:e,inChannel:a,bots:i,members:r,meId:c,drafts:u,composeReady:d,botName:f,activeBot:m,status:v,connections:y,activity:p,history:b,divider:j,activeQuestion:S,pane:k,onPane:C,onToggleInfo:E,find:M,onNav:T,onBot:_,hasBotDirects:L,onInvite:A,onQuote:H,onReply:I,onReact:q,onJump:D,onSettled:$,onSend:F,onPreview:W,onSaveNote:Y,notice:P,createBot:K,creating:R,updateBot:V,onManageModels:ne,error:z,chatArea:J,transcript:ee,composeWrap:U,hidden:G,onOpenThread:fe}){const{messages:xe,loading:je,hasOlder:ue,loadingOlder:be,top:le,away:se,unseen:me,toLatest:Te}=b;return o.jsxs("main",{className:"ui-chat","aria-label":x("chat.area"),ref:J,hidden:G,children:[!a&&o.jsx(dt,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:x("common.openNav"),onClick:T}),!a&&L&&o.jsx(dt,{icon:"people",className:"jv-floating-dms",label:x("chat.botDms",{name:f}),"aria-pressed":(k==null?void 0:k.kind)==="botdms",onClick:()=>C((k==null?void 0:k.kind)==="botdms"?null:{kind:"botdms"})}),o.jsx("span",{className:"sr-only",role:"status","aria-label":x("chat.botStatus"),children:a?"":p}),e?o.jsxs(o.Fragment,{children:[a?o.jsx(mL,{chat:e,members:oi(r),bots:i,onNav:T,infoOpen:(k==null?void 0:k.kind)==="info"&&k.page==="main",onInfo:()=>E("main"),membersOpen:(k==null?void 0:k.kind)==="info"&&k.page==="members",onMembers:()=>E("members"),threadsOpen:(k==null?void 0:k.kind)==="threads",onThreads:()=>C((k==null?void 0:k.kind)==="threads"?null:{kind:"threads"}),searchOpen:(k==null?void 0:k.kind)==="search",onSearch:()=>(k==null?void 0:k.kind)==="search"?C(null):M.search(e)}):m&&o.jsx(yB,{bot:m,chatId:e.id,status:v,area:J,avoid:U,onOpen:()=>_(m.id)}),a&&o.jsx(pL,{chat:e,onSave:Y}),o.jsxs("div",{className:`ui-transcript jarvy-transcript${a?" jv-channel-transcript":""}`,ref:ee,"aria-label":x("chat.transcript"),role:"log",children:[!a&&!(m!=null&&m.connectionId)&&m&&o.jsx("div",{className:"jarvy-model-onboarding",children:o.jsx(SB,{bot:m,connections:y,onSaved:V,onManage:ne})}),je?o.jsx("p",{className:"jarvy-empty-text",children:x("chat.loading")}):xe.length===0?a?o.jsx("div",{className:"jarvy-empty-chat",children:o.jsx("p",{children:x("chat.empty")})}):m!=null&&m.connectionId?o.jsx("div",{className:"jarvy-empty-chat",children:o.jsx("h2",{children:x("chat.start",{name:f})})}):null:o.jsxs(o.Fragment,{children:[ue&&o.jsx("div",{ref:le,className:"jv-history-more","aria-live":"polite",children:be?x("chat.loadingOlder"):""}),o.jsx("p",{className:"jarvy-date-stamp",children:Ga(xe[0].createdAt,{year:"numeric",month:"long",day:"numeric"})}),a?o.jsx(Fd,{messages:xe,members:r,bots:i,me:c,divider:j,activeQuestion:S,onSettled:$,onPreview:W,onReply:I,onOpenThread:fe,onQuote:H,onReact:q,onJump:D,onError:z}):o.jsx(HL,{messages:xe,members:r,me:c,activeQuestion:S,bot:m,onSettled:$,onPreview:W,onQuote:H,onReact:q,onJump:D,onError:z})]}),se&&xe.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button",onClick:Te,"aria-label":x("chat.toLatest"),children:[me>0&&o.jsx("span",{children:x("chat.unseen",{count:me})}),o.jsx(ze,{name:"chevron-down"})]})})]}),o.jsx(n5,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:U,scrollRef:ee,disabled:!d,placeholder:a?x("chat.toChannel",{name:e.title}):m!=null&&m.connectionId?x("chat.toBot",{name:f}):x("chat.pickModel"),mention:a?{bots:i,inside:oi(r).filter(Le=>Le.id!==c&&e.memberIds.includes(Le.id)),outside:oi(r).filter(Le=>!e.memberIds.includes(Le.id)),onInvite:Le=>A(e.id,Le)}:void 0,onSend:F,onError:z,onNotice:P})]}):o.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:i.length?o.jsx("p",{children:x("chat.pick")}):o.jsxs("button",{className:"ui-button ui-primary",onClick:K,disabled:R,children:[o.jsx(ze,{name:"person-add"}),x("sidebar.newBot")]})}),e&&o.jsx(US,{container:ee,drafts:u,chatId:e.id,source:Le=>xe.find(Ve=>Ve.id===Le),members:r,onNotice:P})]})}const CB=e=>Ga(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function NB(e,a){const[i,r]=w.useState([]);return w.useEffect(()=>{if(r([]),!e)return;let c=!0;return ge.botDirects(e).then(u=>{c&&r(u.chats)}).catch(()=>{}),()=>{c=!1}},[e,a]),i}function EB({bot:e,chats:a,members:i,bots:r,me:c,tick:u,onClose:d,onPreview:f,onError:m}){const[v,y]=w.useState(null),[p,b]=w.useState(null);w.useEffect(()=>{if(b(null),!v)return;let k=!0;return ge.messages(v).then(C=>{k&&b(C.messages)}).catch(C=>{k&&m(C)}),()=>{k=!1}},[v,u]);const j=k=>i.find(C=>C.id!==e.id&&k.memberIds.includes(C.id)),S=a.find(k=>k.id===v);return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("chat.botDms",{name:e.name}),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[S&&o.jsx(dt,{icon:"chevron-left",label:x("directs.back"),onClick:()=>y(null)}),o.jsx("strong",{children:S?x("directs.between",{name:e.name,other:Fi(j(S))}):x("chat.botDms",{name:e.name})}),o.jsx("span",{className:"jv-spacer"}),o.jsx(dt,{icon:"close",label:x("common.close"),onClick:d})]}),S?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ui-pane-body jv-pane-body",children:p===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):p.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("chat.empty")}):o.jsx(Fd,{messages:p,members:i,bots:r,me:c,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:f})}),o.jsx("p",{className:"jv-readonly",children:x("directs.readOnly")})]}):o.jsx("div",{className:"ui-pane-body jv-pane-body",children:a.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("sidebar.noDms")}):a.map(k=>{const C=j(k);return o.jsxs("button",{type:"button",className:"jv-thread-item",onClick:()=>y(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx(wr,{member:C,bots:r,size:20}),o.jsx("strong",{children:Fi(C)}),o.jsx("span",{className:"jv-muted",children:CB(k.updatedAt)})]}),k.lastMessage&&o.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Ic(k.lastMessage)})]},k.id)})})]})}function TB(e,a){return e!=null&&e.connectionId?a!=null&&a.error?{label:x("activity.error"),tone:"error"}:(a==null?void 0:a.status)==="running"?{label:LS(a.activity),tone:"busy"}:{label:x((a==null?void 0:a.status)==="idle"?"activity.idle":"activity.stopped")}:{label:x("activity.noModel")}}function AB({channel:e,members:a,bots:i,statuses:r,me:c,onAdd:u,onBot:d,onChanged:f,onError:m}){const[v,y]=w.useState(null),p=a.filter(k=>e.memberIds.includes(k.id)),b=p.filter(k=>k.kind!=="bot").sort((k,C)=>+(C.id===c)-+(k.id===c)),j=p.filter(k=>k.kind==="bot"),S=k=>{const C=k.kind==="bot"?i.find(_=>_.id===k.id):void 0,E=r[k.id],M=k.kind==="bot"?TB(C,E):void 0,T=o.jsxs(o.Fragment,{children:[o.jsx(wr,{member:k,bots:i,size:28,working:(E==null?void 0:E.status)==="running"&&E.activity!=="asking"}),o.jsxs("span",{className:"jv-member-name",children:[k.name,k.id===c&&o.jsx("span",{className:"jv-role",children:x("common.you")})]}),M&&o.jsx("span",{className:"jv-member-state","data-tone":M.tone,children:M.label})]});return o.jsxs("div",{className:"jv-member-row",children:[C?o.jsx("button",{type:"button",className:"jv-member-main","aria-label":x("members.view",{name:k.name}),onClick:()=>d(k.id),children:T}):o.jsx("div",{className:"jv-member-main",children:T}),k.id!==c&&o.jsx(dt,{icon:"close",label:x("members.remove",{name:k.name}),className:"jv-member-remove",onClick:()=>y(k)})]},k.id)};return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-member-bar",children:[o.jsx("span",{children:x("members.count",{count:p.length})}),o.jsxs("button",{type:"button",className:"ui-button ui-primary jv-member-pane-add",onClick:u,children:[o.jsx(ze,{name:"person-add"}),x("common.add")]})]}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",x("members.people"),b],["bots","Bot",j]].map(([k,C,E])=>E.length>0&&o.jsxs("section",{className:"jv-member-group","aria-label":C,children:[o.jsxs("h3",{children:[C," · ",E.length]}),E.map(S)]},k))}),v&&o.jsx(YS,{title:x("members.removeTitle",{name:v.name,channel:e.title}),body:x("members.removeBody"),confirm:x("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{f(await ge.removeMember(e.id,v.id)),y(null)}catch(k){m(k)}}})]})}function Mb({label:e,value:a,empty:i,maxLength:r,required:c=!1,onSave:u}){const d=w.useId(),[f,m]=w.useState(null),[v,y]=w.useState(!1);w.useEffect(()=>m(null),[a]);const p=async()=>{if(!(f===null||v||c&&!f.trim())){if(f.trim()===a){m(null);return}y(!0);try{await u(f.trim()),m(null)}catch{}finally{y(!1)}}};return o.jsxs("div",{className:"jv-info-field",children:[o.jsxs("div",{className:"jv-info-label",children:[o.jsx("label",{htmlFor:d,children:e}),f===null&&o.jsx(dt,{icon:"pencil",label:x("info.edit",{name:e}),className:"jv-info-edit",onClick:()=>m(a)})]}),f===null?o.jsx("p",{className:"jv-info-value","data-empty":!a||void 0,children:a||i}):o.jsxs("div",{className:"jv-inline-edit",children:[o.jsx("input",{id:d,value:f,maxLength:r,autoFocus:!0,placeholder:i,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),p()),b.key==="Escape"&&(b.stopPropagation(),m(null))}}),o.jsx("button",{type:"button",className:"ui-button",onClick:()=>m(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:v||c&&!f.trim(),onClick:()=>void p(),children:x("common.save")})]})]})}function _B({channel:e,page:a,sections:i,members:r,bots:c,statuses:u,me:d,onPage:f,onPin:m,onMute:v,onAdd:y,onBot:p,onDelete:b,onChanged:j,onClose:S,onError:k}){const C=w.useId(),E=async T=>{try{j(await ge.updateChannel(e.id,T))}catch(_){throw k(_),_}},M=r.filter(T=>e.memberIds.includes(T.id)).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x(a==="members"?"info.memberList":"entry.channelInfo"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[a==="members"&&o.jsx(dt,{icon:"chevron-left",label:x("info.back"),className:"jv-pane-back",onClick:()=>f("main")}),o.jsx("strong",{children:x(a==="members"?"channel.members":"entry.channelInfo")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),o.jsx("span",{className:"jv-spacer"}),o.jsx(dt,{icon:"close",label:x("common.close"),onClick:S})]}),a==="members"?o.jsx(AB,{channel:e,members:r,bots:c,statuses:u,me:d,onAdd:y,onBot:p,onChanged:j,onError:k}):o.jsxs("div",{className:"ui-pane-body jv-pane-body jv-info",children:[o.jsxs("div",{className:"jv-info-actions",children:[o.jsxs("button",{type:"button","aria-pressed":e.pinned,onClick:m,children:[o.jsx(ze,{name:"pin"}),x("entry.pin")]}),o.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:v,children:[o.jsx(ze,{name:e.muted?"bell-slash":"bell"}),x("entry.mute")]}),o.jsxs("button",{type:"button",onClick:y,children:[o.jsx(ze,{name:"person-add"}),x("info.addMembers")]})]}),o.jsx(Mb,{label:x("info.name"),value:e.title,empty:x("info.newChannel"),maxLength:80,required:!0,onSave:T=>E({name:T})}),o.jsx(Mb,{label:x("info.topic"),value:e.topic,empty:x("info.noTopic"),maxLength:200,onSave:T=>E({topic:T})}),o.jsxs("div",{className:"jv-info-field",children:[o.jsx("div",{className:"jv-info-label",children:o.jsx("label",{htmlFor:C,children:x("info.section")})}),o.jsx(ES,{id:C,value:e.sectionId,sections:i,onChange:T=>void E({sectionId:T}).catch(()=>{})})]}),o.jsxs("nav",{className:"jv-info-menu","aria-label":x("info.menu"),children:[o.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>f("members"),children:[o.jsx(ze,{name:"people"}),o.jsx("span",{className:"ui-menu-copy",children:x("channel.members")}),o.jsx("span",{className:"jv-muted",children:M}),o.jsx(ze,{name:"chevron-right"})]}),o.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:b,children:[o.jsx(ze,{name:"trash"}),o.jsx("span",{className:"ui-menu-copy",children:x("entry.deleteChannel")})]})]})]})]})}function MB({chat:e,chats:a,members:i,focusKey:r,onOpenMessage:c,onClose:u,onError:d}){const[f,m]=w.useState(""),v=w.useRef(null);w.useEffect(()=>{var j,S;(j=v.current)==null||j.focus(),(S=v.current)==null||S.select()},[r,e.id]);const{result:y,loading:p}=XS(f,e.id,d),b=e.type==="channel"?`#${e.title}`:x(e.type==="thread"?"search.inThread":"search.inDm");return o.jsxs("aside",{className:"ui-pane jv-pane jv-search-pane","aria-label":x("search.paneLabel"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("search.title")}),o.jsx("span",{className:"jv-muted jv-pane-sub",children:b}),o.jsx("span",{className:"jv-spacer"}),o.jsx(dt,{icon:"close",label:x("search.close"),onClick:u})]}),o.jsx("div",{className:"jv-pane-search",children:o.jsx("input",{ref:v,type:"search",value:f,placeholder:x(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":x("search.placeholder"),onChange:j=>m(j.target.value),onKeyDown:j=>{j.key==="Escape"&&(j.preventDefault(),f?m(""):u())}})}),o.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:f.trim()?y?y.messages.length?o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-result-count",children:x(y.messages.length>=60?"search.countLatest":"search.count",{count:y.messages.length})}),y.messages.map(({message:j,chat:S})=>o.jsx(ZS,{message:j,chat:S,chats:a,members:i,query:f,showPlace:S.id!==e.id,onOpen:c},j.id))]}):o.jsx("p",{className:"jv-result-empty",children:x("search.noMessages")}):p&&o.jsx("p",{className:"jv-result-empty",children:x("search.searching")}):o.jsx("p",{className:"jv-result-empty",children:x("search.prompt")})})]})}const RB=e=>Ga(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function DB({chat:e,channelName:a,expanded:i=!1,onTitle:r,onStatus:c,onSummary:u,onConclude:d}){var T;const[f,m]=w.useState(null),[v,y]=w.useState(null),[p,b]=w.useState(!1),[j,S]=w.useState(i);w.useEffect(()=>{m(null),y(null),S(i)},[e.id,i]);const k=async(_,L)=>{b(!0);try{await _(),L()}catch{}finally{b(!1)}},C=e.status==="done",E=e.note,M=((T=E==null?void 0:E.text.split(`
562
+ `).find(_=>_.trim()&&!_.startsWith("#")))==null?void 0:T.replace(/[*`|>-]/g,"").trim())??"";return o.jsxs("div",{className:"jv-thread-meta","data-open":j||void 0,children:[o.jsxs("div",{className:"jv-thread-title-row",children:[f===null?o.jsxs(o.Fragment,{children:[o.jsx("h2",{className:"jv-thread-title",title:e.title,children:e.title}),o.jsx(dt,{icon:"pencil",label:x("thread.rename"),onClick:()=>m(e.title)})]}):o.jsxs("form",{className:"jv-inline-edit",onSubmit:_=>{_.preventDefault(),f.trim()&&k(()=>r(f.trim()),()=>m(null))},children:[o.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":x("thread.title"),onChange:_=>m(_.target.value),onKeyDown:_=>{_.key==="Escape"&&m(null)}}),o.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:p||!f.trim(),children:x("common.save")})]}),o.jsx("button",{type:"button",className:"jv-thread-status","data-done":C||void 0,disabled:p,title:x("thread.toggleStatus"),onClick:()=>void k(()=>c(C?"open":"done"),()=>{}),children:C?o.jsxs(o.Fragment,{children:[o.jsx(ze,{name:"check"}),x("channel.threadDone")]}):x("threads.open")})]}),v!==null?o.jsxs("div",{className:"jv-summary","data-editing":!0,children:[o.jsx("textarea",{className:"jv-notice-input",value:v,autoFocus:!0,"aria-label":x("thread.summary"),onChange:_=>y(_.target.value)}),o.jsxs("div",{className:"jv-notice-actions",children:[o.jsx("button",{type:"button",className:"ui-button",onClick:()=>y(null),children:x("common.cancel")}),o.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:p||!v.trim(),onClick:()=>void k(()=>u(v.trim()),()=>y(null)),children:x("common.save")})]})]}):E?o.jsxs("div",{className:"jv-summary",children:[o.jsxs("div",{className:"jv-summary-head",children:[o.jsxs("button",{type:"button",className:"jv-summary-toggle","aria-expanded":j,onClick:()=>S(!j),children:[o.jsx("strong",{children:x("thread.summary")}),!j&&o.jsx("span",{className:"jv-summary-first",children:M}),o.jsx(ze,{name:j?"chevron-down":"chevron-right"})]}),j&&o.jsxs("span",{className:"jv-muted jv-summary-meta",children:[E.updatedBy.name," · ",RB(E.updatedAt)," · ",x("notice.version",{version:E.version})]}),o.jsx(dt,{icon:"pencil",label:x("thread.editSummary"),onClick:()=>y(E.text)})]}),j&&o.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:o.jsx(Bc,{text:E.text})}),j&&!C&&o.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:p,onClick:()=>void k(d,()=>{}),children:[o.jsx(ze,{name:"check"}),x("thread.conclude",{channel:a})]})]}):o.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>y(""),children:[o.jsx(ze,{name:"add"}),x("thread.addSummary")]})]})}function Rb({threadId:e,mode:a,showSummary:i=!1,focus:r,onSearch:c,channel:u,drafts:d,members:f,bots:m,me:v,tick:y,onClose:p,onToggleMode:b,onNav:j,onChanged:S,onInvite:k,onPreview:C,onError:E,onNotice:M}){const[T,_]=w.useState(null),[L,A]=w.useState(null),[H,I]=w.useState([]),[q,D]=w.useState(null),$=w.useRef(H);$.current=H;const F=w.useRef(null),W=w.useRef(null),Y=w.useRef(null),P=w.useRef(!1),K=w.useRef(!0),[R,V]=w.useState(!1),ne=w.useRef(0),z=w.useRef(0);w.useEffect(()=>{_(null),A(null),I([]),D(null),P.current=!1,K.current=!0,V(!1),ne.current=0,z.current=0},[e]),w.useEffect(()=>{let le=!0;return Promise.all([ge.chat(e),ge.messages(e)]).then(async([se,me])=>{if(le&&(_(se),I(me.messages),Y.current!==e&&(Y.current=e,D(se.readSequence)),se.rootMessageId)){const Te=await ge.message(se.rootMessageId);le&&A(Te)}}).catch(se=>{le&&E(se)}),()=>{le=!1}},[e,y]),w.useLayoutEffect(()=>{const le=F.current;if(!le||!T)return;const se=()=>le.scrollTo({top:le.scrollHeight,behavior:"instant"}),me=H.at(-1),Te=(me==null?void 0:me.senderId)===v&&me.sequence>z.current;if(z.current=Math.max(z.current,(me==null?void 0:me.sequence)??0),P.current)(K.current||Te)&&le.scrollTo({top:le.scrollHeight,behavior:"smooth"});else{if(!H.length&&!L)return;P.current=!0;const Le=r?le.querySelector(`[data-message="${r.id}"]`):null;if(Le){if(K.current=!1,Le.scrollIntoView({block:"center"}),r!=null&&r.passage&&HS(Le,r.passage))return;Le.classList.add("jv-jump"),setTimeout(()=>Le.classList.remove("jv-jump"),1600);return}se(),requestAnimationFrame(se)}(K.current||Te)&&(ne.current=(me==null?void 0:me.sequence)??0)},[H,L,T]),w.useEffect(()=>{P.current&&r&&U(r.id,r.passage)},[r]),w.useEffect(()=>{const le=F.current,se=W.current;if(!le||!se)return;const me=new ResizeObserver(()=>{!P.current||!K.current||le.scrollHeight-le.scrollTop-le.clientHeight<8||le.scrollTo({top:le.scrollHeight,behavior:"instant"})});me.observe(se);const Te=()=>{var Le;K.current=le.scrollHeight-le.scrollTop-le.clientHeight<120,K.current&&(ne.current=Math.max(ne.current,((Le=$.current.at(-1))==null?void 0:Le.sequence)??0)),V(!K.current)};return Te(),le.addEventListener("scroll",Te,{passive:!0}),()=>{me.disconnect(),le.removeEventListener("scroll",Te)}},[F.current,e,T]),w.useEffect(()=>{const le=H.at(-1);if(!T||!le||le.chatId!==T.id)return;const se=()=>{if(document.visibilityState!=="visible"||T.readSequence>=le.sequence)return;const me={...T,readSequence:le.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};_(me),ge.markRead(T.id,le.sequence).then(()=>S(me)).catch(E)};return se(),document.addEventListener("visibilitychange",se),()=>document.removeEventListener("visibilitychange",se)},[H,T]);const J=async le=>{try{const se=await le();_(se),S(se)}catch(se){throw E(se),se}},ee=async(le,se,me)=>{try{const Te=await ge.react(le.id,se,me),Le=Ve=>Ve.id===Te.id?{...Ve,reactions:Te.reactions}:Ve;I(Ve=>Ve.map(Le)),A(Ve=>Ve&&Le(Ve))}catch(Te){E(Te)}},U=(le,se)=>{var Te;const me=le&&((Te=F.current)==null?void 0:Te.querySelector(`[data-message="${le}"]`));if(!me){M(x(le?"thread.sourceElsewhere":"app.sourceGone"));return}PS(me,se)},G={onQuote:le=>t5(d,le,f),onReact:ee,onJump:U,onError:E},fe=async(le,se,me,Te,Le=[],Ve=!1)=>{await ge.send(e,le,se,me,Ve,Te,Le);const pt=u?[...new Set(xg(le,oi(f)).filter(tt=>!u.memberIds.includes(tt.member.id)).map(tt=>tt.member.name))]:[];pt.length&&M(x("app.notInChannel",{names:pt.join(x("common.listSeparator")),count:pt.length})),Promise.all([ge.chat(e),ge.messages(e)]).then(([tt,We])=>{_(tt),I(We.messages),S(tt)}).catch(E)},xe=(u==null?void 0:u.title)??x("search.channel"),je=f.find(le=>le.id===(L==null?void 0:L.senderId)),ue=R?H.filter(le=>le.sequence>ne.current&&le.senderId!==v).length:0,be=a==="pane"?"aside":a==="embed"?"section":"main";return o.jsxs(be,{className:a==="pane"?"ui-pane jv-pane":a==="embed"?"ui-chat jv-thread-full jv-thread-embed":"ui-chat jv-thread-full","aria-label":x("thread.label"),onKeyDown:le=>{T&&c&&(le.ctrlKey||le.metaKey)&&le.key.toLowerCase()==="f"&&(le.preventDefault(),c(T))},children:[o.jsxs("header",{className:a==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[a==="full"&&o.jsx(dt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:j}),a==="embed"&&o.jsx(dt,{icon:"chevron-left",className:"ui-mobile-only",label:x("thread.backToList"),onClick:p}),a==="full"?o.jsxs("button",{type:"button",className:"jv-crumb",onClick:p,children:[o.jsx(ze,{name:"chevron-left"}),o.jsx("span",{className:"jv-hash",children:"#"}),xe]}):a==="embed"?o.jsxs("button",{type:"button",className:"jv-crumb",title:x("thread.inChannel"),onClick:b,children:[o.jsx("span",{className:"jv-hash",children:"#"}),xe]}):o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:x("thread.label")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",xe]})]}),o.jsx("span",{className:"jv-spacer"}),T&&c&&o.jsx(dt,{icon:"search",label:x("thread.search"),onClick:()=>c(T)}),T&&o.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":T.following||void 0,title:x(T.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void J(()=>ge.follow(e,!T.following)).catch(()=>{}),children:[o.jsx(ze,{name:"bell"}),x(T.following?"threads.following":"thread.follow")]}),a!=="embed"&&o.jsx(dt,{icon:a==="pane"?"arrows-expand":"arrows-contract",className:"jv-desktop-only",label:x(a==="pane"?"thread.expand":"thread.collapse"),onClick:b}),a==="pane"&&o.jsx(dt,{icon:"close",label:x("thread.close"),onClick:p})]}),T&&o.jsx("div",{className:a==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:o.jsx(DB,{chat:T,channelName:xe,expanded:i,onTitle:le=>J(()=>ge.updateThread(e,{title:le})),onStatus:le=>J(()=>ge.updateThread(e,{status:le})),onSummary:le=>J(()=>ge.setNote(e,le)),onConclude:async()=>{var le;try{await fe(`${x("thread.conclusion")}
563
+
564
+ ${((le=T.note)==null?void 0:le.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),se=>se.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await J(()=>ge.updateThread(e,{status:"done"})),M(x("thread.concluded",{channel:xe}))}catch(se){throw E(se),se}}})}),o.jsxs("div",{ref:F,className:a==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[o.jsxs("div",{ref:W,children:[L&&o.jsx(Fd,{messages:[{...L,thread:null}],members:f,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:ee,onJump:U,onError:E}),o.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:o.jsx("span",{children:H.length?x("channel.replies",{count:H.length}):x("thread.noReplies")})}),o.jsx(Fd,{messages:H,members:f,bots:m,me:v,divider:q??Number.MAX_SAFE_INTEGER,onSettled:le=>I(se=>se.map(me=>me.id===le.id?le:me)),onPreview:C,...G})]}),R&&H.length>0&&o.jsx("div",{className:"jv-to-latest",children:o.jsxs("button",{type:"button","aria-label":x("thread.toLatest"),onClick:()=>{var le;return(le=F.current)==null?void 0:le.scrollTo({top:F.current.scrollHeight,behavior:"smooth"})},children:[ue>0&&o.jsx("span",{children:x("chat.unseen",{count:ue})}),o.jsx(ze,{name:"chevron-down"})]})})]}),o.jsx(n5,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:x("thread.reply"),scrollRef:F,disabled:!T,initialText:H.length===0&&L&&L.senderId!==v&&je&&!je.deleted?`@${je.name} `:void 0,mention:{bots:m,inside:oi(f).filter(le=>le.id!==v&&!!(u!=null&&u.memberIds.includes(le.id))),outside:oi(f).filter(le=>!(u!=null&&u.memberIds.includes(le.id))),onInvite:k},onSend:fe,onError:E,onNotice:M}),o.jsx(US,{container:F,drafts:d,chatId:e,members:f,onNotice:M,source:le=>le===(L==null?void 0:L.id)?L:H.find(se=>se.id===le)})]})}const Sp={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},xd=e=>e.lastReplyAt??e.createdAt;function l5(e,a){const i=a==="created"?(r,c)=>c.createdAt-r.createdAt:a==="status"?(r,c)=>+(r.status==="done")-+(c.status==="done")||xd(c)-xd(r):(r,c)=>xd(c)-xd(r);return[...e].sort(i)}function o5(e){const a=`jarvy-thread-sort-${e}`,[i,r]=w.useState(()=>{const c=localStorage.getItem(a);return c==="created"||c==="status"?c:"updated"});return[i,c=>{r(c),localStorage.setItem(a,c)}]}function s5({value:e,onChange:a}){return o.jsxs(mr,{value:e,onValueChange:i=>a(i),children:[o.jsxs(gr,{className:"jv-thread-sort","aria-label":x("threadSort.current",{order:x(Sp[e])}),title:x("threadSort.title"),children:[o.jsx(Y8,{}),o.jsx(pr,{})]}),o.jsx(vr,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(Sp).map(i=>o.jsx(ca,{value:i,children:x(Sp[i])},i))})]})}const c5=e=>Ga(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function OB({channel:e,members:a,bots:i,tick:r,onOpen:c,onClose:u,onError:d}){const[f,m]=w.useState(null),[v,y]=w.useState("open"),[p,b]=o5("channel");w.useEffect(()=>{let k=!0;return ge.channelThreads(e.id).then(C=>{k&&m(C.threads)}).catch(C=>{k&&d(C)}),()=>{k=!1}},[e.id,r]);const j=l5((f??[]).filter(k=>v==="all"||k.status===v),p),S=k=>(f??[]).filter(C=>C.status===k).length;return o.jsxs("aside",{className:"ui-pane jv-pane","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[o.jsx("strong",{children:x("channel.threads")}),o.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),o.jsx("span",{className:"jv-spacer"}),o.jsx(s5,{value:p,onChange:b}),o.jsx(dt,{icon:"close",label:x("threads.closeList"),onClick:u})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.byStatus"),children:[["open",x("threads.openCount",{count:S("open")})],["done",x("threads.doneCount",{count:S("done")})],["all",x("threads.all")]].map(([k,C])=>o.jsx("button",{type:"button",role:"tab","aria-selected":v===k,onClick:()=>y(k),children:C},k))}),o.jsx("div",{className:"ui-pane-body jv-pane-body",children:f===null?o.jsx("p",{className:"jv-picker-empty",children:x("threads.loading")}):j.length===0?o.jsx("p",{className:"jv-picker-empty",children:x("threads.none")}):j.map(k=>{const C=a.find(E=>{var M;return E.id===((M=k.root)==null?void 0:M.senderId)});return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":k.unread>0||void 0,onClick:()=>c(k.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:k.title}),k.alerts>0?o.jsx("span",{className:"jv-badge",children:k.alerts}):k.unread>0&&o.jsx("span",{className:"jv-count",children:k.unread}),o.jsx("span",{className:"jv-thread-status","data-done":k.status==="done"||void 0,children:x(k.status==="done"?"channel.threadDone":"threads.open")})]}),k.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(wr,{member:C,bots:i,size:16}),o.jsx("span",{children:Ic(k.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[x("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${c5(k.lastReplyAt)}`:"",k.following?` · ${x("threads.following")}`:""]})]},k.id)})})]})}function zB({threads:e,chats:a,members:i,bots:r,onNav:c,renderThread:u}){const[d,f]=w.useState(e),[m,v]=w.useState(null),[y,p]=w.useState("all"),[b,j]=o5("followed");w.useEffect(()=>f(M=>[...e,...M.filter(T=>!e.some(_=>_.id===T.id)).map(T=>({...T,following:!1,unread:0,alerts:0}))]),[e]);const S=l5(d,b).filter(M=>y==="all"||(y==="unread"?M.unread>0:M.status===y)),k=d.filter(M=>M.unread>0).length,C=d.find(M=>M.id===m),E=M=>d.filter(T=>T.status===M).length;return o.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":x("sidebar.followed"),"data-open":C?"":void 0,children:[o.jsxs("section",{className:"jv-followed-list","aria-label":x("threads.list"),children:[o.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[o.jsxs("div",{className:"ui-header-left",children:[o.jsx(dt,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:x("common.openNav"),onClick:c}),o.jsx("strong",{className:"jv-channel-title",children:x("sidebar.followed")})]}),o.jsx(s5,{value:b,onChange:j})]}),o.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":x("threads.filter"),children:[["all",x("threads.all")],["unread",k?x("threads.unreadCount",{count:k}):x("threads.unread")],["open",x("threads.openCount",{count:E("open")})],["done",x("threads.doneCount",{count:E("done")})]].map(([M,T])=>o.jsx("button",{type:"button",role:"tab","aria-selected":y===M,onClick:()=>p(M),children:T},M))}),o.jsx("div",{className:"jv-followed-items",children:S.length===0?o.jsx("p",{className:"jv-picker-empty",children:x({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):S.map(M=>{const T=i.find(L=>{var A;return L.id===((A=M.root)==null?void 0:A.senderId)}),_=a.find(L=>L.id===M.parentId);return o.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":M.unread>0||void 0,"aria-current":M.id===m||void 0,onClick:()=>v(M.id),children:[o.jsxs("span",{className:"jv-thread-item-head",children:[o.jsx("strong",{children:M.title}),M.alerts>0?o.jsx("span",{className:"jv-badge",children:M.alerts}):M.unread>0&&o.jsx("span",{className:"jv-count",children:M.unread}),o.jsx("span",{className:"jv-thread-status","data-done":M.status==="done"||void 0,children:x(M.status==="done"?"channel.threadDone":"threads.open")})]}),M.root&&o.jsxs("span",{className:"jv-thread-item-root",children:[o.jsx(wr,{member:T,bots:r,size:16}),o.jsx("span",{children:Ic(M.root)})]}),o.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(_==null?void 0:_.title)??""," · ",x("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${c5(M.lastReplyAt)}`:"",M.following?"":` · ${x("threads.notFollowing")}`]})]},M.id)})})]}),C?u(C,()=>v(null)):o.jsx("div",{className:"jv-followed-empty",children:o.jsx("p",{children:x("threads.pick")})})]})}function LB({pane:e,followedView:a,followed:i,chats:r,sections:c,members:u,bots:d,statuses:f,meId:m,drafts:v,tick:y,paneChannel:p,activeBot:b,botDirects:j,find:S,onPane:k,onNav:C,onBackToChannel:E,onAddMembers:M,onOpenBot:T,onPin:_,onMute:L,onDeleteChannel:A,onChannelSaved:H,onThreadChanged:I,onInvite:q,onPreview:D,onNotice:$,onError:F,paneWidth:W,onResize:Y}){var V,ne;const P=(e==null?void 0:e.kind)==="thread"?e:null,K=(P==null?void 0:P.mode)==="full",R=()=>k(null);return o.jsxs(o.Fragment,{children:[a&&!K&&o.jsx(zB,{threads:i,chats:r,members:u,bots:d,onNav:C,renderThread:(z,J)=>o.jsx(Rb,{threadId:z.id,mode:"embed",channel:r.find(ee=>ee.id===z.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:I,onClose:J,onToggleMode:()=>E({id:z.id,parentId:z.parentId},!0),onInvite:ee=>q(z.parentId,ee),onPreview:D,onError:F,onNotice:$},z.id)}),P&&o.jsx(Rb,{threadId:P.id,mode:P.mode,showSummary:P.summary,focus:P.focus,onSearch:S.search,channel:r.find(z=>z.id===P.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:I,onClose:()=>K?E(P,!1):R(),onToggleMode:()=>K?E(P,!0):k({...P,mode:"full"}),onInvite:z=>q(P.parentId,z),onPreview:D,onError:F,onNotice:$},`${P.id}:${((V=P.focus)==null?void 0:V.id)??""}:${((ne=P.focus)==null?void 0:ne.passage)??""}`),(e==null?void 0:e.kind)==="search"&&o.jsx(MB,{chat:e.chat,chats:r,members:u,focusKey:S.focusKey,onOpenMessage:S.openMessage,onClose:R,onError:F}),(e==null?void 0:e.kind)==="threads"&&p&&o.jsx(OB,{channel:p,members:u,bots:d,tick:y,onOpen:z=>k({kind:"thread",id:z,parentId:p.id,mode:"pane"}),onClose:R,onError:F}),(e==null?void 0:e.kind)==="info"&&p&&o.jsx(_B,{channel:p,page:e.page,sections:c,members:oi(u),bots:d,statuses:f,me:m,onPage:z=>k({kind:"info",page:z}),onPin:()=>_(p),onMute:()=>L(p),onAdd:()=>M(p),onBot:T,onDelete:()=>A(p),onChanged:H,onClose:R,onError:F}),(e==null?void 0:e.kind)==="botdms"&&b&&!p&&o.jsx(EB,{bot:b,chats:j,members:u,bots:d,me:m,tick:y,onClose:R,onPreview:D,onError:F}),e&&!K&&o.jsx("div",{className:"jv-resize",style:{right:W-4},onPointerDown:Y,role:"separator","aria-orientation":"vertical","aria-label":x("app.resizePane")})]})}const Db="@goodfish/jarvy",u5="0.8.0",BB={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},IB="Apache-2.0",d0=BB.url.replace(/^git\+/,"").replace(/\.git$/,""),Ob=`${d0}/blob/v${u5}`,HB=[{label:"about.source",detail:d0.replace(/^https:\/\//,""),href:d0},{label:"about.package",detail:Db,href:`https://www.npmjs.com/package/${Db}`},{label:"about.license",detail:IB,href:`${Ob}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${Ob}/THIRD_PARTY_NOTICE.md`}];function PB(){return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{children:o.jsx("h2",{children:x("settings.about")})})}),o.jsxs("div",{className:"jv-list",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-about-intro",children:[o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:"Jarvy"}),o.jsx("span",{children:x("about.tagline")})]}),o.jsx("span",{className:"jv-row-meta",children:x("about.version",{version:u5})})]}),HB.map(e=>o.jsxs("a",{className:"jv-list-row jv-link-row",href:e.href,target:"_blank",rel:"noreferrer",children:[o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:x(e.label)}),o.jsx("span",{children:e.detail})]}),o.jsx(nC,{"aria-hidden":"true"})]},e.label))]})]})}function UB(){const[e,a]=w.useState(document.documentElement.classList.contains("dark")),i=c=>{Pd(c?"dark":"light"),a(c)},r=(c,u,d,f,m)=>o.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:m,className:"jv-list-row jv-choice-row",onClick:f,children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:u})}),d&&o.jsx(da,{"aria-hidden":"true"})]},c);return o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{children:o.jsx("h2",{children:x("settings.general")})})}),o.jsxs("section",{className:"jv-section","aria-labelledby":"general-language",children:[o.jsx("h3",{id:"general-language",className:"jv-section-title",children:x("general.language")}),o.jsx("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-language",children:$b.map(c=>r(c,Tp(c,"name"),$d()===c,()=>Xb(c),c))})]}),o.jsxs("section",{className:"jv-section","aria-labelledby":"general-theme",children:[o.jsx("h3",{id:"general-theme",className:"jv-section-title",children:x("general.theme")}),o.jsxs("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-theme",children:[r("light",x("general.light"),!e,()=>i(!1)),r("dark",x("general.dark"),e,()=>i(!0))]})]})]})}const qB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.797 6.282a.451.451 0 01-.336-.315 1.019 1.019 0 010-.505c.156-.86.3-1.725.501-2.577.14-.7.42-1.367.823-1.96.305-.431.75-.746 1.262-.89.877-.217 1.24.629.937 1.348-.259.593-.877.914-1.334 1.348-.835.795-1.096 2.14-1.336 3.212a.427.427 0 01-.186.277.437.437 0 01-.331.062z" fill="url(#lobe-icons-ant-group-0-_R_0_)" transform="translate(3)"></path><path d="M6.334 4.672c.33-.121.682.146.946.297.278.145.587.219.901.214.231.01.466 0 .688.018 4.098.176 7.484 3.22 8.05 7.237.565 4.016-1.852 7.859-5.745 9.134-3.894 1.276-8.153-.38-10.126-3.935A8.339 8.339 0 013.133 7.081c.348-.278.716-.53 1.102-.755a8.404 8.404 0 001.318-.79c.28-.243.45-.742.781-.864zm4.406 2.15c-2.841.003-4.898 2.533-4.628 5.642.27 3.109 2.781 5.641 5.613 5.665 2.832.024 4.932-2.512 4.658-5.644-.273-3.133-2.802-5.666-5.643-5.663zm.357.57a4.707 4.707 0 013.304 1.446 5.703 5.703 0 011.643 3.49 4.841 4.841 0 01-1.141 3.705v.015a3.923 3.923 0 01-2.808 1.303 4.664 4.664 0 01-3.367-1.387 5.678 5.678 0 01-1.71-3.518 4.832 4.832 0 011.14-3.753 3.923 3.923 0 012.813-1.3h.126z" fill="url(#lobe-icons-ant-group-1-_R_0_)" transform="translate(3)"></path><path d="M2.346 2.054a1.26 1.26 0 01.384-.594.842.842 0 011.165.11c.694.82.169 2.078.142 3.02.013.805.208 1.597.57 2.318.084.134.147.279.186.43a.539.539 0 01-.3.577c-.345.17-.568-.19-.709-.446-.324-.6-.617-1.216-.877-1.846a8.698 8.698 0 01-.618-1.987 7.523 7.523 0 01-.051-.37 3.717 3.717 0 01-.024-.34 2.506 2.506 0 01.132-.872z" fill="url(#lobe-icons-ant-group-2-_R_0_)" transform="translate(3)"></path><defs><linearGradient id="lobe-icons-ant-group-0-_R_0_" x1="31.373%" x2="61.365%" y1="95.551%" y2="-.348%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-1-_R_0_" x1="4.366%" x2="94.359%" y1="65.982%" y2="32.918%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient><linearGradient id="lobe-icons-ant-group-2-_R_0_" x1="56.255%" x2="45.986%" y1="99.257%" y2="1.384%"><stop offset="0%" stop-color="#06F"></stop><stop offset="20%" stop-color="#1677FF"></stop><stop offset="100%" stop-color="#04A6FF"></stop></linearGradient></defs></svg>
565
+ `,FB=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>
566
+ `,VB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.242 1.613A1.11 1.11 0 018.295.857h6.977L8.03 22.316a1.11 1.11 0 01-1.052.755h-5.43a1.11 1.11 0 01-1.053-1.466L7.242 1.613z" fill="url(#lobe-icons-azure-0-_R_0_)"></path><path d="M18.397 15.296H7.4a.51.51 0 00-.347.882l7.066 6.595c.206.192.477.298.758.298h6.226l-2.706-7.775z" fill="#0078D4"></path><path d="M15.272.857H7.497L0 23.071h7.775l1.596-4.73 5.068 4.73h6.665l-2.707-7.775h-7.998L15.272.857z" fill="url(#lobe-icons-azure-1-_R_0_)"></path><path d="M17.193 1.613a1.11 1.11 0 00-1.052-.756h-7.81.035c.477 0 .9.304 1.052.756l6.748 19.992a1.11 1.11 0 01-1.052 1.466h-.12 7.895a1.11 1.11 0 001.052-1.466L17.193 1.613z" fill="url(#lobe-icons-azure-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-0-_R_0_" x1="8.247" x2="1.002" y1="1.626" y2="23.03"><stop stop-color="#114A8B"></stop><stop offset="1" stop-color="#0669BC"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-1-_R_0_" x1="14.042" x2="12.324" y1="15.302" y2="15.888"><stop stop-opacity=".3"></stop><stop offset=".071" stop-opacity=".2"></stop><stop offset=".321" stop-opacity=".1"></stop><stop offset=".623" stop-opacity=".05"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-azure-2-_R_0_" x1="12.841" x2="20.793" y1="1.626" y2="22.814"><stop stop-color="#3CCBF4"></stop><stop offset="1" stop-color="#2892DF"></stop></linearGradient></defs></svg>
567
+ `,$B=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.316 4.8h14.682v4.8H7.31a.302.302 0 00-.308.3v4.2c0 .171.14.3.308.3h9.688v4.8h-4.686a.302.302 0 00-.308.3v4.2c0 .171.141.3.308.3h4.378a.297.297 0 00.308-.3v-4.5h4.694a.302.302 0 00.308-.3v-4.2c0-.171-.14-.3-.308-.3h-4.694V9.6h4.694A.302.302 0 0022 9.3V5.1c0-.171-.14-.3-.308-.3h-4.694V.3c0-.171-.14-.3-.308-.3H2.316A.31.31 0 002 .3v4.2c0 .171.14.3.316.3z"></path></svg>
568
+ `,GB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-bedrock-_R_0_" x1="80%" x2="20%" y1="20%" y2="80%"><stop offset="0%" stop-color="#6350FB"></stop><stop offset="50%" stop-color="#3D8FFF"></stop><stop offset="100%" stop-color="#9AD8F8"></stop></linearGradient></defs><path d="M13.05 15.513h3.08c.214 0 .389.177.389.394v1.82a1.704 1.704 0 011.296 1.661c0 .943-.755 1.708-1.685 1.708-.931 0-1.686-.765-1.686-1.708 0-.807.554-1.484 1.297-1.662v-1.425h-2.69v4.663a.395.395 0 01-.188.338l-2.69 1.641a.385.385 0 01-.405-.002l-4.926-3.086a.395.395 0 01-.185-.336V16.3L2.196 14.87A.395.395 0 012 14.555L2 14.528V9.406c0-.14.073-.27.192-.34l2.465-1.462V4.448c0-.129.062-.249.165-.322l.021-.014L9.77 1.058a.385.385 0 01.407 0l2.69 1.675a.395.395 0 01.185.336V7.6h3.856V5.683a1.704 1.704 0 01-1.296-1.662c0-.943.755-1.708 1.685-1.708.931 0 1.685.765 1.685 1.708 0 .807-.553 1.484-1.296 1.662v2.311a.391.391 0 01-.389.394h-4.245v1.806h6.624a1.69 1.69 0 011.64-1.313c.93 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708a1.69 1.69 0 01-1.64-1.314H13.05v1.937h4.953l.915 1.18a1.66 1.66 0 01.84-.227c.931 0 1.685.764 1.685 1.707 0 .943-.754 1.708-1.685 1.708-.93 0-1.685-.765-1.685-1.708 0-.346.102-.668.276-.937l-.724-.935H13.05v1.806zM9.973 1.856L7.93 3.122V6.09h-.778V3.604L5.435 4.669v2.945l2.11 1.36L9.712 7.61V5.334h.778V7.83c0 .136-.07.263-.184.335L7.963 9.638v2.081l1.422 1.009-.446.646-1.406-.998-1.53 1.005-.423-.66 1.605-1.055v-1.99L5.038 8.29l-2.26 1.34v1.676l1.972-1.189.398.677-2.37 1.429V14.3l2.166 1.258 2.27-1.368.397.677-2.176 1.311V19.3l1.876 1.175 2.365-1.426.398.678-2.017 1.216 1.918 1.201 2.298-1.403v-5.78l-4.758 2.893-.4-.675 5.158-3.136V3.289L9.972 1.856zM16.13 18.47a.913.913 0 00-.908.92c0 .507.406.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zm3.63-3.81a.913.913 0 00-.908.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92zm1.555-4.99a.913.913 0 00-.908.92c0 .507.407.918.908.918a.913.913 0 00.907-.919.913.913 0 00-.907-.92zM17.296 3.1a.913.913 0 00-.907.92c0 .508.406.92.907.92a.913.913 0 00.908-.92.913.913 0 00-.908-.92z" fill="url(#lobe-icons-bedrock-_R_0_)" fill-rule="nonzero"></path></svg>
569
+ `,YB=`<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z" fill="#F15A29" fill-rule="evenodd"></path><path d="M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"></path></svg>
570
+ `,XB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16.493 17.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148 0 01-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054 2.153-.9 2.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92 8.91 15.66 7 12.942 7c-2.503 0-4.628 1.638-5.381 3.903a2.432 2.432 0 00-1.803-.491c-1.21.109-2.153 1.092-2.287 2.32-.027.328 0 .628.054.9C1.56 13.688 0 15.326 0 17.319c0 .19.027.355.027.545 0 .082.08.137.161.137h15.983c.08 0 .188-.055.215-.164l.107-.437" fill="#F38020"></path><path d="M19.238 11.75h-.242c-.054 0-.108.054-.135.109l-.35 1.2c-.134.52-.08.983.162 1.338.215.328.592.518 1.05.518l1.855.11c.054 0 .108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557 1.937l-.134.355c-.027.055.026.137.107.137h6.592c.081 0 .162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777" fill="#FCAD32"></path></svg>
571
+ `,KB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>
572
+ `,QB=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"></path></svg>
573
+ `,ZB=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
574
+ `,JB=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z" fill="#4285F4"></path><path d="M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z" fill="#34A853"></path><path d="M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z" fill="#FBBC05"></path><path d="M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z" fill="#EB4335"></path></svg>
575
+ `,WB=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>
576
+ `,eI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path><path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path><path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path><path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path><path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path><path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path></svg>
577
+ `,tI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>
578
+ `,nI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.897 4h-.024l-.031 2.615h.022c1.715 0 3.046 1.357 5.94 6.246l.175.297.012.02 1.62-2.438-.012-.019a48.763 48.763 0 00-1.098-1.716 28.01 28.01 0 00-1.175-1.629C10.413 4.932 8.812 4 6.896 4z" fill="url(#lobe-icons-meta-0-_R_0_)"></path><path d="M6.873 4C4.95 4.01 3.247 5.258 2.02 7.17a4.352 4.352 0 00-.01.017l2.254 1.231.011-.017c.718-1.083 1.61-1.774 2.568-1.785h.021L6.896 4h-.023z" fill="url(#lobe-icons-meta-1-_R_0_)"></path><path d="M2.019 7.17l-.011.017C1.2 8.447.598 9.995.274 11.664l-.005.022 2.534.6.004-.022c.27-1.467.786-2.828 1.456-3.845l.011-.017L2.02 7.17z" fill="url(#lobe-icons-meta-2-_R_0_)"></path><path d="M2.807 12.264l-2.533-.6-.005.022c-.177.918-.267 1.851-.269 2.786v.023l2.598.233v-.023a12.591 12.591 0 01.21-2.44z" fill="url(#lobe-icons-meta-3-_R_0_)"></path><path d="M2.677 15.537a5.462 5.462 0 01-.079-.813v-.022L0 14.468v.024a8.89 8.89 0 00.146 1.652l2.535-.585a4.106 4.106 0 01-.004-.022z" fill="url(#lobe-icons-meta-4-_R_0_)"></path><path d="M3.27 16.89c-.284-.31-.484-.756-.589-1.328l-.004-.021-2.535.585.004.021c.192 1.01.568 1.85 1.106 2.487l.014.017 2.018-1.745a2.106 2.106 0 01-.015-.016z" fill="url(#lobe-icons-meta-5-_R_0_)"></path><path d="M10.78 9.654c-1.528 2.35-2.454 3.825-2.454 3.825-2.035 3.2-2.739 3.917-3.871 3.917a1.545 1.545 0 01-1.186-.508l-2.017 1.744.014.017C2.01 19.518 3.058 20 4.356 20c1.963 0 3.374-.928 5.884-5.33l1.766-3.13a41.283 41.283 0 00-1.227-1.886z" fill="#0082FB"></path><path d="M13.502 5.946l-.016.016c-.4.43-.786.908-1.16 1.416.378.483.768 1.024 1.175 1.63.48-.743.928-1.345 1.367-1.807l.016-.016-1.382-1.24z" fill="url(#lobe-icons-meta-6-_R_0_)"></path><path d="M20.918 5.713C19.853 4.633 18.583 4 17.225 4c-1.432 0-2.637.787-3.723 1.944l-.016.016 1.382 1.24.016-.017c.715-.747 1.408-1.12 2.176-1.12.826 0 1.6.39 2.27 1.075l.015.016 1.589-1.425-.016-.016z" fill="#0082FB"></path><path d="M23.998 14.125c-.06-3.467-1.27-6.566-3.064-8.396l-.016-.016-1.588 1.424.015.016c1.35 1.392 2.277 3.98 2.361 6.971v.023h2.292v-.022z" fill="url(#lobe-icons-meta-7-_R_0_)"></path><path d="M23.998 14.15v-.023h-2.292v.022c.004.14.006.282.006.424 0 .815-.121 1.474-.368 1.95l-.011.022 1.708 1.782.013-.02c.62-.96.946-2.293.946-3.91 0-.083 0-.165-.002-.247z" fill="url(#lobe-icons-meta-8-_R_0_)"></path><path d="M21.344 16.52l-.011.02c-.214.402-.519.67-.917.787l.778 2.462a3.493 3.493 0 00.438-.182 3.558 3.558 0 001.366-1.218l.044-.065.012-.02-1.71-1.784z" fill="url(#lobe-icons-meta-9-_R_0_)"></path><path d="M19.92 17.393c-.262 0-.492-.039-.718-.14l-.798 2.522c.449.153.927.222 1.46.222.492 0 .943-.073 1.352-.215l-.78-2.462c-.167.05-.341.075-.517.073z" fill="url(#lobe-icons-meta-10-_R_0_)"></path><path d="M18.323 16.534l-.014-.017-1.836 1.914.016.017c.637.682 1.246 1.105 1.937 1.337l.797-2.52c-.291-.125-.573-.353-.9-.731z" fill="url(#lobe-icons-meta-11-_R_0_)"></path><path d="M18.309 16.515c-.55-.642-1.232-1.712-2.303-3.44l-1.396-2.336-.011-.02-1.62 2.438.012.02.989 1.668c.959 1.61 1.74 2.774 2.493 3.585l.016.016 1.834-1.914a2.353 2.353 0 01-.014-.017z" fill="url(#lobe-icons-meta-12-_R_0_)"></path><defs><linearGradient id="lobe-icons-meta-0-_R_0_" x1="75.897%" x2="26.312%" y1="89.199%" y2="12.194%"><stop offset=".06%" stop-color="#0867DF"></stop><stop offset="45.39%" stop-color="#0668E1"></stop><stop offset="85.91%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-1-_R_0_" x1="21.67%" x2="97.068%" y1="75.874%" y2="23.985%"><stop offset="13.23%" stop-color="#0064DF"></stop><stop offset="99.88%" stop-color="#0064E0"></stop></linearGradient><linearGradient id="lobe-icons-meta-2-_R_0_" x1="38.263%" x2="60.895%" y1="89.127%" y2="16.131%"><stop offset="1.47%" stop-color="#0072EC"></stop><stop offset="68.81%" stop-color="#0064DF"></stop></linearGradient><linearGradient id="lobe-icons-meta-3-_R_0_" x1="47.032%" x2="52.15%" y1="90.19%" y2="15.745%"><stop offset="7.31%" stop-color="#007CF6"></stop><stop offset="99.43%" stop-color="#0072EC"></stop></linearGradient><linearGradient id="lobe-icons-meta-4-_R_0_" x1="52.155%" x2="47.591%" y1="58.301%" y2="37.004%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#007CF6"></stop></linearGradient><linearGradient id="lobe-icons-meta-5-_R_0_" x1="37.689%" x2="61.961%" y1="12.502%" y2="63.624%"><stop offset="7.31%" stop-color="#007FF9"></stop><stop offset="100%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-6-_R_0_" x1="34.808%" x2="62.313%" y1="68.859%" y2="23.174%"><stop offset="27.99%" stop-color="#007FF8"></stop><stop offset="91.41%" stop-color="#0082FB"></stop></linearGradient><linearGradient id="lobe-icons-meta-7-_R_0_" x1="43.762%" x2="57.602%" y1="6.235%" y2="98.514%"><stop offset="0%" stop-color="#0082FB"></stop><stop offset="99.95%" stop-color="#0081FA"></stop></linearGradient><linearGradient id="lobe-icons-meta-8-_R_0_" x1="60.055%" x2="39.88%" y1="4.661%" y2="69.077%"><stop offset="6.19%" stop-color="#0081FA"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-9-_R_0_" x1="30.282%" x2="61.081%" y1="59.32%" y2="33.244%"><stop offset="0%" stop-color="#027AF3"></stop><stop offset="100%" stop-color="#0080F9"></stop></linearGradient><linearGradient id="lobe-icons-meta-10-_R_0_" x1="20.433%" x2="82.112%" y1="50.001%" y2="50.001%"><stop offset="0%" stop-color="#0377EF"></stop><stop offset="99.94%" stop-color="#0279F1"></stop></linearGradient><linearGradient id="lobe-icons-meta-11-_R_0_" x1="40.303%" x2="72.394%" y1="35.298%" y2="57.811%"><stop offset=".19%" stop-color="#0471E9"></stop><stop offset="100%" stop-color="#0377EF"></stop></linearGradient><linearGradient id="lobe-icons-meta-12-_R_0_" x1="32.254%" x2="68.003%" y1="19.719%" y2="84.908%"><stop offset="27.65%" stop-color="#0867DF"></stop><stop offset="100%" stop-color="#0471E9"></stop></linearGradient></defs></svg>
579
+ `,aI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="lobe-icons-minimax-_R_0_" x1="0%" x2="100.182%" y1="50.057%" y2="50.057%"><stop offset="0%" stop-color="#E2167E"></stop><stop offset="100%" stop-color="#FE603C"></stop></linearGradient></defs><path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z" fill="url(#lobe-icons-minimax-_R_0_)" fill-rule="nonzero"></path></svg>
580
+ `,iI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>
581
+ `,rI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path></svg>
582
+ `,lI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z" fill="#74B71B" fill-rule="nonzero"></path></svg>
583
+ `,oI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>
584
+ `,sI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
585
+ `,cI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z" fill="#C8FF00"></path></svg>
586
+ `,uI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>
587
+ `,dI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z" fill="#EF2CC1"></path><path d="M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z" fill="#CAAEF5"></path><path d="M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z" fill="#FC4C02"></path></svg>
588
+ `,fI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0l12 20.785H0L12 0z"></path></svg>
589
+ `,hI=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z" fill="#4285F4"></path><path clip-rule="evenodd" d="M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z" fill="#669DF6" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z" fill="#AECBFA" fill-rule="evenodd"></path><path d="M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#AECBFA"></path><path d="M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#669DF6"></path><path d="M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z" fill="#4285F4"></path><path d="M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z" fill="#AECBFA"></path></svg>
590
+ `,mI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path></svg>
591
+ `,pI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
592
+ `,gI=`<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path></svg>
593
+ `,vI=Object.assign({"./antgroup.svg":qB,"./anthropic.svg":FB,"./azure.svg":VB,"./baseten.svg":$B,"./bedrock.svg":GB,"./cerebras.svg":YB,"./cloudflare.svg":XB,"./deepseek.svg":KB,"./fireworks.svg":QB,"./githubcopilot.svg":ZB,"./google.svg":JB,"./groq.svg":WB,"./huggingface.svg":eI,"./kimi.svg":tI,"./meta.svg":nI,"./minimax.svg":aI,"./mistral.svg":iI,"./moonshot.svg":rI,"./nvidia.svg":lI,"./openai.svg":oI,"./opencode.svg":sI,"./openrouter.svg":cI,"./qwen.svg":uI,"./together.svg":dI,"./vercel.svg":fI,"./vertexai.svg":hI,"./xai.svg":mI,"./xiaomimimo.svg":pI,"./zai.svg":gI}),zb={"amazon-bedrock":"bedrock","ant-ling":"antgroup",anthropic:"anthropic",azure:"azure",baseten:"baseten",cerebras:"cerebras","cloudflare-ai-gateway":"cloudflare","cloudflare-workers-ai":"cloudflare",deepseek:"deepseek",fireworks:"fireworks","github-copilot":"githubcopilot",google:"google","google-vertex":"vertexai",groq:"groq",huggingface:"huggingface","kimi-coding":"kimi",meta:"meta",minimax:"minimax","minimax-cn":"minimax",mistral:"mistral",moonshotai:"moonshot","moonshotai-cn":"moonshot",nvidia:"nvidia",openai:"openai","openai-codex":"openai",opencode:"opencode","opencode-go":"opencode",openrouter:"openrouter","qwen-token-plan":"qwen","qwen-token-plan-cn":"qwen","qwen-token-plan-individual":"qwen",together:"together","vercel-ai-gateway":"vercel",xai:"xai",xiaomi:"xiaomimimo","xiaomi-token-plan-ams":"xiaomimimo","xiaomi-token-plan-cn":"xiaomimimo","xiaomi-token-plan-sgp":"xiaomimimo",zai:"zai","zai-coding-cn":"zai"},yI=e=>e&&zb[e]?vI[`./${zb[e]}.svg`]:void 0;function jg({name:e,provider:a}){var r;const i=yI(a);return i?o.jsx("span",{className:"jv-provider-mark","data-logo":"","aria-hidden":"true",dangerouslySetInnerHTML:{__html:i}}):o.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((r=[...e.trim()][0])==null?void 0:r.toUpperCase())??"?"})}function d5(e){const a=e.authType==="oauth";return e.configured?{ok:!0,label:x(a?"status.signedIn":"status.configured")}:{ok:!1,label:x(a?"status.signedOut":"status.notConfigured")}}const f5=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],h5=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",xI={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function bI({onBack:e,onSelect:a}){const[i,r]=w.useState([]),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!0),[y,p]=w.useState(0);w.useEffect(()=>{let S=!0;return v(!0),f(""),ge.modelProviders().then(k=>{S&&r(k.providers)}).catch(k=>{S&&f(at(k,"picker.loadFailed"))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[y]);const b=[xI,...i].filter(S=>`${S.name} ${S.id}`.toLowerCase().includes(c.toLowerCase())),j=S=>h5({authType:S.authType,custom:S.id==="custom"});return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsx(Ee,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":x("picker.back"),children:o.jsx(Gd,{})}),o.jsxs("div",{children:[o.jsx("h2",{children:x("models.add")}),o.jsx("p",{children:x("picker.intro")})]})]}),o.jsxs("label",{className:"jv-search",children:[o.jsx(Tc,{}),o.jsx("input",{autoFocus:!0,"aria-label":x("picker.search"),placeholder:x("picker.searchPlaceholder"),value:c,onChange:S=>u(S.target.value)})]}),f5.filter(S=>b.some(k=>j(k)===S.id)).map(({id:S,label:k})=>o.jsxs("section",{className:"jv-section","aria-label":x(k),children:[o.jsx("h3",{className:"jv-section-title",children:x(k)}),o.jsx("div",{className:"jv-list",children:b.filter(C=>j(C)===S).map(C=>o.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>a(C),children:[o.jsx(jg,{name:C.id==="custom"?"+":C.name,provider:C.id}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:C.name}),o.jsx("span",{children:C.id==="custom"?x("picker.customHint"):C.authType==="oauth"?x("picker.oauthHint"):x("picker.keyHint",{count:C.modelCount})})]}),o.jsx(tl,{className:"jv-row-chevron"})]},`${C.id}:${C.authType}`))})]},S)),m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("picker.loading")}),d&&o.jsxs("div",{className:"jv-empty",role:"alert",children:[o.jsx("strong",{children:d}),o.jsx(Ee,{variant:"outline",onClick:()=>p(S=>S+1),children:x("picker.retry")})]}),!m&&!d&&!b.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("picker.noMatch")}),o.jsx("span",{children:x("picker.noMatchHint")})]})]})}const jI=S0("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",destructive:"border-transparent bg-destructive text-white"}},defaultVariants:{variant:"default"}});function wI({className:e,variant:a,...i}){return o.jsx("span",{"data-slot":"badge",className:an(jI({variant:a}),e),...i})}function m5({className:e,...a}){return o.jsx(bE,{"data-slot":"label",className:an("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}function SI({connection:e,providerName:a,authType:i,ensureConnection:r,onChanged:c}){var F,W;const[u,d]=w.useState({phase:"idle"}),[f,m]=w.useState(""),[v,y]=w.useState(!1),[p,b]=w.useState(""),[j,S]=w.useState(0),k=w.useRef(void 0),C=e==null?void 0:e.id,E=w.useRef(c);E.current=c;const M=w.useRef(u.phase);M.current=u.phase,w.useEffect(()=>{if(!C)return;const Y=C;let P=!0,K;async function R(){var V;try{let ne=await ge.authStatus(Y);if(!P)return;if(k.current&&((V=ne.prompt)==null?void 0:V.type)==="select"){const J=k.current;if(k.current=void 0,ne=await ge.authInput(Y,ne.prompt.id,J),!P)return}const z=M.current==="running"&&ne.phase!=="running";M.current=ne.phase,d(ne),z&&await E.current(),ne.phase==="running"&&P&&(K=setTimeout(()=>void R(),750))}catch(ne){P&&b(at(ne,"auth.statusFailed"))}}return R(),()=>{P=!1,clearTimeout(K)}},[C,u.phase,j]),w.useEffect(()=>m(""),[(F=u.prompt)==null?void 0:F.id]);async function T(Y){y(!0),b("");try{const P=await Y();d(P),P.phase!=="running"&&await c()}catch(P){b(at(P,"common.failed"))}finally{y(!1)}}function _(Y){k.current=Y,T(async()=>{const P=C??await r();return ge.authStart(P)})}const L=a==="openai-codex"&&i==="oauth",A=a==="openai"&&i==="oauth",H=u.phase==="running",I=u.prompt,q=u.event,D=(q==null?void 0:q.type)==="auth_url"?q.url:(q==null?void 0:q.type)==="device_code"?q.verificationUri:null,$=Y=>{I&&C&&T(()=>ge.authInput(C,I.id,Y))};return o.jsxs("section",{className:"jv-auth","aria-label":x("auth.title"),children:[o.jsxs("div",{className:"jv-auth-header",children:[o.jsx("h3",{children:x("auth.title")}),o.jsx(wI,{variant:"outline","data-state":H?"running":e!=null&&e.configured?"connected":"disconnected",children:x(H?"auth.running":e!=null&&e.configured?i==="oauth"?"status.signedIn":"status.configured":i==="oauth"?"status.signedOut":"status.notConfigured")})]}),H?o.jsxs("div",{className:"jv-auth-flow",children:[D&&o.jsx(Ee,{asChild:!0,variant:"outline",children:o.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:D,target:"_blank",rel:"noopener noreferrer",children:x("auth.openPage")})}),(q==null?void 0:q.type)==="device_code"&&o.jsx("p",{children:x("auth.code",{code:q.userCode})}),(I==null?void 0:I.type)==="select"&&o.jsx("div",{className:"flex flex-wrap gap-2",children:(W=I.options)==null?void 0:W.map(Y=>o.jsx(Ee,{type:"button",variant:"outline",disabled:v,onClick:()=>$(Y.id),children:L&&Y.id==="browser"?x("auth.browser"):L&&Y.id==="device_code"?x("auth.deviceCode"):Y.label},Y.id))}),I&&I.type!=="select"&&o.jsxs("div",{className:"jv-auth-input",children:[o.jsx(m5,{htmlFor:`oauth-input-${C??a}`,children:I.type==="manual_code"?x(A?"auth.redirectFull":"auth.redirectOrCode"):I.message}),I.type==="manual_code"&&o.jsx("p",{className:"jv-auth-note",children:x("auth.manualNote")}),o.jsx(vt,{id:`oauth-input-${C??a}`,type:I.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:v,onChange:Y=>m(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&(Y.preventDefault(),$(f))}}),o.jsx(Ee,{type:"button",variant:"outline",disabled:v||!f.trim(),onClick:()=>$(f),children:x("common.continue")})]}),!I&&o.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:x("auth.waiting")}),(q==null?void 0:q.type)==="info"&&o.jsx("p",{className:"text-sm",children:q.message}),o.jsx(Ee,{type:"button",variant:"ghost",disabled:v,onClick:()=>void T(()=>ge.authCancel(C)),children:x("auth.cancel")})]}):o.jsxs("div",{className:"flex flex-wrap gap-2",children:[L?o.jsxs(o.Fragment,{children:[o.jsx(Ee,{type:"button",variant:"outline",disabled:v,onClick:()=>_("browser"),children:x("auth.browser")}),o.jsx(Ee,{type:"button",variant:"outline",disabled:v,onClick:()=>_("device_code"),children:x("auth.deviceCode")})]}):o.jsx(Ee,{type:"button",variant:"outline",disabled:v,onClick:()=>_(),children:x(i==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&o.jsx(Ee,{type:"button",variant:"outline",disabled:v,onClick:()=>void T(async()=>(await ge.authLogout(C),{phase:"idle"})),children:x(i==="api_key"?"auth.removeCredential":"auth.signOut")})]}),(p||u.phase==="error")&&o.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:p||x("error.loginFailed")}),p&&o.jsx(Ee,{type:"button",variant:"link",disabled:v,onClick:()=>{b(""),S(Y=>Y+1)},children:x("auth.refresh")})]})}async function kI(e,a,i){try{return await ge.autoconfigModel({modelId:e.id,api:e.api||a,...i?{choice:i}:{}})}catch(r){return{status:"error",message:at(r,"auto.failed")}}}function CI(e,a){if(a.status!=="matched")return{...e,auto:a};const{fields:i,...r}=a,c=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...i,name:c?e.model.name:a.source.name||e.model.id},auto:r}}const p5=e=>`${e.provider} / ${e.modelId}`;function Lb({items:e,onPick:a}){return o.jsx("div",{className:"jv-auto-sources",children:e.map(i=>o.jsxs("button",{type:"button",onClick:()=>a(i),children:[o.jsx("span",{className:"jv-mono",children:p5(i)}),i.official&&o.jsx("em",{children:x("auto.official")}),o.jsx("small",{children:i.api})]},`${i.provider}/${i.modelId}`))})}function NI({state:e,modelId:a,onRun:i}){const r=u=>i({provider:u.provider,modelId:u.modelId}),c=(e==null?void 0:e.status)==="pending";return o.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[o.jsxs(Ee,{type:"button",variant:"outline",size:"sm",disabled:!a.trim()||c,onClick:()=>i(),children:[o.jsx(g4,{}),x(c?"auto.pending":"auto.run")]}),e&&!c&&o.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:p0("auto.matched",{source:o.jsx("strong",{className:"jv-mono",children:p5(e.source)}),note:e.reseller?x("auto.reseller"):"",suffix:x("auto.applied")})}),e.apiMismatch&&o.jsx("p",{className:"jv-auto-warn",children:x("auto.apiMismatch",{api:e.source.api})}),e.alternatives.length>0&&o.jsxs("details",{children:[o.jsx("summary",{children:x("auto.changeSource")}),o.jsx(Lb,{items:e.alternatives,onPick:r})]})]}),e.status==="choose"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{children:e.reason==="multiple"?x("auto.multiple"):x("auto.similar",{modelId:a})}),o.jsx(Lb,{items:e.options,onPick:r})]}),e.status==="none"&&o.jsx("p",{children:x("auto.notFound")}),e.status==="error"&&o.jsx("p",{role:"alert",children:e.message})]})]})}const kp=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],g5=[["off","thinking.level.off"],["minimal","thinking.level.minimal"],["low","thinking.level.low"],["medium","thinking.level.medium"],["high","thinking.level.high"],["xhigh","thinking.level.xhigh"],["max","thinking.level.max"]],v5=e=>e==="xhigh"||e==="max";function y5(e,a){const i=e[a];return i===null||i===void 0&&v5(a)?"unsupported":i===void 0?"default":"custom"}function EI(e){return e.reasoning?g5.filter(([a])=>y5(e.thinkingLevelMap,a)!=="unsupported").map(([,a])=>x(a)):[x("thinking.level.off")]}function TI({model:e,api:a,onChange:i}){const r=e.thinkingLevelMap,c=(f,m,v)=>{const y={...r};m==="default"?delete y[f]:m==="unsupported"?y[f]=null:y[f]=v??(typeof r[f]=="string"?r[f]:f),i({thinkingLevelMap:y})},u=a==="openai-completions",d=e.thinkingFormat&&!kp.includes(e.thinkingFormat)?[...kp,e.thinkingFormat]:kp;return o.jsxs("section",{className:"jv-thinking",children:[o.jsx("h4",{children:x("thinking.title")}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("thinking.format")}),o.jsxs(mr,{value:e.thinkingFormat||"default",disabled:!u&&!e.thinkingFormat,onValueChange:f=>i({thinkingFormat:f==="default"?"":f}),children:[o.jsx(gr,{"aria-label":x("thinking.format"),children:o.jsx(pr,{})}),o.jsxs(vr,{className:"jv-select-menu",children:[o.jsx(ca,{value:"default",children:x("thinking.protocolDefault")}),d.map(f=>o.jsx(ca,{value:f,children:f},f))]})]}),!u&&o.jsx("small",{className:"jv-field-hint",children:x("thinking.onlyCompletions")})]}),o.jsx("div",{className:"jv-thinking-levels",role:"group","aria-label":x("thinking.levels"),children:g5.map(([f,m])=>{const v=y5(r,f);return o.jsxs("div",{className:"jv-thinking-level",children:[o.jsxs("span",{children:[x(m),o.jsx("code",{children:f})]}),o.jsxs(mr,{value:v,onValueChange:y=>c(f,y),children:[o.jsx(gr,{"aria-label":x("thinking.levelName",{level:x(m)}),children:o.jsx(pr,{})}),o.jsxs(vr,{className:"jv-select-menu",children:[!v5(f)&&o.jsx(ca,{value:"default",children:x("thinking.supportedDefault")}),o.jsx(ca,{value:"unsupported",children:x("thinking.unsupported")}),o.jsx(ca,{value:"custom",children:x("thinking.supportedCustom")})]})]}),v==="custom"?o.jsx(vt,{className:"jv-mono",required:!0,"aria-label":x("thinking.levelValue",{level:x(m)}),maxLength:80,value:r[f]??"",onChange:y=>c(f,"custom",y.target.value)}):o.jsx("span",{})]},f)})}),o.jsx("p",{className:"jv-field-hint",children:x("thinking.supported",{levels:EI(e).join(" · ")})})]})}const Cp=[{id:"openai-completions",label:"OpenAI · Chat Completions"},{id:"openai-responses",label:"OpenAI · Responses"},{id:"anthropic-messages",label:"Anthropic · Messages"},{id:"google-generative-ai",label:"Google · Gemini"}],AI=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function f0({value:e,onChange:a,allowDefault:i=!1}){const r=Cp.some(c=>c.id===e)||!e?Cp:[...Cp,{id:e,label:e}];return o.jsxs(mr,{value:e||"default",onValueChange:c=>a(c==="default"?"":c),children:[o.jsx(gr,{"aria-label":x("editor.protocol"),children:o.jsx(pr,{})}),o.jsxs(vr,{className:"jv-select-menu",children:[i&&o.jsx(ca,{value:"default",children:x("card.defaultProtocol")}),r.map(c=>o.jsx(ca,{value:c.id,children:c.label},c.id))]})]})}const _I=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),Bb={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function MI({value:e,onChange:a}){const i=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[r,c]=w.useState(()=>i(e)),[u,d]=w.useState(""),f=w.useRef(null);return w.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(r||"{}"))===JSON.stringify(e))return}catch{}c(i(e)),d(""),(m=f.current)==null||m.setCustomValidity("")},[e]),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("card.compat")}),o.jsx(qd,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,r.split(`
594
+ `).length)),placeholder:"{}",value:r,onChange:m=>{c(m.target.value);try{const v=JSON.parse(m.target.value||"{}");if(!v||typeof v!="object"||Array.isArray(v))throw new Error;a(v),d(""),m.currentTarget.setCustomValidity("")}catch{d(x("card.jsonObject")),m.currentTarget.setCustomValidity(x("card.jsonObject"))}}}),u&&o.jsx("small",{role:"alert",children:u})]})}function RI({draft:e,protocol:a,onChange:i,onRemove:r,onAutoconfig:c}){const{model:u}=e,[d,f]=w.useState(!u.id),[m,v]=w.useState(!1),[y,p]=w.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),b=k=>i({...e,model:{...u,...k}}),j=(k,C)=>o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:k}),C]}),S=(k,C,E)=>{const M=y.map((_,L)=>L===k?{..._,[C]:E}:_);p(M);const T={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==M[k].name&&(T[y[k].name]=null);for(const _ of M)_.name&&(_.value||!_.saved)&&(T[_.name]=_.value);b({headerUpdates:T})};return o.jsxs("article",{className:`jv-model-card ${e.selected?"is-selected":""}`,children:[o.jsxs("div",{className:"jv-model-summary",children:[o.jsx("input",{type:"checkbox",checked:e.selected,"aria-label":x("card.use",{name:u.id||x("card.newModel")}),onChange:k=>i({...e,selected:k.target.checked})}),o.jsxs("button",{type:"button","aria-expanded":d,className:"jv-model-expand",onClick:()=>f(!d),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:u.name||u.id||x("card.newModel")}),o.jsx("span",{className:"jv-mono",children:u.id||x("card.enterId")})]}),o.jsxs("span",{className:"jv-chips",children:[u.contextWindow&&o.jsx("span",{className:"jv-chip",children:_I(u.contextWindow)}),u.input.includes("image")&&o.jsx("span",{className:"jv-chip",children:x("card.image")}),u.reasoning&&o.jsx("span",{className:"jv-chip",children:x("card.reasoning")}),e.auto&&Bb[e.auto.status]&&o.jsx("span",{className:"jv-chip jv-chip-warn",children:x(Bb[e.auto.status])})]}),o.jsx(Hi,{className:"jv-expand-icon"})]}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-model-remove","aria-label":x("card.remove",{name:u.id||x("card.newModel")}),onClick:r,children:o.jsx(Ad,{})})]}),d&&o.jsxs("div",{className:"jv-model-fields",children:[o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.modelId"),o.jsx(vt,{className:"jv-mono",required:!0,value:u.id,onChange:k=>b({id:k.target.value}),placeholder:"model-id"})),j(x("card.modelName"),o.jsx(vt,{value:u.name,onChange:k=>b({name:k.target.value}),placeholder:x("card.optional")}))]}),o.jsx(NI,{state:e.auto,modelId:u.id,onRun:c}),o.jsxs("section",{children:[o.jsx("h4",{children:x("card.capabilities")}),o.jsxs("div",{className:"flex flex-wrap gap-5",children:[o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.reasoning,onChange:k=>b({reasoning:k.target.checked})}),x("card.reasoningThinking")]}),o.jsxs("label",{className:"jarvy-model-check",children:[o.jsx("input",{type:"checkbox",checked:u.input.includes("image"),onChange:k=>b({input:k.target.checked?["text","image"]:["text"]})}),x("card.imageInput")]})]})]}),u.reasoning&&o.jsx(TI,{model:u,api:u.api||a,onChange:b}),o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h4",{children:x("card.specs")}),o.jsx(Ee,{type:"button",variant:"link",size:"sm",onClick:()=>v(!m),children:x(m?"card.hidePrices":"card.editPrices")})]}),o.jsxs("div",{className:"jv-field-grid",children:[j(x("card.context"),o.jsx(vt,{type:"number",min:1,value:u.contextWindow??"",placeholder:x("card.notProvided"),onChange:k=>b({contextWindow:k.target.value?Number(k.target.value):null})})),j(x("card.maxOutput"),o.jsx(vt,{type:"number",min:1,value:u.maxTokens??"",placeholder:x("card.notProvided"),onChange:k=>b({maxTokens:k.target.value?Number(k.target.value):null})}))]}),o.jsx("h4",{className:"jv-cost-title",children:x("card.costTitle")}),o.jsx("div",{className:"jv-costs",children:[["input","card.costInput"],["output","card.costOutput"],["cacheRead","card.costCacheRead"],["cacheWrite","card.costCacheWrite"]].map(([k,C])=>{var E,M;return o.jsxs("div",{children:[o.jsx(m5,{children:x(C)}),m?o.jsx(vt,{type:"number",step:"any",min:0,value:((E=u.cost)==null?void 0:E[k])??"",onChange:T=>b({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(T.target.value)}})}):o.jsx("span",{children:((M=u.cost)==null?void 0:M[k])??x("card.notProvided")})]},k)})})]}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[x("card.advanced"),o.jsx(Hi,{className:"size-4"})]}),o.jsxs("div",{className:"jv-advanced-fields",children:[o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.apiOverride")}),o.jsx(f0,{allowDefault:!0,value:u.api??"",onChange:k=>b({api:k})})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("card.headers")}),y.map((k,C)=>o.jsxs("div",{className:"jv-header-row",children:[o.jsx(vt,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:k.saved,value:k.name,onChange:E=>S(C,"name",E.target.value)}),o.jsx(vt,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?x("card.headerSaved"):"value",value:k.value,onChange:E=>S(C,"value",E.target.value)}),o.jsx(Ee,{type:"button",size:"icon-sm",variant:"ghost","aria-label":x("card.removeHeader"),onClick:()=>{p(y.filter((E,M)=>M!==C)),k.name&&b({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:o.jsx(Ad,{})})]},C)),o.jsxs(Ee,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>p([...y,{name:"",value:"",saved:!1}]),children:[o.jsx(ll,{}),x("card.addHeader")]})]}),o.jsx(MI,{value:u.compat,onChange:k=>b({compat:k})})]})]})]})]})}let DI=0;const Np=(e,a,i=!1)=>({key:`draft-${++DI}`,model:e,selected:a,...i?{originalId:e.id}:{}});function OI({connection:e,preset:a,defaultName:i,saved:r=!1,onBack:c,onSaved:u,onConnected:d,onChanged:f}){const m=e?e.kind==="custom":(a==null?void 0:a.id)==="custom",v=(e==null?void 0:e.authType)??a.authType,[y,p]=w.useState(e?m?e.providerName:e.displayName:m?"":i),[b,j]=w.useState((e==null?void 0:e.baseUrl)??""),[S,k]=w.useState((e==null?void 0:e.api)??a.api),[C,E]=w.useState(""),[M,T]=w.useState(()=>((e==null?void 0:e.models)??[]).map(ue=>Np(ue,!0,!0))),[_,L]=w.useState([]),[A,H]=w.useState(""),[I,q]=w.useState(!1),[D,$]=w.useState(!1),[F,W]=w.useState(""),[Y,P]=w.useState(r?x("editor.saved"):""),K=w.useRef(e==null?void 0:e.id);function R(ue){T(be=>{const le=new Set(be.map(se=>se.model.id));return[...be,...ue.filter(se=>!le.has(se.id)).map(se=>Np(se,!1))]})}w.useEffect(()=>{if(m)return;let ue=!0;return $(!0),(e?ge.modelCatalog(e.id):ge.providerModels(a.id)).then(le=>{ue&&R(le.models)}).catch(le=>{ue&&W(at(le,"editor.fetchFailed"))}).finally(()=>{ue&&$(!1)}),()=>{ue=!1}},[e==null?void 0:e.id,a==null?void 0:a.id,m]);async function V(){$(!0),W(""),P("");try{const ue=await ge.discoverModels({connectionId:K.current,baseUrl:b,api:S,...C.trim()?{apiKey:C}:{}});R(ue.models),P(ue.models.length?x("editor.fetched",{count:ue.models.length}):x("editor.noneReturned"))}catch(ue){W(at(ue,"editor.fetchFailed"))}finally{$(!1)}}async function ne(ue,be){const le=M.filter(me=>ue.includes(me.key)&&me.model.id.trim());if(!le.length)return;W(""),P(""),T(me=>me.map(Te=>le.some(Le=>Le.key===Te.key)?{...Te,auto:{status:"pending"}}:Te));const se={matched:0,choose:0,none:0,error:0};for(const me of le){const Te=await kI(me.model,S,be);se[Te.status]++,T(Le=>Le.map(Ve=>Ve.key===me.key?CI(Ve,Te):Ve))}le.length>1&&P(x("editor.autoSummary",{parts:[x("editor.autoMatched",{count:se.matched}),se.choose&&x("editor.autoChoose",{count:se.choose}),se.none&&x("editor.autoNone",{count:se.none}),se.error&&x("editor.autoFailed",{count:se.error})].filter(Boolean).join(x("common.listSeparator"))}))}async function z(){if(!K.current){const ue=await ge.createModelConnection({providerName:a.id,displayName:y,kind:"builtin",authType:v,baseUrl:b,api:S});K.current=ue.id}return await d(K.current),K.current}async function J(ue){ue.preventDefault(),q(!0),W(""),P("");try{let be;K.current?(be=await ge.updateModelConnection(K.current,{displayName:y,...m?{providerName:y}:{},baseUrl:b,api:S}),m&&C.trim()&&await ge.saveModelCredential(be.id,C)):(be=await ge.createModelConnection({providerName:m?y:a.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:b,api:S,...m&&C.trim()?{apiKey:C}:{}}),K.current=be.id);for(const le of M)le.selected&&await ge.saveConnectionModel(be.id,le.model,le.originalId);for(const le of new Set([..._,...M.filter(se=>se.originalId&&!se.selected).map(se=>se.originalId)]))await ge.deleteConnectionModel(be.id,le);E(""),await u(be.id),P(x("editor.saved"))}catch(be){W(at(be,"editor.saveFailed"))}finally{q(!1)}}async function ee(){if(!(!e||!confirm(x("editor.confirmDelete",{name:e.displayName})))){q(!0),W("");try{await ge.deleteModelConnection(e.id),await f(),c()}catch(ue){W(at(ue,"editor.deleteFailed"))}finally{q(!1)}}}const U=M.filter(ue=>`${ue.model.id} ${ue.model.name}`.toLowerCase().includes(A.toLowerCase())),G=M.filter(ue=>ue.selected).length,fe=m?(e==null?void 0:e.displayName)??x("group.custom"):(e==null?void 0:e.displayName)??a.name,xe=e?d5(e):null,je=M.some(ue=>{var be;return((be=ue.auto)==null?void 0:be.status)==="pending"});return o.jsxs("form",{className:"jv-editor",onChange:()=>P(""),onSubmit:ue=>void J(ue),children:[o.jsxs("header",{className:"jv-editor-header",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:I,onClick:c,"aria-label":x("editor.back"),children:o.jsx(Gd,{})}),o.jsx(jg,{name:fe,provider:e?e.kind==="builtin"?e.providerName:void 0:a==null?void 0:a.id}),o.jsxs("div",{className:"jv-row-text",children:[o.jsx("strong",{children:fe}),o.jsx("span",{children:m?"OpenAI / Anthropic compatible":x(v==="oauth"?"group.subscription":"group.apiKey")})]}),xe&&o.jsx("span",{className:"jv-status","data-ok":xe.ok||void 0,children:xe.label}),e&&o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:I,onClick:()=>void ee(),"aria-label":x("editor.delete"),children:o.jsx(Ad,{})})]}),o.jsxs("div",{className:"jv-editor-scroll",children:[o.jsxs("section",{className:"jv-section","aria-label":x("editor.connection"),children:[o.jsx("h3",{className:"jv-section-title",children:x("editor.connection")}),o.jsx("div",{className:"jv-panel",children:m?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"jv-field-grid",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.providerName")}),o.jsx(vt,{className:"jv-mono",required:!0,maxLength:80,"aria-label":x("editor.providerName"),placeholder:"my-provider",value:y,onChange:ue=>p(ue.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("editor.protocol")}),o.jsx(f0,{value:S,onChange:k})]})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.url")}),o.jsx(vt,{required:!0,type:"url","aria-label":x("editor.url"),value:b,placeholder:"https://api.example.com/v1",onChange:ue=>j(ue.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.key")}),o.jsx(vt,{type:"password",autoComplete:"new-password","aria-label":x("editor.key"),placeholder:x(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:C,onChange:ue=>E(ue.target.value)})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.name")}),o.jsx(vt,{required:!0,maxLength:100,"aria-label":x("editor.name"),value:y,onChange:ue=>p(ue.target.value)})]}),o.jsx(SI,{connection:e,providerName:(e==null?void 0:e.providerName)??a.id,authType:v,ensureConnection:z,onChanged:f}),o.jsxs("details",{className:"jv-advanced",children:[o.jsxs("summary",{children:[o.jsx(Hi,{}),x("editor.settings")]}),o.jsxs("div",{className:"jv-advanced-fields",children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("editor.url")}),o.jsx(vt,{className:"jv-mono",value:b,placeholder:x("editor.defaultUrl"),onChange:ue=>j(ue.target.value)})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:"API Protocol"}),o.jsx(f0,{value:S,onChange:k})]})]})]})]})})]}),o.jsxs("section",{className:"jv-section","aria-label":x("editor.models"),children:[o.jsxs("div",{className:"jv-section-head",children:[o.jsxs("h3",{className:"jv-section-title",children:[x("settings.models")," ",o.jsx("span",{children:x("editor.selected",{selected:G,total:M.length})})]}),o.jsxs("div",{className:"jv-section-actions",children:[m&&o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:I||D||!b.trim()||!(C.trim()||e!=null&&e.configured),onClick:()=>void V(),children:[o.jsx(v0,{}),x(D?"editor.fetching":"editor.fetch")]}),G>0&&o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",disabled:I||je,onClick:()=>void ne(M.filter(ue=>ue.selected).map(ue=>ue.key)),children:[o.jsx(g4,{}),x("editor.autoSelected")]}),o.jsxs(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>T([...M,Np(AI(),!0)]),children:[o.jsx(ll,{}),x("editor.addManually")]})]})]}),M.length>6&&o.jsxs("div",{className:"jv-models-filter",children:[o.jsxs("label",{className:"jv-search",children:[o.jsx(Tc,{}),o.jsx("input",{"aria-label":x("editor.filter"),placeholder:x("editor.filterPlaceholder"),value:A,onChange:ue=>H(ue.target.value)})]}),o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(ue=>ue.map(be=>U.includes(be)?{...be,selected:!0}:be)),children:x("editor.selectVisible")})]}),D&&!m&&o.jsx("p",{role:"status",className:"jv-hint",children:x("editor.loadingCatalog")}),o.jsx("div",{className:"jv-model-cards",children:U.map(ue=>o.jsx(RI,{draft:ue,protocol:S,onAutoconfig:be=>void ne([ue.key],be),onChange:be=>T(le=>le.map(se=>se.key===ue.key?be:se)),onRemove:()=>{ue.originalId&&L(be=>[...be,ue.originalId]),T(be=>be.filter(le=>le.key!==ue.key))}},ue.key))}),!D&&!M.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("editor.empty")}),o.jsx("span",{children:x(m?"editor.emptyCustom":"editor.emptyBuiltin")})]})]})]}),o.jsxs("footer",{className:"jv-editor-footer",children:[o.jsx("div",{"aria-live":"polite",children:F?o.jsx("p",{role:"alert",children:F}):Y?o.jsx("p",{role:"status",children:Y}):o.jsx("p",{children:x("editor.footer")})}),o.jsx(Ee,{type:"submit",className:"jv-primary",disabled:I||D||je,children:x(I?"editor.saving":"editor.save")})]})]})}function zI({connections:e,onChanged:a}){const[i,r]=w.useState("list"),[c,u]=w.useState(),[d,f]=w.useState(),[m,v]=w.useState(0),y=()=>{r("list"),f(void 0),u(void 0),v(0)},p=j=>h5({authType:j.authType,custom:j.kind==="custom"});let b=(c==null?void 0:c.name)??"";if(c){let j=2;for(;e.some(S=>S.displayName===b);)b=`${c.name} ${j++}`}return i==="choose"?o.jsx(bI,{onBack:y,onSelect:j=>{u(j),f(void 0),r("editor")}}):i==="editor"?o.jsx(OI,{connection:e.find(j=>j.id===d),preset:c,defaultName:b,saved:m>0,onBack:y,onChanged:a,onConnected:async j=>{await a(),f(j),u(void 0)},onSaved:async j=>{await a(),f(j),u(void 0),v(S=>S+1)}},m):o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:x("settings.models")}),o.jsx("p",{children:x("models.intro")})]}),o.jsxs(Ee,{className:"jv-primary",onClick:()=>r("choose"),children:[o.jsx(ll,{}),x("models.add")]})]}),!e.length&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("models.empty")}),o.jsx("span",{children:x("models.emptyHint")})]}),f5.filter(j=>e.some(S=>p(S)===j.id)).map(({id:j,label:S})=>o.jsxs("section",{className:"jv-section","aria-label":x(S),children:[o.jsx("h3",{className:"jv-section-title",children:x(S)}),o.jsx("div",{className:"jv-list",children:e.filter(k=>p(k)===j).map(k=>{const C=d5(k);return o.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(k.id),u(void 0),r("editor")},children:[o.jsx(jg,{name:k.displayName,provider:k.kind==="builtin"?k.providerName:void 0}),o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:k.displayName}),o.jsx("span",{children:k.models.length?x("models.count",{count:k.models.length}):x("models.none")})]}),o.jsx("span",{className:"jv-status","data-ok":C.ok||void 0,children:C.label}),o.jsx(tl,{className:"jv-row-chevron"})]},k.id)})})]},j))]})}function LI(){var b;const[e,a]=w.useState(null),[i,r]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(!1),[m,v]=w.useState(!1);w.useEffect(()=>{ge.connection().then(a).catch(()=>v(!0))},[]);const y=j=>o.jsxs("div",{className:"jv-page",children:[o.jsx("header",{className:"jv-page-header",children:o.jsx("div",{children:o.jsx("h2",{children:x("settings.network")})})}),o.jsxs("section",{className:"jv-section","aria-labelledby":"network-lan",children:[o.jsx("h3",{id:"network-lan",className:"jv-section-title",children:x("connection.lan")}),j]}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:x("common.failed")})]});if(!e)return y(null);if(!e.https)return y(o.jsx("div",{className:"jv-list",children:o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-local",children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.localOnly")}),o.jsx("span",{children:p0("connection.localOnlyHint",{flag:o.jsx("code",{children:"--host 0.0.0.0"})})})]})})}));const p=async()=>{f(!0),v(!1);try{a(await ge.setConnection(!e.allowHttp))}catch{v(!0)}finally{f(!1)}};return y(o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"jv-hint jv-conn-intro",children:x("connection.lanHint")}),o.jsx("div",{className:"jv-list",role:"group","aria-label":x("connection.addresses"),children:e.addresses.map(j=>o.jsxs("div",{className:"jv-list-row jv-static-row",children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("code",{children:j})}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(i===j?"ui.copied":"connection.copy"),onClick:()=>void hf(j).then(S=>r(S?j:null)),children:i===j?o.jsx(da,{}):o.jsx(g0,{})})]},j))}),o.jsxs("div",{className:"jv-list jv-conn-cert",children:[o.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-root",children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.root")}),o.jsx("span",{children:x("connection.rootHint")})]}),o.jsx(Ee,{asChild:!0,variant:"outline",size:"sm",children:o.jsxs("a",{href:"/api/connection/root.crt",children:[o.jsx(v0,{}),x("connection.download")]})})]}),o.jsxs("div",{className:"jv-list-row jv-static-row jv-conn-print",children:[o.jsx("span",{children:x("connection.fingerprint")}),o.jsx("code",{children:(b=e.fingerprint)==null?void 0:b.replaceAll(":",":​")}),e.fingerprintSha1&&o.jsxs(o.Fragment,{children:[o.jsx("span",{children:x("connection.fingerprintSha1")}),o.jsx("code",{children:e.fingerprintSha1.replaceAll(":",":​")})]})]}),o.jsxs("button",{type:"button",className:"jv-list-row jv-conn-disclosure","aria-expanded":c,onClick:()=>u(!c),children:[o.jsx("span",{className:"jv-row-text",children:o.jsx("strong",{children:x("connection.howTo")})}),o.jsx(Hi,{"aria-hidden":"true"})]}),c&&o.jsx("div",{className:"jv-list-row jv-static-row jv-conn-steps",children:o.jsxs("ul",{children:[o.jsx("li",{children:x("connection.howMac")}),o.jsx("li",{children:x("connection.howWindows")}),o.jsx("li",{children:x("connection.howIos")}),o.jsx("li",{children:x("connection.howAndroid")}),o.jsx("li",{children:x("connection.howRestart")})]})})]}),o.jsx("div",{className:"jv-list",children:o.jsxs("button",{type:"button",role:"switch","aria-checked":e.allowHttp,disabled:d,className:"jv-list-row jv-choice-row jv-conn-http",onClick:()=>void p(),children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("connection.allowHttp")}),o.jsx("span",{children:x("connection.allowHttpHint")})]}),o.jsx("span",{className:"jv-conn-switch","aria-hidden":"true"})]})})]}))}function wg({value:e,visible:a,onChange:i,onVisible:r,placeholder:c,required:u,warnShort:d=!0}){return o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"jv-secret-input",children:[o.jsx(vt,{type:a?"text":"password",autoComplete:"new-password",spellCheck:!1,required:u,className:"jv-mono",placeholder:c,value:e,onChange:f=>i(f.target.value)}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm","aria-label":x(a?"secrets.hideValue":"secrets.showValue"),onClick:()=>r(!a),children:a?o.jsx(Yd,{}):o.jsx(Xd,{})})]}),d&&e.length>0&&e.length<8&&o.jsx("span",{className:"jv-field-hint jv-secret-short",children:x("secrets.shortValue")})]})}function BI({secret:e,bots:a,onChanged:i}){return o.jsx(x5,{grantedIds:e.grants.map(r=>r.botId),onceIds:new Set(e.grants.filter(r=>r.scope==="once").map(r=>r.botId)),bots:a,onGrant:async(r,c)=>{let u=e;for(const d of r)u=await ge.grantSecret(e.id,d,c);i(u)}})}function x5({grantedIds:e,onceIds:a,bots:i,onGrant:r}){const[c,u]=w.useState(!1),[d,f]=w.useState(""),[m,v]=w.useState([]),[y,p]=w.useState(!1),[b,j]=w.useState(null),S=e.map(A=>i.find(H=>H.id===A)).filter(A=>!!A),k=a??new Set,C=i.filter(A=>!e.includes(A.id)),E=C.filter(A=>A.name.toLowerCase().includes(d.trim().toLowerCase())),M=()=>{u(!1),f(""),v([])},T=A=>v(H=>H.includes(A)?H.filter(I=>I!==A):[...H,A]),_=async A=>{p(!0),j(null);try{await A()}catch(H){j(at(H))}finally{p(!1)}},L=()=>_(async()=>{await r(m,!0),M()});return o.jsxs("section",{className:"jv-secret-grants","aria-label":x("secrets.grants"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsxs("h4",{className:"jv-secret-heading",children:[x("secrets.grants"),S.length>0&&o.jsxs("span",{children:[" · ",S.length]})]}),!c&&o.jsxs(Ee,{type:"button",variant:"outline",size:"sm",disabled:y,onClick:()=>u(!0),children:[o.jsx(ll,{}),x("secrets.addBots")]})]}),S.length>0?o.jsx("ul",{className:"jv-secret-granted",children:S.map(A=>o.jsxs("li",{children:[o.jsx(ro,{color:A.color,mood:A.mood,size:24,crown:A.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:A.name}),k.has(A.id)&&o.jsx("span",{className:"jv-secret-once",children:x("secrets.onceTag")}),o.jsx(Ee,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-secret-revoke",disabled:y,"aria-label":x("secrets.revoke",{name:A.name}),onClick:()=>void _(()=>r([A.id],!1)),children:o.jsx(cs,{})})]},A.id))}):!c&&o.jsx("p",{className:"jv-hint",children:x("secrets.noGrants")}),c&&o.jsxs("div",{className:"jv-secret-picker",children:[o.jsx(vt,{type:"search",autoFocus:!0,value:d,placeholder:x("secrets.searchBots"),"aria-label":x("secrets.searchBots"),onChange:A=>f(A.target.value),onKeyDown:A=>{A.key==="Enter"&&(A.preventDefault(),E.length===1&&T(E[0].id))}}),o.jsxs("div",{className:"jv-secret-options",role:"listbox","aria-multiselectable":"true","aria-label":x("secrets.addBots"),children:[E.map(A=>o.jsxs("button",{type:"button",role:"option","aria-selected":m.includes(A.id),className:"jv-secret-option",onClick:()=>T(A.id),children:[o.jsx(ro,{color:A.color,mood:A.mood,size:24,crown:A.agent}),o.jsx("span",{className:"jv-secret-bot-name",children:A.name}),m.includes(A.id)&&o.jsx(da,{"aria-hidden":"true"})]},A.id)),E.length===0&&o.jsx("p",{className:"jv-hint",children:x(i.length?C.length?"secrets.noMatch":"secrets.allGranted":"secrets.noBots")})]}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:M,children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:y||!m.length,onClick:()=>void L(),children:m.length?x("dialogs.addCount",{count:m.length}):x("common.add")})]})]}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b})]})}const Ib=e=>Ga(e,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function II({secret:e,bots:a,open:i,onToggle:r,onChanged:c,onDeleted:u}){const[d,f]=w.useState(null),[m,v]=w.useState(e.description),[y,p]=w.useState(""),[b,j]=w.useState(!1),[S,k]=w.useState(null),[C,E]=w.useState(!1),[M,T]=w.useState(null),_=`secret-${e.id}`;w.useEffect(()=>{i&&ge.secretUses(e.id).then(D=>f(D.uses)).catch(()=>f([]))},[i,e.id,e.uses]);const L=async(D,$)=>{k(D),T(null);try{await $()}catch(F){T(at(F))}finally{k(null)}},A=D=>{D.preventDefault(),L("save",async()=>{c(await ge.updateSecret(e.id,{description:m.trim(),...y?{value:y}:{}})),p(""),j(!1)})},H=new Set(e.grants.map(D=>D.botId)),I=D=>{var $;return(($=a.find(F=>F.id===D))==null?void 0:$.name)??x("secrets.deletedBot")},q=m.trim()!==e.description||!!y;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":i,"aria-controls":_,onClick:r,children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{className:"jv-mono",children:e.name}),o.jsx("span",{children:e.description||x("secrets.noDescription")})]}),e.readable?o.jsx("span",{className:"jv-row-meta",children:H.size?x("secrets.grantCount",{count:H.size}):x("secrets.notGranted")}):o.jsx("span",{className:"jv-status","data-busy":"",children:x("secrets.unreadable")}),o.jsx(Hi,{className:"jv-row-chevron","aria-hidden":"true"})]}),i&&o.jsxs("div",{id:_,className:"jv-list-row jv-static-row jv-secret-details",children:[o.jsxs("p",{className:"jv-secret-meta",children:[x("secrets.fingerprint")," ",o.jsx("code",{children:e.fingerprint})," · ",x("secrets.updated",{time:Ib(e.updatedAt)})," · ",e.uses?x("secrets.usedCount",{count:e.uses}):x("secrets.neverUsed")]}),!e.readable&&o.jsx("p",{className:"jv-note-error",children:x("secrets.unreadableHint")}),o.jsx(BI,{secret:e,bots:a,onChanged:c}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:A,"aria-label":x("secrets.edit"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(vt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:m,onChange:D=>v(D.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.newValue")}),o.jsx(wg,{value:y,visible:b,onChange:p,onVisible:j,placeholder:x("secrets.newValuePlaceholder")})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Ee,{type:"submit",variant:"outline",size:"sm",disabled:!!S||!q,children:x("common.save")})})]}),o.jsx("h4",{className:"jv-secret-heading",children:x("secrets.uses")}),d&&d.length?o.jsx("ul",{className:"jv-secret-uses",children:d.map(D=>o.jsxs("li",{children:[o.jsxs("span",{children:[I(D.botId)," · ",Ib(D.at)," · ",x(D.how==="ssh_sign"?"secrets.useSsh":"secrets.useCommand")]}),D.detail&&o.jsx("code",{children:D.detail})]},D.id))}):o.jsx("p",{className:"jv-hint",children:x("secrets.noUses")}),C?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":x("secrets.deleteTitle",{name:e.name}),children:[o.jsx("strong",{children:x("secrets.deleteTitle",{name:e.name})}),o.jsx("p",{children:x("secrets.deleteBody")}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>E(!1),children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:!!S,onClick:()=>void L("delete",async()=>{await ge.deleteSecret(e.id),u()}),children:x("secrets.deleteConfirm")})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!S,onClick:()=>E(!0),children:x("secrets.delete")})}),M&&o.jsx("p",{className:"jv-note-error",role:"alert",children:M})]})]})}const Hb=(e,a)=>e.name.localeCompare(a.name);function HI(){const[e,a]=w.useState(null),[i,r]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState(!1),[m,v]=w.useState(null),[y,p]=w.useState(null);w.useEffect(()=>{ge.secrets().then(j=>{a([...j.secrets].sort(Hb)),r(j.keyLocation)}).catch(j=>p(at(j))),ge.bots().then(j=>u(j.bots)).catch(()=>u([]))},[]);const b=j=>a(S=>S&&S.map(k=>k.id===j.id?j:k));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:x("settings.secrets")}),o.jsx("p",{children:x("secrets.intro")})]}),!d&&o.jsxs(Ee,{className:"jv-primary",onClick:()=>f(!0),children:[o.jsx(ll,{}),x("secrets.add")]})]}),d&&o.jsx(PI,{onCancel:()=>f(!1),onSaved:j=>{f(!1),a(S=>[...S??[],j].sort(Hb)),v(j.id)}}),e&&!e.length&&!d&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("secrets.empty")}),o.jsx("span",{children:x("secrets.emptyHint")})]}),e&&e.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.secrets"),children:o.jsx("div",{className:"jv-list",children:e.map(j=>o.jsx(II,{secret:j,bots:c,open:m===j.id,onToggle:()=>v(m===j.id?null:j.id),onChanged:b,onDeleted:()=>{v(null),a(S=>S&&S.filter(k=>k.id!==j.id))}},j.id))})}),i&&o.jsxs("section",{className:"jv-section","aria-labelledby":"secrets-key",children:[o.jsx("h3",{id:"secrets-key",className:"jv-section-title",children:x("secrets.masterKey")}),o.jsx("div",{className:"jv-list",children:o.jsx("div",{className:"jv-list-row jv-static-row jv-secret-key",children:o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:x("secrets.keyFile")}),o.jsx("code",{children:i}),o.jsx("span",{children:x("secrets.keyHint")})]})})})]}),y&&o.jsx("p",{className:"jv-note-error",role:"alert",children:y})]})}function PI({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[c,u]=w.useState(""),[d,f]=w.useState(""),[m,v]=w.useState(!1),[y,p]=w.useState(!1),[b,j]=w.useState(null),S=async k=>{k.preventDefault(),p(!0),j(null);try{a(await ge.createSecret({name:i.trim(),description:c.trim(),value:d}))}catch(C){j(at(C))}finally{p(!1)}};return o.jsxs("form",{className:"jv-panel jv-secret-form",onSubmit:k=>void S(k),"aria-label":x("secrets.add"),children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.name")}),o.jsx(vt,{className:"jv-mono",required:!0,autoFocus:!0,maxLength:64,placeholder:"GITHUB_TOKEN",value:i,onChange:k=>r(k.target.value.toUpperCase())}),o.jsx("span",{className:"jv-field-hint",children:x("secrets.nameHint")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.description")}),o.jsx(vt,{maxLength:200,placeholder:x("secrets.descriptionPlaceholder"),value:c,onChange:k=>u(k.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("secrets.value")}),o.jsx(wg,{value:d,visible:m,onChange:f,onVisible:v,required:!0})]}),b&&o.jsx("p",{className:"jv-note-error",role:"alert",children:b}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",onClick:e,children:x("common.cancel")}),o.jsx(Ee,{type:"submit",className:"jv-primary",disabled:y||!i.trim()||!d,children:x("common.save")})]})]})}function UI({machine:e,bots:a,open:i,onToggle:r,onChanged:c,onDeleted:u}){const[d,f]=w.useState(e.name),[m,v]=w.useState(e.directory),[y,p]=w.useState(null),[b,j]=w.useState(null),[S,k]=w.useState(null),[C,E]=w.useState(null),M=`machine-${e.id}`,T=`${e.user}@${e.host}${e.port===22?"":`:${e.port}`}`,_=async(I,q)=>{j(I),E(null);try{await q()}catch(D){E(at(D))}finally{j(null)}},L=I=>{I.preventDefault(),_("save",async()=>{const q=await ge.updateMachine(e.id,{name:d.trim(),directory:m.trim()});c(q),f(q.name),v(q.directory)})},A=I=>void _("delete",async()=>{try{await ge.deleteMachine(e.id,I),u()}catch(q){if(!I&&q instanceof Wl&&q.code!=="machine_missing"){k("force"),E(at(q));return}throw q}}),H=d.trim()!==e.name||m.trim()!==e.directory;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",className:"jv-list-row jv-secret-row","aria-expanded":i,"aria-controls":M,onClick:r,children:[o.jsxs("span",{className:"jv-row-text",children:[o.jsx("strong",{children:e.name}),o.jsx("span",{className:"jv-mono",children:T})]}),o.jsx("span",{className:"jv-row-meta",children:e.botIds.length?x("secrets.grantCount",{count:e.botIds.length}):x("secrets.notGranted")}),o.jsx(Hi,{className:"jv-row-chevron","aria-hidden":"true"})]}),i&&o.jsxs("div",{id:M,className:"jv-list-row jv-static-row jv-secret-details",children:[o.jsx(x5,{grantedIds:e.botIds,bots:a,onGrant:async(I,q)=>{let D=e;for(const $ of I)D=await ge.grantMachine(e.id,$,q);c(D)}}),o.jsxs("form",{className:"jv-secret-edit",onSubmit:L,"aria-label":e.name,children:[o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(vt,{required:!0,maxLength:40,value:d,onChange:I=>f(I.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.directory")}),o.jsx(vt,{className:"jv-mono",required:!0,maxLength:1e3,spellCheck:!1,value:m,onChange:I=>v(I.target.value)})]}),o.jsx("div",{className:"jv-secret-actions",children:o.jsx(Ee,{type:"submit",variant:"outline",size:"sm",disabled:!!b||!H||!d.trim(),children:x("common.save")})})]}),o.jsxs("section",{className:"jv-secret-grants","aria-label":x("machines.fingerprint"),children:[o.jsxs("div",{className:"jv-secret-grants-head",children:[o.jsx("h4",{className:"jv-secret-heading",children:x("machines.fingerprint")}),y!=null&&y.changed?o.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!b,onClick:()=>void _("trust",async()=>{c(await ge.trustMachine(e.id,y.hostKeys.fingerprints)),p(null)}),children:x("machines.trust")}):o.jsx(Ee,{type:"button",variant:"outline",size:"sm",disabled:!!b,onClick:()=>void _("check",async()=>p(await ge.checkMachine(e.id))),children:x(b==="check"?"machines.checking":"machines.check")})]}),o.jsx("div",{className:"jv-machine-prints",children:(y!=null&&y.changed?y.hostKeys.fingerprints:e.fingerprints).map(I=>o.jsx("code",{"data-new":(y==null?void 0:y.changed)||void 0,children:I},I))}),y&&o.jsx("p",{className:"jv-hint","data-warn":y.changed||void 0,children:x(y.changed?"machines.changed":"machines.unchanged")})]}),S?o.jsxs("div",{className:"jv-secret-confirm",role:"group","aria-label":x(S==="force"?"machines.forceTitle":"machines.deleteTitle",{name:e.name}),children:[o.jsx("strong",{children:x(S==="force"?"machines.forceTitle":"machines.deleteTitle",{name:e.name})}),o.jsx("p",{children:S==="force"?x("machines.forceBody",{comment:`jarvy-${e.id}`}):x("machines.deleteBody")}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",onClick:()=>{k(null),E(null)},children:x("common.cancel")}),o.jsx(Ee,{type:"button",className:"jv-primary",size:"sm",disabled:!!b,onClick:()=>A(S==="force"),children:x(S==="force"?"machines.forceConfirm":"machines.deleteConfirm")})]})]}):o.jsx("div",{className:"jv-secret-actions jv-secret-danger",children:o.jsx(Ee,{type:"button",variant:"ghost",size:"sm",disabled:!!b,onClick:()=>k("delete"),children:x("machines.delete")})}),C&&o.jsx("p",{className:"jv-note-error",role:"alert",children:C})]})]})}function qI(){const[e,a]=w.useState(null),[i,r]=w.useState([]),[c,u]=w.useState(!1),[d,f]=w.useState(null),[m,v]=w.useState(null);w.useEffect(()=>{ge.machines().then(p=>a(p.machines)).catch(p=>v(at(p))),ge.bots().then(p=>r(p.bots)).catch(()=>r([]))},[]);const y=p=>a(b=>b&&b.map(j=>j.id===p.id?p:j));return o.jsxs("div",{className:"jv-page",children:[o.jsxs("header",{className:"jv-page-header",children:[o.jsxs("div",{children:[o.jsx("h2",{children:x("settings.machines")}),o.jsx("p",{children:x("machines.intro")})]}),!c&&o.jsxs(Ee,{className:"jv-primary",onClick:()=>u(!0),children:[o.jsx(ll,{}),x("machines.add")]})]}),c&&o.jsx(FI,{onCancel:()=>u(!1),onSaved:p=>{u(!1),a(b=>[...b??[],p]),f(p.id)}}),e&&!e.length&&!c&&o.jsxs("div",{className:"jv-empty",children:[o.jsx("strong",{children:x("machines.empty")}),o.jsx("span",{children:x("machines.emptyHint")})]}),e&&e.length>0&&o.jsx("section",{className:"jv-section","aria-label":x("settings.machines"),children:o.jsx("div",{className:"jv-list",children:e.map(p=>o.jsx(UI,{machine:p,bots:i,open:d===p.id,onToggle:()=>f(d===p.id?null:p.id),onChanged:y,onDeleted:()=>{f(null),a(b=>b&&b.filter(j=>j.id!==p.id))}},p.id))})}),m&&o.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function FI({onCancel:e,onSaved:a}){const[i,r]=w.useState(""),[c,u]=w.useState("22"),[d,f]=w.useState(""),[m,v]=w.useState(""),[y,p]=w.useState(""),[b,j]=w.useState(null),[S,k]=w.useState(""),[C,E]=w.useState(!1),[M,T]=w.useState(!1),[_,L]=w.useState(null),A={host:i.trim(),port:Number(c)||22,user:d.trim()},H=async D=>{T(!0),L(null);try{await D()}catch($){L(at($))}finally{T(!1)}},I=D=>{D.preventDefault(),H(b?async()=>a(await ge.addMachine({...A,name:m.trim(),directory:y.trim(),password:S,hostKeys:b})):async()=>j(await ge.scanMachine(A)))},q=A.user&&A.host?`${A.user}@${A.host}`:"";return o.jsxs("form",{className:"jv-panel jv-machine-form",autoComplete:"off",onSubmit:I,"aria-label":x("machines.add"),"aria-busy":M||void 0,children:[b?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"jv-machine-where",children:[m.trim()&&o.jsx("strong",{children:m.trim()}),o.jsxs("code",{children:[A.user,"@",A.host,A.port===22?"":`:${A.port}`]})]}),o.jsxs("div",{className:"jv-field",children:[o.jsx("span",{children:x("machines.fingerprint")}),o.jsx("div",{className:"jv-machine-prints",children:b.fingerprints.map(D=>o.jsx("code",{children:D},D))}),o.jsx("span",{className:"jv-field-hint",children:x("machines.fingerprintHint")})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.password")}),o.jsx(wg,{value:S,visible:C,onChange:k,onVisible:E,required:!0,warnShort:!1}),o.jsx("span",{className:"jv-field-hint",children:x("machines.passwordHint")})]})]}):o.jsxs("div",{className:"jv-machine-fields",children:[o.jsxs("label",{className:"jv-field jv-machine-host",children:[o.jsx("span",{children:x("machines.host")}),o.jsx(vt,{required:!0,autoFocus:!0,maxLength:253,spellCheck:!1,placeholder:x("machines.hostPlaceholder"),value:i,onChange:D=>r(D.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-port",children:[o.jsx("span",{children:x("machines.port")}),o.jsx(vt,{required:!0,inputMode:"numeric",maxLength:5,value:c,onChange:D=>u(D.target.value.replace(/\D/g,""))})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.user")}),o.jsx(vt,{required:!0,maxLength:64,spellCheck:!1,autoCapitalize:"off",value:d,onChange:D=>f(D.target.value)})]}),o.jsxs("label",{className:"jv-field",children:[o.jsx("span",{children:x("machines.name")}),o.jsx(vt,{maxLength:40,placeholder:q,value:m,onChange:D=>v(D.target.value)})]}),o.jsxs("label",{className:"jv-field jv-machine-wide",children:[o.jsx("span",{children:x("machines.directory")}),o.jsx(vt,{className:"jv-mono",maxLength:1e3,spellCheck:!1,placeholder:x("machines.directoryPlaceholder"),value:y,onChange:D=>p(D.target.value)})]})]}),_&&o.jsx("p",{className:"jv-note-error",role:"alert",children:_}),o.jsxs("div",{className:"jv-secret-actions",children:[o.jsx(Ee,{type:"button",variant:"ghost",disabled:M,onClick:()=>{b?(j(null),k(""),L(null)):e()},children:x(b?"machines.back":"common.cancel")}),o.jsx(Ee,{type:"submit",className:"jv-primary",disabled:M||!A.host||!A.user||!!b&&!S,children:x(b?M?"machines.connecting":"machines.connect":M?"machines.scanning":"machines.next")})]})]})}const VI=[{id:"general",label:"settings.general",icon:MC},{id:"models",label:"settings.models",icon:eC},{id:"machines",label:"settings.machines",icon:c4},{id:"secrets",label:"settings.secrets",icon:Oj},{id:"network",label:"settings.network",icon:cC},{id:"about",label:"settings.about",icon:y0}];function $I({connections:e,onChanged:a,onClose:i,initialTab:r="general"}){const[c,u]=w.useState(r);return o.jsx(bS,{open:!0,onOpenChange:d=>{d||i()},children:o.jsxs(jS,{className:"jv-settings-shell","aria-describedby":void 0,children:[o.jsxs("nav",{className:"jv-settings-nav","aria-label":x("settings.sections"),children:[o.jsx(mf,{className:"jv-settings-title",children:x("settings.title")}),VI.map(d=>o.jsxs("button",{type:"button",className:"jv-nav-item","aria-current":c===d.id?"page":void 0,onClick:()=>u(d.id),children:[o.jsx(d.icon,{}),x(d.label)]},d.id))]}),o.jsx("main",{className:"jv-settings-content",children:c==="general"?o.jsx(UB,{}):c==="models"?o.jsx(zI,{connections:e,onChanged:a}):c==="machines"?o.jsx(qI,{}):c==="secrets"?o.jsx(HI,{}):c==="network"?o.jsx(LI,{}):o.jsx(PB,{})})]})})}const Pb="Jarvy";let Ub=null,zi=null,$l=null;function GI(){return document.querySelector('link[rel="icon"][type="image/png"]')}function YI(e){if(!(zi!=null&&zi.complete)||!zi.naturalWidth)return null;const a=64,i=document.createElement("canvas");i.width=i.height=a;const r=i.getContext("2d");if(!r)return null;r.drawImage(zi,0,0,a,a);const c=e>9?"9+":String(e),u=c.length>1?21:18;return r.fillStyle="#e5484d",r.beginPath(),r.arc(a-u,u,u,0,Math.PI*2),r.fill(),r.fillStyle="#fff",r.font=`bold ${c.length>1?26:30}px system-ui, sans-serif`,r.textAlign="center",r.textBaseline="middle",r.fillText(c,a-u,u+2),i.toDataURL("image/png")}function qb(e){document.title=e>0?`(${e>99?"99+":e}) ${Pb}`:Pb;const a=GI();if(!a)return;if(Ub??(Ub=a.href),$l??($l=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){a.href=Ub,$l&&!$l.isConnected&&document.head.prepend($l);return}const i=YI(e);i&&(a.href=i,$l==null||$l.remove())}function XI(e){w.useEffect(()=>{zi||(zi=new Image,zi.src="/favicon.svg"),zi.complete?qb(e):zi.onload=()=>qb(e)},[e])}const bd=50;function KI({chatId:e,ready:a,scroller:i,me:r,onError:c}){const[u,d]=w.useState([]),[f,m]=w.useState(!1),[v,y]=w.useState(!1),[p,b]=w.useState(!1),j=w.useRef(u),S=w.useRef(e),k=w.useRef(0),C=w.useRef(!1),E=w.useRef(!1);j.current=u,S.current=e,E.current=v;const M=w.useRef(null),T=w.useRef(!1),_=w.useRef(void 0),L=w.useRef(!0),A=w.useRef(!1),H=w.useRef(null),[I,q]=w.useState(!1),D=w.useRef(0);w.useEffect(()=>{if(d([]),y(!1),A.current=!1,L.current=!0,!a||!e)return;let R=!0;const V=++k.current;return m(!0),q(!1),D.current=0,ge.latestMessages(e,bd).then(ne=>{!R||V!==k.current||(T.current=!0,d(ne.messages),y(ne.hasOlder),m(!1))}).catch(ne=>{R&&(m(!1),c(ne))}),()=>{R=!1}},[e,a]);async function $(R){const V=j.current[0],ne=++k.current;if(!V||V.chatId!==R){const ee=await ge.latestMessages(R,bd);S.current===R&&ne===k.current&&(d(ee.messages),y(ee.hasOlder),m(!1));return}const z=V.sequence-1,J=await ge.messages(R,z);S.current!==R||ne!==k.current||(d(ee=>[...ee.filter(U=>U.chatId===R&&U.sequence<=z),...J.messages]),m(!1))}async function F(){const R=j.current[0],V=i.current;if(!(!R||!E.current||C.current)){C.current=!0,b(!0);try{const ne=await ge.olderMessages(R.chatId,R.sequence,bd);if(S.current!==R.chatId)return;M.current=V?V.scrollHeight-V.scrollTop:null,d(z=>{var J;return((J=z[0])==null?void 0:J.id)===R.id?[...ne.messages,...z]:z}),y(ne.hasOlder)}catch(ne){c(ne)}finally{C.current=!1,b(!1)}}}w.useEffect(()=>{const R=i.current;if(!R)return;const V=new ResizeObserver(()=>{!A.current||!L.current||R.scrollHeight-R.scrollTop-R.clientHeight<8||R.scrollTo({top:R.scrollHeight,behavior:"instant"})}),ne=()=>{V.disconnect(),V.observe(R);for(const ee of R.children)V.observe(ee)};ne();const z=new MutationObserver(ne);z.observe(R,{childList:!0});const J=()=>{var ee;if(!A.current){L.current=!0,q(!1);return}L.current=R.scrollHeight-R.scrollTop-R.clientHeight<160,q(!L.current),L.current&&(D.current=((ee=j.current.at(-1))==null?void 0:ee.sequence)??0)};return J(),R.addEventListener("scroll",J,{passive:!0}),()=>{V.disconnect(),z.disconnect(),R.removeEventListener("scroll",J)}},[i.current,e]),w.useLayoutEffect(()=>{const R=i.current,V=u.at(-1);if(R){if(M.current!==null)R.scrollTo({top:R.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if(T.current&&u.length){const ne=()=>R.scrollTo({top:R.scrollHeight,behavior:"instant"});ne(),requestAnimationFrame(ne),T.current=!1,A.current=!0,L.current=!0}else V&&V.id!==_.current&&(L.current||V.senderId===r)&&R.scrollTo({top:R.scrollHeight,behavior:"smooth"});_.current=V==null?void 0:V.id,L.current&&(D.current=(V==null?void 0:V.sequence)??0)}},[u]),w.useEffect(()=>{const R=i.current,V=H.current;if(!R||!V||!v||!A.current)return;const ne=new IntersectionObserver(z=>{var J;(J=z[0])!=null&&J.isIntersecting&&A.current&&F()},{root:R,rootMargin:"400px 0px 0px 0px"});return ne.observe(V),()=>ne.disconnect()},[v,u,e,f]);async function W(R,V){if(j.current.some(U=>U.id===R)){Y(R,V);return}const z=S.current,J=await ge.message(R);if(J.chatId!==z)return J.chatId;const ee=await ge.olderMessages(J.chatId,J.sequence+1,bd);S.current===J.chatId&&(T.current=!0,d([...ee.messages,J]),y(ee.hasOlder),requestAnimationFrame(()=>Y(R,V)))}function Y(R,V){var z;const ne=(z=i.current)==null?void 0:z.querySelector(`[data-message="${R}"]`);ne&&PS(ne,V)}const P=I?u.filter(R=>R.sequence>D.current&&R.senderId!==r).length:0;return{messages:u,setMessages:d,loading:f,hasOlder:v,loadingOlder:p,refresh:$,top:H,away:I,unseen:P,toLatest:()=>{const R=i.current;R==null||R.scrollTo({top:R.scrollHeight,behavior:"smooth"})},toMessage:W,cancel:()=>{k.current++}}}function QI({ready:e,selected:a,messages:i,chats:r,chatList:c,setChats:u,onError:d}){const f=r.find(m=>m.id===a);w.useEffect(()=>{const m=a,v=i.at(-1);if(!e||!m||!v||v.chatId!==m)return;const y=()=>{const p=c.current.find(b=>b.id===m);document.visibilityState!=="visible"||((p==null?void 0:p.readSequence)??0)>=v.sequence&&!(p!=null&&p.hint)&&!(p!=null&&p.alerts)||(u(b=>b.map(j=>j.id===m?{...j,readSequence:Math.max(j.readSequence,v.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:j)),ge.markRead(m,v.sequence).catch(d))};return y(),document.addEventListener("visibilitychange",y),()=>document.removeEventListener("visibilitychange",y)},[i,a,e,f==null?void 0:f.readSequence,f==null?void 0:f.alerts,f==null?void 0:f.hint])}function ZI({onLogin:e}){const[a,i]=w.useState(""),[r,c]=w.useState(""),[u,d]=w.useState(!1),[f,m]=w.useState(!1),[v,y]=w.useState(null),[p,b]=w.useState(document.documentElement.classList.contains("dark"));async function j(S){if(S.preventDefault(),!f){m(!0),y(null);try{const k=await ge.login(a.trim(),r);c(""),e(k.username)}catch(k){y(k instanceof Wl&&k.status===401?"login.wrong":k instanceof Wl&&k.status===429?"login.tooMany":"login.offline")}finally{m(!1)}}}return o.jsxs("div",{className:"jv-login",children:[o.jsxs("div",{className:"jv-login-corner",children:[o.jsx("div",{className:"jv-login-locales",role:"group","aria-label":x("general.language"),children:$b.map(S=>o.jsx("button",{type:"button",lang:S,"aria-pressed":$d()===S,title:Tp(S,"name"),onClick:()=>Xb(S),children:Tp(S,"short")},S))}),o.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Pd(p?"light":"dark"),b(!p)},"aria-label":x(p?"login.themeLight":"login.themeDark"),children:o.jsx(ze,{name:p?"sun":"moon"})})]}),o.jsx("main",{className:"jv-login-stage",children:o.jsxs("div",{className:"jv-login-wrap",children:[o.jsxs("header",{className:"jv-login-brand",children:[o.jsx("img",{className:"jv-login-logo",src:"/icon.svg",alt:"",width:64,height:64}),o.jsx("h1",{children:"Jarvy"}),o.jsx("p",{children:x("login.subtitle")})]}),o.jsxs("form",{className:"jv-login-form",onSubmit:S=>void j(S),"aria-label":x("login.form"),"aria-busy":f,children:[o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-username",children:x("login.username")}),o.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:a,onChange:S=>i(S.target.value)})]}),o.jsxs("div",{className:"jv-login-field",children:[o.jsx("label",{htmlFor:"login-password",children:x("login.password")}),o.jsxs("div",{className:"jv-login-password",children:[o.jsx("input",{id:"login-password",type:u?"text":"password",autoComplete:"current-password",required:!0,disabled:f,value:r,onChange:S=>c(S.target.value)}),o.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":x(u?"login.hidePassword":"login.showPassword"),onClick:()=>d(!u),children:o.jsx(ze,{name:u?"eye-slash":"eye"})})]})]}),v&&o.jsx("p",{className:"jv-login-error",role:"alert",children:x(v)}),o.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:x(f?"login.submitting":"login.submit")})]})]})})]})}function JI({selected:e,chats:a,transcript:i,openChat:r,setPane:c,paneRef:u,blocked:d}){const[f,m]=w.useState(null),[v,y]=w.useState(0);w.useEffect(()=>{var j;!f||e!==f.chatId||i.loading||((j=i.messages[0])==null?void 0:j.chatId)!==f.chatId||(i.toMessage(f.id,f.passage),m(null))},[f,e,i.loading,i.messages]);function p(j,S,k){var E;if(j.type==="thread"){const M=a.find(T=>T.id===j.parentId);M&&r(M),c({kind:"thread",id:j.id,parentId:j.parentId,mode:"pane",focus:{id:S,passage:k}});return}((E=u.current)==null?void 0:E.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&c(null);const C=j.id===e;r(j),C?i.toMessage(S,k):m({chatId:j.id,id:S,passage:k})}function b(j){c({kind:"search",chat:j}),y(S=>S+1)}return w.useEffect(()=>{const j=S=>{var C,E;if(d||S.defaultPrevented||!(S.ctrlKey||S.metaKey)||S.key.toLowerCase()!=="f")return;const k=a.find(M=>M.id===e);k&&(((C=u.current)==null?void 0:C.kind)==="search"&&((E=document.activeElement)!=null&&E.closest(".jv-search-pane"))||(S.preventDefault(),b(k)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[d,a,e]),{openMessage:p,search:b,focusKey:v}}const WI=null;function Fb(){var yi,Yi,Xi,ta,xi,ce;const[e,a]=w.useState("loading"),[i,r]=w.useState(""),[c,u]=w.useState([]),[d,f]=w.useState({}),m=w.useRef(new Map),[v,y]=w.useState([]),[p,b]=w.useState([]),[j,S]=w.useState([]),[k,C]=w.useState(null),[E,M]=w.useState({}),[T,_]=w.useState(null),[L,A]=w.useState(null),[H,I]=w.useState(null),[q,D]=w.useState([]),[$,F]=w.useState(null),[W,Y]=w.useState(!1),[P,K]=w.useState(!1),[R,V]=w.useState(!1),[ne,z]=w.useState(""),[J,ee]=w.useState(!1),[U,G]=w.useState(null),[fe,xe]=w.useState(!1),[je,ue]=w.useState(420),[be,le]=w.useState(0),[se,me]=w.useState([]),[Te,Le]=w.useState(""),Ve=w.useRef(null),pt=w.useRef(null),tt=w.useRef(null),[We,Vt]=w.useState(null),[vn,yn]=w.useState(null),[Pn,ha]=w.useState(null),rn=w.useRef(T);rn.current=T;const Xa=w.useRef(0),pe=w.useRef(v);pe.current=v;const Ce=w.useRef(U);Ce.current=U;const He=w.useMemo(()=>new LL(BL(i)),[i]);w.useEffect(()=>{const B=()=>He.save();return window.addEventListener("pagehide",B),()=>window.removeEventListener("pagehide",B)},[He]);const qe=((yi=j.find(B=>B.kind==="user"&&B.name===i))==null?void 0:yi.id)??"",et=KI({chatId:T,ready:e==="ready",scroller:Ve,me:qe,onError:Ye}),{messages:Pt,setMessages:xn}=et,Ut=JI({selected:T,chats:v,transcript:et,openChat:ma,setPane:G,paneRef:Ce,blocked:!!H||!!$}),Rn=((Yi=v.find(B=>B.id===T))==null?void 0:Yi.botId)??L??((Xi=c[0])==null?void 0:Xi.id);async function Un(B){const Q=(m.current.get(B)??0)+1;m.current.set(B,Q);const he=await ge.botStatus(B);m.current.get(B)===Q&&f(Ae=>({...Ae,[B]:he}))}w.useEffect(()=>{e==="ready"&&Rn&&Un(Rn).catch(Ye)},[e,Rn]);const Dt=((ta=v.find(B=>B.id===T&&B.type==="channel"))==null?void 0:ta.memberIds.filter(B=>c.some(Q=>Q.id===B)).join(","))??"";w.useEffect(()=>{if(e==="ready"&&Dt)for(const B of Dt.split(","))Un(B).catch(Ye)},[e,Dt]);async function Dn(B){var Re,$e;const[Q,he,Ae,ke,Me,Be]=await Promise.all([ge.bots(),ge.chats(),ge.modelConnections(),ge.sections(),ge.members(),ge.followedThreads()]);r(B),u(Q.bots),y(he.chats),D(Ae.connections),b(ke.sections),S(Me.members),me(Be.threads);const Ke=he.chats.find(ut=>ut.type!=="thread");_((Ke==null?void 0:Ke.id)??null),Ke&&M({[Ke.id]:Ke.readSequence}),A(((Re=he.chats[0])==null?void 0:Re.botId)??(($e=Q.bots[0])==null?void 0:$e.id)??null),a("ready")}w.useEffect(()=>{Pd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),ge.me().then(B=>Dn(B.username)).catch(()=>a("login"))},[]),w.useEffect(()=>{if(e!=="ready")return;let B=!0;const Q=new EventSource("/api/events"),he=async ke=>{ge.followedThreads().then(Be=>{B&&me(Be.threads)}).catch(()=>{}),le(Be=>Be+1),await Xt();const Me=rn.current;B&&Me&&(!ke||ke===Me)&&await fl(Me)},Ae=()=>void ge.sections().then(ke=>{B&&b(ke.sections)}).catch(ke=>{B&&Ye(ke)});return Q.addEventListener("ready",()=>{var Me;he().catch(Be=>{B&&Ye(Be)}),Ae();const ke=(Me=pe.current.find(Be=>Be.id===rn.current))==null?void 0:Me.botId;ke&&Un(ke).catch(Be=>{B&&Ye(Be)}),ge.bots().then(Be=>{B&&u(Be.bots)}).catch(Be=>{B&&Ye(Be)})}),Q.addEventListener("sections",Ae),Q.addEventListener("bots",()=>{ge.bots().then(ke=>{B&&u(ke.bots)}).catch(ke=>{B&&Ye(ke)}),he().catch(ke=>{B&&Ye(ke)})}),Q.addEventListener("inbox",()=>void he().catch(ke=>{B&&Ye(ke)})),Q.addEventListener("chat",ke=>{const Me=JSON.parse(ke.data);typeof Me.chatId=="string"&&he(Me.chatId).catch(Be=>{B&&Ye(Be)})}),Q.addEventListener("bot",ke=>{var Ke;const Me=JSON.parse(ke.data),Be=Me.status;m.current.set(Me.botId,(m.current.get(Me.botId)??0)+1),f(Re=>({...Re,[Me.botId]:Be})),Be.error&&((Ke=pe.current.find(Re=>Re.id===rn.current))==null?void 0:Ke.botId)===Be.botId&&Le(Cz(Be)),(Be.status==="idle"||Be.status==="stop")&&ge.bots().then(Re=>{B&&u(Re.bots)}).catch(Re=>{B&&Ye(Re)})}),Q.onerror=()=>{ge.me().catch(ke=>{B&&ke instanceof Wl&&ke.status===401&&a("login")})},()=>{B=!1,Q.close(),et.cancel(),Xa.current++}},[e]),QI({ready:e==="ready",selected:T,messages:Pt,chats:v,chatList:pe,setChats:y,onError:Ye}),XI(e==="ready"?v.reduce((B,Q)=>B+Q.alerts,0):0),w.useEffect(()=>{if(!Te)return;const B=setTimeout(()=>Le(""),4800);return()=>clearTimeout(B)},[Te]),w.useEffect(()=>{const B=Q=>{Q.defaultPrevented||H||$||(Q.key==="Escape"&&(Y(!1),K(!1),V(!1)),(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="k"&&(Q.preventDefault(),V(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-search"))==null?void 0:he.focus()})))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[H,$]),w.useEffect(()=>{const B=window.matchMedia("(max-width: 620px)"),Q=()=>{B.matches||V(!1)};return B.addEventListener("change",Q),()=>B.removeEventListener("change",Q)},[]);function Ye(B){if(B instanceof Wl&&B.status===401){a("login");return}Le(at(B,"common.failed"))}async function Xt(){const B=++Xa.current,Q=await ge.chats();return B===Xa.current&&y(Q.chats),Q.chats}async function fl(B){await et.refresh(B)}async function ui(){const[B,Q]=await Promise.all([ge.modelConnections(),ge.bots()]);D(B.connections),u(Q.bots)}const di=()=>void ge.members().then(B=>S(B.members)).catch(Ye);function bn(B){u(Q=>Q.map(he=>he.id===B.id?B:he)),di()}function ma(B){var he;const Q=RL(B);Q?G({kind:"thread",id:Q,parentId:B.id,mode:"pane",summary:((he=B.hint)==null?void 0:he.kind)==="note"}):B.id!==rn.current&&G(null),xe(!1),M(Ae=>({...Ae,[B.id]:B.readSequence})),_(B.id),B.botId&&A(B.botId),V(!1),Y(!1),K(!1)}const hl=B=>G((U==null?void 0:U.kind)==="info"&&U.page===B?null:{kind:"info",page:B});function pa(B){y(Q=>Q.some(he=>he.id===B.id)?Q.map(he=>he.id===B.id?B:he):[B,...Q])}async function co(B){if(!J){ee(!0);try{const Q=await ge.createChat(B);pa(Q),ma(Q),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-composer"))==null?void 0:he.focus()})}catch(Q){Ye(Q)}finally{ee(!1)}}}async function Ka(){if(!J){ee(!0);try{const B=await ge.createBot(sL(oi(j).map(he=>he.name))),Q=await ge.createChat(B.id);u(he=>[...he,B]),pa(Q),di(),ma(Q)}catch(B){Ye(B)}finally{ee(!1)}}}async function cn(B){try{await ge.deleteChat(B.id),await Xt(),rn.current===B.id&&_(null),Le(x("app.channelDeleted"))}catch(Q){Ye(Q)}}async function Lt(B,Q){try{pa(await ge.pin(B.id,Q))}catch(he){Ye(he)}}async function $t(B,Q){try{pa(await ge.mute(B.id,Q))}catch(he){Ye(he)}}async function fi(B,Q){try{await ge.deleteBot(B.id,Q);const he=new Set(v.filter(Ae=>Ae.type==="dm"&&Ae.botId===B.id).map(Ae=>Ae.id));y(Ae=>Ae.filter(ke=>!he.has(ke.id)).map(ke=>ke.memberIds.includes(B.id)?{...ke,memberIds:ke.memberIds.filter(Me=>Me!==B.id)}:ke)),u(Ae=>Ae.filter(ke=>ke.id!==B.id)),di(),rn.current&&he.has(rn.current)&&_(null),H===B.id&&I(null),Le(x("app.botDeleted",{name:B.name}))}catch(he){Ye(he)}}async function hi(B,Q,he,Ae,ke){const Me=T;await ge.send(Me,B,Q,he,!1,Ae,ke);const Be=pe.current.find(Re=>Re.id===Me),Ke=(Be==null?void 0:Be.type)==="channel"?[...new Set(xg(B,oi(j)).filter(Re=>!Be.memberIds.includes(Re.member.id)).map(Re=>Re.member.name))]:[];Ke.length&&Le(x("app.notInChannel",{names:Ke.join(x("common.listSeparator")),count:Ke.length})),Promise.all([fl(Me),Xt()]).catch(Ye)}function Qa(B,Q){ge.addMember(B,Q.id).then(he=>{pa(he),Le(x("app.memberAdded",{name:Q.name,channel:he.title}))}).catch(Ye)}async function Za(B){try{const Q=await ge.openThread(B.id);G({kind:"thread",id:Q.id,parentId:B.chatId,mode:"pane"})}catch(Q){Ye(Q)}}function Da(B,Q){const he=v.find(Ae=>Ae.id===B.parentId);he&&ma(he),G(Q?{kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"}:null)}function Qn(B){I(null);const Q=v.find(he=>he.id===(B.type==="thread"?B.parentId:B.id));Q&&ma(Q),B.type==="thread"&&G({kind:"thread",id:B.id,parentId:B.parentId,mode:"pane"})}async function Ja(B,Q,he){try{const Ae=await ge.react(B.id,Q,he);xn(ke=>ke.map(Me=>Me.id===Ae.id?{...Me,reactions:Ae.reactions}:Me))}catch(Ae){Ye(Ae)}}function ga(B){t5(He,B,j)}const va=(B,Q)=>B?void et.toMessage(B,Q).then(async he=>{he&&Ut.openMessage(await ge.chat(he),B,Q)}).catch(()=>Le(x("app.sourceGone"))):Le(x("app.sourceGone"));function mi(B){me(Q=>Q.map(he=>he.id===B.id?{...he,...B}:he)),ge.followedThreads().then(Q=>me(Q.threads)).catch(()=>{})}function ml(B){B.preventDefault();const Q=Ae=>ue(Math.min(Math.max(340,window.innerWidth-Ae.clientX),Math.round(window.innerWidth*.6))),he=()=>{window.removeEventListener("pointermove",Q),window.removeEventListener("pointerup",he),document.body.style.cursor=""};window.addEventListener("pointermove",Q),window.addEventListener("pointerup",he),document.body.style.cursor="col-resize"}async function ya(){try{await He.clear(B=>ge.removeAttachment(B)),await ge.logout(),a("login"),Y(!1),F(null),m.current.clear(),f({}),G(null),me([]),r(""),_(null),y([]),u([]),D([]),xn([])}catch(B){Ye(B)}}const Sr=e==="ready"&&v.some(B=>B.id===T);w.useEffect(()=>{const B=Ve.current;if(!B)return;let Q=0,he=B.clientHeight;const Ae=()=>{Q=B.scrollHeight-B.scrollTop-B.clientHeight},ke=new ResizeObserver(()=>{B.clientHeight!==he&&(he=B.clientHeight,B.scrollTo({top:B.scrollHeight-B.clientHeight-Q,behavior:"instant"}))}),Me=new MutationObserver(Ae);return Ae(),B.addEventListener("scroll",Ae,{passive:!0}),ke.observe(B),Me.observe(B,{childList:!0,subtree:!0,characterData:!0}),()=>{ke.disconnect(),Me.disconnect(),B.removeEventListener("scroll",Ae)}},[Sr]);const Zn=v.find(B=>B.id===T),pi=(Zn==null?void 0:Zn.type)==="channel",Jn=NB(e==="ready"?(xi=v.find(B=>B.id===T&&B.type==="dm"))==null?void 0:xi.botId:void 0,be);if(e==="loading")return o.jsx("div",{className:"jarvy-loading",children:x("app.connecting")});if(e==="login")return o.jsx(ZI,{onLogin:B=>void Dn(B).catch(Ye)});const ln=v.find(B=>B.id===T),un=c.find(B=>B.id===((ln==null?void 0:ln.botId)??L))??c[0],gi=!!(un!=null&&un.connectionId),Wn=pi||gi,ea=(un==null?void 0:un.name)??"Jarvy",On=un?d[un.id]:void 0,Bt=On!=null&&On.error?x("activity.error"):(On==null?void 0:On.status)==="running"?LS(On.activity):"",Mt=(ce=[...Pt].reverse().find(B=>{var Q;return((Q=B.question)==null?void 0:Q.state)==="pending"}))==null?void 0:ce.id,Gt=(U==null?void 0:U.kind)==="thread"?U:null,jn=(Gt==null?void 0:Gt.mode)==="full",pl=pi?Zn:void 0,kr=c.find(B=>B.id===H),Cr=new Set(Object.values(d).filter(B=>B.status==="running"&&B.activity!=="asking").map(B=>B.botId)),vi=new Set(Object.values(d).filter(B=>B.activity==="asking").map(B=>B.botId));return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"ui-app","data-nav":R?"":void 0,"data-pane":U&&!jn?"":void 0,style:{"--ui-pane":`${je}px`},children:[o.jsx(OL,{username:i,chats:v,sections:p,bots:c,members:j,followed:se,followedOpen:fe&&!jn,working:Cr,asking:vi,selected:fe?null:T,filter:ne,creating:J,createMenu:P,accountMenu:W,onFilterChange:z,onOpenFollowed:()=>{xe(!0),G(null),V(!1)},onOpenChat:ma,onOpenBot:B=>void co(B.id),onOpenMenu:(B,Q)=>yn({target:B,at:Q}),onEditSection:B=>C({kind:"section",section:B}),onCreate:B=>{if(B==="bot")return void Ka();C({kind:B}),K(!1)},onFind:Ut.openMessage,onOpenFound:Qn,onError:Ye,onToggleCreate:B=>{K(B),Y(!1)},onToggleAccount:B=>{Y(B),K(!1)},onSettings:()=>{Y(!1),F("general")},onToggleTheme:()=>{Pd(document.documentElement.classList.contains("dark")?"light":"dark"),Y(!1)},onLogOut:()=>void ya()}),o.jsx(kB,{chat:ln,inChannel:pi,bots:c,members:j,meId:qe,drafts:He,composeReady:Wn,botName:ea,activeBot:un,status:On,connections:q,activity:Bt,history:et,divider:E[(ln==null?void 0:ln.id)??""]??(ln==null?void 0:ln.readSequence)??0,activeQuestion:Mt,pane:U,onPane:G,onToggleInfo:hl,find:Ut,onNav:()=>V(!0),onBot:B=>I(B),hasBotDirects:Jn.length>0,onInvite:Qa,onQuote:ga,onReply:B=>void Za(B),onReact:(B,Q,he)=>void Ja(B,Q,he),onJump:va,onSettled:B=>xn(Q=>Q.map(he=>he.id===B.id?B:he)),onPreview:(B,Q)=>Vt({files:B,index:Q}),onSend:hi,notice:Le,onSaveNote:async B=>{try{pa(await ge.setNote(ln.id,B))}catch(Q){throw Ye(Q),Q}},createBot:()=>void Ka(),creating:J,updateBot:bn,onManageModels:()=>F("models"),error:Ye,chatArea:pt,transcript:Ve,composeWrap:tt,hidden:jn||fe,onOpenThread:B=>G({kind:"thread",id:B,parentId:ln.id,mode:"pane"})}),o.jsx(LB,{pane:U,followedView:fe,followed:se,chats:v,sections:p,members:j,bots:c,statuses:d,meId:qe,drafts:He,tick:be,paneChannel:pl,activeBot:un,botDirects:Jn,find:Ut,onPane:G,onNav:()=>V(!0),onBackToChannel:Da,onAddMembers:B=>C({kind:"members",chat:B}),onOpenBot:I,onPin:B=>void Lt(B,!B.pinned),onMute:B=>void $t(B,!B.muted),onDeleteChannel:B=>ha({kind:"chat",chat:B}),onChannelSaved:pa,onThreadChanged:mi,onInvite:Qa,onPreview:(B,Q)=>Vt({files:B,index:Q}),onNotice:Le,onError:Ye,paneWidth:je,onResize:ml})]}),R&&o.jsx("div",{className:"ui-nav-scrim",onClick:()=>V(!1),role:"presentation"}),$&&o.jsx($I,{connections:q,initialTab:$,onChanged:ui,onClose:()=>F(null)}),o.jsx(wL,{dialog:k,entryMenu:vn,confirm:Pn,preview:We,infoBot:kr,bots:c,statuses:d,chats:v,sections:p,members:j,connections:q,meId:qe,onDialog:C,onEntryMenu:yn,onConfirm:ha,onPreview:Vt,onInfoBot:I,onSettings:()=>F("models"),onChannelInfo:B=>{ma(B),G({kind:"info",page:"main"})},onOpenChatId:B=>{_(B),V(!1)},chatSaved:pa,openChat:ma,onSectionSaved:B=>{b(Q=>Q.some(he=>he.id===B.id)?Q.map(he=>he.id===B.id?B:he):[...Q,B]),C(null)},onSectionDeleted:B=>{C(null),b(Q=>Q.filter(he=>he.id!==B)),Xt().catch(Ye)},updateBot:bn,openAnywhere:Qn,removeChannel:cn,deleteBot:fi,pinChat:Lt,muteChat:$t}),Te&&o.jsx("div",{className:"ui-toast",role:"status",children:Te}),WI]})}function eH(){const e=`https://${location.host}${location.pathname}${location.search}`;return o.jsxs("div",{className:"jv-insecure",role:"status",children:[o.jsx(AC,{"aria-hidden":"true"}),o.jsx("span",{children:x("connection.insecure")}),o.jsx("a",{href:e,children:x("connection.useHttps")})]})}function tH(){return Kb(),window.isSecureContext?o.jsx(Fb,{}):o.jsxs("div",{className:"jv-insecure-shell",children:[o.jsx(eH,{}),o.jsx(Fb,{})]})}o8.createRoot(document.getElementById("root")).render(o.jsx(w.StrictMode,{children:o.jsx(tH,{})}));