@goodfish/jarvy 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +4 -2
- package/README.zh-CN.md +4 -2
- package/THIRD_PARTY_NOTICE.md +1 -1
- package/dist/server/cli.js +1443 -324
- package/dist/web/assets/index-Ds2S6THj.js +536 -0
- package/dist/web/assets/index-TrYYVs4D.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +4 -3
- package/dist/web/assets/index-DoVuF8GU.js +0 -534
- package/dist/web/assets/index-Dsjq2IH9.css +0 -1
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
var xT=Object.defineProperty;var cb=e=>{throw TypeError(e)};var bT=(e,i,r)=>i in e?xT(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r;var nc=(e,i,r)=>bT(e,typeof i!="symbol"?i+"":i,r),ub=(e,i,r)=>i.has(e)||cb("Cannot "+r);var Ln=(e,i,r)=>(ub(e,i,"read from private field"),r?r.call(e):i.get(e)),db=(e,i,r)=>i.has(e)?cb("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,r),Em=(e,i,r,l)=>(ub(e,i,"write to private field"),l?l.call(e,r):i.set(e,r),r);function jT(e,i){for(var r=0;r<i.length;r++){const l=i[r];if(typeof l!="string"&&!Array.isArray(l)){for(const s in l)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(l,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>l[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function cg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tm={exports:{}},ic={};/**
|
|
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 fb;function wT(){if(fb)return ic;fb=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(l,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:l,key:d,ref:s!==void 0?s:null,props:u}}return ic.Fragment=i,ic.jsx=r,ic.jsxs=r,ic}var hb;function ST(){return hb||(hb=1,Tm.exports=wT()),Tm.exports}var c=ST(),Am={exports:{}},Ye={};/**
|
|
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 mb;function kT(){if(mb)return Ye;mb=1;var e=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=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"),g=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),b=Symbol.iterator;function w(V){return V===null||typeof V!="object"?null:(V=b&&V[b]||V["@@iterator"],typeof V=="function"?V:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function M(V,fe,ye){this.props=V,this.context=fe,this.refs=E,this.updater=ye||k}M.prototype.isReactComponent={},M.prototype.setState=function(V,fe){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,fe,"setState")},M.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function T(){}T.prototype=M.prototype;function A(V,fe,ye){this.props=V,this.context=fe,this.refs=E,this.updater=ye||k}var I=A.prototype=new T;I.constructor=A,C(I,M.prototype),I.isPureReactComponent=!0;var R=Array.isArray;function B(){}var U={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function z(V,fe,ye){var je=ye.ref;return{$$typeof:e,type:V,key:fe,ref:je!==void 0?je:null,props:ye}}function Y(V,fe){return z(V.type,fe,V.props)}function q(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function ee(V){var fe={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(ye){return fe[ye]})}var G=/\/+/g;function H(V,fe){return typeof V=="object"&&V!==null&&V.key!=null?ee(""+V.key):fe.toString(36)}function Q(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(B,B):(V.status="pending",V.then(function(fe){V.status==="pending"&&(V.status="fulfilled",V.value=fe)},function(fe){V.status==="pending"&&(V.status="rejected",V.reason=fe)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function O(V,fe,ye,je,ae){var xe=typeof V;(xe==="undefined"||xe==="boolean")&&(V=null);var oe=!1;if(V===null)oe=!0;else switch(xe){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(V.$$typeof){case e:case i:oe=!0;break;case y:return oe=V._init,O(oe(V._payload),fe,ye,je,ae)}}if(oe)return ae=ae(V),oe=je===""?"."+H(V,0):je,R(ae)?(ye="",oe!=null&&(ye=oe.replace(G,"$&/")+"/"),O(ae,fe,ye,"",function(Ne){return Ne})):ae!=null&&(q(ae)&&(ae=Y(ae,ye+(ae.key==null||V&&V.key===ae.key?"":(""+ae.key).replace(G,"$&/")+"/")+oe)),fe.push(ae)),1;oe=0;var ce=je===""?".":je+":";if(R(V))for(var me=0;me<V.length;me++)je=V[me],xe=ce+H(je,me),oe+=O(je,fe,ye,xe,ae);else if(me=w(V),typeof me=="function")for(V=me.call(V),me=0;!(je=V.next()).done;)je=je.value,xe=ce+H(je,me++),oe+=O(je,fe,ye,xe,ae);else if(xe==="object"){if(typeof V.then=="function")return O(Q(V),fe,ye,je,ae);throw fe=String(V),Error("Objects are not valid as a React child (found: "+(fe==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":fe)+"). If you meant to render a collection of children, use an array instead.")}return oe}function F(V,fe,ye){if(V==null)return V;var je=[],ae=0;return O(V,je,"","",function(xe){return fe.call(ye,xe,ae++)}),je}function ne(V){if(V._status===-1){var fe=V._result,ye=fe();ye.then(function(je){(V._status===0||V._status===-1)&&(V._status=1,V._result=je,ye.status===void 0&&(ye.status="fulfilled",ye.value=je))},function(je){(V._status===0||V._status===-1)&&(V._status=2,V._result=je,ye.status===void 0&&(ye.status="rejected",ye.reason=je))}),V._status===-1&&(V._status=0,V._result=ye)}if(V._status===1)return V._result.default;throw V._result}var D=typeof reportError=="function"?reportError:function(V){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var fe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof V=="object"&&V!==null&&typeof V.message=="string"?String(V.message):String(V),error:V});if(!window.dispatchEvent(fe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",V);return}console.error(V)};function J(V){var fe=U.T,ye={};ye.types=fe!==null?fe.types:null,U.T=ye;try{var je=V(),ae=U.S;ae!==null&&ae(ye,je),typeof je=="object"&&je!==null&&typeof je.then=="function"&&je.then(B,D)}catch(xe){D(xe)}finally{fe!==null&&ye.types!==null&&(fe.types=ye.types),U.T=fe}}function W(V){var fe=U.T;if(fe!==null){var ye=fe.types;ye===null?fe.types=[V]:ye.indexOf(V)===-1&&ye.push(V)}else J(W.bind(null,V))}var P={map:F,forEach:function(V,fe,ye){F(V,function(){fe.apply(this,arguments)},ye)},count:function(V){var fe=0;return F(V,function(){fe++}),fe},toArray:function(V){return F(V,function(fe){return fe})||[]},only:function(V){if(!q(V))throw Error("React.Children.only expected to receive a single React element child.");return V}};return Ye.Activity=g,Ye.Children=P,Ye.Component=M,Ye.Fragment=r,Ye.Profiler=s,Ye.PureComponent=A,Ye.StrictMode=l,Ye.Suspense=m,Ye.ViewTransition=x,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(V){return U.H.useMemoCache(V)}},Ye.addTransitionType=W,Ye.cache=function(V){return function(){return V.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Ye.cloneElement=function(V,fe,ye){if(V==null)throw Error("The argument must be a React element, but you passed "+V+".");var je=C({},V.props),ae=V.key;if(fe!=null)for(xe in fe.key!==void 0&&(ae=""+fe.key),fe)!$.call(fe,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&fe.ref===void 0||(je[xe]=fe[xe]);var xe=arguments.length-2;if(xe===1)je.children=ye;else if(1<xe){for(var oe=Array(xe),ce=0;ce<xe;ce++)oe[ce]=arguments[ce+2];je.children=oe}return z(V.type,ae,je)},Ye.createContext=function(V){return V={$$typeof:d,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null},V.Provider=V,V.Consumer={$$typeof:u,_context:V},V},Ye.createElement=function(V,fe,ye){var je,ae={},xe=null;if(fe!=null)for(je in fe.key!==void 0&&(xe=""+fe.key),fe)$.call(fe,je)&&je!=="key"&&je!=="__self"&&je!=="__source"&&(ae[je]=fe[je]);var oe=arguments.length-2;if(oe===1)ae.children=ye;else if(1<oe){for(var ce=Array(oe),me=0;me<oe;me++)ce[me]=arguments[me+2];ae.children=ce}if(V&&V.defaultProps)for(je in oe=V.defaultProps,oe)ae[je]===void 0&&(ae[je]=oe[je]);return z(V,xe,ae)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(V){return{$$typeof:f,render:V}},Ye.isValidElement=q,Ye.lazy=function(V){return{$$typeof:y,_payload:{_status:-1,_result:V},_init:ne}},Ye.memo=function(V,fe){return{$$typeof:v,type:V,compare:fe===void 0?null:fe}},Ye.startTransition=J,Ye.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ye.use=function(V){return U.H.use(V)},Ye.useActionState=function(V,fe,ye){return U.H.useActionState(V,fe,ye)},Ye.useCallback=function(V,fe){return U.H.useCallback(V,fe)},Ye.useContext=function(V){return U.H.useContext(V)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(V,fe){return U.H.useDeferredValue(V,fe)},Ye.useEffect=function(V,fe){return U.H.useEffect(V,fe)},Ye.useEffectEvent=function(V){return U.H.useEffectEvent(V)},Ye.useId=function(){return U.H.useId()},Ye.useImperativeHandle=function(V,fe,ye){return U.H.useImperativeHandle(V,fe,ye)},Ye.useInsertionEffect=function(V,fe){return U.H.useInsertionEffect(V,fe)},Ye.useLayoutEffect=function(V,fe){return U.H.useLayoutEffect(V,fe)},Ye.useMemo=function(V,fe){return U.H.useMemo(V,fe)},Ye.useOptimistic=function(V,fe){return U.H.useOptimistic(V,fe)},Ye.useReducer=function(V,fe,ye){return U.H.useReducer(V,fe,ye)},Ye.useRef=function(V){return U.H.useRef(V)},Ye.useState=function(V){return U.H.useState(V)},Ye.useSyncExternalStore=function(V,fe,ye){return U.H.useSyncExternalStore(V,fe,ye)},Ye.useTransition=function(){return U.H.useTransition()},Ye.version="19.3.0",Ye}var pb;function ug(){return pb||(pb=1,Am.exports=kT()),Am.exports}var S=ug();const CT=cg(S),wc=jT({__proto__:null,default:CT},[S]);var Mm={exports:{}},rc={},Rm={exports:{}},Om={};/**
|
|
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 gb;function NT(){return gb||(gb=1,(function(e){function i(Q,O){var F=Q.length;Q.push(O);e:for(;0<F;){var ne=F-1>>>1,D=Q[ne];if(0<s(D,O))Q[ne]=O,Q[F]=D,F=ne;else break e}}function r(Q){return Q.length===0?null:Q[0]}function l(Q){if(Q.length===0)return null;var O=Q[0],F=Q.pop();if(F!==O){Q[0]=F;e:for(var ne=0,D=Q.length,J=D>>>1;ne<J;){var W=2*(ne+1)-1,P=Q[W],V=W+1,fe=Q[V];if(0>s(P,F))V<D&&0>s(fe,P)?(Q[ne]=fe,Q[V]=F,ne=V):(Q[ne]=P,Q[W]=F,ne=W);else if(V<D&&0>s(fe,F))Q[ne]=fe,Q[V]=F,ne=V;else break e}}return O}function s(Q,O){var F=Q.sortIndex-O.sortIndex;return F!==0?F:Q.id-O.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,g=null,x=3,b=!1,w=!1,k=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(Q){for(var O=r(v);O!==null;){if(O.callback===null)l(v);else if(O.startTime<=Q)l(v),O.sortIndex=O.expirationTime,i(m,O);else break;O=r(v)}}function I(Q){if(k=!1,A(Q),!w)if(r(m)!==null)w=!0,R||(R=!0,q());else{var O=r(v);O!==null&&H(I,O.startTime-Q)}}var R=!1,B=-1,U=5,$=-1;function z(){return C?!0:!(e.unstable_now()-$<U)}function Y(){if(C=!1,R){var Q=e.unstable_now();$=Q;var O=!0;try{e:{w=!1,k&&(k=!1,M(B),B=-1),b=!0;var F=x;try{t:{for(A(Q),g=r(m);g!==null&&!(g.expirationTime>Q&&z());){var ne=g.callback;if(typeof ne=="function"){g.callback=null,x=g.priorityLevel;var D=ne(g.expirationTime<=Q);if(Q=e.unstable_now(),typeof D=="function"){g.callback=D,A(Q),O=!0;break t}g===r(m)&&l(m),A(Q)}else l(m);g=r(m)}if(g!==null)O=!0;else{var J=r(v);J!==null&&H(I,J.startTime-Q),O=!1}}break e}finally{g=null,x=F,b=!1}O=void 0}}finally{O?q():R=!1}}}var q;if(typeof T=="function")q=function(){T(Y)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,G=ee.port2;ee.port1.onmessage=Y,q=function(){G.postMessage(null)}}else q=function(){E(Y,0)};function H(Q,O){B=E(function(){Q(e.unstable_now())},O)}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(Q){Q.callback=null},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(Q){switch(x){case 1:case 2:case 3:var O=3;break;default:O=x}var F=x;x=O;try{return Q()}finally{x=F}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(Q,O){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var F=x;x=Q;try{return O()}finally{x=F}},e.unstable_scheduleCallback=function(Q,O,F){var ne=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ne+F:ne):F=ne,Q){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=F+D,Q={id:y++,callback:O,priorityLevel:Q,startTime:F,expirationTime:D,sortIndex:-1},F>ne?(Q.sortIndex=F,i(v,Q),r(m)===null&&Q===r(v)&&(k?(M(B),B=-1):k=!0,H(I,F-ne))):(Q.sortIndex=D,i(m,Q),w||b||(w=!0,R||(R=!0,q()))),Q},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(Q){var O=x;return function(){var F=x;x=O;try{return Q.apply(this,arguments)}finally{x=F}}}})(Om)),Om}var vb;function ET(){return vb||(vb=1,Rm.exports=NT()),Rm.exports}var _m={exports:{}},Tn={};/**
|
|
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 yb;function TT(){if(yb)return Tn;yb=1;var e=ug();function i(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal"),u=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function f(y,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:b===d?d:""+b,children:y,containerInfo:g,implementation:x}}var m=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Tn.browser=function(y){return{$$typeof:u,_reason:y}},Tn.createPortal=function(y,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return f(y,g,null,x)},Tn.flushSync=function(y){var g=m.T,x=l.p;try{if(m.T=null,l.p=2,y)return y()}finally{m.T=g,l.p=x,l.d.f()}},Tn.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(y,g))},Tn.prefetchDNS=function(y){typeof y=="string"&&l.d.D(y)},Tn.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var x=g.as,b=v(x,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,k=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?l.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:w,fetchPriority:k}):x==="script"&&l.d.X(y,{crossOrigin:b,integrity:w,fetchPriority:k,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Tn.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=v(g.as,g.crossOrigin);l.d.M(y,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&l.d.M(y)},Tn.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=v(x,g.crossOrigin);l.d.L(y,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Tn.preloadModule=function(y,g){if(typeof y=="string")if(g){var x=v(g.as,g.crossOrigin);l.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else l.d.m(y)},Tn.requestFormReset=function(y){l.d.r(y)},Tn.unstable_batchedUpdates=function(y,g){return y(g)},Tn.useFormState=function(y,g,x){return m.H.useFormState(y,g,x)},Tn.useFormStatus=function(){return m.H.useHostTransitionStatus()},Tn.version="19.3.0",Tn}var xb;function A2(){if(xb)return _m.exports;xb=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(i){console.error(i)}}return e(),_m.exports=TT(),_m.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 bb;function AT(){if(bb)return rc;bb=1;var e=ET(),i=ug(),r=A2();function l(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}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 s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){for(var n=t,a=n;a&&!a.alternate;)n=a,(n.flags&4098)!==0&&(t=n.return),a=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(l(188))}function v(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(l(188));return n!==t?null:t}for(var a=t,o=n;;){var h=a.return;if(h===null)break;var p=h.alternate;if(p===null){if(o=h.return,o!==null){a=o;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===a)return m(h),t;if(p===o)return m(h),n;p=p.sibling}throw Error(l(188))}if(a.return!==o.return)a=h,o=p;else{for(var N=!1,_=h.child;_;){if(_===a){N=!0,a=h,o=p;break}if(_===o){N=!0,o=h,a=p;break}_=_.sibling}if(!N){for(_=p.child;_;){if(_===a){N=!0,a=p,o=h;break}if(_===o){N=!0,o=p,a=h;break}_=_.sibling}if(!N)throw Error(l(189))}}if(a.alternate!==o)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?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 g(t,n,a,o,h,p){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&a(t,o,h,p)||(t.tag!==22||t.memoizedState===null)&&(n||t.tag!==5&&t.tag!==27)&&g(t.child,n,a,o,h,p))return!0;t=t.sibling}return!1}function x(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 b(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 w(t){var n=[null,null],a=x(t);return a===null||k(n,t,a.child,{foundSelf:!1}),n}function k(t,n,a,o){for(;a!==null;){if(a===n)o.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(o.foundSelf)return t[1]=a,!0;t[0]=a}else if((a.tag!==22||a.memoizedState===null)&&k(t,n,a.child,o))return!0;a=a.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(l(559))}}var E=null,M=null;function T(t,n,a){return t===a?!0:t===n?(E=t,!0):!1}function A(t,n,a){return t===a?(M=t,!1):t===n?(M!==null&&(E=t),!0):!1}function I(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 R(t,n,a){for(var o=0,h=t;h;h=a(h))o++;h=0;for(var p=n;p;p=a(p))h++;for(;0<o-h;)t=a(t),o--;for(;0<h-o;)n=a(n),h--;for(;o--;){if(t===n||n!==null&&t===n.alternate)return t;t=a(t),n=a(n)}return null}var B=Object.assign,U=Symbol.for("react.element"),$=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),H=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),W=Symbol.for("react.legacy_hidden"),P=Symbol.for("react.memo_cache_sentinel"),V=Symbol.for("react.view_transition"),fe=Symbol.for("react.recoverable"),ye=Symbol.iterator;function je(t){return t===null||typeof t!="object"?null:(t=ye&&t[ye]||t["@@iterator"],typeof t=="function"?t:null)}var ae=Symbol.for("react.client.reference");function xe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ae?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Y:return"Fragment";case ee:return"Profiler";case q:return"StrictMode";case O:return"Suspense";case F:return"SuspenseList";case J:return"Activity";case V:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case H:return t.displayName||"Context";case G:return(t._context.displayName||"Context")+".Consumer";case Q: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:xe(t.type)||"Memo";case D:n=t._payload,t=t._init;try{return xe(t(n))}catch{}}return null}var oe=Array.isArray,ce=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ne={pending:!1,data:null,method:null,action:null},ze=[],Ve=-1;function ht(t){return{current:t}}function ot(t){0>Ve||(t.current=ze[Ve],ze[Ve]=null,Ve--)}function Je(t,n){Ve++,ze[Ve]=t.current,t.current=n}var At=ht(null),gn=ht(null),vn=ht(null),Pn=ht(null);function di(t,n){switch(Je(vn,n),Je(gn,t),Je(At,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?yx(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=yx(n),t=xx(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ot(At),Je(At,t)}function rn(){ot(At),ot(gn),ot(vn)}function Yi(t){var n=t.memoizedState;n!==null&&(Fo._currentValue=n.memoizedState,Je(Pn,t)),n=At.current;var a=xx(n,t.type);n!==a&&(Je(gn,t),Je(At,a))}function pe(t){gn.current===t&&(ot(At),ot(gn)),Pn.current===t&&(ot(Pn),Fo._currentValue=Ne)}var ke,Be;function Ue(t){if(ke===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);ke=n&&n[1]||"",Be=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ke+t+Be}var We=!1;function Pt(t,n){if(!t||We)return"";We=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(Ce){var te=Ce}Reflect.construct(t,[],ve)}else{try{ve.call()}catch(Ce){te=Ce}ve=!1;try{var se=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ve=!0,new t}finally{ve&&(se!==void 0?Object.defineProperty(t.prototype,"props",se):delete t.prototype.props)}}}else{try{throw Error()}catch(Ce){te=Ce}(ve=t())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(Ce){if(Ce&&te&&typeof Ce.stack=="string")return[Ce.stack,te.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),N=p[0],_=p[1];if(N&&_){var X=N.split(`
|
|
44
|
+
`),re=_.split(`
|
|
45
|
+
`);for(h=o=0;o<X.length&&!X[o].includes("DetermineComponentFrameRoot");)o++;for(;h<re.length&&!re[h].includes("DetermineComponentFrameRoot");)h++;if(o===X.length||h===re.length)for(o=X.length-1,h=re.length-1;1<=o&&0<=h&&X[o]!==re[h];)h--;for(;1<=o&&0<=h;o--,h--)if(X[o]!==re[h]){if(o!==1||h!==1)do if(o--,h--,0>h||X[o]!==re[h]){var de=`
|
|
46
|
+
`+X[o].replace(" at new "," at ");return t.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",t.displayName)),de}while(1<=o&&0<=h);break}}}finally{We=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ue(a):""}function yn(t,n){switch(t.tag){case 26:case 27:case 5:return Ue(t.type);case 16:return Ue("Lazy");case 13:return t.child!==n&&n!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("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 Ue("Activity");case 30:return Ue("ViewTransition");default:return""}}function Ut(t){try{var n="",a=null;do n+=yn(t,a),a=t,t=t.return;while(t);return n}catch(o){return`
|
|
47
|
+
Error generating stack: `+o.message+`
|
|
48
|
+
`+o.stack}}var Rn=Object.prototype.hasOwnProperty,Un=e.unstable_scheduleCallback,_t=e.unstable_cancelCallback,On=e.unstable_shouldYield,Xe=e.unstable_requestPaint,Gt=e.unstable_now,ll=e.unstable_getCurrentPriorityLevel,sr=e.unstable_ImmediatePriority,cr=e.unstable_UserBlockingPriority,xn=e.unstable_NormalPriority,fi=e.unstable_LowPriority,ol=e.unstable_IdlePriority,hi=e.log,ao=e.unstable_setDisableYieldValue,Gi=null,sn=null;function Lt(t){if(typeof hi=="function"&&ao(t),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Gi,t)}catch{}}var Vt=Math.clz32?Math.clz32:Xi,ur=Math.log,dr=Math.LN2;function Xi(t){return t>>>=0,t===0?32:31-(ur(t)/dr|0)|0}var Qi=256,Ri=262144,Kn=4194304;function Ki(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 mi(t,n,a){var o=t.pendingLanes;if(o===0)return 0;var h=0,p=t.suspendedLanes,N=t.pingedLanes;t=t.warmLanes;var _=o&134217727;return _!==0?(o=_&~p,o!==0?h=Ki(o):(N&=_,N!==0?h=Ki(N):a||(a=_&~t,a!==0&&(h=Ki(a))))):(_=o&~p,_!==0?h=Ki(_):N!==0?h=Ki(N):a||(a=o&~t,a!==0&&(h=Ki(a)))),h===0?0:n!==0&&n!==h&&(n&p)===0&&(p=h&-h,a=n&-n,p>=a||p===32&&(a&4194048)!==0)?n:h}function pi(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function fr(t,n){(n&8)!==0&&(n|=n&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=n;0<a;){var o=31-Vt(a),h=1<<o;n|=t[o],a&=~h}return n}function sl(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 gi(){var t=Kn;return Kn<<=1,(Kn&62914560)===0&&(Kn=4194304),t}function ya(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function Zn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function hr(t,n,a,o,h,p){var N=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,X=t.expirationTimes,re=t.hiddenUpdates;for(a=N&~a;0<a;){var de=31-Vt(a),ve=1<<de;_[de]=0,X[de]=-1;var te=re[de];if(te!==null)for(re[de]=null,de=0;de<te.length;de++){var se=te[de];se!==null&&(se.lane&=-536870913)}a&=~ve}o!==0&&Jn(t,o,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(N&~n))}function Jn(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var o=31-Vt(n);t.entangledLanes|=n,t.entanglements[o]=t.entanglements[o]|1073741824|a&261930}function an(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var o=31-Vt(a),h=1<<o;h&n|t[o]&n&&(t[o]|=n),a&=~h}}function cn(t,n){var a=n&-n;return a=(a&42)!==0?1:mr(a),(a&(t.suspendedLanes|n))!==0?0:a}function mr(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 ei(){var t=me.p;return t!==0?t:(t=window.event,t===void 0?32:nb(t.type))}function _n(t,n){var a=me.p;try{return me.p=t,n()}finally{me.p=a}}var It=Math.random().toString(36).slice(2),Mt="__reactFiber$"+It,$t="__reactProps$"+It,bn="__reactContainer$"+It,cl="__reactEvents$"+It,xa="__reactListeners$"+It,ba="__reactHandles$"+It,pr="__reactResources$"+It,gr="__reactMarker$"+It,Yr="__reactLoad$"+It;function Gr(t){delete t[Mt],delete t[$t],delete t[xa],delete t[ba]}function ti(t){var n;if(n=t[Mt])return n;for(var a=t.parentNode;a;){if(n=a[bn]||a[Mt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=Lx(t);t!==null;){if(a=t[Mt])return a;t=Lx(t)}return n}t=a,a=t.parentNode}return null}function vr(t){if(t=t[Mt]||t[bn]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ue(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(l(33))}function L(t){var n=t[pr];return n||(n=t[pr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function K(t){t[gr]=!0}function he(t){t[Yr]=void 0}var Ee=new Set,Se={};function Te(t,n){Le(t,n),Le(t+"Capture",n)}function Le(t,n){for(Se[t]=n,t=0;t<n.length;t++)Ee.add(n[t])}var Qe=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 st(t){return Rn.call($e,t)?!0:Rn.call(Re,t)?!1:Qe.test(t)?$e[t]=!0:(Re[t]=!0,!1)}var He=!1;function ln(){var t=He;return He=!1,t}function Bt(t,n,a){if(st(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,a)}}function vi(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,a)}}function Xt(t,n,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,o)}}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 lo(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ds(t,n,a){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,p=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(N){a=""+N,p.call(this,N)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(N){a=""+N},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Xr(t){if(!t._valueTracker){var n=lo(t)?"checked":"value";t._valueTracker=ds(t,n,""+t[n])}}function oo(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return t&&(o=lo(t)?t.checked?"true":"false":t.value),t=o,t!==a?(n.setValue(t),!0):!1}var Ic=/[\n"\\]/g;function Rt(t){return t.replace(Ic,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Dn(t,n,a,o,h,p,N,_){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?so(t,Qt(t.value)):so(t,Qt(n)):a!=null?so(t,Qt(a)):o!=null&&t.removeAttribute("value"),h==null&&p!=null&&(t.defaultChecked=!!p),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Qt(_):t.removeAttribute("name")}function ja(t,n,a,o,h,p,N,_){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),n!=null||a!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){Xr(t);return}a=a!=null?""+Qt(a):"",n=n!=null?""+Qt(n):a,_||n===t.value||(t.value=n),t.defaultValue=n}o=o??h,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=_?t.checked:!!o,t.defaultChecked=!!o,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(t.name=N),Xr(t)}function so(t,n){t.defaultValue!==""+n&&(t.defaultValue=""+n)}function ni(t,n,a,o){if(t=t.options,n){n={};for(var h=0;h<a.length;h++)n["$"+a[h]]=!0;for(a=0;a<t.length;a++)h=n.hasOwnProperty("$"+t[a].value),t[a].selected!==h&&(t[a].selected=h),h&&o&&(t[a].defaultSelected=!0)}else{for(a=""+Qt(a),n=null,h=0;h<t.length;h++){if(t[h].value===a){t[h].selected=!0,o&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function co(t,n,a){if(n!=null&&(n=""+Qt(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Qt(a):""}function yi(t,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(l(92));if(oe(o)){if(1<o.length)throw Error(l(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=Qt(n),t.defaultValue=a,o=t.textContent,o===a&&o!==""&&o!==null&&(t.value=o),Xr(t)}function qn(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var wa=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 fs(t,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":o?t.setProperty(n,a):typeof a!="number"||a===0||wa.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function xi(t,n,a){if(n!=null&&typeof n!="object")throw Error(l(62));if(t=t.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="",He=!0);for(var h in n)o=n[h],n.hasOwnProperty(h)&&a[h]!==o&&(fs(t,h,o),He=!0)}else for(var p in n)n.hasOwnProperty(p)&&fs(t,p,n[p])}function ul(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 hs=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"]]),ms=/^[\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 jn(t){return ms.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Fn(){}var dl=null;function fl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ut=null,un=null;function Oi(t){var n=vr(t);if(n&&(t=n.stateNode)){var a=t[$t]||null;e:switch(t=n.stateNode,n.type){case"input":if(Dn(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Rt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==t&&o.form===t.form){var h=o[$t]||null;if(!h)throw Error(l(90));Dn(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===t.form&&oo(o)}break e;case"textarea":co(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ni(t,!!a.multiple,n,!1)}}}var bi=!1;function hl(t,n,a){if(bi)return t(n,a);bi=!0;try{var o=t(n);return o}finally{if(bi=!1,(ut!==null||un!==null)&&(Iu(),ut&&(n=ut,t=un,un=ut=null,Oi(n),t)))for(n=0;n<t.length;n++)Oi(t[n])}}function Qr(t,n){var a=t.stateNode;if(a===null)return null;var o=a[$t]||null;if(o===null)return null;a=o[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":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ml=!1;if(wn)try{var ps={};Object.defineProperty(ps,"passive",{get:function(){ml=!0}}),window.addEventListener("test",ps,ps),window.removeEventListener("test",ps,ps)}catch{ml=!1}var Sa=null,df=null,Bc=null;function mv(){if(Bc)return Bc;var t,n=df,a=n.length,o,h="value"in Sa?Sa.value:Sa.textContent,p=h.length;for(t=0;t<a&&n[t]===h[t];t++);var N=a-t;for(o=1;o<=N&&n[a-o]===h[p-o];o++);return Bc=h.slice(t,1<o?1-o:void 0)}function Hc(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 Pc(){return!0}function pv(){return!1}function Vn(t){function n(a,o,h,p,N){this._reactName=a,this._targetInst=h,this.type=o,this.nativeEvent=p,this.target=N,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(p):p[_]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Pc:pv,this.isPropagationStopped=pv,this}return B(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Pc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Pc)},persist:function(){},isPersistent:Pc}),n}var ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uc=Vn(ka),gs=B({},ka,{view:0,detail:0}),VC=Vn(gs),ff,hf,vs,qc=B({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pf,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!==vs&&(vs&&t.type==="mousemove"?(ff=t.screenX-vs.screenX,hf=t.screenY-vs.screenY):hf=ff=0,vs=t),ff)},movementY:function(t){return"movementY"in t?t.movementY:hf}}),gv=Vn(qc),$C=B({},qc,{dataTransfer:0}),YC=Vn($C),GC=B({},gs,{relatedTarget:0}),mf=Vn(GC),XC=B({},ka,{animationName:0,elapsedTime:0,pseudoElement:0}),QC=Vn(XC),KC=B({},ka,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ZC=Vn(KC),JC=B({},ka,{data:0}),vv=Vn(JC),WC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eN={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"},tN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nN(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=tN[t])?!!n[t]:!1}function pf(){return nN}var iN=B({},gs,{key:function(t){if(t.key){var n=WC[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=Hc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?eN[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pf,charCode:function(t){return t.type==="keypress"?Hc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Hc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),rN=Vn(iN),aN=B({},qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yv=Vn(aN),lN=B({},ka,{submitter:0}),oN=Vn(lN),sN=B({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pf}),cN=Vn(sN),uN=B({},ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),dN=Vn(uN),fN=B({},qc,{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}),hN=Vn(fN),mN=B({},ka,{newState:0,oldState:0,source:0}),pN=Vn(mN),gN=[9,13,27,32],gf=wn&&"CompositionEvent"in window,ys=null;wn&&"documentMode"in document&&(ys=document.documentMode);var vN=wn&&"TextEvent"in window&&!ys,xv=wn&&(!gf||ys&&8<ys&&11>=ys),bv=" ",jv=!1;function wv(t,n){switch(t){case"keyup":return gN.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sv(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var uo=!1;function yN(t,n){switch(t){case"compositionend":return Sv(n);case"keypress":return n.which!==32?null:(jv=!0,bv);case"textInput":return t=n.data,t===bv&&jv?null:t;default:return null}}function xN(t,n){if(uo)return t==="compositionend"||!gf&&wv(t,n)?(t=mv(),Bc=df=Sa=null,uo=!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 xv&&n.locale!=="ko"?null:n.data;default:return null}}var bN={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 kv(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!bN[t.type]:n==="textarea"}function Cv(t,n,a,o){ut?un?un.push(o):un=[o]:ut=o,n=Fu(n,"onChange"),0<n.length&&(a=new Uc("onChange","change",null,a,o),t.push({event:a,listeners:n}))}var xs=null,bs=null;function jN(t){fx(t,0)}function Fc(t){var n=ue(t);if(oo(n))return t}function Nv(t,n){if(t==="change")return n}var Ev=!1;if(wn){var vf;if(wn){var yf="oninput"in document;if(!yf){var Tv=document.createElement("div");Tv.setAttribute("oninput","return;"),yf=typeof Tv.oninput=="function"}vf=yf}else vf=!1;Ev=vf&&(!document.documentMode||9<document.documentMode)}function Av(){xs&&(xs.detachEvent("onpropertychange",Mv),bs=xs=null)}function Mv(t){if(t.propertyName==="value"&&Fc(bs)){var n=[];Cv(n,bs,t,fl(t)),hl(jN,n)}}function wN(t,n,a){t==="focusin"?(Av(),xs=n,bs=a,xs.attachEvent("onpropertychange",Mv)):t==="focusout"&&Av()}function SN(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Fc(bs)}function kN(t,n){if(t==="click")return Fc(n)}function CN(t,n){if(t==="input"||t==="change")return Fc(n)}function NN(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var ji=typeof Object.is=="function"?Object.is:NN;function js(t,n){if(ji(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var h=a[o];if(!Rn.call(n,h)||!ji(t[h],n[h]))return!1}return!0}function xf(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 Rv(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ov(t,n){var a=Rv(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=n&&o>=n)return{node:a,offset:n-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Rv(a)}}function _v(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?_v(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Dv(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=xf(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=xf(t.document)}return n}function bf(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 EN=wn&&"documentMode"in document&&11>=document.documentMode,fo=null,jf=null,ws=null,wf=!1;function zv(t,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;wf||fo==null||fo!==xf(o)||(o=fo,"selectionStart"in o&&bf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ws&&js(ws,o)||(ws=o,o=Fu(jf,"onSelect"),0<o.length&&(n=new Uc("onSelect","select",null,n,a),t.push({event:n,listeners:o}),n.target=fo)))}function pl(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var ho={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},Sf={},Lv={};wn&&(Lv=document.createElement("div").style,"AnimationEvent"in window||(delete ho.animationend.animation,delete ho.animationiteration.animation,delete ho.animationstart.animation),"TransitionEvent"in window||delete ho.transitionend.transition);function gl(t){if(Sf[t])return Sf[t];if(!ho[t])return t;var n=ho[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Lv)return Sf[t]=n[a];return t}var Iv=gl("animationend"),Bv=gl("animationiteration"),Hv=gl("animationstart"),TN=gl("transitionrun"),AN=gl("transitionstart"),MN=gl("transitioncancel"),Pv=gl("transitionend"),Uv=new Map,kf="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(" ");kf.push("scrollEnd");function Zi(t,n){Uv.set(t,n),Te(n,[t])}var RN=0;function Kr(t,n){if(t.name!=null&&t.name!=="auto")return t.name;if(n.autoName!==null)return n.autoName;t=tr.identifierPrefix;var a=RN++;return t="_"+t+"t_"+a.toString(32)+"_",n.autoName=t}function qv(t){if(t==null||typeof t=="string")return t;var n=null,a=_o;if(a!==null)for(var o=0;o<a.length;o++){var h=t[a[o]];if(h!=null){if(h==="none")return"none";n=n==null?h:n+(" "+h)}}return n??t.default}function Zr(t,n){return t=qv(t),n=qv(n),n==null?t==="auto"?null:t:n==="auto"?null:n}var Vc=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)},_i=[],mo=0,Cf=0;function $c(){for(var t=mo,n=Cf=mo=0;n<t;){var a=_i[n];_i[n++]=null;var o=_i[n];_i[n++]=null;var h=_i[n];_i[n++]=null;var p=_i[n];if(_i[n++]=null,o!==null&&h!==null){var N=o.pending;N===null?h.next=h:(h.next=N.next,N.next=h),o.pending=h}p!==0&&Fv(a,h,p)}}function Yc(t,n,a,o){_i[mo++]=t,_i[mo++]=n,_i[mo++]=a,_i[mo++]=o,Cf|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Nf(t,n,a,o){return Yc(t,n,a,o),Gc(t)}function vl(t,n){return Yc(t,null,null,n),Gc(t)}function Fv(t,n,a){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a);for(var h=!1,p=t.return;p!==null;)p.childLanes|=a,o=p.alternate,o!==null&&(o.childLanes|=a),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(h=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,h&&n!==null&&(h=31-Vt(a),t=p.hiddenUpdates,o=t[h],o===null?t[h]=[n]:o.push(n),n.lane=a|536870912),p):null}function Gc(t){if(50<Vs)throw Vs=0,Lu=null,Error(l(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var po={};function ON(t,n,a,o){this.tag=t,this.key=a,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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(t,n,a,o){return new ON(t,n,a,o)}function Ef(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Jr(t,n){var a=t.alternate;return a===null?(a=ii(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&1206910976,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Vv(t,n){t.flags&=1206910978;var a=t.alternate;return a===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=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function Xc(t,n,a,o,h,p){var N=0;if(o=t,typeof o=="function")Ef(o)&&(N=1);else if(typeof o=="string")N=lT(t,a,At.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(o){case J:return t=ii(31,a,n,h),t.elementType=J,t.lanes=p,t;case Y:return yl(a.children,h,p,n);case q:N=8,h|=24;break;case ee:return t=ii(12,a,n,h|2),t.elementType=ee,t.lanes=p,t;case O:return t=ii(13,a,n,h),t.elementType=O,t.lanes=p,t;case F:return t=ii(19,a,n,h),t.elementType=F,t.lanes=p,t;case W:case V:return t=h|32,t=ii(30,a,n,t),t.elementType=V,t.lanes=p,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:N=10;break e;case G:N=9;break e;case Q:N=11;break e;case ne:N=14;break e;case D:N=16,o=null;break e}N=29,a=Error(l(130,t===null?"null":typeof t,"")),o=null}return n=ii(N,a,n,h),n.elementType=t,n.type=o,n.lanes=p,n}function yl(t,n,a,o){return t=ii(7,t,o,n),t.lanes=a,t}function Tf(t,n,a){return t=ii(6,t,null,n),t.lanes=a,t}function $v(t){var n=ii(18,null,null,0);return n.stateNode=t,n}function Af(t,n,a){return n=ii(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Yv=new WeakMap;function Di(t,n){if(typeof t=="object"&&t!==null){var a=Yv.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Ut(n)},Yv.set(t,n),n)}return{value:t,source:n,stack:Ut(n)}}var go=[],vo=0,Qc=null,Ss=0,zi=[],Li=0,Ca=null,yr=1,xr="";function Wr(t,n){go[vo++]=Ss,go[vo++]=Qc,Qc=t,Ss=n}function Gv(t,n,a){zi[Li++]=yr,zi[Li++]=xr,zi[Li++]=Ca,Ca=t;var o=yr;t=xr;var h=32-Vt(o)-1;o&=~(1<<h),a+=1;var p=32-Vt(n)+h;if(30<p){var N=h-h%5;p=(o&(1<<N)-1).toString(32),o>>=N,h-=N,yr=1<<32-Vt(n)+h|a<<h|o,xr=p+t}else yr=1<<p|a<<h|o,xr=t}function Kc(t){t.return!==null&&(Wr(t,1),Gv(t,1,0))}function Mf(t){for(;t===Qc;)Qc=go[--vo],go[vo]=null,Ss=go[--vo],go[vo]=null;for(;t===Ca;)Ca=zi[--Li],zi[Li]=null,xr=zi[--Li],zi[Li]=null,yr=zi[--Li],zi[Li]=null}function Xv(t,n){zi[Li++]=yr,zi[Li++]=xr,zi[Li++]=Ca,yr=n.id,xr=n.overflow,Ca=t}var dn=null,Et=null,et=!1,Na=null,Ii=!1,Rf=Error(l(519));function Ea(t){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ks(Di(n,t)),Rf}function Qv(t){var n=t.stateNode,a=t.type,o=t.memoizedProps;switch(n[Mt]=t,n[$t]=o,a){case"dialog":nt("cancel",n),nt("close",n);break;case"iframe":case"object":case"embed":nt("load",n);break;case"video":case"audio":for(a=0;a<Ys.length;a++)nt(Ys[a],n);break;case"source":nt("error",n);break;case"img":case"image":case"link":nt("error",n),nt("load",n);break;case"details":nt("toggle",n);break;case"input":nt("invalid",n),ja(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":nt("invalid",n);break;case"textarea":nt("invalid",n),yi(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||gx(n.textContent,a)?(o.popover!=null&&(nt("beforetoggle",n),nt("toggle",n)),o.onScroll!=null&&nt("scroll",n),o.onScrollEnd!=null&&nt("scrollend",n),o.onClick!=null&&(n.onclick=Fn),n=!0):n=!1,n||Ea(t,!0)}function Zc(t){for(dn=t.return;dn;)switch(dn.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:dn=dn.return}}function yo(t){if(t!==dn)return!1;if(!et)return Zc(t),et=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||om(t.type,t.memoizedProps)),a=!a),a&&Et&&Ea(t),Zc(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));Et=zx(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));Et=zx(t)}else n===27?(n=Et,Fa(t.type)?(t=gm,gm=null,Et=t):Et=n):Et=dn?Hi(t.stateNode.nextSibling):null;return!0}function xl(){Et=dn=null,et=!1}function Of(){var t=Na;return t!==null&&(li===null?li=t:li.push.apply(li,t),Na=null),t}function ks(t){Na===null?Na=[t]:Na.push(t)}var _f=ht(null),bl=null,ea=null;function Ta(t,n,a){Je(_f,n._currentValue),n._currentValue=a}function ta(t){t._currentValue=_f.current,ot(_f)}function Jc(t,n,a){for(;t!==null;){var o=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),t===a)break;t=t.return}}function Df(t,n,a,o){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var p=h.dependencies;if(p!==null){var N=h.child;p=p.firstContext;e:for(;p!==null;){var _=p;p=h;for(var X=0;X<n.length;X++)if(_.context===n[X]){p.lanes|=a,_=p.alternate,_!==null&&(_.lanes|=a),Jc(p.return,a,t),o||(N=null);break e}p=_.next}}else if(h.tag===18){if(N=h.return,N===null)throw Error(l(341));N.lanes|=a,p=N.alternate,p!==null&&(p.lanes|=a),Jc(N,a,t),N=null}else h.tag===13&&h.memoizedState!==null&&h.memoizedState.dehydrated===null?(h.lanes|=a,N=h.alternate,N!==null&&(N.lanes|=a),Jc(h.return,a,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 jl(t,n,a,o){t=null;for(var h=n,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var N=h.alternate;if(N===null)throw Error(l(387));if(N=N.memoizedProps,N!==null){var _=h.type;ji(h.pendingProps.value,N.value)||(t!==null?t.push(_):t=[_])}}else if(h===Pn.current){if(N=h.alternate,N===null)throw Error(l(387));N.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Fo):t=[Fo])}h=h.return}return t!==null&&Df(n,t,a,o),n.flags|=262144,t!==null}function Wc(t){for(t=t.firstContext;t!==null;){if(!ji(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function wl(t){bl=t,ea=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Sn(t){return Kv(bl,t)}function eu(t,n){return bl===null&&wl(t),Kv(t,n)}function Kv(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},ea===null){if(t===null)throw Error(l(308));ea=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ea=ea.next=n;return a}var _N=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,o){t.push(o)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},DN=e.unstable_scheduleCallback,zN=e.unstable_NormalPriority,Kt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zf(){return{controller:new _N,data:new Map,refCount:0}}function Cs(t){t.refCount--,t.refCount===0&&DN(zN,function(){t.controller.abort()})}function Zv(t,n){if((t.pendingLanes&4194048)!==0){var a=t.transitionTypes;for(a===null&&(a=t.transitionTypes=[]),t=0;t<n.length;t++){var o=n[t];a.indexOf(o)===-1&&a.push(o)}}}var Ns=null;function LN(t){var n=t.transitionTypes;return t.transitionTypes=null,n}var Es=null,Lf=0,Sl=0,xo=null;function IN(t,n){if(Es===null){var a=Es=[];Lf=0,Sl=Jh(),xo={status:"pending",value:void 0,then:function(o){a.push(o)}}}return Lf++,n.then(Jv,Jv),n}function Jv(){if(--Lf===0&&(Ns=null,Es!==null)){xo!==null&&(xo.status="fulfilled");var t=Es;Es=null,Sl=0,xo=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function BN(t,n){var a=[],o={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return t.then(function(){o.status="fulfilled",o.value=n;for(var h=0;h<a.length;h++)(0,a[h])(n)},function(h){for(o.status="rejected",o.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),o}var Wv=ce.S;ce.S=function(t,n){if($0=Gt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&IN(t,n),Ns!==null)for(var a=Io;a!==null;)Zv(a,Ns),a=a.next;if(a=t.types,a!==null){for(var o=Io;o!==null;)Zv(o,a),o=o.next;if(Sl!==0){o=Ns,o===null&&(o=Ns=[]);for(var h=0;h<a.length;h++){var p=a[h];o.indexOf(p)===-1&&o.push(p)}}}Wv!==null&&Wv(t,n)};var kl=ht(null);function If(){var t=kl.current;return t!==null?t:kt.pooledCache}function tu(t,n){n===null?Je(kl,kl.current):Je(kl,n.pool)}function ey(){var t=If();return t===null?null:{parent:Kt._currentValue,pool:t}}var bo=Error(l(460)),Bf=Error(l(474)),nu=Error(l(542)),iu={then:function(){}};function ty(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ny(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(Fn,Fn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,ry(t),t===void 0&&!("reason"in n)?Error(l(600)):t;default:if(typeof n.status=="string")n.then(Fn,Fn);else{if(t=kt,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=n,t.status="pending",t.then(function(o){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=o}},function(o){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,ry(t),t}throw Nl=n,bo}}function Cl(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Nl=a,bo):a}}var Nl=null;function iy(){if(Nl===null)throw Error(l(459));var t=Nl;return Nl=null,t}function ry(t){if(t===bo||t===nu)throw Error(l(483))}var jo=null,Ts=0;function ru(t){var n=Ts;return Ts+=1,jo===null&&(jo=[]),ny(jo,t,n)}function Aa(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function au(t,n){throw n.$$typeof===U?Error(l(525)):(t=Object.prototype.toString.call(n),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function ay(t){function n(ie,Z){if(t){var le=ie.deletions;le===null?(ie.deletions=[Z],ie.flags|=16):le.push(Z)}}function a(ie,Z){if(!t)return null;for(;Z!==null;)n(ie,Z),Z=Z.sibling;return null}function o(ie){for(var Z=new Map;ie!==null;)ie.key===null?Z.set(ie.index,ie):Z.set(ie.key,ie),ie=ie.sibling;return Z}function h(ie,Z){return ie=Jr(ie,Z),ie.index=0,ie.sibling=null,ie}function p(ie,Z,le){return ie.index=le,t?(le=ie.alternate,le!==null?(le=le.index,le<Z?(ie.flags|=2,Z):le):(ie.flags|=134217730,Z)):(ie.flags|=1048576,Z)}function N(ie){return t&&ie.alternate===null&&(ie.flags|=134217730),ie}function _(ie,Z,le,ge){return Z===null||Z.tag!==6?(Z=Tf(le,ie.mode,ge),Z.return=ie,Z):(Z=h(Z,le),Z.return=ie,Z)}function X(ie,Z,le,ge){var Oe=le.type;return Oe===Y?(ie=de(ie,Z,le.props.children,ge,le.key),Aa(ie,le),ie):Z!==null&&(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===D&&Cl(Oe)===Z.type)?(Z=h(Z,le.props),Aa(Z,le),Z.return=ie,Z):(Z=Xc(le.type,le.key,le.props,null,ie.mode,ge),Aa(Z,le),Z.return=ie,Z)}function re(ie,Z,le,ge){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==le.containerInfo||Z.stateNode.implementation!==le.implementation?(Z=Af(le,ie.mode,ge),Z.return=ie,Z):(Z=h(Z,le.children||[]),Z.return=ie,Z)}function de(ie,Z,le,ge,Oe){return Z===null||Z.tag!==7?(Z=yl(le,ie.mode,ge,Oe),Z.return=ie,Z):(Z=h(Z,le),Z.return=ie,Z)}function ve(ie,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Tf(""+Z,ie.mode,le),Z.return=ie,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case $:return le=Xc(Z.type,Z.key,Z.props,null,ie.mode,le),Aa(le,Z),le.return=ie,le;case z:return Z=Af(Z,ie.mode,le),Z.return=ie,Z;case D:return Z=Cl(Z),ve(ie,Z,le)}if(oe(Z)||je(Z))return Z=yl(Z,ie.mode,le,null),Z.return=ie,Z;if(typeof Z.then=="function")return ve(ie,ru(Z),le);if(Z.$$typeof===H)return ve(ie,eu(ie,Z),le);au(ie,Z)}return null}function te(ie,Z,le,ge){var Oe=Z!==null?Z.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Oe!==null?null:_(ie,Z,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return le.key===Oe?X(ie,Z,le,ge):null;case z:return le.key===Oe?re(ie,Z,le,ge):null;case D:return le=Cl(le),te(ie,Z,le,ge)}if(oe(le)||je(le))return Oe!==null?null:de(ie,Z,le,ge,null);if(typeof le.then=="function")return te(ie,Z,ru(le),ge);if(le.$$typeof===H)return te(ie,Z,eu(ie,le),ge);au(ie,le)}return null}function se(ie,Z,le,ge,Oe){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ie=ie.get(le)||null,_(Z,ie,""+ge,Oe);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case $:return ie=ie.get(ge.key===null?le:ge.key)||null,X(Z,ie,ge,Oe);case z:return ie=ie.get(ge.key===null?le:ge.key)||null,re(Z,ie,ge,Oe);case D:return ge=Cl(ge),se(ie,Z,le,ge,Oe)}if(oe(ge)||je(ge))return ie=ie.get(le)||null,de(Z,ie,ge,Oe,null);if(typeof ge.then=="function")return se(ie,Z,le,ru(ge),Oe);if(ge.$$typeof===H)return se(ie,Z,le,eu(Z,ge),Oe);au(Z,ge)}return null}function Ce(ie,Z,le,ge){for(var Oe=null,lt=null,Ie=Z,Fe=Z=0,Wt=null;Ie!==null&&Fe<le.length;Fe++){Ie.index>Fe?(Wt=Ie,Ie=null):Wt=Ie.sibling;var dt=te(ie,Ie,le[Fe],ge);if(dt===null){Ie===null&&(Ie=Wt);break}t&&Ie&&dt.alternate===null&&n(ie,Ie),Z=p(dt,Z,Fe),lt===null?Oe=dt:lt.sibling=dt,lt=dt,Ie=Wt}if(Fe===le.length)return a(ie,Ie),et&&Wr(ie,Fe),Oe;if(Ie===null){for(;Fe<le.length;Fe++)Ie=ve(ie,le[Fe],ge),Ie!==null&&(Z=p(Ie,Z,Fe),lt===null?Oe=Ie:lt.sibling=Ie,lt=Ie);return et&&Wr(ie,Fe),Oe}for(Ie=o(Ie);Fe<le.length;Fe++)Wt=se(Ie,ie,Fe,le[Fe],ge),Wt!==null&&(t&&(dt=Wt.alternate,dt!==null&&Ie.delete(dt.key===null?Fe:dt.key)),Z=p(Wt,Z,Fe),lt===null?Oe=Wt:lt.sibling=Wt,lt=Wt);return t&&Ie.forEach(function(Xa){return n(ie,Xa)}),et&&Wr(ie,Fe),Oe}function _e(ie,Z,le,ge){if(le==null)throw Error(l(151));for(var Oe=null,lt=null,Ie=Z,Fe=Z=0,Wt=null,dt=le.next();Ie!==null&&!dt.done;Fe++,dt=le.next()){Ie.index>Fe?(Wt=Ie,Ie=null):Wt=Ie.sibling;var Xa=te(ie,Ie,dt.value,ge);if(Xa===null){Ie===null&&(Ie=Wt);break}t&&Ie&&Xa.alternate===null&&n(ie,Ie),Z=p(Xa,Z,Fe),lt===null?Oe=Xa:lt.sibling=Xa,lt=Xa,Ie=Wt}if(dt.done)return a(ie,Ie),et&&Wr(ie,Fe),Oe;if(Ie===null){for(;!dt.done;Fe++,dt=le.next())dt=ve(ie,dt.value,ge),dt!==null&&(Z=p(dt,Z,Fe),lt===null?Oe=dt:lt.sibling=dt,lt=dt);return et&&Wr(ie,Fe),Oe}for(Ie=o(Ie);!dt.done;Fe++,dt=le.next())dt=se(Ie,ie,Fe,dt.value,ge),dt!==null&&(t&&(Wt=dt.alternate,Wt!==null&&Ie.delete(Wt.key===null?Fe:Wt.key)),Z=p(dt,Z,Fe),lt===null?Oe=dt:lt.sibling=dt,lt=dt);return t&&Ie.forEach(function(yT){return n(ie,yT)}),et&&Wr(ie,Fe),Oe}function Ze(ie,Z,le,ge){if(typeof le=="object"&&le!==null&&le.type===Y&&le.key===null&&le.props.ref===void 0&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case $:e:{for(var Oe=le.key;Z!==null;){if(Z.key===Oe){if(Oe=le.type,Oe===Y){if(Z.tag===7){a(ie,Z.sibling),ge=h(Z,le.props.children),Aa(ge,le),ge.return=ie,ie=ge;break e}}else if(Z.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===D&&Cl(Oe)===Z.type){a(ie,Z.sibling),ge=h(Z,le.props),Aa(ge,le),ge.return=ie,ie=ge;break e}a(ie,Z);break}else n(ie,Z);Z=Z.sibling}le.type===Y?(ge=yl(le.props.children,ie.mode,ge,le.key),Aa(ge,le),ge.return=ie,ie=ge):(ge=Xc(le.type,le.key,le.props,null,ie.mode,ge),Aa(ge,le),ge.return=ie,ie=ge)}return N(ie);case z:e:{for(Oe=le.key;Z!==null;){if(Z.key===Oe)if(Z.tag===4&&Z.stateNode.containerInfo===le.containerInfo&&Z.stateNode.implementation===le.implementation){a(ie,Z.sibling),ge=h(Z,le.children||[]),ge.return=ie,ie=ge;break e}else{a(ie,Z);break}else n(ie,Z);Z=Z.sibling}ge=Af(le,ie.mode,ge),ge.return=ie,ie=ge}return N(ie);case D:return le=Cl(le),Ze(ie,Z,le,ge)}if(oe(le))return Ce(ie,Z,le,ge);if(je(le)){if(Oe=je(le),typeof Oe!="function")throw Error(l(150));return le=Oe.call(le),_e(ie,Z,le,ge)}if(typeof le.then=="function")return Ze(ie,Z,ru(le),ge);if(le.$$typeof===H)return Ze(ie,Z,eu(ie,le),ge);au(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,Z!==null&&Z.tag===6?(a(ie,Z.sibling),ge=h(Z,le),ge.return=ie,ie=ge):(a(ie,Z),ge=Tf(le,ie.mode,ge),ge.return=ie,ie=ge),N(ie)):a(ie,Z)}return function(ie,Z,le,ge){try{Ts=0;var Oe=Ze(ie,Z,le,ge);return jo=null,Oe}catch(Ie){if(Ie===bo||Ie===nu)throw Ie;var lt=ii(29,Ie,null,ie.mode);return lt.lanes=ge,lt.return=ie,lt}finally{}}}var El=ay(!0),ly=ay(!1),Ma=!1;function Hf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pf(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 Ra(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Oa(t,n,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(pt&2)!==0){var h=o.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),o.pending=n,n=Gc(t),Fv(t,null,a),n}return Yc(t,o,n,a),Gc(t)}function As(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,an(t,a)}}function Uf(t,n){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var N={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};p===null?h=p=N:p=p.next=N,a=a.next}while(a!==null);p===null?h=p=n:p=p.next=n}else h=p=n;a={baseState:o.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var qf=!1;function Ms(){if(qf){var t=xo;if(t!==null)throw t}}function Rs(t,n,a,o){qf=!1;var h=t.updateQueue;Ma=!1;var p=h.firstBaseUpdate,N=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var X=_,re=X.next;X.next=null,N===null?p=re:N.next=re,N=X;var de=t.alternate;de!==null&&(de=de.updateQueue,_=de.lastBaseUpdate,_!==N&&(_===null?de.firstBaseUpdate=re:_.next=re,de.lastBaseUpdate=X))}if(p!==null){var ve=h.baseState;N=0,de=re=X=null,_=p;do{var te=_.lane&-536870913,se=te!==_.lane;if(se?(at&te)===te:(o&te)===te){te!==0&&te===Sl&&(qf=!0),de!==null&&(de=de.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ce=t,_e=_;te=n;var Ze=a;switch(_e.tag){case 1:if(Ce=_e.payload,typeof Ce=="function"){ve=Ce.call(Ze,ve,te);break e}ve=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=_e.payload,te=typeof Ce=="function"?Ce.call(Ze,ve,te):Ce,te==null)break e;ve=B({},ve,te);break e;case 2:Ma=!0}}te=_.callback,te!==null&&(t.flags|=64,se&&(t.flags|=8192),se=h.callbacks,se===null?h.callbacks=[te]:se.push(te))}else se={lane:te,tag:_.tag,payload:_.payload,callback:_.callback,next:null},de===null?(re=de=se,X=ve):de=de.next=se,N|=te;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;se=_,_=se.next,se.next=null,h.lastBaseUpdate=se,h.shared.pending=null}}while(!0);de===null&&(X=ve),h.baseState=X,h.firstBaseUpdate=re,h.lastBaseUpdate=de,p===null&&(h.shared.lanes=0),Ha|=N,t.lanes=N,t.memoizedState=ve}}function oy(t,n){if(typeof t!="function")throw Error(l(191,t));t.call(n)}function sy(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)oy(a[t],n)}var _a=ht(null),lu=ht(0);function cy(t,n){t=la,Je(lu,t),Je(_a,n),la=t|n.baseLanes}function Ff(){Je(lu,la),Je(_a,_a.current)}function Vf(){la=lu.current,ot(_a),ot(lu)}var kn=ht(null),zn=null;function Da(t){var n=t.alternate;Je(Cn,Cn.current&1),Je(kn,t),zn===null&&(n===null||_a.current!==null||n.memoizedState!==null)&&(zn=t)}function $f(t){Je(Cn,Cn.current),Je(kn,t),zn===null&&(zn=t)}function uy(t){t.tag===22?(Je(Cn,Cn.current),Je(kn,t),zn===null&&(zn=t)):za()}function za(){Je(Cn,Cn.current),Je(kn,kn.current)}function wi(t){ot(kn),zn===t&&(zn=null),ot(Cn)}var Cn=ht(0);function Os(t,n){Je(kn,kn.current),Je(Cn,n)}function Yf(t){ot(Cn),ot(kn),zn===t&&(zn=null)}function ou(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mm(a)||pm(a)))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 na=0,Ke=null,wt=null,Zt=null,su=!1,wo=!1,Tl=!1,cu=0,_s=0,So=null,HN=0;function qt(){throw Error(l(321))}function Gf(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!ji(t[a],n[a]))return!1;return!0}function Xf(t,n,a,o,h,p){return na=p,Ke=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ce.H=t===null||t.memoizedState===null?Gy:Xy,Tl=!1,p=a(o,h),Tl=!1,wo&&(p=fy(n,a,o,h)),dy(t),p}function dy(t){ce.H=gu;var n=wt!==null&&wt.next!==null;if(na=0,Zt=wt=Ke=null,su=!1,_s=0,So=null,n)throw Error(l(300));t===null||Jt||(t=t.dependencies,t!==null&&Wc(t)&&(Jt=!0))}function fy(t,n,a,o){Ke=t;var h=0;do{if(wo&&(So=null),_s=0,wo=!1,25<=h)throw Error(l(301));if(h+=1,Zt=wt=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}ce.H=GN,p=n(a,o)}while(wo);return p}function PN(){var t=ce.H,n=t.useState()[0];return n=typeof n.then=="function"?Ds(n):n,t=t.useState()[0],(wt!==null?wt.memoizedState:null)!==t&&(Ke.flags|=1024),n}function Qf(){var t=cu!==0;return cu=0,t}function Kf(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function Zf(t){if(su){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}su=!1}na=0,Zt=wt=Ke=null,wo=!1,_s=cu=0,So=null}function $n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Ke.memoizedState=Zt=t:Zt=Zt.next=t,Zt}function Yt(){if(wt===null){var t=Ke.alternate;t=t!==null?t.memoizedState:null}else t=wt.next;var n=Zt===null?Ke.memoizedState:Zt.next;if(n!==null)Zt=n,wt=t;else{if(t===null)throw Ke.alternate===null?Error(l(467)):Error(l(310));wt=t,t={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Zt===null?Ke.memoizedState=Zt=t:Zt=Zt.next=t}return Zt}function uu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ds(t){var n=_s;return _s+=1,So===null&&(So=[]),t=ny(So,t,n),n=Ke,(Zt===null?n.memoizedState:Zt.next)===null&&(n=n.alternate,ce.H=n===null||n.memoizedState===null?Gy:Xy),t}function du(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ds(t);if(t.$$typeof===fe)return;if(t.$$typeof===H)return Sn(t)}throw Error(l(438,String(t)))}function Jf(t){var n=null,a=Ke.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=Ke.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=uu(),Ke.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),o=0;o<t;o++)a[o]=P;return n.index++,a}function ia(t,n){return typeof n=="function"?n(t):n}function fu(t){var n=Yt();return Wf(n,wt,t)}function Wf(t,n,a){var o=t.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=a;var h=t.baseQueue,p=o.pending;if(p!==null){if(h!==null){var N=h.next;h.next=p.next,p.next=N}n.baseQueue=h=p,o.pending=null}if(p=t.baseState,h===null)t.memoizedState=p;else{n=h.next;var _=N=null,X=null,re=n,de=!1;do{var ve=re.lane&-536870913;if(ve!==re.lane?(at&ve)===ve:(na&ve)===ve){var te=re.revertLane;if(te===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),ve===Sl&&(de=!0);else if((na&te)===te){re=re.next,te===Sl&&(de=!0);continue}else ve={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},X===null?(_=X=ve,N=p):X=X.next=ve,Ke.lanes|=te,Ha|=te;ve=re.action,Tl&&a(p,ve),p=re.hasEagerState?re.eagerState:a(p,ve)}else te={lane:ve,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},X===null?(_=X=te,N=p):X=X.next=te,Ke.lanes|=ve,Ha|=ve;re=re.next}while(re!==null&&re!==n);if(X===null?N=p:X.next=_,!ji(p,t.memoizedState)&&(Jt=!0,de&&(a=xo,a!==null)))throw a;t.memoizedState=p,t.baseState=N,t.baseQueue=X,o.lastRenderedState=p}return h===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function eh(t){var n=Yt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var o=a.dispatch,h=a.pending,p=n.memoizedState;if(h!==null){a.pending=null;var N=h=h.next;do p=t(p,N.action),N=N.next;while(N!==h);ji(p,n.memoizedState)||(Jt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),a.lastRenderedState=p}return[p,o]}function hy(t,n,a){var o=Ke,h=Yt(),p=et;if(p){if(a===void 0)throw Error(l(407));a=a()}else a=n();var N=!ji((wt||h).memoizedState,a);if(N&&(h.memoizedState=a,Jt=!0),h=h.queue,ih(gy.bind(null,o,h,t),[t]),t=h.getSnapshot!==n||N||Zt!==null&&(Zt.memoizedState.tag&1)!==0,ko(t?9:8,{destroy:void 0},py.bind(null,o,h,a,n),null),t){if(o.flags|=2048,kt===null)throw Error(l(349));p||(na&127)!==0||my(o,n,a)}return a}function my(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Ke.updateQueue,n===null?(n=uu(),Ke.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function py(t,n,a,o){n.value=a,n.getSnapshot=o,vy(n)&&yy(t)}function gy(t,n,a){return a(function(){vy(n)&&yy(t)})}function vy(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!ji(t,a)}catch{return!0}}function yy(t){var n=vl(t,2);n!==null&&oi(n,t,2)}function th(t){var n=$n();if(typeof t=="function"){var a=t;if(t=a(),Tl){Lt(!0);try{a()}finally{Lt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:t},n}function xy(t,n,a,o){return t.baseState=a,Wf(t,wt,typeof o=="function"?o:ia)}function UN(t,n,a,o,h){if(pu(t))throw Error(l(485));if(t=n.action,t!==null){var p={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){p.listeners.push(N)}};ce.T!==null?a(!0):p.isTransition=!1,o(p),a=n.pending,a===null?(p.next=n.pending=p,by(n,p)):(p.next=a.next,n.pending=a.next=p)}}function by(t,n){var a=n.action,o=n.payload,h=t.state;if(n.isTransition){var p=ce.T,N={};N.types=p!==null?p.types:null,ce.T=N;try{var _=a(h,o),X=ce.S;X!==null&&X(N,_),jy(t,n,_)}catch(re){nh(t,n,re)}finally{p!==null&&N.types!==null&&(p.types=N.types),ce.T=p}}else try{p=a(h,o),jy(t,n,p)}catch(re){nh(t,n,re)}}function jy(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){wy(t,n,o)},function(o){return nh(t,n,o)}):wy(t,n,a)}function wy(t,n,a){n.status="fulfilled",n.value=a,Sy(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,by(t,a)))}function nh(t,n,a){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,Sy(n),n=n.next;while(n!==o)}t.action=null}function Sy(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function ky(t,n){return n}function Cy(t,n){if(et){var a=kt.formState;if(a!==null){e:{var o=Ke;if(et){if(Et){t:{for(var h=Et,p=Ii;h.nodeType!==8;){if(!p){h=null;break t}if(h=Hi(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){Et=Hi(h.nextSibling),o=h.data==="F!";break e}}Ea(o)}o=!1}o&&(n=a[0])}}return a=$n(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ky,lastRenderedState:n},a.queue=o,a=Vy.bind(null,Ke,o),o.dispatch=a,o=th(!1),p=sh.bind(null,Ke,!1,o.queue),o=$n(),h={state:n,dispatch:null,action:t,pending:null},o.queue=h,a=UN.bind(null,Ke,h,p,a),h.dispatch=a,o.memoizedState=t,[n,a,!1]}function Ny(t){var n=Yt();return Ey(n,wt,t)}function Ey(t,n,a){if(n=Wf(t,n,ky)[0],t=fu(ia)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ds(n)}catch(N){throw N===bo?nu:N}else o=n;n=Yt();var h=n.queue,p=h.dispatch;return a!==n.memoizedState&&(Ke.flags|=2048,ko(9,{destroy:void 0},qN.bind(null,h,a),null)),[o,p,t]}function qN(t,n){t.action=n}function Ty(t){var n=Yt(),a=wt;if(a!==null)return Ey(n,a,t);Yt(),n=n.memoizedState,a=Yt();var o=a.queue.dispatch;return a.memoizedState=t,[n,o,!1]}function ko(t,n,a,o){return t={tag:t,create:a,deps:o,inst:n,next:null},n=Ke.updateQueue,n===null&&(n=uu(),Ke.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(o=a.next,a.next=t,t.next=o,n.lastEffect=t),t}function Ay(){return Yt().memoizedState}function hu(t,n,a,o){var h=$n();Ke.flags|=t,h.memoizedState=ko(1|n,{destroy:void 0},a,o===void 0?null:o)}function mu(t,n,a,o){var h=Yt();o=o===void 0?null:o;var p=h.memoizedState.inst;wt!==null&&o!==null&&Gf(o,wt.memoizedState.deps)?h.memoizedState=ko(n,p,a,o):(Ke.flags|=t,h.memoizedState=ko(1|n,p,a,o))}function My(t,n){hu(8390656,8,t,n)}function ih(t,n){mu(2048,8,t,n)}function FN(t){Ke.flags|=4;var n=Ke.updateQueue;if(n===null)n=uu(),Ke.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function Ry(t){var n=Yt().memoizedState;return FN({ref:n,nextImpl:t}),function(){if((pt&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function Oy(t,n){return mu(4,2,t,n)}function _y(t,n){return mu(4,4,t,n)}function Dy(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function zy(t,n,a){a=a!=null?a.concat([t]):null,mu(4,4,Dy.bind(null,n,t),a)}function rh(){}function Ly(t,n){var a=Yt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&Gf(n,o[1])?o[0]:(a.memoizedState=[t,n],t)}function Iy(t,n){var a=Yt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&Gf(n,o[1]))return o[0];if(o=t(),Tl){Lt(!0);try{t()}finally{Lt(!1)}}return a.memoizedState=[o,n],o}function ah(t,n,a){return a===void 0||(na&1073741824)!==0&&(at&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=G0(),Ke.lanes|=t,Ha|=t,a)}function By(t,n,a,o){return ji(a,n)?a:_a.current!==null?(t=ah(t,a,o),ji(t,n)||(Jt=!0),t):(na&106)===0||(na&1073741824)!==0&&(at&261930)===0?(Jt=!0,t.memoizedState=a):(t=G0(),Ke.lanes|=t,Ha|=t,n)}function Hy(t,n,a,o,h){var p=me.p;me.p=p!==0&&8>p?p:8;var N=ce.T,_={};_.types=N!==null?N.types:null,ce.T=_,sh(t,!1,n,a);try{var X=h(),re=ce.S;if(re!==null&&re(_,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=BN(X,o);zs(t,n,de,Ni(t))}else zs(t,n,o,Ni(t))}catch(ve){zs(t,n,{then:function(){},status:"rejected",reason:ve},Ni())}finally{me.p=p,N!==null&&_.types!==null&&(N.types=_.types),ce.T=N}}function VN(){}function lh(t,n,a,o){if(t.tag!==5)throw Error(l(476));var h=Py(t).queue;Hy(t,h,n,Ne,a===null?VN:function(){return Uy(t),a(o)})}function Py(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Ne,baseState:Ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:Ne},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ia,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Uy(t){var n=Py(t);n.next===null&&(n=t.alternate.memoizedState),zs(t,n.next.queue,{},Ni())}function oh(){return Sn(Fo)}function qy(){return Yt().memoizedState}function Fy(){return Yt().memoizedState}function $N(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=Ni();t=Ra(a);var o=Oa(n,t,a);o!==null&&(oi(o,n,a),As(o,n,a)),n={cache:zf()},t.payload=n;return}n=n.return}}function YN(t,n,a){var o=Ni();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},pu(t)?$y(n,a):(a=Nf(t,n,a,o),a!==null&&(oi(a,t,o),Yy(a,n,o)))}function Vy(t,n,a){var o=Ni();zs(t,n,a,o)}function zs(t,n,a,o){var h={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(pu(t))$y(n,h);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var N=n.lastRenderedState,_=p(N,a);if(h.hasEagerState=!0,h.eagerState=_,ji(_,N))return Yc(t,n,h,0),kt===null&&$c(),!1}catch{}finally{}if(a=Nf(t,n,h,o),a!==null)return oi(a,t,o),Yy(a,n,o),!0}return!1}function sh(t,n,a,o){if(o={lane:2,revertLane:Jh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},pu(t)){if(n)throw Error(l(479))}else n=Nf(t,a,o,2),n!==null&&oi(n,t,2)}function pu(t){var n=t.alternate;return t===Ke||n!==null&&n===Ke}function $y(t,n){wo=su=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Yy(t,n,a){if((a&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,an(t,a)}}var gu={readContext:Sn,use:du,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},Gy={readContext:Sn,use:du,useCallback:function(t,n){return $n().memoizedState=[t,n===void 0?null:n],t},useContext:Sn,useEffect:My,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,hu(4194308,4,Dy.bind(null,n,t),a)},useLayoutEffect:function(t,n){return hu(4194308,4,t,n)},useInsertionEffect:function(t,n){hu(4,2,t,n)},useMemo:function(t,n){var a=$n();n=n===void 0?null:n;var o=t();if(Tl){Lt(!0);try{t()}finally{Lt(!1)}}return a.memoizedState=[o,n],o},useReducer:function(t,n,a){var o=$n();if(a!==void 0){var h=a(n);if(Tl){Lt(!0);try{a(n)}finally{Lt(!1)}}}else h=n;return o.memoizedState=o.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},o.queue=t,t=t.dispatch=YN.bind(null,Ke,t),[o.memoizedState,t]},useRef:function(t){var n=$n();return t={current:t},n.memoizedState=t},useState:function(t){t=th(t);var n=t.queue,a=Vy.bind(null,Ke,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:rh,useDeferredValue:function(t,n){var a=$n();return ah(a,t,n)},useTransition:function(){var t=th(!1);return t=Hy.bind(null,Ke,t.queue,!0,!1),$n().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var o=Ke,h=$n();if(et){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),kt===null)throw Error(l(349));(at&127)!==0||my(o,n,a)}h.memoizedState=a;var p={value:a,getSnapshot:n};return h.queue=p,My(gy.bind(null,o,p,t),[t]),o.flags|=2048,ko(9,{destroy:void 0},py.bind(null,o,p,a,n),null),a},useId:function(){var t=$n(),n=kt.identifierPrefix;if(et){var a=xr,o=yr;a=(o&~(1<<32-Vt(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=cu++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=HN++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:oh,useFormState:Cy,useActionState:Cy,useOptimistic:function(t){var n=$n();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=sh.bind(null,Ke,!0,a),a.dispatch=n,[t,n]},useMemoCache:Jf,useCacheRefresh:function(){return $n().memoizedState=$N.bind(null,Ke)},useEffectEvent:function(t){var n=$n(),a={impl:t};return n.memoizedState=a,function(){if((pt&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Xy={readContext:Sn,use:du,useCallback:Ly,useContext:Sn,useEffect:ih,useImperativeHandle:zy,useInsertionEffect:Oy,useLayoutEffect:_y,useMemo:Iy,useReducer:fu,useRef:Ay,useState:function(){return fu(ia)},useDebugValue:rh,useDeferredValue:function(t,n){var a=Yt();return By(a,wt.memoizedState,t,n)},useTransition:function(){var t=fu(ia)[0],n=Yt().memoizedState;return[typeof t=="boolean"?t:Ds(t),n]},useSyncExternalStore:hy,useId:qy,useHostTransitionStatus:oh,useFormState:Ny,useActionState:Ny,useOptimistic:function(t,n){var a=Yt();return xy(a,wt,t,n)},useMemoCache:Jf,useCacheRefresh:Fy,useEffectEvent:Ry},GN={readContext:Sn,use:du,useCallback:Ly,useContext:Sn,useEffect:ih,useImperativeHandle:zy,useInsertionEffect:Oy,useLayoutEffect:_y,useMemo:Iy,useReducer:eh,useRef:Ay,useState:function(){return eh(ia)},useDebugValue:rh,useDeferredValue:function(t,n){var a=Yt();return wt===null?ah(a,t,n):By(a,wt.memoizedState,t,n)},useTransition:function(){var t=eh(ia)[0],n=Yt().memoizedState;return[typeof t=="boolean"?t:Ds(t),n]},useSyncExternalStore:hy,useId:qy,useHostTransitionStatus:oh,useFormState:Ty,useActionState:Ty,useOptimistic:function(t,n){var a=Yt();return wt!==null?xy(a,wt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Jf,useCacheRefresh:Fy,useEffectEvent:Ry};function ch(t,n,a,o){n=t.memoizedState,a=a(o,n),a=a==null?n:B({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var uh={enqueueSetState:function(t,n,a){t=t._reactInternals;var o=Ni(),h=Ra(o);h.payload=n,a!=null&&(h.callback=a),n=Oa(t,h,o),n!==null&&(oi(n,t,o),As(n,t,o))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var o=Ni(),h=Ra(o);h.tag=1,h.payload=n,a!=null&&(h.callback=a),n=Oa(t,h,o),n!==null&&(oi(n,t,o),As(n,t,o))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=Ni(),o=Ra(a);o.tag=2,n!=null&&(o.callback=n),n=Oa(t,o,a),n!==null&&(oi(n,t,a),As(n,t,a))}};function Qy(t,n,a,o,h,p,N){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,p,N):n.prototype&&n.prototype.isPureReactComponent?!js(a,o)||!js(h,p):!0}function Ky(t,n,a,o){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==t&&uh.enqueueReplaceState(n,n.state,null)}function Al(t,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(t=t.defaultProps){a===n&&(a=B({},a));for(var h in t)a[h]===void 0&&(a[h]=t[h])}return a}function Zy(t){Vc(t)}function Jy(t){console.error(t)}function Wy(t){Vc(t)}function vu(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function e0(t,n,a){try{var o=t.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function dh(t,n,a){return a=Ra(a),a.tag=3,a.payload={element:null},a.callback=function(){vu(t,n)},a}function t0(t){return t=Ra(t),t.tag=3,t}function n0(t,n,a,o){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var p=o.value;t.payload=function(){return h(p)},t.callback=function(){e0(n,a,o)}}var N=a.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(t.callback=function(){e0(n,a,o),typeof h!="function"&&(Pa===null?Pa=new Set([this]):Pa.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function XN(t,n,a,o,h){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&jl(n,a,h,!0),a=kn.current,a!==null){switch(a.tag){case 31:case 13:case 19:return zn===null?Bu():a.alternate===null&&Ft===0&&(Ft=3),a.flags&=-257,a.flags|=65536,a.lanes=h,o===iu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),Qh(t,o,h)),!1;case 22:return a.flags|=65536,o===iu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),Qh(t,o,h)),!1}throw Error(l(435,a.tag))}return Qh(t,o,h),Bu(),!1}if(et)return n=kn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,o!==Rf&&(t=Error(l(422),{cause:o}),ks(Di(t,a)))):(o!==Rf&&(n=Error(l(423),{cause:o}),ks(Di(n,a))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,o=Di(o,a),h=dh(t.stateNode,o,h),Uf(t,h),Ft!==4&&(Ft=2)),!1;var p=Error(l(520),{cause:o});if(p=Di(p,a),Fs===null?Fs=[p]:Fs.push(p),Ft!==4&&(Ft=2),n===null)return!0;o=Di(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=h&-h,a.lanes|=t,t=dh(a.stateNode,o,t),Uf(a,t),!1;case 1:if(n=a.type,p=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Pa===null||!Pa.has(p))))return a.flags|=65536,h&=-h,a.lanes|=h,h=t0(h),n0(h,t,a,o),Uf(a,h),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var fh=Error(l(461)),Jt=!1;function on(t,n,a,o){n.child=t===null?ly(n,null,a,o):El(n,t.child,a,o)}function i0(t,n,a,o,h){a=a.render;var p=n.ref;if("ref"in o){var N={};for(var _ in o)_!=="ref"&&(N[_]=o[_])}else N=o;return wl(n),o=Xf(t,n,a,N,p,h),_=Qf(),t!==null&&!Jt?(Kf(t,n,h),ra(t,n,h)):(et&&_&&Kc(n),n.flags|=1,on(t,n,o,h),n.child)}function r0(t,n,a,o,h){if(t===null){var p=a.type;return typeof p=="function"&&!Ef(p)&&p.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=p,a0(t,n,p,o,h)):(t=Xc(a.type,null,o,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(p=t.child,!bh(t,h)){var N=p.memoizedProps;if(a=a.compare,a=a!==null?a:js,a(N,o)&&t.ref===n.ref)return ra(t,n,h)}return n.flags|=1,t=Jr(p,o),t.ref=n.ref,t.return=n,n.child=t}function a0(t,n,a,o,h){if(t!==null){var p=t.memoizedProps;if(js(p,o)&&t.ref===n.ref)if(Jt=!1,n.pendingProps=o=p,bh(t,h))(t.flags&131072)!==0&&(Jt=!0);else return n.lanes=t.lanes,ra(t,n,h)}return hh(t,n,a,o,h)}function l0(t,n,a,o){var h=o.children,p=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|a:a,t!==null){for(o=n.child=t.child,h=0;o!==null;)h=h|o.lanes|o.childLanes,o=o.sibling;o=h&~p}else o=0,n.child=null;return o0(t,n,p,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&tu(n,p!==null?p.cachePool:null),p!==null?cy(n,p):Ff(),uy(n);else return o=n.lanes=536870912,o0(t,n,p!==null?p.baseLanes|a:a,a,o)}else p!==null?(tu(n,p.cachePool),cy(n,p),za(),n.memoizedState=null):(t!==null&&tu(n,null),Ff(),za());return on(t,n,h,a),n.child}function Ls(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function o0(t,n,a,o,h){var p=If();return p=p===null?null:{parent:Kt._currentValue,pool:p},n.memoizedState={baseLanes:a,cachePool:p},t!==null&&tu(n,null),Ff(),uy(n),t!==null&&jl(t,n,o,!0),n.childLanes=h,null}function yu(t,n){return n=xu({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function s0(t,n,a){return El(n,t.child,null,a),t=yu(n,n.pendingProps),t.flags|=2,wi(n),n.memoizedState=null,t}function QN(t,n,a){var o=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(et){if(o.mode==="hidden")return t=yu(n,o),n.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},Ls(null,t);if($f(n),(t=Et)?(t=Dx(t,Ii),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Ca!==null?{id:yr,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},a=$v(t),a.return=n,n.child=a,dn=n,Et=null)):t=null,t===null)throw Ea(n);return n.lanes=536870912,null}return yu(n,o)}var p=t.memoizedState;if(p!==null){var N=p.dehydrated;if($f(n),h)if(n.flags&256)n.flags&=-257,n=s0(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(l(558));else if(Jt||jl(t,n,a,!1),h=(a&t.childLanes)!==0,Jt||h){if(_a.current===null){if(o=kt,o!==null&&(N=cn(o,a),N!==0&&N!==p.retryLane))throw p.retryLane=N,vl(t,N),oi(o,t,N),fh;Bu()}n=s0(t,n,a)}else t=p.treeContext,Et=Hi(N.nextSibling),dn=n,et=!0,Na=null,Ii=!1,t!==null&&Xv(n,t),n=yu(n,o),n.flags|=134221824;return n}return t=Jr(t.child,{mode:o.mode,children:o.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Co(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function hh(t,n,a,o,h){return wl(n),a=Xf(t,n,a,o,void 0,h),o=Qf(),t!==null&&!Jt?(Kf(t,n,h),ra(t,n,h)):(et&&o&&Kc(n),n.flags|=1,on(t,n,a,h),n.child)}function c0(t,n,a,o,h,p){return wl(n),n.updateQueue=null,a=fy(n,o,a,h),dy(t),o=Qf(),t!==null&&!Jt?(Kf(t,n,p),ra(t,n,p)):(et&&o&&Kc(n),n.flags|=1,on(t,n,a,p),n.child)}function u0(t,n,a,o,h){if(wl(n),n.stateNode===null){var p=po,N=a.contextType;typeof N=="object"&&N!==null&&(p=Sn(N)),p=new a(o,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=uh,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=o,p.state=n.memoizedState,p.refs={},Hf(n),N=a.contextType,p.context=typeof N=="object"&&N!==null?Sn(N):po,p.state=n.memoizedState,N=a.getDerivedStateFromProps,typeof N=="function"&&(ch(n,a,N,o),p.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(N=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),N!==p.state&&uh.enqueueReplaceState(p,p.state,null),Rs(n,o,p,h),Ms(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(t===null){p=n.stateNode;var _=n.memoizedProps,X=Al(a,_);p.props=X;var re=p.context,de=a.contextType;N=po,typeof de=="object"&&de!==null&&(N=Sn(de));var ve=a.getDerivedStateFromProps;de=typeof ve=="function"||typeof p.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,de||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_||re!==N)&&Ky(n,p,o,N),Ma=!1;var te=n.memoizedState;p.state=te,Rs(n,o,p,h),Ms(),re=n.memoizedState,_||te!==re||Ma?(typeof ve=="function"&&(ch(n,a,ve,o),re=n.memoizedState),(X=Ma||Qy(n,a,X,o,te,re,N))?(de||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=re),p.props=o,p.state=re,p.context=N,o=X):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{p=n.stateNode,Pf(t,n),N=n.memoizedProps,de=Al(a,N),p.props=de,ve=n.pendingProps,te=p.context,re=a.contextType,X=po,typeof re=="object"&&re!==null&&(X=Sn(re)),_=a.getDerivedStateFromProps,(re=typeof _=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(N!==ve||te!==X)&&Ky(n,p,o,X),Ma=!1,te=n.memoizedState,p.state=te,Rs(n,o,p,h),Ms();var se=n.memoizedState;N!==ve||te!==se||Ma||t!==null&&t.dependencies!==null&&Wc(t.dependencies)?(typeof _=="function"&&(ch(n,a,_,o),se=n.memoizedState),(de=Ma||Qy(n,a,de,o,te,se,X)||t!==null&&t.dependencies!==null&&Wc(t.dependencies))?(re||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,se,X),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,se,X)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=se),p.props=o,p.state=se,p.context=X,o=de):(typeof p.componentDidUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||N===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),o=!1)}return p=o,Co(t,n),o=(n.flags&128)!==0,p||o?(p=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,t!==null&&o?(n.child=El(n,t.child,null,h),n.child=El(n,null,a,h)):on(t,n,a,h),n.memoizedState=p.state,t=n.child):t=ra(t,n,h),t}function d0(t,n,a,o){return xl(),n.flags|=256,on(t,n,a,o),n.child}var mh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ph(t){return{baseLanes:t,cachePool:ey()}}function gh(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=Ci),t}function f0(t,n,a){var o=n.pendingProps,h=!1,p=(n.flags&128)!==0,N;if((N=p)||(N=t!==null&&t.memoizedState===null?!1:(Cn.current&2)!==0),N&&(h=!0,n.flags&=-129),N=(n.flags&32)!==0,n.flags&=-33,t===null){if(et){if(h?Da(n):za(),(t=Et)?(t=Dx(t,Ii),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Ca!==null?{id:yr,overflow:xr}:null,retryLane:536870912,hydrationErrors:null},a=$v(t),a.return=n,n.child=a,dn=n,Et=null)):t=null,t===null)throw Ea(n);return pm(t)?n.lanes=32:n.lanes=536870912,null}return p=o.children,o=o.fallback,h?(za(),h=n.mode,p=xu({mode:"hidden",children:p},h),o=yl(o,h,a,null),p.return=n,o.return=n,p.sibling=o,n.child=p,o=n.child,o.memoizedState=ph(a),o.childLanes=gh(t,N,a),n.memoizedState=mh,Ls(null,o)):(Da(n),vh(n,p))}var _=t.memoizedState;if(_!==null){var X=_.dehydrated;if(X!==null)return KN(t,n,p,N,o,X,_,a)}return h?(za(),h=o.fallback,p=n.mode,_=t.child,X=_.sibling,o=Jr(_,{mode:"hidden",children:o.children}),o.subtreeFlags=_.subtreeFlags&1206910976,X!==null?h=Jr(X,h):(h=yl(h,p,a,null),h.flags|=2),h.return=n,o.return=n,o.sibling=h,n.child=o,Ls(null,o),o=n.child,h=t.child.memoizedState,h===null?h=ph(a):(p=h.cachePool,p!==null?(_=Kt._currentValue,p=p.parent!==_?{parent:_,pool:_}:p):p=ey(),h={baseLanes:h.baseLanes|a,cachePool:p}),o.memoizedState=h,o.childLanes=gh(t,N,a),n.memoizedState=mh,Ls(t.child,o)):(Da(n),a=t.child,t=a.sibling,a=Jr(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,t!==null&&(N=n.deletions,N===null?(n.deletions=[t],n.flags|=16):N.push(t)),n.child=a,n.memoizedState=null,a)}function vh(t,n){return n=xu({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function xu(t,n){return t=ii(22,t,null,n),t.lanes=0,t}function bu(t,n,a){return El(n,t.child,null,a),t=vh(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function KN(t,n,a,o,h,p,N,_){if(a)return n.flags&256?(Da(n),n.flags&=-257,bu(t,n,_)):n.memoizedState!==null?(za(),n.child=t.child,n.flags|=128,null):(za(),p=h.fallback,N=n.mode,h=xu({mode:"visible",children:h.children},N),p=yl(p,N,_,null),p.flags|=2,h.return=n,p.return=n,h.sibling=p,n.child=h,El(n,t.child,null,_),h=n.child,h.memoizedState=ph(_),h.childLanes=gh(t,o,_),n.memoizedState=mh,Ls(null,h));if(Da(n),pm(p)){if(o=p.nextSibling&&p.nextSibling.dataset,o)var X=o.dgst;return o=X,o!==""&&(h=Error(l(419)),h.stack="",h.digest=o,ks({value:h,source:null,stack:null})),bu(t,n,_)}if(Jt||jl(t,n,_,!1),o=(_&t.childLanes)!==0,Jt||o){if(_a.current!==null)return bu(t,n,_);if(o=kt,o!==null&&(h=cn(o,_),h!==0&&h!==N.retryLane))throw N.retryLane=h,vl(t,h),oi(o,t,h),fh;return mm(p)||Bu(),bu(t,n,_)}return mm(p)?(n.flags|=192,n.child=t.child,null):(t=N.treeContext,Et=Hi(p.nextSibling),dn=n,et=!0,Na=null,Ii=!1,t!==null&&Xv(n,t),n=vh(n,h.children),n.flags|=134221824,n)}function h0(t,n,a){t.lanes|=n;var o=t.alternate;o!==null&&(o.lanes|=n),Jc(t.return,n,a)}function m0(t){for(var n=null;t!==null;){var a=t.alternate;a!==null&&ou(a)===null&&(n=t),t=t.sibling}return n}function ju(t,n,a,o,h,p){var N=t.memoizedState;N===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:h,treeForkCount:p}:(N.isBackwards=n,N.rendering=null,N.renderingStartTime=0,N.last=o,N.tail=a,N.tailMode=h,N.treeForkCount=p)}function yh(t){var n=t.child;for(t.child=null;n!==null;){var a=n.sibling;n.sibling=t.child,t.child=n,n=a}}function xh(t,n,a){var o=n.pendingProps,h=o.revealOrder,p=o.tail;o=o.children;var N=Cn.current;if(n.flags&128)return Os(n,N),null;var _=(N&2)!==0;if(_?(N=N&1|2,n.flags|=128):N&=1,Os(n,N),h==="backwards"&&t!==null?(yh(t),on(t,n,o,a),yh(t)):on(t,n,o,a),o=et?Ss:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&h0(t,a,n);else if(t.tag===19)h0(t,a,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":a=m0(n.child),a===null?(h=n.child,n.child=null):(h=a.sibling,a.sibling=null,yh(n)),ju(n,!0,h,null,p,o);break;case"unstable_legacy-backwards":for(a=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&ou(t)===null){n.child=h;break}t=h.sibling,h.sibling=a,a=h,h=t}ju(n,!0,a,null,p,o);break;case"together":ju(n,!1,null,null,void 0,o);break;case"independent":n.memoizedState=null;break;default:a=m0(n.child),a===null?(h=n.child,n.child=null):(h=a.sibling,a.sibling=null),ju(n,!1,h,a,p,o)}return n.child}function p0(t,n,a){var o=n.pendingProps;return Ta(n,n.type,o.value),on(t,n,o.children,a),n.child}function ra(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Ha|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(jl(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(l(153));if(n.child!==null){for(t=n.child,a=Jr(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=Jr(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function bh(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Wc(t)))}function ZN(t,n,a){switch(n.tag){case 3:di(n,n.stateNode.containerInfo),Ta(n,Kt,t.memoizedState.cache),xl();break;case 27:case 5:Yi(n);break;case 4:di(n,n.stateNode.containerInfo);break;case 10:Ta(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,$f(n),null;break;case 13:var o=n.memoizedState;if(o!==null){if(o.dehydrated!==null)return Da(n),n.flags|=128,null;o=jl(t,n,a,!1);var h=n.child.childLanes;return o||(a&h)!==0?f0(t,n,a):(Da(n),t=ra(t,n,a),t!==null?t.sibling:null)}Da(n);break;case 19:if(n.flags&128)return xh(t,n,a);if(h=(t.flags&128)!==0,o=(a&n.childLanes)!==0,o||(jl(t,n,a,!1),o=(a&n.childLanes)!==0),h){if(o)return xh(t,n,a);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Os(n,Cn.current),o)break;return null;case 22:return n.lanes=0,l0(t,n,a,n.pendingProps);case 24:Ta(n,Kt,t.memoizedState.cache)}return ra(t,n,a)}function g0(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)Jt=!0;else{if(!bh(t,a)&&(n.flags&128)===0)return Jt=!1,ZN(t,n,a);Jt=(t.flags&131072)!==0}else Jt=!1,et&&(n.flags&1048576)!==0&&Gv(n,Ss,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(t=Cl(n.elementType),n.type=t,typeof t=="function")Ef(t)?(o=Al(t,o),n.tag=1,n=u0(null,n,t,o,a)):(n.tag=0,n=hh(null,n,t,o,a));else{if(t!=null){var h=t.$$typeof;if(h===Q){n.tag=11,n=i0(null,n,t,o,a);break e}else if(h===ne){n.tag=14,n=r0(null,n,t,o,a);break e}else if(h===H){n.tag=10,n.type=t,n=p0(null,n,a);break e}}throw n=xe(t)||t,Error(l(306,n,""))}}return n;case 0:return hh(t,n,n.type,n.pendingProps,a);case 1:return o=n.type,h=Al(o,n.pendingProps),u0(t,n,o,h,a);case 3:e:{if(di(n,n.stateNode.containerInfo),t===null)throw Error(l(387));o=n.pendingProps;var p=n.memoizedState;h=p.element,Pf(t,n),Rs(n,o,null,a);var N=n.memoizedState;if(o=N.cache,Ta(n,Kt,o),o!==p.cache&&Df(n,[Kt],a,!0),Ms(),o=N.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:N.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=d0(t,n,o,a);break e}else if(o!==h){h=Di(Error(l(424)),n),ks(h),n=d0(t,n,o,a);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(Et=Hi(t.firstChild),dn=n,et=!0,Na=null,Ii=!0,a=ly(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling}else{if(xl(),o===h){n=ra(t,n,a);break e}on(t,n,o,a)}n=n.child}return n;case 26:return Co(t,n),t===null?(a=Ux(n.type,null,n.pendingProps,null))?n.memoizedState=a:et||(n.stateNode=bx(n.type,n.pendingProps,vn.current,n)):n.memoizedState=Ux(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return Yi(n),t===null&&et&&(o=n.stateNode=Ix(n.type,n.pendingProps,vn.current),dn=n,Ii=!0,h=Et,Fa(n.type)?(gm=h,Et=Hi(o.firstChild)):Et=h),on(t,n,n.pendingProps.children,a),Co(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&et&&((h=o=Et)&&(o=$E(o,n.type,n.pendingProps,Ii),o!==null?(n.stateNode=o,dn=n,Et=Hi(o.firstChild),Ii=!1,h=!0):h=!1),h||Ea(n)),Yi(n),h=n.type,p=n.pendingProps,N=t!==null?t.memoizedProps:null,o=p.children,om(h,p)?o=null:N!==null&&om(h,N)&&(n.flags|=32),n.memoizedState!==null&&(h=Xf(t,n,PN,null,null,a),Fo._currentValue=h),Co(t,n),on(t,n,o,a),n.child;case 6:return t===null&&et&&((t=a=Et)&&(a=YE(a,n.pendingProps,Ii),a!==null?(n.stateNode=a,dn=n,Et=null,t=!0):t=!1),t||Ea(n)),null;case 13:return f0(t,n,a);case 4:return di(n,n.stateNode.containerInfo),o=n.pendingProps,t===null?n.child=El(n,null,o,a):on(t,n,o,a),n.child;case 11:return i0(t,n,n.type,n.pendingProps,a);case 7:return o=n.pendingProps,Co(t,n),on(t,n,o,a),n.child;case 8:return on(t,n,n.pendingProps.children,a),n.child;case 12:return on(t,n,n.pendingProps.children,a),n.child;case 10:return p0(t,n,a);case 9:return h=n.type._context,o=n.pendingProps.children,wl(n),h=Sn(h),o=o(h),n.flags|=1,on(t,n,o,a),n.child;case 14:return r0(t,n,n.type,n.pendingProps,a);case 15:return a0(t,n,n.type,n.pendingProps,a);case 19:return xh(t,n,a);case 31:return QN(t,n,a);case 22:return l0(t,n,a,n.pendingProps);case 24:return wl(n),o=Sn(Kt),t===null?(h=If(),h===null&&(h=kt,p=zf(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=a),h=p),n.memoizedState={parent:o,cache:h},Hf(n),Ta(n,Kt,h)):((t.lanes&a)!==0&&(Pf(t,n),Rs(n,null,null,a),Ms()),h=t.memoizedState,p=n.memoizedState,h.parent!==o?(h={parent:o,cache:o},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),Ta(n,Kt,o)):(o=p.cache,Ta(n,Kt,o),o!==h.cache&&Df(n,[Kt],a,!0))),on(t,n,n.pendingProps.children,a),n.child;case 30:return n.stateNode===null&&(n.stateNode={autoName:null,paired:null,clones:null,ref:null}),o=n.pendingProps,o.name!=null&&o.name!=="auto"?n.flags|=t===null?18882560:18874368:et&&Kc(n),t!==null&&t.memoizedProps.name!==o.name?n.flags|=4194816:Co(t,n),on(t,n,o.children,a),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function aa(t){t.flags|=4}function jh(t,n,a,o,h){var p;if((p=(t.mode&32)!==0)&&(p=a===null?$x(n,o):$x(n,o)&&(o.src!==a.src||o.srcSet!==a.srcSet)),p){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(Z0())t.flags|=8192;else throw Nl=iu,Bf}else t.flags&=-16777217}function v0(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Yx(n))if(Z0())t.flags|=8192;else throw Nl=iu,Bf}function wu(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?gi():536870912,t.lanes|=n,Mo|=n)}function Is(t,n){if(!et)switch(t.tailMode){case"visible":break;case"collapsed":for(var a=t.tail,o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null;break;default:for(n=t.tail,a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null}}function Tt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,o=0;if(n)for(var h=t.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags&1206910976,o|=h.flags&1206910976,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)a|=h.lanes|h.childLanes,o|=h.subtreeFlags,o|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=o,t.childLanes=a,n}function JN(t,n,a){var o=n.pendingProps;switch(Mf(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(n),null;case 1:return Tt(n),null;case 3:return a=n.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ta(Kt),rn(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(yo(n)?aa(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Of())),Tt(n),null;case 26:var h=n.type,p=n.memoizedState;return t===null?(aa(n),p!==null?(Tt(n),v0(n,p)):(Tt(n),jh(n,h,null,o,a))):p?p!==t.memoizedState?(aa(n),Tt(n),v0(n,p)):(Tt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==o&&aa(n),Tt(n),jh(n,h,t,o,a)),null;case 27:if(pe(n),a=vn.current,h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&aa(n);else{if(!o){if(n.stateNode===null)throw Error(l(166));return Tt(n),n.subtreeFlags&=-33554433,null}t=At.current,yo(n)?Qv(n):(t=Ix(h,o,a),n.stateNode=t,aa(n))}return Tt(n),n.subtreeFlags&=-33554433,null;case 5:if(pe(n),h=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&aa(n);else{if(!o){if(n.stateNode===null)throw Error(l(166));return Tt(n),n.subtreeFlags&=-33554433,null}if(p=At.current,yo(n))Qv(n);else{var N=Xs(vn.current);switch(p){case 1:p=N.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=N.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=N.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=N.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?N.createElement("select",{is:o.is}):N.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?N.createElement(h,{is:o.is}):N.createElement(h)}}p[Mt]=n,p[$t]=o;e:for(N=n.child;N!==null;){if(N.tag===5||N.tag===6)p.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=p;e:switch(En(p,h,o),h){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&aa(n)}}return Tt(n),n.subtreeFlags&=-33554433,jh(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&aa(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(l(166));if(t=vn.current,yo(n)){if(t=n.stateNode,a=n.memoizedProps,o=null,h=dn,h!==null)switch(h.tag){case 27:case 5:o=h.memoizedProps}t[Mt]=n,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||gx(t.nodeValue,a)),t||Ea(n,!0)}else t=Xs(t).createTextNode(o),t[Mt]=n,n.stateNode=t}return Tt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(o=yo(n),a!==null){if(t===null){if(!o)throw Error(l(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Mt]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),t=!1}else a=Of(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(wi(n),n):(wi(n),null);if((n.flags&128)!==0)throw Error(l(558))}return Tt(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=yo(n),o!==null&&o.dehydrated!==null){if(t===null){if(!h)throw Error(l(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[Mt]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),h=!1}else h=Of(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(wi(n),n):(wi(n),null)}return wi(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=n.child,h=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(h=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==h&&(o.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),wu(n,n.updateQueue),Tt(n),null);case 4:return rn(),t===null&&nm(n.stateNode.containerInfo),n.flags|=67108864,Tt(n),null;case 10:return ta(n.type),Tt(n),null;case 19:if(Yf(n),o=n.memoizedState,o===null)return Tt(n),null;if(h=(n.flags&128)!==0,p=o.rendering,p===null)if(h)Is(o,!1);else{if(Ft!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(p=ou(t),p!==null){for(n.flags|=128,Is(o,!1),t=p.updateQueue,n.updateQueue=t,wu(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Vv(a,t),a=a.sibling;return Os(n,Cn.current&1|2),et&&Wr(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&Gt()>Du&&(n.flags|=128,h=!0,Is(o,!1),n.lanes=4194304)}else{if(!h)if(t=ou(p),t!==null){if(n.flags|=128,h=!0,t=t.updateQueue,n.updateQueue=t,wu(n,t),Is(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!p.alternate&&!et)return Tt(n),null}else 2*Gt()-o.renderingStartTime>Du&&a!==536870912&&(n.flags|=128,h=!0,Is(o,!1),n.lanes=4194304);o.isBackwards?(p.sibling=n.child,n.child=p):(t=o.last,t!==null?t.sibling=p:n.child=p,o.last=p)}if(o.tail!==null){t=o.tail;e:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Gt(),t.sibling=null,p=Cn.current,p=h?p&1|2:p&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!a||et?Os(n,p):(a=p,Je(kn,n),Je(Cn,a),zn===null&&(zn=n)),et&&Wr(n,o.treeForkCount),t}return Tt(n),null;case 22:case 23:return wi(n),Vf(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(Tt(n),n.subtreeFlags&6&&(n.flags|=8192)):Tt(n),a=n.updateQueue,a!==null&&wu(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),t!==null&&ot(kl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ta(Kt),Tt(n),null;case 25:return null;case 30:return n.flags|=33554432,Tt(n),null}throw Error(l(156,n.tag))}function WN(t,n){switch(Mf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ta(Kt),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(wi(n),n.alternate===null)throw Error(l(340));xl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(wi(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(l(340));xl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Yf(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 ta(n.type),null;case 22:case 23:return wi(n),Vf(),t!==null&&ot(kl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ta(Kt),null;case 25:return null;default:return null}}function y0(t,n){switch(Mf(n),n.tag){case 3:ta(Kt),rn();break;case 26:case 27:case 5:pe(n);break;case 4:rn();break;case 31:n.memoizedState!==null&&wi(n);break;case 13:wi(n);break;case 19:Yf(n);break;case 10:ta(n.type);break;case 22:case 23:wi(n),Vf(),t!==null&&ot(kl);break;case 24:ta(Kt)}}function Bs(t,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var h=o.next;a=h;do{if((a.tag&t)===t){o=void 0;var p=a.create,N=a.inst;o=p(),N.destroy=o}a=a.next}while(a!==h)}}catch(_){xt(n,n.return,_)}}function La(t,n,a){try{var o=n.updateQueue,h=o!==null?o.lastEffect:null;if(h!==null){var p=h.next;o=p;do{if((o.tag&t)===t){var N=o.inst,_=N.destroy;if(_!==void 0){N.destroy=void 0,h=n;var X=a,re=_;try{re()}catch(de){xt(h,X,de)}}}o=o.next}while(o!==p)}}catch(de){xt(n,n.return,de)}}function x0(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{sy(n,a)}catch(o){xt(t,t.return,o)}}}function b0(t,n,a){a.props=Al(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){xt(t,n,o)}}function br(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:var h=t.stateNode,p=Kr(t.memoizedProps,h);(h.ref===null||h.ref.name!==p)&&(h.ref=Ex(p)),o=h.ref;break;case 7:if(t.stateNode===null){var N=new Ei(t);g(t.child,!1,FE,N,void 0,void 0),t.stateNode=N}o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(_){xt(t,n,_)}}function Nn(t,n){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(h){xt(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){xt(t,n,h)}else a.current=null}function Su(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var a=0;a<n.length;a++)_x(t.stateNode,n[a])}function j0(t){for(var n=t.return;n!==null&&(Sh(n)&&_x(t.stateNode,n.stateNode),!wh(n));)n=n.return}function Hs(t){for(var n=t.return;n!==null&&(Sh(n)&&VE(t.stateNode,n.stateNode),!wh(n));)n=n.return}function wh(t){return t.tag===5||t.tag===3||t.tag===27}function Sh(t){return t&&t.tag===7&&t.stateNode!==null}function kh(t){var n=t.type,a=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(h){xt(t,t.return,h)}}function Ch(t,n,a){try{var o=t.stateNode;CE(o,t.type,a,n),o[$t]=n}catch(h){xt(t,t.return,h)}}function w0(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fa(t.type)||t.tag===4}function Nh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||w0(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&&Fa(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 Eh(t,n,a,o){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(h,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(h),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Fn)),Su(t,o),He=!0;else if(h!==4&&(h===27&&(Su(t,o),o=null,Fa(t.type)&&(a=t.stateNode,n=null)),t=t.child,t!==null))for(Eh(t,n,a,o),t=t.sibling;t!==null;)Eh(t,n,a,o),t=t.sibling}function ku(t,n,a,o){var h=t.tag;if(h===5||h===6)h=t.stateNode,n?a.insertBefore(h,n):a.appendChild(h),Su(t,o),He=!0;else if(h!==4&&(h===27&&(Su(t,o),o=null,Fa(t.type)&&(a=t.stateNode)),t=t.child,t!==null))for(ku(t,n,a,o),t=t.sibling;t!==null;)ku(t,n,a,o),t=t.sibling}function S0(t){var n=t.stateNode,a=t.memoizedProps;try{for(var o=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);En(n,o,a),n[Mt]=t,n[$t]=a}catch(p){xt(t,t.return,p)}}var Cu=!1,Si=null;function k0(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Cu=!0)}var jr=null;function C0(){var t=jr;return jr=null,t}var ri=0;function No(t,n,a,o,h){return ri=0,N0(t.child,n,a,o,h)}function N0(t,n,a,o,h){for(var p=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(o!==null){var _=um(N);o.push(_),_.view&&(p=!0)}else p||um(N).view&&(p=!0);Cu=!0,Cx(N,ri===0?n:n+"_"+ri,a),ri++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&h||N0(t.child,n,a,o,h)&&(p=!0));t=t.sibling}return p}function wr(t,n){for(;t!==null;)t.tag===5?Nx(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&n||wr(t.child,n)),t=t.sibling}function Nu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Nu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var n=t.memoizedProps;if(n.name==null||n.name==="auto")throw Error(l(544));var a=n.name;n=Zr(n.default,n.share),n!=="none"&&(No(t,a,n,null,!1)||wr(t.child,!1))}t=t.sibling}}function Th(t,n){if(t.tag===30){var a=t.stateNode,o=t.memoizedProps,h=Kr(o,a),p=Zr(o.default,a.paired?o.share:o.enter);p!=="none"?No(t,h,p,null,!1)?(Nu(t),a.paired||n||Do(t,o.onEnter)):wr(t.child,!1):Nu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Th(t,n),t=t.sibling;else Nu(t)}function Ah(t){if(Si!==null&&Si.size!==0){var n=Si;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 a=t.memoizedProps,o=a.name;if(o!=null&&o!=="auto"){var h=n.get(o);if(h!==void 0){var p=Zr(a.default,a.share);if(p!=="none"&&(No(t,o,p,null,!1)?(p=t.stateNode,h.paired=p,p.paired=h,Do(t,a.onShare)):wr(t.child,!1)),n.delete(o),n.size===0)break}}}Ah(t)}t=t.sibling}}}function Mh(t){if(t.tag===30){var n=t.memoizedProps,a=Kr(n,t.stateNode),o=Si!==null?Si.get(a):void 0,h=Zr(n.default,o!==void 0?n.share:n.exit);h!=="none"&&(No(t,a,h,null,!1)?o!==void 0?(h=t.stateNode,o.paired=h,h.paired=o,Si.delete(a),Do(t,n.onShare)):Do(t,n.onExit):wr(t.child,!1)),Si!==null&&Ah(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Mh(t),t=t.sibling;else Si!==null&&Ah(t)}function E0(t){for(t=t.child;t!==null;){if(t.tag===30){var n=t.memoizedProps,a=Kr(n,t.stateNode);n=Zr(n.default,n.update),t.flags&=-5,n!=="none"&&No(t,a,n,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&E0(t);t=t.sibling}}function Rh(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,wr(t.child,!1))}Rh(t)}t=t.sibling}}function Eu(t){if(t.tag===30)t.stateNode.paired=null,wr(t.child,!1),Rh(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Eu(t),t=t.sibling;else Rh(t)}function T0(t){for(t=t.child;t!==null;)t.tag===30?wr(t.child,!1):(t.subtreeFlags&33554432)!==0&&T0(t),t=t.sibling}function Oh(t,n,a,o,h,p,N){for(var _=!1;n!==null;){if(n.tag===5){var X=n.stateNode;if(p!==null&&ri<p.length){var re=p[ri],de=um(X);(re.view||de.view)&&(_=!0);var ve;if(ve=(t.flags&4)===0)if(de.clip)ve=!0;else{ve=re.rect;var te=de.rect;ve=ve.y!==te.y||ve.x!==te.x||ve.height!==te.height||ve.width!==te.width}ve&&(t.flags|=4),de.abs?de=!re.abs:(re=re.rect,de=de.rect,de=re.height!==de.height||re.width!==de.width),de&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&Cx(X,ri===0?a:a+"_"+ri,h),_&&(t.flags&4)!==0||(jr===null&&(jr=[]),jr.push(X,ri===0?o:o+"_"+ri,n.memoizedProps)),ri++}else(n.tag!==22||n.memoizedState===null)&&(n.tag===30&&N?t.flags|=n.flags&32:Oh(t,n.child,a,o,h,p,N)&&(_=!0));n=n.sibling}return _}function A0(t,n){for(t=t.child;t!==null;){if(t.tag===30){var a=t.memoizedProps,o=t.stateNode,h=Kr(a,o),p=Zr(a.default,a.update),N;N=t.memoizedState,t.memoizedState=null,o=t;var _=t.child;ri=0,h=Oh(o,_,h,h,p,N,!1),(t.flags&4)!==0&&h&&Do(t,a.onUpdate)}else(t.subtreeFlags&33554432)!==0&&A0(t);t=t.sibling}}var fn=!1,gt=!1,Sr=!1,_h=!1,M0=typeof WeakSet=="function"?WeakSet:Set,hn=null,kr=!1,Ps=!1,Tu=!1,Dh=!1;function eE(t,n,a){if(t=t.containerInfo,am=Vo,t=Dv(t),bf(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var h=o.getSelection&&o.getSelection();if(h&&h.rangeCount!==0){o=h.anchorNode;var p=h.anchorOffset,N=h.focusNode;h=h.focusOffset;try{o.nodeType,N.nodeType}catch{o=null;break e}var _=0,X=-1,re=-1,de=0,ve=0,te=t,se=null;t:for(;;){for(var Ce;te!==o||p!==0&&te.nodeType!==3||(X=_+p),te!==N||h!==0&&te.nodeType!==3||(re=_+h),te.nodeType===3&&(_+=te.nodeValue.length),(Ce=te.firstChild)!==null;)se=te,te=Ce;for(;;){if(te===t)break t;if(se===o&&++de===p&&(X=_),se===N&&++ve===h&&(re=_),(Ce=te.nextSibling)!==null)break;te=se,se=te.parentNode}te=Ce}o=X===-1||re===-1?null:{start:X,end:re}}else o=null}o=o||{start:0,end:0}}else o=null;for(lm={focusedElem:t,selectionRange:o},Vo=!1,a=(a&335544064)===a,hn=n,n=a?9270:1024;hn!==null;){if(t=hn,a&&(o=t.deletions,o!==null))for(p=0;p<o.length;p++)a&&Mh(o[p]);if(t.alternate===null&&(t.flags&2)!==0)a&&k0(t),Au(a);else{if(t.tag===22){if(o=t.alternate,t.memoizedState!==null){o!==null&&o.memoizedState===null&&a&&Mh(o),Au(a);continue}else if(o!==null&&o.memoizedState!==null){a&&k0(t),Au(a);continue}}o=t.child,(t.subtreeFlags&n)!==0&&o!==null?(o.return=t,hn=o):(a&&E0(t),Au(a))}}Si=null}function Au(t){for(;hn!==null;){var n=hn,a=t,o=n.alternate,h=n.flags;switch(n.tag){case 0:case 11:case 15:break;case 1:if((h&1024)!==0&&o!==null){a=void 0,h=o.memoizedProps,o=o.memoizedState;var p=n.stateNode;try{var N=Al(n.type,h);a=p.getSnapshotBeforeUpdate(N,o),p.__reactInternalSnapshotBeforeUpdate=a}catch(_){xt(n,n.return,_)}}break;case 3:if((h&1024)!==0){if(o=n.stateNode.containerInfo,a=o.nodeType,a===9)hm(o);else if(a===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":hm(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&o!==null&&(a=Kr(o.memoizedProps,o.stateNode),h=n.memoizedProps,h=Zr(h.default,h.update),h!=="none"&&No(o,a,h,o.memoizedState=[],!0));break;default:if((h&1024)!==0)throw Error(l(163))}if(o=n.sibling,o!==null){o.return=n.return,hn=o;break}hn=n.return}}function R0(t,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:Cr(t,a),o&4&&Bs(5,a);break;case 1:if(Cr(t,a),o&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(N){xt(a,a.return,N)}else{var h=Al(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(N){xt(a,a.return,N)}}o&64&&x0(a),o&512&&br(a,a.return);break;case 3:if(Cr(t,a),o&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{sy(t,n)}catch(N){xt(a,a.return,N)}}break;case 27:n===null&&o&4&&S0(a);case 26:case 5:Cr(t,a),n===null&&o&4&&kh(a),o&512&&br(a,a.return);break;case 12:Cr(t,a);break;case 31:Cr(t,a),o&4&&z0(t,a);break;case 13:Cr(t,a),o&4&&L0(t,a),o&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=fE.bind(null,a),GE(t,a))));break;case 22:if(o=a.memoizedState!==null||fn,!o){var p=n!==null&&n.memoizedState!==null||gt;n=fn,h=gt,fn=o,(gt=p)&&!h?(o=2,(a.subtreeFlags&8772)!==0&&(o|=1),er(t,a,o)):Cr(t,a),fn=n,gt=h}break;case 30:Cr(t,a),o&512&&br(a,a.return);break;case 7:o&512&&br(a,a.return);default:Cr(t,a)}}function zh(t,n){for(t=t.child;t!==null;)O0(t,n),t=t.sibling}function O0(t,n){switch(t.tag){case 5:case 26:try{var a=t.stateNode;if(n){var o=a.style;typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"}else{var h=t.stateNode,p=t.memoizedProps.style,N=p!=null&&p.hasOwnProperty("display")?p.display:null;h.style.display=N==null||typeof N=="boolean"?"":(""+N).trim()}}catch(X){xt(t,t.return,X)}Lh(t,n);break;case 6:try{t.stateNode.nodeValue=n?"":t.memoizedProps,He=!0}catch(X){xt(t,t.return,X)}break;case 18:try{var _=t.stateNode;n?kx(_,!0):kx(t.stateNode,!1)}catch(X){xt(t,t.return,X)}break;case 22:case 23:t.memoizedState===null&&zh(t,n);break;default:zh(t,n)}}function Lh(t,n){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var a=t,o=n;switch(a.tag){case 4:O0(a,o);break e;case 22:a.memoizedState===null&&Lh(a,o);break e;default:Lh(a,o)}}t=t.sibling}}function _0(t){var n=t.alternate;n!==null&&(t.alternate=null,_0(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Gr(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 Dt=null,ai=!1;function Ji(t,n,a){for(a=a.child;a!==null;)D0(t,n,a),a=a.sibling}function D0(t,n,a){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Gi,a)}catch{}switch(a.tag){case 26:gt||Nn(a,n),Ji(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!gt&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:gt||Nn(a,n),Hs(a);var o=Dt,h=ai;Fa(a.type)&&(Dt=a.stateNode,ai=!1),Ji(t,n,a),Bx(a.stateNode,a.type,a.memoizedProps),Dt=o,ai=h;break;case 5:gt||Nn(a,n),Hs(a);case 6:if(a.tag===6&&Hs(a),o=Dt,h=ai,Dt=null,Ji(t,n,a),Dt=o,ai=h,Dt!==null)if(ai)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(a.stateNode),He=!0}catch(p){xt(a,n,p)}else try{Dt.removeChild(a.stateNode),He=!0}catch(p){xt(a,n,p)}break;case 18:Dt!==null&&(ai?(t=Dt,Sx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),$o(t)):Sx(Dt,a.stateNode));break;case 4:o=Dt,h=ai,Dt=a.stateNode.containerInfo,ai=!0,Ji(t,n,a),Dt=o,ai=h;break;case 0:case 11:case 14:case 15:La(2,a,n),gt||La(4,a,n),Ji(t,n,a);break;case 1:gt||(Nn(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&b0(a,n,o)),Ji(t,n,a);break;case 21:Ji(t,n,a);break;case 22:gt=(o=gt)||a.memoizedState!==null,Ji(t,n,a),gt=o;break;case 30:Nn(a,n),Ji(t,n,a);break;case 7:gt||Nn(a,n),Ji(t,n,a);break;default:Ji(t,n,a)}}function z0(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{$o(t)}catch(a){xt(n,n.return,a)}}}function L0(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{$o(t)}catch(a){xt(n,n.return,a)}}function tE(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new M0),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new M0),n;default:throw Error(l(435,t.tag))}}function Mu(t,n){var a=tE(t);n.forEach(function(o){if(!a.has(o)){a.add(o);var h=hE.bind(null,t,o);o.then(h,h)}})}function Yn(t,n,a){var o=n.deletions;if(o!==null)for(var h=0;h<o.length;h++){var p=o[h],N=t,_=n,X=_;e:for(;X!==null;){switch(X.tag){case 27:if(Fa(X.type)){Dt=X.stateNode,ai=!1;break e}break;case 5:Dt=X.stateNode,ai=!1;break e;case 3:case 4:Dt=X.stateNode.containerInfo,ai=!0;break e}X=X.return}if(Dt===null)throw Error(l(160));D0(N,_,p),Dt=null,ai=!1,N=p.alternate,N!==null&&(N.return=null),p.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)I0(n,t,a),n=n.sibling}var Wi=null;function I0(t,n,a){var o=t.alternate,h=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(h&4&&(o=t.updateQueue,o=o!==null?o.events:null,o!==null))for(var p=0;p<o.length;p++){var N=o[p];N.ref.impl=N.nextImpl}Yn(n,t,a),Gn(t),h&4&&(La(3,t,t.return),Bs(3,t),La(5,t,t.return));break;case 1:Yn(n,t,a),Gn(t),h&512&&(gt||o===null||Nn(o,o.return)),h&64&&fn&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:if(p=Wi,Yn(n,t,a),Gn(t),h&512&&(gt||o===null||Nn(o,o.return)),h&4)if(h=o!==null?o.memoizedState:null,a=t.memoizedState,o===null)if(a===null)if(t.stateNode===null)if(fn)t.stateNode=bx(t.type,t.memoizedProps,n.containerInfo,t);else{e:{n=t.type,a=t.memoizedProps,h=p.ownerDocument||p;t:switch(n){case"title":o=h.getElementsByTagName("title")[0],(!o||o[gr]||o[Mt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=h.createElement(n),h.head.insertBefore(o,h.querySelector("head > title"))),En(o,n,a),o[Mt]=t,K(o),n=o;break e;case"link":if(p=Vx("link","href",h).get(n+(a.href||""))){for(N=0;N<p.length;N++)if(o=p[N],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(N,1);break t}}o=h.createElement(n),En(o,n,a),h.head.appendChild(o);break;case"meta":if(p=Vx("meta","content",h).get(n+(a.content||""))){for(N=0;N<p.length;N++)if(o=p[N],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(N,1);break t}}o=h.createElement(n),En(o,n,a),h.head.appendChild(o);break;default:throw Error(l(468,n))}o[Mt]=t,K(o),n=o}t.stateNode=n}else fn||bm(p,t.type,t.stateNode);else t.stateNode=Fx(p,a,t.memoizedProps);else h!==a?(h===null?(n=o.stateNode,n===null||gt||n.parentNode.removeChild(n)):h.count--,a===null?fn||bm(p,t.type,t.stateNode):Fx(p,a,t.memoizedProps)):a===null&&t.stateNode!==null&&Ch(t,t.memoizedProps,o.memoizedProps);break;case 27:Yn(n,t,a),Gn(t),h&512&&(gt||o===null||Nn(o,o.return)),o!==null&&h&4&&Ch(t,t.memoizedProps,o.memoizedProps);break;case 5:if(p=Sr,Sr=!1,Yn(n,t,a),Sr=p,Gn(t),h&512&&(gt||o===null||Nn(o,o.return)),t.flags&32){n=t.stateNode;try{qn(n,""),He=!0}catch(de){xt(t,t.return,de)}}h&4&&t.stateNode!=null&&(n=t.memoizedProps,Ch(t,n,o!==null?o.memoizedProps:n)),h&1024&&(_h=!0);break;case 6:if(Yn(n,t,a),Gn(t),h&4){if(t.stateNode===null)throw Error(l(162));n=t.memoizedProps,a=t.stateNode;try{a.nodeValue=n,He=!0}catch(de){xt(t,t.return,de)}}break;case 3:if(He=!1,$u=null,p=Wi,Wi=Qs(n.containerInfo),Yn(n,t,a),Wi=p,Gn(t),h&4&&o!==null&&o.memoizedState.isDehydrated)try{$o(n.containerInfo)}catch(de){xt(t,t.return,de)}_h&&(_h=!1,B0(t)),He=!1;break;case 4:h=Sr,Sr=fn,o=ln(),p=Wi,Wi=Qs(t.stateNode.containerInfo),Yn(n,t,a),Gn(t),Wi=p,He&&Ps&&(Tu=!0),He=o,Sr=h;break;case 12:Yn(n,t,a),Gn(t);break;case 31:Yn(n,t,a),Gn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 13:Yn(n,t,a),Gn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(_u=Gt()),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 22:p=t.memoizedState!==null,N=o!==null&&o.memoizedState!==null;var _=fn,X=gt,re=Sr;fn=_||p,Sr=re||p,gt=X||N,Yn(n,t,a),gt=X,Sr=re,fn=_,Gn(t),h&8192&&(n=t.stateNode,n._visibility=p?n._visibility&-2:n._visibility|1,!p||o===null||N||fn||gt||(n=N||gt,a=fn,o=gt,fn=p||fn,gt=n,Ia(t,2),fn=a,gt=o),!p&&Sr||zh(t,p)),h&4&&(n=t.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Mu(t,a))));break;case 19:Yn(n,t,a),Gn(t),h&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,Mu(t,n)));break;case 30:h&512&&(gt||o===null||Nn(o,o.return)),h=ln(),p=Ps,N=(a&335544064)===a,_=t.memoizedProps,Ps=N&&Zr(_.default,_.update)!=="none",Yn(n,t,a),Gn(t),N&&o!==null&&He&&(t.flags|=4),Ps=p,He=h;break;case 21:break;case 7:h&512&&(gt||o===null||Nn(o,o.return)),o&&o.stateNode!==null&&(o.stateNode._fragmentFiber=t);default:Yn(n,t,a),Gn(t)}}function Gn(t){var n=t.flags;if(n&2){try{for(var a,o=t.return;o!==null;){if(w0(o)){a=o;break}o=o.return}o=null;for(var h=t.return;h!==null;){if(Sh(h)){var p=h.stateNode;o===null?o=[p]:o.push(p)}if(wh(h))break;h=h.return}var N=o;if(a==null)throw Error(l(160));switch(a.tag){case 27:var _=a.stateNode,X=Nh(t);ku(t,X,_,N);break;case 5:var re=a.stateNode;a.flags&32&&(qn(re,""),a.flags&=-33);var de=Nh(t);ku(t,de,re,N);break;case 3:case 4:var ve=a.stateNode.containerInfo,te=Nh(t);Eh(t,te,ve,N);break;default:throw Error(l(161))}}catch(se){xt(t,t.return,se)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function B0(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;B0(n),n.tag===5&&n.flags&1024&&(n=n.stateNode,Vo=!0,n.reset(),Vo=!1),t=t.sibling}}function Eo(t,n){if(n.subtreeFlags&9270)for(n=n.child;n!==null;)H0(n,t),n=n.sibling;else A0(n)}function H0(t,n){var a=t.alternate;if(a===null)Th(t,!1);else switch(t.tag){case 3:if(Dh=kr=!1,C0(),Eo(n,t),!kr&&!Tu){if(t=jr,t!==null)for(var o=0;o<t.length;o+=3){a=t[o];var h=t[o+1];Nx(a,t[o+2]),a=a.ownerDocument.documentElement,a!==null&&a.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"})),Dh=!0}jr=null;break;case 5:Eo(n,t);break;case 4:o=kr,kr=!1,Eo(n,t),kr&&(Tu=!0),kr=o;break;case 22:t.memoizedState===null&&(a.memoizedState!==null?Th(t,!1):Eo(n,t));break;case 30:o=kr,h=C0(),kr=!1,Eo(n,t),kr&&(t.flags|=4);var p=t.memoizedProps,N=t.stateNode;n=Kr(p,N),N=Kr(a.memoizedProps,N);var _=Zr(p.default,p.update);_==="none"?n=!1:(p=a.memoizedState,a.memoizedState=null,a=t.child,ri=0,n=Oh(t,a,n,N,_,p,!0),ri!==(p===null?0:p.length)&&(t.flags|=32)),(t.flags&4)!==0&&n?(Do(t,t.memoizedProps.onUpdate),jr=h):h!==null&&(h.push.apply(h,jr),jr=h),kr=(t.flags&32)!==0?!0:o;break;default:Eo(n,t)}}function Cr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)R0(t,n.alternate,n),n=n.sibling}function Ia(t,n){for(t=t.child;t!==null;){var a=t,o=n;switch(a.tag){case 0:case 11:case 14:case 15:La(4,a,a.return),Ia(a,o);break;case 1:Nn(a,a.return);var h=a.stateNode;typeof h.componentWillUnmount=="function"&&b0(a,a.return,h),Ia(a,o);break;case 27:(o&2)!==0&&Bx(a.stateNode,a.type,a.memoizedProps);case 5:Nn(a,a.return),a.tag!==5&&a.tag!==27||Hs(a),Ia(a,o);break;case 6:Hs(a);break;case 26:Nn(a,a.return),h=a.stateNode,a.memoizedState!==null||h===null||gt||h.parentNode.removeChild(h),Ia(a,o);break;case 22:a.memoizedState===null&&Ia(a,o);break;case 30:Nn(a,a.return),Ia(a,o);break;case 7:Nn(a,a.return);default:Ia(a,o)}t=t.sibling}}function er(t,n,a){for(a=(n.subtreeFlags&8772)!==0?a:a&-2,n=n.child;n!==null;){var o=n.alternate,h=t,p=n,N=p.flags,_=(a&1)!==0;switch(p.tag){case 0:case 11:case 15:er(h,p,a),Bs(4,p);break;case 1:if(er(h,p,a),o=p,h=o.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(de){xt(o,o.return,de)}if(o=p,h=o.updateQueue,h!==null){var X=o.stateNode;try{var re=h.shared.hiddenCallbacks;if(re!==null)for(h.shared.hiddenCallbacks=null,h=0;h<re.length;h++)oy(re[h],X)}catch(de){xt(o,o.return,de)}}_&&N&64&&x0(p),br(p,p.return);break;case 27:(a&2)!==0&&S0(p);case 5:p.tag!==5&&p.tag!==27||j0(p),er(h,p,a),_&&o===null&&N&4&&kh(p),br(p,p.return);break;case 6:j0(p);break;case 26:X=p.stateNode,p.memoizedState!==null||X===null||fn||bm(Qs(X.ownerDocument),p.type,X),er(h,p,a),_&&o===null&&N&4&&kh(p),br(p,p.return);break;case 12:er(h,p,a);break;case 31:er(h,p,a),_&&N&4&&z0(h,p);break;case 13:er(h,p,a),_&&N&4&&L0(h,p);break;case 22:p.memoizedState===null&&er(h,p,a),br(p,p.return);break;case 30:er(h,p,a),br(p,p.return);break;case 7:br(p,p.return);default:er(h,p,a)}n=n.sibling}}function Ih(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Cs(a))}function Bh(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Cs(t))}function Bi(t,n,a,o){var h=(a&335544064)===a;if(n.subtreeFlags&(h?10262:10256))for(n=n.child;n!==null;)P0(t,n,a,o),n=n.sibling;else h&&T0(n)}function P0(t,n,a,o){var h=(a&335544064)===a;h&&n.alternate===null&&n.return!==null&&n.return.alternate!==null&&Eu(n);var p=n.flags;switch(n.tag){case 0:case 11:case 15:Bi(t,n,a,o),p&2048&&Bs(9,n);break;case 1:Bi(t,n,a,o);break;case 3:Bi(t,n,a,o),h&&Dh&&(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="")),p&2048&&(p=null,n.alternate!==null&&(p=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==p&&(n.refCount++,p!=null&&Cs(p)));break;case 12:if(p&2048){Bi(t,n,a,o),p=n.stateNode;try{var N=n.memoizedProps,_=N.id,X=N.onPostCommit;typeof X=="function"&&X(_,n.alternate===null?"mount":"update",p.passiveEffectDuration,-0)}catch(re){xt(n,n.return,re)}}else Bi(t,n,a,o);break;case 31:Bi(t,n,a,o);break;case 13:Bi(t,n,a,o);break;case 23:break;case 22:N=n.stateNode,_=n.alternate,n.memoizedState!==null?(h&&_!==null&&_.memoizedState===null&&Eu(_),N._visibility&2?Bi(t,n,a,o):Us(t,n)):(h&&_!==null&&_.memoizedState!==null&&Eu(n),N._visibility&2?Bi(t,n,a,o):(N._visibility|=2,To(t,n,a,o,(n.subtreeFlags&10256)!==0||!1))),p&2048&&Ih(_,n);break;case 24:Bi(t,n,a,o),p&2048&&Bh(n.alternate,n);break;case 30:h&&(p=n.alternate,p!==null&&(wr(p.child,!0),wr(n.child,!0))),Bi(t,n,a,o);break;default:Bi(t,n,a,o)}}function To(t,n,a,o,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=t,N=n,_=a,X=o,re=N.flags;switch(N.tag){case 0:case 11:case 15:To(p,N,_,X,h),Bs(8,N);break;case 23:break;case 22:var de=N.stateNode;N.memoizedState!==null?de._visibility&2?To(p,N,_,X,h):Us(p,N):(de._visibility|=2,To(p,N,_,X,h)),h&&re&2048&&Ih(N.alternate,N);break;case 24:To(p,N,_,X,h),h&&re&2048&&Bh(N.alternate,N);break;default:To(p,N,_,X,h)}n=n.sibling}}function Us(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,o=n,h=o.flags;switch(o.tag){case 22:Us(a,o),h&2048&&Ih(o.alternate,o);break;case 24:Us(a,o),h&2048&&Bh(o.alternate,o);break;default:Us(a,o)}n=n.sibling}}var Ml=8192;function Rl(t,n,a){if(t.subtreeFlags&Ml)for(t=t.child;t!==null;)U0(t,n,a),t=t.sibling}function U0(t,n,a){switch(t.tag){case 26:Rl(t,n,a),t.flags&Ml&&(t.memoizedState!==null?oT(a,Wi,t.memoizedState,t.memoizedProps):(t=t.stateNode,(n&335544128)===n&&Xx(a,t)));break;case 5:Rl(t,n,a),t.flags&Ml&&(t=t.stateNode,(n&335544128)===n&&Xx(a,t));break;case 3:case 4:var o=Wi;Wi=Qs(t.stateNode.containerInfo),Rl(t,n,a),Wi=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=Ml,Ml=16777216,Rl(t,n,a),Ml=o):Rl(t,n,a));break;case 30:if((t.flags&Ml)!==0&&(o=t.memoizedProps.name,o!=null&&o!=="auto")){var h=t.stateNode;h.paired=null,Si===null&&(Si=new Map),Si.set(o,h)}Rl(t,n,a);break;default:Rl(t,n,a)}}function q0(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 qs(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];hn=o,V0(o,t)}q0(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)F0(t),t=t.sibling}function F0(t){switch(t.tag){case 0:case 11:case 15:qs(t),t.flags&2048&&La(9,t,t.return);break;case 3:qs(t);break;case 12:qs(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Ru(t)):qs(t);break;default:qs(t)}}function Ru(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];hn=o,V0(o,t)}q0(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:La(8,n,n.return),Ru(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Ru(n));break;default:Ru(n)}t=t.sibling}}function V0(t,n){for(;hn!==null;){var a=hn;switch(a.tag){case 0:case 11:case 15:La(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Cs(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,hn=o;else e:for(a=t;hn!==null;){o=hn;var h=o.sibling,p=o.return;if(_0(o),o===a){hn=null;break e}if(h!==null){h.return=p,hn=h;break e}hn=p}}}var nE={getCacheForType:function(t){var n=Sn(Kt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Sn(Kt).controller.signal}},iE=typeof WeakMap=="function"?WeakMap:Map,pt=0,kt=null,tt=null,at=0,yt=0,ki=null,Ba=!1,Ao=!1,Hh=!1,la=0,Ft=0,Ha=0,Ol=0,Ou=0,Ci=0,Mo=0,Fs=null,li=null,Ph=!1,_u=0,$0=0,Du=1/0,zu=null,Pa=null,Ht=0,tr=null,_l=null,Nr=0,Uh=0,qh=null,Y0=null,Ro=null,Oo=null,_o=null,Vs=0,Lu=null;function Ni(){return(pt&2)!==0&&at!==0?at&-at:ce.T!==null?Jh():ei()}function G0(){if(Ci===0)if((at&536870912)===0||et){var t=Ri;Ri<<=1,(Ri&3932160)===0&&(Ri=262144),Ci=t}else Ci=536870912;return t=kn.current,t!==null&&(t.flags|=32),Ci}function Do(t,n){if(n!=null){var a=t.stateNode,o=a.ref;o===null&&(o=a.ref=Ex(Kr(t.memoizedProps,a))),Oo===null&&(Oo=[]),Oo.push(n.bind(null,o))}}function oi(t,n,a){(t===kt&&(yt===2||yt===9)||t.cancelPendingCommit!==null)&&(zo(t,0),Ua(t,at,Ci,!1)),Zn(t,a),((pt&2)===0||t!==kt)&&(t===kt&&((pt&2)===0&&(Ol|=a),Ft===4&&Ua(t,at,Ci,!1)),Er(t))}function X0(t,n,a){if((pt&6)!==0)throw Error(l(327));var o=!a&&(n&127)===0&&(n&t.expiredLanes)===0||pi(t,n),h=o?lE(t,n):Vh(t,n,!0),p=o;do{if(h===0){Ao&&!o&&Ua(t,n,0,!1);break}else{if(a=t.current.alternate,p&&!rE(a)){h=Vh(t,n,!1),p=!1;continue}if(h===2){if(p=n,t.errorRecoveryDisabledLanes&p)var N=0;else N=t.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){n=N;e:{var _=t;h=Fs;var X=_.current.memoizedState.isDehydrated;if(X&&(zo(_,N).flags|=256),N=Vh(_,N,!1),N!==2&&N!==6){if(Hh&&!X){_.errorRecoveryDisabledLanes|=p,Ol|=p,h=4;break e}p=li,li=h,p!==null&&(li===null?li=p:li.push.apply(li,p))}h=N}if(p=!1,h!==2)continue}}if(h===1){zo(t,0),Ua(t,n,0,!0);break}e:{switch(o=t,p=h,p){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n&&(n&62914560)!==n)break;case 6:Ua(o,n,Ci,!Ba);break e;case 2:li=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(h=_u+300-Gt(),10<h)){if(Ua(o,n,Ci,!Ba),mi(o,0,!0)!==0)break e;Nr=n,o.timeoutHandle=cm(Q0.bind(null,o,a,li,zu,Ph,n,Ci,Ol,Mo,Ba,p,"Throttled",-0,0),h);break e}Q0(o,a,li,zu,Ph,n,Ci,Ol,Mo,Ba,p,null,-0,0)}}break}while(!0);Er(t)}function Q0(t,n,a,o,h,p,N,_,X,re,de,ve,te,se){t.timeoutHandle=-1;var Ce=n.subtreeFlags,_e=(p&335544064)===p;if(ve=null,(_e||Ce&8192||(Ce&16785408)===16785408)&&(ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Si=null,U0(n,p,ve),_e&&(Ce=ve,_e=t.containerInfo,_e=(_e.nodeType===9?_e:_e.ownerDocument).__reactViewTransition,_e!=null&&(Ce.count++,Ce.waitingForViewTransition=!0,Ce=Js.bind(Ce),_e.finished.then(Ce,Ce))),Ce=(p&62914560)===p?_u-Gt():(p&4194048)===p?$0-Gt():0,Ce=sT(ve,Ce),Ce!==null)){Nr=p,t.cancelPendingCommit=Ce(ix.bind(null,t,n,p,a,o,h,N,_,X,re,de,ve,null,te,se)),Ua(t,p,N,!re);return}ix(t,n,p,a,o,h,N,_,X,re,de,ve)}function rE(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var h=a[o],p=h.getSnapshot;h=h.value;try{if(!ji(p(),h))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;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 Ua(t,n,a,o){n=fr(t,n),n&=~Ou,n&=~Ol,t.suspendedLanes|=n,t.pingedLanes&=~n,o&&(t.warmLanes|=n),o=t.expirationTimes;for(var h=n;0<h;){var p=31-Vt(h),N=1<<p;o[p]=-1,h&=~N}a!==0&&Jn(t,a,n)}function Iu(){return(pt&6)===0?($s(0),!1):!0}function Fh(){if(tt!==null){if(yt===0)var t=tt.return;else t=tt,ea=bl=null,Zf(t),jo=null,Ts=0,t=tt;for(;t!==null;)y0(t.alternate,t),t=t.return;tt=null}}function zo(t,n){var a=t.timeoutHandle;return a!==-1&&(t.timeoutHandle=-1,TE(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Nr=0,Fh(),kt=t,tt=a=Jr(t.current,null),at=n,yt=0,ki=null,Ba=!1,Ao=pi(t,n),Hh=!1,Mo=Ci=Ou=Ol=Ha=Ft=0,li=Fs=null,Ph=!1,la=fr(t,n),$c(),a}function K0(t,n){Ke=null,ce.H=gu,n===bo||n===nu?(n=iy(),yt=3):n===Bf?(n=iy(),yt=4):yt=n===fh?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ki=n,tt===null&&(Ft=1,vu(t,Di(n,t.current)))}function Z0(){var t=kn.current;return t===null?!0:(at&4194048)===at?zn===null:(at&62914560)===at||(at&536870912)!==0?t===zn:!1}function J0(){var t=ce.H;return ce.H=gu,t===null?gu:t}function W0(){var t=ce.A;return ce.A=nE,t}function Bu(){Ft=4,Ba||(at&4194048)!==at&&kn.current!==null||(Ao=!0),(Ha&134217727)===0&&(Ol&134217727)===0||kt===null||Ua(kt,at,Ci,!1)}function Vh(t,n,a){var o=pt;pt|=2;var h=J0(),p=W0();(kt!==t||at!==n)&&(zu=null,zo(t,n)),n=!1;var N=Ft;e:do try{if(yt!==0&&tt!==null){var _=tt,X=ki;switch(yt){case 8:Fh(),N=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(n=!0);var re=yt;if(yt=0,ki=null,Lo(t,_,X,re),a&&Ao){N=0;break e}break;default:re=yt,yt=0,ki=null,Lo(t,_,X,re)}}aE(),N=Ft;break}catch(de){K0(t,de)}while(!0);return n&&t.shellSuspendCounter++,ea=bl=null,pt=o,ce.H=h,ce.A=p,tt===null&&(kt=null,at=0,$c()),N}function aE(){for(;tt!==null;)ex(tt)}function lE(t,n){var a=pt;pt|=2;var o=J0(),h=W0();kt!==t||at!==n?(zu=null,Du=Gt()+500,zo(t,n)):Ao=pi(t,n);e:do try{if(yt!==0&&tt!==null){n=tt;var p=ki;t:switch(yt){case 1:yt=0,ki=null,Lo(t,n,p,1);break;case 2:case 9:if(ty(p)){yt=0,ki=null,tx(n);break}n=function(){yt!==2&&yt!==9||kt!==t||(yt=7),Er(t)},p.then(n,n);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:ty(p)?(yt=0,ki=null,tx(n)):(yt=0,ki=null,Lo(t,n,p,7));break;case 5:var N=null;switch(tt.tag){case 26:N=tt.memoizedState;case 5:case 27:var _=tt;if(N?Yx(N):_.stateNode.complete){yt=0,ki=null;var X=_.sibling;if(X!==null)tt=X;else{var re=_.return;re!==null?(tt=re,Hu(re)):tt=null}break t}}yt=0,ki=null,Lo(t,n,p,5);break;case 6:yt=0,ki=null,Lo(t,n,p,6);break;case 8:Fh(),Ft=6;break e;default:throw Error(l(462))}}oE();break}catch(de){K0(t,de)}while(!0);return ea=bl=null,ce.H=o,ce.A=h,pt=a,tt!==null?0:(kt=null,at=0,$c(),Ft)}function oE(){for(;tt!==null&&!On();)ex(tt)}function ex(t){var n=g0(t.alternate,t,la);t.memoizedProps=t.pendingProps,n===null?Hu(t):tt=n}function tx(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=c0(a,n,n.pendingProps,n.type,void 0,at);break;case 11:n=c0(a,n,n.pendingProps,n.type.render,n.ref,at);break;case 5:Zf(n);var o=n;o===dn&&(et?(Zc(o),o.tag===5&&o.stateNode!=null&&(Et=o.stateNode)):(Zc(o),et=!0));default:y0(a,n),n=tt=Vv(n,la),n=g0(a,n,la)}t.memoizedProps=t.pendingProps,n===null?Hu(t):tt=n}function Lo(t,n,a,o){ea=bl=null,Zf(n),jo=null,Ts=0;var h=n.return;try{if(XN(t,h,n,a,at)){Ft=1,vu(t,Di(a,t.current)),tt=null;return}}catch(p){if(h!==null)throw tt=h,p;Ft=1,vu(t,Di(a,t.current)),tt=null;return}n.flags&32768?(et||o===1?t=!0:Ao||(at&536870912)!==0?t=!1:(Ba=t=!0,(o===2||o===9||o===3||o===6)&&(o=kn.current,o!==null&&o.tag===13&&(o.flags|=16384))),nx(n,t)):Hu(n)}function Hu(t){var n=t;do{if((n.flags&32768)!==0){nx(n,Ba);return}t=n.return;var a=JN(n.alternate,n,la);if(a!==null){tt=a;return}if(n=n.sibling,n!==null){tt=n;return}tt=n=t}while(n!==null);Ft===0&&(Ft=5)}function nx(t,n){do{var a=WN(t.alternate,t);if(a!==null){a.flags&=32767,tt=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){tt=t;return}tt=t=a}while(t!==null);Ft=6,tt=null}function ix(t,n,a,o,h,p,N,_,X,re,de,ve){t.cancelPendingCommit=null;do Pu();while(Ht!==0);if((pt&6)!==0)throw Error(l(327));if(n!==null){if(n===t.current)throw Error(l(177));t===kt&&(tt=kt=null,at=0),_l=n,tr=t,Nr=a,qh=h,Y0=o,sE(t,n,a,N,_,X,ve)}}function sE(t,n,a,o,h,p,N){var _=n.lanes|n.childLanes;if(Uh=_,_|=Cf,hr(t,a,_,o,h,p),Oo=null,(a&335544064)===a?(_o=LN(t),o=10262):(_o=null,o=10256),(n.subtreeFlags&o)!==0||(n.flags&o)!==0?(t.callbackNode=null,t.callbackPriority=0,mE(xn,function(){return Xh(),null})):(t.callbackNode=null,t.callbackPriority=0),Cu=!1,o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,h=me.p,me.p=2,p=pt,pt|=4;try{eE(t,n,a)}finally{pt=p,me.p=h,ce.T=o}}Ht=1,Cu?Ro=DE(N,t.containerInfo,_o,$h,Yh,uE,Gh,Xh,cE):($h(),Yh(),Gh())}function cE(t){if(Ht!==0){var n=tr.onRecoverableError;n(t,{componentStack:null})}}function uE(){Ht===3&&(Ht=0,H0(_l,tr),Ht=4)}function $h(){if(Ht===1){Ht=0;var t=tr,n=_l,a=Nr,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null;var h=me.p;me.p=2;var p=pt;pt|=4;try{Ps=Tu=!1,I0(n,t,a),a=lm;var N=Dv(t.containerInfo),_=a.focusedElem,X=a.selectionRange;if(N!==_&&_&&_.ownerDocument&&_v(_.ownerDocument.documentElement,_)){if(X!==null&&bf(_)){var re=X.start,de=X.end;if(de===void 0&&(de=re),"selectionStart"in _)_.selectionStart=re,_.selectionEnd=Math.min(de,_.value.length);else{var ve=_.ownerDocument||document,te=ve&&ve.defaultView||window;if(te.getSelection){var se=te.getSelection(),Ce=_.textContent.length,_e=Math.min(X.start,Ce),Ze=X.end===void 0?_e:Math.min(X.end,Ce);!se.extend&&_e>Ze&&(N=Ze,Ze=_e,_e=N);var ie=Ov(_,_e),Z=Ov(_,Ze);if(ie&&Z&&(se.rangeCount!==1||se.anchorNode!==ie.node||se.anchorOffset!==ie.offset||se.focusNode!==Z.node||se.focusOffset!==Z.offset)){var le=ve.createRange();le.setStart(ie.node,ie.offset),se.removeAllRanges(),_e>Ze?(se.addRange(le),se.extend(Z.node,Z.offset)):(le.setEnd(Z.node,Z.offset),se.addRange(le))}}}}for(ve=[],se=_;se=se.parentNode;)se.nodeType===1&&ve.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ve.length;_++){var ge=ve[_];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Vo=!!am,lm=am=null}finally{pt=p,me.p=h,ce.T=o}}t.current=n,Ht=2}}function Yh(){if(Ht===2){Ht=0;var t=tr,n=_l,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=ce.T,ce.T=null;var o=me.p;me.p=2;var h=pt;pt|=4;try{R0(t,n.alternate,n)}finally{pt=h,me.p=o,ce.T=a}}Ht=3}}function Gh(){if(Ht===4||Ht===3){Ht=0;var t=Ro;Ro=null,Xe();var n=tr,a=_l,o=Nr,h=Y0,p=(o&335544064)===o?10262:10256;if((a.subtreeFlags&p)!==0||(a.flags&p)!==0?Ht=5:(Ht=0,_l=tr=null,rx(n,n.pendingLanes)),p=n.pendingLanes,p===0&&(Pa=null),Wn(o),a=a.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(Gi,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=ce.T,p=me.p,me.p=2,ce.T=null;try{for(var N=n.onRecoverableError,_=0;_<h.length;_++){var X=h[_];N(X.value,{componentStack:X.stack})}}finally{ce.T=a,me.p=p}}if(h=Oo,N=_o,_o=null,h!==null&&(Oo=null,N===null&&(N=[]),t!==null))for(X=0;X<h.length;X++)a=(0,h[X])(N),a!==void 0&&t.finished.finally(a);(Nr&3)!==0&&Pu(),Er(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Lu?Vs++:(Vs=0,Lu=n):(Vs=0,Lu=null),$s(0)}}function rx(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Cs(n)))}function Pu(){return Ro!==null&&(Ro.skipTransition(),Ro=null),$h(),Yh(),Gh(),Xh()}function Xh(){if(Ht!==5)return!1;var t=tr,n=Uh;Uh=0;var a=Wn(Nr),o=ce.T,h=me.p;try{me.p=32>a?32:a,ce.T=null,a=qh,qh=null;var p=tr,N=Nr;if(Ht=0,_l=tr=null,Nr=0,(pt&6)!==0)throw Error(l(331));var _=pt;if(pt|=4,F0(p.current),P0(p,p.current,N,a),pt=_,$s(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Gi,p)}catch{}return!0}finally{me.p=h,ce.T=o,rx(t,n)}}function ax(t,n,a){n=Di(a,n),n=dh(t.stateNode,n,2),t=Oa(t,n,2),t!==null&&(Zn(t,2),Er(t))}function xt(t,n,a){if(t.tag===3)ax(t,t,a);else for(;n!==null;){if(n.tag===3){ax(n,t,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Pa===null||!Pa.has(o))){t=Di(a,t),a=t0(2),o=Oa(n,a,2),o!==null&&(n0(a,o,n,t),Zn(o,2),Er(o));break}}n=n.return}}function Qh(t,n,a){var o=t.pingCache;if(o===null){o=t.pingCache=new iE;var h=new Set;o.set(n,h)}else h=o.get(n),h===void 0&&(h=new Set,o.set(n,h));h.has(a)||(Hh=!0,h.add(a),t=dE.bind(null,t,n,a),n.then(t,t))}function dE(t,n,a){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,kt===t&&(at&a)===a&&((Ft===4||Ft===3&&(at&62914560)===at&&300>Gt()-_u)&&(pt&2)===0?zo(t,0):Ou|=a,Mo===at&&(Mo=0)),Er(t)}function lx(t,n){n===0&&(n=gi()),t=vl(t,n),t!==null&&(Zn(t,n),Er(t))}function fE(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),lx(t,a)}function hE(t,n){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,h=t.memoizedState;h!==null&&(a=h.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(l(314))}o!==null&&o.delete(n),lx(t,a)}function mE(t,n){return Un(t,n)}var Io=null,Bo=null,Kh=!1,Uu=!1,Zh=!1,qa=0;function Er(t){t!==Bo&&t.next===null&&(Bo===null?Io=Bo=t:Bo=Bo.next=t),Uu=!0,Kh||(Kh=!0,gE())}function $s(t,n){if(!Zh&&Uu){Zh=!0;do for(var a=!1,o=Io;o!==null;){if(t!==0){var h=o.pendingLanes;if(h===0)var p=0;else{var N=o.suspendedLanes,_=o.pingedLanes;p=(1<<31-Vt(42|t)+1)-1,p&=h&~(N&~_),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(a=!0,ux(o,p))}else p=at,p=mi(o,o===kt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||pi(o,p)||(a=!0,ux(o,p));o=o.next}while(a);Zh=!1}}function pE(){ox()}function ox(){Uu=Kh=!1;var t=0;qa!==0&&EE()&&(t=qa);for(var n=Gt(),a=null,o=Io;o!==null;){var h=o.next,p=sx(o,n);p===0?(o.next=null,a===null?Io=h:a.next=h,h===null&&(Bo=a)):(a=o,(t!==0||(p&3)!==0)&&(Uu=!0)),o=h}Ht!==0&&Ht!==5||$s(t),qa!==0&&(qa=0)}function sx(t,n){for(var a=t.suspendedLanes,o=t.pingedLanes,h=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var N=31-Vt(p),_=1<<N,X=h[N];X===-1?((_&a)===0||(_&o)!==0)&&(h[N]=sl(_,n)):X<=n&&(t.expiredLanes|=_),p&=~_}if(n=kt,a=at,a=mi(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,a===0||t===n&&(yt===2||yt===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&_t(o),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||pi(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(o!==null&&_t(o),Wn(a)){case 2:case 8:a=cr;break;case 32:a=xn;break;case 268435456:a=ol;break;default:a=xn}return o=cx.bind(null,t),a=Un(a,o),t.callbackPriority=n,t.callbackNode=a,n}return o!==null&&o!==null&&_t(o),t.callbackPriority=2,t.callbackNode=null,2}function cx(t,n){if(Ht!==0&&Ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Pu()&&t.callbackNode!==a)return null;var o=at;return o=mi(t,t===kt?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(X0(t,o,n),sx(t,Gt()),t.callbackNode!=null&&t.callbackNode===a?cx.bind(null,t):null)}function ux(t,n){if(Pu())return null;X0(t,n,!0)}function gE(){AE(function(){(pt&6)!==0?Un(sr,pE):ox()})}function Jh(){if(qa===0){var t=Sl;t===0&&(t=Qi,Qi<<=1,(Qi&261888)===0&&(Qi=256)),qa=t}return qa}function dx(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:jn(t)}function vE(t,n,a,o,h){if(n==="submit"&&a&&a.stateNode===h){var p=dx((h[$t]||null).action),N=o.submitter;N&&(n=(n=N[$t]||null)?dx(n.formAction):N.getAttribute("formAction"),n!==null&&(p=n,N=null));var _=new Uc("action","action",null,o,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(qa!==0){var X=new FormData(h,N);lh(a,{pending:!0,data:X,method:h.method,action:p},null,X)}}else typeof p=="function"&&(_.preventDefault(),X=new FormData(h,N),lh(a,{pending:!0,data:X,method:h.method,action:p},p,X))},currentTarget:h}]})}}for(var Wh=0;Wh<kf.length;Wh++){var em=kf[Wh],yE=em.toLowerCase(),xE=em[0].toUpperCase()+em.slice(1);Zi(yE,"on"+xE)}Zi(Iv,"onAnimationEnd"),Zi(Bv,"onAnimationIteration"),Zi(Hv,"onAnimationStart"),Zi("dblclick","onDoubleClick"),Zi("focusin","onFocus"),Zi("focusout","onBlur"),Zi(TN,"onTransitionRun"),Zi(AN,"onTransitionStart"),Zi(MN,"onTransitionCancel"),Zi(Pv,"onTransitionEnd"),Le("onMouseEnter",["mouseout","mouseover"]),Le("onMouseLeave",["mouseout","mouseover"]),Le("onPointerEnter",["pointerout","pointerover"]),Le("onPointerLeave",["pointerout","pointerover"]),Te("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Te("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Te("onBeforeInput",["compositionend","keypress","textInput","paste"]),Te("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Te("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Te("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),bE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function fx(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var o=t[a],h=o.event;o=o.listeners;e:{var p=void 0;if(n)for(var N=o.length-1;0<=N;N--){var _=o[N],X=_.instance,re=_.currentTarget;if(_=_.listener,X!==p&&h.isPropagationStopped())break e;p=_,h.currentTarget=re;try{p(h)}catch(de){Vc(de)}h.currentTarget=null,p=X}else for(N=0;N<o.length;N++){if(_=o[N],X=_.instance,re=_.currentTarget,_=_.listener,X!==p&&h.isPropagationStopped())break e;p=_,h.currentTarget=re;try{p(h)}catch(de){Vc(de)}h.currentTarget=null,p=X}}}}function nt(t,n){var a=n[cl];a===void 0&&(a=n[cl]=new Set);var o=t+"__bubble";a.has(o)||(hx(n,t,2,!1),a.add(o))}function tm(t,n,a){var o=0;n&&(o|=4),hx(a,t,o,n)}var qu="_reactListening"+Math.random().toString(36).slice(2);function nm(t){if(!t[qu]){t[qu]=!0,Ee.forEach(function(a){a!=="selectionchange"&&(bE.has(a)||tm(a,!1,t),tm(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[qu]||(n[qu]=!0,tm("selectionchange",!1,n))}}function hx(t,n,a,o){switch(nb(n)){case 2:var h=fT;break;case 8:h=hT;break;default:h=wm}a=h.bind(null,n,a,t),h=void 0,!ml||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),o?h!==void 0?t.addEventListener(n,a,{capture:!0,passive:h}):t.addEventListener(n,a,!0):h!==void 0?t.addEventListener(n,a,{passive:h}):t.addEventListener(n,a,!1)}function im(t,n,a,o,h){var p=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var N=o.tag;if(N===3||N===4){var _=o.stateNode.containerInfo;if(_===h)break;if(N===4)for(N=o.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===h)return;N=N.return}for(;_!==null;){if(N=ti(_),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){o=p=N;continue e}_=_.parentNode}}o=o.return}hl(function(){var re=p,de=fl(a),ve=[];e:{var te=Uv.get(t);if(te!==void 0){var se=Uc,Ce=t;switch(t){case"keypress":if(Hc(a)===0)break e;case"keydown":case"keyup":se=rN;break;case"focusin":Ce="focus",se=mf;break;case"focusout":Ce="blur",se=mf;break;case"beforeblur":case"afterblur":se=mf;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=gv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=YC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=cN;break;case Iv:case Bv:case Hv:se=QC;break;case Pv:se=dN;break;case"scroll":case"scrollend":se=VC;break;case"wheel":se=hN;break;case"copy":case"cut":case"paste":se=ZC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=yv;break;case"submit":se=oN;break;case"toggle":case"beforetoggle":se=pN}var _e=(n&4)!==0,Ze=!_e&&(t==="scroll"||t==="scrollend"),ie=_e?te!==null?te+"Capture":null:te;_e=[];for(var Z=re,le;Z!==null;){var ge=Z;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||ie===null||(ge=Qr(Z,ie),ge!=null&&_e.push(Gs(Z,ge,le))),Ze)break;Z=Z.return}0<_e.length&&(te=new se(te,Ce,null,a,de),ve.push({event:te,listeners:_e}))}}if((n&7)===0){e:{if(se=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",se&&a!==dl&&(Ce=a.relatedTarget||a.fromElement)&&(ti(Ce)||Ce[bn]))break e;(te||se)&&(Ce=de.window===de?de:(se=de.ownerDocument)?se.defaultView||se.parentWindow:window,te?(se=a.relatedTarget||a.toElement,te=re,se=se?ti(se):null,se!==null&&(Ze=u(se),_e=se.tag,se!==Ze||_e!==5&&_e!==27&&_e!==6)&&(se=null)):(te=null,se=re),te!==se&&(_e=gv,ge="onMouseLeave",ie="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(_e=yv,ge="onPointerLeave",ie="onPointerEnter",Z="pointer"),Ze=te==null?Ce:ue(te),le=se==null?Ce:ue(se),Ce=new _e(ge,Z+"leave",te,a,de),Ce.target=Ze,Ce.relatedTarget=le,ge=null,ti(de)===re&&(_e=new _e(ie,Z+"enter",se,a,de),_e.target=le,_e.relatedTarget=Ze,ge=_e),Ze=ge,_e=te&&se?R(te,se,jE):null,te!==null&&mx(ve,Ce,te,_e,!1),se!==null&&Ze!==null&&mx(ve,Ze,se,_e,!0)))}e:{if(te=re?ue(re):window,se=te.nodeName&&te.nodeName.toLowerCase(),se==="select"||se==="input"&&te.type==="file")var Oe=Nv;else if(kv(te))if(Ev)Oe=CN;else{Oe=SN;var lt=wN}else se=te.nodeName,!se||se.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?re&&ul(re.elementType)&&(Oe=Nv):Oe=kN;if(Oe&&(Oe=Oe(t,re))){Cv(ve,Oe,a,de);break e}lt&<(t,te,re)}switch(lt=re?ue(re):window,t){case"focusin":(kv(lt)||lt.contentEditable==="true")&&(fo=lt,jf=re,ws=null);break;case"focusout":ws=jf=fo=null;break;case"mousedown":wf=!0;break;case"contextmenu":case"mouseup":case"dragend":wf=!1,zv(ve,a,de);break;case"selectionchange":if(EN)break;case"keydown":case"keyup":zv(ve,a,de)}var Ie;if(gf)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 uo?wv(t,a)&&(Fe="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(xv&&a.locale!=="ko"&&(uo||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&uo&&(Ie=mv()):(Sa=de,df="value"in Sa?Sa.value:Sa.textContent,uo=!0)),lt=Fu(re,Fe),0<lt.length&&(Fe=new vv(Fe,t,null,a,de),ve.push({event:Fe,listeners:lt}),Ie?Fe.data=Ie:(Ie=Sv(a),Ie!==null&&(Fe.data=Ie)))),(Ie=vN?yN(t,a):xN(t,a))&&(Fe=Fu(re,"onBeforeInput"),0<Fe.length&&(lt=new vv("onBeforeInput","beforeinput",null,a,de),ve.push({event:lt,listeners:Fe}),lt.data=Ie)),vE(ve,t,re,a,de)}fx(ve,n)})}function Gs(t,n,a){return{instance:t,listener:n,currentTarget:a}}function Fu(t,n){for(var a=n+"Capture",o=[];t!==null;){var h=t,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=Qr(t,a),h!=null&&o.unshift(Gs(t,h,p)),h=Qr(t,n),h!=null&&o.push(Gs(t,h,p))),t.tag===3)return o;t=t.return}return[]}function jE(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function mx(t,n,a,o,h){for(var p=n._reactName,N=[];a!==null&&a!==o;){var _=a,X=_.alternate,re=_.stateNode;if(_=_.tag,X!==null&&X===o)break;_!==5&&_!==26&&_!==27||re===null||(X=re,h?(re=Qr(a,p),re!=null&&N.unshift(Gs(a,re,X))):h||(re=Qr(a,p),re!=null&&N.push(Gs(a,re,X)))),a=a.return}N.length!==0&&t.push({event:n,listeners:N})}var wE=/\r\n?/g,SE=/\u0000|\uFFFD/g;function px(t){return(typeof t=="string"?t:""+t).replace(wE,`
|
|
49
|
+
`).replace(SE,"")}function gx(t,n){return n=px(n),px(t)===n}function bt(t,n,a,o,h,p){switch(a){case"children":if(typeof o=="string")n==="body"||n==="textarea"&&o===""||qn(t,o);else if(typeof o=="number"||typeof o=="bigint")n!=="body"&&qn(t,""+o);else return;break;case"className":vi(t,"class",o);break;case"tabIndex":vi(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":vi(t,a,o);break;case"style":xi(t,o,p);return;case"data":if(n!=="object"){vi(t,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=jn(o),t.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(a,"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 p=="function"&&(a==="formAction"?(n!=="input"&&bt(t,n,"name",h.name,h,null),bt(t,n,"formEncType",h.formEncType,h,null),bt(t,n,"formMethod",h.formMethod,h,null),bt(t,n,"formTarget",h.formTarget,h,null)):(bt(t,n,"encType",h.encType,h,null),bt(t,n,"method",h.method,h,null),bt(t,n,"target",h.target,h,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=jn(o),t.setAttribute(a,o);break;case"onClick":o!=null&&(t.onclick=Fn);return;case"onScroll":o!=null&&nt("scroll",t);return;case"onScrollEnd":o!=null&&nt("scrollend",t);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(l(60));(p!=null?p.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}a=jn(o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,o):t.removeAttribute(a);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":o===!0?t.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,o):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(a,o):t.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(a):t.setAttribute(a,o);break;case"popover":nt("beforetoggle",t),nt("toggle",t),Bt(t,"popover",o);break;case"xlinkActuate":Xt(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xt(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xt(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xt(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xt(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xt(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xt(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xt(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xt(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Bt(t,"is",o);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=hs.get(a)||a,Bt(t,a,o);else return}He=!0}function rm(t,n,a,o,h,p){switch(a){case"style":xi(t,o,p);return;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(l(61));if(a=o.__html,a!=null){if(h.children!=null)throw Error(l(60));(p!=null?p.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"children":if(typeof o=="string")qn(t,o);else if(typeof o=="number"||typeof o=="bigint")qn(t,""+o);else return;break;case"onScroll":o!=null&&nt("scroll",t);return;case"onScrollEnd":o!=null&&nt("scrollend",t);return;case"onClick":o!=null&&(t.onclick=Fn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Se.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),p=a.slice(2,h?a.length-7:void 0),n=t[$t]||null,n=n!=null?n[a]:null,typeof n=="function"&&t.removeEventListener(p,n,h),typeof o=="function")){typeof n!="function"&&n!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(p,o,h);break e}He=!0,a in t?t[a]=o:o===!0?t.setAttribute(a,""):Bt(t,a,o)}return}He=!0}function En(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",t),nt("load",t);var o=!1,h=!1,p;for(p in a)if(a.hasOwnProperty(p)){var N=a[p];if(N!=null)switch(p){case"src":o=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:bt(t,n,p,N,a,null)}}h&&bt(t,n,"srcSet",a.srcSet,a,null),o&&bt(t,n,"src",a.src,a,null);return;case"input":nt("invalid",t);var _=p=N=h=null,X=null,re=null;for(o in a)if(a.hasOwnProperty(o)){var de=a[o];if(de!=null)switch(o){case"name":h=de;break;case"type":N=de;break;case"checked":X=de;break;case"defaultChecked":re=de;break;case"value":p=de;break;case"defaultValue":_=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(l(137,n));break;default:bt(t,n,o,de,a,null)}}ja(t,p,_,X,re,N,h,!1);return;case"select":nt("invalid",t),o=N=p=null;for(h in a)if(a.hasOwnProperty(h)&&(_=a[h],_!=null))switch(h){case"value":p=_;break;case"defaultValue":N=_;break;case"multiple":o=_;default:bt(t,n,h,_,a,null)}n=p,a=N,t.multiple=!!o,n!=null?ni(t,!!o,n,!1):a!=null&&ni(t,!!o,a,!0);return;case"textarea":nt("invalid",t),p=h=o=null;for(N in a)if(a.hasOwnProperty(N)&&(_=a[N],_!=null))switch(N){case"value":o=_;break;case"defaultValue":h=_;break;case"children":p=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(l(91));break;default:bt(t,n,N,_,a,null)}yi(t,o,h,p);return;case"option":for(X in a)if(a.hasOwnProperty(X)&&(o=a[X],o!=null))switch(X){case"selected":t.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:bt(t,n,X,o,a,null)}return;case"dialog":nt("beforetoggle",t),nt("toggle",t),nt("cancel",t),nt("close",t);break;case"iframe":case"object":nt("load",t);break;case"video":case"audio":for(o=0;o<Ys.length;o++)nt(Ys[o],t);break;case"image":nt("error",t),nt("load",t);break;case"details":nt("toggle",t);break;case"embed":case"source":case"link":nt("error",t),nt("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(re in a)if(a.hasOwnProperty(re)&&(o=a[re],o!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:bt(t,n,re,o,a,null)}return;default:if(ul(n)){for(de in a)a.hasOwnProperty(de)&&(o=a[de],o!==void 0&&rm(t,n,de,o,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(o=a[_],o!=null&&bt(t,n,_,o,a,null))}var kE={};function CE(t,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,N=null,_=null,X=null,re=null,de=null;for(se in a){var ve=a[se];if(a.hasOwnProperty(se)&&ve!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":X=ve;default:o.hasOwnProperty(se)||bt(t,n,se,null,o,ve)}}for(var te in o){var se=o[te];if(ve=a[te],o.hasOwnProperty(te)&&(se!=null||ve!=null))switch(te){case"type":se!==ve&&(He=!0),p=se;break;case"name":se!==ve&&(He=!0),h=se;break;case"checked":se!==ve&&(He=!0),re=se;break;case"defaultChecked":se!==ve&&(He=!0),de=se;break;case"value":se!==ve&&(He=!0),N=se;break;case"defaultValue":se!==ve&&(He=!0),_=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(l(137,n));break;default:se!==ve&&bt(t,n,te,se,o,ve)}}Dn(t,N,_,X,re,de,p,h);return;case"select":se=N=_=te=null;for(p in a)if(X=a[p],a.hasOwnProperty(p)&&X!=null)switch(p){case"value":break;case"multiple":se=X;default:o.hasOwnProperty(p)||bt(t,n,p,null,o,X)}for(h in o)if(p=o[h],X=a[h],o.hasOwnProperty(h)&&(p!=null||X!=null))switch(h){case"value":p!==X&&(He=!0),te=p;break;case"defaultValue":p!==X&&(He=!0),_=p;break;case"multiple":p!==X&&(He=!0),N=p;default:p!==X&&bt(t,n,h,p,o,X)}n=_,a=N,o=se,te!=null?ni(t,!!a,te,!1):!!o!=!!a&&(n!=null?ni(t,!!a,n,!0):ni(t,!!a,a?[]:"",!1));return;case"textarea":se=te=null;for(_ in a)if(h=a[_],a.hasOwnProperty(_)&&h!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:bt(t,n,_,null,o,h)}for(N in o)if(h=o[N],p=a[N],o.hasOwnProperty(N)&&(h!=null||p!=null))switch(N){case"value":h!==p&&(He=!0),te=h;break;case"defaultValue":h!==p&&(He=!0),se=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(l(91));break;default:h!==p&&bt(t,n,N,h,o,p)}co(t,te,se);return;case"option":for(var Ce in a)if(te=a[Ce],a.hasOwnProperty(Ce)&&te!=null&&!o.hasOwnProperty(Ce))switch(Ce){case"selected":t.selected=!1;break;default:bt(t,n,Ce,null,o,te)}for(X in o)if(te=o[X],se=a[X],o.hasOwnProperty(X)&&te!==se&&(te!=null||se!=null))switch(X){case"selected":te!==se&&(He=!0),t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:bt(t,n,X,te,o,se)}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 _e in a)te=a[_e],a.hasOwnProperty(_e)&&te!=null&&!o.hasOwnProperty(_e)&&bt(t,n,_e,null,o,te);for(re in o)if(te=o[re],se=a[re],o.hasOwnProperty(re)&&te!==se&&(te!=null||se!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(l(137,n));break;default:bt(t,n,re,te,o,se)}return;default:if(ul(n)){for(var Ze in a)te=a[Ze],a.hasOwnProperty(Ze)&&te!==void 0&&!o.hasOwnProperty(Ze)&&rm(t,n,Ze,void 0,o,te);for(de in o)te=o[de],se=a[de],!o.hasOwnProperty(de)||te===se||te===void 0&&se===void 0||rm(t,n,de,te,o,se);return}}for(var ie in a)te=a[ie],a.hasOwnProperty(ie)&&te!=null&&!o.hasOwnProperty(ie)&&bt(t,n,ie,null,o,te);for(ve in o)te=o[ve],se=a[ve],!o.hasOwnProperty(ve)||te===se||te==null&&se==null||bt(t,n,ve,te,o,se)}function vx(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function NE(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var h=a[o],p=h.transferSize,N=h.initiatorType,_=h.duration;if(p&&_&&vx(N)){for(N=0,_=h.responseEnd,o+=1;o<a.length;o++){var X=a[o],re=X.startTime;if(re>_)break;var de=X.transferSize,ve=X.initiatorType;de&&vx(ve)&&(X=X.responseEnd,N+=de*(X<_?1:(_-re)/(X-re)))}if(--o,n+=8*(p+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 am=null,lm=null;function Xs(t){return t.nodeType===9?t:t.ownerDocument}function yx(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 xx(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 bx(t,n,a,o){return a=Xs(a).createElement(t),a[Mt]=o,a[$t]=n,En(a,t,n),K(a),a}function om(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 sm=null;function EE(){var t=window.event;return t&&t.type==="popstate"?t===sm?!1:(sm=t,!0):(sm=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,TE=typeof clearTimeout=="function"?clearTimeout:void 0,jx=typeof Promise=="function"?Promise:void 0,wx=typeof requestAnimationFrame=="function"?requestAnimationFrame:cm,AE=typeof queueMicrotask=="function"?queueMicrotask:typeof jx<"u"?function(t){return jx.resolve(null).then(t).catch(ME)}:cm;function ME(t){setTimeout(function(){throw t})}function Fa(t){return t==="head"}function Sx(t,n){var a=n,o=0;do{var h=a.nextSibling;if(t.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(o===0){t.removeChild(h),$o(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")vm(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,vm(a);for(var p=a.firstChild;p;){var N=p.nextSibling,_=p.nodeName;p[gr]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=N}}else a==="body"&&vm(t.ownerDocument.body);a=h}while(a);$o(n)}function kx(t,n){var a=t;t=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=o}while(a)}function Cx(t,n,a){if(n=CSS.escape(n)!==n?"r-"+btoa(n).replace(/=/g,""):n,t.style.viewTransitionName=n,a!=null&&(t.style.viewTransitionClass=a),a=getComputedStyle(t),a.display==="inline"){if(n=t.getClientRects(),n.length===1)var o=1;else for(var h=o=0;h<n.length;h++){var p=n[h];0<p.width&&0<p.height&&o++}o===1&&(t=t.style,t.display=n.length===1?"inline-block":"block",t.marginTop="-"+a.paddingTop,t.marginBottom="-"+a.paddingBottom)}}function Nx(t,n){t=t.style,n=n.style;var a=n!=null?n.hasOwnProperty("viewTransitionName")?n.viewTransitionName:n.hasOwnProperty("view-transition-name")?n["view-transition-name"]:null:null;t.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=n!=null?n.hasOwnProperty("viewTransitionClass")?n.viewTransitionClass:n.hasOwnProperty("view-transition-class")?n["view-transition-class"]:null:null,t.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),t.display==="inline-block"&&(n==null?t.display=t.margin="":(a=n.display,t.display=a==null||typeof a=="boolean"?"":a,a=n.margin,a!=null?t.margin=a:(a=n.hasOwnProperty("marginTop")?n.marginTop:n["margin-top"],t.marginTop=a==null||typeof a=="boolean"?"":a,n=n.hasOwnProperty("marginBottom")?n.marginBottom:n["margin-bottom"],t.marginBottom=n==null||typeof n=="boolean"?"":n)))}function RE(t,n,a){return a=a.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<=a.innerHeight&&t.left<=a.innerWidth}}function um(t){var n=t.getBoundingClientRect(),a=getComputedStyle(t);return RE(n,a,t)}function OE(t){return t.documentElement.clientHeight}function _E(t){this.addEventListener("load",t),this.addEventListener("error",t)}function DE(t,n,a,o,h,p,N,_,X){var re=n.nodeType===9?n:n.ownerDocument;try{var de=re.startViewTransition({update:function(){var te=re.defaultView,se=te.navigation&&te.navigation.transition,Ce=re.fonts.status;o();var _e=[];if(Ce==="loaded"&&(OE(re),re.fonts.status==="loading"&&_e.push(re.fonts.ready)),Ce=_e.length,t!==null)for(var Ze=t.suspenseyImages,ie=0,Z=0;Z<Ze.length;Z++){var le=Ze[Z];if(!le.complete){var ge=le.getBoundingClientRect();if(0<ge.bottom&&0<ge.right&&ge.top<te.innerHeight&&ge.left<te.innerWidth){if(ie+=Gx(le),ie>Yu){_e.length=Ce;break}le=new Promise(_E.bind(le)),_e.push(le)}}}if(0<_e.length)return te=Promise.race([Promise.all(_e),new Promise(function(Oe){return setTimeout(Oe,500)})]).then(h,h),(se?Promise.allSettled([se.finished,te]):te).then(p,p);if(h(),se)return se.finished.then(p,p);p()},types:a});re.__reactViewTransition=de;var ve=[];return de.ready.then(function(){for(var te=re.documentElement.getAnimations({subtree:!0}),se=0;se<te.length;se++){var Ce=te[se],_e=Ce.effect,Ze=_e.pseudoElement;if(Ze!=null&&Ze.startsWith("::view-transition")){ve.push(Ce),Ce=_e.getKeyframes();for(var ie=Ze=void 0,Z=!0,le=0;le<Ce.length;le++){var ge=Ce[le],Oe=ge.width;if(Ze===void 0)Ze=Oe;else if(Ze!==Oe){Z=!1;break}if(Oe=ge.height,ie===void 0)ie=Oe;else if(ie!==Oe){Z=!1;break}delete ge.width,delete ge.height,ge.transform==="none"&&delete ge.transform}Z&&Ze!==void 0&&ie!==void 0&&(_e.setKeyframes(Ce),Z=getComputedStyle(_e.target,_e.pseudoElement),Z.width!==Ze||Z.height!==ie)&&(Z=Ce[0],Z.width=Ze,Z.height=ie,Z=Ce[Ce.length-1],Z.width=Ze,Z.height=ie,_e.setKeyframes(Ce))}}N()},function(te){re.__reactViewTransition===de&&(re.__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{o(),h(),N()}}),de.finished.finally(function(){for(var te=0;te<ve.length;te++)ve[te].cancel();re.__reactViewTransition===de&&(re.__reactViewTransition=null),_()}),de}catch{return o(),h(),N(),null}}function Dl(t,n){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+n+")"}Dl.prototype.animate=function(t,n){return n=typeof n=="number"?{duration:n}:B({},n),n.pseudoElement=this._selector,this._scope.animate(t,n)},Dl.prototype.getAnimations=function(){for(var t=this._scope,n=this._selector,a=t.getAnimations({subtree:!0}),o=[],h=0;h<a.length;h++){var p=a[h].effect;p!==null&&p.target===t&&p.pseudoElement===n&&o.push(a[h])}return o},Dl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Ex(t){return{name:t,group:new Dl("group",t),imagePair:new Dl("image-pair",t),old:new Dl("old",t),new:new Dl("new",t)}}function Ei(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ei.prototype.addEventListener=function(t,n,a){var o=null,h=null;if(!(a!=null&&typeof a!="boolean"&&(o=a.signal||null,o!==null&&o.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var p=this._eventListeners;if(Ax(p,t,n,a)===-1){var N=this,_=n;a!=null&&typeof a!="boolean"&&a.once===!0&&(_=function(X){N.removeEventListener(t,n,a),typeof n=="function"?n.call(this,X):n.handleEvent(X)}),o!==null&&(h=N.removeEventListener.bind(N,t,n,a),o.addEventListener("abort",h,{once:!0}),h=o.removeEventListener.bind(o,"abort",h)),o=Ho(a),p.push({type:t,listener:n,optionsOrUseCapture:a,attachedListener:_,cleanup:h}),g(this._fragmentFiber.child,!1,zE,t,_,o)}this._eventListeners=p}};function zE(t,n,a,o){return C(t).addEventListener(n,a,o),!1}Ei.prototype.removeEventListener=function(t,n,a){var o=this._eventListeners;if(o!==null&&(n=Ax(o,t,n,a),n!==-1)){var h=o[n];a=h.attachedListener;var p=h.cleanup;h=Ho(h.optionsOrUseCapture),g(this._fragmentFiber.child,!1,LE,t,a,h),o.splice(n,1),p!==null&&p()}};function LE(t,n,a,o){return C(t).removeEventListener(n,a,o),!1}function Ho(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function Tx(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function Ax(t,n,a,o){if(t.length===0)return-1;o=Tx(o);for(var h=0;h<t.length;h++){var p=t[h];if(p.type===n&&p.listener===a&&Tx(p.optionsOrUseCapture)===o)return h}return-1}Ei.prototype.dispatchEvent=function(t){var n=x(this._fragmentFiber);if(n===null)return!0;n=C(n);var a=this._eventListeners;if(a!==null&&0<a.length||!t.bubbles){var o=n.nodeType===9?n.createComment(""):document.createTextNode("");if(a)for(var h=0;h<a.length;h++){var p=a[h];o.addEventListener(p.type,p.attachedListener,Ho(p.optionsOrUseCapture))}if(n.appendChild(o),t=o.dispatchEvent(t),a)for(h=0;h<a.length;h++)p=a[h],o.removeEventListener(p.type,p.attachedListener,Ho(p.optionsOrUseCapture));return n.removeChild(o),t}return n.dispatchEvent(t)},Ei.prototype.focus=function(t){g(this._fragmentFiber.child,!0,Mx,t,void 0,void 0)};function Mx(t,n){return t.tag===6?!1:(t=C(t),XE(t,n))}Ei.prototype.focusLast=function(t){var n=[];g(this._fragmentFiber.child,!0,dm,n,void 0,void 0);for(var a=n.length-1;0<=a&&!Mx(n[a],t);a--);};function dm(t,n){return n.push(t),!1}Ei.prototype.blur=function(){var t=x(this._fragmentFiber);t!==null&&(t=C(t),t=Xs(t).activeElement,t!==null&&g(this._fragmentFiber.child,!1,IE,t,void 0,void 0))};function IE(t,n){return t.tag===6?!1:(t=C(t),t===n||t.contains(n)?(n.blur(),!0):!1)}Ei.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),g(this._fragmentFiber.child,!1,BE,t,void 0,void 0)};function BE(t,n){return t.tag===6||(t=C(t),n.observe(t)),!1}Ei.prototype.unobserveUsing=function(t){var n=this._observers;if(n!==null&&n.has(t)){n.delete(t),g(this._fragmentFiber.child,!1,HE,t,void 0,void 0);for(var a=n=0;a<nr.length;a++){var o=nr[a];o.fragmentInstance===this&&o.observer===t?t.unobserve(o.instance):nr[n++]=o}nr.length=n}};function HE(t,n){return t.tag===6||(t=C(t),n.unobserve(t)),!1}var nr=[],fm=!1;function PE(t,n,a){nr.push({fragmentInstance:t,observer:n,instance:a}),fm||(fm=!0,QE(function(){fm=!1;var o=nr;nr=[];for(var h=0;h<o.length;h++){var p=o[h];p.observer.unobserve(p.instance)}}))}Ei.prototype.getClientRects=function(){var t=[];return g(this._fragmentFiber.child,!1,UE,t,void 0,void 0),t};function UE(t,n){if(t.tag===6){t=t.stateNode;var a=t.ownerDocument.createRange();a.selectNodeContents(t),n.push.apply(n,a.getClientRects())}else t=C(t),n.push.apply(n,t.getClientRects());return!1}Ei.prototype.getRootNode=function(t){var n=x(this._fragmentFiber);return n===null?this:C(n).getRootNode(t)},Ei.prototype.compareDocumentPosition=function(t){var n=x(this._fragmentFiber);if(n===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];g(this._fragmentFiber.child,!1,dm,a,void 0,void 0);var o=C(n);if(a.length===0){if(a=o,b(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&&(a=n)}n=this._fragmentFiber;var h=o=a.compareDocumentPosition(t);return a===t?h=Node.DOCUMENT_POSITION_CONTAINS:o&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(n)[1],a===null?h=Node.DOCUMENT_POSITION_PRECEDING:(t=C(a).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(a[0]),h=C(a[a.length-1]);var p=b(this._fragmentFiber)?n.parentElement:o;if(p==null)return Node.DOCUMENT_POSITION_DISCONNECTED;o=p.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY,p=p.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY;var N=n.compareDocumentPosition(t),_=h.compareDocumentPosition(t),X=N&Node.DOCUMENT_POSITION_CONTAINED_BY||_&Node.DOCUMENT_POSITION_CONTAINED_BY;return _=o&&p&&N&Node.DOCUMENT_POSITION_FOLLOWING&&_&Node.DOCUMENT_POSITION_PRECEDING,n=o&&n===t||p&&h===t||X||_?Node.DOCUMENT_POSITION_CONTAINED_BY:!o&&n===t||!p&&h===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:N,n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||qE(n,this._fragmentFiber,a[0],a[a.length-1],t)?n:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function qE(t,n,a,o,h){var p=ti(h);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!p)e:{for(;p!==null;){if(p.tag===7&&(p===n||p.alternate===n)){a=!0;break e}p=p.return}a=!1}return a}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(p===null)return p=h.ownerDocument,h===p||h===p.documentElement||h===p.body;e:{for(p=n,n=x(n);p!==null;){if(!(p.tag!==5&&p.tag!==3&&p.tag!==27||p!==n&&p.alternate!==n)){p=!0;break e}p=p.return}p=!1}return p}return t&Node.DOCUMENT_POSITION_PRECEDING?((n=!!p)&&!(n=p===a)&&(n=R(a,p,I),n===null?n=!1:(g(n,!0,T,p,a),p=E,E=null,n=p!==null)),n):t&Node.DOCUMENT_POSITION_FOLLOWING?((n=!!p)&&!(n=p===o)&&(n=R(o,p,I),n===null?n=!1:(g(n,!0,A,p,o),p=E,M=E=null,n=p!==null)),n):!1}function Rx(t,n){var a=t.ownerDocument.createRange();a.selectNodeContents(t),t=a.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,n?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ei.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(l(566));var n=[];g(this._fragmentFiber.child,!1,dm,n,void 0,void 0);var a=t!==!1;if(n.length===0){var o=w(this._fragmentFiber);if(o=a?o[1]||o[0]||x(this._fragmentFiber):o[0]||o[1],o===null)return;if(o.tag===6){t=C(o),Rx(t,a);return}if(o=C(o),o.nodeType!==9){if(o.nodeType===11){a="host"in o?o.host:null,a!==null&&a.scrollIntoView(t);return}o.scrollIntoView(t)}}for(o=a?n.length-1:0;o!==(a?-1:n.length);){var h=n[o];h.tag===6?(h=C(h),Rx(h,a)):C(h).scrollIntoView(t),o+=a?-1:1}};function FE(t,n){return t=C(t),Ox(t,n),!1}function Ox(t,n){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(n)}function _x(t,n){var a=n._eventListeners;if(a!==null)for(var o=0;o<a.length;o++){var h=a[o];t.addEventListener(h.type,h.attachedListener,Ho(h.optionsOrUseCapture))}t.nodeType!==3&&(a=n._observers,a!==null&&a.forEach(function(p){for(var N=0,_=0;_<nr.length;_++){var X=nr[_];(X.fragmentInstance!==n||X.observer!==p||X.instance!==t)&&(nr[N++]=X)}nr.length=N,p.observe(t)}),Ox(t,n))}function VE(t,n){var a=n._eventListeners;if(a!==null)for(var o=0;o<a.length;o++){var h=a[o];t.removeEventListener(h.type,h.attachedListener,Ho(h.optionsOrUseCapture))}t.nodeType!==3&&(a=n._observers,a!==null&&a.forEach(function(p){typeof p.rootMargin=="string"?PE(n,p,t):p.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(n))}function hm(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":hm(a),Gr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function $E(t,n,a,o){for(;t.nodeType===1;){var h=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[gr])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==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(p=t.getAttribute("src"),(p!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var p=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=Hi(t.nextSibling),t===null)break}return null}function YE(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Hi(t.nextSibling),t===null))return null;return t}function Dx(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Hi(t.nextSibling),t===null))return null;return t}function mm(t){return t.data==="$?"||t.data==="$~"}function pm(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function GE(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function Hi(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 gm=null;function zx(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return Hi(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function Lx(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function XE(t,n){function a(){o=!0}if(t.ownerDocument.activeElement===t)return!0;var o=!1;try{t.ownerDocument.addEventListener("focus",a,!0),(t.focus||HTMLElement.prototype.focus).call(t,n)}finally{t.ownerDocument.removeEventListener("focus",a,!0)}return o}function QE(t){wx(function(){wx(function(n){return t(n)})})}function Ix(t,n,a){switch(n=Xs(a),t){case"html":if(t=n.documentElement,!t)throw Error(l(452));return t;case"head":if(t=n.head,!t)throw Error(l(453));return t;case"body":if(t=n.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function Bx(t,n,a){for(var o in a){var h=a[o];a.hasOwnProperty(o)&&h!=null&&bt(t,n,o,null,kE,h)}a.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Fn&&(t.onclick=null),Gr(t)}function vm(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Gr(t)}var Pi=new Map,Hx=new Set;function Qs(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 oa=me.d;me.d={f:KE,r:ZE,D:JE,C:WE,L:eT,m:tT,X:iT,S:nT,M:rT};function KE(){var t=oa.f(),n=Iu();return t||n}function ZE(t){var n=vr(t);n!==null&&n.tag===5&&n.type==="form"?Uy(n):oa.r(t)}var Po=typeof document>"u"?null:document;function Px(t,n,a){var o=Po;if(o&&typeof n=="string"&&n){var h=Rt(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Hx.has(h)||(Hx.add(h),t={rel:t,crossOrigin:a,href:n},o.querySelector(h)===null&&(n=o.createElement("link"),En(n,"link",t),K(n),o.head.appendChild(n)))}}function JE(t){oa.D(t),Px("dns-prefetch",t,null)}function WE(t,n){oa.C(t,n),Px("preconnect",t,n)}function eT(t,n,a){oa.L(t,n,a);var o=Po;if(o&&t&&n){var h='link[rel="preload"][as="'+Rt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Rt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Rt(a.imageSizes)+'"]')):h+='[href="'+Rt(t)+'"]';var p=h;switch(n){case"style":p=Uo(t);break;case"script":p=qo(t)}if(!(Pi.has(p)||(t=B({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Pi.set(p,t),o.querySelector(h)!==null||n==="style"&&o.querySelector(Ks(p))||n==="script"&&o.querySelector(Zs(p))))){var N=o.createElement("link");En(N,"link",t),n==="style"&&(N[Yr]=!0,N.onload=N.onerror=function(){he(N)}),K(N),o.head.appendChild(N)}}}function tT(t,n){oa.m(t,n);var a=Po;if(a&&t){var o=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Rt(o)+'"][href="'+Rt(t)+'"]',p=h;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=qo(t)}if(!Pi.has(p)&&(t=B({rel:"modulepreload",href:t},n),Pi.set(p,t),a.querySelector(h)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Zs(p)))return}o=a.createElement("link"),En(o,"link",t),K(o),a.head.appendChild(o)}}}function nT(t,n,a){oa.S(t,n,a);var o=Po;if(o&&t){var h=L(o).hoistableStyles,p=Uo(t);n=n||"default";var N=h.get(p);if(!N){var _={loading:0,preload:null};if(N=o.querySelector(Ks(p)))_.loading=5;else{t=B({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Pi.get(p))&&ym(t,a);var X=N=o.createElement("link");K(X),En(X,"link",t),X._p=new Promise(function(re,de){X.onload=re,X.onerror=de}),X.addEventListener("load",function(){_.loading|=1}),X.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Vu(N,n,o)}N={type:"stylesheet",instance:N,count:1,state:_},h.set(p,N)}}}function iT(t,n){oa.X(t,n);var a=Po;if(a&&t){var o=L(a).hoistableScripts,h=qo(t),p=o.get(h);p||(p=a.querySelector(Zs(h)),p||(t=B({src:t,async:!0},n),(n=Pi.get(h))&&xm(t,n),p=a.createElement("script"),K(p),En(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(h,p))}}function rT(t,n){oa.M(t,n);var a=Po;if(a&&t){var o=L(a).hoistableScripts,h=qo(t),p=o.get(h);p||(p=a.querySelector(Zs(h)),p||(t=B({src:t,async:!0,type:"module"},n),(n=Pi.get(h))&&xm(t,n),p=a.createElement("script"),K(p),En(p,"link",t),a.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(h,p))}}function Ux(t,n,a,o){var h=(h=vn.current)?Qs(h):null;if(!h)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Uo(a.href),n=L(h).hoistableStyles,o=n.get(a),o||(o={type:"style",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Uo(a.href);var p=L(h).hoistableStyles,N=p.get(t);if(N||(h=h.ownerDocument||h,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,N),(p=h.querySelector(Ks(t)))?p._p||(N.instance=p,N.state.loading=5):(p=Pi.get(t),p||(p={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Pi.set(t,p)),aT(h,t,p,N.state))),n&&o===null)throw Error(l(528,""));return N}if(n&&o!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=qo(a),n=L(h).hoistableScripts,o=n.get(a),o||(o={type:"script",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Uo(t){return'href="'+Rt(t)+'"'}function Ks(t){return'link[rel="stylesheet"]['+t+"]"}function qx(t){return B({},t,{"data-precedence":t.precedence,precedence:null})}function aT(t,n,a,o){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Yr]!==!0){o.loading=1;return}}else n=t.createElement("link"),n[Yr]=!0,n.onload=n.onerror=he.bind(null,n),En(n,"link",a),K(n),t.head.appendChild(n);o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2})}function qo(t){return'[src="'+Rt(t)+'"]'}function Zs(t){return"script[async]"+t}function Fx(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+Rt(a.href)+'"]');if(o)return n.instance=o,K(o),o;var h=B({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),K(o),En(o,"style",h),Vu(o,a.precedence,t),n.instance=o;case"stylesheet":h=Uo(a.href);var p=t.querySelector(Ks(h));if(p)return n.state.loading|=4,n.instance=p,K(p),p;o=qx(a),(h=Pi.get(h))&&ym(o,h),p=(t.ownerDocument||t).createElement("link"),K(p);var N=p;return N._p=new Promise(function(_,X){N.onload=_,N.onerror=X}),En(p,"link",o),n.state.loading|=4,Vu(p,a.precedence,t),n.instance=p;case"script":return p=qo(a.src),(h=t.querySelector(Zs(p)))?(n.instance=h,K(h),h):(o=a,(h=Pi.get(p))&&(o=B({},a),xm(o,h)),t=t.ownerDocument||t,h=t.createElement("script"),K(h),En(h,"link",o),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Vu(o,a.precedence,t));return n.instance}function Vu(t,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=o.length?o[o.length-1]:null,p=h,N=0;N<o.length;N++){var _=o[N];if(_.dataset.precedence===n)p=_;else if(p!==h)break}p?p.parentNode.insertBefore(t,p.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function ym(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function xm(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var $u=null;function Vx(t,n,a){if($u===null){var o=new Map,h=$u=new Map;h.set(a,o)}else h=$u,o=h.get(a),o||(o=new Map,h.set(a,o));if(o.has(t))return o;for(o.set(t,null),a=a.getElementsByTagName(t),h=0;h<a.length;h++){var p=a[h];if(!(p[gr]||p[Mt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var N=p.getAttribute(n)||"";N=t+N;var _=o.get(N);_?_.push(p):o.set(N,[p])}}return o}function bm(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function lT(t,n,a){if(a===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 $x(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Yx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Gx(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Xx(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=Gx(n),t.suspenseyImages.push(n)),t=cT.bind(t),n.decode().then(t,t))}function oT(t,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=Uo(o.href),p=n.querySelector(Ks(h));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=Js.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=p,K(p);return}p=n.ownerDocument||n,o=qx(o),(h=Pi.get(h))&&ym(o,h),p=p.createElement("link"),K(p);var N=p;N._p=new Promise(function(_,X){N.onload=_,N.onerror=X}),En(p,"link",o),a.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Js.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Yu=0;function sT(t,n){return t.stylesheets&&t.count===0&&Xu(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var o=setTimeout(function(){if(t.stylesheets&&Xu(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+n);0<t.imgBytes&&Yu===0&&(Yu=62500*NE());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Xu(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Yu?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(h)}}:null}function Qx(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Xu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function Js(){this.count--,Qx(this)}function cT(){this.imgCount--,Qx(this)}var Gu=null;function Xu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Gu=new Map,n.forEach(uT,t),Gu=null,Js.call(t))}function uT(t,n){if(!(n.state.loading&4)){var a=Gu.get(t);if(a)var o=a.get(null);else{a=new Map,Gu.set(t,a);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var N=h[p];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(a.set(N.dataset.precedence,N),o=N)}o&&a.set(null,o)}h=n.instance,N=h.getAttribute("data-precedence"),p=a.get(N)||o,p===o&&a.set(null,h),a.set(N,h),this.count++,o=Js.bind(this),h.addEventListener("load",o),h.addEventListener("error",o),p?p.parentNode.insertBefore(h,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var Fo={$$typeof:H,Provider:null,Consumer:null,_currentValue:Ne,_currentValue2:Ne,_threadCount:0};function dT(t,n,a,o,h,p,N,_,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=ya(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ya(0),this.hiddenUpdates=ya(null),this.identifierPrefix=o,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.transitionTypes=null,this.incompleteTransitions=new Map}function Kx(t,n,a,o,h,p,N,_,X,re,de,ve){return t=new dT(t,n,a,N,X,re,de,ve,_),n=1,p===!0&&(n|=24),p=ii(3,null,null,n),t.current=p,p.stateNode=t,n=zf(),n.refCount++,t.pooledCache=n,n.refCount++,p.memoizedState={element:o,isDehydrated:a,cache:n},Hf(p),t}function Zx(t){return t?(t=po,t):po}function Jx(t,n,a,o,h,p){h=Zx(h),o.context===null?o.context=h:o.pendingContext=h,o=Ra(n),o.payload={element:a},p=p===void 0?null:p,p!==null&&(o.callback=p),a=Oa(t,o,n),a!==null&&(oi(a,t,n),As(a,t,n))}function Wx(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function jm(t,n){Wx(t,n),(t=t.alternate)&&Wx(t,n)}function eb(t){if(t.tag===13||t.tag===31){var n=vl(t,67108864);n!==null&&oi(n,t,67108864),jm(t,67108864)}}function tb(t){if(t.tag===13||t.tag===31){var n=Ni();n=mr(n);var a=vl(t,n);a!==null&&oi(a,t,n),jm(t,n)}}var Vo=!0;function fT(t,n,a,o){var h=ce.T;ce.T=null;var p=me.p;try{me.p=2,wm(t,n,a,o)}finally{me.p=p,ce.T=h}}function hT(t,n,a,o){var h=ce.T;ce.T=null;var p=me.p;try{me.p=8,wm(t,n,a,o)}finally{me.p=p,ce.T=h}}function wm(t,n,a,o){if(Vo){var h=Sm(o);if(h===null)im(t,n,o,Qu,a),ib(t,o);else if(pT(h,t,n,a,o))o.stopPropagation();else if(ib(t,o),n&4&&-1<mT.indexOf(t)){for(;h!==null;){var p=vr(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var N=Ki(p.pendingLanes);if(N!==0){var _=p;for(_.pendingLanes|=2,_.entangledLanes|=2;N;){var X=1<<31-Vt(N);_.entanglements[1]|=X,N&=~X}Er(p),(pt&6)===0&&(Du=Gt()+500,$s(0))}}break;case 31:case 13:_=vl(p,2),_!==null&&oi(_,p,2),Iu(),jm(p,2)}if(p=Sm(o),p===null&&im(t,n,o,Qu,a),p===h)break;h=p}h!==null&&o.stopPropagation()}else im(t,n,o,null,a)}}function Sm(t){return t=fl(t),km(t)}var Qu=null;function km(t){if(Qu=null,t=ti(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=d(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return Qu=t,null}function nb(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(ll()){case sr:return 2;case cr:return 8;case xn:case fi:return 32;case ol:return 268435456;default:return 32}default:return 32}}var Cm=!1,Va=null,$a=null,Ya=null,Ws=new Map,ec=new Map,Ga=[],mT="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 ib(t,n){switch(t){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":Ws.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ec.delete(n.pointerId)}}function tc(t,n,a,o,h,p){return t===null||t.nativeEvent!==p?(t={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:p,targetContainers:[h]},n!==null&&(n=vr(n),n!==null&&eb(n)),t):(t.eventSystemFlags|=o,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function pT(t,n,a,o,h){switch(n){case"focusin":return Va=tc(Va,t,n,a,o,h),!0;case"dragenter":return $a=tc($a,t,n,a,o,h),!0;case"mouseover":return Ya=tc(Ya,t,n,a,o,h),!0;case"pointerover":var p=h.pointerId;return Ws.set(p,tc(Ws.get(p)||null,t,n,a,o,h)),!0;case"gotpointercapture":return p=h.pointerId,ec.set(p,tc(ec.get(p)||null,t,n,a,o,h)),!0}return!1}function rb(t){var n=ti(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){t.blockedOn=n,_n(t.priority,function(){tb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,_n(t.priority,function(){tb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ku(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=Sm(t.nativeEvent);if(a===null){a=t.nativeEvent;var o=new a.constructor(a.type,a);dl=o,a.target.dispatchEvent(o),dl=null}else return n=vr(a),n!==null&&eb(n),t.blockedOn=a,!1;n.shift()}return!0}function ab(t,n,a){Ku(t)&&a.delete(n)}function gT(){Cm=!1,Va!==null&&Ku(Va)&&(Va=null),$a!==null&&Ku($a)&&($a=null),Ya!==null&&Ku(Ya)&&(Ya=null),Ws.forEach(ab),ec.forEach(ab)}function Zu(t,n){t.blockedOn===n&&(t.blockedOn=null,Cm||(Cm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,gT)))}var Ju=null;function lb(t){Ju!==t&&(Ju=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ju===t&&(Ju=null);for(var n=0;n<t.length;n+=3){var a=t[n],o=t[n+1],h=t[n+2];if(typeof o!="function"){if(km(o||a)===null)continue;break}var p=vr(a);p!==null&&(t.splice(n,3),n-=3,lh(p,{pending:!0,data:h,method:a.method,action:o},o,h))}}))}function $o(t){function n(X){return Zu(X,t)}Va!==null&&Zu(Va,t),$a!==null&&Zu($a,t),Ya!==null&&Zu(Ya,t),Ws.forEach(n),ec.forEach(n);for(var a=0;a<Ga.length;a++){var o=Ga[a];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Ga.length&&(a=Ga[0],a.blockedOn===null);)rb(a),a.blockedOn===null&&Ga.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var h=a[o],p=a[o+1],N=h[$t]||null;if(typeof p=="function")N||lb(a);else if(N){var _=null;if(p&&p.hasAttribute("formAction")){if(h=p,N=p[$t]||null)_=N.formAction;else if(km(h)!==null)continue}else _=N.action;typeof _=="function"?a[o+1]=_:(a.splice(o,3),o-=3),lb(a)}}}function ob(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(N){return h=N})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function Nm(t){this._internalRoot=t}Wu.prototype.render=Nm.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,o=Ni();Jx(a,o,t,n,null,null)},Wu.prototype.unmount=Nm.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;Jx(t.current,2,null,t,null,null),Iu(),n[bn]=null}};function Wu(t){this._internalRoot=t}Wu.prototype.unstable_scheduleHydration=function(t){if(t){var n=ei();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Ga.length&&n!==0&&n<Ga[a].priority;a++);Ga.splice(a,0,t),a===0&&rb(t)}};var sb=i.version;if(sb!=="19.3.0")throw Error(l(527,sb,"19.3.0"));me.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=v(n),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var vT={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ed=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ed.isDisabled&&ed.supportsFiber)try{Gi=ed.inject(vT),sn=ed}catch{}}return rc.createRoot=function(t,n){if(!s(t))throw Error(l(299));var a=!1,o="",h=Zy,p=Jy,N=Wy;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError)),n=Kx(t,1,!1,null,null,a,o,null,h,p,N,ob),t[bn]=n.current,nm(t),new Nm(n)},rc.hydrateRoot=function(t,n,a){if(!s(t))throw Error(l(299));var o=!1,h="",p=Zy,N=Jy,_=Wy,X=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(N=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(X=a.formState)),n=Kx(t,1,!0,n,a??null,o,h,X,p,N,_,ob),n.context=Zx(null),a=n.current,o=Ni(),o=mr(o),h=Ra(o),h.callback=null,Oa(a,h,o),a=o,n.current.lanes=a,Zn(n,a),Er(n),t[bn]=n.current,nm(t),new Wu(n)},rc.version="19.3.0",rc}var jb;function MT(){if(jb)return Mm.exports;jb=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(i){console.error(i)}}return e(),Mm.exports=AT(),Mm.exports}var RT=MT();const OT={"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 sign in right now. Check your connection 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, {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 is gone","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 all be deleted.","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","dialogs.optional":"Optional","dialogs.deleteSection":"Delete the group “{name}”? Its channels move under Channels.","dialogs.deleteFailed":"Couldn't delete","dialogs.editSection":"Edit channel group","dialogs.sectionName":"Group name","dialogs.newSection":"New group","api.offline":"Can't reach the server. Check your connection and try again.","api.historyFailed":"Couldn't load the messages. Please try again.","error.autoconfigModel":"Enter the model ID.","error.autoconfigSource":"The setup source isn't valid.","error.botMissing":"This Bot doesn't exist.","error.agentUndeletable":"The agent Bot can't be deleted. You can rename or stop it.","error.chatAccessChanged":"Chat access has changed.","error.computerFailed":"The Bot's sandbox didn't start.","error.computerMissing":"This Bot has no sandbox.","error.dockerUnavailable":"Docker isn't available on the computer running Jarvy.","error.connectionMissing":"This model connection doesn't exist.","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":"The data directory is in use, or its run lock can't be taken.","error.discoveryFormat":"The response isn't a model list for this protocol.","error.discoveryHttp":"Couldn't fetch the models: HTTP {status}.","error.discoveryKey":"Enter the API key.","error.discoveryProtocol":"This protocol can't list models yet.","error.discoveryUrl":"The API URL isn't valid.","error.discoveryUrlMissing":"Enter the API URL.","error.historyMissing":"This History record doesn't exist.","error.invalidCredential":"The credential format isn't valid.","error.invalidRun":"The run state has changed.","error.loginInput":"Enter the sign-in details.","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":"This message doesn't exist.","error.modelIncomplete":"Fill in the model's context window and max output.","error.modelMissing":"This model doesn't exist.","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.questionClosed":"This question is already settled.","error.questionExpired":"This question has expired.","error.runtimeFailed":"The run failed. Check the model setup or the run records.","error.sessionCorrupt":"The session file can't be read.","error.sessionMismatch":"The session file doesn't match this Bot.","error.sessionMissing":"The session file is missing; check the run records before recovering.","error.sessionPath":"The session file path isn't valid.","error.stopping":"Shutting down.","error.thinkingFormat":"This thinking format isn't supported.","error.toolsMissing":"Couldn't load the run's tools.","error.unsafeReplay":"A submitted run can't be replayed automatically.","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"},_T={"settings.title":"Settings","settings.sections":"Settings sections","settings.general":"General","settings.models":"Models","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":"Reading 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":"Could not get the list","editor.loadingCatalog":"Reading 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 override","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":"Could not read the authorization state","auth.refresh":"Refresh the state","picker.loadFailed":"Couldn't load the providers"},DT={"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":"Latest {count}, newest first","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 Bots","chat.botStatus":"Bot status","chat.transcript":"Messages","chat.loading":"Loading the chat…","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":"Pick a model first, then send a message","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":"Picking one 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":"Each attachment must be 10 MB or smaller, and not empty.","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 read it ({status})","files.readError":"Couldn't read it","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 (sandboxed)","files.narrow":"Shrink the preview","files.widen":"Widen the preview","files.closePreview":"Close the preview","files.running":"Running the scripts in a sandbox: they can reach the network but can't read Jarvy's data.","files.scripts":{one:"This HTML has {count} script{hosts}. You're seeing it without the script; run it and it can reach the network but can't read Jarvy's data.",other:"This HTML has {count} scripts{hosts}. You're seeing it without them; run it and they can reach the network but can't read Jarvy's data."},"files.scriptHosts":" (loading {hosts})","files.andMore":" and more","files.stop":"Stop","files.run":"Run it","files.downloadToView":"Download this file to view it","files.tooLarge":"It's over 1 MB, too big to preview here.","files.unsupported":"This file type 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":"Don't answer","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."},zT={"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"},LT={"usage.title":"Usage","usage.back":"Back to Bot info","usage.range":"Time range","usage.today":"Today","usage.days":"{count} days","usage.refresh":"Refresh","usage.refreshLabel":"Refresh usage","usage.retry":"Retry","usage.loading":"Reading 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":"Writing","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":"Pi's estimate of the context","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":"Part of the system prompt; takes effect from the next run.","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 session; starting doesn't call the model by itself","bot.aborting":"Cancelling…","bot.abort":"Cancel this run","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":"Chat messages and the History timeline","bot.usageHint":"Tokens and cost per model","bot.subscriptions":"Subscriptions","bot.noSubscriptions":"No subscriptions","bot.threadIn":"Thread · #{channel}","botModel.auto":"Pi's default","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 models","botModel.switchFailed":"Couldn't switch","botModel.pick":"Pick the Bot's model","botModel.broken":"Model setup is broken","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 added yet","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}"},IT={"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}"},BT={"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 reach your files.","environment.default":"Default","environment.defaultHint":"Where it runs commands and works on files.","environment.awayHost":"Now on your computer: it switched there itself.","environment.awayComputer":"Now in its sandbox: it switched there itself.","environment.details":"Sandbox details","environment.sandboxAbout":"A Linux container only it uses, with its workspace as its home there. ","environment.external":"External environments it may use","environment.hostAbout":"The computer running Jarvy","environment.externalHint":"When on, it can switch there by itself when a task needs it; turning it off while it is there sends it back to its sandbox.","environment.accessFailed":"Couldn't change what it may use","environment.state.preparing":"Preparing","environment.state.running":"Running","environment.state.stopped":"Stopped","environment.state.failed":"Failed","environment.state.unavailable":"No Docker","environment.hint.preparing":"The first sandbox takes a few minutes: the image is built on this machine.","environment.hint.running":"Keeps running until you stop it.","environment.hint.stopped":"Starts by itself when the Bot needs it.","environment.hint.failed":"It didn't start. 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 it left running in the sandbox, such as background servers, are closed. Installed software and the files in its workspace stay, and it starts again when next needed.","environment.stopConfirm":"Stop","environment.reset":"Reset…","environment.resetTitle":"Reset {name}'s sandbox?","environment.resetBody":"Software installed in it is removed, and it starts again from the image. The files in its workspace stay.","environment.resetConfirm":"Reset","environment.changeFailed":"Couldn't change the work environment"},HT={...OT,..._T,...DT,...zT,...LT,...IT,...BT},PT={"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":"暂时无法登录,请检查连接后重试。","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} 对你在线程「{title}」中的消息表达了 {emoji}","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":"无法连接服务器,请检查连接后重试。","api.historyFailed":"聊天记录读取失败,请重试。","error.autoconfigModel":"请填写模型 ID。","error.autoconfigSource":"配置来源无效。","error.botMissing":"Bot 不存在。","error.agentUndeletable":"主 Bot 不能删除,但可以改名或停止。","error.chatAccessChanged":"聊天访问权限已变化。","error.computerFailed":"Bot 的沙箱没能启动。","error.computerMissing":"这个 Bot 没有沙箱。","error.dockerUnavailable":"运行 Jarvy 的电脑上没有可用的 Docker。","error.connectionMissing":"模型连接不存在。","error.credentialChanged":"凭证已更改,请重试。","error.credentialScope":"凭证连接不匹配。","error.credentialsMissing":"请先配置此模型连接的凭证。","error.dataLocked":"数据目录正在使用,或无法取得运行锁。","error.discoveryFormat":"返回内容不是此协议的模型列表。","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":"运行状态已变化。","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.questionClosed":"问题已结束。","error.questionExpired":"问题已失效。","error.runtimeFailed":"运行失败,请检查模型配置或运行记录。","error.sessionCorrupt":"会话文件无法读取。","error.sessionMismatch":"会话文件身份不匹配。","error.sessionMissing":"会话文件缺失,需检查运行记录后恢复。","error.sessionPath":"会话文件路径无效。","error.stopping":"服务正在停止。","error.thinkingFormat":"不支持此思考格式。","error.toolsMissing":"运行工具加载失败。","error.unsafeReplay":"不能自动重放已提交的运行。","error.discoveryUnreachable":"无法连接 {host},请检查 API URL。","color.gray":"灰","color.blue":"蓝","color.green":"绿","color.amber":"琥珀","color.rose":"粉","color.violet":"紫","avatar.working":"工作中","avatar.openInfo":"查看 {name} 的 Bot 信息"},UT={"settings.title":"设置","settings.sections":"设置分类","settings.general":"通用","settings.models":"模型","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 name","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 override","card.headers":"Headers","card.headerSaved":"已保存;留空保持","card.addHeader":"添加 Header","card.removeHeader":"移除 Header","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 列表读取失败"},qT={"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":"先选择模型,再发送消息","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":"每个附件必须在 1 字节到 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":"下载后用播放器打开。"},FT={"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":"回复线程"},VT={"usage.title":"用量","usage.back":"返回 Bot 信息","usage.range":"时间范围","usage.today":"今天","usage.days":"{count} 天","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":"Pi 上下文估算","bot.context":"上下文","bot.unknown":"未知","bot.tokens":"{used} / {window} tokens","bot.profile":"个人设定","bot.description":"描述","bot.descriptionPlaceholder":"这个 Bot 能帮你做什么?","bot.personaPlaceholder":"Bot 的性格、职责与行为偏好","bot.personaHint":"作为系统提示词的一部分,下一次执行时生效。","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.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":"跟随 Pi 默认","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":"工作区里可能有它做的文件(Bot 目录下的 workspace)。默认保留。","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}"},$T={"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}"},YT={"environment.title":"工作环境","environment.computer":"沙箱","environment.computerHint":"Jarvy 创建和管理的 Linux 容器,只有它自己用,工作区就在里面。推荐。","environment.noDocker":"需要运行 Jarvy 的电脑装有 Docker。","environment.host":"你的电脑","environment.hostHint":"运行 Jarvy 的这台电脑,能碰到你的文件。","environment.default":"默认环境","environment.defaultHint":"它平时在这里运行命令、读写文件。","environment.awayHost":"现在在你的电脑上,是它自己切过去的。","environment.awayComputer":"现在在它的沙箱里,是它自己切过去的。","environment.details":"沙箱详情","environment.sandboxAbout":"只有它自己用的 Linux 容器,工作区就是它在里面的主目录。","environment.external":"可以使用的外部环境","environment.hostAbout":"运行 Jarvy 的这台电脑","environment.externalHint":"打开后,任务需要时它可以自己切过去;关掉时如果它正在那里,会被送回沙箱。","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":"没能切换工作环境"},GT={...PT,...UT,...qT,...FT,...VT,...$T,...YT},M2=["en","zh"],R2={en:HT,zh:GT},Sc={en:"en",zh:"zh-CN"},O2="jarvy-locale";function XT(){var r;const e=localStorage.getItem(O2);if(e==="en"||e==="zh")return e;const i=((r=navigator.languages)!=null&&r.length?navigator.languages:[navigator.language]).map(l=>l.toLowerCase()).find(l=>/^(en|zh)\b/.test(l));return i!=null&&i.startsWith("zh")?"zh":"en"}let zr=XT();document.documentElement.lang=Sc[zr];const wp=new Set,qd=()=>zr;function _2(e){if(e!==zr){zr=e,localStorage.setItem(O2,e),document.documentElement.lang=Sc[e];for(const i of wp)i()}}function D2(){return S.useSyncExternalStore(e=>(wp.add(e),()=>{wp.delete(e)}),qd)}const Sp=(e,i)=>R2[e][i==="name"?"locale.name":"locale.short"];function z2(e,i){const r=R2[zr][e];return typeof r=="string"?r:new Intl.PluralRules(Sc[zr]).select(Number(i))==="one"?r.one:r.other}function j(e,i){const r=z2(e,i==null?void 0:i.count);return i?r.replace(/\{(\w+)\}/g,(l,s)=>s in i?String(i[s]):l):r}const qr=(e,i)=>new Date(e).toLocaleString(Sc[zr],i),cc=e=>qr(e,{hour:zr==="zh"?"2-digit":"numeric",minute:"2-digit"}),QT=e=>{const i=new Date(e).getFullYear()===new Date().getFullYear();return qr(e,{year:i?void 0:"numeric",month:zr==="zh"?"numeric":"short",day:"numeric"})},Lr=(e,i)=>new Intl.NumberFormat(Sc[zr],i).format(e);function L2(e,i){return z2(e,i.count).split(/\{(\w+)\}/).map((r,l)=>c.jsx(S.Fragment,{children:l%2?i[r]??`{${r}}`:r},l))}class ts extends Error{constructor(i,r,l,s){super(r),this.status=i,this.code=l,this.params=s}}async function Ae(e,i={}){let r;try{r=await fetch(`/api${e}`,{...i,credentials:"same-origin",headers:{...i.body&&!(i.body instanceof Blob)?{"Content-Type":"application/json"}:{},...i.headers}})}catch{throw new Error(j("api.offline"))}const l=await r.json().catch(()=>({}));if(!r.ok)throw I2(r.status,l);return l}const I2=(e,i)=>{const r=typeof i=="object"&&i!==null?i:{};return new ts(e,r.error===void 0?`HTTP ${e}`:String(r.error),typeof r.code=="string"?r.code:void 0,r.params)};function KT(e,i,r){return new Promise((l,s)=>{const u=new XMLHttpRequest;u.open("POST",`/api/chats/${e}/attachments`),u.setRequestHeader("Content-Type",i.type||"application/octet-stream"),u.setRequestHeader("X-File-Name",encodeURIComponent(i.name)),u.upload.onprogress=d=>{d.lengthComputable&&(r==null||r(d.loaded/d.total))},u.onerror=()=>s(new Error(j("api.offline"))),u.onload=()=>{let d={};try{d=JSON.parse(u.responseText)}catch{}u.status>=200&&u.status<300?l(d):s(I2(u.status,d))},u.send(i)})}async function ZT(e,i=0){const r=[];let l=i;for(;;){const s=await Ae(`/chats/${e}/messages?after=${l}&limit=1000`);if(r.push(...s.messages),!s.hasMore)return{messages:r};if(s.nextSequence<=l)throw new Error(j("api.historyFailed"));l=s.nextSequence}}const vt=e=>JSON.stringify(e),be={me:()=>Ae("/me"),search:(e,i)=>Ae(`/search?q=${encodeURIComponent(e)}${i?`&in=${i}`:""}&limit=60`),login:(e,i)=>Ae("/login",{method:"POST",body:vt({username:e,password:i})}),logout:()=>Ae("/logout",{method:"POST"}),bots:()=>Ae("/bots"),createBot:e=>Ae("/bots",{method:"POST",body:vt({name:e})}),saveBot:(e,i)=>Ae(`/bots/${e}`,{method:"PUT",body:vt(i)}),modelOptions:()=>Ae("/model-options"),selectBotModel:(e,i,r,l,s)=>Ae(`/bots/${e}/model`,{method:"PUT",body:vt({connectionId:i,modelId:r,thinkingLevel:l,language:s})}),answerQuestion:(e,i,r)=>Ae(`/chats/${e}/questions/${i}`,{method:"POST",body:vt(r)}),setBotColor:(e,i)=>Ae(`/bots/${e}/color`,{method:"PUT",body:vt({color:i})}),chats:()=>Ae("/chats"),createChat:e=>Ae("/chats",{method:"POST",body:vt({botId:e})}),deleteChat:e=>Ae(`/chats/${e}`,{method:"DELETE"}),members:()=>Ae("/members"),sections:()=>Ae("/sections"),createSection:e=>Ae("/sections",{method:"POST",body:vt(e)}),updateSection:(e,i)=>Ae(`/sections/${e}`,{method:"PATCH",body:vt(i)}),deleteSection:e=>Ae(`/sections/${e}`,{method:"DELETE"}),createChannel:e=>Ae("/channels",{method:"POST",body:vt(e)}),updateChannel:(e,i)=>Ae(`/chats/${e}`,{method:"PATCH",body:vt(i)}),addMember:(e,i)=>Ae(`/chats/${e}/members`,{method:"POST",body:vt({memberId:i})}),removeMember:(e,i)=>Ae(`/chats/${e}/members/${i}`,{method:"DELETE"}),setNote:(e,i)=>Ae(`/chats/${e}/note`,{method:"PUT",body:vt({text:i})}),markRead:(e,i)=>Ae(`/chats/${e}/read`,{method:"POST",body:vt({sequence:i})}),messages:ZT,latestMessages:(e,i)=>Ae(`/chats/${e}/messages?tail=${i}`),olderMessages:(e,i,r)=>Ae(`/chats/${e}/messages?before=${i}&limit=${r}`),send:(e,i,r,l,s=!1,u,d=[])=>Ae(`/chats/${e}/messages`,{method:"POST",body:vt({content:i,attachmentIds:r,clientMessageId:l,...s?{alsoToChannel:s}:{},...u?{replyTo:u}:{},...d.length?{quotes:d}:{}})}),react:(e,i,r)=>Ae(`/messages/${e}/reaction`,{method:"PUT",body:vt({emoji:i,on:r})}),pin:(e,i)=>Ae(`/chats/${e}/pin`,{method:"PUT",body:vt({pinned:i})}),mute:(e,i)=>Ae(`/chats/${e}/mute`,{method:"PUT",body:vt({muted:i})}),deleteBot:(e,i)=>Ae(`/bots/${e}${i?"?files=delete":""}`,{method:"DELETE"}),chat:e=>Ae(`/chats/${e}`),message:e=>Ae(`/messages/${e}`),openThread:e=>Ae(`/messages/${e}/thread`,{method:"POST"}),channelThreads:e=>Ae(`/chats/${e}/threads`),followedThreads:()=>Ae("/threads"),updateThread:(e,i)=>Ae(`/chats/${e}`,{method:"PATCH",body:vt(i)}),follow:(e,i)=>Ae(`/chats/${e}/follow`,{method:"PUT",body:vt({following:i})}),botDirects:e=>Ae(`/members/${e}/dms`),botSubscriptions:e=>Ae(`/members/${e}/subscriptions`),controlBot:(e,i)=>Ae(`/bots/${e}/${i}`,{method:"POST"}),setBotEnvironment:(e,i)=>Ae(`/bots/${e}/environment`,{method:"PUT",body:vt({home:i})}),grantHost:(e,i)=>Ae(`/bots/${e}/environment`,{method:"PUT",body:vt({hostGranted:i})}),computer:(e,i)=>Ae(`/bots/${e}/computer/${i}`,{method:"POST"}),botStatus:e=>Ae(`/bots/${e}/status`),uploadAttachment:KT,removeAttachment:e=>Ae(`/attachments/${e}`,{method:"DELETE"}),authStatus:e=>Ae(`/model-connections/${e}/auth`),authStart:e=>Ae(`/model-connections/${e}/auth`,{method:"POST"}),authCancel:e=>Ae(`/model-connections/${e}/auth`,{method:"DELETE"}),authInput:(e,i,r)=>Ae(`/model-connections/${e}/auth/input`,{method:"POST",body:vt({promptId:i,value:r})}),authLogout:e=>Ae(`/model-connections/${e}/auth/logout`,{method:"POST"}),modelCatalog:e=>Ae(`/model-connections/${e}/catalog`),providerModels:e=>Ae(`/model-providers/${encodeURIComponent(e)}/models`),modelProviders:()=>Ae("/model-providers"),autoconfigModel:e=>Ae("/model-autoconfig",{method:"POST",body:vt(e)}),discoverModels:e=>Ae("/model-discovery",{method:"POST",body:vt(e)}),modelConnections:()=>Ae("/model-connections"),createModelConnection:e=>Ae("/model-connections",{method:"POST",body:vt(e)}),updateModelConnection:(e,i)=>Ae(`/model-connections/${e}`,{method:"PUT",body:vt(i)}),deleteModelConnection:e=>Ae(`/model-connections/${e}`,{method:"DELETE"}),saveModelCredential:(e,i,r=!1)=>Ae(`/model-connections/${e}/credential`,{method:"PUT",body:vt({apiKey:i,remove:r})}),saveConnectionModel:(e,i,r)=>Ae(`/model-connections/${e}/models`,{method:r?"PUT":"POST",body:vt({model:i,originalId:r})}),deleteConnectionModel:(e,i)=>Ae(`/model-connections/${e}/models`,{method:"DELETE",body:vt({modelId:i})})};/**
|
|
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 JT=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 WT(e,i,r=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:JT(e),size:24,node:i,...r.length>0?{aliases:r}:{}}}/**
|
|
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 eA=e=>{let i="",r=!1;for(const l of e){if(l==="-"||l==="_"||l<=" "){r=i.length>0;continue}i.length===0?i+=l.toLowerCase():i+=r?l.toUpperCase():l,r=!1}return i};/**
|
|
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 tA=e=>{const i=eA(e);return i.charAt(0).toUpperCase()+i.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 kp=(...e)=>e.filter((i,r,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===r).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 zl={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 Dm(e){return e!=null}function nA(e,i={}){var x,b;const r=i.attributeNames??{},l=w=>r[w]??w,s=e.size??e.width??zl.width,u=e.size??e.height??zl.height,d=((x=e.aliases)==null?void 0:x.filter(w=>typeof w=="string"&&w.trim()!=="").map(w=>`lucide-${w}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...d],m=((b=i.className)==null?void 0:b.split(" ").filter(Boolean))??[],v=i.includeDefaultClasses===!1?kp(...m):kp("lucide",...f,...m),y=i.absoluteStrokeWidth?Number(i.strokeWidth??zl["stroke-width"])*Number(e.size??e.width??zl.width)/Number(i.size??i.width??zl.width):i.strokeWidth??zl["stroke-width"];return["svg",{...Object.entries(zl).reduce((w,[k,C])=>(w[l(k)]=C,w),{}),..."color"in i&&i.color&&{[l("stroke")]:i.color},..."size"in i&&Dm(i.size)&&{[l("width")]:i.size,[l("height")]:i.size},..."width"in i&&Dm(i.width)&&{[l("width")]:i.width},..."height"in i&&Dm(i.height)&&{[l("height")]:i.height},[l("stroke-width")]:y,...v&&{[l("class")]:v},[l("viewBox")]:`0 0 ${s} ${u}`,...i.hasA11yProp===!1?{[l("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},e.node.map(w=>{const[k,C,E]=w,M=i.nonScalingStroke?{[l("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 iA(e,i={}){return nA(e,{...i,attributeNames:{...i.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 rA=e=>{for(const i in e)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},aA=S.createContext({}),lA=()=>S.useContext(aA),oA=S.forwardRef(({color:e,size:i,width:r,height:l,strokeWidth:s,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:m,iconNode:v=[],icon:y={node:v,aliases:[],size:24},...g},x)=>{const{size:b=24,strokeWidth:w=2,absoluteStrokeWidth:k=!1,nonScalingStroke:C=!1,color:E="currentColor",className:M=""}=lA()??{},T=!!m||rA(g),[A,I,R=[]]=iA(y,{color:e??E,width:r??i??b,height:l??i??b,strokeWidth:s??w,absoluteStrokeWidth:u??k,nonScalingStroke:d??C,className:kp(M,f),hasA11yProp:T,attributes:g});return S.createElement(A,{ref:x,...I},[...R.map(([B,U])=>S.createElement(B,U)),...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 Me(e,i=[],r=[]){const l=typeof e=="string"?WT(e,i,r):e,s=S.forwardRef(({className:u,...d},f)=>S.createElement(oA,{ref:f,icon:l,className:u,...d}));return l.name&&(s.displayName=tA(l.name)),s}/**
|
|
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 B2={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"}]]};B2.node;const sA=Me(B2);/**
|
|
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 H2={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"}]]};H2.node;const cA=Me(H2);/**
|
|
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 P2={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"}]]};P2.node;const uA=Me(P2);/**
|
|
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 U2={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};U2.node;const Fd=Me(U2);/**
|
|
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 q2={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};q2.node;const Cp=Me(q2);/**
|
|
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 F2={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};F2.node;const dA=Me(F2);/**
|
|
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 V2={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"}]]};V2.node;const fA=Me(V2);/**
|
|
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 $2={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"}]]};$2.node;const hA=Me($2);/**
|
|
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 Y2={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"}]]};Y2.node;const mA=Me(Y2);/**
|
|
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 G2={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"]};G2.node;const pA=Me(G2);/**
|
|
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 X2={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};X2.node;const Ir=Me(X2);/**
|
|
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 Q2={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Q2.node;const Yl=Me(Q2);/**
|
|
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 K2={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};K2.node;const Z2=Me(K2);/**
|
|
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 J2={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};J2.node;const Ka=Me(J2);/**
|
|
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 W2={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"]};W2.node;const gA=Me(W2);/**
|
|
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 ej={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"}]]};ej.node;const tj=Me(ej);/**
|
|
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 nj={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"}]]};nj.node;const vA=Me(nj);/**
|
|
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 ij={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"}]]};ij.node;const rj=Me(ij);/**
|
|
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 aj={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"]};aj.node;const wb=Me(aj);/**
|
|
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 lj={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"}]]};lj.node;const yA=Me(lj);/**
|
|
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 oj={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"}]]};oj.node;const xA=Me(oj);/**
|
|
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 sj={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"}]]};sj.node;const bA=Me(sj);/**
|
|
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 cj={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"}]]};cj.node;const jA=Me(cj);/**
|
|
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 uj={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"]};uj.node;const wA=Me(uj);/**
|
|
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 dj={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"]};dj.node;const SA=Me(dj);/**
|
|
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 fj={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"]};fj.node;const kA=Me(fj);/**
|
|
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 hj={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"}]]};hj.node;const CA=Me(hj);/**
|
|
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 mj={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"}]]};mj.node;const NA=Me(mj);/**
|
|
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 pj={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"}]]};pj.node;const EA=Me(pj);/**
|
|
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 gj={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"}]]};gj.node;const TA=Me(gj);/**
|
|
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 vj={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"}]]};vj.node;const AA=Me(vj);/**
|
|
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 yj={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"}]]};yj.node;const dg=Me(yj);/**
|
|
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 xj={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"}]]};xj.node;const MA=Me(xj);/**
|
|
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 bj={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};bj.node;const jj=Me(bj);/**
|
|
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 wj={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"}]]};wj.node;const RA=Me(wj);/**
|
|
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 Sj={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"}]]};Sj.node;const OA=Me(Sj);/**
|
|
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 kj={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"]};kj.node;const _A=Me(kj);/**
|
|
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 Cj={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"}]]};Cj.node;const DA=Me(Cj);/**
|
|
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 Nj={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"}]]};Nj.node;const zA=Me(Nj);/**
|
|
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 Ej={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"}]]};Ej.node;const LA=Me(Ej);/**
|
|
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 Tj={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"}]]};Tj.node;const Aj=Me(Tj);/**
|
|
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 Mj={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"}]]};Mj.node;const IA=Me(Mj);/**
|
|
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 Rj={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};Rj.node;const BA=Me(Rj);/**
|
|
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 Oj={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"}]]};Oj.node;const HA=Me(Oj);/**
|
|
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 _j={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"]};_j.node;const PA=Me(_j);/**
|
|
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 Dj={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"}]]};Dj.node;const fg=Me(Dj);/**
|
|
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 zj={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"}]]};zj.node;const UA=Me(zj);/**
|
|
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 Lj={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"}]]};Lj.node;const qA=Me(Lj);/**
|
|
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 Ij={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"}]]};Ij.node;const Np=Me(Ij);/**
|
|
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 Bj={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};Bj.node;const Vd=Me(Bj);/**
|
|
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 Hj={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"}]]};Hj.node;const FA=Me(Hj);/**
|
|
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 Pj={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"}]]};Pj.node;const hg=Me(Pj);/**
|
|
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 Uj={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"}]]};Uj.node;const VA=Me(Uj);/**
|
|
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 qj={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"]};qj.node;const $A=Me(qj);/**
|
|
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 Fj={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"}]]};Fj.node;const YA=Me(Fj);/**
|
|
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 Vj={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Vj.node;const kc=Me(Vj);/**
|
|
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 $j={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"}]]};$j.node;const GA=Me($j);/**
|
|
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 Yj={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"}]]};Yj.node;const XA=Me(Yj);/**
|
|
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 Gj={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"}]]};Gj.node;const QA=Me(Gj);/**
|
|
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 Xj={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"}]]};Xj.node;const KA=Me(Xj);/**
|
|
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 Qj={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"]};Qj.node;const Kj=Me(Qj);/**
|
|
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 Zj={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"}]]};Zj.node;const ZA=Me(Zj);/**
|
|
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 Jj={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"]};Jj.node;const JA=Me(Jj);/**
|
|
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 Wj={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"}]]};Wj.node;const WA=Me(Wj);/**
|
|
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 ew={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"]};ew.node;const Ed=Me(ew);/**
|
|
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 tw={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"}]]};tw.node;const e4=Me(tw);/**
|
|
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 nw={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"}]]};nw.node;const t4=Me(nw);/**
|
|
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 iw={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"}]]};iw.node;const n4=Me(iw);/**
|
|
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 rw={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};rw.node;const Cc=Me(rw),aw={list:(e,i)=>Ae(`/bots/${e}/activity${i===void 0?"":`?before=${encodeURIComponent(i)}`}`),message:(e,i)=>Ae(`/bots/${e}/activity/messages/${i}`)};function lw(e){var i,r,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(i=0;i<s;i++)e[i]&&(r=lw(e[i]))&&(l&&(l+=" "),l+=r)}else for(r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function i4(){for(var e,i,r=0,l="",s=arguments.length;r<s;r++)(e=arguments[r])&&(i=lw(e))&&(l&&(l+=" "),l+=i);return l}const Sb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kb=i4,mg=(e,i)=>r=>{var l;if((i==null?void 0:i.variants)==null)return kb(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:u}=i,d=Object.keys(s).map(v=>{const y=r==null?void 0:r[v],g=u==null?void 0:u[v];if(y===null)return null;const x=Sb(y)||Sb(g);return s[v][x]}),f=r&&Object.entries(r).reduce((v,y)=>{let[g,x]=y;return x===void 0||(v[g]=x),v},{}),m=i==null||(l=i.compoundVariants)===null||l===void 0?void 0:l.reduce((v,y)=>{let{class:g,className:x,...b}=y;return Object.entries(b).every(w=>{let[k,C]=w;return Array.isArray(C)?C.includes({...u,...f}[k]):{...u,...f}[k]===C})?[...v,g,x]:v},[]);return kb(e,d,m,r==null?void 0:r.class,r==null?void 0:r.className)},ow=48,Fr=(e,i=0)=>{const r=new Int32Array(e.length);for(let l=0;l<e.length;l++)r[l]=e.charCodeAt(l)-ow-i;return r},$d=e=>{const i=new Int32Array(e.length+1);for(let r=0;r<e.length;r++)i[r+1]=i[r]+e[r];return i},Ja=e=>{const i=new Int32Array(e.length);let r=0;for(let l=0;l<e.length;l++){const s=e.charCodeAt(l)-ow;r+=s>>>1^-(s&1),i[l]=r}return i},r4=384,a4=[],Pl=$d(Fr("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010")),l4=$d(Fr(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3")),o4="@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",s4=(()=>{const e=Pl.length-1,i=new Int32Array(e);for(let s=e-1;s>=0;s--){let u=1,d=s+1;for(let f=Pl[s];f<Pl[s+1];f++)u+=i[d],d+=i[d];i[s]=u}const r=new Int32Array(Pl[e]);let l=0;for(let s=0;s<e;s++){let u=s+1;for(let d=Pl[s];d<Pl[s+1];d++)r[l++]=u,u+=i[u]}return r})(),c4=Fr("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000",1),u4=$d(Fr("123333359346463635126536711576")),d4=Fr("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032"),f4=Fr("012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199"),h4=Ja("020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200"),m4=(()=>{const e=new Int32Array(319).fill(-1),i=Ja("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222"),r=Ja("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");for(let l=0;l<i.length;l++)e[i[l]]=r[l];return e})(),p4="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 i=e.split(" "),r=i.shift();for(let l=0;l<i.length;l++)i[l]=r+i[l];return i}),Cb=Ja("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422"),g4=Ja("ɠ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"),v4=Ja("02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±"),sw=new Int32Array(995),cw=new Int32Array(995),uw=new Int32Array(995);let Ep="";const Tp=new Int32Array(1038);{const e=new Map;let i=0,r=0;for(let l=0;l<Cb.length;l++)for(const s of p4[v4[l]]){let u=e.get(s);u===void 0&&(u=i++,e.set(s,u),Tp[u*2]=Ep.length,Tp[u*2+1]=s.length,Ep+=s),sw[r]=Cb[l],cw[r]=g4[l],uw[r]=u,r++}}const y4=Ja("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p"),x4=$d(Fr("1::24444432:442:44:44>222222:44:4421322511111311111114")),b4=Ja("24A;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"),j4=Fr("ij"),w4=Fr(""),S4=Fr("1"),k4="* ** after backdrop before details-content file first-letter first-line marker placeholder selection";var C4={GROUP_COUNT:r4,customValidatorNames:a4,edgeStart:Pl,labelStart:l4,labelText:o4,edgeTarget:s4,nodeGroup:c4,nodeVlist:m4,vlistPat:u4,vlistOps:d4,vlistRef:f4,vlistGroup:h4,litAnchor:sw,litGroup:cw,litPool:uw,poolOffsets:Tp,poolText:Ep,adjGid:y4,adjStart:x4,adjTgt:b4,patGid:j4,patTgt:w4,postfixLookupGroups:S4,orderSensitiveModifiers:k4};const N4="line"in new Error,Tr=-1,Ll=-1,zm=(e,i,r)=>{let l=2166136261;for(let s=i;s<r;s++)l=Math.imul(l^e.charCodeAt(s),16777619);return l},xd=(e,i,r)=>{const l=r-i;let s=Math.imul(l,2654435761)^e.charCodeAt(i);if(l>3){const u=l>>2,d=l>>1;s=Math.imul(s^e.charCodeAt(i+1)<<8^e.charCodeAt(i+2)<<16^e.charCodeAt(i+u),2246822507),s=Math.imul(s^e.charCodeAt(i+d)<<8^e.charCodeAt(i+d+u)<<16^e.charCodeAt(r-3),3266489909),s^=e.charCodeAt(r-2)<<8^e.charCodeAt(r-1)<<16;for(let f=i+3,m=r-4;f<i+8&&f<m;f++,m--)s=Math.imul(s^e.charCodeAt(f)^e.charCodeAt(m)<<8,16777619)}return s^s>>>15|0},E4=(e,i,r={})=>{const{GROUP_COUNT:l,edgeStart:s,labelStart:u,labelText:d,edgeTarget:f,nodeGroup:m,nodeVlist:v,vlistPat:y,vlistOps:g,vlistRef:x,vlistGroup:b,litAnchor:w,litGroup:k,litPool:C,poolOffsets:E,poolText:M,adjGid:T,adjStart:A,adjTgt:I,patGid:R,patTgt:B,postfixLookupGroups:U,customValidatorNames:$,orderSensitiveModifiers:z}=e,Y=new Int32Array(l).fill(-1);for(let ue=0;ue<T.length;ue++)Y[T[ue]]=ue;let q=0;for(let ue=0;ue+1<A.length;ue++){const L=A[ue+1]-A[ue];L>q&&(q=L)}let ee=32;for(;ee<2*(1+q+R.length);)ee<<=1;const G=new Int32Array(x.length+1);for(let ue=0;ue<x.length;ue++)G[ue+1]=G[ue]+y[x[ue]+1]-y[x[ue]];const H=new Uint8Array(l);for(let ue=0;ue<U.length;ue++)H[U[ue]]=1;const Q=s.length-1,O=new Uint8Array(Q);let F=0,ne=!0;for(let ue=0;ue<w.length;ue++){O[w[ue]]=1;const L=E[C[ue]*2+1];L>F&&(F=L);const K=M.charCodeAt(E[C[ue]*2]);(K===91||K===40)&&(ne=!1)}let D=1;for(;D<w.length*2;)D<<=1;const J=new Int32Array(D).fill(-1);for(let ue=0;ue<w.length;ue++){const L=E[C[ue]*2];let K=(zm(M,L,L+E[C[ue]*2+1])^Math.imul(w[ue],2654435761)|0)&D-1;for(;J[K]!==-1;)K=K+1&D-1;J[K]=ue}const W=(ue,L,K,he)=>{let Ee=(zm(L,K,he)^Math.imul(ue,2654435761)|0)&D-1;const Se=he-K;for(;;){const Te=J[Ee];if(Te===-1)return-1;if(w[Te]===ue&&E[C[Te]*2+1]===Se){const Le=E[C[Te]*2];let Qe=!0;for(let Re=0;Re<Se;Re++)if(M.charCodeAt(Le+Re)!==L.charCodeAt(K+Re)){Qe=!1;break}if(Qe)return k[Te]}Ee=Ee+1&D-1}},P=r.cacheSize??8192,V=r.prefix??e.prefix??"",fe=V===""?"":V+":",ye=fe.length,je=($??[]).map(ue=>{throw new Error("cn: missing validator "+ue)}),ae=/\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$/,xe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;let me=0,Ne=-1,ze=-1,Ve=-1,ht=-1;const ot=ue=>ue>=97&&ue<=122||ue>=65&&ue<=90||ue>=48&&ue<=57||ue===95,Je=ue=>/\s/.test(String.fromCharCode(ue)),At=(ue,L,K)=>{if(me=0,Ne=-1,K-L<3)return;const he=ue.charCodeAt(L),Ee=ue.charCodeAt(K-1);if(he===91&&Ee===93)me=1;else if(he===40&&Ee===41)me=2;else return;Ve=L+1,ht=K-1;let Se=L+1;if(ot(ue.charCodeAt(Se))){for(Se++;Se<K-1;){const Te=ue.charCodeAt(Se);if(!ot(Te)&&Te!==45)break;Se++}Se<K-2&&ue.charCodeAt(Se)===58&&(Ne=L+1,ze=Se,Ve=Se+1)}},gn=(ue,L,K,he)=>{if(K-L!==he.length)return!1;for(let Ee=0;Ee<he.length;Ee++)if(ue.charCodeAt(L+Ee)!==he.charCodeAt(Ee))return!1;return!0},vn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,di=ue=>!!ue&&!Number.isNaN(Number(ue)),rn=(ue,L,K)=>{if(K-L<11||!gn(ue,L,L+10,"@container"))return!1;if(ue.charCodeAt(L+10)===47)return K-L>=12;const he=ue.charCodeAt(L+11);return he===115&&K-L>=17&&gn(ue,L+10,L+16,"-size/")||he===110&&K-L>=19&&gn(ue,L+10,L+18,"-normal/")},Yi=[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(ue=>ue.split(" ")),ke=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Be=(ue,L,K,he)=>{if(ue>=10){if(ue>=25)return je[ue-25](L.slice(K,he));const Ee=ue-10;if(me!==Yi[Ee])return!1;if(Ne>=0){for(const Se of pe[Ee])if(gn(L,Ne,ze,Se))return!0;return!1}switch(ke[Ee]){case 0:return!1;case 1:return!0;case 2:{const Se=L.slice(Ve,ht);return ae.test(Se)&&!xe.test(Se)}case 3:return di(L.slice(Ve,ht));case 4:return ce.test(L.slice(Ve,ht));default:return oe.test(L.slice(Ve,ht))}}switch(ue){case 0:return!0;case 1:return me===0;case 2:return me===1;case 3:return me===2;case 4:return vn.test(L.slice(K,he));case 5:return di(L.slice(K,he));case 6:{const Ee=L.slice(K,he);return!!Ee&&Number.isInteger(Number(Ee))}case 7:return he>K&&L.charCodeAt(he-1)===37&&di(L.slice(K,he-1));case 8:return Pn.test(L.slice(K,he));default:return rn(L,K,he)}},Ue=new Set(typeof z=="string"?z.split(" "):z),We=(ue,L,K,he,Ee,Se)=>{const Te=zm(L,K,he)^(Ee?2654435769:0)|0;let Le=ue.get(Te);if(Le!==void 0)e:for(let $e=0;$e<Le.length;$e++){const st=Le[$e];if(!(st.imp!==Ee||st.k.length!==he-K)){for(let He=0;He<st.k.length;He++)if(st.k.charCodeAt(He)!==L.charCodeAt(K+He))continue e;return st.id}}else ue.set(Te,Le=[]);const Qe=L.slice(K,he),Re=Se(Qe);return Le.push({k:Qe,imp:Ee,id:Re}),Re};let Pt=new Map,yn=new Map,Ut=2;const Rn=4096,Un=(ue,L)=>{const K=[];let he=0,Ee=0,Se=0;for(let Re=0;Re<ue.length;Re++){const $e=ue.charCodeAt(Re);he===0&&Ee===0&&$e===58?(K.push(ue.slice(Se,Re)),Se=Re+1):$e===91?he++:$e===93?he--:$e===40?Ee++:$e===41&&Ee--}K.push(ue.slice(Se));let Te=K[0];if(K.length>1){const Re=[];let $e=[];for(const st of K)st.charCodeAt(0)===91||Ue.has(st)?($e.length&&(Re.push(...$e.sort()),$e=[]),Re.push(st)):$e.push(st);$e.length&&Re.push(...$e.sort()),Te=Re.join(":")}const Le=L?Te+" !":Te;let Qe=yn.get(Le);return Qe===void 0&&yn.set(Le,Qe=Ut++),Qe};let _t=new Map,On=l;const Xe=l+4096,Gt=()=>On++,ll=2097152,sr=8192,cr=new Int32Array(sr),xn=new Array(sr).fill(null),fi=new Int32Array(sr),ol=new Int32Array(sr),hi=new Uint8Array(sr);let ao=0;const Gi=(ue,L,K,he,Ee,Se,Te,Le)=>{let Qe=ue;if(xn[ue]!==null)if(xn[ue|1]===null)Qe=ue|1;else if((ao++&3)===0)Qe=ue|ao>>2&1;else return;xn[Qe]=L.slice(K,he),cr[Qe]=Ee,fi[Qe]=Se,ol[Qe]=Te,hi[Qe]=Le},sn=()=>xn.fill(null);let Lt=256,Vt=[new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt),new Int32Array(Lt)],[ur,dr,Xi,Qi]=Vt,Ri=new Uint8Array(Lt),Kn=new Uint8Array(Lt);const Ki=()=>{Lt*=2,Vt=Vt.map(L=>{const K=new Int32Array(Lt);return K.set(L),K}),[ur,dr,Xi,Qi]=Vt;const ue=new Uint8Array(Lt);ue.set(Ri),Ri=ue,Kn=new Uint8Array(Lt)};let mi=64,pi=new Int32Array(mi),fr=new Int32Array(mi);const sl=new Int32Array(l);let gi=2048,ya=21,Zn=new Float64Array(gi),hr=new Int32Array(gi),Jn=0;const an=(ue,L)=>{if(ue===0&&L<l)return sl[L]===Jn?1:(sl[L]=Jn,0);const K=ue*2097152+L+1;let he=Math.imul(K,2654435761)>>>ya;for(;hr[he]===Jn;){if(Zn[he]===K)return 1;he=he+1&gi-1}return Zn[he]=K,hr[he]=Jn,0},cn=(ue,L,K,he,Ee)=>{if(K-L>=2&&ue.charCodeAt(L)===91&&ue.charCodeAt(K-1)===93){let Se=-1;for(let Te=L+1;Te<K-1;Te++)if(ue.charCodeAt(Te)===58){Se=Te;break}return Se===-1||Se===L+1?Tr:We(_t,ue,L+1,Se,0,Gt)}if(he>=0&&m[he]>=0)return m[he];for(let Se=Ee-1;Se>=0;Se--){const Te=fr[Se];if(Te>K)continue;const Le=pi[Se],Qe=K-Te;if(O[Le]===1&&Qe>0&&Qe<=F){const Bt=ue.charCodeAt(Te);if(ne===!1||Bt!==91&&Bt!==40){const vi=W(Le,ue,Te,K);if(vi>=0)return vi}}const Re=v[Le];if(Re<0)continue;const $e=x[Re],st=y[$e],He=y[$e+1];if(st===He)continue;At(ue,Te,K);const ln=G[Re]-st;for(let Bt=st;Bt<He;Bt++)if(Be(g[Bt],ue,Te,K))return b[ln+Bt]}return Tr},mr=ue=>{const L=ue.length;let K=0,he=0,Ee=!1;(Ut>Rn||Pt.size>Rn)&&(Pt=new Map,yn=new Map,Ut=2,sn()),On>Xe&&(_t=new Map,On=l,sn());let Se=0;for(;Se<L;){let Re=ue.charCodeAt(Se);if(Re===32||Re>=9&&Re<=13||Re>=160&&Je(Re)){Re!==32&&(Ee=!0),Se++;continue}const $e=Se;let st=0;for(;Se<L;){if(Re=ue.charCodeAt(Se),Re<=32){if(Re===32)break;if(Re>=9&&Re<=13){Ee=!0;break}}else if(Re>=160&&Je(Re)){Ee=!0;break}st=Math.imul(st^Re,16777619),Se++}const He=Se,ln=He-$e;K===Lt&&Ki();const Bt=K++;ur[Bt]=$e,dr[Bt]=He,he+=ln,st^=Math.imul(ln,2654435761);const vi=st^st>>>15|0,Xt=vi&8190;{let ut=-1;if(cr[Xt]===vi&&xn[Xt]!==null&&xn[Xt].length===ln?ut=Xt:cr[Xt|1]===vi&&xn[Xt|1]!==null&&xn[Xt|1].length===ln&&(ut=Xt|1),ut>=0){const un=xn[ut];let Oi=!0;for(let bi=0;bi<ln;bi++)if(un.charCodeAt(bi)!==ue.charCodeAt($e+bi)){Oi=!1;break}if(Oi){Xi[Bt]=fi[ut],Qi[Bt]=ol[ut],Ri[Bt]=hi[ut];continue}}}let Qt=$e;if(ye!==0){if(He-$e<=ye||!ue.startsWith(fe,$e)){Xi[Bt]=Tr,Gi(Xt,ue,$e,He,vi,Tr,0,0);continue}Qt=$e+ye}let lo=0,ds=0,Xr=-1,oo=-1;for(let ut=Qt;ut<He;ut++){const un=ue.charCodeAt(ut);if(lo===0&&ds===0){if(un===58){Xr=ut;continue}if(un===47){oo=ut;continue}}un===91?lo++:un===93?lo--:un===40?ds++:un===41&&ds--}const Ic=Xr>=Qt?Xr+1:Qt;let Rt=Ic,Dn=He,ja=!1,so=0;Dn>Rt&&ue.charCodeAt(Dn-1)===33?(ja=!0,Dn--):Dn>Rt&&ue.charCodeAt(Rt)===33&&(ja=!0,Rt++,so=1);let ni=-1;oo>Ic&&(ni=oo+so,ni>=Dn&&(ni=-1));let co=Rt;Dn-Rt>1&&ue.charCodeAt(Rt)===45&&(co=Rt+1);let yi=0,qn=0,wa=0,fs=-1,xi=0;(v[0]>=0||O[0]===1)&&(pi[0]=0,fr[0]=co,xi=1);let ul=Ll,hs=0;for(let ut=co;ut<Dn;ut++)if(ut===ni&&(ul=qn<wa?Ll:yi,hs=xi),yi!==Ll){const un=ue.charCodeAt(ut);let Oi=-1;if(qn<wa)d.charCodeAt(qn)===un?(qn++,qn===wa&&(Oi=yi=fs)):yi=Ll;else{const bi=s[yi],hl=s[yi+1];let Qr=Ll;for(let wn=bi;wn<hl;wn++){const ml=u[wn];if(d.charCodeAt(ml)===un){u[wn+1]-ml===1?Oi=Qr=f[wn]:(qn=ml+1,wa=u[wn+1],fs=f[wn],Qr=yi);break}}yi=Qr}if(Oi>=0&&(v[Oi]>=0||O[Oi]===1)&&ut+1<Dn&&ue.charCodeAt(ut+1)===45){if(xi===mi){mi*=2;const bi=new Int32Array(mi);bi.set(pi),pi=bi;const hl=new Int32Array(mi);hl.set(fr),fr=hl}pi[xi]=Oi,fr[xi]=ut+2,xi++}}ni===Dn&&(ul=qn<wa?Ll:yi,hs=xi);const ms=qn<wa?Ll:yi;let jn,Fn=!1;if(ni>=0)if(Fn=!0,jn=cn(ue,Rt,ni,ul,hs),jn!==Tr&&jn<l&&H[jn]){const ut=cn(ue,Rt,Dn,ms,xi);ut!==Tr&&ut!==jn&&(jn=ut,Fn=!1)}else jn===Tr&&(jn=cn(ue,Rt,Dn,ms,xi),Fn=!1);else jn=cn(ue,Rt,Dn,ms,xi);let dl=0,fl=0;jn===Tr?Xi[Bt]=Tr:(fl=Fn?1:0,dl=Qt>=Xr?ja?1:0:We(Pt,ue,Qt,Xr,ja?1:0,ut=>Un(ut,ja)),Xi[Bt]=jn,Ri[Bt]=fl,Qi[Bt]=dl),Gi(Xt,ue,$e,He,vi,jn,dl,fl)}if(K===0)return"";if(K===1)return ur[0]===0&&dr[0]===L?ue:ue.slice(ur[0],dr[0]);if(K*ee>gi){for(;K*ee>gi;)gi<<=1,ya--;Zn=new Float64Array(gi),hr=new Int32Array(gi)}if(Ut>=ll||On>=ll)throw new Error("cn: too many distinct classes in one merge");Jn=Jn+1|0,Jn===0&&(sl.fill(0),hr.fill(0),Jn=1);let Te=!1;for(let Re=K-1;Re>=0;Re--){const $e=Xi[Re];if($e===Tr){Kn[Re]=1;continue}const st=Qi[Re];if(an(st,$e)===1){Kn[Re]=0,Te=!0;continue}if(Kn[Re]=1,$e<l){const He=Y[$e];if(He>=0)for(let ln=A[He];ln<A[He+1];ln++)an(st,I[ln]);if(Ri[Re]&1)for(let ln=0;ln<R.length;ln++)R[ln]===$e&&an(st,B[ln])}}if(!Te&&!Ee&&L===he+K-1)return ue;let Le="",Qe=0;for(;Qe<K;){if(!Kn[Qe]){Qe++;continue}const Re=ur[Qe];let $e=dr[Qe],st=Qe+1;for(;st<K&&Kn[st]&&ur[st]===$e+1&&ue.charCodeAt($e)===32;)$e=dr[st],st++;Le.length>0&&(Le+=" "),Le+=ue.slice(Re,$e),Qe=st}return Le},Wn=16384,ei=new Int32Array(Wn*2);let _n=0,It=1,Mt=Object.create(null),$t=Object.create(null),bn=new Map,cl=new Map,xa=0,ba=0;const pr=()=>{_n^=Wn,It=It+1|0,ba=0},gr=ue=>{let L=Mt[ue];if(L!==void 0)return L;const K=xd(ue,0,ue.length),he=(K&16383)+_n,Ee=ei[he]===(K^It)||ei[he^Wn]===(K^It-1);return Ee&&(L=$t[ue],L!==void 0)?(Mt[ue]=L,L):(L=mr(ue),Ee?(Mt[ue]=L,++xa>P&&(xa=0,$t=Mt,Mt=Object.create(null),pr())):(ei[he]=K^It,++ba>Wn&&pr()),L)},Yr=ue=>{let L=bn.get(ue);if(L!==void 0)return L;const K=xd(ue,0,ue.length),he=(K&16383)+_n,Ee=ei[he]===(K^It)||ei[he^Wn]===(K^It-1);return Ee&&(L=cl.get(ue),L!==void 0)?(bn.set(ue,L),L):(L=mr(ue),Ee?(bn.set(ue,L),++xa>P&&(xa=0,cl=bn,bn=new Map,pr())):(ei[he]=K^It,++ba>Wn&&pr()),L)},Gr=ue=>{const L=xd(ue,0,ue.length),K=(L&16383)+_n;return ei[K]===(L^It)||ei[K^Wn]===(L^It-1)?!0:(ei[K]=L^It,++ba>Wn&&pr(),!1)},ti=P===0?mr:N4?ue=>{const L=bn.get(ue);return L!==void 0?L:Yr(ue)}:gr;return{merge:function(){return arguments.length===1&&typeof arguments[0]=="string"?ti(arguments[0]):ti(A4.apply(null,arguments))},mergeString:ti,seenBefore:P===0?()=>!1:Gr,mergeUncached:mr}},Td=(e,i)=>{if(!e)return"";if(typeof e=="string")return e;let r="";if(typeof e.length=="number"&&(!i||Array.isArray(e))){const l=e;for(let s=0;s<l.length;s++){const u=l[s];if(!u)continue;const d=typeof u=="string"?u:Td(u,i);d&&(r&&(r+=" "),r+=d)}return r}if(i){if(typeof e=="number")return""+e;if(typeof e=="object")for(const l in e)e[l]&&(r&&(r+=" "),r+=l)}return r},T4=(e,i)=>{let r="";for(let l=0;l<e.length;l++){const s=e[l];if(!s)continue;const u=typeof s=="string"?s:Td(s,i);u&&(r&&(r+=" "),r+=u)}return r},A4=function(){return T4(arguments,!1)},M4=256,Nb=16,R4=1024,Lm=4096,O4=(e,i)=>{const r=i===void 0?()=>!0:i.seenBefore,l=i===void 0?e:i.mergeUncached;let s=new Map,u=new Map,d=0,f=null,m=null,v=[],y=[],g=0;const x=(E,M,T)=>{m===null&&(m=new Array(Lm).fill(""),v=new Array(Lm).fill(""),y=new Array(Lm).fill(""));const A=xd(E,0,E.length)&4094;if(m[A]===E&&v[A]===M)return y[A];if(m[A|1]===E&&v[A|1]===M)return y[A|1];const I=e(T?M+" "+E:E),R=m[A]===""?A:A|(m[A|1]===""?1:g++&1);return m[R]=E,v[R]=M,y[R]=I,I},b=(E,M,T,A)=>{let I=0;if(M){if(M!==E.a0)return!1;I=1}if(T){if(T!==(I===0?E.a0:E.a1))return!1;I++}if(A){if(A!==(I===0?E.a0:I===1?E.a1:E.a2))return!1;I++}return I===E.t},w=(E,M)=>{const T=E.a;let A=0;for(let I=0;I<M.length;I++){const R=M[I];if(R){if(R!==T[A])return!1;A++}}return A===E.t},k=(E,M)=>{const T=E.length,A=f===null?null:f.n;if(!M){if(A!==null&&w(A,E))return f=A,A.r;if(f!==null&&f!==A&&w(f,E))return f.r}let I="",R=-1,B=0,U=!1;for(let Y=0;Y<T;Y++){let q=E[Y];if(q){if(typeof q!="string"){if(q=E[Y]=Td(q,!0),!q)continue;U=!0}R<0&&(I=q,R=Y),B++}}if(B===0)return"";if(B===1)return e(I);if(U){if(A!==null&&w(A,E))return f=A,A.r;if(f!==null&&f!==A&&w(f,E))return f.r}let $=s.get(I);$===void 0&&($=u.get(I),$!==void 0&&s.set(I,$));let z=null;if($!==void 0){if($.skip>0){$.skip--,f=null;let q=I;for(let ee=R+1;ee<T;ee++){const G=E[ee];G&&(q+=" "+G)}return x(q,"",!1)}const Y=$.e;e:for(let q=0;q<Y.length;q++){const ee=Y[q];if(ee.t!==B)continue;const G=ee.a;let H=1;for(let Q=R+1;Q<T;Q++){const O=E[Q];if(O&&O!==G[H++])continue e}z=ee;break}z!==null&&($.miss=0)}if(z===null){let Y=I;const q=[I];for(let G=R+1;G<T;G++){const H=E[G];H&&(Y+=" "+H,q.push(H))}if(!r(Y))return l(Y);z={r:e(Y),t:q.length,a0:q[0],a1:q[1],a2:q[2]??"",a:q,n:null},$===void 0?s.set(I,$={e:[],miss:0,skip:0,at:0}):++$.miss>Nb&&($.miss=Nb,$.skip=R4,$.e.length=0,$.at=0);const ee=$.e;ee.length<M4?ee.push(z):(ee[$.at]=z,$.at=$.at+1&255),++d>1e3&&(d=0,u=s,s=new Map)}return f!==null&&f!==z&&(f.n=z),f=z,z.r},C=E=>Array.isArray(E)?k(E.slice(),!1):e(Td(E,!0));return function(E,M,T){const A=arguments.length;if((A|1)===3){const B=f;if(B!==null){const U=B.n;if(U!==null&&b(U,E,M,T))return f=U,U.r;if(B!==U&&b(B,E,M,T))return B.r}if(A===2&&typeof M=="string"&&M!==""){const U=s.get(E);if(U!==void 0&&U.skip>0)return U.skip--,f=null,x(M,E,!0)}return k([E,M,T],!0)}if(A===1)return typeof E=="string"?e(E):C(E);const I=f;if(I!==null){const B=I.n;if(B!==null){const U=B.a;let $=0,z=!0;for(let Y=0;Y<A;Y++){const q=arguments[Y];if(q){if(q!==U[$]){z=!1;break}$++}}if(z&&$===B.t)return f=B,B.r}if(I!==B){const U=I.a;let $=0,z=!0;for(let Y=0;Y<A;Y++){const q=arguments[Y];if(q){if(q!==U[$]){z=!1;break}$++}}if(z&&$===I.t)return I.r}}const R=[];for(let B=0;B<A;B++)R.push(arguments[B]);return k(R,!0)}},Eb=E4(C4),nn=O4(Eb.mergeString,Eb);var no=A2(),_4=Object.defineProperty,pg=(e,i)=>_4(e,"name",{value:i,configurable:!0});function Ap(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}pg(Ap,"setRef");function dw(...e){return i=>{let r=!1;const l=e.map(s=>{const u=Ap(s,i);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<l.length;s++){const u=l[s];typeof u=="function"?u():Ap(e[s],null)}}}}pg(dw,"composeRefs");function jt(...e){return S.useCallback(dw(...e),e)}pg(jt,"useComposedRefs");var D4=Object.defineProperty,lr=(e,i)=>D4(e,"name",{value:i,configurable:!0});function Br(e){const i=S.forwardRef((r,l)=>{let{children:s,...u}=r,d=null,f=!1;const m=[];Mp(s)&&typeof td=="function"&&(s=td(s._payload)),S.Children.forEach(s,x=>{var b;if(pw(x)){f=!0;const w=x;let k="child"in w.props?w.props.child:w.props.children;Mp(k)&&typeof td=="function"&&(k=td(k._payload)),d=I4(w,k),m.push((b=d==null?void 0:d.props)==null?void 0:b.children)}else m.push(x)}),d?d=S.cloneElement(d,void 0,m):!f&&S.Children.count(s)===1&&S.isValidElement(s)&&(d=s);const v=d?mw(d):void 0,y=jt(l,v);if(!d){if(s||s===0)throw new Error(f?P4(e):H4(e));return s}const g=hw(u,d.props??{});return d.type!==S.Fragment&&(g.ref=l?y:v),S.cloneElement(d,g)});return i.displayName=`${e}.Slot`,i}lr(Br,"createSlot");var z4=Br("Slot"),fw=Symbol.for("radix.slottable");function L4(e){const i=lr(r=>"child"in r?r.children(r.child):r.children,"Slottable");return i.displayName=`${e}.Slottable`,i.__radixId=fw,i}lr(L4,"createSlottable");var I4=lr((e,i)=>{if("child"in e.props){const r=e.props.child;return S.isValidElement(r)?S.cloneElement(r,void 0,e.props.children(r.props.children)):null}return S.isValidElement(i)?i:null},"getSlottableElementFromSlottable");function hw(e,i){const r={...i};for(const l in i){const s=e[l],u=i[l];/^on[A-Z]/.test(l)?s&&u?r[l]=(...f)=>{const m=u(...f);return s(...f),m}:s&&(r[l]=s):l==="style"?r[l]={...s,...u}:l==="className"&&(r[l]=[s,u].filter(Boolean).join(" "))}return{...e,...r}}lr(hw,"mergeProps");function mw(e){var l,s;let i=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?e.ref:(i=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}lr(mw,"getElementRef");function pw(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fw}lr(pw,"isSlottable");var B4=Symbol.for("react.lazy");function Mp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===B4&&"_payload"in e&&gw(e._payload)}lr(Mp,"isLazyComponent");function gw(e){return typeof e=="object"&&e!==null&&"then"in e}lr(gw,"isPromiseLike");var H4=lr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),P4=lr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),td=wc[" use ".trim().toString()],U4=Object.defineProperty,q4=(e,i)=>U4(e,"name",{value:i,configurable:!0}),F4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=F4.reduce((e,i)=>{const r=Br(`Primitive.${i}`),l=S.forwardRef((s,u)=>{const{asChild:d,...f}=s,m=d?r:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(m,{...f,ref:u})});return l.displayName=`Primitive.${i}`,{...e,[i]:l}},{});function vw(e,i){e&&no.flushSync(()=>e.dispatchEvent(i))}q4(vw,"dispatchDiscreteCustomEvent");var V4=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"}),$4=Object.defineProperty,qi=(e,i)=>$4(e,"name",{value:i,configurable:!0});function Y4(e,i){const r=S.createContext(i);r.displayName=e+"Context";const l=qi(u=>{const{children:d,...f}=u,m=S.useMemo(()=>f,Object.values(f));return c.jsx(r.Provider,{value:m,children:d})},"Provider");l.displayName=e+"Provider";function s(u,d={}){const{optional:f=!1}=d,m=S.useContext(r);if(m)return m;if(i!==void 0)return i;if(!f)throw new Error(`\`${u}\` must be used within \`${e}\``)}return qi(s,"useContext"),[l,s]}qi(Y4,"createContext");function tl(e,i=[]){let r=[];function l(u,d){const f=S.createContext(d);f.displayName=u+"Context";const m=r.length;r=[...r,d];const v=qi(g=>{var E;const{scope:x,children:b,...w}=g,k=((E=x==null?void 0:x[e])==null?void 0:E[m])||f,C=S.useMemo(()=>w,Object.values(w));return c.jsx(k.Provider,{value:C,children:b})},"Provider");v.displayName=u+"Provider";function y(g,x,b={}){var E;const{optional:w=!1}=b,k=((E=x==null?void 0:x[e])==null?void 0:E[m])||f,C=S.useContext(k);if(C)return C;if(d!==void 0)return d;if(!w)throw new Error(`\`${g}\` must be used within \`${u}\``)}return qi(y,"useContext"),[v,y]}qi(l,"createContext");const s=qi(()=>{const u=r.map(d=>S.createContext(d));return qi(function(f){const m=(f==null?void 0:f[e])||u;return S.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])},"useScope")},"createScope");return s.scopeName=e,[l,yw(s,...i)]}qi(tl,"createContextScope");function yw(...e){const i=e[0];if(e.length===1)return i;const r=qi(()=>{const l=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return qi(function(u){const d=l.reduce((f,{useScope:m,scopeName:v})=>{const g=m(u)[`__scope${v}`];return{...f,...g}},{});return S.useMemo(()=>({[`__scope${i.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return r.scopeName=i.scopeName,r}qi(yw,"composeContextScopes");var G4=Object.defineProperty,pn=(e,i)=>G4(e,"name",{value:i,configurable:!0});function xw(e){const i=e+"CollectionProvider",[r,l]=tl(i),[s,u]=r(i,{collectionRef:{current:null},itemMap:new Map}),d=pn(k=>{const{scope:C,children:E}=k,M=S.useRef(null),T=S.useRef(new Map).current;return c.jsx(s,{scope:C,itemMap:T,collectionRef:M,children:E})},"CollectionProvider");d.displayName=i;const f=e+"CollectionSlot",m=Br(f),v=S.forwardRef((k,C)=>{const{scope:E,children:M}=k,T=u(f,E),A=jt(C,T.collectionRef);return c.jsx(m,{ref:A,children:M})});v.displayName=f;const y=e+"CollectionItemSlot",g="data-radix-collection-item",x=Br(y),b=S.forwardRef((k,C)=>{const{scope:E,children:M,...T}=k,A=S.useRef(null),I=jt(C,A),R=u(y,E);return S.useEffect(()=>(R.itemMap.set(A,{ref:A,...T}),()=>void R.itemMap.delete(A))),c.jsx(x,{[g]:"",ref:I,children:M})});b.displayName=y;function w(k){const C=u(e+"CollectionConsumer",k);return S.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const T=Array.from(M.querySelectorAll(`[${g}]`));return Array.from(C.itemMap.values()).sort((R,B)=>T.indexOf(R.ref.current)-T.indexOf(B.ref.current))},[C.collectionRef,C.itemMap])}return pn(w,"useCollection"),[{Provider:d,Slot:v,ItemSlot:b},w,l]}pn(xw,"createCollection");var Tb=new WeakMap,en,Ai,Im=(Ai=class extends Map{constructor(r){super(r);db(this,en);Em(this,en,[...super.keys()]),Tb.set(this,!0)}set(r,l){return Tb.get(this)&&(this.has(r)?Ln(this,en)[Ln(this,en).indexOf(r)]=r:Ln(this,en).push(r)),super.set(r,l),this}insert(r,l,s){const u=this.has(l),d=Ln(this,en).length,f=gg(r);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(l,s),this;const y=this.size+(u?0:1);f<0&&m++;const g=[...Ln(this,en)];let x,b=!1;for(let w=m;w<y;w++)if(m===w){let k=g[w];g[w]===l&&(k=g[w+1]),u&&this.delete(l),x=this.get(k),this.set(l,s)}else{!b&&g[w-1]===l&&(b=!0);const k=g[b?w:w-1],C=x;x=this.get(k),this.delete(k),this.set(k,C)}return this}with(r,l,s){const u=new Ai(this);return u.insert(r,l,s),u}before(r){const l=Ln(this,en).indexOf(r)-1;if(!(l<0))return this.entryAt(l)}setBefore(r,l,s){const u=Ln(this,en).indexOf(r);return u===-1?this:this.insert(u,l,s)}after(r){let l=Ln(this,en).indexOf(r);if(l=l===-1||l===this.size-1?-1:l+1,l!==-1)return this.entryAt(l)}setAfter(r,l,s){const u=Ln(this,en).indexOf(r);return u===-1?this:this.insert(u+1,l,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Em(this,en,[]),super.clear()}delete(r){const l=super.delete(r);return l&&Ln(this,en).splice(Ln(this,en).indexOf(r),1),l}deleteAt(r){const l=this.keyAt(r);return l!==void 0?this.delete(l):!1}at(r){const l=bd(Ln(this,en),r);if(l!==void 0)return this.get(l)}entryAt(r){const l=bd(Ln(this,en),r);if(l!==void 0)return[l,this.get(l)]}indexOf(r){return Ln(this,en).indexOf(r)}keyAt(r){return bd(Ln(this,en),r)}from(r,l){const s=this.indexOf(r);if(s===-1)return;let u=s+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.at(u)}keyFrom(r,l){const s=this.indexOf(r);if(s===-1)return;let u=s+l;return u<0&&(u=0),u>=this.size&&(u=this.size-1),this.keyAt(u)}find(r,l){let s=0;for(const u of this){if(Reflect.apply(r,l,[u,s,this]))return u;s++}}findIndex(r,l){let s=0;for(const u of this){if(Reflect.apply(r,l,[u,s,this]))return s;s++}return-1}filter(r,l){const s=[];let u=0;for(const d of this)Reflect.apply(r,l,[d,u,this])&&s.push(d),u++;return new Ai(s)}map(r,l){const s=[];let u=0;for(const d of this)s.push([d[0],Reflect.apply(r,l,[d,u,this])]),u++;return new Ai(s)}reduce(...r){const[l,s]=r;let u=0,d=s??this.at(0);for(const f of this)u===0&&r.length===1?d=f:d=Reflect.apply(l,this,[d,f,u,this]),u++;return d}reduceRight(...r){const[l,s]=r;let u=s??this.at(-1);for(let d=this.size-1;d>=0;d--){const f=this.at(d);d===this.size-1&&r.length===1?u=f:u=Reflect.apply(l,this,[u,f,d,this])}return u}toSorted(r){const l=[...this.entries()].sort(r);return new Ai(l)}toReversed(){const r=new Ai;for(let l=this.size-1;l>=0;l--){const s=this.keyAt(l),u=this.get(s);r.set(s,u)}return r}toSpliced(...r){const l=[...this.entries()];return l.splice(...r),new Ai(l)}slice(r,l){const s=new Ai;let u=this.size-1;if(r===void 0)return s;r<0&&(r=r+this.size),l!==void 0&&l>0&&(u=l-1);for(let d=r;d<=u;d++){const f=this.keyAt(d),m=this.get(f);s.set(f,m)}return s}every(r,l){let s=0;for(const u of this){if(!Reflect.apply(r,l,[u,s,this]))return!1;s++}return!0}some(r,l){let s=0;for(const u of this){if(Reflect.apply(r,l,[u,s,this]))return!0;s++}return!1}},en=new WeakMap,pn(Ai,"OrderedDict"),Ai);function bd(e,i){if("at"in Array.prototype)return Array.prototype.at.call(e,i);const r=bw(e,i);return r===-1?void 0:e[r]}pn(bd,"at");function bw(e,i){const r=e.length,l=gg(i),s=l>=0?l:r+l;return s<0||s>=r?-1:s}pn(bw,"toSafeIndex");function gg(e){return e!==e||e===0?0:Math.trunc(e)}pn(gg,"toSafeInteger");function X4(e){const i=e+"CollectionProvider",[r,l]=tl(i),[s,u]=r(i,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Im,setItemMap:pn(()=>{},"setItemMap")}),d=pn(({state:T,...A})=>T?c.jsx(m,{...A,state:T}):c.jsx(f,{...A}),"CollectionProvider");d.displayName=i;const f=pn(T=>{const A=C();return c.jsx(m,{...T,state:A})},"CollectionInit");f.displayName=i+"Init";const m=pn(T=>{const{scope:A,children:I,state:R}=T,B=S.useRef(null),[U,$]=S.useState(null),z=jt(B,$),[Y,q]=R;return S.useEffect(()=>{if(!U)return;const ee=Sw(()=>{});return ee.observe(U,{childList:!0,subtree:!0}),()=>{ee.disconnect()}},[U]),c.jsx(s,{scope:A,itemMap:Y,setItemMap:q,collectionRef:z,collectionRefObject:B,collectionElement:U,children:I})},"CollectionProviderImpl");m.displayName=i+"Impl";const v=e+"CollectionSlot",y=Br(v),g=S.forwardRef((T,A)=>{const{scope:I,children:R}=T,B=u(v,I),U=jt(A,B.collectionRef);return c.jsx(y,{ref:U,children:R})});g.displayName=v;const x=e+"CollectionItemSlot",b="data-radix-collection-item",w=Br(x),k=S.forwardRef((T,A)=>{const{scope:I,children:R,...B}=T,U=S.useRef(null),[$,z]=S.useState(null),Y=jt(A,U,z),q=u(x,I),{setItemMap:ee}=q,G=S.useRef(B);jw(G.current,B)||(G.current=B);const H=G.current;return S.useEffect(()=>{const Q=H;return ee(O=>$?O.has($)?O.set($,{...Q,element:$}).toSorted(Rp):(O.set($,{...Q,element:$}),O.toSorted(Rp)):O),()=>{ee(O=>!$||!O.has($)?O:(O.delete($),new Im(O)))}},[$,H,ee]),c.jsx(w,{[b]:"",ref:Y,children:R})});k.displayName=x;function C(){return S.useState(new Im)}pn(C,"useInitCollection");function E(T){const{itemMap:A}=u(e+"CollectionConsumer",T);return A}return pn(E,"useCollection"),[{Provider:d,Slot:g,ItemSlot:k},{createCollectionScope:l,useCollection:E,useInitCollection:C}]}pn(X4,"createCollection");function jw(e,i){if(e===i)return!0;if(typeof e!="object"||typeof i!="object"||e==null||i==null)return!1;const r=Object.keys(e),l=Object.keys(i);if(r.length!==l.length)return!1;for(const s of r)if(!Object.prototype.hasOwnProperty.call(i,s)||e[s]!==i[s])return!1;return!0}pn(jw,"shallowEqual");function ww(e,i){return!!(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}pn(ww,"isElementPreceding");function Rp(e,i){return!e[1].element||!i[1].element?0:ww(e[1].element,i[1].element)?-1:1}pn(Rp,"sortByDocumentPosition");function Sw(e){return new MutationObserver(r=>{for(const l of r)if(l.type==="childList"){e();return}})}pn(Sw,"getChildListObserver");var Q4=Object.defineProperty,as=(e,i)=>Q4(e,"name",{value:i,configurable:!0}),kw=!!(typeof window<"u"&&window.document&&window.document.createElement);function mt(e,i,{checkForDefaultPrevented:r=!0}={}){return as(function(s){if(e==null||e(s),r===!1||!s||!s.defaultPrevented)return i==null?void 0:i(s)},"handleEvent")}as(mt,"composeEventHandlers");function K4(e){var i;if(!kw)throw new Error("Cannot access window outside of the DOM");return((i=e==null?void 0:e.ownerDocument)==null?void 0:i.defaultView)??window}as(K4,"getOwnerWindow");function Op(e){if(!kw)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}as(Op,"getOwnerDocument");function Cw(e,i=!1){const{activeElement:r}=Op(e);if(!(r!=null&&r.nodeName))return null;if(Nw(r)&&r.contentDocument)return Cw(r.contentDocument.body,i);if(i){const l=r.getAttribute("aria-activedescendant");if(l){const s=Op(r).getElementById(l);if(s)return s}}return r}as(Cw,"getActiveElement");function Nw(e){return e.tagName==="IFRAME"}as(Nw,"isFrame");var Mn=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Z4=Object.defineProperty,J4=(e,i)=>Z4(e,"name",{value:i,configurable:!0}),Ab=wc[" useEffectEvent ".trim().toString()],Mb=wc[" useInsertionEffect ".trim().toString()];function Ew(e){if(typeof Ab=="function")return Ab(e);const i=S.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Mb=="function"?Mb(()=>{i.current=e}):Mn(()=>{i.current=e}),S.useMemo(()=>((...r)=>{var l;return(l=i.current)==null?void 0:l.call(i,...r)}),[])}J4(Ew,"useEffectEvent");var W4=Object.defineProperty,Nc=(e,i)=>W4(e,"name",{value:i,configurable:!0}),eM=wc[" useInsertionEffect ".trim().toString()]||Mn;function mc({prop:e,defaultProp:i,onChange:r=Nc(()=>{},"onChange"),caller:l}){const[s,u,d]=Tw({defaultProp:i,onChange:r}),f=e!==void 0,m=f?e:s,v=S.useCallback(y=>{var g;if(f){const x=Aw(y)?y(e):y;x!==e&&((g=d.current)==null||g.call(d,x))}else u(y)},[f,e,u,d]);return[m,v]}Nc(mc,"useControllableState");function Tw({defaultProp:e,onChange:i}){const[r,l]=S.useState(e),s=S.useRef(r),u=S.useRef(i);return eM(()=>{u.current=i},[i]),S.useEffect(()=>{var d;s.current!==r&&((d=u.current)==null||d.call(u,r),s.current=r)},[r,s]),[r,l,u]}Nc(Tw,"useUncontrolledState");function Aw(e){return typeof e=="function"}Nc(Aw,"isFunction");var Rb=Symbol("RADIX:SYNC_STATE");function tM(e,i,r,l){const{prop:s,defaultProp:u,onChange:d,caller:f}=i,m=s!==void 0,v=Ew(d),y=[{...r,state:u}];l&&y.push(l);const[g,x]=S.useReducer((C,E)=>{if(E.type===Rb)return{...C,state:E.state};const M=e(C,E);return m&&!Object.is(M.state,C.state)&&v(M.state),M},...y),b=g.state,w=S.useRef(b);S.useEffect(()=>{w.current!==b&&(w.current=b,m||v(b))},[b,w,m]);const k=S.useMemo(()=>s!==void 0?{...g,state:s}:g,[g,s]);return S.useEffect(()=>{m&&!Object.is(s,g.state)&&x({type:Rb,state:s})},[s,g.state,m]),[k,x]}Nc(tM,"useControllableStateReducer");var nM=Object.defineProperty,da=(e,i)=>nM(e,"name",{value:i,configurable:!0});function Mw(e,i){return S.useReducer((r,l)=>i[r][l]??r,e)}da(Mw,"useStateMachine");var Vr=da(e=>{const{present:i,children:r}=e,l=Rw(i),s=typeof r=="function"?r({present:l.isPresent}):S.Children.only(r),u=Ow(l.ref,_w(s));return typeof r=="function"||l.isPresent?S.cloneElement(s,{ref:u}):null},"Presence");function Rw(e){const[i,r]=S.useState(),l=S.useRef(null),s=S.useRef(e),u=S.useRef("none"),d=S.useRef(void 0),f=e?"mounted":"unmounted",[m,v]=Mw(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{m==="mounted"?(u.current=d.current??Zo(l.current),d.current=void 0):u.current="none"},[m]),Mn(()=>{const y=l.current,g=s.current;if(g!==e){const b=u.current,w=Zo(y);e?(d.current=w,v("MOUNT")):w==="none"||(y==null?void 0:y.display)==="none"?v("UNMOUNT"):v(g&&b!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,v]),Mn(()=>{if(i){let y;const g=i.ownerDocument.defaultView??window,x=da(w=>{const C=Zo(l.current).includes(CSS.escape(w.animationName));if(w.target===i&&C&&(v("ANIMATION_END"),!s.current)){const E=i.style.animationFillMode;i.style.animationFillMode="forwards",y=g.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=E)})}},"handleAnimationEnd"),b=da(w=>{w.target===i&&(u.current=Zo(l.current))},"handleAnimationStart");return i.addEventListener("animationstart",b),i.addEventListener("animationcancel",x),i.addEventListener("animationend",x),()=>{g.clearTimeout(y),i.removeEventListener("animationstart",b),i.removeEventListener("animationcancel",x),i.removeEventListener("animationend",x)}}else v("ANIMATION_END")},[i,v]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:S.useCallback(y=>{if(y){const g=getComputedStyle(y);l.current=g,d.current=Zo(g)}else l.current=null;r(y)},[])}}da(Rw,"usePresence");function _p(e,i){if(typeof e=="function")return e(i);e!=null&&(e.current=i)}da(_p,"setRef");function Ow(...e){const i=S.useRef(e);return i.current=e,S.useCallback(r=>{const l=i.current;let s=!1;const u=l.map(d=>{const f=_p(d,r);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let d=0;d<u.length;d++){const f=u[d];typeof f=="function"?f():_p(l[d],null)}}},[])}da(Ow,"useStableComposedRefs");function Zo(e){return(e==null?void 0:e.animationName)||"none"}da(Zo,"getAnimationName");function _w(e){var l,s;let i=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=i&&"isReactWarning"in i&&i.isReactWarning;return r?e.ref:(i=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}da(_w,"getElementRef");var iM=Object.defineProperty,rM=(e,i)=>iM(e,"name",{value:i,configurable:!0}),aM=wc[" useId ".trim().toString()]||(()=>{}),lM=0;function Vl(e){const[i,r]=S.useState(aM());return Mn(()=>{e||r(l=>l??String(lM++))},[e]),e||(i?`radix-${i}`:"")}rM(Vl,"useId");var oM=Object.defineProperty,sM=(e,i)=>oM(e,"name",{value:i,configurable:!0}),cM=S.createContext(void 0);function vg(e){const i=S.useContext(cM);return e||i||"ltr"}sM(vg,"useDirection");var uM=Object.defineProperty,dM=(e,i)=>uM(e,"name",{value:i,configurable:!0});function An(e){const i=S.useRef(e);return S.useEffect(()=>{i.current=e}),S.useMemo(()=>((...r)=>{var l;return(l=i.current)==null?void 0:l.call(i,...r)}),[])}dM(An,"useCallbackRef");var fM=Object.defineProperty,mn=(e,i)=>fM(e,"name",{value:i,configurable:!0}),Dp="dismissableLayer.update",hM="dismissableLayer.pointerDownOutside",mM="dismissableLayer.focusOutside",Ob,Dw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),yg=S.forwardRef(mn(function(i,r){const{disableOutsidePointerEvents:l=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:v,...y}=i,g=S.useContext(Dw),[x,b]=S.useState(null),w=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=S.useState({}),C=jt(r,b),E=Array.from(g.layers),[M]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),T=M?E.indexOf(M):-1,A=x?E.indexOf(x):-1,I=g.layersWithOutsidePointerEventsDisabled.size>0,R=A>=T,B=S.useRef(!1),U=Lw(q=>{d==null||d(q),m==null||m(q),q.defaultPrevented||v==null||v()},{ownerDocument:w,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:g.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(q=>{if(!(q instanceof Node))return!1;const ee=[...g.branches].some(G=>G.contains(q));return R&&!ee},[g.branches,R])}),$=Iw(q=>{if(s&&B.current)return;const ee=q.target;[...g.branches].some(H=>H.contains(ee))||(f==null||f(q),m==null||m(q),q.defaultPrevented||v==null||v())},w),z=x?A===E.length-1:!1,Y=An(q=>{q.key==="Escape"&&(u==null||u(q),!q.defaultPrevented&&v&&(q.preventDefault(),v()))});return S.useEffect(()=>{if(z)return w.addEventListener("keydown",Y,{capture:!0}),()=>w.removeEventListener("keydown",Y,{capture:!0})},[w,z,Y]),S.useEffect(()=>{if(x)return l&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Ob=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),zp(),()=>{l&&(g.layersWithOutsidePointerEventsDisabled.delete(x),g.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=Ob))}},[x,w,l,g]),S.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),zp())},[x,g]),S.useEffect(()=>{const q=mn(()=>k({}),"handleUpdate");return document.addEventListener(Dp,q),()=>document.removeEventListener(Dp,q)},[]),c.jsx(zt.div,{...y,ref:C,style:{pointerEvents:I?R?"auto":"none":void 0,...i.style},onFocusCapture:mt(i.onFocusCapture,$.onFocusCapture),onBlurCapture:mt(i.onBlurCapture,$.onBlurCapture),onPointerDownCapture:mt(i.onPointerDownCapture,U.onPointerDownCapture)})},"DismissableLayer"));function zw(){const e=S.useContext(Dw),[i,r]=S.useState(null);return S.useEffect(()=>{if(i)return e.dismissableSurfaces.add(i),()=>{e.dismissableSurfaces.delete(i)}},[i,e.dismissableSurfaces]),r}mn(zw,"useDismissableLayerSurface");var pM=mn(()=>!0,"IS_TRUE");function Lw(e,i){const{ownerDocument:r=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:l=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:u,shouldHandlePointerDownOutside:d=pM}=i,f=An(e),m=S.useRef(!1),v=S.useRef(!1),y=S.useRef(new Map),g=S.useRef(()=>{});return S.useEffect(()=>{function x(){v.current=!1,s.current=!1,y.current.clear()}mn(x,"resetOutsideInteraction");function b(){return Array.from(y.current.values()).some(Boolean)}mn(b,"isOutsideInteractionIntercepted");function w(T){if(!v.current)return;const A=T.target;A instanceof Node&&[...u].some(R=>R.contains(A))||y.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{v.current&&g.current()},0)}mn(w,"handleInteractionCapture");function k(T){v.current&&y.current.set(T.type,!1)}mn(k,"handleInteractionBubble");const C=mn(T=>{if(T.target&&!m.current){let A=function(){r.removeEventListener("click",g.current);const R=b();x(),R||xg(hM,f,I,{discrete:!0})};if(mn(A,"handleAndDispatchPointerDownOutsideEvent"),!d(T.target)){r.removeEventListener("click",g.current),x(),m.current=!1;return}const I={originalEvent:T};v.current=!0,s.current=l&&T.button===0,y.current.clear(),!l||T.button!==0?A():(r.removeEventListener("click",g.current),g.current=A,r.addEventListener("click",g.current,{once:!0}))}else r.removeEventListener("click",g.current),x();m.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of E)r.addEventListener(T,w,!0),r.addEventListener(T,k);const M=window.setTimeout(()=>{r.addEventListener("pointerdown",C)},0);return()=>{window.clearTimeout(M),r.removeEventListener("pointerdown",C),r.removeEventListener("click",g.current);for(const T of E)r.removeEventListener(T,w,!0),r.removeEventListener(T,k)}},[r,f,l,s,u,d]),{onPointerDownCapture:mn(()=>m.current=!0,"onPointerDownCapture")}}mn(Lw,"usePointerDownOutside");function Iw(e,i=globalThis==null?void 0:globalThis.document){const r=An(e),l=S.useRef(!1);return S.useEffect(()=>{const s=mn(u=>{u.target&&!l.current&&xg(mM,r,{originalEvent:u},{discrete:!1})},"handleFocus");return i.addEventListener("focusin",s),()=>i.removeEventListener("focusin",s)},[i,r]),{onFocusCapture:mn(()=>l.current=!0,"onFocusCapture"),onBlurCapture:mn(()=>l.current=!1,"onBlurCapture")}}mn(Iw,"useFocusOutside");function zp(){const e=new CustomEvent(Dp);document.dispatchEvent(e)}mn(zp,"dispatchUpdate");function xg(e,i,r,{discrete:l}){const s=r.originalEvent.target,u=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});i&&s.addEventListener(e,i,{once:!0}),l?vw(s,u):s.dispatchEvent(u)}mn(xg,"handleAndDispatchCustomEvent");var gM=Object.defineProperty,Qn=(e,i)=>gM(e,"name",{value:i,configurable:!0}),Bm="focusScope.autoFocusOnMount",Hm="focusScope.autoFocusOnUnmount",_b={bubbles:!1,cancelable:!0},bg=S.forwardRef(Qn(function(i,r){const{loop:l=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:d,...f}=i,[m,v]=S.useState(null),y=An(u),g=An(d),x=S.useRef(null),b=jt(r,v),w=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(s){let C=function(A){if(w.paused||!m)return;const I=A.target;m.contains(I)?x.current=I:sa(x.current,{select:!0})},E=function(A){if(w.paused||!m)return;const I=A.relatedTarget;I!==null&&(m.contains(I)||sa(x.current,{select:!0}))},M=function(A){if(document.activeElement===document.body)for(const R of A)R.removedNodes.length>0&&sa(m)};Qn(C,"handleFocusIn"),Qn(E,"handleFocusOut"),Qn(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()}}},[s,m,w.paused]),S.useEffect(()=>{if(m){Db.add(w);const C=document.activeElement;if(!m.contains(C)){const M=new CustomEvent(Bm,_b);m.addEventListener(Bm,y),m.dispatchEvent(M),M.defaultPrevented||(Bw(Fw(jg(m)),{select:!0}),document.activeElement===C&&sa(m))}return()=>{m.removeEventListener(Bm,y),setTimeout(()=>{const M=new CustomEvent(Hm,_b);m.addEventListener(Hm,g),m.dispatchEvent(M),M.defaultPrevented||sa(C??document.body,{select:!0}),m.removeEventListener(Hm,g),Db.remove(w)},0)}}},[m,y,g,w]);const k=S.useCallback(C=>{if(!l&&!s||w.paused)return;const E=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,M=document.activeElement;if(E&&M){const T=C.currentTarget,[A,I]=Hw(T);A&&I?!C.shiftKey&&M===I?(C.preventDefault(),l&&sa(A,{select:!0})):C.shiftKey&&M===A&&(C.preventDefault(),l&&sa(I,{select:!0})):M===T&&C.preventDefault()}},[l,s,w.paused]);return c.jsx(zt.div,{tabIndex:-1,...f,ref:b,onKeyDown:k})},"FocusScope"));function Bw(e,{select:i=!1}={}){const r=document.activeElement;for(const l of e)if(sa(l,{select:i}),document.activeElement!==r)return}Qn(Bw,"focusFirst");function Hw(e){const i=jg(e),r=Lp(i,e),l=Lp(i.reverse(),e);return[r,l]}Qn(Hw,"getTabbableEdges");function jg(e){const i=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Qn(l=>{const s=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||s?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;r.nextNode();)i.push(r.currentNode);return i}Qn(jg,"getTabbableCandidates");function Lp(e,i){const r=typeof i.checkVisibility=="function"&&i.checkVisibility({checkVisibilityCSS:!0});for(const l of e)if(!(r?!l.checkVisibility({checkVisibilityCSS:!0}):Pw(l,{upTo:i})))return l}Qn(Lp,"findVisible");function Pw(e,{upTo:i}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(i!==void 0&&e===i)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Qn(Pw,"isHidden");function Uw(e){return e instanceof HTMLInputElement&&"select"in e}Qn(Uw,"isSelectableInput");function sa(e,{select:i=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Uw(e)&&i&&e.select()}}Qn(sa,"focus");var Db=qw();function qw(){let e=[];return{add(i){const r=e[0];i!==r&&(r==null||r.pause()),e=Ip(e,i),e.unshift(i)},remove(i){var r;e=Ip(e,i),(r=e[0])==null||r.resume()}}}Qn(qw,"createFocusScopesStack");function Ip(e,i){const r=[...e],l=r.indexOf(i);return l!==-1&&r.splice(l,1),r}Qn(Ip,"arrayRemove");function Fw(e){return e.filter(i=>i.tagName!=="A")}Qn(Fw,"removeLinks");var vM=Object.defineProperty,yM=(e,i)=>vM(e,"name",{value:i,configurable:!0}),wg=S.forwardRef(yM(function(i,r){var m;const{container:l,...s}=i,[u,d]=S.useState(!1);Mn(()=>d(!0),[]);const f=l||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?no.createPortal(c.jsx(zt.div,{...s,ref:r}),f):null},"Portal")),xM=Object.defineProperty,Sg=(e,i)=>xM(e,"name",{value:i,configurable:!0}),nd=0,Ar=null;function bM(e){return Ec(),e.children}Sg(bM,"FocusGuards");function Ec(){S.useEffect(()=>{Ar||(Ar={start:Bp(),end:Bp()});const{start:e,end:i}=Ar;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==i&&document.body.insertAdjacentElement("beforeend",i),nd++,()=>{nd===1&&(Ar==null||Ar.start.remove(),Ar==null||Ar.end.remove(),Ar=null),nd=Math.max(0,nd-1)}},[])}Sg(Ec,"useFocusGuards");function Bp(){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}Sg(Bp,"createFocusGuard");var Or=function(){return Or=Object.assign||function(i){for(var r,l=1,s=arguments.length;l<s;l++){r=arguments[l];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(i[u]=r[u])}return i},Or.apply(this,arguments)};function Vw(e,i){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&i.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(e);s<l.length;s++)i.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(e,l[s])&&(r[l[s]]=e[l[s]]);return r}function jM(e,i,r){if(r||arguments.length===2)for(var l=0,s=i.length,u;l<s;l++)(u||!(l in i))&&(u||(u=Array.prototype.slice.call(i,0,l)),u[l]=i[l]);return e.concat(u||Array.prototype.slice.call(i))}var jd="right-scroll-bar-position",wd="width-before-scroll-bar",wM="with-scroll-bars-hidden",SM="--removed-body-scroll-bar-size";function Pm(e,i){return typeof e=="function"?e(i):e&&(e.current=i),e}function kM(e,i){var r=S.useState(function(){return{value:e,callback:i,facade:{get current(){return r.value},set current(l){var s=r.value;s!==l&&(r.value=l,r.callback(l,s))}}}})[0];return r.callback=i,r.facade}var CM=typeof window<"u"?S.useLayoutEffect:S.useEffect,zb=new WeakMap;function NM(e,i){var r=kM(null,function(l){return e.forEach(function(s){return Pm(s,l)})});return CM(function(){var l=zb.get(r);if(l){var s=new Set(l),u=new Set(e),d=r.current;s.forEach(function(f){u.has(f)||Pm(f,null)}),u.forEach(function(f){s.has(f)||Pm(f,d)})}zb.set(r,e)},[e]),r}function EM(e){return e}function TM(e,i){i===void 0&&(i=EM);var r=[],l=!1,s={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(u){var d=i(u,l);return r.push(d),function(){r=r.filter(function(f){return f!==d})}},assignSyncMedium:function(u){for(l=!0;r.length;){var d=r;r=[],d.forEach(u)}r={push:function(f){return u(f)},filter:function(){return r}}},assignMedium:function(u){l=!0;var d=[];if(r.length){var f=r;r=[],f.forEach(u),d=r}var m=function(){var y=d;d=[],y.forEach(u)},v=function(){return Promise.resolve().then(m)};v(),r={push:function(y){d.push(y),v()},filter:function(y){return d=d.filter(y),r}}}};return s}function AM(e){e===void 0&&(e={});var i=TM(null);return i.options=Or({async:!0,ssr:!1},e),i}var $w=function(e){var i=e.sideCar,r=Vw(e,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=i.read();if(!l)throw new Error("Sidecar medium not found");return S.createElement(l,Or({},r))};$w.isSideCarExport=!0;function MM(e,i){return e.useMedium(i),$w}var Yw=AM(),Um=function(){},Yd=S.forwardRef(function(e,i){var r=S.useRef(null),l=S.useState({onScrollCapture:Um,onWheelCapture:Um,onTouchMoveCapture:Um}),s=l[0],u=l[1],d=e.forwardProps,f=e.children,m=e.className,v=e.removeScrollBar,y=e.enabled,g=e.shards,x=e.sideCar,b=e.noRelative,w=e.noIsolation,k=e.inert,C=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,T=e.gapMode,A=Vw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=x,R=NM([r,i]),B=Or(Or({},A),s);return S.createElement(S.Fragment,null,y&&S.createElement(I,{sideCar:Yw,removeScrollBar:v,shards:g,noRelative:b,noIsolation:w,inert:k,setCallbacks:u,allowPinchZoom:!!C,lockRef:r,gapMode:T}),d?S.cloneElement(S.Children.only(f),Or(Or({},B),{ref:R})):S.createElement(M,Or({},B,{className:m,ref:R}),f))});Yd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yd.classNames={fullWidth:wd,zeroRight:jd};var RM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var i=RM();return i&&e.setAttribute("nonce",i),e}function _M(e,i){e.styleSheet?e.styleSheet.cssText=i:e.appendChild(document.createTextNode(i))}function DM(e){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(e)}var zM=function(){var e=0,i=null;return{add:function(r){e==0&&(i=OM())&&(_M(i,r),DM(i)),e++},remove:function(){e--,!e&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},LM=function(){var e=zM();return function(i,r){S.useEffect(function(){return e.add(i),function(){e.remove()}},[i&&r])}},Gw=function(){var e=LM(),i=function(r){var l=r.styles,s=r.dynamic;return e(l,s),null};return i},IM={left:0,top:0,right:0,gap:0},qm=function(e){return parseInt(e||"",10)||0},BM=function(e){var i=window.getComputedStyle(document.body),r=i[e==="padding"?"paddingLeft":"marginLeft"],l=i[e==="padding"?"paddingTop":"marginTop"],s=i[e==="padding"?"paddingRight":"marginRight"];return[qm(r),qm(l),qm(s)]},HM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return IM;var i=BM(e),r=document.documentElement.clientWidth,l=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,l-r+i[2]-i[0])}},PM=Gw(),Wo="data-scroll-locked",UM=function(e,i,r,l){var s=e.left,u=e.top,d=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
445
|
+
.`.concat(wM,` {
|
|
446
|
+
overflow: hidden `).concat(l,`;
|
|
447
|
+
padding-right: `).concat(f,"px ").concat(l,`;
|
|
448
|
+
}
|
|
449
|
+
body[`).concat(Wo,`] {
|
|
450
|
+
overflow: hidden `).concat(l,`;
|
|
451
|
+
overscroll-behavior: contain;
|
|
452
|
+
`).concat([i&&"position: relative ".concat(l,";"),r==="margin"&&`
|
|
453
|
+
padding-left: `.concat(s,`px;
|
|
454
|
+
padding-top: `).concat(u,`px;
|
|
455
|
+
padding-right: `).concat(d,`px;
|
|
456
|
+
margin-left:0;
|
|
457
|
+
margin-top:0;
|
|
458
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
459
|
+
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.`).concat(jd,` {
|
|
463
|
+
right: `).concat(f,"px ").concat(l,`;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.`).concat(wd,` {
|
|
467
|
+
margin-right: `).concat(f,"px ").concat(l,`;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.`).concat(jd," .").concat(jd,` {
|
|
471
|
+
right: 0 `).concat(l,`;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.`).concat(wd," .").concat(wd,` {
|
|
475
|
+
margin-right: 0 `).concat(l,`;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
body[`).concat(Wo,`] {
|
|
479
|
+
`).concat(SM,": ").concat(f,`px;
|
|
480
|
+
}
|
|
481
|
+
`)},Lb=function(){var e=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(e)?e:0},qM=function(){S.useEffect(function(){return document.body.setAttribute(Wo,(Lb()+1).toString()),function(){var e=Lb()-1;e<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,e.toString())}},[])},FM=function(e){var i=e.noRelative,r=e.noImportant,l=e.gapMode,s=l===void 0?"margin":l;qM();var u=S.useMemo(function(){return HM(s)},[s]);return S.createElement(PM,{styles:UM(u,!i,s,r?"":"!important")})},Hp=!1;if(typeof window<"u")try{var id=Object.defineProperty({},"passive",{get:function(){return Hp=!0,!0}});window.addEventListener("test",id,id),window.removeEventListener("test",id,id)}catch{Hp=!1}var Yo=Hp?{passive:!1}:!1,VM=function(e){return e.tagName==="TEXTAREA"},Xw=function(e,i){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[i]!=="hidden"&&!(r.overflowY===r.overflowX&&!VM(e)&&r[i]==="visible")},$M=function(e){return Xw(e,"overflowY")},YM=function(e){return Xw(e,"overflowX")},Ib=function(e,i){var r=i.ownerDocument,l=i;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var s=Qw(e,l);if(s){var u=Kw(e,l),d=u[1],f=u[2];if(d>f)return!0}l=l.parentNode}while(l&&l!==r.body);return!1},GM=function(e){var i=e.scrollTop,r=e.scrollHeight,l=e.clientHeight;return[i,r,l]},XM=function(e){var i=e.scrollLeft,r=e.scrollWidth,l=e.clientWidth;return[i,r,l]},Qw=function(e,i){return e==="v"?$M(i):YM(i)},Kw=function(e,i){return e==="v"?GM(i):XM(i)},QM=function(e,i){return e==="h"&&i==="rtl"?-1:1},KM=function(e,i,r,l,s){var u=QM(e,window.getComputedStyle(i).direction),d=u*l,f=r.target,m=i.contains(f),v=!1,y=d>0,g=0,x=0;do{if(!f)break;var b=Kw(e,f),w=b[0],k=b[1],C=b[2],E=k-C-u*w;(w||E)&&Qw(e,f)&&(g+=E,x+=w);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&f!==document.body||m&&(i.contains(f)||i===f));return(y&&Math.abs(g)<1||!y&&Math.abs(x)<1)&&(v=!0),v},rd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bb=function(e){return[e.deltaX,e.deltaY]},Hb=function(e){return e&&"current"in e?e.current:e},ZM=function(e,i){return e[0]===i[0]&&e[1]===i[1]},JM=function(e){return`
|
|
482
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
483
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
484
|
+
`)},WM=0,Go=[];function eR(e){var i=S.useRef([]),r=S.useRef([0,0]),l=S.useRef(),s=S.useState(WM++)[0],u=S.useState(Gw)[0],d=S.useRef(e);S.useEffect(function(){d.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var k=jM([e.lockRef.current],(e.shards||[]).map(Hb),!0).filter(Boolean);return k.forEach(function(C){return C.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=S.useCallback(function(k,C){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!d.current.allowPinchZoom;var E=rd(k),M=r.current,T="deltaX"in k?k.deltaX:M[0]-E[0],A="deltaY"in k?k.deltaY:M[1]-E[1],I,R=k.target,B=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in k&&B==="h"&&R.type==="range")return!1;var U=window.getSelection(),$=U&&U.anchorNode,z=$?$===R||$.contains(R):!1;if(z)return!1;var Y=Ib(B,R);if(!Y)return!0;if(Y?I=B:(I=B==="v"?"h":"v",Y=Ib(B,R)),!Y)return!1;if(!l.current&&"changedTouches"in k&&(T||A)&&(l.current=I),!I)return!0;var q=l.current||I;return KM(q,C,k,q==="h"?T:A)},[]),m=S.useCallback(function(k){var C=k;if(!(!Go.length||Go[Go.length-1]!==u)){var E="deltaY"in C?Bb(C):rd(C),M=i.current.filter(function(I){return I.name===C.type&&(I.target===C.target||C.target===I.shadowParent)&&ZM(I.delta,E)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var T=(d.current.shards||[]).map(Hb).filter(Boolean).filter(function(I){return I.contains(C.target)}),A=T.length>0?f(C,T[0]):!d.current.noIsolation;A&&C.cancelable&&C.preventDefault()}}},[]),v=S.useCallback(function(k,C,E,M){var T={name:k,delta:C,target:E,should:M,shadowParent:tR(E)};i.current.push(T),setTimeout(function(){i.current=i.current.filter(function(A){return A!==T})},1)},[]),y=S.useCallback(function(k){r.current=rd(k),l.current=void 0},[]),g=S.useCallback(function(k){v(k.type,Bb(k),k.target,f(k,e.lockRef.current))},[]),x=S.useCallback(function(k){v(k.type,rd(k),k.target,f(k,e.lockRef.current))},[]);S.useEffect(function(){return Go.push(u),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:x}),document.addEventListener("wheel",m,Yo),document.addEventListener("touchmove",m,Yo),document.addEventListener("touchstart",y,Yo),function(){Go=Go.filter(function(k){return k!==u}),document.removeEventListener("wheel",m,Yo),document.removeEventListener("touchmove",m,Yo),document.removeEventListener("touchstart",y,Yo)}},[]);var b=e.removeScrollBar,w=e.inert;return S.createElement(S.Fragment,null,w?S.createElement(u,{styles:JM(s)}):null,b?S.createElement(FM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tR(e){for(var i=null;e!==null;)e instanceof ShadowRoot&&(i=e.host,e=e.host),e=e.parentNode;return i}const nR=MM(Yw,eR);var Gd=S.forwardRef(function(e,i){return S.createElement(Yd,Or({},e,{ref:i,sideCar:nR}))});Gd.classNames=Yd.classNames;var iR=function(e){if(typeof document>"u")return null;var i=Array.isArray(e)?e[0]:e;return i.ownerDocument.body},Xo=new WeakMap,ad=new WeakMap,ld={},Fm=0,Zw=function(e){return e&&(e.host||Zw(e.parentNode))},rR=function(e,i){return i.map(function(r){if(e.contains(r))return r;var l=Zw(r);return l&&e.contains(l)?l:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},aR=function(e,i,r,l){var s=rR(i,Array.isArray(e)?e:[e]);ld[r]||(ld[r]=new WeakMap);var u=ld[r],d=[],f=new Set,m=new Set(s),v=function(g){!g||f.has(g)||(f.add(g),v(g.parentNode))};s.forEach(v);var y=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(x){if(f.has(x))y(x);else try{var b=x.getAttribute(l),w=b!==null&&b!=="false",k=(Xo.get(x)||0)+1,C=(u.get(x)||0)+1;Xo.set(x,k),u.set(x,C),d.push(x),k===1&&w&&ad.set(x,!0),C===1&&x.setAttribute(r,"true"),w||x.setAttribute(l,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return y(i),f.clear(),Fm++,function(){d.forEach(function(g){var x=Xo.get(g)-1,b=u.get(g)-1;Xo.set(g,x),u.set(g,b),x||(ad.has(g)||g.removeAttribute(l),ad.delete(g)),b||g.removeAttribute(r)}),Fm--,Fm||(Xo=new WeakMap,Xo=new WeakMap,ad=new WeakMap,ld={})}},kg=function(e,i,r){r===void 0&&(r="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),s=iR(e);return s?(l.push.apply(l,Array.from(s.querySelectorAll("[aria-live], script"))),aR(l,s,r,"aria-hidden")):function(){return null}},lR=Object.defineProperty,or=(e,i)=>lR(e,"name",{value:i,configurable:!0}),Cg="Dialog",[Jw,MB]=tl(Cg),[oR,ha]=Jw(Cg),sR=or(e=>{const{__scopeDialog:i,children:r,open:l,defaultOpen:s,onOpenChange:u,modal:d=!0}=e,f=S.useRef(null),m=S.useRef(null),[v,y]=mc({prop:l,defaultProp:s??!1,onChange:u,caller:Cg}),[g,x]=S.useState(0),[b,w]=S.useState(0);return c.jsx(oR,{scope:i,triggerRef:f,contentRef:m,contentId:Vl(),titleId:Vl(),descriptionId:Vl(),titlePresent:g>0,descriptionPresent:b>0,setTitleCount:x,setDescriptionCount:w,open:v,onOpenChange:y,onOpenToggle:S.useCallback(()=>y(k=>!k),[y]),modal:d,children:r})},"Dialog"),Ww="DialogPortal",[cR,eS]=Jw(Ww,{forceMount:void 0}),uR=or(e=>{const{__scopeDialog:i,forceMount:r,children:l,container:s}=e,u=ha(Ww,i);return c.jsx(cR,{scope:i,forceMount:r,children:S.Children.map(l,d=>c.jsx(Vr,{present:r||u.open,children:c.jsx(wg,{asChild:!0,container:s,children:d})}))})},"DialogPortal"),Pp="DialogOverlay",dR=S.forwardRef(or(function(i,r){const l=eS(Pp,i.__scopeDialog),{forceMount:s=l.forceMount,...u}=i,d=ha(Pp,i.__scopeDialog);return d.modal?c.jsx(Vr,{present:s||d.open,children:c.jsx(hR,{...u,ref:r})}):null},"DialogOverlay")),fR=Br("DialogOverlay.RemoveScroll"),hR=S.forwardRef(or(function(i,r){const{__scopeDialog:l,...s}=i,u=ha(Pp,l),d=zw(),f=jt(r,d);return c.jsx(Gd,{as:fR,allowPinchZoom:!0,shards:[u.contentRef],children:c.jsx(zt.div,{"data-state":Ng(u.open),...s,ref:f,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),pc="DialogContent",mR=S.forwardRef(or(function(i,r){const l=eS(pc,i.__scopeDialog),{forceMount:s=l.forceMount,...u}=i,d=ha(pc,i.__scopeDialog);return c.jsx(Vr,{present:s||d.open,children:d.modal?c.jsx(pR,{...u,ref:r}):c.jsx(gR,{...u,ref:r})})},"DialogContent")),pR=S.forwardRef(or(function(i,r){const l=ha(pc,i.__scopeDialog),s=S.useRef(null),u=jt(r,l.contentRef,s);return S.useEffect(()=>{const d=s.current;if(d)return kg(d)},[]),c.jsx(tS,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:l.open,onCloseAutoFocus:mt(i.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=l.triggerRef.current)==null||f.focus()}),onPointerDownOutside:mt(i.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:mt(i.onFocusOutside,d=>d.preventDefault())})},"DialogContentModal")),gR=S.forwardRef(or(function(i,r){const l=ha(pc,i.__scopeDialog),s=S.useRef(!1),u=S.useRef(!1);return c.jsx(tS,{...i,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=i.onCloseAutoFocus)==null||f.call(i,d),d.defaultPrevented||(s.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=i.onInteractOutside)==null||v.call(i,d),d.defaultPrevented||(s.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"DialogContentNonModal")),tS=S.forwardRef(or(function(i,r){const{__scopeDialog:l,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,...f}=i,m=ha(pc,l);return Ec(),c.jsx(c.Fragment,{children:c.jsx(bg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:c.jsx(yg,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":Ng(m.open),...f,ref:r,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),vR="DialogTitle",yR=S.forwardRef(or(function(i,r){const{__scopeDialog:l,...s}=i,u=ha(vR,l),{setTitleCount:d}=u;return Mn(()=>(d(f=>f+1),()=>d(f=>f-1)),[d]),c.jsx(zt.h2,{id:u.titleId,...s,ref:r})},"DialogTitle")),xR="DialogClose",bR=S.forwardRef(or(function(i,r){const{__scopeDialog:l,...s}=i,u=ha(xR,l);return c.jsx(zt.button,{type:"button",...s,ref:r,onClick:mt(i.onClick,()=>u.onOpenChange(!1))})},"DialogClose"));function Ng(e){return e?"open":"closed"}or(Ng,"getState");var jR=Object.defineProperty,wR=(e,i)=>jR(e,"name",{value:i,configurable:!0});function nS(e){const[i,r]=S.useState(void 0);return Mn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const l=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[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;r({width:d,height:f})});return l.observe(e,{box:"border-box"}),()=>l.unobserve(e)}else r(void 0)},[e]),i}wR(nS,"useSize");const SR=["top","right","bottom","left"],Wa=Math.min,ca=Math.max,Ad=Math.round,od=Math.floor,ua=e=>({x:e,y:e}),kR={left:"right",right:"left",bottom:"top",top:"bottom"};function iS(e,i,r){return ca(e,Wa(i,r))}function fa(e,i){return typeof e=="function"?e(i):e}function el(e){return e.split("-")[0]}function ls(e){return e.split("-")[1]}function Eg(e){return e==="x"?"y":"x"}function Tg(e){return e==="y"?"height":"width"}function Dr(e){const i=e[0];return i==="t"||i==="b"?"y":"x"}function Ag(e){return Eg(Dr(e))}function CR(e,i,r){r===void 0&&(r=!1);const l=ls(e),s=Ag(e),u=Tg(s);let d=s==="x"?l===(r?"end":"start")?"right":"left":l==="start"?"bottom":"top";return i.reference[u]>i.floating[u]&&(d=Md(d)),[d,Md(d)]}function NR(e){const i=Md(e);return[Up(e),i,Up(i)]}function Up(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Pb=["left","right"],Ub=["right","left"],ER=["top","bottom"],TR=["bottom","top"];function AR(e,i,r){switch(e){case"top":case"bottom":return r?i?Ub:Pb:i?Pb:Ub;case"left":case"right":return i?ER:TR;default:return[]}}function MR(e,i,r,l){const s=ls(e);let u=AR(el(e),r==="start",l);return s&&(u=u.map(d=>d+"-"+s),i&&(u=u.concat(u.map(Up)))),u}function Md(e){const i=el(e);return kR[i]+e.slice(i.length)}function RR(e){var i,r,l,s;return{top:(i=e.top)!=null?i:0,right:(r=e.right)!=null?r:0,bottom:(l=e.bottom)!=null?l:0,left:(s=e.left)!=null?s:0}}function rS(e){return typeof e!="number"?RR(e):{top:e,right:e,bottom:e,left:e}}function Rd(e){const{x:i,y:r,width:l,height:s}=e;return{width:l,height:s,top:r,left:i,right:i+l,bottom:r+s,x:i,y:r}}function qb(e,i,r){let{reference:l,floating:s}=e;const u=Dr(i),d=Ag(i),f=Tg(d),m=el(i),v=u==="y",y=l.x+l.width/2-s.width/2,g=l.y+l.height/2-s.height/2,x=l[f]/2-s[f]/2;let b;switch(m){case"top":b={x:y,y:l.y-s.height};break;case"bottom":b={x:y,y:l.y+l.height};break;case"right":b={x:l.x+l.width,y:g};break;case"left":b={x:l.x-s.width,y:g};break;default:b={x:l.x,y:l.y}}const w=ls(i);return w&&(b[d]+=x*(w==="end"?1:-1)*(r&&v?-1:1)),b}async function OR(e,i){var r;i===void 0&&(i={});const{x:l,y:s,platform:u,rects:d,elements:f,strategy:m}=e,{boundary:v="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:x=!1,padding:b=0}=fa(i,e),w=rS(b),C=f[x?g==="floating"?"reference":"floating":g],E=Rd(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(C)))==null||r?C:C.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:v,rootBoundary:y,strategy:m})),M=g==="floating"?{x:l,y:s,width:d.floating.width,height:d.floating.height}:d.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),A=await(u.isElement==null?void 0:u.isElement(T))&&await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1},I=Rd(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:T,strategy:m}):M);return{top:(E.top-I.top+w.top)/A.y,bottom:(I.bottom-E.bottom+w.bottom)/A.y,left:(E.left-I.left+w.left)/A.x,right:(I.right-E.right+w.right)/A.x}}const _R=50,DR=async(e,i,r)=>{const{placement:l="bottom",strategy:s="absolute",middleware:u=[],platform:d}=r,f=d.detectOverflow?d:{...d,detectOverflow:OR},m=await(d.isRTL==null?void 0:d.isRTL(i));let v=await d.getElementRects({reference:e,floating:i,strategy:s}),{x:y,y:g}=qb(v,l,m),x=l,b=0;const w={};for(let k=0;k<u.length;k++){const C=u[k];if(!C)continue;const{name:E,fn:M}=C,{x:T,y:A,data:I,reset:R}=await M({x:y,y:g,initialPlacement:l,placement:x,strategy:s,middlewareData:w,rects:v,platform:f,elements:{reference:e,floating:i}});y=T??y,g=A??g,w[E]={...w[E],...I},R&&b<_R&&(b++,typeof R=="object"&&(R.placement&&(x=R.placement),R.rects&&(v=R.rects===!0?await d.getElementRects({reference:e,floating:i,strategy:s}):R.rects),{x:y,y:g}=qb(v,x,m)),k=-1)}return{x:y,y:g,placement:x,strategy:s,middlewareData:w}},zR=e=>({name:"arrow",options:e,async fn(i){const{x:r,y:l,placement:s,rects:u,platform:d,elements:f,middlewareData:m}=i,{element:v,padding:y=0}=fa(e,i)||{};if(v==null)return{};const g=rS(y),x={x:r,y:l},b=Ag(s),w=Tg(b),k=await d.getDimensions(v),C=b==="y",E=C?"top":"left",M=C?"bottom":"right",T=C?"clientHeight":"clientWidth",A=u.reference[w]+u.reference[b]-x[b]-u.floating[w],I=x[b]-u.reference[b],R=await(d.getOffsetParent==null?void 0:d.getOffsetParent(v));let B=R?R[T]:0;(!B||!await(d.isElement==null?void 0:d.isElement(R)))&&(B=f.floating[T]||u.floating[w]);const U=A/2-I/2,$=B/2-k[w]/2-1,z=Wa(g[E],$),Y=Wa(g[M],$),q=B-k[w]-Y,ee=B/2-k[w]/2+U,G=iS(z,ee,q),H=!m.arrow&&ls(s)!=null&&ee!==G&&u.reference[w]/2-(ee<z?z:Y)-k[w]/2<0,Q=H?ee<z?ee-z:ee-q:0;return{[b]:x[b]+Q,data:{[b]:G,centerOffset:ee-G-Q,...H&&{alignmentOffset:Q}},reset:H}}}),LR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(i){var r,l;const{placement:s,middlewareData:u,rects:d,initialPlacement:f,platform:m,elements:v}=i,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:k=!0,...C}=fa(e,i);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const E=el(s),M=Dr(f),T=el(f)===f,A=await(m.isRTL==null?void 0:m.isRTL(v.floating)),I=x||(T||!k?[Md(f)]:NR(f)),R=w!=="none";!x&&R&&I.push(...MR(f,k,w,A));const B=[f,...I],U=await m.detectOverflow(i,C),$=[];let z=((l=u.flip)==null?void 0:l.overflows)||[];if(y&&$.push(U[E]),g){const G=CR(s,d,A);$.push(U[G[0]],U[G[1]])}if(z=[...z,{placement:s,overflows:$}],!$.every(G=>G<=0)){var Y,q;const G=(((Y=u.flip)==null?void 0:Y.index)||0)+1,H=B[G];if(H&&(!(g==="alignment"?M!==Dr(H):!1)||z.every(F=>Dr(F.placement)===M?F.overflows[0]>0:!0)))return{data:{index:G,overflows:z},reset:{placement:H}};let Q=(q=z.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:q.placement;if(!Q)switch(b){case"bestFit":{var ee;const O=(ee=z.filter(F=>{if(R){const ne=Dr(F.placement);return ne===M||ne==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(ne=>ne>0).reduce((ne,D)=>ne+D,0)]).sort((F,ne)=>F[1]-ne[1])[0])==null?void 0:ee[0];O&&(Q=O);break}case"initialPlacement":Q=f;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}};function Fb(e,i){return{top:e.top-i.height,right:e.right-i.width,bottom:e.bottom-i.height,left:e.left-i.width}}function Vb(e){return SR.some(i=>e[i]>=0)}const IR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(i){const{rects:r,platform:l}=i,{strategy:s="referenceHidden",...u}=fa(e,i);switch(s){case"referenceHidden":{const d=await l.detectOverflow(i,{...u,elementContext:"reference"}),f=Fb(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Vb(f)}}}case"escaped":{const d=await l.detectOverflow(i,{...u,altBoundary:!0}),f=Fb(d,r.floating);return{data:{escapedOffsets:f,escaped:Vb(f)}}}default:return{}}}}},aS=new Set(["left","top"]);async function BR(e,i){const{placement:r,platform:l,elements:s}=e,u=await(l.isRTL==null?void 0:l.isRTL(s.floating)),d=el(r),f=ls(r),m=Dr(r)==="y",v=aS.has(d)?-1:1,y=u&&m?-1:1,g=fa(i,e);let{mainAxis:x,crossAxis:b,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(b=f==="end"?w*-1:w),m?{x:b*y,y:x*v}:{x:x*v,y:b*y}}const HR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(i){var r,l;const{x:s,y:u,placement:d,middlewareData:f}=i,m=await BR(i,e);return d===((r=f.offset)==null?void 0:r.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:s+m.x,y:u+m.y,data:{...m,placement:d}}}}},PR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(i){const{x:r,y:l,placement:s,platform:u}=i,{mainAxis:d=!0,crossAxis:f=!1,limiter:m={fn:M=>{let{x:T,y:A}=M;return{x:T,y:A}}},...v}=fa(e,i),y={x:r,y:l},g=await u.detectOverflow(i,v),x=Dr(s),b=Eg(x);let w=y[b],k=y[x];const C=(M,T)=>iS(T+g[M==="y"?"top":"left"],T,T-g[M==="y"?"bottom":"right"]);d&&(w=C(b,w)),f&&(k=C(x,k));const E=m.fn({...i,[b]:w,[x]:k});return{...E,data:{x:E.x-r,y:E.y-l,enabled:{[b]:d,[x]:f}}}}}},UR=function(e){return e===void 0&&(e={}),{options:e,fn(i){var r,l;const{x:s,y:u,placement:d,rects:f,middlewareData:m}=i,{offset:v=0,mainAxis:y=!0,crossAxis:g=!0}=fa(e,i),x={x:s,y:u},b=Dr(d),w=Eg(b);let k=x[w],C=x[b];const E=fa(v,i),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(r=E.mainAxis)!=null?r:0,crossAxis:(l=E.crossAxis)!=null?l:0};if(y){const I=w==="y"?"height":"width",R=f.reference[w]-f.floating[I]+M.mainAxis,B=f.reference[w]+f.reference[I]-M.mainAxis;k<R?k=R:k>B&&(k=B)}if(g){var T,A;const I=w==="y"?"width":"height",R=aS.has(el(d)),B=f.reference[b]-f.floating[I]+(R&&((T=m.offset)==null?void 0:T[b])||0)+(R?0:M.crossAxis),U=f.reference[b]+f.reference[I]+(R?0:((A=m.offset)==null?void 0:A[b])||0)-(R?M.crossAxis:0);C<B?C=B:C>U&&(C=U)}return{[w]:k,[b]:C}}}},qR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(i){const{placement:r,rects:l,platform:s,elements:u}=i,{apply:d=()=>{},...f}=fa(e,i),m=await s.detectOverflow(i,f),v=el(r),y=ls(r),g=Dr(r)==="y",{width:x,height:b}=l.floating;let w,k;v==="top"||v==="bottom"?(w=v,k=y===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(k=v,w=y==="end"?"top":"bottom");const C=b-m.top-m.bottom,E=x-m.left-m.right,M=Wa(b-m[w],C),T=Wa(x-m[k],E),A=i.middlewareData.shift,I=!A;let R=M,B=T;A!=null&&A.enabled.x&&(B=E),A!=null&&A.enabled.y&&(R=C),I&&!y&&(g?B=x-2*ca(m.left,m.right):R=b-2*ca(m.top,m.bottom)),await d({...i,availableWidth:B,availableHeight:R});const U=await s.getDimensions(u.floating);return x!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function Xd(){return typeof window<"u"}function os(e){return lS(e)?(e.nodeName||"").toLowerCase():"#document"}function ci(e){var i;return(e==null||(i=e.ownerDocument)==null?void 0:i.defaultView)||window}function ma(e){var i;return(i=(lS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:i.documentElement}function lS(e){return Xd()?e instanceof Node||e instanceof ci(e).Node:!1}function Hr(e){return Xd()?e instanceof Element||e instanceof ci(e).Element:!1}function nl(e){return Xd()?e instanceof HTMLElement||e instanceof ci(e).HTMLElement:!1}function $b(e){return!Xd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ci(e).ShadowRoot}function Qd(e){const{overflow:i,overflowX:r,overflowY:l,display:s}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(i+l+r)&&s!=="inline"&&s!=="contents"}function FR(e){return/^(table|td|th)$/.test(os(e))}function Kd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const VR=/transform|translate|scale|rotate|perspective|filter/,$R=/paint|layout|strict|content/,Il=e=>!!e&&e!=="none";let Vm;function Mg(e){const i=Hr(e)?Pr(e):e;return Il(i.transform)||Il(i.translate)||Il(i.scale)||Il(i.rotate)||Il(i.perspective)||!Rg()&&(Il(i.backdropFilter)||Il(i.filter))||VR.test(i.willChange||"")||$R.test(i.contain||"")}function YR(e){let i=Gl(e);for(;nl(i)&&!gc(i);){if(Mg(i))return i;if(Kd(i))return null;i=Gl(i)}return null}function Rg(){return Vm==null&&(Vm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vm}function gc(e){return/^(html|body|#document)$/.test(os(e))}function Pr(e){return ci(e).getComputedStyle(e)}function Zd(e){return Hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gl(e){if(os(e)==="html")return e;const i=e.assignedSlot||e.parentNode||$b(e)&&e.host||ma(e);return $b(i)?i.host:i}function oS(e){const i=Gl(e);return gc(i)?(e.ownerDocument||e).body:nl(i)&&Qd(i)?i:oS(i)}function vc(e,i,r){var l;i===void 0&&(i=[]),r===void 0&&(r=!0);const s=oS(e),u=s===((l=e.ownerDocument)==null?void 0:l.body),d=ci(s);if(u){const f=qp(d);return i.concat(d,d.visualViewport||[],Qd(s)?s:[],f&&r?vc(f):[])}else return i.concat(s,vc(s,[],r))}function qp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sS(e){const i=Pr(e);let r=parseFloat(i.width)||0,l=parseFloat(i.height)||0;const s=nl(e),u=s?e.offsetWidth:r,d=s?e.offsetHeight:l,f=Ad(r)!==u||Ad(l)!==d;return f&&(r=u,l=d),{width:r,height:l,$:f}}function Og(e){return Hr(e)?e:e.contextElement}function es(e){const i=Og(e);if(!nl(i))return ua(1);const r=i.getBoundingClientRect(),{width:l,height:s,$:u}=sS(i);let d=(u?Ad(r.width):r.width)/l,f=(u?Ad(r.height):r.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!f||!Number.isFinite(f))&&(f=1),{x:d,y:f}}const GR=ua(0);function cS(e){const i=ci(e);return!Rg()||!i.visualViewport?GR:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function XR(e,i,r){return i===void 0&&(i=!1),!!r&&i&&r===ci(e)}function Xl(e,i,r,l){i===void 0&&(i=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),u=Og(e);let d=ua(1);i&&(l?Hr(l)&&(d=es(l)):d=es(e));const f=XR(u,r,l)?cS(u):ua(0);let m=(s.left+f.x)/d.x,v=(s.top+f.y)/d.y,y=s.width/d.x,g=s.height/d.y;if(u&&l){const x=ci(u),b=Hr(l)?ci(l):l;let w=x,k=qp(w);for(;k&&b!==w;){const C=es(k),E=k.getBoundingClientRect(),M=Pr(k),T=E.left+(k.clientLeft+parseFloat(M.paddingLeft))*C.x,A=E.top+(k.clientTop+parseFloat(M.paddingTop))*C.y;m*=C.x,v*=C.y,y*=C.x,g*=C.y,m+=T,v+=A,w=ci(k),k=qp(w)}}return Rd({width:y,height:g,x:m,y:v})}function Jd(e,i){const r=Zd(e).scrollLeft;return i?i.left+r:Xl(ma(e)).left+r}function uS(e,i){const r=e.getBoundingClientRect(),l=r.left+i.scrollLeft-Jd(e,r),s=r.top+i.scrollTop;return{x:l,y:s}}function QR(e){let{elements:i,rect:r,offsetParent:l,strategy:s}=e;const u=s==="fixed",d=ma(l),f=i?Kd(i.floating):!1;if(l===d||f&&u)return r;let m={scrollLeft:0,scrollTop:0},v=ua(1);const y=ua(0),g=nl(l);if((g||!u)&&((os(l)!=="body"||Qd(d))&&(m=Zd(l)),g)){const b=Xl(l);v=es(l),y.x=b.x+l.clientLeft,y.y=b.y+l.clientTop}const x=d&&!g&&!u?uS(d,m):ua(0);return{width:r.width*v.x,height:r.height*v.y,x:r.x*v.x-m.scrollLeft*v.x+y.x+x.x,y:r.y*v.y-m.scrollTop*v.y+y.y+x.y}}function KR(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function ZR(e){const i=Zd(e),r=e.ownerDocument.body,l=ca(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=ca(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let u=-i.scrollLeft+Jd(e);const d=-i.scrollTop;return Pr(r).direction==="rtl"&&(u+=ca(e.clientWidth,r.clientWidth)-l),{width:l,height:s,x:u,y:d}}const JR=25;function WR(e,i,r){r===void 0&&(r="viewport");const l=r==="layoutViewport",s=ci(e),u=ma(e),d=s.visualViewport;let f=u.clientWidth,m=u.clientHeight,v=0,y=0;if(d){const x=!Rg()||i==="fixed";l?x||(v=-d.offsetLeft,y=-d.offsetTop):(f=d.width,m=d.height,x&&(v=d.offsetLeft,y=d.offsetTop))}if(Jd(u)<=0){const x=u.ownerDocument,b=x.body,w=getComputedStyle(b),k=x.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,C=Math.abs(u.clientWidth-b.clientWidth-k),E=getComputedStyle(u).scrollbarGutter==="stable both-edges"?C/2:C;E<=JR&&(f-=E)}return{width:f,height:m,x:v,y}}function eO(e,i){const r=Xl(e,!0,i==="fixed"),l=r.top+e.clientTop,s=r.left+e.clientLeft,u=es(e),d=e.clientWidth*u.x,f=e.clientHeight*u.y,m=s*u.x,v=l*u.y;return{width:d,height:f,x:m,y:v}}function Yb(e,i,r){let l;if(i==="viewport"||i==="layoutViewport")l=WR(e,r,i);else if(i==="document")l=ZR(ma(e));else if(Hr(i))l=eO(i,r);else{const s=cS(e);l={x:i.x-s.x,y:i.y-s.y,width:i.width,height:i.height}}return Rd(l)}function tO(e,i){const r=i.get(e);if(r)return r;let l=vc(e,[],!1).filter(f=>Hr(f)&&os(f)!=="body"),s=null;const u=Pr(e).position==="fixed";let d=u?Gl(e):e;for(;Hr(d)&&!gc(d);){const f=Pr(d),m=Mg(d),v=s?s.position:u?"fixed":"";!m&&(v==="fixed"||v==="absolute"&&f.position==="static")?l=l.filter(g=>g!==d):s=f,d=Gl(d)}return i.set(e,l),l}function nO(e){let{element:i,boundary:r,rootBoundary:l,strategy:s}=e;const d=[...r==="clippingAncestors"?Kd(i)?[]:tO(i,this._c):[].concat(r),l],f=Yb(i,d[0],s);let m=f.top,v=f.right,y=f.bottom,g=f.left;for(let x=1;x<d.length;x++){const b=Yb(i,d[x],s);m=ca(b.top,m),v=Wa(b.right,v),y=Wa(b.bottom,y),g=ca(b.left,g)}return{width:v-g,height:y-m,x:g,y:m}}function iO(e){const{width:i,height:r}=sS(e);return{width:i,height:r}}function rO(e,i,r){const l=nl(i),s=ma(i),u=r==="fixed",d=Xl(e,!0,u,i);let f={scrollLeft:0,scrollTop:0};const m=ua(0);if((l||!u)&&((os(i)!=="body"||Qd(s))&&(f=Zd(i)),l)){const x=Xl(i,!0,u,i);m.x=x.x+i.clientLeft,m.y=x.y+i.clientTop}!l&&s&&(m.x=Jd(s));const v=s&&!l&&!u?uS(s,f):ua(0),y=d.left+f.scrollLeft-m.x-v.x,g=d.top+f.scrollTop-m.y-v.y;return{x:y,y:g,width:d.width,height:d.height}}function $m(e){return Pr(e).position==="static"}function Gb(e,i){if(!nl(e)||Pr(e).position==="fixed")return null;if(i)return i(e);let r=e.offsetParent;return ma(e)===r&&(r=r.ownerDocument.body),r}function dS(e,i){const r=ci(e);if(Kd(e))return r;if(!nl(e)){let s=Gl(e);for(;s&&!gc(s);){if(Hr(s)&&!$m(s))return s;s=Gl(s)}return r}let l=Gb(e,i);for(;l&&FR(l)&&$m(l);)l=Gb(l,i);return l&&gc(l)&&$m(l)&&!Mg(l)?r:l||YR(e)||r}const aO=async function(e){const i=this.getOffsetParent||dS,r=this.getDimensions,l=await r(e.floating);return{reference:rO(e.reference,await i(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function lO(e){return Pr(e).direction==="rtl"}const oO={convertOffsetParentRelativeRectToViewportRelativeRect:QR,getDocumentElement:ma,getClippingRect:nO,getOffsetParent:dS,getElementRects:aO,getClientRects:KR,getDimensions:iO,getScale:es,isElement:Hr,isRTL:lO};function fS(e,i){return e.x===i.x&&e.y===i.y&&e.width===i.width&&e.height===i.height}function sO(e,i,r){let l=null,s;const u=ma(e);function d(){var y;clearTimeout(s),(y=l)==null||y.disconnect(),l=null}function f(y,g){y===void 0&&(y=!1),g===void 0&&(g=1),d();const x=e.getBoundingClientRect(),{left:b,top:w,width:k,height:C}=x;if(y||i(),!k||!C)return;const E=od(w),M=od(u.clientWidth-(b+k)),T=od(u.clientHeight-(w+C)),A=od(b),R={rootMargin:-E+"px "+-M+"px "+-T+"px "+-A+"px",threshold:ca(0,Wa(1,g))||1};let B=!0;function U($){const z=$[0].intersectionRatio;if(!fS(x,e.getBoundingClientRect()))return f();if(z!==g){if(!B)return f();z?f(!1,z):s=setTimeout(()=>{f(!1,1e-7)},1e3)}B=!1}try{l=new IntersectionObserver(U,{...R,root:u.ownerDocument})}catch{l=new IntersectionObserver(U,R)}l.observe(e)}const m=ci(e),v=()=>f(r);return m.addEventListener("resize",v),f(!0),()=>{m.removeEventListener("resize",v),d()}}function cO(e,i,r,l){l===void 0&&(l={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=l,v=Og(e),y=s||u?[...v?vc(v):[],...i?vc(i):[]]:[];y.forEach(E=>{s&&E.addEventListener("scroll",r),u&&E.addEventListener("resize",r)});const g=v&&f?sO(v,r,u):null;let x=-1,b=null;d&&(b=new ResizeObserver(E=>{let[M]=E;M&&M.target===v&&b&&i&&(b.unobserve(i),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(i)})),r()}),v&&!m&&b.observe(v),i&&b.observe(i));let w,k=m?Xl(e):null;m&&C();function C(){const E=Xl(e);k&&!fS(k,E)&&r(),k=E,w=requestAnimationFrame(C)}return r(),()=>{var E;y.forEach(M=>{s&&M.removeEventListener("scroll",r),u&&M.removeEventListener("resize",r)}),g==null||g(),(E=b)==null||E.disconnect(),b=null,m&&cancelAnimationFrame(w)}}const uO=HR,dO=PR,fO=LR,hO=qR,mO=IR,Xb=zR,pO=UR,gO=(e,i,r)=>{const l=new Map,s=r??{},u={...oO,...s.platform,_c:l};return DR(e,i,{...s,platform:u})};var vO=typeof document<"u",yO=function(){},Sd=vO?S.useLayoutEffect:yO;function Od(e,i){if(e===i)return!0;if(typeof e!=typeof i)return!1;if(typeof e=="function"&&e.toString()===i.toString())return!0;let r,l,s;if(e&&i&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==i.length)return!1;for(l=r;l--!==0;)if(!Od(e[l],i[l]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(i).length)return!1;for(l=r;l--!==0;)if(!{}.hasOwnProperty.call(i,s[l]))return!1;for(l=r;l--!==0;){const u=s[l];if(!(u==="_owner"&&e.$$typeof)&&!Od(e[u],i[u]))return!1}return!0}return e!==e&&i!==i}function hS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qb(e,i){const r=hS(e);return Math.round(i*r)/r}function Ym(e){const i=S.useRef(e);return Sd(()=>{i.current=e}),i}function xO(e){e===void 0&&(e={});const{placement:i="bottom",strategy:r="absolute",middleware:l=[],platform:s,elements:{reference:u,floating:d}={},transform:f=!0,whileElementsMounted:m,open:v}=e,[y,g]=S.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[x,b]=S.useState(l);Od(x,l)||b(l);const[w,k]=S.useState(null),[C,E]=S.useState(null),M=S.useCallback(F=>{F!==R.current&&(R.current=F,k(F))},[]),T=S.useCallback(F=>{F!==B.current&&(B.current=F,E(F))},[]),A=u||w,I=d||C,R=S.useRef(null),B=S.useRef(null),U=S.useRef(y),$=m!=null,z=Ym(m),Y=Ym(s),q=Ym(v),ee=S.useCallback(()=>{if(!R.current||!B.current)return;const F={placement:i,strategy:r,middleware:x};Y.current&&(F.platform=Y.current),gO(R.current,B.current,F).then(ne=>{const D={...ne,isPositioned:q.current!==!1};G.current&&!Od(U.current,D)&&(U.current=D,no.flushSync(()=>{g(D)}))})},[x,i,r,Y,q]);Sd(()=>{v===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[v]);const G=S.useRef(!1);Sd(()=>(G.current=!0,()=>{G.current=!1}),[]),Sd(()=>{if(A&&(R.current=A),I&&(B.current=I),A&&I){if(z.current)return z.current(A,I,ee);ee()}},[A,I,ee,z,$]);const H=S.useMemo(()=>({reference:R,floating:B,setReference:M,setFloating:T}),[M,T]),Q=S.useMemo(()=>({reference:A,floating:I}),[A,I]),O=S.useMemo(()=>{const F={position:r,left:0,top:0};if(!Q.floating)return F;const ne=Qb(Q.floating,y.x),D=Qb(Q.floating,y.y);return f?{...F,transform:"translate("+ne+"px, "+D+"px)",...hS(Q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ne,top:D}},[r,f,Q.floating,y.x,y.y]);return S.useMemo(()=>({...y,update:ee,refs:H,elements:Q,floatingStyles:O}),[y,ee,H,Q,O])}const bO=e=>{function i(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:l,padding:s}=typeof e=="function"?e(r):e;return l&&i(l)?l.current!=null?Xb({element:l.current,padding:s}).fn(r):{}:l?Xb({element:l,padding:s}).fn(r):{}}}},jO=(e,i)=>{const r=uO(e);return{name:r.name,fn:r.fn,options:[e,i]}},wO=(e,i)=>{const r=dO(e);return{name:r.name,fn:r.fn,options:[e,i]}},SO=(e,i)=>({fn:pO(e).fn,options:[e,i]}),kO=(e,i)=>{const r=fO(e);return{name:r.name,fn:r.fn,options:[e,i]}},CO=(e,i)=>{const r=hO(e);return{name:r.name,fn:r.fn,options:[e,i]}},NO=(e,i)=>{const r=mO(e);return{name:r.name,fn:r.fn,options:[e,i]}},EO=(e,i)=>{const r=bO(e);return{name:r.name,fn:r.fn,options:[e,i]}};var TO=Object.defineProperty,Za=(e,i)=>TO(e,"name",{value:i,configurable:!0}),mS="Popper",[pS,Wd]=tl(mS),[AO,gS]=pS(mS),MO=Za(e=>{const{__scopePopper:i,children:r}=e,[l,s]=S.useState(null),[u,d]=S.useState(void 0);return c.jsx(AO,{scope:i,anchor:l,onAnchorChange:s,placementState:u,setPlacementState:d,children:r})},"Popper"),RO="PopperAnchor",OO=S.forwardRef(Za(function(i,r){const{__scopePopper:l,virtualRef:s,...u}=i,d=gS(RO,l),f=S.useRef(null),m=d.onAnchorChange,v=S.useCallback(k=>{f.current=k,k&&m(k)},[m]),y=jt(r,v),g=S.useRef(null);S.useEffect(()=>{if(!s)return;const k=g.current;g.current=s.current,k!==g.current&&m(g.current)});const x=d.placementState&&ef(d.placementState),b=x==null?void 0:x[0],w=x==null?void 0:x[1];return s?null:c.jsx(zt.div,{"data-radix-popper-side":b,"data-radix-popper-align":w,...u,ref:y})},"PopperAnchor")),vS="PopperContent",[_O,RB]=pS(vS),DO=S.forwardRef(Za(function(i,r){var xe,oe,ce,me,Ne,ze,Ve;const{__scopePopper:l,side:s="bottom",sideOffset:u=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:x="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:k,...C}=i,E=gS(vS,l),[M,T]=S.useState(null),A=jt(r,T),[I,R]=S.useState(null),B=nS(I),U=(B==null?void 0:B.width)??0,$=(B==null?void 0:B.height)??0,z=s+(d!=="center"?"-"+d:""),Y=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},q=Array.isArray(y)?y:[y],ee=q.length>0,G={padding:Y,boundary:q.filter(yS),altBoundary:ee},{refs:H,floatingStyles:Q,placement:O,isPositioned:F,middlewareData:ne}=xO({strategy:"fixed",placement:z,whileElementsMounted:Za((...ht)=>cO(...ht,{animationFrame:w==="always"}),"whileElementsMounted"),elements:{reference:E.anchor},middleware:[jO({mainAxis:u+$,alignmentAxis:f}),v&&wO({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?SO():void 0,...G}),v&&kO({...G}),CO({...G,apply:Za(({elements:ht,rects:ot,availableWidth:Je,availableHeight:At})=>{const{width:gn,height:vn}=ot.reference,Pn=ht.floating.style;Pn.setProperty("--radix-popper-available-width",`${Je}px`),Pn.setProperty("--radix-popper-available-height",`${At}px`),Pn.setProperty("--radix-popper-anchor-width",`${gn}px`),Pn.setProperty("--radix-popper-anchor-height",`${vn}px`)},"apply")}),I&&EO({element:I,padding:m}),zO({arrowWidth:U,arrowHeight:$}),b&&NO({strategy:"referenceHidden",...G,boundary:ee?G.boundary:void 0})]}),D=E.setPlacementState;Mn(()=>(D(O),()=>{D(void 0)}),[O,D]);const[J,W]=ef(O),P=An(k);Mn(()=>{F&&(P==null||P())},[F,P]);const V=(xe=ne.arrow)==null?void 0:xe.x,fe=(oe=ne.arrow)==null?void 0:oe.y,ye=((ce=ne.arrow)==null?void 0:ce.centerOffset)!==0,[je,ae]=S.useState();return Mn(()=>{M&&ae(window.getComputedStyle(M).zIndex)},[M]),c.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:F?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(me=ne.transformOrigin)==null?void 0:me.x,(Ne=ne.transformOrigin)==null?void 0:Ne.y].join(" "),...((ze=ne.hide)==null?void 0:ze.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:i.dir,children:c.jsx(_O,{scope:l,placedSide:J,placedAlign:W,onArrowChange:R,arrowX:V,arrowY:fe,shouldHideArrow:ye,children:c.jsx(zt.div,{"data-side":J,"data-align":W,...C,ref:A,style:{...C.style,animation:F?(Ve=C.style)==null?void 0:Ve.animation:"none"}})})})},"PopperContent"));function yS(e){return e!==null}Za(yS,"isNotNull");var zO=Za(e=>({name:"transformOrigin",options:e,fn(i){var C,E,M;const{placement:r,rects:l,middlewareData:s}=i,d=((C=s.arrow)==null?void 0:C.centerOffset)!==0,f=d?0:e.arrowWidth,m=d?0:e.arrowHeight,[v,y]=ef(r),g={start:"0%",center:"50%",end:"100%"}[y],x=(((E=s.arrow)==null?void 0:E.x)??0)+f/2,b=(((M=s.arrow)==null?void 0:M.y)??0)+m/2;let w="",k="";return v==="bottom"?(w=d?g:`${x}px`,k=`${-m}px`):v==="top"?(w=d?g:`${x}px`,k=`${l.floating.height+m}px`):v==="right"?(w=`${-m}px`,k=d?g:`${b}px`):v==="left"&&(w=`${l.floating.width+m}px`,k=d?g:`${b}px`),{data:{x:w,y:k}}}}),"transformOrigin");function ef(e){const[i,r="center"]=e.split("-");return[i,r]}Za(ef,"getSideAndAlignFromPlacement");var xS=MO,bS=OO,jS=DO,LO=Object.defineProperty,IO=(e,i)=>LO(e,"name",{value:i,configurable:!0}),BO=S.forwardRef(IO(function(i,r){return c.jsx(zt.label,{...i,ref:r,onMouseDown:l=>{var u;l.target.closest("button, input, select, textarea")||((u=i.onMouseDown)==null||u.call(i,l),!l.defaultPrevented&&l.detail>1&&l.preventDefault())}})},"Label")),HO=BO,PO=Object.defineProperty,UO=(e,i)=>PO(e,"name",{value:i,configurable:!0});function wS(e){const i=S.useRef({value:e,previous:e});return S.useMemo(()=>(i.current.value!==e&&(i.current.previous=i.current.value,i.current.value=e),i.current.previous),[e])}UO(wS,"usePrevious");var qO=Object.defineProperty,FO=(e,i)=>qO(e,"name",{value:i,configurable:!0});function _d(e,[i,r]){return Math.min(r,Math.max(i,e))}FO(_d,"clamp");var VO=Object.defineProperty,il=(e,i)=>VO(e,"name",{value:i,configurable:!0}),_g="Popover",[SS,OB]=tl(_g,[Wd]),Dg=Wd(),[$O,ss]=SS(_g),YO=il(e=>{const{__scopePopover:i,children:r,open:l,defaultOpen:s,onOpenChange:u,modal:d=!1}=e,f=Dg(i),m=S.useRef(null),[v,y]=S.useState(!1),[g,x]=mc({prop:l,defaultProp:s??!1,onChange:u,caller:_g});return c.jsx(xS,{...f,children:c.jsx($O,{scope:i,contentId:Vl(),triggerRef:m,open:g,onOpenChange:x,onOpenToggle:S.useCallback(()=>x(b=>!b),[x]),hasCustomAnchor:v,onCustomAnchorAdd:S.useCallback(()=>y(!0),[]),onCustomAnchorRemove:S.useCallback(()=>y(!1),[]),modal:d,children:r})})},"Popover"),GO="PopoverTrigger",XO=S.forwardRef(il(function(i,r){const{__scopePopover:l,...s}=i,u=ss(GO,l),d=Dg(l),f=jt(r,u.triggerRef),m=c.jsx(zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":zg(u.open),...s,ref:f,onClick:mt(i.onClick,u.onOpenToggle)});return u.hasCustomAnchor?m:c.jsx(bS,{asChild:!0,...d,children:m})},"PopoverTrigger")),kS="PopoverPortal",[QO,KO]=SS(kS,{forceMount:void 0}),ZO=il(e=>{const{__scopePopover:i,forceMount:r,children:l,container:s}=e,u=ss(kS,i);return c.jsx(QO,{scope:i,forceMount:r,children:c.jsx(Vr,{present:r||u.open,children:c.jsx(wg,{asChild:!0,container:s,children:l})})})},"PopoverPortal"),yc="PopoverContent",JO=S.forwardRef(il(function(i,r){const l=KO(yc,i.__scopePopover),{forceMount:s=l.forceMount,...u}=i,d=ss(yc,i.__scopePopover);return c.jsx(Vr,{present:s||d.open,children:d.modal?c.jsx(e_,{...u,ref:r}):c.jsx(t_,{...u,ref:r})})},"PopoverContent")),WO=Br("PopoverContent.RemoveScroll"),e_=S.forwardRef(il(function(i,r){const l=ss(yc,i.__scopePopover),s=S.useRef(null),u=jt(r,s),d=S.useRef(!1);return S.useEffect(()=>{const f=s.current;if(f)return kg(f)},[]),c.jsx(Gd,{as:WO,allowPinchZoom:!0,children:c.jsx(CS,{...i,ref:u,trapFocus:l.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(i.onCloseAutoFocus,f=>{var m;f.preventDefault(),d.current||(m=l.triggerRef.current)==null||m.focus()}),onPointerDownOutside:mt(i.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:mt(i.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),t_=S.forwardRef(il(function(i,r){const l=ss(yc,i.__scopePopover),s=S.useRef(!1),u=S.useRef(!1);return c.jsx(CS,{...i,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=i.onCloseAutoFocus)==null||f.call(i,d),d.defaultPrevented||(s.current||(m=l.triggerRef.current)==null||m.focus(),d.preventDefault()),s.current=!1,u.current=!1},onInteractOutside:d=>{var v,y;(v=i.onInteractOutside)==null||v.call(i,d),d.defaultPrevented||(s.current=!0,d.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const f=d.target;((y=l.triggerRef.current)==null?void 0:y.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&u.current&&d.preventDefault()}})},"PopoverContentNonModal")),CS=S.forwardRef(il(function(i,r){const{__scopePopover:l,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:g,...x}=i,b=ss(yc,l),w=Dg(l);return Ec(),c.jsx(bg,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:u,onUnmountAutoFocus:d,children:c.jsx(yg,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:g,onEscapeKeyDown:m,onPointerDownOutside:v,onFocusOutside:y,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:c.jsx(jS,{"data-state":zg(b.open),role:"dialog",id:b.contentId,...w,...x,ref:r,style:{...x.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 zg(e){return e?"open":"closed"}il(zg,"getState");var n_=YO,i_=XO,r_=ZO,a_=JO,l_=Object.defineProperty,rt=(e,i)=>l_(e,"name",{value:i,configurable:!0});function NS(e,i){return S.useReducer((r,l)=>i[r][l]??r,e)}rt(NS,"useStateMachine");var ES="ScrollArea",[TS,_B]=tl(ES),[o_,$i]=TS(ES),s_=S.forwardRef(rt(function(i,r){const{__scopeScrollArea:l,type:s="hover",dir:u,scrollHideDelay:d=600,...f}=i,[m,v]=S.useState(null),[y,g]=S.useState(null),[x,b]=S.useState(null),[w,k]=S.useState(null),[C,E]=S.useState(null),[M,T]=S.useState(0),[A,I]=S.useState(0),[R,B]=S.useState(!1),[U,$]=S.useState(!1),z=jt(r,v),Y=vg(u);return c.jsx(o_,{scope:l,type:s,dir:Y,scrollHideDelay:d,scrollArea:m,viewport:y,onViewportChange:g,content:x,onContentChange:b,scrollbarX:w,onScrollbarXChange:k,scrollbarXEnabled:R,onScrollbarXEnabledChange:B,scrollbarY:C,onScrollbarYChange:E,scrollbarYEnabled:U,onScrollbarYEnabledChange:$,onCornerWidthChange:T,onCornerHeightChange:I,children:c.jsx(zt.div,{dir:Y,...f,ref:z,style:{position:"relative","--radix-scroll-area-corner-width":M+"px","--radix-scroll-area-corner-height":A+"px",...i.style}})})},"ScrollArea")),c_="ScrollAreaViewport",u_=S.forwardRef(rt(function(i,r){const{__scopeScrollArea:l,children:s,nonce:u,...d}=i,f=$i(c_,l),m=S.useRef(null),v=jt(r,m,f.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx(d_,{nonce:u}),c.jsx(zt.div,{"data-radix-scroll-area-viewport":"",...d,ref:v,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...i.style},children:c.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})},"ScrollAreaViewport")),d_=S.memo(rt(function({nonce:i}){return c.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:i})},"ScrollAreaViewportStyle"),(e,i)=>e.nonce===i.nonce),pa="ScrollAreaScrollbar",f_=S.forwardRef(rt(function(i,r){const{forceMount:l,...s}=i,u=$i(pa,i.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=u,m=i.orientation==="horizontal";return S.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),u.type==="hover"?c.jsx(h_,{...s,ref:r,forceMount:l}):u.type==="scroll"?c.jsx(m_,{...s,ref:r,forceMount:l}):u.type==="auto"?c.jsx(AS,{...s,ref:r,forceMount:l}):u.type==="always"?c.jsx(Lg,{...s,ref:r,"data-state":"visible"}):null},"ScrollAreaScrollbar")),h_=S.forwardRef(rt(function(i,r){const{forceMount:l,...s}=i,u=$i(pa,i.__scopeScrollArea),[d,f]=S.useState(!1);return S.useEffect(()=>{const m=u.scrollArea;let v=0;if(m){const y=rt(()=>{window.clearTimeout(v),f(!0)},"handlePointerEnter"),g=rt(()=>{v=window.setTimeout(()=>f(!1),u.scrollHideDelay)},"handlePointerLeave");return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",g),()=>{window.clearTimeout(v),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",g)}}},[u.scrollArea,u.scrollHideDelay]),c.jsx(Vr,{present:l||d,children:c.jsx(AS,{"data-state":d?"visible":"hidden",...s,ref:r})})},"ScrollAreaScrollbarHover")),m_=S.forwardRef(rt(function(i,r){const{forceMount:l,...s}=i,u=$i(pa,i.__scopeScrollArea),d=i.orientation==="horizontal",f=Ac(()=>v("SCROLL_END"),100),[m,v]=NS("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 S.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>v("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,v]),S.useEffect(()=>{const y=u.viewport,g=d?"scrollLeft":"scrollTop";if(y){let x=y[g];const b=rt(()=>{const w=y[g];x!==w&&(v("SCROLL"),f()),x=w},"handleScroll");return y.addEventListener("scroll",b),()=>y.removeEventListener("scroll",b)}},[u.viewport,d,v,f]),c.jsx(Vr,{present:l||m!=="hidden",children:c.jsx(Lg,{"data-state":m==="hidden"?"hidden":"visible",...s,ref:r,onPointerEnter:mt(i.onPointerEnter,()=>v("POINTER_ENTER")),onPointerLeave:mt(i.onPointerLeave,()=>v("POINTER_LEAVE"))})})},"ScrollAreaScrollbarScroll")),AS=S.forwardRef(rt(function(i,r){const l=$i(pa,i.__scopeScrollArea),{forceMount:s,...u}=i,[d,f]=S.useState(!1),m=i.orientation==="horizontal",v=Ac(()=>{if(l.viewport){const y=l.viewport.offsetWidth<l.viewport.scrollWidth,g=l.viewport.offsetHeight<l.viewport.scrollHeight;f(m?y:g)}},10);return Ql(l.viewport,v),Ql(l.content,v),c.jsx(Vr,{present:s||d,children:c.jsx(Lg,{"data-state":d?"visible":"hidden",...u,ref:r})})},"ScrollAreaScrollbarAuto")),Lg=S.forwardRef(rt(function(i,r){const{orientation:l="vertical",...s}=i,u=$i(pa,i.__scopeScrollArea),d=S.useRef(null),f=S.useRef(0),[m,v]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=Ig(m.viewport,m.content),g={...s,sizes:m,onSizesChange:v,hasThumb:y>0&&y<1,onThumbChange:rt(b=>d.current=b,"onThumbChange"),onThumbPointerUp:rt(()=>f.current=0,"onThumbPointerUp"),onThumbPointerDown:rt(b=>f.current=b,"onThumbPointerDown")};function x(b,w){return _S(b,f.current,m,w)}return rt(x,"getScrollPosition"),l==="horizontal"?c.jsx(p_,{...g,ref:r,onThumbPositionChange:()=>{if(u.viewport&&d.current){const b=u.viewport.scrollLeft,w=Vp(b,m,u.dir);d.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{u.viewport&&(u.viewport.scrollLeft=b)},onDragScroll:b=>{u.viewport&&(u.viewport.scrollLeft=x(b,u.dir))}}):l==="vertical"?c.jsx(g_,{...g,ref:r,onThumbPositionChange:()=>{if(u.viewport&&d.current){const b=u.viewport.scrollTop,w=Vp(b,m);d.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{u.viewport&&(u.viewport.scrollTop=b)},onDragScroll:b=>{u.viewport&&(u.viewport.scrollTop=x(b))}}):null},"ScrollAreaScrollbarVisible")),p_=S.forwardRef(rt(function(i,r){const{sizes:l,onSizesChange:s,...u}=i,d=$i(pa,i.__scopeScrollArea),[f,m]=S.useState(),v=S.useRef(null),y=jt(r,v,d.onScrollbarXChange);return S.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),c.jsx(RS,{"data-orientation":"horizontal",...u,ref:y,sizes:l,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":Tc(l)+"px",...i.style},onThumbPointerDown:g=>i.onThumbPointerDown(g.x),onDragScroll:g=>i.onDragScroll(g.x),onWheelScroll:(g,x)=>{if(d.viewport){const b=d.viewport.scrollLeft+g.deltaX;i.onWheelScroll(b),Hg(b,x)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&s({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:v.current.clientWidth,paddingStart:xc(f.paddingLeft),paddingEnd:xc(f.paddingRight)}})}})},"ScrollAreaScrollbarX")),g_=S.forwardRef(rt(function(i,r){const{sizes:l,onSizesChange:s,...u}=i,d=$i(pa,i.__scopeScrollArea),[f,m]=S.useState(),v=S.useRef(null),y=jt(r,v,d.onScrollbarYChange);return S.useEffect(()=>{v.current&&m(getComputedStyle(v.current))},[v]),c.jsx(RS,{"data-orientation":"vertical",...u,ref:y,sizes:l,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":Tc(l)+"px",...i.style},onThumbPointerDown:g=>i.onThumbPointerDown(g.y),onDragScroll:g=>i.onDragScroll(g.y),onWheelScroll:(g,x)=>{if(d.viewport){const b=d.viewport.scrollTop+g.deltaY;i.onWheelScroll(b),Hg(b,x)&&g.preventDefault()}},onResize:()=>{v.current&&d.viewport&&f&&s({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:v.current.clientHeight,paddingStart:xc(f.paddingTop),paddingEnd:xc(f.paddingBottom)}})}})},"ScrollAreaScrollbarY")),[v_,MS]=TS(pa),RS=S.forwardRef(rt(function(i,r){const{__scopeScrollArea:l,sizes:s,hasThumb:u,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:v,onDragScroll:y,onWheelScroll:g,onResize:x,...b}=i,w=$i(pa,l),[k,C]=S.useState(null),E=jt(r,C),M=S.useRef(null),T=S.useRef(""),A=w.viewport,I=s.content-s.viewport,R=An(g),B=An(v),U=Ac(x,10);function $(z){if(M.current){const Y=z.clientX-M.current.left,q=z.clientY-M.current.top;y({x:Y,y:q})}}return rt($,"handleDragScroll"),S.useEffect(()=>{const z=rt(Y=>{const q=Y.target;(k==null?void 0:k.contains(q))&&R(Y,I)},"handleWheel");return document.addEventListener("wheel",z,{passive:!1}),()=>document.removeEventListener("wheel",z,{passive:!1})},[A,k,I,R]),S.useEffect(B,[s,B]),Ql(k,U),Ql(w.content,U),c.jsx(v_,{scope:l,scrollbar:k,hasThumb:u,onThumbChange:An(d),onThumbPointerUp:An(f),onThumbPositionChange:B,onThumbPointerDown:An(m),children:c.jsx(zt.div,{...b,ref:E,style:{position:"absolute",...b.style},onPointerDown:mt(i.onPointerDown,z=>{z.button===0&&(z.target.setPointerCapture(z.pointerId),M.current=k.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),$(z))}),onPointerMove:mt(i.onPointerMove,$),onPointerUp:mt(i.onPointerUp,z=>{const Y=z.target;Y.hasPointerCapture(z.pointerId)&&Y.releasePointerCapture(z.pointerId),document.body.style.webkitUserSelect=T.current,w.viewport&&(w.viewport.style.scrollBehavior=""),M.current=null})})})},"ScrollAreaScrollbarImpl")),Fp="ScrollAreaThumb",y_=S.forwardRef(rt(function(i,r){const{forceMount:l,...s}=i,u=MS(Fp,i.__scopeScrollArea);return c.jsx(Vr,{present:l||u.hasThumb,children:c.jsx(x_,{ref:r,...s})})},"ScrollAreaThumb")),x_=S.forwardRef(rt(function(i,r){const{__scopeScrollArea:l,style:s,...u}=i,d=$i(Fp,l),f=MS(Fp,l),{onThumbPositionChange:m}=f,v=jt(r,f.onThumbChange),y=S.useRef(void 0),g=Ac(()=>{y.current&&(y.current(),y.current=void 0)},100);return S.useEffect(()=>{const x=d.viewport;if(x){const b=rt(()=>{if(g(),!y.current){const w=w_(x,m);y.current=w,m()}},"handleScroll");return m(),x.addEventListener("scroll",b),()=>x.removeEventListener("scroll",b)}},[d.viewport,g,m]),c.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)",...s},onPointerDownCapture:mt(i.onPointerDownCapture,x=>{const w=x.target.getBoundingClientRect(),k=x.clientX-w.left,C=x.clientY-w.top;f.onThumbPointerDown({x:k,y:C})}),onPointerUp:mt(i.onPointerUp,f.onThumbPointerUp)})},"ScrollAreaThumbImpl")),OS="ScrollAreaCorner",b_=S.forwardRef(rt(function(i,r){const l=$i(OS,i.__scopeScrollArea),s=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&s?c.jsx(j_,{...i,ref:r}):null},"ScrollAreaCorner")),j_=S.forwardRef(rt(function(i,r){const{__scopeScrollArea:l,...s}=i,u=$i(OS,l),[d,f]=S.useState(0),[m,v]=S.useState(0),y=!!(d&&m),{onCornerWidthChange:g,onCornerHeightChange:x}=u;return Ql(u.scrollbarX,()=>{var w;const b=((w=u.scrollbarX)==null?void 0:w.offsetHeight)||0;u.onCornerHeightChange(b),v(b)}),Ql(u.scrollbarY,()=>{var w;const b=((w=u.scrollbarY)==null?void 0:w.offsetWidth)||0;u.onCornerWidthChange(b),f(b)}),S.useEffect(()=>()=>{g(0),x(0)},[g,x]),y?c.jsx(zt.div,{...s,ref:r,style:{width:d,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...i.style}}):null},"ScrollAreaCornerImpl"));function xc(e){return e?parseInt(e,10):0}rt(xc,"toInt");function Ig(e,i){const r=e/i;return isNaN(r)?0:r}rt(Ig,"getThumbRatio");function Tc(e){const i=Ig(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=(e.scrollbar.size-r)*i;return Math.max(l,18)}rt(Tc,"getThumbSize");function _S(e,i,r,l="ltr"){const s=Tc(r),u=s/2,d=i||u,f=s-d,m=r.scrollbar.paddingStart+d,v=r.scrollbar.size-r.scrollbar.paddingEnd-f,y=r.content-r.viewport,g=l==="ltr"?[0,y]:[y*-1,0];return Bg([m,v],g)(e)}rt(_S,"getScrollPositionFromPointer");function Vp(e,i,r="ltr"){const l=Tc(i),s=i.scrollbar.paddingStart+i.scrollbar.paddingEnd,u=i.scrollbar.size-s,d=i.content-i.viewport,f=u-l,m=r==="ltr"?[0,d]:[d*-1,0],v=_d(e,m);return Bg([0,d],[0,f])(v)}rt(Vp,"getThumbOffsetFromScroll");function Bg(e,i){return r=>{if(e[0]===e[1]||i[0]===i[1])return i[0];const l=(i[1]-i[0])/(e[1]-e[0]);return i[0]+l*(r-e[0])}}rt(Bg,"linearScale");function Hg(e,i){return e>0&&e<i}rt(Hg,"isScrollingWithinScrollbarBounds");var w_=rt((e,i=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},l=0;return rt((function s(){const u={left:e.scrollLeft,top:e.scrollTop},d=r.left!==u.left,f=r.top!==u.top;(d||f)&&i(),r=u,l=window.requestAnimationFrame(s)}),"loop")(),()=>window.cancelAnimationFrame(l)},"addUnlinkedScrollListener");function Ac(e,i){const r=An(e),l=S.useRef(0);return S.useEffect(()=>()=>window.clearTimeout(l.current),[]),S.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(r,i)},[r,i])}rt(Ac,"useDebounceCallback");function Ql(e,i){const r=An(i);Mn(()=>{let l=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(l),s.unobserve(e)}}},[e,r])}rt(Ql,"useResizeObserver");var S_=s_,k_=u_,C_=b_,N_=Object.defineProperty,St=(e,i)=>N_(e,"name",{value:i,configurable:!0}),E_=[" ","Enter","ArrowUp","ArrowDown"],T_=[" ","Enter"],ns="Select",[tf,Pg,A_]=xw(ns),[io,DB]=tl(ns,[A_,Wd]),Ug=Wd(),[M_,rl]=io(ns),[R_,O_]=io(ns);function DS(e){const{__scopeSelect:i,children:r,open:l,defaultOpen:s,onOpenChange:u,value:d,defaultValue:f,onValueChange:m,dir:v,name:y,autoComplete:g,disabled:x,required:b,form:w,internal_do_not_use_render:k}=e,C=Ug(i),[E,M]=S.useState(null),[T,A]=S.useState(null),[I,R]=S.useState(!1),B=vg(v),[U,$]=mc({prop:l,defaultProp:s??!1,onChange:u,caller:ns}),[z,Y]=mc({prop:d,defaultProp:f,onChange:m,caller:ns}),q=S.useRef(null),ee=S.useRef(z);S.useEffect(()=>{const W=w?E==null?void 0:E.ownerDocument.getElementById(w):E==null?void 0:E.form;if(W instanceof HTMLFormElement){const P=St(()=>Y(ee.current),"reset");return W.addEventListener("reset",P),()=>W.removeEventListener("reset",P)}},[w,E,Y]);const G=E?!!w||!!E.closest("form"):!0,[H,Q]=S.useState(new Set),O=Vl(),F=Array.from(H).map(W=>W.props.value).join(";"),ne=S.useCallback(W=>{Q(P=>new Set(P).add(W))},[]),D=S.useCallback(W=>{Q(P=>{const V=new Set(P);return V.delete(W),V})},[]),J={required:b,trigger:E,onTriggerChange:M,valueNode:T,onValueNodeChange:A,valueNodeHasChildren:I,onValueNodeHasChildrenChange:R,contentId:O,value:z,onValueChange:Y,open:U,onOpenChange:$,dir:B,triggerPointerDownPosRef:q,disabled:x,name:y,autoComplete:g,form:w,nativeOptions:H,nativeSelectKey:F,isFormControl:G};return c.jsx(xS,{...C,children:c.jsx(M_,{scope:i,...J,children:c.jsx(tf.Provider,{scope:i,children:c.jsx(R_,{scope:i,onNativeOptionAdd:ne,onNativeOptionRemove:D,children:IS(k)?k(J):r})})})})}St(DS,"SelectProvider");var __=St(e=>{const{__scopeSelect:i,children:r,...l}=e;return c.jsx(DS,{__scopeSelect:i,...l,internal_do_not_use_render:({isFormControl:s})=>c.jsxs(c.Fragment,{children:[r,s?c.jsx(r3,{__scopeSelect:i}):null]})})},"Select"),D_="SelectTrigger",z_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,disabled:s=!1,...u}=i,d=Ug(l),f=rl(D_,l),m=f.disabled||s,v=jt(r,f.onTriggerChange),y=Pg(l),g=S.useRef("touch"),[x,b,w]=qg(C=>{const E=y().filter(A=>!A.disabled),M=E.find(A=>A.value===f.value),T=Fg(E,C,M);T!==void 0&&f.onValueChange(T.value)}),k=St(C=>{m||(f.onOpenChange(!0),w()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})},"handleOpen");return c.jsx(bS,{asChild:!0,...d,children:c.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":Mc(f.value)?"":void 0,...u,ref:v,onClick:mt(u.onClick,C=>{C.currentTarget.focus(),g.current!=="mouse"&&k(C)}),onPointerDown:mt(u.onPointerDown,C=>{g.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:mt(u.onKeyDown,C=>{const E=x.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&b(C.key),!(E&&C.key===" ")&&E_.includes(C.key)&&(k(),C.preventDefault())})})})},"SelectTrigger")),L_="SelectValue",I_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,className:s,style:u,children:d,placeholder:f="",...m}=i,v=rl(L_,l),{onValueNodeHasChildrenChange:y}=v,g=d!==void 0,x=jt(r,v.onValueNodeChange);Mn(()=>{y(g)},[y,g]);const b=Mc(v.value);return c.jsx(zt.span,{...m,asChild:b?!1:m.asChild,ref:x,style:{pointerEvents:"none"},children:c.jsx(S.Fragment,{children:b?f:d},b?"placeholder":"value")})},"SelectValue")),B_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,children:s,...u}=i;return c.jsx(zt.span,{"aria-hidden":!0,...u,ref:r,children:s||"▼"})},"SelectIcon")),H_="SelectPortal",[P_,U_]=io(H_,{forceMount:void 0}),q_=St(e=>{const{__scopeSelect:i,forceMount:r,...l}=e;return c.jsx(P_,{scope:e.__scopeSelect,forceMount:r,children:c.jsx(wg,{asChild:!0,...l})})},"SelectPortal"),Kl="SelectContent",F_=S.forwardRef(St(function(i,r){const l=U_(Kl,i.__scopeSelect),{forceMount:s=l.forceMount,...u}=i,d=rl(Kl,i.__scopeSelect),[f,m]=S.useState();return Mn(()=>{m(new DocumentFragment)},[]),c.jsx(Vr,{present:s||d.open,children:({present:v})=>v?c.jsx(Y_,{...u,ref:r}):c.jsx(V_,{...u,fragment:f})})},"SelectContent")),V_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,children:s,fragment:u}=i;return u?no.createPortal(c.jsx(zS,{scope:l,children:c.jsx(tf.Slot,{scope:l,children:c.jsx("div",{ref:r,children:s})})}),u):null},"SelectContentFragment")),ir=10,[zS,nf]=io(Kl),$_=Br("SelectContent.RemoveScroll"),Y_=S.forwardRef(St(function(i,r){const{__scopeSelect:l}=i,{position:s="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:x,collisionBoundary:b,collisionPadding:w,sticky:k,hideWhenDetached:C,avoidCollisions:E,...M}=i,T=rl(Kl,l),[A,I]=S.useState(null),[R,B]=S.useState(null),U=jt(r,I),[$,z]=S.useState(null),[Y,q]=S.useState(null),ee=Pg(l),[G,H]=S.useState(!1),Q=S.useRef(!1);S.useEffect(()=>{if(A)return kg(A)},[A]),Ec();const O=S.useCallback(ae=>{const[xe,...oe]=ee().map(Ne=>Ne.ref.current),[ce]=oe.slice(-1),me=document.activeElement;for(const Ne of ae)if(Ne===me||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===xe&&R&&(R.scrollTop=0),Ne===ce&&R&&(R.scrollTop=R.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==me))return},[ee,R]),F=S.useCallback(()=>O([$,A]),[O,$,A]);S.useEffect(()=>{G&&F()},[G,F]);const{onOpenChange:ne,triggerPointerDownPosRef:D}=T;S.useEffect(()=>{if(A){let ae={x:0,y:0};const xe=St(ce=>{var me,Ne;ae={x:Math.abs(Math.round(ce.pageX)-(((me=D.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ce.pageY)-(((Ne=D.current)==null?void 0:Ne.y)??0))}},"handlePointerMove"),oe=St(ce=>{ae.x<=10&&ae.y<=10?ce.preventDefault():ce.composedPath().includes(A)||ne(!1),document.removeEventListener("pointermove",xe),D.current=null},"handlePointerUp");return D.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",oe,{capture:!0})}}},[A,ne,D]),S.useEffect(()=>{const ae=St(()=>ne(!1),"close");return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[ne]);const[J,W]=qg(ae=>{const xe=ee().filter(me=>!me.disabled),oe=xe.find(me=>me.ref.current===document.activeElement),ce=Fg(xe,ae,oe);ce&&setTimeout(()=>{var me;return(me=ce.ref.current)==null?void 0:me.focus()})}),P=S.useCallback((ae,xe,oe)=>{const ce=!Q.current&&!oe;(T.value!==void 0&&T.value===xe||ce)&&(z(ae),ce&&(Q.current=!0))},[T.value]),V=S.useCallback(()=>A==null?void 0:A.focus(),[A]),fe=S.useCallback((ae,xe,oe)=>{const ce=!Q.current&&!oe;(T.value!==void 0&&T.value===xe||ce)&&q(ae)},[T.value]),ye=s==="popper"?Kb:G_,je=ye===Kb?{side:m,sideOffset:v,align:y,alignOffset:g,arrowPadding:x,collisionBoundary:b,collisionPadding:w,sticky:k,hideWhenDetached:C,avoidCollisions:E}:{};return c.jsx(zS,{scope:l,content:A,viewport:R,onViewportChange:B,itemRefCallback:P,selectedItem:$,onItemLeave:V,itemTextRefCallback:fe,focusSelectedItem:F,selectedItemText:Y,position:s,isPositioned:G,searchRef:J,children:c.jsx(Gd,{as:$_,allowPinchZoom:!0,children:c.jsx(bg,{asChild:!0,trapped:T.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:mt(u,ae=>{var xe;(xe=T.trigger)==null||xe.focus({preventScroll:!0}),ae.preventDefault()}),children:c.jsx(yg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:c.jsx(ye,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:ae=>ae.preventDefault(),...M,...je,onPlaced:()=>H(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:mt(M.onKeyDown,ae=>{const xe=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!xe&&ae.key.length===1&&W(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let ce=ee().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const me=ae.target,Ne=ce.indexOf(me);ce=ce.slice(Ne+1)}setTimeout(()=>O(ce)),ae.preventDefault()}})})})})})})},"SelectContentImpl")),G_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,onPlaced:s,...u}=i,d=rl(Kl,l),f=nf(Kl,l),[m,v]=S.useState(null),[y,g]=S.useState(null),x=jt(r,g),b=Pg(l),w=S.useRef(!1),k=S.useRef(!0),{viewport:C,selectedItem:E,selectedItemText:M,focusSelectedItem:T}=f,A=S.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&y&&C&&E&&M){const U=d.trigger.getBoundingClientRect(),$=y.getBoundingClientRect(),z=d.valueNode.getBoundingClientRect(),Y=M.getBoundingClientRect();if(d.dir!=="rtl"){const me=Y.left-$.left,Ne=z.left-me,ze=U.left-Ne,Ve=U.width+ze,ht=Math.max(Ve,$.width),ot=window.innerWidth-ir,Je=_d(Ne,[ir,Math.max(ir,ot-ht)]);m.style.minWidth=Ve+"px",m.style.left=Je+"px"}else{const me=$.right-Y.right,Ne=window.innerWidth-z.right-me,ze=window.innerWidth-U.right-Ne,Ve=U.width+ze,ht=Math.max(Ve,$.width),ot=window.innerWidth-ir,Je=_d(Ne,[ir,Math.max(ir,ot-ht)]);m.style.minWidth=Ve+"px",m.style.right=Je+"px"}const q=b(),ee=window.innerHeight-ir*2,G=C.scrollHeight,H=window.getComputedStyle(y),Q=parseInt(H.borderTopWidth,10),O=parseInt(H.paddingTop,10),F=parseInt(H.borderBottomWidth,10),ne=parseInt(H.paddingBottom,10),D=Q+O+G+ne+F,J=Math.min(E.offsetHeight*5,D),W=window.getComputedStyle(C),P=parseInt(W.paddingTop,10),V=parseInt(W.paddingBottom,10),fe=U.top+U.height/2-ir,ye=ee-fe,je=E.offsetHeight/2,ae=E.offsetTop+je,xe=Q+O+ae,oe=D-xe;if(xe<=fe){const me=q.length>0&&E===q[q.length-1].ref.current;m.style.bottom="0px";const Ne=y.clientHeight-C.offsetTop-C.offsetHeight,ze=Math.max(ye,je+(me?V:0)+Ne+F),Ve=xe+ze;m.style.height=Ve+"px"}else{const me=q.length>0&&E===q[0].ref.current;m.style.top="0px";const ze=Math.max(fe,Q+C.offsetTop+(me?P:0)+je)+oe;m.style.height=ze+"px",C.scrollTop=xe-fe+C.offsetTop}m.style.margin=`${ir}px 0`,m.style.minHeight=J+"px",m.style.maxHeight=ee+"px",s==null||s(),requestAnimationFrame(()=>w.current=!0)}},[b,d.trigger,d.valueNode,m,y,C,E,M,d.dir,s]);Mn(()=>A(),[A]);const[I,R]=S.useState();Mn(()=>{y&&R(window.getComputedStyle(y).zIndex)},[y]);const B=S.useCallback(U=>{U&&k.current===!0&&(A(),T==null||T(),k.current=!1)},[A,T]);return c.jsx(X_,{scope:l,contentWrapper:m,shouldExpandOnScrollRef:w,onScrollButtonChange:B,children:c.jsx("div",{ref:v,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:I},children:c.jsx(zt.div,{...u,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})},"SelectItemAlignedPosition")),Kb=S.forwardRef(St(function(i,r){const{__scopeSelect:l,align:s="start",collisionPadding:u=ir,...d}=i,f=Ug(l);return c.jsx(jS,{...f,...d,ref:r,align:s,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")),[X_,Q_]=io(Kl,{}),Zb="SelectViewport",K_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,nonce:s,...u}=i,d=nf(Zb,l),f=Q_(Zb,l),m=jt(r,d.onViewportChange),v=S.useRef(0);return c.jsxs(c.Fragment,{children:[c.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:s}),c.jsx(tf.Slot,{scope:l,children:c.jsx(zt.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:mt(u.onScroll,y=>{const g=y.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:b}=f;if(b!=null&&b.current&&x){const w=Math.abs(v.current-g.scrollTop);if(w>0){const k=window.innerHeight-ir*2,C=parseFloat(x.style.minHeight),E=parseFloat(x.style.height),M=Math.max(C,E);if(M<k){const T=M+w,A=Math.min(k,T),I=T-A;x.style.height=A+"px",x.style.bottom==="0px"&&(g.scrollTop=I>0?I:0,x.style.justifyContent="flex-end")}}}v.current=g.scrollTop})})})]})},"SelectViewport")),Z_="SelectGroup",[zB,LB]=io(Z_),$p="SelectItem",[J_,LS]=io($p),W_=S.forwardRef(St(function(i,r){const{__scopeSelect:l,value:s,disabled:u=!1,textValue:d,...f}=i,m=rl($p,l),v=nf($p,l),y=m.value===s,[g,x]=S.useState(d??""),[b,w]=S.useState(!1),k=An(A=>{var I;return(I=v.itemRefCallback)==null?void 0:I.call(v,A,s,u)}),C=jt(r,k),E=Vl(),M=S.useRef("touch"),T=St(()=>{u||(m.onValueChange(s),m.onOpenChange(!1))},"handleSelect");return c.jsx(J_,{scope:l,value:s,disabled:u,textId:E,isSelected:y,onItemTextChange:S.useCallback(A=>{x(I=>I||((A==null?void 0:A.textContent)??"").trim())},[]),children:c.jsx(tf.ItemSlot,{scope:l,value:s,disabled:u,textValue:g,children:c.jsx(zt.div,{role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":y&&b,"data-state":y?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...f,ref:C,onFocus:mt(f.onFocus,()=>w(!0)),onBlur:mt(f.onBlur,()=>w(!1)),onClick:mt(f.onClick,()=>{M.current!=="mouse"&&T()}),onPointerUp:mt(f.onPointerUp,()=>{M.current==="mouse"&&T()}),onPointerDown:mt(f.onPointerDown,A=>{M.current=A.pointerType}),onPointerMove:mt(f.onPointerMove,A=>{var I;M.current=A.pointerType,u?(I=v.onItemLeave)==null||I.call(v):M.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:mt(f.onPointerLeave,A=>{var I;A.currentTarget===document.activeElement&&((I=v.onItemLeave)==null||I.call(v))}),onKeyDown:mt(f.onKeyDown,A=>{var R;u||A.target!==A.currentTarget||((R=v.searchRef)==null?void 0:R.current)!==""&&A.key===" "||(T_.includes(A.key)&&T(),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),sd="SelectItemText",e3=S.forwardRef(St(function(i,r){const{__scopeSelect:l,className:s,style:u,...d}=i,f=rl(sd,l),m=nf(sd,l),v=LS(sd,l),y=O_(sd,l),[g,x]=S.useState(null),b=An(T=>{var A;return(A=m.itemTextRefCallback)==null?void 0:A.call(m,T,v.value,v.disabled)}),w=jt(r,x,v.onItemTextChange,b),k=g==null?void 0:g.textContent,C=S.useMemo(()=>c.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]),c.jsxs(c.Fragment,{children:[c.jsx(zt.span,{id:v.textId,...d,ref:w}),v.isSelected&&f.valueNode&&!f.valueNodeHasChildren&&!Mc(f.value)?no.createPortal(d.children,f.valueNode):null]})},"SelectItemText")),t3="SelectItemIndicator",n3=S.forwardRef(St(function(i,r){const{__scopeSelect:l,...s}=i;return LS(t3,l).isSelected?c.jsx(zt.span,{"aria-hidden":!0,...s,ref:r}):null},"SelectItemIndicator")),i3="SelectBubbleInput",r3=S.forwardRef(St(function({__scopeSelect:i,...r},l){const s=rl(i3,i),{value:u,onValueChange:d,required:f,disabled:m,name:v,autoComplete:y,form:g}=s,{nativeOptions:x,nativeSelectKey:b}=s,w=S.useRef(null),k=jt(l,w),C=u??"",E=wS(C),M=Array.from(x).some(T=>(T.props.value??"")==="");return S.useEffect(()=>{const T=w.current;if(!T)return;const A=window.HTMLSelectElement.prototype,R=Object.getOwnPropertyDescriptor(A,"value").set;if(E!==C&&R){const B=new Event("change",{bubbles:!0});R.call(T,C),T.dispatchEvent(B)}},[E,C]),c.jsxs(zt.select,{"aria-hidden":!0,required:f,tabIndex:-1,name:v,autoComplete:y,disabled:m,form:g,onChange:T=>d(T.target.value),...r,style:{...V4,...r.style},ref:k,defaultValue:C,children:[Mc(u)&&!M?c.jsx("option",{value:""}):null,Array.from(x)]},b)},"SelectBubbleInput"));function IS(e){return typeof e=="function"}St(IS,"isFunction");function Mc(e){return e===""||e===void 0}St(Mc,"shouldShowPlaceholder");function qg(e){const i=An(e),r=S.useRef(""),l=S.useRef(0),s=S.useCallback(d=>{const f=r.current+d;i(f),St((function m(v){r.current=v,window.clearTimeout(l.current),v!==""&&(l.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(f)},[i]),u=S.useCallback(()=>{r.current="",window.clearTimeout(l.current)},[]);return S.useEffect(()=>()=>window.clearTimeout(l.current),[]),[r,s,u]}St(qg,"useTypeaheadSearch");function Fg(e,i,r){const s=i.length>1&&Array.from(i).every(v=>v===i[0])?i[0]:i,u=r?e.indexOf(r):-1;let d=BS(e,Math.max(u,0));s.length===1&&(d=d.filter(v=>v!==r));const m=d.find(v=>v.textValue.toLowerCase().startsWith(s.toLowerCase()));return m!==r?m:void 0}St(Fg,"findNextItem");function BS(e,i){return e.map((r,l)=>e[(i+l)%e.length])}St(BS,"wrapArray");const a3=mg("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 qe({className:e,variant:i="default",size:r="default",asChild:l=!1,...s}){const u=l?z4:"button";return c.jsx(u,{"data-slot":"button","data-variant":i,"data-size":r,className:nn(a3({variant:i,size:r,className:e})),...s})}const Vg=e=>qr(e,{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function ql({value:e}){return c.jsx("pre",{className:"jv-history-json",children:JSON.stringify(e,null,2)})}function HS({blocks:e,links:i,onSelect:r}){return c.jsx(c.Fragment,{children:e.map((l,s)=>{if(l.type==="text"||l.type==="reasoning")return c.jsxs("section",{className:"jv-history-block",children:[c.jsx("h4",{children:j(l.type==="reasoning"?"history.reasoning":"history.text")}),c.jsx("pre",{className:"jv-history-text",children:l.text||j("history.empty")})]},s);if(l.type==="image")return c.jsxs("section",{className:"jv-history-block",children:[c.jsxs("h4",{children:[j("files.kindImage")," · ",l.mime_type]}),c.jsx("img",{className:"jv-history-image",src:`data:${l.mime_type};base64,${l.data}`,alt:j("history.image")})]},s);if(l.type==="tool_call"||l.type==="tool_result"){const u=i.filter(d=>d.tool_call_id===l.tool_call_id);return c.jsxs("section",{className:"jv-history-block",children:[c.jsxs("h4",{children:[j(l.type==="tool_call"?"history.toolCall":"history.toolResult")," · ",c.jsx("strong",{children:l.name}),l.type==="tool_result"&&l.is_error&&c.jsx("span",{className:"jv-history-error-tag",children:j("history.error")})]}),c.jsxs("div",{className:"jv-history-call",children:[c.jsx("code",{children:l.tool_call_id}),u.map(d=>c.jsxs("button",{type:"button",onClick:()=>r(d.id),"aria-label":j("history.related",{id:d.id}),children:[j(d.role==="tool"?"history.result":"history.call")," #",d.id]},d.id))]}),l.type==="tool_call"?c.jsx(ql,{value:l.arguments}):c.jsxs(c.Fragment,{children:[c.jsx(HS,{blocks:l.result.content,links:[],onSelect:r}),l.result.details!==void 0&&c.jsxs("details",{children:[c.jsx("summary",{children:j("history.details")}),c.jsx(ql,{value:l.result.details})]})]})]},s)}})})}function l3({detail:e,onSelect:i}){const[r,l]=S.useState("content"),{record:s,links:u}=e;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"jv-history-detail-head",children:[c.jsxs("div",{children:[c.jsxs("h3",{children:["#",s.id," ",c.jsx("span",{children:s.role})]}),c.jsx("p",{children:Vg(s.timestamp)})]}),c.jsxs("div",{role:"tablist","aria-label":j("history.view"),children:[c.jsx(qe,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":r==="content",onClick:()=>l("content"),children:j("history.content")}),c.jsx(qe,{type:"button",variant:"ghost",size:"sm",role:"tab","aria-selected":r==="json",onClick:()=>l("json"),children:j("history.json")})]})]}),c.jsx("div",{className:"jv-history-detail-scroll",role:"tabpanel","aria-label":j(r==="content"?"history.contentLabel":"history.json"),children:r==="json"?c.jsx(ql,{value:s}):c.jsxs(c.Fragment,{children:[s.model&&c.jsxs("div",{className:"jv-history-model",children:[c.jsx("span",{children:j("usage.model")}),c.jsx("strong",{children:s.model.id}),c.jsx("small",{children:s.model.provider})]}),c.jsx(HS,{blocks:s.message.content,links:u,onSelect:i}),s.message.tools&&c.jsxs("details",{className:"jv-history-fold",children:[c.jsxs("summary",{children:[j("history.tools")," · ",s.message.tools.length]}),c.jsx(ql,{value:s.message.tools})]}),s.message.tools_removed!==void 0&&c.jsxs("details",{className:"jv-history-fold",children:[c.jsx("summary",{children:j("history.toolsRemoved")}),c.jsx(ql,{value:s.message.tools_removed})]}),s.message.stop_reason&&c.jsxs("p",{className:"jv-history-note",children:[j("history.stopReason")," · ",s.message.stop_reason]}),s.message.error&&c.jsx("pre",{className:"jv-history-failure",children:s.message.error}),c.jsxs("details",{className:"jv-history-fold",children:[c.jsx("summary",{children:"Usage"}),c.jsx(ql,{value:s.usage})]}),c.jsxs("details",{className:"jv-history-fold",children:[c.jsx("summary",{children:"Extra"}),c.jsx(ql,{value:s.extra})]})]})})]})}const Jb={system:"activity.roleSystem",user:"activity.roleUser",assistant:"activity.roleAssistant",tool:"history.toolResult"},Wb=e=>qr(e,{year:"numeric",month:"long",day:"numeric"}),o3=e=>[e.preview,...e.tools.map(i=>j(i.kind==="call"?"activity.toolCall":i.error?"activity.toolFailed":"activity.toolResult",{name:i.name})),e.images?j("activity.images",{count:e.images}):""].filter(Boolean).join(" "),s3=e=>qr(e,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});function c3({items:e,onSelect:i}){return c.jsx("ol",{className:"jv-activity-timeline","aria-label":j("activity.timeline"),children:e.map((r,l)=>{const{record:s}=r,u=Wb(s.timestamp);return c.jsxs(S.Fragment,{children:[(l===0||Wb(e[l-1].record.timestamp)!==u)&&c.jsx("li",{className:"jv-activity-day",children:c.jsx("span",{children:u})}),c.jsxs("li",{className:`jv-activity-row is-${r.kind}`,"data-kind":r.kind,children:[c.jsxs("div",{className:"jv-activity-time",children:[c.jsx("time",{dateTime:new Date(s.timestamp).toISOString(),title:`${Vg(s.timestamp)}.${String(s.timestamp%1e3).padStart(3,"0")}`,children:s3(s.timestamp)}),c.jsx("span",{className:"jv-activity-dot"})]}),r.kind==="chat"?c.jsxs("article",{className:"jv-activity-card jv-activity-chat","aria-label":j("activity.chatMessage",{id:r.record.id}),children:[c.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"chat",id:r.record.id}),"aria-label":j("activity.viewMessage",{sequence:r.record.sequence,chat:r.record.chatTitle}),children:[c.jsxs("span",{className:"jv-activity-card-head",children:[c.jsx(LA,{}),c.jsx("strong",{title:r.record.chatTitle,children:r.record.chatTitle}),c.jsxs("span",{children:["#",r.record.sequence]})]}),c.jsx("span",{className:"jv-activity-preview",children:r.record.preview||j("activity.attachmentOnly")}),r.record.attachmentCount>0&&c.jsxs("span",{className:"jv-activity-attachment",children:[c.jsx(fg,{}),j("activity.attachments",{count:r.record.attachmentCount})]})]}),r.record.source&&c.jsxs("button",{type:"button",className:"jv-activity-source",onClick:()=>i({kind:"history",id:r.record.source.historyId}),"aria-label":j("activity.viewSentBy",{id:r.record.source.historyId}),children:[j("activity.sentBy",{id:r.record.source.historyId}),c.jsx(Cp,{})]})]}):c.jsx("article",{className:"jv-activity-card jv-activity-history","aria-label":j("activity.historyRecord",{id:r.record.id}),children:c.jsxs("button",{type:"button",className:"jv-activity-card-main",onClick:()=>i({kind:"history",id:r.record.id}),"aria-label":j("activity.viewHistory",{id:r.record.id,role:r.record.role}),children:[c.jsxs("span",{className:"jv-activity-card-head",children:[c.jsx("strong",{children:Jb[r.record.role]?j(Jb[r.record.role]):r.record.role}),c.jsxs("span",{children:["#",r.record.id]})]}),c.jsx("span",{className:"jv-activity-preview",children:o3(r.record)||j("activity.emptyMessage")})]})})]})]},`${r.kind}:${s.id}`)})})}const u3={read:(e,i)=>Ae(`/bots/${e}/history/${i}`)};function d3(e,i){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const f3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m3={};function e1(e,i){return(m3.jsx?h3:f3).test(e)}const p3=/[ \t\n\f\r]/g;function g3(e){return typeof e=="object"?e.type==="text"?t1(e.value):!1:t1(e)}function t1(e){return e.replace(p3,"")===""}class Rc{constructor(i,r,l){this.normal=r,this.property=i,l&&(this.space=l)}}Rc.prototype.normal={};Rc.prototype.property={};Rc.prototype.space=void 0;function PS(e,i){const r={},l={};for(const s of e)Object.assign(r,s.property),Object.assign(l,s.normal);return new Rc(r,l,i)}function Yp(e){return e.toLowerCase()}class ui{constructor(i,r){this.attribute=r,this.property=i}}ui.prototype.attribute="";ui.prototype.booleanish=!1;ui.prototype.boolean=!1;ui.prototype.commaOrSpaceSeparated=!1;ui.prototype.commaSeparated=!1;ui.prototype.defined=!1;ui.prototype.mustUseProperty=!1;ui.prototype.number=!1;ui.prototype.overloadedBoolean=!1;ui.prototype.property="";ui.prototype.spaceSeparated=!1;ui.prototype.space=void 0;let v3=0;const Ge=ro(),tn=ro(),Gp=ro(),we=ro(),Ct=ro(),$l=ro(),Ti=ro();function ro(){return 2**++v3}const Xp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:tn,commaOrSpaceSeparated:Ti,commaSeparated:$l,number:we,overloadedBoolean:Gp,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),Gm=Object.keys(Xp);class $g extends ui{constructor(i,r,l,s){let u=-1;if(super(i,r),n1(this,"space",s),typeof l=="number")for(;++u<Gm.length;){const d=Gm[u];n1(this,Gm[u],(l&Xp[d])===Xp[d])}}}$g.prototype.defined=!0;function n1(e,i,r){r&&(e[i]=r)}function cs(e){const i={},r={};for(const[l,s]of Object.entries(e.properties)){const u=new $g(l,e.transform(e.attributes||{},l),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(u.mustUseProperty=!0),i[l]=u,r[Yp(l)]=l,r[Yp(u.attribute)]=l}return new Rc(i,r,e.space)}const US=cs({properties:{ariaActiveDescendant:null,ariaAtomic:tn,ariaAutoComplete:null,ariaBusy:tn,ariaChecked:tn,ariaColCount:we,ariaColIndex:we,ariaColSpan:we,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:tn,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:tn,ariaFlowTo:Ct,ariaGrabbed:tn,ariaHasPopup:null,ariaHidden:tn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:we,ariaLive:null,ariaModal:tn,ariaMultiLine:tn,ariaMultiSelectable:tn,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:we,ariaPressed:tn,ariaReadOnly:tn,ariaRelevant:null,ariaRequired:tn,ariaRoleDescription:Ct,ariaRowCount:we,ariaRowIndex:we,ariaRowSpan:we,ariaSelected:tn,ariaSetSize:we,ariaSort:null,ariaValueMax:we,ariaValueMin:we,ariaValueNow:we,ariaValueText:null,role:null},transform(e,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function qS(e,i){return i in e?e[i]:i}function FS(e,i){return qS(e,i.toLowerCase())}const y3=cs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$l,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Ct,autoFocus:Ge,autoPlay:Ge,blocking:Ct,capture:null,charSet:null,checked:Ge,cite:null,className:Ct,closedBy:null,colorSpace:null,cols:we,colSpan:we,command:null,commandFor:null,content:null,contentEditable:tn,controls:Ge,controlsList:Ct,coords:we|$l,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Gp,draggable:tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Ct,height:we,hidden:Gp,high:we,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:Ge,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:we,manifest:null,max:null,maxLength:we,media:null,method:null,min:null,minLength:we,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:we,pattern:null,ping:Ct,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Ct,required:Ge,reversed:Ge,rows:we,rowSpan:we,sandbox:Ct,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:we,sizes:null,slot:null,span:we,spellCheck:tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:we,step:null,style:null,tabIndex:we,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:tn,width:we,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:we,borderColor:null,bottomMargin:we,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:we,leftMargin:we,link:null,longDesc:null,lowSrc:null,marginHeight:we,marginWidth:we,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:we,rules:null,scheme:null,scrolling:tn,standby:null,summary:null,text:null,topMargin:we,valueType:null,version:null,vAlign:null,vLink:null,vSpace:we,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:$l,part:Ct,prefix:null,property:null,results:we,security:null,unselectable:null},space:"html",transform:FS}),x3=cs({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:Ti,accentHeight:we,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:we,amplitude:we,arabicForm:null,ascent:we,attributeName:null,attributeType:null,azimuth:we,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:we,by:null,calcMode:null,capHeight:we,className:Ct,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:we,diffuseConstant:we,direction:null,display:null,dur:null,divisor:we,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:we,enableBackground:null,end:null,event:null,exponent:we,externalResourcesRequired:null,fill:null,fillOpacity:we,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:$l,g2:$l,glyphName:$l,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:we,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:we,horizOriginX:we,horizOriginY:we,id:null,ideographic:we,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:we,k:we,k1:we,k2:we,k3:we,k4:we,kernelMatrix:Ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:we,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:we,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:we,overlineThickness:we,paintOrder:null,panose1:null,path:null,pathLength:we,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:we,pointsAtY:we,pointsAtZ:we,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ti,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ti,rev:Ti,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ti,requiredFeatures:Ti,requiredFonts:Ti,requiredFormats:Ti,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:we,specularExponent:we,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:we,strikethroughThickness:we,string:null,stroke:null,strokeDashArray:Ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:we,strokeOpacity:we,strokeWidth:null,style:null,surfaceScale:we,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ti,tabIndex:we,tableValues:null,target:null,targetX:we,targetY:we,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ti,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:we,underlineThickness:we,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:we,values:null,vAlphabetic:we,vMathematical:we,vectorEffect:null,vHanging:we,vIdeographic:we,version:null,vertAdvY:we,vertOriginX:we,vertOriginY:we,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:we,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qS}),VS=cs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,i){return"xlink:"+i.slice(5).toLowerCase()}}),$S=cs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:FS}),YS=cs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,i){return"xml:"+i.slice(3).toLowerCase()}}),b3={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"},j3=/[A-Z]/g,i1=/-[a-z]/g,w3=/^data[-\w.:]+$/i;function S3(e,i){const r=Yp(i);let l=i,s=ui;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&w3.test(i)){if(i.charAt(4)==="-"){const u=i.slice(5).replace(i1,C3);l="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=i.slice(4);if(!i1.test(u)){let d=u.replace(j3,k3);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}s=$g}return new s(l,i)}function k3(e){return"-"+e.toLowerCase()}function C3(e){return e.charAt(1).toUpperCase()}const N3=PS([US,y3,VS,$S,YS],"html"),Yg=PS([US,x3,VS,$S,YS],"svg");function E3(e){return e.join(" ").trim()}var Qo={},Xm,r1;function T3(){if(r1)return Xm;r1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
485
|
+
`,v="/",y="*",g="",x="comment",b="declaration";function w(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 A(G){var H=G.match(i);H&&(M+=H.length);var Q=G.lastIndexOf(m);T=~Q?G.length-Q:T+G.length}function I(){var G={line:M,column:T};return function(H){return H.position=new R(G),$(),H}}function R(G){this.start=G,this.end={line:M,column:T},this.source=E.source}R.prototype.content=C;function B(G){var H=new Error(E.source+":"+M+":"+T+": "+G);if(H.reason=G,H.filename=E.source,H.line=M,H.column=T,H.source=C,!E.silent)throw H}function U(G){var H=G.exec(C);if(H){var Q=H[0];return A(Q),C=C.slice(Q.length),H}}function $(){U(r)}function z(G){var H;for(G=G||[];H=Y();)H!==!1&&G.push(H);return G}function Y(){var G=I();if(!(v!=C.charAt(0)||y!=C.charAt(1))){for(var H=2;g!=C.charAt(H)&&(y!=C.charAt(H)||v!=C.charAt(H+1));)++H;if(H+=2,g===C.charAt(H-1))return B("End of comment missing");var Q=C.slice(2,H-2);return T+=2,A(Q),C=C.slice(H),T+=2,G({type:x,comment:Q})}}function q(){var G=I(),H=U(l);if(H){if(Y(),!U(s))return B("property missing ':'");var Q=U(u),O=G({type:b,property:k(H[0].replace(e,g)),value:Q?k(Q[0].replace(e,g)):g});return U(d),O}}function ee(){var G=[];z(G);for(var H;H=q();)H!==!1&&(G.push(H),z(G));return G}return $(),ee()}function k(C){return C?C.replace(f,g):g}return Xm=w,Xm}var a1;function A3(){if(a1)return Qo;a1=1;var e=Qo&&Qo.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.default=r;const i=e(T3());function r(l,s){let u=null;if(!l||typeof l!="string")return u;const d=(0,i.default)(l),f=typeof s=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:v,value:y}=m;f?s(v,y,m):y&&(u=u||{},u[v]=y)}),u}return Qo}var ac={},l1;function M3(){if(l1)return ac;l1=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(v){return!v||r.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(s,f):v=v.replace(l,f),v.replace(i,d))};return ac.camelCase=m,ac}var lc,o1;function R3(){if(o1)return lc;o1=1;var e=lc&&lc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=e(A3()),r=M3();function l(s,u){var d={};return!s||typeof s!="string"||(0,i.default)(s,function(f,m){f&&m&&(d[(0,r.camelCase)(f,u)]=m)}),d}return l.default=l,lc=l,lc}var O3=R3();const _3=cg(O3),GS=XS("end"),Gg=XS("start");function XS(e){return i;function i(r){const l=r&&r.position&&r.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function D3(e){const i=Gg(e),r=GS(e);if(i&&r)return{start:i,end:r}}function uc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?s1(e.position):"start"in e||"end"in e?s1(e):"line"in e||"column"in e?Qp(e):""}function Qp(e){return c1(e&&e.line)+":"+c1(e&&e.column)}function s1(e){return Qp(e&&e.start)+"-"+Qp(e&&e.end)}function c1(e){return e&&typeof e=="number"?e:1}class Hn extends Error{constructor(i,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let s="",u={},d=!1;if(r&&("line"in r&&"column"in r?u={place:r}:"start"in r&&"end"in r?u={place:r}:"type"in r?u={ancestors:[r],place:r.position}:u={...r}),typeof i=="string"?s=i:!u.cause&&i&&(d=!0,s=i.message,u.cause=i),!u.ruleId&&!u.source&&typeof l=="string"){const m=l.indexOf(":");m===-1?u.ruleId=l:(u.source=l.slice(0,m),u.ruleId=l.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=s,this.line=f?f.line:void 0,this.name=uc(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 Xg={}.hasOwnProperty,z3=new Map,L3=/[A-Z]/g,I3=new Set(["table","tbody","thead","tfoot","tr"]),B3=new Set(["td","th"]),QS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H3(e,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let l;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=G3(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Y3(r,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:l,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Yg:N3,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},u=KS(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function KS(e,i,r){if(i.type==="element")return P3(e,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return U3(e,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return F3(e,i,r);if(i.type==="mdxjsEsm")return q3(e,i);if(i.type==="root")return V3(e,i,r);if(i.type==="text")return $3(e,i)}function P3(e,i,r){const l=e.schema;let s=l;i.tagName.toLowerCase()==="svg"&&l.space==="html"&&(s=Yg,e.schema=s),e.ancestors.push(i);const u=JS(e,i.tagName,!1),d=X3(e,i);let f=Kg(e,i);return I3.has(i.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!g3(m):!0})),ZS(e,d,u,i),Qg(d,f),e.ancestors.pop(),e.schema=l,e.create(i,u,d,r)}function U3(e,i){if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}bc(e,i.position)}function q3(e,i){if(i.data&&i.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(i.data.estree);bc(e,i.position)}function F3(e,i,r){const l=e.schema;let s=l;i.name==="svg"&&l.space==="html"&&(s=Yg,e.schema=s),e.ancestors.push(i);const u=i.name===null?e.Fragment:JS(e,i.name,!0),d=Q3(e,i),f=Kg(e,i);return ZS(e,d,u,i),Qg(d,f),e.ancestors.pop(),e.schema=l,e.create(i,u,d,r)}function V3(e,i,r){const l={};return Qg(l,Kg(e,i)),e.create(i,e.Fragment,l,r)}function $3(e,i){return i.value}function ZS(e,i,r,l){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(i.node=l)}function Qg(e,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(e.children=r)}}function Y3(e,i,r){return l;function l(s,u,d,f){const v=Array.isArray(d.children)?r:i;return f?v(u,d,f):v(u,d)}}function G3(e,i){return r;function r(l,s,u,d){const f=Array.isArray(u.children),m=Gg(l);return i(s,u,d,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function X3(e,i){const r={};let l,s;for(s in i.properties)if(s!=="children"&&Xg.call(i.properties,s)){const u=K3(e,s,i.properties[s]);if(u){const[d,f]=u;e.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&B3.has(i.tagName)?l=f:r[d]=f}}if(l){const u=r.style||(r.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function Q3(e,i){const r={};for(const l of i.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const u=l.data.estree.body[0];u.type;const d=u.expression;d.type;const f=d.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else bc(e,i.position);else{const s=l.name;let u;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else bc(e,i.position);else u=l.value===null?!0:l.value;r[s]=u}return r}function Kg(e,i){const r=[];let l=-1;const s=e.passKeys?new Map:z3;for(;++l<i.children.length;){const u=i.children[l];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=s.get(m)||0;d=m+"-"+v,s.set(m,v+1)}}const f=KS(e,u,d);f!==void 0&&r.push(f)}return r}function K3(e,i,r){const l=S3(e.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?d3(r):E3(r)),l.property==="style"){let s=typeof r=="object"?r:Z3(e,String(r));return e.stylePropertyNameCase==="css"&&(s=J3(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&l.space?b3[l.property]||l.property:l.attribute,r]}}function Z3(e,i){try{return _3(i,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const l=r,s=new Hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=QS+"#cannot-parse-style-attribute",s}}function JS(e,i,r){let l;if(!r)l={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let u=-1,d;for(;++u<s.length;){const f=e1(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}l=d}else l=e1(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(l.type==="Literal"){const s=l.value;return Xg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(l);bc(e)}function bc(e,i){const r=new Hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=QS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function J3(e){const i={};let r;for(r in e)Xg.call(e,r)&&(i[W3(r)]=e[r]);return i}function W3(e){let i=e.replace(L3,eD);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function eD(e){return"-"+e.toLowerCase()}const Qm={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"]},tD={};function Zg(e,i){const r=tD,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return WS(e,l,s)}function WS(e,i,r){if(nD(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(i&&"alt"in e&&e.alt)return e.alt;if("children"in e)return u1(e.children,i,r)}return Array.isArray(e)?u1(e,i,r):""}function u1(e,i,r){const l=[];let s=-1;for(;++s<e.length;)l[s]=WS(e[s],i,r);return l.join("")}function nD(e){return!!(e&&typeof e=="object")}const d1=document.createElement("i");function Jg(e){const i="&"+e+";";d1.innerHTML=i;const r=d1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===i?!1:r}function Mi(e,i,r,l){const s=e.length;let u=0,d;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,r=r>0?r:0,l.length<1e4)d=Array.from(l),d.unshift(i,r),e.splice(...d);else for(r&&e.splice(i,r);u<l.length;)d=l.slice(u,u+1e4),d.unshift(i,0),e.splice(...d),u+=1e4,i+=1e4}function Ui(e,i){return e.length>0?(Mi(e,e.length,0,i),e):i}const f1={}.hasOwnProperty;function ek(e){const i={};let r=-1;for(;++r<e.length;)iD(i,e[r]);return i}function iD(e,i){let r;for(r in i){const s=(f1.call(e,r)?e[r]:void 0)||(e[r]={}),u=i[r];let d;if(u)for(d in u){f1.call(s,d)||(s[d]=[]);const f=u[d];rD(s[d],Array.isArray(f)?f:f?[f]:[])}}}function rD(e,i){let r=-1;const l=[];for(;++r<i.length;)(i[r].add==="after"?e:l).push(i[r]);Mi(e,0,0,l)}function tk(e,i){const r=Number.parseInt(e,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function rr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xn=al(/[A-Za-z]/),Bn=al(/[\dA-Za-z]/),aD=al(/[#-'*+\--9=?A-Z^-~]/);function Dd(e){return e!==null&&(e<32||e===127)}const Kp=al(/\d/),lD=al(/[\dA-Fa-f]/),oD=al(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function Nt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const rf=al(new RegExp("\\p{P}|\\p{S}","u")),Zl=al(/\s/);function al(e){return i;function i(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function us(e){const i=[];let r=-1,l=0,s=0;for(;++r<e.length;){const u=e.charCodeAt(r);let d="";if(u===37&&Bn(e.charCodeAt(r+1))&&Bn(e.charCodeAt(r+2)))s=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(r+1);u<56320&&f>56319&&f<57344?(d=String.fromCharCode(u,f),s=1):d="�"}else d=String.fromCharCode(u);d&&(i.push(e.slice(l,r),encodeURIComponent(d)),l=r+s+1,d=""),s&&(r+=s,s=0)}return i.join("")+e.slice(l)}function ft(e,i,r,l){const s=l?l-1:Number.POSITIVE_INFINITY;let u=0;return d;function d(m){return it(m)?(e.enter(r),f(m)):i(m)}function f(m){return it(m)&&u++<s?(e.consume(m),f):(e.exit(r),i(m))}}const sD={tokenize:cD};function cD(e){const i=e.attempt(this.parser.constructs.contentInitial,l,s);let r;return i;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ft(e,i,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const m=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,d(f)}function d(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Pe(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),d)}}const uD={tokenize:dD},h1={tokenize:fD};function dD(e){const i=this,r=[];let l=0,s,u,d;return f;function f(T){if(l<r.length){const A=r[l];return i.containerState=A[1],e.attempt(A[0].continuation,m,v)(T)}return v(T)}function m(T){if(l++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&M();const A=i.events.length;let I=A,R;for(;I--;)if(i.events[I][0]==="exit"&&i.events[I][1].type==="chunkFlow"){R=i.events[I][1].end;break}E(l);let B=A;for(;B<i.events.length;)i.events[B][1].end={...R},B++;return Mi(i.events,I+1,0,i.events.slice(A)),i.events.length=B,v(T)}return f(T)}function v(T){if(l===r.length){if(!s)return x(T);if(s.currentConstruct&&s.currentConstruct.concrete)return w(T);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(h1,y,g)(T)}function y(T){return s&&M(),E(l),x(T)}function g(T){return i.parser.lazy[i.now().line]=l!==r.length,d=i.now().offset,w(T)}function x(T){return i.containerState={},e.attempt(h1,b,w)(T)}function b(T){return l++,r.push([i.currentConstruct,i.containerState]),x(T)}function w(T){if(T===null){s&&M(),E(0),e.consume(T);return}return s=s||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return Pe(T)?(e.consume(T),C(e.exit("chunkFlow")),l=0,i.interrupt=void 0,f):(e.consume(T),k)}function C(T,A){const I=i.sliceStream(T);if(A&&I.push(null),T.previous=u,u&&(u.next=T),u=T,s.defineSkip(T.start),s.write(I),i.parser.lazy[T.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<d&&(!s.events[R][1].end||s.events[R][1].end.offset>d))return;const B=i.events.length;let U=B,$,z;for(;U--;)if(i.events[U][0]==="exit"&&i.events[U][1].type==="chunkFlow"){if($){z=i.events[U][1].end;break}$=!0}for(E(l),R=B;R<i.events.length;)i.events[R][1].end={...z},R++;Mi(i.events,U+1,0,i.events.slice(B)),i.events.length=R}}function E(T){let A=r.length;for(;A-- >T;){const I=r[A];i.containerState=I[1],I[0].exit.call(i,e)}r.length=T}function M(){s.write([null]),u=void 0,s=void 0,i.containerState._closeFlow=void 0}}function fD(e,i,r){return ft(e,e.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function is(e){if(e===null||Nt(e)||Zl(e))return 1;if(rf(e))return 2}function af(e,i,r){const l=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!l.includes(u)&&(i=u(i,r),l.push(u))}return i}const Zp={name:"attention",resolveAll:hD,tokenize:mD};function hD(e,i){let r=-1,l,s,u,d,f,m,v,y;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(l=r;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&i.sliceSerialize(e[l][1]).charCodeAt(0)===i.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;m=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const g={...e[l][1].end},x={...e[r][1].start};m1(g,-m),m1(x,m),d={type:m>1?"strongSequence":"emphasisSequence",start:g,end:{...e[l][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},u={type:m>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},s={type:m>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},e[l][1].end={...d.start},e[r][1].start={...f.end},v=[],e[l][1].end.offset-e[l][1].start.offset&&(v=Ui(v,[["enter",e[l][1],i],["exit",e[l][1],i]])),v=Ui(v,[["enter",s,i],["enter",d,i],["exit",d,i],["enter",u,i]]),v=Ui(v,af(i.parser.constructs.insideSpan.null,e.slice(l+1,r),i)),v=Ui(v,[["exit",u,i],["enter",f,i],["exit",f,i],["exit",s,i]]),e[r][1].end.offset-e[r][1].start.offset?(y=2,v=Ui(v,[["enter",e[r][1],i],["exit",e[r][1],i]])):y=0,Mi(e,l-1,r-l+3,v),r=l+v.length-y-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function mD(e,i){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,s=is(l);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=is(m),g=!y||y===2&&s||r.includes(m),x=!s||s===2&&y||r.includes(l);return v._open=!!(u===42?g:g&&(s||!x)),v._close=!!(u===42?x:x&&(y||!g)),i(m)}}function m1(e,i){e.column+=i,e.offset+=i,e._bufferIndex+=i}const pD={name:"autolink",tokenize:gD};function gD(e,i,r){let l=0;return s;function s(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return Xn(b)?(e.consume(b),d):b===64?r(b):v(b)}function d(b){return b===43||b===45||b===46||Bn(b)?(l=1,f(b)):v(b)}function f(b){return b===58?(e.consume(b),l=0,m):(b===43||b===45||b===46||Bn(b))&&l++<32?(e.consume(b),f):(l=0,v(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),i):b===null||b===32||b===60||Dd(b)?r(b):(e.consume(b),m)}function v(b){return b===64?(e.consume(b),y):aD(b)?(e.consume(b),v):r(b)}function y(b){return Bn(b)?g(b):r(b)}function g(b){return b===46?(e.consume(b),l=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),i):x(b)}function x(b){if((b===45||Bn(b))&&l++<63){const w=b===45?x:g;return e.consume(b),w}return r(b)}}const Oc={partial:!0,tokenize:vD};function vD(e,i,r){return l;function l(u){return it(u)?ft(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||Pe(u)?i(u):r(u)}}const nk={continuation:{tokenize:xD},exit:bD,name:"blockQuote",tokenize:yD};function yD(e,i,r){const l=this;return s;function s(d){if(d===62){const f=l.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 r(d)}function u(d){return it(d)?(e.enter("blockQuotePrefixWhitespace"),e.consume(d),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),i):(e.exit("blockQuotePrefix"),i(d))}}function xD(e,i,r){const l=this;return s;function s(d){return it(d)?ft(e,u,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):u(d)}function u(d){return e.attempt(nk,i,r)(d)}}function bD(e){e.exit("blockQuote")}const ik={name:"characterEscape",tokenize:jD};function jD(e,i,r){return l;function l(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return oD(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),i):r(u)}}const rk={name:"characterReference",tokenize:wD};function wD(e,i,r){const l=this;let s=0,u,d;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),m}function m(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),v):(e.enter("characterReferenceValue"),u=31,d=Bn,y(g))}function v(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,d=lD,y):(e.enter("characterReferenceValue"),u=7,d=Kp,y(g))}function y(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return d===Bn&&!Jg(l.sliceSerialize(x))?r(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),i)}return d(g)&&s++<u?(e.consume(g),y):r(g)}}const p1={partial:!0,tokenize:kD},g1={concrete:!0,name:"codeFenced",tokenize:SD};function SD(e,i,r){const l=this,s={partial:!0,tokenize:I};let u=0,d=0,f;return m;function m(R){return v(R)}function v(R){const B=l.events[l.events.length-1];return u=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===f?(d++,e.consume(R),y):d<3?r(R):(e.exit("codeFencedFenceSequence"),it(R)?ft(e,g,"whitespace")(R):g(R))}function g(R){return R===null||Pe(R)?(e.exit("codeFencedFence"),l.interrupt?i(R):e.check(p1,k,A)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Pe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(R)):it(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ft(e,b,"whitespace")(R)):R===96&&R===f?r(R):(e.consume(R),x)}function b(R){return R===null||Pe(R)?g(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||Pe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(R)):R===96&&R===f?r(R):(e.consume(R),w)}function k(R){return e.attempt(s,A,C)(R)}function C(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),E}function E(R){return u>0&&it(R)?ft(e,M,"linePrefix",u+1)(R):M(R)}function M(R){return R===null||Pe(R)?e.check(p1,k,A)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Pe(R)?(e.exit("codeFlowValue"),M(R)):(e.consume(R),T)}function A(R){return e.exit("codeFenced"),i(R)}function I(R,B,U){let $=0;return z;function z(H){return R.enter("lineEnding"),R.consume(H),R.exit("lineEnding"),Y}function Y(H){return R.enter("codeFencedFence"),it(H)?ft(R,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):q(H)}function q(H){return H===f?(R.enter("codeFencedFenceSequence"),ee(H)):U(H)}function ee(H){return H===f?($++,R.consume(H),ee):$>=d?(R.exit("codeFencedFenceSequence"),it(H)?ft(R,G,"whitespace")(H):G(H)):U(H)}function G(H){return H===null||Pe(H)?(R.exit("codeFencedFence"),B(H)):U(H)}}}function kD(e,i,r){const l=this;return s;function s(d){return d===null?r(d):(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u)}function u(d){return l.parser.lazy[l.now().line]?r(d):i(d)}}const Km={name:"codeIndented",tokenize:ND},CD={partial:!0,tokenize:ED};function ND(e,i,r){const l=this;return s;function s(v){return e.enter("codeIndented"),ft(e,u,"linePrefix",5)(v)}function u(v){const y=l.events[l.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(v):r(v)}function d(v){return v===null?m(v):Pe(v)?e.attempt(CD,d,m)(v):(e.enter("codeFlowValue"),f(v))}function f(v){return v===null||Pe(v)?(e.exit("codeFlowValue"),d(v)):(e.consume(v),f)}function m(v){return e.exit("codeIndented"),i(v)}}function ED(e,i,r){const l=this;return s;function s(d){return l.parser.lazy[l.now().line]?r(d):Pe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),s):ft(e,u,"linePrefix",5)(d)}function u(d){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):Pe(d)?s(d):r(d)}}const TD={name:"codeText",previous:MD,resolve:AD,tokenize:RD};function AD(e){let i=e.length-4,r=3,l,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[i][1].type==="lineEnding"||e[i][1].type==="space")){for(l=r;++l<i;)if(e[l][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(l=r-1,i++;++l<=i;)s===void 0?l!==i&&e[l][1].type!=="lineEnding"&&(s=l):(l===i||e[l][1].type==="lineEnding")&&(e[s][1].type="codeTextData",l!==s+2&&(e[s][1].end=e[l-1][1].end,e.splice(s+2,l-s-2),i-=l-s-2,l=s+2),s=void 0);return e}function MD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function RD(e,i,r){let l=0,s,u;return d;function d(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),l++,f):(e.exit("codeTextSequence"),m(g))}function m(g){return g===null?r(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),m):g===96?(u=e.enter("codeTextSequence"),s=0,y(g)):Pe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("codeTextData"),v(g))}function v(g){return g===null||g===32||g===96||Pe(g)?(e.exit("codeTextData"),m(g)):(e.consume(g),v)}function y(g){return g===96?(e.consume(g),s++,y):s===l?(e.exit("codeTextSequence"),e.exit("codeText"),i(g)):(u.type="codeTextData",v(g))}}class OD{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(i,l):i>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(i,r,l){const s=r||0;this.setCursor(Math.trunc(i));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return l&&oc(this.left,l),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),oc(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),oc(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);oc(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);oc(this.left,r.reverse())}}}function oc(e,i){let r=0;if(i.length<1e4)e.push(...i);else for(;r<i.length;)e.push(...i.slice(r,r+1e4)),r+=1e4}function ak(e){const i={};let r=-1,l,s,u,d,f,m,v;const y=new OD(e);for(;++r<y.length;){for(;r in i;)r=i[r];if(l=y.get(r),r&&l[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(m=l[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(l[0]==="enter")l[1].contentType&&(Object.assign(i,_D(y,r)),r=i[r],v=!0);else if(l[1]._container){for(u=r,s=void 0;u--;)if(d=y.get(u),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),d[1].type="lineEnding",s=u);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;s&&(l[1].end={...y.get(s)[1].start},f=y.slice(s,r),f.unshift(l),y.splice(s,r-s+1,f))}}return Mi(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!v}function _D(e,i){const r=e.get(i)[1],l=e.get(i)[2];let s=i-1;const u=[];let d=r._tokenizer;d||(d=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,m=[],v={};let y,g,x=-1,b=r,w=0,k=0;const C=[k];for(;b;){for(;e.get(++s)[1]!==b;);u.push(s),b._tokenizer||(y=l.sliceStream(b),b.next||y.push(null),g&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=r;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(k=x+1,C.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):C.pop(),x=C.length;x--;){const E=f.slice(C[x],C[x+1]),M=u.pop();m.push([M,M+E.length-1]),e.splice(M,2,E)}for(m.reverse(),x=-1;++x<m.length;)v[w+m[x][0]]=w+m[x][1],w+=m[x][1]-m[x][0]-1;return v}const DD={resolve:LD,tokenize:ID},zD={partial:!0,tokenize:BD};function LD(e){return ak(e),e}function ID(e,i){let r;return l;function l(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):Pe(f)?e.check(zD,d,u)(f):(e.consume(f),s)}function u(f){return e.exit("chunkContent"),e.exit("content"),i(f)}function d(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function BD(e,i,r){const l=this;return s;function s(d){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ft(e,u,"linePrefix")}function u(d){if(d===null||Pe(d))return r(d);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):e.interrupt(l.parser.constructs.flow,r,i)(d)}}function lk(e,i,r,l,s,u,d,f,m){const v=m||Number.POSITIVE_INFINITY;let y=0;return g;function g(E){return E===60?(e.enter(l),e.enter(s),e.enter(u),e.consume(E),e.exit(u),x):E===null||E===32||E===41||Dd(E)?r(E):(e.enter(l),e.enter(d),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(s),e.exit(l),i):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(f),x(E)):E===null||E===60||Pe(E)?r(E):(e.consume(E),E===92?w:b)}function w(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function k(E){return!y&&(E===null||E===41||Nt(E))?(e.exit("chunkString"),e.exit(f),e.exit(d),e.exit(l),i(E)):y<v&&E===40?(e.consume(E),y++,k):E===41?(e.consume(E),y--,k):E===null||E===32||E===40||Dd(E)?r(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 ok(e,i,r,l,s,u){const d=this;let f=0,m;return v;function v(b){return e.enter(l),e.enter(s),e.consume(b),e.exit(s),e.enter(u),y}function y(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?r(b):b===93?(e.exit(u),e.enter(s),e.consume(b),e.exit(s),e.exit(l),i):Pe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Pe(b)||f++>999?(e.exit("chunkString"),y(b)):(e.consume(b),m||(m=!it(b)),b===92?x:g)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,g):g(b)}}function sk(e,i,r,l,s,u){let d;return f;function f(x){return x===34||x===39||x===40?(e.enter(l),e.enter(s),e.consume(x),e.exit(s),d=x===40?41:x,m):r(x)}function m(x){return x===d?(e.enter(s),e.consume(x),e.exit(s),e.exit(l),i):(e.enter(u),v(x))}function v(x){return x===d?(e.exit(u),m(d)):x===null?r(x):Pe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ft(e,v,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===d||x===null||Pe(x)?(e.exit("chunkString"),v(x)):(e.consume(x),x===92?g:y)}function g(x){return x===d||x===92?(e.consume(x),y):y(x)}}function dc(e,i){let r;return l;function l(s){return Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,l):it(s)?ft(e,l,r?"linePrefix":"lineSuffix")(s):i(s)}}const HD={name:"definition",tokenize:UD},PD={partial:!0,tokenize:qD};function UD(e,i,r){const l=this;let s;return u;function u(b){return e.enter("definition"),d(b)}function d(b){return ok.call(l,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return s=rr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):r(b)}function m(b){return Nt(b)?dc(e,v)(b):v(b)}function v(b){return lk(e,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(PD,g,g)(b)}function g(b){return it(b)?ft(e,x,"whitespace")(b):x(b)}function x(b){return b===null||Pe(b)?(e.exit("definition"),l.parser.defined.push(s),i(b)):r(b)}}function qD(e,i,r){return l;function l(f){return Nt(f)?dc(e,s)(f):r(f)}function s(f){return sk(e,u,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return it(f)?ft(e,d,"whitespace")(f):d(f)}function d(f){return f===null||Pe(f)?i(f):r(f)}}const FD={name:"hardBreakEscape",tokenize:VD};function VD(e,i,r){return l;function l(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return Pe(u)?(e.exit("hardBreakEscape"),i(u)):r(u)}}const $D={name:"headingAtx",resolve:YD,tokenize:GD};function YD(e,i){let r=e.length-2,l=3,s,u;return e[l][1].type==="whitespace"&&(l+=2),r-2>l&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&e[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(s={type:"atxHeadingText",start:e[l][1].start,end:e[r][1].end},u={type:"chunkText",start:e[l][1].start,end:e[r][1].end,contentType:"text"},Mi(e,l,r-l+1,[["enter",s,i],["enter",u,i],["exit",u,i],["exit",s,i]])),e}function GD(e,i,r){let l=0;return s;function s(y){return e.enter("atxHeading"),u(y)}function u(y){return e.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&l++<6?(e.consume(y),d):y===null||Nt(y)?(e.exit("atxHeadingSequence"),f(y)):r(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),m(y)):y===null||Pe(y)?(e.exit("atxHeading"),i(y)):it(y)?ft(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||Nt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),v)}}const XD=["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"],v1=["pre","script","style","textarea"],QD={concrete:!0,name:"htmlFlow",resolveTo:JD,tokenize:WD},KD={partial:!0,tokenize:tz},ZD={partial:!0,tokenize:ez};function JD(e){let i=e.length;for(;i--&&!(e[i][0]==="enter"&&e[i][1].type==="htmlFlow"););return i>1&&e[i-2][1].type==="linePrefix"&&(e[i][1].start=e[i-2][1].start,e[i+1][1].start=e[i-2][1].start,e.splice(i-2,2)),e}function WD(e,i,r){const l=this;let s,u,d,f,m;return v;function v(P){return y(P)}function y(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),g}function g(P){return P===33?(e.consume(P),x):P===47?(e.consume(P),u=!0,k):P===63?(e.consume(P),s=3,l.interrupt?i:D):Xn(P)?(e.consume(P),d=String.fromCharCode(P),C):r(P)}function x(P){return P===45?(e.consume(P),s=2,b):P===91?(e.consume(P),s=5,f=0,w):Xn(P)?(e.consume(P),s=4,l.interrupt?i:D):r(P)}function b(P){return P===45?(e.consume(P),l.interrupt?i:D):r(P)}function w(P){const V="CDATA[";return P===V.charCodeAt(f++)?(e.consume(P),f===V.length?l.interrupt?i:q:w):r(P)}function k(P){return Xn(P)?(e.consume(P),d=String.fromCharCode(P),C):r(P)}function C(P){if(P===null||P===47||P===62||Nt(P)){const V=P===47,fe=d.toLowerCase();return!V&&!u&&v1.includes(fe)?(s=1,l.interrupt?i(P):q(P)):XD.includes(d.toLowerCase())?(s=6,V?(e.consume(P),E):l.interrupt?i(P):q(P)):(s=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(P):u?M(P):T(P))}return P===45||Bn(P)?(e.consume(P),d+=String.fromCharCode(P),C):r(P)}function E(P){return P===62?(e.consume(P),l.interrupt?i:q):r(P)}function M(P){return it(P)?(e.consume(P),M):z(P)}function T(P){return P===47?(e.consume(P),z):P===58||P===95||Xn(P)?(e.consume(P),A):it(P)?(e.consume(P),T):z(P)}function A(P){return P===45||P===46||P===58||P===95||Bn(P)?(e.consume(P),A):I(P)}function I(P){return P===61?(e.consume(P),R):it(P)?(e.consume(P),I):T(P)}function R(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),m=P,B):it(P)?(e.consume(P),R):U(P)}function B(P){return P===m?(e.consume(P),m=null,$):P===null||Pe(P)?r(P):(e.consume(P),B)}function U(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Nt(P)?I(P):(e.consume(P),U)}function $(P){return P===47||P===62||it(P)?T(P):r(P)}function z(P){return P===62?(e.consume(P),Y):r(P)}function Y(P){return P===null||Pe(P)?q(P):it(P)?(e.consume(P),Y):r(P)}function q(P){return P===45&&s===2?(e.consume(P),Q):P===60&&s===1?(e.consume(P),O):P===62&&s===4?(e.consume(P),J):P===63&&s===3?(e.consume(P),D):P===93&&s===5?(e.consume(P),ne):Pe(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(KD,W,ee)(P)):P===null||Pe(P)?(e.exit("htmlFlowData"),ee(P)):(e.consume(P),q)}function ee(P){return e.check(ZD,G,W)(P)}function G(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),H}function H(P){return P===null||Pe(P)?ee(P):(e.enter("htmlFlowData"),q(P))}function Q(P){return P===45?(e.consume(P),D):q(P)}function O(P){return P===47?(e.consume(P),d="",F):q(P)}function F(P){if(P===62){const V=d.toLowerCase();return v1.includes(V)?(e.consume(P),J):q(P)}return Xn(P)&&d.length<8?(e.consume(P),d+=String.fromCharCode(P),F):q(P)}function ne(P){return P===93?(e.consume(P),D):q(P)}function D(P){return P===62?(e.consume(P),J):P===45&&s===2?(e.consume(P),D):q(P)}function J(P){return P===null||Pe(P)?(e.exit("htmlFlowData"),W(P)):(e.consume(P),J)}function W(P){return e.exit("htmlFlow"),i(P)}}function ez(e,i,r){const l=this;return s;function s(d){return Pe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):r(d)}function u(d){return l.parser.lazy[l.now().line]?r(d):i(d)}}function tz(e,i,r){return l;function l(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Oc,i,r)}}const nz={name:"htmlText",tokenize:iz};function iz(e,i,r){const l=this;let s,u,d;return f;function f(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),m}function m(D){return D===33?(e.consume(D),v):D===47?(e.consume(D),I):D===63?(e.consume(D),T):Xn(D)?(e.consume(D),U):r(D)}function v(D){return D===45?(e.consume(D),y):D===91?(e.consume(D),u=0,w):Xn(D)?(e.consume(D),M):r(D)}function y(D){return D===45?(e.consume(D),b):r(D)}function g(D){return D===null?r(D):D===45?(e.consume(D),x):Pe(D)?(d=g,O(D)):(e.consume(D),g)}function x(D){return D===45?(e.consume(D),b):g(D)}function b(D){return D===62?Q(D):D===45?x(D):g(D)}function w(D){const J="CDATA[";return D===J.charCodeAt(u++)?(e.consume(D),u===J.length?k:w):r(D)}function k(D){return D===null?r(D):D===93?(e.consume(D),C):Pe(D)?(d=k,O(D)):(e.consume(D),k)}function C(D){return D===93?(e.consume(D),E):k(D)}function E(D){return D===62?Q(D):D===93?(e.consume(D),E):k(D)}function M(D){return D===null||D===62?Q(D):Pe(D)?(d=M,O(D)):(e.consume(D),M)}function T(D){return D===null?r(D):D===63?(e.consume(D),A):Pe(D)?(d=T,O(D)):(e.consume(D),T)}function A(D){return D===62?Q(D):T(D)}function I(D){return Xn(D)?(e.consume(D),R):r(D)}function R(D){return D===45||Bn(D)?(e.consume(D),R):B(D)}function B(D){return Pe(D)?(d=B,O(D)):it(D)?(e.consume(D),B):Q(D)}function U(D){return D===45||Bn(D)?(e.consume(D),U):D===47||D===62||Nt(D)?$(D):r(D)}function $(D){return D===47?(e.consume(D),Q):D===58||D===95||Xn(D)?(e.consume(D),z):Pe(D)?(d=$,O(D)):it(D)?(e.consume(D),$):Q(D)}function z(D){return D===45||D===46||D===58||D===95||Bn(D)?(e.consume(D),z):Y(D)}function Y(D){return D===61?(e.consume(D),q):Pe(D)?(d=Y,O(D)):it(D)?(e.consume(D),Y):$(D)}function q(D){return D===null||D===60||D===61||D===62||D===96?r(D):D===34||D===39?(e.consume(D),s=D,ee):Pe(D)?(d=q,O(D)):it(D)?(e.consume(D),q):(e.consume(D),G)}function ee(D){return D===s?(e.consume(D),s=void 0,H):D===null?r(D):Pe(D)?(d=ee,O(D)):(e.consume(D),ee)}function G(D){return D===null||D===34||D===39||D===60||D===61||D===96?r(D):D===47||D===62||Nt(D)?$(D):(e.consume(D),G)}function H(D){return D===47||D===62||Nt(D)?$(D):r(D)}function Q(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),i):r(D)}function O(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),F}function F(D){return it(D)?ft(e,ne,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):ne(D)}function ne(D){return e.enter("htmlTextData"),d(D)}}const Wg={name:"labelEnd",resolveAll:oz,resolveTo:sz,tokenize:cz},rz={tokenize:uz},az={tokenize:dz},lz={tokenize:fz};function oz(e){let i=-1;const r=[];for(;++i<e.length;){const l=e[i][1];if(r.push(e[i]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const s=l.type==="labelImage"?4:2;l.type="data",i+=s}}return e.length!==r.length&&Mi(e,0,e.length,r),e}function sz(e,i){let r=e.length,l=0,s,u,d,f;for(;r--;)if(s=e[r][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(d){if(e[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=r,s.type!=="labelLink")){l=2;break}}else s.type==="labelEnd"&&(d=r);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+l+2][1].end},end:{...e[d-2][1].start}};return f=[["enter",m,i],["enter",v,i]],f=Ui(f,e.slice(u+1,u+l+3)),f=Ui(f,[["enter",y,i]]),f=Ui(f,af(i.parser.constructs.insideSpan.null,e.slice(u+l+4,d-3),i)),f=Ui(f,[["exit",y,i],e[d-2],e[d-1],["exit",v,i]]),f=Ui(f,e.slice(d+1)),f=Ui(f,[["exit",m,i]]),Mi(e,u,e.length,f),e}function cz(e,i,r){const l=this;let s=l.events.length,u,d;for(;s--;)if((l.events[s][1].type==="labelImage"||l.events[s][1].type==="labelLink")&&!l.events[s][1]._balanced){u=l.events[s][1];break}return f;function f(x){return u?u._inactive?g(x):(d=l.parser.defined.includes(rr(l.sliceSerialize({start:u.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):r(x)}function m(x){return x===40?e.attempt(rz,y,d?y:g)(x):x===91?e.attempt(az,y,d?v:g)(x):d?y(x):g(x)}function v(x){return e.attempt(lz,y,g)(x)}function y(x){return i(x)}function g(x){return u._balanced=!0,r(x)}}function uz(e,i,r){return l;function l(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return Nt(g)?dc(e,u)(g):u(g)}function u(g){return g===41?y(g):lk(e,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function d(g){return Nt(g)?dc(e,m)(g):y(g)}function f(g){return r(g)}function m(g){return g===34||g===39||g===40?sk(e,v,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function v(g){return Nt(g)?dc(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),i):r(g)}}function dz(e,i,r){const l=this;return s;function s(f){return ok.call(l,e,u,d,"reference","referenceMarker","referenceString")(f)}function u(f){return l.parser.defined.includes(rr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?i(f):r(f)}function d(f){return r(f)}}function fz(e,i,r){return l;function l(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),i):r(u)}}const hz={name:"labelStartImage",resolveAll:Wg.resolveAll,tokenize:mz};function mz(e,i,r){const l=this;return s;function s(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):r(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(f):i(f)}}const pz={name:"labelStartLink",resolveAll:Wg.resolveAll,tokenize:gz};function gz(e,i,r){const l=this;return s;function s(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 l.parser.constructs?r(d):i(d)}}const Zm={name:"lineEnding",tokenize:vz};function vz(e,i){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ft(e,i,"linePrefix")}}const kd={name:"thematicBreak",tokenize:yz};function yz(e,i,r){let l=0,s;return u;function u(v){return e.enter("thematicBreak"),d(v)}function d(v){return s=v,f(v)}function f(v){return v===s?(e.enter("thematicBreakSequence"),m(v)):l>=3&&(v===null||Pe(v))?(e.exit("thematicBreak"),i(v)):r(v)}function m(v){return v===s?(e.consume(v),l++,m):(e.exit("thematicBreakSequence"),it(v)?ft(e,f,"whitespace")(v):f(v))}}const si={continuation:{tokenize:wz},exit:kz,name:"list",tokenize:jz},xz={partial:!0,tokenize:Cz},bz={partial:!0,tokenize:Sz};function jz(e,i,r){const l=this,s=l.events[l.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,d=0;return f;function f(b){const w=l.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!l.containerState.marker||b===l.containerState.marker:Kp(b)){if(l.containerState.type||(l.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(kd,r,v)(b):v(b);if(!l.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return r(b)}function m(b){return Kp(b)&&++d<10?(e.consume(b),m):(!l.interrupt||d<2)&&(l.containerState.marker?b===l.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),v(b)):r(b)}function v(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||b,e.check(Oc,l.interrupt?r:y,e.attempt(xz,x,g))}function y(b){return l.containerState.initialBlankLine=!0,u++,x(b)}function g(b){return it(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):r(b)}function x(b){return l.containerState.size=u+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,i(b)}}function wz(e,i,r){const l=this;return l.containerState._closeFlow=void 0,e.check(Oc,s,u);function s(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,ft(e,i,"listItemIndent",l.containerState.size+1)(f)}function u(f){return l.containerState.furtherBlankLines||!it(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,d(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(bz,i,d)(f))}function d(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,ft(e,e.attempt(si,i,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function Sz(e,i,r){const l=this;return ft(e,s,"listItemIndent",l.containerState.size+1);function s(u){const d=l.events[l.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===l.containerState.size?i(u):r(u)}}function kz(e){e.exit(this.containerState.type)}function Cz(e,i,r){const l=this;return ft(e,s,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const d=l.events[l.events.length-1];return!it(u)&&d&&d[1].type==="listItemPrefixWhitespace"?i(u):r(u)}}const y1={name:"setextUnderline",resolveTo:Nz,tokenize:Ez};function Nz(e,i){let r=e.length,l,s,u;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){l=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&e.splice(r,1),!u&&e[r][1].type==="definition"&&(u=r);const d={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",d,i]),e.splice(u+1,0,["exit",e[l][1],i]),e[l][1].end={...e[u][1].end}):e[l][1]=d,e.push(["exit",d,i]),e}function Ez(e,i,r){const l=this;let s;return u;function u(v){let y=l.events.length,g;for(;y--;)if(l.events[y][1].type!=="lineEnding"&&l.events[y][1].type!=="linePrefix"&&l.events[y][1].type!=="content"){g=l.events[y][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||g)?(e.enter("setextHeadingLine"),s=v,d(v)):r(v)}function d(v){return e.enter("setextHeadingLineSequence"),f(v)}function f(v){return v===s?(e.consume(v),f):(e.exit("setextHeadingLineSequence"),it(v)?ft(e,m,"lineSuffix")(v):m(v))}function m(v){return v===null||Pe(v)?(e.exit("setextHeadingLine"),i(v)):r(v)}}const Tz={tokenize:Az};function Az(e){const i=this,r=e.attempt(Oc,l,e.attempt(this.parser.constructs.flowInitial,s,ft(e,e.attempt(this.parser.constructs.flow,s,e.attempt(DD,s)),"linePrefix")));return r;function l(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i.currentConstruct=void 0,r}}const Mz={resolveAll:uk()},Rz=ck("string"),Oz=ck("text");function ck(e){return{resolveAll:uk(e==="text"?_z:void 0),tokenize:i};function i(r){const l=this,s=this.parser.constructs[e],u=r.attempt(s,d,f);return d;function d(y){return v(y)?u(y):f(y)}function f(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),m}function m(y){return v(y)?(r.exit("data"),u(y)):(r.consume(y),m)}function v(y){if(y===null)return!0;const g=s[y];let x=-1;if(g)for(;++x<g.length;){const b=g[x];if(!b.previous||b.previous.call(l,l.previous))return!0}return!1}}}function uk(e){return i;function i(r,l){let s=-1,u;for(;++s<=r.length;)u===void 0?r[s]&&r[s][1].type==="data"&&(u=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==u+2&&(r[u][1].end=r[s-1][1].end,r.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(r,l):r}}function _z(e,i){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const l=e[r-1][1],s=i.sliceStream(l);let u=s.length,d=-1,f=0,m;for(;u--;){const v=s[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(i._contentTypeTextTrailing&&r===e.length&&(f=0),f){const v={type:r===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?d:l.start._bufferIndex+d,_index:l.start._index+u,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...v.start},l.start.offset===l.end.offset?Object.assign(l,v):(e.splice(r,0,["enter",v,i],["exit",v,i]),r+=2)}r++}return e}const Dz={42:si,43:si,45:si,48:si,49:si,50:si,51:si,52:si,53:si,54:si,55:si,56:si,57:si,62:nk},zz={91:HD},Lz={[-2]:Km,[-1]:Km,32:Km},Iz={35:$D,42:kd,45:[y1,kd],60:QD,61:y1,95:kd,96:g1,126:g1},Bz={38:rk,92:ik},Hz={[-5]:Zm,[-4]:Zm,[-3]:Zm,33:hz,38:rk,42:Zp,60:[pD,nz],91:pz,92:[FD,ik],93:Wg,95:Zp,96:TD},Pz={null:[Zp,Mz]},Uz={null:[42,95]},qz={null:[]},Fz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Uz,contentInitial:zz,disable:qz,document:Dz,flow:Iz,flowInitial:Lz,insideSpan:Pz,string:Bz,text:Hz},Symbol.toStringTag,{value:"Module"}));function Vz(e,i,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},u=[];let d=[],f=[];const m={attempt:B(I),check:B(R),consume:M,enter:T,exit:A,interrupt:B(R,{interrupt:!0})},v={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:g};let y=i.tokenize.call(v,m);return i.resolveAll&&u.push(i),v;function g(Y){return d=Ui(d,Y),C(),d[d.length-1]!==null?[]:(U(i,0),v.events=af(u,v.events,v),v.events)}function x(Y,q){return Yz(b(Y),q)}function b(Y){return $z(d,Y)}function w(){const{_bufferIndex:Y,_index:q,line:ee,column:G,offset:H}=l;return{_bufferIndex:Y,_index:q,line:ee,column:G,offset:H}}function k(Y){s[Y.line]=Y.column,z()}function C(){let Y;for(;l._index<d.length;){const q=d[l._index];if(typeof q=="string")for(Y=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===Y&&l._bufferIndex<q.length;)E(q.charCodeAt(l._bufferIndex));else E(q)}}function E(Y){y=y(Y)}function M(Y){Pe(Y)?(l.line++,l.column=1,l.offset+=Y===-3?2:1,z()):Y!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===d[l._index].length&&(l._bufferIndex=-1,l._index++)),v.previous=Y}function T(Y,q){const ee=q||{};return ee.type=Y,ee.start=w(),v.events.push(["enter",ee,v]),f.push(ee),ee}function A(Y){const q=f.pop();return q.end=w(),v.events.push(["exit",q,v]),q}function I(Y,q){U(Y,q.from)}function R(Y,q){q.restore()}function B(Y,q){return ee;function ee(G,H,Q){let O,F,ne,D;return Array.isArray(G)?W(G):"tokenize"in G?W([G]):J(G);function J(ye){return je;function je(ae){const xe=ae!==null&&ye[ae],oe=ae!==null&&ye.null,ce=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return W(ce)(ae)}}function W(ye){return O=ye,F=0,ye.length===0?Q:P(ye[F])}function P(ye){return je;function je(ae){return D=$(),ne=ye,ye.partial||(v.currentConstruct=ye),ye.name&&v.parser.constructs.disable.null.includes(ye.name)?fe():ye.tokenize.call(q?Object.assign(Object.create(v),q):v,m,V,fe)(ae)}}function V(ye){return Y(ne,D),H}function fe(ye){return D.restore(),++F<O.length?P(O[F]):Q}}}function U(Y,q){Y.resolveAll&&!u.includes(Y)&&u.push(Y),Y.resolve&&Mi(v.events,q,v.events.length-q,Y.resolve(v.events.slice(q),v)),Y.resolveTo&&(v.events=Y.resolveTo(v.events,v))}function $(){const Y=w(),q=v.previous,ee=v.currentConstruct,G=v.events.length,H=Array.from(f);return{from:G,restore:Q};function Q(){l=Y,v.previous=q,v.currentConstruct=ee,v.events.length=G,f=H,z()}}function z(){l.line in s&&l.column<2&&(l.column=s[l.line],l.offset+=s[l.line]-1)}}function $z(e,i){const r=i.start._index,l=i.start._bufferIndex,s=i.end._index,u=i.end._bufferIndex;let d;if(r===s)d=[e[r].slice(l,u)];else{if(d=e.slice(r,s),l>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(l):d.shift()}u>0&&d.push(e[s].slice(0,u))}return d}function Yz(e,i){let r=-1;const l=[];let s;for(;++r<e.length;){const u=e[r];let d;if(typeof u=="string")d=u;else switch(u){case-5:{d="\r";break}case-4:{d=`
|
|
486
|
+
`;break}case-3:{d=`\r
|
|
487
|
+
`;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&s)continue;d=" ";break}default:d=String.fromCharCode(u)}s=u===-2,l.push(d)}return l.join("")}function Gz(e){const l={constructs:ek([Fz,...(e||{}).extensions||[]]),content:s(sD),defined:[],document:s(uD),flow:s(Tz),lazy:{},string:s(Rz),text:s(Oz)};return l;function s(u){return d;function d(f){return Vz(l,u,f)}}}function Xz(e){for(;!ak(e););return e}const x1=/[\0\t\n\r]/g;function Qz(){let e=1,i="",r=!0,l;return s;function s(u,d,f){const m=[];let v,y,g,x,b;for(u=i+(typeof u=="string"?u.toString():new TextDecoder(d||void 0).decode(u)),g=0,i="",r&&(u.charCodeAt(0)===65279&&g++,r=void 0);g<u.length;){if(x1.lastIndex=g,v=x1.exec(u),x=v&&v.index!==void 0?v.index:u.length,b=u.charCodeAt(x),!v){i=u.slice(g);break}if(b===10&&g===x&&l)m.push(-3),l=void 0;else switch(l&&(m.push(-5),l=void 0),g<x&&(m.push(u.slice(g,x)),e+=x-g),b){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:l=!0,e=1}g=x+1}return f&&(l&&m.push(-5),i&&m.push(i),m.push(null)),m}}const Kz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zz(e){return e.replace(Kz,Jz)}function Jz(e,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),u=s===120||s===88;return tk(r.slice(u?2:1),u?16:10)}return Jg(r)||e}const dk={}.hasOwnProperty;function Wz(e,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),e6(r)(Xz(Gz(r).document().write(Qz()(e,i,!0))))}function e6(e){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(At),autolinkProtocol:$,autolinkEmail:$,atxHeading:u(Ve),blockQuote:u(oe),characterEscape:$,characterReference:$,codeFenced:u(ce),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:u(ce,d),codeText:u(me,d),codeTextData:$,data:$,codeFlowValue:$,definition:u(Ne),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:u(ze),hardBreakEscape:u(ht),hardBreakTrailing:u(ht),htmlFlow:u(ot,d),htmlFlowData:$,htmlText:u(ot,d),htmlTextData:$,image:u(Je),label:d,link:u(At),listItem:u(vn),listItemValue:x,listOrdered:u(gn,g),listUnordered:u(gn),paragraph:u(Pn),reference:P,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:u(Ve),strong:u(di),thematicBreak:u(Yi)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:xe,autolinkProtocol:ae,blockQuote:m(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ye,characterReference:je,codeFenced:m(C),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:z,codeIndented:m(E),codeText:m(H),codeTextData:z,data:z,definition:m(),definitionDestinationString:A,definitionLabelString:M,definitionTitleString:T,emphasis:m(),hardBreakEscape:m(q),hardBreakTrailing:m(q),htmlFlow:m(ee),htmlFlowData:z,htmlText:m(G),htmlTextData:z,image:m(O),label:ne,labelText:F,lineEnding:Y,link:m(Q),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:V,resourceDestinationString:D,resourceTitleString:J,resource:W,setextHeading:m(U),setextHeadingLineSequence:B,setextHeadingText:R,strong:m(),thematicBreak:m()}};fk(i,(e||{}).mdastExtensions||[]);const r={};return l;function l(pe){let ke={type:"root",children:[]};const Be={stack:[ke],tokenStack:[],config:i,enter:f,exit:v,buffer:d,resume:y,data:r},Ue=[];let We=-1;for(;++We<pe.length;)if(pe[We][1].type==="listOrdered"||pe[We][1].type==="listUnordered")if(pe[We][0]==="enter")Ue.push(We);else{const Pt=Ue.pop();We=s(pe,Pt,We)}for(We=-1;++We<pe.length;){const Pt=i[pe[We][0]];dk.call(Pt,pe[We][1].type)&&Pt[pe[We][1].type].call(Object.assign({sliceSerialize:pe[We][2].sliceSerialize},Be),pe[We][1])}if(Be.tokenStack.length>0){const Pt=Be.tokenStack[Be.tokenStack.length-1];(Pt[1]||b1).call(Be,void 0,Pt[0])}for(ke.position={start:Qa(pe.length>0?pe[0][1].start:{line:1,column:1,offset:0}),end:Qa(pe.length>0?pe[pe.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<i.transforms.length;)ke=i.transforms[We](ke)||ke;return ke}function s(pe,ke,Be){let Ue=ke-1,We=-1,Pt=!1,yn,Ut,Rn,Un;for(;++Ue<=Be;){const _t=pe[Ue];switch(_t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{_t[0]==="enter"?We++:We--,Un=void 0;break}case"lineEndingBlank":{_t[0]==="enter"&&(yn&&!Un&&!We&&!Rn&&(Rn=Ue),Un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Un=void 0}if(!We&&_t[0]==="enter"&&_t[1].type==="listItemPrefix"||We===-1&&_t[0]==="exit"&&(_t[1].type==="listUnordered"||_t[1].type==="listOrdered")){if(yn){let On=Ue;for(Ut=void 0;On--;){const Xe=pe[On];if(Xe[1].type==="lineEnding"||Xe[1].type==="lineEndingBlank"){if(Xe[0]==="exit")continue;Ut&&(pe[Ut][1].type="lineEndingBlank",Pt=!0),Xe[1].type="lineEnding",Ut=On}else if(!(Xe[1].type==="linePrefix"||Xe[1].type==="blockQuotePrefix"||Xe[1].type==="blockQuotePrefixWhitespace"||Xe[1].type==="blockQuoteMarker"||Xe[1].type==="listItemIndent"))break}Rn&&(!Ut||Rn<Ut)&&(yn._spread=!0),yn.end=Object.assign({},Ut?pe[Ut][1].start:_t[1].end),pe.splice(Ut||Ue,0,["exit",yn,_t[2]]),Ue++,Be++}if(_t[1].type==="listItemPrefix"){const On={type:"listItem",_spread:!1,start:Object.assign({},_t[1].start),end:void 0};yn=On,pe.splice(Ue,0,["enter",On,_t[2]]),Ue++,Be++,Rn=void 0,Un=!0}}}return pe[ke][1]._spread=Pt,Be}function u(pe,ke){return Be;function Be(Ue){f.call(this,pe(Ue),Ue),ke&&ke.call(this,Ue)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(pe,ke,Be){this.stack[this.stack.length-1].children.push(pe),this.stack.push(pe),this.tokenStack.push([ke,Be||void 0]),pe.position={start:Qa(ke.start),end:void 0}}function m(pe){return ke;function ke(Be){pe&&pe.call(this,Be),v.call(this,Be)}}function v(pe,ke){const Be=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==pe.type&&(ke?ke.call(this,pe,Ue[0]):(Ue[1]||b1).call(this,pe,Ue[0]));else throw new Error("Cannot close `"+pe.type+"` ("+uc({start:pe.start,end:pe.end})+"): it’s not open");Be.position.end=Qa(pe.end)}function y(){return Zg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(pe){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(pe),10),this.data.expectingFirstListItemValue=void 0}}function b(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=pe}function w(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=pe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe.replace(/(\r?\n|\r)$/g,"")}function M(pe){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.label=ke,Be.identifier=rr(this.sliceSerialize(pe)).toLowerCase()}function T(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=pe}function A(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=pe}function I(pe){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Be=this.sliceSerialize(pe).length;ke.depth=Be}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function B(pe){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(pe).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function $(pe){const Be=this.stack[this.stack.length-1].children;let Ue=Be[Be.length-1];(!Ue||Ue.type!=="text")&&(Ue=rn(),Ue.position={start:Qa(pe.start),end:void 0},Be.push(Ue)),this.stack.push(Ue)}function z(pe){const ke=this.stack.pop();ke.value+=this.sliceSerialize(pe),ke.position.end=Qa(pe.end)}function Y(pe){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=ke.children[ke.children.length-1];Be.position.end=Qa(pe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ke.type)&&($.call(this,pe),z.call(this,pe))}function q(){this.data.atHardBreak=!0}function ee(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function G(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function H(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=pe}function Q(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=ke,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function O(){const pe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";pe.type+="Reference",pe.referenceType=ke,delete pe.url,delete pe.title}else delete pe.identifier,delete pe.label;this.data.referenceType=void 0}function F(pe){const ke=this.sliceSerialize(pe),Be=this.stack[this.stack.length-2];Be.label=Zz(ke),Be.identifier=rr(ke).toLowerCase()}function ne(){const pe=this.stack[this.stack.length-1],ke=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ue=pe.children;Be.children=Ue}else Be.alt=ke}function D(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=pe}function J(){const pe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=pe}function W(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function V(pe){const ke=this.resume(),Be=this.stack[this.stack.length-1];Be.label=ke,Be.identifier=rr(this.sliceSerialize(pe)).toLowerCase(),this.data.referenceType="full"}function fe(pe){this.data.characterReferenceType=pe.type}function ye(pe){const ke=this.sliceSerialize(pe),Be=this.data.characterReferenceType;let Ue;Be?(Ue=tk(ke,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Jg(ke);const We=this.stack[this.stack.length-1];We.value+=Ue}function je(pe){const ke=this.stack.pop();ke.position.end=Qa(pe.end)}function ae(pe){z.call(this,pe);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(pe)}function xe(pe){z.call(this,pe);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(pe)}function oe(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function me(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ze(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function ht(){return{type:"break"}}function ot(){return{type:"html",value:""}}function Je(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function gn(pe){return{type:"list",ordered:pe.type==="listOrdered",start:null,spread:pe._spread,children:[]}}function vn(pe){return{type:"listItem",spread:pe._spread,checked:null,children:[]}}function Pn(){return{type:"paragraph",children:[]}}function di(){return{type:"strong",children:[]}}function rn(){return{type:"text",value:""}}function Yi(){return{type:"thematicBreak"}}}function Qa(e){return{line:e.line,column:e.column,offset:e.offset}}function fk(e,i){let r=-1;for(;++r<i.length;){const l=i[r];Array.isArray(l)?fk(e,l):t6(e,l)}}function t6(e,i){let r;for(r in i)if(dk.call(i,r))switch(r){case"canContainEols":{const l=i[r];l&&e[r].push(...l);break}case"transforms":{const l=i[r];l&&e[r].push(...l);break}case"enter":case"exit":{const l=i[r];l&&Object.assign(e[r],l);break}}}function b1(e,i){throw e?new Error("Cannot close `"+e.type+"` ("+uc({start:e.start,end:e.end})+"): a different token (`"+i.type+"`, "+uc({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+uc({start:i.start,end:i.end})+") is still open")}function n6(e){const i=this;i.parser=r;function r(l){return Wz(l,{...i.data("settings"),...e,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function i6(e,i){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(i),!0)};return e.patch(i,r),e.applyData(i,r)}function r6(e,i){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(i,r),[e.applyData(i,r),{type:"text",value:`
|
|
488
|
+
`}]}function a6(e,i){const r=i.value?i.value+`
|
|
489
|
+
`:"",l={},s=i.lang?i.lang.split(/\s+/):[];s.length>0&&(l.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:l,children:[{type:"text",value:r}]};return i.meta&&(u.data={meta:i.meta}),e.patch(i,u),u=e.applyData(i,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(i,u),u}function l6(e,i){const r={type:"element",tagName:"del",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function o6(e,i){const r={type:"element",tagName:"em",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function s6(e,i){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(i.identifier).toUpperCase(),s=us(l.toLowerCase()),u=e.footnoteOrder.indexOf(l);let d,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),d=e.footnoteOrder.length):d=u+1,f+=1,e.footnoteCounts.set(l,f);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};e.patch(i,m);const v={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(i,v),e.applyData(i,v)}function c6(e,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function u6(e,i){if(e.options.allowDangerousHtml){const r={type:"raw",value:i.value};return e.patch(i,r),e.applyData(i,r)}}function hk(e,i){const r=i.referenceType;let l="]";if(r==="collapsed"?l+="[]":r==="full"&&(l+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+l}];const s=e.all(i),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const d=s[s.length-1];return d&&d.type==="text"?d.value+=l:s.push({type:"text",value:l}),s}function d6(e,i){const r=String(i.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return hk(e,i);const s={src:us(l.url||""),alt:i.alt};l.title!==null&&l.title!==void 0&&(s.title=l.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(i,u),e.applyData(i,u)}function f6(e,i){const r={src:us(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const l={type:"element",tagName:"img",properties:r,children:[]};return e.patch(i,l),e.applyData(i,l)}function h6(e,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};e.patch(i,r);const l={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(i,l),e.applyData(i,l)}function m6(e,i){const r=String(i.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return hk(e,i);const s={href:us(l.url||"")};l.title!==null&&l.title!==void 0&&(s.title=l.title);const u={type:"element",tagName:"a",properties:s,children:e.all(i)};return e.patch(i,u),e.applyData(i,u)}function p6(e,i){const r={href:us(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const l={type:"element",tagName:"a",properties:r,children:e.all(i)};return e.patch(i,l),e.applyData(i,l)}function g6(e,i,r){const l=e.all(i),s=r?v6(r):mk(i),u={},d=[];if(typeof i.checked=="boolean"){const y=l[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},l.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const y=l[f];(s||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
|
|
490
|
+
`}),y.type==="element"&&y.tagName==="p"&&!s?d.push(...y.children):d.push(y)}const m=l[l.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
|
|
491
|
+
`});const v={type:"element",tagName:"li",properties:u,children:d};return e.patch(i,v),e.applyData(i,v)}function v6(e){let i=!1;if(e.type==="list"){i=e.spread||!1;const r=e.children;let l=-1;for(;!i&&++l<r.length;)i=mk(r[l])}return i}function mk(e){const i=e.spread;return i??e.children.length>1}function y6(e,i){const r={},l=e.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++s<l.length;){const d=l[s];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const u={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:e.wrap(l,!0)};return e.patch(i,u),e.applyData(i,u)}function x6(e,i){const r={type:"element",tagName:"p",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function b6(e,i){const r={type:"root",children:e.wrap(e.all(i))};return e.patch(i,r),e.applyData(i,r)}function j6(e,i){const r={type:"element",tagName:"strong",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}function w6(e,i){const r=e.all(i),l=r.shift(),s=[];if(l){const d={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(i.children[0],d),s.push(d)}if(r.length>0){const d={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Gg(i.children[1]),m=GS(i.children[i.children.length-1]);f&&m&&(d.position={start:f,end:m}),s.push(d)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(i,u),e.applyData(i,u)}function S6(e,i,r){const l=r?r.children:void 0,u=(l?l.indexOf(i):1)===0?"th":"td",d=r&&r.type==="table"?r.align:void 0,f=d?d.length:i.children.length;let m=-1;const v=[];for(;++m<f;){const g=i.children[m],x={},b=d?d[m]:void 0;b&&(x.align=b);let w={type:"element",tagName:u,properties:x,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),v.push(w)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(v,!0)};return e.patch(i,y),e.applyData(i,y)}function k6(e,i){const r={type:"element",tagName:"td",properties:{},children:e.all(i)};return e.patch(i,r),e.applyData(i,r)}const j1=9,w1=32;function C6(e){const i=String(e),r=/\r?\n|\r/g;let l=r.exec(i),s=0;const u=[];for(;l;)u.push(S1(i.slice(s,l.index),s>0,!0),l[0]),s=l.index+l[0].length,l=r.exec(i);return u.push(S1(i.slice(s),s>0,!1)),u.join("")}function S1(e,i,r){let l=0,s=e.length;if(i){let u=e.codePointAt(l);for(;u===j1||u===w1;)l++,u=e.codePointAt(l)}if(r){let u=e.codePointAt(s-1);for(;u===j1||u===w1;)s--,u=e.codePointAt(s-1)}return s>l?e.slice(l,s):""}function N6(e,i){const r={type:"text",value:C6(String(i.value))};return e.patch(i,r),e.applyData(i,r)}function E6(e,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(i,r),e.applyData(i,r)}const T6={blockquote:i6,break:r6,code:a6,delete:l6,emphasis:o6,footnoteReference:s6,heading:c6,html:u6,imageReference:d6,image:f6,inlineCode:h6,linkReference:m6,link:p6,listItem:g6,list:y6,paragraph:x6,root:b6,strong:j6,table:w6,tableCell:k6,tableRow:S6,text:N6,thematicBreak:E6,toml:cd,yaml:cd,definition:cd,footnoteDefinition:cd};function cd(){}const pk=-1,lf=0,fc=1,zd=2,ev=3,tv=4,nv=5,iv=6,gk=7,vk=8,{defineProperty:A6}=Object,yk=typeof self=="object"?self:globalThis,k1=(e,i)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new yk[e](i)},M6=(e,i)=>{const r=(s,u)=>(e.set(u,s),s),l=s=>{if(e.has(s))return e.get(s);const[u,d]=i[s];switch(u){case lf:case pk:return r(d,s);case fc:{const f=r([],s);for(const m of d)f.push(l(m));return f}case zd:{const f=r({},s);for(const[m,v]of d){const y=l(m),g=l(v);y==="__proto__"?A6(f,y,{value:g,configurable:!0,enumerable:!0,writable:!0}):f[y]=g}return f}case ev:return r(new Date(d),s);case tv:{const{source:f,flags:m}=d;return r(new RegExp(f,m),s)}case nv:{const f=r(new Map,s);for(const[m,v]of d)f.set(l(m),l(v));return f}case iv:{const f=r(new Set,s);for(const m of d)f.add(l(m));return f}case gk:{const{name:f,message:m}=d;return r(typeof yk[f]=="function"?k1(f,m):new Error(m),s)}case vk:return r(BigInt(d),s);case"BigInt":return r(Object(BigInt(d)),s);case"ArrayBuffer":return r(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return r(new DataView(f),d)}case"-0":return-0}return r(k1(u,d),s)};return l},C1=e=>M6(new Map,e)(0),Ul="",{toString:R6}={},{keys:O6,is:_6}=Object,sc=e=>{const i=typeof e;if(i!=="object"||!e)return[lf,i];const r=R6.call(e).slice(8,-1);switch(r){case"Array":return[fc,Ul];case"Object":return[zd,Ul];case"Date":return[ev,Ul];case"RegExp":return[tv,Ul];case"Map":return[nv,Ul];case"Set":return[iv,Ul];case"DataView":return[fc,r]}return r.includes("Array")?[fc,r]:e instanceof Error?[gk,e.name||"Error"]:[zd,r]},ud=([e,i])=>e===lf&&(i==="function"||i==="symbol"),D6=(e,i,r,l)=>{const s=(d,f)=>{const m=l.push(d)-1;return r.set(f,m),m},u=d=>{if(r.has(d))return r.get(d);let[f,m]=sc(d);switch(f){case lf:{let y=d;switch(m){case"bigint":f=vk,y=d.toString();break;case"number":if(!d&&_6(d,-0))return l.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return s([pk],d)}return s([f,y],d)}case fc:{if(m){let x=d;return m==="DataView"?x=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(d)),s([m,[...x]],d)}const y=[],g=s([f,y],d);for(const x of d)y.push(u(x));return g}case zd:{if(m)switch(m){case"BigInt":return s([m,d.toString()],d);case"Boolean":case"Number":case"String":return s([m,d.valueOf()],d)}if(i&&"toJSON"in d)return u(d.toJSON());const y=[],g=s([f,y],d);for(const x of O6(d))(e||!ud(sc(d[x])))&&y.push([u(x),u(d[x])]);return g}case ev:return s([f,isNaN(d.getTime())?Ul:d.toISOString()],d);case tv:{const{source:y,flags:g}=d;return s([f,{source:y,flags:g}],d)}case nv:{const y=[],g=s([f,y],d);for(const[x,b]of d)(e||!(ud(sc(x))||ud(sc(b))))&&y.push([u(x),u(b)]);return g}case iv:{const y=[],g=s([f,y],d);for(const x of d)(e||!ud(sc(x)))&&y.push(u(x));return g}}const{message:v}=d;return s([f,{name:m,message:v}],d)};return u},N1=(e,{json:i,lossy:r}={})=>{const l=[];return D6(!(i||r),!!i,new Map,l)(e),l},Ld=typeof structuredClone=="function"?(e,i)=>i&&("json"in i||"lossy"in i)?C1(N1(e,i)):structuredClone(e):(e,i)=>C1(N1(e,i));function z6(e,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function L6(e,i){return"Back to reference "+(e+1)+(i>1?"-"+i:"")}function I6(e){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||z6,l=e.options.footnoteBackLabel||L6,s=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),g=String(v.identifier).toUpperCase(),x=us(g.toLowerCase());let b=0;const w=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++b<=k;){w.length>0&&w.push({type:"text",value:" "});let M=typeof r=="string"?r:r(m,b);typeof M=="string"&&(M={type:"text",value:M}),w.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(m,b),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(...w)}else y.push(...w);const E={type:"element",tagName:"li",properties:{id:i+"fn-"+x},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:{...Ld(d),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
492
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
493
|
+
`}]}}const of=(function(e){if(e==null)return U6;if(typeof e=="function")return sf(e);if(typeof e=="object")return Array.isArray(e)?B6(e):H6(e);if(typeof e=="string")return P6(e);throw new Error("Expected function, string, or object as test")});function B6(e){const i=[];let r=-1;for(;++r<e.length;)i[r]=of(e[r]);return sf(l);function l(...s){let u=-1;for(;++u<i.length;)if(i[u].apply(this,s))return!0;return!1}}function H6(e){const i=e;return sf(r);function r(l){const s=l;let u;for(u in e)if(s[u]!==i[u])return!1;return!0}}function P6(e){return sf(i);function i(r){return r&&r.type===e}}function sf(e){return i;function i(r,l,s){return!!(q6(r)&&e.call(this,r,typeof l=="number"?l:void 0,s||void 0))}}function U6(){return!0}function q6(e){return e!==null&&typeof e=="object"&&"type"in e}const xk=[],F6=!0,Jp=!1,V6="skip";function bk(e,i,r,l){let s;typeof i=="function"&&typeof r!="function"?(l=r,r=i):s=i;const u=of(s),d=l?-1:1;f(e,void 0,[])();function f(m,v,y){const g=m&&typeof m=="object"?m:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=xk,w,k,C;if((!i||u(m,v,y[y.length-1]||void 0))&&(b=$6(r(m,y)),b[0]===Jp))return b;if("children"in m&&m.children){const E=m;if(E.children&&b[0]!==V6)for(k=(l?E.children.length:-1)+d,C=y.concat(E);k>-1&&k<E.children.length;){const M=E.children[k];if(w=f(M,k,C)(),w[0]===Jp)return w;k=typeof w[1]=="number"?w[1]:k+d}}return b}}}function $6(e){return Array.isArray(e)?e:typeof e=="number"?[F6,e]:e==null?xk:[e]}function rv(e,i,r,l){let s,u,d;typeof i=="function"&&typeof r!="function"?(u=void 0,d=i,s=r):(u=i,d=r,s=l),bk(e,u,f,s);function f(m,v){const y=v[v.length-1],g=y?y.children.indexOf(m):void 0;return d(m,g,y)}}const Wp={}.hasOwnProperty,Y6={};function G6(e,i){const r=i||Y6,l=new Map,s=new Map,u=new Map,d={...T6,...r.handlers},f={all:v,applyData:Q6,definitionById:l,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:d,one:m,options:r,patch:X6,wrap:Z6};return rv(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?l:s,x=String(y.identifier).toUpperCase();g.has(x)||g.set(x,y)}}),f;function m(y,g){const x=y.type,b=f.handlers[x];if(Wp.call(f.handlers,x)&&b)return b(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in y){const{children:k,...C}=y,E=Ld(C);return E.children=f.all(y),E}return Ld(y)}return(f.options.unknownHandler||K6)(f,y,g)}function v(y){const g=[];if("children"in y){const x=y.children;let b=-1;for(;++b<x.length;){const w=f.one(x[b],y);if(w){if(b&&x[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=E1(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=E1(k.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function X6(e,i){e.position&&(i.position=D3(e))}function Q6(e,i){let r=i;if(e&&e.data){const l=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof l=="string")if(r.type==="element")r.tagName=l;else{const d="children"in r?r.children:[r];r={type:"element",tagName:l,properties:{},children:d}}r.type==="element"&&u&&Object.assign(r.properties,Ld(u)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function K6(e,i){const r=i.data||{},l="value"in i&&!(Wp.call(r,"hProperties")||Wp.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:e.all(i)};return e.patch(i,l),e.applyData(i,l)}function Z6(e,i){const r=[];let l=-1;for(i&&r.push({type:"text",value:`
|
|
494
|
+
`});++l<e.length;)l&&r.push({type:"text",value:`
|
|
495
|
+
`}),r.push(e[l]);return i&&e.length>0&&r.push({type:"text",value:`
|
|
496
|
+
`}),r}function E1(e){let i=0,r=e.charCodeAt(i);for(;r===9||r===32;)i++,r=e.charCodeAt(i);return e.slice(i)}function T1(e,i){const r=G6(e,i),l=r.one(e,void 0),s=I6(r),u=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
497
|
+
`},s),u}function J6(e,i){return e&&"run"in e?async function(r,l){const s=T1(r,{file:l,...i});await e.run(s,l)}:function(r,l){return T1(r,{file:l,...e||i})}}function A1(e){if(e)throw e}var Jm,M1;function W6(){if(M1)return Jm;M1=1;var e=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(v){return typeof Array.isArray=="function"?Array.isArray(v):i.call(v)==="[object Array]"},u=function(v){if(!v||i.call(v)!=="[object Object]")return!1;var y=e.call(v,"constructor"),g=v.constructor&&v.constructor.prototype&&e.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!g)return!1;var x;for(x in v);return typeof x>"u"||e.call(v,x)},d=function(v,y){r&&y.name==="__proto__"?r(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(l)return l(v,y).value}else return;return v[y]};return Jm=function m(){var v,y,g,x,b,w,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)g=f(k,y),x=f(v,y),k!==x&&(M&&x&&(u(x)||(b=s(x)))?(b?(b=!1,w=g&&s(g)?g:[]):w=g&&u(g)?g:{},d(k,{name:y,newValue:m(M,w,x)})):typeof x<"u"&&d(k,{name:y,newValue:x}));return k},Jm}var e5=W6();const Wm=cg(e5);function eg(e){if(typeof e!="object"||e===null)return!1;const i=Object.getPrototypeOf(e);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function t5(){const e=[],i={run:r,use:l};return i;function r(...s){let u=-1;const d=s.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...s);function f(m,...v){const y=e[++u];let g=-1;if(m){d(m);return}for(;++g<s.length;)(v[g]===null||v[g]===void 0)&&(v[g]=s[g]);s=v,y?n5(y,f)(...v):d(null,...v)}}function l(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),i}}function n5(e,i){let r;return l;function l(...d){const f=e.length>d.length;let m;f&&d.push(s);try{m=e.apply(this,d)}catch(v){const y=v;if(f&&r)throw y;return s(y)}f||(m&&m.then&&typeof m.then=="function"?m.then(u,s):m instanceof Error?s(m):u(m))}function s(d,...f){r||(r=!0,i(d,...f))}function u(d){s(null,d)}}const Mr={basename:i5,dirname:r5,extname:a5,join:l5,sep:"/"};function i5(e,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');_c(e);let r=0,l=-1,s=e.length,u;if(i===void 0||i.length===0||i.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){r=s+1;break}}else l<0&&(u=!0,l=s+1);return l<0?"":e.slice(r,l)}if(i===e)return"";let d=-1,f=i.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){r=s+1;break}}else d<0&&(u=!0,d=s+1),f>-1&&(e.codePointAt(s)===i.codePointAt(f--)?f<0&&(l=s):(f=-1,l=d));return r===l?l=d:l<0&&(l=e.length),e.slice(r,l)}function r5(e){if(_c(e),e.length===0)return".";let i=-1,r=e.length,l;for(;--r;)if(e.codePointAt(r)===47){if(l){i=r;break}}else l||(l=!0);return i<0?e.codePointAt(0)===47?"/":".":i===1&&e.codePointAt(0)===47?"//":e.slice(0,i)}function a5(e){_c(e);let i=e.length,r=-1,l=0,s=-1,u=0,d;for(;i--;){const f=e.codePointAt(i);if(f===47){if(d){l=i+1;break}continue}r<0&&(d=!0,r=i+1),f===46?s<0?s=i:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||r<0||u===0||u===1&&s===r-1&&s===l+1?"":e.slice(s,r)}function l5(...e){let i=-1,r;for(;++i<e.length;)_c(e[i]),e[i]&&(r=r===void 0?e[i]:r+"/"+e[i]);return r===void 0?".":o5(r)}function o5(e){_c(e);const i=e.codePointAt(0)===47;let r=s5(e,!i);return r.length===0&&!i&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),i?"/"+r:r}function s5(e,i){let r="",l=0,s=-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(!(s===d-1||u===1))if(s!==d-1&&u===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",l=0):(r=r.slice(0,m),l=r.length-1-r.lastIndexOf("/")),s=d,u=0;continue}}else if(r.length>0){r="",l=0,s=d,u=0;continue}}i&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+e.slice(s+1,d):r=e.slice(s+1,d),l=d-s-1;s=d,u=0}else f===46&&u>-1?u++:u=-1}return r}function _c(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c5={cwd:u5};function u5(){return"/"}function tg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d5(e){if(typeof e=="string")e=new URL(e);else if(!tg(e)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(e.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return f5(e)}function f5(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const i=e.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const l=i.codePointAt(r+2);if(l===70||l===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const ep=["history","path","basename","stem","extname","dirname"];class jk{constructor(i){let r;i?tg(i)?r={path:i}:typeof i=="string"||h5(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":c5.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<ep.length;){const u=ep[l];u in r&&r[u]!==void 0&&r[u]!==null&&(this[u]=u==="history"?[...r[u]]:r[u])}let s;for(s in r)ep.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Mr.basename(this.path):void 0}set basename(i){np(i,"basename"),tp(i,"basename"),this.path=Mr.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Mr.dirname(this.path):void 0}set dirname(i){R1(this.basename,"dirname"),this.path=Mr.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Mr.extname(this.path):void 0}set extname(i){if(tp(i,"extname"),R1(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mr.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){tg(i)&&(i=d5(i)),np(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Mr.basename(this.path,this.extname):void 0}set stem(i){np(i,"stem"),tp(i,"stem"),this.path=Mr.join(this.dirname||"",i+(this.extname||""))}fail(i,r,l){const s=this.message(i,r,l);throw s.fatal=!0,s}info(i,r,l){const s=this.message(i,r,l);return s.fatal=void 0,s}message(i,r,l){const s=new Hn(i,r,l);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function tp(e,i){if(e&&e.includes(Mr.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Mr.sep+"`")}function np(e,i){if(!e)throw new Error("`"+i+"` cannot be empty")}function R1(e,i){if(!e)throw new Error("Setting `"+i+"` requires `path` to be set too")}function h5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const m5=(function(e){const l=this.constructor.prototype,s=l[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,l),u}),p5={}.hasOwnProperty;class av extends m5{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=t5()}copy(){const i=new av;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];i.use(...l)}return i.data(Wm(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(ap("data",this.frozen),this.namespace[i]=r,this):p5.call(this.namespace,i)&&this.namespace[i]||void 0:i?(ap("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const s=r.call(i,...l);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=dd(i),l=this.parser||this.Parser;return ip("parse",l),l(String(r),r)}process(i,r){const l=this;return this.freeze(),ip("process",this.parser||this.Parser),rp("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(u,d){const f=dd(i),m=l.parse(f);l.run(m,f,function(y,g,x){if(y||!g||!x)return v(y);const b=g,w=l.stringify(b,x);y5(w)?x.value=w:x.result=w,v(y,x)});function v(y,g){y||!g?d(y):u?u(g):r(void 0,g)}}}processSync(i){let r=!1,l;return this.freeze(),ip("processSync",this.parser||this.Parser),rp("processSync",this.compiler||this.Compiler),this.process(i,s),_1("processSync","process",r),l;function s(u,d){r=!0,A1(u),l=d}}run(i,r,l){O1(i),this.freeze();const s=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?u(void 0,l):new Promise(u);function u(d,f){const m=dd(r);s.run(i,m,v);function v(y,g,x){const b=g||i;y?f(y):d?d(b):l(void 0,b,x)}}}runSync(i,r){let l=!1,s;return this.run(i,r,u),_1("runSync","run",l),s;function u(d,f){A1(d),s=f,l=!0}}stringify(i,r){this.freeze();const l=dd(r),s=this.compiler||this.Compiler;return rp("stringify",s),O1(i),s(i,l)}use(i,...r){const l=this.attachers,s=this.namespace;if(ap("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?f(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function u(v){if(typeof v=="function")m(v,[]);else if(typeof v=="object")if(Array.isArray(v)){const[y,...g]=v;m(y,g)}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&&(s.settings=Wm(!0,s.settings,v.settings))}function f(v){let y=-1;if(v!=null)if(Array.isArray(v))for(;++y<v.length;){const g=v[y];u(g)}else throw new TypeError("Expected a list of plugins, not `"+v+"`")}function m(v,y){let g=-1,x=-1;for(;++g<l.length;)if(l[g][0]===v){x=g;break}if(x===-1)l.push([v,...y]);else if(y.length>0){let[b,...w]=y;const k=l[x][1];eg(k)&&eg(b)&&(b=Wm(!0,k,b)),l[x]=[v,b,...w]}}}}const g5=new av().freeze();function ip(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rp(e,i){if(typeof i!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ap(e,i){if(i)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function O1(e){if(!eg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _1(e,i,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+i+"` instead")}function dd(e){return v5(e)?e:new jk(e)}function v5(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function y5(e){return typeof e=="string"||x5(e)}function x5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const b5="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",D1=[],z1={allowDangerousHtml:!0},j5=/^(https?|ircs?|mailto|xmpp)$/i,w5=[{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 S5(e){const i=k5(e),r=C5(e);return N5(i.runSync(i.parse(r),r),e)}function k5(e){const i=e.rehypePlugins||D1,r=e.remarkPlugins||D1,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...z1}:z1;return g5().use(n6).use(r).use(J6,l).use(i)}function C5(e){const i=e.children||"",r=new jk;return typeof i=="string"&&(r.value=i),r}function N5(e,i){const r=i.allowedElements,l=i.allowElement,s=i.components,u=i.disallowedElements,d=i.skipHtml,f=i.unwrapDisallowed,m=i.urlTransform||E5;for(const y of w5)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+b5+y.id,void 0);return rv(e,v),H3(e,{Fragment:c.Fragment,components:s,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function v(y,g,x){if(y.type==="raw"&&x&&typeof g=="number")return d?x.children.splice(g,1):x.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in Qm)if(Object.hasOwn(Qm,b)&&Object.hasOwn(y.properties,b)){const w=y.properties[b],k=Qm[b];(k===null||k.includes(y.tagName))&&(y.properties[b]=m(String(w||""),b,y))}}if(y.type==="element"){let b=r?!r.includes(y.tagName):u?u.includes(y.tagName):!1;if(!b&&l&&typeof g=="number"&&(b=!l(y,g,x)),b&&x&&typeof g=="number")return f&&y.children?x.children.splice(g,1,...y.children):x.children.splice(g,1),g}}}function E5(e){const i=e.indexOf(":"),r=e.indexOf("?"),l=e.indexOf("#"),s=e.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||l!==-1&&i>l||j5.test(e.slice(0,i))?e:""}function T5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wk(e,i,r){const s=of((r||{}).ignore||[]),u=A5(i);let d=-1;for(;++d<u.length;)bk(e,"text",f);function f(v,y){let g=-1,x;for(;++g<y.length;){const b=y[g],w=x?x.children:void 0;if(s(b,w?w.indexOf(b):void 0,x))return;x=b}if(x)return m(v,y)}function m(v,y){const g=y[y.length-1],x=u[d][0],b=u[d][1];let w=0;const C=g.children.indexOf(v);let E=!1,M=[];x.lastIndex=0;let T=x.exec(v.value);for(;T;){const A=T.index,I={index:T.index,input:T.input,stack:[...y,v]};let R=b(...T,I);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?x.lastIndex=A+1:(w!==A&&M.push({type:"text",value:v.value.slice(w,A)}),Array.isArray(R)?M.push(...R):R&&M.push(R),w=A+T[0].length,E=!0),!x.global)break;T=x.exec(v.value)}return E?(w<v.value.length&&M.push({type:"text",value:v.value.slice(w)}),g.children.splice(C,1,...M)):M=[v],C+M.length}}function A5(e){const i=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<r.length;){const s=r[l];i.push([M5(s[0]),R5(s[1])])}return i}function M5(e){return typeof e=="string"?new RegExp(T5(e),"g"):e}function R5(e){return typeof e=="function"?e:function(){return e}}function O5(e){wk(e,[/\r?\n|\r/g,_5])}function _5(){return{type:"break"}}function D5(){return function(e){O5(e)}}const z5=/[\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]/,L5=/https?:\/\/[^\s<\u3000-\u303f\uff00-\uffef\u2014\u2018-\u201f\u2026]+/g;function I5(e){var l;const i=((l=e.children)==null?void 0:l.length)===1?e.children[0]:void 0;if((i==null?void 0:i.type)!=="text"||!i.value)return;const r=i.value;return e.url===r||e.url===`http://${r}`||e.url===`mailto:${r}`?r:void 0}function Sk(e,i){return{type:"link",url:e,children:[{type:"text",value:i}]}}function B5(e){const i=[];let r=0;for(const l of e.matchAll(L5))l.index>r&&i.push({type:"text",value:e.slice(r,l.index)}),i.push(Sk(l[0],l[0])),r=l.index+l[0].length;return r<e.length&&i.push({type:"text",value:e.slice(r)}),i}function kk(e){const i=e.children;if(i)for(let r=0;r<i.length;r++){const l=i[r];if(l.type!=="link"){kk(l);continue}const s=I5(l),u=s===void 0?-1:s.search(z5);if(s===void 0||u<=0)continue;const d=s.slice(0,u),f=l.url.slice(0,l.url.length-s.length),m=B5(s.slice(u));i.splice(r,1,Sk(f+d,d),...m),r+=m.length}}function H5(){return e=>kk(e)}function L1(e,i){const r=String(e);if(typeof i!="string")throw new TypeError("Expected character");let l=0,s=r.indexOf(i);for(;s!==-1;)l++,s=r.indexOf(i,s+i.length);return l}const lp="phrasing",op=["autolink","link","image","label"];function P5(){return{transforms:[G5],enter:{literalAutolink:q5,literalAutolinkEmail:sp,literalAutolinkHttp:sp,literalAutolinkWww:sp},exit:{literalAutolink:Y5,literalAutolinkEmail:$5,literalAutolinkHttp:F5,literalAutolinkWww:V5}}}function U5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:op},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:op},{character:":",before:"[ps]",after:"\\/",inConstruct:lp,notInConstruct:op}]}}function q5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sp(e){this.config.enter.autolinkProtocol.call(this,e)}function F5(e){this.config.exit.autolinkProtocol.call(this,e)}function V5(e){this.config.exit.data.call(this,e);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(e)}function $5(e){this.config.exit.autolinkEmail.call(this,e)}function Y5(e){this.exit(e)}function G5(e){wk(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,X5],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Q5]],{ignore:["link","linkReference"]})}function X5(e,i,r,l,s){let u="";if(!Ck(s)||(/^w/i.test(i)&&(r=i+r,i="",u="http://"),!K5(r)))return!1;const d=Z5(r+l);if(!d[0])return!1;const f={type:"link",title:null,url:u+i+d[0],children:[{type:"text",value:i+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function Q5(e,i,r,l){return!Ck(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function K5(e){const i=e.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function Z5(e){const i=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!i)return[e,void 0];e=e.slice(0,i.index);let r=i[0],l=r.indexOf(")");const s=L1(e,"(");let u=L1(e,")");for(;l!==-1&&s>u;)e+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),u++;return[e,r]}function Ck(e,i){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Zl(r)||rf(r))&&(!i||r!==47)}Nk.peek=lL;function J5(){this.buffer()}function W5(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function eL(){this.buffer()}function tL(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nL(e){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=rr(this.sliceSerialize(e)).toLowerCase(),r.label=i}function iL(e){this.exit(e)}function rL(e){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=rr(this.sliceSerialize(e)).toLowerCase(),r.label=i}function aL(e){this.exit(e)}function lL(){return"["}function Nk(e,i,r,l){const s=r.createTracker(l);let u=s.move("[^");const d=r.enter("footnoteReference"),f=r.enter("reference");return u+=s.move(r.safe(r.associationId(e),{after:"]",before:u})),f(),d(),u+=s.move("]"),u}function oL(){return{enter:{gfmFootnoteCallString:J5,gfmFootnoteCall:W5,gfmFootnoteDefinitionLabelString:eL,gfmFootnoteDefinition:tL},exit:{gfmFootnoteCallString:nL,gfmFootnoteCall:iL,gfmFootnoteDefinitionLabelString:rL,gfmFootnoteDefinition:aL}}}function sL(e){let i=!1;return e&&e.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:Nk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,s,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(l),{before:m,after:"]"})),y(),m+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),m+=f.move((i?`
|
|
498
|
+
`:" ")+u.indentLines(u.containerFlow(l,f.current()),i?Ek:cL))),v(),m}}function cL(e,i,r){return i===0?e:Ek(e,i,r)}function Ek(e,i,r){return(r?"":" ")+e}const uL=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tk.peek=pL;function dL(){return{canContainEols:["delete"],enter:{strikethrough:hL},exit:{strikethrough:mL}}}function fL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uL}],handlers:{delete:Tk}}}function hL(e){this.enter({type:"delete",children:[]},e)}function mL(e){this.exit(e)}function Tk(e,i,r,l){const s=r.createTracker(l),u=r.enter("strikethrough");let d=s.move("~~");return d+=r.containerPhrasing(e,{...s.current(),before:d,after:"~"}),d+=s.move("~~"),u(),d}function pL(){return"~"}function gL(e){return e.length}function vL(e,i){const r=i||{},l=(r.align||[]).concat(),s=r.stringLength||gL,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=yL(e[y][E]);if(r.alignDelimiters!==!1){const T=s(M);C[E]=T,(m[E]===void 0||T>m[E])&&(m[E]=T)}k.push(M)}d[y]=k,f[y]=C}let g=-1;if(typeof l=="object"&&"length"in l)for(;++g<v;)u[g]=I1(l[g]);else{const k=I1(l);for(;++g<v;)u[g]=k}g=-1;const x=[],b=[];for(;++g<v;){const k=u[g];let C="",E="";k===99?(C=":",E=":"):k===108?C=":":k===114&&(E=":");let M=r.alignDelimiters===!1?1:Math.max(1,m[g]-C.length-E.length);const T=C+"-".repeat(M)+E;r.alignDelimiters!==!1&&(M=C.length+M+E.length,M>m[g]&&(m[g]=M),b[g]=M),x[g]=T}d.splice(1,0,x),f.splice(1,0,b),y=-1;const w=[];for(;++y<d.length;){const k=d[y],C=f[y];g=-1;const E=[];for(;++g<v;){const M=k[g]||"";let T="",A="";if(r.alignDelimiters!==!1){const I=m[g]-(C[g]||0),R=u[g];R===114?T=" ".repeat(I):R===99?I%2?(T=" ".repeat(I/2+.5),A=" ".repeat(I/2-.5)):(T=" ".repeat(I/2),A=T):A=" ".repeat(I)}r.delimiterStart!==!1&&!g&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&M==="")&&(r.delimiterStart!==!1||g)&&E.push(" "),r.alignDelimiters!==!1&&E.push(T),E.push(M),r.alignDelimiters!==!1&&E.push(A),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||g!==v-1)&&E.push("|")}w.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return w.join(`
|
|
499
|
+
`)}function yL(e){return e==null?"":String(e)}function I1(e){const i=typeof e=="string"?e.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function xL(e,i,r,l){const s=r.enter("blockquote"),u=r.createTracker(l);u.move("> "),u.shift(2);const d=r.indentLines(r.containerFlow(e,u.current()),bL);return s(),d}function bL(e,i,r){return">"+(r?"":" ")+e}function jL(e,i){return B1(e,i.inConstruct,!0)&&!B1(e,i.notInConstruct,!1)}function B1(e,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let l=-1;for(;++l<i.length;)if(e.includes(i[l]))return!0;return!1}function H1(e,i,r,l){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
|
|
500
|
+
`&&jL(r.stack,r.unsafe[s]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
501
|
+
`}function wL(e,i){const r=String(e);let l=r.indexOf(i),s=l,u=0,d=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===s?++u>d&&(d=u):u=1,s=l+i.length,l=r.indexOf(i,s);return d}function SL(e,i){return!!(i.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function kL(e){const i=e.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function CL(e,i,r,l){const s=kL(r),u=e.value||"",d=s==="`"?"GraveAccent":"Tilde";if(SL(e,r)){const g=r.enter("codeIndented"),x=r.indentLines(u,NL);return g(),x}const f=r.createTracker(l),m=s.repeat(Math.max(wL(u,s)+1,3)),v=r.enter("codeFenced");let y=f.move(m);if(e.lang){const g=r.enter(`codeFencedLang${d}`);y+=f.move(r.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=r.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(r.safe(e.meta,{before:y,after:`
|
|
502
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
503
|
+
`),u&&(y+=f.move(u+`
|
|
504
|
+
`)),y+=f.move(m),v(),y}function NL(e,i,r){return(r?"":" ")+e}function lv(e){const i=e.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function EL(e,i,r,l){const s=lv(r),u=s==='"'?"Quote":"Apostrophe",d=r.enter("definition");let f=r.enter("label");const m=r.createTracker(l);let v=m.move("[");return v+=m.move(r.safe(r.associationId(e),{before:v,after:"]",...m.current()})),v+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(r.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=r.enter("destinationRaw"),v+=m.move(r.safe(e.url,{before:v,after:e.title?" ":`
|
|
505
|
+
`,...m.current()}))),f(),e.title&&(f=r.enter(`title${u}`),v+=m.move(" "+s),v+=m.move(r.safe(e.title,{before:v,after:s,...m.current()})),v+=m.move(s),f()),d(),v}function TL(e){const i=e.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function jc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Id(e,i,r){const l=is(e),s=is(i);return l===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ak.peek=AL;function Ak(e,i,r,l){const s=TL(r),u=r.enter("emphasis"),d=r.createTracker(l),f=d.move(s);let m=d.move(r.containerPhrasing(e,{after:s,before:f,...d.current()}));const v=m.charCodeAt(0),y=Id(l.before.charCodeAt(l.before.length-1),v,s);y.inside&&(m=jc(v)+m.slice(1));const g=m.charCodeAt(m.length-1),x=Id(l.after.charCodeAt(0),g,s);x.inside&&(m=m.slice(0,-1)+jc(g));const b=d.move(s);return u(),r.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+m+b}function AL(e,i,r){return r.options.emphasis||"*"}function ML(e,i){let r=!1;return rv(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return r=!0,Jp}),!!((!e.depth||e.depth<3)&&Zg(e)&&(i.options.setext||r))}function RL(e,i,r,l){const s=Math.max(Math.min(6,e.depth||1),1),u=r.createTracker(l);if(ML(e,r)){const y=r.enter("headingSetext"),g=r.enter("phrasing"),x=r.containerPhrasing(e,{...u.current(),before:`
|
|
506
|
+
`,after:`
|
|
507
|
+
`});return g(),y(),x+`
|
|
508
|
+
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
509
|
+
`))+1))}const d="#".repeat(s),f=r.enter("headingAtx"),m=r.enter("phrasing");u.move(d+" ");let v=r.containerPhrasing(e,{before:"# ",after:`
|
|
510
|
+
`,...u.current()});return/^[\t ]/.test(v)&&(v=jc(v.charCodeAt(0))+v.slice(1)),v=v?d+" "+v:d,r.options.closeAtx&&(v+=" "+d),m(),f(),v}Mk.peek=OL;function Mk(e){return e.value||""}function OL(){return"<"}Rk.peek=_L;function Rk(e,i,r,l){const s=lv(r),u=s==='"'?"Quote":"Apostrophe",d=r.enter("image");let f=r.enter("label");const m=r.createTracker(l);let v=m.move("![");return v+=m.move(r.safe(e.alt,{before:v,after:"]",...m.current()})),v+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),v+=m.move("<"),v+=m.move(r.safe(e.url,{before:v,after:">",...m.current()})),v+=m.move(">")):(f=r.enter("destinationRaw"),v+=m.move(r.safe(e.url,{before:v,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=r.enter(`title${u}`),v+=m.move(" "+s),v+=m.move(r.safe(e.title,{before:v,after:s,...m.current()})),v+=m.move(s),f()),v+=m.move(")"),d(),v}function _L(){return"!"}Ok.peek=DL;function Ok(e,i,r,l){const s=e.referenceType,u=r.enter("imageReference");let d=r.enter("label");const f=r.createTracker(l);let m=f.move("![");const v=r.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=r.stack;r.stack=[],d=r.enter("reference");const g=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return d(),r.stack=y,u(),s==="full"||!v||v!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function DL(){return"!"}_k.peek=zL;function _k(e,i,r){let l=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(l);)s+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++u<r.unsafe.length;){const d=r.unsafe[u],f=r.compilePattern(d);let m;if(d.atBreak)for(;m=f.exec(l);){let v=m.index;l.charCodeAt(v)===10&&l.charCodeAt(v-1)===13&&v--,l=l.slice(0,v)+" "+l.slice(m.index+1)}}return s+l+s}function zL(){return"`"}function Dk(e,i){const r=Zg(e);return!!(!i.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zk.peek=LL;function zk(e,i,r,l){const s=lv(r),u=s==='"'?"Quote":"Apostrophe",d=r.createTracker(l);let f,m;if(Dk(e,r)){const y=r.stack;r.stack=[],f=r.enter("autolink");let g=d.move("<");return g+=d.move(r.containerPhrasing(e,{before:g,after:">",...d.current()})),g+=d.move(">"),f(),r.stack=y,g}f=r.enter("link"),m=r.enter("label");let v=d.move("[");return v+=d.move(r.containerPhrasing(e,{before:v,after:"](",...d.current()})),v+=d.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=r.enter("destinationLiteral"),v+=d.move("<"),v+=d.move(r.safe(e.url,{before:v,after:">",...d.current()})),v+=d.move(">")):(m=r.enter("destinationRaw"),v+=d.move(r.safe(e.url,{before:v,after:e.title?" ":")",...d.current()}))),m(),e.title&&(m=r.enter(`title${u}`),v+=d.move(" "+s),v+=d.move(r.safe(e.title,{before:v,after:s,...d.current()})),v+=d.move(s),m()),v+=d.move(")"),f(),v}function LL(e,i,r){return Dk(e,r)?"<":"["}Lk.peek=IL;function Lk(e,i,r,l){const s=e.referenceType,u=r.enter("linkReference");let d=r.enter("label");const f=r.createTracker(l);let m=f.move("[");const v=r.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(v+"]["),d();const y=r.stack;r.stack=[],d=r.enter("reference");const g=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return d(),r.stack=y,u(),s==="full"||!v||v!==g?m+=f.move(g+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function IL(){return"["}function ov(e){const i=e.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function BL(e){const i=ov(e),r=e.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function HL(e){const i=e.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function Ik(e){const i=e.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function PL(e,i,r,l){const s=r.enter("list"),u=r.bulletCurrent;let d=e.ordered?HL(r):ov(r);const f=e.ordered?d==="."?")":".":BL(r);let m=i&&r.bulletLastUsed?d===r.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(m=!0),Ik(r)===d&&y){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(d=f),r.bulletCurrent=d;const v=r.containerFlow(e,l);return r.bulletLastUsed=d,r.bulletCurrent=u,s(),v}function UL(e){const i=e.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function qL(e,i,r,l){const s=UL(r);let u=r.bulletCurrent||ov(r);i&&i.type==="list"&&i.ordered&&(u=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(e))+u);let d=u.length+1;(s==="tab"||s==="mixed"&&(i&&i.type==="list"&&i.spread||e.spread))&&(d=Math.ceil(d/4)*4);const f=r.createTracker(l);f.move(u+" ".repeat(d-u.length)),f.shift(d);const m=r.enter("listItem"),v=r.indentLines(r.containerFlow(e,f.current()),y);return m(),v;function y(g,x,b){return x?(b?"":" ".repeat(d))+g:(b?u:u+" ".repeat(d-u.length))+g}}function FL(e,i,r,l){const s=r.enter("paragraph"),u=r.enter("phrasing"),d=r.containerPhrasing(e,l);return u(),s(),d}const VL=of(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $L(e,i,r,l){return(e.children.some(function(d){return VL(d)})?r.containerPhrasing:r.containerFlow).call(r,e,l)}function YL(e){const i=e.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}Bk.peek=GL;function Bk(e,i,r,l){const s=YL(r),u=r.enter("strong"),d=r.createTracker(l),f=d.move(s+s);let m=d.move(r.containerPhrasing(e,{after:s,before:f,...d.current()}));const v=m.charCodeAt(0),y=Id(l.before.charCodeAt(l.before.length-1),v,s);y.inside&&(m=jc(v)+m.slice(1));const g=m.charCodeAt(m.length-1),x=Id(l.after.charCodeAt(0),g,s);x.inside&&(m=m.slice(0,-1)+jc(g));const b=d.move(s+s);return u(),r.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+m+b}function GL(e,i,r){return r.options.strong||"*"}function XL(e,i,r,l){return r.safe(e.value,l)}function QL(e){const i=e.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function KL(e,i,r){const l=(Ik(r)+(r.options.ruleSpaces?" ":"")).repeat(QL(r));return r.options.ruleSpaces?l.slice(0,-1):l}const Hk={blockquote:xL,break:H1,code:CL,definition:EL,emphasis:Ak,hardBreak:H1,heading:RL,html:Mk,image:Rk,imageReference:Ok,inlineCode:_k,link:zk,linkReference:Lk,list:PL,listItem:qL,paragraph:FL,root:$L,strong:Bk,text:XL,thematicBreak:KL};function ZL(){return{enter:{table:JL,tableData:P1,tableHeader:P1,tableRow:e8},exit:{codeText:t8,table:WL,tableData:cp,tableHeader:cp,tableRow:cp}}}function JL(e){const i=e._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function WL(e){this.exit(e),this.data.inTable=void 0}function e8(e){this.enter({type:"tableRow",children:[]},e)}function cp(e){this.exit(e)}function P1(e){this.enter({type:"tableCell",children:[]},e)}function t8(e){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,n8));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(e)}function n8(e,i){return i==="|"?i:e}function i8(e){const i=e||{},r=i.tableCellPadding,l=i.tablePipeAlign,s=i.stringLength,u=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
511
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:d,tableCell:m,tableRow:f}};function d(b,w,k,C){return v(y(b,k,C),b.align)}function f(b,w,k,C){const E=g(b,k,C),M=v([E]);return M.slice(0,M.indexOf(`
|
|
512
|
+
`))}function m(b,w,k,C){const E=k.enter("tableCell"),M=k.enter("phrasing"),T=k.containerPhrasing(b,{...C,before:u,after:u});return M(),E(),T}function v(b,w){return vL(b,{align:w,alignDelimiters:l,padding:r,stringLength:s})}function y(b,w,k){const C=b.children;let E=-1;const M=[],T=w.enter("table");for(;++E<C.length;)M[E]=g(C[E],w,k);return T(),M}function g(b,w,k){const C=b.children;let E=-1;const M=[],T=w.enter("tableRow");for(;++E<C.length;)M[E]=m(C[E],b,w,k);return T(),M}function x(b,w,k){let C=Hk.inlineCode(b,w,k);return k.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function r8(){return{exit:{taskListCheckValueChecked:U1,taskListCheckValueUnchecked:U1,paragraph:l8}}}function a8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:o8}}}function U1(e){const i=this.stack[this.stack.length-2];i.type,i.checked=e.type==="taskListCheckValueChecked"}function l8(e){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const l=r.children[0];if(l&&l.type==="text"){const s=i.children;let u=-1,d;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){d=f;break}}d===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function o8(e,i,r,l){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",d="["+(e.checked?"x":" ")+"] ",f=r.createTracker(l);u&&f.move(d);let m=Hk.listItem(e,i,r,{...l,...f.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,v)),m;function v(y){return y+d}}function s8(){return[P5(),oL(),dL(),ZL(),r8()]}function c8(e){return{extensions:[U5(),sL(e),fL(),i8(e),a8()]}}const u8={tokenize:g8,partial:!0},Pk={tokenize:v8,partial:!0},Uk={tokenize:y8,partial:!0},qk={tokenize:x8,partial:!0},d8={tokenize:b8,partial:!0},Fk={name:"wwwAutolink",tokenize:m8,previous:$k},Vk={name:"protocolAutolink",tokenize:p8,previous:Yk},ga={name:"emailAutolink",tokenize:h8,previous:Gk},$r={};function f8(){return{text:$r}}let Bl=48;for(;Bl<123;)$r[Bl]=ga,Bl++,Bl===58?Bl=65:Bl===91&&(Bl=97);$r[43]=ga;$r[45]=ga;$r[46]=ga;$r[95]=ga;$r[72]=[ga,Vk];$r[104]=[ga,Vk];$r[87]=[ga,Fk];$r[119]=[ga,Fk];function h8(e,i,r){const l=this;let s,u;return d;function d(g){return!ng(g)||!Gk.call(l,l.previous)||sv(l.events)?r(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return ng(g)?(e.consume(g),f):g===64?(e.consume(g),m):r(g)}function m(g){return g===46?e.check(d8,y,v)(g):g===45||g===95||Bn(g)?(u=!0,e.consume(g),m):y(g)}function v(g){return e.consume(g),s=!0,m}function y(g){return u&&s&&Xn(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),i(g)):r(g)}}function m8(e,i,r){const l=this;return s;function s(d){return d!==87&&d!==119||!$k.call(l,l.previous)||sv(l.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(u8,e.attempt(Pk,e.attempt(Uk,u),r),r)(d))}function u(d){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),i(d)}}function p8(e,i,r){const l=this;let s="",u=!1;return d;function d(g){return(g===72||g===104)&&Yk.call(l,l.previous)&&!sv(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):r(g)}function f(g){if(Xn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(g),m}return r(g)}function m(g){return g===47?(e.consume(g),u?v:(u=!0,m)):r(g)}function v(g){return g===null||Dd(g)||Nt(g)||Zl(g)||rf(g)?r(g):e.attempt(Pk,e.attempt(Uk,y),r)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),i(g)}}function g8(e,i,r){let l=0;return s;function s(d){return(d===87||d===119)&&l<3?(l++,e.consume(d),s):d===46&&l===3?(e.consume(d),u):r(d)}function u(d){return d===null?r(d):i(d)}}function v8(e,i,r){let l,s,u;return d;function d(v){return v===46||v===95?e.check(qk,m,f)(v):v===null||Nt(v)||Zl(v)||v!==45&&rf(v)?m(v):(u=!0,e.consume(v),d)}function f(v){return v===95?l=!0:(s=l,l=void 0),e.consume(v),d}function m(v){return s||l||!u?r(v):i(v)}}function y8(e,i){let r=0,l=0;return s;function s(d){return d===40?(r++,e.consume(d),s):d===41&&l<r?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(qk,i,u)(d):d===null||Nt(d)||Zl(d)?i(d):(e.consume(d),s)}function u(d){return d===41&&l++,e.consume(d),s}}function x8(e,i,r){return l;function l(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),l):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||Nt(f)||Zl(f)?i(f):r(f)}function s(f){return f===null||f===40||f===91||Nt(f)||Zl(f)?i(f):l(f)}function u(f){return Xn(f)?d(f):r(f)}function d(f){return f===59?(e.consume(f),l):Xn(f)?(e.consume(f),d):r(f)}}function b8(e,i,r){return l;function l(u){return e.consume(u),s}function s(u){return Bn(u)?r(u):i(u)}}function $k(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Nt(e)}function Yk(e){return!Xn(e)}function Gk(e){return!(e===47||ng(e))}function ng(e){return e===43||e===45||e===46||e===95||Bn(e)}function sv(e){let i=e.length,r=!1;for(;i--;){const l=e[i][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const j8={tokenize:A8,partial:!0};function w8(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:N8,continuation:{tokenize:E8},exit:T8}},text:{91:{name:"gfmFootnoteCall",tokenize:C8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:S8,resolveTo:k8}}}}function S8(e,i,r){const l=this;let s=l.events.length;const u=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let d;for(;s--;){const m=l.events[s][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 r(m);const v=rr(l.sliceSerialize({start:d.end,end:l.now()}));return v.codePointAt(0)!==94||!u.includes(v.slice(1))?r(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),i(m))}}function k8(e,i){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.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[r+1],e[r+2],["enter",l,i],e[r+3],e[r+4],["enter",s,i],["exit",s,i],["enter",u,i],["enter",d,i],["exit",d,i],["exit",u,i],e[e.length-2],e[e.length-1],["exit",l,i]];return e.splice(r,e.length-r+1,...f),e}function C8(e,i,r){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u=0,d;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),m}function m(g){return g!==94?r(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",v)}function v(g){if(u>999||g===93&&!d||g===null||g===91||Nt(g))return r(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(rr(l.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),i):r(g)}return Nt(g)||(d=!0),u++,e.consume(g),g===92?y:v}function y(g){return g===91||g===92||g===93?(e.consume(g),u++,v):v(g)}}function N8(e,i,r){const l=this,s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let u,d=0,f;return m;function m(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),v}function v(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):r(w)}function y(w){if(d>999||w===93&&!f||w===null||w===91||Nt(w))return r(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=rr(l.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Nt(w)||(f=!0),d++,e.consume(w),w===92?g:y}function g(w){return w===91||w===92||w===93?(e.consume(w),d++,y):y(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(u)||s.push(u),ft(e,b,"gfmFootnoteDefinitionWhitespace")):r(w)}function b(w){return i(w)}}function E8(e,i,r){return e.check(Oc,i,e.attempt(j8,i,r))}function T8(e){e.exit("gfmFootnoteDefinition")}function A8(e,i,r){const l=this;return ft(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const d=l.events[l.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?i(u):r(u)}}function M8(e){let r=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:u,resolveAll:s};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function s(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)},g={type:"strikethroughText",start:Object.assign({},d[v][1].end),end:Object.assign({},d[m][1].start)},x=[["enter",y,f],["enter",d[v][1],f],["exit",d[v][1],f],["enter",g,f]],b=f.parser.constructs.insideSpan.null;b&&Mi(x,x.length,0,af(b,d.slice(v+1,m),f)),Mi(x,x.length,0,[["exit",g,f],["enter",d[m][1],f],["exit",d[m][1],f],["exit",y,f]]),Mi(d,v-1,m-v+3,x),m=v+x.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 g=0;return x;function x(w){return v===126&&y[y.length-1][1].type!=="characterEscape"?m(w):(d.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const k=is(v);if(w===126)return g>1?m(w):(d.consume(w),g++,b);if(g<2&&!r)return m(w);const C=d.exit("strikethroughSequenceTemporary"),E=is(w);return C._open=!E||E===2&&!!k,C._close=!k||k===2&&!!E,f(w)}}}class R8{constructor(){this.map=[],this.index=new Map}add(i,r,l){O8(this,i,r,l)}consume(i){if(this.map.sort(function(u,d){return u[0]-d[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];l.push(i.slice()),i.length=0;let s=l.pop();for(;s;){for(const u of s)i.push(u);s=l.pop()}this.map.length=0,this.index.clear()}}function O8(e,i,r,l){if(r===0&&l.length===0)return;const s=e.index.get(i);if(s){s[1]+=r,s[2].push(...l);return}const u=[i,r,l];e.map.push(u),e.index.set(i,u)}function _8(e,i){let r=!1;const l=[];for(;i<e.length;){const s=e[i];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&l.push(e[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[i-1][1].type==="tableDelimiterMarker"){const u=l.length-1;l[u]=l[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return l}function D8(){return{flow:{null:{name:"table",tokenize:z8,resolveAll:L8}}}}function z8(e,i,r){const l=this;let s=0,u=0,d;return f;function f(z){let Y=l.events.length-1;for(;Y>-1;){const{type:G}=l.events[Y][1];if(G==="lineEnding"||G==="linePrefix")Y--;else break}const q=Y>-1?l.events[Y][1].type:null,ee=q==="tableHead"||q==="tableRow"?R:m;return ee===R&&l.parser.lazy[l.now().line]?r(z):ee(z)}function m(z){return e.enter("tableHead"),e.enter("tableRow"),v(z)}function v(z){return z===124||(d=!0,u+=1),y(z)}function y(z){return z===null?r(z):Pe(z)?u>1?(u=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),b):r(z):it(z)?ft(e,y,"whitespace")(z):(u+=1,d&&(d=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),d=!0,y):(e.enter("data"),g(z)))}function g(z){return z===null||z===124||Nt(z)?(e.exit("data"),y(z)):(e.consume(z),z===92?x:g)}function x(z){return z===92||z===124?(e.consume(z),g):g(z)}function b(z){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(z):(e.enter("tableDelimiterRow"),d=!1,it(z)?ft(e,w,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):w(z))}function w(z){return z===45||z===58?C(z):z===124?(d=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),k):I(z)}function k(z){return it(z)?ft(e,C,"whitespace")(z):C(z)}function C(z){return z===58?(u+=1,d=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),E):z===45?(u+=1,E(z)):z===null||Pe(z)?A(z):I(z)}function E(z){return z===45?(e.enter("tableDelimiterFiller"),M(z)):I(z)}function M(z){return z===45?(e.consume(z),M):z===58?(d=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(z))}function T(z){return it(z)?ft(e,A,"whitespace")(z):A(z)}function A(z){return z===124?w(z):z===null||Pe(z)?!d||s!==u?I(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),i(z)):I(z)}function I(z){return r(z)}function R(z){return e.enter("tableRow"),B(z)}function B(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),B):z===null||Pe(z)?(e.exit("tableRow"),i(z)):it(z)?ft(e,B,"whitespace")(z):(e.enter("data"),U(z))}function U(z){return z===null||z===124||Nt(z)?(e.exit("data"),B(z)):(e.consume(z),z===92?$:U)}function $(z){return z===92||z===124?(e.consume(z),U):U(z)}}function L8(e,i){let r=-1,l=!0,s=0,u=[0,0,0,0],d=[0,0,0,0],f=!1,m=0,v,y,g;const x=new R8;for(;++r<e.length;){const b=e[r],w=b[1];b[0]==="enter"?w.type==="tableHead"?(f=!1,m!==0&&(q1(x,i,m,v,y),y=void 0,m=0),v={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",v,i]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(l=!0,g=void 0,u=[0,0,0,0],d=[0,r+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(r,0,[["enter",y,i]])),s=w.type==="tableDelimiterRow"?2:y?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(l=!1,d[2]===0&&(u[1]!==0&&(d[0]=d[1],g=fd(x,i,u,s,void 0,g),u=[0,0,0,0]),d[2]=r)):w.type==="tableCellDivider"&&(l?l=!1:(u[1]!==0&&(d[0]=d[1],g=fd(x,i,u,s,void 0,g)),u=d,d=[u[1],r,0,0])):w.type==="tableHead"?(f=!0,m=r):w.type==="tableRow"||w.type==="tableDelimiterRow"?(m=r,u[1]!==0?(d[0]=d[1],g=fd(x,i,u,s,r,g)):d[1]!==0&&(g=fd(x,i,d,s,r,g)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(d[3]=r)}for(m!==0&&q1(x,i,m,v,y),x.consume(i.events),r=-1;++r<i.events.length;){const b=i.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=_8(i.events,r))}return e}function fd(e,i,r,l,s,u){const d=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(u.end=Object.assign({},Jo(i.events,r[0])),e.add(r[0],0,[["exit",u,i]]));const m=Jo(i.events,r[1]);if(u={type:d,start:Object.assign({},m),end:Object.assign({},m)},e.add(r[1],0,[["enter",u,i]]),r[2]!==0){const v=Jo(i.events,r[2]),y=Jo(i.events,r[3]),g={type:f,start:Object.assign({},v),end:Object.assign({},y)};if(e.add(r[2],0,[["enter",g,i]]),l!==2){const x=i.events[r[2]],b=i.events[r[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const w=r[2]+1,k=r[3]-r[2]-1;e.add(w,k,[])}}e.add(r[3]+1,0,[["exit",g,i]])}return s!==void 0&&(u.end=Object.assign({},Jo(i.events,s)),e.add(s,0,[["exit",u,i]]),u=void 0),u}function q1(e,i,r,l,s){const u=[],d=Jo(i.events,r);s&&(s.end=Object.assign({},d),u.push(["exit",s,i])),l.end=Object.assign({},d),u.push(["exit",l,i]),e.add(r+1,0,u)}function Jo(e,i){const r=e[i],l=r[0]==="enter"?"start":"end";return r[1][l]}const I8={name:"tasklistCheck",tokenize:H8};function B8(){return{text:{91:I8}}}function H8(e,i,r){const l=this;return s;function s(m){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),u)}function u(m){return Nt(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):r(m)}function d(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(m)}function f(m){return Pe(m)?i(m):it(m)?e.check({tokenize:P8},i,r)(m):r(m)}}function P8(e,i,r){return ft(e,l,"whitespace");function l(s){return s===null?r(s):i(s)}}function U8(e){return ek([f8(),w8(),M8(e),D8(),B8()])}const q8={};function F8(e){const i=this,r=e||q8,l=i.data(),s=l.micromarkExtensions||(l.micromarkExtensions=[]),u=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),d=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);s.push(U8(r)),u.push(s8()),d.push(c8(r))}function Bd(e){document.documentElement.dataset.theme=e,document.documentElement.classList.toggle("dark",e==="dark"),document.documentElement.style.colorScheme=e,localStorage.setItem("jarvy-theme",e)}const V8={add:Vd,"chat-bubble":DA,window:sA,close:Cc,"chevron-left":Z2,"chevron-right":Ka,"chevron-down":Yl,gear:GA,"person-add":e4,"arrow-bracket-to-left":RA,"arrow-up":dA,copy:tj,check:Ir,"cloud-download":rj,bell:hA,"bell-slash":fA,image:AA,paperclip:fg,"smiley-plus":wA,info:dg,people:t4,pencil:qA,file:NA,"file-video":kA,"file-audio":SA,folder:EA,"layout-sidebar-left":PA,sun:WA,moon:HA,"arrows-expand":yA,"arrows-contract":QA,"arrow-u-up-right":VA,"list-bullets":MA,eye:jA,"eye-slash":bA,pin:Np,megaphone:OA,trash:Ed,search:kc,quote:FA};function De({name:e}){const i=V8[e]??dg;return c.jsx(i,{className:"ui-icon","aria-hidden":"true",focusable:"false"})}function ct({icon:e,label:i,className:r="",...l}){return c.jsx("button",{type:"button",className:`ui-iconbtn ${r}`,"aria-label":i,title:i,...l,children:c.jsx(De,{name:e})})}function rs({title:e,onClose:i,children:r,className:l=""}){const s=S.useRef(null),u=S.useId();return S.useEffect(()=>{const d=s.current,f=document.activeElement;return d.showModal(),()=>{d.close(),f==null||f.focus({preventScroll:!0})}},[]),no.createPortal(c.jsxs("dialog",{ref:s,className:`ui-small-dialog ${l}`,"aria-labelledby":u,onCancel:d=>{d.preventDefault(),i()},children:[c.jsx(ct,{icon:"close",label:j("ui.closeNamed",{name:e}),className:"ui-dialog-close",onClick:i}),c.jsxs("div",{className:"ui-dialog-body",children:[c.jsx("h1",{id:u,children:e}),r]})]}),document.body)}async function cv(e){if(window.isSecureContext&&navigator.clipboard)try{return await navigator.clipboard.writeText(e),!0}catch{}const i=document.createElement("textarea");i.value=e,i.setAttribute("readonly",""),i.style.position="fixed",i.style.opacity="0",document.body.append(i),i.select();try{return document.execCommand("copy")}finally{i.remove()}}function $8({children:e}){const i=S.useRef(null),[r,l]=S.useState("idle");S.useEffect(()=>{if(r==="idle")return;const u=setTimeout(()=>l("idle"),1500);return()=>clearTimeout(u)},[r]);const s=async()=>{var u;return l(await cv((((u=i.current)==null?void 0:u.textContent)??"").replace(/\n$/,""))?"copied":"failed")};return c.jsxs("figure",{className:"ui-code-figure",children:[c.jsx("pre",{ref:i,children:e}),c.jsx(ct,{icon:r==="copied"?"check":"copy",label:j(r==="copied"?"ui.copied":r==="failed"?"ui.copyFailed":"ui.copyCode"),onClick:()=>void s()})]})}const Y8=[F8,H5,D5],Dc=S.memo(function({text:i,renderQuote:r}){return D2(),c.jsx(S5,{remarkPlugins:Y8,skipHtml:!0,components:{a:({href:l,children:s})=>l==="#mention"||l==="#mention-me"?c.jsx("span",{className:"jv-mention","data-me":l==="#mention-me"||void 0,children:s}):r&&(l!=null&&l.startsWith("#quote-"))?r(Number(l.slice(7))):c.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",children:s}),img:({alt:l})=>c.jsx("span",{children:j("ui.image",{alt:l||j("ui.imageHidden")})}),pre:({children:l})=>c.jsx($8,{children:l})},children:i})}),G8={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_missing:"error.connectionMissing",credential_changed:"error.credentialChanged",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",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",runtime_failed:"error.runtimeFailed",session_corrupt:"error.sessionCorrupt",session_mismatch:"error.sessionMismatch",session_missing:"error.sessionMissing",session_path:"error.sessionPath",stopping:"error.stopping",thinking_format:"error.thinkingFormat",tools_missing:"error.toolsMissing",unsafe_replay:"error.unsafeReplay"},Xk=(e,i)=>{const r=e?G8[e]:void 0;return r?j(r,i):null};function Ot(e,i="common.failed"){return e instanceof ts?Xk(e.code,e.params)??(e.status<500?e.message:j(i)):e instanceof Error&&e.message?e.message:j(i)}const X8=e=>Xk(e.errorCode,e.errorParams)??e.error??"";function Q8({botId:e,selected:i,onSelect:r,onOpenChat:l}){const[s,u]=S.useState(null),[d,f]=S.useState(!0),[m,v]=S.useState(""),[y,g]=S.useState(0);if(S.useEffect(()=>{let w=!0;return f(!0),v(""),u(null),(i.kind==="history"?u3.read(e,i.id).then(C=>({kind:"history",data:C})):aw.message(e,i.id).then(C=>({kind:"chat",data:C}))).then(C=>{w&&u(C)}).catch(C=>{w&&v(Ot(C,"activity.detailFailed"))}).finally(()=>{w&&f(!1)}),()=>{w=!1}},[e,i.kind,i.id,y]),d)return c.jsx("p",{className:"jv-activity-state",role:"status",children:j("activity.detailLoading")});if(m)return c.jsxs("div",{className:"jv-activity-state",children:[c.jsx("p",{role:"alert",children:m}),c.jsx(qe,{variant:"outline",size:"sm",onClick:()=>g(w=>w+1),children:j("common.retry")})]});if(!s)return null;if(s.kind==="history")return c.jsx(l3,{detail:s.data,onSelect:w=>r({kind:"history",id:w})},s.data.record.id);const{chat:x,message:b}=s.data;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"jv-activity-message-head",children:[c.jsxs("div",{children:[c.jsx("h3",{children:x.title}),c.jsx("p",{children:Vg(b.createdAt)})]}),c.jsxs(qe,{variant:"ghost",size:"sm",onClick:()=>l(x.id),children:[j("activity.openChat"),c.jsx(Cp,{})]})]}),c.jsxs("div",{className:"jv-activity-message-body",children:[b.content&&c.jsx(Dc,{text:b.content}),b.attachments.length>0&&c.jsx("div",{className:"jv-activity-message-files",children:b.attachments.map(w=>c.jsxs("a",{href:`/api/attachments/${w.id}`,download:w.name,children:[c.jsx(fg,{}),w.name]},w.id))}),b.source&&c.jsxs(qe,{className:"jv-activity-message-source",variant:"outline",size:"sm",onClick:()=>r({kind:"history",id:b.source.historyId}),children:[j("activity.sentBy",{id:b.source.historyId}),c.jsx(Cp,{})]})]})]})}const Qk=sR;function Kk({className:e,children:i,showCloseButton:r=!0,...l}){return c.jsxs(uR,{children:[c.jsx(dR,{"data-slot":"dialog-overlay",className:"fixed inset-0 z-[80] bg-black/50"}),c.jsxs(mR,{"data-slot":"dialog-content",className:nn("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),...l,children:[i,r&&c.jsx(bR,{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":j("common.close"),children:c.jsx(Cc,{className:"size-4"})})]})]})}function uv({className:e,...i}){return c.jsx("div",{"data-slot":"dialog-header",className:nn("flex flex-col gap-2",e),...i})}function cf({className:e,...i}){return c.jsx(yR,{"data-slot":"dialog-title",className:nn("text-lg font-semibold",e),...i})}function K8({botId:e,botName:i,onBack:r,onOpenChat:l}){const[s,u]=S.useState([void 0]),d=s.at(-1),[f,m]=S.useState({items:[],nextBefore:null}),[v,y]=S.useState(!0),[g,x]=S.useState(""),[b,w]=S.useState(0),[k,C]=S.useState(null),E=S.useRef(null),M=S.useRef(0),T=S.useRef(null);S.useEffect(()=>{let R=!0;return y(!0),x(""),m({items:[],nextBefore:null}),E.current&&(E.current.scrollTop=0),aw.list(e,d).then(B=>{R&&m(B)}).catch(B=>{R&&x(Ot(B,"activity.loadFailed"))}).finally(()=>{R&&y(!1)}),()=>{R=!1}},[e,d,b]);const A=R=>{var B;k||(M.current=((B=E.current)==null?void 0:B.scrollTop)??0,T.current=document.activeElement),C(R)},I=()=>{if(!k){r();return}C(null),requestAnimationFrame(()=>{var R;E.current&&(E.current.scrollTop=M.current),(R=T.current)==null||R.focus({preventScroll:!0})})};return c.jsxs(c.Fragment,{children:[c.jsxs(uv,{className:"jv-bot-info-navigation",children:[c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j(k?"activity.backToTimeline":"usage.back"),onClick:I,children:c.jsx(Fd,{})}),c.jsx(cf,{children:k?k.kind==="history"?"History":j("activity.chatRecord"):j("bot.activity")}),c.jsx("span",{className:"jv-bot-page-name",children:i})]}),c.jsxs("div",{className:"jv-activity",children:[c.jsxs("div",{className:"jv-activity-list",hidden:k!==null,children:[c.jsxs("div",{className:"jv-activity-toolbar",children:[c.jsx("span",{children:j("activity.newestFirst")}),c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:v,onClick:()=>{u([void 0]),w(R=>R+1)},"aria-label":j("activity.refresh"),children:[c.jsx(hg,{}),j(v?"activity.reading":"usage.refresh")]})]}),c.jsxs("div",{className:"jv-activity-columns","aria-hidden":"true",children:[c.jsx("span",{children:j("activity.columnChat")}),c.jsx("span",{children:j("activity.columnTime")}),c.jsx("span",{children:"History"})]}),c.jsx("div",{className:"jv-activity-scroll",ref:E,children:v?c.jsx("p",{className:"jv-activity-state",role:"status",children:j("activity.loading")}):g?c.jsxs("div",{className:"jv-activity-state",children:[c.jsx("p",{role:"alert",children:g}),c.jsx(qe,{variant:"outline",size:"sm",onClick:()=>w(R=>R+1),children:j("common.retry")})]}):f.items.length?c.jsx(c3,{items:f.items,onSelect:A}):c.jsxs("div",{className:"jv-activity-state jv-activity-empty",children:[c.jsx("p",{children:j("activity.empty")}),c.jsx("span",{children:j("activity.emptyHint")})]})}),c.jsxs("div",{className:"jv-activity-pagination",children:[c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:v||s.length===1,onClick:()=>u(R=>R.slice(0,-1)),children:[c.jsx(Z2,{}),j("activity.newer")]}),c.jsx("span",{children:j("activity.page",{page:s.length})}),c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:v||f.nextBefore===null,onClick:()=>u(R=>[...R,f.nextBefore]),children:[j("activity.older"),c.jsx(Ka,{})]})]})]}),k&&c.jsx("section",{className:"jv-activity-detail","aria-label":j(k.kind==="history"?"activity.historyDetail":"activity.chatDetail"),children:c.jsx(Q8,{botId:e,selected:k,onSelect:A,onOpenChat:l})})]})]})}const Z8={list:(e,i)=>Ae(`/bots/${e}/usage?since=${i}`)},J8=["today","7d","30d"],W8=e=>e==="today"?j("usage.today"):j("usage.days",{count:e==="7d"?7:30}),hd=[["calls","usage.calls"],["input","usage.input"],["output","usage.output"],["cacheRead","usage.cacheRead"],["cacheWrite","usage.cacheWrite"]];function eI(e){const i=new Date;return i.setHours(0,0,0,0),i.setDate(i.getDate()-(e==="7d"?6:e==="30d"?29:0)),i.getTime()}const F1=e=>Lr(e,e<1e4?void 0:{notation:"compact",maximumFractionDigits:1}),V1=e=>e>0&&e<.01?"< $0.01":`$${e.toFixed(2)}`;function tI({botId:e,botName:i,onBack:r}){const[l,s]=S.useState("today"),[u,d]=S.useState(null),[f,m]=S.useState(""),[v,y]=S.useState(0);S.useEffect(()=>{let w=!0;return d(null),m(""),Z8.list(e,eI(l)).then(k=>{w&&d(k.models)}).catch(k=>{w&&m(Ot(k,"usage.loadFailed"))}),()=>{w=!1}},[e,l,v]);const g=(u==null?void 0:u.filter(w=>w.cost!==null))??[],x=u&&Object.fromEntries(hd.map(([w])=>[w,u.reduce((k,C)=>k+C[w],0)])),b=g.length?V1(g.reduce((w,k)=>w+k.cost,0)):j("usage.unpriced");return c.jsxs(c.Fragment,{children:[c.jsxs(uv,{className:"jv-bot-info-navigation",children:[c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j("usage.back"),onClick:r,children:c.jsx(Fd,{})}),c.jsx(cf,{children:j("usage.title")}),c.jsx("span",{className:"jv-bot-page-name",children:i})]}),c.jsxs("div",{className:"jv-usage",children:[c.jsxs("div",{className:"jv-usage-toolbar",children:[c.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":j("usage.range"),children:J8.map(w=>c.jsx("button",{type:"button",role:"tab","aria-selected":l===w,onClick:()=>s(w),children:W8(w)},w))}),c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:!u&&!f,onClick:()=>y(w=>w+1),"aria-label":j("usage.refreshLabel"),children:[c.jsx(hg,{}),j("usage.refresh")]})]}),c.jsx("div",{className:"jv-usage-scroll",children:f?c.jsxs("div",{className:"jv-usage-state",children:[c.jsx("p",{role:"alert",children:f}),c.jsx(qe,{variant:"outline",size:"sm",onClick:()=>y(w=>w+1),children:j("usage.retry")})]}):u?u.length?c.jsxs(c.Fragment,{children:[c.jsxs("table",{className:"jv-usage-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{scope:"col",children:j("usage.model")}),hd.map(([w,k])=>c.jsx("th",{scope:"col",children:j(k)},w)),c.jsx("th",{scope:"col",children:j("usage.cost")})]})}),c.jsx("tbody",{children:u.map(w=>c.jsxs("tr",{children:[c.jsx("th",{scope:"row",children:c.jsxs("span",{className:"jv-usage-model",children:[c.jsx("strong",{children:w.model}),c.jsx("span",{children:w.provider})]})}),hd.map(([k,C])=>c.jsx("td",{"data-label":j(C),title:Lr(w[k]),children:F1(w[k])},k)),c.jsx("td",{"data-label":j("usage.cost"),className:w.cost===null?"jv-usage-unpriced":void 0,title:w.cost===null?void 0:`$${w.cost.toFixed(4)}`,children:w.cost===null?j("usage.unpriced"):V1(w.cost)})]},`${w.provider}/${w.model}`))}),u.length>1&&x&&c.jsx("tfoot",{children:c.jsxs("tr",{children:[c.jsx("th",{scope:"row",children:c.jsx("strong",{children:j("usage.total")})}),hd.map(([w,k])=>c.jsx("td",{"data-label":j(k),title:Lr(x[w]),children:F1(x[w])},w)),c.jsx("td",{"data-label":j("usage.cost"),className:g.length?void 0:"jv-usage-unpriced",children:b})]})})]}),c.jsx("p",{className:"jv-usage-note",children:j(g.length>0&&g.length<u.length?"usage.notePartial":"usage.note")})]}):c.jsx("div",{className:"jv-usage-state jv-usage-empty",children:c.jsx("p",{children:j("usage.empty")})}):c.jsx("p",{className:"jv-usage-state",role:"status",children:j("usage.loading")})})]})]})}const Vi={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"}},nI=["normal","happy","sad","angry","dizzy"],Zk=e=>{var i;return`#${(((i=Vi[e])==null?void 0:i.hex)??Vi.gray.hex).toString(16).padStart(6,"0")}`},iI="modulepreload",rI=function(e){return"/"+e},$1={},Hd=function(i,r,l){let s=Promise.resolve();if(r&&r.length>0){let d=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};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"));s=d(r.map(v=>{if(v=rI(v),v in $1)return;$1[v]=!0;const y=v.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${g}`))return;const x=document.createElement("link");if(x.rel=y?"stylesheet":iI,y||(x.as="script"),x.crossOrigin="",x.href=v,m&&x.setAttribute("nonce",m),document.head.appendChild(x),y)return new Promise((b,w)=>{x.addEventListener("load",b),x.addEventListener("error",()=>w(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 s.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return i().catch(u)})};let Y1;const up=new Map;let G1=Promise.resolve();function aI(){return Y1??(Y1=Promise.all([Hd(()=>import("./three.module-BdMZo7zQ.js"),[]),Hd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([e,i])=>{const r=new e.WebGLRenderer({antialias:!0,alpha:!0,preserveDrawingBuffer:!0});i.configureRenderer(e,r);const{scene:l,camera:s,ground:u}=i.createStage(e),d=new i.CatFigure(e,Vi.gray.hex);return l.add(d.root),i.frameCamera(s,1,3.3),{render(f,m,v,y,g){var x;return r.setSize(v,v,!1),d.setColor(((x=Vi[f])==null?void 0:x.hex)??Vi.gray.hex),d.setCrown(g),d.pose(m),u.visible=y,r.render(l,s),r.domElement.toDataURL("image/png")}}})),Y1}function lI(e,i,r,l=!1){const s=Math.round(r*Math.min(3,Math.max(1,window.devicePixelRatio||1))),u=`${e}:${i}:${s}:${l}`;let d=up.get(u);return d||(d=G1.then(()=>aI()).then(f=>f.render(e,i,s,r>=40,l)),G1=d.catch(()=>{}),up.set(u,d),d.catch(()=>up.delete(u))),d}function zc({color:e,mood:i="normal",size:r=36,badge:l,crown:s=!1}){const[u,d]=S.useState();return S.useEffect(()=>{let f=!0;return d(void 0),lI(e,i,r,s).then(m=>{f&&d(m)}).catch(()=>{}),()=>{f=!1}},[e,i,r,s]),c.jsxs("span",{className:"jv-bot-avatar",style:{"--jv-avatar-size":`${r}px`,"--jv-avatar-color":Zk(e)},"aria-hidden":"true",children:[u?c.jsx("img",{src:u,alt:""}):c.jsx("span",{className:"jv-bot-avatar-tile"}),l==="working"&&c.jsxs("span",{className:"jv-typing",title:j("avatar.working"),children:[c.jsx("i",{}),c.jsx("i",{}),c.jsx("i",{})]}),l==="asking"&&c.jsx("span",{className:"jv-typing jv-asking",title:j("activity.asking"),children:"?"})]})}const Jl=__,Wl=I_;function eo({className:e,children:i,...r}){return c.jsxs(z_,{"data-slot":"select-trigger",className:nn("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),...r,children:[i,c.jsx(B_,{asChild:!0,children:c.jsx(Yl,{className:"size-4 opacity-50"})})]})}function to({className:e,children:i,container:r,...l}){return c.jsx(q_,{container:r??void 0,children:c.jsx(F_,{"data-slot":"select-content",position:"popper",sideOffset:5,className:nn("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),...l,children:c.jsx(K_,{children:i})})})}function Fi({className:e,children:i,...r}){return c.jsxs(W_,{"data-slot":"select-item",className:nn("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),...r,children:[c.jsx(e3,{children:i}),c.jsx(n3,{"data-slot":"select-indicator",className:"absolute right-2",children:c.jsx(Ir,{className:"size-4"})})]})}const X1={auto:"botModel.auto",off:"botModel.off",minimal:"botModel.minimal",low:"botModel.low",medium:"botModel.medium",high:"botModel.high",xhigh:"botModel.xhigh",max:"botModel.max"},oI=(e,i)=>JSON.stringify([e,i]);function Jk({bot:e,connections:i,onSaved:r,onManage:l}){const[s,u]=S.useState([]),[d,f]=S.useState(!0),[m,v]=S.useState(""),[y,g]=S.useState(0),[x,b]=S.useState(!1),[w,k]=S.useState(""),[C,E]=S.useState(!1),[M,T]=S.useState(""),[A,I]=S.useState(-1),R=S.useRef(null),B=S.useRef(null),U=S.useId();S.useEffect(()=>{let J=!0;return f(!0),v(""),be.modelOptions().then(W=>{J&&u(W.connections)}).catch(W=>{J&&v(Ot(W,"botModel.loadFailed"))}).finally(()=>{J&&f(!1)}),()=>{J=!1}},[i,y]);const $=s.flatMap(J=>J.models.map(W=>({...W,connectionId:J.id,connectionName:J.name,key:oI(J.id,W.id)}))).sort((J,W)=>J.name.localeCompare(W.name,void 0,{numeric:!0})),z=$.find(J=>J.connectionId===e.connectionId&&J.id===e.modelId),Y=i.find(J=>J.id===e.connectionId),q=Y==null?void 0:Y.models.find(J=>J.id===e.modelId),ee=$.filter(J=>`${J.name} ${J.id} ${J.connectionName}`.toLocaleLowerCase().includes(M.trim().toLocaleLowerCase())),G=s.map(J=>({...J,models:ee.filter(W=>W.connectionId===J.id)})).filter(J=>J.models.length),H=G.flatMap(J=>J.models),Q=$.length>8,O=e.thinkingLevel==="auto"?`auto${e.effectiveThinkingLevel?` · ${e.effectiveThinkingLevel}`:""}`:e.effectiveThinkingLevel??e.thinkingLevel;function F(J){E(J),T(""),I(-1)}async function ne(J,W,P){F(!1),b(!0),k("");try{r(await be.selectBotModel(e.id,J,W,P,qd()))}catch(V){k(Ot(V,"botModel.switchFailed"))}finally{b(!1)}}function D(J){var W;if(J.key==="ArrowDown"||J.key==="ArrowUp"){J.preventDefault();const P=J.key==="ArrowDown"?Math.min(A+1,H.length-1):Math.max(A-1,0);I(P),(W=document.getElementById(`${U}-${P}`))==null||W.scrollIntoView({block:"nearest"})}else if(J.key==="Enter"&&H[A]){J.preventDefault();const P=H[A];ne(P.connectionId,P.id,e.thinkingLevel)}}return c.jsxs("div",{className:"jv-bot-model jv-ui","aria-busy":x||d,children:[c.jsxs("div",{className:"jv-bot-model-fields",children:[c.jsxs("div",{className:"jv-bot-model-field",children:[c.jsx("span",{className:"jv-field-label",children:j("usage.model")}),c.jsxs(n_,{open:C,onOpenChange:F,children:[c.jsxs(i_,{className:"jv-model-trigger","aria-label":j("botModel.pick"),"aria-haspopup":"listbox",disabled:x||d||!!m,children:[c.jsx("span",{children:(z==null?void 0:z.name)??(q==null?void 0:q.name)??j(e.connectionId?"botModel.broken":"botModel.choose")}),x?c.jsx(jj,{className:"animate-spin"}):c.jsx(Yl,{})]}),c.jsx(r_,{children:c.jsxs(a_,{className:"jv-model-menu jv-ui",align:"start",sideOffset:6,collisionPadding:12,onOpenAutoFocus:J=>{var W;J.preventDefault(),(W=Q?R.current:B.current)==null||W.focus()},onKeyDown:D,children:[Q&&c.jsxs("div",{className:"jv-model-search",children:[c.jsx(kc,{}),c.jsx("input",{ref:R,role:"combobox","aria-label":j("botModel.filter"),"aria-expanded":"true","aria-controls":U,"aria-activedescendant":A>=0?`${U}-${A}`:void 0,placeholder:j("botModel.filterPlaceholder"),value:M,onChange:J=>{T(J.target.value),I(-1)},autoComplete:"off",spellCheck:!1})]}),c.jsxs("div",{ref:B,id:U,role:"listbox","aria-label":j("botModel.list"),tabIndex:-1,"aria-activedescendant":A>=0?`${U}-${A}`:void 0,className:"jv-model-options",children:[G.map(J=>c.jsxs("div",{role:"group","aria-label":J.name,children:[c.jsx("div",{className:"jv-model-group-label",children:J.name}),J.models.map(W=>{const P=H.indexOf(W),V=W.connectionId===e.connectionId&&W.id===e.modelId;return c.jsxs("button",{type:"button",role:"option",tabIndex:-1,id:`${U}-${P}`,"aria-selected":V,"data-active":P===A||void 0,title:W.id,onClick:()=>void ne(W.connectionId,W.id,e.thinkingLevel),children:[c.jsx("span",{className:"jv-option-check",children:V&&c.jsx(Ir,{})}),c.jsx("span",{children:W.name})]},W.key)})]},J.id)),!H.length&&c.jsx("p",{className:"jv-menu-empty",children:j($.length?"botModel.noMatch":"botModel.none")})]}),c.jsx("button",{type:"button",className:"jv-menu-manage",onClick:()=>{F(!1),l()},children:j("botModel.manage")})]})})]}),(z||Y)&&c.jsx("span",{className:"jv-field-note",children:(z==null?void 0:z.connectionName)??(Y==null?void 0:Y.displayName)})]}),c.jsxs("div",{className:"jv-bot-model-field",children:[c.jsx("span",{className:"jv-field-label",children:j("botModel.thinking")}),c.jsxs(Jl,{value:e.thinkingLevel==="auto"?"auto":e.effectiveThinkingLevel??e.thinkingLevel,disabled:x||d||!z||!!m,onValueChange:J=>{e.connectionId&&ne(e.connectionId,e.modelId,J)},children:[c.jsx(eo,{className:"jv-thinking-trigger","aria-label":j("botModel.pickThinking"),children:c.jsx(Wl,{children:O})}),c.jsx(to,{className:"jv-select-menu jv-thinking-menu",align:"end",children:["auto",...(z==null?void 0:z.thinking.levels)??[]].map(J=>{const W=z==null?void 0:z.thinkingLevelMap[J],P=W&&W!==J?W:J;return c.jsx(Fi,{value:J,children:c.jsxs("span",{className:"jv-thinking-option",children:[c.jsxs("span",{children:[P,W&&W!==J&&c.jsxs("small",{children:[" (",J,")"]})]}),c.jsx("small",{children:X1[J]&&j(X1[J])})]})},J)})})]})]})]}),d&&c.jsx("p",{className:"jv-field-note",role:"status",children:j("botModel.loading")}),x&&c.jsx("p",{className:"jv-field-note",role:"status",children:j("botModel.switching")}),m&&c.jsxs("p",{className:"jv-model-error",role:"alert",children:[m," ",c.jsx("button",{type:"button",onClick:()=>g(J=>J+1),children:j("common.retry")})]}),w&&c.jsx("p",{className:"jv-model-error",role:"alert",children:w})]})}const sI={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 cI({bot:e,onSaved:i}){const[r,l]=S.useState(!1),[s,u]=S.useState(""),{home:d,docker:f}=e.environment;async function m(y){if(!(y===d||r)){l(!0),u("");try{i(await be.setBotEnvironment(e.id,y))}catch(g){u(Ot(g,"environment.changeFailed"))}finally{l(!1)}}}const v=(y,g,x,b)=>c.jsxs("button",{type:"button",role:"radio","aria-checked":d===y,disabled:r||b,className:"jv-list-row jv-choice-row jv-env-option",onClick:()=>void m(y),children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:g}),c.jsx("span",{children:x})]}),d===y&&c.jsx(Ir,{"aria-hidden":"true"})]},y);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"jv-list",role:"radiogroup","aria-label":j("environment.title"),children:[v("computer",j("environment.computer"),j(f?"environment.computerHint":"environment.noDocker"),!f),v("host",j("environment.host"),j("environment.hostHint"),!1)]}),s&&c.jsx("p",{className:"jv-note-error",role:"alert",children:s})]})}function uI({bot:e,onSaved:i}){const[r,l]=S.useState(null),[s,u]=S.useState(!1),[d,f]=S.useState(null),[m,v]=S.useState(""),y=S.useId(),{computer:g,home:x,current:b,hostGranted:w,docker:k}=e.environment;async function C(B,U,$){l(B),v("");try{i(await U())}catch(z){v(Ot(z,$))}finally{l(null)}}const E=B=>{B!==x&&!r&&C("move",()=>be.setBotEnvironment(e.id,B),"environment.changeFailed")},M=B=>void C(B,()=>be.computer(e.id,B),"common.failed"),T=g==null?void 0:g.state,[A,I]=T?sI[T]:[null,null],R=b!==x?j(b==="host"?"environment.awayHost":"environment.awayComputer"):null;return c.jsxs("section",{className:"jv-section","aria-label":j("environment.title"),children:[c.jsx("h3",{className:"jv-section-title",children:j("environment.title")}),c.jsxs("div",{className:"jv-list",children:[c.jsxs("div",{className:"jv-list-row jv-static-row",children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("environment.default")}),c.jsx("span",{className:R?"jv-env-away":void 0,children:R??j("environment.defaultHint")})]}),c.jsx("div",{className:"jv-env-seg",role:"radiogroup","aria-label":j("environment.default"),children:["computer","host"].map(B=>c.jsx("button",{type:"button",role:"radio","aria-checked":x===B,disabled:!!r||B==="computer"&&!k,title:B==="computer"&&!k?j("environment.noDocker"):void 0,onClick:()=>E(B),children:j(B==="computer"?"environment.computer":"environment.host")},B))})]}),x==="computer"&&T&&A&&I&&c.jsxs(c.Fragment,{children:[c.jsxs("button",{type:"button",className:"jv-list-row jv-choice-row jv-env-disclosure","aria-expanded":s,"aria-controls":y,onClick:()=>u(!s),children:[c.jsx("span",{className:"jv-row-text",children:c.jsx("strong",{children:j("environment.details")})}),c.jsx("span",{className:"jv-status","data-ok":T==="running"||void 0,"data-busy":T==="preparing"||void 0,children:j(A)}),c.jsx(Yl,{"aria-hidden":"true"})]}),s&&c.jsxs("div",{id:y,className:"jv-list-row jv-static-row jv-env-details",children:[c.jsxs("p",{children:[j("environment.sandboxAbout"),j(I)]}),T!=="unavailable"&&!d&&c.jsxs("div",{className:"jv-env-actions",children:[c.jsx(qe,{type:"button",variant:"outline",size:"sm",disabled:!!r||T==="preparing",onClick:()=>T==="running"?f("stop"):M("start"),children:j(r==="start"?"environment.starting":r==="stop"?"environment.stopping":T==="running"?"environment.stop":"environment.start")}),c.jsx(qe,{type:"button",variant:"ghost",size:"sm",disabled:!!r||T==="preparing",onClick:()=>f("reset"),children:j("environment.reset")})]}),d&&c.jsxs("div",{className:"jv-env-confirm",role:"group","aria-label":j(`environment.${d}Title`,{name:e.name}),children:[c.jsx("strong",{children:j(`environment.${d}Title`,{name:e.name})}),c.jsx("p",{children:j(`environment.${d}Body`)}),c.jsxs("div",{className:"jv-env-confirm-actions",children:[c.jsx(qe,{type:"button",variant:"ghost",size:"sm",onClick:()=>f(null),children:j("common.cancel")}),c.jsx(qe,{type:"button",className:"jv-primary",size:"sm",onClick:()=>{const B=d;f(null),M(B)},children:j(`environment.${d}Confirm`)})]})]})]})]})]}),x==="computer"&&c.jsxs(c.Fragment,{children:[c.jsx("h4",{className:"jv-env-heading",children:j("environment.external")}),c.jsx("div",{className:"jv-list",role:"group","aria-label":j("environment.external"),children:c.jsxs("button",{type:"button",role:"switch","aria-checked":w,disabled:!!r,className:"jv-list-row jv-choice-row jv-env-access",onClick:()=>void C("grant",()=>be.grantHost(e.id,!w),"environment.accessFailed"),children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("environment.host")}),c.jsx("span",{children:j("environment.hostAbout")})]}),c.jsx("span",{className:"jv-env-switch","aria-hidden":"true"})]})}),c.jsx("p",{className:"jv-hint jv-env-note",children:j("environment.externalHint")})]}),m&&c.jsx("p",{className:"jv-note-error",role:"alert",children:m})]})}function In({className:e,type:i,...r}){return c.jsx("input",{type:i,"data-slot":"input",className:nn("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),...r})}function ig({className:e,...i}){return c.jsx("textarea",{"data-slot":"textarea",className:nn("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),...i})}const dI={running:"activity.running",idle:"activity.idle",stop:"activity.stopped"};function fI({bot:e,status:i,connections:r,chats:l,onSaved:s,onManageModels:u,onClose:d,onOpenChat:f,onOpenSubscription:m}){const[v,y]=S.useState("info"),[g,x]=S.useState(e.name),[b,w]=S.useState(e.description),[k,C]=S.useState(e.systemPrompt),[E,M]=S.useState(!1),[T,A]=S.useState(null),[I,R]=S.useState(null),[B,U]=S.useState(null),[$,z]=S.useState(""),[Y,q]=S.useState(!1),[ee,G]=S.useState(null);S.useEffect(()=>{let W=!0;return be.botSubscriptions(e.id).then(P=>{W&&G(P.chats)}).catch(()=>{}),()=>{W=!1}},[e.id]),S.useEffect(()=>{if(!Y)return;const W=setTimeout(()=>q(!1),1500);return()=>clearTimeout(W)},[Y]);const H=g!==e.name||b!==e.description||k!==e.systemPrompt,Q=(i==null?void 0:i.status)??"stop",O=i==null?void 0:i.context;async function F(W){U(W),z("");try{await be.controlBot(e.id,W)}catch(P){z(Ot(P,"common.failed"))}finally{U(null)}}async function ne(W){W.preventDefault(),M(!0),A(null);try{s(await be.saveBot(e.id,{name:g,description:b,systemPrompt:k})),A({kind:"ok",text:j("bot.saved")})}catch(P){A({kind:"error",text:Ot(P,"common.saveFailed")})}finally{M(!1)}}async function D(W){if(W!==e.color){M(!0),R(null);try{s(await be.setBotColor(e.id,W))}catch(P){R({kind:"error",text:Ot(P,"bot.changeFailed")})}finally{M(!1)}}}const J=W=>W&&c.jsx("p",{className:W.kind==="error"?"jv-note-error":"jv-note-ok",role:W.kind==="error"?"alert":"status",children:W.text});return c.jsx(Qk,{open:!0,onOpenChange:W=>{W||d()},children:c.jsx(Kk,{className:`jv-bot-info jv-ui ${v==="activity"?"jv-bot-activity-shell":""}`,"aria-describedby":void 0,children:v==="activity"?c.jsx(K8,{botId:e.id,botName:e.name,onBack:()=>y("info"),onOpenChat:f}):v==="usage"?c.jsx(tI,{botId:e.id,botName:e.name,onBack:()=>y("info")}):c.jsxs(c.Fragment,{children:[c.jsx(uv,{className:"jv-dialog-header",children:c.jsx(cf,{children:j("entry.botInfo")})}),c.jsxs("div",{className:"jv-bot-scroll",children:[c.jsxs("section",{className:"jv-bot-hero",children:[c.jsx(zc,{color:e.color,mood:e.mood,size:72,crown:e.agent}),c.jsxs("div",{className:"jv-bot-identity",children:[c.jsx("strong",{children:e.name}),c.jsx("span",{children:e.description||j("bot.noDescription")}),c.jsx("div",{className:"jv-bot-colors",role:"radiogroup","aria-label":j("bot.color"),children:Object.keys(Vi).map(W=>c.jsx("button",{type:"button",role:"radio","aria-checked":e.color===W,"aria-label":j(Vi[W].label),title:j(Vi[W].label),disabled:E,style:{background:Zk(W)},onClick:()=>void D(W)},W))}),J(I)]})]}),e.agent&&c.jsxs("section",{className:"jv-section","aria-label":j("agent.title"),children:[c.jsx("h3",{className:"jv-section-title",children:j("agent.title")}),c.jsxs("div",{className:"jv-panel jv-agent-about",children:[c.jsx("p",{children:j("agent.intro",{name:e.name})}),c.jsx("ul",{children:["agent.create","agent.model","agent.run","agent.delete"].map(W=>c.jsx("li",{children:j(W)},W))}),c.jsx("p",{className:"jv-hint",children:j("agent.note")})]})]}),c.jsxs("section",{className:"jv-section","aria-label":j("usage.model"),children:[c.jsx("h3",{className:"jv-section-title",children:j("usage.model")}),c.jsxs("div",{className:"jv-panel",children:[c.jsx(Jk,{bot:e,connections:r,onSaved:s,onManage:u}),O&&c.jsxs("div",{className:"jv-context",title:j("bot.contextHint"),children:[c.jsxs("div",{className:"jv-context-label",children:[c.jsx("span",{children:j("bot.context")}),c.jsx("span",{children:O.tokens===null?j("bot.unknown"):j("bot.tokens",{used:Lr(O.tokens),window:Lr(O.contextWindow)})})]}),O.tokens!==null&&c.jsx("div",{className:"jv-context-bar",children:c.jsx("span",{style:{width:`${Math.min(100,Math.max(1,O.tokens/O.contextWindow*100))}%`}})})]})]})]}),c.jsxs("section",{className:"jv-section","aria-label":j("bot.profile"),children:[c.jsx("h3",{className:"jv-section-title",children:j("bot.profile")}),c.jsxs("form",{className:"jv-panel",onSubmit:W=>void ne(W),children:[c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("info.name")}),c.jsx(In,{id:"jarvy-bot-name",required:!0,maxLength:80,value:g,onChange:W=>x(W.target.value)})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("bot.description")}),c.jsx(ig,{id:"jarvy-bot-description",maxLength:1e3,rows:2,value:b,onChange:W=>w(W.target.value),placeholder:j("bot.descriptionPlaceholder")})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:"Persona"}),c.jsx(ig,{id:"jarvy-bot-persona",maxLength:16e3,rows:7,value:k,onChange:W=>C(W.target.value),placeholder:j("bot.personaPlaceholder")}),c.jsx("small",{className:"jv-hint",children:j("bot.personaHint")})]}),c.jsxs("div",{className:"jv-form-footer",children:[J((T==null?void 0:T.kind)==="error"||!H?T:null)??(H?c.jsx("p",{className:"jv-hint",children:j("bot.unsaved")}):c.jsx("span",{})),c.jsx(qe,{type:"submit",className:"jv-primary",disabled:E||!H,children:j(E?"bot.saving":"common.save")})]})]})]}),c.jsx(uI,{bot:e,onSaved:s}),c.jsxs("section",{className:"jv-section","aria-label":j("bot.runtime"),children:[c.jsx("h3",{className:"jv-section-title",children:j("bot.runtime")}),c.jsxs("div",{className:"jv-list",children:[c.jsxs("div",{className:"jv-list-row jv-static-row",children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("bot.status")}),c.jsx("span",{children:j("bot.statusHint")})]}),c.jsx("span",{className:"jv-status","data-ok":Q!=="stop"||void 0,"data-busy":Q==="running"||void 0,children:j(dI[Q])}),Q==="running"&&c.jsx(qe,{type:"button",variant:"ghost",size:"sm",disabled:!!B,onClick:()=>void F("abort"),children:j(B==="abort"?"bot.aborting":"bot.abort")}),c.jsx(qe,{type:"button",variant:"outline",size:"sm",disabled:!!B||!e.connectionId,onClick:()=>void F(Q==="stop"?"start":"stop"),children:j(B==="start"?"bot.starting":B==="stop"?"bot.stopping":Q==="stop"?"bot.start":"bot.stop")})]}),c.jsxs("div",{className:"jv-list-row jv-static-row",children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("bot.workspace")}),c.jsx("code",{title:e.workspacePath,children:e.workspacePath})]}),c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":j(Y?"ui.copied":"bot.copyWorkspace"),onClick:()=>void cv(e.workspacePath).then(W=>q(W)),children:Y?c.jsx(Ir,{}):c.jsx(tj,{})})]}),c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("activity"),children:[c.jsx("span",{className:"jv-row-icon",children:c.jsx($A,{})}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("bot.activity")}),c.jsx("span",{children:j("bot.activityHint")})]}),c.jsx(Ka,{className:"jv-row-chevron"})]}),c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>y("usage"),children:[c.jsx("span",{className:"jv-row-icon",children:c.jsx(pA,{})}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:j("usage.title")}),c.jsx("span",{children:j("bot.usageHint")})]}),c.jsx(Ka,{className:"jv-row-chevron"})]})]}),$&&c.jsx("p",{className:"jv-note-error",role:"alert",children:$})]}),ee&&c.jsxs("section",{className:"jv-section","aria-label":j("bot.subscriptions"),children:[c.jsx("h3",{className:"jv-section-title",children:j("bot.subscriptions")}),c.jsx("div",{className:"jv-list",children:ee.length===0?c.jsx("div",{className:"jv-list-row jv-static-row",children:c.jsx("span",{className:"jv-row-text",children:c.jsx("span",{children:j("bot.noSubscriptions")})})}):ee.map(W=>{var P;return c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>m(W),children:[c.jsx("span",{className:"jv-row-icon",children:W.type==="thread"?c.jsx(Aj,{}):c.jsx(TA,{})}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:W.title}),c.jsx("span",{children:W.type==="thread"?j("bot.threadIn",{channel:((P=l.find(V=>V.id===W.parentId))==null?void 0:P.title)??""}):j("info.menu")})]}),c.jsx(Ka,{className:"jv-row-chevron"})]},W.id)})})]})]})]})})})}function Wk({id:e,value:i,sections:r,onChange:l}){const[s,u]=S.useState(null);return c.jsxs(Jl,{value:i??"none",onValueChange:d=>l(d==="none"?null:d),children:[c.jsx(eo,{id:e,ref:d=>u((d==null?void 0:d.closest("dialog"))??null),className:"jv-select jv-section-select",children:c.jsx(Wl,{})}),c.jsxs(to,{className:"jv-select-menu",position:"popper",sideOffset:4,container:s,children:[c.jsx(Fi,{value:"none",children:j("info.noSection")}),r.map(d=>c.jsx(Fi,{value:d.id,children:d.name},d.id))]})]})}const hI=1024*1024,mI=["txt","json","jsonl","yaml","yml","ts","tsx","js","jsx","mjs","cjs","css","log","csv","py","sh","sql","toml","xml","ini","env","diff","patch"],Fl=e=>`/api/attachments/${e.id}`,eC=e=>e.name.includes(".")?e.name.split(".").pop().toLowerCase():"";function uf(e){const i=eC(e),r=e.mimeType.toLowerCase();return i==="svg"||r==="image/svg+xml"?"svg":r.startsWith("image/")||["png","jpg","jpeg","gif","webp","avif","bmp"].includes(i)?"image":r.startsWith("video/")?"video":r.startsWith("audio/")?"audio":["webm","mp4","mov"].includes(i)?"video":["mp3","wav","ogg"].includes(i)?"audio":["html","htm"].includes(i)||r==="text/html"?"html":["md","markdown"].includes(i)?"markdown":r.startsWith("text/")||mI.includes(i)?"text":"download"}const hc=e=>e==="image"||e==="svg",tC=e=>e==="video"||e==="audio",nC={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 iC(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}async function rC(e,i){const r=await fetch(Fl(e),{signal:i,credentials:"same-origin"});if(!r.ok)throw new Error(r.status===404?j("files.gone"):j("files.readFailed",{status:r.status}));return r.text()}async function aC(e,i){return uf(e)==="svg"?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await rC(e,i))}`:Fl(e)}const Q1=e=>`/api/attachments/${e.id}/run`;function pI(e){const i=new DOMParser().parseFromString(e,"text/html");let r=i.querySelectorAll("script").length;const l=new Set;return i.querySelectorAll("*").forEach(s=>{for(const u of[...s.attributes])if(u.name.startsWith("on"))r++;else if(/^\s*javascript:/i.test(u.value)&&["href","src","action","formaction","xlink:href"].includes(u.name))r++;else if(["src","href"].includes(u.name)&&s.tagName!=="A")try{const d=new URL(u.value);(d.protocol==="http:"||d.protocol==="https:")&&l.add(d.host)}catch{}}),r?{count:r,hosts:[...l]}:null}function gI(e){const i=new DOMParser().parseFromString(e,"text/html");return i.querySelectorAll("script,iframe,frame,object,embed,link,meta,base,audio,video,source,track").forEach(r=>r.remove()),i.querySelectorAll("*").forEach(r=>{for(const l of[...r.attributes])(l.name.startsWith("on")||["href","xlink:href","srcset","action","formaction","target","autofocus","contenteditable"].includes(l.name)||l.name==="src"&&!l.value.startsWith("data:image/"))&&r.removeAttribute(l.name);["BUTTON","INPUT","SELECT","TEXTAREA"].includes(r.tagName)&&r.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">${i.documentElement.outerHTML}`}function vI({file:e,onSize:i}){const[r,l]=S.useState(),[s,u]=S.useState(!1);return S.useEffect(()=>{const d=new AbortController;return u(!1),aC(e,d.signal).then(l).catch(()=>{d.signal.aborted||u(!0)}),()=>d.abort()},[e.id]),s?c.jsx("span",{className:"ui-broken-image",children:c.jsx(De,{name:"image"})}):r?c.jsx("img",{src:r,alt:e.name,loading:"lazy",onError:()=>u(!0),onLoad:d=>{const{naturalWidth:f,naturalHeight:m}=d.currentTarget;f&&m&&i({width:f,height:m})}}):c.jsx(De,{name:"image"})}function yI({file:e,onOpen:i}){const[r,l]=S.useState(),s=uf(e),u=hc(s),d=tC(s),f=eC(e).toUpperCase(),m=u&&r?{"--image-w":`${r.width}px`,"--image-ratio":`${r.width/r.height}`}:void 0;return c.jsxs("div",{className:`ui-message-file ${u?"ui-message-image":""}`,"data-sized":m?"":void 0,style:m,children:[c.jsxs("button",{type:"button",className:"ui-message-open",onClick:i,"aria-label":j("files.preview",{name:e.name}),children:[u?c.jsx("span",{className:"ui-image-frame",children:c.jsx(vI,{file:e,onSize:l})}):c.jsx("span",{className:"ui-file-icon","data-kind":d?s:void 0,children:c.jsx(De,{name:d?`file-${s}`:"file"})}),c.jsxs("span",{className:"ui-file-copy",children:[c.jsx("strong",{title:e.name,children:e.name}),c.jsxs("small",{children:[d?`${j(nC[s])} · `:"",f?`${f} · `:"",iC(e.size)]})]})]}),c.jsx("a",{className:"ui-iconbtn",href:Fl(e),download:e.name,"aria-label":j("files.download",{name:e.name}),title:j("files.download",{name:e.name}),children:c.jsx(De,{name:"cloud-download"})})]})}function lC({files:e,onOpen:i}){const r=e.some(l=>hc(uf(l)));return c.jsx("div",{className:`ui-message-files ${r?"ui-has-images":""}`,children:e.map((l,s)=>c.jsx(yI,{file:l,onOpen:()=>i(s)},l.id))})}const K1=e=>String.fromCharCode(65+e),Z1=e=>e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable;function oC({message:e,keyboard:i,onSettled:r}){var M,T;const l=e.question,s=l.state==="pending",u=S.useId(),[d,f]=S.useState([]),[m,v]=S.useState(""),[y,g]=S.useState(!1),[x,b]=S.useState("");async function w(A){if(!(y||!s)){g(!0),b("");try{r(await be.answerQuestion(e.chatId,e.id,A))}catch(I){b(Ot(I,"question.failed"))}finally{g(!1)}}}const k=A=>{if(!l.multiple){w({action:"answer",selected:[A]});return}f(I=>I.includes(A)?I.filter(R=>R!==A):[...I,A])},C=()=>void w({action:"answer",selected:d,...m.trim()?{custom:m.trim()}:{}}),E=()=>{m.trim()&&(l.multiple?C():w({action:"answer",selected:[],custom:m.trim()}))};if(S.useEffect(()=>{if(!i||!s)return;const A=I=>{if(I.defaultPrevented||I.metaKey||I.ctrlKey||I.altKey||I.key.length!==1||Z1(I.target)||Z1(document.activeElement)||document.querySelector("dialog[open], [role=dialog]"))return;const R=I.key.toUpperCase().charCodeAt(0)-65;R<0||R>=l.options.length||(I.preventDefault(),k(R))};return document.addEventListener("keydown",A,!0),()=>document.removeEventListener("keydown",A,!0)}),!s){const A=l.state==="answered"?[...(((M=l.answer)==null?void 0:M.selected)??[]).map(I=>{var R;return((R=l.options[I])==null?void 0:R.label)??""}),...(T=l.answer)!=null&&T.custom?[l.answer.custom]:[]].filter(Boolean).join(j("common.listSeparator")):null;return c.jsxs("p",{className:"jv-question-done","data-state":l.state,title:`${l.question}
|
|
513
|
+
${A===null?j("question.dismissed"):j("question.chose",{answer:A})}`,children:[A===null?c.jsx(BA,{"aria-hidden":"true"}):c.jsx(Ir,{"aria-hidden":"true"}),c.jsx("span",{className:"jv-question-answer",children:A===null?j("question.dismissed"):L2("question.chose",{answer:c.jsx("strong",{children:A})})}),c.jsx("span",{className:"jv-question-asked",children:l.question})]})}return c.jsxs("div",{className:"jv-question",role:"group","aria-labelledby":u,"aria-busy":y||void 0,children:[c.jsxs("div",{className:"jv-question-head",children:[c.jsxs("div",{className:"jv-question-heading",children:[c.jsx("p",{id:u,className:"jv-question-title",children:l.question}),l.detail&&c.jsx("p",{className:"jv-question-detail",children:l.detail})]}),c.jsx("button",{type:"button",className:"jv-question-dismiss","aria-label":j("question.dismissLabel"),title:j("question.dismiss"),disabled:y,onClick:()=>void w({action:"dismiss"}),children:c.jsx(Cc,{"aria-hidden":"true"})})]}),c.jsx("div",{className:"jv-question-options",role:l.multiple?"group":void 0,"aria-label":l.multiple?j("question.multiple"):void 0,children:l.options.map((A,I)=>{const R=d.includes(I);return c.jsxs("button",{type:"button",className:"jv-question-option","data-style":A.style,"data-on":R||void 0,"aria-pressed":l.multiple?R:void 0,"aria-keyshortcuts":i?K1(I).toLowerCase():void 0,disabled:y,onClick:()=>k(I),children:[c.jsx("span",{className:"jv-question-key","aria-hidden":"true",children:R?c.jsx(Ir,{}):K1(I)}),c.jsxs("span",{className:"jv-question-copy",children:[c.jsx("strong",{children:A.label}),A.description&&c.jsx("small",{children:A.description})]})]},A.label)})}),(l.allowCustom||l.multiple)&&c.jsxs("div",{className:"jv-question-foot",children:[l.allowCustom&&c.jsx("input",{className:"jv-question-custom",value:m,maxLength:2e3,placeholder:j(l.multiple?"question.note":"question.own"),"aria-label":j("question.ownLabel"),disabled:y,onChange:A=>v(A.target.value),onKeyDown:A=>{A.key==="Enter"&&!A.nativeEvent.isComposing&&(A.preventDefault(),E())}}),l.multiple?c.jsx("button",{type:"button",className:"ui-button jv-question-submit",disabled:y||!d.length&&!m.trim(),onClick:C,children:d.length?j("question.confirmCount",{count:d.length}):j("question.confirm")}):c.jsx("button",{type:"button",className:"ui-button jv-question-submit",disabled:y||!m.trim(),onClick:E,children:j("question.send")})]}),x&&c.jsx("p",{className:"jv-question-error",role:"alert",children:x})]})}function Ur(e){return e?e.deleted?j("member.deleted",{name:e.name}):e.name:j("member.unknown")}const xI={reasoning:"activity.reasoning",texting:"activity.texting",tool_calling:"activity.toolCalling",asking:"activity.asking"},sC=e=>j(xI[e??""]??"activity.running"),ar=e=>e.filter(i=>!i.deleted);function bI(e){const i=new Set(e.map(l=>l.toLowerCase()));let r=j("bot.newName");for(let l=2;i.has(r.toLowerCase());l++)r=j("bot.newNameN",{n:l});return r}const dp=/[\p{Script=Latin}\p{Nd}_]/u;function dv(e,i){const r=e.replace(/```[\s\S]*?```|`[^`\n]*`/g,d=>" ".repeat(d.length)),l=r.toLowerCase(),s=[...i].sort((d,f)=>f.name.length-d.name.length),u=[];for(let d=l.indexOf("@");d>=0;d=l.indexOf("@",d+1)){if(d>0&&dp.test(r[d-1]))continue;const f=s.find(m=>{const v=m.name.toLowerCase();if(!v||!l.startsWith(v,d+1))return!1;const y=r[d+1+v.length];return!(y&&dp.test(y)&&dp.test(v.at(-1)))});f&&(u.push({member:f,at:d,length:f.name.length+1}),d+=f.name.length)}return u}function jI(e,i,r){let l="",s=0;for(const u of dv(e,i))l+=e.slice(s,u.at)+`[${e.slice(u.at,u.at+u.length)}](${u.member.id===r?"#mention-me":"#mention"})`,s=u.at+u.length;return l+e.slice(s)}const cC=/\[\[q(\d+)\]\]/g,rg=(e,i=40)=>{const r=e.replace(/\s+/g," ").trim();return r.length>i?`${r.slice(0,i)}…`:r};function fv(e){return e.content.replace(cC,(i,r)=>{const l=e.quotes[Number(r)-1];return l?j("quote.inline",{text:l.text}):i})}function Lc(e){return fv(e).replace(/[*`~#>]/g,"").replace(/\s+/g," ").trim()||j("common.attachment")}function uC({message:e,members:i,me:r,onJump:l}){const s=jI(e.content,i.filter(d=>e.mentions.includes(d.id)),r).replace(cC,(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=Ur(i.find(v=>v.id===f.senderId));return c.jsxs("button",{type:"button",className:"jv-quote-tag",title:j("sidebar.said",{name:m,text:f.text}),"data-gone":f.messageId?void 0:"",onClick:()=>l==null?void 0:l(f.messageId,f.text),children:[c.jsx(De,{name:"quote"}),c.jsx("span",{className:"jv-quote-name",children:j("quote.by",{name:m})}),c.jsx("span",{className:"jv-quote-text",children:rg(f.text,80)})]})};return c.jsx(Dc,{text:s,renderQuote:u})}function dC(e,i){var g;const r=i.replace(/\s+/g,"");if(!r||typeof CSS>"u"||!("highlights"in CSS))return!1;const l=e.querySelector(".ui-bubble")??e,s=document.createTreeWalker(l,NodeFilter.SHOW_TEXT),u=[];for(let x=s.nextNode();x;x=s.nextNode())if(!((g=x.parentElement)!=null&&g.closest(".jv-quote-tag, button")))for(let b=0;b<x.data.length;b++)/\s/.test(x.data[b])||u.push({node:x,offset:b});const d=u.map(x=>x.node.data[x.offset]).join(""),f=d.indexOf(r);if(f<0)return!1;const m=u[f],v=u[f+r.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 fC(e,i){e.scrollIntoView({block:"center",behavior:"smooth"}),!(i&&dC(e,i))&&(e.classList.add("jv-jump"),setTimeout(()=>e.classList.remove("jv-jump"),1200))}function wI({quotes:e,onRemove:i}){return e.length?c.jsx("div",{className:"jv-compose-quotes",children:e.map((r,l)=>c.jsxs("span",{className:"jv-quote-tag",title:j("sidebar.said",{name:r.name,text:r.text}),children:[c.jsx(De,{name:"quote"}),c.jsx("span",{className:"jv-quote-name",children:j("quote.by",{name:r.name})}),c.jsx("span",{className:"jv-quote-text",children:rg(r.text)}),c.jsx("button",{type:"button","aria-label":j("quote.remove",{text:rg(r.text,20)}),onClick:()=>i(l),children:"×"})]},l))}):null}function hC({container:e,drafts:i,chatId:r,source:l,members:s,onNotice:u}){const d=(y,g)=>{const x=l(y);x&&!SI(i,r,x,s,g)&&u(j("quote.tooMany",{count:10}))},[f,m]=S.useState(null);if(S.useEffect(()=>{const y=e.current;if(!y||!matchMedia("(hover: hover) and (pointer: fine)").matches)return;const g=E=>{var M;return(M=E instanceof Element?E:E==null?void 0:E.parentElement)==null?void 0:M.closest(".ui-bubble")},x=()=>{var R,B;const E=getSelection(),M=(E==null?void 0:E.toString())??"";if(!E||E.isCollapsed||!M.trim()){m(null);return}const T=g(E.anchorNode),A=T==null?void 0:T.closest("[data-message]");if(!T||!A||!y.contains(T)||g(E.focusNode)!==T||(B=(R=E.anchorNode)==null?void 0:R.parentElement)!=null&&B.closest(".jv-quote-tag, button")){m(null);return}const I=E.getRangeAt(0).getBoundingClientRect();m({x:Math.min(Math.max(I.left+I.width/2,90),innerWidth-90),y:Math.max(I.top-8,48),messageId:A.getAttribute("data-message"),text:M.trim()})},b=()=>requestAnimationFrame(x),w=()=>m(null),k=E=>{E.key==="Escape"&&w()},C=()=>{var E;(E=getSelection())!=null&&E.isCollapsed&&w()};return y.addEventListener("mouseup",b),y.addEventListener("scroll",w,!0),document.addEventListener("keydown",k),document.addEventListener("selectionchange",C),()=>{y.removeEventListener("mouseup",b),y.removeEventListener("scroll",w,!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 c.jsxs("div",{className:"ui-popover jv-selection-menu",role:"menu","aria-label":j("quote.selection"),style:{left:f.x,top:f.y},onMouseDown:y=>y.preventDefault(),children:[c.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{cv(f.text),v()},children:[c.jsx(De,{name:"copy"}),c.jsx("span",{className:"ui-menu-copy",children:j("quote.copy")})]}),c.jsxs("button",{type:"button",role:"menuitem",className:"ui-menu-item",onClick:()=>{d(f.messageId,f.text),v()},children:[c.jsx(De,{name:"quote"}),c.jsx("span",{className:"ui-menu-copy",children:j("quote.quote")})]})]})}function SI(e,i,r,l,s){if(e.get(i).passages.length>=10)return!1;const u={messageId:r.id,name:Ur(l.find(d=>d.id===r.senderId)),text:s};return e.update(i,d=>({passages:[...d.passages,u]})),!0}const kI=["👍","👎","✅","❌","😄","😂","😵💫","🤔"],J1=["👍","👎","✅","❌","🙏","👏","🎉","🔥","💯","❤️","💔","⭐","😄","😂","🤣","😊","🙂","😉","😅","😴","🤔","🤨","😮","😱","😢","😭","😤","😡","🤯","🥳","😵💫","🫠","👀","🙈","🤝","💪","🚀","🐛","✅","⚠️","❓","❗","📌","🧠","☕","🍰","🌙","☀️"];function mC({message:e,members:i,onJump:r}){if(!e.replyTo)return null;const l=i.find(s=>s.id===e.replyTo.senderId);return c.jsxs("button",{type:"button",className:"jv-reply-quote",onClick:()=>r(e.replyTo.id),children:[c.jsx("span",{className:"jv-reply-author",children:Ur(l)}),c.jsx("span",{className:"jv-reply-text",children:Lc(e.replyTo)})]})}function pC({message:e,me:i,members:r,onReact:l,onError:s}){return e.reactions.length?c.jsx("div",{className:"jv-reactions",children:e.reactions.map(u=>{const d=u.memberIds.includes(i);return c.jsxs("button",{type:"button",className:"jv-reaction","data-mine":d||void 0,title:u.memberIds.map(f=>Ur(r.find(m=>m.id===f))).join(j("common.listSeparator")),onClick:()=>{try{l(e,u.emoji,!d)}catch(f){s(f)}},children:[c.jsx("span",{className:"jv-reaction-emoji",children:u.emoji}),c.jsx("span",{className:"jv-reaction-count",children:u.memberIds.length})]},u.emoji)})}):null}function gC({message:e,me:i,onReply:r,onReact:l,onError:s}){const[u,d]=S.useState(!1),[f,m]=S.useState(!1),v=S.useRef(null);S.useEffect(()=>{if(!u)return;const x=b=>{var w;(w=v.current)!=null&&w.contains(b.target)||d(!1)};return document.addEventListener("pointerdown",x),()=>document.removeEventListener("pointerdown",x)},[u]);const y=x=>{var w;const b=!((w=e.reactions.find(k=>k.emoji===x))!=null&&w.memberIds.includes(i));try{l(e,x,b)}catch(k){s(k)}d(!1)},g=()=>{var w,k,C;const x=(w=v.current)==null?void 0:w.getBoundingClientRect(),b=(C=(k=v.current)==null?void 0:k.closest(".ui-transcript, .ui-pane-body"))==null?void 0:C.getBoundingClientRect();m(!!x&&((b==null?void 0:b.bottom)??window.innerHeight)-x.bottom<240),d(!u)};return c.jsxs("div",{className:"jv-message-actions",ref:v,children:[r&&c.jsx(ct,{icon:"arrow-u-up-right",label:j("actions.reply"),onClick:()=>r(e)}),c.jsx(ct,{icon:"smiley-plus",label:j("actions.react"),"aria-expanded":u,onClick:g}),u&&c.jsxs("div",{className:"jv-emoji-menu",role:"menu","aria-label":j("actions.pickEmoji"),"data-up":f||void 0,children:[c.jsx("div",{className:"jv-emoji-quick",children:kI.map(x=>c.jsx("button",{type:"button",role:"menuitem",onClick:()=>y(x),children:x},x))}),c.jsxs("details",{className:"jv-emoji-more",children:[c.jsx("summary",{children:j("actions.more")}),c.jsx("div",{className:"jv-emoji-grid",children:J1.filter((x,b)=>J1.indexOf(x)===b).map(x=>c.jsx("button",{type:"button",onClick:()=>y(x),children:x},x))})]})]})]})}const vC="jarvy-notice-closed",CI=()=>{try{return JSON.parse(localStorage.getItem(vC)??"[]")}catch{return[]}};function va({member:e,bots:i,size:r,working:l=!1}){const s=(e==null?void 0:e.kind)==="bot"?i.find(u=>u.id===e.id):void 0;return s?c.jsx(zc,{color:s.color,mood:s.mood,size:r,badge:l?"working":void 0,crown:s.agent}):c.jsx("span",{className:"ui-user-avatar jv-user-avatar",style:{width:r,height:r,fontSize:Math.round(r*.38)},children:((e==null?void 0:e.name)??"?").slice(0,2).toUpperCase()})}function NI({chat:e,members:i,bots:r,infoOpen:l,membersOpen:s,threadsOpen:u,searchOpen:d,onNav:f,onInfo:m,onMembers:v,onThreads:y,onSearch:g}){const x=i.filter(b=>e.memberIds.includes(b.id));return c.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[c.jsxs("div",{className:"ui-header-left",children:[c.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:j("common.openNav"),onClick:f}),c.jsxs("button",{type:"button",className:"jv-channel-title","aria-label":j("channel.infoFor",{name:e.title}),"aria-pressed":l,onClick:m,children:[c.jsx("span",{className:"jv-hash",children:"#"}),e.title,c.jsx(De,{name:"chevron-down"})]}),e.topic&&c.jsx("span",{className:"jv-channel-topic",children:e.topic})]}),c.jsxs("div",{className:"ui-header-actions",children:[c.jsxs("button",{type:"button",className:"jv-members-button","aria-label":j("channel.membersCount",{count:x.length}),"aria-pressed":s,title:j("channel.members"),onClick:v,children:[c.jsx("span",{className:"jv-stack",children:x.slice(0,3).map(b=>c.jsx("span",{className:"jv-stack-item",children:c.jsx(va,{member:b,bots:r,size:22})},b.id))}),c.jsx("span",{className:"jv-members-count",children:x.length})]}),c.jsx(ct,{icon:"search",label:j("channel.search"),"aria-pressed":d,className:"jv-threads-button",onClick:g}),c.jsx(ct,{icon:"chat-bubble",label:j("channel.threads"),"aria-pressed":u,className:"jv-threads-button",onClick:y})]})]})}function EI({chat:e,onSave:i}){var b;const[r,l]=S.useState(CI),[s,u]=S.useState(null),[d,f]=S.useState(!1);S.useEffect(()=>u(null),[e.id]);const m=!r.includes(e.id),v=e.note,y=()=>l(w=>{const k=m?[...w,e.id]:w.filter(C=>C!==e.id);return localStorage.setItem(vC,JSON.stringify(k)),k}),g=async()=>{if(s!=null&&s.trim()){f(!0);try{await i(s.trim()),u(null)}finally{f(!1)}}};if(s!==null)return c.jsxs("div",{className:"jv-notice","data-editing":!0,children:[c.jsxs("div",{className:"jv-notice-head",children:[c.jsx(De,{name:"megaphone"}),c.jsx("strong",{children:j("notice.edit")})]}),c.jsx("textarea",{className:"jv-notice-input",value:s,autoFocus:!0,"aria-label":j("notice.content"),onChange:w=>u(w.target.value)}),c.jsxs("div",{className:"jv-notice-actions",children:[c.jsx("button",{type:"button",className:"ui-button",onClick:()=>u(null),children:j("common.cancel")}),c.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:d||!s.trim(),onClick:()=>void g(),children:j("common.save")})]})]});if(!v)return c.jsxs("div",{className:"jv-notice","data-empty":!0,children:[c.jsx(De,{name:"megaphone"}),c.jsx("span",{className:"jv-muted",children:j("notice.none")}),c.jsx(ct,{icon:"pencil",label:j("notice.edit"),onClick:()=>u("")})]});const x=((b=v.text.split(`
|
|
514
|
+
`).find(w=>w.trim()&&!w.startsWith("#")))==null?void 0:b.replace(/[*`|>-]/g,"").trim())??"";return c.jsxs("div",{className:"jv-notice","data-open":m||void 0,children:[c.jsxs("div",{className:"jv-notice-head",children:[c.jsxs("button",{type:"button",className:"jv-notice-toggle","aria-expanded":m,onClick:y,children:[c.jsx(De,{name:"megaphone"}),c.jsx("strong",{children:j("notice.title")}),!m&&c.jsx("span",{className:"jv-notice-first",children:x}),c.jsx(De,{name:m?"chevron-down":"chevron-right"})]}),c.jsxs("span",{className:"jv-muted jv-notice-meta",children:[v.updatedBy.name," · ",qr(v.updatedAt,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})," · ",j("notice.version",{version:v.version})]}),c.jsx(ct,{icon:"pencil",label:j("notice.edit"),onClick:()=>u(v.text)})]}),m&&c.jsx("div",{className:"jv-notice-body ui-bubble jv-flat",children:c.jsx(Dc,{text:v.text})})]})}function Pd({messages:e,members:i,bots:r,me:l,divider:s,activeQuestion:u,onSettled:d,onPreview:f,onReply:m,onOpenThread:v,onQuote:y,onReact:g,onJump:x,onError:b}){var k;const w=(k=e.find(C=>C.sequence>s&&C.senderId!==l))==null?void 0:k.id;return c.jsx(c.Fragment,{children:e.map((C,E)=>{const M=e[E-1],T=i.find(I=>I.id===C.senderId),A=!!M&&M.senderId===C.senderId&&C.createdAt-M.createdAt<5*6e4&&C.id!==w;return c.jsxs("div",{children:[C.id===w&&c.jsx("div",{className:"jv-divider",role:"separator",children:c.jsx("span",{children:j("chat.newBelow")})}),c.jsxs("div",{className:"jv-row",tabIndex:-1,"data-message":C.id,"data-folded":A||void 0,"data-mention":C.mentions.includes(l)||void 0,children:[c.jsx("div",{className:"jv-row-gutter",children:A?c.jsx("time",{className:"jv-row-time",children:cc(C.createdAt)}):c.jsx(va,{member:T,bots:r,size:32})}),c.jsxs("div",{className:"jv-row-body",children:[!A&&c.jsxs("div",{className:"jv-row-head",children:[c.jsx("strong",{children:Ur(T)}),(T==null?void 0:T.kind)==="bot"&&c.jsx("span",{className:"jv-role",children:"Bot"}),c.jsx("time",{children:cc(C.createdAt)})]}),C.echoOf&&c.jsx("button",{type:"button",className:"jv-echo",onClick:()=>v==null?void 0:v(C.echoOf.id),children:j("channel.echo",{title:C.echoOf.title})}),C.replyTo&&c.jsx(mC,{message:C,members:i,onJump:I=>x==null?void 0:x(I)}),C.question?c.jsx(oC,{message:{...C,question:C.question},keyboard:C.id===u,onSettled:d}):c.jsxs("div",{className:"ui-bubble jv-flat",children:[C.content&&c.jsx(uC,{message:C,members:i,me:l,onJump:x}),C.attachments.length>0&&c.jsx(lC,{files:C.attachments,onOpen:I=>f(C.attachments,I)})]}),g&&c.jsx(pC,{message:C,me:l,members:i,onReact:g,onError:b??(()=>{})}),C.thread&&C.thread.replies>0&&c.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:[j("channel.replies",{count:C.thread.replies}),C.thread.status==="done"&&` · ${j("channel.threadDone")}`,C.thread.lastReplyAt&&c.jsx("span",{className:"jv-muted",children:j("channel.lastReply",{time:cc(C.thread.lastReplyAt)})})]})]}),c.jsxs("div",{className:"jv-row-actions",children:[m&&!C.echoOf&&c.jsx(ct,{icon:"chat-bubble",label:j("channel.replyInThread"),onClick:()=>m(C)}),g&&c.jsx(gC,{message:C,me:l,onReply:y,onReact:g,onError:b??(()=>{})})]})]})]},C.id)})})}function yC({candidates:e,bots:i,busy:r,onCancel:l,onConfirm:s}){const[u,d]=S.useState(""),[f,m]=S.useState([]),v=e.filter(g=>g.name.toLowerCase().includes(u.trim().toLowerCase())),y=g=>m(x=>x.includes(g)?x.filter(b=>b!==g):[...x,g]);return c.jsxs("div",{className:"jv-picker",children:[c.jsx("div",{className:"ui-field",children:c.jsx("input",{type:"search",value:u,autoFocus:!0,placeholder:j("common.searchMembers"),"aria-label":j("common.searchMembers"),onChange:g=>d(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),v.length===1&&y(v[0].id))}})}),c.jsxs("div",{className:"jv-picker-list",role:"listbox","aria-multiselectable":"true","aria-label":j("dialogs.candidates"),children:[v.map(g=>c.jsxs("button",{type:"button",role:"option","aria-selected":f.includes(g.id),className:"jv-member-option",onClick:()=>y(g.id),children:[c.jsx(va,{member:g,bots:i,size:24}),c.jsx("span",{className:"jv-member-name",children:g.name}),c.jsx("span",{className:"jv-muted",children:g.kind==="bot"?"Bot":j("common.member")}),c.jsx("span",{className:"jv-check",children:f.includes(g.id)&&c.jsx(De,{name:"check"})})]},g.id)),v.length===0&&c.jsx("p",{className:"jv-picker-empty",children:j(e.length?"common.noMatch":"dialogs.allInside")})]}),c.jsxs("div",{className:"ui-dialog-actions",children:[c.jsx("span",{className:"jv-spacer"}),c.jsx("button",{type:"button",className:"ui-button",onClick:l,children:j("common.cancel")}),c.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:r||f.length===0,onClick:()=>s(f),children:f.length?j("dialogs.addCount",{count:f.length}):j("common.add")})]})]})}function TI({chat:e,members:i,bots:r,onClose:l,onChanged:s}){const[u,d]=S.useState(!1),[f,m]=S.useState("");async function v(y){d(!0),m("");try{let g=e;for(const x of y)g=await be.addMember(e.id,x);s(g),l()}catch(g){m(Ot(g,"dialogs.addFailed"))}finally{d(!1)}}return c.jsxs(rs,{title:j("info.addMembers"),onClose:l,className:"jv-channel-dialog",children:[c.jsx(yC,{candidates:i.filter(y=>!e.memberIds.includes(y.id)),bots:r,busy:u,onCancel:l,onConfirm:y=>void v(y)}),f&&c.jsx("p",{className:"jv-form-error",role:"alert",children:f})]})}function AI({sections:e,members:i,bots:r,me:l,onClose:s,onSaved:u}){const d=S.useId(),[f,m]=S.useState(""),[v,y]=S.useState(""),[g,x]=S.useState(null),[b,w]=S.useState([l]),[k,C]=S.useState(!1),[E,M]=S.useState(!1),[T,A]=S.useState("");async function I(B){if(B.preventDefault(),!(!f.trim()||E)){M(!0),A("");try{u(await be.createChannel({name:f.trim(),topic:v.trim(),sectionId:g,memberIds:b.filter(U=>U!==l)}))}catch(U){A(Ot(U,"common.saveFailed"))}finally{M(!1)}}}const R=i.filter(B=>b.includes(B.id));return k?c.jsx(rs,{title:j("info.addMembers"),onClose:s,className:"jv-channel-dialog",children:c.jsx(yC,{candidates:i.filter(B=>!b.includes(B.id)),bots:r,busy:!1,onCancel:()=>C(!1),onConfirm:B=>{w(U=>[...U,...B]),C(!1)}})}):c.jsx(rs,{title:j("sidebar.newChannel"),onClose:s,className:"jv-channel-dialog",children:c.jsxs("form",{onSubmit:B=>void I(B),children:[c.jsxs("div",{className:"ui-field",children:[c.jsx("label",{htmlFor:`${d}-name`,children:j("info.name")}),c.jsx("input",{id:`${d}-name`,value:f,maxLength:80,autoFocus:!0,placeholder:j("info.newChannel"),onChange:B=>m(B.target.value)})]}),c.jsxs("div",{className:"ui-field",children:[c.jsx("label",{htmlFor:`${d}-topic`,children:j("info.topic")}),c.jsx("input",{id:`${d}-topic`,value:v,maxLength:200,placeholder:j("dialogs.optional"),onChange:B=>y(B.target.value)})]}),c.jsxs("div",{className:"ui-field",children:[c.jsx("label",{htmlFor:`${d}-section`,children:j("info.section")}),c.jsx(Wk,{id:`${d}-section`,value:g,sections:e,onChange:x})]}),c.jsxs("div",{className:"jv-members",children:[c.jsxs("div",{className:"jv-members-head",children:[c.jsxs("span",{children:[j("channel.members")," · ",R.length]}),c.jsxs("button",{type:"button",className:"ui-button",onClick:()=>C(!0),children:[c.jsx(De,{name:"person-add"}),j("info.addMembers")]})]}),R.map(B=>c.jsxs("div",{className:"jv-member-option",children:[c.jsx(va,{member:B,bots:r,size:24}),c.jsx("span",{className:"jv-member-name",children:B.name}),c.jsx("span",{className:"jv-muted",children:B.id===l?j("common.you"):B.kind==="bot"?"Bot":j("common.member")}),B.id!==l&&c.jsx(ct,{icon:"close",label:j("members.remove",{name:B.name}),className:"jv-member-remove",onClick:()=>w(U=>U.filter($=>$!==B.id))})]},B.id))]}),T&&c.jsx("p",{className:"jv-form-error",role:"alert",children:T}),c.jsxs("div",{className:"ui-dialog-actions",children:[c.jsx("span",{className:"jv-spacer"}),c.jsx("button",{type:"button",className:"ui-button",onClick:s,children:j("common.cancel")}),c.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:E||!f.trim(),children:j("common.create")})]})]})})}function MI({section:e,onClose:i,onSaved:r,onDeleted:l}){const s=S.useId(),[u,d]=S.useState((e==null?void 0:e.name)??""),[f,m]=S.useState(!1),[v,y]=S.useState("");async function g(b){if(b.preventDefault(),!(!u.trim()||f)){m(!0),y("");try{r(e?await be.updateSection(e.id,{name:u.trim()}):await be.createSection({name:u.trim()}))}catch(w){y(Ot(w,"common.saveFailed")),m(!1)}}}async function x(){if(!(!e||!confirm(j("dialogs.deleteSection",{name:e.name})))){m(!0);try{await be.deleteSection(e.id),l==null||l(e.id)}catch(b){y(Ot(b,"dialogs.deleteFailed")),m(!1)}}}return c.jsx(rs,{title:j(e?"dialogs.editSection":"sidebar.newSection"),onClose:i,children:c.jsxs("form",{onSubmit:b=>void g(b),children:[c.jsxs("div",{className:"ui-field",children:[c.jsx("label",{htmlFor:`${s}-name`,children:j("dialogs.sectionName")}),c.jsx("input",{id:`${s}-name`,value:u,maxLength:80,autoFocus:!0,placeholder:j("dialogs.newSection"),onChange:b=>d(b.target.value)})]}),v&&c.jsx("p",{className:"jv-form-error",role:"alert",children:v}),c.jsxs("div",{className:"ui-dialog-actions",children:[e&&c.jsx("button",{type:"button",className:"ui-button jv-danger",disabled:f,onClick:()=>void x(),children:j("common.delete")}),c.jsx("span",{className:"jv-spacer"}),c.jsx("button",{type:"button",className:"ui-button",onClick:i,children:j("common.cancel")}),c.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:f||!u.trim(),children:j(e?"common.save":"common.create")})]})]})})}function RI({bot:e,chats:i,onClose:r,onConfirm:l}){const[s,u]=S.useState(!1),[d,f]=S.useState(!1);return c.jsx(rs,{title:j("deleteBot.title",{name:e.name}),onClose:r,className:"jv-dialog",children:c.jsxs("div",{className:"jv-dialog-body",children:[c.jsx("p",{children:j("deleteBot.after")}),c.jsxs("ul",{className:"jv-dialog-list",children:[c.jsx("li",{children:j("deleteBot.chats",{count:i})}),c.jsx("li",{children:j("deleteBot.messages",{name:j("member.deleted",{name:e.name})})}),c.jsx("li",{children:j("deleteBot.history")})]}),c.jsxs("label",{className:"jv-checkline",children:[c.jsx("input",{type:"checkbox",checked:s,onChange:m=>u(m.target.checked)}),c.jsx("span",{children:j("deleteBot.files")})]}),c.jsx("p",{className:"jv-hint",children:j("deleteBot.filesHint")}),c.jsxs("div",{className:"jv-dialog-actions",children:[c.jsx(qe,{type:"button",variant:"ghost",onClick:r,children:j("common.cancel")}),c.jsx(qe,{type:"button",className:"jv-primary",disabled:d,onClick:()=>{f(!0),l(s).finally(()=>f(!1))},children:j(d?"deleteBot.deleting":"common.delete")})]})]})})}function xC({title:e,body:i,confirm:r,onClose:l,onConfirm:s}){const[u,d]=S.useState(!1);return c.jsx(rs,{title:e,onClose:l,className:"jv-dialog",children:c.jsxs("div",{className:"jv-dialog-body",children:[c.jsx("p",{children:i}),c.jsxs("div",{className:"jv-dialog-actions",children:[c.jsx(qe,{type:"button",variant:"ghost",onClick:l,children:j("common.cancel")}),c.jsx(qe,{type:"button",className:"jv-primary",disabled:u,onClick:()=>{d(!0),s().finally(()=>d(!1))},children:u?j("deleteBot.working"):r})]})]})})}function OI({target:e,x:i,y:r,onClose:l,onOpenBot:s,onSettings:u,onPin:d,onMute:f,onDeleteChat:m,onDeleteBot:v}){const y=S.useRef(null);S.useEffect(()=>{const b=k=>{var C;(C=y.current)!=null&&C.contains(k.target)||l()},w=k=>{k.key==="Escape"&&l()};return document.addEventListener("pointerdown",b),document.addEventListener("keydown",w),()=>{document.removeEventListener("pointerdown",b),document.removeEventListener("keydown",w)}},[l]);const g=e.chat,x={left:Math.max(8,Math.min(i,window.innerWidth-200)),top:Math.max(8,Math.min(r,window.innerHeight-210))};return c.jsxs("div",{ref:y,className:"ui-popover jv-entry-menu",role:"menu","aria-label":j("entry.menu"),style:x,children:[g&&c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{d(g,!g.pinned),l()},children:[c.jsx(De,{name:"pin"}),c.jsx("span",{className:"ui-menu-copy",children:j(g.pinned?"entry.unpin":"entry.pin")})]}),g&&c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{f(g,!g.muted),l()},children:[c.jsx(De,{name:g.muted?"bell":"bell-slash"}),c.jsx("span",{className:"ui-menu-copy",children:j(g.muted?"entry.unmute":"entry.mute")})]}),e.kind==="dm"?c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{s(e.bot),l()},children:[c.jsx(De,{name:"gear"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.botInfo")})]}):c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>{u(e.chat),l()},children:[c.jsx(De,{name:"info"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.channelInfo")})]}),!(e.kind==="dm"&&e.bot.agent)&&c.jsx("hr",{className:"ui-menu-divider"}),e.kind==="dm"?!e.bot.agent&&c.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{v(e.bot),l()},children:[c.jsx(De,{name:"close"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.deleteBot")})]}):c.jsxs("button",{role:"menuitem",className:"ui-menu-item jv-menu-danger",onClick:()=>{m(e.chat),l()},children:[c.jsx(De,{name:"close"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.deleteChannel")})]})]})}function _I({files:e,initialIndex:i=0,onClose:r}){const[l,s]=S.useState(i),[u,d]=S.useState("preview"),[f,m]=S.useState(!1),[v,y]=S.useState(""),[g,x]=S.useState(""),[b,w]=S.useState(""),[k,C]=S.useState(!0),[E,M]=S.useState(0),[T,A]=S.useState(!1),[I,R]=S.useState(!1),B=S.useRef(null),U=S.useRef(null),$=S.useRef(new Map),z=e[l],Y=uf(z),q=tC(Y),ee=!q&&z.size>hI,G=!q&&!ee&&Y!=="download";S.useEffect(()=>{const J=B.current,W=document.activeElement;return J.showModal(),()=>{J.close(),W!=null&&W.isConnected&&W.focus({preventScroll:!0})}},[]),S.useEffect(()=>{const J=new AbortController;return y(""),x(""),w(""),d("preview"),A(!1),R(!1),C(G),G&&(hc(Y)?aC(z,J.signal).then(x):rC(z,J.signal).then(y)).then(()=>C(!1)).catch(W=>{J.signal.aborted||(w(Ot(W,"files.readError")),C(!1))}),()=>J.abort()},[z.id,E]),S.useEffect(()=>{U.current&&(U.current.scrollTop=$.current.get(`${l}:${u}`)??0)},[l,u,k]);const H=()=>{var J;return $.current.set(`${l}:${u}`,((J=U.current)==null?void 0:J.scrollTop)??0)},Q=J=>{H(),s(Math.max(0,Math.min(e.length-1,J)))},O=S.useMemo(()=>Y==="html"&&v?pI(v):null,[Y,v]),F=G&&["markdown","html"].includes(Y)&&!k&&!b,ne=hc(Y)||q&&!I?"ui-image-view":Y==="html"&&u==="preview"?"ui-html-view":Y==="markdown"&&u==="preview"?"ui-document":"",D=c.jsxs("a",{className:"ui-button",href:Fl(z),download:z.name,children:[c.jsx(De,{name:"cloud-download"}),j("files.downloadFile")]});return no.createPortal(c.jsxs("dialog",{ref:B,className:"ui-viewer","aria-labelledby":"jvPreviewTitle","data-wide":f||void 0,onCancel:J=>{J.preventDefault(),r()},onKeyDown:J=>{!["ArrowLeft","ArrowRight"].includes(J.key)||["SELECT","INPUT","TEXTAREA"].includes(J.target.tagName)||(J.preventDefault(),Q(l+(J.key==="ArrowLeft"?-1:1)))},children:[c.jsxs("header",{className:"ui-preview-header",children:[c.jsxs("div",{className:"ui-preview-heading",children:[c.jsx("h1",{id:"jvPreviewTitle",children:z.name}),c.jsxs("small",{children:[j(nC[Y])," · ",iC(z.size)]})]}),c.jsxs("div",{className:"ui-preview-actions",children:[F&&c.jsx("button",{type:"button",className:"ui-button",onClick:()=>{H(),d(u==="source"?"preview":"source")},children:j(u==="source"?"files.showPreview":Y==="html"?"files.showSource":"files.showText")}),T&&c.jsx(ct,{icon:"window",label:j("files.openTab"),onClick:()=>window.open(Q1(z),"_blank","noopener,noreferrer")}),c.jsx("a",{className:"ui-iconbtn",href:Fl(z),download:z.name,"aria-label":j("files.download",{name:z.name}),title:j("files.download",{name:z.name}),children:c.jsx(De,{name:"cloud-download"})}),c.jsx(ct,{icon:f?"arrows-contract":"arrows-expand",label:j(f?"files.narrow":"files.widen"),"data-action":"ui-wide",onClick:()=>m(!f)}),c.jsx(ct,{icon:"close",label:j("files.closePreview"),"data-action":"ui-close",onClick:r})]})]}),O&&u==="preview"&&!k&&!b&&c.jsxs("div",{className:"jv-run-tip",role:"status",children:[c.jsx("p",{children:T?j("files.running"):j("files.scripts",{count:O.count,hosts:O.hosts.length?j("files.scriptHosts",{hosts:O.hosts.slice(0,3).join(j("common.listSeparator"))+(O.hosts.length>3?j("files.andMore"):"")}):""})}),c.jsx("button",{type:"button",className:"ui-button",onClick:()=>A(!T),children:j(T?"files.stop":"files.run")})]}),c.jsx("div",{className:`ui-preview-body ${ne}`,ref:U,tabIndex:-1,children:q?I?c.jsxs("div",{className:"ui-fallback",children:[c.jsx(De,{name:`file-${Y}`}),c.jsx("strong",{children:j("files.cantPlay")}),c.jsx("p",{children:j("files.cantPlayHint")}),D]}):Y==="video"?c.jsx("video",{className:"ui-preview-video",src:Fl(z),controls:!0,preload:"metadata",playsInline:!0,onError:()=>R(!0)},z.id):c.jsx("audio",{className:"ui-preview-audio",src:Fl(z),controls:!0,preload:"metadata",onError:()=>R(!0)},z.id):G?k?c.jsx("p",{className:"ui-unloaded",children:j("files.reading")}):b?c.jsxs("div",{className:"ui-error",role:"alert",children:[c.jsx("p",{children:b}),c.jsx("button",{type:"button",className:"ui-button",onClick:()=>M(J=>J+1),children:j("common.retry")})]}):hc(Y)?c.jsx("img",{className:"ui-preview-image",src:g,alt:z.name}):u==="source"||Y==="text"?c.jsx("pre",{className:"ui-source",tabIndex:0,children:v}):Y==="html"?T?c.jsx("iframe",{title:j("files.runningTitle",{name:z.name}),sandbox:"allow-scripts",src:Q1(z),referrerPolicy:"no-referrer",className:"ui-html-frame"},"run"):c.jsx("iframe",{title:z.name,sandbox:"",srcDoc:gI(v),referrerPolicy:"no-referrer",className:"ui-html-frame"},"static"):c.jsx("article",{className:"ui-prose",children:c.jsx(Dc,{text:v})}):c.jsxs("div",{className:"ui-fallback",children:[c.jsx(De,{name:"file"}),c.jsx("strong",{children:j("files.downloadToView")}),c.jsx("p",{children:j(ee?"files.tooLarge":"files.unsupported")}),D]})}),e.length>1&&c.jsxs("footer",{className:"ui-preview-nav",children:[c.jsx(ct,{icon:"chevron-left",label:j("files.previous"),disabled:l===0,onClick:()=>Q(l-1)}),c.jsx("select",{id:"ui-preview-select","aria-label":j("files.choose"),value:l,onChange:J=>Q(Number(J.target.value)),children:e.map((J,W)=>c.jsx("option",{value:W,children:J.name},J.id))}),c.jsxs("span",{children:[l+1," / ",e.length]}),c.jsx(ct,{icon:"chevron-right",label:j("files.next"),disabled:l===e.length-1,onClick:()=>Q(l+1)})]})]}),document.body)}function DI({dialog:e,entryMenu:i,confirm:r,preview:l,infoBot:s,bots:u,statuses:d,chats:f,sections:m,members:v,connections:y,meId:g,onDialog:x,onEntryMenu:b,onConfirm:w,onPreview:k,onInfoBot:C,onSettings:E,onChannelInfo:M,onOpenChatId:T,chatSaved:A,openChat:I,onSectionSaved:R,onSectionDeleted:B,updateBot:U,openAnywhere:$,removeChannel:z,deleteBot:Y,pinChat:q,muteChat:ee}){return c.jsxs(c.Fragment,{children:[(e==null?void 0:e.kind)==="channel"&&c.jsx(AI,{sections:m,members:ar(v),bots:u,me:g,onClose:()=>x(null),onSaved:G=>{A(G),x(null),I(G)}}),(e==null?void 0:e.kind)==="members"&&c.jsx(TI,{chat:f.find(G=>G.id===e.chat.id)??e.chat,members:ar(v),bots:u,onClose:()=>x(null),onChanged:A}),(e==null?void 0:e.kind)==="section"&&c.jsx(MI,{section:e.section,onClose:()=>x(null),onSaved:R,onDeleted:B}),i&&c.jsx(OI,{target:i.target,x:i.at.x,y:i.at.y,onClose:()=>b(null),onOpenBot:G=>C(G.id),onSettings:G=>{G.type==="channel"&&M(G)},onPin:(G,H)=>void q(G,H),onMute:(G,H)=>void ee(G,H),onDeleteChat:G=>w({kind:"chat",chat:G}),onDeleteBot:G=>w({kind:"bot",bot:G})}),(r==null?void 0:r.kind)==="chat"&&c.jsx(xC,{title:j("app.deleteChannelTitle",{name:r.chat.title}),confirm:j("common.delete"),onClose:()=>w(null),body:j("app.deleteChannelBody"),onConfirm:async()=>{await z(r.chat),w(null)}}),(r==null?void 0:r.kind)==="bot"&&c.jsx(RI,{bot:r.bot,chats:f.filter(G=>G.type==="dm"&&G.botId===r.bot.id).length,onClose:()=>w(null),onConfirm:async G=>{await Y(r.bot,G),w(null)}}),s&&c.jsx(fI,{bot:s,status:d[s.id],connections:y,chats:f,onSaved:U,onOpenChat:G=>{C(null),T(G)},onOpenSubscription:$,onManageModels:()=>{C(null),E()},onClose:()=>C(null)},s.id),l&&c.jsx(_I,{files:l.files,initialIndex:l.index,onClose:()=>k(null)})]})}function bC(e,i,r){const[l,s]=S.useState(null),[u,d]=S.useState(!1);return S.useEffect(()=>{const f=e.trim();if(!f){s(null),d(!1);return}let m=!0;d(!0);const v=setTimeout(()=>void be.search(f,i).then(y=>{m&&s(y)}).catch(y=>{m&&r(y)}).finally(()=>{m&&d(!1)}),250);return()=>{m=!1,clearTimeout(v)}},[e,i]),{result:l,loading:u}}function jC(e,i,r){var l;return e.type==="thread"?`#${((l=i.find(s=>s.id===e.parentId))==null?void 0:l.title)??j("search.channel")} › ${e.title}`:e.type==="channel"?`#${e.title}`:Ur(r.find(s=>s.id===e.botId))}function wC({text:e,query:i,room:r=24}){const l=e.replace(/[*`~#>|]/g,"").replace(/\s+/g," ").trim(),s=l.toLocaleLowerCase().indexOf(i.trim().toLocaleLowerCase());if(s<0||!i.trim())return c.jsx(c.Fragment,{children:l.slice(0,120)});const u=Math.max(0,s-r),d=s+i.trim().length;return c.jsxs(c.Fragment,{children:[u>0&&"…",l.slice(u,s),c.jsx("mark",{className:"jv-hit",children:l.slice(s,d)}),l.slice(d,d+120)]})}const zI=e=>new Date(e).toDateString()===new Date().toDateString()?cc(e):QT(e);function SC({message:e,chat:i,chats:r,members:l,query:s,showPlace:u=!0,onOpen:d}){return c.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>d(i,e.id),children:[c.jsxs("span",{className:"jv-hit-head",children:[c.jsx("strong",{children:Ur(l.find(f=>f.id===e.senderId))}),u&&c.jsx("span",{className:"jv-hit-place",children:jC(i,r,l)}),c.jsx("time",{dateTime:new Date(e.createdAt).toISOString(),children:zI(e.createdAt)})]}),c.jsx("span",{className:"jv-hit-text",children:c.jsx(wC,{text:fv(e),query:s})})]})}const W1=5;function Cd({label:e,items:i,empty:r}){const[l,s]=S.useState(!1);return!i.length&&!r?null:c.jsxs("section",{className:"jv-result-group","aria-label":e,children:[c.jsxs("h3",{className:"jv-result-head",children:[e,c.jsx("span",{children:i.length})]}),i.length?l?i:i.slice(0,W1):c.jsx("p",{className:"jv-result-empty",children:r}),!l&&i.length>W1&&c.jsxs("button",{type:"button",className:"jv-result-more",onClick:()=>s(!0),children:[j("search.showAll",{count:i.length}),c.jsx(De,{name:"chevron-down"})]})]})}function LI({query:e,shown:i,chats:r,members:l,onOpenChat:s,onOpenMessage:u,onError:d}){const{result:f,loading:m}=bC(e,void 0,d),v=((f==null?void 0:f.chats)??[]).filter(g=>!i.has(g.id)),y=g=>{var x,b;return c.jsxs("button",{type:"button",className:"jv-hit-row",onClick:()=>s(g),children:[c.jsxs("span",{className:"jv-hit-head",children:[c.jsx("strong",{children:g.type==="thread"?g.title:`#${g.title}`}),g.type==="thread"&&c.jsx("span",{className:"jv-hit-place",children:jC(g,r,l).split(" › ")[0]})]}),(((x=g.note)==null?void 0:x.text)||g.topic)&&c.jsx("span",{className:"jv-hit-text",children:c.jsx(wC,{text:((b=g.note)==null?void 0:b.text)||g.topic,query:e})})]},g.id)};return c.jsxs("div",{className:"jv-results","aria-live":"polite",children:[c.jsx(Cd,{label:j("search.threads"),items:v.filter(g=>g.type==="thread").map(y)}),c.jsx(Cd,{label:j("search.channels"),items:v.filter(g=>g.type==="channel").map(y)}),f?c.jsx(Cd,{label:j("search.messages"),empty:j("search.noMessages"),items:f.messages.map(({message:g,chat:x})=>c.jsx(SC,{message:g,chat:x,chats:r,members:l,query:e,onOpen:u},g.id))}):m&&c.jsx("p",{className:"jv-result-empty",children:j("search.searching")})]})}function II({className:e,...i}){return c.jsx("div",{"data-slot":"input-group",role:"group",className:nn("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),...i})}const BI=mg("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 HI({className:e,align:i="inline-start",...r}){return c.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":i,className:nn(BI({align:i}),e),onClick:l=>{var s,u;l.target.closest("button")||(u=(s=l.currentTarget.parentElement)==null?void 0:s.querySelector("input"))==null||u.focus()},...r})}function PI({className:e,...i}){return c.jsx(In,{"data-slot":"input-group-control",className:nn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",e),...i})}function UI({className:e,children:i,...r}){return c.jsxs(S_,{"data-slot":"scroll-area",className:nn("relative",e),...r,children:[c.jsx(k_,{"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:i}),c.jsx(qI,{}),c.jsx(C_,{})]})}function qI({className:e,orientation:i="vertical",...r}){return c.jsx(f_,{"data-slot":"scroll-area-scrollbar",orientation:i,className:nn("flex touch-none p-px transition-colors select-none",i==="vertical"&&"h-full w-2.5 border-l border-l-transparent",i==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:c.jsx(y_,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const kC="jarvy-collapsed-sections",FI=()=>{try{return JSON.parse(localStorage.getItem(kC)??"[]")}catch{return[]}};function e2({chat:e}){return e.alerts>0?c.jsx("span",{className:"jv-badge","aria-label":j("sidebar.alerts",{count:e.alerts}),children:e.alerts}):e.unread>0?c.jsx("span",{className:"jv-count","aria-label":j("sidebar.unread",{count:e.unread}),children:e.unread}):null}function CC(e){const i=e.hint;if(!i||i.createdAt<e.updatedAt-1e3)return null;const r=i.chatType==="thread"&&i.chatId!==e.id,l={actor:i.actor,emoji:i.detail,title:i.title.length>16?`${i.title.slice(0,16)}…`:i.title};return i.kind==="reaction"?j(r?"hint.reactionInThread":"hint.reaction",l):j(r?"hint.threadSummary":i.chatType==="thread"?"hint.summary":"hint.notice",l)}function VI(e){var i;return e.type==="channel"&&CC(e)&&((i=e.hint)==null?void 0:i.chatType)==="thread"&&e.hint.chatId!==e.id?e.hint.chatId:null}function t2({chat:e,channel:i}){const r=CC(e),l=e.lastMessage&&Lc(e.lastMessage),s=r??(l?i&&e.lastSender?j("sidebar.said",{name:e.lastSender,text:l}):l:i?e.topic:"");return c.jsxs("span",{className:"jv-digest",children:[e.atMe&&c.jsx("span",{className:"jv-at-me",children:j("sidebar.atMe")}),c.jsx("span",{className:r?"jv-hint-line":void 0,children:s})]})}const n2=e=>{const i=e.getBoundingClientRect();return{x:i.right-168,y:i.bottom+4}};function $I({chats:e,sections:i,bots:r,members:l,onOpenMessage:s,onOpenFound:u,onError:d,working:f,asking:m,selected:v,filter:y,followed:g,followedOpen:x,onFilterChange:b,onSelect:w,onOpenBot:k,onOpenFollowed:C,onMenu:E,onEditSection:M}){const[T,A]=S.useState(FI),I=O=>A(F=>{const ne=F.includes(O)?F.filter(D=>D!==O):[...F,O];return localStorage.setItem(kC,JSON.stringify(ne)),ne}),R=y.toLocaleLowerCase(),B=e.filter(O=>{var F;return O.type!=="thread"&&`${O.title} ${O.topic} ${((F=r.find(ne=>ne.id===O.botId))==null?void 0:F.name)??""}`.toLocaleLowerCase().includes(R)}),U=g.reduce((O,F)=>O+F.unread,0),$=g.reduce((O,F)=>O+F.mentions,0),z=B.filter(O=>O.type==="channel").sort((O,F)=>Number(F.pinned)-Number(O.pinned)||O.title.localeCompare(F.title,"zh-CN")),Y=r.map(O=>({bot:O,chat:e.find(F=>F.type==="dm"&&F.botId===O.id)})).filter(({bot:O})=>O.name.toLocaleLowerCase().includes(R)).sort((O,F)=>{var ne,D,J,W;return Number(F.bot.agent)-Number(O.bot.agent)||+!!((ne=F.chat)!=null&&ne.pinned)-+!!((D=O.chat)!=null&&D.pinned)||(((J=F.chat)==null?void 0:J.updatedAt)??0)-(((W=O.chat)==null?void 0:W.updatedAt)??0)}),q=O=>c.jsxs("div",{className:"jv-side-wrap",onContextMenu:F=>{F.preventDefault(),E({kind:"channel",chat:O},{x:F.clientX,y:F.clientY})},children:[c.jsxs("button",{type:"button",className:"jv-side-row","data-active":v===O.id||void 0,"data-unread":O.unread>0||void 0,"aria-current":v===O.id?"page":void 0,onClick:()=>w(O),children:[O.pinned?c.jsx(Np,{className:"jv-side-pin","aria-label":j("sidebar.pinned")}):c.jsx("span",{className:"jv-hash","aria-hidden":"true",children:"#"}),c.jsxs("span",{className:"jv-side-text",children:[c.jsxs("span",{className:"jv-side-line",children:[c.jsx("span",{className:"jv-side-label",title:O.title,children:O.title}),O.muted&&c.jsx("span",{className:"jv-side-muted","aria-label":j("sidebar.muted"),children:c.jsx(De,{name:"bell-slash"})})]}),c.jsxs("span",{className:"jv-side-line",children:[c.jsx(t2,{chat:O,channel:!0}),c.jsx(e2,{chat:O})]})]})]}),c.jsx("button",{type:"button",className:"jv-side-more","aria-label":j("sidebar.more",{name:O.title}),onClick:F=>E({kind:"channel",chat:O},n2(F.currentTarget)),children:c.jsx(wb,{"aria-hidden":"true"})})]},O.id),ee=({bot:O,chat:F})=>{const ne=m.has(O.id)?"asking":f.has(O.id)?"working":void 0,D=!!F&&v===F.id;return c.jsxs("div",{className:"shadcn-chat-row relative",onContextMenu:J=>{J.preventDefault(),E({kind:"dm",bot:O,chat:F},{x:J.clientX,y:J.clientY})},children:[c.jsxs(qe,{type:"button",variant:"ghost","data-active":D,"aria-current":D?"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:()=>F?w(F):k(O),children:[c.jsx(zc,{color:O.color,mood:O.mood,size:36,badge:ne,crown:O.agent}),ne&&c.jsx("span",{className:"sr-only",children:j(ne==="asking"?"sidebar.asking":"sidebar.working")}),c.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[c.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:`min-w-0 flex-1 truncate text-sm ${F!=null&&F.unread?"font-semibold":"font-medium"}`,title:O.name,children:O.name}),(F==null?void 0:F.muted)&&c.jsx("span",{className:"jv-side-muted","aria-label":j("sidebar.muted"),children:c.jsx(De,{name:"bell-slash"})}),(F==null?void 0:F.pinned)&&c.jsx(Np,{className:"jv-dm-pin shrink-0","aria-label":j("sidebar.pinned")}),F&&c.jsx("time",{className:"shadcn-chat-time shrink-0 text-[11px] font-normal text-muted-foreground",dateTime:new Date(F.updatedAt).toISOString(),children:cc(F.updatedAt)})]}),c.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[c.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-normal text-muted-foreground",children:F?c.jsx(t2,{chat:F,channel:!1}):""}),F&&c.jsx(e2,{chat:F})]})]})]}),c.jsx(qe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":j("sidebar.more",{name:O.name}),className:"shadcn-chat-more absolute top-4 right-2 opacity-0",onClick:J=>E({kind:"dm",bot:O,chat:F},n2(J.currentTarget)),children:c.jsx(wb,{"aria-hidden":"true"})})]},O.id)},G=(O,F,ne,D,J)=>c.jsxs("div",{className:"jv-side-section-head",children:[c.jsxs("button",{type:"button",className:"jv-side-section-toggle","aria-expanded":!ne,onClick:()=>I(O),children:[c.jsx("span",{className:"jv-side-chevron",children:c.jsx(De,{name:ne?"chevron-right":"chevron-down"})}),c.jsxs("span",{className:"jv-side-section-name",children:[F,ne&&D&&c.jsx("span",{className:"jv-dot","aria-label":j("sidebar.hasUnread")})]})]}),J&&c.jsx("button",{type:"button",className:"jv-side-section-edit","aria-label":j("sidebar.editSection",{name:F}),onClick:()=>M(J),children:c.jsx(De,{name:"pencil"})})]}),H=O=>!R&&T.includes(O),Q=(O,F,ne,D)=>c.jsxs("div",{className:"jv-side-section",children:[G(O,F,H(O),ne.some(J=>J.unread>0),D),!H(O)&&ne.map(q)]},O);return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-3 mt-1 mb-2 shrink-0",role:"search",children:c.jsxs(II,{className:"h-9 bg-background",children:[c.jsx(PI,{id:"jarvy-search",type:"search",value:y,onChange:O=>b(O.target.value),placeholder:j("sidebar.search"),"aria-label":j("sidebar.search"),onKeyDown:O=>{O.key==="Escape"&&y&&(O.preventDefault(),b(""))},className:"text-sm"}),c.jsx(HI,{align:"inline-start",children:c.jsx(kc,{"aria-hidden":"true"})})]})}),c.jsx(UI,{className:"min-h-0 flex-1",type:"auto",children:R?c.jsxs("nav",{className:"jv-side-nav jv-side-search px-3 pb-6","aria-label":j("sidebar.results"),children:[c.jsx(Cd,{label:j("sidebar.chats"),items:[...z.map(q),...Y.map(ee)]}),c.jsx(LI,{query:y,shown:new Set(z.map(O=>O.id)),chats:e,members:l,onOpenChat:u,onOpenMessage:s,onError:d})]}):c.jsxs("nav",{className:"jv-side-nav px-3 pb-6","aria-label":j("sidebar.nav"),children:[g.length>0&&c.jsxs("button",{type:"button",className:"jv-side-row jv-side-top","data-active":x||void 0,"data-unread":U>0||void 0,"aria-current":x?"page":void 0,onClick:C,children:[c.jsx(De,{name:"chat-bubble"}),c.jsx("span",{className:"jv-side-label",children:j("sidebar.followed")}),$>0?c.jsx("span",{className:"jv-badge",children:$}):U>0&&c.jsx("span",{className:"jv-count",children:U})]}),i.map(O=>Q(`s:${O.id}`,O.name,z.filter(F=>F.sectionId===O.id),O)),z.some(O=>!O.sectionId||!i.some(F=>F.id===O.sectionId))&&Q("channels",j("sidebar.channels"),z.filter(O=>!O.sectionId||!i.some(F=>F.id===O.sectionId))),c.jsxs("div",{className:"jv-side-section",children:[G("dms",j("sidebar.dms"),H("dms"),Y.some(({chat:O})=>!!(O!=null&&O.unread))),!H("dms")&&c.jsx("div",{className:"space-y-1",children:Y.map(ee)}),!H("dms")&&Y.length===0&&c.jsx("p",{className:"jv-side-empty",children:j("sidebar.noDms")})]})]})})]})}function YI({username:e,chats:i,sections:r,bots:l,members:s,followed:u,followedOpen:d,working:f,asking:m,selected:v,filter:y,creating:g,createMenu:x,accountMenu:b,onFilterChange:w,onOpenFollowed:k,onOpenChat:C,onOpenBot:E,onOpenMenu:M,onEditSection:T,onCreate:A,onFind:I,onOpenFound:R,onError:B,onToggleCreate:U,onToggleAccount:$,onSettings:z,onToggleTheme:Y,onLogOut:q}){const ee=S.useRef(null),G=S.useRef(null);return S.useEffect(()=>{if(!b&&!x)return;const H=Q=>{var O,F;b&&!((O=G.current)!=null&&O.contains(Q.target))&&$(!1),x&&!((F=ee.current)!=null&&F.contains(Q.target))&&U(!1)};return document.addEventListener("pointerdown",H),()=>document.removeEventListener("pointerdown",H)},[b,x]),c.jsxs(c.Fragment,{children:[c.jsxs("aside",{className:"ui-sidebar","aria-label":j("sidebar.label"),children:[c.jsx("header",{className:"ui-sidebar-header",children:c.jsxs("div",{className:"jarvy-sidebar-create",ref:ee,children:[c.jsx(ct,{icon:"add",label:j("sidebar.create"),"aria-expanded":x,"aria-haspopup":"menu",disabled:g,onClick:()=>U(!x)}),x&&c.jsxs("div",{className:"ui-popover jarvy-create-menu",role:"menu","aria-label":j("sidebar.createMenu"),children:[c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>A("channel"),children:[c.jsx(De,{name:"list-bullets"}),c.jsx("span",{className:"ui-menu-copy",children:j("sidebar.newChannel")})]}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>A("section"),children:[c.jsx(De,{name:"folder"}),c.jsx("span",{className:"ui-menu-copy",children:j("sidebar.newSection")})]}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:()=>A("bot"),children:[c.jsx(De,{name:"person-add"}),c.jsx("span",{className:"ui-menu-copy",children:j("sidebar.newBot")})]})]})]})}),c.jsx($I,{chats:i,sections:r,bots:l,members:s,onOpenMessage:I,onOpenFound:R,onError:B,working:f,asking:m,selected:v,filter:y,onFilterChange:w,followed:u,followedOpen:d,onOpenFollowed:k,onSelect:C,onOpenBot:E,onMenu:M,onEditSection:T}),c.jsx("footer",{className:"ui-sidebar-footer",children:c.jsxs("button",{type:"button",className:"ui-footer-entry","aria-label":j("account.menuFor",{name:e}),"aria-expanded":b,onClick:()=>$(!b),children:[c.jsx("span",{className:"ui-user-avatar",children:e.slice(0,2).toUpperCase()}),c.jsx("span",{children:e}),c.jsx(De,{name:"chevron-down"})]})})]}),b&&c.jsxs("div",{ref:G,className:"ui-popover jarvy-account-menu",role:"menu","aria-label":j("account.menu"),children:[c.jsx("div",{className:"ui-menu-note ui-small",children:e}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:z,children:[c.jsx(De,{name:"gear"}),c.jsx("span",{className:"ui-menu-copy",children:j("settings.title")})]}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:Y,children:[c.jsx(De,{name:"moon"}),c.jsx("span",{className:"ui-menu-copy",children:j("account.toggleTheme")})]}),c.jsx("hr",{className:"ui-menu-divider"}),c.jsxs("button",{role:"menuitem",className:"ui-menu-item",onClick:q,children:[c.jsx(De,{name:"arrow-bracket-to-left"}),c.jsx("span",{className:"ui-menu-copy",children:j("account.signOut")})]})]})]})}function GI({textarea:e,value:i,setValue:r,inside:l,outside:s,bots:u,onInvite:d}){const[f,m]=S.useState(null),[v,y]=S.useState(0),[g,x]=S.useState(null),b=S.useRef(null),w=S.useRef(null),k=S.useRef(null);S.useLayoutEffect(()=>{k.current===null||!e.current||(e.current.focus(),e.current.setSelectionRange(k.current,k.current),k.current=null)},[i,e]);const C=(H,Q)=>H.name.toLowerCase().includes(Q.toLowerCase()),E=f===null?[]:l.filter(H=>C(H,f)),M=f===null?[]:s.filter(H=>C(H,f)),T=g?s.filter(H=>C(H,g.search)):[],A=E.length+(M.length?1:0),I=()=>{m(null),x(null)};function R(H=i){const Q=e.current,O=Q?/(?:^|[^\p{Script=Latin}\p{Nd}_])@([^\s@]*)$/u.exec(H.slice(0,Q.selectionStart)):null;m(O?O[1]:null),y(0),x(null)}function B(H){const Q=e.current;if(!Q)return;l.some(ne=>ne.id===H.id)||d(H);const O=i.slice(0,Q.selectionStart).replace(/@([^\s@]*)$/u,`@${H.name} `),F=O+i.slice(Q.selectionStart);k.current=O.length,r(F),I()}function U(H){g||x({search:f??"",active:0}),H&&requestAnimationFrame(()=>{var Q;return(Q=w.current)==null?void 0:Q.focus()})}function $(){var H;x(null),(H=e.current)==null||H.focus()}function z(H){if(!A||H.nativeEvent.isComposing)return!1;const Q=v===E.length;return H.key==="ArrowDown"||H.key==="ArrowUp"?(H.preventDefault(),y((v+(H.key==="ArrowDown"?1:-1)+A)%A),x(null),!0):(H.key==="Enter"||H.key==="Tab")&&!Q?(H.preventDefault(),B(E[v]),!0):(H.key==="Enter"||H.key==="Tab"||H.key==="ArrowRight")&&Q?(H.preventDefault(),U(!0),!0):H.key==="Escape"?(H.preventDefault(),I(),!0):!1}function Y(H){!g||H.nativeEvent.isComposing||((H.key==="ArrowDown"||H.key==="ArrowUp")&&T.length?(H.preventDefault(),x({...g,active:(g.active+(H.key==="ArrowDown"?1:-1)+T.length)%T.length})):H.key==="Enter"?(H.preventDefault(),T[g.active]&&B(T[g.active])):(H.key==="Escape"||H.key==="ArrowLeft"&&!g.search)&&(H.preventDefault(),$()))}const q=H=>{var O;const Q=H.relatedTarget;(!Q||!((O=b.current)!=null&&O.contains(Q))&&Q!==e.current)&&I()},ee=(H,Q)=>c.jsxs("button",{type:"button",role:"option","aria-selected":Q,className:"ui-menu-item","data-active":Q||void 0,onMouseDown:O=>{O.preventDefault(),B(H)},children:[c.jsx(va,{member:H,bots:u,size:20}),c.jsx("span",{className:"ui-menu-copy",children:H.name}),c.jsx("span",{className:"jv-muted",children:H.kind==="bot"?"Bot":j("common.member")})]},H.id);return{menu:A>0?c.jsxs("div",{ref:b,className:"jv-mention-box","data-side":g?"":void 0,onBlur:q,children:[c.jsxs("div",{className:"ui-popover jv-mention-menu",role:"listbox","aria-label":j("mention.menu"),children:[E.map((H,Q)=>ee(H,Q===v)),M.length>0&&c.jsxs("button",{type:"button",className:"ui-menu-item jv-mention-more","aria-haspopup":"listbox","aria-expanded":!!g,"data-active":v===E.length||void 0,onMouseEnter:()=>{y(E.length),U(!1)},onMouseDown:H=>{H.preventDefault(),y(E.length),U(!0)},children:[c.jsx("span",{className:"ui-menu-copy",children:j("mention.outside")}),c.jsx("span",{className:"jv-muted",children:M.length}),c.jsx(De,{name:"chevron-right"})]})]}),g&&c.jsxs("div",{className:"ui-popover jv-mention-side",role:"listbox","aria-label":j("mention.outsideList"),children:[c.jsxs("div",{className:"jv-mention-side-head",children:[c.jsx("button",{type:"button",className:"jv-mention-back","aria-label":j("common.back"),onMouseDown:H=>{H.preventDefault(),$()},children:c.jsx(De,{name:"chevron-left"})}),c.jsx("input",{ref:w,type:"search",value:g.search,placeholder:j("common.searchMembers"),"aria-label":j("mention.searchOutside"),onChange:H=>x({search:H.target.value,active:0}),onKeyDown:Y})]}),c.jsx("div",{className:"jv-mention-side-list",children:T.length?T.map((H,Q)=>ee(H,Q===g.active)):c.jsx("p",{className:"jv-mention-empty",children:j("common.noMatch")})}),c.jsx("p",{className:"ui-menu-note ui-small",children:j("mention.invites")})]})]}):null,track:R,onKeyDown:z,close:I,leaves:q}}const i2={text:null,files:[],quote:null,passages:[],key:null,signature:null,sending:!1};class XI{constructor(i){nc(this,"drafts",new Map);nc(this,"listeners",new Set);nc(this,"timer",null);nc(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));this.storageKey=i;try{const r=JSON.parse(localStorage.getItem(i)??"{}");for(const[l,s]of Object.entries(r))this.drafts.set(l,{...i2,...s,sending:!1})}catch{localStorage.removeItem(i)}}get(i){return this.drafts.get(i)??i2}update(i,r){const l=this.get(i),s=typeof r=="function"?r(l):r;this.drafts.set(i,{...l,...s}),this.listeners.forEach(d=>d());const u=Object.keys(s).every(d=>d==="text"||d==="sending");this.timer&&clearTimeout(this.timer),u?this.timer=setTimeout(()=>this.save(),300):this.save()}save(){var r;this.timer&&(clearTimeout(this.timer),this.timer=null);const i={};for(const[l,{sending:s,...u}]of this.drafts)((r=u.text)!=null&&r.trim()||u.files.length||u.quote||u.passages.length)&&(i[l]=u);Object.keys(i).length?localStorage.setItem(this.storageKey,JSON.stringify(i)):localStorage.removeItem(this.storageKey)}async clear(i){this.timer&&(clearTimeout(this.timer),this.timer=null);const r=[...this.drafts.values()].flatMap(l=>l.files);await Promise.all(r.map(l=>i(l.id).catch(s=>console.warn(`Pending attachment ${l.id} was not deleted on log-out`,s)))),this.drafts.clear(),localStorage.removeItem(this.storageKey),this.listeners.forEach(l=>l())}}const QI=e=>`jarvy-drafts:${e}`;function NC(e,i,r){e.update(i.chatId,{quote:{id:i.id,name:Ur(r.find(l=>l.id===i.senderId)),text:fv(i).replace(/\s+/g," ").slice(0,160)}})}function KI(e,i){return S.useSyncExternalStore(e.subscribe,()=>e.get(i))}const r2=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");function EC({chatId:e,id:i,drafts:r,placeholder:l,disabled:s=!1,mention:u,initialText:d,formRef:f,scrollRef:m,onSend:v,onError:y,onNotice:g}){const x=KI(r,e),b=x.sending,[w,k]=S.useState([]),[C,E]=S.useState(!1),M=w.filter(O=>O.chatId===e),T=M.length>0,A=S.useRef(null),I=x.text??d??"",R=x.files,B=x.quote,U=O=>r.update(e,{text:O}),$=GI({textarea:A,value:I,setValue:U,inside:(u==null?void 0:u.inside)??[],outside:(u==null?void 0:u.outside)??[],bots:(u==null?void 0:u.bots)??[],onInvite:O=>u==null?void 0:u.onInvite(O)});async function z(O){const F=e;if(!O.length)return;if(T){g(j("composer.busy"));return}if(R.length+O.length>5){g(j("composer.tooMany",{count:5}));return}if(O.some(W=>W.size===0||W.size>10*1024*1024)){g(j("composer.size"));return}const ne=O.map(W=>({key:r2(),chatId:F,name:W.name,done:0})),D=ne.map(W=>W.key),J=(W,P)=>k(V=>V.map(fe=>fe.key===W?{...fe,done:P}:fe));k(W=>[...W,...ne]);try{for(const[W,P]of O.entries()){const V=D[W],fe=await be.uploadAttachment(F,P,ye=>J(V,ye));r.update(F,ye=>({files:[...ye.files,fe]})),k(ye=>ye.filter(je=>je.key!==V))}}catch(W){y(W)}finally{k(W=>W.filter(P=>!D.includes(P.key)))}}async function Y(O){const F=e;try{await be.removeAttachment(O),r.update(F,ne=>({files:ne.files.filter(D=>D.id!==O)}))}catch(ne){y(ne)}}function q(O){const F=[...O.clipboardData.files];if(!F.length)return;O.preventDefault();const ne=new Date().toISOString().replace(/\D/g,"").slice(0,14);z(F.map((D,J)=>D.type.startsWith("image/")&&/^image\.\w+$/.test(D.name)?new File([D],`${j("composer.pasted")}-${ne}${F.length>1?`-${J+1}`:""}.${D.name.split(".").pop()}`,{type:D.type}):D))}const ee=O=>O.dataTransfer.types.includes("Files");function G(O){!ee(O)||s||(O.preventDefault(),O.dataTransfer.dropEffect="copy",E(!0))}function H(O){ee(O)&&(O.preventDefault(),E(!1),s||z([...O.dataTransfer.files]))}async function Q(O){O==null||O.preventDefault();const F=e,ne=r.get(F),D=(ne.text??d??"").trim(),J=ne.files,W=ne.quote,P=ne.passages,fe=[P.map((ae,xe)=>`[[q${xe+1}]]`).join(`
|
|
515
|
+
`),D].filter(Boolean).join(`
|
|
516
|
+
|
|
517
|
+
`);if(!fe&&!J.length||ne.sending||T||s)return;const ye=JSON.stringify([fe,J.map(ae=>ae.id),(W==null?void 0:W.id)??null,P]),je=ne.signature===ye&&ne.key?ne.key:r2();r.update(F,{key:je,signature:ye,sending:!0});try{await v(fe,J.map(ae=>ae.id),je,W==null?void 0:W.id,P.map(({messageId:ae,text:xe})=>({messageId:ae,text:xe}))),r.update(F,ae=>{var xe;return{text:(ae.text??d??"").trim()===D?"":ae.text,passages:ae.passages.filter(oe=>!P.includes(oe)),files:ae.files.filter(oe=>!J.some(ce=>ce.id===oe.id)),quote:((xe=ae.quote)==null?void 0:xe.id)===(W==null?void 0:W.id)?null:ae.quote,key:null,signature:null}})}catch(ae){y(ae)}finally{r.update(F,{sending:!1})}}return S.useLayoutEffect(()=>{const O=()=>{const F=A.current,ne=m==null?void 0:m.current;if(!F)return;const D=ne==null?void 0:ne.scrollTop;F.style.height="auto",F.style.height=`${F.scrollHeight}px`,ne&&D!==void 0&&ne.scrollTop!==D&&ne.scrollTo({top:D,behavior:"instant"})};return O(),window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[I,e,m]),c.jsxs("form",{ref:f,className:`ui-compose-wrap${C?" jarvy-dropping":""}`,onSubmit:O=>void Q(O),onDragEnter:G,onDragOver:G,onDragLeave:O=>{O.currentTarget.contains(O.relatedTarget)||E(!1)},onDrop:H,children:[R.length+M.length>0&&c.jsxs("div",{className:"jarvy-pending-files",children:[R.map(O=>c.jsxs("span",{className:"jarvy-file-chip",children:[c.jsx(De,{name:"paperclip"}),c.jsx("span",{title:O.name,children:O.name}),c.jsx("button",{type:"button","aria-label":j("composer.removeFile",{name:O.name}),onClick:()=>void Y(O.id),children:"×"})]},O.id)),M.map(O=>c.jsxs("span",{className:"jarvy-file-chip","data-uploading":!0,children:[c.jsx(De,{name:"paperclip"}),c.jsx("span",{title:O.name,children:O.name}),c.jsx("span",{className:"jarvy-file-progress",role:"progressbar","aria-label":j("composer.uploading",{name:O.name}),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(O.done*100),children:c.jsx("span",{style:{width:`${O.done*100}%`}})})]},O.key))]}),B&&c.jsxs("div",{className:"jv-compose-quote",children:[c.jsx("span",{className:"jv-compose-quote-label",children:j("composer.replying")}),c.jsx("span",{className:"jv-reply-author",children:B.name}),c.jsx("span",{className:"jv-reply-text",children:B.text||j("common.attachment")}),c.jsx("button",{type:"button","aria-label":j("composer.cancelReply"),onClick:()=>r.update(e,{quote:null}),children:"×"})]}),c.jsx(wI,{quotes:x.passages,onRemove:O=>r.update(e,F=>({passages:F.passages.filter((ne,D)=>D!==O)}))}),c.jsxs("div",{className:"ui-composer jv-composer",children:[u&&$.menu,C&&c.jsx("span",{className:"jarvy-drop-hint",role:"status",children:j("composer.drop")}),c.jsxs("label",{className:"jarvy-attach-trigger",title:j("composer.attach"),children:[c.jsx(De,{name:"add"}),c.jsx("input",{type:"file",multiple:!0,"aria-label":j("composer.attach"),disabled:b||T||s||R.length>=5,onChange:O=>{const F=[...O.target.files??[]];O.target.value="",z(F)}})]}),c.jsx("textarea",{ref:A,id:i,rows:1,maxLength:32e3,value:I,onPaste:q,placeholder:l,disabled:s,"aria-label":j("composer.input"),onChange:O=>{U(O.target.value),u&&$.track(O.target.value)},onKeyDown:O=>{u&&$.onKeyDown(O)||O.key==="Enter"&&!O.shiftKey&&!O.nativeEvent.isComposing&&(O.preventDefault(),Q())},onClick:()=>{u&&$.track()},onBlur:u?$.leaves:void 0}),c.jsx("button",{type:"submit",className:"ui-round ui-send","aria-label":j("composer.send"),disabled:b||T||s||!I.trim()&&!R.length&&!x.passages.length,children:c.jsx(De,{name:"arrow-up"})})]})]})}function ZI({messages:e,members:i,me:r,activeQuestion:l,onSettled:s,onPreview:u,onQuote:d,onReact:f,onJump:m,onError:v,bot:y}){return c.jsx(c.Fragment,{children:e.map((g,x)=>{const b=e[x+1],w=g.role==="assistant"&&!!(b!=null&&b.question)&&b.senderId===g.senderId;return c.jsxs("div",{className:`ui-message-row ${g.role==="user"?"ui-user":""}`,"data-message":g.id,"data-asks":w||void 0,tabIndex:-1,children:[g.role==="assistant"&&c.jsx("span",{className:"jarvy-bubble-avatar",children:c.jsx(zc,{color:(y==null?void 0:y.color)??"gray",mood:y==null?void 0:y.mood,size:22,crown:y==null?void 0:y.agent})}),c.jsxs("div",{className:"jv-dm-stack",children:[g.replyTo&&c.jsx(mC,{message:g,members:i,onJump:m}),g.question?c.jsx(oC,{message:{...g,question:g.question},keyboard:g.id===l,onSettled:s}):c.jsxs("div",{className:"ui-bubble",children:[g.content&&c.jsx(uC,{message:g,members:i,me:r,onJump:m}),g.attachments.length>0&&c.jsx(lC,{files:g.attachments,onOpen:k=>u(g.attachments,k)})]}),c.jsx(pC,{message:g,me:r,members:i,onReact:f,onError:v})]}),c.jsx("div",{className:"jv-row-actions",children:c.jsx(gC,{message:g,me:r,onReply:d,onReact:f,onError:v})})]},g.id)})})}function JI(e,i,r,l,s,u=0){const v=i.offsetWidth,y=i.offsetLeft,g=i.offsetTop,x=Math.max(300,Math.round(r*.4));e.style.maxHeight="";const b=e.hasAttribute("data-fit"),w=e.offsetHeight,k=O=>O==="left"||O==="right",C=O=>O==="left"?y-10-8:O==="right"?r-y-v-10-8:O==="below"?l-g-v-10-8:g-10-8,E=y+v/2>r/2,M=O=>b?k(O)?Math.min(x,Math.max(160,C(O))):Math.min(x,E?y+v-8:r-y-8):e.offsetWidth,T=O=>k(O)?M(O)<=C(O):Math.min(120,w)<=C(O),A=u>.05?"right":u<-.05?"left":null,R=(A==="left"||A===null&&C("left")>=C("right")?["left","right"]:["right","left"]).find(T)??(C("below")>=C("above")?"below":"above"),B=e.dataset.side,$=B!==void 0&&B!==R&&k(B)===k(R)&&T(B)&&C(B)+40>=C(R)?B:R,z=b&&($==="left"||!k($)&&E),Y=$==="left"?y-10:$==="right"?y+v+10:E?y+v:y;e.style.width="",e.style.maxWidth=b?`${M($)}px`:"",z?(e.style.left="",e.style.right=`${r-Y}px`):(e.style.right="",b&&(e.style.left=`${Y}px`));const q=e.offsetWidth,ee=b?z?Y-q:Y:$==="left"?y-10-q:$==="right"?y+v+10:Math.min(Math.max(8,y+v-q),Math.max(8,r-q-8)),G=s&&ee<s.right&&ee+q>s.left?s.bottom+6:0,H=Math.min(Math.max(8,G),Math.max(8,l-140));let Q;$==="below"?(Q=Math.max(8,Math.min(g+v+10,l-8-Math.min(w,120))),e.style.maxHeight=`${Math.max(40,l-Q-8)}px`):$==="above"?(e.style.maxHeight=`${Math.max(40,g-10-H)}px`,Q=Math.max(H,g-10-e.offsetHeight)):(e.style.maxHeight=`${Math.max(120,l-H-8)}px`,Q=Math.min(Math.max(H,g+6),Math.max(H,l-e.offsetHeight-8))),b||(e.style.left=`${ee}px`),e.style.top=`${Q}px`,e.dataset.side=$,e.style.setProperty("--npc-tail",k($)?`${Math.min(e.offsetHeight-18,Math.max(18,g+v/2-Q))}px`:`${Math.min(q-18,Math.max(18,y+v/2-ee))}px`)}const a2=.06,WI=matchMedia("(prefers-reduced-motion: reduce)");function md({text:e,limit:i,streaming:r=!1}){const[,l]=S.useState(0),s=S.useRef({text:"",count:0,rate:a2,at:performance.now()}),u=performance.now(),d=s.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(a2,(e.length-d.count)/i));const f=!WI.matches&&d.count<e.length;S.useEffect(()=>{if(!f)return;const v=requestAnimationFrame(()=>l(y=>y+1));return()=>cancelAnimationFrame(v)});const m=f?e.slice(0,Math.floor(d.count)).replace(/[\uD800-\uDBFF]$/,""):e;return c.jsxs(c.Fragment,{children:[m,(f||r)&&c.jsx("i",{className:"jv-npc-caret"})]})}function e9({className:e,children:i,onReading:r}){const l=S.useRef(null),s=S.useRef(null),u=S.useRef(r),[d,f]=S.useState(!1);return u.current=r,S.useEffect(()=>{const m=l.current,v=s.current;if(!m||!v)return;let y=!0;const g=()=>{y&&(m.scrollTop=m.scrollHeight),f(m.scrollTop>1)},x=()=>{const w=m.scrollHeight-m.scrollTop-m.clientHeight<4;w!==y&&(y=w,u.current(!w)),f(m.scrollTop>1)},b=new ResizeObserver(g);return b.observe(v),b.observe(m),g(),m.addEventListener("scroll",x,{passive:!0}),()=>{b.disconnect(),m.removeEventListener("scroll",x),u.current(!1)}},[]),c.jsx("span",{ref:l,className:`${e} jv-npc-tail`,"data-above":d||void 0,children:c.jsx("span",{ref:s,children:i})})}const TC={think:mA,mutter:ZA,read:CA,write:UA,run:JA,script:gA,compact:cA,retry:hg,ask:_A,say:zA,chat:Aj,tool:n4},ag=e=>j("npc.duration",{value:Lr(Math.max(0,e)/1e3,{maximumFractionDigits:1,minimumFractionDigits:1})}),t9={completed:"npc.done",interrupted:"npc.done.interrupted",failed:"npc.done.failed"};function n9({view:e,name:i,cat:r,area:l,avoid:s,layout:u,facing:d,toolbar:f}){var Y,q,ee;const m=S.useRef(null),v=S.useRef(null),[y,g]=S.useState(!1),[,x]=S.useState(0);S.useLayoutEffect(()=>{u.current=()=>{var F;if(!m.current||!r.current||!l.current)return;const H=l.current.getBoundingClientRect(),Q=s.current?s.current.getBoundingClientRect().top-H.top:H.height,O=(F=v.current)==null?void 0:F.getBoundingClientRect();y?m.current.removeAttribute("data-fit"):m.current.setAttribute("data-fit",""),JI(m.current,r.current,H.width,Q,O?{left:O.left-H.left,right:O.right-H.left,bottom:O.bottom-H.top}:null,d())},u.current();const G=new ResizeObserver(()=>{var H;return(H=u.current)==null?void 0:H.call(u)});for(const H of[m.current,v.current])H&&G.observe(H);return()=>{G.disconnect(),u.current=null}},[y]);const b=e.steps.some(G=>G.state==="running");S.useEffect(()=>{if(!y||!b)return;const G=setInterval(()=>x(H=>H+1),200);return()=>clearInterval(G)},[y,b]),S.useEffect(()=>{if(!y)return;const G=H=>{H.key==="Escape"&&g(!1)};return addEventListener("keydown",G),()=>removeEventListener("keydown",G)},[y]);const w=(Y=e.steps[0])==null?void 0:Y.id;S.useEffect(()=>{g(!1)},[w]);const[k,C]=S.useState(!1),[E,M]=S.useState(!1),[T,A]=S.useState(null),I=k||E;S.useEffect(()=>{var G;A(I?((G=e.shown)==null?void 0:G.id)??null:null)},[I]);const R=T&&e.steps.find(G=>G.id===T)||e.shown,B=R?R.look:e.done?"action":null;let U=null;if((R==null?void 0:R.look)==="thought"||(R==null?void 0:R.look)==="mutter"){const G=(R.line??"").replace(/\n\s*\n\s*/g,`
|
|
518
|
+
|
|
519
|
+
`).trim(),H=c.jsx(md,{text:G,limit:300,streaming:R.look==="thought"&&R.state==="running"},R.id),[Q,O]=j("npc.mutter",{text:""}).split("");U=c.jsx(e9,{className:R.look==="thought"?"jv-npc-thought":"jv-npc-murmur",onReading:M,children:R.look==="thought"?H:c.jsxs(c.Fragment,{children:[Q,H,O]})},R.id)}else if((R==null?void 0:R.look)==="speech")U=c.jsx("span",{className:"jv-npc-speech",children:c.jsx(md,{text:R.line??"",limit:1500,streaming:R.state==="running"&&R.icon==="say"},R.id)});else if(R){const G=TC[R.icon];U=c.jsxs("span",{className:"jv-npc-action","data-state":R.state,children:[c.jsx(G,{}),c.jsx(md,{text:R.title,limit:300},R.id),R.state==="running"&&c.jsx("i",{className:"jv-npc-dots"})]})}else e.done&&(U=c.jsxs("span",{className:"jv-npc-action","data-state":e.done.outcome==="completed"?"ok":"failed",children:[e.done.outcome==="completed"?c.jsx(Ir,{}):c.jsx(Cc,{}),c.jsx(md,{text:j(t9[e.done.outcome],{duration:ag(e.done.ms)}),limit:300},`done:${e.done.ms}`)]}));const $=e.steps.length>0,z=(R==null?void 0:R.icon)==="ask"&&R.state==="running";return S.useEffect(()=>{U||C(!1)},[!U]),c.jsxs(c.Fragment,{children:[f==null?void 0:f(v,()=>g(!1)),c.jsx("div",{ref:m,className:"jv-npc","data-open":y||void 0,"data-look":y?void 0:B??void 0,"data-kind":R==null?void 0:R.icon,"data-fading":!y&&!R&&((q=e.done)==null?void 0:q.fading)||void 0,hidden:!y&&!U,onPointerEnter:G=>{G.pointerType==="mouse"&&C(!0)},onPointerLeave:()=>C(!1),children:y?c.jsxs("section",{className:"jv-npc-panel","aria-label":j("npc.panel"),children:[c.jsxs("header",{children:[c.jsx("strong",{children:j("npc.panel")}),e.startedAt>0&&c.jsx("span",{children:ag((e.endedAt??Date.now()+e.skew)-e.startedAt)}),c.jsx("button",{type:"button",onClick:()=>g(!1),"aria-label":j("npc.collapse"),title:j("npc.collapse"),children:c.jsx(IA,{})})]}),c.jsx("ol",{children:e.steps.map(G=>c.jsx(i9,{step:G,skew:e.skew},G.id))})]}):c.jsxs(c.Fragment,{children:[B==="speech"&&c.jsxs("span",{className:"jv-npc-name",children:[i,(R==null?void 0:R.to)&&c.jsx("em",{children:j("npc.to",{chat:R.to})})]}),$?c.jsx("div",{role:"button",tabIndex:0,className:"jv-npc-line",onClick:()=>g(!0),title:j("npc.expand"),onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),g(!0))},children:U}):c.jsx("div",{className:"jv-npc-line",children:U}),z&&e.answer&&((ee=R.options)==null?void 0:ee.some(G=>G.value))&&c.jsx("div",{className:"jv-npc-options",children:R.options.map(G=>c.jsx("button",{type:"button",onClick:()=>e.answer(G.value),children:G.label},G.label))}),z&&!e.answer&&R.hint&&c.jsx("p",{className:"jv-npc-hint",children:R.hint})]})})]})}function i9({step:e,skew:i}){const[r,l]=S.useState(!1),s=TC[e.icon],u=e.detail;return c.jsxs("li",{"data-state":e.state,style:e.depth?{paddingLeft:`${e.depth*16}px`}:void 0,children:[c.jsxs("button",{type:"button","aria-expanded":u?r:void 0,disabled:!u,onClick:()=>l(d=>!d),children:[c.jsx(s,{className:"jv-npc-kind"}),c.jsx("span",{className:"jv-npc-title",children:e.title}),c.jsxs("span",{className:"jv-npc-state",children:[e.state==="running"?c.jsx(jj,{}):e.state==="ok"?c.jsx(Ir,{}):c.jsx(Cc,{}),j(`npc.state.${e.state}`)]}),c.jsx("span",{className:"jv-npc-time",children:ag((e.endedAt??Date.now()+i)-e.startedAt)}),u&&c.jsx(Ka,{className:"jv-npc-chevron"})]}),r&&u&&c.jsx("pre",{"data-kind":e.icon,children:u})]})}const Nd="src/web/thread/ThreadPane.tsx",Ud="npm run build",r9=["export function ThreadPane({ thread, replies }: Props) {"," const scroll = useRef<HTMLDivElement>(null);"," useLayoutEffect(() => {"," scroll.current!.scrollTop = scroll.current!.scrollHeight;"," }, [thread.id]);"," …"].join(`
|
|
520
|
+
`),a9=["> 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(`
|
|
521
|
+
`),AC={question:"npc.demo.question",options:[{value:"yes",label:"npc.demo.yes"},{value:"no",label:"npc.demo.no"}]},l9=[{kind:"think",text:"npc.demo.think1",ms:4200},{kind:"read",target:Nd,ms:2600,output:r9},{kind:"think",text:"npc.demo.think2",ms:3800},{kind:"write",target:Nd,ms:2600,output:["- useLayoutEffect(() => scrollToEnd(), [thread.id]);","+ useLayoutEffect(() => {","+ requestAnimationFrame(() => scrollToEnd(scroll.current));","+ }, [thread.id, replies.length]);"].join(`
|
|
522
|
+
`)},{kind:"mutter",text:"npc.demo.mutter1"},{kind:"run",target:Ud,ms:3200,failed:!0,output:a9},{kind:"mutter",text:"npc.demo.mutter2"},{kind:"compact",ms:3400,output:"context: 412,380 → 38,210 tokens"},{kind:"write",target:Nd,ms:2e3,output:"+ const el = scroll.current; if (el) scrollToEnd(el);"},{kind:"run",target:Ud,ms:3e3,output:["> vite build","✓ 2331 modules transformed.","✓ built in 4.9s"].join(`
|
|
523
|
+
`)},{kind:"say",text:"npc.demo.post",to:"npc.demo.channel"},{kind:"ask",...AC},{kind:"say",replies:{yes:"npc.demo.replyYes",no:"npc.demo.replyNo"}}],lg=[{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",...AC}},{key:"read",label:"npc.pose.read",motion:"read",step:{kind:"read",target:Nd}},{key:"work",label:"npc.pose.work",motion:"work",fast:!0,step:{kind:"run",target:Ud}},{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:Ud,failed:!0}},{key:"done",label:"npc.pose.done",motion:"stretch",mood:"happy",done:!0},{key:"groom",label:"npc.pose.groom",motion:"groom"}];function o9({controls:e,onReplay:i,toolbar:r}){const[l,s]=S.useState(!1);return c.jsxs("div",{ref:r,className:"jv-npc-toolbar",role:"toolbar","aria-label":j("npc.toolbar"),children:[c.jsxs("div",{className:"jv-npc-toolbar-row",children:[c.jsx("span",{children:j("npc.toolbar")}),c.jsx("button",{type:"button",className:"jv-npc-icon",onClick:i,"aria-label":j("npc.replay"),title:j("npc.replay"),children:c.jsx(YA,{})}),c.jsxs(Jl,{value:e.baseMood,onValueChange:u=>e.setBaseMood(u),children:[c.jsx(eo,{className:"jv-npc-mood","aria-label":j("npc.mood"),title:j("npc.mood"),children:c.jsx(Wl,{})}),c.jsx(to,{className:"jv-select-menu",position:"popper",sideOffset:4,children:nI.map(u=>c.jsx(Fi,{value:u,children:j(`npc.mood.${u}`)},u))})]}),c.jsxs("button",{type:"button",className:"jv-npc-toggle","aria-expanded":l,onClick:()=>s(u=>!u),children:[c.jsx(XA,{}),j("npc.poses")]})]}),l&&c.jsx("div",{className:"jv-npc-poses",role:"group","aria-label":j("npc.poses"),children:lg.map(u=>{var d;return c.jsx("button",{type:"button","aria-pressed":((d=e.pose)==null?void 0:d.key)===u.key,onClick:()=>e.hold(u.key),children:j(u.label)},u.key)})})]})}const s9={think:"think",mutter:"mutter",read:"read",write:"write",run:"run",compact:"compact",ask:"ask",say:"say"},l2=e=>e.text?[...j(e.text)].slice(0,e.typed).join(""):"";function c9(e){var l;if(e.kind==="think"||e.kind==="mutter")return j(`npc.step.${e.kind}`);if(e.kind==="ask"&&e.answer)return j("npc.step.ask.ok",{answer:j(e.answer.label)});const i=e.state==="failed"&&e.kind==="run"?"failed":e.state==="running"?"running":"ok",r=e.kind==="say"&&e.to?"post":e.kind;return j(`npc.step.${r}.${i}`,{target:((l=e.target)==null?void 0:l.split("/").pop())??"",chat:e.to?`#${j(e.to)}`:""})}function o2(e){var l;const i=e.kind==="think"?"thought":e.kind==="mutter"?"mutter":e.kind==="say"||e.kind==="ask"?"speech":"action",r=e.kind==="ask"?j(e.question):l2(e);return{id:String(e.id),look:i,icon:s9[e.kind],state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:0,title:c9(e),line:i==="action"?void 0:r,to:e.to?`#${j(e.to)}`:void 0,options:e.kind==="ask"&&e.state==="running"?(l=e.options)==null?void 0:l.map(s=>({label:j(s.label),value:s.value})):void 0,detail:e.kind==="ask"?j(e.question):e.text?l2(e):e.output}}const fp={steps:[],phase:"before",startedAt:0,endedAt:null,flash:null,shake:0,recapUntil:0},u9=40,s2=6e3,c2=500,d9={think:"think",mutter:"work",read:"read",write:"work",run:"work",compact:"yawn",ask:"ask",say:"turn"};class hp extends Error{}const f9=e=>({...e,id:-1,state:e.failed?"failed":"running",startedAt:Date.now(),endedAt:null,typed:e.text?[...j(e.text)].length:0});function h9(e,i){const[r,l]=S.useState(fp),[s,u]=S.useState(i),[d,f]=S.useState(0),[m,v]=S.useState(null),[,y]=S.useState(0),g=S.useRef(null);S.useEffect(()=>{if(!e||m)return;let A=!0;const I=new Set,R=z=>new Promise((Y,q)=>{const ee=setTimeout(()=>{I.delete(ee),A?Y():q(new hp)},z);I.add(ee)}),B=(z,Y)=>l(q=>({...q,steps:q.steps.map(ee=>ee.id===z?{...ee,...Y}:ee)})),U=(z,Y)=>l(q=>({...q,flash:{mood:z,until:Date.now()+Y}})),$=async(z,Y,q)=>{const ee=[...j(Y)].length,G=q?Math.max(16,q/ee):u9;for(let H=1;H<=ee;H++)B(z,{typed:H}),await R(G)};return(async()=>{l({...fp}),await R(700);const z=Date.now();let Y="";l(ee=>({...ee,phase:"turn",startedAt:z}));for(const[ee,G]of l9.entries()){const{ms:H,failed:Q,replies:O,...F}=G,ne=O?O[Y]:G.text;if(l(D=>({...D,steps:[...D.steps,{...F,text:ne,id:ee,state:"running",startedAt:Date.now(),endedAt:null,typed:0}]})),G.kind==="ask"){if(Y=await new Promise(D=>{g.current=D}),g.current=null,!A)throw new hp;B(ee,{state:"ok",endedAt:Date.now(),answer:G.options.find(D=>D.value===Y)});continue}ne?await $(ee,ne,G.kind==="think"?H??null:null):await R(H??1e3),(G.kind==="mutter"||G.kind==="say")&&await R(1100),B(ee,{state:Q?"failed":"ok",endedAt:Date.now()}),Q&&(l(D=>({...D,shake:D.shake+1})),U("dizzy",2600),await R(900))}const q=Date.now();for(l(ee=>({...ee,phase:"stretch",endedAt:q,recapUntil:q+s2})),q-z>2e4&&U("happy",3200),await R(2200);;)l(ee=>({...ee,phase:"idle"})),await R(9e3),l(ee=>({...ee,phase:"groom"})),await R(2800)})().catch(z=>{if(!(z instanceof hp))throw z}),()=>{var z;A=!1;for(const Y of I)clearTimeout(Y);(z=g.current)==null||z.call(g,"")}},[e,d,m]),S.useEffect(()=>{var B;const A=Date.now(),I=[((B=r.flash)==null?void 0:B.until)??0,r.recapUntil-c2,r.recapUntil].filter(U=>U>A);if(!I.length)return;const R=setTimeout(()=>y(U=>U+1),Math.min(...I)-A+20);return()=>clearTimeout(R)});const x=lg.find(A=>A.key===m)??null,b=Date.now(),w=x?null:r.phase==="turn"?[...r.steps].reverse().find(A=>A.state==="running")??null:null,k=x?x.motion:w?d9[w.kind]:r.phase==="stretch"?"stretch":r.phase==="groom"?"groom":r.phase==="turn"?"think":"idle",C=r.flash&&r.flash.until>b?r.flash.mood:null,E=r.endedAt!==null&&b<r.recapUntil,M=x?x.step?f9(x.step):null:w??(r.phase==="turn"?r.steps.at(-1)??null:null);return{...{view:{steps:r.steps.map(o2),shown:M?o2(M):null,startedAt:r.startedAt,endedAt:r.endedAt,skew:0,answer:A=>{var I;return(I=g.current)==null?void 0:I.call(g,A)},done:x!=null&&x.done?{ms:31400,outcome:"completed",fading:!1}:!x&&E?{ms:r.endedAt-r.startedAt,outcome:"completed",fading:b>=r.recapUntil-c2}:null},motion:k,fast:x?!!x.fast:(w==null?void 0:w.kind)==="write"||(w==null?void 0:w.kind)==="run",mood:(x==null?void 0:x.mood)??C??s,shake:r.shake,canRecap:!x&&r.endedAt!==null&&!E,showRecap:()=>l(A=>({...A,recapUntil:Date.now()+s2}))},controls:{pose:x,baseMood:s,setBaseMood:u,replay:()=>{v(null),f(A=>A+1)},hold:A=>{v(A),l(I=>{var R;return{...fp,shake:I.shake+((R=lg.find(B=>B.key===A))!=null&&R.shake?1:0)}})}}}}const m9=4e3,u2={turn:null,last:null,skew:0};function p9(e,i){const r=[...e.steps];let l=e.dropped;for(const s of i)if(s.op==="step"){const u=r.findIndex(d=>d.id===s.step.id);u>=0?r[u]=s.step:r.push(s.step)}else if(s.op==="text"){const u=r.findIndex(v=>v.id===s.id),d=r[u];if(!d)continue;const f=(d.text??"")+s.append,m=Math.max(0,f.length-m9);r[u]={...d,text:f.slice(m),omitted:(d.omitted??0)+m}}else{const u=r.findIndex(d=>d.id===s.id);u>=0&&(r.splice(u,1),l++)}return{...e,steps:r,dropped:l}}function g9(e){const[i,r]=S.useState(u2);return S.useEffect(()=>{if(r(u2),!e)return;const l=new EventSource(`/api/bots/${encodeURIComponent(e)}/live`),s=u=>JSON.parse(u.data);return l.addEventListener("snapshot",u=>{const d=s(u);r(f=>({...f,turn:d.turn,skew:d.now-Date.now()}))}),l.addEventListener("start",u=>{const{turn:d}=s(u);r(f=>({...f,turn:d}))}),l.addEventListener("patch",u=>{const{patches:d}=s(u);r(f=>f.turn?{...f,turn:p9(f.turn,d)}:f)}),l.addEventListener("end",u=>{const{outcome:d,endedAt:f}=s(u);r(m=>m.turn?{...m,turn:null,last:{...m.turn,outcome:d,endedAt:f}}:m)}),()=>l.close()},[e]),i}const mp=new Set(["messages.read","messages.search","chats.list","chats.info","threads.list","members.list","bots.list","sections.list","history.read","list","describe"]),Rr=e=>e.state==="running"?"running":e.state==="failed"?"failed":"ok",pp=e=>(e==null?void 0:e.split("/").filter(Boolean).pop())??"",v9=e=>{const i=(e??"").split(`
|
|
524
|
+
`)[0].trim();return i.length>40?`${i.slice(0,39)}…`:i},d2=e=>e.type==="channel"?`#${e.title}`:e.title;function gp(e){return e?e.omitted?`${e.head}
|
|
525
|
+
${j("npc.live.omitted",{count:Lr(e.omitted)})}
|
|
526
|
+
${e.tail}`:e.head+e.tail:""}const f2=e=>e.omitted?`${j("npc.live.omitted",{count:Lr(e.omitted)})}
|
|
527
|
+
`:"";function vp(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 y9(e,i,r){const l={id:e.id,state:e.state,startedAt:e.startedAt,endedAt:e.endedAt,depth:i},s=(m,v,y)=>({...l,look:"action",icon:m,title:v,detail:y});switch(e.kind){case"thinking":return{...l,look:"thought",icon:"think",title:j("npc.step.think"),line:e.text??"",detail:f2(e)+(e.text??"")};case"text":return{...l,look:"mutter",icon:"mutter",title:j("npc.step.mutter"),line:e.text??"",detail:f2(e)+(e.text??"")};case"compaction":return s("compact",j(`npc.live.compact.${Rr(e)}`),e.tokensBefore!=null&&e.tokensAfter!=null?j("npc.live.tokens",{before:Lr(e.tokensBefore),after:Lr(e.tokensAfter)}):gp(e.output));case"retry":return s("retry",e.state==="running"?j("npc.live.retry.running",{attempt:e.attempt??1,max:e.maxAttempts??1}):j(`npc.live.retry.${Rr(e)}`),gp(e.output))}const u=e.input??{},d=gp(e.output),f=[u.path??u.command??u.args,d].filter(Boolean).join(`
|
|
528
|
+
|
|
529
|
+
`);switch(e.tool){case"read":return s("read",j(`npc.live.read.${Rr(e)}`,{target:pp(u.path)}),f);case"edit":return s("write",j(`npc.live.edit.${Rr(e)}`,{target:pp(u.path)}),f);case"write":return s("write",j(`npc.live.write.${Rr(e)}`,{target:pp(u.path)}),f);case"bash":return s("run",j(`npc.live.run.${Rr(e)}`,{target:v9(u.command)}),f);case"codemode":return s("script",j(`npc.live.script.${Rr(e)}`),f);case"chat":return x9(e,l,r,d);default:return s("tool",j(`npc.live.tool.${Rr(e)}`,{tool:e.tool??""}),f)}}function x9(e,i,r,l){const s=e.input??{},u=s.action??"",d=s.chat,f=d&&(d.id===null?d.type!=="dm":d.id!==r)?d2(d):void 0;if(u==="messages.send")return{...i,look:"speech",icon:"say",to:f,line:s.text??"",detail:[s.text,e.state==="failed"?l:""].filter(Boolean).join(`
|
|
530
|
+
|
|
531
|
+
`),title:e.state==="failed"?j("npc.live.sendFailed"):f?j(`npc.step.post.${e.state==="running"?"running":"ok"}`,{chat:f}):j(`npc.step.say.${e.state==="running"?"running":"ok"}`)};if(u==="messages.ask"){const y=b9(e);return{...i,look:"speech",icon:"ask",to:f,line:s.text??"",options:(s.options??[]).map(g=>({label:g})),hint:f?j("npc.live.answerIn",{chat:f}):j("npc.live.answerBelow"),detail:[s.text,...(s.options??[]).map(g=>`· ${g}`),l].filter(Boolean).join(`
|
|
532
|
+
`),title:e.state==="running"?j("npc.step.ask.running"):y?j("npc.step.ask.ok",{answer:y}):j(e.state==="failed"?"npc.live.askFailed":"npc.live.askClosed")}}if(u==="environments.switch")return{...i,look:"action",icon:"tool",title:j(`npc.live.switch.${Rr(e)}`),detail:l};const m=d?d2(d):"",v=mp.has(u)?m?j(`npc.live.browse.${e.state==="running"?"running":"ok"}`,{chat:m}):j(`npc.live.browseAll.${e.state==="running"?"running":"ok"}`):j(`npc.live.tool.${Rr(e)}`,{tool:u||"chat"});return{...i,look:"action",icon:mp.has(u)?"chat":"tool",title:e.state==="failed"&&mp.has(u)?j("npc.live.tool.failed",{tool:u}):v,detail:l}}function b9(e){try{const i=JSON.parse(e.output?e.output.head+e.output.tail:"");return i.status!=="answered"?null:[...(i.selected??[]).map(r=>r.label??""),i.custom??""].filter(Boolean).join(j("common.listSeparator"))}catch{return null}}function h2(e,i){const r=new Map(e.steps.map(s=>[s.id,s.parentId])),l=s=>{let u=0,d=s.parentId;for(;d&&u<4;)u++,d=r.get(d)??null;return u};return e.steps.map(s=>y9(s,l(s),i))}function pd(e){var r;const i=((r=e.line)==null?void 0:r.length)??0;if(e.look==="speech"){const l=Math.min(7e3,Math.max(2500,1500+50*i))+Math.min(1500,i/.06);return{firm:l,light:l}}return e.look==="mutter"?{firm:1500,light:Math.min(3500,Math.max(1500,800+30*i))}:e.state==="failed"?{firm:2e3,light:2e3}:{firm:0,light:e.look==="action"?900:0}}const j9=4e3,m2=1500;function p2(e,i,r,l){var b;const s=w=>w-r;let u=null;for(const w of e)w.state==="running"&&(!u||w.startedAt>=u.startedAt)&&(u=w);const d=[];for(const w of e.filter(k=>k.state!=="running"&&k.endedAt!==null&&pd(k).firm).sort((k,C)=>k.endedAt-C.endedAt)){const k=s(w.endedAt),C=d.at(-1);C&&w.look==="speech"&&(C.end=Math.min(C.end,Math.max(C.start+m2,k)));const E=Math.max(k,(C==null?void 0:C.end)??0);E-k>j9||d.push({step:w,start:E,end:E+pd(w).firm})}const f=(u==null?void 0:u.look)==="speech"?u:null;if(f){const w=s(f.startedAt);for(let k=d.length-1;k>=0;k--){const C=d[k];C.start>=w&&C.start>i?d.splice(k,1):C.end>w&&(C.end=Math.max(C.start+m2,w))}}let m=null;for(const w of e){if(w.state==="running"||w.endedAt===null||!pd(w).light)continue;const k=s(w.endedAt)+pd(w).light;k>i&&(!m||w.endedAt>=m.step.endedAt)&&(m={step:w,end:k})}const v=d.find(w=>w.start<=i&&i<w.end),y=(v==null?void 0:v.step)??(f||u&&u.look!=="thought"||m==null?void 0:m.step),g=y??f??u??(l?e.at(-1)??null:null),x=[...d.flatMap(w=>[w.start,w.end]),(m==null?void 0:m.end)??0].filter(w=>w>i);return{shown:g,lingering:!!y,next:x.length?Math.min(...x):0,wordsEnd:((b=d.at(-1))==null?void 0:b.end)??0}}const g2=6e3,v2=500,y2=2200,w9=2e4,S9=10*6e4,x2=3e4,k9=2e4,C9=2800;function N9(e,i,r,l,s){var Y;const{turn:u,last:d,skew:f}=g9(e),[m,v]=S.useState(null),[y,g]=S.useState(0),[x,b]=S.useState(0),[,w]=S.useState(0),k=S.useRef(new Set),C=S.useRef(Date.now()),E=S.useMemo(()=>u?h2(u,i):d?h2(d,i):[],[u,d,i]);S.useEffect(()=>{for(const q of(u==null?void 0:u.steps)??[])q.state==="failed"&&!k.current.has(q.id)&&(k.current.add(q.id),g(ee=>ee+1),v({mood:"dizzy",until:Date.now()+2600}))},[u]),S.useEffect(()=>{d&&(k.current.clear(),C.current=Date.now(),b(Math.max(Date.now(),p2(E,Date.now(),f,!1).wordsEnd)+g2),d.outcome==="completed"&&d.endedAt-d.startedAt>w9&&v({mood:"happy",until:Date.now()+3200}))},[d]),S.useEffect(()=>{u&&(C.current=Date.now())},[u!==null]);const M=Date.now(),T=p2(E,M,f,u!==null),A=T.shown,I=E.filter(q=>q.state==="running").sort((q,ee)=>ee.startedAt-q.startedAt)[0],R=!u&&(d==null?void 0:d.outcome)==="completed"&&M+f-d.endedAt<y2,B=M-C.current,U=!u&&(r==null?void 0:r.status)==="idle"&&B>x2&&(B-x2)%k9<C9,$=I&&I.look!=="thought"?vp(I):T.lingering&&A?vp(A):I?vp(I):u?{motion:"think",fast:!1}:R?{motion:"stretch",fast:!1}:U?{motion:"groom",fast:!1}:s,z=!u&&!A&&d!==null&&M<x;return S.useEffect(()=>{const q=[(m==null?void 0:m.until)??0,x-v2,x,((d==null?void 0:d.endedAt)??0)-f+y2,T.next].filter(G=>G>Date.now()),ee=setTimeout(()=>w(G=>G+1),q.length?Math.min(...q)-Date.now()+20:1e3);return()=>clearTimeout(ee)}),{view:{steps:E,shown:A,skew:f,startedAt:((Y=u??d)==null?void 0:Y.startedAt)??0,endedAt:u?null:(d==null?void 0:d.endedAt)??null,done:z?{ms:d.endedAt-d.startedAt,outcome:d.outcome,fading:M>=x-v2}:null},motion:$.motion,fast:$.fast,mood:m&&m.until>M?m.mood:l,shake:y,canRecap:!u&&d!==null&&!z&&M+f-d.endedAt<S9,showRecap:()=>b(Date.now()+g2)}}const MC="jarvy-floating-bot",Ko=10,E9=4,gd=new URLSearchParams(location.search).get("npc")==="demo";function T9(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 A9(){try{const e=JSON.parse(localStorage.getItem(MC)??"");if(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1)return e}catch{}return{x:1,y:0}}function M9({bot:e,chatId:i,status:r,area:l,avoid:s,onOpen:u}){const d=S.useRef(null),f=S.useRef(null),m=S.useRef(A9()),v=S.useRef(null),y=S.useRef(!1),g=S.useRef(null),x=S.useRef({motion:"sleep",mood:"normal",lookX:0,lookY:0}),b=S.useRef(null),[w,k]=S.useState(!1),C=S.useRef(null),E=h9(gd,e.mood),M=N9(gd?null:e.id,i,r,e.mood,T9(r)),T=gd?E:M;x.current.motion=T.motion,x.current.fast=T.fast,x.current.mood=T.mood;function A(){const U=l.current.getBoundingClientRect(),$=d.current.offsetWidth,z=s.current?s.current.getBoundingClientRect().top-U.top:U.height,Y=Math.max(Ko,U.width-$-Ko),q=Math.max(Ko,z-$-Ko);return{minX:Ko,minY:Ko,maxX:Y,maxY:q}}function I(){var Y;const U=(Y=l.current)==null?void 0:Y.getBoundingClientRect(),$=d.current;if(!U||!$)return 0;const z=U.width/2-$.offsetWidth/2;return z>0?Math.max(-1,Math.min(1,(z-$.offsetLeft)/z)):0}function R(){var z;if(!d.current||!l.current)return;const U=A(),$=d.current;$.style.left=`${U.minX+m.current.x*(U.maxX-U.minX)}px`,$.style.top=`${U.minY+m.current.y*(U.maxY-U.minY)}px`,(z=C.current)==null||z.call(C)}S.useLayoutEffect(()=>{R();const U=new ResizeObserver(R);for(const $ of[l.current,s.current,d.current])$&&U.observe($);return()=>U.disconnect()},[]),S.useEffect(()=>{var U;(U=b.current)==null||U.setColor((Vi[e.color]??Vi.gray).hex)},[e.color]),S.useEffect(()=>{var U;(U=b.current)==null||U.setCrown(e.agent)},[e.agent]);const B=r!=null&&r.error?`${r.runId??""}:${r.error}`:null;return S.useEffect(()=>{var U;B&&((U=b.current)==null||U.shake(performance.now()))},[B]),S.useEffect(()=>{var U;T.shake&&((U=b.current)==null||U.shake(performance.now()))},[T.shake]),S.useEffect(()=>{const U=Y=>{(Y.pointerType==="mouse"||Y.type==="pointerdown")&&(g.current={x:Y.clientX,y:Y.clientY})},$=Y=>{Y.relatedTarget||(g.current=null)},z=Y=>{const q=Y.target;if(q.id!=="jarvy-composer")return;const ee=q.getBoundingClientRect();g.current={x:ee.left+ee.width/2,y:ee.top+ee.height/2}};return window.addEventListener("pointermove",U),window.addEventListener("pointerdown",U),document.addEventListener("pointerout",$),document.addEventListener("input",z),document.addEventListener("focusin",z),()=>{window.removeEventListener("pointermove",U),window.removeEventListener("pointerdown",U),document.removeEventListener("pointerout",$),document.removeEventListener("input",z),document.removeEventListener("focusin",z)}},[]),S.useEffect(()=>{let U=!0,$=0,z=()=>{};const Y=matchMedia("(prefers-reduced-motion: reduce)");return Promise.all([Hd(()=>import("./three.module-BdMZo7zQ.js"),[]),Hd(()=>import("./figure-DQGUDG-4.js"),[])]).then(([q,ee])=>{if(!U||!f.current)return;const G=new q.WebGLRenderer({canvas:f.current,antialias:!0,alpha:!0});ee.configureRenderer(q,G);const{scene:H,camera:Q}=ee.createStage(q),O=new ee.CatFigure(q,(Vi[e.color]??Vi.gray).hex);O.setCrown(e.agent),O.pose(x.current.mood),H.add(O.root),ee.frameCamera(Q,1,3.3),b.current=O;let F=0;const ne=J=>{var P;const W=d.current;if(W){const V=Math.round(W.offsetWidth*Math.min(2,devicePixelRatio||1));V!==F&&(F=V,G.setSize(V,V,!1));const fe=W.getBoundingClientRect(),ye=g.current;x.current.lookX=ye?Math.max(-1,Math.min(1,(ye.x-fe.left-fe.width/2)/320)):0,x.current.lookY=ye?Math.max(-1,Math.min(1,(ye.y-fe.top-fe.height/2)/320)):0,x.current.reduced=Y.matches;const je=x.current.motion,ae=!!((P=v.current)!=null&&P.moved)&&(je==="idle"||je==="groom"||je==="stretch");(x.current.faceX===void 0||!(ae||je==="sleep"))&&(x.current.faceX=I()),O.frame(J,x.current),G.render(H,Q)}$=requestAnimationFrame(ne)},D=()=>{cancelAnimationFrame($),document.hidden||($=requestAnimationFrame(ne))};document.addEventListener("visibilitychange",D),D(),k(!0),z=()=>{document.removeEventListener("visibilitychange",D),cancelAnimationFrame($),O.dispose(),G.dispose(),G.forceContextLoss(),b.current=null}}).catch(()=>{}),()=>{U=!1,z()}},[]),c.jsxs(c.Fragment,{children:[c.jsxs("button",{ref:d,type:"button",className:"jv-floating-bot","data-live":w||void 0,"data-motion":T.motion,title:e.name,"aria-label":j("avatar.openInfo",{name:e.name}),onPointerDown:U=>{if(U.button!==0)return;const $=U.currentTarget;$.setPointerCapture(U.pointerId),v.current={id:U.pointerId,x:U.clientX,y:U.clientY,left:$.offsetLeft,top:$.offsetTop,moved:!1}},onPointerMove:U=>{const $=v.current;if(!$||$.id!==U.pointerId)return;const z=U.clientX-$.x,Y=U.clientY-$.y;if(!$.moved&&Math.hypot(z,Y)<E9)return;$.moved=!0;const q=A(),ee=Math.min(q.maxX,Math.max(q.minX,$.left+z)),G=Math.min(q.maxY,Math.max(q.minY,$.top+Y));m.current={x:q.maxX>q.minX?(ee-q.minX)/(q.maxX-q.minX):0,y:q.maxY>q.minY?(G-q.minY)/(q.maxY-q.minY):0},R()},onPointerUp:U=>{const $=v.current;!$||$.id!==U.pointerId||(v.current=null,y.current=$.moved,$.moved&&localStorage.setItem(MC,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:[c.jsx("canvas",{ref:f,"aria-hidden":"true"}),!w&&c.jsx(zc,{color:e.color,mood:e.mood,size:88,crown:e.agent})]}),c.jsx(n9,{view:T.view,name:e.name,cat:d,area:l,avoid:s,layout:C,facing:I,toolbar:gd?(U,$)=>c.jsx(o9,{controls:E.controls,toolbar:U,onReplay:()=>{$(),E.controls.replay()}}):void 0})]})}function R9({className:e,...i}){return c.jsx("div",{"data-slot":"card",className:nn("flex flex-col gap-4 rounded-xl border bg-card py-5 text-card-foreground shadow-sm",e),...i})}function O9({className:e,...i}){return c.jsx("div",{"data-slot":"card-header",className:nn("grid gap-1 px-5",e),...i})}function _9({className:e,...i}){return c.jsx("div",{"data-slot":"card-title",className:nn("font-semibold leading-none",e),...i})}function D9({className:e,...i}){return c.jsx("div",{"data-slot":"card-content",className:nn("px-5",e),...i})}function z9({bot:e,connections:i,onSaved:r,onManage:l}){return c.jsxs(R9,{className:"jarvy-model-picker jv-ui",children:[c.jsx(O9,{children:c.jsx(_9,{children:j("botModel.pickFor",{name:e.name})})}),c.jsxs(D9,{children:[c.jsx(Jk,{bot:e,connections:i,onSaved:r,onManage:l}),c.jsxs("div",{className:"jv-env-setup",children:[c.jsx("h4",{children:j("environment.title")}),c.jsx(cI,{bot:e,onSaved:r})]})]})]})}function L9({chat:e,inChannel:i,bots:r,members:l,meId:s,drafts:u,composeReady:d,botName:f,activeBot:m,status:v,connections:y,activity:g,history:x,divider:b,activeQuestion:w,pane:k,onPane:C,onToggleInfo:E,find:M,onNav:T,onBot:A,hasBotDirects:I,onInvite:R,onQuote:B,onReply:U,onReact:$,onJump:z,onSettled:Y,onSend:q,onPreview:ee,onSaveNote:G,notice:H,createBot:Q,creating:O,updateBot:F,onManageModels:ne,error:D,chatArea:J,transcript:W,composeWrap:P,hidden:V,onOpenThread:fe}){const{messages:ye,loading:je,hasOlder:ae,loadingOlder:xe,top:oe,away:ce,unseen:me,toLatest:Ne}=x;return c.jsxs("main",{className:"ui-chat","aria-label":j("chat.area"),ref:J,hidden:V,children:[!i&&c.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only jv-floating-nav",label:j("common.openNav"),onClick:T}),!i&&I&&c.jsx(ct,{icon:"people",className:"jv-floating-dms",label:j("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"})}),c.jsx("span",{className:"sr-only",role:"status","aria-label":j("chat.botStatus"),children:i?"":g}),e?c.jsxs(c.Fragment,{children:[i?c.jsx(NI,{chat:e,members:ar(l),bots:r,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&&c.jsx(M9,{bot:m,chatId:e.id,status:v,area:J,avoid:P,onOpen:()=>A(m.id)}),i&&c.jsx(EI,{chat:e,onSave:G}),c.jsxs("div",{className:`ui-transcript jarvy-transcript${i?" jv-channel-transcript":""}`,ref:W,"aria-label":j("chat.transcript"),role:"log",children:[!i&&!(m!=null&&m.connectionId)&&m&&c.jsx("div",{className:"jarvy-model-onboarding",children:c.jsx(z9,{bot:m,connections:y,onSaved:F,onManage:ne})}),je?c.jsx("p",{className:"jarvy-empty-text",children:j("chat.loading")}):ye.length===0?i?c.jsx("div",{className:"jarvy-empty-chat",children:c.jsx("p",{children:j("chat.empty")})}):m!=null&&m.connectionId?c.jsx("div",{className:"jarvy-empty-chat",children:c.jsx("h2",{children:j("chat.start",{name:f})})}):null:c.jsxs(c.Fragment,{children:[ae&&c.jsx("div",{ref:oe,className:"jv-history-more","aria-live":"polite",children:xe?j("chat.loadingOlder"):""}),c.jsx("p",{className:"jarvy-date-stamp",children:qr(ye[0].createdAt,{year:"numeric",month:"long",day:"numeric"})}),i?c.jsx(Pd,{messages:ye,members:l,bots:r,me:s,divider:b,activeQuestion:w,onSettled:Y,onPreview:ee,onReply:U,onOpenThread:fe,onQuote:B,onReact:$,onJump:z,onError:D}):c.jsx(ZI,{messages:ye,members:l,me:s,activeQuestion:w,bot:m,onSettled:Y,onPreview:ee,onQuote:B,onReact:$,onJump:z,onError:D})]}),ce&&ye.length>0&&c.jsx("div",{className:"jv-to-latest",children:c.jsxs("button",{type:"button",onClick:Ne,"aria-label":j("chat.toLatest"),children:[me>0&&c.jsx("span",{children:j("chat.unseen",{count:me})}),c.jsx(De,{name:"chevron-down"})]})})]}),c.jsx(EC,{chatId:e.id,id:"jarvy-composer",drafts:u,formRef:P,scrollRef:W,disabled:!d,placeholder:i?j("chat.toChannel",{name:e.title}):m!=null&&m.connectionId?j("chat.toBot",{name:f}):j("chat.pickModel"),mention:i?{bots:r,inside:ar(l).filter(ze=>ze.id!==s&&e.memberIds.includes(ze.id)),outside:ar(l).filter(ze=>!e.memberIds.includes(ze.id)),onInvite:ze=>R(e.id,ze)}:void 0,onSend:q,onError:D,onNotice:H})]}):c.jsx("div",{className:"jarvy-empty-chat jarvy-first-chat",children:r.length?c.jsx("p",{children:j("chat.pick")}):c.jsxs("button",{className:"ui-button ui-primary",onClick:Q,disabled:O,children:[c.jsx(De,{name:"person-add"}),j("sidebar.newBot")]})}),e&&c.jsx(hC,{container:W,drafts:u,chatId:e.id,source:ze=>ye.find(Ve=>Ve.id===ze),members:l,onNotice:H})]})}const I9=e=>qr(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function B9(e,i){const[r,l]=S.useState([]);return S.useEffect(()=>{if(l([]),!e)return;let s=!0;return be.botDirects(e).then(u=>{s&&l(u.chats)}).catch(()=>{}),()=>{s=!1}},[e,i]),r}function H9({bot:e,chats:i,members:r,bots:l,me:s,tick:u,onClose:d,onPreview:f,onError:m}){const[v,y]=S.useState(null),[g,x]=S.useState(null);S.useEffect(()=>{if(x(null),!v)return;let k=!0;return be.messages(v).then(C=>{k&&x(C.messages)}).catch(C=>{k&&m(C)}),()=>{k=!1}},[v,u]);const b=k=>r.find(C=>C.id!==e.id&&k.memberIds.includes(C.id)),w=i.find(k=>k.id===v);return c.jsxs("aside",{className:"ui-pane jv-pane","aria-label":j("chat.botDms",{name:e.name}),children:[c.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[w&&c.jsx(ct,{icon:"chevron-left",label:j("directs.back"),onClick:()=>y(null)}),c.jsx("strong",{children:w?j("directs.between",{name:e.name,other:Ur(b(w))}):j("chat.botDms",{name:e.name})}),c.jsx("span",{className:"jv-spacer"}),c.jsx(ct,{icon:"close",label:j("common.close"),onClick:d})]}),w?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"ui-pane-body jv-pane-body",children:g===null?c.jsx("p",{className:"jv-picker-empty",children:j("threads.loading")}):g.length===0?c.jsx("p",{className:"jv-picker-empty",children:j("chat.empty")}):c.jsx(Pd,{messages:g,members:r,bots:l,me:s,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:f})}),c.jsx("p",{className:"jv-readonly",children:j("directs.readOnly")})]}):c.jsx("div",{className:"ui-pane-body jv-pane-body",children:i.length===0?c.jsx("p",{className:"jv-picker-empty",children:j("sidebar.noDms")}):i.map(k=>{const C=b(k);return c.jsxs("button",{type:"button",className:"jv-thread-item",onClick:()=>y(k.id),children:[c.jsxs("span",{className:"jv-thread-item-head",children:[c.jsx(va,{member:C,bots:l,size:20}),c.jsx("strong",{children:Ur(C)}),c.jsx("span",{className:"jv-muted",children:I9(k.updatedAt)})]}),k.lastMessage&&c.jsx("span",{className:"jv-muted jv-thread-item-meta",children:Lc(k.lastMessage)})]},k.id)})})]})}function P9(e,i){return e!=null&&e.connectionId?i!=null&&i.error?{label:j("activity.error"),tone:"error"}:(i==null?void 0:i.status)==="running"?{label:sC(i.activity),tone:"busy"}:{label:j((i==null?void 0:i.status)==="idle"?"activity.idle":"activity.stopped")}:{label:j("activity.noModel")}}function U9({channel:e,members:i,bots:r,statuses:l,me:s,onAdd:u,onBot:d,onChanged:f,onError:m}){const[v,y]=S.useState(null),g=i.filter(k=>e.memberIds.includes(k.id)),x=g.filter(k=>k.kind!=="bot").sort((k,C)=>+(C.id===s)-+(k.id===s)),b=g.filter(k=>k.kind==="bot"),w=k=>{const C=k.kind==="bot"?r.find(A=>A.id===k.id):void 0,E=l[k.id],M=k.kind==="bot"?P9(C,E):void 0,T=c.jsxs(c.Fragment,{children:[c.jsx(va,{member:k,bots:r,size:28,working:(E==null?void 0:E.status)==="running"&&E.activity!=="asking"}),c.jsxs("span",{className:"jv-member-name",children:[k.name,k.id===s&&c.jsx("span",{className:"jv-role",children:j("common.you")})]}),M&&c.jsx("span",{className:"jv-member-state","data-tone":M.tone,children:M.label})]});return c.jsxs("div",{className:"jv-member-row",children:[C?c.jsx("button",{type:"button",className:"jv-member-main","aria-label":j("members.view",{name:k.name}),onClick:()=>d(k.id),children:T}):c.jsx("div",{className:"jv-member-main",children:T}),k.id!==s&&c.jsx(ct,{icon:"close",label:j("members.remove",{name:k.name}),className:"jv-member-remove",onClick:()=>y(k)})]},k.id)};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"jv-member-bar",children:[c.jsx("span",{children:j("members.count",{count:g.length})}),c.jsxs("button",{type:"button",className:"ui-button ui-primary jv-member-pane-add",onClick:u,children:[c.jsx(De,{name:"person-add"}),j("common.add")]})]}),c.jsx("div",{className:"ui-pane-body jv-pane-body",children:[["people",j("members.people"),x],["bots","Bot",b]].map(([k,C,E])=>E.length>0&&c.jsxs("section",{className:"jv-member-group","aria-label":C,children:[c.jsxs("h3",{children:[C," · ",E.length]}),E.map(w)]},k))}),v&&c.jsx(xC,{title:j("members.removeTitle",{name:v.name,channel:e.title}),body:j("members.removeBody"),confirm:j("members.removeConfirm"),onClose:()=>y(null),onConfirm:async()=>{try{f(await be.removeMember(e.id,v.id)),y(null)}catch(k){m(k)}}})]})}function b2({label:e,value:i,empty:r,maxLength:l,required:s=!1,onSave:u}){const d=S.useId(),[f,m]=S.useState(null),[v,y]=S.useState(!1);S.useEffect(()=>m(null),[i]);const g=async()=>{if(!(f===null||v||s&&!f.trim())){if(f.trim()===i){m(null);return}y(!0);try{await u(f.trim()),m(null)}catch{}finally{y(!1)}}};return c.jsxs("div",{className:"jv-info-field",children:[c.jsxs("div",{className:"jv-info-label",children:[c.jsx("label",{htmlFor:d,children:e}),f===null&&c.jsx(ct,{icon:"pencil",label:j("info.edit",{name:e}),className:"jv-info-edit",onClick:()=>m(i)})]}),f===null?c.jsx("p",{className:"jv-info-value","data-empty":!i||void 0,children:i||r}):c.jsxs("div",{className:"jv-inline-edit",children:[c.jsx("input",{id:d,value:f,maxLength:l,autoFocus:!0,placeholder:r,onChange:x=>m(x.target.value),onKeyDown:x=>{x.key==="Enter"&&(x.preventDefault(),g()),x.key==="Escape"&&(x.stopPropagation(),m(null))}}),c.jsx("button",{type:"button",className:"ui-button",onClick:()=>m(null),children:j("common.cancel")}),c.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:v||s&&!f.trim(),onClick:()=>void g(),children:j("common.save")})]})]})}function q9({channel:e,page:i,sections:r,members:l,bots:s,statuses:u,me:d,onPage:f,onPin:m,onMute:v,onAdd:y,onBot:g,onDelete:x,onChanged:b,onClose:w,onError:k}){const C=S.useId(),E=async T=>{try{b(await be.updateChannel(e.id,T))}catch(A){throw k(A),A}},M=l.filter(T=>e.memberIds.includes(T.id)).length;return c.jsxs("aside",{className:"ui-pane jv-pane","aria-label":j(i==="members"?"info.memberList":"entry.channelInfo"),children:[c.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[i==="members"&&c.jsx(ct,{icon:"chevron-left",label:j("info.back"),className:"jv-pane-back",onClick:()=>f("main")}),c.jsx("strong",{children:j(i==="members"?"channel.members":"entry.channelInfo")}),c.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),c.jsx("span",{className:"jv-spacer"}),c.jsx(ct,{icon:"close",label:j("common.close"),onClick:w})]}),i==="members"?c.jsx(U9,{channel:e,members:l,bots:s,statuses:u,me:d,onAdd:y,onBot:g,onChanged:b,onError:k}):c.jsxs("div",{className:"ui-pane-body jv-pane-body jv-info",children:[c.jsxs("div",{className:"jv-info-actions",children:[c.jsxs("button",{type:"button","aria-pressed":e.pinned,onClick:m,children:[c.jsx(De,{name:"pin"}),j("entry.pin")]}),c.jsxs("button",{type:"button","aria-pressed":e.muted,onClick:v,children:[c.jsx(De,{name:e.muted?"bell-slash":"bell"}),j("entry.mute")]}),c.jsxs("button",{type:"button",onClick:y,children:[c.jsx(De,{name:"person-add"}),j("info.addMembers")]})]}),c.jsx(b2,{label:j("info.name"),value:e.title,empty:j("info.newChannel"),maxLength:80,required:!0,onSave:T=>E({name:T})}),c.jsx(b2,{label:j("info.topic"),value:e.topic,empty:j("info.noTopic"),maxLength:200,onSave:T=>E({topic:T})}),c.jsxs("div",{className:"jv-info-field",children:[c.jsx("div",{className:"jv-info-label",children:c.jsx("label",{htmlFor:C,children:j("info.section")})}),c.jsx(Wk,{id:C,value:e.sectionId,sections:r,onChange:T=>void E({sectionId:T}).catch(()=>{})})]}),c.jsxs("nav",{className:"jv-info-menu","aria-label":j("info.menu"),children:[c.jsxs("button",{type:"button",className:"ui-menu-item",onClick:()=>f("members"),children:[c.jsx(De,{name:"people"}),c.jsx("span",{className:"ui-menu-copy",children:j("channel.members")}),c.jsx("span",{className:"jv-muted",children:M}),c.jsx(De,{name:"chevron-right"})]}),c.jsxs("button",{type:"button",className:"ui-menu-item jv-menu-danger",onClick:x,children:[c.jsx(De,{name:"trash"}),c.jsx("span",{className:"ui-menu-copy",children:j("entry.deleteChannel")})]})]})]})]})}function F9({chat:e,chats:i,members:r,focusKey:l,onOpenMessage:s,onClose:u,onError:d}){const[f,m]=S.useState(""),v=S.useRef(null);S.useEffect(()=>{var b,w;(b=v.current)==null||b.focus(),(w=v.current)==null||w.select()},[l,e.id]);const{result:y,loading:g}=bC(f,e.id,d),x=e.type==="channel"?`#${e.title}`:j(e.type==="thread"?"search.inThread":"search.inDm");return c.jsxs("aside",{className:"ui-pane jv-pane jv-search-pane","aria-label":j("search.paneLabel"),children:[c.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[c.jsx("strong",{children:j("search.title")}),c.jsx("span",{className:"jv-muted jv-pane-sub",children:x}),c.jsx("span",{className:"jv-spacer"}),c.jsx(ct,{icon:"close",label:j("search.close"),onClick:u})]}),c.jsx("div",{className:"jv-pane-search",children:c.jsx("input",{ref:v,type:"search",value:f,placeholder:j(e.type==="channel"?"search.channelPlaceholder":"search.placeholder"),"aria-label":j("search.placeholder"),onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Escape"&&(b.preventDefault(),f?m(""):u())}})}),c.jsx("div",{className:"ui-pane-body jv-pane-body jv-results","aria-live":"polite",children:f.trim()?y?y.messages.length?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"jv-result-count",children:j(y.messages.length>=60?"search.countLatest":"search.count",{count:y.messages.length})}),y.messages.map(({message:b,chat:w})=>c.jsx(SC,{message:b,chat:w,chats:i,members:r,query:f,showPlace:w.id!==e.id,onOpen:s},b.id))]}):c.jsx("p",{className:"jv-result-empty",children:j("search.noMessages")}):g&&c.jsx("p",{className:"jv-result-empty",children:j("search.searching")}):c.jsx("p",{className:"jv-result-empty",children:j("search.prompt")})})]})}const V9=e=>qr(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function $9({chat:e,channelName:i,expanded:r=!1,onTitle:l,onStatus:s,onSummary:u,onConclude:d}){var T;const[f,m]=S.useState(null),[v,y]=S.useState(null),[g,x]=S.useState(!1),[b,w]=S.useState(r);S.useEffect(()=>{m(null),y(null),w(r)},[e.id,r]);const k=async(A,I)=>{x(!0);try{await A(),I()}catch{}finally{x(!1)}},C=e.status==="done",E=e.note,M=((T=E==null?void 0:E.text.split(`
|
|
533
|
+
`).find(A=>A.trim()&&!A.startsWith("#")))==null?void 0:T.replace(/[*`|>-]/g,"").trim())??"";return c.jsxs("div",{className:"jv-thread-meta","data-open":b||void 0,children:[c.jsxs("div",{className:"jv-thread-title-row",children:[f===null?c.jsxs(c.Fragment,{children:[c.jsx("h2",{className:"jv-thread-title",title:e.title,children:e.title}),c.jsx(ct,{icon:"pencil",label:j("thread.rename"),onClick:()=>m(e.title)})]}):c.jsxs("form",{className:"jv-inline-edit",onSubmit:A=>{A.preventDefault(),f.trim()&&k(()=>l(f.trim()),()=>m(null))},children:[c.jsx("input",{value:f,autoFocus:!0,maxLength:80,"aria-label":j("thread.title"),onChange:A=>m(A.target.value),onKeyDown:A=>{A.key==="Escape"&&m(null)}}),c.jsx("button",{type:"submit",className:"ui-button ui-primary",disabled:g||!f.trim(),children:j("common.save")})]}),c.jsx("button",{type:"button",className:"jv-thread-status","data-done":C||void 0,disabled:g,title:j("thread.toggleStatus"),onClick:()=>void k(()=>s(C?"open":"done"),()=>{}),children:C?c.jsxs(c.Fragment,{children:[c.jsx(De,{name:"check"}),j("channel.threadDone")]}):j("threads.open")})]}),v!==null?c.jsxs("div",{className:"jv-summary","data-editing":!0,children:[c.jsx("textarea",{className:"jv-notice-input",value:v,autoFocus:!0,"aria-label":j("thread.summary"),onChange:A=>y(A.target.value)}),c.jsxs("div",{className:"jv-notice-actions",children:[c.jsx("button",{type:"button",className:"ui-button",onClick:()=>y(null),children:j("common.cancel")}),c.jsx("button",{type:"button",className:"ui-button ui-primary",disabled:g||!v.trim(),onClick:()=>void k(()=>u(v.trim()),()=>y(null)),children:j("common.save")})]})]}):E?c.jsxs("div",{className:"jv-summary",children:[c.jsxs("div",{className:"jv-summary-head",children:[c.jsxs("button",{type:"button",className:"jv-summary-toggle","aria-expanded":b,onClick:()=>w(!b),children:[c.jsx("strong",{children:j("thread.summary")}),!b&&c.jsx("span",{className:"jv-summary-first",children:M}),c.jsx(De,{name:b?"chevron-down":"chevron-right"})]}),b&&c.jsxs("span",{className:"jv-muted jv-summary-meta",children:[E.updatedBy.name," · ",V9(E.updatedAt)," · ",j("notice.version",{version:E.version})]}),c.jsx(ct,{icon:"pencil",label:j("thread.editSummary"),onClick:()=>y(E.text)})]}),b&&c.jsx("div",{className:"jv-summary-body ui-bubble jv-flat",children:c.jsx(Dc,{text:E.text})}),b&&!C&&c.jsxs("button",{type:"button",className:"ui-button jv-conclude",disabled:g,onClick:()=>void k(d,()=>{}),children:[c.jsx(De,{name:"check"}),j("thread.conclude",{channel:i})]})]}):c.jsxs("button",{type:"button",className:"jv-summary-empty",onClick:()=>y(""),children:[c.jsx(De,{name:"add"}),j("thread.addSummary")]})]})}function j2({threadId:e,mode:i,showSummary:r=!1,focus:l,onSearch:s,channel:u,drafts:d,members:f,bots:m,me:v,tick:y,onClose:g,onToggleMode:x,onNav:b,onChanged:w,onInvite:k,onPreview:C,onError:E,onNotice:M}){const[T,A]=S.useState(null),[I,R]=S.useState(null),[B,U]=S.useState([]),[$,z]=S.useState(null),Y=S.useRef(B);Y.current=B;const q=S.useRef(null),ee=S.useRef(null),G=S.useRef(null),H=S.useRef(!1),Q=S.useRef(!0),[O,F]=S.useState(!1),ne=S.useRef(0),D=S.useRef(0);S.useEffect(()=>{A(null),R(null),U([]),z(null),H.current=!1,Q.current=!0,F(!1),ne.current=0,D.current=0},[e]),S.useEffect(()=>{let oe=!0;return Promise.all([be.chat(e),be.messages(e)]).then(async([ce,me])=>{if(oe&&(A(ce),U(me.messages),G.current!==e&&(G.current=e,z(ce.readSequence)),ce.rootMessageId)){const Ne=await be.message(ce.rootMessageId);oe&&R(Ne)}}).catch(ce=>{oe&&E(ce)}),()=>{oe=!1}},[e,y]),S.useLayoutEffect(()=>{const oe=q.current;if(!oe||!T)return;const ce=()=>oe.scrollTo({top:oe.scrollHeight,behavior:"instant"}),me=B.at(-1),Ne=(me==null?void 0:me.senderId)===v&&me.sequence>D.current;if(D.current=Math.max(D.current,(me==null?void 0:me.sequence)??0),H.current)(Q.current||Ne)&&oe.scrollTo({top:oe.scrollHeight,behavior:"smooth"});else{if(!B.length&&!I)return;H.current=!0;const ze=l?oe.querySelector(`[data-message="${l.id}"]`):null;if(ze){if(Q.current=!1,ze.scrollIntoView({block:"center"}),l!=null&&l.passage&&dC(ze,l.passage))return;ze.classList.add("jv-jump"),setTimeout(()=>ze.classList.remove("jv-jump"),1600);return}ce(),requestAnimationFrame(ce)}(Q.current||Ne)&&(ne.current=(me==null?void 0:me.sequence)??0)},[B,I,T]),S.useEffect(()=>{H.current&&l&&P(l.id,l.passage)},[l]),S.useEffect(()=>{const oe=q.current,ce=ee.current;if(!oe||!ce)return;const me=new ResizeObserver(()=>{!H.current||!Q.current||oe.scrollHeight-oe.scrollTop-oe.clientHeight<8||oe.scrollTo({top:oe.scrollHeight,behavior:"instant"})});me.observe(ce);const Ne=()=>{var ze;Q.current=oe.scrollHeight-oe.scrollTop-oe.clientHeight<120,Q.current&&(ne.current=Math.max(ne.current,((ze=Y.current.at(-1))==null?void 0:ze.sequence)??0)),F(!Q.current)};return Ne(),oe.addEventListener("scroll",Ne,{passive:!0}),()=>{me.disconnect(),oe.removeEventListener("scroll",Ne)}},[q.current,e,T]),S.useEffect(()=>{const oe=B.at(-1);if(!T||!oe||oe.chatId!==T.id)return;const ce=()=>{if(document.visibilityState!=="visible"||T.readSequence>=oe.sequence)return;const me={...T,readSequence:oe.sequence,unread:0,mentions:0,alerts:0,atMe:!1,hint:null};A(me),be.markRead(T.id,oe.sequence).then(()=>w(me)).catch(E)};return ce(),document.addEventListener("visibilitychange",ce),()=>document.removeEventListener("visibilitychange",ce)},[B,T]);const J=async oe=>{try{const ce=await oe();A(ce),w(ce)}catch(ce){throw E(ce),ce}},W=async(oe,ce,me)=>{try{const Ne=await be.react(oe.id,ce,me),ze=Ve=>Ve.id===Ne.id?{...Ve,reactions:Ne.reactions}:Ve;U(Ve=>Ve.map(ze)),R(Ve=>Ve&&ze(Ve))}catch(Ne){E(Ne)}},P=(oe,ce)=>{var Ne;const me=oe&&((Ne=q.current)==null?void 0:Ne.querySelector(`[data-message="${oe}"]`));if(!me){M(j(oe?"thread.sourceElsewhere":"app.sourceGone"));return}fC(me,ce)},V={onQuote:oe=>NC(d,oe,f),onReact:W,onJump:P,onError:E},fe=async(oe,ce,me,Ne,ze=[],Ve=!1)=>{await be.send(e,oe,ce,me,Ve,Ne,ze);const ht=u?[...new Set(dv(oe,ar(f)).filter(At=>!u.memberIds.includes(At.member.id)).map(At=>At.member.name))]:[];ht.length&&M(j("app.notInChannel",{names:ht.join(j("common.listSeparator")),count:ht.length}));const[ot,Je]=await Promise.all([be.chat(e),be.messages(e)]);A(ot),U(Je.messages),w(ot)},ye=(u==null?void 0:u.title)??j("search.channel"),je=f.find(oe=>oe.id===(I==null?void 0:I.senderId)),ae=O?B.filter(oe=>oe.sequence>ne.current&&oe.senderId!==v).length:0,xe=i==="pane"?"aside":i==="embed"?"section":"main";return c.jsxs(xe,{className:i==="pane"?"ui-pane jv-pane":i==="embed"?"ui-chat jv-thread-full jv-thread-embed":"ui-chat jv-thread-full","aria-label":j("thread.label"),onKeyDown:oe=>{T&&s&&(oe.ctrlKey||oe.metaKey)&&oe.key.toLowerCase()==="f"&&(oe.preventDefault(),s(T))},children:[c.jsxs("header",{className:i==="pane"?"ui-pane-header jv-pane-header":"ui-chat-header jv-pane-header",children:[i==="full"&&c.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:j("common.openNav"),onClick:b}),i==="embed"&&c.jsx(ct,{icon:"chevron-left",className:"ui-mobile-only",label:j("thread.backToList"),onClick:g}),i==="full"?c.jsxs("button",{type:"button",className:"jv-crumb",onClick:g,children:[c.jsx(De,{name:"chevron-left"}),c.jsx("span",{className:"jv-hash",children:"#"}),ye]}):i==="embed"?c.jsxs("button",{type:"button",className:"jv-crumb",title:j("thread.inChannel"),onClick:x,children:[c.jsx("span",{className:"jv-hash",children:"#"}),ye]}):c.jsxs(c.Fragment,{children:[c.jsx("strong",{children:j("thread.label")}),c.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",ye]})]}),c.jsx("span",{className:"jv-spacer"}),T&&s&&c.jsx(ct,{icon:"search",label:j("thread.search"),onClick:()=>s(T)}),T&&c.jsxs("button",{type:"button",className:"ui-button jv-follow","data-on":T.following||void 0,title:j(T.following?"thread.followingHint":"thread.notFollowingHint"),onClick:()=>void J(()=>be.follow(e,!T.following)).catch(()=>{}),children:[c.jsx(De,{name:"bell"}),j(T.following?"threads.following":"thread.follow")]}),i!=="embed"&&c.jsx(ct,{icon:i==="pane"?"arrows-expand":"arrows-contract",className:"jv-desktop-only",label:j(i==="pane"?"thread.expand":"thread.collapse"),onClick:x}),i==="pane"&&c.jsx(ct,{icon:"close",label:j("thread.close"),onClick:g})]}),T&&c.jsx("div",{className:i==="pane"?"jv-thread-pin":"jv-thread-pin jv-thread-pin-wide",children:c.jsx($9,{chat:T,channelName:ye,expanded:r,onTitle:oe=>J(()=>be.updateThread(e,{title:oe})),onStatus:oe=>J(()=>be.updateThread(e,{status:oe})),onSummary:oe=>J(()=>be.setNote(e,oe)),onConclude:async()=>{var oe;try{await fe(`${j("thread.conclusion")}
|
|
534
|
+
|
|
535
|
+
${((oe=T.note)==null?void 0:oe.text)??""}`,[],Array.from(crypto.getRandomValues(new Uint8Array(16)),ce=>ce.toString(16).padStart(2,"0")).join(""),void 0,[],!0),await J(()=>be.updateThread(e,{status:"done"})),M(j("thread.concluded",{channel:ye}))}catch(ce){throw E(ce),ce}}})}),c.jsxs("div",{ref:q,className:i==="pane"?"ui-pane-body jv-pane-body":"ui-transcript jv-thread-wide",children:[c.jsxs("div",{ref:ee,children:[I&&c.jsx(Pd,{messages:[{...I,thread:null}],members:f,bots:m,me:v,divider:Number.MAX_SAFE_INTEGER,onSettled:()=>{},onPreview:C,onReact:W,onJump:P,onError:E}),c.jsx("div",{className:"jv-divider","data-tone":"count",role:"separator",children:c.jsx("span",{children:B.length?j("channel.replies",{count:B.length}):j("thread.noReplies")})}),c.jsx(Pd,{messages:B,members:f,bots:m,me:v,divider:$??Number.MAX_SAFE_INTEGER,onSettled:oe=>U(ce=>ce.map(me=>me.id===oe.id?oe:me)),onPreview:C,...V})]}),O&&B.length>0&&c.jsx("div",{className:"jv-to-latest",children:c.jsxs("button",{type:"button","aria-label":j("thread.toLatest"),onClick:()=>{var oe;return(oe=q.current)==null?void 0:oe.scrollTo({top:q.current.scrollHeight,behavior:"smooth"})},children:[ae>0&&c.jsx("span",{children:j("chat.unseen",{count:ae})}),c.jsx(De,{name:"chevron-down"})]})})]}),c.jsx(EC,{chatId:e,id:"jarvy-thread-composer",drafts:d,placeholder:j("thread.reply"),scrollRef:q,disabled:!T,initialText:B.length===0&&I&&I.senderId!==v&&je&&!je.deleted?`@${je.name} `:void 0,mention:{bots:m,inside:ar(f).filter(oe=>oe.id!==v&&!!(u!=null&&u.memberIds.includes(oe.id))),outside:ar(f).filter(oe=>!(u!=null&&u.memberIds.includes(oe.id))),onInvite:k},onSend:fe,onError:E,onNotice:M}),c.jsx(hC,{container:q,drafts:d,chatId:e,members:f,onNotice:M,source:oe=>oe===(I==null?void 0:I.id)?I:B.find(ce=>ce.id===oe)})]})}const yp={updated:"threadSort.updated",created:"threadSort.created",status:"threadSort.status"},vd=e=>e.lastReplyAt??e.createdAt;function RC(e,i){const r=i==="created"?(l,s)=>s.createdAt-l.createdAt:i==="status"?(l,s)=>+(l.status==="done")-+(s.status==="done")||vd(s)-vd(l):(l,s)=>vd(s)-vd(l);return[...e].sort(r)}function OC(e){const i=`jarvy-thread-sort-${e}`,[r,l]=S.useState(()=>{const s=localStorage.getItem(i);return s==="created"||s==="status"?s:"updated"});return[r,s=>{l(s),localStorage.setItem(i,s)}]}function _C({value:e,onChange:i}){return c.jsxs(Jl,{value:e,onValueChange:r=>i(r),children:[c.jsxs(eo,{className:"jv-thread-sort","aria-label":j("threadSort.current",{order:j(yp[e])}),title:j("threadSort.title"),children:[c.jsx(uA,{}),c.jsx(Wl,{})]}),c.jsx(to,{className:"jv-select-menu",position:"popper",sideOffset:4,align:"end",children:Object.keys(yp).map(r=>c.jsx(Fi,{value:r,children:j(yp[r])},r))})]})}const DC=e=>qr(e,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"});function Y9({channel:e,members:i,bots:r,tick:l,onOpen:s,onClose:u,onError:d}){const[f,m]=S.useState(null),[v,y]=S.useState("open"),[g,x]=OC("channel");S.useEffect(()=>{let k=!0;return be.channelThreads(e.id).then(C=>{k&&m(C.threads)}).catch(C=>{k&&d(C)}),()=>{k=!1}},[e.id,l]);const b=RC((f??[]).filter(k=>v==="all"||k.status===v),g),w=k=>(f??[]).filter(C=>C.status===k).length;return c.jsxs("aside",{className:"ui-pane jv-pane","aria-label":j("threads.list"),children:[c.jsxs("header",{className:"ui-pane-header jv-pane-header",children:[c.jsx("strong",{children:j("channel.threads")}),c.jsxs("span",{className:"jv-muted jv-pane-sub",children:["#",e.title]}),c.jsx("span",{className:"jv-spacer"}),c.jsx(_C,{value:g,onChange:x}),c.jsx(ct,{icon:"close",label:j("threads.closeList"),onClick:u})]}),c.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":j("threads.byStatus"),children:[["open",j("threads.openCount",{count:w("open")})],["done",j("threads.doneCount",{count:w("done")})],["all",j("threads.all")]].map(([k,C])=>c.jsx("button",{type:"button",role:"tab","aria-selected":v===k,onClick:()=>y(k),children:C},k))}),c.jsx("div",{className:"ui-pane-body jv-pane-body",children:f===null?c.jsx("p",{className:"jv-picker-empty",children:j("threads.loading")}):b.length===0?c.jsx("p",{className:"jv-picker-empty",children:j("threads.none")}):b.map(k=>{const C=i.find(E=>{var M;return E.id===((M=k.root)==null?void 0:M.senderId)});return c.jsxs("button",{type:"button",className:"jv-thread-item","data-unread":k.unread>0||void 0,onClick:()=>s(k.id),children:[c.jsxs("span",{className:"jv-thread-item-head",children:[c.jsx("strong",{children:k.title}),k.alerts>0?c.jsx("span",{className:"jv-badge",children:k.alerts}):k.unread>0&&c.jsx("span",{className:"jv-count",children:k.unread}),c.jsx("span",{className:"jv-thread-status","data-done":k.status==="done"||void 0,children:j(k.status==="done"?"channel.threadDone":"threads.open")})]}),k.root&&c.jsxs("span",{className:"jv-thread-item-root",children:[c.jsx(va,{member:C,bots:r,size:16}),c.jsx("span",{children:Lc(k.root)})]}),c.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:[j("channel.replies",{count:k.replies}),k.lastReplyAt?` · ${DC(k.lastReplyAt)}`:"",k.following?` · ${j("threads.following")}`:""]})]},k.id)})})]})}function G9({threads:e,chats:i,members:r,bots:l,onNav:s,renderThread:u}){const[d,f]=S.useState(e),[m,v]=S.useState(null),[y,g]=S.useState("all"),[x,b]=OC("followed");S.useEffect(()=>f(M=>[...e,...M.filter(T=>!e.some(A=>A.id===T.id)).map(T=>({...T,following:!1,unread:0,alerts:0}))]),[e]);const w=RC(d,x).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 c.jsxs("main",{className:"ui-chat jv-followed-page","aria-label":j("sidebar.followed"),"data-open":C?"":void 0,children:[c.jsxs("section",{className:"jv-followed-list","aria-label":j("threads.list"),children:[c.jsxs("header",{className:"ui-chat-header jv-channel-header",children:[c.jsxs("div",{className:"ui-header-left",children:[c.jsx(ct,{icon:"layout-sidebar-left",className:"ui-mobile-only",label:j("common.openNav"),onClick:s}),c.jsx("strong",{className:"jv-channel-title",children:j("sidebar.followed")})]}),c.jsx(_C,{value:x,onChange:b})]}),c.jsx("div",{className:"jv-tabs",role:"tablist","aria-label":j("threads.filter"),children:[["all",j("threads.all")],["unread",k?j("threads.unreadCount",{count:k}):j("threads.unread")],["open",j("threads.openCount",{count:E("open")})],["done",j("threads.doneCount",{count:E("done")})]].map(([M,T])=>c.jsx("button",{type:"button",role:"tab","aria-selected":y===M,onClick:()=>g(M),children:T},M))}),c.jsx("div",{className:"jv-followed-items",children:w.length===0?c.jsx("p",{className:"jv-picker-empty",children:j({all:"threads.none",unread:"threads.noneUnread",open:"threads.noneOpen",done:"threads.noneDone"}[y])}):w.map(M=>{const T=r.find(I=>{var R;return I.id===((R=M.root)==null?void 0:R.senderId)}),A=i.find(I=>I.id===M.parentId);return c.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:[c.jsxs("span",{className:"jv-thread-item-head",children:[c.jsx("strong",{children:M.title}),M.alerts>0?c.jsx("span",{className:"jv-badge",children:M.alerts}):M.unread>0&&c.jsx("span",{className:"jv-count",children:M.unread}),c.jsx("span",{className:"jv-thread-status","data-done":M.status==="done"||void 0,children:j(M.status==="done"?"channel.threadDone":"threads.open")})]}),M.root&&c.jsxs("span",{className:"jv-thread-item-root",children:[c.jsx(va,{member:T,bots:l,size:16}),c.jsx("span",{children:Lc(M.root)})]}),c.jsxs("span",{className:"jv-muted jv-thread-item-meta",children:["#",(A==null?void 0:A.title)??""," · ",j("channel.replies",{count:M.replies}),M.lastReplyAt?` · ${DC(M.lastReplyAt)}`:"",M.following?"":` · ${j("threads.notFollowing")}`]})]},M.id)})})]}),C?u(C,()=>v(null)):c.jsx("div",{className:"jv-followed-empty",children:c.jsx("p",{children:j("threads.pick")})})]})}function X9({pane:e,followedView:i,followed:r,chats:l,sections:s,members:u,bots:d,statuses:f,meId:m,drafts:v,tick:y,paneChannel:g,activeBot:x,botDirects:b,find:w,onPane:k,onNav:C,onBackToChannel:E,onAddMembers:M,onOpenBot:T,onPin:A,onMute:I,onDeleteChannel:R,onChannelSaved:B,onThreadChanged:U,onInvite:$,onPreview:z,onNotice:Y,onError:q,paneWidth:ee,onResize:G}){var F,ne;const H=(e==null?void 0:e.kind)==="thread"?e:null,Q=(H==null?void 0:H.mode)==="full",O=()=>k(null);return c.jsxs(c.Fragment,{children:[i&&!Q&&c.jsx(G9,{threads:r,chats:l,members:u,bots:d,onNav:C,renderThread:(D,J)=>c.jsx(j2,{threadId:D.id,mode:"embed",channel:l.find(W=>W.id===D.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:J,onToggleMode:()=>E({id:D.id,parentId:D.parentId},!0),onInvite:W=>$(D.parentId,W),onPreview:z,onError:q,onNotice:Y},D.id)}),H&&c.jsx(j2,{threadId:H.id,mode:H.mode,showSummary:H.summary,focus:H.focus,onSearch:w.search,channel:l.find(D=>D.id===H.parentId),drafts:v,members:u,bots:d,me:m,tick:y,onNav:C,onChanged:U,onClose:()=>Q?E(H,!1):O(),onToggleMode:()=>Q?E(H,!0):k({...H,mode:"full"}),onInvite:D=>$(H.parentId,D),onPreview:z,onError:q,onNotice:Y},`${H.id}:${((F=H.focus)==null?void 0:F.id)??""}:${((ne=H.focus)==null?void 0:ne.passage)??""}`),(e==null?void 0:e.kind)==="search"&&c.jsx(F9,{chat:e.chat,chats:l,members:u,focusKey:w.focusKey,onOpenMessage:w.openMessage,onClose:O,onError:q}),(e==null?void 0:e.kind)==="threads"&&g&&c.jsx(Y9,{channel:g,members:u,bots:d,tick:y,onOpen:D=>k({kind:"thread",id:D,parentId:g.id,mode:"pane"}),onClose:O,onError:q}),(e==null?void 0:e.kind)==="info"&&g&&c.jsx(q9,{channel:g,page:e.page,sections:s,members:ar(u),bots:d,statuses:f,me:m,onPage:D=>k({kind:"info",page:D}),onPin:()=>A(g),onMute:()=>I(g),onAdd:()=>M(g),onBot:T,onDelete:()=>R(g),onChanged:B,onClose:O,onError:q}),(e==null?void 0:e.kind)==="botdms"&&x&&!g&&c.jsx(H9,{bot:x,chats:b,members:u,bots:d,me:m,tick:y,onClose:O,onPreview:z,onError:q}),e&&!Q&&c.jsx("div",{className:"jv-resize",style:{right:ee-4},onPointerDown:G,role:"separator","aria-orientation":"vertical","aria-label":j("app.resizePane")})]})}const w2="@goodfish/jarvy",zC="0.6.0",Q9={url:"git+https://github.com/AzzzGoodFish/Jarvy.git"},K9="Apache-2.0",og=Q9.url.replace(/^git\+/,"").replace(/\.git$/,""),S2=`${og}/blob/v${zC}`,Z9=[{label:"about.source",detail:og.replace(/^https:\/\//,""),href:og},{label:"about.package",detail:w2,href:`https://www.npmjs.com/package/${w2}`},{label:"about.license",detail:K9,href:`${S2}/LICENSE`},{label:"about.notices",detail:"THIRD_PARTY_NOTICE.md",href:`${S2}/THIRD_PARTY_NOTICE.md`}];function J9(){return c.jsxs("div",{className:"jv-page",children:[c.jsx("header",{className:"jv-page-header",children:c.jsx("div",{children:c.jsx("h2",{children:j("settings.about")})})}),c.jsxs("div",{className:"jv-list",children:[c.jsxs("div",{className:"jv-list-row jv-static-row jv-about-intro",children:[c.jsxs("div",{className:"jv-row-text",children:[c.jsx("strong",{children:"Jarvy"}),c.jsx("span",{children:j("about.tagline")})]}),c.jsx("span",{className:"jv-row-meta",children:j("about.version",{version:zC})})]}),Z9.map(e=>c.jsxs("a",{className:"jv-list-row jv-link-row",href:e.href,target:"_blank",rel:"noreferrer",children:[c.jsxs("div",{className:"jv-row-text",children:[c.jsx("strong",{children:j(e.label)}),c.jsx("span",{children:e.detail})]}),c.jsx(xA,{"aria-hidden":"true"})]},e.label))]})]})}function W9(){const[e,i]=S.useState(document.documentElement.classList.contains("dark")),r=s=>{Bd(s?"dark":"light"),i(s)},l=(s,u,d,f,m)=>c.jsxs("button",{type:"button",role:"radio","aria-checked":d,lang:m,className:"jv-list-row jv-choice-row",onClick:f,children:[c.jsx("span",{className:"jv-row-text",children:c.jsx("strong",{children:u})}),d&&c.jsx(Ir,{"aria-hidden":"true"})]},s);return c.jsxs("div",{className:"jv-page",children:[c.jsx("header",{className:"jv-page-header",children:c.jsx("div",{children:c.jsx("h2",{children:j("settings.general")})})}),c.jsxs("section",{className:"jv-section","aria-labelledby":"general-language",children:[c.jsx("h3",{id:"general-language",className:"jv-section-title",children:j("general.language")}),c.jsx("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-language",children:M2.map(s=>l(s,Sp(s,"name"),qd()===s,()=>_2(s),s))})]}),c.jsxs("section",{className:"jv-section","aria-labelledby":"general-theme",children:[c.jsx("h3",{id:"general-theme",className:"jv-section-title",children:j("general.theme")}),c.jsxs("div",{className:"jv-list",role:"radiogroup","aria-labelledby":"general-theme",children:[l("light",j("general.light"),!e,()=>r(!1)),l("dark",j("general.dark"),e,()=>r(!0))]})]})]})}function hv({name:e}){var i;return c.jsx("span",{className:"jv-provider-mark","aria-hidden":"true",children:((i=[...e.trim()][0])==null?void 0:i.toUpperCase())??"?"})}function LC(e){const i=e.authType==="oauth";return e.configured?{ok:!0,label:j(i?"status.signedIn":"status.configured")}:{ok:!1,label:j(i?"status.signedOut":"status.notConfigured")}}const IC=[{id:"custom",label:"group.custom"},{id:"subscription",label:"group.subscription"},{id:"api_key",label:"group.apiKey"}],BC=e=>e.custom?"custom":e.authType==="oauth"?"subscription":"api_key",eB={id:"custom",name:"OpenAI / Anthropic compatible",authType:"api_key",api:"openai-completions",modelCount:0};function tB({onBack:e,onSelect:i}){const[r,l]=S.useState([]),[s,u]=S.useState(""),[d,f]=S.useState(""),[m,v]=S.useState(!0),[y,g]=S.useState(0);S.useEffect(()=>{let w=!0;return v(!0),f(""),be.modelProviders().then(k=>{w&&l(k.providers)}).catch(k=>{w&&f(Ot(k,"picker.loadFailed"))}).finally(()=>{w&&v(!1)}),()=>{w=!1}},[y]);const x=[eB,...r].filter(w=>`${w.name} ${w.id}`.toLowerCase().includes(s.toLowerCase())),b=w=>BC({authType:w.authType,custom:w.id==="custom"});return c.jsxs("div",{className:"jv-page",children:[c.jsxs("header",{className:"jv-page-header",children:[c.jsx(qe,{variant:"ghost",size:"icon-sm",className:"jv-back",onClick:e,"aria-label":j("picker.back"),children:c.jsx(Fd,{})}),c.jsxs("div",{children:[c.jsx("h2",{children:j("models.add")}),c.jsx("p",{children:j("picker.intro")})]})]}),c.jsxs("label",{className:"jv-search",children:[c.jsx(kc,{}),c.jsx("input",{autoFocus:!0,"aria-label":j("picker.search"),placeholder:j("picker.searchPlaceholder"),value:s,onChange:w=>u(w.target.value)})]}),IC.filter(w=>x.some(k=>b(k)===w.id)).map(({id:w,label:k})=>c.jsxs("section",{className:"jv-section","aria-label":j(k),children:[c.jsx("h3",{className:"jv-section-title",children:j(k)}),c.jsx("div",{className:"jv-list",children:x.filter(C=>b(C)===w).map(C=>c.jsxs("button",{className:"jv-list-row",type:"button",onClick:()=>i(C),children:[c.jsx(hv,{name:C.id==="custom"?"+":C.name}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:C.name}),c.jsx("span",{children:C.id==="custom"?j("picker.customHint"):C.authType==="oauth"?j("picker.oauthHint"):j("picker.keyHint",{count:C.modelCount})})]}),c.jsx(Ka,{className:"jv-row-chevron"})]},`${C.id}:${C.authType}`))})]},w)),m&&c.jsx("p",{role:"status",className:"jv-hint",children:j("picker.loading")}),d&&c.jsxs("div",{className:"jv-empty",role:"alert",children:[c.jsx("strong",{children:d}),c.jsx(qe,{variant:"outline",onClick:()=>g(w=>w+1),children:j("picker.retry")})]}),!m&&!d&&!x.length&&c.jsxs("div",{className:"jv-empty",children:[c.jsx("strong",{children:j("picker.noMatch")}),c.jsx("span",{children:j("picker.noMatchHint")})]})]})}const nB=mg("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 iB({className:e,variant:i,...r}){return c.jsx("span",{"data-slot":"badge",className:nn(nB({variant:i}),e),...r})}function HC({className:e,...i}){return c.jsx(HO,{"data-slot":"label",className:nn("flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...i})}function rB({connection:e,providerName:i,authType:r,ensureConnection:l,onChanged:s}){var q,ee;const[u,d]=S.useState({phase:"idle"}),[f,m]=S.useState(""),[v,y]=S.useState(!1),[g,x]=S.useState(""),[b,w]=S.useState(0),k=S.useRef(void 0),C=e==null?void 0:e.id,E=S.useRef(s);E.current=s;const M=S.useRef(u.phase);M.current=u.phase,S.useEffect(()=>{if(!C)return;const G=C;let H=!0,Q;async function O(){var F;try{let ne=await be.authStatus(G);if(!H)return;if(k.current&&((F=ne.prompt)==null?void 0:F.type)==="select"){const J=k.current;if(k.current=void 0,ne=await be.authInput(G,ne.prompt.id,J),!H)return}const D=M.current==="running"&&ne.phase!=="running";M.current=ne.phase,d(ne),D&&await E.current(),ne.phase==="running"&&H&&(Q=setTimeout(()=>void O(),750))}catch(ne){H&&x(Ot(ne,"auth.statusFailed"))}}return O(),()=>{H=!1,clearTimeout(Q)}},[C,u.phase,b]),S.useEffect(()=>m(""),[(q=u.prompt)==null?void 0:q.id]);async function T(G){y(!0),x("");try{const H=await G();d(H),H.phase!=="running"&&await s()}catch(H){x(Ot(H,"common.failed"))}finally{y(!1)}}function A(G){k.current=G,T(async()=>{const H=C??await l();return be.authStart(H)})}const I=i==="openai-codex"&&r==="oauth",R=i==="openai"&&r==="oauth",B=u.phase==="running",U=u.prompt,$=u.event,z=($==null?void 0:$.type)==="auth_url"?$.url:($==null?void 0:$.type)==="device_code"?$.verificationUri:null,Y=G=>{U&&C&&T(()=>be.authInput(C,U.id,G))};return c.jsxs("section",{className:"jv-auth","aria-label":j("auth.title"),children:[c.jsxs("div",{className:"jv-auth-header",children:[c.jsx("h3",{children:j("auth.title")}),c.jsx(iB,{variant:"outline","data-state":B?"running":e!=null&&e.configured?"connected":"disconnected",children:j(B?"auth.running":e!=null&&e.configured?r==="oauth"?"status.signedIn":"status.configured":r==="oauth"?"status.signedOut":"status.notConfigured")})]}),B?c.jsxs("div",{className:"jv-auth-flow",children:[z&&c.jsx(qe,{asChild:!0,variant:"outline",children:c.jsx("a",{style:{color:"inherit",textDecoration:"none"},href:z,target:"_blank",rel:"noopener noreferrer",children:j("auth.openPage")})}),($==null?void 0:$.type)==="device_code"&&c.jsx("p",{children:j("auth.code",{code:$.userCode})}),(U==null?void 0:U.type)==="select"&&c.jsx("div",{className:"flex flex-wrap gap-2",children:(ee=U.options)==null?void 0:ee.map(G=>c.jsx(qe,{type:"button",variant:"outline",disabled:v,onClick:()=>Y(G.id),children:I&&G.id==="browser"?j("auth.browser"):I&&G.id==="device_code"?j("auth.deviceCode"):G.label},G.id))}),U&&U.type!=="select"&&c.jsxs("div",{className:"jv-auth-input",children:[c.jsx(HC,{htmlFor:`oauth-input-${C??i}`,children:U.type==="manual_code"?j(R?"auth.redirectFull":"auth.redirectOrCode"):U.message}),U.type==="manual_code"&&c.jsx("p",{className:"jv-auth-note",children:j("auth.manualNote")}),c.jsx(In,{id:`oauth-input-${C??i}`,type:U.type==="text"?"text":"password",autoComplete:"off",value:f,disabled:v,onChange:G=>m(G.target.value),onKeyDown:G=>{G.key==="Enter"&&(G.preventDefault(),Y(f))}}),c.jsx(qe,{type:"button",variant:"outline",disabled:v||!f.trim(),onClick:()=>Y(f),children:j("common.continue")})]}),!U&&c.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:j("auth.waiting")}),($==null?void 0:$.type)==="info"&&c.jsx("p",{className:"text-sm",children:$.message}),c.jsx(qe,{type:"button",variant:"ghost",disabled:v,onClick:()=>void T(()=>be.authCancel(C)),children:j("auth.cancel")})]}):c.jsxs("div",{className:"flex flex-wrap gap-2",children:[I?c.jsxs(c.Fragment,{children:[c.jsx(qe,{type:"button",variant:"outline",disabled:v,onClick:()=>A("browser"),children:j("auth.browser")}),c.jsx(qe,{type:"button",variant:"outline",disabled:v,onClick:()=>A("device_code"),children:j("auth.deviceCode")})]}):c.jsx(qe,{type:"button",variant:"outline",disabled:v,onClick:()=>A(),children:j(r==="api_key"?"auth.configureCredential":e!=null&&e.configured?"auth.signInAgain":"auth.signIn")}),(e==null?void 0:e.configured)&&c.jsx(qe,{type:"button",variant:"outline",disabled:v,onClick:()=>void T(async()=>(await be.authLogout(C),{phase:"idle"})),children:j(r==="api_key"?"auth.removeCredential":"auth.signOut")})]}),(g||u.phase==="error")&&c.jsx("p",{role:"alert",className:"jarvy-model-feedback",children:g||j("error.loginFailed")}),g&&c.jsx(qe,{type:"button",variant:"link",disabled:v,onClick:()=>{x(""),w(G=>G+1)},children:j("auth.refresh")})]})}async function aB(e,i,r){try{return await be.autoconfigModel({modelId:e.id,api:e.api||i,...r?{choice:r}:{}})}catch(l){return{status:"error",message:Ot(l,"auto.failed")}}}function lB(e,i){if(i.status!=="matched")return{...e,auto:i};const{fields:r,...l}=i,s=e.model.name&&e.model.name!==e.model.id;return{...e,model:{...e.model,...r,name:s?e.model.name:i.source.name||e.model.id},auto:l}}const PC=e=>`${e.provider} / ${e.modelId}`;function k2({items:e,onPick:i}){return c.jsx("div",{className:"jv-auto-sources",children:e.map(r=>c.jsxs("button",{type:"button",onClick:()=>i(r),children:[c.jsx("span",{className:"jv-mono",children:PC(r)}),r.official&&c.jsx("em",{children:j("auto.official")}),c.jsx("small",{children:r.api})]},`${r.provider}/${r.modelId}`))})}function oB({state:e,modelId:i,onRun:r}){const l=u=>r({provider:u.provider,modelId:u.modelId}),s=(e==null?void 0:e.status)==="pending";return c.jsxs("div",{className:"jv-autoconfig","aria-live":"polite",children:[c.jsxs(qe,{type:"button",variant:"outline",size:"sm",disabled:!i.trim()||s,onClick:()=>r(),children:[c.jsx(Kj,{}),j(s?"auto.pending":"auto.run")]}),e&&!s&&c.jsxs("div",{className:"jv-auto-result",children:[e.status==="matched"&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:L2("auto.matched",{source:c.jsx("strong",{className:"jv-mono",children:PC(e.source)}),note:e.reseller?j("auto.reseller"):"",suffix:j("auto.applied")})}),e.apiMismatch&&c.jsx("p",{className:"jv-auto-warn",children:j("auto.apiMismatch",{api:e.source.api})}),e.alternatives.length>0&&c.jsxs("details",{children:[c.jsx("summary",{children:j("auto.changeSource")}),c.jsx(k2,{items:e.alternatives,onPick:l})]})]}),e.status==="choose"&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:e.reason==="multiple"?j("auto.multiple"):j("auto.similar",{modelId:i})}),c.jsx(k2,{items:e.options,onPick:l})]}),e.status==="none"&&c.jsx("p",{children:j("auto.notFound")}),e.status==="error"&&c.jsx("p",{role:"alert",children:e.message})]})]})}const xp=["openai","openrouter","deepseek","zai","qwen","together","baseten","chat-template","qwen-chat-template","string-thinking","ant-ling"],UC=[["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"]],qC=e=>e==="xhigh"||e==="max";function FC(e,i){const r=e[i];return r===null||r===void 0&&qC(i)?"unsupported":r===void 0?"default":"custom"}function sB(e){return e.reasoning?UC.filter(([i])=>FC(e.thinkingLevelMap,i)!=="unsupported").map(([,i])=>j(i)):[j("thinking.level.off")]}function cB({model:e,api:i,onChange:r}){const l=e.thinkingLevelMap,s=(f,m,v)=>{const y={...l};m==="default"?delete y[f]:m==="unsupported"?y[f]=null:y[f]=v??(typeof l[f]=="string"?l[f]:f),r({thinkingLevelMap:y})},u=i==="openai-completions",d=e.thinkingFormat&&!xp.includes(e.thinkingFormat)?[...xp,e.thinkingFormat]:xp;return c.jsxs("section",{className:"jv-thinking",children:[c.jsx("h4",{children:j("thinking.title")}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("thinking.format")}),c.jsxs(Jl,{value:e.thinkingFormat||"default",disabled:!u&&!e.thinkingFormat,onValueChange:f=>r({thinkingFormat:f==="default"?"":f}),children:[c.jsx(eo,{"aria-label":j("thinking.format"),children:c.jsx(Wl,{})}),c.jsxs(to,{className:"jv-select-menu",children:[c.jsx(Fi,{value:"default",children:j("thinking.protocolDefault")}),d.map(f=>c.jsx(Fi,{value:f,children:f},f))]})]}),!u&&c.jsx("small",{className:"jv-field-hint",children:j("thinking.onlyCompletions")})]}),c.jsx("div",{className:"jv-thinking-levels",role:"group","aria-label":j("thinking.levels"),children:UC.map(([f,m])=>{const v=FC(l,f);return c.jsxs("div",{className:"jv-thinking-level",children:[c.jsxs("span",{children:[j(m),c.jsx("code",{children:f})]}),c.jsxs(Jl,{value:v,onValueChange:y=>s(f,y),children:[c.jsx(eo,{"aria-label":j("thinking.levelName",{level:j(m)}),children:c.jsx(Wl,{})}),c.jsxs(to,{className:"jv-select-menu",children:[!qC(f)&&c.jsx(Fi,{value:"default",children:j("thinking.supportedDefault")}),c.jsx(Fi,{value:"unsupported",children:j("thinking.unsupported")}),c.jsx(Fi,{value:"custom",children:j("thinking.supportedCustom")})]})]}),v==="custom"?c.jsx(In,{className:"jv-mono",required:!0,"aria-label":j("thinking.levelValue",{level:j(m)}),maxLength:80,value:l[f]??"",onChange:y=>s(f,"custom",y.target.value)}):c.jsx("span",{})]},f)})}),c.jsx("p",{className:"jv-field-hint",children:j("thinking.supported",{levels:sB(e).join(" · ")})})]})}const bp=[{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"}],uB=()=>({id:"",name:"",reasoning:!1,input:["text"],contextWindow:null,maxTokens:null,thinkingFormat:"",thinkingLevelMap:{},compat:{},cost:null});function sg({value:e,onChange:i,allowDefault:r=!1}){const l=bp.some(s=>s.id===e)||!e?bp:[...bp,{id:e,label:e}];return c.jsxs(Jl,{value:e||"default",onValueChange:s=>i(s==="default"?"":s),children:[c.jsx(eo,{"aria-label":j("editor.protocol"),children:c.jsx(Wl,{})}),c.jsxs(to,{className:"jv-select-menu",children:[r&&c.jsx(Fi,{value:"default",children:j("card.defaultProtocol")}),l.map(s=>c.jsx(Fi,{value:s.id,children:s.label},s.id))]})]})}const dB=e=>e>=1e6?`${+(e/1e6).toFixed(2)}M`:e>=1e3?`${Math.round(e/1e3)}K`:String(e),C2={pending:"auto.pending",choose:"auto.tagChoose",none:"auto.tagNone",error:"auto.failed"};function fB({value:e,onChange:i}){const r=m=>Object.keys(m).length?JSON.stringify(m,null,2):"",[l,s]=S.useState(()=>r(e)),[u,d]=S.useState(""),f=S.useRef(null);return S.useEffect(()=>{var m;try{if(JSON.stringify(JSON.parse(l||"{}"))===JSON.stringify(e))return}catch{}s(r(e)),d(""),(m=f.current)==null||m.setCustomValidity("")},[e]),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("card.compat")}),c.jsx(ig,{ref:f,className:"jv-mono jv-compat",rows:Math.min(10,Math.max(2,l.split(`
|
|
536
|
+
`).length)),placeholder:"{}",value:l,onChange:m=>{s(m.target.value);try{const v=JSON.parse(m.target.value||"{}");if(!v||typeof v!="object"||Array.isArray(v))throw new Error;i(v),d(""),m.currentTarget.setCustomValidity("")}catch{d(j("card.jsonObject")),m.currentTarget.setCustomValidity(j("card.jsonObject"))}}}),u&&c.jsx("small",{role:"alert",children:u})]})}function hB({draft:e,protocol:i,onChange:r,onRemove:l,onAutoconfig:s}){const{model:u}=e,[d,f]=S.useState(!u.id),[m,v]=S.useState(!1),[y,g]=S.useState(()=>(u.headerNames??[]).map(k=>({name:k,value:"",saved:!0}))),x=k=>r({...e,model:{...u,...k}}),b=(k,C)=>c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:k}),C]}),w=(k,C,E)=>{const M=y.map((A,I)=>I===k?{...A,[C]:E}:A);g(M);const T={...u.headerUpdates};!y[k].saved&&y[k].name&&y[k].name!==M[k].name&&(T[y[k].name]=null);for(const A of M)A.name&&(A.value||!A.saved)&&(T[A.name]=A.value);x({headerUpdates:T})};return c.jsxs("article",{className:`jv-model-card ${e.selected?"is-selected":""}`,children:[c.jsxs("div",{className:"jv-model-summary",children:[c.jsx("input",{type:"checkbox",checked:e.selected,"aria-label":j("card.use",{name:u.id||j("card.newModel")}),onChange:k=>r({...e,selected:k.target.checked})}),c.jsxs("button",{type:"button","aria-expanded":d,className:"jv-model-expand",onClick:()=>f(!d),children:[c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:u.name||u.id||j("card.newModel")}),c.jsx("span",{className:"jv-mono",children:u.id||j("card.enterId")})]}),c.jsxs("span",{className:"jv-chips",children:[u.contextWindow&&c.jsx("span",{className:"jv-chip",children:dB(u.contextWindow)}),u.input.includes("image")&&c.jsx("span",{className:"jv-chip",children:j("card.image")}),u.reasoning&&c.jsx("span",{className:"jv-chip",children:j("card.reasoning")}),e.auto&&C2[e.auto.status]&&c.jsx("span",{className:"jv-chip jv-chip-warn",children:j(C2[e.auto.status])})]}),c.jsx(Yl,{className:"jv-expand-icon"})]}),c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-model-remove","aria-label":j("card.remove",{name:u.id||j("card.newModel")}),onClick:l,children:c.jsx(Ed,{})})]}),d&&c.jsxs("div",{className:"jv-model-fields",children:[c.jsxs("div",{className:"jv-field-grid",children:[b(j("card.modelId"),c.jsx(In,{className:"jv-mono",required:!0,value:u.id,onChange:k=>x({id:k.target.value}),placeholder:"model-id"})),b(j("card.modelName"),c.jsx(In,{value:u.name,onChange:k=>x({name:k.target.value}),placeholder:j("card.optional")}))]}),c.jsx(oB,{state:e.auto,modelId:u.id,onRun:s}),c.jsxs("section",{children:[c.jsx("h4",{children:j("card.capabilities")}),c.jsxs("div",{className:"flex flex-wrap gap-5",children:[c.jsxs("label",{className:"jarvy-model-check",children:[c.jsx("input",{type:"checkbox",checked:u.reasoning,onChange:k=>x({reasoning:k.target.checked})}),j("card.reasoningThinking")]}),c.jsxs("label",{className:"jarvy-model-check",children:[c.jsx("input",{type:"checkbox",checked:u.input.includes("image"),onChange:k=>x({input:k.target.checked?["text","image"]:["text"]})}),j("card.imageInput")]})]})]}),u.reasoning&&c.jsx(cB,{model:u,api:u.api||i,onChange:x}),c.jsxs("section",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h4",{children:j("card.specs")}),c.jsx(qe,{type:"button",variant:"link",size:"sm",onClick:()=>v(!m),children:j(m?"card.hidePrices":"card.editPrices")})]}),c.jsxs("div",{className:"jv-field-grid",children:[b(j("card.context"),c.jsx(In,{type:"number",min:1,value:u.contextWindow??"",placeholder:j("card.notProvided"),onChange:k=>x({contextWindow:k.target.value?Number(k.target.value):null})})),b(j("card.maxOutput"),c.jsx(In,{type:"number",min:1,value:u.maxTokens??"",placeholder:j("card.notProvided"),onChange:k=>x({maxTokens:k.target.value?Number(k.target.value):null})}))]}),c.jsx("h4",{className:"jv-cost-title",children:j("card.costTitle")}),c.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 c.jsxs("div",{children:[c.jsx(HC,{children:j(C)}),m?c.jsx(In,{type:"number",step:"any",min:0,value:((E=u.cost)==null?void 0:E[k])??"",onChange:T=>x({cost:{input:0,output:0,cacheRead:0,cacheWrite:0,...u.cost,[k]:Number(T.target.value)}})}):c.jsx("span",{children:((M=u.cost)==null?void 0:M[k])??j("card.notProvided")})]},k)})})]}),c.jsxs("details",{className:"jv-advanced",children:[c.jsxs("summary",{children:[j("card.advanced"),c.jsx(Yl,{className:"size-4"})]}),c.jsxs("div",{className:"jv-advanced-fields",children:[c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("card.apiOverride")}),c.jsx(sg,{allowDefault:!0,value:u.api??"",onChange:k=>x({api:k})})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("card.headers")}),y.map((k,C)=>c.jsxs("div",{className:"jv-header-row",children:[c.jsx(In,{className:"jv-mono","aria-label":"Header Name",placeholder:"Header-Name",readOnly:k.saved,value:k.name,onChange:E=>w(C,"name",E.target.value)}),c.jsx(In,{"aria-label":"Header Value",type:"password",autoComplete:"off",placeholder:k.saved?j("card.headerSaved"):"value",value:k.value,onChange:E=>w(C,"value",E.target.value)}),c.jsx(qe,{type:"button",size:"icon-sm",variant:"ghost","aria-label":j("card.removeHeader"),onClick:()=>{g(y.filter((E,M)=>M!==C)),k.name&&x({headerUpdates:{...u.headerUpdates,[k.name]:null}})},children:c.jsx(Ed,{})})]},C)),c.jsxs(qe,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:()=>g([...y,{name:"",value:"",saved:!1}]),children:[c.jsx(Vd,{}),j("card.addHeader")]})]}),c.jsx(fB,{value:u.compat,onChange:k=>x({compat:k})})]})]})]})]})}let mB=0;const jp=(e,i,r=!1)=>({key:`draft-${++mB}`,model:e,selected:i,...r?{originalId:e.id}:{}});function pB({connection:e,preset:i,defaultName:r,saved:l=!1,onBack:s,onSaved:u,onConnected:d,onChanged:f}){const m=e?e.kind==="custom":(i==null?void 0:i.id)==="custom",v=(e==null?void 0:e.authType)??i.authType,[y,g]=S.useState(e?m?e.providerName:e.displayName:m?"":r),[x,b]=S.useState((e==null?void 0:e.baseUrl)??""),[w,k]=S.useState((e==null?void 0:e.api)??i.api),[C,E]=S.useState(""),[M,T]=S.useState(()=>((e==null?void 0:e.models)??[]).map(ae=>jp(ae,!0,!0))),[A,I]=S.useState([]),[R,B]=S.useState(""),[U,$]=S.useState(!1),[z,Y]=S.useState(!1),[q,ee]=S.useState(""),[G,H]=S.useState(l?j("editor.saved"):""),Q=S.useRef(e==null?void 0:e.id);function O(ae){T(xe=>{const oe=new Set(xe.map(ce=>ce.model.id));return[...xe,...ae.filter(ce=>!oe.has(ce.id)).map(ce=>jp(ce,!1))]})}S.useEffect(()=>{if(m)return;let ae=!0;return Y(!0),(e?be.modelCatalog(e.id):be.providerModels(i.id)).then(oe=>{ae&&O(oe.models)}).catch(oe=>{ae&&ee(Ot(oe,"editor.fetchFailed"))}).finally(()=>{ae&&Y(!1)}),()=>{ae=!1}},[e==null?void 0:e.id,i==null?void 0:i.id,m]);async function F(){Y(!0),ee(""),H("");try{const ae=await be.discoverModels({connectionId:Q.current,baseUrl:x,api:w,...C.trim()?{apiKey:C}:{}});O(ae.models),H(ae.models.length?j("editor.fetched",{count:ae.models.length}):j("editor.noneReturned"))}catch(ae){ee(Ot(ae,"editor.fetchFailed"))}finally{Y(!1)}}async function ne(ae,xe){const oe=M.filter(me=>ae.includes(me.key)&&me.model.id.trim());if(!oe.length)return;ee(""),H(""),T(me=>me.map(Ne=>oe.some(ze=>ze.key===Ne.key)?{...Ne,auto:{status:"pending"}}:Ne));const ce={matched:0,choose:0,none:0,error:0};for(const me of oe){const Ne=await aB(me.model,w,xe);ce[Ne.status]++,T(ze=>ze.map(Ve=>Ve.key===me.key?lB(Ve,Ne):Ve))}oe.length>1&&H(j("editor.autoSummary",{parts:[j("editor.autoMatched",{count:ce.matched}),ce.choose&&j("editor.autoChoose",{count:ce.choose}),ce.none&&j("editor.autoNone",{count:ce.none}),ce.error&&j("editor.autoFailed",{count:ce.error})].filter(Boolean).join(j("common.listSeparator"))}))}async function D(){if(!Q.current){const ae=await be.createModelConnection({providerName:i.id,displayName:y,kind:"builtin",authType:v,baseUrl:x,api:w});Q.current=ae.id}return await d(Q.current),Q.current}async function J(ae){ae.preventDefault(),$(!0),ee(""),H("");try{let xe;Q.current?(xe=await be.updateModelConnection(Q.current,{displayName:y,...m?{providerName:y}:{},baseUrl:x,api:w}),m&&C.trim()&&await be.saveModelCredential(xe.id,C)):(xe=await be.createModelConnection({providerName:m?y:i.id,displayName:y,kind:m?"custom":"builtin",authType:v,baseUrl:x,api:w,...m&&C.trim()?{apiKey:C}:{}}),Q.current=xe.id);for(const oe of M)oe.selected&&await be.saveConnectionModel(xe.id,oe.model,oe.originalId);for(const oe of new Set([...A,...M.filter(ce=>ce.originalId&&!ce.selected).map(ce=>ce.originalId)]))await be.deleteConnectionModel(xe.id,oe);E(""),await u(xe.id),H(j("editor.saved"))}catch(xe){ee(Ot(xe,"editor.saveFailed"))}finally{$(!1)}}async function W(){if(!(!e||!confirm(j("editor.confirmDelete",{name:e.displayName})))){$(!0),ee("");try{await be.deleteModelConnection(e.id),await f(),s()}catch(ae){ee(Ot(ae,"editor.deleteFailed"))}finally{$(!1)}}}const P=M.filter(ae=>`${ae.model.id} ${ae.model.name}`.toLowerCase().includes(R.toLowerCase())),V=M.filter(ae=>ae.selected).length,fe=m?(e==null?void 0:e.displayName)??j("group.custom"):(e==null?void 0:e.displayName)??i.name,ye=e?LC(e):null,je=M.some(ae=>{var xe;return((xe=ae.auto)==null?void 0:xe.status)==="pending"});return c.jsxs("form",{className:"jv-editor",onChange:()=>H(""),onSubmit:ae=>void J(ae),children:[c.jsxs("header",{className:"jv-editor-header",children:[c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-back",disabled:U,onClick:s,"aria-label":j("editor.back"),children:c.jsx(Fd,{})}),c.jsx(hv,{name:fe}),c.jsxs("div",{className:"jv-row-text",children:[c.jsx("strong",{children:fe}),c.jsx("span",{children:m?"OpenAI / Anthropic compatible":j(v==="oauth"?"group.subscription":"group.apiKey")})]}),ye&&c.jsx("span",{className:"jv-status","data-ok":ye.ok||void 0,children:ye.label}),e&&c.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",className:"jv-danger-icon",disabled:U,onClick:()=>void W(),"aria-label":j("editor.delete"),children:c.jsx(Ed,{})})]}),c.jsxs("div",{className:"jv-editor-scroll",children:[c.jsxs("section",{className:"jv-section","aria-label":j("editor.connection"),children:[c.jsx("h3",{className:"jv-section-title",children:j("editor.connection")}),c.jsx("div",{className:"jv-panel",children:m?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"jv-field-grid",children:[c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("editor.providerName")}),c.jsx(In,{className:"jv-mono",required:!0,maxLength:80,"aria-label":j("editor.providerName"),placeholder:"my-provider",value:y,onChange:ae=>g(ae.target.value)})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:j("editor.protocol")}),c.jsx(sg,{value:w,onChange:k})]})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("editor.url")}),c.jsx(In,{required:!0,type:"url","aria-label":j("editor.url"),value:x,placeholder:"https://api.example.com/v1",onChange:ae=>b(ae.target.value)})]}),c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("editor.key")}),c.jsx(In,{type:"password",autoComplete:"new-password","aria-label":j("editor.key"),placeholder:j(e!=null&&e.configured?"editor.keySaved":"editor.keyPlaceholder"),value:C,onChange:ae=>E(ae.target.value)})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("editor.name")}),c.jsx(In,{required:!0,maxLength:100,"aria-label":j("editor.name"),value:y,onChange:ae=>g(ae.target.value)})]}),c.jsx(rB,{connection:e,providerName:(e==null?void 0:e.providerName)??i.id,authType:v,ensureConnection:D,onChanged:f}),c.jsxs("details",{className:"jv-advanced",children:[c.jsxs("summary",{children:[c.jsx(Yl,{}),j("editor.settings")]}),c.jsxs("div",{className:"jv-advanced-fields",children:[c.jsxs("label",{className:"jv-field",children:[c.jsx("span",{children:j("editor.url")}),c.jsx(In,{className:"jv-mono",value:x,placeholder:j("editor.defaultUrl"),onChange:ae=>b(ae.target.value)})]}),c.jsxs("div",{className:"jv-field",children:[c.jsx("span",{children:"API Protocol"}),c.jsx(sg,{value:w,onChange:k})]})]})]})]})})]}),c.jsxs("section",{className:"jv-section","aria-label":j("editor.models"),children:[c.jsxs("div",{className:"jv-section-head",children:[c.jsxs("h3",{className:"jv-section-title",children:[j("settings.models")," ",c.jsx("span",{children:j("editor.selected",{selected:V,total:M.length})})]}),c.jsxs("div",{className:"jv-section-actions",children:[m&&c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:U||z||!x.trim()||!(C.trim()||e!=null&&e.configured),onClick:()=>void F(),children:[c.jsx(rj,{}),j(z?"editor.fetching":"editor.fetch")]}),V>0&&c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",disabled:U||je,onClick:()=>void ne(M.filter(ae=>ae.selected).map(ae=>ae.key)),children:[c.jsx(Kj,{}),j("editor.autoSelected")]}),c.jsxs(qe,{type:"button",variant:"ghost",size:"sm",onClick:()=>T([...M,jp(uB(),!0)]),children:[c.jsx(Vd,{}),j("editor.addManually")]})]})]}),M.length>6&&c.jsxs("div",{className:"jv-models-filter",children:[c.jsxs("label",{className:"jv-search",children:[c.jsx(kc,{}),c.jsx("input",{"aria-label":j("editor.filter"),placeholder:j("editor.filterPlaceholder"),value:R,onChange:ae=>B(ae.target.value)})]}),c.jsx(qe,{type:"button",variant:"ghost",size:"sm",onClick:()=>T(ae=>ae.map(xe=>P.includes(xe)?{...xe,selected:!0}:xe)),children:j("editor.selectVisible")})]}),z&&!m&&c.jsx("p",{role:"status",className:"jv-hint",children:j("editor.loadingCatalog")}),c.jsx("div",{className:"jv-model-cards",children:P.map(ae=>c.jsx(hB,{draft:ae,protocol:w,onAutoconfig:xe=>void ne([ae.key],xe),onChange:xe=>T(oe=>oe.map(ce=>ce.key===ae.key?xe:ce)),onRemove:()=>{ae.originalId&&I(xe=>[...xe,ae.originalId]),T(xe=>xe.filter(oe=>oe.key!==ae.key))}},ae.key))}),!z&&!M.length&&c.jsxs("div",{className:"jv-empty",children:[c.jsx("strong",{children:j("editor.empty")}),c.jsx("span",{children:j(m?"editor.emptyCustom":"editor.emptyBuiltin")})]})]})]}),c.jsxs("footer",{className:"jv-editor-footer",children:[c.jsx("div",{"aria-live":"polite",children:q?c.jsx("p",{role:"alert",children:q}):G?c.jsx("p",{role:"status",children:G}):c.jsx("p",{children:j("editor.footer")})}),c.jsx(qe,{type:"submit",className:"jv-primary",disabled:U||z||je,children:j(U?"editor.saving":"editor.save")})]})]})}function gB({connections:e,onChanged:i}){const[r,l]=S.useState("list"),[s,u]=S.useState(),[d,f]=S.useState(),[m,v]=S.useState(0),y=()=>{l("list"),f(void 0),u(void 0),v(0)},g=b=>BC({authType:b.authType,custom:b.kind==="custom"});let x=(s==null?void 0:s.name)??"";if(s){let b=2;for(;e.some(w=>w.displayName===x);)x=`${s.name} ${b++}`}return r==="choose"?c.jsx(tB,{onBack:y,onSelect:b=>{u(b),f(void 0),l("editor")}}):r==="editor"?c.jsx(pB,{connection:e.find(b=>b.id===d),preset:s,defaultName:x,saved:m>0,onBack:y,onChanged:i,onConnected:async b=>{await i(),f(b),u(void 0)},onSaved:async b=>{await i(),f(b),u(void 0),v(w=>w+1)}},m):c.jsxs("div",{className:"jv-page",children:[c.jsxs("header",{className:"jv-page-header",children:[c.jsxs("div",{children:[c.jsx("h2",{children:j("settings.models")}),c.jsx("p",{children:j("models.intro")})]}),c.jsxs(qe,{className:"jv-primary",onClick:()=>l("choose"),children:[c.jsx(Vd,{}),j("models.add")]})]}),!e.length&&c.jsxs("div",{className:"jv-empty",children:[c.jsx("strong",{children:j("models.empty")}),c.jsx("span",{children:j("models.emptyHint")})]}),IC.filter(b=>e.some(w=>g(w)===b.id)).map(({id:b,label:w})=>c.jsxs("section",{className:"jv-section","aria-label":j(w),children:[c.jsx("h3",{className:"jv-section-title",children:j(w)}),c.jsx("div",{className:"jv-list",children:e.filter(k=>g(k)===b).map(k=>{const C=LC(k);return c.jsxs("button",{type:"button",className:"jv-list-row",onClick:()=>{f(k.id),u(void 0),l("editor")},children:[c.jsx(hv,{name:k.displayName}),c.jsxs("span",{className:"jv-row-text",children:[c.jsx("strong",{children:k.displayName}),c.jsx("span",{children:k.models.length?j("models.count",{count:k.models.length}):j("models.none")})]}),c.jsx("span",{className:"jv-status","data-ok":C.ok||void 0,children:C.label}),c.jsx(Ka,{className:"jv-row-chevron"})]},k.id)})})]},b))]})}const vB=[{id:"general",label:"settings.general",icon:KA},{id:"models",label:"settings.models",icon:vA},{id:"about",label:"settings.about",icon:dg}];function yB({connections:e,onChanged:i,onClose:r,initialTab:l="general"}){const[s,u]=S.useState(l);return c.jsx(Qk,{open:!0,onOpenChange:d=>{d||r()},children:c.jsxs(Kk,{className:"jv-settings-shell","aria-describedby":void 0,children:[c.jsxs("nav",{className:"jv-settings-nav","aria-label":j("settings.sections"),children:[c.jsx(cf,{className:"jv-settings-title",children:j("settings.title")}),vB.map(d=>c.jsxs("button",{type:"button",className:"jv-nav-item","aria-current":s===d.id?"page":void 0,onClick:()=>u(d.id),children:[c.jsx(d.icon,{}),j(d.label)]},d.id))]}),c.jsx("main",{className:"jv-settings-content",children:s==="general"?c.jsx(W9,{}):s==="models"?c.jsx(gB,{connections:e,onChanged:i}):c.jsx(J9,{})})]})})}const N2="Jarvy";let E2=null,_r=null,Hl=null;function xB(){return document.querySelector('link[rel="icon"][type="image/png"]')}function bB(e){if(!(_r!=null&&_r.complete)||!_r.naturalWidth)return null;const i=64,r=document.createElement("canvas");r.width=r.height=i;const l=r.getContext("2d");if(!l)return null;l.drawImage(_r,0,0,i,i);const s=e>9?"9+":String(e),u=s.length>1?21:18;return l.fillStyle="#e5484d",l.beginPath(),l.arc(i-u,u,u,0,Math.PI*2),l.fill(),l.fillStyle="#fff",l.font=`bold ${s.length>1?26:30}px system-ui, sans-serif`,l.textAlign="center",l.textBaseline="middle",l.fillText(s,i-u,u+2),r.toDataURL("image/png")}function T2(e){document.title=e>0?`(${e>99?"99+":e}) ${N2}`:N2;const i=xB();if(!i)return;if(E2??(E2=i.href),Hl??(Hl=document.querySelector('link[rel="icon"][type="image/svg+xml"]')),e<=0){i.href=E2,Hl&&!Hl.isConnected&&document.head.prepend(Hl);return}const r=bB(e);r&&(i.href=r,Hl==null||Hl.remove())}function jB(e){S.useEffect(()=>{_r||(_r=new Image,_r.src="/favicon.svg"),_r.complete?T2(e):_r.onload=()=>T2(e)},[e])}const yd=50;function wB({chatId:e,ready:i,scroller:r,me:l,onError:s}){const[u,d]=S.useState([]),[f,m]=S.useState(!1),[v,y]=S.useState(!1),[g,x]=S.useState(!1),b=S.useRef(u),w=S.useRef(e),k=S.useRef(0),C=S.useRef(!1),E=S.useRef(!1);b.current=u,w.current=e,E.current=v;const M=S.useRef(null),T=S.useRef(!1),A=S.useRef(void 0),I=S.useRef(!0),R=S.useRef(!1),B=S.useRef(null),[U,$]=S.useState(!1),z=S.useRef(0);S.useEffect(()=>{if(d([]),y(!1),R.current=!1,I.current=!0,!i||!e)return;let O=!0;const F=++k.current;return m(!0),$(!1),z.current=0,be.latestMessages(e,yd).then(ne=>{!O||F!==k.current||(T.current=!0,d(ne.messages),y(ne.hasOlder),m(!1))}).catch(ne=>{O&&(m(!1),s(ne))}),()=>{O=!1}},[e,i]);async function Y(O){const F=b.current[0],ne=++k.current;if(!F||F.chatId!==O){const W=await be.latestMessages(O,yd);w.current===O&&ne===k.current&&(d(W.messages),y(W.hasOlder),m(!1));return}const D=F.sequence-1,J=await be.messages(O,D);w.current!==O||ne!==k.current||(d(W=>[...W.filter(P=>P.chatId===O&&P.sequence<=D),...J.messages]),m(!1))}async function q(){const O=b.current[0],F=r.current;if(!(!O||!E.current||C.current)){C.current=!0,x(!0);try{const ne=await be.olderMessages(O.chatId,O.sequence,yd);if(w.current!==O.chatId)return;M.current=F?F.scrollHeight-F.scrollTop:null,d(D=>{var J;return((J=D[0])==null?void 0:J.id)===O.id?[...ne.messages,...D]:D}),y(ne.hasOlder)}catch(ne){s(ne)}finally{C.current=!1,x(!1)}}}S.useEffect(()=>{const O=r.current;if(!O)return;const F=new ResizeObserver(()=>{!R.current||!I.current||O.scrollHeight-O.scrollTop-O.clientHeight<8||O.scrollTo({top:O.scrollHeight,behavior:"instant"})}),ne=()=>{F.disconnect(),F.observe(O);for(const W of O.children)F.observe(W)};ne();const D=new MutationObserver(ne);D.observe(O,{childList:!0});const J=()=>{var W;if(!R.current){I.current=!0,$(!1);return}I.current=O.scrollHeight-O.scrollTop-O.clientHeight<160,$(!I.current),I.current&&(z.current=((W=b.current.at(-1))==null?void 0:W.sequence)??0)};return J(),O.addEventListener("scroll",J,{passive:!0}),()=>{F.disconnect(),D.disconnect(),O.removeEventListener("scroll",J)}},[r.current,e]),S.useLayoutEffect(()=>{const O=r.current,F=u.at(-1);if(O){if(M.current!==null)O.scrollTo({top:O.scrollHeight-M.current,behavior:"instant"}),M.current=null;else if(T.current&&u.length){const ne=()=>O.scrollTo({top:O.scrollHeight,behavior:"instant"});ne(),requestAnimationFrame(ne),T.current=!1,R.current=!0,I.current=!0}else F&&F.id!==A.current&&(I.current||F.senderId===l)&&O.scrollTo({top:O.scrollHeight,behavior:"smooth"});A.current=F==null?void 0:F.id,I.current&&(z.current=(F==null?void 0:F.sequence)??0)}},[u]),S.useEffect(()=>{const O=r.current,F=B.current;if(!O||!F||!v||!R.current)return;const ne=new IntersectionObserver(D=>{var J;(J=D[0])!=null&&J.isIntersecting&&R.current&&q()},{root:O,rootMargin:"400px 0px 0px 0px"});return ne.observe(F),()=>ne.disconnect()},[v,u,e,f]);async function ee(O,F){if(b.current.some(P=>P.id===O)){G(O,F);return}const D=w.current,J=await be.message(O);if(J.chatId!==D)return J.chatId;const W=await be.olderMessages(J.chatId,J.sequence+1,yd);w.current===J.chatId&&(T.current=!0,d([...W.messages,J]),y(W.hasOlder),requestAnimationFrame(()=>G(O,F)))}function G(O,F){var D;const ne=(D=r.current)==null?void 0:D.querySelector(`[data-message="${O}"]`);ne&&fC(ne,F)}const H=U?u.filter(O=>O.sequence>z.current&&O.senderId!==l).length:0;return{messages:u,setMessages:d,loading:f,hasOlder:v,loadingOlder:g,refresh:Y,top:B,away:U,unseen:H,toLatest:()=>{const O=r.current;O==null||O.scrollTo({top:O.scrollHeight,behavior:"smooth"})},toMessage:ee,cancel:()=>{k.current++}}}function SB({ready:e,selected:i,messages:r,chats:l,chatList:s,setChats:u,onError:d}){const f=l.find(m=>m.id===i);S.useEffect(()=>{const m=i,v=r.at(-1);if(!e||!m||!v||v.chatId!==m)return;const y=()=>{const g=s.current.find(x=>x.id===m);document.visibilityState!=="visible"||((g==null?void 0:g.readSequence)??0)>=v.sequence&&!(g!=null&&g.hint)&&!(g!=null&&g.alerts)||(u(x=>x.map(b=>b.id===m?{...b,readSequence:Math.max(b.readSequence,v.sequence),unread:0,mentions:0,alerts:0,atMe:!1,hint:null}:b)),be.markRead(m,v.sequence).catch(d))};return y(),document.addEventListener("visibilitychange",y),()=>document.removeEventListener("visibilitychange",y)},[r,i,e,f==null?void 0:f.readSequence,f==null?void 0:f.alerts,f==null?void 0:f.hint])}function kB({onLogin:e}){const[i,r]=S.useState(""),[l,s]=S.useState(""),[u,d]=S.useState(!1),[f,m]=S.useState(!1),[v,y]=S.useState(null),[g,x]=S.useState(document.documentElement.classList.contains("dark"));async function b(w){if(w.preventDefault(),!f){m(!0),y(null);try{const k=await be.login(i.trim(),l);s(""),e(k.username)}catch(k){y(k instanceof ts&&k.status===401?"login.wrong":k instanceof ts&&k.status===429?"login.tooMany":"login.offline")}finally{m(!1)}}}return c.jsxs("div",{className:"jv-login",children:[c.jsxs("div",{className:"jv-login-corner",children:[c.jsx("div",{className:"jv-login-locales",role:"group","aria-label":j("general.language"),children:M2.map(w=>c.jsx("button",{type:"button",lang:w,"aria-pressed":qd()===w,title:Sp(w,"name"),onClick:()=>_2(w),children:Sp(w,"short")},w))}),c.jsx("button",{className:"jv-login-theme",type:"button",onClick:()=>{Bd(g?"light":"dark"),x(!g)},"aria-label":j(g?"login.themeLight":"login.themeDark"),children:c.jsx(De,{name:g?"sun":"moon"})})]}),c.jsx("main",{className:"jv-login-stage",children:c.jsxs("div",{className:"jv-login-wrap",children:[c.jsxs("header",{className:"jv-login-brand",children:[c.jsx("img",{className:"jv-login-logo",src:"/icon.svg",alt:"",width:64,height:64}),c.jsx("h1",{children:"Jarvy"}),c.jsx("p",{children:j("login.subtitle")})]}),c.jsxs("form",{className:"jv-login-form",onSubmit:w=>void b(w),"aria-label":j("login.form"),"aria-busy":f,children:[c.jsxs("div",{className:"jv-login-field",children:[c.jsx("label",{htmlFor:"login-username",children:j("login.username")}),c.jsx("input",{id:"login-username",autoComplete:"username",autoFocus:!0,required:!0,disabled:f,value:i,onChange:w=>r(w.target.value)})]}),c.jsxs("div",{className:"jv-login-field",children:[c.jsx("label",{htmlFor:"login-password",children:j("login.password")}),c.jsxs("div",{className:"jv-login-password",children:[c.jsx("input",{id:"login-password",type:u?"text":"password",autoComplete:"current-password",required:!0,disabled:f,value:l,onChange:w=>s(w.target.value)}),c.jsx("button",{type:"button",className:"jv-login-visibility","aria-label":j(u?"login.hidePassword":"login.showPassword"),onClick:()=>d(!u),children:c.jsx(De,{name:u?"eye-slash":"eye"})})]})]}),v&&c.jsx("p",{className:"jv-login-error",role:"alert",children:j(v)}),c.jsx("button",{className:"jv-login-submit",type:"submit",disabled:f,children:j(f?"login.submitting":"login.submit")})]})]})})]})}function CB({selected:e,chats:i,transcript:r,openChat:l,setPane:s,paneRef:u,blocked:d}){const[f,m]=S.useState(null),[v,y]=S.useState(0);S.useEffect(()=>{var b;!f||e!==f.chatId||r.loading||((b=r.messages[0])==null?void 0:b.chatId)!==f.chatId||(r.toMessage(f.id,f.passage),m(null))},[f,e,r.loading,r.messages]);function g(b,w,k){var E;if(b.type==="thread"){const M=i.find(T=>T.id===b.parentId);M&&l(M),s({kind:"thread",id:b.id,parentId:b.parentId,mode:"pane",focus:{id:w,passage:k}});return}((E=u.current)==null?void 0:E.kind)==="search"&&window.matchMedia("(max-width: 760px)").matches&&s(null);const C=b.id===e;l(b),C?r.toMessage(w,k):m({chatId:b.id,id:w,passage:k})}function x(b){s({kind:"search",chat:b}),y(w=>w+1)}return S.useEffect(()=>{const b=w=>{var C,E;if(d||w.defaultPrevented||!(w.ctrlKey||w.metaKey)||w.key.toLowerCase()!=="f")return;const k=i.find(M=>M.id===e);k&&(((C=u.current)==null?void 0:C.kind)==="search"&&((E=document.activeElement)!=null&&E.closest(".jv-search-pane"))||(w.preventDefault(),x(k)))};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[d,i,e]),{openMessage:g,search:x,focusKey:v}}const NB=null;function EB(){var gr,Yr,Gr,ti,vr,ue;const[e,i]=S.useState("loading"),[r,l]=S.useState(""),[s,u]=S.useState([]),[d,f]=S.useState({}),m=S.useRef(new Map),[v,y]=S.useState([]),[g,x]=S.useState([]),[b,w]=S.useState([]),[k,C]=S.useState(null),[E,M]=S.useState({}),[T,A]=S.useState(null),[I,R]=S.useState(null),[B,U]=S.useState(null),[$,z]=S.useState([]),[Y,q]=S.useState(null),[ee,G]=S.useState(!1),[H,Q]=S.useState(!1),[O,F]=S.useState(!1),[ne,D]=S.useState(""),[J,W]=S.useState(!1),[P,V]=S.useState(null),[fe,ye]=S.useState(!1),[je,ae]=S.useState(420),[xe,oe]=S.useState(0),[ce,me]=S.useState([]),[Ne,ze]=S.useState(""),Ve=S.useRef(null),ht=S.useRef(null),ot=S.useRef(null),[Je,At]=S.useState(null),[gn,vn]=S.useState(null),[Pn,di]=S.useState(null),rn=S.useRef(T);rn.current=T;const Yi=S.useRef(0),pe=S.useRef(v);pe.current=v;const ke=S.useRef(P);ke.current=P;const Be=S.useMemo(()=>new XI(QI(r)),[r]);S.useEffect(()=>{const L=()=>Be.save();return window.addEventListener("pagehide",L),()=>window.removeEventListener("pagehide",L)},[Be]);const Ue=((gr=b.find(L=>L.kind==="user"&&L.name===r))==null?void 0:gr.id)??"",We=wB({chatId:T,ready:e==="ready",scroller:Ve,me:Ue,onError:Xe}),{messages:Pt,setMessages:yn}=We,Ut=CB({selected:T,chats:v,transcript:We,openChat:fi,setPane:V,paneRef:ke,blocked:!!B||!!Y}),Rn=((Yr=v.find(L=>L.id===T))==null?void 0:Yr.botId)??I??((Gr=s[0])==null?void 0:Gr.id);async function Un(L){const K=(m.current.get(L)??0)+1;m.current.set(L,K);const he=await be.botStatus(L);m.current.get(L)===K&&f(Ee=>({...Ee,[L]:he}))}S.useEffect(()=>{e==="ready"&&Rn&&Un(Rn).catch(Xe)},[e,Rn]);const _t=((ti=v.find(L=>L.id===T&&L.type==="channel"))==null?void 0:ti.memberIds.filter(L=>s.some(K=>K.id===L)).join(","))??"";S.useEffect(()=>{if(e==="ready"&&_t)for(const L of _t.split(","))Un(L).catch(Xe)},[e,_t]);async function On(L){var Re,$e;const[K,he,Ee,Se,Te,Le]=await Promise.all([be.bots(),be.chats(),be.modelConnections(),be.sections(),be.members(),be.followedThreads()]);l(L),u(K.bots),y(he.chats),z(Ee.connections),x(Se.sections),w(Te.members),me(Le.threads);const Qe=he.chats.find(st=>st.type!=="thread");A((Qe==null?void 0:Qe.id)??null),Qe&&M({[Qe.id]:Qe.readSequence}),R(((Re=he.chats[0])==null?void 0:Re.botId)??(($e=K.bots[0])==null?void 0:$e.id)??null),i("ready")}S.useEffect(()=>{Bd(localStorage.getItem("jarvy-theme")==="dark"?"dark":"light"),be.me().then(L=>On(L.username)).catch(()=>i("login"))},[]),S.useEffect(()=>{if(e!=="ready")return;let L=!0;const K=new EventSource("/api/events"),he=async Se=>{be.followedThreads().then(Le=>{L&&me(Le.threads)}).catch(()=>{}),oe(Le=>Le+1),await Gt();const Te=rn.current;L&&Te&&(!Se||Se===Te)&&await ll(Te)},Ee=()=>void be.sections().then(Se=>{L&&x(Se.sections)}).catch(Se=>{L&&Xe(Se)});return K.addEventListener("ready",()=>{var Te;he().catch(Le=>{L&&Xe(Le)}),Ee();const Se=(Te=pe.current.find(Le=>Le.id===rn.current))==null?void 0:Te.botId;Se&&Un(Se).catch(Le=>{L&&Xe(Le)}),be.bots().then(Le=>{L&&u(Le.bots)}).catch(Le=>{L&&Xe(Le)})}),K.addEventListener("sections",Ee),K.addEventListener("bots",()=>{be.bots().then(Se=>{L&&u(Se.bots)}).catch(Se=>{L&&Xe(Se)}),he().catch(Se=>{L&&Xe(Se)})}),K.addEventListener("inbox",()=>void he().catch(Se=>{L&&Xe(Se)})),K.addEventListener("chat",Se=>{const Te=JSON.parse(Se.data);typeof Te.chatId=="string"&&he(Te.chatId).catch(Le=>{L&&Xe(Le)})}),K.addEventListener("bot",Se=>{var Qe;const Te=JSON.parse(Se.data),Le=Te.status;m.current.set(Te.botId,(m.current.get(Te.botId)??0)+1),f(Re=>({...Re,[Te.botId]:Le})),Le.error&&((Qe=pe.current.find(Re=>Re.id===rn.current))==null?void 0:Qe.botId)===Le.botId&&ze(X8(Le)),(Le.status==="idle"||Le.status==="stop")&&be.bots().then(Re=>{L&&u(Re.bots)}).catch(Re=>{L&&Xe(Re)})}),K.onerror=()=>{be.me().catch(Se=>{L&&Se instanceof ts&&Se.status===401&&i("login")})},()=>{L=!1,K.close(),We.cancel(),Yi.current++}},[e]),SB({ready:e==="ready",selected:T,messages:Pt,chats:v,chatList:pe,setChats:y,onError:Xe}),jB(e==="ready"?v.reduce((L,K)=>L+K.alerts,0):0),S.useEffect(()=>{if(!Ne)return;const L=setTimeout(()=>ze(""),4800);return()=>clearTimeout(L)},[Ne]),S.useEffect(()=>{const L=K=>{K.defaultPrevented||B||Y||(K.key==="Escape"&&(G(!1),Q(!1),F(!1)),(K.ctrlKey||K.metaKey)&&K.key.toLowerCase()==="k"&&(K.preventDefault(),F(window.matchMedia("(max-width: 620px)").matches),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-search"))==null?void 0:he.focus()})))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[B,Y]),S.useEffect(()=>{const L=window.matchMedia("(max-width: 620px)"),K=()=>{L.matches||F(!1)};return L.addEventListener("change",K),()=>L.removeEventListener("change",K)},[]);function Xe(L){if(L instanceof ts&&L.status===401){i("login");return}ze(Ot(L,"common.failed"))}async function Gt(){const L=++Yi.current,K=await be.chats();return L===Yi.current&&y(K.chats),K.chats}async function ll(L){await We.refresh(L)}async function sr(){const[L,K]=await Promise.all([be.modelConnections(),be.bots()]);z(L.connections),u(K.bots)}const cr=()=>void be.members().then(L=>w(L.members)).catch(Xe);function xn(L){u(K=>K.map(he=>he.id===L.id?L:he)),cr()}function fi(L){var he;const K=VI(L);K?V({kind:"thread",id:K,parentId:L.id,mode:"pane",summary:((he=L.hint)==null?void 0:he.kind)==="note"}):L.id!==rn.current&&V(null),ye(!1),M(Ee=>({...Ee,[L.id]:L.readSequence})),A(L.id),L.botId&&R(L.botId),F(!1),G(!1),Q(!1)}const ol=L=>V((P==null?void 0:P.kind)==="info"&&P.page===L?null:{kind:"info",page:L});function hi(L){y(K=>K.some(he=>he.id===L.id)?K.map(he=>he.id===L.id?L:he):[L,...K])}async function ao(L){if(!J){W(!0);try{const K=await be.createChat(L);hi(K),fi(K),requestAnimationFrame(()=>{var he;return(he=document.querySelector("#jarvy-composer"))==null?void 0:he.focus()})}catch(K){Xe(K)}finally{W(!1)}}}async function Gi(){if(!J){W(!0);try{const L=await be.createBot(bI(ar(b).map(he=>he.name))),K=await be.createChat(L.id);u(he=>[...he,L]),hi(K),cr(),fi(K)}catch(L){Xe(L)}finally{W(!1)}}}async function sn(L){try{await be.deleteChat(L.id),await Gt(),rn.current===L.id&&A(null),ze(j("app.channelDeleted"))}catch(K){Xe(K)}}async function Lt(L,K){try{hi(await be.pin(L.id,K))}catch(he){Xe(he)}}async function Vt(L,K){try{hi(await be.mute(L.id,K))}catch(he){Xe(he)}}async function ur(L,K){try{await be.deleteBot(L.id,K);const he=new Set(v.filter(Ee=>Ee.type==="dm"&&Ee.botId===L.id).map(Ee=>Ee.id));y(Ee=>Ee.filter(Se=>!he.has(Se.id)).map(Se=>Se.memberIds.includes(L.id)?{...Se,memberIds:Se.memberIds.filter(Te=>Te!==L.id)}:Se)),u(Ee=>Ee.filter(Se=>Se.id!==L.id)),cr(),rn.current&&he.has(rn.current)&&A(null),B===L.id&&U(null),ze(j("app.botDeleted",{name:L.name}))}catch(he){Xe(he)}}async function dr(L,K,he,Ee,Se){const Te=T;await be.send(Te,L,K,he,!1,Ee,Se);const Le=pe.current.find(Re=>Re.id===Te),Qe=(Le==null?void 0:Le.type)==="channel"?[...new Set(dv(L,ar(b)).filter(Re=>!Le.memberIds.includes(Re.member.id)).map(Re=>Re.member.name))]:[];Qe.length&&ze(j("app.notInChannel",{names:Qe.join(j("common.listSeparator")),count:Qe.length})),await Promise.all([ll(Te),Gt()])}function Xi(L,K){be.addMember(L,K.id).then(he=>{hi(he),ze(j("app.memberAdded",{name:K.name,channel:he.title}))}).catch(Xe)}async function Qi(L){try{const K=await be.openThread(L.id);V({kind:"thread",id:K.id,parentId:L.chatId,mode:"pane"})}catch(K){Xe(K)}}function Ri(L,K){const he=v.find(Ee=>Ee.id===L.parentId);he&&fi(he),V(K?{kind:"thread",id:L.id,parentId:L.parentId,mode:"pane"}:null)}function Kn(L){U(null);const K=v.find(he=>he.id===(L.type==="thread"?L.parentId:L.id));K&&fi(K),L.type==="thread"&&V({kind:"thread",id:L.id,parentId:L.parentId,mode:"pane"})}async function Ki(L,K,he){try{const Ee=await be.react(L.id,K,he);yn(Se=>Se.map(Te=>Te.id===Ee.id?{...Te,reactions:Ee.reactions}:Te))}catch(Ee){Xe(Ee)}}function mi(L){NC(Be,L,b)}const pi=(L,K)=>L?void We.toMessage(L,K).then(async he=>{he&&Ut.openMessage(await be.chat(he),L,K)}).catch(()=>ze(j("app.sourceGone"))):ze(j("app.sourceGone"));function fr(L){me(K=>K.map(he=>he.id===L.id?{...he,...L}:he)),be.followedThreads().then(K=>me(K.threads)).catch(()=>{})}function sl(L){L.preventDefault();const K=Ee=>ae(Math.min(Math.max(340,window.innerWidth-Ee.clientX),Math.round(window.innerWidth*.6))),he=()=>{window.removeEventListener("pointermove",K),window.removeEventListener("pointerup",he),document.body.style.cursor=""};window.addEventListener("pointermove",K),window.addEventListener("pointerup",he),document.body.style.cursor="col-resize"}async function gi(){try{await Be.clear(L=>be.removeAttachment(L)),await be.logout(),i("login"),G(!1),q(null),m.current.clear(),f({}),V(null),me([]),l(""),A(null),y([]),u([]),z([]),yn([])}catch(L){Xe(L)}}const ya=e==="ready"&&v.some(L=>L.id===T);S.useEffect(()=>{const L=Ve.current;if(!L)return;let K=0,he=L.clientHeight;const Ee=()=>{K=L.scrollHeight-L.scrollTop-L.clientHeight},Se=new ResizeObserver(()=>{L.clientHeight!==he&&(he=L.clientHeight,L.scrollTo({top:L.scrollHeight-L.clientHeight-K,behavior:"instant"}))}),Te=new MutationObserver(Ee);return Ee(),L.addEventListener("scroll",Ee,{passive:!0}),Se.observe(L),Te.observe(L,{childList:!0,subtree:!0,characterData:!0}),()=>{Se.disconnect(),Te.disconnect(),L.removeEventListener("scroll",Ee)}},[ya]);const Zn=v.find(L=>L.id===T),hr=(Zn==null?void 0:Zn.type)==="channel",Jn=B9(e==="ready"?(vr=v.find(L=>L.id===T&&L.type==="dm"))==null?void 0:vr.botId:void 0,xe);if(e==="loading")return c.jsx("div",{className:"jarvy-loading",children:j("app.connecting")});if(e==="login")return c.jsx(kB,{onLogin:L=>void On(L).catch(Xe)});const an=v.find(L=>L.id===T),cn=s.find(L=>L.id===((an==null?void 0:an.botId)??I))??s[0],mr=!!(cn!=null&&cn.connectionId),Wn=hr||mr,ei=(cn==null?void 0:cn.name)??"Jarvy",_n=cn?d[cn.id]:void 0,It=_n!=null&&_n.error?j("activity.error"):(_n==null?void 0:_n.status)==="running"?sC(_n.activity):"",Mt=(ue=[...Pt].reverse().find(L=>{var K;return((K=L.question)==null?void 0:K.state)==="pending"}))==null?void 0:ue.id,$t=(P==null?void 0:P.kind)==="thread"?P:null,bn=($t==null?void 0:$t.mode)==="full",cl=hr?Zn:void 0,xa=s.find(L=>L.id===B),ba=new Set(Object.values(d).filter(L=>L.status==="running"&&L.activity!=="asking").map(L=>L.botId)),pr=new Set(Object.values(d).filter(L=>L.activity==="asking").map(L=>L.botId));return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"ui-app","data-nav":O?"":void 0,"data-pane":P&&!bn?"":void 0,style:{"--ui-pane":`${je}px`},children:[c.jsx(YI,{username:r,chats:v,sections:g,bots:s,members:b,followed:ce,followedOpen:fe&&!bn,working:ba,asking:pr,selected:fe?null:T,filter:ne,creating:J,createMenu:H,accountMenu:ee,onFilterChange:D,onOpenFollowed:()=>{ye(!0),V(null),F(!1)},onOpenChat:fi,onOpenBot:L=>void ao(L.id),onOpenMenu:(L,K)=>vn({target:L,at:K}),onEditSection:L=>C({kind:"section",section:L}),onCreate:L=>{if(L==="bot")return void Gi();C({kind:L}),Q(!1)},onFind:Ut.openMessage,onOpenFound:Kn,onError:Xe,onToggleCreate:L=>{Q(L),G(!1)},onToggleAccount:L=>{G(L),Q(!1)},onSettings:()=>{G(!1),q("general")},onToggleTheme:()=>{Bd(document.documentElement.classList.contains("dark")?"light":"dark"),G(!1)},onLogOut:()=>void gi()}),c.jsx(L9,{chat:an,inChannel:hr,bots:s,members:b,meId:Ue,drafts:Be,composeReady:Wn,botName:ei,activeBot:cn,status:_n,connections:$,activity:It,history:We,divider:E[(an==null?void 0:an.id)??""]??(an==null?void 0:an.readSequence)??0,activeQuestion:Mt,pane:P,onPane:V,onToggleInfo:ol,find:Ut,onNav:()=>F(!0),onBot:L=>U(L),hasBotDirects:Jn.length>0,onInvite:Xi,onQuote:mi,onReply:L=>void Qi(L),onReact:(L,K,he)=>void Ki(L,K,he),onJump:pi,onSettled:L=>yn(K=>K.map(he=>he.id===L.id?L:he)),onPreview:(L,K)=>At({files:L,index:K}),onSend:dr,notice:ze,onSaveNote:async L=>{try{hi(await be.setNote(an.id,L))}catch(K){throw Xe(K),K}},createBot:()=>void Gi(),creating:J,updateBot:xn,onManageModels:()=>q("models"),error:Xe,chatArea:ht,transcript:Ve,composeWrap:ot,hidden:bn||fe,onOpenThread:L=>V({kind:"thread",id:L,parentId:an.id,mode:"pane"})}),c.jsx(X9,{pane:P,followedView:fe,followed:ce,chats:v,sections:g,members:b,bots:s,statuses:d,meId:Ue,drafts:Be,tick:xe,paneChannel:cl,activeBot:cn,botDirects:Jn,find:Ut,onPane:V,onNav:()=>F(!0),onBackToChannel:Ri,onAddMembers:L=>C({kind:"members",chat:L}),onOpenBot:U,onPin:L=>void Lt(L,!L.pinned),onMute:L=>void Vt(L,!L.muted),onDeleteChannel:L=>di({kind:"chat",chat:L}),onChannelSaved:hi,onThreadChanged:fr,onInvite:Xi,onPreview:(L,K)=>At({files:L,index:K}),onNotice:ze,onError:Xe,paneWidth:je,onResize:sl})]}),O&&c.jsx("div",{className:"ui-nav-scrim",onClick:()=>F(!1),role:"presentation"}),Y&&c.jsx(yB,{connections:$,initialTab:Y,onChanged:sr,onClose:()=>q(null)}),c.jsx(DI,{dialog:k,entryMenu:gn,confirm:Pn,preview:Je,infoBot:xa,bots:s,statuses:d,chats:v,sections:g,members:b,connections:$,meId:Ue,onDialog:C,onEntryMenu:vn,onConfirm:di,onPreview:At,onInfoBot:U,onSettings:()=>q("models"),onChannelInfo:L=>{fi(L),V({kind:"info",page:"main"})},onOpenChatId:L=>{A(L),F(!1)},chatSaved:hi,openChat:fi,onSectionSaved:L=>{x(K=>K.some(he=>he.id===L.id)?K.map(he=>he.id===L.id?L:he):[...K,L]),C(null)},onSectionDeleted:L=>{C(null),x(K=>K.filter(he=>he.id!==L)),Gt().catch(Xe)},updateBot:xn,openAnywhere:Kn,removeChannel:sn,deleteBot:ur,pinChat:Lt,muteChat:Vt}),Ne&&c.jsx("div",{className:"ui-toast",role:"status",children:Ne}),NB]})}function TB(){return D2(),c.jsx(EB,{})}RT.createRoot(document.getElementById("root")).render(c.jsx(S.StrictMode,{children:c.jsx(TB,{})}));
|